Explorar o código

电子渠道注销

bianww %!s(int64=3) %!d(string=hai) anos
pai
achega
d17474217a
Modificáronse 1 ficheiros con 32 adicións e 26 borrados
  1. 32 26
      src/pages/main/demandDevelop/index.vue

+ 32 - 26
src/pages/main/demandDevelop/index.vue

@@ -1242,32 +1242,38 @@ export default {
         }
       );
     },
-    // 注销
-    delDetails(id){
-        this.$confirm('确认删除?', '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-        }).then(() => {
-            this.$http({
-                url: "/market/mkOnlineChannel/delDetailsById",
-                method: "post",
-                headers: {
-                    "Content-Type": "application/json",
-                },
-                data: {
-                    data: id,
-                },
-            }).then((res) => {
-                console.log(res)
-            });
-        }).catch(() => {
-            this.$message({
-                type: 'info',
-                message: '取消删除'
-            });
-        });
-    },
+      // 注销
+      delDetails(id){
+          this.$confirm('确认注销吗?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning'
+          }).then(() => {
+              this.$http({
+                  url: "/market/mkOnlineChannel/delDetailsByWoNo",
+                  method: "post",
+                  headers: {
+                      "Content-Type": "application/json",
+                  },
+                  data: id,
+              }).then(({ data }) => {
+                  console.log("res======================================")
+                  console.log(data)
+                  console.log(data.result)
+                  if (data && data.result === 0) {
+                      this.$message.success(data.desc);
+                      this.handleInit();
+                  } else {
+                      this.$message.error("操作失败");
+                  }
+              });
+          }).catch(() => {
+              this.$message({
+                  type: 'info',
+                  message: '取消注销'
+              });
+          });
+      },
     // 查看详情接口封装
     queryDetails(id) {
       this.$http({