Browse Source

交接选择列表跳转采购

lxf 2 years ago
parent
commit
920968fb78

+ 25 - 9
src/components/process/SendPurchase.vue

@@ -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([]);

+ 1 - 0
src/views/purchaseManage/purchaseManage/handoverSlip/index.vue

@@ -205,6 +205,7 @@ const start = () => {
       path: "/platform_manage/process/processApproval",
       query: {
         flowKey: "purchase_flow",
+        type: 'handoverSlip',
         ids,
       },
     });