daiqisheng hace 3 años
padre
commit
e499a8c823
Se han modificado 1 ficheros con 45 adiciones y 29 borrados
  1. 45 29
      src/pages/main/performance/department.vue

+ 45 - 29
src/pages/main/performance/department.vue

@@ -34,11 +34,12 @@
         <div class="flex-justify-between padding-right-20 padding-left-20">
           <div>
             <template v-if="edit_visible">
-              <!-- 转派按钮 科室经理 7、分管副总、总经理 可见   -->
+              <!-- 转派按钮 科室经理 7、分管副总 2、总经理 1可见   -->
               <el-button
                 type="primary"
                 v-if="
-                  edit_form.status === '0' && (duty === '7' || duty === '10')
+                  edit_form.status === '0' &&
+                  (duty === '7' || duty === '2' || duty === '1')
                 "
                 @click="handleTransfer"
                 >转派</el-button
@@ -46,7 +47,7 @@
               <!-- 提交按钮 科员可见 9  -->
               <el-button
                 type="primary"
-                v-if="edit_form.status === '0' && duty === '9'"
+                v-if="edit_form.status === '1' && duty === '9'"
                 @click="handleSubmit"
                 >提交</el-button
               >
@@ -54,7 +55,8 @@
               <el-button
                 type="primary"
                 v-if="
-                  edit_form.status === '2' && (duty === '7' || duty === '10')
+                  edit_form.status === '2' &&
+                  (duty === '7' || duty === '2' || duty === '1')
                 "
                 @click="handleApprove"
                 >审批</el-button
@@ -70,7 +72,12 @@
           </div> -->
         </div>
         <!-- 主体部分 -->
-        <simple-sheet v-if="visible" :id="edit_form.id" :type="edit_visible?'edit':'view'" attribute="file" />
+        <simple-sheet
+          v-if="visible"
+          :id="edit_form.id"
+          :type="edit_visible ? 'edit' : 'view'"
+          attribute="file"
+        />
         <!-- <analysis
           :edit="edit_form.department_status === '待处理' && edit_visible"
         /> -->
@@ -310,7 +317,7 @@ export default {
           label: "处理",
           props: "edit",
           visible: {
-            status: ["0", "2"],
+            status: ["0", "1", "2"],
           },
         },
       ],
@@ -354,18 +361,20 @@ export default {
     });
     // 职位
     this.duty = JSON.parse(sessionStorage.userInfo).duty;
-    // 根据职位判定  科室经理7、分管副总 5 、总经理 10 、职员 1  3,4
+    // 根据职位判定  科室经理7、分管副总 2 、总经理 1 、职员 9
     console.log(this.duty, "duty");
     switch (this.duty) {
       // 科室经理
       case "7":
         this.type = "1";
         break;
-      case "3":
+      // 分管副总
+      case "2":
         this.type = "2";
         break;
-      case "4":
-        this.type = "2";
+      // 总经理
+      case "1":
+        this.type = "3";
         break;
     }
   },
@@ -496,6 +505,7 @@ export default {
     },
     async handleTransfer() {
       console.log(this.edit_form, "prams");
+      let loginNoStr = JSON.parse(sessionStorage.userInfo).loginNoStr;
       let groupId = JSON.parse(sessionStorage.userInfo).groupId;
       await this.$http({
         url: "/sysmgr/sysuserinfo/queryList",
@@ -507,10 +517,14 @@ export default {
           groupId,
         },
       }).then(({ data }) => {
-        this.transfer_list = data.map((el) => ({
-          ...el,
-          label: el.loginNameStr,
-        }));
+        this.transfer_list = data
+          .filter((el) => {
+            return el.loginNoStr !== loginNoStr;
+          })
+          .map((el) => ({
+            ...el,
+            label: el.loginNameStr,
+          }));
         // 可编辑行
       });
       await this.$http({
@@ -659,22 +673,24 @@ export default {
       // 提交好了
       let reqdata = {
         id: this.edit_form.id,
-        templateContent: this.edit_form.templateContent,
+        templateContent: "asdad",
       };
-      console.log(reqdata, "reqdata");
-
-      // this.$http({
-      //   url: "/CMKIssued/CMKIssuedSubmit",
-      //   method: "post",
-      //   headers: {
-      //     "Content-Type": "application/json",
-      //   },
-      //   data: reqdata,
-      // }).then((res) => {
-      //   console.log(res);
-      //   this.$message.success("提交成功");
-      //   this.handleCancel("visible");
-      // });
+      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("提交失败");
+        }
+      });
     },
   },
 };