|
@@ -415,9 +415,28 @@ export default {
|
|
_this.spinning = true
|
|
_this.spinning = true
|
|
shopProductDel({ shopProductSnList }).then(res => {
|
|
shopProductDel({ shopProductSnList }).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
- _this.$message.success(res.message)
|
|
|
|
- _this.$refs.table.clearSelected()
|
|
|
|
- _this.$refs.table.refresh()
|
|
|
|
|
|
+ if (res.data && res.data.length > 0) {
|
|
|
|
+ _this.$confirm({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: res.data.join('、') + '产品正在参与促销活动,无法删除',
|
|
|
|
+ centered: true,
|
|
|
|
+ okText: '知道了',
|
|
|
|
+ cancelText: '取消', // 将cancelText设置为空字符串或去掉该属性可以隐藏取消按钮
|
|
|
|
+ cancelButtonProps: {
|
|
|
|
+ style: {
|
|
|
|
+ display: 'none' // 通过设置样式隐藏取消按钮
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ onOk () {
|
|
|
|
+ _this.$refs.table.clearSelected()
|
|
|
|
+ _this.$refs.table.refresh()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ _this.$message.success(res.message)
|
|
|
|
+ _this.$refs.table.clearSelected()
|
|
|
|
+ _this.$refs.table.refresh()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
_this.spinning = false
|
|
_this.spinning = false
|
|
})
|
|
})
|