|
@@ -436,14 +436,16 @@ export default {
|
|
|
// 刷新正常产品列表
|
|
|
this.$refs.productNormalList.resetSearchForm()
|
|
|
// 刷新活动产品列表
|
|
|
- if (this.activeList.length) this.$refs.productActiveList.resetSearchForm()
|
|
|
+ if (this.activeList.length) {
|
|
|
+ this.$refs.productActiveList.resetSearchForm()
|
|
|
+ }
|
|
|
},
|
|
|
// 添加产品出错时
|
|
|
tableErrorData (type, action) {
|
|
|
this.$refs.chooseProduct.spinning = false
|
|
|
},
|
|
|
// 添加活动产品成功的回调,刷新产品列表
|
|
|
- // type:normal 正常列表 ,active 活动列表
|
|
|
+ // type:normal 正常列表 ,promo 活动列表
|
|
|
// action:add 添加,del 删除,batchDel 批量删除,update 更新数据, enable 启用禁用,sort 排序
|
|
|
// 如果添加操作,不实时刷新列表,关闭后再刷新
|
|
|
refashTableData (type, action) {
|
|
@@ -452,18 +454,18 @@ export default {
|
|
|
this.getOrderDetail(false)
|
|
|
// 如果是活动产品,刷新正常产品列表
|
|
|
if (type == 'promo') {
|
|
|
- if (action != 'add') this.$refs.productNormalList.resetSearchForm()
|
|
|
+ this.$refs.productNormalList.resetSearchForm()
|
|
|
} else if (type == 'normal') { // 如果是正常产品
|
|
|
// 刷新活动产品列表
|
|
|
- if (this.activeList.length && action != 'add') this.$refs.productActiveList.resetSearchForm()
|
|
|
+ if (this.activeList.length) {
|
|
|
+ this.$refs.productActiveList.resetSearchForm()
|
|
|
+ }
|
|
|
} else {
|
|
|
// 正常和活动列表都刷新
|
|
|
this.getTableListData()
|
|
|
}
|
|
|
- // 非添加操作,重新获取参与活动列表
|
|
|
- if (action != 'add') {
|
|
|
- this.getActiveList(false)
|
|
|
- }
|
|
|
+ // 重新获取参与活动列表
|
|
|
+ this.getActiveList(false)
|
|
|
},
|
|
|
// 获取销售单参与的活动列表,flag: true 查询产品明细列表,false 不查
|
|
|
async getActiveList (flag) {
|