|
@@ -277,15 +277,31 @@ const props = defineProps({
|
|
|
|
|
|
const ids = ref([]);
|
|
|
const getDetails = () => {
|
|
|
- proxy.post("/subscribeDetail/detail", { ids: ids.value }).then((res) => {
|
|
|
- formData.data.purchaseDetailList = res.map((x) => ({
|
|
|
- ...x,
|
|
|
- subscribeCount: x.count,
|
|
|
- count: 0,
|
|
|
- price: null,
|
|
|
- amount: null,
|
|
|
- }));
|
|
|
- });
|
|
|
+ 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 {
|
|
|
+ ...x,
|
|
|
+ subscribeCount: x.sumPackQuantity,
|
|
|
+ purchaseCount: x.sumPurchaseCount,
|
|
|
+ count: 0,
|
|
|
+ price: null,
|
|
|
+ amount: null,
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ proxy.post("/subscribeDetail/detail", { ids: ids.value }).then((res) => {
|
|
|
+ formData.data.purchaseDetailList = res.map((x) => ({
|
|
|
+ ...x,
|
|
|
+ subscribeCount: x.count,
|
|
|
+ count: 0,
|
|
|
+ price: null,
|
|
|
+ amount: null,
|
|
|
+ }));
|
|
|
+ });
|
|
|
+ }
|
|
|
};
|
|
|
// 获取供应商数据
|
|
|
const supplierData = ref([]);
|