Browse Source

Merge remote-tracking branch 'origin/master'

hmc 1 year ago
parent
commit
abb3662a2c

+ 12 - 3
zkqy-ui/src/utils/print/sendOrderPrint.js

@@ -1,3 +1,12 @@
+function getRandomNum(num = 8) {
+  let str = "";
+  for (var i = 0; i < num; i++) {
+    str += parseInt(Math.random() * 10);
+  }
+  return str;
+}
+
+
 function receiptDocuments(data, domId) {
 function receiptDocuments(data, domId) {
   let yy = new Date().getFullYear();
   let yy = new Date().getFullYear();
   let mm = new Date().getMonth() + 1;
   let mm = new Date().getMonth() + 1;
@@ -8,7 +17,7 @@ function receiptDocuments(data, domId) {
   if (dd < 10) {
   if (dd < 10) {
     dd = "0" + dd;
     dd = "0" + dd;
   }
   }
-  let { customerName, productCodeListVOList, noticeNumber, printUser, drawer, salesman } = data;
+  let { customerName, customName, productCodeListVOList, noticeNumber, printUser, drawer, salesman } = data;
 
 
   let printContent = `<div class="table" style="display: flex;flex-direction: column;align-items: center;width: 1000px;">
   let printContent = `<div class="table" style="display: flex;flex-direction: column;align-items: center;width: 1000px;">
     <div class="tableName" style="margin: 0 auto;font-size: 30px;font-weight: bold;">
     <div class="tableName" style="margin: 0 auto;font-size: 30px;font-weight: bold;">
@@ -17,14 +26,14 @@ function receiptDocuments(data, domId) {
     <div class="title" style="width: 100%; padding: 0 10px;position: relative;">
     <div class="title" style="width: 100%; padding: 0 10px;position: relative;">
       <div style="display: flex;justify-content: space-between;width: 100%;padding: 0 10px;box-sizing: border-box;">
       <div style="display: flex;justify-content: space-between;width: 100%;padding: 0 10px;box-sizing: border-box;">
         <span>通知单号&nbsp;&nbsp;${noticeNumber}</span>
         <span>通知单号&nbsp;&nbsp;${noticeNumber}</span>
-        <span>单号&nbsp;&nbsp;${'未知'}</span>
+        <span>单号&nbsp;&nbsp;${getRandomNum()}</span>
       </div>
       </div>
       <div
       <div
         style="display: flex;justify-content: space-between;width: 100%; padding: 0 10px;box-sizing: border-box;margin-bottom: 5px;">
         style="display: flex;justify-content: space-between;width: 100%; padding: 0 10px;box-sizing: border-box;margin-bottom: 5px;">
         <span>客户名称&nbsp;&nbsp;<span class="name" style="display: inline-block;
         <span>客户名称&nbsp;&nbsp;<span class="name" style="display: inline-block;
           width: 300px;
           width: 300px;
           border-bottom: 2px solid black;
           border-bottom: 2px solid black;
-          padding-bottom: 3px;">${customerName}</span>
+          padding-bottom: 3px;">${customerName || customName}</span>
         </span>
         </span>
         <span>时间&nbsp;&nbsp;${yy} 年 ${mm} 月 ${dd} 日</span>
         <span>时间&nbsp;&nbsp;${yy} 年 ${mm} 月 ${dd} 日</span>
 
 

+ 2 - 2
zkqy-ui/src/views/orderMange/codeListManage/index.vue

@@ -141,7 +141,7 @@
                 操作<i class="el-icon-arrow-down el-icon--right"></i>
                 操作<i class="el-icon-arrow-down el-icon--right"></i>
               </el-button>
               </el-button>
               <el-dropdown-menu slot="dropdown">
               <el-dropdown-menu slot="dropdown">
-                <el-dropdown-item>
+                <!-- <el-dropdown-item>
                   <el-button
                   <el-button
                     size="mini"
                     size="mini"
                     type="text"
                     type="text"
@@ -150,7 +150,7 @@
                     v-hasPermi="['system:productCodeList:edit']"
                     v-hasPermi="['system:productCodeList:edit']"
                     >修改
                     >修改
                   </el-button>
                   </el-button>
-                </el-dropdown-item>
+                </el-dropdown-item> -->
                 <el-dropdown-item>
                 <el-dropdown-item>
                   <el-button
                   <el-button
                     size="mini"
                     size="mini"

+ 7 - 3
zkqy-ui/src/views/orderMange/codeListManage/printIndex.vue

@@ -1592,7 +1592,7 @@ export default {
           this.form = response.data[0];
           this.form = response.data[0];
           this.tableData = response.data;
           this.tableData = response.data;
 
 
-          await this.getAllBatchData(); //获取所有产品数据
+          await this.getAllBatchData(this.form.machineTool); //获取所有产品数据
           await this.getLineOptionLsit(); //获取机台选项数据
           await this.getLineOptionLsit(); //获取机台选项数据
           await this.getSelectOptions();
           await this.getSelectOptions();
           this.initProductData();
           this.initProductData();
@@ -1611,7 +1611,7 @@ export default {
         this.printAuto = false;
         this.printAuto = false;
         this.form = response.data[0];
         this.form = response.data[0];
         this.tableData = response.data;
         this.tableData = response.data;
-        await this.getAllBatchData(); //获取所有产品数据
+        await this.getAllBatchData(this.form.machineTool); //获取所有产品数据
         await this.getLineOptionLsit(); //获取机台选项数据
         await this.getLineOptionLsit(); //获取机台选项数据
         await this.getSelectOptions();
         await this.getSelectOptions();
         this.initProductData();
         this.initProductData();
@@ -1622,7 +1622,11 @@ export default {
     // 初始化产品相关数据
     // 初始化产品相关数据
     initProductData() {
     initProductData() {
       this.batchNum = this.form.lotNum;
       this.batchNum = this.form.lotNum;
-      this.batchNumChange();
+      // this.batchNumChange();
+      console.log(this.batchData);
+      this.batchTableData = this.batchData.filter(
+        (item) => item.productId == this.tableData[0].productId
+      );
       if (this.batchTableData.length) {
       if (this.batchTableData.length) {
         let {
         let {
           machineTool,
           machineTool,

+ 10 - 4
zkqy-ui/src/views/orderMange/financialReconciliation/index.vue

@@ -1047,16 +1047,16 @@ export default {
     },
     },
     // 打印送货单回调
     // 打印送货单回调
     async handleSendOrder(index, row) {
     async handleSendOrder(index, row) {
-      let { saleNo } = row;
-      if (!saleNo) {
-        this.$message.error("数据异常,saleNo");
+      let { saleNo, productInvoiceId } = row;
+      if (!productInvoiceId) {
+        this.$message.error("数据异常,productInvoiceId");
         return;
         return;
       }
       }
       let payload = {
       let payload = {
         saleOrderNo: saleNo,
         saleOrderNo: saleNo,
       };
       };
       // let res = await productInvoiceInfo(payload);
       // let res = await productInvoiceInfo(payload);
-      let res = await printDocuments({ id: row.id });
+      let res = await printDocuments({ id: productInvoiceId });
       // console.log(res);
       // console.log(res);
       // return;
       // return;
       if (res.code == 200) {
       if (res.code == 200) {
@@ -1066,6 +1066,12 @@ export default {
           ...printData,
           ...printData,
           printUser: this.username,
           printUser: this.username,
         });
         });
+        console.log({
+          ...row,
+          ...printData,
+          printUser: this.username,
+        });
+        // return;
         sendOrderPrint(
         sendOrderPrint(
           { ...row, ...printData, printUser: this.username },
           { ...row, ...printData, printUser: this.username },
           "printDom"
           "printDom"

+ 2 - 2
zkqy-ui/src/views/orderMange/index.vue

@@ -273,7 +273,7 @@
       <!-- 添加或修改销售出库单:- 过磅记录生成数据对话框 -->
       <!-- 添加或修改销售出库单:- 过磅记录生成数据对话框 -->
       <el-dialog
       <el-dialog
         :title="title"
         :title="title"
-        width="1100px"
+        width="1300px"
         :visible.sync="open"
         :visible.sync="open"
         append-to-body
         append-to-body
       >
       >
@@ -462,7 +462,7 @@
               </el-table-column>
               </el-table-column>
               <el-table-column prop="productType" label="类型">
               <el-table-column prop="productType" label="类型">
               </el-table-column>
               </el-table-column>
-              <el-table-column prop="colourNumber" label="色号">
+              <el-table-column prop="colourNumber" width="130" label="色号">
                 <template slot-scope="scope">
                 <template slot-scope="scope">
                   <el-form-item
                   <el-form-item
                     :prop="'colourNumber-' + scope.$index"
                     :prop="'colourNumber-' + scope.$index"