|
@@ -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
|