Ver código fonte

财务对账单打印详情问题处理/订单管理样式优化

lph 1 ano atrás
pai
commit
e092c6456b

+ 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) {
   let yy = new Date().getFullYear();
   let mm = new Date().getMonth() + 1;
@@ -8,7 +17,7 @@ function receiptDocuments(data, domId) {
   if (dd < 10) {
     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;">
     <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 style="display: flex;justify-content: space-between;width: 100%;padding: 0 10px;box-sizing: border-box;">
         <span>通知单号&nbsp;&nbsp;${noticeNumber}</span>
-        <span>单号&nbsp;&nbsp;${'未知'}</span>
+        <span>单号&nbsp;&nbsp;${getRandomNum()}</span>
       </div>
       <div
         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;
           width: 300px;
           border-bottom: 2px solid black;
-          padding-bottom: 3px;">${customerName}</span>
+          padding-bottom: 3px;">${customerName || customName}</span>
         </span>
         <span>时间&nbsp;&nbsp;${yy} 年 ${mm} 月 ${dd} 日</span>
 

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

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