Browse Source

关联取样修改

duy 7 months ago
parent
commit
033eabc3bc
1 changed files with 7 additions and 6 deletions
  1. 7 6
      src/views/tentative/detect/commission.vue

+ 7 - 6
src/views/tentative/detect/commission.vue

@@ -67,7 +67,7 @@
                 </template>
                 <template #action="{ row }">
                     <hc-tooltip keys="tentative_material_commission_edit">
-                        <el-link v-if="row.status === 1" type="primary" @click="rowEdit(row)" v-loading="rowLoad">修改</el-link>
+                        <el-link v-if="row.status === 1" v-loading="rowLoad" type="primary" @click="rowEdit(row)">修改</el-link>
                         <el-link v-else type="success" @click="rowView(row)">查看</el-link>
                     </hc-tooltip>
                     <hc-tooltip keys="tentative_material_commission_fill">
@@ -355,14 +355,14 @@ const getDelegateExcelHtml = async () => {
 //关联材料选择
 const linkSamplingChange = async ({ id, entrustId }) => {
     await getDelegateExcelHtml()
-    await getDelegateDataInfo(id, entrustId)
+    await getDelegateDataInfo(id, entrustId, delegateHtmlForm.value)
    
  
   
 }
 
 //获取委托数据
-const getDelegateDataInfo = async (id, entrustId) => {
+const getDelegateDataInfo = async (id, entrustId, formData) => {
     const { primaryKeyId } = nodeDataInfo.value
     const { error, code, msg, data } = await samplingApi.getBussDataInfoTrialEntrust({
         id: entrustId,
@@ -371,6 +371,7 @@ const getDelegateDataInfo = async (id, entrustId) => {
         projectId: projectId.value,
         contractId: delegateContractId.value,
         nodeId: primaryKeyId,
+        formData: JSON.stringify(formData),
     })
     if (!error && code === 200) {
         delegateHtmlForm.value = getObjValue(data[0])
@@ -387,8 +388,8 @@ const delegateHtmlRender = (form) => {
 
 //修改
 const editHtmlId = ref('')
-const rowLoad=ref(false)
-const rowEdit = async(row) => {
+const rowLoad = ref(false)
+const rowEdit = async (row) => {
 
     editHtmlId.value = row.id
     const { contractId } = deepClone(searchForm.value)
@@ -399,7 +400,7 @@ const rowEdit = async(row) => {
         delegateHtmlLoading.value = true
        
         await getDelegateExcelHtml()
-        await getDelegateDataInfo('',row.id)
+        await getDelegateDataInfo('', row.id)
         rowLoad.value = false
         delegateHtmlLoading.value = false
         delegateModal.value = true