Browse Source

决策辅助添加跳转

cz 1 năm trước cách đây
mục cha
commit
515248070b

+ 20 - 40
src/components/process/EHSD/Contract.vue

@@ -861,6 +861,8 @@ import { ElMessage } from "element-plus";
 import selectCity from "@/components/selectCity/index.vue";
 import { useRoute } from "vue-router";
 import SelectContract from "@/components/contractCom/selectContract.vue";
+import useUserStore from "@/store/modules/user";
+const userInfo = useUserStore();
 
 const route = useRoute();
 const { proxy } = getCurrentInstance();
@@ -1250,9 +1252,9 @@ const getDecisionAids = () => {
             style: {
               color: "#0084FF",
             },
+            fn: isHave.value ? handlePushRoute : () => {},
             id: item.id,
             num: 1,
-            // fn: () => {},
           },
           {
             label: "下单日期",
@@ -1717,43 +1719,20 @@ const clickSplit = (item) => {
 const clickDelete = (index) => {
   formData.data.contractShipmentList.splice(index, 1);
 };
-watch(
-  props.queryData,
-  () => {
-    formOption.disabled = judgeStatus();
-    return;
-    if (
-      props.queryData &&
-      ["10", "20", "30"].includes(route.query.processType)
-    ) {
-      for (var text in props.queryData) {
-        if (text === "fileList" || text === "packageFileList") {
-          if (props.queryData[text] && props.queryData[text].length > 0) {
-            formData.data[text] = props.queryData[text].map((item) => {
-              return {
-                raw: item,
-                name: item.fileName,
-                url: item.fileUrl,
-              };
-            });
-          }
-        } else {
-          formData.data[text] = props.queryData[text];
-        }
-      }
-      if (formData.data.countryId) {
-        getCityData(formData.data.countryId, "20");
-      }
-      if (formData.data.provinceId) {
-        getCityData(formData.data.provinceId, "30");
-      }
-      getDecisionAids();
-    }
-  },
-  {
-    deep: true,
-  }
-);
+
+// 判断当前用户有无销售合同页面权限
+const isHave = ref(false);
+if (userInfo.permissions && userInfo.permissions.includes("contract")) {
+  isHave.value = true;
+}
+const handlePushRoute = (row) => {
+  proxy.$router.push({
+    name: "Contract",
+    query: {
+      code: row.value,
+    },
+  });
+};
 
 onMounted(() => {
   formOption.disabled = judgeStatus();
@@ -1761,7 +1740,9 @@ onMounted(() => {
     let businessId = route.query.businessId;
     proxy.post("/contract/detail", { id: businessId }).then((res) => {
       if (res && res.dataJson) {
-        res = { ...res, ...JSON.parse(res.dataJson) };
+        // res = { ...res, ...JSON.parse(res.dataJson) };
+        // res=proxy.deepClone()
+        // res.contractProductList = JSON.parse(res.dataJson).contractProductList;
       }
       if (!res.fileList) {
         res.fileList = [];
@@ -1935,7 +1916,6 @@ const selectContract = (businessId) => {
             return x;
           });
       }
-      console.log(formData.data, "qdqwdwqdq");
       if (formData.data.countryId) {
         getCityData(formData.data.countryId, "20");
       }

+ 14 - 37
src/components/process/EHSD/ContractChange.vue

@@ -1690,43 +1690,20 @@ const clickSplit = (item) => {
 const clickDelete = (index) => {
   formData.data.contractShipmentList.splice(index, 1);
 };
-watch(
-  props.queryData,
-  () => {
-    formOption.disabled = judgeStatus();
-    return;
-    if (
-      props.queryData &&
-      ["10", "20", "30"].includes(route.query.processType)
-    ) {
-      for (var text in props.queryData) {
-        if (text === "fileList" || text === "packageFileList") {
-          if (props.queryData[text] && props.queryData[text].length > 0) {
-            formData.data[text] = props.queryData[text].map((item) => {
-              return {
-                raw: item,
-                name: item.fileName,
-                url: item.fileUrl,
-              };
-            });
-          }
-        } else {
-          formData.data[text] = props.queryData[text];
-        }
-      }
-      if (formData.data.countryId) {
-        getCityData(formData.data.countryId, "20");
-      }
-      if (formData.data.provinceId) {
-        getCityData(formData.data.provinceId, "30");
-      }
-      getDecisionAids();
-    }
-  },
-  {
-    deep: true,
-  }
-);
+
+// 判断当前用户有无销售合同页面权限
+const isHave = ref(false);
+if (userInfo.permissions && userInfo.permissions.includes("contract")) {
+  isHave.value = true;
+}
+const handlePushRoute = (row) => {
+  proxy.$router.push({
+    name: "Contract",
+    query: {
+      code: row.value,
+    },
+  });
+};
 
 onMounted(() => {
   checkShow();

+ 0 - 24
src/components/process/EHSD/PriceSheet.vue

@@ -1200,30 +1200,6 @@ const handleSubmit = async () => {
 const props = defineProps({
   queryData: Object,
 });
-watch(
-  props.queryData,
-  () => {
-    return;
-    formOption.disabled = judgeStatus();
-    if (
-      props.queryData &&
-      ["10", "20", "30"].includes(route.query.processType)
-    ) {
-      for (var text in props.queryData) {
-        formData.data[text] = props.queryData[text];
-      }
-      if (formData.data.countryId) {
-        getCityData(formData.data.countryId, "20");
-      }
-      if (formData.data.provinceId) {
-        getCityData(formData.data.provinceId, "30");
-      }
-    }
-  },
-  {
-    deep: true,
-  }
-);
 onMounted(() => {
   formOption.disabled = judgeStatus();
   if (route.query && route.query.priceSheetId) {

+ 46 - 31
src/components/process/EHSD/Purchase.vue

@@ -791,7 +791,8 @@ import { ElMessage } from "element-plus";
 import selectCity from "@/components/selectCity/index.vue";
 import Editor from "@/components/Editor/index.vue";
 import { useRoute } from "vue-router";
-
+import useUserStore from "@/store/modules/user";
+const userInfo = useUserStore();
 const route = useRoute();
 const { proxy } = getCurrentInstance();
 const invoiceType = ref([]);
@@ -1420,34 +1421,6 @@ const handleSubmit = async () => {
 const props = defineProps({
   queryData: Object,
 });
-watch(
-  props.queryData,
-  () => {
-    formOption.disabled = judgeStatus();
-    return;
-    if (
-      props.queryData &&
-      ["10", "20", "30"].includes(route.query.processType)
-    ) {
-      for (var text in props.queryData) {
-        formData.data[text] = props.queryData[text];
-      }
-      if (formData.data.countryId) {
-        getCityData(formData.data.countryId, "20");
-      }
-      if (formData.data.provinceId) {
-        getCityData(formData.data.provinceId, "30");
-      }
-      const ids = formData.data.purchaseProductList.map((x) => x.productId);
-      if (formData.data.sellCorporationId && ids.length > 0) {
-        getAuxiliaryData(formData.data.sellCorporationId, ids);
-      }
-    }
-  },
-  {
-    deep: true,
-  }
-);
 const getFormData = () => {
   return proxy.deepClone(formData.data);
 };
@@ -1484,6 +1457,34 @@ const getAssociationData = (type, id) => {
     }
   }
 };
+
+// 判断当前用户有无销售合同页面权限
+const isHave = ref(false);
+if (userInfo.permissions && userInfo.permissions.includes("contract")) {
+  isHave.value = true;
+}
+const handlePushRoute = (row) => {
+  proxy.$router.push({
+    name: "Contract",
+    query: {
+      code: row.value,
+    },
+  });
+};
+// 判断当前用户有无样品单页面权限
+const isHaveOne = ref(false);
+if (userInfo.permissions && userInfo.permissions.includes("sample")) {
+  isHaveOne.value = true;
+}
+const handlePushRouteOne = (row) => {
+  proxy.$router.push({
+    name: "Sample",
+    query: {
+      code: row.value,
+    },
+  });
+};
+
 onMounted(() => {
   if (route.query && route.query.type && route.query.submitType === "10") {
     getAssociationData(route.query.type, route.query.dataResourceId);
@@ -1848,7 +1849,14 @@ const getAuxiliaryData = (supplyId, productIdList) => {
           {
             label: "合同编号",
             value: "",
-            fn: () => {},
+            fn:
+              route.query.type == 2
+                ? isHaveOne
+                  ? handlePushRouteOne
+                  : () => {}
+                : isHave
+                ? handlePushRoute
+                : () => {},
             num: 1,
           },
           {
@@ -1924,7 +1932,14 @@ const getAuxiliaryData = (supplyId, productIdList) => {
       {
         label: "合同编号",
         value: "",
-        fn: () => {},
+        fn:
+          route.query.type == 2
+            ? isHaveOne
+              ? handlePushRouteOne
+              : () => {}
+            : isHave
+            ? handlePushRoute
+            : () => {},
         num: 1,
       },
       {

+ 45 - 31
src/components/process/EHSD/PurchaseChange.vue

@@ -791,6 +791,8 @@ import { ElMessage } from "element-plus";
 import selectCity from "@/components/selectCity/index.vue";
 import Editor from "@/components/Editor/index.vue";
 import { useRoute } from "vue-router";
+import useUserStore from "@/store/modules/user";
+const userInfo = useUserStore();
 
 const route = useRoute();
 const { proxy } = getCurrentInstance();
@@ -1405,34 +1407,6 @@ const handleSubmit = async () => {
 const props = defineProps({
   queryData: Object,
 });
-watch(
-  props.queryData,
-  () => {
-    formOption.disabled = judgeStatus();
-    return;
-    if (
-      props.queryData &&
-      ["10", "20", "30"].includes(route.query.processType)
-    ) {
-      for (var text in props.queryData) {
-        formData.data[text] = props.queryData[text];
-      }
-      if (formData.data.countryId) {
-        getCityData(formData.data.countryId, "20");
-      }
-      if (formData.data.provinceId) {
-        getCityData(formData.data.provinceId, "30");
-      }
-      const ids = formData.data.purchaseProductList.map((x) => x.productId);
-      if (formData.data.sellCorporationId && ids.length > 0) {
-        getAuxiliaryData(formData.data.sellCorporationId, ids);
-      }
-    }
-  },
-  {
-    deep: true,
-  }
-);
 const getFormData = () => {
   return proxy.deepClone(formData.data);
 };
@@ -1469,11 +1443,37 @@ const getAssociationData = (type, id) => {
     }
   }
 };
+// 判断当前用户有无销售合同页面权限
+const isHave = ref(false);
+if (userInfo.permissions && userInfo.permissions.includes("contract")) {
+  isHave.value = true;
+}
+const handlePushRoute = (row) => {
+  proxy.$router.push({
+    name: "Contract",
+    query: {
+      code: row.value,
+    },
+  });
+};
+// 判断当前用户有无样品单页面权限
+const isHaveOne = ref(false);
+if (userInfo.permissions && userInfo.permissions.includes("sample")) {
+  isHaveOne.value = true;
+}
+const handlePushRouteOne = (row) => {
+  proxy.$router.push({
+    name: "Sample",
+    query: {
+      code: row.value,
+    },
+  });
+};
+
 onMounted(() => {
   if (route.query && route.query.type && route.query.submitType === "10") {
     getAssociationData(route.query.type, route.query.dataResourceId);
   }
-
   if (props.queryData.ids) {
     proxy.post("/delivery/page", { ids: props.queryData.ids }).then((res) => {
       formData.data.dataResource = props.queryData.type;
@@ -1902,7 +1902,14 @@ const getAuxiliaryData = (supplyId, productIdList) => {
           {
             label: "合同编号",
             value: "",
-            fn: () => {},
+            fn:
+              route.query.type == 2
+                ? isHaveOne
+                  ? handlePushRouteOne
+                  : () => {}
+                : isHave
+                ? handlePushRoute
+                : () => {},
             num: 1,
           },
           {
@@ -1978,7 +1985,14 @@ const getAuxiliaryData = (supplyId, productIdList) => {
       {
         label: "合同编号",
         value: "",
-        fn: () => {},
+        fn:
+          route.query.type == 2
+            ? isHaveOne
+              ? handlePushRouteOne
+              : () => {}
+            : isHave
+            ? handlePushRoute
+            : () => {},
         num: 1,
       },
       {

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

@@ -1517,42 +1517,6 @@ const handleSubmit = async () => {
 const props = defineProps({
   queryData: Object,
 });
-watch(
-  props.queryData,
-  () => {
-    formOption.disabled = judgeStatus();
-    return;
-    if (
-      props.queryData &&
-      ["10", "20", "30"].includes(route.query.processType)
-    ) {
-      for (var text in props.queryData) {
-        if (text === "fileList" || text === "packageFileList") {
-          if (props.queryData[text] && props.queryData[text].length > 0) {
-            formData.data[text] = props.queryData[text].map((item) => {
-              return {
-                raw: item,
-                name: item.fileName,
-                url: item.fileUrl,
-              };
-            });
-          }
-        } else {
-          formData.data[text] = props.queryData[text];
-        }
-      }
-      if (formData.data.countryId) {
-        getCityData(formData.data.countryId, "20");
-      }
-      if (formData.data.provinceId) {
-        getCityData(formData.data.provinceId, "30");
-      }
-    }
-  },
-  {
-    deep: true,
-  }
-);
 const clickCustomerProduct = () => {
   if (!formData.data.buyCorporationId) {
     return ElMessage("请先选择客户");

+ 1 - 36
src/components/process/EHSD/SampleChange.vue

@@ -1528,42 +1528,7 @@ const handleSubmit = async () => {
 const props = defineProps({
   queryData: Object,
 });
-watch(
-  props.queryData,
-  () => {
-    formOption.disabled = judgeStatus();
-    return;
-    if (
-      props.queryData &&
-      ["10", "20", "30"].includes(route.query.processType)
-    ) {
-      for (var text in props.queryData) {
-        if (text === "fileList" || text === "packageFileList") {
-          if (props.queryData[text] && props.queryData[text].length > 0) {
-            formData.data[text] = props.queryData[text].map((item) => {
-              return {
-                raw: item,
-                name: item.fileName,
-                url: item.fileUrl,
-              };
-            });
-          }
-        } else {
-          formData.data[text] = props.queryData[text];
-        }
-      }
-      if (formData.data.countryId) {
-        getCityData(formData.data.countryId, "20");
-      }
-      if (formData.data.provinceId) {
-        getCityData(formData.data.provinceId, "30");
-      }
-    }
-  },
-  {
-    deep: true,
-  }
-);
+
 const clickCustomerProduct = () => {
   if (!formData.data.buyCorporationId) {
     return ElMessage("请先选择客户");

+ 36 - 52
src/components/process/PurchasePayment.vue

@@ -200,7 +200,7 @@ import { ElMessage } from "element-plus";
 import useUserStore from "@/store/modules/user";
 import { useRoute } from "vue-router";
 import { async } from "@antv/x6/lib/registry/marker/async";
-
+const userInfo = useUserStore();
 const route = useRoute();
 const { proxy } = getCurrentInstance();
 const supplierList = ref([]);
@@ -618,57 +618,17 @@ const handleSubmit = async () => {
 const props = defineProps({
   queryData: Object,
 });
-watch(
-  props.queryData,
-  () => {
-    return;
-    formOption.disabled = judgeStatus();
-    if (
-      props.queryData &&
-      ["10", "20", "30"].includes(route.query.processType)
-    ) {
-      for (var text in props.queryData) {
-        formData.data[text] = props.queryData[text];
-      }
-      if (formData.data.fileList && formData.data.fileList.length > 0) {
-        fileList.value = formData.data.fileList.map((item) => {
-          return {
-            raw: item,
-            name: item.fileName,
-            url: item.fileUrl,
-          };
-        });
-      } else {
-        fileList.value = [];
-      }
-      if (
-        route.query.processType !== "30" &&
-        formData.data.payDetailList &&
-        formData.data.payDetailList.length
-      ) {
-        let ids = formData.data.payDetailList.map((item) => item.purchaseId);
-        if (ids && ids.length > 0) {
-          proxy.post("/purchase/getListInId", ids).then((res) => {
-            if (res && res.length > 0) {
-              contractList.value = res.map((item) => {
-                return {
-                  value: item.id,
-                  label: item.code,
-                };
-              });
-            } else {
-              contractList.value = [];
-            }
-          });
-        }
-      }
-      getDecisionAids();
-    }
-  },
-  {
-    deep: true,
-  }
-);
+// 判断当前用户有无销售合同页面权限
+const isHave = ref(false);
+if (userInfo.permissions && userInfo.permissions.includes("contract")) {
+  isHave.value = true;
+}
+// 判断当前用户有无采购合同页面权限
+const isHaveOne = ref(false);
+if (userInfo.permissions && userInfo.permissions.includes("alreadyPurchase")) {
+  isHaveOne.value = true;
+}
+
 onMounted(async () => {
   if (props.queryData.supplyIdTwo) {
     formData.data.supplyIdTwo = props.queryData.supplyIdTwo;
@@ -787,7 +747,9 @@ const getDecisionAids = () => {
             value: item.code,
             style: {
               color: "#0084FF",
+              cursor: isHave.value ? "pointer" : "revert",
             },
+            fn: isHave.value ? handlePushRoute : () => {},
             id: item.id,
             num: 1,
           },
@@ -806,6 +768,17 @@ const getDecisionAids = () => {
       auxiliaryData.value[1].data = res.purchaseInfoList.map((item) => {
         return [
           {
+            label: "合同编号",
+            value: item.purchaseCode,
+            style: {
+              color: "#0084FF",
+              cursor: isHaveOne.value ? "pointer" : "revert",
+            },
+            fn: isHaveOne.value ? handlePushRouteOne : () => {},
+            id: item.purchaseId,
+            num: 1,
+          },
+          {
             label: "物品编码",
             value: item.productCode,
             id: item.productId,
@@ -840,6 +813,17 @@ const getDecisionAids = () => {
         }
         return [
           {
+            label: "合同编号",
+            value: item.purchaseCode,
+            style: {
+              color: "#0084FF",
+              cursor: isHaveOne.value ? "pointer" : "revert",
+            },
+            fn: isHaveOne.value ? handlePushRouteOne : () => {},
+            id: item.purchaseId,
+            num: 1,
+          },
+          {
             label: "物品编码",
             value: item.productCode,
             id: item.productId,

+ 0 - 28
src/components/process/SendFunds.vue

@@ -1181,34 +1181,6 @@ const userInfo = useUserStore().user;
 // const tenantId = "@福建宏星!#¥%……&*()";
 const tenantId = userInfo.tenantId;
 
-watch(
-  props.queryData,
-  () => {
-    return;
-    if (
-      props.queryData &&
-      ["10", "20", "30"].includes(route.query.processType)
-    ) {
-      for (var text in props.queryData) {
-        formData.data[text] = props.queryData[text];
-      }
-      oldType.value = proxy.deepClone(formData.data.type);
-      if (formData.data.fileList && formData.data.fileList.length > 0) {
-        fileList.value = formData.data.fileList.map((item) => {
-          return {
-            raw: item,
-            name: item.fileName,
-            url: item.fileUrl,
-          };
-        });
-      }
-    }
-  },
-  {
-    deep: true,
-  }
-);
-
 onMounted(() => {
   // formData.data.paymentTime = proxy.parseTime(new Date());
   // 核销

+ 18 - 22
src/components/process/SendPurchase.vue

@@ -555,7 +555,7 @@ const getAuxiliaryData = (sellCorporationId, productIdList) => {
           {
             label: "合同编号",
             value: "",
-            fn: () => {},
+            fn: isHave.value ? handlePushRoute : () => {},
             num: 1,
           },
           {
@@ -780,27 +780,6 @@ const handlePerson = (item, index) => {
     : "";
 };
 
-watch(
-  props.queryData,
-  () => {
-    return;
-    if (
-      props.queryData &&
-      (route.query.processType == 10 ||
-        route.query.processType == 20 ||
-        route.query.processType == 30)
-    ) {
-      formData.data = proxy.deepClone(props.queryData);
-      const ids = formData.data.purchaseProductList.map((x) => x.productId);
-      if (formData.data.sellCorporationId && ids.length > 0) {
-        getAuxiliaryData(formData.data.sellCorporationId, ids);
-      }
-    }
-  },
-  {
-    deep: true,
-  }
-);
 const judgeStatus = () => {
   if (route.query.processType == 20 || route.query.processType == 10) {
     return true;
@@ -818,6 +797,23 @@ const judgeStatus = () => {
 // 获取用户信息并赋默认值
 const userInfo = useUserStore().user;
 const contractData = ref([]);
+// 判断当前用户有无采购合同页面权限
+const isHave = ref(false);
+if (
+  useUserStore().permissions &&
+  useUserStore().permissions.includes("alreadyPurchase")
+) {
+  isHave.value = true;
+}
+const handlePushRoute = (row) => {
+  proxy.$router.push({
+    name: "Purchased",
+    query: {
+      code: row.value,
+    },
+  });
+};
+
 onMounted(() => {
   formData.data.purchaseTime = proxy.parseTime(new Date());
   formData.data.deptName = userInfo.dept.deptName;

+ 121 - 52
src/components/process/SendSubscribe.vue

@@ -1,6 +1,12 @@
 <template>
   <div style="width: 100%; padding: 0px 15px">
-    <el-form :model="formData.data" :rules="rules" ref="formDom" label-position="top" :disabled="judgeStatus()">
+    <el-form
+      :model="formData.data"
+      :rules="rules"
+      ref="formDom"
+      label-position="top"
+      :disabled="judgeStatus()"
+    >
       <div class="_t">申购信息</div>
       <el-row :gutter="10">
         <el-col :span="6">
@@ -24,56 +30,116 @@
       <el-row :gutter="10">
         <el-col :span="6">
           <el-form-item label="申购部门" prop="deptName">
-            <el-input v-model="formData.data.deptName" placeholder="请输入" disabled> </el-input>
+            <el-input
+              v-model="formData.data.deptName"
+              placeholder="请输入"
+              disabled
+            >
+            </el-input>
           </el-form-item>
         </el-col>
         <el-col :span="6">
           <el-form-item label="申购人" prop="subcribeName">
-            <el-input v-model="formData.data.subcribeName" placeholder="请输入" disabled> </el-input>
+            <el-input
+              v-model="formData.data.subcribeName"
+              placeholder="请输入"
+              disabled
+            >
+            </el-input>
           </el-form-item>
         </el-col>
         <el-col :span="6">
           <el-form-item label="申购时间" prop="subcribeTime">
-            <el-date-picker v-model="formData.data.subcribeTime" type="datetime" placeholder="请选择" disabled />
+            <el-date-picker
+              v-model="formData.data.subcribeTime"
+              type="datetime"
+              placeholder="请选择"
+              disabled
+            />
           </el-form-item>
         </el-col>
       </el-row>
       <el-form-item label="申购说明" prop="subcribeContent">
-        <el-input v-model="formData.data.subcribeContent" placeholder="请输入" type="textarea"> </el-input>
+        <el-input
+          v-model="formData.data.subcribeContent"
+          placeholder="请输入"
+          type="textarea"
+        >
+        </el-input>
       </el-form-item>
       <div class="_t">申购明细</div>
       <el-form-item>
-        <el-button type="primary" @click="openProduct = true" style="margin: 10px 0"> 添加货品 </el-button>
+        <el-button
+          type="primary"
+          @click="openProduct = true"
+          style="margin: 10px 0"
+        >
+          添加货品
+        </el-button>
         <el-table :data="formData.data.subscribeDetailList">
-          <el-table-column prop="goodType" label="货品类型" :formatter="(row) => (row.goodType == 1 ? '产品' : '物料')" />
+          <el-table-column
+            prop="goodType"
+            label="货品类型"
+            :formatter="(row) => (row.goodType == 1 ? '产品' : '物料')"
+          />
           <el-table-column prop="code" label="货品编码" />
           <el-table-column prop="name" label="货品名称" min-width="150" />
           <el-table-column prop="spec" label="规格型号" />
-          <el-table-column prop="unit" label="单位" :formatter="(row) => dictValueLabel(row.unit, productUnit)" />
+          <el-table-column
+            prop="unit"
+            label="单位"
+            :formatter="(row) => dictValueLabel(row.unit, productUnit)"
+          />
           <el-table-column prop="count" label="申购数量" min-width="150">
             <template #default="{ row, $index }">
-              <el-form-item :prop="'subscribeDetailList.' + $index + '.count'" :rules="rules.count" :inline-message="true">
-                <el-input-number onmousewheel="return false;" v-model="row.count" :precision="4" :controls="false" :min="1" />
+              <el-form-item
+                :prop="'subscribeDetailList.' + $index + '.count'"
+                :rules="rules.count"
+                :inline-message="true"
+              >
+                <el-input-number
+                  onmousewheel="return false;"
+                  v-model="row.count"
+                  :precision="4"
+                  :controls="false"
+                  :min="1"
+                />
               </el-form-item>
             </template>
           </el-table-column>
           <el-table-column prop="remark" label="备注" min-width="150">
             <template #default="{ row, $index }">
-              <el-form-item :prop="'subscribeDetailList.' + $index + '.remark'" :rules="rules.remark" :inline-message="true">
+              <el-form-item
+                :prop="'subscribeDetailList.' + $index + '.remark'"
+                :rules="rules.remark"
+                :inline-message="true"
+              >
                 <el-input v-model="row.remark" placeholder="请输入" />
               </el-form-item>
             </template>
           </el-table-column>
           <el-table-column prop="zip" label="操作" width="100">
             <template #default="{ $index }">
-              <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
+              <el-button type="primary" link @click="handleRemove($index)"
+                >删除</el-button
+              >
             </template>
           </el-table-column>
         </el-table>
       </el-form-item>
     </el-form>
-    <el-dialog v-if="openProduct" v-model="openProduct" title="选择货品" width="70%" append-to-body>
-      <SelectGoods :selectList="acquireSelectList()" @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
+    <el-dialog
+      v-if="openProduct"
+      v-model="openProduct"
+      title="选择货品"
+      width="70%"
+      append-to-body
+    >
+      <SelectGoods
+        :selectList="acquireSelectList()"
+        @cancel="openProduct = false"
+        @pushGoods="pushGoods"
+      ></SelectGoods>
     </el-dialog>
   </div>
 </template>
@@ -96,10 +162,16 @@ let formData = reactive({
   },
 });
 let rules = ref({
-  corporationId: [{ required: true, message: "请选择归属公司", trigger: "change" }],
+  corporationId: [
+    { required: true, message: "请选择归属公司", trigger: "change" },
+  ],
   deptName: [{ required: true, message: "请输入申购部门", trigger: "blur" }],
-  subcribeName: [{ required: true, message: "请输入申购人名称", trigger: "blur" }],
-  subcribeTime: [{ required: true, message: "请选择申购时间", trigger: "change" }],
+  subcribeName: [
+    { required: true, message: "请输入申购人名称", trigger: "blur" },
+  ],
+  subcribeTime: [
+    { required: true, message: "请选择申购时间", trigger: "change" },
+  ],
   // subcribeContent: [
   //   { required: true, message: "请输入申购事由", trigger: "blur" },
   // ],
@@ -120,9 +192,14 @@ const handleRemove = (index) => {
 const pushGoods = (goods) => {
   if (goods && goods.length > 0) {
     let afterFiltering = [];
-    if (formData.data.subscribeDetailList && formData.data.subscribeDetailList.length > 0) {
+    if (
+      formData.data.subscribeDetailList &&
+      formData.data.subscribeDetailList.length > 0
+    ) {
       afterFiltering = goods.filter((item) => {
-        let data = formData.data.subscribeDetailList.filter((itemProduct) => itemProduct.bussinessId === item.id);
+        let data = formData.data.subscribeDetailList.filter(
+          (itemProduct) => itemProduct.bussinessId === item.id
+        );
         if (data && data.length > 0) {
           return false;
         }
@@ -141,7 +218,8 @@ const pushGoods = (goods) => {
       count: "",
       remark: "",
     }));
-    formData.data.subscribeDetailList = formData.data.subscribeDetailList.concat(arr);
+    formData.data.subscribeDetailList =
+      formData.data.subscribeDetailList.concat(arr);
     openProduct.value = false;
     return ElMessage({
       message: "添加成功!",
@@ -184,27 +262,16 @@ const judgeStatus = () => {
     return true;
   }
   if (props.queryData.recordList && props.queryData.recordList.length > 0) {
-    let data = props.queryData.recordList.filter((item) => item.status === 2 && item.nodeType !== 1);
+    let data = props.queryData.recordList.filter(
+      (item) => item.status === 2 && item.nodeType !== 1
+    );
     if (data && data.length > 0) {
       return true;
     }
   }
   return false;
-};;
+};
 
-watch(
-  props.queryData,
-  () => {
-    if (props.queryData && ["10", "20", "30"].includes(route.query.processType)) {
-      for (const key in props.queryData) {
-        formData.data[key] = props.queryData[key];
-      }
-    }
-  },
-  {
-    deep: true,
-  }
-);
 const productUnit = ref([]);
 const companyData = ref([]);
 
@@ -232,7 +299,10 @@ defineExpose({
 });
 const acquireSelectList = () => {
   let data = [];
-  if (formData.data.subscribeDetailList && formData.data.subscribeDetailList.length > 0) {
+  if (
+    formData.data.subscribeDetailList &&
+    formData.data.subscribeDetailList.length > 0
+  ) {
     data = formData.data.subscribeDetailList.map((item) => {
       return {
         id: item.bussinessId,
@@ -246,35 +316,34 @@ const emit = defineEmits(["auxiliaryChange"]);
 let auxiliaryData = ref([
   {
     label: "最近合同",
-    data:[
+    data: [
       [
         {
-          label:"合同编号",
-          value:'12312312312456',
-          fn:()=>{
-            console.log(formData.data)
+          label: "合同编号",
+          value: "12312312312456",
+          fn: () => {
+            console.log(formData.data);
           },
-          style:{
-            color:'red'
+          style: {
+            color: "red",
           },
-          num:1,
+          num: 1,
         },
         {
-          label:"合同编号",
-          value:'123456',
-          fn:()=>{
-            alert('点击事件')
-          }
-        }
+          label: "合同编号",
+          value: "123456",
+          fn: () => {
+            alert("点击事件");
+          },
+        },
       ],
-
     ],
   },
 ]);
 const auxiliaryChange = (data) => {
   emit("auxiliaryChange", data);
 };
-auxiliaryChange(auxiliaryData)
+auxiliaryChange(auxiliaryData);
 </script>
 
 <style lang="scss" scoped>

+ 4 - 1
src/views/EHSD/procurement/purchasedEHSD/index.vue

@@ -59,7 +59,7 @@ import { computed, ref } from "vue";
 import byTable from "@/components/byTable/index";
 import { ElMessage, ElMessageBox } from "element-plus";
 import PurchasePDFOne from "@/components/PDF/purchasePDFOne.vue";
-
+const route = useRoute();
 const { proxy } = getCurrentInstance();
 const supplierList = ref([]);
 const status = ref([
@@ -342,6 +342,9 @@ const getList = async (req) => {
   });
 };
 getDict();
+if (route.query.code) {
+  sourceList.value.pagination.keyword = route.query.code;
+}
 getList();
 
 const openPdf = ref(false);

+ 4 - 1
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -181,7 +181,7 @@ import useUserStore from "@/store/modules/user";
 import { ElMessage, ElMessageBox } from "element-plus";
 import ContractDetails from "@/components/contractCom/contractDetails.vue";
 import ContractPDFOne from "@/components/PDF/contractPDFOne.vue";
-
+const route = useRoute();
 const { proxy } = getCurrentInstance();
 const accountCurrency = ref([]);
 const tradeMethods = ref([]);
@@ -530,6 +530,9 @@ const getList = async (req) => {
   });
 };
 getDict();
+if (route.query.code) {
+  sourceList.value.pagination.keyword = route.query.code;
+}
 getList();
 const newContract = () => {
   proxy.$router.replace({

+ 4 - 1
src/views/EHSD/saleContract/sampleEHSD/index.vue

@@ -181,7 +181,7 @@ import useUserStore from "@/store/modules/user";
 import { ElMessage, ElMessageBox } from "element-plus";
 import ContractDetailsOne from "@/components/contractCom/contractDetailsOne.vue";
 import SamplePDF from "@/components/PDF/samplePDF.vue";
-
+const route = useRoute();
 const { proxy } = getCurrentInstance();
 const accountCurrency = ref([]);
 const tradeMethods = ref([]);
@@ -531,6 +531,9 @@ const getList = async (req) => {
   });
 };
 getDict();
+if (route.query.code) {
+  sourceList.value.pagination.keyword = route.query.code;
+}
 getList();
 const newSample = () => {
   proxy.$router.replace({

+ 1 - 1
src/views/process/processApproval/auxiliary.vue

@@ -9,7 +9,7 @@
 							<div 
 								class="value" 
 								:class="n.fn ? 'color-bl' : ''" 
-								@click="n.fn ? n.fn() : ''"
+								@click="n.fn ? n.fn(n) : ''"
 								:style="n.style || ''">
 								{{n.value}}
 							</div>