|
@@ -7,7 +7,7 @@
|
|
<a-row :gutter="15">
|
|
<a-row :gutter="15">
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="创建时间">
|
|
<a-form-item label="创建时间">
|
|
- <rangeDate ref="rangeCreateDate" :value="createDate" @change="dateCreateChange" />
|
|
|
|
|
|
+ <rangeDate id="promotion-creatDate" ref="rangeCreateDate" :value="createDate" @change="dateCreateChange" />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
@@ -18,6 +18,7 @@
|
|
<a-col :md="4" :sm="24">
|
|
<a-col :md="4" :sm="24">
|
|
<a-form-item label="显示状态">
|
|
<a-form-item label="显示状态">
|
|
<a-select
|
|
<a-select
|
|
|
|
+ id="promotion-showFlag"
|
|
v-model="queryParam.showFlag"
|
|
v-model="queryParam.showFlag"
|
|
placeholder="请选择显示状态"
|
|
placeholder="请选择显示状态"
|
|
>
|
|
>
|
|
@@ -39,8 +40,8 @@
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="4" :sm="24">
|
|
<a-col :md="4" :sm="24">
|
|
<span class="table-page-search-submitButtons">
|
|
<span class="table-page-search-submitButtons">
|
|
- <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
|
|
|
|
- <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
|
|
|
|
|
|
+ <a-button id="promotion-search" type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
|
|
|
|
+ <a-button id="promotion-reset" style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
|
|
</span>
|
|
</span>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
@@ -53,7 +54,7 @@
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
<!-- 操作按钮 -->
|
|
<!-- 操作按钮 -->
|
|
<div class="table-operator" v-if="$hasPermissions('B_promotionManagementAdd')">
|
|
<div class="table-operator" v-if="$hasPermissions('B_promotionManagementAdd')">
|
|
- <a-button type="primary" @click="openAddModal = true">新增</a-button>
|
|
|
|
|
|
+ <a-button id="promotion-add" type="primary" @click="openAddModal = true">新增</a-button>
|
|
</div>
|
|
</div>
|
|
<s-table
|
|
<s-table
|
|
class="sTable fixPagination"
|
|
class="sTable fixPagination"
|
|
@@ -80,7 +81,7 @@
|
|
<a-switch
|
|
<a-switch
|
|
checkedChildren="显示"
|
|
checkedChildren="显示"
|
|
unCheckedChildren="隐藏"
|
|
unCheckedChildren="隐藏"
|
|
- id="promotion-isEnable"
|
|
|
|
|
|
+ :id="'promotion-isEnable-'+record.id"
|
|
v-model="record.isEnable"
|
|
v-model="record.isEnable"
|
|
:disabled="record.state!='PUBLISH'"
|
|
:disabled="record.state!='PUBLISH'"
|
|
@change="changeFlagHandle(record)" />
|
|
@change="changeFlagHandle(record)" />
|
|
@@ -100,14 +101,14 @@
|
|
<template slot="title">
|
|
<template slot="title">
|
|
<span>{{ record.description }}</span>
|
|
<span>{{ record.description }}</span>
|
|
</template>
|
|
</template>
|
|
- <div @click="promotionDesc(record)" class="link-bule">{{ record.description }}</div>
|
|
|
|
|
|
+ <div :id="'promotion-description-'+record.id" @click="promotionDesc(record)" class="link-bule">{{ record.description }}</div>
|
|
</a-tooltip>
|
|
</a-tooltip>
|
|
<div v-else-if="!record.description" class="desc">--</div>
|
|
<div v-else-if="!record.description" class="desc">--</div>
|
|
- <div v-else @click="promotionDesc(record)" class="link-bule">{{ record.description }}</div>
|
|
|
|
|
|
+ <div v-else :id="'promotion-description-'+record.id" @click="promotionDesc(record)" class="link-bule">{{ record.description }}</div>
|
|
</template>
|
|
</template>
|
|
<!-- 促销展示 -->
|
|
<!-- 促销展示 -->
|
|
<template slot="salesShow" slot-scope="text, record">
|
|
<template slot="salesShow" slot-scope="text, record">
|
|
- <div @click="handleSaleShow(record)" v-if="record.contentType!='LINK'&&record.imageSet && record.imageSet.length>0">
|
|
|
|
|
|
+ <div @click="handleSaleShow(record)" :id="'promotion-imageSet-'+record.id" v-if="record.contentType!='LINK'&&record.imageSet && record.imageSet.length>0">
|
|
<img :src="record.imageSet[0]" alt="图片走丢啦" width="60" />
|
|
<img :src="record.imageSet[0]" alt="图片走丢啦" width="60" />
|
|
</div>
|
|
</div>
|
|
<div v-else-if="record.contentType=='LINK'&&record.imageSet && record.imageSet.length>0">
|
|
<div v-else-if="record.contentType=='LINK'&&record.imageSet && record.imageSet.length>0">
|
|
@@ -124,28 +125,28 @@
|
|
class="button-warning"
|
|
class="button-warning"
|
|
@click="promotionEdit(record)"
|
|
@click="promotionEdit(record)"
|
|
v-if="(record.state=='UNPUBLISH' || record.state=='CLOSE') && $hasPermissions('B_promotionManagementAdd')"
|
|
v-if="(record.state=='UNPUBLISH' || record.state=='CLOSE') && $hasPermissions('B_promotionManagementAdd')"
|
|
- id="promotion-edit-btn">促销编辑</a-button>
|
|
|
|
|
|
+ :id="'promotion-edit-'+record.id" >促销编辑</a-button>
|
|
<a-button
|
|
<a-button
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
class="button-warning"
|
|
class="button-warning"
|
|
@click="handleRelease(record,'edit')"
|
|
@click="handleRelease(record,'edit')"
|
|
v-if="(record.state=='PUBLISH' || record.state=='CLOSE')&&$hasPermissions('B_promotionManagementContent')"
|
|
v-if="(record.state=='PUBLISH' || record.state=='CLOSE')&&$hasPermissions('B_promotionManagementContent')"
|
|
- id="promotion-modify-btn">发布修改</a-button>
|
|
|
|
|
|
+ :id="'promotion-pubEdit-'+record.id" >发布修改</a-button>
|
|
<a-button
|
|
<a-button
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
class="button-info"
|
|
class="button-info"
|
|
@click="handleRelease(record,'add')"
|
|
@click="handleRelease(record,'add')"
|
|
v-if="record.state=='UNPUBLISH'&&$hasPermissions('B_promotionManagementContent')"
|
|
v-if="record.state=='UNPUBLISH'&&$hasPermissions('B_promotionManagementContent')"
|
|
- id="promotion-release-btn">促销发布</a-button>
|
|
|
|
|
|
+ :id="'promotion-publish-'+record.id" >促销发布</a-button>
|
|
<a-button
|
|
<a-button
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
class="button-error"
|
|
class="button-error"
|
|
v-if="record.state=='UNPUBLISH'&&$hasPermissions('B_promotionManagementDel')"
|
|
v-if="record.state=='UNPUBLISH'&&$hasPermissions('B_promotionManagementDel')"
|
|
@click="handleDel(record)"
|
|
@click="handleDel(record)"
|
|
- id="promotion-del-btn">删除</a-button>
|
|
|
|
|
|
+ :id="'promotion-del-'+record.id" >删除</a-button>
|
|
<span v-if="record.state=='End'">--</span>
|
|
<span v-if="record.state=='End'">--</span>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -169,12 +170,12 @@
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
-import { promoTerminalList, promoTerminalDel, updateShowFlag } from '@/api/promoTerminal'
|
|
|
|
import lookUpCustomersModal from './lookUpCustomersModal'
|
|
import lookUpCustomersModal from './lookUpCustomersModal'
|
|
import promotionDescModal from './promotionDescModal'
|
|
import promotionDescModal from './promotionDescModal'
|
|
import promotionShowModal from './promotionShowModal'
|
|
import promotionShowModal from './promotionShowModal'
|
|
import addModal from './addModal'
|
|
import addModal from './addModal'
|
|
import promotionEditModal from './editModal'
|
|
import promotionEditModal from './editModal'
|
|
|
|
+import { promoTerminalList, promoTerminalDel, updateShowFlag } from '@/api/promoTerminal'
|
|
export default {
|
|
export default {
|
|
name: 'PromotionList',
|
|
name: 'PromotionList',
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
@@ -182,34 +183,34 @@ export default {
|
|
STable,
|
|
STable,
|
|
VSelect,
|
|
VSelect,
|
|
rangeDate,
|
|
rangeDate,
|
|
- lookUpCustomersModal,
|
|
|
|
- promotionShowModal,
|
|
|
|
- promotionDescModal,
|
|
|
|
- addModal,
|
|
|
|
- promotionEditModal
|
|
|
|
|
|
+ lookUpCustomersModal, // 参与客户弹框
|
|
|
|
+ promotionShowModal, // 促销展示弹框
|
|
|
|
+ promotionDescModal, // 促销描述弹框
|
|
|
|
+ addModal, // 新增弹框
|
|
|
|
+ promotionEditModal // 促销发布弹框
|
|
},
|
|
},
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
- tableHeight: 0,
|
|
|
|
|
|
+ tableHeight: 0, // 表格高度
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
- openCustomerModal: false,
|
|
|
|
- openDescModal: false,
|
|
|
|
- openShowModal: false,
|
|
|
|
- openAddModal: false,
|
|
|
|
- openPromotionEditModal: false,
|
|
|
|
|
|
+ openCustomerModal: false, // 打开参与客户弹框
|
|
|
|
+ openDescModal: false, // 促销描述弹框
|
|
|
|
+ openShowModal: false, // 促销展示弹框
|
|
|
|
+ openAddModal: false, // 新增弹框
|
|
|
|
+ openPromotionEditModal: false, // 促销发布弹框
|
|
createDate: [], // 创建时间
|
|
createDate: [], // 创建时间
|
|
- itemId: '',
|
|
|
|
|
|
+ itemId: '', // 单据id
|
|
descCon: '', // 描述内容
|
|
descCon: '', // 描述内容
|
|
pageType: '', // 发布类型 add 促销发布 edit 发布修改
|
|
pageType: '', // 发布类型 add 促销发布 edit 发布修改
|
|
- dealerSn: [],
|
|
|
|
|
|
+ dealerSn: [], // 客户sn
|
|
// 查询参数
|
|
// 查询参数
|
|
queryParam: {
|
|
queryParam: {
|
|
- beginDate: undefined,
|
|
|
|
- endDate: undefined,
|
|
|
|
- name: '',
|
|
|
|
- showFlag: undefined,
|
|
|
|
- state: undefined
|
|
|
|
|
|
+ beginDate: undefined, // 开始时间
|
|
|
|
+ endDate: undefined, // 结束时间
|
|
|
|
+ name: '', // 促销名称
|
|
|
|
+ showFlag: undefined, // 显示状态
|
|
|
|
+ state: undefined // 状态
|
|
},
|
|
},
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
@@ -231,6 +232,7 @@ export default {
|
|
return data
|
|
return data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 列定义
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
@@ -257,7 +259,7 @@ export default {
|
|
this.$refs.lookUpCustomers.pageInit({ dealerSnList: row.promoBuyerSnSet ? row.promoBuyerSnSet : undefined, promoActiveSn: row.promoActiveSn })
|
|
this.$refs.lookUpCustomers.pageInit({ dealerSnList: row.promoBuyerSnSet ? row.promoBuyerSnSet : undefined, promoActiveSn: row.promoActiveSn })
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- // 创建时间 change
|
|
|
|
|
|
+ // 选择创建时间 change
|
|
dateCreateChange (date) {
|
|
dateCreateChange (date) {
|
|
this.queryParam.beginDate = date[0]
|
|
this.queryParam.beginDate = date[0]
|
|
this.queryParam.endDate = date[1]
|
|
this.queryParam.endDate = date[1]
|
|
@@ -322,6 +324,7 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 重置列表
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
this.$refs.rangeCreateDate.resetDate(this.createDate)
|
|
this.$refs.rangeCreateDate.resetDate(this.createDate)
|
|
this.queryParam.beginDate = undefined
|
|
this.queryParam.beginDate = undefined
|
|
@@ -344,12 +347,14 @@ export default {
|
|
this.openPromotionEditModal = false
|
|
this.openPromotionEditModal = false
|
|
this.itemId = ''
|
|
this.itemId = ''
|
|
},
|
|
},
|
|
|
|
+ // 页面初始化
|
|
pageInit () {
|
|
pageInit () {
|
|
const _this = this
|
|
const _this = this
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
_this.setTableH()
|
|
_this.setTableH()
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 设置表格高度
|
|
setTableH () {
|
|
setTableH () {
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
this.tableHeight = window.innerHeight - tableSearchH - 240
|
|
this.tableHeight = window.innerHeight - tableSearchH - 240
|