Kaynağa Gözat

Merge branch 'hjw-percreatname' into 'master'

Hjw percreatname

See merge request hujunwei/spfm-market-front!1
胡俊炜 2 yıl önce
ebeveyn
işleme
ab290080e7

+ 18 - 2
src/pages/main/performance/components/dialog.vue

@@ -16,7 +16,7 @@
     <div slot="footer">
     <div slot="footer">
       <slot name="footer">
       <slot name="footer">
         <el-button @click="handleCancel" size="small">取消</el-button>
         <el-button @click="handleCancel" size="small">取消</el-button>
-        <el-button @click="handleConfirm" type="primary" size="small"
+        <el-button @click="handleConfirm" type="primary" size="small" :disabled="this.BtnDisabled"
           >确定</el-button
           >确定</el-button
         >
         >
       </slot>
       </slot>
@@ -27,6 +27,10 @@
 <script>
 <script>
 export default {
 export default {
   props: {
   props: {
+    btnDisabled: {
+      type: Boolean,
+      default: false,
+    },
     visible: {
     visible: {
       type: Boolean,
       type: Boolean,
       default: false,
       default: false,
@@ -56,12 +60,24 @@ export default {
       default: false
       default: false
     }
     }
   },
   },
+  data(){
+    return{
+      BtnDisabled: false,
+    }
+  },
   mounted() {
   mounted() {
   },
   },
+  watch:{
+    btnDisabled(val){
+      this.BtnDisabled =val
+    }
+  },
   methods: {
   methods: {
     //   确定的回调
     //   确定的回调
     handleConfirm() {
     handleConfirm() {
-      this.$emit("confirm", false);
+    this.BtnDisabled = false;
+    this.$emit("confirm", false);      
+    // this.BtnDisabled = this.btnDisabled;
     },
     },
     //   取消的回调
     //   取消的回调
     handleCancel() {
     handleCancel() {

+ 1 - 1
src/pages/main/performance/components/sheet.vue

@@ -891,7 +891,7 @@ export default {
       } else {
       } else {
         // 职位
         // 职位
         let duty = JSON.parse(sessionStorage.userInfo).duty;
         let duty = JSON.parse(sessionStorage.userInfo).duty;
-        if (duty === "7" && type === "0") {
+        if ((duty === "7" && type === "0")||(duty === "8" && type === "0")) {
           this.manager_approve = true;
           this.manager_approve = true;
         } else {
         } else {
           if (type === "2") {
           if (type === "2") {

+ 83 - 13
src/pages/main/performance/department.vue

@@ -43,7 +43,7 @@
                 type="primary"
                 type="primary"
                 v-if="
                 v-if="
                   edit_form.status === '0' &&
                   edit_form.status === '0' &&
-                  (duty === '7' || duty === '3' || duty === '4')
+                  (duty === '8' || duty === '7' || duty === '3' || duty === '4')
                 "
                 "
                 @click="handleTransfer"
                 @click="handleTransfer"
                 >转派</el-button
                 >转派</el-button
@@ -55,7 +55,10 @@
                   (edit_form.status === '2' ||
                   (edit_form.status === '2' ||
                     edit_form.status === '6' ||
                     edit_form.status === '6' ||
                     edit_form.status === '7') &&
                     edit_form.status === '7') &&
-                  (duty === '7' || duty === '3' || duty === '4') &&
+                  ( duty === '8' ||
+                    duty === '7' ||
+                    duty === '3' ||
+                    duty === '4') &&
                   reviewType === duty
                   reviewType === duty
                 "
                 "
                 @click="handleApprove"
                 @click="handleApprove"
@@ -126,21 +129,25 @@
       <template v-slot:footer
       <template v-slot:footer
         ><div>
         ><div>
           <div v-if="type === '1'">
           <div v-if="type === '1'">
-            <el-button @click="handleTurn('finish')" type="primary">结束</el-button>
-            <el-button @click="handleTurn('transfer')" 
-              >转副总审批</el-button
+            <el-button @click="handleTurn('finish')" type="primary"
+              >结束</el-button
             >
             >
+            <el-button @click="handleTurn('transfer')">转副总审批</el-button>
             <el-button @click="handleTurn('transfermanger')"
             <el-button @click="handleTurn('transfermanger')"
               >转总经理审批</el-button
               >转总经理审批</el-button
             >
             >
           </div>
           </div>
           <div v-else-if="type === '2'">
           <div v-else-if="type === '2'">
-            <el-button @click="handleTurn('finish')" type="primary">结束</el-button>
-            <el-button @click="handleTurn('return')" type="primary">退回</el-button>
-            <el-button @click="handleTurn('back')" type="primary">打回</el-button>
-            <el-button @click="handleTurn('transfer')" 
-              >转总经理审批</el-button
+            <el-button @click="handleTurn('finish')" type="primary"
+              >结束</el-button
+            >
+            <el-button @click="handleTurn('return')" type="primary"
+              >退回</el-button
+            >
+            <el-button @click="handleTurn('back')" type="primary"
+              >打回</el-button
             >
             >
+            <el-button @click="handleTurn('transfer')">转总经理审批</el-button>
           </div>
           </div>
           <div v-else>
           <div v-else>
             <el-button @click="handleTurn('back')">打回</el-button>
             <el-button @click="handleTurn('back')">打回</el-button>
@@ -228,6 +235,9 @@
           </div>
           </div>
         </el-form-item>
         </el-form-item>
         <div>
         <div>
+          <!-- <el-button class="margin-right-10" @click="newSave()" type="primary"
+            >保存修改</el-button
+          > -->
           <el-button
           <el-button
             class="margin-right-10"
             class="margin-right-10"
             @click.prevent="handleCharge('add')"
             @click.prevent="handleCharge('add')"
@@ -295,6 +305,7 @@ export default {
   },
   },
   data() {
   data() {
     return {
     return {
+      // rowList: [],
       page: 1,
       page: 1,
       idx: "",
       idx: "",
       rows: 10,
       rows: 10,
@@ -413,6 +424,7 @@ export default {
         ],
         ],
       },
       },
       trackList: [],
       trackList: [],
+      creatloginNameStr: "", //发起人name
       //   顶部form
       //   顶部form
       table_form: [
       table_form: [
         {
         {
@@ -607,13 +619,17 @@ export default {
       ...this.table_search,
       ...this.table_search,
       page: this.page,
       page: this.page,
       pageSize: this.rows,
       pageSize: this.rows,
-      id : this.getUrlKey("id")//获取地址栏参数
+      id: this.getUrlKey("id"), //获取地址栏参数
     });
     });
     // 职位
     // 职位
     this.duty = JSON.parse(sessionStorage.userInfo).duty;
     this.duty = JSON.parse(sessionStorage.userInfo).duty;
     // 根据职位判定  科室经理7、分管副总 4 、总经理 3 、职员 9
     // 根据职位判定  科室经理7、分管副总 4 、总经理 3 、职员 9
     console.log(this.duty, "duty");
     console.log(this.duty, "duty");
     switch (this.duty) {
     switch (this.duty) {
+      // 科室副经理
+      case "8":
+        this.type = "1";
+        break;
       // 科室经理
       // 科室经理
       case "7":
       case "7":
         this.type = "1";
         this.type = "1";
@@ -694,6 +710,8 @@ export default {
     },
     },
     // 编辑按钮
     // 编辑按钮
     handleEdit(row) {
     handleEdit(row) {
+      console.log(row.loginNameStr);
+      this.creatloginNameStr = row.loginNameStr;
       this.visible = true;
       this.visible = true;
       this.edit_visible = true;
       this.edit_visible = true;
       this.edit_form = row;
       this.edit_form = row;
@@ -717,6 +735,9 @@ export default {
             break;
             break;
           case "1":
           case "1":
             this.reviewType = "7";
             this.reviewType = "7";
+            if(this.duty==='8'){
+              this.reviewType = "8";
+            }
             break;
             break;
           case "2":
           case "2":
             this.reviewType = "4";
             this.reviewType = "4";
@@ -733,6 +754,7 @@ export default {
     // 查看按钮
     // 查看按钮
     handleCheck(row) {
     handleCheck(row) {
       this.edit_form = row;
       this.edit_form = row;
+      console.log(row.status + "status");
       this.edit_visible = false;
       this.edit_visible = false;
       this.id = row.id;
       this.id = row.id;
       this.visible = true;
       this.visible = true;
@@ -967,7 +989,10 @@ export default {
       }).then(({ data }) => {
       }).then(({ data }) => {
         this.transfer_list_orgin = data
         this.transfer_list_orgin = data
           .filter((el) => {
           .filter((el) => {
-            return el.loginNoStr !== loginNoStr;
+            return (
+              el.loginNoStr !== loginNoStr &&
+              el.loginNameStr !== this.creatloginNameStr
+            );
           })
           })
           .map((el) => ({
           .map((el) => ({
             ...el,
             ...el,
@@ -1020,7 +1045,7 @@ export default {
           break;
           break;
         case "transfer":
         case "transfer":
           // reviewType 2.副总经理 3总经理
           // reviewType 2.副总经理 3总经理
-          if (this.duty === "7") {
+          if (this.duty === "7"||this.duty === "8") {
             reqdata.reviewType = 2;
             reqdata.reviewType = 2;
             reqdata.operateName = "转副总审批";
             reqdata.operateName = "转副总审批";
             request = 1;
             request = 1;
@@ -1176,6 +1201,51 @@ export default {
         this.receiver_table_list = data;
         this.receiver_table_list = data;
       });
       });
     },
     },
+    // newSave() {
+    //   const sheet_name = window.luckysheet.getSheet().name;
+    //   const data = window.luckysheet.getSheet(sheet_name);
+    //   const workbook_name = window.luckysheet.getWorkbookName();
+    //   console.log(sheet_name);
+    //   console.log(data);
+    //   console.log(workbook_name);
+    //   // 经理提交
+    //   this.rowList.shift();
+    //   let reqdata = {
+    //     rowIndex: [...new Set(this.rowList)]
+    //       .sort(function (a, b) {
+    //         return a - b;
+    //       })
+    //       .join(","),
+    //     rowContent: [...new Set(this.rowList)]
+    //       .sort(function (a, b) {
+    //         return a - b;
+    //       })
+    //       .map((el) => {
+    //         return data.data[el];
+    //       }),
+    //   };
+    //   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.edit_form.id,
+    //       // rowJson: JSON.stringify(reqdata),
+    //     },
+    //   });
+    // },
+    // updated: function ({ range }) {
+    //   const middle = range.map((el) => {
+    //     return that.paramsArr(el.row[0], el.row[1]);
+    //   });
+    //   let changedList = middle.join(",").split(",");
+    //   this.rowList.push(...changedList);
+    // },
     // 关闭方法
     // 关闭方法
     handleCancel(data) {
     handleCancel(data) {
       switch (data) {
       switch (data) {

+ 9 - 2
src/pages/main/performance/mould.vue

@@ -29,6 +29,7 @@
       width="500px"
       width="500px"
       @cancel="handleVisible('issue')"
       @cancel="handleVisible('issue')"
       @confirm="handleIssue"
       @confirm="handleIssue"
+      :btnDisabled="btnDisabled"
       :visible="issue_visible"
       :visible="issue_visible"
     >
     >
       <el-form label-width="120px" :model="issue_form" ref="issue_ref">
       <el-form label-width="120px" :model="issue_form" ref="issue_ref">
@@ -132,6 +133,7 @@ export default {
   },
   },
   data() {
   data() {
     return {
     return {
+      btnDisabled: false,
       page: 1,
       page: 1,
       rows: 10,
       rows: 10,
       total: 0,
       total: 0,
@@ -179,8 +181,8 @@ export default {
           props: "issue",
           props: "issue",
           visible: {
           visible: {
             status: ["0"],
             status: ["0"],
-            flag: "or",
-            superviseFlag: ["0"],
+            // flag: "or",
+            // superviseFlag: ["1"],
           },
           },
         },
         },
         {
         {
@@ -298,6 +300,8 @@ export default {
         case "issue":
         case "issue":
           this.superviseFlag = params ? params.superviseFlag : "";
           this.superviseFlag = params ? params.superviseFlag : "";
           this.issue_visible = !this.issue_visible;
           this.issue_visible = !this.issue_visible;
+          this.btnDisabled = false;
+          console.log(this.btnDisabled+"this.btnDisabled")
           this.issue_id = params ? params.id : null;
           this.issue_id = params ? params.id : null;
           if (this.issue_visible) {
           if (this.issue_visible) {
             this.issue_form.reason = params.reason ? params.reason : "";
             this.issue_form.reason = params.reason ? params.reason : "";
@@ -328,6 +332,7 @@ export default {
       });
       });
     },
     },
     handleIssue() {
     handleIssue() {
+      
       this.$refs["issue_ref"].validate((valid) => {
       this.$refs["issue_ref"].validate((valid) => {
         if (valid) {
         if (valid) {
           let url = "";
           let url = "";
@@ -361,6 +366,8 @@ export default {
               }
               }
             }
             }
           }
           }
+          this.btnDisabled = true;
+          console.log(this.btnDisabled+"this.btnDisabled")
           this.$http({
           this.$http({
             url: url,
             url: url,
             method: "post",
             method: "post",