|
@@ -6,8 +6,8 @@
|
|
|
<a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="货架名称" prop="shelfSn">
|
|
|
- <shelfSList v-model="queryParam.shelfSn"></shelfSList>
|
|
|
+ <a-form-model-item label="货架名称" prop="providerSn">
|
|
|
+ <shelfSList v-model="queryParam.providerSn"></shelfSList>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -77,21 +77,21 @@
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
</div>
|
|
|
- <div class="table-operator">
|
|
|
+ <div class="table-operator" v-if="statisticsObj">
|
|
|
<a-alert type="info">
|
|
|
<div slot="message" class="total-bar">
|
|
|
<div>
|
|
|
- 货架数量:<strong>399</strong>;
|
|
|
- 铺货数量合计:<strong>399</strong>;
|
|
|
- 铺货金额合计:<strong>26545</strong>;
|
|
|
- 货架取货数量合计:<strong>399</strong>;
|
|
|
- 货架取货金额合计:<strong>26545</strong>;
|
|
|
+ 货架数量:<strong>{{ statisticsObj.shelfNum }}</strong>;
|
|
|
+ 铺货数量合计:<strong>{{ statisticsObj.totalShelfMaxQty }}</strong>;
|
|
|
+ 铺货金额合计:<strong>{{ statisticsObj.totalShelfMaxCost }}</strong>;
|
|
|
+ 货架取货数量合计:<strong>{{ statisticsObj.totalOrderQty }}</strong>;
|
|
|
+ 货架取货金额合计:<strong>{{ statisticsObj.totalOrderAmount }}</strong>;
|
|
|
</div>
|
|
|
<div>
|
|
|
- 急送数量合计:<strong>399</strong>;
|
|
|
- 急送金额合计:<strong>26545</strong>;
|
|
|
- 销售数量合计:<strong>399</strong>;
|
|
|
- 销售金额合计:<strong>26545</strong>;
|
|
|
+ 急送数量合计:<strong>{{ statisticsObj.tempOrderQty }}</strong>;
|
|
|
+ 急送金额合计:<strong>{{ statisticsObj.tempOrderAmount }}</strong>;
|
|
|
+ 销售数量合计:<strong>{{ statisticsObj.saleOrderQty }}</strong>;
|
|
|
+ 销售金额合计:<strong>{{ statisticsObj.saleOrderAmount }}</strong>;
|
|
|
</div>
|
|
|
</div>
|
|
|
</a-alert>
|
|
@@ -127,7 +127,7 @@ import { STable, VSelect } from '@/components'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import shelfSList from '@/views/common/shelfList'
|
|
|
import { toThousands } from '@/libs/tools.js'
|
|
|
-import { orderBillQueryPage } from '@/api/shelf'
|
|
|
+import { queryShelfOrderReportPage, queryShelfOrderTotalReport } from '@/api/shelf'
|
|
|
export default {
|
|
|
name: 'UserList',
|
|
|
components: { STable, VSelect, rangeDate, shelfSList },
|
|
@@ -140,49 +140,55 @@ export default {
|
|
|
orderTime: [],
|
|
|
// 查询参数
|
|
|
queryParam: {
|
|
|
- shelfName: '',
|
|
|
- state: undefined
|
|
|
+ providerSn: '',
|
|
|
+ beginDate: '',
|
|
|
+ endDate: '',
|
|
|
+ qhslMin: undefined,
|
|
|
+ qhslMax: undefined,
|
|
|
+ xsslMin: undefined,
|
|
|
+ xsslMax: undefined
|
|
|
},
|
|
|
showModal: false,
|
|
|
itemData: null, // 编辑行数据
|
|
|
openStatusModal: false, // 货架状态弹窗初始状态
|
|
|
+ statisticsObj: null,
|
|
|
// 表头
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
|
|
|
- { title: '货架名称', dataIndex: 'createDate', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '货架名称', dataIndex: 'shelfName', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{
|
|
|
slots: { title: 'customTitle' },
|
|
|
children: [
|
|
|
- { title: '铺货数量', dataIndex: 'bondAmount', width: '8%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true },
|
|
|
- { title: '铺货金额', dataIndex: 'bondAmount', width: '8%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true }
|
|
|
+ { title: '铺货数量', dataIndex: 'totalShelfMaxQty', width: '8%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true },
|
|
|
+ { title: '铺货金额', dataIndex: 'totalShelfMaxCost', width: '8%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true }
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
title: '货架订单',
|
|
|
children: [
|
|
|
- { title: '取货数量', dataIndex: 'bondAmount', width: '8%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true },
|
|
|
- { title: '取货金额', dataIndex: 'bondAmount', width: '8%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true }
|
|
|
+ { title: '取货数量', dataIndex: 'totalOrderQty', width: '8%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true },
|
|
|
+ { title: '取货金额', dataIndex: 'totalOrderAmount', width: '8%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true }
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
title: '急送订单',
|
|
|
children: [
|
|
|
- { title: '急送数量', dataIndex: 'bondAmount', width: '8%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true },
|
|
|
- { title: '急送金额', dataIndex: 'bondAmount', width: '8%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true }
|
|
|
+ { title: '急送数量', dataIndex: 'tempOrderQty', width: '8%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true },
|
|
|
+ { title: '急送金额', dataIndex: 'tempOrderAmount', width: '8%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true }
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
title: '销售单',
|
|
|
children: [
|
|
|
- { title: '销售数量', dataIndex: 'bondAmount', width: '8%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true },
|
|
|
- { title: '销售金额', dataIndex: 'bondAmount', width: '8%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true }
|
|
|
+ { title: '销售数量', dataIndex: 'saleOrderQty', width: '8%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true },
|
|
|
+ { title: '销售金额', dataIndex: 'saleOrderAmount', width: '8%', align: 'center', customRender: function (text) { return text && toThousands(text, 2) || '--' }, sorter: true }
|
|
|
]
|
|
|
}
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.spinning = true
|
|
|
- return orderBillQueryPage(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ return queryShelfOrderReportPage(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
@@ -192,6 +198,7 @@ export default {
|
|
|
_item.no = no + i + 1
|
|
|
}
|
|
|
}
|
|
|
+ this.getStatistics()
|
|
|
this.spinning = false
|
|
|
return data
|
|
|
})
|
|
@@ -202,29 +209,21 @@ export default {
|
|
|
handleBack () {
|
|
|
this.$router.go(-1)
|
|
|
},
|
|
|
- // 时间 change
|
|
|
- dateChange (date) {
|
|
|
- this.queryParam.beginDate = date[0]
|
|
|
- this.queryParam.endDate = date[1]
|
|
|
- },
|
|
|
- // 时间 change
|
|
|
+ // 下单时间 change
|
|
|
orderDateChange (date) {
|
|
|
this.queryParam.beginDate = date[0]
|
|
|
this.queryParam.endDate = date[1]
|
|
|
},
|
|
|
- // 经销商 change
|
|
|
- dealerChange (obj) {
|
|
|
- this.queryParam.dealerSn = obj.key || undefined
|
|
|
- },
|
|
|
- // 汽车修理厂 change
|
|
|
- storeChange (obj) {
|
|
|
- this.queryParam.storeSn = obj.key || undefined
|
|
|
- },
|
|
|
// 重置
|
|
|
reset () {
|
|
|
this.queryParam = {
|
|
|
- shelfName: '',
|
|
|
- state: undefined
|
|
|
+ providerSn: '',
|
|
|
+ beginDate: '',
|
|
|
+ endDate: '',
|
|
|
+ qhslMin: undefined,
|
|
|
+ qhslMax: undefined,
|
|
|
+ xsslMin: undefined,
|
|
|
+ xsslMax: undefined
|
|
|
}
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
@@ -237,6 +236,15 @@ export default {
|
|
|
setTableH () {
|
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
this.tableHeight = window.innerHeight - tableSearchH - 250
|
|
|
+ },
|
|
|
+ getStatistics () { // 统计
|
|
|
+ queryShelfOrderTotalReport({}).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.statisticsObj = res.data
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
watch: {
|