|
@@ -139,7 +139,6 @@ export default {
|
|
|
mixins: [commonMixin],
|
|
|
components: { STable, VSelect, rangeDate, subarea, AreaList, BizUser, dealerSubareaScopeList, reportModal },
|
|
|
data () {
|
|
|
- const _this = this
|
|
|
return {
|
|
|
spinning: false,
|
|
|
advanced: true, // 高级搜索 展开/关闭
|
|
@@ -186,8 +185,24 @@ export default {
|
|
|
return data
|
|
|
})
|
|
|
},
|
|
|
- totalData: null,
|
|
|
- columns: [
|
|
|
+ totalData: null
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ advanced (newValue, oldValue) {
|
|
|
+ const _this = this
|
|
|
+ this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
+ _this.setTableH()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ '$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
|
|
|
+ this.setTableH()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ columns () {
|
|
|
+ const _this = this
|
|
|
+ const arr = [
|
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
|
{ title: '地区', scopedSlots: { customRender: 'addressInfo' }, width: '12%', align: 'center' },
|
|
|
{ title: '区域', dataIndex: 'subareaName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
@@ -199,21 +214,13 @@ export default {
|
|
|
{ title: '原厂编码', dataIndex: 'productOrgiCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '产品名称', dataIndex: 'productName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '订货数量', dataIndex: 'buyAmount', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '订货金额', dataIndex: 'buyPriceAmount', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
{ title: <div>客户现有<div>库存数量</div></div>, dataIndex: 'storeAmount', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: <div>已绑质保单<div>数量</div></div>, dataIndex: 'warrantyAmount', width: '80px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
]
|
|
|
- }
|
|
|
- },
|
|
|
- watch: {
|
|
|
- advanced (newValue, oldValue) {
|
|
|
- const _this = this
|
|
|
- this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
- _this.setTableH()
|
|
|
- })
|
|
|
- },
|
|
|
- '$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
|
|
|
- this.setTableH()
|
|
|
+ if (this.$hasPermissions('M_tireSalesReportList_salesPrice')) {
|
|
|
+ arr.splice(11, 0, { title: '订货金额', dataIndex: 'buyPriceAmount', width: '80px', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
|
|
|
+ }
|
|
|
+ return arr
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -286,9 +293,11 @@ export default {
|
|
|
_this.exportLoading = true
|
|
|
_this.spinning = true
|
|
|
_this.showExport = true
|
|
|
+ _this.$store.state.app.curActionPermission = 'B_tireSalesReportExport_salesPrice'
|
|
|
hdExportExcel(excelTireOnlineExport, params, '轮胎统计报表', function () {
|
|
|
_this.exportLoading = false
|
|
|
_this.spinning = false
|
|
|
+ _this.$store.state.app.curActionPermission = ''
|
|
|
})
|
|
|
},
|
|
|
pageInit () {
|