|
@@ -14,7 +14,7 @@
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="5" :sm="24">
|
|
|
<a-form-item label="货架创建时间">
|
|
|
- <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
|
|
|
+ <rangeDate ref="rangeDate" v-model="time" @change="dateChange" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="5" :sm="24">
|
|
@@ -29,13 +29,13 @@
|
|
|
</a-col>
|
|
|
<a-col :md="4" :sm="24">
|
|
|
<a-form-item label="所在地">
|
|
|
- <areaList level="2" placeholder="请选择所在地"></areaList>
|
|
|
+ <areaList level="2" placeholder="请选择所在地" v-model="areaArr" @change="areaChange"></areaList>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<template v-if="advanced">
|
|
|
<a-col :md="4" :sm="24">
|
|
|
<a-form-item label="货架状态">
|
|
|
- <v-select id="userd-state" code="SHELF_STATE" v-model="queryParam.state" allowClear placeholder="请选择状态"></v-select>
|
|
|
+ <v-select id="userd-state" code="SHELF_STATE" v-model="queryParam.shelfState" allowClear placeholder="请选择状态"></v-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="5" :sm="24">
|
|
@@ -56,13 +56,13 @@
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
</div>
|
|
|
- <div class="table-operator">
|
|
|
+ <div class="table-operator" v-if="countData">
|
|
|
<a-alert type="info">
|
|
|
<div slot="message" class="total-bar">
|
|
|
<div>
|
|
|
- 门店数量:<strong>399</strong>;
|
|
|
- 铺货数量合计:<strong>399</strong>;
|
|
|
- 铺货金额合计:<strong>26545</strong>;
|
|
|
+ 门店数量:<strong>{{ countData.shelfNum||0 }}</strong>;
|
|
|
+ 铺货数量合计:<strong>{{ countData.totalShelfMaxQty||0 }}</strong>;
|
|
|
+ 铺货金额合计:<strong>{{ countData.totalShelfMaxCost||0 }}</strong>;
|
|
|
</div>
|
|
|
</div>
|
|
|
</a-alert>
|
|
@@ -72,12 +72,14 @@
|
|
|
ref="table"
|
|
|
:style="{ height: tableHeight+84.5+'px', wordBreak: 'break-all' }"
|
|
|
size="small"
|
|
|
- rowKey="id"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
:scroll="{ y: tableHeight }"
|
|
|
:defaultLoadData="false"
|
|
|
bordered>
|
|
|
+ <div slot="area" slot-scope="text, record">
|
|
|
+ {{ record.dealerProvinceName }} {{ record.dealerCityName }}
|
|
|
+ </div>
|
|
|
<span slot="customTitle">
|
|
|
<a-popover>
|
|
|
<template slot="content">
|
|
@@ -96,7 +98,7 @@
|
|
|
<script>
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
-import { bondRecordByPage } from '@/api/boundRecord.js'
|
|
|
+import { useUserQueryPage, useUserStatistics } from '@/api/report.js'
|
|
|
import areaList from '@/views/common/areaList.js'
|
|
|
import dealerList from '@/views/common/dealerList.vue'
|
|
|
import storeList from '@/views/common/storeList.vue'
|
|
@@ -109,32 +111,42 @@ export default {
|
|
|
spinning: false,
|
|
|
advanced: false,
|
|
|
tableHeight: 0,
|
|
|
+ areaArr: [],
|
|
|
time: [],
|
|
|
orderTime: [],
|
|
|
// 查询参数
|
|
|
queryParam: {
|
|
|
- shelfName: '',
|
|
|
- state: undefined
|
|
|
+ shelfCreateBeginDate: '',
|
|
|
+ shelfCreateEndDate: '',
|
|
|
+ lastOrderBeginDate: '',
|
|
|
+ lastOrderEndDate: '',
|
|
|
+ storeSn: undefined,
|
|
|
+ dealerSn: undefined,
|
|
|
+ shelfState: undefined,
|
|
|
+ dealerProvinceSn: undefined,
|
|
|
+ dealerCitySn: undefined
|
|
|
},
|
|
|
showModal: false,
|
|
|
itemData: null, // 编辑行数据
|
|
|
+ countData: null,
|
|
|
openStatusModal: false, // 货架状态弹窗初始状态
|
|
|
// 表头
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
|
- { title: '货架创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '货架创建时间', dataIndex: 'shelfCreateDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '汽车修理厂', dataIndex: 'storeName', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '配件经销商', dataIndex: 'dealerName', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
- { title: '所在地', dataIndex: 'createDate2', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '货架状态', dataIndex: 'stateDictValue', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '铺货数量', dataIndex: 'bondAmount', width: '11%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true },
|
|
|
- { title: '铺货金额', dataIndex: 'bondAmount', width: '11%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true },
|
|
|
- { slots: { title: 'customTitle' }, dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
+ { title: '所在地', scopedSlots: { customRender: 'area' }, width: '11%', align: 'center' },
|
|
|
+ { title: '货架状态', dataIndex: 'shelfStateDictValue', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '铺货数量', dataIndex: 'totalShelfMaxQty', width: '11%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' } },
|
|
|
+ { title: '铺货金额', dataIndex: 'totalShelfMaxCost', width: '11%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' } },
|
|
|
+ { slots: { title: 'customTitle' }, dataIndex: 'lastOrderDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.spinning = true
|
|
|
- return bondRecordByPage(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ const params = Object.assign(parameter, this.queryParam)
|
|
|
+ return useUserQueryPage(params).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
@@ -144,6 +156,7 @@ export default {
|
|
|
_item.no = no + i + 1
|
|
|
}
|
|
|
}
|
|
|
+ this.getCount(params)
|
|
|
this.spinning = false
|
|
|
return data
|
|
|
})
|
|
@@ -154,15 +167,25 @@ export default {
|
|
|
handleBack () {
|
|
|
this.$router.go(-1)
|
|
|
},
|
|
|
+ getCount (params) {
|
|
|
+ useUserStatistics(params).then(res => {
|
|
|
+ this.countData = res.data || null
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 地区
|
|
|
+ areaChange (val, opts) {
|
|
|
+ this.queryParam.dealerProvinceSn = val && val[0] ? val[0] : ''
|
|
|
+ this.queryParam.dealerCitySn = val && val[1] ? val[1] : ''
|
|
|
+ },
|
|
|
// 时间 change
|
|
|
dateChange (date) {
|
|
|
- this.queryParam.beginDate = date[0]
|
|
|
- this.queryParam.endDate = date[1]
|
|
|
+ this.queryParam.shelfCreateBeginDate = date[0]
|
|
|
+ this.queryParam.shelfCreateEndDate = date[1]
|
|
|
},
|
|
|
// 时间 change
|
|
|
orderDateChange (date) {
|
|
|
- this.queryParam.beginDate = date[0]
|
|
|
- this.queryParam.endDate = date[1]
|
|
|
+ this.queryParam.lastOrderBeginDate = date[0]
|
|
|
+ this.queryParam.lastOrderEndDate = date[1]
|
|
|
},
|
|
|
// 经销商 change
|
|
|
dealerChange (obj) {
|
|
@@ -175,8 +198,15 @@ export default {
|
|
|
// 重置
|
|
|
reset () {
|
|
|
this.queryParam = {
|
|
|
- shelfName: '',
|
|
|
- state: undefined
|
|
|
+ shelfCreateBeginDate: '',
|
|
|
+ shelfCreateEndDate: '',
|
|
|
+ lastOrderBeginDate: '',
|
|
|
+ lastOrderEndDate: '',
|
|
|
+ storeSn: undefined,
|
|
|
+ dealerSn: undefined,
|
|
|
+ shelfState: undefined,
|
|
|
+ dealerProvinceSn: undefined,
|
|
|
+ dealerCitySn: undefined
|
|
|
}
|
|
|
this.$refs.dealerList.resetForm()
|
|
|
this.$refs.storeList.resetForm()
|