|
@@ -294,6 +294,7 @@
|
|
|
queryDataById,
|
|
|
saveOrUpdate,
|
|
|
listHeard,
|
|
|
+ queryDeliverDataById
|
|
|
} from '../salesInvoiceForm.api';
|
|
|
import { JVxeTable } from '/@/components/jeecg/JVxeTable';
|
|
|
import { saleInvoiceShipColumns, saleInvoiceDetailColumns } from '../salesInvoiceForm.data';
|
|
@@ -416,7 +417,6 @@
|
|
|
saleInvoiceFormShipTable.dataSource = [];
|
|
|
saleInvoiceDetailsTable.dataSource = [];
|
|
|
activeKey.value = 'saleInvoiceDetails';
|
|
|
- getCustomerOptions();
|
|
|
notAllowEdit.value = false;
|
|
|
}
|
|
|
//编辑方法
|
|
@@ -428,7 +428,6 @@
|
|
|
saleInvoiceFormShipTable.dataSource = [...saleInvoiceFormShipDataList];
|
|
|
const saleInvoiceDetailsDataList = await querySaleInvoiceDetailListByMainId(row['id']);
|
|
|
saleInvoiceDetailsTable.dataSource = [...saleInvoiceDetailsDataList];
|
|
|
- getCustomerOptions();
|
|
|
notAllowEdit.value = true;
|
|
|
}
|
|
|
//获取主表
|
|
@@ -568,9 +567,10 @@
|
|
|
message.warning('发票明细只可有一条数据');
|
|
|
}
|
|
|
}
|
|
|
- function addSonList(data) {
|
|
|
- data.map((item) => {
|
|
|
- item.sourceId = item.childId;
|
|
|
+ async function addSonList(data) {
|
|
|
+ var arrDeliverSon = await queryDeliverDataById(data[0].id)
|
|
|
+ arrDeliverSon.map((item) => {
|
|
|
+ item.sourceId = item.id;
|
|
|
item.quantity = item.quantity && item.quantity !== '' ? item.quantity : 0;
|
|
|
item.taxPrice = item.taxPrice && item.taxPrice !== '' ? item.taxPrice : 0;
|
|
|
item.taxMoney = item.money && item.money !== '' ? item.money : 0;
|
|
@@ -580,7 +580,7 @@
|
|
|
});
|
|
|
notAllowEdit.value = true;
|
|
|
var xTable = saleInvoiceDetailsTableRef.value!.getXTable();
|
|
|
- var arrSonFormDelivery = xTable.data.concat(data);
|
|
|
+ var arrSonFormDelivery = xTable.data.concat(arrDeliverSon);
|
|
|
saleInvoiceDetailsTable.dataSource = arrSonFormDelivery;
|
|
|
formData.project = data[0].project;
|
|
|
formData.projectName = data[0].projectName;
|
|
@@ -596,7 +596,7 @@
|
|
|
formData.buyerAddress = res.records[0].invoiceAddress;
|
|
|
});
|
|
|
|
|
|
- getShipDetail(data[0].headId, 'delivery');
|
|
|
+ getShipDetail(data[0].id, 'delivery');
|
|
|
}
|
|
|
function getShipDetail(id, status) {
|
|
|
let params = { id: id };
|