|
@@ -255,6 +255,7 @@ import editActiveEndTime from './editActiveEndTime.vue'
|
|
|
import supplier from '@/views/common/supplier.js'
|
|
|
import warehouse from '@/views/common/chooseWarehouse.js'
|
|
|
import custList from '@/views/common/custList.vue'
|
|
|
+import debounce from 'lodash/debounce'
|
|
|
import { dealerPromotionList, dealerPromotionDel, modifyEnabledFlag, promotionAudit, promotionIsOver, handleCopyData, midwaySubmit, dealerMidwayAudit, updateDealerSnList } from '@/api/promotion'
|
|
|
export default {
|
|
|
name: 'PromotionManagementList',
|
|
@@ -317,7 +318,8 @@ export default {
|
|
|
itemPromotionSn: '',
|
|
|
itemStatusType: '',
|
|
|
chooseDealerArr: [], // 所选择经销商列表
|
|
|
- loadingAudit: false
|
|
|
+ loadingAudit: false,
|
|
|
+ isInster: false
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -406,14 +408,18 @@ export default {
|
|
|
_this.openAuditModal = true
|
|
|
},
|
|
|
handleAuditModal () {
|
|
|
+ if (this.isInster) { // 防止多次点击
|
|
|
+ return
|
|
|
+ }
|
|
|
this.loadingAudit = true
|
|
|
- this.handleAudit({ promotionSn: this.itemSn, auditFlag: 1 })
|
|
|
+ debounce(this.handleAudit({ promotionSn: this.itemSn, auditFlag: 1 }), 800)
|
|
|
},
|
|
|
closeAuditModal () {
|
|
|
this.handleAudit({ promotionSn: this.itemSn, auditFlag: 0 })
|
|
|
},
|
|
|
handleAudit (ajaxData) {
|
|
|
const _this = this
|
|
|
+ _this.isInster = true
|
|
|
_this.spinning = true
|
|
|
promotionAudit(ajaxData).then(res => {
|
|
|
if (res.status == 200) {
|
|
@@ -552,6 +558,7 @@ export default {
|
|
|
dealerAuditFlag: undefined,
|
|
|
dealerSn: undefined
|
|
|
}
|
|
|
+ this.isInster = false
|
|
|
this.$refs.custList.resetForm()
|
|
|
this.$refs.rangeDate.resetDate()
|
|
|
this.$refs.table.refresh(true)
|