|
@@ -12,27 +12,27 @@
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="促销名称">
|
|
|
- <a-input id="promotionInfoList-urgentBillNo" v-model.trim="queryParam.urgentBillNo" allowClear placeholder="请输入急件单号"/>
|
|
|
+ <a-input id="promotionInfoList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入促销名称"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="4" :sm="24">
|
|
|
<a-form-item label="显示状态">
|
|
|
- <v-select
|
|
|
- v-model="queryParam.status"
|
|
|
- ref="status"
|
|
|
- id="chainTransferInList-status"
|
|
|
- code="URGENT_STATUS"
|
|
|
+ <a-select
|
|
|
+ v-model="queryParam.showFlag"
|
|
|
placeholder="请选择显示状态"
|
|
|
- allowClear></v-select>
|
|
|
+ >
|
|
|
+ <a-select-option :value="1">已显示</a-select-option>
|
|
|
+ <a-select-option :value="0">未显示</a-select-option>
|
|
|
+ </a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="4" :sm="24">
|
|
|
<a-form-item label="促销状态">
|
|
|
<v-select
|
|
|
- v-model="queryParam.sourceType"
|
|
|
+ v-model="queryParam.state"
|
|
|
ref="sourceType"
|
|
|
id="promotionInfoList-sourceType"
|
|
|
- code="SALES_SOURCE"
|
|
|
+ code="PROMO_STATE"
|
|
|
placeholder="请选择促销状态"
|
|
|
allowClear></v-select>
|
|
|
</a-form-item>
|
|
@@ -56,48 +56,45 @@
|
|
|
:scroll="{ y: tableHeight }"
|
|
|
:defaultLoadData="false"
|
|
|
bordered>
|
|
|
- <!-- 参与客户 -->
|
|
|
- <template slot="joinCustomers" slot-scope="text, record">
|
|
|
- <span @click="openCustomerModal = true">共<span style="color:red;">17</span>个客户</span>
|
|
|
+ <!-- 促销时间 -->
|
|
|
+ <template slot="promotionTime" slot-scope="text, record">
|
|
|
+ <span>{{ record.activeDateStart }}至{{ record.activeDateEnd }}</span>
|
|
|
+ </template>
|
|
|
+ <!-- 促销描述 -->
|
|
|
+ <template slot="desc" slot-scope="text, record">
|
|
|
+ <div class="desc font1" @click="handleDescModal(record)">{{ record.description }}</div>
|
|
|
</template>
|
|
|
<!-- 状态 -->
|
|
|
- <template slot="status" slot-scope="text, record">
|
|
|
- <stateIcon :title="record.statusDictValue" :state="record.status=='WAIT'?'2':'1'"></stateIcon>
|
|
|
+ <template slot="showStatus" slot-scope="text, record">
|
|
|
+ {{ record.showFlag == '1'?'已显示':'未显示' }}
|
|
|
</template>
|
|
|
- <!-- 操作 -->
|
|
|
- <template slot="action" slot-scope="text, record">
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- v-if="record.status == 'WAIT' && $hasPermissions('B_urgentWriteDown')"
|
|
|
- @click="handleWriteDown(record)"
|
|
|
- class="button-primary"
|
|
|
- id="urgentItemsOffsetDetail-btn-submit">冲减</a-button>
|
|
|
+ <!-- 促销展示 -->
|
|
|
+ <template slot="salesShow" slot-scope="text, record">
|
|
|
+ <div @click="handleSaleShow(record)" v-if="record.images && record.images.length>0">
|
|
|
+ <img :src="record.images[0]" alt="图片走丢啦" width="60" />
|
|
|
+ </div>
|
|
|
<span v-else>--</span>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
</a-spin>
|
|
|
- <lookUp-customers-modal ref="lookUpCustomers" :openModal="openCustomerModal" @close="openCustomerModal = false"/>
|
|
|
- <promotion-desc-modal :openModal="openDescModal" @close="openDescModal = false"/>
|
|
|
- <promotion-show-modal :openModal="openShowModal" @close="openShowModal = false"/>
|
|
|
+ <promotion-desc-modal :con="descInfo" :openModal="openDescModal" @close="openDescModal = false"/>
|
|
|
+ <promotion-show-modal ref="promotionShow" :openModal="openShowModal" @close="openShowModal = false"/>
|
|
|
</a-card>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
-import { urgentList, urgentWriteDown } from '@/api/urgent'
|
|
|
+import { promoTerminalList, promoTerminalDetail } from '@/api/promoTerminal'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import stateIcon from '@/views/common/stateIcon'
|
|
|
import custList from '@/views/common/custList.vue'
|
|
|
-import getDate from '@/libs/getDate.js'
|
|
|
-import lookUpCustomersModal from './lookUpCustomersModal'
|
|
|
import promotionDescModal from './promotionDescModal'
|
|
|
import promotionShowModal from './promotionShowModal'
|
|
|
|
|
|
export default {
|
|
|
name: 'UrgentOffsetList',
|
|
|
- components: { STable, VSelect, rangeDate, custList, stateIcon, lookUpCustomersModal, promotionDescModal, promotionShowModal },
|
|
|
+ components: { STable, VSelect, rangeDate, custList, stateIcon, promotionDescModal, promotionShowModal },
|
|
|
mixins: [commonMixin],
|
|
|
data () {
|
|
|
return {
|
|
@@ -106,42 +103,38 @@ export default {
|
|
|
openCustomerModal: false, // 参与客户弹窗
|
|
|
openDescModal: false, // 促销描述弹窗
|
|
|
openShowModal: true, // 促销展示弹窗
|
|
|
- time: [
|
|
|
- getDate.getCurrMonthDays().starttime,
|
|
|
- getDate.getCurrMonthDays().endtime
|
|
|
- ],
|
|
|
+ time: [],
|
|
|
queryParam: { // 查询条件
|
|
|
- beginDate: getDate.getCurrMonthDays().starttime,
|
|
|
- endDate: getDate.getCurrMonthDays().endtime,
|
|
|
- buyerNameCurrent: undefined, // 客户名称
|
|
|
- bizBillNo: '', // 关联单号
|
|
|
- urgentBillNo: '', // 急件单号
|
|
|
- status: undefined, // 状态
|
|
|
- sourceType: undefined // 单据来源
|
|
|
+ beginDate: undefined,
|
|
|
+ endDate: undefined,
|
|
|
+ name: '', // 促销名称
|
|
|
+ showFlag: undefined, // 显示状态
|
|
|
+ state: undefined// 促销状态
|
|
|
},
|
|
|
+ descInfo: '', // 促销描述
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
{ title: '发布时间', dataIndex: 'createDate', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '促销名称', dataIndex: 'buyerNameCurrent', width: '24%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '促销时间', dataIndex: 'offSetTime', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '参与客户', scopedSlots: { customRender: 'joinCustomers' }, width: '15%', align: 'center' },
|
|
|
- { title: '促销描述', dataIndex: 'bizBillNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '促销展示', scopedSlots: { customRender: 'status' }, width: '15%', align: 'center' },
|
|
|
- { title: '显示状态', dataIndex: 'bizBillNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '状态', dataIndex: 'bizBillNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
+ { title: '促销名称', dataIndex: 'name', width: '24%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '促销时间', scopedSlots: { customRender: 'promotionTime' }, width: '20%', align: 'center' },
|
|
|
+ { title: '促销描述', scopedSlots: { customRender: 'desc' }, width: '20%', align: 'center' },
|
|
|
+ { title: '促销展示', scopedSlots: { customRender: 'salesShow' }, width: '10%', align: 'center' },
|
|
|
+ { title: '显示状态', scopedSlots: { customRender: 'showStatus' }, width: '10%', align: 'center' },
|
|
|
+ { title: '状态', dataIndex: 'stateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
- return urgentList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ return promoTerminalList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
|
data.list[i].no = no + i + 1
|
|
|
+ data.list[i].images = data.list[i].images ? data.list[i].images.split(',') : []
|
|
|
}
|
|
|
this.disabled = false
|
|
|
}
|
|
@@ -157,6 +150,14 @@ export default {
|
|
|
this.queryParam.beginDate = date[0]
|
|
|
this.queryParam.endDate = date[1]
|
|
|
},
|
|
|
+ // 查看促销描述
|
|
|
+ handleDescModal (row) {
|
|
|
+ this.descInfo = row.description
|
|
|
+ const _this = this
|
|
|
+ this.$nextTick(() => {
|
|
|
+ _this.openDescModal = true
|
|
|
+ })
|
|
|
+ },
|
|
|
// 冲减
|
|
|
handleWriteDown (row) {
|
|
|
const _this = this
|
|
@@ -178,17 +179,21 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ handleSaleShow (row) {
|
|
|
+ const _this = this
|
|
|
+ _this.openShowModal = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ _this.$refs.promotionShow.getDetail({ id: row.promoActiveSn })
|
|
|
+ })
|
|
|
+ },
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
this.$refs.rangeDate.resetDate(this.time)
|
|
|
- this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
|
|
|
- this.queryParam.endDate = getDate.getCurrMonthDays().endtime
|
|
|
- this.queryParam.buyerNameCurrent = undefined
|
|
|
- this.queryParam.bizBillNo = ''
|
|
|
- this.queryParam.urgentBillNo = ''
|
|
|
- this.queryParam.status = undefined
|
|
|
- this.queryParam.sourceType = undefined
|
|
|
- this.$refs.custList.resetForm()
|
|
|
+ this.queryParam.beginDate = undefined
|
|
|
+ this.queryParam.endDate = undefined
|
|
|
+ this.queryParam.name = ''
|
|
|
+ this.queryParam.showFlag = undefined
|
|
|
+ this.queryParam.state = undefined
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
// 详情
|
|
@@ -243,5 +248,16 @@ export default {
|
|
|
.green{
|
|
|
color: #19be6b;
|
|
|
}
|
|
|
+ .font1{
|
|
|
+ color:#39f;
|
|
|
+ }
|
|
|
+ .desc{
|
|
|
+ width: 100%;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ display: -webkit-box;
|
|
|
+ -webkit-line-clamp: 3;
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|