695593266@qq.com 1 неделя назад
Родитель
Сommit
a6a5388b29

+ 40 - 6
src/views/produce/components/jobBooking/components/batchPackagingGrouping.vue

@@ -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;
         }

+ 2 - 2
vue.config.js

@@ -32,7 +32,7 @@ module.exports = {
       // 当我们的本地的请求 有/api的时候,就会代理我们的请求地址向另外一个服务器发出请求
       '/api': {
         // target: 'http://124.71.68.31:50001',
-        // target: 'http://192.168.1.125:18086',
+        target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.251:18086', // 开发环境
@@ -45,7 +45,7 @@ module.exports = {
         // target: 'http://192.168.1.251:18186', // 测试环境
         // target: 'http://192.168.1.251:18087',
         // target: 'http://116.163.22.90:86/api', // 嘉实生产
-        target: 'http://aiot.zoomwin.com.cn:51005/api',
+        // target: 'http://aiot.zoomwin.com.cn:51005/api',
         // target: 'http://f222326r53.imwork.net',
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {