浏览代码

修改bug

chenrui 9 月之前
父节点
当前提交
88689f8c83
共有 1 个文件被更改,包括 10 次插入2 次删除
  1. 10 2
      src/views/easyPassManagement/shoppingManagement/list.vue

+ 10 - 2
src/views/easyPassManagement/shoppingManagement/list.vue

@@ -72,7 +72,7 @@
             type="link"
             type="link"
             class="button-error"
             class="button-error"
             @click="handleDel(record)"
             @click="handleDel(record)"
-            v-if="$hasPermissions('B_delCategory')&&((record.type=='root'&&(record.shopCategoryCount==0&&record.shopProductCount==0))||record.type!='root')"
+            v-if="$hasPermissions('B_delCategory')"
             :id="'shoppingManagementList-del-btn'+record.id">删除</a-button>
             :id="'shoppingManagementList-del-btn'+record.id">删除</a-button>
         </template>
         </template>
       </a-table>
       </a-table>
@@ -198,9 +198,17 @@ export default {
     // 删除
     // 删除
     handleDel (row) {
     handleDel (row) {
       const _this = this
       const _this = this
+      if (row.shopCategoryCount > 0) {
+        _this.$message.warning('请先删除子类目!')
+        return
+      }
+      if (row.shopProductCount > 0) {
+        _this.$message.warning('请先删除关联产品!')
+        return
+      }
       this.$confirm({
       this.$confirm({
         title: '提示',
         title: '提示',
-        content: '删除后,关联的产品会同步删除,确认删除吗?',
+        content: '删除后数据不可恢复,确认删除吗?',
         centered: true,
         centered: true,
         onOk () {
         onOk () {
           _this.spinning = true
           _this.spinning = true