|
@@ -518,30 +518,32 @@ export default {
|
|
// type:normal 正常列表 ,promo 活动列表, borrow 累计产品
|
|
// type:normal 正常列表 ,promo 活动列表, borrow 累计产品
|
|
// action:add 添加,del 删除,batchDel 批量删除,update 更新数据, enable 启用禁用,sort 排序,import 导入
|
|
// action:add 添加,del 删除,batchDel 批量删除,update 更新数据, enable 启用禁用,sort 排序,import 导入
|
|
// 如果添加操作,不实时刷新列表,关闭后再刷新
|
|
// 如果添加操作,不实时刷新列表,关闭后再刷新
|
|
- refashTableData (type, action) {
|
|
|
|
- this.$refs.chooseProduct.spinning = false
|
|
|
|
- // 重新获取详情信息
|
|
|
|
- this.getOrderDetail(false)
|
|
|
|
- // 如果是活动产品,刷新正常产品列表
|
|
|
|
- if (type == 'promo') {
|
|
|
|
- this.$refs.productNormalList.resetSearchForm()
|
|
|
|
- } else if (type == 'normal') { // 如果是正常产品
|
|
|
|
- // 刷新活动产品列表
|
|
|
|
- if (this.activeList.length) {
|
|
|
|
- this.$refs.productActiveList.resetSearchForm()
|
|
|
|
- }
|
|
|
|
- } else if (type == 'borrow') { // 累计
|
|
|
|
- this.$refs.chooseProduct.clear()
|
|
|
|
- // 刷新活动产品列表
|
|
|
|
- if (this.activeList.length) {
|
|
|
|
- this.$refs.productActiveList.resetSearchForm()
|
|
|
|
|
|
+ async refashTableData (type, action) {
|
|
|
|
+ // 重新获取详情信息更新时间
|
|
|
|
+ const detail = await salesDetailBySn({ salesBillSn: this.$route.params.sn }).then(res => res.data)
|
|
|
|
+ if (detail) {
|
|
|
|
+ this.$refs.chooseProduct.spinning = false
|
|
|
|
+ // 如果是活动产品,刷新正常产品列表
|
|
|
|
+ if (type == 'promo') {
|
|
|
|
+ this.$refs.productNormalList.resetSearchForm()
|
|
|
|
+ } else if (type == 'normal') { // 如果是正常产品
|
|
|
|
+ // 刷新活动产品列表
|
|
|
|
+ if (this.activeList.length) {
|
|
|
|
+ this.$refs.productActiveList.resetSearchForm()
|
|
|
|
+ }
|
|
|
|
+ } else if (type == 'borrow') { // 累计
|
|
|
|
+ this.$refs.chooseProduct.clear()
|
|
|
|
+ // 刷新活动产品列表
|
|
|
|
+ if (this.activeList.length) {
|
|
|
|
+ this.$refs.productActiveList.resetSearchForm()
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ // 正常和活动列表都刷新
|
|
|
|
+ this.getTableListData()
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
- // 正常和活动列表都刷新
|
|
|
|
- this.getTableListData()
|
|
|
|
|
|
+ // 重新获取参与活动列表
|
|
|
|
+ this.getActiveList(false)
|
|
}
|
|
}
|
|
- // 重新获取参与活动列表
|
|
|
|
- this.getActiveList(false)
|
|
|
|
},
|
|
},
|
|
// 获取销售单参与的活动列表,flag: true 查询产品明细列表,false 不查
|
|
// 获取销售单参与的活动列表,flag: true 查询产品明细列表,false 不查
|
|
async getActiveList (flag) {
|
|
async getActiveList (flag) {
|