|
@@ -828,6 +828,7 @@ import {
|
|
|
queryMaterielList,
|
|
|
getSaleOrderProductionListDistinct,
|
|
|
getProductSpecificationsByProductName,
|
|
|
+ printOutsourceOrder,
|
|
|
} from "@/api/tablelist/commonTable";
|
|
|
import { updateOrder } from "@/api/system/retailMange.js";
|
|
|
import { listData } from "@/api/system/tenant/data";
|
|
@@ -1234,8 +1235,31 @@ export default {
|
|
|
let res = await this.$refs.outBoundRef.getPrintData();
|
|
|
console.log(res);
|
|
|
if (res.flag) {
|
|
|
- res.data.form.printUser = this.nickName;
|
|
|
- outBoundPrint(res.data, "printDom", false);
|
|
|
+ try {
|
|
|
+ let payload = res.data.tableData.map((item) => {
|
|
|
+ let { saleNo } = this.currentRow;
|
|
|
+ return {
|
|
|
+ accountingType: 1,
|
|
|
+ accountsReceivableDate: new Date(),
|
|
|
+ saleNo,
|
|
|
+ // saleProductNo: item.saleProductNo,
|
|
|
+ productId: item.productId,
|
|
|
+ productName: item.productName,
|
|
|
+ productSpecifications: item.productSpecifications,
|
|
|
+ productcolour: item.productcolour,
|
|
|
+ lotNumber: item.lotNumber,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ let result = await printOutsourceOrder(payload);
|
|
|
+ if (result.code == 200) {
|
|
|
+ res.data.form.printUser = this.nickName;
|
|
|
+ outBoundPrint(res.data, "printDom", false);
|
|
|
+ } else {
|
|
|
+ throw new Error(result.msg);
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ this.$message.error(error);
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
// 产品名失焦
|
|
@@ -1713,7 +1737,8 @@ export default {
|
|
|
this.queryParams.queryMap.queryParam =
|
|
|
this.queryParams.queryMap.queryCriteriaValue;
|
|
|
// this.queryParams.orderType = "";
|
|
|
- this.queryParams.queryParam = this.queryParams.queryMap.queryCriteriaValue;
|
|
|
+ this.queryParams.queryParam =
|
|
|
+ this.queryParams.queryMap.queryCriteriaValue;
|
|
|
saleOrderList(this.queryParams).then(async (res) => {
|
|
|
this.tableList = [];
|
|
|
// res.rows.forEach((item) => {
|