molilang 3 yıl önce
ebeveyn
işleme
cb09a5df2a
1 değiştirilmiş dosya ile 74 ekleme ve 22 silme
  1. 74 22
      src/pages/main/demandDevelop/index.vue

+ 74 - 22
src/pages/main/demandDevelop/index.vue

@@ -84,11 +84,7 @@
       :key="number"
     >
       <div v-loading="loadinged">
-        <el-form
-          :model="infolist"
-          ref="infolist"
-          :rules="rules"
-        >
+        <el-form :model="infolist" ref="infolist" :rules="rules">
           <div class="info-line">
             <el-form-item prop="demandName">
               <span>需求名称</span>
@@ -337,7 +333,7 @@
         </el-form>
 
         <div slot="footer" class="dialog-footer myfooter">
-          <div v-if="titname === '添加'">
+          <div v-if="titname === '添加' || step === '0'">
             <el-button type="primary" @click="handleApprove('送部门人员审核')"
               >送部门人员审核</el-button
             >
@@ -499,7 +495,7 @@ export default {
       },
       woNo: "",
       // 当前进行到的步骤计数
-      step:'',
+      step: "",
       tooltit: "线上渠道业务需求",
       fullscreen: false,
       total: 0,
@@ -637,16 +633,41 @@ export default {
               console.log("送领导审核");
               break;
             case "送申请人编号发送":
-              this.checkexa = false
-              this.handleSendNo()
-              this.dialogStatus = false
+              this.handleSendNo();
               break;
             case "确认编号":
-              
+              this.handleComfirmNo();
+              break;
+            case "打回":
+              this.handleBackRecord()
+              break;
           }
         }
       });
     },
+    // 打回方法
+    handleBackRecord(){
+      this.$http({
+        url:'/market/mkOnlineChannel/backRecord',
+        method: "get",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        params: {
+          woNo: this.woNo,
+          remark: this.remark
+        },
+      }).then(({ data: { desc } }) => {
+        console.log(desc);
+        if(desc === '操作成功'){
+          this.$message.success('操作成功')
+          this.dialogStatus = false;
+          this.handleInit();
+        }else{
+          this.$message.error('操作失败')
+        }
+      });
+    },
     // 表单提交
     formSubmit() {
       if (!this.treeList.length) {
@@ -719,12 +740,39 @@ export default {
           "Content-Type": "application/json",
         },
         params: {
-          woNo: this.woNo
+          woNo: this.woNo,
+        },
+      }).then(({ data: { desc } }) => {
+        console.log(desc);
+        if(desc === '操作成功'){
+          this.$message.success('操作成功')
+          this.dialogStatus = false;
+          this.handleInit();
+        }else{
+          this.$message.error('操作失败')
         }
-      }).then((res) => {
-        console.log(res);
-        this.handleInit()
-      })
+      });
+    },
+    // 确认编号
+    handleComfirmNo() {
+      this.$http({
+        url: "/market/mkOnlineChannel/confirmNumber",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: this.woNo,
+        
+      }).then(({ data: { desc } }) => {
+        console.log(desc)
+        if(desc === '操作成功'){
+          this.$message.success('操作成功')
+          this.dialogStatus = false;
+          this.handleInit();
+        }else{
+          this.$message.error('操作失败')
+        }
+      });
     },
     // 初始化列表接口
     handleInit() {
@@ -773,16 +821,20 @@ export default {
           ];
           this.rovaList = mkOnlineChannel.logList;
           this.datalist.attList = mkOnlineChannel.attList;
-          this.woNo = mkOnlineChannel.woNo + '';
-          this.step = mkOnlineChannel.step
-          // this.infodatas = mkOnlineChannel.logList
-          this.disableStatus = true;
+          this.woNo = mkOnlineChannel.woNo;
+          this.step = mkOnlineChannel.step;
+          this.infodatas = mkOnlineChannel.logList
+          if(this.step === '0'){
+            this.visionsts = ''
+            this.disableStatus = false
+          }else{
+            this.disableStatus = true;
+            this.visionsts = '2'
+          }
         }
       );
     },
 
-
-    
     // 老方法
     temp() {
       if (JSON.stringify(this.infolist) == "{}") {