Browse Source

新增审批处理

molilang 3 years ago
parent
commit
fbaf6b5f56
1 changed files with 77 additions and 10 deletions
  1. 77 10
      src/pages/main/demandDevelop/index.vue

+ 77 - 10
src/pages/main/demandDevelop/index.vue

@@ -88,7 +88,6 @@
           :model="infolist"
           ref="infolist"
           :rules="rules"
-          style="height: calc(100vh - 180px)"
         >
           <div class="info-line">
             <el-form-item prop="demandName">
@@ -347,6 +346,37 @@
             >
             <el-button @click="handleApprove('取消')">取消</el-button>
           </div>
+
+          <div v-if="titname === '审批' && step === '1'">
+            <el-button type="primary" @click="handleApprove('送申请人编号发送')"
+              >送申请人编号发送</el-button
+            >
+            <el-button type="primary" @click="handleApprove('送领导审核')"
+              >送领导审核</el-button
+            >
+            <el-button type="primary" @click="handleApprove('打回')"
+              >打回</el-button
+            >
+            <el-button @click="handleApprove('取消')">取消</el-button>
+          </div>
+          <div v-if="titname === '审批' && step === '2'">
+            <el-button type="primary" @click="handleApprove('送申请人编号发送')"
+              >送申请人编号发送</el-button
+            >
+            <el-button type="primary" @click="handleApprove('打回')"
+              >打回</el-button
+            >
+            <el-button @click="handleApprove('取消')">取消</el-button>
+          </div>
+          <div v-if="titname === '审批' && step === '3'">
+            <el-button type="primary" @click="handleApprove('确认编号')"
+              >确认编号</el-button
+            >
+            <el-button type="primary" @click="handleApprove('送领导审核')"
+              >送领导审核</el-button
+            >
+            <el-button @click="handleApprove('取消')">取消</el-button>
+          </div>
           <!-- <el-button
             v-if="titname != '查看' && vision == '流程发起'"
             type="primary"
@@ -467,6 +497,9 @@ export default {
           },
         ],
       },
+      woNo: "",
+      // 当前进行到的步骤计数
+      step:'',
       tooltit: "线上渠道业务需求",
       fullscreen: false,
       total: 0,
@@ -582,6 +615,13 @@ export default {
       this.file.push(file);
     },
     handleApprove(type) {
+      if (type === "取消") {
+        this.dialogStatus = false;
+        this.disableStatus = false;
+        this.number++;
+        this.infolist = {};
+        return;
+      }
       this.$refs.infolist.validate((val) => {
         if (val) {
           switch (type) {
@@ -592,14 +632,17 @@ export default {
               break;
             case "送领导审核":
               this.type = "1";
+              // this.formSubmit()
+              this.checkexa = true;
               console.log("送领导审核");
               break;
-            case "取消":
-              this.dialogStatus = false;
-              this.disableStatus = false;
-              this.number++;
-              this.infolist = {};
+            case "送申请人编号发送":
+              this.checkexa = false
+              this.handleSendNo()
+              this.dialogStatus = false
               break;
+            case "确认编号":
+              
           }
         }
       });
@@ -622,7 +665,7 @@ export default {
         busiEndTime: this.busiTime[1]
           ? this.$formatDate(this.busiTime[1], "YYYY-MM-DD HH:mm:ss")
           : "",
-        // 按钮类型
+        // 审核人员
         loginNameList: this.treeList.map((el) => {
           return el.label;
         }),
@@ -667,6 +710,22 @@ export default {
         });
       }
     },
+    // 送申请人编号发送
+    handleSendNo() {
+      this.$http({
+        url: "/market/mkOnlineChannel/createDemandNo",
+        method: "get",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        params: {
+          woNo: this.woNo
+        }
+      }).then((res) => {
+        console.log(res);
+        this.handleInit()
+      })
+    },
     // 初始化列表接口
     handleInit() {
       this.$http({
@@ -712,13 +771,18 @@ export default {
             mkOnlineChannel.busiStartTime,
             mkOnlineChannel.busiEndTime,
           ];
-          this.rovaList = mkOnlineChannel.logList
-          this.datalist.attList =  mkOnlineChannel.attList
+          this.rovaList = mkOnlineChannel.logList;
+          this.datalist.attList = mkOnlineChannel.attList;
+          this.woNo = mkOnlineChannel.woNo + '';
+          this.step = mkOnlineChannel.step
           // this.infodatas = mkOnlineChannel.logList
           this.disableStatus = true;
         }
       );
     },
+
+
+    
     // 老方法
     temp() {
       if (JSON.stringify(this.infolist) == "{}") {
@@ -776,7 +840,7 @@ export default {
       this.fileInfo.fileList = [];
       this.dialogStatus = false;
       this.checkexa = false;
-      this.busiTime = []
+      this.busiTime = [];
     },
     //获取列表
     getList(v, n) {
@@ -812,9 +876,12 @@ export default {
       this.infodatas = [{}, {}];
       if (type === 1) {
         this.titname = "查看";
+        this.visionsts = "2";
         this.queryDetails(data.woNo);
       } else if (type === 2) {
         this.titname = "审批";
+        this.visionsts = "2";
+        this.queryDetails(data.woNo);
         this.disableStatus = true;
       } else if (type === 3) {
         this.titname = "添加";