|
@@ -548,16 +548,14 @@ export default {
|
|
|
if (this.baseForm.isUnpack != null && this.baseForm.isUnpack != undefined && this.baseForm.isUnpack != '') {
|
|
if (this.baseForm.isUnpack != null && this.baseForm.isUnpack != undefined && this.baseForm.isUnpack != '') {
|
|
|
//拆包
|
|
//拆包
|
|
|
if (this.baseForm.isUnpack == 1) {
|
|
if (this.baseForm.isUnpack == 1) {
|
|
|
- await this.updatePackingList(packingList);
|
|
|
|
|
- // await this.handleUnpackCase(packingList);
|
|
|
|
|
|
|
+ await this.handleUnpackCase(packingList);
|
|
|
} else if (this.baseForm.isUnpack == 0) {
|
|
} else if (this.baseForm.isUnpack == 0) {
|
|
|
await this.updatePackingList(packingList);
|
|
await this.updatePackingList(packingList);
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
console.log(this.isCheck, 'this.isCheck')
|
|
console.log(this.isCheck, 'this.isCheck')
|
|
|
if (!this.isCheck) {
|
|
if (!this.isCheck) {
|
|
|
- await this.updatePackingList(packingList);
|
|
|
|
|
- // await this.handleUnpackCase(packingList);
|
|
|
|
|
|
|
+ await this.handleUnpackCase(packingList);
|
|
|
} else {
|
|
} else {
|
|
|
await this.updatePackingList(packingList);
|
|
await this.updatePackingList(packingList);
|
|
|
}
|
|
}
|
|
@@ -661,7 +659,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
//取样方式选择
|
|
//取样方式选择
|
|
|
- handleSampleNumber(val) {
|
|
|
|
|
|
|
+ async handleSampleNumber(val) {
|
|
|
console.log(val, 'val');
|
|
console.log(val, 'val');
|
|
|
this.conditionType = val;
|
|
this.conditionType = val;
|
|
|
//清空样品清单列表
|
|
//清空样品清单列表
|
|
@@ -669,11 +667,17 @@ export default {
|
|
|
const dataS = this.$refs.table12.getData();
|
|
const dataS = this.$refs.table12.getData();
|
|
|
//取整样
|
|
//取整样
|
|
|
if (val == 1) {
|
|
if (val == 1) {
|
|
|
- this.sampleList = dataS;
|
|
|
|
|
- this.formData.portion = dataS.length;
|
|
|
|
|
- this.$refs.table12.toggleAllSelection();
|
|
|
|
|
- this.activeName = '2';
|
|
|
|
|
- this.$message.success('取样成功!');
|
|
|
|
|
|
|
+ if (this.selectedList.length == 0) {
|
|
|
|
|
+ this.$message.warning('请先选择样品!');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ for (let i = 0; i < this.selectedList.length; i++) {
|
|
|
|
|
+ this.selectedList[i].sampleCode = await this.getSampleCode();
|
|
|
|
|
+ }
|
|
|
|
|
+ this.sampleList = this.selectedList;
|
|
|
|
|
+ this.formData.portion = this.selectedList.length;
|
|
|
|
|
+ this.activeName = '2';
|
|
|
|
|
+ this.$message.success('取样成功!');
|
|
|
|
|
+ }
|
|
|
} else if (val == 2) {
|
|
} else if (val == 2) {
|
|
|
this.formData.sampleUnit = dataS[0].measureUnit;
|
|
this.formData.sampleUnit = dataS[0].measureUnit;
|
|
|
|
|
|
|
@@ -730,7 +734,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
getCategoryInfo(val) {
|
|
getCategoryInfo(val) {
|
|
|
- this.baseForm.isUnpack = val.categoryWms.isUnpack;
|
|
|
|
|
|
|
+ // this.baseForm.isUnpack = val.categoryWms.isUnpack;
|
|
|
|
|
|
|
|
this.isConsumable = val.category.isConsumable;
|
|
this.isConsumable = val.category.isConsumable;
|
|
|
},
|
|
},
|