diff --git a/src/views/distribution/inventory/distributionStockList.vue b/src/views/distribution/inventory/distributionStockList.vue index 277432f9..0c576e30 100644 --- a/src/views/distribution/inventory/distributionStockList.vue +++ b/src/views/distribution/inventory/distributionStockList.vue @@ -848,6 +848,9 @@ export default { case '1': let a = this.optionsName.find(i => i.id == row); console.log('aaaa>>', a); + if(!a){ + this.formInline.materialId=null + } if (!!a) { this.formInline.materialCode = a.productCode; this.formInline.cargoUnit = a.logpmUnit; @@ -856,6 +859,7 @@ export default { this.formInline.packageNum = a.packageNum; this.formInline.descriptionGoods = a.descriptionGoods; this.formInline.sku = a.sku; + this.formInline.materialId=a.id; this.unpackFormDisable = this.formInline; } break; @@ -1014,6 +1018,8 @@ export default { }, //拆包提交 handleSubmit() { + console.log(this.stockList,'this.stockList'); + // if(this.selectionListDismantle.length < 1){ // this.$message.warning("请选择一条数据!!!"); // return ; @@ -1041,15 +1047,18 @@ export default { this.formInline.storeNum = parseInt(numbers[0]) * parseInt(this.formInline.unpackingQuantity); } - // this.formInline.id =this.stockList.id; - this.formInline.materialId = this.stockList.materialId; + this.formInline.id =this.stockList.id; + // this.formInline.materialId = this.stockList.materialId; this.formInline.marketId = this.stockList.marketId; this.formInline.storeId = !!this.stockList.storeId && this.stockList.storeId != '-1' ? this.stockList.storeId : null; - + this.formInline.descriptionGoods = this.formInline.materialIdName; + if(!this.formInline.materialId){ + delete this.formInline.materialId; + } addParcels(this.formInline).then(() => { this.formInline = {}; this.unpackFormDisable={} diff --git a/src/views/distribution/inventory/distributionStockListMarket.vue b/src/views/distribution/inventory/distributionStockListMarket.vue index d93ad6e7..0b5d3698 100644 --- a/src/views/distribution/inventory/distributionStockListMarket.vue +++ b/src/views/distribution/inventory/distributionStockListMarket.vue @@ -821,6 +821,7 @@ export default { * 查询 * */ async remoteMethodName(query) { + console.log('query', query); if (query) { this.loading = true; //查询物料数据 @@ -849,6 +850,9 @@ export default { case '1': let a = this.optionsName.find(i => i.id == row); console.log('aaaa>>', a); + if(!a){ + this.formInline.materialId=null + } if (!!a) { this.formInline.materialCode = a.productCode; this.formInline.cargoUnit = a.logpmUnit; @@ -857,6 +861,7 @@ export default { this.formInline.packageNum = a.packageNum; this.formInline.descriptionGoods = a.descriptionGoods; this.formInline.sku = a.sku; + this.formInline.materialId=a.id; this.unpackFormDisable = this.formInline; } break; @@ -1038,11 +1043,13 @@ export default { parseInt(numbers[0]) * parseInt(this.formInline.unpackingQuantity); } this.formInline.id = this.stockList.id; - this.formInline.materialId = this.stockList.materialId; + // this.formInline.materialId = this.stockList.materialId; this.formInline.marketId = this.stockList.marketId; this.formInline.storeId = this.stockList.storeId; this.formInline.descriptionGoods = this.formInline.materialIdName; - + if(!this.formInline.materialId){ + delete this.formInline.materialId; + } addParcels(this.formInline).then(() => { this.box = false; this.dismantle = false;