Browse Source

Merge branch 'master' of https://git.agilestar.cn/spfm-group/spfm-market-front

540352293 3 years ago
parent
commit
c3935e1eeb

+ 1 - 1
src/components/myMessage.vue

@@ -17,7 +17,7 @@
 
 <script>
     export default {
-        props: ["centerDialogVisible","messTit"],
+        props: ["centerDialogVisible","messTit",'type'],
         data() {
             return {
 

+ 27 - 5
src/components/upload.vue

@@ -16,7 +16,7 @@
 </template>
 <script>
     export default {
-        props: ['fileInfo', 'fileList'],
+        props: ['fileInfo', 'fileList','type'],
         data() {
             return {
                 fileLists: [],
@@ -121,10 +121,32 @@
                     if (this.fileInfo.type === 'btn') {
                         this.$refs['upload'].clearFiles();
                         this.$emit('uploadBack',res)
-                        _this.$message({
-                            message: res.data.desc,
-                            type: 'success'
-                        });
+                        if(res.data.result==0){
+                            _this.$message({
+                                message: res.data.desc,
+                                type: 'success'
+                            });
+                        }else if(res.data.result==1){
+                            _this.$message({
+                                message: res.data.desc,
+                                type: 'error'
+                            });
+                        }else if(res.data.result==2){
+                            _this.$message({
+                                message: res.data.desc,
+                                type: 'warning'
+                            });
+                        }else if(res.data.result==3){
+                            _this.$message({
+                                message: res.data.desc,
+                                type: 'info'
+                            });
+                        }else{
+                            _this.$message({
+                                message: res.data.desc,
+                                type: 'success'
+                            });
+                        }
                         this.num--;
                         if (this.num == 0) {
                             this.loading = false;

+ 37 - 0
src/pages/main/advertising/acceptanceSituation.vue

@@ -2,6 +2,8 @@
     <fullscreen :fullscreen.sync="fullscreen" class="container">
         <div class="container-box">
             <div class="section2">
+                <el-button class="btn-check" size="medium" type="primary" @click="outlist" style="width: 100px;margin-right: 20px;margin-bottom: 20px;">导出
+                </el-button>
                 <el-button
                     type="primary"
                     @click="dialogApplication(1)"
@@ -537,7 +539,42 @@ export default {
         },
         getUser() {
             this.userInfo = JSON.parse(window.sessionStorage.userInfo);
+        },
+        outlist() {
+
+            let data = this.params;
+            console.log(data);
+            // return
+            this.$http({
+                url: "/market/advSubtask/excelExport",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                responseType: "blob",
+                data: data,
+            }).then((response) => {
+                if (window.navigator && window.navigator.msSaveOrOpenBlob) {
+                    let blob = new Blob([response.data], {
+                        type: 'application/vnd.ms-excel'
+                    })
+                    window.navigator.msSaveOrOpenBlob(blob,
+                        new Date().getTime() + '.xlsx')
+                } else {
+                    /* 火狐谷歌的文件下载方式 */
+                    var blob = new Blob([response.data])
+                    var downloadElement = document.createElement('a')
+                    var href = window.URL.createObjectURL(blob)
+                    downloadElement.href = href
+                    downloadElement.download = new Date().getTime() + '.xlsx'
+                    document.body.appendChild(downloadElement)
+                    downloadElement.click()
+                    document.body.removeChild(downloadElement)
+                    window.URL.revokeObjectURL(href)
+                }
+            });
         }
+    
     },
     mounted() {
         //地址栏不带参

+ 123 - 6
src/pages/main/advertising/businessHall.vue

@@ -2,6 +2,24 @@
     <fullscreen :fullscreen.sync="fullscreen" class="container">
         <div class="container-box">
             <toolList @iconCli="iconCli" :tooltit="tooltit"></toolList>
+            <div class="search" style="justify-content: flex-start;">
+                <el-button class="btn-check" size="medium" type="primary" @click="outlist">导出
+                </el-button>
+                <el-button class="btn-check" size="medium" type="primary" @click="exportTempletelist">下载导入模板
+                </el-button>
+                <myUpload style="display:inline-block;" :fileInfo="fileInfot"
+                        :fileList="fileInfot.fileList" @uploadBack='uploadBack'></myUpload>
+                <el-button
+                    class="btn-check"
+                    size="medium"
+                    type="primary"
+                    @click="dialogCheck(3)"
+                    v-if="
+                        userInfo.countyName != null || userInfo.cityName != null
+                    "
+                    >添加
+                </el-button>
+            </div>
             <div class="search">
                 <mySearch
                     :searchList="searchList"
@@ -433,12 +451,14 @@
 import mySearch from "../../../components/search.vue";
 import myMessage from "../../../components/myMessage.vue";
 import toolList from "../../../components/toolList";
+import myUpload from "../../../components/upload.vue";
 
 export default {
     components: {
         mySearch,
         myMessage,
-        toolList
+        toolList,
+        myUpload
     },
     data() {
         //地市名称
@@ -649,25 +669,37 @@ export default {
                     type: "input",
                     tit: "地市名称",
                     value: "",
-                    width: "24%"
+                    width: "16%"
                 },
                 {
                     type: "input",
                     tit: "区县名称",
                     value: "",
-                    width: "24%"
+                    width: "16%"
                 },
                 {
                     type: "input",
                     tit: "渠道名称",
                     value: "",
-                    width: "24%"
+                    width: "16%"
                 },
                 {
                     type: "input",
                     tit: "场景",
                     value: "",
-                    width: "24%"
+                    width: "16%"
+                },
+                {
+                    type: "input",
+                    tit: "物料类别",
+                    value: "",
+                    width: "16%"
+                },
+                {
+                    type: "input",
+                    tit: "物料名称",
+                    value: "",
+                    width: "16%"
                 }
             ],
             tooltit: "物料基础信息维护",
@@ -794,7 +826,16 @@ export default {
             metirialTypeopt: [],
             materialNameopt: [],
             metirialInfoSingle: [],
-            quantityDisabled: true
+            quantityDisabled: true,
+            fileInfot: {
+                    type: 'btn',
+                    typename: '导入',
+                    btntype: 'primary',
+                    limit: 1,
+                    url: '/market/cadvBusiMetirial/import',
+                    fileList: [],
+                    woNo: "",
+                },
         };
     },
     computed: {
@@ -902,6 +943,9 @@ export default {
             v[1] ? (this.params.countyName = v[1]) : "";
             v[2] ? (this.params.channelName = v[2]) : "";
             v[3] ? (this.params.sceneName = v[3]) : "";
+            //新增物料类别和物料名称模糊查询
+            v[4] ? (this.params.metirialType = v[4]) : "";
+            v[5] ? (this.params.metirialName = v[5]) : "";
             this.getList(this.params, this.pageSize);
         },
         //获取列表
@@ -1083,7 +1127,14 @@ export default {
         },
         //文件返回值
         uploadBack(v) {
+            let that = this;
             console.log(v);
+            if(v.data.result==0){
+                that.getList({}, 1);
+                that.getUser();
+                that.getMetirialType();
+                that.getMetirialInfo();
+            }
         },
         //功能栏
         iconCli(v) {
@@ -1204,6 +1255,72 @@ export default {
             }).then(res => {
                 this.materialNameopt = res.data;
             });
+        },
+        outlist() {
+            let data = this.params;
+            console.log(data);
+            // return
+            this.$http({
+                url: "/market/cadvBusiMetirial/excelExportBase",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                responseType: "blob",
+                data: data,
+            }).then((response) => {
+                if (window.navigator && window.navigator.msSaveOrOpenBlob) {
+                    let blob = new Blob([response.data], {
+                        type: 'application/vnd.ms-excel'
+                    })
+                    window.navigator.msSaveOrOpenBlob(blob,
+                        new Date().getTime() + '.xlsx')
+                } else {
+                    /* 火狐谷歌的文件下载方式 */
+                    var blob = new Blob([response.data])
+                    var downloadElement = document.createElement('a')
+                    var href = window.URL.createObjectURL(blob)
+                    downloadElement.href = href
+                    downloadElement.download = new Date().getTime() + '.xlsx'
+                    document.body.appendChild(downloadElement)
+                    downloadElement.click()
+                    document.body.removeChild(downloadElement)
+                    window.URL.revokeObjectURL(href)
+                }
+            });
+        },
+        exportTempletelist() {
+            let data = this.params;
+            console.log(data);
+            // return
+            this.$http({
+                url: "/market/cadvBusiMetirial/excelExportTemplete",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                responseType: "blob",
+                data: data,
+            }).then((response) => {
+                if (window.navigator && window.navigator.msSaveOrOpenBlob) {
+                    let blob = new Blob([response.data], {
+                        type: 'application/vnd.ms-excel'
+                    })
+                    window.navigator.msSaveOrOpenBlob(blob,
+                        new Date().getTime() + '.xlsx')
+                } else {
+                    /* 火狐谷歌的文件下载方式 */
+                    var blob = new Blob([response.data])
+                    var downloadElement = document.createElement('a')
+                    var href = window.URL.createObjectURL(blob)
+                    downloadElement.href = href
+                    downloadElement.download = new Date().getTime() + '.xlsx'
+                    document.body.appendChild(downloadElement)
+                    downloadElement.click()
+                    document.body.removeChild(downloadElement)
+                    window.URL.revokeObjectURL(href)
+                }
+            });
         }
     },
     mounted() {

+ 18 - 18
src/pages/main/busitime/busiTime.vue

@@ -14,40 +14,40 @@
             </div>
             <div class="tabbox">
 
-                    <el-table height="calc(100% - 40px)" v-loading="loading" class="com-table" ref="multipleTable"
+                    <el-table height="100%" v-loading="loading" class="com-table" ref="multipleTable"
                               :data="tableData" tooltip-effect="dark" size="small" border style="width: 100%">
                     <el-table-column prop="region" fixed label="地市"> </el-table-column>
                     <el-table-column align="center" label="业务办理平均时长(秒)-自有渠道">
-                        <el-table-column prop="zyYxhdbl" label="营销活动办理"></el-table-column>
+                        <el-table-column prop="zyYxhdbl" label="营销活动办理" width="100px"></el-table-column>
                         <el-table-column prop="zyZfbg" label="资费变更"></el-table-column>
                         <el-table-column prop="zyPtjf" label="普通缴费"></el-table-column>
                         <el-table-column prop="zyKh" label="开户"></el-table-column>
                         <el-table-column prop="zyBk" label="补卡"></el-table-column>
-                        <el-table-column prop="zyYxhdqx" label="营销活动取消"></el-table-column>
-                        <el-table-column prop="zyZnzwjz" label="智能组网加装业务受理"></el-table-column>
-                        <el-table-column prop="zyXhzwkh" label="携号转网开户"></el-table-column>
-                        <el-table-column prop="zyJtcygl" label="家庭成员管理"></el-table-column>
+                        <el-table-column prop="zyYxhdqx" label="营销活动取消" width="100px"></el-table-column>
+                        <el-table-column prop="zyZnzwjz" label="智能组网加装业务受理" width="150px"></el-table-column>
+                        <el-table-column prop="zyXhzwkh" label="携号转网开户" width="100px"></el-table-column>
+                        <el-table-column prop="zyJtcygl" label="家庭成员管理" width="100px"></el-table-column>
                         <el-table-column prop="zyGh" label="过户"></el-table-column>
-                        <el-table-column prop="zyYhmmgq" label="用户密码修改"></el-table-column>
+                        <el-table-column prop="zyYhmmgq" label="用户密码修改" width="100px"></el-table-column>
                         <el-table-column prop="zyXh" label="销户"></el-table-column>
-                        <el-table-column prop="zyLlgx" label="流量共享业务"></el-table-column>
-                        <el-table-column prop="zyRhkd" label="融合宽带业务"></el-table-column>
+                        <el-table-column prop="zyLlgx" label="流量共享业务" width="100px"></el-table-column>
+                        <el-table-column prop="zyRhkd" label="融合宽带业务" width="100px"></el-table-column>
                     </el-table-column>
                     <el-table-column align="center" label="业务办理平均时长(秒)-社会渠道">
-                        <el-table-column prop="shYxhdbl" label="营销活动办理"></el-table-column>
+                        <el-table-column prop="shYxhdbl" label="营销活动办理" width="100px"></el-table-column>
                         <el-table-column prop="shZfbg" label="资费变更"></el-table-column>
                         <el-table-column prop="shPtjf" label="普通缴费"></el-table-column>
                         <el-table-column prop="shKh" label="开户"></el-table-column>
                         <el-table-column prop="shBk" label="补卡"></el-table-column>
-                        <el-table-column prop="shYxhdqx" label="营销活动取消"></el-table-column>
-                        <el-table-column prop="shZnzwjz" label="智能组网加装业务受理"></el-table-column>
-                        <el-table-column prop="shXhzwkh" label="携号转网开户"></el-table-column>
-                        <el-table-column prop="shJtcygl" label="家庭成员管理"></el-table-column>
+                        <el-table-column prop="shYxhdqx" label="营销活动取消" width="100px"></el-table-column>
+                        <el-table-column prop="shZnzwjz" label="智能组网加装业务受理" width="150px"></el-table-column>
+                        <el-table-column prop="shXhzwkh" label="携号转网开户" width="100px"></el-table-column>
+                        <el-table-column prop="shJtcygl" label="家庭成员管理" width="100px"></el-table-column>
                         <el-table-column prop="shGh" label="过户"></el-table-column>
-                        <el-table-column prop="shYhmmgq" label="用户密码修改"></el-table-column>
+                        <el-table-column prop="shYhmmgq" label="用户密码修改" width="100px"></el-table-column>
                         <el-table-column prop="shXh" label="销户"></el-table-column>
-                        <el-table-column prop="shLlgx" label="流量共享业务"></el-table-column>
-                        <el-table-column prop="shRhkd" label="融合宽带业务"></el-table-column>
+                        <el-table-column prop="shLlgx" label="流量共享业务" width="100px"></el-table-column>
+                        <el-table-column prop="shRhkd" label="融合宽带业务" width="100px"></el-table-column>
                     </el-table-column>
                 </el-table>
 
@@ -80,7 +80,7 @@ export default {
           {
               type: 'date',
               tit: '数据时间',
-              value: new Date(),
+              value: new Date(new Date()-24*60*60*1000),
               width: '100%',
           }
         ],

+ 29 - 28
src/pages/main/busitime/busiTimeout.vue

@@ -16,20 +16,20 @@
                 <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
             </div>
             <div class="tabbox">
-                <el-table height="calc(100% - 40px)" v-loading="loading" class="com-table" ref="multipleTable"
+                <el-table height="100%" v-loading="loading" class="com-table" ref="multipleTable"
                           :data="tableData" tooltip-effect="dark" size="small" border style="width: 100%">
-                    <el-table-column prop="region" fixed label="地市"> </el-table-column>
+                    <el-table-column prop="region" label="地市"> </el-table-column>
                     <el-table-column prop="channelType" label="渠道类型"></el-table-column>
                     <el-table-column prop="opName" label="业务类型"></el-table-column>
                     <el-table-column prop="normalTime" label="标准用时(秒)"></el-table-column>
-                    <el-table-column prop="busiTimeoutTime" label="异常业务平均用时(秒)"></el-table-column>
-                    <el-table-column prop="busiTimeoutPercentage" label="异常用时超出比例"></el-table-column>
+                    <el-table-column prop="busiTimeoutTime" label="异常业务平均用时(秒)" width="160px"></el-table-column>
+                    <el-table-column prop="busiTimeoutPercentage" label="异常用时超出比例" width="140px"></el-table-column>
                     <el-table-column prop="busiTotal" label="总业务笔数"></el-table-column>
                     <el-table-column prop="timeoutTotal" label="超时业务笔数"></el-table-column>
                     <el-table-column prop="timeoutPercentage" label="超时业务量占比"></el-table-column>
                     <el-table-column label="操作" width="220px" align="center">
                         <template slot-scope="scope">
-                            <el-button size="mini" type="primary" @click="dialogCheck(scope.row)">查看超时业务详情</el-button>
+                            <el-button :disabled="scope.row.region == '全省'" size="mini" type="primary" @click="dialogCheck(scope.row)">查看超时业务详情</el-button>
                         </template>
                     </el-table-column>
                 </el-table>
@@ -37,10 +37,10 @@
             </div>
         </fullscreen>
         <el-dialog title="异常数据监控(超时业务笔数达到或超过10%)" :visible.sync="dialogStatus" width="50%" :destroy-on-close="true"
-                   :modal-append-to-body="false" :close-on-click-modal="false" :before-close="closedia">
-            <div v-loading="loadinged">
+                   :modal-append-to-body="false" :close-on-click-modal="true" >
+            <div>
                 <el-table
-                    height="calc(90%)"
+                    height="400px"
                     v-loading="loadingDialog"
                     class="com-table"
                     ref="multipleTable"
@@ -50,16 +50,17 @@
                     style="width: 100%"
                     :row-class-name="addRowId"
                     id="rptTable"
+                    
                 >
                     <el-table-column prop="region" fixed label="地市"> </el-table-column>
                     <el-table-column prop="channelType" label="渠道类型"></el-table-column>
-                    <el-table-column prop="opName" label="业务类型"></el-table-column>
-                    <el-table-column prop="shop" label="网点"></el-table-column>
+                    <el-table-column prop="opName" label="业务类型" width="180px"></el-table-column>
+                    <el-table-column prop="shop" label="网点" width="200px"></el-table-column>
                     <el-table-column prop="channelCode" label="渠道编码"></el-table-column>
                     <!-- <el-table-column prop="busiType" label="业务类型"></el-table-column> -->
                     <el-table-column prop="normalTime" label="标准用时"></el-table-column>
-                    <el-table-column prop="timeoutTotal" label="超时业务笔数"></el-table-column>
-                    <el-table-column prop="aveTime" label="平均实际用时"></el-table-column>
+                    <el-table-column prop="timeoutTotal" label="超时业务笔数" width="120px"></el-table-column>
+                    <el-table-column prop="aveTime" label="平均实际用时" width="120px"></el-table-column>
                     <el-table-column prop="timeoutFlag" label="是否超时"></el-table-column>
                 </el-table>
                 <div slot="footer" class="dialog-footer myfooter">
@@ -97,19 +98,19 @@ export default {
           value: '-',
           width: '32%',
           options: [{dataName:'全部',dataCode:'-'},
-              {dataName:'哈尔滨',dataCode:'哈尔滨'},
-              {dataName:'齐齐哈尔',dataCode:'齐齐哈尔'},
-              {dataName:'牡丹江',dataCode:'牡丹江'},
-              {dataName:'佳木斯',dataCode:'佳木斯'},
-              {dataName:'大庆',dataCode:'大庆'},
-              {dataName:'鸡西',dataCode:'鸡西'},
-              {dataName:'双鸭山',dataCode:'双鸭山'},
-              {dataName:'伊春',dataCode:'伊春'},
-              {dataName:'七台河',dataCode:'七台河'},
-              {dataName:'鹤岗',dataCode:'鹤岗'},
-              {dataName:'黑河',dataCode:'黑河'},
-              {dataName:'绥化',dataCode:'绥化'},
-              {dataName:'大兴安岭地区',dataCode:'大兴安岭地区'}],
+              {dataName:'哈尔滨',dataCode:'哈尔滨'},
+              {dataName:'齐齐哈尔',dataCode:'齐齐哈尔'},
+              {dataName:'牡丹江',dataCode:'牡丹江'},
+              {dataName:'佳木斯',dataCode:'佳木斯'},
+              {dataName:'大庆',dataCode:'大庆'},
+              {dataName:'鸡西',dataCode:'鸡西'},
+              {dataName:'双鸭山',dataCode:'双鸭山'},
+              {dataName:'伊春',dataCode:'伊春'},
+              {dataName:'七台河',dataCode:'七台河'},
+              {dataName:'鹤岗',dataCode:'鹤岗'},
+              {dataName:'黑河',dataCode:'黑河'},
+              {dataName:'绥化',dataCode:'绥化'},
+              {dataName:'大兴安岭',dataCode:'大兴安岭'}],
       },{
           type: 'sel',
           tit: '渠道类型',
@@ -141,7 +142,7 @@ export default {
           {
               type: 'date',
               tit: '数据时间',
-              value: new Date(),
+              value: new Date(new Date()-24*60*60*1000),
               width: '32%',
           }
         ],
@@ -328,11 +329,11 @@ export default {
 
   created() {
 
-      var date = new Date(this.searchList[2].value);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
+      var date = new Date(this.searchList[3].value);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
       var Y = date.getFullYear();
       var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1);
       var D = (date.getDate()+1 < 10 ? '0'+(date.getDate()) : date.getDate())
-      this.params={opTime:Y+M+D,channelType:this.searchList[1].value,opName:this.searchList[2].value}
+      this.params={opTime:Y+M+D,channelType:this.searchList[1].value}
       this.getList(this.params, this.pageSize);
 
   },

File diff suppressed because it is too large
+ 517 - 500
src/pages/main/competitor/addCompetitor.vue


+ 754 - 0
src/pages/main/competitor/addCompetitorNew.vue

@@ -0,0 +1,754 @@
+<template>
+    <div>
+        <fullscreen :fullscreen.sync="fullscreen" class="container structure-l" style="margin: 0;width: calc(75% - 15px);">
+            <div class="container-box">
+                <toolList @iconCli='iconCli' :tooltit='tooltit'></toolList>
+                <div class="info-form">
+                    <el-form :model="infolist" ref="infolist" :rules="rules">
+                        <div class="info-line">
+                            <el-form-item prop="violationCate">
+                                <span><i>*</i>类别</span>
+                                <el-select :popper-append-to-body="false" v-model="infolist.violationCate" placeholder="请选择类别" @change="verifcheck(1)">
+                                    <el-option v-for="item in options1" :key="item.orderNumber" :label="item.dataName"
+                                               :value="item.dataCode">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                            <el-form-item prop="provinceCode">
+                                <span><i>*</i>地域</span>
+                                <el-select :popper-append-to-body="false" v-model="infolist.provinceCode" placeholder="请选择省份" @change="verifcheck(2)">
+                                    <el-option v-for="item in options2" :key="item.orderNumber" :label="item.dataName"
+                                               :value="item.dataCode">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                        </div>
+                        <div class="info-line">
+                            <el-form-item prop="operatorCode">
+                                <span><i>*</i>运营商</span>
+                                <el-select :popper-append-to-body="false" v-model="infolist.operatorCode" placeholder="请选择运营商" @change="verifcheck(3)">
+                                    <el-option v-for="item in options3" :key="item.orderNumber" :label="item.dataName"
+                                               :value="item.dataCode">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                            <el-form-item prop="packageGear">
+                                <span><i>*</i>套餐档位</span>
+                                <el-select v-model="infolist.packageGear" placeholder="请选择" @change="verifcheck(4)" >
+                                    <el-option
+                                        v-for="item in options6"
+                                        :key="item.value"
+                                        :label="item.label"
+                                        :value="item.value">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                        </div>
+                        <div class="info-line">
+                            <el-form-item prop="tariffName">
+                                <span><i>*</i>套餐名称</span>
+                                <el-input v-model="infolist.tariffName" placeholder="请输入资费名称"></el-input>
+                            </el-form-item>
+                            <el-form-item prop="recordRegionCode" class="info-line tea-r">
+                                <span><i>*</i>地市</span>
+                                <el-select :popper-append-to-body="false" v-model="infolist.recordRegionCode" placeholder="请选择违规地市" @change="verifcheck(5)">
+                                    <el-option v-for="item in options5" :key="item.dataCode" :label="item.dataName"
+                                               :value="item.dataCode">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                        </div>
+                        <div class="info-line">
+                            <el-form-item prop="monthFee">
+                                <span><i>*</i>月费(元)</span>
+                                <el-input v-model="infolist.monthFee" placeholder="请输入月费金额"></el-input>
+                            </el-form-item>
+                            <el-form-item prop="preFee">
+                                <span><i>*</i>预存款(元)</span>
+                                <el-input v-model="infolist.preFee" placeholder="请输入预存款金额"></el-input>
+                            </el-form-item>
+                            <el-form-item prop="concessionalRate">
+                                <span><i>*</i>优惠价(元)</span>
+                                <el-input v-model="infolist.concessionalRate" placeholder="请输入预存款金额"></el-input>
+                            </el-form-item>
+                        </div>
+                        <div class="info-line">
+                            <el-form-item>
+                                <span><i></i>酬金</span>
+                                <el-input v-model="infolist.remFee" placeholder="请输入酬金金额"></el-input>
+                            </el-form-item>
+                            <el-form-item prop="saleChnl">
+                                <span><i>*</i>销售渠道</span>
+                                <el-select :popper-append-to-body="false" v-model="infolist.saleChnl" placeholder="请选择销售渠道">
+                                    <el-option v-for="item in saleChnlopt" :key="item.dataName" :label="item.dataName"
+                                               :value="item.dataName">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                        </div>
+                        <div class="info-line">
+                            <el-form-item>
+                                <span><i></i>销售范围</span>
+                                <el-input v-model="infolist.saleScope" placeholder="请输入销售范围"></el-input>
+                            </el-form-item>
+                            <el-form-item>
+                                <span><i></i>月销量</span>
+                                <el-input v-model="infolist.monthSale" placeholder="请输入月销量"></el-input>
+                            </el-form-item>
+                            <el-form-item prop="isDb">
+                                <span><i>*</i>是否包含宽带</span>
+                                <el-select v-model="infolist.isDb" placeholder="请选择" >
+                                    <el-option
+                                        v-for="item in options7"
+                                        :key="item.value"
+                                        :label="item.label"
+                                        :value="item.value">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                            <el-form-item>
+                                <span><i></i>宽带内容</span>
+                                <el-input v-model="infolist.dbContent" placeholder="请输入宽带内容"></el-input>
+                            </el-form-item>
+                        </div>
+
+                        <el-form-item prop="taffiffContent" class="info-line online">
+                            <span><i>*</i>套餐内容</span>
+                            <el-input v-model="infolist.taffiffContent" placeholder="请输入资费内容" type="textarea" :rows="3"></el-input>
+                        </el-form-item>
+                        <div style="padding-left: 60px">
+                            <myUpload @uploadBack="uploadBack" :fileInfo="fileInfo" :fileList="fileInfo.fileList"></myUpload>
+                        </div>
+                    </el-form>
+                </div>
+                <div class="titbtn-box">
+                    <el-button type="primary" plain @click="submitList(1)">取消</el-button>
+                    <el-button type="primary" @click="submitList">提交</el-button>
+                </div>
+            </div>
+        </fullscreen>
+        <competeRight></competeRight>
+    </div>
+</template>
+<script>
+import competeRight from "../../../components/competeRight";
+import myUpload from "../../../components/upload";
+import toolList from "../../../components/toolList";
+
+export default {
+    components: {
+        competeRight,
+        myUpload,
+        toolList
+    },
+    data() {
+        const fileLists = (rule, value, callback) => {
+            if (!this.fileLists.length > 0) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const opName = (rule, value, callback) => {
+            if (!this.infolist.opName) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const contactPhone = (rule, value, callback) => {
+            let x = this.infolist.contactPhone * 1;
+            if (!(/^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/.test(x))) {
+                callback(new Error('请输入正确的电话号码'))
+            } else {
+                callback()
+            }
+        }
+        const violationCate = (rule, value, callback) => {
+            if (!this.infolist.violationCate) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const provinceCode = (rule, value, callback) => {
+            if (!this.infolist.provinceCode) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const operatorCode = (rule, value, callback) => {
+            if (!this.infolist.operatorCode) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const recordRegionCode = (rule, value, callback) => {
+            if (!this.infolist.recordRegionCode) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const packageGear = (rule, value, callback) => {
+            if (!this.infolist.packageGear) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const tariffName = (rule, value, callback) => {
+            if (!this.infolist.tariffName) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const monthFee = (rule, value, callback) => {
+            let x = isNaN(this.infolist.monthFee);
+            if (x) {
+                callback(new Error('请输入数字'))
+            } else {
+                callback()
+            }
+        }
+        const preFee = (rule, value, callback) => {
+            let x = isNaN(this.infolist.preFee);
+            if (x) {
+                callback(new Error('请输入数字'))
+            } else {
+                callback()
+            }
+        }
+        const concessionalRate = (rule, value, callback) => {
+            let x = isNaN(this.infolist.concessionalRate);
+            if (x) {
+                callback(new Error('请输入数字'))
+            } else {
+                callback()
+            }
+        }
+        const remFee = (rule, value, callback) => {
+            if (!this.infolist.remFee) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const saleChnl = (rule, value, callback) => {
+            if (!this.infolist.saleChnl) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const saleScope = (rule, value, callback) => {
+            if (!this.infolist.saleScope) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const monthSale = (rule, value, callback) => {
+            if (!this.infolist.monthSale) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const isDb = (rule, value, callback) => {
+            if (!this.infolist.isDb) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const dbContent = (rule, value, callback) => {
+            if (!this.infolist.dbContent) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const evidenceType = (rule, value, callback) => {
+            if (!this.infolist.evidenceType) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const validateUsername = (rule, value, callback) => {
+            if (!this.infolist.violationContent) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const taffiffContent = (rule, value, callback) => {
+            if (!this.infolist.taffiffContent) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        return {
+            rules: {
+                fileLists: [{
+                    required: true,
+                    trigger: 'change',
+                    validator: fileLists
+                }],
+                recordRegionCode: [{
+                    required: true,
+                    trigger: 'change',
+                    validator: recordRegionCode
+                }],
+                opName: [{
+                    required: true,
+                    trigger: 'blur',
+                    validator: opName
+                }],
+                contactPhone: [{
+                    required: true,
+                    trigger: 'blur',
+                    validator: contactPhone
+                }],
+                violationCate: [{
+                    required: true,
+                    trigger: 'change',
+                    validator: violationCate
+                }],
+                provinceCode: [{
+                    required: true,
+                    trigger: 'change',
+                    validator: provinceCode
+                }],
+                operatorCode: [{
+                    required: true,
+                    trigger: 'change',
+                    validator: operatorCode
+                }],
+                packageGear: [{
+                    required: true,
+                    trigger: 'change',
+                    validator: packageGear
+                }],
+                tariffName: [{
+                    required: true,
+                    trigger: 'blur',
+                    validator: tariffName
+                }],
+                monthFee: [{
+                    required: true,
+                    trigger: 'blur',
+                    validator: monthFee
+                }],
+                preFee: [{
+                    required: true,
+                    trigger: 'blur',
+                    validator: preFee
+                }],
+                concessionalRate: [{
+                    required: true,
+                    trigger: 'blur',
+                    validator: concessionalRate
+                }],
+                remFee: [{
+                    required: true,
+                    trigger: 'blur',
+                    validator: remFee
+                }],
+                saleChnl: [{
+                    required: true,
+                    trigger: 'change',
+                    validator: saleChnl
+                }],
+                monthSale: [{
+                    required: true,
+                    trigger: 'blur',
+                    validator: monthSale
+                }],
+                isDb: [{
+                    required: true,
+                    trigger: 'blur',
+                    validator: isDb
+                }],
+                dbContent: [{
+                    required: true,
+                    trigger: 'blur',
+                    validator: dbContent
+                }],
+                evidenceType: [{
+                    required: true,
+                    trigger: 'blur',
+                    validator: evidenceType
+                }],
+                saleScope: [{
+                    required: true,
+                    trigger: 'blur',
+                    validator: saleScope
+                }],
+                violationContent: [{
+                    required: true,
+                    trigger: 'blur',
+                    validator: validateUsername
+                }],
+                taffiffContent: [{
+                    required: true,
+                    trigger: 'blur',
+                    validator: taffiffContent
+                }],
+            },
+            tooltit: '新增竞争对手信息',
+            infolist: {},
+            options1: [],
+            options2: [],
+            options3: [],
+            options4: [],
+            options5: [],
+            options6: [{
+                value: '低档:58元以下套餐',
+                label: '低档:58元以下套餐'
+            }, {
+                value: '中档:58元(含)-128元套餐(不含)',
+                label: '中档:58元(含)-128元套餐(不含)'
+            }, {
+                value: '高档:128元及以上套餐',
+                label: '高档:128元及以上套餐'
+            }],
+            options7: [{
+                value: '是',
+                label: '是'
+            }, {
+                value: '否',
+                label: '否'
+            }],
+            saleChnlopt: [],
+            fullscreen: false,
+            fileList: [],
+            fileLists: [],
+            attList: [],
+            fileInfo: {
+                limit: 5,
+                url: '/market/compatt/upload',
+                fileList: []
+            },
+            userInfo: {},
+        }
+    },
+    methods: {
+        //功能栏
+        iconCli(v) {
+            if (v === 1) {
+
+            }
+            if (v === 2) {
+                this.fullscreen = !this.fullscreen
+            }
+        },
+        //查询字典
+        getListwglb() {
+            this.$http({
+                url: "/market/cfgDataDict/queryList",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {
+                    dictCode: 'wglb'
+                },
+            }).then((res) => {
+                this.options1 = res.data;
+            });
+        },
+        getListsf() {
+            this.$http({
+                url: "/market/cfgDataDict/queryList",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {
+                    dictCode: 'sf'
+                },
+            }).then((res) => {
+                this.options2 = res.data;
+            });
+        },
+        getListyys(v) {
+            this.$http({
+                url: "/market/cfgDataDict/queryList",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {
+                    dictCode: 'yys'
+                },
+            }).then((res) => {
+                if (v === 1) {
+                    this.options3 = [];
+                    res.data.forEach(item => {
+                        if (item.dataName !== '移动') {
+                            this.options3.push(item)
+                        }
+                    })
+                } else {
+                    this.options3 = res.data;
+                }
+            });
+        },
+        getListwgxx() {
+            this.$http({
+                url: "/market/cfgDataDict/queryList",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {
+                    dictCode: 'wgxx'
+                },
+            }).then((res) => {
+                this.options4 = res.data;
+            });
+        },
+        getListregion() {
+            this.$http({
+                url: "/market/cfgDataDict/queryList",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {
+                    dictCode: 'region'
+                },
+            }).then((res) => {
+                this.options5 = res.data;
+            });
+        },
+        getsaleChnl() {
+            this.$http({
+                url: "/market/cfgDataDict/queryList",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {
+                    dictCode: 'saleChnl'
+                },
+            }).then((res) => {
+                this.saleChnlopt = res.data;
+            });
+        },
+        //添加、取消
+        submitList(v) {
+            if (v === 1) {
+                this.getUser();
+                this.$router.push("/competitor?type=1");
+                return
+            }
+            let _this = this;
+            let attList = [];
+            for (let i = 0; i < this.attList.length; i++) {
+                attList.push({
+                    id: this.attList[i].id
+                });
+            }
+            this.$refs.infolist.validate(valid => {
+                if (valid) {
+                    let nowdata = _this.$formatDate(new Date(), "YYYY-MM-DD");
+                    this.infolist.opTime = nowdata;
+                    this.infolist.sts = 0;
+                    this.infolist.stsDesc = '未审核';
+                    this.infolist.type = '正规';
+                    this.$http({
+                        url: "/market/cwcompetitor/save",
+                        method: "post",
+                        headers: {
+                            "Content-Type": "application/json",
+                        },
+                        data: {
+                            wCompetitor: this.infolist,
+                            attList: attList
+                        },
+                    }).then((res) => {
+                        if (res.data.result === 1) {
+                            _this.$message({
+                                message: res.data.desc,
+                                type: 'error'
+                            });
+                        } else {
+                            _this.$message({
+                                message: '添加成功',
+                                type: 'success'
+                            });
+                            _this.$router.push("/competitor");
+                        }
+                    });
+                }
+            })
+        },
+        //处理所需数据
+        verifcheck(v) {
+            if (v === 1) {
+                for (let i = 0; i < this.options1.length; i++) {
+                    if (this.options1[i].dataCode === this.infolist.violationCate) {
+                        this.infolist.violationCateName = this.options1[i].dataName
+                    }
+                }
+            }
+            if (v === 2) {
+                if (this.infolist.provinceCode === 'hlj') {
+                    this.getListyys(1);
+                    if (this.infolist.operatorCode === 'mobile') {
+                        this.infolist.operatorCode = '';
+                    }
+                } else {
+                    this.getListyys();
+                }
+                for (let i = 0; i < this.options2.length; i++) {
+                    if (this.options2[i].dataCode === this.infolist.provinceCode) {
+                        this.infolist.provinceName = this.options2[i].dataName
+                    }
+                }
+            }
+            if (v === 3) {
+                for (let i = 0; i < this.options3.length; i++) {
+                    if (this.options3[i].dataCode === this.infolist.operatorCode) {
+                        this.infolist.operatorName = this.options3[i].dataName
+                    }
+                }
+            }
+            if (v === 4) {
+                for (let i = 0; i < this.options4.length; i++) {
+                    if (this.options4[i].dataCode === this.infolist.violationItem) {
+                        this.infolist.violationItemName = this.options4[i].dataName
+                    }
+                }
+            }
+            if (v === 5) {
+                for (let i = 0; i < this.options5.length; i++) {
+                    if (this.options5[i].dataCode === this.infolist.recordRegionCode) {
+                        this.infolist.recordRegionName = this.options5[i].dataName
+                    }
+                }
+            }
+        },
+        uploadBack(v) {
+            this.attList = v;
+        },
+        getUser() {
+            this.userInfo = JSON.parse(window.sessionStorage.userInfo);
+            this.infolist = {
+                opNo: '',
+                regionName: '',
+                regionCode: '',
+                deptName: '',
+                deptCode: '',
+                opName: '',
+                contactPhone: '',
+            };
+            this.infolist.opNo = this.userInfo.loginNo;
+            // this.infolist.regionName = '';
+            // this.infolist.regionCode = '';
+            // this.infolist.deptName = '';
+            // this.infolist.deptCode = '';
+            this.infolist.opName = this.userInfo.loginName;
+            this.infolist.contactPhone = this.userInfo.phoneNo;
+        }
+    },
+    mounted() {
+
+    },
+    created() {
+        this.getListwglb();
+        this.getListyys();
+        this.getListsf();
+        this.getListwgxx();
+        this.getListregion();
+        this.getsaleChnl();
+        this.getUser();
+    },
+    watch:{
+        $route(to, from) {
+            if(to.path === '/addCompetitor'){
+
+            }
+        },
+    }
+}
+</script>
+<style scoped lang="scss">
+.titbox {
+    div {
+        float: right;
+        margin-top: 20px;
+
+        i {
+            font-size: 22px;
+            margin-left: 20px;
+            cursor: pointer;
+        }
+    }
+}
+
+.info-form {
+    margin-top: 30px;
+    height: calc(100% - 150px);
+    overflow-y: scroll;
+
+    .info-line {
+        width: 100%;
+        display: block;
+
+        div {
+            width: 50%;
+            display: inline-block;
+        }
+
+        span {
+            width: 80px;
+            display: inline-block;
+            text-align: left;
+
+            i {
+                color: red;
+                display: inline-block;
+                padding-right: 5px;
+            }
+        }
+
+        .el-select,
+        .el-input {
+            width: calc(100% - 100px);
+        }
+    }
+
+    .tea-r {
+        /*text-align: right;*/
+    }
+
+    .online {
+        width: 100%;
+
+        span {
+            vertical-align: top;
+        }
+
+        .el-textarea {
+            width: calc(100% - 100px);
+        }
+    }
+}
+
+.titbtn-box {
+    text-align: right;
+    margin: 15px 20px 0 0;
+
+    button {
+        width: 120px;
+    }
+}
+</style>

+ 793 - 0
src/pages/main/competitor/changeCompetNew.vue

@@ -0,0 +1,793 @@
+<template>
+    <div>
+        <fullscreen :fullscreen.sync="fullscreen" class="container structure-l" style="margin: 0;width: calc(75% - 15px);">
+            <div class="container-box">
+                <toolList @iconCli='iconCli' :tooltit='tooltit'></toolList>
+                <div class="info-form">
+                    <el-form :model="infolist" ref="infolist" :rules="rules">
+                        <div class="info-line">
+                            <el-form-item prop="violationCate">
+                                <span><i>*</i>类别</span>
+                                <el-select :popper-append-to-body="false" v-model="infolist.violationCate" placeholder="类别" @change="verifcheck(1)">
+                                    <el-option v-for="item in options1" :key="item.orderNumber" :label="item.dataName"
+                                               :value="item.dataCode">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                            <el-form-item prop="provinceCode">
+                                <span><i>*</i>地域</span>
+                                <el-select :popper-append-to-body="false" v-model="infolist.provinceCode" placeholder="省份" @change="verifcheck(2)">
+                                    <el-option v-for="item in options2" :key="item.orderNumber" :label="item.dataName"
+                                               :value="item.dataCode">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                        </div>
+                        <div class="info-line">
+                            <el-form-item prop="operatorCode">
+                                <span><i>*</i>运营商</span>
+                                <el-select :popper-append-to-body="false" v-model="infolist.operatorCode" placeholder="运营商" @change="verifcheck(3)">
+                                    <el-option v-for="item in options3" :key="item.orderNumber" :label="item.dataName"
+                                               :value="item.dataCode">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                            <el-form-item prop="packageGear">
+                                <span><i>*</i>套餐档位</span>
+                                <el-select :popper-append-to-body="false" v-model="infolist.packageGear" placeholder="违规项目" @change="verifcheck(4)">
+                                    <el-option
+                                        v-for="item in options6"
+                                        :key="item.value"
+                                        :label="item.label"
+                                        :value="item.value">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                        </div>
+                        <div class="info-line">
+                            <el-form-item prop="tariffName">
+                                <span><i>*</i>套餐名称</span>
+                                <el-input v-model="infolist.tariffName" placeholder="资费名称"></el-input>
+                            </el-form-item>
+                            <el-form-item prop="recordRegionCode" class="info-line tea-r">
+                                <span><i>*</i>地市</span>
+                                <el-select :popper-append-to-body="false" v-model="infolist.recordRegionCode" placeholder="违规地市" @change="verifcheck(5)">
+                                    <el-option v-for="item in options5" :key="item.dataCode" :label="item.dataName"
+                                               :value="item.dataCode">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                        </div>
+                        <div class="info-line">
+                            <el-form-item>
+                                <span>月费(元)</span>
+                                <el-input v-model="infolist.monthFee" placeholder="月费"></el-input>
+                            </el-form-item>
+                            <el-form-item>
+                                <span>预存款(元)</span>
+                                <el-input v-model="infolist.preFee" placeholder="预存款"></el-input>
+                            </el-form-item>
+                            <el-form-item>
+                                <span><i>*</i>优惠价(元)</span>
+                                <el-input v-model="infolist.concessionalRate" placeholder="请输入预存款金额"></el-input>
+                            </el-form-item>
+                        </div>
+                        <div class="info-line">
+                            <el-form-item>
+                                <span>酬金</span>
+                                <el-input v-model="infolist.remFee" placeholder="酬金"></el-input>
+                            </el-form-item>
+                            <el-form-item>
+                                <span>销售渠道</span>
+                                <el-select :popper-append-to-body="false" v-model="infolist.saleChnl" placeholder="请选择销售渠道">
+                                    <el-option v-for="item in saleChnlopt" :key="item.dataName" :label="item.dataName"
+                                               :value="item.dataName">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                        </div>
+                        <div class="info-line">
+                            <el-form-item prop="saleScope">
+                                <span><i>*</i>销售范围</span>
+                                <el-input v-model="infolist.saleScope" placeholder="销售范围"></el-input>
+                            </el-form-item>
+                            <el-form-item prop="monthSale">
+                                <span><i>*</i>月销量</span>
+                                <el-input v-model="infolist.monthSale" placeholder="月销量"></el-input>
+                            </el-form-item>
+                            <el-form-item prop="isDb">
+                                <span><i>*</i>是否包含宽带</span>
+                                <el-select v-model="infolist.isDb" placeholder="请选择" >
+                                    <el-option
+                                        v-for="item in options7"
+                                        :key="item.value"
+                                        :label="item.label"
+                                        :value="item.value">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                            <el-form-item>
+                                <span><i></i>宽带内容</span>
+                                <el-input v-model="infolist.dbContent" placeholder="请输入宽带内容"></el-input>
+                            </el-form-item>
+                        </div>
+                        <div class="info-line">
+                            <el-form-item>
+                                <span>解决结果</span>
+                                <el-select v-model="infolist.fixFlag" placeholder="解决结果">
+                                    <el-option v-for="item in ifoption" :key="item.id" :label="item.name" :value="item.id">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                            <el-form-item>
+                                <span>反馈总部</span>
+                                <el-select v-model="infolist.groupFlag" placeholder="是否反馈总部">
+                                    <el-option v-for="item in ifoption" :key="item.id" :label="item.name" :value="item.id">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                        </div>
+                        <div class="info-line">
+                            <el-form-item>
+                                <span>返回竞合</span>
+                                <el-select v-model="infolist.wwFlag" placeholder="是否返回竞合">
+                                    <el-option v-for="item in ifoption" :key="item.id" :label="item.name" :value="item.id">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                            <el-form-item>
+                                <span>反馈总局</span>
+                                <el-select v-model="infolist.admFlag" placeholder="是否反馈总局">
+                                    <el-option v-for="item in ifoption" :key="item.id" :label="item.name" :value="item.id">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                        </div>
+                        <!-- <div class="info-line">
+                            <el-form-item prop="opName">
+                                <span><i>*</i>上报人</span>
+                                <el-input v-model="infolist.opName" placeholder="销售范围"></el-input>
+                            </el-form-item>
+                            <el-form-item prop="contactPhone">
+                                <span><i>*</i>联系电话</span>
+                                <el-input v-model="infolist.contactPhone" placeholder="月销量"></el-input>
+                            </el-form-item>
+                        </div> -->
+                        <el-form-item prop="taffiffContent" class="info-line online">
+                            <span><i>*</i>资费内容</span>
+                            <el-input v-model="infolist.taffiffContent" placeholder="套餐内容" type="textarea" :rows="3"></el-input>
+                        </el-form-item>
+                        <div style="padding-left: 60px">
+                            <myUpload @uploadBack="uploadBack" :fileInfo="fileInfo" :fileList="fileInfo.fileList"></myUpload>
+                        </div>
+                    </el-form>
+                </div>
+                <div class="titbtn-box">
+                    <el-button type="primary" plain @click="submitList(1)">取消</el-button>
+                    <el-button type="primary" @click="submitList">提交</el-button>
+                </div>
+            </div>
+
+        </fullscreen>
+        <competeRight></competeRight>
+    </div>
+</template>
+<script>
+import competeRight from "../../../components/competeRight";
+import myUpload from "../../../components/upload";
+import toolList from "../../../components/toolList";
+
+export default {
+    components: {
+        competeRight,
+        myUpload,
+        toolList
+    },
+    data() {
+        const fileLists = (rule, value, callback) => {
+            if (!this.fileLists.length > 0) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const opName = (rule, value, callback) => {
+            if (!this.infolist.opName) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const contactPhone = (rule, value, callback) => {
+            let x = this.infolist.contactPhone * 1;
+            if (!(/^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/.test(x))) {
+                callback(new Error('请输入正确的电话号码'))
+            } else {
+                callback()
+            }
+        }
+        const violationCate = (rule, value, callback) => {
+            if (!this.infolist.violationCate) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const provinceCode = (rule, value, callback) => {
+            if (!this.infolist.provinceCode) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const operatorCode = (rule, value, callback) => {
+            if (!this.infolist.operatorCode) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const recordRegionCode = (rule, value, callback) => {
+            if (!this.infolist.recordRegionCode) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const violationItem = (rule, value, callback) => {
+            if (!this.infolist.violationItem) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const tariffName = (rule, value, callback) => {
+            if (!this.infolist.tariffName) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const monthFee = (rule, value, callback) => {
+            let x = isNaN(this.infolist.monthFee);
+            if (x) {
+                callback(new Error('请输入数字'))
+            } else {
+                callback()
+            }
+        }
+        const preFee = (rule, value, callback) => {
+            let x = isNaN(this.infolist.preFee);
+            if (x) {
+                callback(new Error('请输入数字'))
+            } else {
+                callback()
+            }
+        }
+        const remFee = (rule, value, callback) => {
+            if (!this.infolist.remFee) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const saleChnl = (rule, value, callback) => {
+            if (!this.infolist.saleChnl) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const saleScope = (rule, value, callback) => {
+            if (!this.infolist.saleScope) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const monthSale = (rule, value, callback) => {
+            if (!this.infolist.monthSale) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const validateUsername = (rule, value, callback) => {
+            if (!this.infolist.violationContent) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const taffiffContent = (rule, value, callback) => {
+            if (!this.infolist.taffiffContent) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        return {
+            rules: {
+                fileLists: [{
+                    required: true,
+                    trigger: 'change',
+                    validator: fileLists
+                }],
+                recordRegionCode: [{
+                    required: true,
+                    trigger: 'change',
+                    validator: recordRegionCode
+                }],
+                opName: [{
+                    required: true,
+                    trigger: 'blur',
+                    validator: opName
+                }],
+                contactPhone: [{
+                    required: true,
+                    trigger: 'blur',
+                    validator: contactPhone
+                }],
+                violationCate: [{
+                    required: true,
+                    trigger: 'change',
+                    validator: violationCate
+                }],
+                provinceCode: [{
+                    required: true,
+                    trigger: 'change',
+                    validator: provinceCode
+                }],
+                operatorCode: [{
+                    required: true,
+                    trigger: 'change',
+                    validator: operatorCode
+                }],
+                violationItem: [{
+                    required: true,
+                    trigger: 'change',
+                    validator: violationItem
+                }],
+                tariffName: [{
+                    required: true,
+                    trigger: 'blur',
+                    validator: tariffName
+                }],
+                monthFee: [{
+                    required: true,
+                    trigger: 'blur',
+                    validator: monthFee
+                }],
+                preFee: [{
+                    required: true,
+                    trigger: 'blur',
+                    validator: preFee
+                }],
+                remFee: [{
+                    required: true,
+                    trigger: 'blur',
+                    validator: remFee
+                }],
+                saleChnl: [{
+                    required: true,
+                    trigger: 'change',
+                    validator: saleChnl
+                }],
+                monthSale: [{
+                    required: true,
+                    trigger: 'blur',
+                    validator: monthSale
+                }],
+                saleScope: [{
+                    required: true,
+                    trigger: 'blur',
+                    validator: saleScope
+                }],
+                violationContent: [{
+                    required: true,
+                    trigger: 'blur',
+                    validator: validateUsername
+                }],
+                taffiffContent: [{
+                    required: true,
+                    trigger: 'blur',
+                    validator: taffiffContent
+                }],
+            },
+            tooltit: '修改竞争对手信息',
+            infolist: {
+                roomname: '0'
+            },
+            options1: [],
+            options2: [],
+            options3: [],
+            options4: [],
+            options5: [],
+            options6: [{
+                value: '低档:58元以下套餐',
+                label: '低档:58元以下套餐'
+            }, {
+                value: '中档:58元(含)-128元套餐(不含)',
+                label: '中档:58元(含)-128元套餐(不含)'
+            }, {
+                value: '高档:128元及以上套餐',
+                label: '高档:128元及以上套餐'
+            }],
+            options7: [{
+                value: '是',
+                label: '是'
+            }, {
+                value: '否',
+                label: '否'
+            }],
+            saleChnlopt: [],
+            fullscreen: false,
+            fileList: [],
+            fileLists: [],
+            attList: [],
+            fileInfo: {
+                limit: 5,
+                url: '/market/compatt/upload',
+                fileList: []
+            },
+            ifoption: [{
+                id: '0',
+                name: '是'
+            },
+                {
+                    id: '1',
+                    name: '否'
+                }
+            ]
+        }
+    },
+    methods: {
+        //获取详情
+        getInfo(v) {
+            let _this = this;
+            this.$http({
+                url: "/market/cwcompetitor/queryInfo",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {
+                    id: v
+                },
+            }).then((res) => {
+                _this.infolist = res.data;
+                this.attList = [];
+                this.fileInfo.fileList = [];
+                res.data.attList.forEach(item => {
+                    this.fileInfo.fileList.push({
+                        name: item.fileName,
+                        url: '',
+                        id: item.id,
+                        fileName: item.fileName
+                    });
+                    this.attList.push({
+                        name: item.fileName,
+                        url: '',
+                        id: item.id,
+                        fileName: item.fileName
+                    });
+                })
+                if (this.infolist.provinceCode === 'hlj') {
+                    this.getListyys(1);
+                } else {
+                    this.getListyys();
+                }
+            });
+        },
+        //功能栏
+        iconCli(v) {
+            if (v === 1) {
+
+            }
+            if (v === 2) {
+                this.fullscreen = !this.fullscreen
+            }
+        },
+        //查询字典
+        getListwglb() {
+            this.$http({
+                url: "/market/cfgDataDict/queryList",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {
+                    dictCode: 'wglb'
+                },
+            }).then((res) => {
+                this.options1 = res.data;
+            });
+        },
+        getListsf() {
+            this.$http({
+                url: "/market/cfgDataDict/queryList",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {
+                    dictCode: 'sf'
+                },
+            }).then((res) => {
+                this.options2 = res.data;
+            });
+        },
+        getListyys(v) {
+            this.$http({
+                url: "/market/cfgDataDict/queryList",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {
+                    dictCode: 'yys'
+                },
+            }).then((res) => {
+                if (v === 1) {
+                    this.options3 = [];
+                    res.data.forEach(item => {
+                        if (item.dataName !== '移动') {
+                            this.options3.push(item)
+                        }
+                    })
+                } else {
+                    this.options3 = res.data;
+                }
+            });
+        },
+        getListwgxx() {
+            this.$http({
+                url: "/market/cfgDataDict/queryList",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {
+                    dictCode: 'wgxx'
+                },
+            }).then((res) => {
+                this.options4 = res.data;
+            });
+        },
+        getListregion() {
+            this.$http({
+                url: "/market/cfgDataDict/queryList",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {
+                    dictCode: 'region'
+                },
+            }).then((res) => {
+                this.options5 = res.data;
+            });
+        },
+        getsaleChnl() {
+            this.$http({
+                url: "/market/cfgDataDict/queryList",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {
+                    dictCode: 'saleChnl'
+                },
+            }).then((res) => {
+                this.saleChnlopt = res.data;
+            });
+        },
+        //添加、取消
+        submitList(v) {
+            if (v === 1) {
+                this.$router.push("/competitor");
+                return
+            }
+            let _this = this;
+            let attList = [];
+            for (let i = 0; i < this.attList.length; i++) {
+                attList.push({
+                    id: this.attList[i].id
+                });
+            }
+            this.infolist.fixFlag === '1' ? this.infolist.fixFlagDesc = '否' : this.infolist.fixFlagDesc = '是';
+            this.infolist.groupFlag === '1' ? this.infolist.groupFlagDesc = '否' : this.infolist.groupFlagDesc = '是';
+            this.infolist.wwFlag === '1' ? this.infolist.wwFlagDesc = '否' : this.infolist.wwFlagDesc = '是';
+            this.infolist.admFlag === '1' ? this.infolist.admFlagDesc = '否' : this.infolist.admFlagDesc = '是';
+            this.$refs.infolist.validate(valid => {
+                if (valid) {
+                    let nowdata = _this.$formatDate(new Date(), "YYYY-MM-DD");
+                    this.infolist.opTime = nowdata;
+                    this.infolist.sts = 0;
+                    this.infolist.stsDesc = '未审核';
+                    this.$http({
+                        url: "/market/cwcompetitor/update",
+                        method: "post",
+                        headers: {
+                            "Content-Type": "application/json",
+                        },
+                        data: {
+                            wCompetitor: this.infolist,
+                            attList: attList
+                        },
+                    }).then((res) => {
+                        if (res.data.result === 1) {
+                            _this.$message({
+                                message: res.data.desc,
+                                type: 'error'
+                            });
+                        } else {
+                            _this.$message({
+                                message: '修改成功',
+                                type: 'success'
+                            });
+                            _this.$router.push("/competitor");
+                        }
+                    });
+                }
+            })
+        },
+        //处理所需数据
+        verifcheck(v) {
+            if (v === 1) {
+                for (let i = 0; i < this.options1.length; i++) {
+                    if (this.options1[i].dataCode === this.infolist.violationCate) {
+                        this.infolist.violationCateName = this.options1[i].dataName
+                    }
+                }
+            }
+            if (v === 2) {
+                if (this.infolist.provinceCode === 'hlj') {
+                    this.getListyys(1);
+                    if (this.infolist.operatorCode === 'mobile') {
+                        this.infolist.operatorCode = '';
+                    }
+                } else {
+                    this.getListyys();
+                }
+                for (let i = 0; i < this.options2.length; i++) {
+                    if (this.options2[i].dataCode === this.infolist.provinceCode) {
+                        this.infolist.provinceName = this.options2[i].dataName
+                    }
+                }
+            }
+            if (v === 3) {
+                for (let i = 0; i < this.options3.length; i++) {
+                    if (this.options3[i].dataCode === this.infolist.operatorCode) {
+                        this.infolist.operatorName = this.options3[i].dataName
+                    }
+                }
+            }
+            if (v === 4) {
+                for (let i = 0; i < this.options4.length; i++) {
+                    if (this.options4[i].dataCode === this.infolist.violationItem) {
+                        this.infolist.violationItemName = this.options4[i].dataName
+                    }
+                }
+            }
+            if (v === 5) {
+                for (let i = 0; i < this.options5.length; i++) {
+                    if (this.options5[i].dataCode === this.infolist.recordRegionCode) {
+                        this.infolist.recordRegionName = this.options5[i].dataName
+                    }
+                }
+            }
+        },
+        uploadBack(v) {
+            this.attList = v;
+        }
+    },
+    mounted() {
+
+    },
+    created() {
+        this.getListwglb();
+        this.getListyys();
+        this.getListsf();
+        this.getListwgxx();
+        this.getListregion();
+        this.getsaleChnl();
+        this.getInfo(this.$route.query.id);
+    }
+}
+</script>
+<style scoped lang="scss">
+.fileline {
+    color: #666;
+    font-size: 14px;
+    overflow: hidden;
+    padding: 0 10px;
+    height: 28px;
+    line-height: 28px;
+    border-radius: 3px;
+
+    span {}
+
+    i {
+        float: right;
+        height: 28px;
+        line-height: 28px;
+        cursor: pointer;
+    }
+}
+
+.fileline:hover {
+    background: #f4f4f4;
+}
+
+.titbox {
+    div {
+        float: right;
+        margin-top: 20px;
+
+        i {
+            font-size: 22px;
+            margin-left: 20px;
+            cursor: pointer;
+        }
+    }
+}
+
+.info-form {
+    margin-top: 30px;
+    height: calc(100% - 150px);
+    overflow-y: scroll;
+
+    .info-line {
+        width: 100%;
+        display: block;
+
+        div {
+            width: 50%;
+            display: inline-block;
+        }
+
+        span {
+            width: 80px;
+            display: inline-block;
+            text-align: left;
+
+            i {
+                color: red;
+                display: inline-block;
+                padding-right: 5px;
+            }
+        }
+
+        .el-select,
+        .el-input {
+            width: calc(100% - 100px);
+        }
+    }
+
+    .tea-r {
+        /*text-align: right;*/
+    }
+
+    .online {
+        width: 100%;
+
+        span {
+            vertical-align: top;
+        }
+
+        .el-textarea {
+            width: calc(100% - 100px);
+        }
+    }
+}
+
+.titbtn-box {
+    text-align: right;
+    margin: 15px 20px;
+
+    button {
+        width: 120px;
+    }
+}
+</style>

+ 410 - 0
src/pages/main/competitor/competitorInfoNew.vue

@@ -0,0 +1,410 @@
+<template>
+    <div class="dia-box">
+        <fullscreen :fullscreen.sync="fullscreen" class="container structure-l" style="margin: 0;width: calc(75% - 15px);">
+            <div class="container-box">
+                <toolList @iconCli='iconCli' :tooltit='tooltit'></toolList>
+                <!-- <div class="titbox">
+                                    <span :style="'color:'+tableData.bg">({{tableData.stsDesc}})</span>
+                                </div> -->
+                <div class="checknum">
+                    <span>上报人:{{tableData.opName}}</span>
+                    <!--                    <span>部门:市场部</span>-->
+                    <span>联系方式:{{tableData.contactPhone}}</span>
+                    <!--                    <span>地市:哈尔滨市移动分公司</span>-->
+                    <!--                    <span>职级:部门经理</span>-->
+                    <span>上报时间:{{tableData.opTime}}</span>
+                </div>
+                <div style="height: 116px;background: #f4f4f4;">
+                    <uploadDown :datalist="datalist" :dialogStatus="uploadstatus" style="margin-top: 10px;"></uploadDown>
+                </div>
+                <div class="tab-boxinfo">
+                    <div class="box-line">
+                        <span>省份</span>
+                        <div>{{tableData.provinceName}}</div>
+                    </div>
+                    <div class="box-line">
+                        <span>运营商</span>
+                        <div>{{tableData.operatorName}}</div>
+                    </div>
+                    <div class="box-line">
+                        <span>类别</span>
+                        <div>{{tableData.violationCateName}}</div>
+                    </div>
+                    <div class="box-line box-line-bg">
+                        <span>月费</span>
+                        <div>{{tableData.monthFee}} (元)</div>
+                    </div>
+                    <div class="box-line box-line-bg">
+                        <span>预存款</span>
+                        <div>{{tableData.preFee}} (元)</div>
+                    </div>
+                    <div class="box-line">
+                        <span>套餐名称</span>
+                        <div>{{tableData.tariffName}}</div>
+                    </div>
+                    <div class="box-line">
+                        <span>套餐内容</span>
+                        <div>{{tableData.taffiffContent}}</div>
+                    </div>
+                    <div class="box-line">
+                        <span>酬金</span>
+                        <div>{{tableData.remFee}}</div>
+                    </div>
+                    <div class="box-line box-line-bg">
+                        <span>销售范围</span>
+                        <div>{{tableData.saleScope}}</div>
+                    </div>
+                    <div class="box-line box-line-bg">
+                        <span>销售渠道</span>
+                        <div>{{tableData.saleChnl}}</div>
+                    </div>
+                    <div class="box-line box-line-bg">
+                        <span>月销量</span>
+                        <div>{{tableData.monthSale}}</div>
+                    </div>
+                    <div class="box-line">
+                        <span>地市</span>
+                        <div>{{tableData.recordRegionName}}</div>
+                    </div>
+                    <!--                    <div class="box-line">-->
+                    <!--                        <span>上报时间</span>-->
+                    <!--                        <div>{{tableData.opTime}}</div>-->
+                    <!--                    </div>-->
+                    <!--                    <div class="box-line">-->
+                    <!--                        <span>上报人</span>-->
+                    <!--                        <div>{{tableData.opName}}</div>-->
+                    <!--                    </div>-->
+                    <!--                    <div class="box-line">-->
+                    <!--                        <span>联系电话</span>-->
+                    <!--                        <div>{{tableData.contactPhone}}</div>-->
+                    <!--                    </div>-->
+                    <div class="box-line" v-if="tableData.sts*1!==0">
+                        <span>审批人</span>
+                        <div>{{tableData.auditName}}</div>
+                    </div>
+                    <div class="box-line-bg">
+                        <div class="box-line" v-if="tableData.sts*1!==0">
+                            <span>是否已解决</span>
+                            <div>{{tableData.fixFlagDesc}}</div>
+                        </div>
+                        <div class="box-line" v-if="tableData.sts*1!==0">
+                            <span>是否反馈总部</span>
+                            <div>{{tableData.groupFlagDesc}}</div>
+                        </div>
+                        <div class="box-line" v-if="tableData.sts*1!==0">
+                            <span>是否返回竞合</span>
+                            <div>{{tableData.wwFlagDesc}}</div>
+                        </div>
+                    </div>
+
+
+                    <div class="box-line" v-if="tableData.sts*1!==0">
+                        <span>是否反馈总局</span>
+                        <div>{{tableData.admFlagDesc}}</div>
+                    </div>
+
+                    <div class="box-line" v-if="tableData.sts*1!==0">
+                        <span>审批意见</span>
+                        <div>{{tableData.auditResultDesc}}.{{tableData.auditRemarks}}</div>
+                    </div>
+
+
+                </div>
+                <div class="titbtn-box" v-if="infotype===1">
+                    <el-button size="medium" type="warning" icon="el-icon-picture" @click="outlineinfo(1)">对外导出图片</el-button>
+                    <el-button size="medium" type="primary" icon="el-icon-folder-opened" @click="outlineinfo(2)">对内导出word</el-button>
+                </div>
+                <div class="titbtn-box" v-if="infotype!==1">
+                    <el-button size="medium" type="danger" @click="exaStatus=true">拒绝</el-button>
+                    <el-button size="medium" type="primary" @click="exaInfo(1,'已通过')">通过</el-button>
+                </div>
+            </div>
+            <el-dialog title="拒绝申请" :visible.sync="exaStatus" width="50%" :destroy-on-close="true" :modal-append-to-body="false"
+                       :close-on-click-modal="false">
+                <el-input type="textarea" :rows="4" placeholder="请输入拒绝原因或建议" v-model="auditRemarks">
+                </el-input>
+                <div slot="footer" class="dialog-footer">
+                    <el-button @click="exaStatus = false">取 消</el-button>
+                    <el-button type="primary" @click="exaInfo(2,'未通过')">确 定</el-button>
+                </div>
+            </el-dialog>
+        </fullscreen>
+
+        <competeRight></competeRight>
+
+    </div>
+</template>
+<script>
+import competeRight from "../../../components/competeRight";
+import uploadDown from "../../../components/uploadDown";
+import toolList from "../../../components/toolList";
+
+export default {
+    components: {
+        competeRight,
+        uploadDown,
+        toolList
+    },
+    data() {
+        return {
+            tooltit: '竞争对手信息',
+            tableData: {},
+            fullscreen: false,
+            infotype: 0,
+            attList: [],
+            auditRemarks: '',
+            exaStatus: false,
+            datalist: {
+                url: '/market/compatt/downfile',
+                type: 1
+            },
+            uploadstatus: false,
+        }
+    },
+    methods: {
+        //获取详情
+        getInfo(v) {
+            this.infotype = this.$route.query.type * 1;
+            this.$http({
+                url: "/market/cwcompetitor/queryInfo",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {
+                    id: v
+                },
+            }).then((res) => {
+                this.datalist.attList = res.data.attList;
+                this.uploadstatus = true;
+                this.tableData = res.data;
+                if (this.tableData.sts * 1 === 0) {
+                    this.tableData.bg = '#999';
+                } else if (this.tableData.sts * 1 === 1) {
+                    this.tableData.bg = 'green';
+                } else {
+                    this.tableData.bg = 'red';
+                }
+                // this.tableData.opTime = this.timeChange(res.data.opTime * 1);
+                this.attList = res.data.attList;
+            });
+        },
+        //功能栏
+        iconCli(v) {
+            if (v === 1) {
+                this.getInfo(this.$route.query.id)
+            }
+            if (v === 2) {
+                this.fullscreen = !this.fullscreen
+            }
+        },
+        exaInfo(v, n) {
+            let _this = this;
+            this.exaStatus = false;
+            let params = {
+                id: this.tableData.id,
+                sts: v,
+                stsDesc: n,
+                auditName: JSON.parse(window.sessionStorage.userInfo).loginName,
+                auditNo: JSON.parse(window.sessionStorage.userInfo).loginName,
+                auditRemarks: this.auditRemarks,
+                auditResult: v,
+                auditResultDesc: n,
+                auditTime: new Date().getTime(),
+            }
+            this.$http({
+                url: "/market/swcompetitor/update",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: params,
+            }).then((res) => {
+                if (res.data.result === 1) {
+                    _this.$message({
+                        message: res.data.desc,
+                        type: 'error'
+                    });
+                } else {
+                    _this.$message({
+                        message: '审核成功',
+                        type: 'success'
+                    });
+                    _this.$router.push("/competExa");
+                }
+            });
+        },
+        //导出
+        outlineinfo(v) {
+            let data = {
+                provinceName: this.tableData.provinceName,
+                operatorName: this.tableData.operatorName,
+                violationCateName: this.tableData.violationCateName,
+                violationItemName: this.tableData.violationItemName,
+                violationItem: this.tableData.violationItemName,
+                monthFee: this.tableData.monthFee,
+                tariffName: this.tableData.tariffName,
+                taffiffContent: this.tableData.taffiffContent,
+                remFee: this.tableData.remFee,
+                preFee: this.tableData.preFee,
+                saleScope: this.tableData.saleScope,
+                saleChnl: this.tableData.saleChnl,
+                monthSale: this.tableData.monthSale,
+                violationContent: this.tableData.violationContent,
+                recordRegionName: this.tableData.recordRegionName,
+                opTime: this.tableData.opTime,
+            }
+            console.log(data)
+            if (v === 1) {
+                this.$http({
+                    url: "/market/cwcompetitor/writeImg1",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                    },
+                    responseType: "blob",
+                    data: data,
+                }).then((response) => {
+                    if (window.navigator && window.navigator.msSaveOrOpenBlob) {
+                        let blob = new Blob([response.data], {
+                            type: 'application/vnd.ms-excel'
+                        })
+                        window.navigator.msSaveOrOpenBlob(blob,
+                            new Date().getTime() + '.png')
+                    } else {
+                        /* 火狐谷歌的文件下载方式 */
+                        var blob = new Blob([response.data])
+                        var downloadElement = document.createElement('a')
+                        var href = window.URL.createObjectURL(blob)
+                        downloadElement.href = href
+                        downloadElement.download = new Date().getTime() + '.png'
+                        document.body.appendChild(downloadElement)
+                        downloadElement.click()
+                        document.body.removeChild(downloadElement)
+                        window.URL.revokeObjectURL(href)
+                    }
+                });
+            } else {
+                data.id = this.tableData.id;
+                this.$http({
+                    url: "/market/cwcompetitor/write2Doc1",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                    },
+                    responseType: "blob",
+                    data: data,
+                }).then((response) => {
+                    if (window.navigator && window.navigator.msSaveOrOpenBlob) {
+                        let blob = new Blob([response.data], {
+                            type: 'application/vnd.ms-excel'
+                        })
+                        window.navigator.msSaveOrOpenBlob(blob,
+                            new Date().getTime() + '.docx')
+                    } else {
+                        /* 火狐谷歌的文件下载方式 */
+                        var blob = new Blob([response.data])
+                        var downloadElement = document.createElement('a')
+                        var href = window.URL.createObjectURL(blob)
+                        downloadElement.href = href
+                        downloadElement.download = new Date().getTime() + '.docx'
+                        document.body.appendChild(downloadElement)
+                        downloadElement.click()
+                        document.body.removeChild(downloadElement)
+                        window.URL.revokeObjectURL(href)
+                    }
+                });
+            }
+        },
+        //时间转换
+        timeChange(v) {
+            var time = new Date(v);
+            var y = time.getFullYear();
+            var m = time.getMonth() + 1;
+            m < 10 ? '0' + m : m;
+            var d = time.getDate();
+            d < 10 ? '0' + d : d;
+            var h = time.getHours();
+            h < 10 ? '0' + h : h;
+            var mm = time.getMinutes();
+            mm < 10 ? '0' + mm : mm;
+            var s = time.getSeconds();
+            s < 10 ? '0' + s : s;
+            return y + '-' + m + '-' + d + ' ' + h + ':' + mm + ':' + s;
+        },
+    },
+    mounted() {
+
+    },
+    created() {
+        this.infotype = this.$route.query.type * 1;
+        this.infotype === 1 ? this.tooltit = '竞争对手信息收集' : this.tooltit = '竞争对手信息审核';
+        this.getInfo(this.$route.query.id);
+    }
+}
+</script>
+<style scoped lang="scss">
+@import "../../../assets/style";
+
+.titbox {
+
+    span {
+        padding-left: 10px;
+    }
+}
+
+.checknum {
+    border: 3px dotted #f0f0f0;
+    padding: 10px 20px;
+    margin-top: 10px;
+
+    span {
+        display: inline-block;
+        width: 33%;
+        padding-left: 10px;
+        height: 36px;
+        line-height: 36px;
+        color: #aaa;
+    }
+}
+
+.tab-boxinfo {
+    border: 2px solid #f0f0f0;
+    margin-top: 10px;
+    color: #4b4b4b;
+    height: calc(100% - 330px);
+    overflow-y: scroll;
+
+    .box-line {
+        height: 34px;
+        line-height: 34px;
+        padding-left: 20px;
+        font-size: 14px;
+        width: 33.3%;
+        display: inline-block;
+
+        span {
+            display: inline-block;
+            width: 100px;
+        }
+
+        div {
+            display: inline-block;
+            width: calc(100% - 100px);
+        }
+    }
+
+    .box-line-bg {
+        background: #FAFAFA;
+    }
+}
+
+.titbtn-box {
+    text-align: right;
+    margin-top: 20px;
+
+    button {
+        min-width: 100px;
+    }
+}
+</style>

File diff suppressed because it is too large
+ 1234 - 499
src/pages/main/competitor/index.vue


File diff suppressed because it is too large
+ 1938 - 1020
src/pages/main/demandDevelop/index.vue


+ 321 - 261
src/pages/main/demandDevelop/ywStanding.vue

@@ -1,287 +1,347 @@
 <template>
-    <fullscreen :fullscreen.sync="fullscreen" class="container">
-        <div class="container-box">
-            <toolList @iconCli='iconCli' :tooltit='tooltit'></toolList>
-            <div class="search">
-				<mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
-                <el-button class="btn-check" size="medium" type="primary" @click="outlist">导出
-                </el-button>
-            </div>
-            <div class="tabbox">
-                <el-table height="calc(100% - 40px)" class="com-table" ref="multipleTable" :data="tableData"
-                    tooltip-effect="dark" size="small" border style="width: 100%">
-                    <el-table-column prop="demandName" label="需求名称">
-                    </el-table-column>
-                    <el-table-column prop="deptName" label="提出部门/地市">
-                    </el-table-column>
-                    <el-table-column prop="busiStartTime" label="时间段">
-						<template slot-scope="scope">
-							{{scope.row.busiStartTime + '~' + scope.row.busiEndTime}}
-						</template>
-                    </el-table-column>
-                    <el-table-column prop="factoryName" label="支撑方">
-                    </el-table-column>
-					<el-table-column prop="workLoad" label="工作量">
-                    </el-table-column>
-                </el-table>
-                <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
-                    :total="total">
-                </el-pagination>
-            </div>
-        </div>
-    </fullscreen>
+  <fullscreen :fullscreen.sync="fullscreen" class="container">
+    <div class="container-box">
+      <toolList @iconCli="iconCli" :tooltit="tooltit"></toolList>
+      <div class="search">
+        <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
+        <el-button
+          class="btn-check"
+          size="medium"
+          type="primary"
+          @click="outlist"
+          >导出
+        </el-button>
+      </div>
+      <div class="tabbox">
+        <el-table
+          height="calc(100% - 40px)"
+          class="com-table"
+          ref="multipleTable"
+          :data="tableData"
+          tooltip-effect="dark"
+          size="small"
+          border
+          style="width: 100%"
+        >
+          <el-table-column prop="demandName" label="需求名称">
+          </el-table-column>
+          <el-table-column prop="groupName" label="提出部门/地市">
+          </el-table-column>
+          <el-table-column prop="busiStartTime" label="时间段">
+            <template slot-scope="scope">
+              {{ scope.row.busiStartTime + "~" + scope.row.busiEndTime }}
+            </template>
+          </el-table-column>
+          <el-table-column prop="status" label="状态"> </el-table-column>
+          <el-table-column prop="support" label="支撑方"> </el-table-column>
+          <el-table-column prop="workload" label="工作量"> </el-table-column>
+        </el-table>
+        <el-pagination
+          class="pageBox"
+          @current-change="currchange"
+          layout="prev, pager, next"
+          background
+          :total="total"
+        >
+        </el-pagination>
+      </div>
+    </div>
+  </fullscreen>
 </template>
 <script>
-    import mySearch from "../../../components/search.vue";
-    import toolList from "../../../components/toolList.vue";
+import mySearch from "../../../components/search.vue";
+import toolList from "../../../components/toolList.vue";
 
-    export default {
-        components: {
-            mySearch,
-            toolList
+export default {
+  components: {
+    mySearch,
+    toolList,
+  },
+  data() {
+    return {
+      searchList: [
+        {
+          type: "input",
+          tit: "需求名称",
+          value: "",
+          width: "23%",
         },
-        data() {
-
-            return {
-				searchList: [{
-					type: 'input',
-					tit: '需求名称',
-					value: '',
-					width: '32%',
-				},{
-					type: 'date',
-					tit: '开始时间',
-					value: '',
-					width: '32%',
-				}, {
-					type: 'date',
-					tit: '结束时间',
-					value: '',
-					width: '32%',
-				}],
-                tooltit: '线上业务需求台账',
-                fullscreen: false,
-                total: 0,
-                pageSize: 1,
-                tableData: [],
-                dialogStatus: false,
-                disableStatus: false,
-                titname: '终端',
-                infolist: {},
-                typeOptions: [{
-                    dataCode: 1,
-                    dataName: 111,
-                }],
-                userInfo: {},
-                params: {},
-                infoApply: []
-            }
+				{
+					type: "input",
+          tit: "部门或地市",
+          value: "",
+          width: "23%",
+				},
+        {
+          type: "date",
+          tit: "开始时间",
+          value: "",
+          width: "23%",
         },
-        methods: {
-			//搜索数据
-			searchInfo(v) {
-				this.params = {};
-				v[0] ? this.params.demandName = v[0] : '';
-				v[1] ? this.params.busiStartTimeTo = v[1] : '';
-				v[2] ? this.params.busiEndTimeFrom = v[2]:'';
-				this.getList(this.params, this.pageSize);
-			},
-            //获取列表
-            getList(v, n) {
-				v.sts = 1;
-                this.pageSize = n;
-                let _this = this;
-                this.$http({
-                    url: "/market/cChannelDemand/queryPage",
-                    method: "post",
-                    headers: {
-                        "Content-Type": "application/json",
-                        "page": '{"pageNo":"' + n + '","pageSize":"10"}'
-                    },
-                    data: v,
-                }).then((res) => {
-                    this.tableData = res.data.data;
-                    this.total = res.data.totalRecord;
-                });
-            },
-            // 分页
-            currchange(v) {
-                this.pageSize = v;
-                this.getList(this.params, this.pageSize);
-            },
-            //功能栏
-            iconCli(v) {
-                if (v === 1) {
-                    this.getList(this.params, this.pageSize);
-                }
-                if (v === 2) {
-                    this.fullscreen = !this.fullscreen
-                }
-            },
-            // =======================
-            outlist() {
-                let data = {
-                    colStr: "demandName,deptName,busiStartTime,busiEndTime,factoryName,workLoad",
-                    fileName: "台账.xlsx",
-                    tital: [
-                        [
-                            {
-                                "colNum": "0",
-                                "colSpan": "0",
-                                "rowSpan": "1",
-                                "val": "需求名称"
-                            },
-                            {
-                                "colNum": "1",
-                                "colSpan": "0",
-                                "rowSpan": "1",
-                                "val": "提出部门"
-                            },
-                            {
-                                "colNum": "2",
-                                "colSpan": "0",
-                                "rowSpan": "1",
-                                "val": "开始时间"
-                            },
-                            {
-                                "colNum": "3",
-                                "colSpan": "0",
-                                "rowSpan": "1",
-                                "val": "结束时间"
-                            },
-                            {
-                                "colNum": "4",
-                                "colSpan": "0",
-                                "rowSpan": "1",
-                                "val": "支撑方"
-                            },
-                            {
-                                "colNum": "5",
-                                "colSpan": "0",
-                                "rowSpan": "1",
-                                "val": "工作量"
-                            },
-                        ]
-                    ]
-                }
-                // data.tital = JSON.stringify(data.tital)
-                this.$http({
-                    url: "/market/cChannelDemand/excelExport",
-                    method: "post",
-                    headers: {
-                        "Content-Type": "application/json",
-                    },
-                    responseType: "blob",
-                    data: data,
-                }).then((response) => {
-                    if (window.navigator && window.navigator.msSaveOrOpenBlob) {
-                        let blob = new Blob([response.data], {
-                            type: 'application/vnd.ms-excel'
-                        })
-                        window.navigator.msSaveOrOpenBlob(blob,
-                            new Date().getTime() + '.xlsx')
-                    } else {
-                        /* 火狐谷歌的文件下载方式 */
-                        var blob = new Blob([response.data])
-                        var downloadElement = document.createElement('a')
-                        var href = window.URL.createObjectURL(blob)
-                        downloadElement.href = href
-                        downloadElement.download = new Date().getTime() + '.xlsx'
-                        document.body.appendChild(downloadElement)
-                        downloadElement.click()
-                        document.body.removeChild(downloadElement)
-                        window.URL.revokeObjectURL(href)
-                    }
-                });
-            },
-            getUser() {
-                this.userInfo = JSON.parse(window.sessionStorage.userInfo);
-                this.infolist = {
-                    opNo: '',
-                    opName: '',
-                };
-                this.infolist.opNo = this.userInfo.loginNo;
-                this.infolist.opName = this.userInfo.loginName;
-
-            }
+        {
+          type: "date",
+          tit: "结束时间",
+          value: "",
+          width: "23%",
         },
-        mounted() {
-            this.getList({}, 1);
-            this.getUser();
+      ],
+      tooltit: "线上业务需求台账",
+      fullscreen: false,
+      total: 0,
+			page:1,
+      pageSize: 10,
+      tableData: [],
+      dialogStatus: false,
+      disableStatus: false,
+      titname: "终端",
+      infolist: {},
+      typeOptions: [
+        {
+          dataCode: 1,
+          dataName: 111,
         },
-        created() {
-
+      ],
+      userInfo: {},
+      params: {},
+      infoApply: [],
+    };
+  },
+  methods: {
+    //搜索数据
+    searchInfo(v) {
+			console.log(v);
+      this.params = {};
+      v[0] ? (this.params.demandName = v[0]) : "";
+      v[1] ? (this.params.deptOrCity = v[1]) : "";
+      v[2] ? (this.params.startTime = v[2]) : "";
+      v[3] ? (this.params.endTime = v[3]) : "";
+      this.handleInit();
+    },
+    // 初始化列表
+    handleInit() {
+			this.$http({
+				url: "/market/mkOnlineChannel/ledgerList",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {
+					...this.params,
+          page: this.page,
+          pageSize: this.pageSize,
+        },
+      }).then(
+        ({
+          data: {
+            body: { data },
+          },
+        }) => {
+          this.tableData = data;
         }
-    }
+      );
+		},
+		outlist() {
+      // let data = {
+      //   colStr:
+      //     "demandName,deptName,busiStartTime,busiEndTime,factoryName,workLoad",
+      //   fileName: "台账.xlsx",
+      //   tital: [
+      //     [
+      //       {
+      //         colNum: "0",
+      //         colSpan: "0",
+      //         rowSpan: "1",
+      //         val: "需求名称",
+      //       },
+      //       {
+      //         colNum: "1",
+      //         colSpan: "0",
+      //         rowSpan: "1",
+      //         val: "提出部门",
+      //       },
+      //       {
+      //         colNum: "2",
+      //         colSpan: "0",
+      //         rowSpan: "1",
+      //         val: "开始时间",
+      //       },
+      //       {
+      //         colNum: "3",
+      //         colSpan: "0",
+      //         rowSpan: "1",
+      //         val: "结束时间",
+      //       },
+      //       {
+      //         colNum: "4",
+      //         colSpan: "0",
+      //         rowSpan: "1",
+      //         val: "支撑方",
+      //       },
+      //       {
+      //         colNum: "5",
+      //         colSpan: "0",
+      //         rowSpan: "1",
+      //         val: "工作量",
+      //       },
+      //     ],
+      //   ],
+      // };
+      // // data.tital = JSON.stringify(data.tital)
+      this.$http({
+        url: "/market/mkOnlineChannel/exportLedger",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        responseType: "blob",
+        data: this.params,
+      }).then((response) => {
+        if (window.navigator && window.navigator.msSaveOrOpenBlob) {
+          let blob = new Blob([response.data], {
+            type: "application/vnd.ms-excel",
+          });
+          window.navigator.msSaveOrOpenBlob(
+            blob,
+            new Date().getTime() + ".xlsx"
+          );
+        } else {
+          /* 火狐谷歌的文件下载方式 */
+          var blob = new Blob([response.data]);
+          var downloadElement = document.createElement("a");
+          var href = window.URL.createObjectURL(blob);
+          downloadElement.href = href;
+          downloadElement.download = new Date().getTime() + ".xlsx";
+          document.body.appendChild(downloadElement);
+          downloadElement.click();
+          document.body.removeChild(downloadElement);
+          window.URL.revokeObjectURL(href);
+        }
+      });
+    },
+		// 分页
+    currchange(v) {
+      this.page = v;
+			this.handleInit()
+    },
+
+
+
+    //获取列表
+    getList(v, n) {
+      v.sts = 1;
+      this.pageSize = n;
+      let _this = this;
+      this.$http({
+        url: "/market/cChannelDemand/queryPage",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+          page: '{"pageNo":"' + n + '","pageSize":"10"}',
+        },
+        data: v,
+      }).then((res) => {
+        this.tableData = res.data.data;
+        this.total = res.data.totalRecord;
+      });
+    },
+    
+    //功能栏
+    iconCli(v) {
+      if (v === 1) {
+        this.handleInit()
+      }
+      if (v === 2) {
+        this.fullscreen = !this.fullscreen;
+      }
+    },
+    // =======================
+    
+    getUser() {
+      this.userInfo = JSON.parse(window.sessionStorage.userInfo);
+      this.infolist = {
+        opNo: "",
+        opName: "",
+      };
+      this.infolist.opNo = this.userInfo.loginNo;
+      this.infolist.opName = this.userInfo.loginName;
+    },
+  },
+  mounted() {
+    // this.getList({}, 1);
+		this.handleInit()
+    this.getUser();
+  },
+  created() {},
+};
 </script>
 <style scoped lang="scss">
-    .onetab {
-        margin-bottom: 20px;
-        padding: 0 20px;
-    }
+.onetab {
+  margin-bottom: 20px;
+  padding: 0 20px;
+}
 
-    .titbox {
-        div {
-            float: right;
+.titbox {
+  div {
+    float: right;
 
-            i {
-                font-size: 22px;
-                margin-left: 20px;
-                cursor: pointer;
-            }
-        }
-    }
-
-    .tabbox {
-        margin-top: 15px;
+    i {
+      font-size: 22px;
+      margin-left: 20px;
+      cursor: pointer;
     }
+  }
+}
 
-    .pageBox {
-        text-align: right;
-        margin-top: 10px;
-    }
+.tabbox {
+  margin-top: 15px;
+}
 
-    .info-line {
-        width: 100%;
-        display: block;
-        padding-left: 20px;
+.pageBox {
+  text-align: right;
+  margin-top: 10px;
+}
 
-        div {
-            width: 50%;
-            display: inline-block;
-        }
+.info-line {
+  width: 100%;
+  display: block;
+  padding-left: 20px;
 
-        span {
-            width: 80px;
-            display: inline-block;
-            text-align: left;
+  div {
+    width: 50%;
+    display: inline-block;
+  }
 
-            i {
-                color: red;
-                display: inline-block;
-                padding-right: 5px;
-            }
-        }
+  span {
+    width: 80px;
+    display: inline-block;
+    text-align: left;
 
-        .el-select,
-        .el-input {
-            width: calc(100% - 100px);
-        }
+    i {
+      color: red;
+      display: inline-block;
+      padding-right: 5px;
     }
+  }
 
-    .online {
-        width: 100%;
+  .el-select,
+  .el-input {
+    width: calc(100% - 100px);
+  }
+}
 
-        .el-select {
-            width: calc(100% - 100px);
-        }
+.online {
+  width: 100%;
 
-        span {
-            vertical-align: top;
-        }
+  .el-select {
+    width: calc(100% - 100px);
+  }
 
-        .el-textarea {
-            width: calc(100% - 100px);
-        }
-    }
+  span {
+    vertical-align: top;
+  }
+
+  .el-textarea {
+    width: calc(100% - 100px);
+  }
+}
 </style>

+ 101 - 38
src/pages/main/gridDivision/approvalExamination.vue

@@ -164,7 +164,7 @@ export default {
         },
         {
           label: "附件",
-          props: "fileNames",
+          props: "attList",
           type: "file",
         },
         {
@@ -179,7 +179,7 @@ export default {
         {
           label: "不通过",
           props: "back",
-          visible: { sts: [0] },
+          visible: { sts: ["0"] },
         },
         {},
         {},
@@ -195,23 +195,23 @@ export default {
         },
         {
           label: "流程环节",
-          props: "taskName",
+          props: "liuchengName",
         },
         {
           label: "处理人",
-          props: "opName",
+          props: "createId",
         },
         {
           label: "处理工号",
-          props: "opNo",
+          props: "createName",
         },
         {
           label: "处理时间",
-          props: "opTime",
+          props: "createTime",
         },
         {
           label: "审批意见",
-          props: "remark",
+          props: "desc",
           // type: "dictionary",
           // dictionary: { 0: "同意", 1: "不同意" },
         },
@@ -220,12 +220,12 @@ export default {
   },
   watch: {
     parentId() {
-      this.status = this.$route.query.status;
       this.handleInit();
     },
   },
-  created() {
+  mounted() {
     this.parentId = this.$route.query.parentId;
+    this.status = this.$route.query.status;
   },
   methods: {
     // 表格数据初始化
@@ -245,17 +245,23 @@ export default {
           "Content-Type": "application/json",
         },
         data: reqdata,
-      }).then(({ data: { count, data } }) => {
+      }).then(({ data: body }) => {
         this.table_loading = false;
+        console.log(body.body);
+
+        // 列表数据回显
+        let data = body.body.page.data;
+        let count = body.body.page.count;
+
         this.total = count;
         this.table_list = data
           ? data.map((element, index) => ({
               ...element,
               No: index + 1,
-              sts: Number(this.status),
+              sts: this.status + "",
             }))
           : [];
-        this.table_list && this.table_list[0].sts === 0
+        this.table_list.length && this.table_list[0].sts === "0"
           ? (this.table_handle = [
               {
                 label: "返回",
@@ -280,9 +286,11 @@ export default {
                 props: "track",
               },
             ]);
-        data.forEach((item) => {
-          this.adoptIds.push(item.id.toString());
-        });
+        if (data.length) {
+          data.forEach((item) => {
+            this.adoptIds.push(item.wanggeId.toString());
+          });
+        }
         // console.log(this.table_list,'table_list');
         // console.log(this.adoptIds);
       });
@@ -298,8 +306,47 @@ export default {
       this.page = page;
       this.handleInit();
     },
-    handleDownload(data) {
-      console.log(data, "data");
+    handleDownload({ index, rows }) {
+      let fileName = "";
+      let fileCode = "";
+      rows.attList.forEach((el, no) => {
+        if (no === index) {
+          fileName = el.fileName;
+          fileCode = el.fileCode;
+        }
+      });
+      console.log(index, rows);
+      console.log(fileName, fileCode);
+      this.$http({
+        url: "/market/compatt/downfile",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        responseType: "blob",
+        data: { id: fileCode, fileName: fileName },
+      }).then((response) => {
+        if (window.navigator && window.navigator.msSaveOrOpenBlob) {
+          let blob = new Blob([response.data], {
+            type: "application/vnd.ms-excel",
+          });
+          window.navigator.msSaveOrOpenBlob(blob, fileName);
+        } else {
+          /* 火狐谷歌的文件下载方式 */
+          var blob = new Blob([response.data]);
+          var downloadElement = document.createElement("a");
+          var href = window.URL.createObjectURL(blob);
+          downloadElement.href = href;
+          downloadElement.download = fileName;
+          document.body.appendChild(downloadElement);
+          downloadElement.click();
+          document.body.removeChild(downloadElement);
+          window.URL.revokeObjectURL(href);
+        }
+      });
+
+      // // /market/compatt/downfile
+      // console.log(item);
     },
     handleVisible(props) {
       switch (props) {
@@ -319,22 +366,20 @@ export default {
     },
     // 查询审批轨迹
     handleQueryTrack() {
-      // let type = this.parentId === null ? "1" : "0";
+      // let reqdata = {
+      //   id: Number(this.parentId),
+      // }
       this.$http({
-        url: "/market/mkWangge/getMkWanggeById",
-        method: "get",
+        url: "/market/mkWanggeLog/selectList",
+        method: "post",
         headers: {
           "Content-Type": "application/json",
         },
-        params: {
-          id: this.parentId,
-          type: 0,
-        },
+        data: this.parentId + "",
       }).then(({ data }) => {
         let body = data.body;
         console.log(body, "body");
-        // this.ids = [body.id.toString()];
-        this.table_list_track = body.bpmTaskList.map((item, index) => ({
+        this.table_list_track = body.map((item, index) => ({
           ...item,
           No: index + 1,
         }));
@@ -351,7 +396,7 @@ export default {
     // 审批不通过
     handleBack(row) {
       // console.log(row);
-      this.ids = row.id.toString();
+      this.ids = row.wanggeId.toString();
       this.handleVisible("opinion");
       this.isAgree = false;
     },
@@ -362,12 +407,8 @@ export default {
         // 批量退回
         reqdata = {
           parentId: this.parentId,
-          mkWanggeList: [
-            {
-              id: this.ids,
-              remark: this.opinion_form.opinion,
-            },
-          ],
+          remark: this.opinion_form.opinion,
+          wanggeId: this.ids,
         };
         console.log(reqdata);
         this.$http({
@@ -379,8 +420,19 @@ export default {
           data: {
             ...reqdata,
           },
-        }).then((res) => {
-          console.log(res);
+        }).then(({ data }) => {
+          console.log(data);
+          if (data.desc === "操作成功") {
+            this.$message({
+              message: "操作成功!",
+              type: "success",
+            });
+          } else if (data.desc === "操作失败") {
+            this.$message({
+              message: "操作失败!",
+              type: "error",
+            });
+          }
           this.handleInit();
         });
       } else {
@@ -401,9 +453,20 @@ export default {
           data: {
             ...reqdata,
           },
-        }).then((res) => {
-          console.log(res);
-          this.status = 1;
+        }).then(({ data }) => {
+          console.log(data);
+          this.status = "1";
+          if (data.desc === "操作成功") {
+            this.$message({
+              message: "操作成功!",
+              type: "success",
+            });
+          } else if (data.desc === "操作失败") {
+            this.$message({
+              message: "操作失败!",
+              type: "error",
+            });
+          }
           this.handleInit();
         });
       }

+ 163 - 55
src/pages/main/gridDivision/workersList.vue

@@ -57,16 +57,33 @@
           ></el-input>
         </el-form-item>
         <el-form-item label="附件上传" prop="file">
-          <myUpload
+          <!-- <myUpload
             v-if="title === '新建' || title === '发起人处理'"
             @uploadBack="uploadBack"
             :fileInfo="fileInfo"
             :fileList="fileInfo.fileList"
-          ></myUpload>
+          ></myUpload> -->
+          <el-upload
+            v-if="title === '新建' || title === '发起人处理'"
+            class="upload-demo"
+            drag
+            :limit="3"
+            :on-exceed="uploadExceed"
+            :on-remove="uploadRemove"
+            :http-request="uploadBack"
+            action="http://192.168.1.228:9600/spfm"
+            multiple
+            :file-list="file"
+          >
+            <i class="el-icon-upload"></i>
+            <div class="el-upload__text">
+              将文件拖到此处,或<em>点击上传</em>
+            </div>
+          </el-upload>
           <div v-else>
-            <div v-if="fileInfo.fileList.length === 0">暂无附件</div>
+            <div v-if="file.length === 0">暂无附件</div>
             <div
-              v-for="(item, index) in fileInfo.fileList"
+              v-for="(item, index) in file"
               :key="index"
               class="simple-table-click cursor-pointer margin-left-10"
               @click="handleDownload(item)"
@@ -127,6 +144,9 @@
           <el-button @click="handleSubmit('failed')" type="default"
             >退回修改</el-button
           >
+          <el-button @click="handleVisible('add')" type="default"
+            >取消</el-button
+          >
         </div>
       </template>
     </simple-dialog>
@@ -148,7 +168,7 @@
 </template>
 
 <script>
-import myUpload from "../../../components/upload";
+// import myUpload from "../../../components/upload";
 import simpleForm from "../performance/components/form.vue";
 import simpleTable from "../performance/components/table.vue";
 import simpleDialog from "../performance/components/dialog.vue";
@@ -158,7 +178,7 @@ export default {
   components: {
     simpleForm,
     simpleDialog,
-    myUpload,
+    // myUpload,
     simpleTable,
     simplePagination,
   },
@@ -206,6 +226,14 @@ export default {
           },
         ],
       },
+      file: [],
+      file1: "",
+      file2: "",
+      file3: "",
+      // 删除的文件
+      delFile: "",
+      // 暂存删除文件
+      tmpDeleteFile: [],
       // 当前用户标识
       loginNoStr: "",
       fileInfo: {
@@ -324,23 +352,23 @@ export default {
         },
         {
           label: "流程环节",
-          props: "taskName",
+          props: "liuchengName",
         },
         {
           label: "处理人",
-          props: "opName",
+          props: "createId",
         },
         {
           label: "处理工号",
-          props: "opNo",
+          props: "createName",
         },
         {
           label: "处理时间",
-          props: "opTime",
+          props: "createTime",
         },
         {
           label: "审批意见",
-          props: "remark",
+          props: "desc",
           // type: "dictionary",
           // dictionary: { 0: "同意", 1: "不同意" },
         },
@@ -369,21 +397,63 @@ export default {
           "Content-Type": "application/json",
         },
         data: reqdata,
-      }).then(({ data: { count, data } }) => {
+      }).then(({ data: body }) => {
         this.table_loading = false;
+        console.log(body.body);
+
+        // 汇总或新建权限判断是否显示按钮
+        let huiZongButton = body.body.huiZongButton;
+        let insertButton = body.body.insertButton;
+
+        if (huiZongButton && insertButton) {
+          this.table_handle = [
+            {
+              label: "工单汇总",
+              props: "summary",
+            },
+            {
+              label: "新建",
+              props: "add",
+            },
+          ];
+        } else if (huiZongButton && !insertButton) {
+          this.table_handle = [
+            {
+              label: "工单汇总",
+              props: "summary",
+            },
+          ];
+        } else if (!huiZongButton && insertButton) {
+          this.table_handle = [
+            {
+              label: "新建",
+              props: "add",
+            },
+          ];
+        } else {
+          this.table_handle = [];
+        }
+
+        // 列表数据回显
+        let data = body.body.page.data;
+        let count = body.body.page.count;
+
         this.total = count;
         this.table_list = data
           ? data.map((element, index) => ({
               ...element,
+              id: element.id + "",
               deal: element.draft === "1" && element.sts === "0" ? "1" : "0",
               isEdit:
-                element.draft === "0" && element.createId === this.loginNoStr
+                element.draft === "0" &&
+                element.createId === this.loginNoStr &&
+                element.parentLevel === "0"
                   ? "1"
                   : "0",
               No: index + 1,
             }))
           : [];
-        console.log(this.table_list);
+        // console.log(this.table_list);
       });
     },
     // 搜索事件
@@ -402,7 +472,7 @@ export default {
           this.title = "新建";
           this.isCheck = false;
           this.add_form = {};
-          this.fileInfo.fileList = [];
+          this.file = [];
           break;
         case "summary":
           this.summary_visible = !this.summary_visible;
@@ -431,26 +501,47 @@ export default {
     },
     handleSelect(val) {
       this.summaryIds = val.map((item) => {
-        return item.id.toString();
+        return item.wanggeId + "";
       });
       // console.log(this.summaryIds);
     },
     //文件返回值
-    uploadBack(v) {
-      const fileName = [];
-      const fileIds = [];
-      v.forEach((element) => {
-        fileName.push(element.fileName);
-        fileIds.push(element.fileCode);
+    uploadBack({ file }) {
+      // console.log( file instanceof Object,'sasdas');
+      this.file.push(file);
+      console.log(this.file, "file");
+      this.file1 = this.file[0];
+      this.file2 = this.file[1];
+      this.file3 = this.file[2];
+    },
+    // 删除文件
+    uploadRemove(file) {
+      console.log(file,'dada');
+      this.file.forEach((item, index) => {
+        if (item.uid === file.uid) {
+          this.file.splice(index, 1);
+          if (item.id) {
+            this.tmpDeleteFile.push(item.id);
+            // this.delFile = this.delFile + item.id + ','
+            this.delFile = this.tmpDeleteFile.join(",");
+          }
+        }
+      });
+      this.file1 = this.file[0];
+      this.file2 = this.file[1];
+      this.file3 = this.file[2];
+    },
+    // 超出文件上传限制
+    uploadExceed(file) {
+      this.$message({
+        message: "附件最多可上传3个!",
+        type: "error",
       });
-      console.log(v);
-      this.add_form.fileNames = fileName.join(",");
-      this.add_form.fileIds = fileIds.join(",");
-      // console.log(this.add_form,'this.add_form')
+      console.log(file);
     },
     // 获取模态框信息
     getDialogData(row) {
-      let id = row.id;
+      let id = row.wanggeId;
       let type = row.parentId === null ? "1" : "0";
       this.$http({
         url: "/market/mkWangge/getMkWanggeById",
@@ -463,27 +554,26 @@ export default {
           type,
         },
       }).then(({ data: { body } }) => {
-        console.log(body, "body");
-        this.ids = [body.id.toString()];
+        // console.log(body, "body");
+        this.ids = [body.wanggeId.toString()];
         this.add_form = {
-          id: body.id,
+          id: body.wanggeId,
           proposer: body.proposer,
           telephone: body.telephone,
           wanggeText: body.wanggeText,
           fileNames: body.fileNames,
           fileIds: body.fileIds,
         };
-        this.table_list_approve = body.bpmTaskList
-          ? body.bpmTaskList.map((item, index) => ({
+        this.table_list_approve = body.mkWanggeLogList
+          ? body.mkWanggeLogList.map((item, index) => ({
               ...item,
               No: index + 1,
             }))
           : [];
-        this.fileInfo.fileList = body.fileNames
-          ? body.fileNames.split(",").map((el, index) => ({
-              fileName: el,
-              name: el,
-              fileCode: body.fileIds.split(",")[index],
+        this.file = body.attList
+          ? body.attList.map((item) => ({
+              ...item,
+              name: item.fileName,
             }))
           : [];
       });
@@ -494,7 +584,7 @@ export default {
         this.$router.push({
           path: "/approvalExamination",
           query: {
-            parentId: row.id.toString(),
+            parentId: row.wanggeId.toString(),
             status: row.sts.toString(),
           },
         });
@@ -514,7 +604,7 @@ export default {
         this.$router.push({
           path: "/approvalExamination",
           query: {
-            parentId: row.id.toString(),
+            parentId: row.wanggeId.toString(),
             status: row.sts.toString(),
           },
         });
@@ -540,26 +630,43 @@ export default {
       }
       this.$refs.add_ref.validate((valid) => {
         if (valid) {
-          let reqdata = [
-            {
-              ...this.add_form,
-              procId: "729294602773110788",
-              draft: draft,
-              num: "1",
-            },
-          ];
+          let formData = new FormData();
+          // console.log(this.file1,'adasdsa')
+          let reqdata = {
+            ...this.add_form,
+            procId: "729294602773110788",
+            draft: draft,
+            num: "1",
+            delFileId: this.delFile ? this.delFile : "",
+          };
+          // 这是处理文件的参数
+          this.file.forEach((el, index) => {
+            if (el.constructor.name === "File") {
+              formData.append(`file${index + 1}`, el);
+            }
+          });
+          // 表单的其他参数
+          for (let key in reqdata) {
+            formData.append(key, reqdata[key]);
+          }
+          // this.file1 ? formData.append("file1", this.file1) : "";
+          // this.file2 ? formData.append("file2", this.file2) : "";
+          // this.file3 ? formData.append("file3", this.file3) : "";
+          // this.file ? formData.append("file", this.file) : [] ;
+          // ;
           if (!this.approve_visible) {
             // 编辑/新增
             this.$http({
               url: "/market/mkWangge/saveOrUpdateList",
               method: "post",
               headers: {
-                "Content-Type": "application/json",
+                "Content-Type": "multipart/form-data",
               },
-              data: reqdata,
+              data: formData,
             }).then((res) => {
               console.log(res);
               this.handleInit();
+              this.handleVisible("add");
             });
           } else {
             // 审批
@@ -581,11 +688,12 @@ export default {
             }).then((res) => {
               console.log(res);
               this.handleInit();
+              this.handleVisible("add");
             });
           }
-          this.edit_visible = false;
-          this.add_visible = false;
-          this.fileInfo.fileList = [];
+          // this.edit_visible = false;
+          // this.add_visible = false;
+          this.file = [];
         }
       });
     },
@@ -636,10 +744,10 @@ export default {
       }
     },
     // 附件下载
-    handleDownload({fileCode,fileName}) {
-      console.log(fileCode,fileName);
+    handleDownload({ fileCode, fileName }) {
+      console.log(fileCode, fileName);
       this.$http({
-        url: "/market/compatt/downfile",
+        url: "/bpm/api/download",
         method: "post",
         headers: {
           "Content-Type": "application/json",

+ 177 - 0
src/pages/main/performance/components/deptTreeOnly.vue

@@ -0,0 +1,177 @@
+<template>
+  <div class="treebox" v-loading="loading">
+    <el-tree
+      :highlight-current="true"
+      :check-strictly="true"
+      ref="tree"
+      :data="treeList"
+      node-key="o"
+      :default-checked-keys="defaultListc"
+      :default-expanded-keys="defaultListc"
+      @node-click="handleNodeClick"
+    >
+      <span class="custom-tree-node" slot-scope="{ node }">
+        <em
+          style="display: inline-block; width: 20px"
+          v-if="node.data.haveUserFlag == 'N' && node.data.children.length == 0"
+        ></em>
+        <i
+          class="el-icon-caret-right"
+          v-if="node.data.haveUserFlag == 'Y' && node.data.children.length == 0"
+        ></i>
+        <el-checkbox
+          @change="handleCheckChange(node)"
+          style="margin-right: 10px"
+          v-model="node.checked"
+          v-if="node.data.type == 1"
+        ></el-checkbox>
+        <span>{{ node.label }}</span>
+      </span>
+    </el-tree>
+  </div>
+</template>
+
+<script>
+export default {
+  props: ["defaultList", "type", "closeList", "resetList", "only"],
+  data() {
+    return {
+      treeList: [],
+      opt: [],
+      defaultProps: {
+        children: "children",
+        label: "label",
+      },
+      defaultListc: [],
+      loading: false,
+    };
+  },
+  methods: {
+    getTree() {
+      this.loading = true;
+      this.$http({
+        url: "/sysmgr/csysdept/queryAllList",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {},
+      }).then((res) => {
+        this.treeList = res.data;
+        this.loading = false;
+      });
+      // const info = JSON.parse(sessionStorage.userInfo);
+      // console.log(info, "JSON.parse(sessionStorage.userInfo)");
+      // this.treeList = [
+      //   {
+      //     children: [],
+      //     o: info.groupId,
+      //     label: `${info.groupName}`,
+      //     haveUserFlag: "Y",
+      //     ou: `${info.groupName}`,
+      //   },
+      // ];
+    },
+    handleNodeClick(v) {
+      let s = false;
+      if (v.children && v.children.length == 0) {
+        s = true;
+      }
+      if (v.type) {
+        return;
+      }
+      if (
+        v.children &&
+        v.children.length > 0 &&
+        v.children[v.children.length - 1].type == 1
+      ) {
+        return;
+      }
+      this.loading = true;
+      console.log(v);
+      this.$http({
+        url: "/sysmgr/sysuserinfo/queryList",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {
+          groupId: v.o,
+        },
+      }).then((res) => {
+        v.children = v.children ? v.children : [];
+        res.data.forEach((item) => {
+          v.children.push({
+            id: item.groupId,
+            label: item.loginNameStr,
+            type: 1,
+            displayname: v.displayname,
+            loginNoStr: item.loginNoStr,
+            o: item.id,
+          });
+        });
+        this.loading = false;
+      });
+      for (let i = 0; i < this.$refs.tree.store._getAllNodes().length; i++) {
+        if (s && v.o == this.$refs.tree.store._getAllNodes()[i].data.o) {
+          this.$refs.tree.store._getAllNodes()[i].expanded = true;
+        }
+      }
+    },
+    handleCheckChange() {
+      console.log(this.only, "only");
+      const nodeList = this.$refs.tree.store.getCheckedNodes();
+      if (this.only) {
+        if (nodeList.length === 1) {
+          this.$emit("treeCheck", nodeList);
+        } else if (nodeList.length === 0) {
+          this.$refs.tree.setCheckedKeys([]);
+          this.$emit("treeCheck", nodeList);
+        } else {
+          let obj = { ...nodeList[0] };
+          this.$refs.tree.setCheckedKeys([]);
+          this.$nextTick(() => {
+            this.$refs.tree.setChecked(obj, true);
+          });
+          this.$message.error("这里只能选择一个审批人");
+        }
+      } else if (!this.only) {
+        this.$emit("treeCheck", nodeList);
+      }
+    },
+  },
+  created() {
+    this.getTree();
+    this.defaultListc = this.defaultList;
+  },
+  watch: {
+    type() {
+      this.defaultListc = this.defaultList;
+      this.$forceUpdate();
+    },
+    defaultList() {
+      this.$forceUpdate();
+    },
+    closeList() {
+      this.$refs.tree.setCheckedKeys([]);
+      if ([...this.resetList] && [...this.resetList].length > 0) {
+        [...this.resetList].forEach((el) => {
+          this.$nextTick(() => {
+            this.$refs.tree.setChecked(el, true);
+          });
+        });
+      }
+    },
+  },
+};
+</script>
+
+<style scoped lang="scss">
+.el-icon-caret-right {
+  color: #ccc;
+  margin: 0 5px;
+}
+.treebox {
+  border: 1px solid #ddd;
+}
+</style>

+ 265 - 176
src/pages/main/performance/components/sheet.vue

@@ -2,7 +2,7 @@
  * @Author       : yuanrunwei
  * @Date         : 2021-12-04 14:23:58
  * @LastEditors: Please set LastEditors
- * @LastEditTime: 2022-01-11 09:07:08
+ * @LastEditTime: 2022-01-23 19:41:44
  * @FilePath     : \spfm-market-front\src\pages\main\performance\components\sheet.vue
 -->
 
@@ -27,11 +27,24 @@
         >
           <el-button type="primary">上传</el-button>
         </el-upload>
-
+        <el-button
+          v-if="!status || status === '2'"
+          type="primary"
+          @click="handleSave('2')"
+          :disabled="handleForbid()"
+          >暂存</el-button
+        >
+        <el-button
+          v-if="status === '2'"
+          type="primary"
+          @click="handleResave"
+          :disabled="handleForbid()"
+          >保存</el-button
+        >
         <el-button
           v-if="addFlag === '0'"
           type="primary"
-          @click="handleSave"
+          @click="handleSave('0')"
           :disabled="handleForbid()"
           ><span>{{ id ? "提交" : "新增" }}</span
           ><span>{{
@@ -68,18 +81,6 @@
                 ></el-option>
               </el-select>
             </div>
-            <!-- <div class="form-input">
-              <span class="form-content"> 可编辑行:从</span>
-              <el-input v-model="form.col_start" />
-              <span class="form-content">到</span
-              ><el-input v-model="form.col_end" />
-            </div>
-            <div class="form-input">
-              <span class="form-content">可编辑列:从</span>
-              <el-input v-model="form.row_start" />
-              <span class="form-content">到</span>
-              <el-input v-model="form.row_end" />
-            </div> -->
           </el-form-item>
           <el-form-item>
             <el-radio :label="1"><span>特殊权限:</span></el-radio>
@@ -110,15 +111,15 @@
                 </el-select>
                 <div class="form-select">
                   <span class="form-content">可编辑行:从</span>
-                  <el-input v-model="item.col_start" />
+                  <el-input v-model="item.row_start" />
                   <span class="form-content">到</span>
-                  <el-input v-model="item.col_end" />
+                  <el-input v-model="item.row_end" />
                 </div>
                 <div class="form-select">
                   <span class="form-content">可编辑列:从</span>
-                  <el-input v-model="item.row_start" />
+                  <el-input v-model="item.col_start" />
                   <span class="form-content">到</span>
-                  <el-input v-model="item.row_end" />
+                  <el-input v-model="item.col_end" />
                 </div>
               </div>
             </el-form-item>
@@ -132,96 +133,57 @@
             </div>
           </el-form-item>
         </el-radio-group>
-        <!-- <el-form-item
-                    label="可编辑列"
-                    prop="array"
-                    ><el-select
-                        v-model="form.array"
-                        placeholder="可编辑列"
-                        multiple
-                    >
-                        <el-option
-                            v-for="(value, index) in 10"
-                            :key="index"
-                            :label="index + 1"
-                            :value="index + 1"
-                        >
-                        </el-option> </el-select
-                ></el-form-item>
-                <el-form-item
-                    label="权限规则"
-                    prop="type"
-                    :rules="{
-                        required: true,
-                        message: '权限规则不能为空',
-                        trigger: 'change',
-                    }"
-                >
-                    <el-select v-model="form.type">
-                        <el-option
-                            v-for="item in type_options"
-                            :key="item.value"
-                            :label="item.label"
-                            :value="item.value"
-                        ></el-option> </el-select
-                ></el-form-item>
-                <el-form-item
-                    label="负责人"
-                    prop="charge"
-                    :rules="{
-                        required: true,
-                        message: '负责人不能为空',
-                        trigger: 'blur',
-                    }"
-                >
-                    <div
-                        class="flex-justify-start"
-                        v-for="(item, index) in form.charge"
-                        :key="index"
-                    >
-                        <el-select
-                            v-model="item.key"
-                            class="margin-bottom-20 margin-right-10 flex-1"
-                            placeholder="请选择指定列/行"
-                            multiple
-                        >
-                            <el-option
-                                v-for="(value, index) in 10"
-                                :key="index"
-                                :label="index + 1"
-                                :value="index + 1"
-                            >
-                            </el-option>
-                        </el-select>
-                        <el-select
-                            class="margin-bottom-20"
-                            placeholder="请选择负责人"
-                            v-model="item.value"
-                            filterable
-                        >
-                            <el-option
-                                v-for="({ label, value }, index) in charge_list"
-                                :key="index"
-                                :label="label"
-                                :value="value"
-                            ></el-option>
-                        </el-select>
-                    </div>
-
-                    <div>
-                        <el-button @click.prevent="handleCharge('add')"
-                            >添加</el-button
-                        >
-                        <el-button
-                            v-if="form.charge.length - 1"
-                            @click.prevent="handleCharge('delete')"
-                            >删除</el-button
-                        >
-                    </div>
-                </el-form-item> -->
       </el-form>
-      <template v-if="id" v-slot:footer><div></div></template>
+      <template v-if="id && status !== '2'" v-slot:footer><div></div></template>
     </simple-dialog>
+    <simpleDialog
+      title="提交"
+      :visible="manager_approve"
+      :modal="false"
+      @cancel="handleApprove"
+    >
+      <el-form :model="approveForm" label-width="120px">
+        <el-form-item
+          label="审批意见:"
+          :rules="{
+            required: true,
+            message: '请选择审批意见',
+            trigger: 'change',
+          }"
+        >
+          <el-select v-model="approveForm.type">
+            <el-option
+              v-for="item in approveForm.list"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item
+          v-if="approveForm.type === '3'"
+          label="其它审批意见:"
+          :rules="{
+            required: true,
+            message: '请输入审批意见',
+            trigger: 'blur',
+          }"
+          ><el-input v-model="approveForm.comments"
+        /></el-form-item>
+      </el-form>
+      <template v-slot:footer>
+        <div>
+          <el-button @click.prevent="handleApprove('1')">结束</el-button>
+          <el-button @click.prevent="handleApprove('4')" type="primary"
+            >转副总审批</el-button
+          >
+          <el-button @click.prevent="handleApprove('3')" type="primary"
+            >转总经理审批</el-button
+          >
+        </div>
+      </template>
+    </simpleDialog>
   </div>
 </template>
 
@@ -245,6 +207,11 @@ export default {
     id: {
       default: null,
     },
+    receiver: {
+      type: String,
+      default: "",
+    },
+    status: { type: String, default: "" },
   },
   data() {
     return {
@@ -258,21 +225,40 @@ export default {
             row_end: "",
           },
         ],
-
         array: [],
         type: null,
+
         permission_type: null,
         col_start: "",
         col_end: "",
         row_start: "",
         row_end: "",
       },
+      approveForm: {
+        type: "",
+        comments: "",
+        list: [
+          {
+            label: "同意",
+            value: "同意",
+          },
+          {
+            label: "不同意",
+            value: "不同意",
+          },
+          {
+            label: "其他",
+            value: "3",
+          },
+        ],
+      },
       // 可提交标志
-      addFlag: '0',
+      addFlag: "0",
       isDisable: true,
       issued_id: null,
       template_id: null,
       visible: false,
+      manager_approve: false,
       row_list: [],
       column_list: [],
       charge_list: [],
@@ -303,24 +289,32 @@ export default {
     handleAllow({ row, column }) {
       return (
         (!this.form.permission_type && this.type === "edit") ||
-        (this.row_list.includes(row) && this.column_list.includes(column))
+        (this.row_list.includes(row) && this.column_list.includes(column)) ||
+        (this.status === "2" && this.type === "edit")
       );
     },
     async handleQuery() {
       let url = "";
-      let key = "";
+      let params = {};
       switch (this.attribute) {
         case "template":
           url = "/market/CMKFileTemplate/QueryCMKFileTemplateById";
-          key = "templateId";
+          params = {
+            templateId: this.id,
+          };
           break;
         case "order":
           url = "/market/CMKIssued/CMKQueryIssuedById";
-          key = "id";
+          params = {
+            id: this.id,
+          };
           break;
         case "file":
           url = "/market/CMKIssued/CMKIssuedProcessByUser";
-          key = "id";
+          params = {
+            id: this.id,
+            receiverId: this.receiver,
+          };
           break;
       }
       const {
@@ -338,9 +332,7 @@ export default {
         headers: {
           "Content-Type": "application/json",
         },
-        data: {
-          [key]: this.id,
-        },
+        data: params,
       });
       this.template_id = templateId;
       this.issued_id = issuedId;
@@ -386,16 +378,6 @@ export default {
             })),
           };
         }
-        // this.form = {
-        //   ...this.form,
-        //   type: type,
-        //   array: allowEditingColumns ? allowEditingColumns.split(",") : [],
-        //   charge: list.map(({ principalId, principalName, rowNum }) => ({
-        //     value: `${principalId},${principalName}`,
-        //     key: rowNum.split(","),
-        //   })),
-        // };
-        // this.form = {};
         this.row_list =
           this.type === "edit" && list[0].rowNum
             ? list[0].rowNum
@@ -444,32 +426,6 @@ export default {
       } else {
         return true;
       }
-      //  form: {
-      //   charge: [
-      //     {
-      //       person: "",
-      //       col_start: "",
-      //       col_End: "",
-      //       row_start: "",
-      //       row_end: "",
-      //     },
-      //   ],
-      //   array: [],
-      //   type: null,
-      //   permission_type: 0,
-      //   col_start: "",
-      //   col_end: "",
-      //   row_start: "",
-      //   row_end: "",
-      // },
-
-      // charge.map(({ key }) => {
-      //   console.log(key);
-      //   // if (key && value) {
-      //   //   object[key] = value;
-      //   // }
-      // });
-      // return !(Object.keys(object).length && type);
     },
     async handleCreate({ file, json, type, name } = {}) {
       let that = this;
@@ -573,8 +529,8 @@ export default {
         //  特殊权限
         reqdata.specialAuth = charge.map((el) =>
           JSON.stringify({
-            allowEditingColumns: this.paramsArr(el.col_start, el.col_end),
-            rowNum: this.paramsArr(el.row_start, el.row_end),
+            allowEditingColumns: `${el.col_start},${el.col_end}`,
+            rowNum: `${el.row_start},${el.row_end}`,
             principalId: el.person.split(",")[0],
             principalName: el.person.split(",")[1],
           })
@@ -592,7 +548,7 @@ export default {
       });
       this.$message.success("操作成功");
     },
-    async handleSave() {
+    async handleSave(type) {
       let edit_url = "";
       switch (this.attribute) {
         case "template":
@@ -608,30 +564,67 @@ export default {
       const sheet_name = window.luckysheet.getSheet().name;
       const data = window.luckysheet.getSheet(sheet_name);
       const workbook_name = window.luckysheet.getWorkbookName();
-      const {
-        data: { body },
-      } = await this.$http({
-        url: this.id
-          ? edit_url // 编辑
-          : "/market/CMKFileTemplate/CMKFileTemplateAdd", // 新增
-        method: "post",
-        headers: {
-          "Content-Type": "application/json",
-        },
-        data: {
-          id: this.template_id,
-          templateContent: JSON.stringify(data),
-          templateName: workbook_name,
-          issuedId: this.issued_id,
-        },
-      });
-      // 新增时添加权限
       if (!this.id) {
+        // 新增时添加权限
+        const {
+          data: { body },
+        } = await this.$http({
+          url: "/market/CMKFileTemplate/CMKFileTemplateAdd", // 新增
+          method: "post",
+          headers: {
+            "Content-Type": "application/json",
+          },
+          data: {
+            id: this.template_id,
+            templateContent: JSON.stringify(data),
+            templateName: workbook_name,
+            issuedId: this.issued_id,
+            status: type,
+          },
+        });
         this.handleAddAuth({ id: body });
+        this.$emit("save");
       } else {
-        this.$message.success("提交成功");
+        // 职位
+        let duty = JSON.parse(sessionStorage.userInfo).duty;
+        if (duty === "7") {
+          this.manager_approve = true;
+        } else {
+          // 员工提交
+          if (type === "2") {
+            // 暂存
+            await this.$http({
+              url: "/market/CMKFileTemplate/UptateCMKFileTemplateById", // 新增
+              method: "post",
+              headers: {
+                "Content-Type": "application/json",
+              },
+              data: {
+                templateId: this.id,
+                templateContent: JSON.stringify(data),
+                templateName: workbook_name,
+                status: type,
+              },
+            });
+            this.$emit("save");
+            return;
+          }
+          await this.$http({
+            url: edit_url, // 新增
+            method: "post",
+            headers: {
+              "Content-Type": "application/json",
+            },
+            data: {
+              id: this.template_id,
+              templateContent: JSON.stringify(data),
+              templateName: workbook_name,
+              issuedId: this.issued_id,
+            },
+          });
+          this.$emit("save");
+        }
       }
-      this.$emit("save");
     },
     handleAuth() {
       this.$refs["form"].validate((valid) => {
@@ -679,6 +672,81 @@ export default {
       console.log(this.form, "aada");
       this.visible = !this.visible;
     },
+    async handleApprove(type) {
+      if (this.approveForm.type) {
+        if (this.approveForm.type === "3" && !this.approveForm.comments) {
+          this.$message.error("请输入其他审批意见");
+          return;
+        }
+      } else {
+        this.$message.error("请选择审批意见");
+        return;
+      }
+      if (type) {
+        const sheet_name = window.luckysheet.getSheet().name;
+        const data = window.luckysheet.getSheet(sheet_name);
+        const workbook_name = window.luckysheet.getWorkbookName();
+        await this.$http({
+          url: "/market/CMKIssued/CMKIssuedSubmit", // 新增
+          method: "post",
+          headers: {
+            "Content-Type": "application/json",
+          },
+          data: {
+            id: this.template_id,
+            templateContent: JSON.stringify(data),
+            templateName: workbook_name,
+            issuedId: this.issued_id,
+          },
+        });
+        let params = {
+          id: this.issued_id,
+          reviewOpinion:
+            this.approveForm.type === "3"
+              ? this.approveForm.comments
+              : this.approveForm.type,
+        };
+        switch (type) {
+          case "1":
+            params = {
+              ...params,
+              operateName: "结束",
+              status: 3,
+            };
+            break;
+          case "4":
+            params = {
+              ...params,
+              operateName: "转副总审批",
+              reviewType: 2,
+            };
+            break;
+          case "3":
+            params = {
+              ...params,
+              operateName: "转总经理审批",
+              reviewType: 3,
+            };
+            break;
+        }
+        await this.$http({
+          url: "/market/CMKIssued/CMKIssuedCheck", // 新增
+          method: "post",
+          headers: {
+            "Content-Type": "application/json",
+          },
+          data: params,
+        });
+        this.$message({
+          type: "success",
+          message: "审批成功",
+        });
+        this.manager_approve = false;
+        this.$emit("save");
+      } else {
+        this.manager_approve = false;
+      }
+    },
     handleFullscreen() {
       const element = document.body;
       const is_fullscreen =
@@ -703,6 +771,26 @@ export default {
           : "";
       }
     },
+    handleResave() {
+      const sheet_name = window.luckysheet.getSheet().name;
+      const data = window.luckysheet.getSheet(sheet_name);
+      const workbook_name = window.luckysheet.getWorkbookName();
+      this.$http({
+        url: "/market/CMKFileTemplate/UptateCMKFileTemplateById",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {
+          templateId: this.id,
+          templateContent: JSON.stringify(data),
+          templateName: workbook_name,
+          status: "0",
+        },
+      }).then(() => {
+        this.$emit("save");
+      });
+    },
     handleChargeList() {
       this.$http({
         url: "/market/techcentergj/queryLeaderList",
@@ -720,6 +808,7 @@ export default {
     },
   },
   mounted() {
+    console.log(this.status, "s");
     this.handleInit();
     this.handleChargeList();
   },

+ 30 - 14
src/pages/main/performance/components/table.vue

@@ -2,7 +2,7 @@
  * @Author       : yuanrunwei
  * @Date         : 2021-11-01 18:02:58
  * @LastEditors: Please set LastEditors
- * @LastEditTime: 2022-01-14 11:31:39
+ * @LastEditTime: 2022-01-23 16:54:13
  * @FilePath     : /spfm-market-front/src/pages/main/performance/components/table.vue
 -->
 <template>
@@ -20,7 +20,7 @@
     />
     <el-table-column
       v-for="(
-        { props, label, type, width, align, children, dictionary, variable },
+        { props, label, type, width, align, children, dictionary, control },
         index
       ) in config"
       :key="index"
@@ -53,27 +53,43 @@
         </div>
         <div v-else-if="type === 'click'">
           <div
-            class="simple-table-click cursor-pointer flex"
+            v-if="control && Number(scope.row[control]) < 1 && scope.row[props]"
+          >
+            <span
+              v-for="(item, index) in scope.row[props].split(',')"
+              :key="index"
+              class="simple-table-click cursor-pointer"
+              @click="handleClick(props, { ...scope.row,index })"
+            >
+              {{ scope.row[props].split(",")[index] }}
+            </span>
+          </div>
+          <div
+            v-else-if="!control"
+            class="simple-table-click cursor-pointer"
             @click="handleClick(props, scope.row)"
           >
             {{ scope.row[props] }}
           </div>
+          <div v-else class="cursor-pointer">
+            {{ scope.row[props] }}
+          </div>
         </div>
         <div v-else-if="type === 'dictionary'">
           {{ dictionary[scope.row[props]] }}
         </div>
         <div v-else-if="type === 'file'">
-          <div v-if="scope.row[props] && scope.row[props].length" class="flex-justify-center">
-            <span
-              v-for="(item, index) in scope.row[props].split(',')"
+          <div v-if="scope.row[props] && scope.row[props].length">
+            <div
+              v-for="({ fileName }, index) in scope.row[props]"
               :key="index"
-              @click="downloadFile({index,rows:scope.row})"
-               class="simple-table-click cursor-pointer margin-left-10"
+              @click="downloadFile({ index, rows: scope.row })"
+              class="simple-table-click cursor-pointer margin-left-10"
             >
-              {{ item }}
-            </span>
+              {{ fileName }}
+            </div>
           </div>
-          <div v-else>{{ scope.row[props] }}</div>
+          <div v-else></div>
         </div>
         <div v-else>{{ scope.row[props] }}</div>
       </template>
@@ -97,9 +113,9 @@
             </div>
             <div v-else>{{ scope.row[props] }}</div>
           </template>
-          <template v-if="variable">
+          <!-- <template v-if="variable">
             <div>{{ scope.row[props] }}</div>
-          </template>
+          </template> -->
         </el-table-column>
       </template>
     </el-table-column>
@@ -119,7 +135,7 @@
             <el-popconfirm
               v-if="popconfirm"
               :title="`确定要${label}吗?`"
-              @onConfirm="handleClick(props, scope.row)"
+              @confirm="handleClick(props, scope.row)"
               @cancel="handleCancel"
             >
               <el-button slot="reference" type="text" size="small">{{

+ 159 - 114
src/pages/main/performance/department.vue

@@ -28,7 +28,7 @@
       title="文件收集"
       :visible="visible"
       :reload="reload"
-      width="1200px"
+      width="1300px"
       @cancel="handleCancel('visible')"
     >
       <template>
@@ -41,7 +41,7 @@
                 type="primary"
                 v-if="
                   edit_form.status === '0' &&
-                  (duty === '7' || duty === '2' || duty === '1')
+                  (duty === '7' || duty === '3' || duty === '4')
                 "
                 @click="handleTransfer"
                 >转派</el-button
@@ -58,7 +58,7 @@
                 type="primary"
                 v-if="
                   edit_form.status === '2' &&
-                  (duty === '7' || duty === '2' || duty === '1') &&
+                  (duty === '7' || duty === '3' || duty === '4') &&
                   reviewType === duty
                 "
                 @click="handleApprove"
@@ -78,15 +78,19 @@
         <simple-sheet
           v-if="visible"
           :id="edit_form.id"
+          :receiver="receiverId"
           :type="
             edit_visible &&
-            (((edit_form.status === '1' || edit_form.status === '2') &&
+            (((edit_form.status === '1' ||
+              edit_form.status === '2' ||
+              edit_form.status === '5') &&
               duty === '9') ||
               edit_form.status === '0')
               ? 'edit'
               : 'view'
           "
           attribute="file"
+          status="10"
           @save="handleSave"
         />
         <!-- <analysis
@@ -103,12 +107,34 @@
       class="approve"
       @cancel="handleCancel('approve_visible')"
     >
-      <el-form :model="approveForm" ref="approveForm"
-        ><el-form-item label="审批意见" prop="comments" label-width="80px"
-          ><el-input
-            type="textarea"
-            v-model="approveForm.comments"
-            autosize /></el-form-item
+      <el-form :model="approveForm" ref="approveForm" label-width="120px">
+        <el-form-item
+          label="审批意见:"
+          :rules="{
+            required: true,
+            message: '请选择审批意见',
+            trigger: 'change',
+          }"
+        >
+          <el-select v-model="approveForm.type">
+            <el-option
+              v-for="item in approveForm.list"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item
+          v-if="approveForm.type === '3'"
+          label="其它审批意见:"
+          :rules="{
+            required: true,
+            message: '请输入审批意见',
+            trigger: 'blur',
+          }"
+          ><el-input v-model="approveForm.comments" /></el-form-item
       ></el-form>
       <template v-slot:footer
         ><div>
@@ -143,7 +169,7 @@
       title="转派"
       :visible="transfer_visible"
       :reload="reload"
-      width="1000px"
+      width="1200px"
       @confirm="transferConfirm"
       @cancel="handleCancel('transfer_visible')"
     >
@@ -184,11 +210,11 @@
                 class="margin-bottom-20 margin-right-10"
                 placeholder="请选择可编辑行"
                 multiple
-                v-model="item.allowEditingColumns"
+                v-model="item.rowNum"
                 @change="colsChange"
               >
                 <el-option
-                  v-for="(item, index) in transfer_cols_orgin"
+                  v-for="(item, index) in transfer_rows_orgin"
                   :key="index"
                   :label="item"
                   :value="item"
@@ -201,11 +227,11 @@
                 class="margin-bottom-20 margin-right-10"
                 placeholder="请选择可编辑列"
                 multiple
-                v-model="item.rowNum"
+                v-model="item.allowEditingColumns"
                 @change="rowsChange"
               >
                 <el-option
-                  v-for="(item, index) in transfer_rows_orgin"
+                  v-for="(item, index) in transfer_cols_orgin"
                   :key="index"
                   :label="item"
                   :value="item"
@@ -240,6 +266,27 @@
         :list="receiver_table_list"
         :config="receiver_table_config"
       ></simple-table>
+      <template v-slot:footer><div></div></template>
+    </simple-dialog>
+    <simple-dialog
+      title="选择科室经理"
+      :visible="menager_visible"
+      @confirm="confirmManger"
+      @cancel="handleCancel('menager_visible')"
+    >
+      <el-form>
+        <el-form-item label="科室经理">
+          <el-select v-model="receiverId">
+            <el-option
+              v-for="(item, index) in receiverList"
+              :key="index"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
     </simple-dialog>
     <!-- <simple-dialog
       title="流程跟踪"
@@ -310,7 +357,12 @@ export default {
       track_visible: false,
       // 回复详情
       principal_visible: false,
+      // 查看经理
+      menager_visible: false,
       edit_form: {},
+      // 接收人id
+      receiverId: "",
+      receiverList: [],
       // 回复详情
       receiver_table_list: [],
       receiver_table_config: [
@@ -382,7 +434,24 @@ export default {
         ],
       },
       // 审批意见
-      approveForm: { comments: "" },
+      approveForm: {
+        type: "",
+        comments: "",
+        list: [
+          {
+            label: "同意",
+            value: "同意",
+          },
+          {
+            label: "不同意",
+            value: "不同意",
+          },
+          {
+            label: "其他",
+            value: "3",
+          },
+        ],
+      },
       trackList: [],
       //   顶部form
       table_form: [
@@ -403,6 +472,10 @@ export default {
           // 0.待处理  1.待汇总 2.待审批  3.已完成
           dictionary: [
             {
+              label: "已撤回",
+              value: "-1",
+            },
+            {
               label: "待处理",
               value: "0",
             },
@@ -474,25 +547,40 @@ export default {
           props: "loginNameStr",
         },
         {
-          label: "接人",
+          label: "接人",
           props: "receiverName",
           type: "click",
+          control: "viewFlag",
+        },
+        {
+          label: "当前处理人",
+          props: "currentReceiverName",
+        },
+        {
+          label: "发起时间",
+          props: "createTime",
         },
         {
           label: "状态",
           props: "status",
           type: "dictionary",
-          dictionary: { 0: "待处理", 1: "待汇总", 2: "待审批", 3: "已完成" },
+          dictionary: {
+            "-1": "已撤回",
+            0: "待处理",
+            1: "待汇总",
+            2: "待审批",
+            3: "已完成",
+            4: "已提交",
+            5: "未提交",
+          },
         },
       ],
     };
   },
-  watch:{
-    duty(){
-      if(this.duty==='9'){
-        this.table_config = this.table_config.filter(el=>el.props!=='receiverName')
-      }
-    }
+  watch: {
+    "approveForm.type"() {
+      this.approveForm.comments = "";
+    },
   },
   mounted() {
     this.handleInit({
@@ -502,7 +590,7 @@ export default {
     });
     // 职位
     this.duty = JSON.parse(sessionStorage.userInfo).duty;
-    // 根据职位判定  科室经理7、分管副总 2 、总经理 1 、职员 9
+    // 根据职位判定  科室经理7、分管副总 4 、总经理 3 、职员 9
     console.log(this.duty, "duty");
     switch (this.duty) {
       // 科室经理
@@ -510,11 +598,11 @@ export default {
         this.type = "1";
         break;
       // 分管副总
-      case "2":
+      case "4":
         this.type = "2";
         break;
       // 总经理
-      case "1":
+      case "3":
         this.type = "3";
         break;
     }
@@ -586,10 +674,10 @@ export default {
             this.reviewType = "7";
             break;
           case "2":
-            this.reviewType = "2";
+            this.reviewType = "4";
             break;
           case "3":
-            this.reviewType = "1";
+            this.reviewType = "3";
             break;
         }
         // if (reviewType) {
@@ -600,9 +688,26 @@ export default {
     // 查看按钮
     handleCheck(row) {
       console.log(row, "row");
+      this.edit_form = row;
+      this.edit_visible = false;
+      if (row.receiverId && row.receiverId.split(",").length > 1) {
+        this.menager_visible = true;
+
+        this.receiverList = row.receiverName
+          ? row.receiverId.split(",").map((el, index) => ({
+              label: row.receiverName.split(",")[index],
+              value: el,
+            }))
+          : [];
+      } else {
+        this.id = row.id;
+        this.visible = true;
+      }
+    },
+    confirmManger() {
       this.visible = true;
       this.edit_visible = false;
-      this.edit_form = row;
+      this.menager_visible = false;
     },
     // 原下发管理的撤回
     handleDelete({ id }) {
@@ -617,7 +722,7 @@ export default {
           id,
         },
       }).then(() => {
-        this.$message.success("撤回成功");
+        this.$message.success("撤回成功, 请重新创建模版");
         this.handleInit({
           ...this.table_search,
           page: this.page,
@@ -783,11 +888,23 @@ export default {
       this.transfer_visible = true;
     },
     handleTurn(type) {
+      if (this.approveForm.type) {
+        if (this.approveForm.type === "3" && !this.approveForm.comments) {
+          this.$message.error("请输入其他审批意见");
+          return;
+        }
+      } else {
+        this.$message.error("请选择审批意见");
+        return;
+      }
       // finish 结束 transfer 转派 back //打回 // agree 同意  // transfermanger 转总经理审批
       let request = 0;
       let reqdata = {
         id: this.edit_form.id,
-        reviewOpinion: this.approveForm.comments,
+        reviewOpinion:
+          this.approveForm.type === "3"
+            ? this.approveForm.comments
+            : this.approveForm.type,
       };
       switch (type) {
         case "finish":
@@ -802,7 +919,7 @@ export default {
             reqdata.reviewType = 2;
             reqdata.operateName = "转副总审批";
             request = 1;
-          } else if (this.duty === "2") {
+          } else if (this.duty === "4") {
             reqdata.reviewType = 3;
             request = 1;
             reqdata.operateName = "转总经理审批";
@@ -823,9 +940,9 @@ export default {
         case "return":
           reqdata.status = "0";
           reqdata.operateName = "退回";
-          if (this.duty === "2") {
+          if (this.duty === "4") {
             reqdata.reviewType = 1;
-          } else if (this.duty === "1") {
+          } else if (this.duty === "3") {
             reqdata.reviewType = 2;
           }
           console.log(reqdata, "reqdata");
@@ -915,21 +1032,6 @@ export default {
           }
         });
       }
-      // this.$http({
-      //   url: "/market/CMKIssued/CMKIssuedCheck",
-      //   method: "post",
-      //   headers: {
-      //     "Content-Type": "application/json",
-      //   },
-      //   data: {
-      //     groupId,
-      //   },
-      // }).then((res) => {
-      //   console.log(res, "res");
-      //  this.handleInit()
-      // this.handleCancel("visible");
-      // this.handleCancel("approve_visible");
-      // });
     },
     // 通用方法用于转化全局
     paramsArr(start, end) {
@@ -952,18 +1054,17 @@ export default {
       });
       this.handleCancel("visible");
     },
-    handleReceiver({ id }) {
+    handleReceiver({ index, receiverId, id }) {
       // 回复详情
-      console.log(id);
-      this.principal_visible = true;
       this.$http({
         url: "/market/CMKIssued/replyDetails",
         method: "post",
         headers: {
           "Content-Type": "application/json",
         },
-        data: { issuedId: id },
+        data: { issuedId: id, receiverId: receiverId.split(",")[index] },
       }).then(({ data }) => {
+        this.principal_visible = true;
         this.receiver_table_list = data;
       });
     },
@@ -972,6 +1073,7 @@ export default {
       switch (data) {
         case "visible":
           this.visible = false;
+          this.receiverId = "";
           break;
         case "approve_visible":
           this.approveForm.comments = "";
@@ -986,68 +1088,11 @@ export default {
         case "principal_visible":
           this.principal_visible = false;
           break;
+        case "menager_visible":
+          this.menager_visible = false;
+          break;
       }
     },
-    // handleBack() {
-    //   const object = {
-    //     ...JSON.parse(sessionStorage.global_data)[0],
-    //     department_status: "待处理",
-    //   };
-    //   sessionStorage.setItem("global_data", JSON.stringify([object]));
-    //   const process_array = JSON.parse(sessionStorage.global_process);
-    //   process_array.push({
-    //     link: "审批驳回",
-    //     creatperson: `ADMIN ${this.$formatDate(new Date(), "YYYY-MM-DD")}`,
-    //     explain: this.approveForm.comments,
-    //   });
-    //   sessionStorage.setItem("global_process", JSON.stringify(process_array));
-
-    //   // this.handleInit();
-    //   // this.$message.success("打回成功");
-    //   // this.handleCancel("visible");
-    //   // this.handleCancel("approve_visible");
-    // },
-    // handleAgree() {
-    //   const object = {
-    //     ...JSON.parse(sessionStorage.global_data)[0],
-    //     department_status: "已完成",
-    //   };
-    //   sessionStorage.setItem("global_data", JSON.stringify([object]));
-    //   const process_array = JSON.parse(sessionStorage.global_process);
-    //   process_array.push({
-    //     link: "审批通过",
-    //     creatperson: `ADMIN ${this.$formatDate(new Date(), "YYYY-MM-DD")}`,
-    //     explain: this.approveForm.comments,
-    //   });
-    //   sessionStorage.setItem("global_process", JSON.stringify(process_array));
-    //   this.handleInit();
-    //   this.$message.success("审批成功");
-    //   this.handleCancel("visible");
-    //   this.handleCancel("approve_visible");
-    // },
-    // handleSubmit() {
-    //   // 提交好了
-    //   let reqdata = {
-    //     id: this.edit_form.id,
-    //     templateContent: "asdad",
-    //   };
-    //   this.$http({
-    //     url: "/CMKIssued/CMKIssuedSubmit",
-    //     method: "post",
-    //     headers: {
-    //       "Content-Type": "application/json",
-    //     },
-    //     data: reqdata,
-    //   }).then(({ data }) => {
-    //     console.log(data, "data");
-    //     if (data) {
-    //       this.$message.success("提交成功");
-    //       this.handleCancel("visible");
-    //     } else {
-    //       this.$message.error("提交失败");
-    //     }
-    //   });
-    // },
   },
 };
 </script>

+ 74 - 8
src/pages/main/performance/mould.vue

@@ -14,6 +14,7 @@
         :handle-row="table_handle_row"
         @issue="(params) => handleVisible('issue', params)"
         @detail="(params) => handleVisible('template', params)"
+        @redit="(params) => handleVisible('edit', params)"
         @delete="handleDelete"
       ></simple-table>
       <simple-pagination
@@ -61,7 +62,11 @@
             trigger: 'change',
           }"
         >
-          <el-date-picker v-model="issue_form.endTime" type="datetime" format="yyyy-MM-dd HH:00:00">
+          <el-date-picker
+            v-model="issue_form.endTime"
+            type="datetime"
+            format="yyyy-MM-dd HH:00:00"
+          >
           </el-date-picker>
         </el-form-item>
       </el-form>
@@ -75,7 +80,25 @@
       @cancel="handleVisible('add')"
     >
       <el-form inline :model="form" label-width="100px"> </el-form>
-      <simple-sheet v-if="add_visible" @save="handleSave" type="edit" />
+      <simple-sheet v-if="add_visible" @save="handleSave('add')" type="edit" />
+      <template v-slot:footer><div></div></template>
+    </simple-dialog>
+    <simple-dialog
+      fullscreen
+      title="编辑模板"
+      :visible="edit_visible"
+      width="1200px"
+      @confirm="handleVisible('edit')"
+      @cancel="handleVisible('edit')"
+    >
+      <el-form inline :model="form" label-width="100px"> </el-form>
+      <simple-sheet
+        v-if="edit_visible"
+        :id="template_id"
+        @save="handleSave('edit')"
+        :status="status"
+        type="edit"
+      />
       <template v-slot:footer><div></div></template>
     </simple-dialog>
     <simple-dialog
@@ -111,13 +134,19 @@ export default {
       rows: 10,
       total: 0,
       form: {},
+      status: "",
       add_visible: false,
+      edit_visible: false,
       // template
       template_visible: false,
       template_id: null,
       // issue
       issue_visible: false,
-      issue_form: {},
+      issue_form: {
+        reason: "",
+        precautions: "",
+        endTime: "",
+      },
       issue_id: null,
       // table
       table_loading: false,
@@ -140,6 +169,16 @@ export default {
         {
           label: "下发",
           props: "issue",
+          visible: {
+            status: ["0"],
+          },
+        },
+        {
+          label: "编辑",
+          props: "redit",
+          visible: {
+            status: ["2"],
+          },
         },
         {
           label: "查看",
@@ -148,6 +187,9 @@ export default {
         {
           label: "删除",
           props: "delete",
+          visible: {
+            status: ["0", "2"],
+          },
           popconfirm: true,
         },
       ],
@@ -173,8 +215,9 @@ export default {
           props: "status",
           type: "dictionary",
           dictionary: {
-            0: "在用",
-            1: "停用",
+            0: "已创建",
+            2: "起草中",
+            3: "已下发",
           },
         },
       ],
@@ -215,6 +258,11 @@ export default {
         case "add":
           this.add_visible = !this.add_visible;
           break;
+        case "edit":
+          this.edit_visible = !this.edit_visible;
+          this.template_id = params ? params.id : null;
+          this.status = params ? params.status : "";
+          break;
         case "template":
           this.template_visible = !this.template_visible;
           // this.template_id = params?.id;
@@ -223,6 +271,13 @@ export default {
         case "issue":
           this.issue_visible = !this.issue_visible;
           this.issue_id = params ? params.id : null;
+          if (this.issue_visible) {
+            this.issue_form.reason = params.reason ? params.reason : "";
+            this.issue_form.precautions = params.precautions
+              ? params.precautions
+              : "";
+            this.issue_form.endTime = params.endTime ? params.endTime : "";
+          }
           break;
       }
     },
@@ -255,7 +310,10 @@ export default {
             },
             data: {
               ...this.issue_form,
-              endTime: this.$formatDate(this.issue_form.endTime, "YYYY-MM-DD HH:00:00"),
+              endTime: this.$formatDate(
+                this.issue_form.endTime,
+                "YYYY-MM-DD HH:00:00"
+              ),
               templateId: this.issue_id,
             },
           }).then(() => {
@@ -266,8 +324,16 @@ export default {
         }
       });
     },
-    handleSave() {
-      this.handleVisible("add");
+    handleSave(type) {
+      switch (type) {
+        case "add":
+          this.handleVisible("add");
+          break;
+        case "edit":
+          this.handleVisible("edit");
+          break;
+      }
+
       this.handleInit();
     },
   },

+ 25 - 4
src/router/index.js

@@ -867,20 +867,34 @@ const routes = [{
                     component: (resolve) => require( /* webpackChunkName: "system" */['../pages/main/competitor/competeInfo'], resolve)
                 },
                 {
-                    meta: { name:  '新增竞争对手', keepAlive: false },
+                    meta: { name:  '新增竞争对手违规信息', keepAlive: false },
                     path: '/addCompetitor',
                     name: 'addCompetitor',
                     component: (resolve) => require( /* webpackChunkName: "system" */
                         ['../pages/main/competitor/addCompetitor.vue'], resolve)
                 },
                 {
-                    meta: { name:  '修改竞争对手', keepAlive: false },
+                    meta: { name:  '新增竞争对手常规信息', keepAlive: false },
+                    path: '/addCompetitorNew',
+                    name: 'addCompetitorNew',
+                    component: (resolve) => require( /* webpackChunkName: "system" */
+                        ['../pages/main/competitor/addCompetitorNew.vue'], resolve)
+                },
+                {
+                    meta: { name:  '修改竞争对手违规信息', keepAlive: false },
                     path: '/changeCompet',
                     name: 'changeCompet',
                     component: (resolve) => require( /* webpackChunkName: "system" */
                         ['../pages/main/competitor/changeCompet.vue'], resolve)
                 },
                 {
+                    meta: { name:  '修改竞争对手正规信息', keepAlive: false },
+                    path: '/changeCompetNew',
+                    name: 'changeCompetNew',
+                    component: (resolve) => require( /* webpackChunkName: "system" */
+                        ['../pages/main/competitor/changeCompetNew.vue'], resolve)
+                },
+                {
                     meta: { name:  '修改竞争对手审核详情', keepAlive: false },
                     path: '/competitorInfo',
                     name: 'competitorInfo',
@@ -888,6 +902,13 @@ const routes = [{
                         ['../pages/main/competitor/competitorInfo.vue'], resolve)
                 },
                 {
+                    meta: { name:  '修改竞争对手审核详情', keepAlive: false },
+                    path: '/competitorInfoNew',
+                    name: 'competitorInfo',
+                    component: (resolve) => require( /* webpackChunkName: "system" */
+                        ['../pages/main/competitor/competitorInfoNew.vue'], resolve)
+                },
+                {
                     meta: { name:  '修改竞争对手统计', keepAlive: false },
                     path: '/compete',
                     name: 'compete',
@@ -1701,8 +1722,8 @@ router.beforeEach((to, from, next) => {
     } else {
         // if (window.location.href.indexOf('?agileauthtoken=') == -1) {
         if (window.sessionStorage.agileauthtoken == undefined) {
-            window.location.href = "http://10.230.26.15:8000/spfm/sysmgr/ssLogin?sysFlag=0";
-            // next()
+            // window.location.href = "http://10.230.26.15:8000/spfm/sysmgr/ssLogin?sysFlag=0";
+            next()
             //window.location.href = "http://cas.hl.cmcc/cas/login?service=?service=http%3A%2F%2F10.230.26.15%3A8000%2Fspfm%2Fsysmgr%2FssLogin%3FsysFlag%3D0"
         } else {
             next()

+ 8 - 0
vue.config.js

@@ -100,6 +100,14 @@ module.exports = {
                     "^/market": "",
                 },
             },
+            "/market/techcentergj": {
+                target: "http://192.168.1.9:9114",
+                ws: false,
+                changeOrigin: true,
+                pathRewrite: {
+                    "^/market": "",
+                },
+            },
             "/mkWangge": {
                 target: "http://192.168.1.19:9114",
                 ws: false,