|
@@ -82,6 +82,7 @@
|
|
|
import {
|
|
|
productInvoiceInfo,
|
|
|
outboundOrderInfo,
|
|
|
+ printOutsourceOrderList,
|
|
|
} from "@/api/tablelist/commonTable";
|
|
|
export default {
|
|
|
name: "OutBound",
|
|
@@ -155,11 +156,19 @@ export default {
|
|
|
|
|
|
console.log(row);
|
|
|
try {
|
|
|
- let payload = {
|
|
|
- saleOrderNo: row.saleOrderSaleNo || row.saleNo,
|
|
|
- };
|
|
|
+ let payload = {};
|
|
|
+ if (isRetail) {
|
|
|
+ payload = {
|
|
|
+ saleOrderNo: row.saleOrderSaleNo,
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ payload = {
|
|
|
+ saleNo: row.saleNo,
|
|
|
+ };
|
|
|
+ }
|
|
|
console.log(payload);
|
|
|
- let res = await outboundOrderInfo(payload);
|
|
|
+ let fun = isRetail ? outboundOrderInfo : printOutsourceOrderList;
|
|
|
+ let res = await fun(payload);
|
|
|
if (res.code == 200) {
|
|
|
res.data.forEach((item) => {
|
|
|
// if (Number(item.productNumber) && Number(item.productUnitPrice)) {
|
|
@@ -169,6 +178,14 @@ export default {
|
|
|
// } else {
|
|
|
// item.price = 0;
|
|
|
// }
|
|
|
+ if (!isRetail) {
|
|
|
+ //非零售订单 计算金额
|
|
|
+ if (Number(item.productUnitPrice) && Number(item.productNumber)) {
|
|
|
+ item.productAmounts = (
|
|
|
+ Number(item.productNumber) * Number(item.productUnitPrice)
|
|
|
+ ).toFixed(2);
|
|
|
+ }
|
|
|
+ }
|
|
|
item.unit = "";
|
|
|
});
|
|
|
this.tableData = res.data;
|