Ver código fonte

计量中间申请修改

duy 1 ano atrás
pai
commit
10cffc24c8

+ 5 - 2
src/views/debit-pay/admin/components/middlepay/addModal.vue

@@ -141,7 +141,7 @@
     />
 
     <!-- 关联质检资料 -->
-    <qualityRleation :quality-moadal="qualityMoadal" :cid="cid" :period-id="period_id" @close="closeQual" @finish="finishModal" />
+    <qualityRleation :quality-moadal="qualityMoadal" :cid="cid" :period-id="period_id" :select-id="selectId" @close="closeQual" @finish="finishModal" />
 </template>
 
 <script setup>
@@ -150,7 +150,7 @@ import { getStoreValue } from '~src/utils/storage'
 import { isNumberReg } from '~uti/tools'
 import HcBillBaseModal from './addBillBaseModal.vue'
 import qualityRleation from './qualityRleation.vue'
-import { arrToId, deepClone, getArrValue, getObjValue, getRandom, isNullES } from 'js-fast-way'
+import { arrToId, arrToKey, deepClone, getArrValue, getObjValue, getRandom, isNullES } from 'js-fast-way'
 import BigNumber from 'bignumber.js'
 import { getHeader } from 'hc-vue3-ui'
 
@@ -269,6 +269,7 @@ const baseFormRules = {
 }
 
 //获取数据详情
+const selectId = ref('')
 const getDataDetail = async () => {
     if (!dataId.value) return
     const { data } = await mainApi.getDetail({ id: dataId.value })
@@ -283,6 +284,7 @@ const getDataDetail = async () => {
     nodeId.value = res.contractUnitId ?? ''
     baseForm.value = res
     addTableData.value = getArrValue(res.formList)
+    selectId.value = arrToKey(res.fileList, 'selectId', ',')
 }
 
 //数据格式
@@ -648,6 +650,7 @@ const finishModal = (rows)=>{
             filePdfUrl:ele.evisaPdfUrl ? ele.evisaPdfUrl : ele.pdfUrl,	
             fileType:1,
             fileUrl:ele.evisaPdfUrl ? ele.evisaPdfUrl : ele.pdfUrl,	
+            selectId:ele.selectId,
         })
 
     })

+ 18 - 3
src/views/debit-pay/admin/components/middlepay/qualityRleation.vue

@@ -9,7 +9,7 @@
                     </hc-body>
                 </div>
                 <div :id="`hc_table_card_${uuid}`" class="relative flex-1">
-                    <HcTable :column="tableColumn" :datas="tableData" is-new is-check is-reserve-selection :loading="tableLoading" @selection-change="tableSelection">
+                    <HcTable ref="qualTable" :column="tableColumn" :datas="tableData" is-new is-check is-reserve-selection :loading="tableLoading" @selection-change="tableSelection">
                         <template #appStatusName="{ row }">
                             <el-tag
                                 v-if="row.appStatusName"
@@ -48,6 +48,10 @@ const props = defineProps({
         type:String,
         default:'',
     },
+    selectId:{
+        type:String,
+        default:'',       
+    },
     
 })
 const emit = defineEmits([ 'close', 'finish'])
@@ -59,14 +63,17 @@ const classifyType = ref(contractType === 2 ? '2' : '1')
 const qualityMoadal = ref(props.qualityMoadal)
 const cid = ref(props.cid)
 const periodId = ref(props.periodId)
+const selectId = ref(props.selectId)
 watch(() => [
     props.qualityMoadal,
     props.cid,
     props.qualityMoadal,
-], ([qual, Cid, Pid]) => {
+    props.selectId,
+], ([qual, Cid, Pid, sle]) => {
     qualityMoadal.value = qual
     cid.value = Cid
     periodId.value = Pid
+    selectId.value = sle
 })
 const uuid = getRandom(4)
 
@@ -114,6 +121,7 @@ const treeLoadNode = async ({ node, item, level }, resolve) => {
         parentId,
         classifyType: classifyType.value,
         tableOwner:classifyType.value,
+        
     })
     treeLoading.value = false
     resolve(getArrValue(data))
@@ -141,7 +149,7 @@ const pageChange = ({ current, size }) => {
     searchForm.value.size = size
     getTableData()
 }
-
+const qualTable = ref(null)
 const tableData = ref([])
 const tableLoading = ref(false)
 const getTableData = async () => {
@@ -153,6 +161,8 @@ const getTableData = async () => {
         projectId:projectId.value,
         nodeId:curTree.value.pKeyId,
         contractIdRelation:curTree.value?.contractIdRelation || '',
+        classifyType: classifyType.value,
+        selectIds:selectId.value,
   
     })
     tableData.value = getArrValue(data['records'])
@@ -163,6 +173,11 @@ const curTree = ref(null)
 const nodeElTreeClick = ({ node, data, keys })=>{
     curTree.value = data
     getTableData()
+    const selectArr = selectId.value.split(',')
+    nextTick(() => {
+            qualTable.value?.toggleRowSelection(selectArr, true)
+
+      })
 }
 //多选
 const tableKeys = ref([])