Explorar o código

首页主管提醒逻辑修改

cfort %!s(int64=3) %!d(string=hai) anos
pai
achega
95f85e7986

+ 2 - 0
src/business/platform/form/utils/custom/requestType.js

@@ -24,6 +24,8 @@ export const requestType = {
 export const requestPath = {
     // 公告短信
     notice: 'business/v3/hwsys/universal/sendNoticeMsg',
+    // 催办短信
+    remind: 'business/v3/sys/universal/sendNoticeMsg',
     // 财务短信
     financial: 'business/v3/hwsys/universal/sendFinancialMsg',
     // 创建流程

+ 1 - 1
src/store/getters.js

@@ -3,7 +3,7 @@ export default {
   userId: state => state.ibps.user.info && state.ibps.user.info.user ? state.ibps.user.info.user.id : '', // 用户ID
   name: state => state.ibps.user.info && state.ibps.user.info.employee ? state.ibps.user.info.employee.name : '', // 姓名
   status: state => state.ibps.user.info && state.ibps.user.info.employee ? state.ibps.user.info.employee.status : '', // 用户状态
-  orgId: state => state.ibps.user.info && state.ibps.user.info.org ? state.ibps.user.info.org.id : '', // 用户部门ID
+  org: state => state.ibps.user.info ? state.ibps.user.info.org : {}, // 用户部门信息
   isSuper: state => state.ibps.user.info && state.ibps.user.info.user ? state.ibps.user.info.user.isSuper === 'Y' : false, // 是否超级管理员
   account: state => state.ibps.user.info && state.ibps.user.info.user ? state.ibps.user.info.user.account : '', // 用户名
   regOpen: state => state.ibps.user.regOpen, // 注册状态

+ 60 - 35
src/views/system/dashboard/components/new-home.vue

@@ -89,14 +89,32 @@
                                     prop="submitBy"
                                     show-overflow-tooltip
                                     width="100"
-                                    label="任务发起人"
-                                />
+                                >
+                                    <template slot="header" slot-scope="scope">
+                                        <span>发起人</span>
+                                        <el-tooltip effect="dark" placement="top">
+                                            <div slot="content">
+                                                该事务对应流程的发起人
+                                            </div>
+                                            <i class="el-icon-info"></i>
+                                        </el-tooltip>
+                                    </template>
+                                </el-table-column>
                                 <el-table-column
                                     prop="forwardBy"
                                     show-overflow-tooltip
                                     width="100"
-                                    label="任务提交人"
-                                />
+                                >
+                                    <template slot="header" slot-scope="scope">
+                                        <span>提交人</span>
+                                        <el-tooltip effect="dark" placement="top">
+                                            <div slot="content">
+                                                该事务对应流程上一节点的提交人
+                                            </div>
+                                            <i class="el-icon-info"></i>
+                                        </el-tooltip>
+                                    </template>
+                                </el-table-column>
                             </template>
                             <template v-else-if="['over', 'finish'].includes(activeTab)">
                                 <el-table-column
@@ -115,17 +133,17 @@
                                 </el-table-column>
                                 <el-table-column
                                     show-overflow-tooltip
-                                    label="任务提交人"
+                                    label="发起人"
                                     width="100"
                                 >
-                                    <template slot-scope="scope">{{ getParenthesesStr(scope.row.subject)[2] }}</template>
+                                    <template slot-scope="scope">{{ scope.row.createBy | getUserName(userList)}}</template>
                                 </el-table-column>
                                 <el-table-column
                                     show-overflow-tooltip
-                                    label="任务发起人"
+                                    label="提交人"
                                     width="100"
                                 >
-                                    <template slot-scope="scope">{{ scope.row.createBy | getUserName(userList)}}</template>
+                                    <template slot-scope="scope">{{ getParenthesesStr(scope.row.subject)[2] }}</template>
                                 </el-table-column>
                             </template>
                             <el-table-column
@@ -181,7 +199,7 @@
             label: '待办事宜',
             key: 'wait',
             icon: 'el-icon-edit',
-            time: ''
+            time: '提交'
         },
         {
             label: '已办事宜',
@@ -285,7 +303,7 @@
                 FlowName: '',
                 posName: '',
                 defaultPagination: { page: 1, limit: 15 },
-                sorts: {},
+                sorts: { createTime: 'DESC' },
                 timer: null,
                 processName: '',
                 userList: [],
@@ -350,19 +368,19 @@
             },
             // 获取用户部门信息
             getOrgInfo() {
-                const { orgId } = this.$store.getters
-                if (!orgId) {
+                const { org = {} } = this.$store.getters
+                if (!org.id) {
                     return
                 }
                 let params = {
-                    parameters: [{key: 'Q^MANAGER_ORG_ID_^S', value: orgId}]
+                    parameters: [{key: 'Q^MANAGER_ORG_ID_^S', value: org.id}]
                 }
                 queryOrgManager(params).then(res => {
                     this.orgInfo = {}
                     const data = res.data.dataResult
                     if (data && data.length) {
-                        const { id, name, mobile, account, gender, groupID, orgName } = data[0]
-                        this.orgInfo = { id, name, mobile, account, gender, groupID, orgName }
+                        const { id, name, mobile, account, gender, groupID } = data[0]
+                        this.orgInfo = { id, name, mobile, account, gender, groupID, orgName: org.name }
                     }
                 })
             },
@@ -509,7 +527,7 @@
                     parameters: [],
                     sorts: []
                 }
-                let sql = `select id_, shu_ju_id_ as taskId from t_zgrwtxb where position('${userId}' in chu_li_ren_)`
+                let sql = `select id_, shi_wu_id_ as taskId from t_gqswb where position('${userId}' in chu_li_ren_id_)`
                 Promise.all([pending(params), curdPost('sql', sql)]).then(([res1, res2]) => {
                     let workData = res1.data && res1.data.dataResult
                     let noticeData = res2.variables && res2.variables.data
@@ -578,39 +596,46 @@
                 const { userId } = this.$store.getters
                 let addList = []
                 let sendList = []
-                let msgContent = {
+                const msgContent = {
                     plan: '距离过期还剩七天,请及时处理!',
                     normal: '至今三天未处理,已超时,请及时处理!'
                 }
-                let msgTitle = {
+                const msgTitle = {
                     plan: '计划事务即将到期提醒',
                     normal: '事务超时提醒'
                 }
+                const nowTime = new Date(new Date().getTime() + 28800000).toJSON().slice(0, 16).replace('T', ' ')
                 data.forEach(item => {
                     let isExist = !!noticeList.find(i => i.taskId === item.taskId)
                     // 筛选出不存在于主管提醒表的过期数据
                     if (!isExist) {
-                        // 无部门信息的用户无往主管表加数据
+                        // 无部门信息的用户不往过期事务表加数据
                         if (this.orgInfo.groupID) {
                             let obj = {
-                                // 完成名称
-                                code_: item.subject,
+                                // 事务ID
+                                shi_wu_id_: item.taskId,
+                                // 完整名称
+                                wan_zheng_ming_ch: item.subject,
                                 // 事务说明
-                                names_: item.subject.includes('#') ? item.subject.split('#')[1] : '',
-                                // 任务名称
-                                ren_wu_ming_cheng: item.workName,
-                                chu_li_ren_: this.getInfoByName(item.ownerName, 'id'),
+                                shi_wu_shuo_ming_: item.subject.includes('#') ? item.subject.split('#')[1] : '',
+                                // 事务名称
+                                shi_wu_ming_cheng: item.workName,
+                                // 事务状态
+                                shi_wu_zhuang_tai: `待${item.name}`,
+                                // 事务类型
+                                shi_wu_lei_xing_: item.workType,
+                                chu_li_ren_ming_: item.ownerName,
+                                chu_li_ren_id_: this.getInfoByName(item.ownerName, 'id'),
                                 chu_li_ren_dian_h: this.getInfoByName(item.ownerName, 'phone'),
                                 bu_men_: this.orgInfo.orgName,
                                 bu_men_id_: this.orgInfo.groupID,
-                                // 主管ID与当前用户id相等时将主管ID设置为总裁【罗晓玲】的ID,主管电话设为空
-                                zhu_guan_: this.orgInfo.id === userId ? '990927120278487040' : this.orgInfo.id,
+                                // 主管ID与当前用户id相等时将主管ID设置为主任【】的ID,主管电话设为空
+                                zhu_guan_id_: this.orgInfo.id === userId ? '990927120278487040' : this.orgInfo.id,
                                 zhu_guan_dian_hua: this.orgInfo.id === userId ? '' : this.orgInfo.mobile,
-                                ren_wu_kai_shi_sh: item.createTime,
-                                zhuang_tai_: `待${item.name}`,
-                                shu_ju_id_: item.taskId,
-                                // 任务类型
-                                type_: item.workType
+                                bian_zhi_shi_jian: item.createTime,
+                                ti_xing_ci_shu_: 1,
+                                duan_xin_ci_shu_: 0,
+                                ti_xing_shi_jian_: nowTime
                             }
                             addList.push(obj)
                         }
@@ -624,10 +649,10 @@
                     }
                 })
                 let addParams = {
-                    tableName: 't_zgrwtxb',
+                    tableName: 't_gqswb',
                     paramWhere: addList
                 }
-                // console.log(addList, sendList)
+                console.log(addList, sendList)
                 if (addList.length) {
                     curdPost('add', JSON.stringify(addParams))
                 }
@@ -648,7 +673,7 @@
                 if (!deleteList.length) {
                     return
                 }
-                let params = `{"tableName": "t_zgrwtxb","paramWhere":"{id_:'${deleteList.join(',')}'}"}`
+                let params = `{"tableName": "t_gqswb","paramWhere":"{id_:'${deleteList.join(',')}'}"}`
                 curdPost('batchDelete', params).then(() => {}).catch(err => {
                     console.log(err)
                 })