695593266@qq.com 9 miesięcy temu
rodzic
commit
8296f624af

+ 24 - 1
src/views/produce/components/jobBooking/components/oneJobQualityBomPL.vue

@@ -288,6 +288,7 @@
               <el-input
                 v-model="row.extInfo.reportWeight"
                 style="width: 240px"
+                @input="qualityChange"
               ></el-input>
 
               <span style="display: inline-block; margin-left: 26px">
@@ -516,26 +517,48 @@
         if (this.item.sampleQuality && this.item.sampleQuality.length != 0) {
           let formedNum = 0;
           let notFormedNum = 0;
+          let formedWeightCount = 0;
+          let notFormedWeightCount = 0;
           this.item.sampleQuality.forEach((item) => {
             if (item.extInfo.batchReportInfo.length == 0) {
               const data = item.extInfo;
-              if (data.appearance == 1 || data.appearance == 3) {
+              if (
+                data.appearance == 1 ||
+                data.appearance == 3 ||
+                !data.appearance
+              ) {
                 formedNum++;
+                formedWeightCount += Number(data.reportWeight);
               }
 
               if (data.appearance == 2) {
                 notFormedNum++;
+                notFormedWeightCount += Number(data.reportWeight);
               }
             } else if (item.extInfo.batchReportInfo.length != 0) {
               const data = item.extInfo.batchReportInfo;
               data.forEach((it) => {
                 formedNum += Number(it.allFeedQuantity);
+                formedWeightCount += Number(it.allReportWeight);
               });
             }
           });
 
+          console.log(formedWeightCount, '合格品重量');
+          console.log(notFormedWeightCount, '不合格品重量');
+
           this.$set(this.item.workReportInfo, 'formedNum', formedNum);
           this.$set(this.item.workReportInfo, 'notFormedNum', notFormedNum);
+          this.$set(
+            this.item.workReportInfo,
+            'formedWeight',
+            formedWeightCount
+          );
+          this.$set(
+            this.item.workReportInfo,
+            'notFormedWeight',
+            notFormedWeightCount
+          );
           this.$forceUpdate();
         }
       },

+ 39 - 19
src/views/produce/components/juRenPack.vue

@@ -14,7 +14,7 @@
       </div>
 
       <div class="label-info-right">
-        <div class="right-box">{{ level ? level : ' ' }}</div>
+        <div class="right-div">{{ level ? level : ' ' }}</div>
         <div class="right-div"
           >{{ netWeight ? netWeight : ' '
           }}{{ weightUnit ? weightUnit : ' ' }}</div
@@ -33,7 +33,19 @@
   export default {
     data() {
       return {
-        productName: ''
+        batchNo: '',
+        createDate: '',
+        enforceStandards: '',
+        layBy: '',
+        level: '',
+        netWeight: '',
+        notice: '',
+        productName: '',
+        purchaseOrigins: '',
+        specification: '',
+        warrantyPeriod: '',
+        warrantyPeriodUnit: '',
+        weightUnit: ''
       };
     },
 
@@ -53,19 +65,20 @@
         warrantyPeriodUnit,
         weightUnit
       } = this.$route.query;
-      this.productName = productName;
-      this.batchNo = batchNo;
-      this.createDate = createDate;
-      this.enforceStandards = enforceStandards;
-      this.layBy = layBy;
-      this.level = level;
-      this.netWeight = netWeight;
-      this.notice = notice;
-      this.purchaseOrigins = purchaseOrigins;
-      this.specification = specification;
-      this.warrantyPeriod = warrantyPeriod;
-      this.warrantyPeriodUnit = warrantyPeriodUnit;
-      this.weightUnit = weightUnit;
+      this.productName = productName ? productName : '';
+      this.batchNo = batchNo ? batchNo : '';
+      this.createDate = createDate ? createDate : '';
+      this.enforceStandards = enforceStandards ? enforceStandards : '';
+      this.layBy = layBy ? layBy : '';
+      this.level = level ? level : '';
+      this.netWeight = netWeight ? netWeight : '';
+      this.notice = notice ? notice : '';
+      this.purchaseOrigins = purchaseOrigins ? purchaseOrigins : '';
+      this.specification = specification ? specification : '';
+      this.warrantyPeriod =
+        warrantyPeriod && !warrantyPeriod ? warrantyPeriod : '';
+      this.warrantyPeriodUnit = warrantyPeriodUnit ? warrantyPeriodUnit : '';
+      this.weightUnit = weightUnit ? weightUnit : '';
 
       if (this.warrantyPeriodUnit === '1') {
         this.warrantyPeriodUnit = '分钟';
@@ -77,8 +90,14 @@
         this.warrantyPeriodUnit = '月';
       } else if (this.warrantyPeriodUnit === '5') {
         this.warrantyPeriodUnit = '年';
+      } else {
+        this.warrantyPeriodUnit = '';
       }
 
+      this.$nextTick(() => {
+        window.print();
+      });
+
       // const { id, name, price } = this.$route.query;
       // this.order = { id, name, price };
 
@@ -133,13 +152,14 @@
     // flex: 1;
     flex-direction: column;
     justify-content: center;
+    margin: 37px 0 1px 30px;
 
-    .right-box {
-      margin: 34px 0 1px 18px;
-    }
+    // .right-box {
+    //   // margin: 34px 0 1px 18px
+    // }
 
     .right-div {
-      margin: 0 0 1px 18px;
+      // margin: 0 0 1px 18px;
       height: 17px;
     }
   }

+ 6 - 1
src/views/produceWord/index.vue

@@ -186,7 +186,12 @@ r++<template>
             align: 'center',
             showOverflowTooltip: true
           },
-
+          {
+            prop: 'specification',
+            label: '规格',
+            align: 'center',
+            showOverflowTooltip: true
+          },
           {
             prop: 'priority',
             label: '优先级',

+ 1 - 1
vue.config.js

@@ -33,7 +33,7 @@ module.exports = {
       '/api': {
         // target: 'http://124.71.68.31:50001',
         // target: 'http://192.168.1.116:18086',
-        target: 'http://192.168.1.251:18086',
+        // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.103:18086',192.168.1.116
         // target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.116:18086',