Explorar o código

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

molilang %!s(int64=3) %!d(string=hai) anos
pai
achega
eda9426a43

+ 42 - 20
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-08 20:26:39
+ * @LastEditTime: 2022-01-10 18:06:54
  * @FilePath     : \spfm-market-front\src\pages\main\performance\components\sheet.vue
 -->
 
@@ -27,7 +27,12 @@
         >
           <el-button type="primary">上传</el-button>
         </el-upload>
-        <el-button type="primary" @click="handleSave" :disabled="handleForbid()"
+
+        <el-button
+          v-if="addFlag === '0'"
+          type="primary"
+          @click="handleSave"
+          :disabled="handleForbid()"
           ><span>{{ id ? "提交" : "新增" }}</span
           ><span>{{
             handleForbid() ? `(请先设置权限)` : ""
@@ -47,7 +52,7 @@
       <el-form ref="form" :model="form" label-width="80px">
         <el-radio-group v-model="form.permission_type">
           <el-form-item>
-            <el-radio :label="0"><span>公共权限</span></el-radio>
+            <el-radio :label="0"><span>无特殊权限</span></el-radio>
             <div>
               <span class="form-content">负责人</span>
               <el-select
@@ -118,7 +123,7 @@
               </div>
             </el-form-item>
             <div>
-              <el-button @click.prevent="handleCharge('add')" >添加</el-button>
+              <el-button @click.prevent="handleCharge('add')">添加</el-button>
               <el-button
                 v-if="form.charge.length - 1"
                 @click.prevent="handleCharge('delete')"
@@ -253,6 +258,7 @@ export default {
             row_end: "",
           },
         ],
+
         array: [],
         type: null,
         permission_type: null,
@@ -261,6 +267,8 @@ export default {
         row_start: "",
         row_end: "",
       },
+      // 可提交标志
+      addFlag: null,
       isDisable: true,
       issued_id: null,
       template_id: null,
@@ -293,7 +301,10 @@ export default {
     //     console.log(e,'e');
     // },
     handleAllow({ row, column }) {
-      return (!this.form.permission_type&&this.type === "edit")  || (this.row_list.includes(row) && this.column_list.includes(column));
+      return (
+        (!this.form.permission_type && this.type === "edit") ||
+        (this.row_list.includes(row) && this.column_list.includes(column))
+      );
     },
     async handleQuery() {
       let url = "";
@@ -313,7 +324,14 @@ export default {
           break;
       }
       const {
-        data: { templateContent, templateName, issuedId, templateId, list },
+        data: {
+          templateContent,
+          templateName,
+          issuedId,
+          templateId,
+          list,
+          addFlag,
+        },
       } = await this.$http({
         url,
         method: "post",
@@ -326,6 +344,8 @@ export default {
       });
       this.template_id = templateId;
       this.issued_id = issuedId;
+      this.addFlag = addFlag;
+      console.log(addFlag, "addFlag");
       if (list && list.length) {
         const { type } = list[0];
         if (type === "1") {
@@ -333,8 +353,8 @@ export default {
           // const { allowEditingColumns, rowNum } = list[0];
           this.form = {
             permission_type: Number(type) - 1,
-            person:list.map(el=>{
-              return `${el.principalId},${el.principalName}`
+            person: list.map((el) => {
+              return `${el.principalId},${el.principalName}`;
             }),
             charge: [
               {
@@ -377,11 +397,13 @@ export default {
         // };
         // this.form = {};
         this.row_list =
-          this.type === "edit"&&list[0].rowNum
-            ? list[0].rowNum.split(",").map((element) => JSON.parse(element) - 1)
+          this.type === "edit" && list[0].rowNum
+            ? list[0].rowNum
+                .split(",")
+                .map((element) => JSON.parse(element) - 1)
             : [];
         this.column_list =
-          this.type === "edit"&&list[0].allowEditingColumns
+          this.type === "edit" && list[0].allowEditingColumns
             ? list[0].allowEditingColumns
                 .split(",")
                 .map((element) => JSON.parse(element) - 1)
@@ -538,14 +560,14 @@ export default {
       if (!permission_type) {
         //  公共权限
         const { person } = this.form;
-        const principalId = []
-        const principalName = []
-        person.forEach(el =>{
-          principalId.push(el.split(",")[0])
-          principalName.push(el.split(",")[1])
-        })
-        reqdata.principalId = principalId.join(',');
-        reqdata.principalName = principalName.join(',');
+        const principalId = [];
+        const principalName = [];
+        person.forEach((el) => {
+          principalId.push(el.split(",")[0]);
+          principalName.push(el.split(",")[1]);
+        });
+        reqdata.principalId = principalId.join(",");
+        reqdata.principalName = principalName.join(",");
       } else {
         const { charge } = this.form;
         //  特殊权限
@@ -732,7 +754,7 @@ export default {
   }
   &-select {
     .el-input {
-      width: 150px;
+      width: 100px;
       .el-input__inner {
         height: 30px !important;
         line-height: 30px !important;

+ 17 - 6
src/pages/main/performance/department.vue

@@ -79,7 +79,9 @@
           v-if="visible"
           :id="edit_form.id"
           :type="
-            edit_visible && edit_form.status === '1' && duty === '9'
+            edit_visible &&
+            ((edit_form.status === '2' && duty === '9') ||
+              edit_form.status === '0')
               ? 'edit'
               : 'view'
           "
@@ -113,6 +115,9 @@
             <el-button @click="handleTurn('transfer')" type="primary"
               >转副总审批</el-button
             >
+            <el-button @click="handleTurn('transfermanger')" type="primary"
+              >转总经理审批</el-button
+            >
           </div>
           <div v-else-if="type === '2'">
             <el-button @click="handleTurn('finish')">结束</el-button>
@@ -427,7 +432,7 @@ export default {
           label: "处理",
           props: "edit",
           visible: {
-            status: ["0", "1", "2"],
+            processFlag: ["0"],
           },
         },
         {
@@ -435,7 +440,7 @@ export default {
           props: "delete",
           popconfirm: true,
           visible: {
-            status: ["0"],
+            withdrawFlag: ["0"],
           },
         },
       ],
@@ -769,7 +774,7 @@ export default {
       this.transfer_visible = true;
     },
     handleTurn(type) {
-      // finish 结束 transfer 转派 back //打回 // agree 同意
+      // finish 结束 transfer 转派 back //打回 // agree 同意  // transfermanger 转总经理审批
       let request = 0;
       let reqdata = {
         id: this.edit_form.id,
@@ -794,6 +799,12 @@ export default {
             reqdata.operateName = "转总经理审批";
           }
           break;
+        case "transfermanger":
+          // transfermanger  这首直接转给总经理的流程
+          reqdata.reviewType = 3;
+          reqdata.operateName = "转总经理审批";
+          request = 1;
+          break;
         case "back":
           reqdata.status = "0";
           reqdata.reviewType = 1;
@@ -923,8 +934,8 @@ export default {
           "Content-Type": "application/json",
         },
         data: { issuedId: id },
-      }).then(({data}) => {
-        this.receiver_table_list = data
+      }).then(({ data }) => {
+        this.receiver_table_list = data;
       });
     },
     // 关闭方法