Browse Source

Merge remote-tracking branch 'origin/dev' into dev

caojunjie 1 year ago
parent
commit
075be2d200

+ 19 - 12
src/views/iosBasicData/blocations/index.vue

@@ -308,21 +308,28 @@
         });
       },
       rowDel(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return removeBlocations(row.id);
+        if (row.status === 1) {
+          this.$confirm("确定将选择数据删除?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
           })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
+            .then(() => {
+              return removeBlocations(row.id);
+            })
+            .then(() => {
+              this.onLoad(this.page);
+              this.$message({
+                type: "success",
+                message: "操作成功!"
+              });
             });
+        } else {
+          this.$message({
+            message: '非禁用状态无法删除',
+            type: 'warning'
           });
+        }
       },
       handleDelete() {
         if (this.selectionList.length === 0) {

+ 19 - 12
src/views/iosBasicData/bserviceterms/index.vue

@@ -277,21 +277,28 @@
         });
       },
       rowDel(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return removeBserviceterms(row.id);
+        if (row.status === 1) {
+          this.$confirm("确定将选择数据删除?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
           })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
+            .then(() => {
+              return removeBserviceterms(row.id);
+            })
+            .then(() => {
+              this.onLoad(this.page);
+              this.$message({
+                type: "success",
+                message: "操作成功!"
+              });
             });
+        } else {
+          this.$message({
+            message: '非禁用状态无法删除',
+            type: 'warning'
           });
+        }
       },
       handleDelete() {
         if (this.selectionList.length === 0) {

+ 19 - 12
src/views/iosBasicData/btrademodes/index.vue

@@ -290,21 +290,28 @@
         });
       },
       rowDel(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return removeBtrademodes(row.id);
+        if (row.status === 1) {
+          this.$confirm("确定将选择数据删除?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
           })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
+            .then(() => {
+              return removeBtrademodes(row.id);
+            })
+            .then(() => {
+              this.onLoad(this.page);
+              this.$message({
+                type: "success",
+                message: "操作成功!"
+              });
             });
+        } else {
+          this.$message({
+            message: '非禁用状态无法删除',
+            type: 'warning'
           });
+        }
       },
       handleDelete() {
         if (this.selectionList.length === 0) {

+ 19 - 12
src/views/iosBasicData/bunits/index.vue

@@ -296,21 +296,28 @@
         });
       },
       rowDel(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return removeBunits(row.id);
+        if (row.status === 1) {
+          this.$confirm("确定将选择数据删除?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
           })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
+            .then(() => {
+              return removeBunits(row.id);
+            })
+            .then(() => {
+              this.onLoad(this.page);
+              this.$message({
+                type: "success",
+                message: "操作成功!"
+              });
             });
+        } else {
+          this.$message({
+            message: '非禁用状态无法删除',
+            type: 'warning'
           });
+        }
       },
       handleDelete() {
         if (this.selectionList.length === 0) {