Forráskód Böngészése

Merge branch 'dev_info' into 'master'

Dev info

See merge request spfm-group/spfm-market-front!23
侯利飞 3 éve
szülő
commit
e2811f2cec

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 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>

+ 6 - 10
src/pages/main/gridDivision/workersList.vue

@@ -416,22 +416,22 @@ export default {
               props: "add",
             },
           ];
-        }else if(huiZongButton && !insertButton){
+        } else if (huiZongButton && !insertButton) {
           this.table_handle = [
             {
               label: "工单汇总",
               props: "summary",
             },
           ];
-        }else if(!huiZongButton && insertButton){
+        } else if (!huiZongButton && insertButton) {
           this.table_handle = [
             {
               label: "新建",
               props: "add",
             },
           ];
-        }else{
-          this.table_handle = []
+        } else {
+          this.table_handle = [];
         }
 
         // 列表数据回显
@@ -507,20 +507,17 @@ export default {
     },
     //文件返回值
     uploadBack({ file }) {
-      console.log({}.constructor.name, "obj");
-      console.log(file.constructor.name, "file");
       // console.log( file instanceof Object,'sasdas');
       this.file.push(file);
-      console.log(this.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);
+      console.log(file,'dada');
       this.file.forEach((item, index) => {
-        console.log(item, "rsr");
         if (item.uid === file.uid) {
           this.file.splice(index, 1);
           if (item.id) {
@@ -530,7 +527,6 @@ export default {
           }
         }
       });
-      console.log(this.file, this.delFile);
       this.file1 = this.file[0];
       this.file2 = this.file[1];
       this.file3 = this.file[2];

+ 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>

+ 142 - 151
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-18 20:44:14
+ * @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>
@@ -132,102 +133,45 @@
             </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="审批"
+      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>
@@ -263,6 +207,11 @@ export default {
     id: {
       default: null,
     },
+    receiver: {
+      type: String,
+      default: "",
+    },
+    status: { type: String, default: "" },
   },
   data() {
     return {
@@ -276,7 +225,6 @@ export default {
             row_end: "",
           },
         ],
-
         array: [],
         type: null,
 
@@ -286,6 +234,24 @@ export default {
         row_start: "",
         row_end: "",
       },
+      approveForm: {
+        type: "",
+        comments: "",
+        list: [
+          {
+            label: "同意",
+            value: "同意",
+          },
+          {
+            label: "不同意",
+            value: "不同意",
+          },
+          {
+            label: "其他",
+            value: "3",
+          },
+        ],
+      },
       // 可提交标志
       addFlag: "0",
       isDisable: true,
@@ -323,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 {
@@ -358,9 +332,7 @@ export default {
         headers: {
           "Content-Type": "application/json",
         },
-        data: {
-          [key]: this.id,
-        },
+        data: params,
       });
       this.template_id = templateId;
       this.issued_id = issuedId;
@@ -406,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
@@ -464,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;
@@ -612,7 +548,7 @@ export default {
       });
       this.$message.success("操作成功");
     },
-    async handleSave() {
+    async handleSave(type) {
       let edit_url = "";
       switch (this.attribute) {
         case "template":
@@ -643,6 +579,7 @@ export default {
             templateContent: JSON.stringify(data),
             templateName: workbook_name,
             issuedId: this.issued_id,
+            status: type,
           },
         });
         this.handleAddAuth({ id: body });
@@ -654,6 +591,24 @@ export default {
           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",
@@ -718,6 +673,15 @@ export default {
       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);
@@ -735,7 +699,13 @@ export default {
             issuedId: this.issued_id,
           },
         });
-        let params = { id: 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 = {
@@ -801,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",
@@ -818,6 +808,7 @@ export default {
     },
   },
   mounted() {
+    console.log(this.status, "s");
     this.handleInit();
     this.handleChargeList();
   },

+ 10 - 5
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-18 14:47:12
+ * @LastEditTime: 2022-01-23 16:54:13
  * @FilePath     : /spfm-market-front/src/pages/main/performance/components/table.vue
 -->
 <template>
@@ -53,11 +53,16 @@
         </div>
         <div v-else-if="type === 'click'">
           <div
-            v-if="control && Number(scope.row[control]) < 1"
-            class="simple-table-click cursor-pointer"
-            @click="handleClick(props, scope.row)"
+            v-if="control && Number(scope.row[control]) < 1 && scope.row[props]"
           >
-            {{ 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"

+ 143 - 30
src/pages/main/performance/department.vue

@@ -28,7 +28,7 @@
       title="文件收集"
       :visible="visible"
       :reload="reload"
-      width="1200px"
+      width="1300px"
       @cancel="handleCancel('visible')"
     >
       <template>
@@ -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: [
@@ -484,23 +553,35 @@ export default {
           control: "viewFlag",
         },
         {
+          label: "当前处理人",
+          props: "currentReceiverName",
+        },
+        {
+          label: "发起时间",
+          props: "createTime",
+        },
+        {
           label: "状态",
           props: "status",
           type: "dictionary",
-          dictionary: { '-1':'已撤回', 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({
       ...this.table_search,
@@ -607,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 }) {
@@ -790,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":
@@ -944,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;
       });
     },
@@ -964,6 +1073,7 @@ export default {
       switch (data) {
         case "visible":
           this.visible = false;
+          this.receiverId = "";
           break;
         case "approve_visible":
           this.approveForm.comments = "";
@@ -978,6 +1088,9 @@ export default {
         case "principal_visible":
           this.principal_visible = false;
           break;
+        case "menager_visible":
+          this.menager_visible = false;
+          break;
       }
     },
   },

+ 51 - 6
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
@@ -79,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
@@ -115,7 +134,9 @@ export default {
       rows: 10,
       total: 0,
       form: {},
+      status: "",
       add_visible: false,
+      edit_visible: false,
       // template
       template_visible: false,
       template_id: null,
@@ -149,7 +170,14 @@ export default {
           label: "下发",
           props: "issue",
           visible: {
-            issuedFlag: [0],
+            status: ["0"],
+          },
+        },
+        {
+          label: "编辑",
+          props: "redit",
+          visible: {
+            status: ["2"],
           },
         },
         {
@@ -159,6 +187,9 @@ export default {
         {
           label: "删除",
           props: "delete",
+          visible: {
+            status: ["0", "2"],
+          },
           popconfirm: true,
         },
       ],
@@ -184,8 +215,9 @@ export default {
           props: "status",
           type: "dictionary",
           dictionary: {
-            0: "在用",
-            1: "停用",
+            0: "已创建",
+            2: "起草中",
+            3: "已下发",
           },
         },
       ],
@@ -226,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;
@@ -287,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();
     },
   },

+ 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,