|
@@ -392,6 +392,7 @@
|
|
|
queryVersonHistoryById,
|
|
|
queryRate,
|
|
|
LinkOption,
|
|
|
+ queryByProject,
|
|
|
} from '../quotationForm.api';
|
|
|
import { JVxeTable } from '/@/components/jeecg/JVxeTable';
|
|
|
import { saleQuotationFormShipColumns, saleQuotationFormProductColumns } from '../quotationForm.data';
|
|
@@ -582,7 +583,7 @@
|
|
|
quotationPeriod.value[0] = formData.quotationPeriodBegin ? dayjs(formData.quotationPeriodBegin, 'YYYY/MM/DD') : '';
|
|
|
quotationPeriod.value[1] = formData.quotationPeriodEnd ? dayjs(formData.quotationPeriodEnd, 'YYYY/MM/DD') : '';
|
|
|
notAllowEdit.value = true;
|
|
|
- getLinkOptionsArr(formData.quotationCustomer);
|
|
|
+ getLinkOptionsArr(formData.quotationCustomer,null);
|
|
|
}
|
|
|
//获取主表
|
|
|
async function queryMainData(id) {
|
|
@@ -751,7 +752,7 @@
|
|
|
saleQuotationFormProductTable.dataSource = newArr;
|
|
|
}
|
|
|
changeExchangeRate();
|
|
|
- getLinkOptionsArr(formData.quotationCustomer);
|
|
|
+ getLinkOptionsArr(formData.quotationCustomer,formData.quotationProject);
|
|
|
}
|
|
|
}
|
|
|
//获取客户列表
|
|
@@ -914,7 +915,7 @@
|
|
|
// formData.currency = '美元';
|
|
|
// formData.exchangeRate = '1';
|
|
|
await getShipList(data[0].headId);
|
|
|
- await getLinkOptionsArr(formData.quotationCustomer);
|
|
|
+ await getLinkOptionsArr(formData.quotationCustomer,formData.quotationProject);
|
|
|
await changeExchangeRate();
|
|
|
// countGrossMargin()
|
|
|
// await changeDiscountOrExchangeRate()
|
|
@@ -1083,13 +1084,21 @@
|
|
|
(salePriceAll - customerCommisionAll - platformCommisionAll - purchasePriceAll / Number(formData.exchangeRate)) / salePriceAll || 0;
|
|
|
formData.grossMarginHead = (Number(formData.grossMarginHead) * 100).toFixed(2);
|
|
|
}
|
|
|
- async function getLinkOptionsArr(customerId) {
|
|
|
+ async function getLinkOptionsArr(customerId,project) {
|
|
|
var obj = await LinkOption({ id: customerId });
|
|
|
linkOption.value = obj;
|
|
|
- if (obj.lenght !== 0 && typeof obj === 'undefined') {
|
|
|
- formData.liaisonId = obj[0].id;
|
|
|
- formData.liaisonInfo = obj[0].name;
|
|
|
+
|
|
|
+ var objProject = await queryByProject({ project: project });
|
|
|
+ if (objProject != null) {
|
|
|
+ const jsonString = JSON.stringify(objProject);
|
|
|
+ const parsedData = JSON.parse(jsonString);
|
|
|
+ formData.liaisonId = parsedData.liaisonId;
|
|
|
+ formData.liaisonInfo = parsedData.liaisonInfo;
|
|
|
}
|
|
|
+ // if (obj.lenght !== 0 && typeof obj === 'undefined') {
|
|
|
+ // formData.liaisonId = obj[0].id;
|
|
|
+ // formData.liaisonInfo = obj[0].name;
|
|
|
+ // }
|
|
|
}
|
|
|
function onChangeLiaison(data) {
|
|
|
if (data && data !== undefined) {
|
|
@@ -1157,6 +1166,7 @@
|
|
|
SetSonListRef,
|
|
|
setSonListFiled,
|
|
|
setBatchDiscount,
|
|
|
+ queryByProject,
|
|
|
linkOption,
|
|
|
getLinkOptionsArr,
|
|
|
onChangeLiaison,
|