molilang vor 3 Jahren
Ursprung
Commit
9db1b4d2fa
1 geänderte Dateien mit 64 neuen und 36 gelöschten Zeilen
  1. 64 36
      src/pages/main/gridDivision/workersList.vue

+ 64 - 36
src/pages/main/gridDivision/workersList.vue

@@ -87,14 +87,27 @@
         </el-form-item>
       </el-form>
       <template v-slot:footer>
-        <div v-if="!isCheck">
+        <div v-if="title === '新建'">
+          <el-button type="primary">保存</el-button>
+          <el-button @click="handleSubmit" type="primary">提交</el-button>
+          <el-button @click="handleVisible('add')" type="default"
+            >取消</el-button
+          >
+        </div>
+        <div v-else-if="title === '查看'">
+          <div></div>
+        </div>
+        <div v-else-if="title === '发起人处理'">
           <el-button @click="handleSubmit" type="primary">保存</el-button>
           <el-button type="primary">重新提交</el-button>
           <el-button @click="handleVisible('add')" type="default"
             >取消</el-button
           >
         </div>
-        <div v-else></div>
+        <div v-else>
+          <el-button @click="handleSubmit" type="primary">保存</el-button>
+          <el-button type="default">退回修改</el-button>
+        </div>
       </template>
     </simple-dialog>
     <simple-dialog
@@ -152,7 +165,7 @@ export default {
       summary_visible: false,
       edit_visible: false,
       approve_visible: false,
-      ids:[],
+      ids: [],
       add_form: {},
       table_handle: [
         {
@@ -319,7 +332,7 @@ export default {
       this.page = 1;
       this.handleInit({
         ...data,
-        type: "0",
+        type: "1",
         page: this.page,
         pageSize: this.rows,
       });
@@ -330,6 +343,7 @@ export default {
         case "add":
           this.add_visible = !this.add_visible;
           this.edit_visible = false;
+          this.approve_visible = false;
           this.title = "新建";
           this.isCheck = false;
           this.add_form = {};
@@ -350,6 +364,13 @@ export default {
           this.title = "查看";
           this.isCheck = true;
           break;
+        case "approve":
+          this.edit_visible = !this.edit_visible;
+          this.add_visible = !this.add_visible;
+          this.title = "审批";
+          this.isCheck = false;
+          this.approve_visible = !this.approve_visible;
+          break;
       }
     },
     handleaaa(val) {
@@ -419,32 +440,39 @@ export default {
     },
     // 处理按钮
     handleApprove(row) {
-      let id = row.id;
-      let type = row.parentId === null ? "1" : "0";
-      this.$http({
-        url: "/mkWangge/getMkWanggeById",
-        method: "get",
-        headers: {
-          "Content-Type": "application/json",
-        },
-        params: {
-          id,
-          type,
-        },
-      }).then(({ data }) => {
-        let body = data.body;
-        console.log(body, "body");
-        this.ids = [body.id.toString()]
-        this.add_form = {
-          id: body.id,
-          proposer: body.proposer,
-          telephone: body.telephone,
-          wanggeText: body.wanggeText,
-        };
-        this.table_list_approve = body.bpmTaskList;
-      });
-      this.handleVisible("edit");
-      this.approve_visible = true;
+      console.log(row);
+      if (row.parentLevel === 1) {
+        this.$router.push({
+          path: "/approvalExamination",
+          query: row,
+        });
+      } else {
+        let id = row.id;
+        let type = row.parentId === null ? "1" : "0";
+        this.$http({
+          url: "/mkWangge/getMkWanggeById",
+          method: "get",
+          headers: {
+            "Content-Type": "application/json",
+          },
+          params: {
+            id,
+            type,
+          },
+        }).then(({ data }) => {
+          let body = data.body;
+          console.log(body, "body");
+          this.ids = [body.id.toString()];
+          this.add_form = {
+            id: body.id,
+            proposer: body.proposer,
+            telephone: body.telephone,
+            wanggeText: body.wanggeText,
+          };
+          this.table_list_approve = body.bpmTaskList;
+        });
+        this.handleVisible("approve");
+      }
     },
     handleSubmit() {
       // console.log(this.add_form);
@@ -473,7 +501,7 @@ export default {
             });
             this.handleInit({
               ...this.table_search,
-              type: "0",
+              type: "1",
               page: this.page,
               pageSize: this.rows,
             });
@@ -482,9 +510,9 @@ export default {
             let reqdata = {
               ids: this.ids,
               remark: this.add_form.remark,
-              type: '0'
-            }
-            console.log(reqdata,'reqdata');
+              type: "0",
+            };
+            console.log(reqdata, "reqdata");
             this.$http({
               url: "/mkWangge/review",
               method: "post",
@@ -492,7 +520,7 @@ export default {
                 "Content-Type": "application/json",
               },
               data: {
-                ...reqdata
+                ...reqdata,
               },
             });
           }
@@ -539,7 +567,7 @@ export default {
       this.page = page;
       this.handleInit({
         ...this.table_search,
-        type: "0",
+        type: "1",
         page: this.page,
         pageSize: this.rows,
       });