ZaiZai 1 år sedan
förälder
incheckning
3e648cc757

+ 3 - 1
src/views/tentative/detect/commission.vue

@@ -486,6 +486,7 @@ const rowActionSave = async () => {
                 nodeId: primaryKeyId || '',
                 dataType: contractType > 0 ? contractType + '' : '1',
                 commissionId: id,
+                cid: searchForm.value?.contractId,
                 isaddType: true,
             },
         }).then()
@@ -517,6 +518,7 @@ const rowFillReports = async ({ id, testId }) => {
                 dataType: res.type,
                 commissionId: id,
                 tabTypeKey: 1,
+                cid: searchForm.value?.contractId,
             },
         }).then()
     } else {
@@ -556,7 +558,7 @@ const reportClick = () => {
     //处理类型
     const { contractType } = contractInfo.value
     // 委托单上报设置为1
-    classifyType.value = '1'  //contractType > 0 ? contractType + '' : '1'
+    classifyType.value = '1' //contractType > 0 ? contractType + '' : '1'
     //其它数据
     reportIds.value = rows[0].id //数据ID
     reportTaskName.value = entrustName //任务名称

+ 5 - 1
src/views/tentative/detect/test-form.vue

@@ -243,6 +243,7 @@ const dataId = routerQuery?.id || ''
 const nodeId = routerQuery?.nodeId || ''
 const dataType = routerQuery?.dataType || '1'
 let isaddType = routerQuery?.isaddType || false
+let currentCid = routerQuery?.cid
 const afterAdd = ref(false)
 const dayDate = dayjs().format('YYYY-MM-DD')
 const testTreeItem = ref(getStoreValue('testTreeItem'))
@@ -312,7 +313,10 @@ const getContractData = async () => {
     })
     const res = getArrValue(data)
     contractData.value = res
-    if (res.length > 0) {
+    if (!isNullES(currentCid)) {
+        contractId.value = currentCid
+    }
+    if (isNullES(currentCid) && res.length > 0) {
         contractId.value = res[0].id
     }
 }

+ 2 - 0
src/views/tentative/detect/test.vue

@@ -551,6 +551,7 @@ const addFormModalClick = () => {
         query: {
             nodeId: primaryKeyId.value,
             dataType: authBtnTabKey.value,
+            cid: searchForm.value?.contractId,
             isaddType: true,
         },
     })
@@ -567,6 +568,7 @@ const tableRowEdit = (row, tabTypeKey) => {
             nodeId: row.nodeId,
             dataType: row.type,
             tabTypeKey: tabTypeKey,
+            cid: searchForm.value?.contractId,
             // prenodeDataInfo:JSON.stringify(nodeDataInfo.value)
         },
     })

+ 1 - 0
src/views/tentative/material/modules/testSample/inventory.vue

@@ -266,6 +266,7 @@ const rowActionSave = async () => {
                     nodeId: primaryKeyId || '',
                     dataType: contractType > 0 ? contractType + '' : '1',
                     commissionId: id,
+                    cid: searchForm.value?.contractId,
                     isaddType: true,
                 },
             }).then()

+ 1 - 0
src/views/tentative/material/modules/testSample/testUnder.vue

@@ -312,6 +312,7 @@ const fillReportClick = async ({ id, testId }) => {
                 dataType: res.type,
                 commissionId: id,
                 tabTypeKey: 1,
+                cid: searchForm.value?.contractId,
             },
         }).then()
     } else {

+ 1 - 0
src/views/tentative/material/modules/testSample/tested.vue

@@ -235,6 +235,7 @@ const rowActionSave = async () => {
                 dataType: contractType > 0 ? contractType + '' : '1',
                 commissionId: id,
                 isaddType: true,
+                cid: searchForm.value?.contractId,
             },
         }).then()
     } else {