|
@@ -6,21 +6,21 @@
|
|
|
<a-col :span="6">
|
|
|
<a-form-item label="下单时间" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
|
|
|
<a-range-picker
|
|
|
- id="shopOrder-time"
|
|
|
- v-model="time"
|
|
|
- :format="dateFormat"
|
|
|
- :placeholder="['开始时间','结束时间']"
|
|
|
+ style="width:100%"
|
|
|
+ id="PaySettlementRecords-queryOrderDate"
|
|
|
:disabledDate="disabledDate"
|
|
|
- @change="onChange" />
|
|
|
+ v-model="queryOrderDate"
|
|
|
+ format="YYYY-MM-DD"
|
|
|
+ :placeholder="['开始时间', '结束时间']" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="6">
|
|
|
<a-form-item label="类型" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
|
|
|
<v-select
|
|
|
- v-model="queryParam.orderStatus"
|
|
|
- ref="orderStatus"
|
|
|
+ v-model="queryParam.changeType"
|
|
|
+ ref="changeType"
|
|
|
id="shopOrder-status"
|
|
|
- code="SETTLE_STATUS_ALL"
|
|
|
+ code="GOLD_CHANGE_TYPE"
|
|
|
placeholder="请选择订单状态"
|
|
|
allowClear></v-select>
|
|
|
</a-form-item>
|
|
@@ -28,11 +28,11 @@
|
|
|
<a-col :span="6">
|
|
|
<a-form-item label="原因" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
|
|
|
<v-select
|
|
|
- v-model="queryParam.orderStatus"
|
|
|
- ref="orderStatus"
|
|
|
+ v-model="queryParam.operateType"
|
|
|
+ ref="operateType"
|
|
|
id="shopOrder-status"
|
|
|
- code="SETTLE_STATUS_ALL"
|
|
|
- placeholder="请选择订单状态"
|
|
|
+ code="GOLD_OPERATE_TYPE"
|
|
|
+ placeholder="请选择"
|
|
|
allowClear></v-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
@@ -50,6 +50,10 @@
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
bordered>
|
|
|
+ <!-- 类型 -->
|
|
|
+ <span slot="changeType" slot-scope="text, record">{{ $refs.changeType.getNameByCode(record.changeType) }}</span>
|
|
|
+ <!-- 原因 -->
|
|
|
+ <span slot="operateType" slot-scope="text, record">{{ $refs.operateType.getNameByCode(record.operateType) }}</span>
|
|
|
</s-table>
|
|
|
</a-card>
|
|
|
|
|
@@ -57,7 +61,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
-import getDate from '@/libs/getDate.js'
|
|
|
+import { customerGoldLogDetail } from '@/api/userInfo.js'
|
|
|
import moment from 'moment'
|
|
|
export default {
|
|
|
name: 'ShopOrder',
|
|
@@ -68,6 +72,7 @@ export default {
|
|
|
labelCol: { span: 7 },
|
|
|
wrapperCol: { span: 17 }
|
|
|
},
|
|
|
+ queryOrderDate: undefined,
|
|
|
// 查询参数
|
|
|
queryParam: {
|
|
|
beginDate: null, // 开始时间
|
|
@@ -80,43 +85,46 @@ export default {
|
|
|
// 表头
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
|
- { title: '下单时间', dataIndex: 'orderDate', width: 200, align: 'center' },
|
|
|
- { title: '类型', dataIndex: 'userMoblie', width: 200, align: 'center' },
|
|
|
- { title: '原因', dataIndex: 'orderNo', width: 200, align: 'center' },
|
|
|
- { title: '乐豆变动', scopedSlots: { customRender: 'orderStatus' }, width: 200, align: 'center' },
|
|
|
- { title: '详情', scopedSlots: { customRender: 'orderPrice' }, width: 200, align: 'center' }
|
|
|
+ { title: '下单时间', dataIndex: 'createDate', width: 200, align: 'center' },
|
|
|
+ { title: '类型', dataIndex: 'changeType', scopedSlots: { customRender: 'changeType' }, width: 200, align: 'center' },
|
|
|
+ { title: '原因', dataIndex: 'operateType', scopedSlots: { customRender: 'operateType' }, width: 200, align: 'center' },
|
|
|
+ { title: '乐豆变动', dataIndex: 'changeNum', width: 200, align: 'center' },
|
|
|
+ { title: '详情', dataIndex: 'remarks', width: 200, align: 'center' }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
- // return getTenantsList(Object.assign(parameter, this.queryParam)).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++) {
|
|
|
- // const _item = res.data.list[i]
|
|
|
- // _item.no = no + i + 1
|
|
|
- // _item.status = _item.status + '' === '1'
|
|
|
- // }
|
|
|
- // return res.data
|
|
|
- // }
|
|
|
- // })
|
|
|
- return new Promise((resolve) => {
|
|
|
- const data = [
|
|
|
- { no: 1, orderDate: '2020-10-30 09:14', userMoblie: '15709252525', orderNo: 'NO54456798', orderStatus: '1', orderPrice: '155' },
|
|
|
- { no: 2, orderDate: '2020-10-30 09:14', userMoblie: '15709252525', orderNo: 'NO54456798', orderStatus: '0', orderPrice: '155' },
|
|
|
- { no: 3, orderDate: '2020-10-30 09:14', userMoblie: '15709252525', orderNo: 'NO54456798', orderStatus: '1', orderPrice: '155' },
|
|
|
- { no: 4, orderDate: '2020-10-30 09:14', userMoblie: '15709252525', orderNo: 'NO54456798', orderStatus: '1', orderPrice: '155' },
|
|
|
- { no: 5, orderDate: '2020-10-30 09:14', userMoblie: '15709252525', orderNo: 'NO54456798', orderStatus: '0', orderPrice: '155' },
|
|
|
- { no: 6, orderDate: '2020-10-30 09:14', userMoblie: '15709252525', orderNo: 'NO54456798', orderStatus: '0', orderPrice: '155' }
|
|
|
- ]
|
|
|
- resolve(data)
|
|
|
- })
|
|
|
- },
|
|
|
+ return customerGoldLogDetail({ CUSTOMER_NO: 'zq001', pageNo: '1', pageSize: '10' }).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++) {
|
|
|
+ const _item = res.data.list[i]
|
|
|
+ _item.no = no + i + 1
|
|
|
+ _item.status = _item.status + '' === '1'
|
|
|
+ }
|
|
|
+ return res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // const searchData = Object.assign(parameter, this.queryParam)
|
|
|
+ // if (this.queryOrderDate && this.queryOrderDate.length) {
|
|
|
+ // searchData.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
|
|
|
+ // searchData.endDate = moment(this.queryOrderDate[1]).format('YYYY-MM-DD')
|
|
|
+ // } else {
|
|
|
+ // searchData.beginDate = ''
|
|
|
+ // searchData.endDate = ''
|
|
|
+ // }
|
|
|
+ // return getTenantsList(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++) {
|
|
|
+ // const _item = res.data.list[i]
|
|
|
+ // _item.no = no + i + 1
|
|
|
+ // _item.status = _item.status + '' === '1'
|
|
|
+ // }
|
|
|
+ // return res.data
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ }
|
|
|
// 将默认当天时间日期回显在时间选择框中
|
|
|
- time: [
|
|
|
- moment(getDate.getToday().starttime, this.dateFormat),
|
|
|
- moment(getDate.getToday().endtime, this.dateFormat)
|
|
|
- ],
|
|
|
- dateFormat: 'YYYY-MM-DD'
|
|
|
}
|
|
|
},
|
|
|
beforeRouteEnter (to, from, next) {
|
|
@@ -143,12 +151,7 @@ export default {
|
|
|
},
|
|
|
// 重置
|
|
|
handleReset () {
|
|
|
- this.queryParam.beginDate = getDate.getToday().starttime
|
|
|
- this.queryParam.endDate = getDate.getToday().endtime
|
|
|
- this.time = [
|
|
|
- moment(getDate.getToday().starttime, this.dateFormat),
|
|
|
- moment(getDate.getToday().endtime, this.dateFormat)
|
|
|
- ]
|
|
|
+ this.queryOrderDate = undefined
|
|
|
this.queryParam.contactPhone = ''
|
|
|
this.queryParam.orderNo = ''
|
|
|
this.queryParam.orderStatus = null
|