ZaiZai 1 рік тому
батько
коміт
2da1c3f308

+ 1 - 1
public/version.json

@@ -1,3 +1,3 @@
 {
-  "value": "20240926114136"
+  "value": "20240926161819"
 }

+ 8 - 0
src/api/modules/tentative/material/sampling.js

@@ -83,6 +83,14 @@ export default {
             data: form,
         })
     },
+    //检验是否关联
+    async getCheckSample(form) {
+        return HcApi({
+            url: '/api/blade-business/entrustinfo/checkSample',
+            method: 'get',
+            params: form,
+        })
+    },
     //试验-客户端获取表的HTML
     async getExcelHtml(form) {
         return HcApi({

+ 2 - 2
src/config/index.json

@@ -1,10 +1,10 @@
 {
     "version": "20230607160059",
     "target1": "http://127.0.0.1:8090",
-    "target": "http://39.108.216.210:8090",
+    "target2": "http://39.108.216.210:8090",
     "target3": "http://192.168.0.125:8090",
     "target4": "http://183.247.216.148:28090",
-    "target5": "http://192.168.0.196:8090",
+    "target": "http://192.168.0.196:8090",
     "socket": "wss://measure.hczcxx.cn/websocket",
     "socket2": "ws://192.168.0.125:9527/websocket",
     "localModel": false,

+ 20 - 0
src/views/tentative/material/sampling.vue

@@ -829,11 +829,31 @@ const editHtmlId = ref('')
 const entrustId = ref('')
 const delegateContractChange = async () => {
     delegateHtmlLoading.value = true
+    const res = await getCheckSample()
+    if (!res) {
+        delegateHtmlLoading.value = false
+        return
+    }
     await getDelegateExcelHtml()
     await getDelegateDataInfo()
     delegateHtmlLoading.value = false
 }
 
+//校验是否关联
+const getCheckSample = async () => {
+    const { error, code, msg } = await samplingApi.getCheckSample({
+        nodeId: primaryKeyId.value,
+        sampleId: editHtmlId.value,
+        contractId: delegateContractId.value,
+    })
+    if (!error && code === 200) {
+        return true
+    } else {
+        window.$message.error(msg)
+        return false
+    }
+}
+
 //获取委托数据
 const getDelegateDataInfo = async () => {
     const { error, code, msg, data } = await samplingApi.getBussDataInfoTrialEntrust({