Explorar el Código

产品销售单,财务对账单修改打印接口

lph hace 1 año
padre
commit
41dc89f371

+ 9 - 0
zkqy-ui/src/api/tablelist/commonTable.js

@@ -286,6 +286,15 @@ export function productInvoiceInfo(data) {
     //baseURL: process.env.VUE_APP_BASE_API1
   })
 }
+// 订单管理  发货单详情接口 新
+export function printDocuments(data) {
+  return request({
+    url: '/system/ProductInvoice/printDocuments',
+    method: 'get',
+    params: data,
+    //baseURL: process.env.VUE_APP_BASE_API1
+  })
+}
 // 订单管理  新增发货单接口
 export function addProductInvoice(data) {
   return request({

+ 4 - 3
zkqy-ui/src/utils/print/deliverOrderPrint.js

@@ -1,4 +1,5 @@
 function receiptDocuments(data, domId) {
+  console.log('打印数据', data);
   let yy = new Date().getFullYear();
   let mm = new Date().getMonth() + 1;
   if (mm < 10) {
@@ -8,7 +9,7 @@ function receiptDocuments(data, domId) {
   if (dd < 10) {
     dd = "0" + dd;
   }
-  let { customerName, saleProductInfoList, noticeNumber, printUser, drawer } = data;
+  let { customerName, productCodeListVOList, noticeNumber, printUser, drawer } = data;
 
   let printContent = `<div class="table">
     <div class="tableName" style="text-align: center;font-size: 30px;font-weight: bold;">诸暨市新丝维纤维有限公司发货单</div>
@@ -35,8 +36,8 @@ function receiptDocuments(data, domId) {
             <td width="120px">净重</td>
           </tr>`;
   let totalBoxNum = 0, totalWeight = 0;
-  for (let i = 0; i < saleProductInfoList.length; i++) {
-    let item = saleProductInfoList[i];
+  for (let i = 0; i < productCodeListVOList.length; i++) {
+    let item = productCodeListVOList[i];
     if (item.boxNum) {
       totalBoxNum += Number(item.boxNum);
     }

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

@@ -8,7 +8,7 @@ function receiptDocuments(data, domId) {
   if (dd < 10) {
     dd = "0" + dd;
   }
-  let { customerName, saleProductInfoList, noticeNumber, printUser, drawer, salesman } = data;
+  let { customerName, 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;">
@@ -47,8 +47,8 @@ function receiptDocuments(data, domId) {
               <td width="100px">金额</td>
             </tr>`;
   let totalBoxNum = 0, totalWeight = 0, totalPrice = 0;
-  for (let i = 0; i < saleProductInfoList.length; i++) {
-    let item = saleProductInfoList[i];
+  for (let i = 0; i < productCodeListVOList.length; i++) {
+    let item = productCodeListVOList[i];
     if (item.boxNum) {
       totalBoxNum += Number(item.boxNum);
     }

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

@@ -236,6 +236,7 @@ import sendOrderPrint from "@/utils/print/sendOrderPrint";
 import {
   productInvoiceInfo,
   queryDropDownBoxData,
+  printDocuments,
 } from "@/api/tablelist/commonTable";
 import { mapState } from "vuex";
 
@@ -324,7 +325,8 @@ export default {
       let payload = {
         saleOrderNo: saleOrderNo,
       };
-      let res = await productInvoiceInfo(payload);
+      let res = await printDocuments({ id: row.id });
+      // return;
       if (res.code == 200) {
         let printData = res.data;
         console.log("printData", {
@@ -352,7 +354,8 @@ export default {
       let payload = {
         saleOrderNo: saleOrderNo,
       };
-      let res = await productInvoiceInfo(payload);
+      // let res = await productInvoiceInfo(payload);
+      let res = await printDocuments({ id: row.id });
       if (res.code == 200) {
         let printData = res.data;
         console.log("printData", {

+ 3 - 1
zkqy-ui/src/views/orderMange/financialReconciliation/index.vue

@@ -236,6 +236,7 @@ import sendOrderPrint from "@/utils/print/sendOrderPrint";
 import {
   productInvoiceInfo,
   queryDropDownBoxData,
+  printDocuments,
 } from "@/api/tablelist/commonTable";
 import { mapState } from "vuex";
 
@@ -352,7 +353,8 @@ export default {
       let payload = {
         saleOrderNo: saleOrderNo,
       };
-      let res = await productInvoiceInfo(payload);
+      // let res = await productInvoiceInfo(payload);
+      let res = await printDocuments({ id: row.id });
       if (res.code == 200) {
         let printData = res.data;
         console.log("printData", {