|
@@ -67,7 +67,7 @@
|
|
<!-- 操作按钮 -->
|
|
<!-- 操作按钮 -->
|
|
<div class="table-operator tableBtnSet" >
|
|
<div class="table-operator tableBtnSet" >
|
|
<a-button v-if="$hasPermissions('B_dealerPromotionAdd')" id="promotionList-add" type="primary" @click="handleAdd">新增</a-button>
|
|
<a-button v-if="$hasPermissions('B_dealerPromotionAdd')" id="promotionList-add" type="primary" @click="handleAdd">新增</a-button>
|
|
- <a-checkbox @change="onChange">
|
|
|
|
|
|
+ <a-checkbox @change="handleDealerAudit" v-if="$hasPermissions('B_dealerAudit')">
|
|
待审核(修改参与客户)
|
|
待审核(修改参与客户)
|
|
</a-checkbox>
|
|
</a-checkbox>
|
|
</div>
|
|
</div>
|
|
@@ -110,7 +110,6 @@
|
|
<span v-else>--</span>
|
|
<span v-else>--</span>
|
|
</template>
|
|
</template>
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
- <!-- state 待提交:WAIT_SUBMIT 待审核:WAIT_AUDIT 未开始:NOT_START 进行中:RUNNING 审核不通过:AUDIT_REJECT 已结束:IS_OVER -->
|
|
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
<a-button
|
|
<a-button
|
|
size="small"
|
|
size="small"
|
|
@@ -139,7 +138,7 @@
|
|
v-if="$hasPermissions('B_editTime')&&(record.state == 'NOT_START' || record.state=='RUNNING' ||record.state == 'IS_OVER')"
|
|
v-if="$hasPermissions('B_editTime')&&(record.state == 'NOT_START' || record.state=='RUNNING' ||record.state == 'IS_OVER')"
|
|
@click="handleTime(record)"
|
|
@click="handleTime(record)"
|
|
class="button-info"
|
|
class="button-info"
|
|
- id="promotionList-edit-btn">促销时间变更</a-button>
|
|
|
|
|
|
+ id="promotionList-edit-btn">时间变更</a-button>
|
|
<a-button
|
|
<a-button
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
@@ -165,7 +164,14 @@
|
|
</s-table>
|
|
</s-table>
|
|
</a-spin>
|
|
</a-spin>
|
|
<!-- 参与客户 -->
|
|
<!-- 参与客户 -->
|
|
- <lookUp-customers-modal :itemSn="itemPromotionSn" ref="lookUpCustomers" :openModal="openCustomerModal" @ok="editCustomerOk" @close="openCustomerModal = false"></lookUp-customers-modal>
|
|
|
|
|
|
+ <lookUp-customers-modal
|
|
|
|
+ :itemSn="itemPromotionSn"
|
|
|
|
+ :showType="itemStatusType"
|
|
|
|
+ ref="lookUpCustomers"
|
|
|
|
+ :openModal="openCustomerModal"
|
|
|
|
+ @submitAudit="editCustomerOk"
|
|
|
|
+ @handleAudit="auditCustomerOk"
|
|
|
|
+ @close="closeCustomer"></lookUp-customers-modal>
|
|
<!-- 新增/编辑弹窗-->
|
|
<!-- 新增/编辑弹窗-->
|
|
<add-modal v-drag :itemSn="itemSn" :openModal="openModal" @ok="handleOk" @close="openModal=false" />
|
|
<add-modal v-drag :itemSn="itemSn" :openModal="openModal" @ok="handleOk" @close="openModal=false" />
|
|
<!-- 促销时间变更 -->
|
|
<!-- 促销时间变更 -->
|
|
@@ -241,7 +247,7 @@ import creatorList from '@/views/common/creatorList.vue'
|
|
import editActiveEndTime from './editActiveEndTime.vue'
|
|
import editActiveEndTime from './editActiveEndTime.vue'
|
|
import supplier from '@/views/common/supplier.js'
|
|
import supplier from '@/views/common/supplier.js'
|
|
import warehouse from '@/views/common/chooseWarehouse.js'
|
|
import warehouse from '@/views/common/chooseWarehouse.js'
|
|
-import { dealerPromotionList, dealerPromotionDel, modifyEnabledFlag, promotionAudit, promotionIsOver, handleCopyData, dealerMidwayAudit } from '@/api/promotion'
|
|
|
|
|
|
+import { dealerPromotionList, dealerPromotionDel, modifyEnabledFlag, promotionAudit, promotionIsOver, handleCopyData, midwaySubmit, dealerMidwayAudit } from '@/api/promotion'
|
|
export default {
|
|
export default {
|
|
name: 'PromotionManagementList',
|
|
name: 'PromotionManagementList',
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
@@ -298,7 +304,8 @@ export default {
|
|
itemSn: null, // 经销商促销活动SN
|
|
itemSn: null, // 经销商促销活动SN
|
|
openAuditModal: false, // 审核弹窗,
|
|
openAuditModal: false, // 审核弹窗,
|
|
openCopyModal: false, // 复制弹窗
|
|
openCopyModal: false, // 复制弹窗
|
|
- itemPromotionSn: ''
|
|
|
|
|
|
+ itemPromotionSn: '',
|
|
|
|
+ itemStatusType: false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -323,13 +330,18 @@ export default {
|
|
// 参与客户
|
|
// 参与客户
|
|
handleCustomers (row) {
|
|
handleCustomers (row) {
|
|
this.openCustomerModal = true
|
|
this.openCustomerModal = true
|
|
- this.$nextTick(() => {
|
|
|
|
- if (row.dealerScope != 'ALL_DEALER') {
|
|
|
|
- this.itemPromotionSn = row.promotionSn
|
|
|
|
- } else {
|
|
|
|
- this.itemPromotionSn = ''
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ if ((row.state === 'NOT_START' || row.state === 'RUNNING') && row.dealerAuditFlag && row.dealerAuditFlag == 0) {
|
|
|
|
+ this.itemStatusType = 'isEdit'
|
|
|
|
+ } else if ((row.state === 'NOT_START' || row.state === 'RUNNING') && row.dealerAuditFlag && row.dealerAuditFlag == 1) {
|
|
|
|
+ this.itemStatusType = 'isAudit'
|
|
|
|
+ } else {
|
|
|
|
+ this.itemStatusType = 'isClose'
|
|
|
|
+ }
|
|
|
|
+ if (row.dealerScope != 'ALL_DEALER') {
|
|
|
|
+ this.itemPromotionSn = row.promotionSn
|
|
|
|
+ } else {
|
|
|
|
+ this.itemPromotionSn = ''
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 基本信息 保存
|
|
// 基本信息 保存
|
|
handleOk () {
|
|
handleOk () {
|
|
@@ -363,6 +375,13 @@ export default {
|
|
handleSetRules (row) {
|
|
handleSetRules (row) {
|
|
this.$router.push({ name: 'dealerPromotionManagementRule', query: { type: 'rule', sn: row.promotionSn } })
|
|
this.$router.push({ name: 'dealerPromotionManagementRule', query: { type: 'rule', sn: row.promotionSn } })
|
|
},
|
|
},
|
|
|
|
+ // 审核参与客户
|
|
|
|
+ handleDealerAudit (val) {
|
|
|
|
+ this.queryParam.dealerAuditFlag = val.target.checked ? '1' : '0'
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 审核
|
|
// 审核
|
|
handleCheck (row) {
|
|
handleCheck (row) {
|
|
const _this = this
|
|
const _this = this
|
|
@@ -471,18 +490,28 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 修改参与客户 参与客户提交审核
|
|
// 修改参与客户 参与客户提交审核
|
|
- editCustomerOk (res) {
|
|
|
|
|
|
+ editCustomerOk () {
|
|
const _this = this
|
|
const _this = this
|
|
- dealerMidwayAudit({ promotionSn: row.promotionSn, dealerAuditStatus: '1' }).then(res => {
|
|
|
|
|
|
+ midwaySubmit({ promotionSn: _this.itemPromotionSn }).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
_this.$message.success(res.message)
|
|
_this.$message.success(res.message)
|
|
_this.$refs.table.refresh()
|
|
_this.$refs.table.refresh()
|
|
- _this.spinning = false
|
|
|
|
- } else {
|
|
|
|
- _this.spinning = false
|
|
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ auditCustomerOk (con) {
|
|
|
|
+ const _this = this
|
|
|
|
+ dealerMidwayAudit({ promotionSn: _this.itemPromotionSn, dealerAuditStatus: con }).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ _this.$message.success(res.message)
|
|
|
|
+ _this.$refs.table.refresh()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ closeCustomer () {
|
|
|
|
+ this.openCustomerModal = false
|
|
|
|
+ this.itemPromotionSn = ''
|
|
|
|
+ },
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
this.queryParam = {
|
|
this.queryParam = {
|