ZaiZai 1 سال پیش
والد
کامیت
0f3aced5eb
2فایلهای تغییر یافته به همراه39 افزوده شده و 8 حذف شده
  1. 0 2
      src/views/tasks/components/hc-data/middlepay-form.vue
  2. 39 6
      src/views/tasks/components/hc-data/task-review.vue

+ 0 - 2
src/views/tasks/components/hc-data/middlepay-form.vue

@@ -171,8 +171,6 @@ const taskInfo = ref({})
 const setTaskInfo = async (info) => {
     taskInfo.value = info
     getAllPeriod(info.contractId).then()
-    getMaterialPeriod(info.contractId).then()
-    getStartWorkPeriod(info.contractId).then()
 }
 
 //获取合同计量期列表

+ 39 - 6
src/views/tasks/components/hc-data/task-review.vue

@@ -1,5 +1,5 @@
 <template>
-    <hc-new-dialog v-model="isShow" :footer="false" is-table widths="96%" title="任务审核" @close="cancelClick">
+    <hc-new-dialog v-model="isShow" is-table widths="96%" title="任务审核" @close="cancelClick">
         <template #header="{ titleId, titleClass }">
             <div class="hc-card-header flex items-center">
                 <div :id="titleId" :class="titleClass">任务审核 【已开启电签】</div>
@@ -24,7 +24,7 @@
                         </el-timeline>
                     </hc-body>
                 </div>
-                <div class="hc-task-table">
+                <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"
@@ -47,19 +47,25 @@
                         </hc-table>
                     </hc-body>
                 </div>
-                <div class="hc-task-form">
+                <div :id="`hc_task_form_${uuid}`" class="hc-task-form">
                     <hc-body class="hc-task-body-card" padding="10px" scrollbar>
                         <HcTaskForm v-model="tableInfo" :is-edit="tabsKey === 1" :type="rowInfo.type" />
                     </hc-body>
                 </div>
             </div>
         </div>
+        <template #footer>
+            <div class="hc-task-dialog-footer">
+                <el-button :loading="rejectionLoading" @click="rejectionClick">驳回审批</el-button>
+                <el-button type="primary" :loading="confirmLoading" @click="confirmClick">同意审批</el-button>
+            </div>
+        </template>
     </hc-new-dialog>
 </template>
 
 <script setup>
 import { nextTick, ref, watch } from 'vue'
-import { getArrValue } from 'js-fast-way'
+import { getArrValue, getRandom } from 'js-fast-way'
 import HcTaskForm from './task-form.vue'
 
 const props = defineProps({
@@ -75,6 +81,7 @@ const props = defineProps({
 
 //事件
 const emit = defineEmits(['finish', 'close'])
+const uuid = getRandom(4)
 
 //双向绑定
 // eslint-disable-next-line no-undef
@@ -101,9 +108,24 @@ watch(() => [
 
 //监听显示
 watch(isShow, (val) => {
-    if (val) setTaskInfo()
+    if (val) {
+        setTaskInfo()
+        setSplitRef()
+    }
 })
 
+//初始化设置拖动分割线
+const setSplitRef = () => {
+    //配置参考: https://split.js.org/#/?direction=vertical&snapOffset=0
+    nextTick(() => {
+        window.$split(['#hc_task_table_' + uuid, '#hc_task_form_' + uuid], {
+            sizes: [50, 50],
+            snapOffset: 0,
+            minSize: [50, 500],
+        })
+    })
+}
+
 //设置任务信息
 const setTaskInfo = async () => {
     const { taskName, type } = rowInfo.value
@@ -213,6 +235,12 @@ const confirmClick = () => {
     //emit('finish')
 }
 
+//驳回审批
+const rejectionLoading = ref(false)
+const rejectionClick = () => {
+
+}
+
 //取消审批
 const cancelClick = () => {
     isShow.value = false
@@ -249,7 +277,6 @@ const cancelClick = () => {
     }
     .hc-task-table {
         border-left: 1px solid #e5e5e5;
-        border-right: 1px solid #e5e5e5;
     }
 }
 
@@ -285,6 +312,12 @@ const cancelClick = () => {
         color: #1A1a1a;
     }
 }
+
+//弹窗底部
+.hc-task-dialog-footer {
+    position: relative;
+    text-align: center;
+}
 </style>
 
 <style lang="scss">