695593266@qq.com 7 месяцев назад
Родитель
Сommit
847226c3e4

+ 54 - 2
src/views/produce/components/jobBooking/index.vue

@@ -1816,15 +1816,67 @@
 
       checkJobBook(list) {
         let wordCodeList = [];
+        let reportCodeList = [];
         for (let item of list) {
           if (item.reportFormed != '0') {
             wordCodeList.push(item.workOrderCode);
           }
         }
 
-        if (wordCodeList.length != 0) {
+        if (!this.isReportTime) {
+          for (let item of list) {
+            for (let it of this.List) {
+              if (item.workOrderCode == it.code) {
+                if (item.feedDate) {
+                  const t1 = new Date(item.feedDate);
+                  const t2 = new Date(it.workReportInfo.executorTime);
+
+                  if (t1 > t2) {
+                    reportCodeList.push(item.workOrderCode);
+                  }
+                }
+
+                if (item.reportDate) {
+                  const t1 = new Date(item.reportDate);
+                  const t2 = new Date(it.workReportInfo.executorTime);
+
+                  if (t1 > t2) {
+                    reportCodeList.push(item.workOrderCode);
+                  }
+                }
+              }
+            }
+          }
+        }
+
+        if (reportCodeList.length != 0) {
+          this.$confirm(
+            `工单号${reportCodeList.join(
+              ','
+            )}报工时间大于上道工序的执行时间,是否继续报工?`,
+            '提示',
+            {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+              center: true
+            }
+          )
+            .then(() => {
+              return this.checkWorkCode(wordCodeList);
+            })
+            .catch(() => {
+              this.loading.close();
+            });
+        } else {
+          this.checkWorkCode(wordCodeList);
+        }
+      },
+
+      checkWorkCode(list) {
+        if (list.length != 0) {
           this.$confirm(
-            `工单号${wordCodeList.join(',')}已有报工,是否继续重复报工?`,
+            `工单号${list.join(',')}已有报工,是否继续重复报工?`,
             '提示',
             {
               confirmButtonText: '确定',

+ 1 - 1
src/views/produce/components/warehousing/components/workOrderBom.vue

@@ -29,7 +29,7 @@
           <div class="rx ww33">
             <div class="lable rx-cc">牌号</div>
             <div class="content rx-sc">
-              <div>{{ item.brandNum }}</div>
+              <div>{{ item.brandNo }}</div>
             </div>
           </div>
 

+ 7 - 7
src/views/produce/components/workPlan/index.vue

@@ -578,13 +578,13 @@
       },
 
       async openEdit(type, row) {
-        // if (type == 'edit') {
-        //   const code = await verificationQualityInspector(row.id);
-        //   if (code == '-1') {
-        //     console.log('不是报工人');
-        //     return;
-        //   }
-        // }
+        if (type == 'edit') {
+          const code = await verificationQualityInspector(row.id);
+          if (code == '-1') {
+            console.log('不是报工人');
+            return;
+          }
+        }
 
         const req = {
           workOrderId: row.id,

+ 2 - 2
vue.config.js

@@ -36,8 +36,8 @@ module.exports = {
         // target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.251:18086',
-        // target: 'http://192.168.1.125:18086',
-        target: 'http://192.168.1.116:18086', // 赵沙金
+        target: 'http://192.168.1.125:18086',
+        // target: 'http://192.168.1.116:18086', // 赵沙金
         // target: 'http://192.168.1.251:18086', // 开发环境
         // target: 'http://192.168.1.103:18086',192.168.1.116
         // target: 'http://192.168.1.144:18086',