瀏覽代碼

材料调差

ZaiZai 1 年之前
父節點
當前提交
c6d85b56da
共有 2 個文件被更改,包括 75 次插入32 次删除
  1. 15 5
      src/views/tasks/components/hc-data/task-form.vue
  2. 60 27
      src/views/tasks/components/hc-data/task-review.vue

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

@@ -1,17 +1,20 @@
 <template>
     <div class="hc-task-form-body">
-        <el-tabs v-if="taskInfo.meterType === 1" type="border-card">
-            <el-tab-pane label="计量信息">
+        <el-tabs v-if="taskInfo.meterType === 1" v-model="taskTabsKey" type="border-card" @tab-change="taskTabsClick">
+            <el-tab-pane name="key1" label="计量信息">
                 <HcMiddlepayForm :table="tableInfo" :info="taskInfo" :is-edit="isEdits" />
             </el-tab-pane>
-            <el-tab-pane label="质保资料" disabled>
+            <el-tab-pane label="质保资料" name="key2" disabled>
                 <HcMassForm :table="tableInfo" :info="taskInfo" :is-edit="isEdits" />
             </el-tab-pane>
+            <el-tab-pane name="key3" label="审计咨询意见">
+                html表单
+            </el-tab-pane>
         </el-tabs>
         <HcMaterialForm v-if="taskInfo.meterType === 2" :table="tableInfo" :info="taskInfo" :is-edit="isEdits" />
         <HcStartWorkForm v-if="taskInfo.meterType === 3" :table="tableInfo" :info="taskInfo" :is-edit="isEdits" />
         <HcAlterForm v-if="taskInfo.meterType === 4" :table="tableInfo" :info="taskInfo" :is-edit="isEdits" />
-        <hc-card-item class="hc-card-footer mt-3">
+        <hc-card-item v-if="taskTabsKey !== 'key3'" class="hc-card-footer mt-3">
             <template #header>
                 <el-radio-group v-model="taskForm.auditStatus" size="large" :disabled="!isEdits || tableInfo.status === 2">
                     <el-radio :value="1">同意</el-radio>
@@ -57,7 +60,7 @@ const props = defineProps({
 })
 
 //事件
-const emit = defineEmits(['finish'])
+const emit = defineEmits(['tabTap', 'finish'])
 
 const useAppState = useAppStore()
 const projectId = ref(useAppState.getProjectId || '')
@@ -65,6 +68,13 @@ const contractId = ref(useAppState.getContractId || '')
 const taskInfo = ref(props.info)
 const tableInfo = ref(props.table)
 
+//选项卡被切换
+const taskTabsKey = ref('key1')
+const taskTabsClick = (key) => {
+    taskTabsKey.value = key
+    emit('tabTap', key)
+}
+
 //监听可否编辑
 const isEdits = ref(props.isEdit)
 watch(() => props.isEdit, (val) => {

+ 60 - 27
src/views/tasks/components/hc-data/task-review.vue

@@ -28,16 +28,13 @@
                                     <div class="timeline-item-icon">
                                         <hc-icon v-if="item.status == '2'" class="check-icon" name="check" />
                                     </div>
-                                    <div v-if="!item.isTask" class="reply-name">
-                                        {{ item.name }}
-                                    </div>
+                                    <div v-if="!item.isTask" class="reply-name">{{ item.name }}</div>
                                     <div v-if="item.isTask">
                                         <div class="reply-name">
                                             {{ item.name }}
-                                            <HcIcon v-if="item.type == 2" name="links" class="ml-2" />
-                                            <HcIcon v-if="item.type == 1" name="exchange-2" class="ml-2" />
+                                            <hc-icon v-if="item.type == 2" name="links" class="ml-2" />
+                                            <hc-icon v-if="item.type == 1" name="exchange-2" class="ml-2" />
                                             <br>
-
                                             <el-tooltip placement="right" effect="light" :visible="item.taskDetailvisible">
                                                 <template #content>
                                                     <el-timeline class="hc-time-line">
@@ -57,7 +54,6 @@
                                             </el-tooltip>
                                         </div>
                                     </div>
-
                                     <div class="reply-time">{{ item.date }}</div>
                                     <div class="reply-content" v-html="item.flowValue" />
                                 </el-timeline-item>
@@ -67,29 +63,35 @@
                 </div>
                 <div :id="`hc_task_table_${uuid}`" class="hc-task-table">
                     <hc-body class="hc-task-body-card" padding="10px">
-                        <hc-table
-                            ref="tableRef" :column="tableColumn" :datas="tableData" :is-stripe="false"
-                            is-new :index-style="{ width: 60 }" is-current-row @row-click="tableRowClick"
-                        >
-                            <template #action="{ row }">
-                                <div class="hc-task-table-action" :class="row.isComment === 1 ? 'is-cur' : ''" @click="rowRemarkClick(row)">
-                                    <i class="i-iconoir-star-solid" />
-                                </div>
-                            </template>
-                            <template #state="{ row }">
-                                <div class="hc-task-table-state">
-                                    <i v-if="row.status === 1" class="i-iconoir-check-circle-solid is-success" />
-                                    <i v-else-if="row.status === 2" class="i-iconoir-xmark-circle-solid is-danger" />
-                                    <span v-else-if="row.status === 3">审批结束</span>
-                                    <i v-else class="i-iconoir-help-circle-solid" />
-                                </div>
-                            </template>
-                        </hc-table>
+                        <div class="hc-task-body-table">
+                            <hc-table
+                                ref="tableRef" :column="tableColumn" :datas="tableData" :is-stripe="false"
+                                is-new :index-style="{ width: 60 }" is-current-row @row-click="tableRowClick"
+                            >
+                                <template #action="{ row }">
+                                    <div class="hc-task-table-action" :class="row.isComment === 1 ? 'is-cur' : ''" @click="rowRemarkClick(row)">
+                                        <i class="i-iconoir-star-solid" />
+                                    </div>
+                                </template>
+                                <template #state="{ row }">
+                                    <div class="hc-task-table-state">
+                                        <i v-if="row.status === 1" class="i-iconoir-check-circle-solid is-success" />
+                                        <i v-else-if="row.status === 2" class="i-iconoir-xmark-circle-solid is-danger" />
+                                        <span v-else-if="row.status === 3">审批结束</span>
+                                        <i v-else class="i-iconoir-help-circle-solid" />
+                                    </div>
+                                </template>
+                            </hc-table>
+                        </div>
+                        <div class="hc-task-body-tip hc-flex h-30px">
+                            <span class="mr-14px">上报总金额:xxxx元</span>
+                            <span>本期审核进度款:xxxx元</span>
+                        </div>
                     </hc-body>
                 </div>
-                <div :id="`hc_task_form_${uuid}`" class="hc-task-form">
+                <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" />
+                        <HcTaskForm :table="tableInfo" :info="rowInfo" :is-edit="tabsKey === 1" @finish="taskFormFinish" @tab-tap="taskTabsClick" />
                     </hc-body>
                 </div>
             </div>
@@ -388,6 +390,12 @@ const SMSAuthConfirm = async () => {
 const SMSAuthCancel = () => {
     SMSAuthShow.value = false
 }
+
+//选项卡被切换
+const taskTabsKey = ref('key1')
+const taskTabsClick = (key) => {
+    taskTabsKey.value = key
+}
 </script>
 
 <style lang="scss" scoped>
@@ -462,5 +470,30 @@ const SMSAuthCancel = () => {
     .el-scrollbar__bar.is-vertical {
         right: -8px;
     }
+    .hc-task-body-table {
+        position: relative;
+        height: calc(100% - 30px);
+    }
+    .hc-task-body-tip {
+        color: red;
+    }
+}
+//html表单模式
+.hc-task-body .hc-task-form.is-tab-key3 .hc-task-body-card  {
+    .el-scrollbar__view {
+        height: 100%;
+    }
+    .hc-task-form-body {
+        height: 100%;
+        .el-tabs {
+            height: 100%;
+            .el-tabs__content {
+                height: calc(100% - 39px);
+                #pane-key3 {
+                    height: 100%;
+                }
+            }
+        }
+    }
 }
 </style>