|
@@ -10,6 +10,11 @@
|
|
layout="inline"
|
|
layout="inline"
|
|
:model="queryParam">
|
|
:model="queryParam">
|
|
<a-row :gutter="15">
|
|
<a-row :gutter="15">
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-model-item label="下推时间">
|
|
|
|
+ <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ </a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-model-item label="地区">
|
|
<a-form-model-item label="地区">
|
|
<AreaList id="tireSalesDealerList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
|
|
<AreaList id="tireSalesDealerList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
|
|
@@ -20,21 +25,23 @@
|
|
<subarea id="tireSalesDealerList-subarea" ref="subarea" @change="subareaChange"></subarea>
|
|
<subarea id="tireSalesDealerList-subarea" ref="subarea" @change="subareaChange"></subarea>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
|
|
+ <template v-if="advanced">
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-model-item label="客户名称">
|
|
|
|
+ <a-input
|
|
|
|
+ id="tireSalesDealerList-dealerName"
|
|
|
|
+ v-model.trim="queryParam.dealerName"
|
|
|
|
+ allowClear
|
|
|
|
+ placeholder="请输入客户名称" />
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-model-item label="区域负责人">
|
|
|
|
+ <BizUser v-model="queryParam.bizUserSn"></BizUser>
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ </template>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
- <a-form-model-item label="客户名称">
|
|
|
|
- <a-input
|
|
|
|
- id="tireSalesDealerList-dealerName"
|
|
|
|
- v-model.trim="queryParam.dealerName"
|
|
|
|
- allowClear
|
|
|
|
- placeholder="请输入客户名称" />
|
|
|
|
- </a-form-model-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
- <a-form-model-item label="区域负责人">
|
|
|
|
- <BizUser v-model="queryParam.bizUserSn"></BizUser>
|
|
|
|
- </a-form-model-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :md="24" :sm="24" style="text-align:center;margin-bottom:10px;">
|
|
|
|
<a-button
|
|
<a-button
|
|
style="margin-left: 5px"
|
|
style="margin-left: 5px"
|
|
type="primary"
|
|
type="primary"
|
|
@@ -55,6 +62,10 @@
|
|
:loading="exportLoading"
|
|
:loading="exportLoading"
|
|
v-if="$hasPermissions('B_tireSalesDealerReportExport')"
|
|
v-if="$hasPermissions('B_tireSalesDealerReportExport')"
|
|
id="tireSalesDealerList-export">导出</a-button>
|
|
id="tireSalesDealerList-export">导出</a-button>
|
|
|
|
+ <a @click="advanced=!advanced" style="margin-left: 5px">
|
|
|
|
+ {{ advanced ? '收起' : '展开' }}
|
|
|
|
+ <a-icon :type="advanced ? 'up' : 'down'" />
|
|
|
|
+ </a>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
</a-form-model>
|
|
</a-form-model>
|
|
@@ -67,9 +78,9 @@
|
|
class="sTable fixPagination"
|
|
class="sTable fixPagination"
|
|
ref="table"
|
|
ref="table"
|
|
size="small"
|
|
size="small"
|
|
- :rowKey="(record) => record.dealerSn"
|
|
|
|
|
|
+ :rowKey="(record) => record.salesBillNo"
|
|
:style="{ height: tableHeight+70+'px' }"
|
|
:style="{ height: tableHeight+70+'px' }"
|
|
- rowKeyName="dealerSn"
|
|
|
|
|
|
+ rowKeyName="salesBillNo"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
:scroll="{ y: tableHeight-30 }"
|
|
:scroll="{ y: tableHeight-30 }"
|
|
@@ -94,6 +105,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
|
+import getDate from '@/libs/getDate.js'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import subarea from '@/views/common/subarea.js'
|
|
import subarea from '@/views/common/subarea.js'
|
|
@@ -108,8 +120,15 @@ export default {
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
|
|
+ advanced: true, // 高级搜索 展开/关闭
|
|
tableHeight: 0,
|
|
tableHeight: 0,
|
|
|
|
+ time: [
|
|
|
|
+ getDate.getThreeMonthDays().starttime,
|
|
|
|
+ getDate.getCurrMonthDays().endtime
|
|
|
|
+ ],
|
|
queryParam: { // 查询条件
|
|
queryParam: { // 查询条件
|
|
|
|
+ beginDate: getDate.getThreeMonthDays().starttime,
|
|
|
|
+ endDate: getDate.getCurrMonthDays().endtime,
|
|
provinceSn: undefined,
|
|
provinceSn: undefined,
|
|
citySn: undefined,
|
|
citySn: undefined,
|
|
districtSn: undefined,
|
|
districtSn: undefined,
|
|
@@ -149,7 +168,7 @@ export default {
|
|
{ title: '区域负责人', dataIndex: 'userNameQyfzrs', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '区域负责人', dataIndex: 'userNameQyfzrs', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '客户名称', dataIndex: 'dealerName', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '客户名称', dataIndex: 'dealerName', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '商户类型', dataIndex: 'dealerTypeDictValue', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '商户类型', dataIndex: 'dealerTypeDictValue', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '商户级别', dataIndex: 'dealerLevelDictValue', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '商户级别', dataIndex: 'dealerLevelDictValue ', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '采购数量', dataIndex: 'buyAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '采购数量', dataIndex: 'buyAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '库存数量', dataIndex: 'storeAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '库存数量', dataIndex: 'storeAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '售出数量', dataIndex: 'sellAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '售出数量', dataIndex: 'sellAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
@@ -157,6 +176,17 @@ export default {
|
|
]
|
|
]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ watch: {
|
|
|
|
+ advanced (newValue, oldValue) {
|
|
|
|
+ const _this = this
|
|
|
|
+ this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
|
+ _this.setTableH()
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ '$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
|
|
|
|
+ this.setTableH()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
// 统计
|
|
// 统计
|
|
getCount (params) {
|
|
getCount (params) {
|
|
@@ -174,12 +204,32 @@ export default {
|
|
this.queryParam.citySn = val[1] ? val[1] : ''
|
|
this.queryParam.citySn = val[1] ? val[1] : ''
|
|
this.queryParam.districtSn = val[2] ? val[2] : ''
|
|
this.queryParam.districtSn = val[2] ? val[2] : ''
|
|
},
|
|
},
|
|
|
|
+ // 下推时间 change
|
|
|
|
+ dateChange (date) {
|
|
|
|
+ if (date[0] && date[1]) {
|
|
|
|
+ this.time = date
|
|
|
|
+ } else {
|
|
|
|
+ this.time = []
|
|
|
|
+ }
|
|
|
|
+ this.queryParam.beginDate = date[0] || ''
|
|
|
|
+ this.queryParam.endDate = date[1] || ''
|
|
|
|
+ },
|
|
|
|
+ custChange (val) {
|
|
|
|
+ this.queryParam.dealerSn = val.key
|
|
|
|
+ },
|
|
subareaChange (val) {
|
|
subareaChange (val) {
|
|
this.queryParam.subareaSn = val[0] ? val[0] : undefined
|
|
this.queryParam.subareaSn = val[0] ? val[0] : undefined
|
|
this.queryParam.subareaAreaSn = val[1] ? val[1] : undefined
|
|
this.queryParam.subareaAreaSn = val[1] ? val[1] : undefined
|
|
},
|
|
},
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
|
|
+ this.time = [
|
|
|
|
+ getDate.getThreeMonthDays().starttime,
|
|
|
|
+ getDate.getCurrMonthDays().endtime
|
|
|
|
+ ]
|
|
|
|
+ this.$refs.rangeDate.resetDate(this.time)
|
|
|
|
+ this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
|
|
|
|
+ this.queryParam.endDate = getDate.getCurrMonthDays().endtime
|
|
this.queryParam.provinceSn = undefined
|
|
this.queryParam.provinceSn = undefined
|
|
this.queryParam.citySn = undefined
|
|
this.queryParam.citySn = undefined
|
|
this.queryParam.districtSn = undefined
|
|
this.queryParam.districtSn = undefined
|
|
@@ -188,9 +238,11 @@ export default {
|
|
this.queryParam.subareaAreaSn = undefined
|
|
this.queryParam.subareaAreaSn = undefined
|
|
this.queryParam.bizUserSn = undefined
|
|
this.queryParam.bizUserSn = undefined
|
|
this.totalData = null
|
|
this.totalData = null
|
|
- this.$refs.subarea.clearData()
|
|
|
|
- this.$refs.areaList.clearData()
|
|
|
|
- this.$refs.table.refresh()
|
|
|
|
|
|
+ if (this.advanced) {
|
|
|
|
+ this.$refs.subarea.clearData()
|
|
|
|
+ this.$refs.areaList.clearData()
|
|
|
|
+ }
|
|
|
|
+ this.$refs.table.clearTable()
|
|
},
|
|
},
|
|
// 导出
|
|
// 导出
|
|
handleExport () {
|
|
handleExport () {
|