浏览代码

任务的html

ZaiZai 1 年之前
父节点
当前提交
699538cf1f

+ 1 - 1
public/version.json

@@ -1,3 +1,3 @@
 {
-  "value": "20240510095036"
+  "value": "20240511090321"
 }

+ 11 - 6
src/views/tasks/components/hc-data/html-form.vue

@@ -21,6 +21,10 @@ const props = defineProps({
         type: Object,
         default: () => ({}),
     },
+    detail: {
+        type: Object,
+        default: () => ({}),
+    },
 })
 
 //监听可否编辑
@@ -30,19 +34,20 @@ watch(() => props.isEdit, (val) => {
 }, { immediate: true, deep: true })
 
 //监听数据
-watch(() => [props.table, props.info], ([table, row]) => {
-    setTaskInfo(table, row)
+watch(() => [props.table, props.info, props.detail], ([table, row, detail]) => {
+    setTaskInfo(table, row, detail)
 }, { deep: true })
 
 //渲染完成
 onMounted(() => {
-    setTaskInfo(props.table, props.info)
+    setTaskInfo(props.table, props.info, props.detail)
 })
 
 //设置任务信息
-const setTaskInfo = (table, row) => {
-    console.log('table', table)
-    console.log('row', row)
+const detailInfo = ref(props.detail)
+const setTaskInfo = (table, row, info) => {
+    console.log(info)
+    detailInfo.value = info
 }
 
 //填写的表单

+ 8 - 5
src/views/tasks/components/hc-data/task-form.vue

@@ -8,7 +8,7 @@
                 <HcMassForm :table="tableInfo" :info="taskInfo" :is-edit="isEdits" />
             </el-tab-pane>
             <el-tab-pane name="key3" label="审计咨询意见">
-                <HcHtmlForm :table="tableInfo" :info="taskInfo" :is-edit="isEdits" />
+                <HcHtmlForm :table="tableInfo" :info="taskInfo" :detail="detailInfo" :is-edit="isEdits" />
             </el-tab-pane>
         </el-tabs>
         <HcMaterialForm v-if="taskInfo.meterType === 2" :table="tableInfo" :info="taskInfo" :is-edit="isEdits" />
@@ -58,6 +58,10 @@ const props = defineProps({
         type: Object,
         default: () => ({}),
     },
+    detail: {
+        type: Object,
+        default: () => ({}),
+    },
 })
 
 //事件
@@ -68,6 +72,7 @@ const projectId = ref(useAppState.getProjectId || '')
 const contractId = ref(useAppState.getContractId || '')
 const taskInfo = ref(props.info)
 const tableInfo = ref(props.table)
+const detailInfo = ref(props.detail)
 
 //选项卡被切换
 const taskTabsKey = ref('key1')
@@ -83,13 +88,11 @@ watch(() => props.isEdit, (val) => {
 }, { immediate: true, deep: true })
 
 //监听数据
-watch(() => [
-    props.table,
-    props.info,
-], ([table, row]) => {
+watch(() => [props.table, props.info, props.detail], ([table, row, detail]) => {
     tableInfo.value = table
     taskInfo.value = row
     taskForm.value = { auditStatus: table.status ?? 0, repealDesc: table.repealDesc ?? '' }
+    detailInfo.value = detail
 }, { deep: true })
 
 //渲染完成

+ 12 - 4
src/views/tasks/components/hc-data/task-review.vue

@@ -84,14 +84,14 @@
                             </hc-table>
                         </div>
                         <div class="hc-task-body-tip hc-flex h-30px">
-                            <span class="mr-14px">上报总金额:xxxx元</span>
-                            <span>本期审核进度款:xxxx元</span>
+                            <span class="mr-14px">上报总金额:{{ reportAllMoney }}元</span>
+                            <span>本期审核进度款:{{ progressMoney }}元</span>
                         </div>
                     </hc-body>
                 </div>
                 <div :id="`hc_task_form_${uuid}`" class="hc-task-form" :class="`is-tab-${taskTabsKey}`">
                     <hc-body class="hc-task-body-card" padding="10px" scrollbar>
-                        <HcTaskForm :table="tableInfo" :info="rowInfo" :is-edit="tabsKey === 1" @finish="taskFormFinish" @tab-tap="taskTabsClick" />
+                        <HcTaskForm :table="tableInfo" :info="rowInfo" :detail="detailInfo" :is-edit="tabsKey === 1" @finish="taskFormFinish" @tab-tap="taskTabsClick" />
                     </hc-body>
                 </div>
             </div>
@@ -114,6 +114,7 @@
 <script setup>
 import { nextTick, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
+import HcHtmlForm from '~src/views/tasks/components/hc-data/html-form.vue'
 import HcTaskForm from './task-form.vue'
 import HcTaskNotes from './task-notes.vue'
 import HcRepealForm from './repeal-form.vue'
@@ -199,15 +200,22 @@ const setTaskInfo = () => {
 }
 
 //获取数据详情
+const detailInfo = ref({})
+const reportAllMoney = ref('0')
+const progressMoney = ref('0')
 const isLoading = ref(false)
 const getTableDetail = async () => {
     isLoading.value = true
     confirmLoading.value = true
     //获取数据
     const { data } = await mainApi.getDetail(rowInfo.value.id)
-    const { taskProcessInfo, taskCenterDataInfo } = getObjValue(data)
+    const infoData = getObjValue(data)
+    const { taskProcessInfo, taskCenterDataInfo } = infoData
     tableData.value = getArrValue(taskCenterDataInfo)
     flowList.value = getArrValue(taskProcessInfo)
+    reportAllMoney.value = infoData.reportAllMoney
+    progressMoney.value = infoData.progressMoney
+    detailInfo.value = infoData
     if (rowInfo.value?.fixedFlowId) {
           const list = [...flowList.value]
         let firstarr = list.slice(0, 1)