Ver código fonte

买方信息过滤更改

cz 1 ano atrás
pai
commit
eb8475d74f

+ 39 - 18
src/components/process/EHSD/Contract.vue

@@ -1160,13 +1160,19 @@ const rules = ref({
   rate: [{ required: true, message: "请输入汇率", trigger: "blur" }],
 });
 const getDict = () => {
-  proxy.post("/customer/selPage", { pageNum: 1, pageSize: 50 }).then((res) => {
-    customerList.value = res.rows.map((x) => ({
-      ...x,
-      label: x.name,
-      value: x.id,
-    }));
-  });
+  proxy
+    .post("/customer/selPage", {
+      pageNum: 1,
+      pageSize: 50,
+      userId: userInfo.user.userId,
+    })
+    .then((res) => {
+      customerList.value = res.rows.map((x) => ({
+        ...x,
+        label: x.name,
+        value: x.id,
+      }));
+    });
   proxy
     .getDictOne([
       "inner_packaging_method_ehsd",
@@ -1604,6 +1610,10 @@ const handleRemove = async (index, row) => {
     formData.data.contractShipmentList.filter(
       (item) => item.productId !== row.productId
     );
+  formData.data.contractWaitShipmentList =
+    formData.data.contractWaitShipmentList.filter(
+      (item) => item.productId !== row.productId
+    );
   await formData.data.contractProductList.splice(index, 1);
   totalAmount();
 };
@@ -1781,14 +1791,16 @@ const loadingSearch = ref(false);
 const remoteMethod = (keyword) => {
   if (keyword && typeof keyword === "string") {
     loadingSearch.value = true;
-    proxy.post("/customer/selPage", { keyword }).then((res) => {
-      customerList.value = res.rows.map((x) => ({
-        ...x,
-        label: x.name,
-        value: x.id,
-      }));
-      loadingSearch.value = false;
-    });
+    proxy
+      .post("/customer/selPage", { keyword, userId: userInfo.user.userId })
+      .then((res) => {
+        customerList.value = res.rows.map((x) => ({
+          ...x,
+          label: x.name,
+          value: x.id,
+        }));
+        loadingSearch.value = false;
+      });
   }
   return;
 };
@@ -1989,7 +2001,10 @@ watch(
         res.cityId = res.buyCityId;
         if (res && res.buyCorporationName) {
           proxy
-            .post("/customer/selPage", { keyword: res.buyCorporationName })
+            .post("/customer/selPage", {
+              keyword: res.buyCorporationName,
+              userId: userInfo.user.userId,
+            })
             .then((res) => {
               customerList.value = res.rows.map((x) => ({
                 ...x,
@@ -2076,7 +2091,10 @@ const selectContract = (businessId) => {
       proxy.post("/contract/detail", { id: businessId }).then((res) => {
         if (res && res.buyCorporationName) {
           proxy
-            .post("/customer/selPage", { keyword: res.buyCorporationName })
+            .post("/customer/selPage", {
+              keyword: res.buyCorporationName,
+              userId: userInfo.user.userId,
+            })
             .then((res) => {
               customerList.value = res.rows.map((x) => ({
                 ...x,
@@ -2197,7 +2215,10 @@ const selectContract = (businessId) => {
         }
         if (res && res.buyCorporationName) {
           proxy
-            .post("/customer/selPage", { keyword: res.buyCorporationName })
+            .post("/customer/selPage", {
+              keyword: res.buyCorporationName,
+              userId: userInfo.user.userId,
+            })
             .then((res) => {
               customerList.value = res.rows.map((x) => ({
                 ...x,

+ 18 - 9
src/components/process/EHSD/ContractChange.vue

@@ -1564,6 +1564,10 @@ const handleRemove = async (index, row) => {
     formData.data.contractShipmentList.filter(
       (item) => item.productId !== row.productId
     );
+  formData.data.contractWaitShipmentList =
+    formData.data.contractWaitShipmentList.filter(
+      (item) => item.productId !== row.productId
+    );
   await formData.data.contractProductList.splice(index, 1);
   totalAmount();
 };
@@ -1783,14 +1787,16 @@ const loadingSearch = ref(false);
 const remoteMethod = (keyword) => {
   if (keyword && typeof keyword === "string") {
     loadingSearch.value = true;
-    proxy.post("/customer/selPage", { keyword }).then((res) => {
-      customerList.value = res.rows.map((x) => ({
-        ...x,
-        label: x.name,
-        value: x.id,
-      }));
-      loadingSearch.value = false;
-    });
+    proxy
+      .post("/customer/selPage", { keyword, userId: userInfo.user.userId })
+      .then((res) => {
+        customerList.value = res.rows.map((x) => ({
+          ...x,
+          label: x.name,
+          value: x.id,
+        }));
+        loadingSearch.value = false;
+      });
   }
   return;
 };
@@ -1960,7 +1966,10 @@ onMounted(() => {
       // }
       if (res && res.buyCorporationName) {
         proxy
-          .post("/customer/selPage", { keyword: res.buyCorporationName })
+          .post("/customer/selPage", {
+            keyword: res.buyCorporationName,
+            userId: userInfo.user.userId,
+          })
           .then((res) => {
             customerList.value = res.rows.map((x) => ({
               ...x,

+ 4 - 0
src/components/process/EHSD/Sample.vue

@@ -1501,6 +1501,10 @@ const handleRemove = async (index, row) => {
   formData.data.sampleShipmentList = formData.data.sampleShipmentList.filter(
     (item) => item.productId !== row.productId
   );
+  formData.data.sampleWaitShipmentList =
+    formData.data.sampleWaitShipmentList.filter(
+      (item) => item.productId !== row.productId
+    );
   await formData.data.sampleProductList.splice(index, 1);
   totalAmount();
 };

+ 4 - 0
src/components/process/EHSD/SampleChange.vue

@@ -1482,6 +1482,10 @@ const handleRemove = async (index, row) => {
   formData.data.sampleShipmentList = formData.data.sampleShipmentList.filter(
     (item) => item.productId !== row.productId
   );
+  formData.data.sampleWaitShipmentList =
+    formData.data.sampleWaitShipmentList.filter(
+      (item) => item.productId !== row.productId
+    );
   await formData.data.sampleProductList.splice(index, 1);
   totalAmount();
 };