Pārlūkot izejas kodu

调整打印样式,处理数字过长问题

lph 1 gadu atpakaļ
vecāks
revīzija
c46d1cd601

+ 1 - 0
zkqy-ui/src/utils/print/deliverOrderPrint.js

@@ -43,6 +43,7 @@ function receiptDocuments(data, domId) {
     if (item.weight) {
       totalWeight += Number(item.weight);
     }
+    totalWeight = totalWeight.toFixed(2);
     printContent += `<tr align="center">
       <td>${item.productCode}</td>
       <td>${item.productName}</td>

+ 7 - 7
zkqy-ui/src/utils/print/printUtils.js

@@ -32,31 +32,31 @@ function printEN(printRow) {
   let ENColor = removeChineseCharacters(productColor) || ''
   let res = []
   res.push({
-    key1: 'GRADE',
+    key1: 'GRADE:',
     key2: productSpecifications,
   })
   res.push({
-    key1: 'LOT NO.:',
+    key1: 'LOT NO:',
     key2: qrCode,
   })
   res.push({
-    key1: 'COLOR NO.:',
+    key1: 'COLOR NO:',
     key2: ENColor + '    ' + lotNum,
   })
   res.push({
-    key1: 'CONE NO.:',
+    key1: 'CONE NO:',
     key2: canisterNum,
   })
   res.push({
-    key1: 'NET WEIGHT',
+    key1: 'NET WEIGHT:',
     key2: suttle,
   })
   res.push({
-    key1: 'GROSS WEIGHT',
+    key1: 'GROSS WEIGHT:',
     key2: grossWeight,
   })
   res.push({
-    key1: 'CARTON NO',
+    key1: 'CARTON NO:',
     key2: boxNum,
   })
   return res

+ 2 - 0
zkqy-ui/src/utils/print/sendOrderPrint.js

@@ -60,6 +60,8 @@ function receiptDocuments(data, domId) {
       price = Number(item.weight) * Number(item.unitPrice);
       totalPrice += price
     }
+    price = price.toFixed(2);
+    totalPrice = totalPrice.toFixed(2);
     printContent += `<tr align="center">
       <td>${item.productName}</td>
       <td>${item.productSpecifications}</td>

+ 3 - 0
zkqy-ui/src/views/orderMange/components/dialogForm/Deliver.vue

@@ -427,6 +427,9 @@ export default {
         for (const key of Object.keys(this.form)) {
           this.form[key] = res.data[key];
         }
+        this.form.inventoryWeight = Number(this.form.inventoryWeight)?.toFixed(
+          2
+        );
         this.isEdit = res.data.id ? true : false;
         if (!this.isEdit) {
           this.form.drawer = this.username;

+ 1 - 1
zkqy-ui/src/views/orderMange/financeApprove.vue

@@ -811,7 +811,7 @@ export default {
                 </tr>
                 
                 <tr align="center">
-                    <td colspan="2">批准人:</td>
+                    <td colspan="2">业务主管:</td>
                     <td colspan="2">${saleApprover}</td>
                     <td></td>
                     <td></td>