Browse Source

fix:内审进度增加内审检查表催办事务

zhangjingyuan 2 năm trước cách đây
mục cha
commit
cb49169f93

+ 47 - 8
src/views/system/jbdScan/goods/neishenzhuangtai.vue

@@ -115,8 +115,11 @@
                     <!-- 检查表编制数据检查完成 -->
                     <!-- 检查表编制数据检查完成 -->
                     <div v-if="!CNASTableData.length > 0">
                     <div v-if="!CNASTableData.length > 0">
                         <div class="cma">
                         <div class="cma">
-                            <div style="width: 90%; margin: 0 auto; line-height: 35px">
-                                内审检查表编制进度查阅
+                            <div style="width: 90%; margin: 0 auto; line-height: 35px;display: flex;justify-content: space-between;">
+                                <div>内审检查表编制进度查阅</div>
+                                <div @click="urgingEvent" >
+                                    <button class="urgingBtn"><i class="el-icon-position"></i> 发送催办</button>
+                                </div>
                             </div>
                             </div>
                             <el-table :data="allCheckData" :border="true" style="width: 90%; margin: 0 auto">
                             <el-table :data="allCheckData" :border="true" style="width: 90%; margin: 0 auto">
                                 <el-table-column prop="nei_shen_yuan_" label="内审员" width="100">
                                 <el-table-column prop="nei_shen_yuan_" label="内审员" width="100">
@@ -312,7 +315,41 @@ export default {
         clearInterval(this.setCheckTime)
         clearInterval(this.setCheckTime)
     },
     },
     methods: {
     methods: {
-    // 内审核查完成率仪表盘
+        // 催办信息点击
+        urgingEvent () {
+            let this_ = this;
+            let receiverId = "";
+            for(let item of this.allCheckData){
+                if(item.shi_fou_guo_shen_ !="已完成"){
+                    receiverId += item.nei_shen_yuan_ + ",";
+                }
+            }
+            receiverId = receiverId.slice(0,receiverId.length - 1);
+            let msage = {
+                  canreply: "0",
+                  content: `<p>`+ "内审检查表还未完成,请及时完成"+`</p>`,
+                  editorValue: "",
+                  fileMsg: "",
+                  groupId: "",
+                  groupName:  "",
+                  id: "",
+                  messageType :  "normal",
+                  ownerId : this.$store.getters.userId,
+                  ownerName: this.$store.getters.name, //发送人 
+                  positionId :  "",
+                  positionName:  "",
+                  receiver: "",
+                  receiverId: receiverId, //接收人
+                  subject: "请在规定时间内完成" + "内审检查表编制内容,以免影响后续进度"
+              }
+            this_.$common.sendMsg(msage).then(res =>{
+                this_.$message({
+                    message: '已成功向未完成编制内审检查表的内审员发送催办信息',
+                    type: 'success'
+                }); 
+            })
+        },
+        // 内审核查完成率仪表盘
         getLoadEcharts () {
         getLoadEcharts () {
             var chartDom = document.getElementById('main')
             var chartDom = document.getElementById('main')
             const setEchartWH = {
             const setEchartWH = {
@@ -777,12 +814,10 @@ export default {
         },
         },
         // 检查表编制完成数据
         // 检查表编制完成数据
         async getCheckData () {
         async getCheckData () {
-            console.log(this.obj[0], 'obj')
             const ids = this.obj[0]
             const ids = this.obj[0]
             let data = []
             let data = []
             const sql = `select COUNT(*) AS num FROM t_dsrw WHERE guan_lian_fu_biao = '${ids.id_}' UNION ALL SELECT COUNT(*) AS num FROM t_nsjcbxe WHERE ji_hua_zong_wai_j =  '${ids.ji_hua_zong_wai_j}' AND shi_fou_guo_shen_ = '已完成'`
             const sql = `select COUNT(*) AS num FROM t_dsrw WHERE guan_lian_fu_biao = '${ids.id_}' UNION ALL SELECT COUNT(*) AS num FROM t_nsjcbxe WHERE ji_hua_zong_wai_j =  '${ids.ji_hua_zong_wai_j}' AND shi_fou_guo_shen_ = '已完成'`
             await curdPost('sql', sql).then((res) => {
             await curdPost('sql', sql).then((res) => {
-                console.log(res, '检查表数据')
                 data = res.variables.data
                 data = res.variables.data
             })
             })
             this.checkValue = parseInt(data[1].num / data[0].num * 100)
             this.checkValue = parseInt(data[1].num / data[0].num * 100)
@@ -790,7 +825,6 @@ export default {
             let noFinish = []
             let noFinish = []
             const sqsl1 = `select a.id_,a.nei_shen_yuan_,a.bei_nei_shen_bu_m,a.kai_shi_shi_jian_,a.jie_shu_shi_jian_,b.shi_fou_guo_shen_ FROM t_nsjcx AS a  LEFT JOIN  t_nsjcbxe AS b ON a.bei_nei_shen_bu_m = b.bei_nei_shen_bu_m WHERE a.parent_id_ = '${ids.id_}' AND b.ji_hua_zong_wai_j = '${ids.ji_hua_zong_wai_j}'`
             const sqsl1 = `select a.id_,a.nei_shen_yuan_,a.bei_nei_shen_bu_m,a.kai_shi_shi_jian_,a.jie_shu_shi_jian_,b.shi_fou_guo_shen_ FROM t_nsjcx AS a  LEFT JOIN  t_nsjcbxe AS b ON a.bei_nei_shen_bu_m = b.bei_nei_shen_bu_m WHERE a.parent_id_ = '${ids.id_}' AND b.ji_hua_zong_wai_j = '${ids.ji_hua_zong_wai_j}'`
             await curdPost('sql', sqsl1).then((res) => {
             await curdPost('sql', sqsl1).then((res) => {
-                console.log(res, '检查表完成数据')
                 finish = res.variables.data
                 finish = res.variables.data
             })
             })
             let id = ''
             let id = ''
@@ -800,9 +834,7 @@ export default {
             id = id.slice(0, id.length - 1)
             id = id.slice(0, id.length - 1)
             id = id.replace(/\,/g, '","')
             id = id.replace(/\,/g, '","')
             const sql3 = `select id_,nei_shen_yuan_,bei_nei_shen_bu_m,kai_shi_shi_jian_,jie_shu_shi_jian_,shi_shi_ji_hua_wa as shi_fou_guo_shen_ FROM t_nsjcx  WHERE  id_ NOT IN ("${id}") AND parent_id_ = "${ids.id_}" `
             const sql3 = `select id_,nei_shen_yuan_,bei_nei_shen_bu_m,kai_shi_shi_jian_,jie_shu_shi_jian_,shi_shi_ji_hua_wa as shi_fou_guo_shen_ FROM t_nsjcx  WHERE  id_ NOT IN ("${id}") AND parent_id_ = "${ids.id_}" `
-            console.log(sql3)
             await curdPost('sql', sql3).then((res) => {
             await curdPost('sql', sql3).then((res) => {
-                console.log(res, '检查未表完成数据')
                 noFinish = res.variables.data
                 noFinish = res.variables.data
             })
             })
             this.allCheckData = finish.concat(noFinish)
             this.allCheckData = finish.concat(noFinish)
@@ -884,6 +916,13 @@ export default {
     margin: 0 auto;
     margin: 0 auto;
     margin-left: 5%;
     margin-left: 5%;
   }
   }
+  .urgingBtn{
+    background-color: #e6a23d;
+    color: white; 
+    border: none;
+    padding: 4px;
+    border-radius: 6%;
+  }
   #main {
   #main {
     width: 100%;
     width: 100%;
     height: 100%;
     height: 100%;