molilang 3 роки тому
батько
коміт
9aea5e01ad

+ 7 - 6
src/pages/main/gridDivision/approvalExamination.vue

@@ -15,7 +15,7 @@
       :multiple="true"
       :handle-row="table_handle_row"
       @selection="handleSelect"
-      @approve="handleApprove"
+      @back="handleBack"
     ></simple-table>
     <simple-dialog
       title="审批"
@@ -34,10 +34,10 @@
       </el-form>
       <template v-slot:footer>
         <div>
-          <el-button @click="handleOpinion('1')" type="default"
+          <el-button v-if="!isAgree" @click="handleOpinion('1')" type="default"
             >退回修改</el-button
           >
-          <el-button @click="handleOpinion('0')" type="primary">同意</el-button>
+          <el-button v-else @click="handleOpinion('0')" type="primary">同意</el-button>
         </div>
       </template>
     </simple-dialog>
@@ -82,6 +82,7 @@ export default {
       opinion_visible: false,
       track_visible: false,
       opinion_form: {},
+      isAgree: false,
       // 单条审批id
       ids: [],
       parentId: "",
@@ -170,8 +171,8 @@ export default {
       //   表格里的操作按钮
       table_handle_row: [
         {
-          label: "审批",
-          props: "approve",
+          label: "不通过",
+          props: "back",
         },
         {},
         {},
@@ -287,7 +288,7 @@ export default {
     // 获取审批轨迹
     getTrackList() {},
     // 审批
-    handleApprove(row) {
+    handleBack(row) {
       // console.log(row);
       this.ids = [row.id.toString()];
       this.handleVisible("opinion");

+ 39 - 18
src/pages/main/gridDivision/workersList.vue

@@ -106,7 +106,9 @@
           <el-button @click="handleSubmit('save')" type="primary"
             >保存</el-button
           >
-          <el-button @click="handleSubmit('add')" type="primary">重新提交</el-button>
+          <el-button @click="handleSubmit('add')" type="primary"
+            >重新提交</el-button
+          >
           <el-button @click="handleVisible('add')" type="default"
             >取消</el-button
           >
@@ -254,7 +256,7 @@ export default {
       table_config: [
         {
           label: "序号",
-          props: "id",
+          props: "No",
         },
         {
           label: "公司名称",
@@ -282,11 +284,11 @@ export default {
       table_config_approve: [
         {
           label: "编号",
-          props: "number",
+          props: "No",
         },
         {
           label: "流程环节",
-          props: "procName",
+          props: "taskName",
         },
         {
           label: "处理人",
@@ -334,9 +336,10 @@ export default {
       }).then(({ data: { count, data } }) => {
         this.table_loading = false;
         this.total = count;
-        this.table_list = data.map((element) => ({
+        this.table_list = data.map((element,index) => ({
           ...element,
           deal: element.draft === "1" && element.sts === "0" ? "1" : "0",
+          No: index + 1
         }));
         console.log(this.table_list);
       });
@@ -357,6 +360,7 @@ export default {
           this.title = "新建";
           this.isCheck = false;
           this.add_form = {};
+          this.fileInfo.fileList = []
           break;
         case "summary":
           this.summary_visible = !this.summary_visible;
@@ -391,8 +395,18 @@ export default {
     },
     //文件返回值
     uploadBack(v) {
-      console.log(v,'upload');
-      this.attList = v;
+      const fileName = [];
+      const fileIds = [];
+      v.forEach((element) => {
+        fileName.push(element.fileName);
+        fileIds.push(element.fileCode);
+      });
+      // this.add_form = {
+      //   fileNames: fileName.join(","),
+      //   fileIds: fileIds.join(","),
+      // };
+      this.add_form.fileNames = fileName.join(",")
+      this.add_form.fileIds = fileIds.join(",")
     },
     // 获取模态框信息
     getDialogData(row) {
@@ -417,8 +431,14 @@ export default {
           proposer: body.proposer,
           telephone: body.telephone,
           wanggeText: body.wanggeText,
+          fileNames: body.fileNames,
+          fileIds: body.fileIds,
         };
-        this.table_list_approve = body.bpmTaskList;
+        // this.fileInfo.fileList = body.fileNames.split(',')
+        this.table_list_approve = body.bpmTaskList.map((item,index) => ({
+          ...item,
+          No: index + 1
+        }));
       });
     },
     // 查看按钮
@@ -429,13 +449,13 @@ export default {
           query: row,
         });
       } else {
-        this.getDialogData(row)
+        this.getDialogData(row);
         this.handleVisible("check");
       }
     },
     // 编辑按钮
     handleEdit(row) {
-      this.getDialogData(row)
+      this.getDialogData(row);
       this.handleVisible("edit");
     },
     // 处理按钮
@@ -444,11 +464,11 @@ export default {
         this.$router.push({
           path: "/approvalExamination",
           query: {
-            parentId:row.id.toString(),
+            parentId: row.id.toString(),
           },
         });
       } else {
-        this.getDialogData(row)
+        this.getDialogData(row);
         this.handleVisible("approve");
       }
     },
@@ -514,6 +534,7 @@ export default {
           }
           this.edit_visible = false;
           this.add_visible = false;
+          this.fileInfo.fileList = []
         }
       });
     },
@@ -557,12 +578,12 @@ export default {
     },
     handleSelectFilter(row) {
       // 过滤可被选中的数组
-            if(row.parentLevel === '1'){
-              return false
-            }else{
-              return true
-            }
-        },
+      if (row.parentLevel === "1") {
+        return false;
+      } else {
+        return true;
+      }
+    },
   },
 };
 </script>