linweizeng преди 2 години
родител
ревизия
8cba18237b

+ 2 - 2
src/views/system/jbdScan/approve/approve.vue

@@ -49,7 +49,7 @@
                         />
                     </div>
                     <div>
-                        <appComOne ref="appBuCom" :click-index="7" :table-data="buTableData" />
+                        <appComOne ref="appBuCom" :click-index="7" :table-data="buTableData" :type="false" />
                     </div>
                 </div>
                 <div class="tableLin">
@@ -61,7 +61,7 @@
                         />
                     </div>
                     <div>
-                        <appComOne ref="appCom" :click-index="clickIndex" :active-index="activeIndex" :table-data="tableData" />
+                        <appComOne ref="appCom" :type="true" :general-list="generalList" :click-index="clickIndex" :active-index="activeIndex" :table-data="tableData" />
                     </div>
                 </div>
                 <div v-if="activeIndex != 5" class="tyongj">

+ 3 - 4
src/views/system/jbdScan/approve/approveJS.js

@@ -12,7 +12,7 @@ export default {
     methods: {
         getPosition () {
             const second = this.$store.getters.level.second
-            const sql = `select * from ibps_party_entity where party_type_ = 'position' and PATH_ like '%${second}%' and DEPTH_ = '4'`
+            const sql = `select * from ibps_party_entity where party_type_ = 'position' and PATH_ like '%${second}%' and DEPTH_ = '4' order by ID_ desc`
             this.$common.request('sql', sql).then(res => {
                 const { data = [] } = res.variables || {}
                 if (data.length > 0) {
@@ -96,12 +96,12 @@ export default {
                     const sum = list.reduce((total, current) => total + current)
                     const dataLength = data.length
                     const totalMs = sum / dataLength / 5 * 100
-                    this.getOption(totalMs)
+                    this.getOption(parseInt(totalMs))
                 }
             })
         },
         getShiShiData (id, activeIndex) {
-            const sql = `select a.*,c.NAME_ as zuYuanPosiName,d.NAME_ as zuYuanName,e.NAME_ as zuZhangName,g.NAME_ as zuZhangBnMen from t_rkzztkhcjhzb a left join t_rkzztkhcjhzb b on a.id_ = b.ji_hua_zi_biao_id left join ibps_party_position c on a.bian_zhi_bu_men_ = c.ID_ left join ibps_party_employee d on a.zu_yuan_ = d.ID_ left join t_hcssjhb f on b.parent_id_ = f.id_ left join ibps_party_position g on f.bian_zhi_bu_men_ = g.ID_ left join ibps_party_employee e on f.bian_zhi_ren_ = e.ID_ where a.parent_id_ = '${id}' order by a.tiao_kuan_hao_`
+            const sql = `select a.*,c.NAME_ as zuYuanPosiName,d.NAME_ as zuYuanName,e.NAME_ as zuZhangName,g.NAME_ as zuZhangBnMen,h.NAME_ as yuanZuZhangBuMen,i.NAME_ as yuanZuZhangName from t_rkzztkhcjhzb a left join t_rkzztkhcjhzb b on a.id_ = b.ji_hua_zi_biao_id left join ibps_party_position c on a.bian_zhi_bu_men_ = c.ID_ left join ibps_party_position h on a.bu_men_ = h.ID_ left join ibps_party_employee i on a.zu_chang_ = i.ID_ left join ibps_party_employee d on a.zu_yuan_ = d.ID_ left join t_hcssjhb f on b.parent_id_ = f.id_ left join ibps_party_position g on f.bian_zhi_bu_men_ = g.ID_ left join ibps_party_employee e on f.bian_zhi_ren_ = e.ID_ where a.parent_id_ = '${id}' order by a.tiao_kuan_hao_`
 
             // if (activeIndex === 1) {
             //     sql = `select * from t_rkzztkhcjhzb where parent_id_ = '${id}' order by tiao_kuan_hao_`
@@ -136,7 +136,6 @@ export default {
                     const data2 = res[1].variables.data
                     const list1 = data1.map(item => item.value)
                     const list2 = data2.map(item => item.value)
-                    console.log(this.barData(list1, list2))
                     const accept = echarts.init(this.$refs.Echart2)
                     accept.setOption(JSON.parse(JSON.stringify(this.barData(list1, list2))))
                 }

+ 39 - 29
src/views/system/jbdScan/approve/approveJSON.json

@@ -2,115 +2,125 @@
     "list1": [{
         "name": "条款号",
         "value": "tiao_kuan_hao_",
-        "width": "50"
+        "width": "100"
     },{
         "name": "条款名称",
         "value": "tiao_kuan_ming_ch",
-        "width": "50"
+        "width": "150"
     },{
         "name": "状态",
         "value": "shi_fou_guo_shen_",
-        "width": "50"
+        "width": "100"
     }],
     "list2": [{
         "name": "条款号",
         "value": "tiao_kuan_hao_",
-        "width": "50"
+        "width": "100"
     },{
         "name": "条款名称",
         "value": "tiao_kuan_ming_ch",
-        "width": "50"
+        "width": "150"
     },{
         "name": "状态",
         "value": "shi_fou_guo_shen_",
-        "width": "50"
+        "width": "100"
     },{
         "name": "实施部门",
-        "value": "zuZhangBnMen",
-        "width": "50"
+        "value": "yuanZuZhangBuMen", 
+        "valueV": "zuZhangBnMen",
+        "width": "100"
     },{
         "name": "实施组长",
-        "value": "zuZhangName",
-        "width": "50"
+        "value": "yuanZuZhangName", 
+        "valueV": "zuZhangName",
+        "width": "100"
     }],
     "list3": [{
         "name": "条款号",
         "value": "tiao_kuan_hao_",
-        "width": "50"
+        "width": "100"
     },{
         "name": "条款名称",
         "value": "tiao_kuan_ming_ch",
-        "width": "50"
+        "width": "150"
     },{
         "name": "状态",
         "value": "shi_fou_guo_shen_",
-        "width": "50"
+        "width": "100"
     },{
         "name": "核查部门",
         "value": "zuYuanPosiName",
-        "width": "50"
+        "width": "100"
     },{
         "name": "核查人",
         "value": "zuYuanName",
-        "width": "50"
+        "width": "100"
     },{
         "name": "核查结果",
         "value": "he_cha_jie_guo_",
-        "width": "50"
+        "width": "100"
     },{
         "name": "核查情况说明",
         "value": "he_cha_qing_kuang",
-        "width": "100"
+        "width": ""
     }],
     "list4": [{
         "name": "条款号",
         "value": "tiao_kuan_hao_",
-        "width": "50"
+        "width": "100"
     },{
         "name": "条款名称",
         "value": "tiao_kuan_ming_ch",
-        "width": "50"
+        "width": "150"
     },{
         "name": "状态",
         "value": "shi_fou_guo_shen_",
-        "width": "50"
+        "width": "100"
     },{
         "name": "核查部门",
         "value": "zuYuanPosiName",
-        "width": "50"
+        "width": "100"
     },{
         "name": "核查人",
         "value": "zuYuanName",
-        "width": "50"
+        "width": "100"
     },{
         "name": "核查结果",
         "value": "he_cha_jie_guo_",
-        "width": "50"
+        "width": "100"
     },{
         "name": "核查情况说明",
         "value": "he_cha_qing_kuang",
-        "width": "100"
+        "width": ""
     },{
         "name": "审核结果",
         "value": "shen_he_jie_guo_",
-        "width": "50"
+        "width": "100"
     },{
         "name": "审核备注",
         "value": "shen_he_yi_jian_",
-        "width": "100"
+        "width": ""
     }],
     "list7": [{
+        "name": "核查部门",
+        "value": "zuYuanPosiName",
+        "width": "100"
+    },{
+        "name": "核查人",
+        "value": "zuYuanName",
+        "width": "100"
+    },{
         "name": "条款号",
         "value": "tiao_kuan_hao_",
-        "width": "50"
+        "width": "100"
     },{
         "name": "条款名称",
         "value": "tiao_kuan_ming_ch",
-        "width": "50"
+        "width": "150"
     },{
         "name": "审核结果",
         "value": "shen_he_jie_guo_",
-        "width": "50"
+        "width": "100"
     },{
         "name": "审核备注",
         "value": "shen_he_yi_jian_",

+ 154 - 4
src/views/system/jbdScan/approve/compnent/appComOne.vue

@@ -1,7 +1,25 @@
 <template>
     <div>
-        <el-table :data="tableData" :border="true" style="with: 100%">
-            <el-table-column v-for="(item,index) in jiHuaList" :key="index" :prop="item.value" :label="item.name" :width="item.width" align="center" />
+        <div v-if="activeIndex !== 5 && type && activeIndex+1 === clickIndex" class="tableTab">
+            <el-button type="info" @click="cuiBanClike()">催办</el-button>
+        </div>
+        <el-table :data="tableData" :border="true" style="with: 100%" @selection-change="handleSelectionChange">
+            <el-table-column
+                v-if="type && activeIndex !== 4"
+                type="selection"
+                width="55"
+            />
+            <el-table-column v-for="(item,index) in jiHuaList" :key="index" :prop="item.value" :label="item.name" :width="item.width" align="center">
+                <template slot-scope="scope">
+                    <div v-if="item.value == 'yuanZuZhangName'">
+                        {{ scope.row['zuZhangName'] || scope.row['yuanZuZhangName'] }}
+                    </div>
+                    <div v-else-if="item.value == 'zuYuanPosiName'">
+                        {{ scope.row['zuYuanPosiName'] || scope.row['yuanZuZhangName'] }}
+                    </div>
+                    <div v-else>{{ scope.row[item.value] }}</div>
+                </template>
+            </el-table-column>
         </el-table>
     </div>
 </template>
@@ -24,11 +42,22 @@ export default {
         clickIndex: {
             type: Number,
             default: 2
+        },
+        type: {
+            type: Boolean,
+            default: true
+        },
+        generalList: {
+            type: Array,
+            default: () => {
+                return []
+            }
         }
     },
     data () {
         return {
-            jiHuaList: approveJSON.list2
+            jiHuaList: approveJSON.list2,
+            selection: []
         }
     },
     watch: {
@@ -61,10 +90,131 @@ export default {
                     this.jiHuaList = approveJSON.list7
                     break
             }
+        },
+        handleSelectionChange (selection) {
+            console.log(selection)
+            this.selection = selection
+        },
+        cuiBanClike () {
+            if (this.selection.length === 0 && this.activeIndex !== '4') {
+                this.$message.warning('请选择数据')
+            }
+            // console.log(this.selection)
+            let selection = []
+            const list = []
+            switch (this.activeIndex) {
+                case 1:
+                    selection = this.selection.filter(item =>
+                        item.shi_fou_guo_shen_ === '待分配'
+                    )
+                    if (this.selection.length !== selection.length) {
+                        return this.$message.warning(`请选择状态为待分配的数据`)
+                    }
+                    if (selection.length > 0) {
+                        selection.forEach(item => {
+                            const conont = `,条款号:${item.tiao_kuan_hao_},条款名称:${item.tiao_kuan_ming_ch}`
+                            this.setXiaoXin(item.zu_chang_, item.ji_hua_bian_hao_, '认可准则条款核查核查实施计划', '认可准则条款核查核查实施计划已编制', conont)
+                        })
+                    }
+                    break
+                case 2:
+                    selection = this.selection.filter(item =>
+                        item.shi_fou_guo_shen_ === '待分配' || item.shi_fou_guo_shen_ === '待核查'
+                    )
+                    if (this.selection.length !== selection.length) {
+                        return this.$message.warning(`请选择状态为待分配或者待核查的数据`)
+                    }
+                    if (selection.length > 0) {
+                        selection.forEach(item => {
+                            const conont = `,条款号:${item.tiao_kuan_hao_},条款名称:${item.tiao_kuan_ming_ch}`
+                            let title = ''
+                            let content = ''
+                            if (item.shi_fou_guo_shen_ === '待分配') {
+                                title = '认可准则条款核查核查实施计划'
+                                content = '认可准则条款核查核查实施计划已编制'
+                            }
+                            if (item.shi_fou_guo_shen_ === '待核查') {
+                                title = '认可准则条款核查'
+                                content = '认可准则条款核查核查实施计划编制'
+                            }
+
+                            this.setXiaoXin(item.zu_chang_, item.ji_hua_bian_hao_, title, content, conont)
+                        })
+                    }
+                    break
+                case 3:
+                    selection = this.selection.filter(item =>
+                        item.shi_fou_guo_shen_ === '待分配' || item.shi_fou_guo_shen_ === '待核查' || item.shi_fou_guo_shen_ === '待审核'
+                    )
+                    if (this.selection.length !== selection.length) {
+                        return this.$message.warning(`请选择状态为待分配、待核查、的数据、待审核`)
+                    }
+                    if (selection.length > 0) {
+                        selection.forEach(item => {
+                            if (item.shi_fou_guo_shen_ === '待分配' || item.shi_fou_guo_shen_ === '待核查') {
+                                const conont = `,条款号:${item.tiao_kuan_hao_},条款名称:${item.tiao_kuan_ming_ch}`
+                                let title = ''
+                                let content = ''
+                                if (item.shi_fou_guo_shen_ === '待分配') {
+                                    title = '认可准则条款核查核查实施计划'
+                                    content = '认可准则条款核查核查实施计划已编制'
+                                }
+                                if (item.shi_fou_guo_shen_ === '待核查') {
+                                    title = '认可准则条款核查'
+                                    content = '认可准则条款核查核查实施计划编制'
+                                }
+                                this.setXiaoXin(item.zu_chang_, item.ji_hua_bian_hao_, title, content, conont)
+                            } else {
+                                list.push(item)
+                            }
+                        })
+                        this.getDataSet(list).then(res => {
+                            res.forEach(item => {
+                                this.setXiaoXin(item.zu_chang_, item.ji_hua_bian_hao_, '认可准则条款核查审核', '认可准则条款核查已完成,请尽快审核')
+                            })
+                        })
+                    }
+                    break
+                case 4:
+                    selection = this.selection.filter(item =>
+                        item.shi_fou_guo_shen_ !== '已结束'
+                    )
+                    if (selection.length > 0) {
+                        this.setXiaoXin(this.generalList[0].bian_zhi_ren_, this.generalList[0].bian_hao_, '认可准则条款核查确认', '认可准则条款核查审核已完成')
+                    }
+                    break
+            }
+        },
+        setXiaoXin (name, ji_hua_bian_hao_, title, content, conont = '') {
+            const xiaoxi = {
+                subject: title, // 主题,不可更改,在消息通知列表有根据这个文本做校验逻辑
+                receiverId: name, // 接收人id
+                receiver: '', // 接收人id
+                // groupId: i.tongzhiBM,// 接收人id
+                groupName: '', // 接收人id
+                fileMsg: '', // 附件
+                content: `${content},请尽快确认,计划编号:${ji_hua_bian_hao_}${conont}` // 正文
+            }
+            this.$common.sendMsg(xiaoxi).then(res => {
+                this.$message.warning(`${content},还没有确认的人员请及时通知${conont}`)
+            })
+        },
+        getDataSet (data) {
+            return new Promise((resolve, reject) => {
+                const qc = data.filter((item, index, self) => {
+                    return index === self.findIndex((t) => (
+                        t.zu_chang_ === item.zu_chang_
+                    ))
+                })
+                resolve(qc)
+            })
         }
     }
 }
 </script>
 <style lang="less" scoped>
-
+.tableTab{
+    display: flex;
+    justify-content: flex-end
+}
 </style>