|
|
@@ -5,8 +5,8 @@
|
|
|
<div class="card-wrap">
|
|
|
<div class="card-tit">
|
|
|
花材信息 (按 Esc 关闭窗口)
|
|
|
- <el-button @click="" style="margin-left:80px;">使用填单价</el-button>
|
|
|
- <el-button @click="" style="margin-left:20px;">使用自带价</el-button>
|
|
|
+ <el-button style="margin-left:80px;" @click="usePrice(detailInfo,0)">使用填单价</el-button>
|
|
|
+ <el-button style="margin-left:20px;" @click="usePrice(detailInfo,1)">使用自带价</el-button>
|
|
|
<el-button type="primary" @click="addItme()" style="margin-left:20px;">添加花材</el-button>
|
|
|
</div>
|
|
|
<div class="card-body">
|
|
|
@@ -28,9 +28,9 @@
|
|
|
<el-table-column property="stock" label="剩余"></el-table-column>
|
|
|
<el-table-column label="单价">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model="scope.row.currentHdPrice" @focus="scope.row.currentHdPrice=''" placeholder="数量" style="width:50px;"
|
|
|
+ <el-input v-model="scope.row.currentHdPrice" @focus="scope.row.currentHdPrice=''" placeholder="数量" style="width:50px;margin-right:2px;"
|
|
|
:class="[Number(scope.row.cost)>Number(scope.row.currentHdPrice) ? 'cost-blue' : '']">
|
|
|
- </el-input>
|
|
|
+ </el-input>元
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="数量">
|
|
|
@@ -84,7 +84,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="margin-left:80px;margin-top:20px;">
|
|
|
- <el-button @click="">取消</el-button>
|
|
|
+ <el-button @click="closeFn">取消</el-button>
|
|
|
|
|
|
<el-popconfirm title="确认保存?" @confirm="savePrice()" @onConfirm="savePrice()" style="margin-left:80px;">
|
|
|
<el-button slot="reference">保存</el-button>
|
|
|
@@ -152,6 +152,18 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ usePrice(info,flag){
|
|
|
+ if(info.product && !this.$util.isEmpty(info.product)){
|
|
|
+ info.product.forEach((item,idx,array) => {
|
|
|
+ if(flag == 0){
|
|
|
+ item.currentHdPrice = item.itemModifyPrice
|
|
|
+ }else{
|
|
|
+ item.currentHdPrice = item.itemSalePrice
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.$forceUpdate()
|
|
|
+ }
|
|
|
+ },
|
|
|
commitItem(){
|
|
|
let product = []
|
|
|
let hasError = false
|
|
|
@@ -179,7 +191,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
if(hasLessCostPrice == true && this.lessCostCould == 0){
|
|
|
- this.$message.error('有售价低于成本,请打开允许设置')
|
|
|
+ this.$message.error('有花材低于成本销售,请允许')
|
|
|
return false
|
|
|
}
|
|
|
if(hasError == true){
|
|
|
@@ -188,6 +200,7 @@ export default {
|
|
|
this.$service.order.arrival({id:that.arrivalData.id,product:JSON.stringify(product),packCost:that.packCost,sendCost:that.sendCost}).then(res=>{
|
|
|
this.$message.success('提交成功')
|
|
|
this.closeFn()
|
|
|
+ this.$emit('refreshData')
|
|
|
})
|
|
|
},
|
|
|
savePrice(){
|
|
|
@@ -286,13 +299,17 @@ export default {
|
|
|
text-align:center;
|
|
|
}
|
|
|
.stock-red{
|
|
|
- border:2px solid red;
|
|
|
color:red;
|
|
|
font-weight:bold;
|
|
|
+ ::v-deep .el-input__inner {
|
|
|
+ border:2px solid red;
|
|
|
+ }
|
|
|
}
|
|
|
.cost-blue{
|
|
|
- border:2px solid blue;
|
|
|
color:blue;
|
|
|
font-weight:bold;
|
|
|
+ ::v-deep .el-input__inner {
|
|
|
+ border:2px solid blue;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|