cz 1 anno fa
parent
commit
cd8375f977

+ 22 - 1
src/components/process/EHSD/Purchase.vue

@@ -8,6 +8,12 @@
             " @click="clickCopy">复制采购合同</el-button>
         </div>
       </template>
+      <template #contractCode>
+        <div style="width:100%">
+          <span style="padding-left:10px;cursor:pointer;color:#409EFF"
+                @click="openDetails(formData.data.contractId)">{{formData.data.contractCode}}</span>
+        </div>
+      </template>
       <template #buyer>
         <div style="width: 100%">
           <el-form-item prop="buyCorporationId">
@@ -604,10 +610,11 @@ const formConfig = computed(() => {
       isShow: judgeStatus(),
     },
     {
-      type: "input",
+      type: "slot",
       itemType: "text",
       label: "关联外销合同编号",
       prop: "contractCode",
+      slotName: "contractCode",
       itemWidth: 50,
       isShow: judgeStatus(),
     },
@@ -1294,6 +1301,7 @@ const getAssociationData = (type, id) => {
       auxiliaryData.value[0].label = "关联销售合同";
       proxy.post("/contract/detail", { id }).then((res) => {
         formData.data.contractCode = res.code;
+        formData.data.contractId = id;
         contractData.value = [
           {
             contractCode: res.code,
@@ -1893,6 +1901,8 @@ const selectPurchase = (businessId) => {
             "purchaseProductList",
             "ehsdPurchaseProductList",
             "purchaseArrivalList",
+            "dataResource",
+            "dataResourceId",
           ].includes(key)
         ) {
           formData.data[key] = res[key];
@@ -2023,6 +2033,17 @@ const showEcharts = (row, index) => {
   myChart.setOption(optionTwo.data);
   myChart.resize();
 };
+
+const openDetails = (id) => {
+  if (id) {
+    proxy.$router.push({
+      name: "contractDetails",
+      query: {
+        currentContractId: id,
+      },
+    });
+  }
+};
 </script>
 
 <style lang="scss" scoped>

+ 21 - 1
src/components/process/EHSD/PurchaseChange.vue

@@ -1,6 +1,13 @@
 <template>
   <div style="width: 100%; padding: 0px 15px">
     <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+      <template #contractCode>
+        <div style="width:100%">
+          <span style="padding-left:10px;cursor:pointer;color:#409EFF"
+                @click="openDetails(formData.data.contractId)">{{formData.data.contractCode}}</span>
+        </div>
+      </template>
+
       <template #buyer>
         <div style="width: 100%">
           <el-form-item prop="buyCorporationId">
@@ -581,10 +588,11 @@ const formConfig = computed(() => {
       isShow: judgeStatus(),
     },
     {
-      type: "input",
+      type: "slot",
       itemType: "text",
       label: "关联外销合同编号",
       prop: "contractCode",
+      slotName: "contractCode",
       itemWidth: 50,
       isShow: judgeStatus(),
     },
@@ -1265,6 +1273,7 @@ const getAssociationData = (type, id) => {
       auxiliaryData.value[0].label = "关联销售合同";
       proxy.post("/contract/detail", { id }).then((res) => {
         formData.data.contractCode = res.code;
+        formData.data.contractId = id;
         contractData.value = [
           {
             contractCode: res.code,
@@ -1975,6 +1984,17 @@ const showEcharts = (row, index) => {
   myChart.setOption(optionTwo.data);
   myChart.resize();
 };
+
+const openDetails = (id) => {
+  if (id) {
+    proxy.$router.push({
+      name: "contractDetails",
+      query: {
+        currentContractId: id,
+      },
+    });
+  }
+};
 </script>
 
 <style lang="scss" scoped>