|
@@ -222,7 +222,7 @@
|
|
|
<el-input v-model="scope.row.realMaterialNumber" size="small" readonly @click.native="getRealMaterData(scope.$index)" ></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="left" label="实装厂产品编码" prop="realMaterialOldNumber" min-width="120" show-overflow-tooltip>
|
|
|
+ <el-table-column align="left" label="实装厂产品编码" prop="realMaterialOldNumber" min-width="200" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
<el-input v-model="scope.row.realMaterialOldNumber" size="small" readonly @click.native="getRealMaterData(scope.$index)"></el-input>
|
|
|
</template>
|
|
@@ -534,7 +534,8 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" label="销售类型" prop="saleName" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="产品编码" prop="number" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column align="center" label="物料编码" prop="number" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column align="center" label="产品编码" prop="materialOldNumber" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column align="center" label="产品名称" prop="name" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column align="center" label="产品型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column align="center" label="产品价格" prop="batchPrice" min-width="80" show-overflow-tooltip></el-table-column>
|
|
@@ -1099,6 +1100,7 @@ export default {
|
|
|
// 重置筛选表单
|
|
|
resetGoodsScreenForm() {
|
|
|
this.$refs.goodsScreenForm.resetFields();
|
|
|
+ this.currentRadio = ''
|
|
|
this.currentPage = 1;
|
|
|
this.getGoodsList();
|
|
|
},
|
|
@@ -1174,7 +1176,25 @@ export default {
|
|
|
// 确定 添加产品
|
|
|
submitAddGoods() {
|
|
|
// this.goodsList = this.delRepeat(this.rightGoodsList, this.goodsList);
|
|
|
+
|
|
|
this.goodsList = this.goodsList.concat(this.rightGoodsList);
|
|
|
+ this.goodsList.forEach((k,i)=>{
|
|
|
+ this.$set(this.goodsList[i],'realMaterialId',k.materialId)
|
|
|
+ this.$set(this.goodsList[i],'realMaterialName',k.materialName)
|
|
|
+ this.$set(this.goodsList[i],'realMaterialNumber',k.materialNumber)
|
|
|
+ this.$set(this.goodsList[i],'realMaterialOldNumber',k.materialOldNumber)
|
|
|
+ this.$set(this.goodsList[i],'realSpecification',k.specification)
|
|
|
+ if(!this.listItem){
|
|
|
+ let str =`实装物料编号:${k.materialNumber}实装厂产品编码:${k.materialOldNumber}`
|
|
|
+ let remark
|
|
|
+ if (!this.goodsList[i].remark) {
|
|
|
+ remark = str
|
|
|
+ }else{
|
|
|
+ remark = this.goodsList[i].remark.replace(/str/g,str)
|
|
|
+ }
|
|
|
+ this.$set(this.goodsList[i],'remark',remark)
|
|
|
+ }
|
|
|
+ })
|
|
|
this.isShowGoodsDialog = false;
|
|
|
this.leftGoodsList = [];
|
|
|
this.rightGoodsList = [];
|
|
@@ -1196,13 +1216,21 @@ export default {
|
|
|
// realSpecification
|
|
|
// 实装规格型号
|
|
|
const currentData = this.leftGoodsList.find(e=>e.id===this.currentRadio)
|
|
|
-
|
|
|
this.$set(this.goodsList[this.currentId],'realMaterialId',currentData.materialId)
|
|
|
this.$set(this.goodsList[this.currentId],'realMaterialName',currentData.materialName)
|
|
|
this.$set(this.goodsList[this.currentId],'realMaterialNumber',currentData.materialNumber)
|
|
|
this.$set(this.goodsList[this.currentId],'realMaterialOldNumber',currentData.materialOldNumber)
|
|
|
this.$set(this.goodsList[this.currentId],'realSpecification',currentData.specification)
|
|
|
- this.$set(this.goodsList[this.currentId],'remark',`${this.goodsList[this.currentId].remark},实装物料编号:${currentData.materialNumber},实装厂产品编码:${currentData.materialOldNumber}`)
|
|
|
+ if(!this.listItem){
|
|
|
+ let str =`实装物料编号:${currentData.materialNumber}实装厂产品编码:${currentData.materialOldNumber}`
|
|
|
+ let remark
|
|
|
+ if (!this.goodsList[this.currentId].remark) {
|
|
|
+ remark = str
|
|
|
+ }else{
|
|
|
+ remark = this.goodsList[this.currentId].remark.replace(/str/g,str)
|
|
|
+ }
|
|
|
+ this.$set(this.goodsList[this.currentId],'remark',remark)
|
|
|
+ }
|
|
|
this.isSetMaterial = false
|
|
|
},
|
|
|
// 检查库存
|
|
@@ -1400,7 +1428,23 @@ export default {
|
|
|
}),
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
+ this.goodsList.forEach((k,i)=>{
|
|
|
+ this.$set(this.goodsList[i],'realMaterialId',k.materialId)
|
|
|
+ this.$set(this.goodsList[i],'realMaterialName',k.materialName)
|
|
|
+ this.$set(this.goodsList[i],'realMaterialNumber',k.materialNumber)
|
|
|
+ this.$set(this.goodsList[i],'realMaterialOldNumber',k.materialOldNumber)
|
|
|
+ this.$set(this.goodsList[i],'realSpecification',k.specification)
|
|
|
+ if(!this.listItem){
|
|
|
+ let str =`实装物料编号:${k.materialNumber}实装厂产品编码:${k.materialOldNumber}`
|
|
|
+ let remark
|
|
|
+ if (!this.goodsList[i].remark) {
|
|
|
+ remark = str
|
|
|
+ }else{
|
|
|
+ remark = this.goodsList[i].remark.replace(/str/g,str)
|
|
|
+ }
|
|
|
+ this.$set(this.goodsList[i],'remark',remark)
|
|
|
+ }
|
|
|
+ })
|
|
|
this.goodsList.forEach(item => {
|
|
|
item.customerWalletId = (item.wallets && item.wallets.length) ? item.wallets[0].customerWalletId : '';
|
|
|
item.serviceId = (item.wallets && item.wallets.length) ? item.wallets[0].serviceId : '';
|