ZaiZai 1 year ago
parent
commit
2d4b8a4f07

+ 111 - 0
src/components/task-modal/task-modal.vue

@@ -0,0 +1,111 @@
+<template>
+    <hc-new-dialog is-table widths="1200px" :show="isShow" title="审批流程" :padding="false" :footer="false" @close="addModalClose">
+        <div class="hc-flex h-full">
+            <div class="relative h-full w-240px">
+                <hc-body class="hc-task-body-card-dialog" padding="10px" scrollbar>
+                    <el-timeline class="hc-time-line">
+                        <template v-for="(item, index) in flowListTask" :key="index">
+                            <el-timeline-item :class="Number(item.status) === 2 ? 'success' : 'primary'" size="large">
+                                <div class="timeline-item-icon">
+                                    <hc-icon v-if="Number(item.status) === 2" class="check-icon" name="check" />
+                                </div>
+                                <template v-if="item.name">
+                                    <div class="reply-name">{{ item.name }}</div>
+                                    <div class="reply-time">{{ item.date }}</div>
+                                    <div class="reply-content" v-html="item.flowValue" />
+                                </template>
+                                <template v-if="item.taskBranchName">
+                                    <div class="reply-name">
+                                        <span>{{ item.taskBranchName }}</span>
+                                        <hc-icon v-if="Number(item.taskBranchType) === 2" name="links" class="ml-2" />
+                                        <hc-icon v-if="Number(item.taskBranchType) === 1" name="exchange-2" class="ml-2" />
+                                    </div>
+                                    <div v-for="(item1, index1) in item.userList" :key="index1" class="reply-user-list">
+                                        <div class="timeline-item-icon">
+                                            <hc-icon v-if="Number(item1.status) === 2" class="check-icon" name="check" />
+                                        </div>
+                                        <div class="reply-name">{{ item1.name }}</div>
+                                        <div class="reply-time">{{ item1.date }}</div>
+                                        <div class="reply-content" v-html="item1.flowValue" />
+                                    </div>
+                                </template>
+                            </el-timeline-item>
+                        </template>
+                    </el-timeline>
+                </hc-body>
+            </div>
+            <div class="relative h-full flex-1">
+                <hc-body>
+                    <hc-pdf :src="pdfUrl" />
+                </hc-body>
+            </div>
+        </div>
+    </hc-new-dialog>
+</template>
+
+<script setup>
+import { ref, watch } from 'vue'
+import { getArrValue, getObjValue } from 'js-fast-way'
+import mainApi from '~api/tasks/hc-data'
+
+const props = defineProps({
+    data: {
+        type: Object,
+        default: () => ({}),
+    },
+})
+
+//事件
+const emit = defineEmits(['close'])
+
+//双向绑定
+const isShow = defineModel('modelValue', {
+    default: false,
+})
+
+//监听
+const dataInfo = ref(props.data)
+watch(() => props.data, (data) => {
+    dataInfo.value = getObjValue(data)
+}, { immediate: true, deep:true })
+
+//监听
+watch(isShow, (val) => {
+    if (val) getDataApi()
+})
+
+const pdfUrl = ref('')
+const flowListTask = ref([])
+const getDataApi = async () => {
+    const { taskId } = getObjValue(dataInfo.value)
+    const { data } = await mainApi.getDetail(taskId)
+    const tasks = getArrValue(data?.taskProcessInfo)
+    tasks.forEach(item => {
+        item.status = item.taskBranchStatus || item.status
+    })
+    flowListTask.value = tasks
+    pdfUrl.value = data?.pdfUrl
+}
+
+//关闭弹窗
+const addModalClose = () => {
+    isShow.value = false
+    emit('close')
+}
+</script>
+
+<style lang="scss">
+.hc-task-body-card-dialog {
+    background: #f7f7f7;
+    .el-scrollbar__bar.is-vertical {
+        right: -8px;
+    }
+    .hc-task-body-tip {
+        color: red;
+    }
+    .reply-user-list {
+        position: relative;
+        padding: 10px 10px 10px 20px;
+    }
+}
+</style>

+ 7 - 4
src/views/debit-pay/admin/certificate.vue

@@ -37,13 +37,13 @@
 </template>
 
 <script setup>
-import { deepClone, getArrValue } from 'js-fast-way'
+import { deepClone, getArrValue, isNullES } from 'js-fast-way'
 import { onActivated, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
 import { delMessage } from '~uti/tools'
 import HcAddModal from './components/certificate/addModal.vue'
 import HcEditModal from './components/certificate/editModal.vue'
-import HcTaskModal from './components/certificate/task-modal.vue'
+import HcTaskModal from '~src/components/task-modal/task-modal.vue'
 import mainApi from '~api/debit-pay/admin/certificate'
 import { toPdfPage } from '~uti/btn-auth'
 import { useRoute } from 'vue-router'
@@ -89,7 +89,7 @@ const tableColumn = ref([
     { key: 'printDate', name: '打印日期' },
     { key: 'calculateDate', name: '重新计算时间' },
     { key: 'payMoney', name: '支付金额' },
-    { key: 'action', name: '操作', width: 330 },
+    { key: 'action', name: '操作', width: 460, align: 'center' },
 ])
 const tableData = ref([])
 const getTableData = async () => {
@@ -183,7 +183,6 @@ const rowViewPdf = (row)=>{
     } else {
         window.$message.warning('暂无报表数据')
     }
-
 }
 const rowViewRawPdf = (row)=>{
     toPdfPage(row?.rawUrl)
@@ -193,6 +192,10 @@ const rowViewRawPdf = (row)=>{
 const isTaskModal = ref(false)
 const taskData = ref({})
 const eVisaRowClick = (row) => {
+    if (isNullES(row.taskId)) {
+        window.$message.warning('暂无电签数据')
+        return
+    }
     taskData.value = deepClone(row)
     isTaskModal.value = true
 }

+ 0 - 169
src/views/debit-pay/admin/components/certificate/task-modal.vue

@@ -1,169 +0,0 @@
-<template>
-    <hc-new-dialog is-table widths="400px" :show="isShow" title="审批流程" :padding="false" :footer="false" @close="addModalClose">
-        <div class="hc-task-time">
-            <hc-body class="hc-task-body-card" padding="10px" scrollbar>
-                <el-timeline v-if="rowInfo.fixedFlowId == null" class="hc-time-line">
-                    <template v-for="(item, index) in flowList" :key="index">
-                        <el-timeline-item :class="item.status === '2' ? 'success' : 'primary'" size="large">
-                            <div class="timeline-item-icon">
-                                <hc-icon v-if="item.status === '2'" class="check-icon" name="check" />
-                            </div>
-                            <div class="reply-name">{{ item.name }}</div>
-                            <div class="reply-time">{{ item.date }}</div>
-                            <div class="reply-content" v-html="item.flowValue" />
-                        </el-timeline-item>
-                    </template>
-                </el-timeline>
-                <el-timeline v-else class="hc-time-line">
-                    <template v-for="(item, index) in flowListTask" :key="index">
-                        <el-timeline-item :class="item.status == '2' ? 'success' : 'primary'" size="large">
-                            <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">
-                                <div class="reply-name">
-                                    {{ item.name }}
-                                    <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">
-                                                <template v-for="(item1, index1) in item.userList" :key="index1">
-                                                    <el-timeline-item :class="item1.status === '2' ? 'success' : 'primary'" size="large">
-                                                        <div class="timeline-item-icon">
-                                                            <hc-icon v-if="item1.status === '2'" class="check-icon" name="check" />
-                                                        </div>
-                                                        <div class="reply-name">{{ item1.name }}</div>
-                                                        <div class="reply-time">{{ item1.date }}</div>
-                                                        <div class="reply-content" v-html="item1.flowValue" />
-                                                    </el-timeline-item>
-                                                </template>
-                                            </el-timeline>
-                                        </template>
-                                        <el-link @click="getTaskDetail" @mouseenter="item.taskDetailvisible = true" @mouseleave="item.taskDetailvisible = false">点击查看详情</el-link>
-                                    </el-tooltip>
-                                </div>
-                            </div>
-                            <div class="reply-time">{{ item.date }}</div>
-                            <div class="reply-content" v-html="item.flowValue" />
-                        </el-timeline-item>
-                    </template>
-                </el-timeline>
-            </hc-body>
-        </div>
-    </hc-new-dialog>
-</template>
-
-<script setup>
-import { ref, watch } from 'vue'
-
-const props = defineProps({
-    data: {
-        type: Object,
-        default: () => ({}),
-    },
-})
-
-//事件
-const emit = defineEmits(['close'])
-
-//双向绑定
-// eslint-disable-next-line no-undef
-const isShow = defineModel('modelValue', {
-    default: false,
-})
-
-//监听
-const dataInfo = ref(props.data)
-watch(() => props.data, (data) => {
-    dataInfo.value = data
-}, { immediate: true, deep:true })
-
-//监听
-watch(isShow, (val) => {
-    if (val) getDataApi()
-})
-
-const rowInfo = ref({})
-const flowList = ref([])
-const flowListTask = ref([])
-const getDataApi = async () => {
-
-}
-
-//查看详情
-const getTaskDetail = () => {
-
-}
-
-//关闭弹窗
-const addModalClose = () => {
-    isShow.value = false
-    emit('close')
-}
-</script>
-
-<style scoped lang="scss">
-.hc-task-time {
-    position: relative;
-    height: 100%;
-}
-</style>
-
-<style lang="scss">
-.hc-task-body-card {
-    background: #f7f7f7;
-    .el-scrollbar__bar.is-vertical {
-        right: -8px;
-    }
-    .hc-task-body-table {
-        position: relative;
-        height: calc(100% - 30px);
-        .hc-task-body-table-form {
-            position: relative;
-            height: 100%;
-            overflow: auto;
-            .title {
-                position: relative;
-                display: flex;
-                align-items: center;
-                justify-content: center;
-                font-size: 18px;
-                border: 1px solid #e5e6ea;
-                height: 50px;
-            }
-            .name {
-                position: relative;
-                display: flex;
-                align-items: center;
-                font-size: 13px;
-                border: 1px solid #e5e6ea;
-                padding: 10px;
-                border-top: 0;
-            }
-            .input {
-                position: relative;
-                border: 1px solid #e5e6ea;
-                padding: 6px;
-                border-top: 0;
-            }
-            .input-box {
-                position: relative;
-                display: flex;
-                .box {
-                    position: relative;
-                    width: 50%;
-                }
-                .no-b {
-                    border-left: 0;
-                }
-            }
-        }
-    }
-    .hc-task-body-tip {
-        color: red;
-    }
-}
-</style>

+ 0 - 101
src/views/debit-pay/admin/components/middlepay/task-modal.vue

@@ -1,101 +0,0 @@
-<template>
-    <hc-new-dialog is-table widths="400px" :show="isShow" title="审批流程" :padding="false" :footer="false" @close="addModalClose">
-        <hc-body class="hc-task-body-card-dialog" padding="10px" scrollbar>
-            <el-timeline class="hc-time-line">
-                <template v-for="(item, index) in flowListTask" :key="index">
-                    <el-timeline-item :class="Number(item.status) === 2 ? 'success' : 'primary'" size="large">
-                        <div class="timeline-item-icon">
-                            <hc-icon v-if="Number(item.status) === 2" class="check-icon" name="check" />
-                        </div>
-                        <template v-if="item.name">
-                            <div class="reply-name">{{ item.name }}</div>
-                            <div class="reply-time">{{ item.date }}</div>
-                            <div class="reply-content" v-html="item.flowValue" />
-                        </template>
-                        <template v-if="item.taskBranchName">
-                            <div class="reply-name">
-                                <span>{{ item.taskBranchName }}</span>
-                                <hc-icon v-if="Number(item.taskBranchType) === 2" name="links" class="ml-2" />
-                                <hc-icon v-if="Number(item.taskBranchType) === 1" name="exchange-2" class="ml-2" />
-                            </div>
-                            <div v-for="(item1, index1) in item.userList" :key="index1" class="reply-user-list">
-                                <div class="timeline-item-icon">
-                                    <hc-icon v-if="Number(item1.status) === 2" class="check-icon" name="check" />
-                                </div>
-                                <div class="reply-name">{{ item1.name }}</div>
-                                <div class="reply-time">{{ item1.date }}</div>
-                                <div class="reply-content" v-html="item1.flowValue" />
-                            </div>
-                        </template>
-                    </el-timeline-item>
-                </template>
-            </el-timeline>
-        </hc-body>
-    </hc-new-dialog>
-</template>
-
-<script setup>
-import { ref, watch } from 'vue'
-import { getArrValue, getObjValue } from 'js-fast-way'
-import mainApi from '~api/tasks/hc-data'
-
-const props = defineProps({
-    data: {
-        type: Object,
-        default: () => ({}),
-    },
-})
-
-//事件
-const emit = defineEmits(['close'])
-
-//双向绑定
-const isShow = defineModel('modelValue', {
-    default: false,
-})
-
-//监听
-const dataInfo = ref(props.data)
-watch(() => props.data, (data) => {
-    dataInfo.value = getObjValue(data)
-}, { immediate: true, deep:true })
-
-//监听
-watch(isShow, (val) => {
-    if (val) getDataApi()
-})
-
-const flowListTask = ref([])
-const getDataApi = async () => {
-    //const { taskId } = getObjValue(dataInfo.value)
-    const { data } = await mainApi.getDetail('1808351804224700416')
-    const tasks = getArrValue(data.taskProcessInfo)
-    tasks.forEach(item => {
-        item.status = item.taskBranchStatus || item.status
-    })
-    console.log(tasks)
-    flowListTask.value = tasks
-}
-
-//关闭弹窗
-const addModalClose = () => {
-    isShow.value = false
-    emit('close')
-}
-</script>
-
-<style lang="scss">
-.hc-task-body-card-dialog {
-    background: #f7f7f7;
-    .el-scrollbar__bar.is-vertical {
-        right: -8px;
-    }
-    .hc-task-body-tip {
-        color: red;
-    }
-    .reply-user-list {
-        position: relative;
-        padding: 10px;
-    }
-}
-</style>

+ 6 - 2
src/views/debit-pay/admin/middlepay.vue

@@ -74,13 +74,13 @@
 import { nextTick, onActivated, onMounted, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
 import { useRoute, useRouter } from 'vue-router'
-import { deepClone, getArrValue, getObjVal, getObjValue, getRandom } from 'js-fast-way'
+import { deepClone, getArrValue, getObjVal, getObjValue, getRandom, isNullES } from 'js-fast-way'
 import { getStoreValue, setStoreValue } from '~src/utils/storage'
 import { delMessage } from '~uti/tools'
 
 import HcAddModal from './components/middlepay/addModal.vue'
 import HcDetailsModal from './components/middlepay/detailsModal.vue'
-import HcTaskModal from './components/middlepay/task-modal.vue'
+import HcTaskModal from '~src/components/task-modal/task-modal.vue'
 
 import unitApi from '~api/project/debit/contract/unit'
 import mainApi from '~api/debit-pay/admin/middlepay'
@@ -386,6 +386,10 @@ const autoClick = async ()=>{
 const isTaskModal = ref(false)
 const taskData = ref({})
 const rowTableClick = (row) => {
+    if (isNullES(row.taskId)) {
+        window.$message.warning('暂无审批数据')
+        return
+    }
     taskData.value = deepClone(row)
     isTaskModal.value = true
 }

+ 24 - 3
src/views/debit-pay/material/book.vue

@@ -8,7 +8,9 @@
         </template>
         <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" is-new :index-style="{ width: 60 }">
             <template #action="{ row }">
+                <el-link type="primary" :disabled="!row.rawUrl" @click="rowViewRawPdf(row)">查看电签报表</el-link>
                 <el-link type="primary" @click="viewPdf(row)">查看报表</el-link>
+                <el-link type="primary" :disabled="row.approveStatus === 0" @click="eVisaRowClick(row)">查看电签流程</el-link>
                 <el-link type="success" @click="editRow(row)">修改</el-link>
                 <el-link type="danger" @click="delCilck(row)">删除</el-link>
                 <el-link v-loading="row?.recalculateLoading" @click="recalculate(row)">重新计算</el-link>
@@ -42,19 +44,22 @@
                 </el-form-item>
             </el-form>
         </hc-new-dialog>
+        <!-- 任务流程 -->
+        <HcTaskModal v-model="isTaskModal" :data="taskData" />
     </hc-new-card>
 </template>
 
 <script setup>
-import { onActivated, onMounted, ref } from 'vue'
+import { onActivated, ref } from 'vue'
 import bookApi from '~api/debit-pay/material/book.js'
 import periodApi from '~api/debit-pay/material/periods.js'
 import { useAppStore } from '~src/store'
-import { formValidate, getArrValue, getObjValue } from 'js-fast-way'
+import { deepClone, formValidate, getArrValue, isNullES } from 'js-fast-way'
 import { toPdfPage } from '~uti/btn-auth'
 const useAppState = useAppStore()
 const contractId = ref(useAppState.getContractId)
 const projectId = ref(useAppState.getProjectId)
+import HcTaskModal from '~src/components/task-modal/task-modal.vue'
 import { HcDelMsg } from 'hc-vue3-ui'
 defineOptions({
     name: 'DebitPayMaterialBook',
@@ -125,7 +130,7 @@ const tableColumn = ref([
     { key: 'statementName', name: '报表名称' },
     { key: 'printDate', name: '打印日期' },
     { key: 'calculateDate', name: '重新计算时间' },
-    { key: 'action', name: '操作', width: 230 },
+    { key: 'action', name: '操作', width: 400, align: 'center' },
 ])
 const tableData = ref([])
 const getTableData = async () => {
@@ -246,6 +251,22 @@ const formModalClose = () => {
     formModalShow.value = false
     getTableData()
 }
+
+const rowViewRawPdf = (row)=>{
+    toPdfPage(row?.rawUrl)
+}
+
+//查看电签流程
+const isTaskModal = ref(false)
+const taskData = ref({})
+const eVisaRowClick = (row) => {
+    if (isNullES(row.taskId)) {
+        window.$message.warning('暂无电签数据')
+        return
+    }
+    taskData.value = deepClone(row)
+    isTaskModal.value = true
+}
 </script>
 
 <style scoped lang="scss">

+ 0 - 169
src/views/debit-pay/material/components/order/task-modal.vue

@@ -1,169 +0,0 @@
-<template>
-    <hc-new-dialog is-table widths="400px" :show="isShow" title="审批流程" :padding="false" :footer="false" @close="addModalClose">
-        <div class="hc-task-time">
-            <hc-body class="hc-task-body-card" padding="10px" scrollbar>
-                <el-timeline v-if="rowInfo.fixedFlowId == null" class="hc-time-line">
-                    <template v-for="(item, index) in flowList" :key="index">
-                        <el-timeline-item :class="item.status === '2' ? 'success' : 'primary'" size="large">
-                            <div class="timeline-item-icon">
-                                <hc-icon v-if="item.status === '2'" class="check-icon" name="check" />
-                            </div>
-                            <div class="reply-name">{{ item.name }}</div>
-                            <div class="reply-time">{{ item.date }}</div>
-                            <div class="reply-content" v-html="item.flowValue" />
-                        </el-timeline-item>
-                    </template>
-                </el-timeline>
-                <el-timeline v-else class="hc-time-line">
-                    <template v-for="(item, index) in flowListTask" :key="index">
-                        <el-timeline-item :class="item.status == '2' ? 'success' : 'primary'" size="large">
-                            <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">
-                                <div class="reply-name">
-                                    {{ item.name }}
-                                    <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">
-                                                <template v-for="(item1, index1) in item.userList" :key="index1">
-                                                    <el-timeline-item :class="item1.status === '2' ? 'success' : 'primary'" size="large">
-                                                        <div class="timeline-item-icon">
-                                                            <hc-icon v-if="item1.status === '2'" class="check-icon" name="check" />
-                                                        </div>
-                                                        <div class="reply-name">{{ item1.name }}</div>
-                                                        <div class="reply-time">{{ item1.date }}</div>
-                                                        <div class="reply-content" v-html="item1.flowValue" />
-                                                    </el-timeline-item>
-                                                </template>
-                                            </el-timeline>
-                                        </template>
-                                        <el-link @click="getTaskDetail" @mouseenter="item.taskDetailvisible = true" @mouseleave="item.taskDetailvisible = false">点击查看详情</el-link>
-                                    </el-tooltip>
-                                </div>
-                            </div>
-                            <div class="reply-time">{{ item.date }}</div>
-                            <div class="reply-content" v-html="item.flowValue" />
-                        </el-timeline-item>
-                    </template>
-                </el-timeline>
-            </hc-body>
-        </div>
-    </hc-new-dialog>
-</template>
-
-<script setup>
-import { ref, watch } from 'vue'
-
-const props = defineProps({
-    data: {
-        type: Object,
-        default: () => ({}),
-    },
-})
-
-//事件
-const emit = defineEmits(['close'])
-
-//双向绑定
-// eslint-disable-next-line no-undef
-const isShow = defineModel('modelValue', {
-    default: false,
-})
-
-//监听
-const dataInfo = ref(props.data)
-watch(() => props.data, (data) => {
-    dataInfo.value = data
-}, { immediate: true, deep:true })
-
-//监听
-watch(isShow, (val) => {
-    if (val) getDataApi()
-})
-
-const rowInfo = ref({})
-const flowList = ref([])
-const flowListTask = ref([])
-const getDataApi = async () => {
-
-}
-
-//查看详情
-const getTaskDetail = () => {
-
-}
-
-//关闭弹窗
-const addModalClose = () => {
-    isShow.value = false
-    emit('close')
-}
-</script>
-
-<style scoped lang="scss">
-.hc-task-time {
-    position: relative;
-    height: 100%;
-}
-</style>
-
-<style lang="scss">
-.hc-task-body-card {
-    background: #f7f7f7;
-    .el-scrollbar__bar.is-vertical {
-        right: -8px;
-    }
-    .hc-task-body-table {
-        position: relative;
-        height: calc(100% - 30px);
-        .hc-task-body-table-form {
-            position: relative;
-            height: 100%;
-            overflow: auto;
-            .title {
-                position: relative;
-                display: flex;
-                align-items: center;
-                justify-content: center;
-                font-size: 18px;
-                border: 1px solid #e5e6ea;
-                height: 50px;
-            }
-            .name {
-                position: relative;
-                display: flex;
-                align-items: center;
-                font-size: 13px;
-                border: 1px solid #e5e6ea;
-                padding: 10px;
-                border-top: 0;
-            }
-            .input {
-                position: relative;
-                border: 1px solid #e5e6ea;
-                padding: 6px;
-                border-top: 0;
-            }
-            .input-box {
-                position: relative;
-                display: flex;
-                .box {
-                    position: relative;
-                    width: 50%;
-                }
-                .no-b {
-                    border-left: 0;
-                }
-            }
-        }
-    }
-    .hc-task-body-tip {
-        color: red;
-    }
-}
-</style>

+ 6 - 2
src/views/debit-pay/material/order.vue

@@ -113,10 +113,10 @@
 import { nextTick, onActivated, ref } from 'vue'
 import { useAppStore } from '~src/store'
 import HcDataModal from './components/order/dataModal.vue'
-import HcTaskModal from './components/order/task-modal.vue'
+import HcTaskModal from '~src/components/task-modal/task-modal.vue'
 import mainApi from '~api/debit-pay/material/order.js'
 import periodApi from '~api/debit-pay/material/periods.js'
-import { deepClone, getArrValue, getObjValue } from 'js-fast-way'
+import { deepClone, getArrValue, getObjValue, isNullES } from 'js-fast-way'
 import { toPdfPage } from '~uti/btn-auth'
 import { HcDelMsg } from 'hc-vue3-ui'
 const useAppState = useAppStore()
@@ -292,6 +292,10 @@ const reportClick = () => {
 const isTaskModal = ref(false)
 const taskData = ref({})
 const rowTableClick = (row) => {
+    if (isNullES(row.taskId)) {
+        window.$message.warning('暂无审批数据')
+        return
+    }
     taskData.value = deepClone(row)
     isTaskModal.value = true
 }

+ 24 - 3
src/views/debit-pay/start-work/book.vue

@@ -8,7 +8,9 @@
         </template>
         <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" is-new :index-style="{ width: 60 }">
             <template #action="{ row }">
+                <el-link type="primary" :disabled="!row.rawUrl" @click="rowViewRawPdf(row)">查看电签报表</el-link>
                 <el-link type="primary" @click="viewPdf(row)">查看报表</el-link>
+                <el-link type="primary" :disabled="row.approveStatus === 0" @click="eVisaRowClick(row)">查看电签流程</el-link>
                 <el-link type="success" @click="editRow(row)">修改</el-link>
                 <el-link type="danger" @click="delCilck(row)">删除</el-link>
                 <el-link v-loading="row?.recalculateLoading" @click="recalculate(row)">重新计算</el-link>
@@ -42,18 +44,21 @@
                 </el-form-item>
             </el-form>
         </hc-new-dialog>
+        <!-- 任务流程 -->
+        <HcTaskModal v-model="isTaskModal" :data="taskData" />
     </hc-new-card>
 </template>
 
 <script setup>
-import { onActivated, onMounted, ref } from 'vue'
+import { onActivated, ref } from 'vue'
 import bookApi from '~api/debit-pay/material/book.js'
 import periodApi from '~api/debit-pay/material/periods.js'
 import { useAppStore } from '~src/store'
-import { formValidate, getArrValue, getObjValue } from 'js-fast-way'
+import { deepClone, formValidate, getArrValue, isNullES } from 'js-fast-way'
 const useAppState = useAppStore()
 const contractId = ref(useAppState.getContractId)
 const projectId = ref(useAppState.getProjectId)
+import HcTaskModal from '~src/components/task-modal/task-modal.vue'
 import { HcDelMsg } from 'hc-vue3-ui'
 import { toPdfPage } from '~uti/btn-auth'
 defineOptions({
@@ -125,7 +130,7 @@ const tableColumn = ref([
     { key: 'statementName', name: '报表名称' },
     { key: 'printDate', name: '打印日期' },
     { key: 'calculateDate', name: '重新计算时间' },
-    { key: 'action', name: '操作', width: 230 },
+    { key: 'action', name: '操作', width: 400, align: 'center' },
 ])
 const tableData = ref([])
 const getTableData = async () => {
@@ -243,6 +248,22 @@ const formModalClose = () => {
     formModalShow.value = false
     getTableData()
 }
+
+const rowViewRawPdf = (row)=>{
+    toPdfPage(row?.rawUrl)
+}
+
+//查看电签流程
+const isTaskModal = ref(false)
+const taskData = ref({})
+const eVisaRowClick = (row) => {
+    if (isNullES(row.taskId)) {
+        window.$message.warning('暂无电签数据')
+        return
+    }
+    taskData.value = deepClone(row)
+    isTaskModal.value = true
+}
 </script>
 
 <style scoped lang="scss">

+ 0 - 169
src/views/debit-pay/start-work/components/order/task-modal.vue

@@ -1,169 +0,0 @@
-<template>
-    <hc-new-dialog is-table widths="400px" :show="isShow" title="审批流程" :padding="false" :footer="false" @close="addModalClose">
-        <div class="hc-task-time">
-            <hc-body class="hc-task-body-card" padding="10px" scrollbar>
-                <el-timeline v-if="rowInfo.fixedFlowId == null" class="hc-time-line">
-                    <template v-for="(item, index) in flowList" :key="index">
-                        <el-timeline-item :class="item.status === '2' ? 'success' : 'primary'" size="large">
-                            <div class="timeline-item-icon">
-                                <hc-icon v-if="item.status === '2'" class="check-icon" name="check" />
-                            </div>
-                            <div class="reply-name">{{ item.name }}</div>
-                            <div class="reply-time">{{ item.date }}</div>
-                            <div class="reply-content" v-html="item.flowValue" />
-                        </el-timeline-item>
-                    </template>
-                </el-timeline>
-                <el-timeline v-else class="hc-time-line">
-                    <template v-for="(item, index) in flowListTask" :key="index">
-                        <el-timeline-item :class="item.status == '2' ? 'success' : 'primary'" size="large">
-                            <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">
-                                <div class="reply-name">
-                                    {{ item.name }}
-                                    <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">
-                                                <template v-for="(item1, index1) in item.userList" :key="index1">
-                                                    <el-timeline-item :class="item1.status === '2' ? 'success' : 'primary'" size="large">
-                                                        <div class="timeline-item-icon">
-                                                            <hc-icon v-if="item1.status === '2'" class="check-icon" name="check" />
-                                                        </div>
-                                                        <div class="reply-name">{{ item1.name }}</div>
-                                                        <div class="reply-time">{{ item1.date }}</div>
-                                                        <div class="reply-content" v-html="item1.flowValue" />
-                                                    </el-timeline-item>
-                                                </template>
-                                            </el-timeline>
-                                        </template>
-                                        <el-link @click="getTaskDetail" @mouseenter="item.taskDetailvisible = true" @mouseleave="item.taskDetailvisible = false">点击查看详情</el-link>
-                                    </el-tooltip>
-                                </div>
-                            </div>
-                            <div class="reply-time">{{ item.date }}</div>
-                            <div class="reply-content" v-html="item.flowValue" />
-                        </el-timeline-item>
-                    </template>
-                </el-timeline>
-            </hc-body>
-        </div>
-    </hc-new-dialog>
-</template>
-
-<script setup>
-import { ref, watch } from 'vue'
-
-const props = defineProps({
-    data: {
-        type: Object,
-        default: () => ({}),
-    },
-})
-
-//事件
-const emit = defineEmits(['close'])
-
-//双向绑定
-// eslint-disable-next-line no-undef
-const isShow = defineModel('modelValue', {
-    default: false,
-})
-
-//监听
-const dataInfo = ref(props.data)
-watch(() => props.data, (data) => {
-    dataInfo.value = data
-}, { immediate: true, deep:true })
-
-//监听
-watch(isShow, (val) => {
-    if (val) getDataApi()
-})
-
-const rowInfo = ref({})
-const flowList = ref([])
-const flowListTask = ref([])
-const getDataApi = async () => {
-
-}
-
-//查看详情
-const getTaskDetail = () => {
-
-}
-
-//关闭弹窗
-const addModalClose = () => {
-    isShow.value = false
-    emit('close')
-}
-</script>
-
-<style scoped lang="scss">
-.hc-task-time {
-    position: relative;
-    height: 100%;
-}
-</style>
-
-<style lang="scss">
-.hc-task-body-card {
-    background: #f7f7f7;
-    .el-scrollbar__bar.is-vertical {
-        right: -8px;
-    }
-    .hc-task-body-table {
-        position: relative;
-        height: calc(100% - 30px);
-        .hc-task-body-table-form {
-            position: relative;
-            height: 100%;
-            overflow: auto;
-            .title {
-                position: relative;
-                display: flex;
-                align-items: center;
-                justify-content: center;
-                font-size: 18px;
-                border: 1px solid #e5e6ea;
-                height: 50px;
-            }
-            .name {
-                position: relative;
-                display: flex;
-                align-items: center;
-                font-size: 13px;
-                border: 1px solid #e5e6ea;
-                padding: 10px;
-                border-top: 0;
-            }
-            .input {
-                position: relative;
-                border: 1px solid #e5e6ea;
-                padding: 6px;
-                border-top: 0;
-            }
-            .input-box {
-                position: relative;
-                display: flex;
-                .box {
-                    position: relative;
-                    width: 50%;
-                }
-                .no-b {
-                    border-left: 0;
-                }
-            }
-        }
-    }
-    .hc-task-body-tip {
-        color: red;
-    }
-}
-</style>

+ 6 - 2
src/views/debit-pay/start-work/order.vue

@@ -102,8 +102,8 @@
 import { nextTick, onActivated, ref } from 'vue'
 import { useAppStore } from '~src/store'
 import HcDataModal from './components/order/dataModal.vue'
-import HcTaskModal from './components/order/task-modal.vue'
-import { deepClone, getArrValue, getObjValue } from 'js-fast-way'
+import HcTaskModal from '~src/components/task-modal/task-modal.vue'
+import { deepClone, getArrValue, getObjValue, isNullES } from 'js-fast-way'
 import mainApi from '~api/debit-pay/start-work/order.js'
 import periodApi from '~api/debit-pay/material/periods.js'
 import { HcDelMsg } from 'hc-vue3-ui'
@@ -275,6 +275,10 @@ const reportFinish = () => {
 const isTaskModal = ref(false)
 const taskData = ref({})
 const rowTableClick = (row) => {
+    if (isNullES(row.taskId)) {
+        window.$message.warning('暂无审批数据')
+        return
+    }
     taskData.value = deepClone(row)
     isTaskModal.value = true
 }