Kaynağa Gözat

销售合同,报价单: 审批和详情页:买方信息使用客户档案数据

lxf 1 yıl önce
ebeveyn
işleme
a001527e32

+ 22 - 10
src/components/process/Contract.vue

@@ -668,15 +668,6 @@ const getDict = () => {
       };
     });
   });
-  proxy.post("/customer/privateSeaPage", { pageNum: 1, pageSize: 999 }).then((res) => {
-    customerList.value = res.rows.map((item) => {
-      return {
-        ...item,
-        label: item.name,
-        value: item.id,
-      };
-    });
-  });
   proxy.post("/accountManagement/page", { pageNum: 1, pageSize: 999 }).then((res) => {
     accountList.value = res.rows.map((item) => {
       return {
@@ -1259,6 +1250,7 @@ watch(
       }
       getDecisionAids();
     }
+    console.log('111');
   },
   {
     deep: true,
@@ -1277,9 +1269,29 @@ const acquireSelectList = () => {
   return data;
 };
 onMounted(() => {
+  if(!route.query.processType || route.query.processType == 30) {
+    proxy.post("/customer/privateSeaPage", { pageNum: 1, pageSize: 999 }).then((res) => {
+      customerList.value = res.rows.map((item) => {
+        return {
+          ...item,
+          label: item.name,
+          value: item.id,
+        };
+      });
+    });
+  } else {
+    proxy.post("/customer/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+      customerList.value = res.rows.map((item) => {
+        return {
+          ...item,
+          label: item.name,
+          value: item.id,
+        };
+      });
+    });
+  }
   if (props.queryData.priceSheetId) {
     proxy.post("/saleQuotation/detail", { id: props.queryData.priceSheetId }).then((res) => {
-      console.log(res);
       res.countryId = res.buyCountryId;
       res.provinceId = res.buyProvinceId;
       res.cityId = res.buyCityId;

+ 21 - 9
src/components/process/PriceSheet.vue

@@ -505,15 +505,6 @@ const getDict = () => {
       };
     });
   });
-  proxy.post("/customer/privateSeaPage", { pageNum: 1, pageSize: 999 }).then((res) => {
-    customerList.value = res.rows.map((item) => {
-      return {
-        ...item,
-        label: item.name,
-        value: item.id,
-      };
-    });
-  });
 };
 getDict();
 const changeTemplate = (val) => {
@@ -826,6 +817,27 @@ watch(
   }
 );
 onMounted(() => {
+  if(!route.query.processType || route.query.processType == 30) {
+    proxy.post("/customer/privateSeaPage", { pageNum: 1, pageSize: 999 }).then((res) => {
+      customerList.value = res.rows.map((item) => {
+        return {
+          ...item,
+          label: item.name,
+          value: item.id,
+        };
+      });
+    });
+  } else {
+    proxy.post("/customer/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+      customerList.value = res.rows.map((item) => {
+        return {
+          ...item,
+          label: item.name,
+          value: item.id,
+        };
+      });
+    });
+  }
   if (props.queryData.priceSheetId) {
     proxy.post("/saleQuotation/detail", { id: props.queryData.priceSheetId }).then((res) => {
       res.countryId = res.buyCountryId;

+ 1 - 1
src/views/customer/privatesea/index.vue

@@ -772,7 +772,7 @@ const follow = ref(null);
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy.post("customer/privateSeaPage", sourceList.value.pagination).then((res) => {
+  proxy.post("/customer/privateSeaPage", sourceList.value.pagination).then((res) => {
     res.rows.forEach((x) => {
       x.addTagShow = false;
       if (x.tag) {