|
@@ -10,6 +10,11 @@
|
|
|
layout="inline"
|
|
|
:model="queryParam">
|
|
|
<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-form-model-item label="地区">
|
|
|
<AreaList id="tireSalesDealerList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
|
|
@@ -20,21 +25,24 @@
|
|
|
<subarea id="tireSalesDealerList-subarea" ref="subarea" @change="subareaChange"></subarea>
|
|
|
</a-form-item>
|
|
|
</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="请输入客户名称" /> -->
|
|
|
+ <dealerSubareaScopeList ref="dealerSubareaScopeList" id="tireSalesDealerList-dealerName" @change="custChange" />
|
|
|
+ </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-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
|
|
|
style="margin-left: 5px"
|
|
|
type="primary"
|
|
@@ -55,6 +63,10 @@
|
|
|
:loading="exportLoading"
|
|
|
v-if="$hasPermissions('B_tireSalesDealerReportExport')"
|
|
|
id="tireSalesDealerList-export">导出</a-button>
|
|
|
+ <a @click="advanced=!advanced" style="margin-left: 5px">
|
|
|
+ {{ advanced ? '收起' : '展开' }}
|
|
|
+ <a-icon :type="advanced ? 'up' : 'down'" />
|
|
|
+ </a>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-form-model>
|
|
@@ -67,9 +79,9 @@
|
|
|
class="sTable fixPagination"
|
|
|
ref="table"
|
|
|
size="small"
|
|
|
- :rowKey="(record) => record.dealerSn"
|
|
|
+ :rowKey="(record) => record.salesBillNo"
|
|
|
:style="{ height: tableHeight+70+'px' }"
|
|
|
- rowKeyName="dealerSn"
|
|
|
+ rowKeyName="salesBillNo"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
:scroll="{ y: tableHeight-30 }"
|
|
@@ -94,6 +106,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
+import getDate from '@/libs/getDate.js'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import subarea from '@/views/common/subarea.js'
|
|
@@ -101,19 +114,28 @@ import AreaList from '@/views/common/areaList.js'
|
|
|
import BizUser from '@/views/common/bizUser.js'
|
|
|
import { hdExportExcel } from '@/libs/exportExcel'
|
|
|
import { querySaleDealercount, excelSaleOnlineExport, querybyDealerList } from '@/api/reportData'
|
|
|
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
|
export default {
|
|
|
name: 'TireSalesDealerList',
|
|
|
mixins: [commonMixin],
|
|
|
- components: { STable, VSelect, rangeDate, subarea, AreaList, BizUser },
|
|
|
+ components: { STable, VSelect, rangeDate, subarea, AreaList, BizUser, dealerSubareaScopeList },
|
|
|
data () {
|
|
|
return {
|
|
|
spinning: false,
|
|
|
+ advanced: true, // 高级搜索 展开/关闭
|
|
|
tableHeight: 0,
|
|
|
+ time: [
|
|
|
+ getDate.getThreeMonthDays().starttime,
|
|
|
+ getDate.getCurrMonthDays().endtime
|
|
|
+ ],
|
|
|
queryParam: { // 查询条件
|
|
|
+ beginDate: getDate.getThreeMonthDays().starttime,
|
|
|
+ endDate: getDate.getCurrMonthDays().endtime,
|
|
|
provinceSn: undefined,
|
|
|
citySn: undefined,
|
|
|
districtSn: undefined,
|
|
|
dealerName: '',
|
|
|
+ dealerSn: '',
|
|
|
subareaSn: undefined,
|
|
|
subareaAreaSn: undefined,
|
|
|
bizUserSn: undefined
|
|
@@ -157,7 +179,22 @@ export default {
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ advanced (newValue, oldValue) {
|
|
|
+ const _this = this
|
|
|
+ this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
+ _this.setTableH()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ '$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
|
|
|
+ this.setTableH()
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ custChange (val) {
|
|
|
+ this.queryParam.dealerName = val.name
|
|
|
+ this.queryParam.dealerSn = val.key
|
|
|
+ },
|
|
|
// 统计
|
|
|
getCount (params) {
|
|
|
querySaleDealercount(params).then(res => {
|
|
@@ -174,23 +211,44 @@ export default {
|
|
|
this.queryParam.citySn = val[1] ? val[1] : ''
|
|
|
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] || ''
|
|
|
+ },
|
|
|
subareaChange (val) {
|
|
|
this.queryParam.subareaSn = val[0] ? val[0] : undefined
|
|
|
this.queryParam.subareaAreaSn = val[1] ? val[1] : undefined
|
|
|
},
|
|
|
// 重置
|
|
|
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.citySn = undefined
|
|
|
this.queryParam.districtSn = undefined
|
|
|
this.queryParam.dealerName = ''
|
|
|
+ this.queryParam.dealerSn = ''
|
|
|
this.queryParam.subareaSn = undefined
|
|
|
this.queryParam.subareaAreaSn = undefined
|
|
|
this.queryParam.bizUserSn = undefined
|
|
|
this.totalData = null
|
|
|
- this.$refs.subarea.clearData()
|
|
|
this.$refs.areaList.clearData()
|
|
|
- this.$refs.table.refresh()
|
|
|
+ if (this.advanced) {
|
|
|
+ this.$refs.dealerSubareaScopeList.resetForm()
|
|
|
+ this.$refs.subarea.clearData()
|
|
|
+ }
|
|
|
+ this.$refs.table.clearTable()
|
|
|
},
|
|
|
// 导出
|
|
|
handleExport () {
|