|
|
@@ -1086,6 +1086,9 @@
|
|
|
getManualUnpackReportData() {
|
|
|
const list = Array.isArray(this.newDataList) ? this.newDataList : [];
|
|
|
const confirmedList = list.filter((item) => item && item.confirm == 1);
|
|
|
+ const packableConfirmedList = confirmedList.filter((item) =>
|
|
|
+ this.isPackableReportItem(item)
|
|
|
+ );
|
|
|
|
|
|
if (!confirmedList.length) {
|
|
|
return {
|
|
|
@@ -1095,11 +1098,22 @@
|
|
|
}
|
|
|
|
|
|
return {
|
|
|
- list: confirmedList,
|
|
|
- totalQuantity: this.sumFeedQuantity(confirmedList)
|
|
|
+ list: packableConfirmedList,
|
|
|
+ totalQuantity: this.sumFeedQuantity(packableConfirmedList)
|
|
|
};
|
|
|
},
|
|
|
|
|
|
+ isPackableReportItem(item) {
|
|
|
+ const extInfo = (item && item.extInfo) || {};
|
|
|
+
|
|
|
+ return (
|
|
|
+ !extInfo.isLoss &&
|
|
|
+ (!extInfo.isQualified ||
|
|
|
+ extInfo.isQualified == 1 ||
|
|
|
+ extInfo.isQualified == 3)
|
|
|
+ );
|
|
|
+ },
|
|
|
+
|
|
|
sumFeedQuantity(list) {
|
|
|
return list.reduce((acc, item) => {
|
|
|
const quantity = Number(item && item.feedQuantity);
|
|
|
@@ -1154,6 +1168,25 @@
|
|
|
return value === 0 || value ? String(value).trim() : '';
|
|
|
},
|
|
|
|
|
|
+ clearManualUnpackPackingData() {
|
|
|
+ this.formedNumLast = '';
|
|
|
+ this.minimumPackage = [];
|
|
|
+ this.withinPackage = [];
|
|
|
+ this.outsidePackage = [];
|
|
|
+ this.DispositionList = [];
|
|
|
+ this.newDispositionList = [];
|
|
|
+ this.packageDispositionData = '';
|
|
|
+ this.packageCell = '';
|
|
|
+ this.packageUnit = '';
|
|
|
+ this.conversionUnit = '';
|
|
|
+ this.packageOneCell = '';
|
|
|
+ this.packageOneUnit = '';
|
|
|
+ this.conversionOneUnit = '';
|
|
|
+ this.packageTwoCell = '';
|
|
|
+ this.packageTwoUnit = '';
|
|
|
+ this.conversionTwoUnit = '';
|
|
|
+ },
|
|
|
+
|
|
|
checkUnpack() {
|
|
|
this.$confirm('此操作将进行拆包, 是否继续?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
@@ -1232,25 +1265,26 @@
|
|
|
const manualUnpackReport = this.getManualUnpackReportData();
|
|
|
|
|
|
if (this.splitList.length) {
|
|
|
- this.$message.error('产品已分包');
|
|
|
+ this.$message.warning('产品已分包');
|
|
|
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
if (!manualUnpackReport.totalQuantity) {
|
|
|
- this.$message.error('包装总数数量不能为空');
|
|
|
+ this.clearManualUnpackPackingData();
|
|
|
+ this.$message.warning('包装总数数量不能为空');
|
|
|
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
if (!v.packageCell) {
|
|
|
- this.$message.error('内包装数量不能为空');
|
|
|
+ this.$message.warning('内包装数量不能为空');
|
|
|
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
if (!v.packageUnit) {
|
|
|
- this.$message.error('包装单位不能为空');
|
|
|
+ this.$message.warning('包装单位不能为空');
|
|
|
|
|
|
return false;
|
|
|
}
|