|
@@ -25,10 +25,21 @@
|
|
|
<subarea id="tireSalesDealerList-subarea" ref="subarea" @change="subareaChange"></subarea>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="客户名称">
|
|
|
+ <dealerSubareaScopeList ref="dealerSubareaScopeList" id="tireSalesDealerList-dealerName" @change="custChange" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
<template v-if="advanced">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="客户名称">
|
|
|
- <dealerSubareaScopeList ref="dealerSubareaScopeList" id="tireSalesDealerList-dealerName" @change="custChange" />
|
|
|
+ <a-form-model-item label="客户级别">
|
|
|
+ <v-select
|
|
|
+ v-model="queryParam.dealerLevel"
|
|
|
+ ref="dealerLevel"
|
|
|
+ id="tireSalesDealerList-dealerLevel"
|
|
|
+ code="DEALER_LEVEL"
|
|
|
+ placeholder="请选择客户级别"
|
|
|
+ allowClear></v-select>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -38,7 +49,7 @@
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-model-item label="产品编码/原厂编码">
|
|
|
- <a-input id="tireSalesDealerList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码/原厂编码"/>
|
|
|
+ <a-input id="tireSalesDealerList-productWord" v-model.trim="queryParam.productWord" allowClear placeholder="请输入产品编码/原厂编码"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -47,7 +58,7 @@
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
</template>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
+ <a-col :md="24" :sm="24" style="text-align:center;margin-bottom:10px;">
|
|
|
<a-button
|
|
|
style="margin-left: 5px"
|
|
|
type="primary"
|
|
@@ -59,7 +70,6 @@
|
|
|
@click="resetSearchForm"
|
|
|
:disabled="disabled"
|
|
|
id="tireSalesDealerList-reset">重置</a-button>
|
|
|
- <!-- v-if="$hasPermissions('B_tireSalesReportExport')" -->
|
|
|
<a-button
|
|
|
style="margin-left: 10px"
|
|
|
type="primary"
|
|
@@ -67,7 +77,7 @@
|
|
|
@click="handleExport"
|
|
|
:disabled="disabled"
|
|
|
:loading="exportLoading"
|
|
|
-
|
|
|
+ v-if="$hasPermissions('B_tireSalesReportExport')"
|
|
|
id="tireSalesDealerList-export">导出</a-button>
|
|
|
<a @click="advanced=!advanced" style="margin-left: 5px">
|
|
|
{{ advanced ? '收起' : '展开' }}
|
|
@@ -99,8 +109,8 @@
|
|
|
<template slot="footer">
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="4" :sm="24">订货数量:{{ (totalData && (totalData.totalbuyAmount || totalData.totalbuyAmount==0)) ? totalData.totalbuyAmount : '--' }}</a-col>
|
|
|
- <a-col :md="4" :sm="24">订货金额:{{ (totalData && (totalData.totalstoreAmount || totalData.totalstoreAmount==0)) ? toThousands(totalData.totalstoreAmount): '--' }}</a-col>
|
|
|
- <a-col :md="4" :sm="24">库存数量:{{ (totalData && (totalData.totalsellAmount || totalData.totalsellAmount==0)) ?totalData.totalsellAmount: '--' }}</a-col>
|
|
|
+ <a-col :md="4" :sm="24" v-if="$hasPermissions('M_tireSalesReportList_salesPrice')">订货金额:{{ (totalData && (totalData.totalbuyPriceAmount || totalData.totalbuyPriceAmount==0)) ? toThousands(totalData.totalbuyPriceAmount): '--' }}</a-col>
|
|
|
+ <a-col :md="4" :sm="24">客户现有库存数量:{{ (totalData && (totalData.totalstoreAmount || totalData.totalstoreAmount==0)) ?totalData.totalstoreAmount: '--' }}</a-col>
|
|
|
<a-col :md="4" :sm="24">已绑质保单数量:{{ (totalData && (totalData.totalwarrantyAmount || totalData.totalwarrantyAmount==0)) ?totalData.totalwarrantyAmount: '--' }}</a-col>
|
|
|
</a-row>
|
|
|
</template>
|
|
@@ -122,14 +132,13 @@ import AreaList from '@/views/common/areaList.js'
|
|
|
import BizUser from '@/views/common/bizUser.js'
|
|
|
import reportModal from '@/views/common/reportModal.vue'
|
|
|
import { hdExportExcel } from '@/libs/exportExcel'
|
|
|
-import { queryTireList, queryTireCount, celTireOnlineExport } from '@/api/reportData'
|
|
|
+import { queryTireList, queryTireCount, excelTireOnlineExport } from '@/api/reportData'
|
|
|
import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
|
export default {
|
|
|
name: 'TireSalesDealerList',
|
|
|
mixins: [commonMixin],
|
|
|
components: { STable, VSelect, rangeDate, subarea, AreaList, BizUser, dealerSubareaScopeList, reportModal },
|
|
|
data () {
|
|
|
- const _this = this
|
|
|
return {
|
|
|
spinning: false,
|
|
|
advanced: true, // 高级搜索 展开/关闭
|
|
@@ -149,8 +158,9 @@ export default {
|
|
|
subareaSn: undefined,
|
|
|
subareaAreaSn: undefined,
|
|
|
bizUserSn: undefined,
|
|
|
- queryWord: '', // 产品编码
|
|
|
- productName: ''// 产品名称
|
|
|
+ productWord: '', // 产品编码/原厂编码
|
|
|
+ productName: '', // 产品名称
|
|
|
+ dealerLevel: undefined
|
|
|
},
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
exportLoading: false,
|
|
@@ -175,24 +185,7 @@ export default {
|
|
|
return data
|
|
|
})
|
|
|
},
|
|
|
- totalData: null,
|
|
|
- columns: [
|
|
|
- { 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 || '--' } },
|
|
|
- { title: '分区', dataIndex: 'subareaAreaName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '区域负责人', dataIndex: 'userNameQyfzrs', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '客户名称', dataIndex: 'dealerName', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '商户类型', dataIndex: 'dealerTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '商户级别', dataIndex: 'dealerLevelDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品编码', dataIndex: 'productcode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '原厂编码', dataIndex: 'storeAmount', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品名称', dataIndex: 'productname', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '订货数量', dataIndex: 'storeAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '订货金额', dataIndex: 'storeAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
- { title: '客户现有库存数量', dataIndex: 'sellAmount', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '已绑质保单数量', dataIndex: 'warrantyAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
- ]
|
|
|
+ totalData: null
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -206,6 +199,30 @@ export default {
|
|
|
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 || '--' } },
|
|
|
+ { title: '分区', dataIndex: 'subareaAreaName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '区域负责人', dataIndex: 'userNameQyfzrs', width: '7%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '客户名称', dataIndex: 'dealerName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '客户级别', dataIndex: 'dealerLevelDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { 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: <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 : '--') } }
|
|
|
+ ]
|
|
|
+ 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: {
|
|
|
custChange (val) {
|
|
|
this.queryParam.dealerName = val.name
|
|
@@ -258,8 +275,9 @@ export default {
|
|
|
this.queryParam.subareaSn = undefined
|
|
|
this.queryParam.subareaAreaSn = undefined
|
|
|
this.queryParam.bizUserSn = undefined
|
|
|
- this.queryParam.queryWord = undefined
|
|
|
+ this.queryParam.productWord = undefined
|
|
|
this.queryParam.productName = undefined
|
|
|
+ this.queryParam.dealerLevel = undefined
|
|
|
this.totalData = null
|
|
|
this.$refs.areaList.clearData()
|
|
|
if (this.advanced) {
|
|
@@ -275,10 +293,11 @@ export default {
|
|
|
_this.exportLoading = true
|
|
|
_this.spinning = true
|
|
|
_this.showExport = true
|
|
|
- hdExportExcel(celTireOnlineExport, params, '轮胎统计报表', function () {
|
|
|
+ _this.$store.state.app.curActionPermission = 'B_tireSalesReportExport'
|
|
|
+ hdExportExcel(excelTireOnlineExport, params, '轮胎统计报表', function () {
|
|
|
_this.exportLoading = false
|
|
|
- _this.showExport = false
|
|
|
_this.spinning = false
|
|
|
+ _this.$store.state.app.curActionPermission = ''
|
|
|
})
|
|
|
},
|
|
|
pageInit () {
|
|
@@ -290,7 +309,7 @@ export default {
|
|
|
},
|
|
|
setTableH () {
|
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
- this.tableHeight = window.innerHeight - tableSearchH - 245
|
|
|
+ this.tableHeight = window.innerHeight - tableSearchH - 198
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
@@ -308,4 +327,4 @@ export default {
|
|
|
next(vm => {})
|
|
|
}
|
|
|
}
|
|
|
-</script>
|
|
|
+</script>
|