|
@@ -4,17 +4,38 @@
|
|
<div ref="tableSearch" class="table-page-search-wrapper">
|
|
<div ref="tableSearch" class="table-page-search-wrapper">
|
|
<a-form layout="inline" @keyup.enter.native="handelSearch(1)">
|
|
<a-form layout="inline" @keyup.enter.native="handelSearch(1)">
|
|
<a-row :gutter="15">
|
|
<a-row :gutter="15">
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
|
|
+ <a-col :md="8" :sm="24">
|
|
<a-form-item label="发布时间">
|
|
<a-form-item label="发布时间">
|
|
<rangeDate ref="rangeDate" @change="dateChange" />
|
|
<rangeDate ref="rangeDate" @change="dateChange" />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
|
|
+ <a-col :md="8" :sm="24">
|
|
<a-form-item label="标题">
|
|
<a-form-item label="标题">
|
|
- <a-input id="noticeList-title" v-model.trim="queryParam.notice.title" allowClear placeholder="请输入标题"/>
|
|
|
|
|
|
+ <a-input v-model.trim="queryParam.notice.title" allowClear placeholder="请输入标题"/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
|
|
+ <a-col :md="8" :sm="24">
|
|
|
|
+ <a-form-item label="类型">
|
|
|
|
+ <a-select v-model.trim="queryParam.notice.type" allowClear placeholder="请选择类型">
|
|
|
|
+ <a-select-option v-for="item in typeList" :key="item.val" :value="item.val">
|
|
|
|
+ {{ item.text }}
|
|
|
|
+ </a-select-option>
|
|
|
|
+ </a-select>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="8" :sm="24">
|
|
|
|
+ <a-form-item label="状态">
|
|
|
|
+ <a-select v-model.trim="queryParam.readFlag" allowClear placeholder="请选择状态">
|
|
|
|
+ <a-select-option value="0">
|
|
|
|
+ 未读
|
|
|
|
+ </a-select-option>
|
|
|
|
+ <a-select-option value="1">
|
|
|
|
+ 已读
|
|
|
|
+ </a-select-option>
|
|
|
|
+ </a-select>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="8" :sm="24">
|
|
<a-button type="primary" @click="handelSearch(1)" :disabled="disabled" id="noticeList-refresh">查询</a-button>
|
|
<a-button type="primary" @click="handelSearch(1)" :disabled="disabled" id="noticeList-refresh">查询</a-button>
|
|
<a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="noticeList-reset">重置</a-button>
|
|
<a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="noticeList-reset">重置</a-button>
|
|
</a-col>
|
|
</a-col>
|
|
@@ -36,9 +57,20 @@
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
<a-badge :count="record.readFlag=='0'? 1 : 0" dot>
|
|
<a-badge :count="record.readFlag=='0'? 1 : 0" dot>
|
|
- <a-button size="small" type="link" class="button-success" @click="handleDetail(record)" id="noticeList-detail-btn">详情</a-button>
|
|
|
|
|
|
+ <a-button size="small" type="link" class="button-success" @click="handleDetail(record)">详情</a-button>
|
|
</a-badge>
|
|
</a-badge>
|
|
</template>
|
|
</template>
|
|
|
|
+ <!-- type-->
|
|
|
|
+ <template slot="type" slot-scope="text, record">
|
|
|
|
+ {{ text?typeList.find(item => item.val == text).text:'--' }}
|
|
|
|
+ </template>
|
|
|
|
+ <!-- 内容 content-->
|
|
|
|
+ <template slot="content" slot-scope="text, record">
|
|
|
|
+ {{ text?text.slice(0,30)+(text.length>30?'...':''):'--' }}
|
|
|
|
+ <a-button v-if="record.notice.type=='tx'" @click="toAction(record)" size="small" type="link" class="button-info">
|
|
|
|
+ {{ record.notice.extInfo.bizType == 'SHELF_REPLENISH' ? '立即处理':'点击查看' }}
|
|
|
|
+ </a-button>
|
|
|
|
+ </template>
|
|
</a-table>
|
|
</a-table>
|
|
<!-- 分页 -->
|
|
<!-- 分页 -->
|
|
<tablePagination
|
|
<tablePagination
|
|
@@ -69,8 +101,10 @@ export default {
|
|
queryParam: { // 查询条件
|
|
queryParam: { // 查询条件
|
|
beginDate: '',
|
|
beginDate: '',
|
|
endDate: '',
|
|
endDate: '',
|
|
|
|
+ readFlag: undefined,
|
|
notice: {
|
|
notice: {
|
|
- title: ''
|
|
|
|
|
|
+ title: '',
|
|
|
|
+ type: undefined
|
|
}
|
|
}
|
|
},
|
|
},
|
|
tableHeight: 0,
|
|
tableHeight: 0,
|
|
@@ -78,9 +112,9 @@ export default {
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
{ title: '发布时间', dataIndex: 'createDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '发布时间', dataIndex: 'createDate', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '类别', dataIndex: 'notice.title', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '类别', dataIndex: 'notice.type', scopedSlots: { customRender: 'type' }, width: '15%', align: 'center' },
|
|
{ title: '标题', dataIndex: 'notice.title', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '标题', dataIndex: 'notice.title', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '内容', dataIndex: 'notice.title', width: '35%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '内容', dataIndex: 'notice.plainContent', scopedSlots: { customRender: 'content' }, width: '35%', align: 'center' },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
|
|
],
|
|
],
|
|
loadData: [],
|
|
loadData: [],
|
|
@@ -91,7 +125,25 @@ export default {
|
|
},
|
|
},
|
|
listLoading: false,
|
|
listLoading: false,
|
|
openModal: false, // 查看客户详情 弹框
|
|
openModal: false, // 查看客户详情 弹框
|
|
- itemId: '' // 当前id
|
|
|
|
|
|
+ itemId: '', // 当前id
|
|
|
|
+ typeList: [
|
|
|
|
+ {
|
|
|
|
+ text: '公告',
|
|
|
|
+ val: 'notity'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ text: '企业新闻',
|
|
|
|
+ val: 'news_company'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ text: '行业咨询',
|
|
|
|
+ val: 'news_trade'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ text: '提醒',
|
|
|
|
+ val: 'tx'
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -110,6 +162,24 @@ export default {
|
|
this.queryParam.beginDate = date[0] ? date[0] : ''
|
|
this.queryParam.beginDate = date[0] ? date[0] : ''
|
|
this.queryParam.endDate = date[1] ? date[1] : ''
|
|
this.queryParam.endDate = date[1] ? date[1] : ''
|
|
},
|
|
},
|
|
|
|
+ toAction (data) {
|
|
|
|
+ // 急送订单
|
|
|
|
+ if (data.notice.extInfo.bizType == 'TEMP_ORDER') {
|
|
|
|
+ this.$router.push({ name: 'salesDetail', params: { sn: data.notice.extInfo.bizSn } })
|
|
|
|
+ }
|
|
|
|
+ // 补货订单
|
|
|
|
+ if (data.notice.extInfo.bizType == 'SHELF_REPLENISH') {
|
|
|
|
+ this.$router.push({ name: 'replenishmentManagement', query: { bizType: 'WAIT_CONFIRM' } })
|
|
|
|
+ }
|
|
|
|
+ // 货架订单
|
|
|
|
+ if (data.notice.extInfo.bizType == 'SHELF_ORDER') {
|
|
|
|
+ this.$router.push({ name: 'shelfOrderDetail', params: { sn: data.notice.extInfo.bizSn } })
|
|
|
|
+ }
|
|
|
|
+ // 货架异常
|
|
|
|
+ if (data.notice.extInfo.bizType == 'SHELF_WARN') {
|
|
|
|
+ this.$router.push({ name: 'shelfOrderList', query: { shelfSn: data.notice.extInfo.bizSn } })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
// 查询列表
|
|
// 查询列表
|
|
handelSearch (pageNo) {
|
|
handelSearch (pageNo) {
|
|
this.paginationProps.current = pageNo || this.paginationProps.current
|
|
this.paginationProps.current = pageNo || this.paginationProps.current
|
|
@@ -117,8 +187,10 @@ export default {
|
|
const params = {
|
|
const params = {
|
|
pageNo: this.paginationProps.current,
|
|
pageNo: this.paginationProps.current,
|
|
pageSize: this.paginationProps.pageSize,
|
|
pageSize: this.paginationProps.pageSize,
|
|
|
|
+ readFlag: this.queryParam.readFlag,
|
|
notice: {
|
|
notice: {
|
|
- title: this.queryParam.notice.title
|
|
|
|
|
|
+ title: this.queryParam.notice.title,
|
|
|
|
+ type: this.queryParam.notice.type
|
|
},
|
|
},
|
|
beginDate: this.queryParam.beginDate,
|
|
beginDate: this.queryParam.beginDate,
|
|
endDate: this.queryParam.endDate
|
|
endDate: this.queryParam.endDate
|
|
@@ -134,8 +206,12 @@ export default {
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
data.list[i].no = no + i + 1
|
|
data.list[i].no = no + i + 1
|
|
|
|
+ if (data.list[i].notice.extInfo) {
|
|
|
|
+ data.list[i].notice.extInfo = JSON.parse(data.list[i].notice.extInfo)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
this.loadData = data.list
|
|
this.loadData = data.list
|
|
|
|
+ console.log(this.loadData)
|
|
this.disabled = false
|
|
this.disabled = false
|
|
} else {
|
|
} else {
|
|
this.paginationProps.total = 0
|
|
this.paginationProps.total = 0
|
|
@@ -165,7 +241,9 @@ export default {
|
|
this.$refs.rangeDate.resetDate()
|
|
this.$refs.rangeDate.resetDate()
|
|
this.queryParam.beginDate = ''
|
|
this.queryParam.beginDate = ''
|
|
this.queryParam.endDate = ''
|
|
this.queryParam.endDate = ''
|
|
|
|
+ this.queryParam.readFlag = undefined
|
|
this.queryParam.notice.title = undefined
|
|
this.queryParam.notice.title = undefined
|
|
|
|
+ this.queryParam.notice.type = undefined
|
|
this.paginationProps.total = 0
|
|
this.paginationProps.total = 0
|
|
this.paginationProps.current = 1
|
|
this.paginationProps.current = 1
|
|
this.paginationProps.pageSize = 20
|
|
this.paginationProps.pageSize = 20
|
|
@@ -198,7 +276,7 @@ export default {
|
|
},
|
|
},
|
|
setTableH () {
|
|
setTableH () {
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
- this.tableHeight = window.innerHeight - tableSearchH - 210
|
|
|
|
|
|
+ this.tableHeight = window.innerHeight - tableSearchH - 240
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|