Просмотр исходного кода

修改单件报工处置选择入库的时候在质检工序显示-1的问题

695593266@qq.com 9 месяцев назад
Родитель
Сommit
3372a69696

+ 5 - 0
src/router/routes.js

@@ -32,6 +32,11 @@ export const routes = [
     path: '/printJuren',
     component: () => import('@/views/produce/components/juRenPack.vue'),
     meta: { title: '打印条码' }
+  },
+  {
+    path: '/printJuRenOne',
+    component: () => import('@/views/produce/components/juRenPackOne.vue'),
+    meta: { title: '打印条码' }
   }
   // 404
   // {

+ 4 - 1
src/views/produce/components/jobBooking/components/batchSemiProductJobBom.vue

@@ -7,7 +7,10 @@
           class="rx-bc"
           style="margin-left: 20px"
           v-if="
-            item.currentTaskDiagram.type == 4 && this.printStyle != 'notExist'
+            !isDetails &&
+            item.currentTaskDiagram &&
+            item.currentTaskDiagram.type == 4 &&
+            this.printStyle != 'notExist'
           "
           ><el-button type="text" size="mini" @click="pritJuRen()"
             >打印条码</el-button

+ 4 - 6
src/views/produce/components/jobBooking/components/semiProductJobBom.vue

@@ -17,7 +17,10 @@
           class="rx-bc"
           style="margin-left: 20px"
           v-if="
-            item.currentTaskDiagram.type == 4 && this.printStyle == 'juRen1'
+            !isDetails &&
+            item.currentTaskDiagram &&
+            item.currentTaskDiagram.type == 4 &&
+            this.printStyle == 'juRen1'
           "
           ><el-button type="text" size="mini" @click="pritJuRen()"
             >打印条码</el-button
@@ -945,8 +948,6 @@
     created() {
       this.getTaskFn();
       this.getCodeData();
-
-      console.log(this.list, 'list1111111111111111111111111');
     },
 
     mounted() {
@@ -957,9 +958,6 @@
       this.clientEnvironmentId =
         this.$store.state.user.info.clientEnvironmentId;
 
-      console.log(this.clientEnvironmentId);
-      console.log(this.item, 'this.itemitemitems');
-
       this.getPrintData();
       this.getisJuRen();
     },

+ 10 - 3
src/views/produce/components/jobBooking/index.vue

@@ -783,6 +783,11 @@
                     this.taskObj.type == 6)
                 ) {
                   obj.semiProductList = obj.pickOutInList;
+                  obj.semiProductList.forEach((item) => {
+                    if (item.extInfo.taskId == -1) {
+                      item.extInfo.taskId = item.extInfo.taskId + '';
+                    }
+                  });
                   obj.pickOutInList = [];
 
                   console.log('赋值了');
@@ -792,6 +797,11 @@
                 ) {
                   if (obj.pickOutInList && obj.pickOutInList.length != 0) {
                     obj.semiProductList = obj.pickOutInList;
+                    obj.semiProductList.forEach((item) => {
+                      if (item.extInfo.taskId == -1) {
+                        item.extInfo.taskId = item.extInfo.taskId + '';
+                      }
+                    });
                     obj.pickOutInList = [];
                   }
                 } else if (this.taskObj.type == 6 && obj.singleReport == 0) {
@@ -910,8 +920,6 @@
                     }
                   }
                   item.confirm = 0;
-
-                  console.log(item, 'item');
                   return item;
                 });
 
@@ -923,7 +931,6 @@
                   }
                   item.confirm = 0;
 
-                  console.log(item, 'item');
                   return item;
                 });
 

+ 191 - 0
src/views/produce/components/juRenPackOne.vue

@@ -0,0 +1,191 @@
+<template>
+  <div class="label-container">
+    <div class="ju_ren_one_level">
+      <span>{{ productName ? productName : ' ' }}</span>
+      <span class="ju_ren_one_level_two">{{ '' }}</span>
+    </div>
+
+    <div class="ju_ren_two_level">
+      <span>{{ purchaseOrigins ? purchaseOrigins : ' ' }}</span>
+    </div>
+
+    <div class="ju_ren_two_level">
+      <span>{{ specification ? specification : ' ' }}</span>
+      <span class="ju_ren_one_level_two"
+        >{{ netWeight ? netWeight : ' '
+        }}{{ weightUnit ? weightUnit : ' ' }}</span
+      >
+    </div>
+
+    <div class="ju_ren_Three_level">
+      <span>{{ level ? level : ' ' }}</span>
+    </div>
+
+    <div class="ju_ren_four_level">
+      <span>{{ batchNo ? batchNo : ' ' }}</span>
+      <span class="ju_ren_two_level_two">{{
+        createDate ? createDate : ' '
+      }}</span>
+      <span class="ju_ren_two_level_two"
+        >{{ warrantyPeriod ? warrantyPeriod : ' '
+        }}{{ warrantyPeriodUnit ? warrantyPeriodUnit : ' ' }}</span
+      >
+    </div>
+
+    <div class="ju_ren_four_level">
+      <span>{{ notice ? notice : ' ' }}</span>
+    </div>
+
+    <div class="ju_ren_four_level">
+      <span>{{ layBy ? layBy : ' ' }}</span>
+    </div>
+
+    <div class="ju_ren_four_level">
+      <span>{{ enforceStandards ? enforceStandards : ' ' }}</span>
+    </div>
+  </div>
+</template>
+
+<script>
+  export default {
+    data() {
+      return {
+        batchNo: '',
+        createDate: '',
+        enforceStandards: '',
+        layBy: '',
+        level: '',
+        netWeight: '',
+        notice: '',
+        productName: '',
+        purchaseOrigins: '',
+        specification: '',
+        warrantyPeriod: '',
+        warrantyPeriodUnit: '',
+        weightUnit: ''
+      };
+    },
+    mounted() {
+      const {
+        batchNo,
+        createDate,
+        enforceStandards,
+        layBy,
+        level,
+        netWeight,
+        notice,
+        productName,
+        purchaseOrigins,
+        specification,
+        warrantyPeriod,
+        warrantyPeriodUnit,
+        weightUnit
+      } = this.$route.query;
+      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 = '分钟';
+      } else if (this.warrantyPeriodUnit === '2') {
+        this.warrantyPeriodUnit = '小时';
+      } else if (this.warrantyPeriodUnit === '3') {
+        this.warrantyPeriodUnit = '日';
+      } else if (this.warrantyPeriodUnit === '4') {
+        this.warrantyPeriodUnit = '月';
+      } else if (this.warrantyPeriodUnit === '5') {
+        this.warrantyPeriodUnit = '年';
+      } else {
+        this.warrantyPeriodUnit = '';
+      }
+
+      this.$nextTick(() => {
+        window.print();
+      });
+    }
+  };
+</script>
+
+<style scoped lang="scss">
+  .label-container {
+    width: 90mm;
+    height: 70mm;
+    box-sizing: border-box;
+    font-size: 12px;
+    color: green;
+    margin: 0 auto;
+    // line-height: 1.8;
+    // font-family: "SimSun", "宋体", sans-serif;
+
+    .ju_ren_one_level {
+      display: flex;
+      margin: 63px 0 0 64px;
+      flex-direction: row;
+
+      span {
+        display: inline-block;
+        width: 70px;
+        height: 19px;
+      }
+
+      .ju_ren_one_level_two {
+        margin-left: 35px;
+      }
+    }
+
+    .ju_ren_two_level {
+      margin-left: 64px;
+
+      span {
+        display: inline-block;
+        width: 70px;
+        height: 19px;
+      }
+
+      .ju_ren_one_level_two {
+        margin-left: 35px;
+      }
+
+      .ju_ren_two_level_two {
+        margin-left: 100px;
+      }
+    }
+
+    .ju_ren_Three_level {
+      margin: 2px 0 0 110px;
+
+      span {
+        display: inline-block;
+        height: 19px;
+      }
+    }
+    .ju_ren_four_level {
+      margin: 3px 0 0 64px;
+
+      span {
+        display: inline-block;
+        width: 60px;
+        height: 19px;
+      }
+
+      .ju_ren_one_level_two {
+        margin-left: 42px;
+      }
+
+      .ju_ren_two_level_two {
+        margin-left: 42px;
+      }
+    }
+  }
+</style>