|
@@ -69,7 +69,7 @@
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
- :scroll="{ x: 1810, y: tableHeight }"
|
|
|
+ :scroll="{ x: 1520, y: tableHeight }"
|
|
|
:defaultLoadData="false"
|
|
|
bordered>
|
|
|
<!-- 产品分类 -->
|
|
@@ -140,80 +140,87 @@ export default {
|
|
|
moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
|
|
|
], // 变更时间
|
|
|
exportLoading: false, // 导出loading
|
|
|
- columns: [
|
|
|
- { title: '序号', dataIndex: 'no', width: 70, align: 'center', fixed: 'left' },
|
|
|
- { title: '变更时间', dataIndex: 'updateDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品编码', dataIndex: 'productEntity.code', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '品牌', dataIndex: 'productEntity.productBrandName', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 140, align: 'center' },
|
|
|
- { title: '单位', dataIndex: 'productEntity.unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- {
|
|
|
+ // 加载数据方法 必须为 Promise 对象
|
|
|
+ loadData: parameter => {
|
|
|
+ this.disabled = true
|
|
|
+ this.spinning = true
|
|
|
+ return productPriceChangeList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ const 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
|
|
|
+ }
|
|
|
+ this.total = data.count || 0
|
|
|
+ this.disabled = false
|
|
|
+ this.spinning = false
|
|
|
+ return data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ total: 0,
|
|
|
+ productBrandList: [], // 品牌下拉数据
|
|
|
+ productTypeList: [] // 分类下拉数据
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ columns () {
|
|
|
+ const arr = [
|
|
|
+ { title: '序号', dataIndex: 'no', width: 50, align: 'center', fixed: 'left' },
|
|
|
+ { title: '变更时间', dataIndex: 'updateDate', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品名称', dataIndex: 'productEntity.name', align: 'left', ellipsis: true, customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品编码', dataIndex: 'productEntity.code', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '品牌', dataIndex: 'productEntity.productBrandName', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 120, align: 'center' },
|
|
|
+ { title: '单位', dataIndex: 'productEntity.unit', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '变更原因', dataIndex: 'changeReason', width: 70, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
|
|
|
+ ]
|
|
|
+ if (this.$hasPermissions('B_isShowPrice')) { // 售价权限
|
|
|
+ arr.splice(7, 0, {
|
|
|
title: '省级价',
|
|
|
dataIndex: 'sdtermindfaldsdPrice',
|
|
|
align: 'center',
|
|
|
children: [
|
|
|
- { title: '变更前', dataIndex: 'beforeProvincePrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '变更后', scopedSlots: { customRender: 'afterProvincePrice' }, width: 80, align: 'center' }
|
|
|
+ { title: '变更前', dataIndex: 'beforeProvincePrice', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '变更后', scopedSlots: { customRender: 'afterProvincePrice' }, width: 70, align: 'center' }
|
|
|
]
|
|
|
- },
|
|
|
- {
|
|
|
+ })
|
|
|
+ arr.splice(8, 0, {
|
|
|
title: '市级价',
|
|
|
dataIndex: 'sdterminaldsdPrice',
|
|
|
align: 'center',
|
|
|
children: [
|
|
|
- { title: '变更前', dataIndex: 'beforeCityPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '变更后', scopedSlots: { customRender: 'afterCityPrice' }, width: 80, align: 'center' }
|
|
|
+ { title: '变更前', dataIndex: 'beforeCityPrice', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '变更后', scopedSlots: { customRender: 'afterCityPrice' }, width: 70, align: 'center' }
|
|
|
]
|
|
|
- },
|
|
|
- {
|
|
|
+ })
|
|
|
+ arr.splice(9, 0, {
|
|
|
title: '特约价',
|
|
|
dataIndex: 'gterminaldsdPrice',
|
|
|
align: 'center',
|
|
|
children: [
|
|
|
- { title: '变更前', dataIndex: 'beforeSpecialPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '变更后', scopedSlots: { customRender: 'afterSpecialPrice' }, width: 80, align: 'center' }
|
|
|
+ { title: '变更前', dataIndex: 'beforeSpecialPrice', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '变更后', scopedSlots: { customRender: 'afterSpecialPrice' }, width: 70, align: 'center' }
|
|
|
]
|
|
|
- },
|
|
|
- {
|
|
|
+ })
|
|
|
+ arr.splice(10, 0, {
|
|
|
title: '终端价',
|
|
|
dataIndex: 'hterminaldsdPrice',
|
|
|
align: 'center',
|
|
|
children: [
|
|
|
- { title: '变更前', dataIndex: 'beforeTerminalPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '变更后', scopedSlots: { customRender: 'afterTerminalPrice' }, width: 80, align: 'center' }
|
|
|
+ { title: '变更前', dataIndex: 'beforeTerminalPrice', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '变更后', scopedSlots: { customRender: 'afterTerminalPrice' }, width: 70, align: 'center' }
|
|
|
]
|
|
|
- },
|
|
|
- {
|
|
|
+ })
|
|
|
+ arr.splice(11, 0, {
|
|
|
title: '车主价',
|
|
|
dataIndex: 'sterminaldsdPrice',
|
|
|
align: 'center',
|
|
|
children: [
|
|
|
- { title: '变更前', dataIndex: 'beforeCarOwnersPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '变更后', scopedSlots: { customRender: 'afterCarOwnersPrice' }, width: 80, align: 'center' }
|
|
|
+ { title: '变更前', dataIndex: 'beforeCarOwnersPrice', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '变更后', scopedSlots: { customRender: 'afterCarOwnersPrice' }, width: 70, align: 'center' }
|
|
|
]
|
|
|
- },
|
|
|
- { title: '变更原因', dataIndex: 'changeReason', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
|
|
|
- ],
|
|
|
- // 加载数据方法 必须为 Promise 对象
|
|
|
- loadData: parameter => {
|
|
|
- this.disabled = true
|
|
|
- this.spinning = true
|
|
|
- return productPriceChangeList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
- const 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
|
|
|
- }
|
|
|
- this.total = data.count || 0
|
|
|
- this.disabled = false
|
|
|
- this.spinning = false
|
|
|
- return data
|
|
|
})
|
|
|
- },
|
|
|
- total: 0,
|
|
|
- productBrandList: [], // 品牌下拉数据
|
|
|
- productTypeList: [] // 分类下拉数据
|
|
|
+ }
|
|
|
+ return arr
|
|
|
}
|
|
|
},
|
|
|
methods: {
|