Sfoglia il codice sorgente

抽检记录修改

duy 1 anno fa
parent
commit
1dc8d5f097

+ 18 - 4
src/views/transfer/components/carry-spot-checks.vue

@@ -198,6 +198,10 @@ const props = defineProps({
         type: Object,
         default: () => ({}),
     },
+    isOpinion:{
+        type: Boolean,
+        default: false,
+    },
 })
 
 //事件
@@ -208,7 +212,7 @@ const useAppState = useAppStore()
 //变量
 const projectId = ref(props.projectId)
 const contractId = ref(props.contractId)
-const nodeData = ref(props.treeData)
+const isOpinion = ref(props.isOpinion)
 const isBubble = ref(useAppState.getBubble)
 const isDrawer = ref(props.show)
 const fileId = ref(props.fileId)//案卷ID
@@ -222,13 +226,15 @@ watch(() => [
     props.fileId,
     props.fileInfo,
     props.projectId,
-], ([show, bubble, FileId, FileInfo, ProjectId]) => {
+    props.isOpinion,
+], ([show, bubble, FileId, FileInfo, ProjectId, isO]) => {
   
     isDrawer.value = show
     isBubble.value = bubble
     fileId.value = FileId
     fileInfo.value = FileInfo
     projectId.value = ProjectId
+    isOpinion.value = isO
 
     if (fileId.value && isDrawer.value) {
         getArchiveFileListData()
@@ -245,6 +251,11 @@ watch(() => [
         })
      
     }
+    if (isO) {
+        checkId.value = fileInfo.value.fileId
+    } else {
+        checkId.value = ''
+    }
 })
 
 onMounted(()=>{
@@ -281,9 +292,12 @@ const getArchiveFileListData = async ()=>{
     })
     //处理返回数据
     if (!error && code === 200) {
-         fileInfo.value = data
+        //  fileInfo.value = data
         fileInfo.value.pageNumber = data.pageNumber
-       
+        fileInfo.value.storageTimeValue = data.storageTimeValue
+        fileInfo.value.secretLevelValue = data.secretLevelValue
+        fileInfo.value.endDate = data.endDate
+        fileInfo.value.startDate = data.startDate
         cscTableData1.value = getArrValue(data['approvalFileList'])
         if (cscTableData1.value.length > 0) {
             checkmetaFileId.value = cscTableData1.value[0].id

+ 7 - 1
src/views/transfer/components/examination/table-opinion.vue

@@ -1,7 +1,7 @@
 <template>
     <HcTable ui="no-border" is-new :index-style="{ width: 60 }" :column="tableColumn" :datas="tableData" :loading="tableLoading">
         <template #archiveName="{ row }">
-            <span class="text-blue text-hover">{{ row.archiveName }}</span>
+            <span class="text-blue text-hover" @click="tableRowClick(row)">{{ row.archiveName }}</span>
         </template>
         <template #opinion="{ row }">
             <el-input v-if="row.isEdit" v-model="row.opinion" placeholder="请输入抽检意见" />
@@ -41,6 +41,8 @@ const props = defineProps({
     },
 })
 
+//事件
+const emit = defineEmits(['changeFile'])
 //变量
 const projectId = ref(props.projectId)
 const searchLogForm = ref(props.searchLogForm)
@@ -90,6 +92,10 @@ const editClick = async (row) => {
     row.isEdit = true
 
 }
+//抽检记录行被
+const tableRowClick = (row ) => {
+  emit('changeFile', row)
+}
 //保存
 const saveClick = async (row) => {
     row.isEdit = false

+ 13 - 5
src/views/transfer/preliminary-examination.vue

@@ -15,12 +15,12 @@
             </div>
             <div v-if="tabKey === 'tab1'" v-loading="treeLoading" class="hc-tree-box" element-loading-text="加载中...">
                 <el-scrollbar>
-                    <HcTree :contract-id="contractId" :project-id="projectId" :is-own="false" :is-show-number="false" :is-show-menu="false" @nodeTap="projectTreeClick" @nodeLoading="treeNodeLoading" />
+                    <HcTree :contract-id="contractId" :project-id="projectId" :is-own="false" :is-show-number="false" :is-show-menu="false" @node-tap="projectTreeClick" @node-loading="treeNodeLoading" />
                 </el-scrollbar>
             </div>
             <div v-else v-loading="treeLoading" element-loading-text="加载中..." class="hc-tree-box">
                 <el-scrollbar>
-                    <HcTree :contract-id="contractId" :project-id="projectId" :is-own="true" :is-show-number="false" :is-show-menu="false" @nodeTap="projectTreeClick" @nodeLoading="treeNodeLoading" />
+                    <HcTree :contract-id="contractId" :project-id="projectId" :is-own="true" :is-show-number="false" :is-show-menu="false" @node-tap="projectTreeClick" @node-loading="treeNodeLoading" />
                 </el-scrollbar>
             </div>
             <!-- 左右拖动 -->
@@ -83,13 +83,13 @@
 
         <!-- 展开抽查 -->
         <CarrySpotChecks
-            :show="isCarrySpotChecksDrawer" close-text="关闭案卷" check-text="保存抽检意见" :file-id="fileId" :file-info="fileInfo" :project-id="projectId" @check="onCarrySpotChecksClose"
+            :show="isCarrySpotChecksDrawer" close-text="关闭案卷" check-text="保存抽检意见" :file-id="fileId" :file-info="fileInfo" :project-id="projectId" :is-opinion="isOpinion" @check="onCarrySpotChecksClose"
             @close="onCarrySpotChecksClose"
         />
 
         <!-- 抽检记录 -->
         <hc-new-dialog v-model="isLogModal" is-slot-footer is-table widths="70%" title="抽检记录" @close="isLogModalClose">
-            <TableOpinion :contract-id="contractId" :project-id="projectId" :search-log-form="searchLogForm" />
+            <TableOpinion :contract-id="contractId" :project-id="projectId" :search-log-form="searchLogForm" @change-file="changeFile" />
             <template #footer>
                 <HcPages :pages="searchLogForm" @change="pageLogChange" />
             </template>
@@ -224,15 +224,23 @@ const getUserInspectStats = async ()=>{
 }
 
 const isCarrySpotChecksDrawer = ref(false)
+const isOpinion = ref(false)
 const fileId = ref('')//案卷ID
 const fileInfo = ref({})//案卷信息
 const tableClick = (row) => {
+    console.log(row, 'row11111')
     isCarrySpotChecksDrawer.value = true
     fileId.value = row.id
     fileInfo.value = row
+    isOpinion.value = false
     console.log( fileInfo.value, '  fileInfo.value')
 }
-
+const changeFile = (row)=>{
+    fileId.value = row.archiveId
+    isOpinion.value = true
+    fileInfo.value = row
+    isCarrySpotChecksDrawer.value = true
+}
 //关闭抽查
 const onCarrySpotChecksClose = () => {
     isCarrySpotChecksDrawer.value = false