Ver código fonte

提交相关代码

Lijy 2 meses atrás
pai
commit
7ea0ad6528

+ 107 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/task/list.vue

@@ -72,6 +72,13 @@
                     </div>
                 </el-form-item>
 
+                <el-form-item v-if="idx == 3">
+                    <el-radio-group v-model="documentRadios" size="small" @input="documentRadioInput">
+                        <el-radio-button label="待我审核"></el-radio-button>
+                        <el-radio-button label="待他人审核"></el-radio-button>
+                    </el-radio-group>
+                </el-form-item>
+
                 <el-form-item v-if="idx != 3">
                     <div style="display: flex;">
                         <div style="margin-left: 20px">
@@ -216,7 +223,8 @@
                     </el-table-column>
                 </el-table>
 
-                <el-table v-if="[3].includes(idx)" :data="documentReview"  highlight-current-row v-loading="documentReviewLoading" :height="tableHeight" style="width: 100%;" :key="tablesTwoKey">
+                <el-table v-if="[3].includes(idx)" :data="documentReview"  highlight-current-row v-loading="documentReviewLoading" :height="tableHeight" style="width: 100%;" :key="tablesTwoKey" @selection-change="agentSelectChange">
+                    <el-table-column type="selection" width="55" v-if="documentRadios == '待他人审核'"></el-table-column>
                     <el-table-column prop="projectName" :label="$t('headerTop.projectName')" sortable width="260" show-overflow-tooltip>
                         <template slot-scope="scope">
                             <el-link type="primary" :href="'#/projectInside/'+scope.row.projectId">{{scope.row.projectName}}</el-link>
@@ -241,6 +249,11 @@
                             </div>
                         </template>
                     </el-table-column>
+                    <el-table-column label="文件名称" v-if="documentRadios == '待他人审核'">
+                        <template slot-scope="scope">
+                            {{ scope.row.documentName }}
+                        </template>
+                    </el-table-column>
                     <el-table-column prop="executorName" :label="$t('zhi-hang-ren')" sortable>
                         <template slot-scope="scope">
                             <span v-for="(item, index) in scope.row.executorList" :key="index">
@@ -254,11 +267,21 @@
                             </span>
                         </template>
                     </el-table-column>
-                    <el-table-column label="文件审核" width="140">
+                    <el-table-column label="文件审核" width="140" v-if="documentRadios == '待我审核'">
                         <template slot-scope="scope">
                             <el-button type="primary" size="mini" @click="viewFilesAndReviewThem(scope.row)">查看文件并审核</el-button>
                         </template>
                     </el-table-column>
+                    <el-table-column label="审核人" width="140" v-if="documentRadios == '待他人审核'">
+                        <template slot-scope="scope">
+                            <template v-if="user.userNameNeedTranslate == 1">
+                                <TranslationOpenDataText type='userName' :openid='scope.row.finalChargeName'></TranslationOpenDataText>
+                            </template>
+                            <template v-if="user.userNameNeedTranslate != 1">
+                                {{ scope.row.finalChargeName }}
+                            </template>
+                        </template>
+                    </el-table-column>
                 </el-table>
 
                 <!-- 重启时输入原因 -->
@@ -288,7 +311,10 @@
                 </el-dialog>
 
                 <!--工具条-->
-                <el-col :span="24" class="toolbar">
+                <el-col :span="24" class="toolbar bottomToolbar">
+                    <div>
+                        <el-button type="primary" size="small" :disabled="!selectFilesed.length" :loading="urgingLoading" v-if="documentRadios == '待他人审核'" @click="urgingCli()">催办</el-button>
+                    </div>
                     <el-pagination
                         @size-change="handleSizeChange"
                         @current-change="handleCurrentChange"
@@ -778,6 +804,7 @@ import { getThemeColor } from '@/utils/commonMethod.js'
                 screenDeptId: [],
 
                 // 待审核文件
+                documentRadios: '待我审核',
                 documentReview: [],
                 documentReviewLoading: false,
                 auditFileTaskName: '',
@@ -791,6 +818,8 @@ import { getThemeColor } from '@/utils/commonMethod.js'
                 viewFilesAndReviewThemRejectRow: {},
                 viewFilesAndReviewThemAdoptLoading: false,
                 viewFilesAndReviewThemkey: 902,
+                selectFilesed: [], // 列表选择
+                urgingLoading: false,
 
                 tablesKey: 1,
                 tablesTwoKey: 300,
@@ -798,6 +827,33 @@ import { getThemeColor } from '@/utils/commonMethod.js'
             };
         },
         methods: {
+            urgingCli() {
+                const ids = this.selectFilesed.map(item => item.finalChargeId).join(',')
+                this.urgingLoading = true
+                this.http.post('/task/sendMsgToChargers',{
+                    ids
+                },res => {
+                    this.urgingLoading = false
+                    if(res.code == 'ok'){
+                        this.$message.success('催办成功')
+                        this.selectFilesed = []
+                    }else {
+                        this.$message.error(res.msg)
+                    }
+                },error => { this.$message.error(error), this.urgingLoading = false })
+            },
+            documentRadioInput(val) {
+                this.tablesTwoKey++
+                this.page = 1
+                if(val == '待我审核') {
+                    this.getFilesAwaitingReview()
+                    return
+                }
+                this.getFilesAwaitingReviewTwo()
+            },  
+            agentSelectChange(rows) {
+                this.selectFilesed = rows
+            },
             handleSelectionChange(val) {
                 this.tableMultipleSelection = val;
             },
@@ -1303,6 +1359,48 @@ import { getThemeColor } from '@/utils/commonMethod.js'
                     });
                 })
             },
+            getFilesAwaitingReviewTwo() {
+                this.documentReviewLoading = true;
+                let parameter = {
+                    pageIndex: this.page,
+                    pageSize: this.size,
+                    projectId: this.screenProjectId,
+                    taskName: this.auditFileTaskName
+                }
+
+                if(this.deptId.length > 0) {
+                    parameter.deptId = this.deptId[this.deptId.length - 1]
+                } else {
+                    parameter.deptId = ''
+                }
+
+                this.http.post('/task/getOtherTaskChargePage', parameter,
+                res => {
+                    this.documentReviewLoading = false;
+                    if(res.code == 'ok') {
+                        this.documentReview = (res.data.records || []).map((item) => {
+                            return {
+                                ...item,
+                                executorList: [{ executorName: item.creatorName }],
+                            }
+                        })
+                        // this.tablesTwoKey++
+                        this.total = res.data.total
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.documentReviewLoading = false;
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                })
+            },
             // 导出任务
             exportTask() {
                 // console.log('执行代码')
@@ -1516,6 +1614,7 @@ import { getThemeColor } from '@/utils/commonMethod.js'
                 this.page = 1
                 // console.log(this.searchField)
                 if([3].includes(e)) {
+                    this.documentRadios = '待我审核'
                     this.getFilesAwaitingReview()
                 } else {
                     this.getList()
@@ -2323,6 +2422,11 @@ import { getThemeColor } from '@/utils/commonMethod.js'
 </script>
 
 <style lang="scss" scoped>
+    .bottomToolbar {
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+    }
     .Daily p {
         margin: 0 !important;
         padding: 0 0 10px 0 !important;