|
@@ -420,21 +420,25 @@ const getDetails = () => {
|
|
|
if (props.queryData.type && props.queryData.type === "handoverSlip") {
|
|
|
proxy.post("/contractProduct/getListDetail", ids.value).then((res) => {
|
|
|
formData.data.purchaseDetailList = res.map((x) => {
|
|
|
- delete x.id;
|
|
|
- return {
|
|
|
+ let obj = {
|
|
|
...x,
|
|
|
+ dataResource: "1", //来源写死外销合同采购
|
|
|
+ dataResourceId: x.id,
|
|
|
bussinessId: x.productId,
|
|
|
- subscribeCount: x.sumPackQuantity,
|
|
|
+ subscribeCount: x.quantity || x.sumPackQuantity || 0,
|
|
|
purchaseCount: x.sumPurchaseCount || 0,
|
|
|
count: x.expendQuantity || 0,
|
|
|
price: null,
|
|
|
amount: null,
|
|
|
};
|
|
|
+ delete obj.id;
|
|
|
+ return obj;
|
|
|
});
|
|
|
});
|
|
|
} else {
|
|
|
proxy.post("/subscribeDetail/detail", { ids: ids.value }).then((res) => {
|
|
|
formData.data.purchaseDetailList = res.map((x) => ({
|
|
|
+ subscribeDetailId: x.id,
|
|
|
bussinessId: x.bussinessId,
|
|
|
goodType: x.productDefinition,
|
|
|
productCode: x.productCode,
|
|
@@ -777,6 +781,11 @@ onMounted(() => {
|
|
|
ids.value = props.queryData.ids.split(",") || [];
|
|
|
getDetails();
|
|
|
}
|
|
|
+ // if (props.queryData.type === "handoverSlip") {
|
|
|
+ // formData.data.dataResource = "1"; //外销合同采购
|
|
|
+ // formData.data.dataResourceId = "";
|
|
|
+ // }
|
|
|
+
|
|
|
if (props.queryData.type === "handoverSlip" && props.queryData.arr) {
|
|
|
contractData.value = JSON.parse(props.queryData.arr);
|
|
|
auxiliaryData.value.unshift({
|