|
@@ -23,17 +23,17 @@
|
|
|
</a-col>
|
|
|
<a-col :xs="24" :sm="12" :md="6">
|
|
|
<a-form-model-item label="单号" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
|
|
|
- <a-input allowClear v-model.trim="queryParam.queryWord" placeholder="请输入单号" @pressEnter="$refs.table.refresh(true)"/>
|
|
|
+ <a-input allowClear v-model.trim="queryParam.OrderReserveDTO.orderReserveNo" placeholder="请输入单号" @pressEnter="$refs.table.refresh(true)"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :xs="24" :sm="12" :md="6" >
|
|
|
- <a-form-model-item label="用户信息" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
|
|
|
- <a-input allowClear v-model.trim="queryParam.queryWord" placeholder="请输入名称或电话" @pressEnter="$refs.table.refresh(true)"/>
|
|
|
+ <a-form-model-item label="联系人信息" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
|
|
|
+ <a-input allowClear v-model.trim="queryParam.OrderReserveDTO.UserphoneOrName" placeholder="请输入名称或电话" @pressEnter="$refs.table.refresh(true)"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :xs="24" :sm="12" :md="6" >
|
|
|
<a-form-model-item label="骑手信息" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
|
|
|
- <a-input allowClear v-model.trim="queryParam.queryWord" placeholder="请输入名称或电话" @pressEnter="$refs.table.refresh(true)"/>
|
|
|
+ <a-input allowClear v-model.trim="queryParam.OrderReserveDTO.phoneOrName" placeholder="请输入名称或电话" @pressEnter="$refs.table.refresh(true)"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
@@ -41,7 +41,7 @@
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :xs="24" :sm="12" :md="6" >
|
|
|
<a-form-model-item label="状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
|
|
|
- <v-select code="ENABLE_FLAG" v-model="queryParam.loginFlag" allowClear placeholder="请选择状态" id="userList-check-enable-state"></v-select>
|
|
|
+ <v-select code="ORDER_RESERVE_STATUS" v-model="queryParam.OrderReserveDTO.orderStatus" allowClear placeholder="请选择状态" id="userList-check-enable-state"></v-select>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :xs="24" :sm="12" :md="6" >
|
|
@@ -63,9 +63,16 @@
|
|
|
:data="loadData"
|
|
|
bordered
|
|
|
>
|
|
|
- <template slot="stationName" slot-scope="text,record">
|
|
|
- <div>{{ stationName }}</div>
|
|
|
- <div>{{ stationName }}</div>
|
|
|
+ <template slot="contact" slot-scope="text,record">
|
|
|
+ <div>{{ record.contactName }}</div>
|
|
|
+ <div>{{ record.contactMobile }}</div>
|
|
|
+ <div v-if="!record.contactName && !record.contactMobile">--</div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template slot="rider" slot-scope="text,record">
|
|
|
+ <div>{{ record.name }}</div>
|
|
|
+ <div>{{ record.phone }}</div>
|
|
|
+ <div v-if="!record.name && !record.phone">--</div>
|
|
|
</template>
|
|
|
<!-- 查看详情 -->
|
|
|
<template slot="detail" slot-scope="text, record">
|
|
@@ -84,7 +91,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
-import { cleanRecordList, getCleanStationTotal } from '@/api/cleanManage.js'
|
|
|
+import { getOrderList, getOrderTotal } from '@/api/recoveryManage.js'
|
|
|
import moment from 'moment'
|
|
|
import riderOrderModal from './riderOrderModal.vue'
|
|
|
export default {
|
|
@@ -101,9 +108,12 @@ export default {
|
|
|
},
|
|
|
// 查询参数
|
|
|
queryParam: {
|
|
|
- beginDate: null, // 开始时间
|
|
|
- endDate: null, // 结束时间
|
|
|
- queryWord: '' // 骑手信息
|
|
|
+ OrderReserveDTO: {
|
|
|
+ orderReserveNo: '', // 骑手信息
|
|
|
+ orderStatus: '', // 骑手信息
|
|
|
+ phoneOrName: '', // 骑手信息
|
|
|
+ UserphoneOrName: ''
|
|
|
+ }
|
|
|
},
|
|
|
totalNum: 0, // 总条数
|
|
|
weightTotal: 0, // 回收物总计
|
|
@@ -114,25 +124,26 @@ export default {
|
|
|
time: [],
|
|
|
dateFormat: 'YYYY-MM-DD',
|
|
|
columns: [{ title: '序号', dataIndex: 'no', width: 60, align: 'center' },
|
|
|
- { title: '下单时间', dataIndex: '', width: 200, align: 'center', customRender: (text) => { return text || '--' } },
|
|
|
- { title: '单号', dataIndex: '', width: 200, align: 'center', customRender: (text) => { return text || '--' } },
|
|
|
- { title: '用户信息', dataIndex: '', width: 200, align: 'center', customRender: (text) => { return text || '--' } },
|
|
|
- { title: '骑手信息', dataIndex: 'stationName', width: 200, align: 'center', customRender: (text) => { return text || '--' } },
|
|
|
- { title: '回收重量(kg)', dataIndex: 'cleanTimes', width: 150, align: 'center', sorter: true },
|
|
|
- { title: '交易金额(元)', dataIndex: 'cleanWeight', width: 150, align: 'center', sorter: true, customRender: (text) => { return text || 0 } },
|
|
|
- { title: '状态', dataIndex: '', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
|
|
|
+ { title: '下单时间', dataIndex: 'createDate', width: 200, align: 'center', customRender: (text) => { return text || '--' } },
|
|
|
+ { title: '单号', dataIndex: 'orderReserveNo', width: 200, align: 'center', customRender: (text) => { return text || '--' } },
|
|
|
+ { title: '下单账号', dataIndex: 'mobile', width: 200, align: 'center', customRender: (text) => { return text || '--' } },
|
|
|
+ { title: '联系人信息', dataIndex: 'contact', width: 180, align: 'center', scopedSlots: { customRender: 'contact' } },
|
|
|
+ { title: '骑手信息', dataIndex: 'rider', width: 200, align: 'center', scopedSlots: { customRender: 'rider' } },
|
|
|
+ { title: '回收重量(kg)', dataIndex: 'totalWeight', width: 150, align: 'center', customRender: (text) => { return (text / 1000).toFixed(3) / 1 || 0 } },
|
|
|
+ { title: '交易金额(元)', dataIndex: 'originalAmount', width: 150, align: 'center', customRender: (text) => { return text || 0 } },
|
|
|
+ { title: '状态', dataIndex: 'orderStatus', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
|
|
|
{ title: '详情', width: 80, align: 'center', scopedSlots: { customRender: 'detail' } }],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
const searchData = Object.assign(parameter, this.queryParam)
|
|
|
if (this.time && this.time.length) {
|
|
|
- searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
|
|
|
- searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
|
|
|
+ searchData.OrderReserveDTO.beginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
|
|
|
+ searchData.OrderReserveDTO.endDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
|
|
|
} else {
|
|
|
- searchData.beginDate = null
|
|
|
- searchData.endDate = null
|
|
|
+ searchData.OrderReserveDTO.beginDate = null
|
|
|
+ searchData.OrderReserveDTO.endDate = null
|
|
|
}
|
|
|
- return cleanRecordList(searchData).then(res => {
|
|
|
+ return getOrderList(searchData).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
const no = (res.data.pageNo - 1) * res.data.pageSize
|
|
|
for (let i = 0; i < res.data.list.length; i++) {
|
|
@@ -142,18 +153,13 @@ export default {
|
|
|
_item.cleanWeight = (_item.cleanWeight / 1000).toFixed(3) / 1
|
|
|
}
|
|
|
}
|
|
|
- this.totalNum = res.data.count
|
|
|
+ this.getTotal()
|
|
|
return res.data
|
|
|
- } else {
|
|
|
- this.totalNum = 0
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- mounted () {
|
|
|
- this.getTotal()
|
|
|
- },
|
|
|
methods: {
|
|
|
// 不可选日期
|
|
|
disabledDate (date, dateStrings) {
|
|
@@ -162,8 +168,8 @@ export default {
|
|
|
// 创建时间change
|
|
|
onChange (dates, dateStrings) {
|
|
|
if ((dates, dateStrings)) {
|
|
|
- this.queryParam.beginDate = dateStrings[0]
|
|
|
- this.queryParam.endDate = dateStrings[1]
|
|
|
+ this.queryParam.OrderReserveDTO.beginDate = dateStrings[0]
|
|
|
+ this.queryParam.OrderReserveDTO.endDate = dateStrings[1]
|
|
|
}
|
|
|
},
|
|
|
filterOption (input, option) {
|
|
@@ -175,19 +181,19 @@ export default {
|
|
|
getTotal () {
|
|
|
const params = this.queryParam
|
|
|
if (this.time && this.time.length) {
|
|
|
- params.beginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
|
|
|
- params.endDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
|
|
|
+ params.OrderReserveDTO.beginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
|
|
|
+ params.OrderReserveDTO.endDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
|
|
|
} else {
|
|
|
- params.beginDate = null
|
|
|
- params.endDate = null
|
|
|
+ params.OrderReserveDTO.beginDate = null
|
|
|
+ params.OrderReserveDTO.endDate = null
|
|
|
}
|
|
|
- getCleanStationTotal(params).then(res => {
|
|
|
+ getOrderTotal(params).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
- if (res.data != 0 || null) {
|
|
|
- this.weightTotal = (res.data.cleanWeight / 1000).toFixed(3) / 1
|
|
|
+ if (res.data) {
|
|
|
+ this.totalNum = res.data.orderCount || 0 // 总条数
|
|
|
+ this.weightTotal = (res.data.totalWeight / 1000).toFixed(3) / 1 // 回收物总计
|
|
|
+ this.moneyTotal = res.data.originalAmount || 0 // 金额总计
|
|
|
}
|
|
|
- } else {
|
|
|
- this.weightTotal = 0
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -204,9 +210,14 @@ export default {
|
|
|
// 重置
|
|
|
reset () {
|
|
|
this.queryParam = {
|
|
|
- queryWord: '',
|
|
|
- beginDate: null,
|
|
|
- endDate: null
|
|
|
+ OrderReserveDTO: {
|
|
|
+ beginDate: null, // 开始时间
|
|
|
+ endDate: null, // 结束时间
|
|
|
+ orderReserveNo: '', // 骑手信息
|
|
|
+ orderStatus: '', // 骑手信息
|
|
|
+ phoneOrName: '', // 骑手信息
|
|
|
+ UserphoneOrName: ''
|
|
|
+ }
|
|
|
}
|
|
|
this.time = []
|
|
|
this.refreshSearch()
|