695593266@qq.com 9 mesi fa
parent
commit
2a0bc0093e

+ 19 - 0
src/api/produce/index.js

@@ -137,4 +137,23 @@ export async function nextTask(data) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+export async function juRenPrint(data) {
+  const res = await request.post(`/mes/workorder/queryPackagePrint`, data);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+//判断是否是巨仁环境
+export async function isJuRen(data) {
+  const res = await request.get(`/pda/mes/us/printStyle`, {
+    params: data
+  });
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
 // http://localhost:8084/api/main/asset/pdaPage?categoryLevelId=9&keyWord=&pageNum=1&size=100&taskId=1894207928134549506

+ 5 - 0
src/router/routes.js

@@ -27,6 +27,11 @@ export const routes = [
     path: '/print',
     component: () => import('@/views/produceOrder/print.vue'),
     meta: { title: '工艺流程卡' }
+  },
+  {
+    path: '/printJuren',
+    component: () => import('@/views/produce/components/juRenPack.vue'),
+    meta: { title: '打印条码' }
   }
   // 404
   // {

+ 1 - 1
src/views/pick/pickApply/components/addPick.vue

@@ -79,7 +79,7 @@
             >
               <el-table-column label="序号" type="index" width="60">
                 <template slot-scope="{ row, $index }">
-                  {{ $index }}
+                  {{ $index + 1 }}
                 </template>
               </el-table-column>
 

+ 21 - 24
src/views/pick/pickApply/components/selfDetailed.vue

@@ -27,30 +27,27 @@
         </div>
       </div>
 
-      
-        <ele-pro-table
-          ref="table"
-          :columns="columns"
-          max-height="320px"
-          :datasource="dataObj.detailList"
-          cache-key="detailed"
-          highlight-current-row
-          :need-page="false"
-        >
-  
-          <template v-slot:empty>
-            <div class="empty">暂无领料数据</div>
-          </template>
-
-          <template v-slot:index="{ row, $index }">
-            {{ $index }} <el-tag>{{ row.rootCategoryLevelName }}</el-tag>
-          </template>
-
-          <template v-slot:demandQuantity="{ row }">
-            {{ row.demandQuantity }} {{ row.unit }}
-          </template>
-        </ele-pro-table>
-     
+      <ele-pro-table
+        ref="table"
+        :columns="columns"
+        max-height="320px"
+        :datasource="dataObj.detailList"
+        cache-key="detailed"
+        highlight-current-row
+        :need-page="false"
+      >
+        <template v-slot:empty>
+          <div class="empty">暂无领料数据</div>
+        </template>
+
+        <template v-slot:index="{ row, $index }">
+          {{ $index + 1 }} <el-tag>{{ row.rootCategoryLevelName }}</el-tag>
+        </template>
+
+        <template v-slot:demandQuantity="{ row }">
+          {{ row.demandQuantity }} {{ row.unit }}
+        </template>
+      </ele-pro-table>
     </el-dialog>
   </div>
 </template>

+ 52 - 2
src/views/produce/components/jobBooking/components/batchSemiProductJobBom.vue

@@ -3,6 +3,16 @@
     <div class="title_box rx-bc mt6">
       <div class="name">{{ title }}({{ list.length || 0 }})个 </div>
       <div class="title_box rx-bc mt6">
+        <div
+          class="rx-bc"
+          style="margin-left: 20px"
+          v-if="
+            item.currentTaskDiagram.type == 4 && this.printStyle == 'juRen1'
+          "
+          ><el-button type="text" size="mini" @click="pritJuRen()"
+            >打印条码</el-button
+          >
+        </div>
         <div
           v-if="!isDetails && isEngrave"
           class="rx-bc"
@@ -610,6 +620,7 @@
   import tabMixins from '@/mixins/tableColumnsMixin';
   import { parameterGetByCode } from '@/api/system/dictionary-data';
   import { splitBatch } from '@/api/produce/feeding';
+  import { juRenPrint, isJuRen } from '@/api/produce';
 
   export default {
     name: 'semiProductJobBom',
@@ -1007,7 +1018,9 @@
 
       this.clientEnvironmentId =
         this.$store.state.user.info.clientEnvironmentId;
-      console.log(this.list, 'this.list ');
+
+      this.getPrintData();
+      this.getisJuRen();
     },
 
     // item
@@ -1113,7 +1126,9 @@
           notReason: ''
         },
         itemData: {},
-        itemIndex: ''
+        itemIndex: '',
+        printData: {},
+        printStyle: ''
       };
     },
 
@@ -1170,6 +1185,18 @@
         );
       },
 
+      async getPrintData() {
+        await juRenPrint({ workOrderId: this.item.workOrderId }).then((res) => {
+          this.printData = res.data;
+        });
+      },
+
+      async getisJuRen() {
+        await isJuRen().then((res) => {
+          this.printStyle = res.data.printStyle;
+        });
+      },
+
       handlerSelect() {
         this.sunTj();
         this.sumweight(this.list);
@@ -1629,6 +1656,29 @@
             }
           })
           .catch(() => {});
+      },
+
+      pritJuRen() {
+        const {
+          batchNo,
+          createDate,
+          enforceStandards,
+          layBy,
+          level,
+          netWeight,
+          notice,
+          productName,
+          purchaseOrigins,
+          specification,
+          warrantyPeriod,
+          warrantyPeriodUnit,
+          weightUnit
+        } = this.printData;
+
+        if (this.printStyle == 'juRen1') {
+          const query = `?batchNo=${batchNo}&createDate=${createDate}&enforceStandards=${enforceStandards}&layBy=${layBy}&level=${level}&netWeight=${netWeight}&notice=${notice}&productName=${productName}&purchaseOrigins=${purchaseOrigins}&specification=${specification}&warrantyPeriod=${warrantyPeriod}&warrantyPeriodUnit=${warrantyPeriodUnit}&weightUnit=${weightUnit}`;
+          window.open('/printJuren' + query, '_blank');
+        }
       }
     },
 

+ 13 - 4
src/views/produce/components/jobBooking/components/oneJobQualityBomPL.vue

@@ -262,14 +262,14 @@
             "
           >
             <div style="display: flex; align-items: center">
-              质检结果: &nbsp;&nbsp;&nbsp;
+              质检结果
               <el-select
                 size="mini"
                 class="content_num"
                 filterable
                 v-model="row.extInfo.appearance"
                 placeholder="请选择"
-                style="width: 300px"
+                style="width: 240px"
                 :disabled="isDetails"
                 @change="qualityChange"
               >
@@ -283,7 +283,15 @@
               </el-select>
 
               <span style="display: inline-block; margin-left: 26px">
-                处置:
+                重量:
+              </span>
+              <el-input
+                v-model="row.extInfo.reportWeight"
+                style="width: 240px"
+              ></el-input>
+
+              <span style="display: inline-block; margin-left: 26px">
+                处置:
               </span>
               <el-select
                 size="mini"
@@ -291,7 +299,7 @@
                 filterable
                 v-model="row.extInfo.taskId"
                 placeholder="请选择"
-                style="width: 300px"
+                style="width: 240px"
                 @change="(e) => selectName2(e, $index)"
                 :disabled="isDetails"
               >
@@ -445,6 +453,7 @@
 
 <script>
   import { getTaskInstanceList, sample } from '@/api/produce/job';
+  import { row } from 'mathjs';
 
   export default {
     name: 'oneJobQualityBomPL',

+ 52 - 1
src/views/produce/components/jobBooking/components/semiProductJobBom.vue

@@ -13,6 +13,16 @@
       } -->
 
       <div class="title_box rx-bc mt6">
+        <div
+          class="rx-bc"
+          style="margin-left: 20px"
+          v-if="
+            item.currentTaskDiagram.type == 4 && this.printStyle == 'juRen1'
+          "
+          ><el-button type="text" size="mini" @click="pritJuRen()"
+            >打印条码</el-button
+          >
+        </div>
         <div
           v-if="!isDetails && isEngrave"
           class="rx-bc"
@@ -512,6 +522,7 @@
   } from '@/api/produce/job';
   import tabMixins from '@/mixins/tableColumnsMixin';
   import { parameterGetByCode } from '@/api/system/dictionary-data';
+  import { juRenPrint, isJuRen } from '@/api/produce';
 
   export default {
     name: 'semiProductJobBom',
@@ -641,7 +652,9 @@
         dialogVisible: false,
         dialogEngrave: false,
         columnsVersion: 0,
-        clientEnvironmentId: ''
+        clientEnvironmentId: '',
+        printData: {},
+        printStyle: ''
       };
     },
 
@@ -946,6 +959,9 @@
 
       console.log(this.clientEnvironmentId);
       console.log(this.item, 'this.itemitemitems');
+
+      this.getPrintData();
+      this.getisJuRen();
     },
 
     // item
@@ -1009,6 +1025,18 @@
         );
       },
 
+      async getPrintData() {
+        await juRenPrint({ workOrderId: this.item.workOrderId }).then((res) => {
+          this.printData = res.data;
+        });
+      },
+
+      async getisJuRen() {
+        await isJuRen().then((res) => {
+          this.printStyle = res.data.printStyle;
+        });
+      },
+
       handlerSelect() {
         this.sunTj();
         this.sumweight(this.list);
@@ -1407,6 +1435,29 @@
             }
           })
           .catch(() => {});
+      },
+
+      pritJuRen() {
+        const {
+          batchNo,
+          createDate,
+          enforceStandards,
+          layBy,
+          level,
+          netWeight,
+          notice,
+          productName,
+          purchaseOrigins,
+          specification,
+          warrantyPeriod,
+          warrantyPeriodUnit,
+          weightUnit
+        } = this.printData;
+
+        if (this.printStyle == 'juRen1') {
+          const query = `?batchNo=${batchNo}&createDate=${createDate}&enforceStandards=${enforceStandards}&layBy=${layBy}&level=${level}&netWeight=${netWeight}&notice=${notice}&productName=${productName}&purchaseOrigins=${purchaseOrigins}&specification=${specification}&warrantyPeriod=${warrantyPeriod}&warrantyPeriodUnit=${warrantyPeriodUnit}&weightUnit=${weightUnit}`;
+          window.open('/printJuren' + query, '_blank');
+        }
       }
     },
 

+ 263 - 0
src/views/produce/components/juRenPack.vue

@@ -0,0 +1,263 @@
+<template>
+  <div class="label-container">
+    <!-- 第一行信息 -->
+    <div class="label-title">
+      <div class="label-info-left">
+        <div>{{ productName ? productName : ' ' }}</div>
+        <div>{{ purchaseOrigins ? purchaseOrigins : ' ' }}</div>
+        <div>{{ batchNo ? batchNo : ' ' }}</div>
+        <div>{{ specification ? specification : ' ' }}</div>
+        <div>{{ createDate ? createDate : ' ' }}</div>
+        <div>{{ layBy ? layBy : ' ' }}</div>
+        <div>{{ notice ? notice : ' ' }}</div>
+        <div>{{ enforceStandards ? enforceStandards : ' ' }}</div>
+      </div>
+
+      <div class="label-info-right">
+        <div class="right-box">{{ level ? level : ' ' }}</div>
+        <div class="right-div"
+          >{{ netWeight ? netWeight : ' '
+          }}{{ weightUnit ? weightUnit : ' ' }}</div
+        >
+        <div class="right-div"
+          >{{ warrantyPeriod ? warrantyPeriod : ' '
+          }}{{ warrantyPeriodUnit ? warrantyPeriodUnit : ' ' }}</div
+        >
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  // import JsBarcode from 'jsbarcode';
+  export default {
+    data() {
+      return {
+        productName: ''
+      };
+    },
+
+    mounted() {
+      const {
+        batchNo,
+        createDate,
+        enforceStandards,
+        layBy,
+        level,
+        netWeight,
+        notice,
+        productName,
+        purchaseOrigins,
+        specification,
+        warrantyPeriod,
+        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;
+
+      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 = '年';
+      }
+
+      // const { id, name, price } = this.$route.query;
+      // this.order = { id, name, price };
+
+      // console.log('打印参数', this.$route.query);
+      // console.log('打印参数', this.$route.query);
+      // this.orderId = this.$route.query.orderId;
+      // this.type = this.$route.query.type;
+      // window.addEventListener('message', (event) => {
+      //   console.log('接收到的参数', event.data);
+      // });
+      // JsBarcode('#barCode', '123456789012', {
+      //   format: 'CODE128',
+      //   width: 4,
+      //   height: 40,
+      //   displayValue: true
+      // });
+    }
+  };
+</script>
+
+<style scoped lang="scss">
+  .label-container {
+    // font-family: "Arial", "Helvetica", sans-serif;
+    width: 90mm;
+    height: 60mm;
+    box-sizing: border-box;
+    font-size: 10px;
+    color: green;
+    margin: 0 auto;
+  }
+
+  .label-title {
+    display: flex;
+    flex-direction: row;
+    padding: 0 45px;
+    box-sizing: border-box;
+  }
+  .label-info-left {
+    display: flex;
+    // flex: 1;
+    flex-direction: column;
+    flex-wrap: wrap;
+    margin: 54px 0 0 62px;
+
+    div {
+      height: 17px;
+    }
+  }
+
+  .label-info-right {
+    display: flex;
+    // flex: 1;
+    flex-direction: column;
+    justify-content: center;
+
+    .right-box {
+      margin: 34px 0 1px 18px;
+    }
+
+    .right-div {
+      margin: 0 0 1px 18px;
+      height: 17px;
+    }
+  }
+
+  .row {
+    display: flex;
+    justify-content: space-between;
+    margin-bottom: 4px;
+  }
+
+  .knife-table {
+    border-collapse: collapse;
+    width: 100%;
+    margin: 8px 0;
+    text-align: center;
+  }
+
+  .knife-table th,
+  .knife-table td {
+    border: 1px solid #000;
+    padding: 4px;
+  }
+
+  .knife-table tbody {
+    height: 30px;
+
+    .knife-title {
+      width: 60px;
+    }
+  }
+
+  .knife-table img {
+    height: 80px;
+  }
+
+  .info {
+    display: flex;
+    flex-direction: column;
+    padding: 0 62px 0 45px;
+    box-sizing: border-box;
+
+    p {
+      padding: 0;
+      margin: 0;
+    }
+  }
+
+  .phone-box {
+    display: flex;
+    flex-direction: row;
+    padding: 0 62px 0 45px;
+    align-items: center;
+    justify-content: center;
+    box-sizing: border-box;
+
+    .phone-canvas-left-box {
+      width: 220px;
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      canvas {
+        width: 100px;
+        height: 55px;
+      }
+
+      p {
+        margin: 0;
+        padding: 0;
+        font-size: 9px;
+        font-weight: normal;
+      }
+    }
+
+    .phone-canvas-right-box {
+      display: flex;
+      width: 100%;
+      justify-content: flex-end;
+      flex-direction: column;
+      align-items: center;
+      canvas {
+        width: 150px;
+        height: 55px;
+      }
+
+      p {
+        margin: 0;
+        padding: 0;
+        font-size: 10px;
+        font-weight: normal;
+      }
+    }
+  }
+
+  .icons {
+    display: flex;
+    gap: 3px;
+    padding: 0 62px 0 45px;
+    margin-top: 10px;
+    box-sizing: border-box;
+    font-size: 8px;
+  }
+
+  .barcode {
+    text-align: center;
+  }
+
+  .size {
+    text-align: center;
+    font-size: 8px;
+    font-weight: normal;
+    margin-top: 8px;
+  }
+
+  .expiry {
+    display: flex;
+    text-align: left;
+    font-size: 14px;
+    font-weight: normal;
+    align-items: center;
+  }
+</style>

+ 2 - 0
src/views/produceWord/index.vue

@@ -294,6 +294,8 @@ r++<template>
         if (where.status) {
           where.statusList = [];
           where.statusList.push(where.status);
+        } else {
+          where.statusList = [4, 5, 6, 7];
         }
         return getList({
           pageNum: page,

+ 2 - 2
vue.config.js

@@ -33,13 +33,13 @@ module.exports = {
       '/api': {
         // target: 'http://124.71.68.31:50001',
         // target: 'http://192.168.1.103:18086',192.168.1.116
-        target: 'http://192.168.1.125:18086',
+        // target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.116:18086',
         // target: 'http://192.168.1.144:18086',
         // target: 'http://192.168.1.30:18086',
         // target: 'http://192.168.1.211:18086',
         // target: 'http://192.168.1.33:18086',
-        // target: 'http://192.168.1.251:18186',
+        target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.251:18087',
 
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域