Эх сурвалжийг харах

审批人员调用客户档案数据

lxf 1 жил өмнө
parent
commit
9831938b48

+ 25 - 11
src/views/processApproval/components/Contract.vue

@@ -721,17 +721,6 @@ const getDict = () => {
       });
     }
   });
-  proxy.post("/customer/privateSeaPage", { pageNum: 1, pageSize: 999 }).then((res) => {
-    if (res.data.rows && res.data.rows.length > 0) {
-      formConfig[9].data = res.data.rows.map((item) => {
-        return {
-          ...item,
-          label: item.name,
-          value: item.id,
-        };
-      });
-    }
-  });
   proxy.post("/productInfo/page", { pageNum: 1, pageSize: 9999, definition: "1" }).then((res) => {
     if (res.data.rows && res.data.rows.length > 0) {
       formGoodsOption.btnConfig.listConfig[0].data = res.data.rows.map((item) => {
@@ -875,6 +864,31 @@ let status = ref(true);
 watch(
   refProps.queryData,
   () => {
+    if (["10", "20"].includes(route.query.processType)) {
+      proxy.post("/customer/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+        if (res.data.rows && res.data.rows.length > 0) {
+          formConfig[9].data = res.data.rows.map((item) => {
+            return {
+              ...item,
+              label: item.name,
+              value: item.id,
+            };
+          });
+        }
+      });
+    } else {
+      proxy.post("/customer/privateSeaPage", { pageNum: 1, pageSize: 999 }).then((res) => {
+        if (res.data.rows && res.data.rows.length > 0) {
+          formConfig[9].data = res.data.rows.map((item) => {
+            return {
+              ...item,
+              label: item.name,
+              value: item.id,
+            };
+          });
+        }
+      });
+    }
     if (refProps.queryData.value && ["10", "20", "30"].includes(route.query.processType)) {
       for (const key in refProps.queryData.value) {
         formData.data[key] = refProps.queryData.value[key];

+ 25 - 11
src/views/processApproval/components/PriceSheet.vue

@@ -617,17 +617,6 @@ const getDict = () => {
       });
     }
   });
-  proxy.post("/customer/privateSeaPage", { pageNum: 1, pageSize: 999 }).then((res) => {
-    if (res.data.rows && res.data.rows.length > 0) {
-      formConfig[8].data = res.data.rows.map((item) => {
-        return {
-          ...item,
-          label: item.name,
-          value: item.id,
-        };
-      });
-    }
-  });
   proxy.post("/productInfo/page", { pageNum: 1, pageSize: 9999, definition: "1" }).then((res) => {
     if (res.data.rows && res.data.rows.length > 0) {
       formGoodsOption.btnConfig.listConfig[0].data = res.data.rows.map((item) => {
@@ -762,6 +751,31 @@ const status = ref(false);
 watch(
   refProps.queryData,
   () => {
+    if (["10", "20"].includes(route.query.processType)) {
+      proxy.post("/customer/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+        if (res.data.rows && res.data.rows.length > 0) {
+          formConfig[8].data = res.data.rows.map((item) => {
+            return {
+              ...item,
+              label: item.name,
+              value: item.id,
+            };
+          });
+        }
+      });
+    } else {
+      proxy.post("/customer/privateSeaPage", { pageNum: 1, pageSize: 999 }).then((res) => {
+        if (res.data.rows && res.data.rows.length > 0) {
+          formConfig[8].data = res.data.rows.map((item) => {
+            return {
+              ...item,
+              label: item.name,
+              value: item.id,
+            };
+          });
+        }
+      });
+    }
     if (refProps.queryData.value && ["10", "20", "30"].includes(route.query.processType)) {
       for (const key in refProps.queryData.value) {
         formData.data[key] = refProps.queryData.value[key];