|
@@ -40,14 +40,7 @@
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="创建人">
|
|
<a-form-item label="创建人">
|
|
- <v-select
|
|
|
|
- v-model="queryParam.state"
|
|
|
|
- ref="state"
|
|
|
|
- id="promotionList-state"
|
|
|
|
- code="PROMOTION_STATE"
|
|
|
|
- placeholder="请选择创建人"
|
|
|
|
- allowClear
|
|
|
|
- ></v-select>
|
|
|
|
|
|
+ <creatorList ref="creatorList" id="promotionList-creatorId" @change="creatorChange" />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
@@ -101,9 +94,10 @@
|
|
</template>
|
|
</template>
|
|
<!-- 参与客户 -->
|
|
<!-- 参与客户 -->
|
|
<template slot="joinCustomers" slot-scope="text, record">
|
|
<template slot="joinCustomers" slot-scope="text, record">
|
|
- <span v-if="record.dealerScope ==='ALL_DEALER'">全部客户</span>
|
|
|
|
|
|
+ <span class="joinCustomer" v-if="record.dealerScope ==='ALL_DEALER'" @click="handleCustomers(record)">全部客户</span>
|
|
<span class="joinCustomer" v-else @click="handleCustomers(record)">共有<span style="color:#39f;vertical-align:top;">{{ record.dealerSnList?record.dealerSnList.length:0 }}</span>个客户</span>
|
|
<span class="joinCustomer" v-else @click="handleCustomers(record)">共有<span style="color:#39f;vertical-align:top;">{{ record.dealerSnList?record.dealerSnList.length:0 }}</span>个客户</span>
|
|
- <a-badge count="审" :number-style="{ backgroundColor: '#f30', zoom:'80%' }" />
|
|
|
|
|
|
+ <a-badge count="审" v-show="record.dealerAuditFlag == 1" :number-style="{ backgroundColor: '#f30', zoom:'80%' }" />
|
|
|
|
+ <!-- dealerAuditFlag 1 是 0否 -->
|
|
</template>
|
|
</template>
|
|
<!-- 发布状态 -->
|
|
<!-- 发布状态 -->
|
|
<template slot="releaseStatus" slot-scope="text, record">
|
|
<template slot="releaseStatus" slot-scope="text, record">
|
|
@@ -163,14 +157,15 @@
|
|
<a-button
|
|
<a-button
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
- @click="openCopyModal = true"
|
|
|
|
|
|
+ v-if="record.state != 'AUDIT_REJECT'"
|
|
|
|
+ @click="handleCopyModal(record)"
|
|
class="button-info"
|
|
class="button-info"
|
|
id="promotionList-edit-btn">复制</a-button>
|
|
id="promotionList-edit-btn">复制</a-button>
|
|
</template>
|
|
</template>
|
|
</s-table>
|
|
</s-table>
|
|
</a-spin>
|
|
</a-spin>
|
|
<!-- 参与客户 -->
|
|
<!-- 参与客户 -->
|
|
- <lookUp-customers-modal ref="lookUpCustomers" :openModal="openCustomerModal" @close="openCustomerModal = false"></lookUp-customers-modal>
|
|
|
|
|
|
+ <lookUp-customers-modal :itemSn="itemPromotionSn" ref="lookUpCustomers" :openModal="openCustomerModal" @ok="editCustomerOk" @close="openCustomerModal = false"></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" />
|
|
<!-- 促销时间变更 -->
|
|
<!-- 促销时间变更 -->
|
|
@@ -222,13 +217,13 @@
|
|
<a-button
|
|
<a-button
|
|
id="copyModal-cancel"
|
|
id="copyModal-cancel"
|
|
class="button-cancel"
|
|
class="button-cancel"
|
|
- @click="closeAuditModal"
|
|
|
|
|
|
+ @click="closeCopyModal"
|
|
style="margin-right: 15px;">取消</a-button>
|
|
style="margin-right: 15px;">取消</a-button>
|
|
<a-button
|
|
<a-button
|
|
type="primary"
|
|
type="primary"
|
|
id="copyModal-save"
|
|
id="copyModal-save"
|
|
class="button-primary"
|
|
class="button-primary"
|
|
- @click="handleAuditModal"
|
|
|
|
|
|
+ @click="handleCopy"
|
|
>确定</a-button>
|
|
>确定</a-button>
|
|
</div>
|
|
</div>
|
|
</a-modal>
|
|
</a-modal>
|
|
@@ -240,16 +235,17 @@
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import addModal from './addModal.vue'
|
|
import addModal from './addModal.vue'
|
|
-import lookUpCustomersModal from '../promotionManagement/lookUpCustomersModal'
|
|
|
|
|
|
+import lookUpCustomersModal from './lookUpCustomersModal'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
|
+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 } from '@/api/promotion'
|
|
|
|
|
|
+import { dealerPromotionList, dealerPromotionDel, modifyEnabledFlag, promotionAudit, promotionIsOver, handleCopyData, dealerMidwayAudit } from '@/api/promotion'
|
|
export default {
|
|
export default {
|
|
name: 'PromotionManagementList',
|
|
name: 'PromotionManagementList',
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
- components: { STable, supplier, VSelect, rangeDate, warehouse, lookUpCustomersModal, addModal, editActiveEndTime },
|
|
|
|
|
|
+ components: { STable, supplier, VSelect, rangeDate, warehouse, lookUpCustomersModal, addModal, editActiveEndTime, creatorList },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
@@ -265,7 +261,8 @@ export default {
|
|
endDate: undefined,
|
|
endDate: undefined,
|
|
queryWord: '',
|
|
queryWord: '',
|
|
enabledFlag: undefined, // 发布状态
|
|
enabledFlag: undefined, // 发布状态
|
|
- state: undefined
|
|
|
|
|
|
+ state: undefined,
|
|
|
|
+ creatorId: undefined
|
|
},
|
|
},
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
@@ -275,6 +272,7 @@ export default {
|
|
{ title: '促销时间', scopedSlots: { customRender: 'promotionTime' }, width: '13%', align: 'center' },
|
|
{ title: '促销时间', scopedSlots: { customRender: 'promotionTime' }, width: '13%', align: 'center' },
|
|
{ title: '参与客户', scopedSlots: { customRender: 'joinCustomers' }, width: '7%', align: 'center', ellipsis: true },
|
|
{ title: '参与客户', scopedSlots: { customRender: 'joinCustomers' }, width: '7%', align: 'center', ellipsis: true },
|
|
{ title: '促销描述', dataIndex: 'content', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '促销描述', dataIndex: 'content', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '创建人', dataIndex: 'creatorName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '活动状态', dataIndex: 'stateDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '活动状态', dataIndex: 'stateDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '发布状态', scopedSlots: { customRender: 'releaseStatus' }, width: '7%', align: 'center', ellipsis: true },
|
|
{ title: '发布状态', scopedSlots: { customRender: 'releaseStatus' }, width: '7%', align: 'center', ellipsis: true },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
@@ -299,10 +297,15 @@ export default {
|
|
},
|
|
},
|
|
itemSn: null, // 经销商促销活动SN
|
|
itemSn: null, // 经销商促销活动SN
|
|
openAuditModal: false, // 审核弹窗,
|
|
openAuditModal: false, // 审核弹窗,
|
|
- openCopyModal: false // 复制弹窗
|
|
|
|
|
|
+ openCopyModal: false, // 复制弹窗
|
|
|
|
+ itemPromotionSn: ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 创建人
|
|
|
|
+ creatorChange (val) {
|
|
|
|
+ this.queryParam.creatorId = val.key
|
|
|
|
+ },
|
|
// 详情
|
|
// 详情
|
|
handleDetail (row) {
|
|
handleDetail (row) {
|
|
this.$router.push({ name: 'dealerPromotionManagementDetail', query: { sn: row.promotionSn } })
|
|
this.$router.push({ name: 'dealerPromotionManagementDetail', query: { sn: row.promotionSn } })
|
|
@@ -321,7 +324,11 @@ export default {
|
|
handleCustomers (row) {
|
|
handleCustomers (row) {
|
|
this.openCustomerModal = true
|
|
this.openCustomerModal = true
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- this.$refs.lookUpCustomers.pageInit({ dealerSnList: row.dealerSnList })
|
|
|
|
|
|
+ if (row.dealerScope != 'ALL_DEALER') {
|
|
|
|
+ this.itemPromotionSn = row.promotionSn
|
|
|
|
+ } else {
|
|
|
|
+ this.itemPromotionSn = ''
|
|
|
|
+ }
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 基本信息 保存
|
|
// 基本信息 保存
|
|
@@ -381,6 +388,30 @@ export default {
|
|
_this.spinning = false
|
|
_this.spinning = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 复制
|
|
|
|
+ handleCopyModal (row) {
|
|
|
|
+ this.itemSn = row.promotionSn
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.openCopyModal = true
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ handleCopy () {
|
|
|
|
+ const _this = this
|
|
|
|
+ _this.spinning = true
|
|
|
|
+ handleCopyData({ promotionSn: this.itemSn }).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ _this.$message.success(res.message)
|
|
|
|
+ _this.$refs.table.refresh()
|
|
|
|
+ }
|
|
|
|
+ _this.itemSn = null
|
|
|
|
+ _this.openCopyModal = false
|
|
|
|
+ _this.spinning = false
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ closeCopyModal () {
|
|
|
|
+ this.itemSn = null
|
|
|
|
+ this.openCopyModal = false
|
|
|
|
+ },
|
|
// 促销时间变更
|
|
// 促销时间变更
|
|
handleTime (row) {
|
|
handleTime (row) {
|
|
this.editEndModal = true
|
|
this.editEndModal = true
|
|
@@ -439,6 +470,19 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 修改参与客户 参与客户提交审核
|
|
|
|
+ editCustomerOk (res) {
|
|
|
|
+ const _this = this
|
|
|
|
+ dealerMidwayAudit({ promotionSn: row.promotionSn, dealerAuditStatus: '1' }).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ _this.$message.success(res.message)
|
|
|
|
+ _this.$refs.table.refresh()
|
|
|
|
+ _this.spinning = false
|
|
|
|
+ } else {
|
|
|
|
+ _this.spinning = false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
this.queryParam = {
|
|
this.queryParam = {
|
|
@@ -450,6 +494,7 @@ export default {
|
|
}
|
|
}
|
|
this.$refs.rangeDate.resetDate()
|
|
this.$refs.rangeDate.resetDate()
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
|
|
+ // this.$refs.dealerSubareaScopeList.resetForm()
|
|
},
|
|
},
|
|
|
|
|
|
pageInit () {
|
|
pageInit () {
|
|
@@ -501,9 +546,9 @@ export default {
|
|
.nameBox{
|
|
.nameBox{
|
|
padding:0 5px;
|
|
padding:0 5px;
|
|
}
|
|
}
|
|
- .joinCustomer{
|
|
|
|
- cursor:pointer;
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
+ .joinCustomer{
|
|
|
|
+ cursor:pointer;
|
|
}
|
|
}
|
|
.copyContent{
|
|
.copyContent{
|
|
margin:30px 10px 20px;
|
|
margin:30px 10px 20px;
|