Преглед на файлове

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

noob преди 3 години
родител
ревизия
8aedf9e5bd
променени са 1 файла, в които са добавени 36 реда и са изтрити 25 реда
  1. 36 25
      src/pages/main/performance/department.vue

+ 36 - 25
src/pages/main/performance/department.vue

@@ -81,6 +81,7 @@
               : 'view'
           "
           attribute="file"
+          @save="handleSave"
         />
         <!-- <analysis
           :edit="edit_form.department_status === '待处理' && edit_visible"
@@ -581,17 +582,18 @@ export default {
           request = 1;
           break;
         case "transfer":
-          // reviewType 2.副总经理 3.经理
+          // reviewType 2.副总经理 2是副总
           if (this.duty === "7") {
             reqdata.reviewType = 2;
             request = 1;
-          } else {
+          } else if (this.duty === "2") {
             reqdata.reviewType = 3;
             request = 1;
           }
           break;
         case "back":
           reqdata.status = "0";
+          reqdata.reviewType = 1;
           request = 1;
           break;
         case "agree":
@@ -654,6 +656,15 @@ export default {
       console.log(visible);
       this.track_visible = visible;
     },
+    handleSave() {
+      this.$message.success("提交成功");
+      this.handleInit({
+        ...this.table_search,
+        page: this.page,
+        pageSize: this.rows,
+      });
+      this.handleCancel("visible");
+    },
     // 关闭方法
     handleCancel(data) {
       switch (data) {
@@ -709,29 +720,29 @@ export default {
     //   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("提交失败");
-        }
-      });
-    },
+    // 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>