|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<a-card :bordered="false" class="shopOrder-table-page-search-wrapper">
|
|
<a-card :bordered="false" class="shopOrder-table-page-search-wrapper">
|
|
<div class="shopOrder-searchForm">
|
|
<div class="shopOrder-searchForm">
|
|
- <a-form layout="inline" v-bind="formItemLayout" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
|
|
|
+ <a-form layout="inline" v-bind="formItemLayout" @keyup.enter.native="refresh">
|
|
<a-row :gutter="48">
|
|
<a-row :gutter="48">
|
|
<a-col :span="6">
|
|
<a-col :span="6">
|
|
<a-form-item label="用户手机" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
|
|
<a-form-item label="用户手机" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
|
|
@@ -11,32 +11,23 @@
|
|
<a-col :span="6">
|
|
<a-col :span="6">
|
|
<a-form-item label="乐豆余额" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
|
|
<a-form-item label="乐豆余额" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
|
|
<div class="input-number">
|
|
<div class="input-number">
|
|
- <a-input-number
|
|
|
|
- id="releaseRecordList-inputNumber"
|
|
|
|
- v-model="queryParam.value1"
|
|
|
|
- :min="1"
|
|
|
|
- @change="onChange" />-<a-input-number
|
|
|
|
- id="inputNumber"
|
|
|
|
- v-model="queryParam.value2"
|
|
|
|
- :min="1"
|
|
|
|
- @change="onChange"
|
|
|
|
- />
|
|
|
|
|
|
+ <a-input-number id="releaseRecordList-inputNumber" v-model="queryParam.currentGoldMin" :min="1" @change="onChange" />-
|
|
|
|
+ <a-input-number id="inputNumber" v-model="queryParam.currentGoldMax" :min="1" @change="onChange" />
|
|
</div>
|
|
</div>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :span="6">
|
|
<a-col :span="6">
|
|
<a-form-item label="账户状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
|
|
<a-form-item label="账户状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
|
|
<v-select
|
|
<v-select
|
|
- v-model="queryParam.orderStatus"
|
|
|
|
- ref="orderStatus"
|
|
|
|
- id="releaseRecordList-status"
|
|
|
|
- code="SETTLE_STATUS_ALL"
|
|
|
|
|
|
+ v-model="queryParam.state"
|
|
|
|
+ id="releaseRecordList-state"
|
|
|
|
+ code="ENABLE_FLAG"
|
|
placeholder="请选择订单状态"
|
|
placeholder="请选择订单状态"
|
|
allowClear></v-select>
|
|
allowClear></v-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :span="6">
|
|
<a-col :span="6">
|
|
- <a-button class="handle-btn serach-btn" id="releaseRecordList-btn-serach" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
|
|
|
|
|
|
+ <a-button class="handle-btn serach-btn" id="releaseRecordList-btn-serach" type="primary" @click="refresh">查询</a-button>
|
|
<a-button class="handle-btn" type="" id="releaseRecordList-btn-reset" @click="handleReset">重置</a-button>
|
|
<a-button class="handle-btn" type="" id="releaseRecordList-btn-reset" @click="handleReset">重置</a-button>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
@@ -73,74 +64,124 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { STable, VSelect } from '@/components'
|
|
|
|
-import { customerList, changeStatus, customeExport } from '@/api/userInfo.js'
|
|
|
|
|
|
+import {
|
|
|
|
+ STable,
|
|
|
|
+ VSelect
|
|
|
|
+} from '@/components'
|
|
|
|
+import {
|
|
|
|
+ customerList,
|
|
|
|
+ changeStatus,
|
|
|
|
+ customeExport
|
|
|
|
+} from '@/api/userInfo.js'
|
|
export default {
|
|
export default {
|
|
name: 'UserManageList',
|
|
name: 'UserManageList',
|
|
- components: { STable, VSelect },
|
|
|
|
|
|
+ components: {
|
|
|
|
+ STable,
|
|
|
|
+ VSelect
|
|
|
|
+ },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
formItemLayout: {
|
|
formItemLayout: {
|
|
- labelCol: { span: 7 },
|
|
|
|
- wrapperCol: { span: 17 }
|
|
|
|
|
|
+ labelCol: {
|
|
|
|
+ span: 7
|
|
|
|
+ },
|
|
|
|
+ wrapperCol: {
|
|
|
|
+ span: 17
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 查询参数
|
|
// 查询参数
|
|
queryParam: {
|
|
queryParam: {
|
|
mobile: '', // 用户手机
|
|
mobile: '', // 用户手机
|
|
- orderStatus: null, // 订单状态
|
|
|
|
- value1: '',
|
|
|
|
- value2: ''
|
|
|
|
|
|
+ state: '', // 账户状态
|
|
|
|
+ currentGoldMin: '', // 乐豆余额最小值
|
|
|
|
+ currentGoldMax: '' // 乐豆余额最大值
|
|
},
|
|
},
|
|
loading: false, // 导出loading
|
|
loading: false, // 导出loading
|
|
// 表头
|
|
// 表头
|
|
- columns: [
|
|
|
|
- { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
|
|
- { title: '用户手机', dataIndex: 'mobile', width: 100, align: 'center' },
|
|
|
|
- { title: '乐豆余额', dataIndex: 'currentGold', width: 100, align: 'center' },
|
|
|
|
- { title: '累计乐豆', dataIndex: 'totalCarbon', width: 100, align: 'center' },
|
|
|
|
- { title: '注册时间', dataIndex: 'registerTime', width: 200, align: 'center' },
|
|
|
|
- { title: '最后登录时间', dataIndex: 'lastLoginTime', width: 200, align: 'center' },
|
|
|
|
- { title: '最后投递时间', dataIndex: 'lastDeliveryTime', width: 200, align: 'center' },
|
|
|
|
- { title: '状态', width: 100, dataIndex: 'state', align: 'center', scopedSlots: { customRender: 'state' } },
|
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center' }
|
|
|
|
|
|
+ columns: [{
|
|
|
|
+ title: '序号',
|
|
|
|
+ dataIndex: 'no',
|
|
|
|
+ width: 80,
|
|
|
|
+ align: 'center'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '用户手机',
|
|
|
|
+ dataIndex: 'mobile',
|
|
|
|
+ width: 100,
|
|
|
|
+ align: 'center'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '乐豆余额',
|
|
|
|
+ dataIndex: 'currentGold',
|
|
|
|
+ width: 100,
|
|
|
|
+ align: 'center'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '累计乐豆',
|
|
|
|
+ dataIndex: 'totalCarbon',
|
|
|
|
+ width: 100,
|
|
|
|
+ align: 'center'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '注册时间',
|
|
|
|
+ dataIndex: 'registerTime',
|
|
|
|
+ width: 200,
|
|
|
|
+ align: 'center'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '最后登录时间',
|
|
|
|
+ dataIndex: 'lastLoginTime',
|
|
|
|
+ width: 200,
|
|
|
|
+ align: 'center'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '最后投递时间',
|
|
|
|
+ dataIndex: 'lastDeliveryTime',
|
|
|
|
+ width: 200,
|
|
|
|
+ align: 'center'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '状态',
|
|
|
|
+ width: 100,
|
|
|
|
+ dataIndex: 'state',
|
|
|
|
+ align: 'center',
|
|
|
|
+ scopedSlots: {
|
|
|
|
+ customRender: 'state'
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '操作',
|
|
|
|
+ scopedSlots: {
|
|
|
|
+ customRender: 'action'
|
|
|
|
+ },
|
|
|
|
+ width: 100,
|
|
|
|
+ align: 'center'
|
|
|
|
+ }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
- // if ((this.queryParam.value1 && this.queryParam.value2) && (this.queryParam.value1 >= this.queryParam.value2)) {
|
|
|
|
- // this.$message.error('请输入正确的查询范围!')
|
|
|
|
- // return
|
|
|
|
- // } else if (!this.queryParam.value1 || !this.queryParam.value2) {
|
|
|
|
- // this.$message.error('请输入正确的查询范围!')
|
|
|
|
- // return
|
|
|
|
- // }
|
|
|
|
- // if (this.queryParam.value1 && this.queryParam.value2) {
|
|
|
|
- // if (this.queryParam.value1 >= this.queryParam.value2) {
|
|
|
|
- // this.$message.error('请输入正确的查询范围!')
|
|
|
|
- // }
|
|
|
|
- // return
|
|
|
|
- // }
|
|
|
|
- // return customerList(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 customerList({ 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
|
|
|
|
- }
|
|
|
|
|
|
+ return customerList(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 customerList({ 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
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -150,46 +191,58 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- // 查询条件change
|
|
|
|
- onChange () {},
|
|
|
|
|
|
+ // 查询条件change
|
|
|
|
+ onChange () {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ refresh () {
|
|
|
|
+ if ((this.queryParam.currentGoldMin && this.queryParam.currentGoldMax) && (this.queryParam.currentGoldMin >= this.queryParam
|
|
|
|
+ .currentGoldMax)) {
|
|
|
|
+ this.$message.error('请输入正确的查询范围!')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!this.queryParam.currentGoldMin || !this.queryParam.currentGoldMax) {
|
|
|
|
+ this.$message.error('请输入正确的查询范围!')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.$refs.table.refresh()
|
|
|
|
+ },
|
|
// 查看用户详情
|
|
// 查看用户详情
|
|
handleUser (row) {
|
|
handleUser (row) {
|
|
- this.$router.push({ path: `/userInfo/userManageList_user/detail/${row.id}` })
|
|
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: `/userInfo/userManageList_user/detail/${row.id}`
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 查看乐豆详情
|
|
// 查看乐豆详情
|
|
handleLd (row) {
|
|
handleLd (row) {
|
|
- this.$router.push({ path: `/userInfo/userManageList_Ld/detail/${row.customerNo}` })
|
|
|
|
|
|
+ this.$router.push({
|
|
|
|
+ path: `/userInfo/userManageList_Ld/detail/${row.customerNo}`
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 启用禁用
|
|
// 启用禁用
|
|
// 更改启用禁用状态
|
|
// 更改启用禁用状态
|
|
changeFlagHandle (text, record) {
|
|
changeFlagHandle (text, record) {
|
|
- console.log(text)
|
|
|
|
- const _this = this
|
|
|
|
- const _data = {
|
|
|
|
- id: record.id,
|
|
|
|
- state: record.state == 1 ? '0' : '1'
|
|
|
|
- }
|
|
|
|
- changeStatus(_data).then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- _this.$message.success(res.message)
|
|
|
|
- _this.$refs.table.refresh()
|
|
|
|
- } else {
|
|
|
|
- record.state = !record.state
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ console.log(text)
|
|
|
|
+ const _this = this
|
|
|
|
+ const _data = {
|
|
|
|
+ id: record.id,
|
|
|
|
+ state: record.state == 1 ? '0' : '1'
|
|
|
|
+ }
|
|
|
|
+ changeStatus(_data).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ _this.$message.success(res.message)
|
|
|
|
+ _this.$refs.table.refresh()
|
|
|
|
+ } else {
|
|
|
|
+ record.state = !record.state
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 重置
|
|
// 重置
|
|
handleReset () {
|
|
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.queryParam.contactPhone = ''
|
|
this.queryParam.contactPhone = ''
|
|
- this.queryParam.value1 = ''
|
|
|
|
- this.queryParam.value2 = ''
|
|
|
|
- this.queryParam.orderStatus = null
|
|
|
|
|
|
+ this.queryParam.currentGoldMin = ''
|
|
|
|
+ this.queryParam.currentGoldMax = ''
|
|
|
|
+ this.queryParam.state = ''
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
// 导出
|
|
// 导出
|
|
@@ -199,14 +252,16 @@ export default {
|
|
orderNo: this.queryParam.orderNo,
|
|
orderNo: this.queryParam.orderNo,
|
|
orderStatus: this.queryParam.orderStatus
|
|
orderStatus: this.queryParam.orderStatus
|
|
}
|
|
}
|
|
- this.loading = true
|
|
|
|
|
|
+ this.loading = true
|
|
customeExport(params).then(res => {
|
|
customeExport(params).then(res => {
|
|
this.loading = false
|
|
this.loading = false
|
|
this.download(res)
|
|
this.download(res)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
download (data) {
|
|
download (data) {
|
|
- if (!data) { return }
|
|
|
|
|
|
+ if (!data) {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
const url = window.URL.createObjectURL(new Blob([data]))
|
|
const url = window.URL.createObjectURL(new Blob([data]))
|
|
const link = document.createElement('a')
|
|
const link = document.createElement('a')
|
|
link.style.display = 'none'
|
|
link.style.display = 'none'
|
|
@@ -221,43 +276,53 @@ export default {
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
- .shopOrder-table-page-search-wrapper{
|
|
|
|
- .shopOrder-searchForm{
|
|
|
|
- .ant-form-inline .ant-form-item{
|
|
|
|
- width: 100%;
|
|
|
|
- }
|
|
|
|
- // 搜索框的下间距
|
|
|
|
- .ant-form-item {
|
|
|
|
- margin-bottom: 10px;
|
|
|
|
- }
|
|
|
|
- .input-number{
|
|
|
|
- display: flex;
|
|
|
|
- margin-top:3px;
|
|
|
|
- }
|
|
|
|
- .handle-btn{
|
|
|
|
- margin-top: 4px;
|
|
|
|
- }
|
|
|
|
- .serach-btn{
|
|
|
|
- margin-right: 10px;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- .export-btn{
|
|
|
|
- background-color: #ff9900;
|
|
|
|
- border-color: #ff9900;
|
|
|
|
- color: #fff;
|
|
|
|
- }
|
|
|
|
- .export-btn.ant-btn:focus:not(.ant-btn-primary):not(.ant-btn-danger), .export-btn.ant-btn:hover:not(.ant-btn-primary):not(.ant-btn-danger){
|
|
|
|
- color: #fff;
|
|
|
|
- border-color: #ff9900;
|
|
|
|
- }
|
|
|
|
- .blue {
|
|
|
|
- color: #1890FF;
|
|
|
|
- }
|
|
|
|
- .green {
|
|
|
|
- color: #16b50e;
|
|
|
|
- }
|
|
|
|
- .red {
|
|
|
|
- color: red;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ .shopOrder-table-page-search-wrapper {
|
|
|
|
+ .shopOrder-searchForm {
|
|
|
|
+ .ant-form-inline .ant-form-item {
|
|
|
|
+ width: 100%;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 搜索框的下间距
|
|
|
|
+ .ant-form-item {
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .input-number {
|
|
|
|
+ display: flex;
|
|
|
|
+ margin-top: 3px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .handle-btn {
|
|
|
|
+ margin-top: 4px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .serach-btn {
|
|
|
|
+ margin-right: 10px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .export-btn {
|
|
|
|
+ background-color: #ff9900;
|
|
|
|
+ border-color: #ff9900;
|
|
|
|
+ color: #fff;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .export-btn.ant-btn:focus:not(.ant-btn-primary):not(.ant-btn-danger),
|
|
|
|
+ .export-btn.ant-btn:hover:not(.ant-btn-primary):not(.ant-btn-danger) {
|
|
|
|
+ color: #fff;
|
|
|
|
+ border-color: #ff9900;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .blue {
|
|
|
|
+ color: #1890FF;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .green {
|
|
|
|
+ color: #16b50e;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .red {
|
|
|
|
+ color: red;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|