Commit 61f0c127 authored by hanfeng's avatar hanfeng

修改用户管理

parent d692df95
...@@ -26,18 +26,35 @@ ...@@ -26,18 +26,35 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="8">
<el-form-item label="注册时间" prop="bookDateRange"> <!-- <el-form-item label="注册时间" prop="bookDateRange">-->
<!-- <el-date-picker-->
<!-- v-model="listQuery.registrationDate "-->
<!-- type="daterange"-->
<!-- :editable="true"-->
<!-- format="yyyy-MM-dd"-->
<!-- placeholder="请选择注册时间范围">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<el-form-item label="导入时间">
<el-date-picker
v-model="listQuery.registrationTimeBegin"
type="date"
:editable="true"
format="yyyy-MM-dd"
placeholder="选择日期"
></el-date-picker>~
<el-date-picker <el-date-picker
v-model="listQuery.registrationDate " v-model="listQuery.registrationTimeEnd"
type="daterange" type="date"
:editable="true" :editable="true"
format="yyyy-MM-dd" format="yyyy-MM-dd"
placeholder="请选择注册时间范围"> placeholder="选择日期"
</el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="4">
<el-form-item label="用户来源"> <el-form-item label="用户来源">
<el-select class="filter-item" v-model="listQuery.source" placeholder="请选用户来源"> <el-select class="filter-item" v-model="listQuery.source" placeholder="请选用户来源">
<el-option :key="undefined" label="无" :value="undefined"></el-option> <el-option :key="undefined" label="无" :value="undefined"></el-option>
...@@ -301,7 +318,7 @@ ...@@ -301,7 +318,7 @@
<!-- 设置会员信息窗口--> <!-- 设置会员信息窗口-->
<el-dialog title="设置会员信息" :visible.sync="setMemberArea" class="member"> <el-dialog title="设置会员信息" @change="change" :visible.sync="setMemberArea" class="member">
<el-form :model="userMembershipInformation" ref="userMembership" label-width="100px"> <el-form :model="userMembershipInformation" ref="userMembership" label-width="100px">
<el-row> <el-row>
<el-col :span="16"> <el-col :span="16">
...@@ -627,7 +644,7 @@ ...@@ -627,7 +644,7 @@
channel: undefined, channel: undefined,
registrationTimeEnd: undefined, registrationTimeEnd: undefined,
registrationTimeBegin: undefined, registrationTimeBegin: undefined,
registrationDate: undefined
}, },
source: { source: {
...@@ -688,8 +705,8 @@ ...@@ -688,8 +705,8 @@
}, },
watch: { watch: {
'userMembershipInformation.memberLevel'(newValue, oldValue) { 'userMembershipInformation.memberLevel'(newValue, oldValue) {
console.log('userMembershipInformation.memberLevel='+newValue) console.log('userMembershipInformation.memberLevel=' + newValue)
} }
}, },
methods: { methods: {
...@@ -775,7 +792,14 @@ ...@@ -775,7 +792,14 @@
let query = JSON.parse(JSON.stringify(this.listQuery)) let query = JSON.parse(JSON.stringify(this.listQuery))
query.source = query.source ? query.source - 1 : '' query.source = query.source ? query.source - 1 : ''
JSON.stringify(query) console.log('handleFilterStatus:this.listQuery=' + JSON.stringify(this.listQuery))
query.registrationTimeBegin =this.listQuery.registrationTimeBegin
?(new Date(query.registrationTimeBegin).getTime()) / 1000:undefined
query.registrationTimeEnd = this.listQuery.registrationTimeEnd
? (new Date( query.registrationTimeEnd).getTime()) / 1000:undefined
console.log('handleFilterEnd:this.listQuery=' + JSON.stringify(this.listQuery))
console.log('query================' + JSON.stringify(query))
appPage(query) appPage(query)
.then(response => { .then(response => {
for (let listKey of response.data.list) { for (let listKey of response.data.list) {
...@@ -794,7 +818,7 @@ ...@@ -794,7 +818,7 @@
listKey.timeOfMembership = listKey.timeOfMembership ? timestamp2Date(listKey.timeOfMembership) : ''; listKey.timeOfMembership = listKey.timeOfMembership ? timestamp2Date(listKey.timeOfMembership) : '';
listKey.recentRecharge = listKey.recentRecharge ? timestamp2Date(listKey.recentRecharge) : ''; listKey.recentRecharge = listKey.recentRecharge ? timestamp2Date(listKey.recentRecharge) : '';
listKey.lastTime = listKey.lastTime ? timestamp2Date(listKey.lastTime) : ''; listKey.lastTime = listKey.lastTime ? timestamp2Date(listKey.lastTime) : '';
listKey.createTime = listKey.createTime ? timestamp2Date(listKey.createTime) : ''; listKey.createTime = listKey.createTime ? timestamp2Date(listKey.createTime*1000) : '';
listKey.buyCount = listKey.buyCount ? listKey.buyCount : 0; listKey.buyCount = listKey.buyCount ? listKey.buyCount : 0;
listKey.channel = this.terminal[listKey.channel]; listKey.channel = this.terminal[listKey.channel];
listKey.source = this.source[listKey.source]; listKey.source = this.source[listKey.source];
...@@ -805,9 +829,6 @@ ...@@ -805,9 +829,6 @@
*查询 *查询
*/ */
handleFilter() { handleFilter() {
this.listQuery.registrationTimeBegin = this.listQuery.registrationDate ? (new Date(this.listQuery.registrationDate[0]).getTime()) / 1000 : null
this.listQuery.registrationTimeEnd = this.listQuery.registrationDate ? (new Date(this.listQuery.registrationDate[1]).getTime()) / 1000 : null
this.getList(); this.getList();
} }
, ,
...@@ -854,8 +875,10 @@ ...@@ -854,8 +875,10 @@
this.validityType = '无' this.validityType = '无'
} }
this.userMembershipInformation = response.data this.userMembershipInformation = response.data
// this.userMembershipInformation.memberLevel= this.userMembershipInformation.memberLevel?this.userMembershipInformation.memberLevel:undefined
this.validTime = response.data.validTime this.validTime = response.data.validTime
console.log(this.userMembershipInformation) console.log('this.userMembershipInformation:'+JSON.stringify(this.userMembershipInformation))
this.setMemberArea = true this.setMemberArea = true
}) })
this.userMembershipInformation.userId = this.saveUserId this.userMembershipInformation.userId = this.saveUserId
...@@ -1073,24 +1096,23 @@ ...@@ -1073,24 +1096,23 @@
}, },
setDate() { setDate() {
if (!this.validTime) { if (!this.validTime) {
let date = new Date();//时间戳为10位需*1000,时间戳为13位的话不需乘1000 let date = new Date();
this.validTime = formatDate(date, 'yyyy-MM-dd hh:mm:ss'); this.validTime = formatDate(date, 'yyyy-MM-dd hh:mm:ss');
} }
}, },
cleaningQuery() { cleaningQuery() {
this.listQuery = { this.listQuery.page = 1
page: 1, this.listQuery.limit = 20
limit: 20, this.listQuery.mobileList = undefined
mobileList: undefined, this.listQuery.mobile = undefined
mobile: undefined, this.listQuery.memberLevel = undefined
memberLevel: undefined, this.listQuery.source = undefined
source: undefined, this.listQuery.channel = undefined
channel: undefined, this.listQuery.registrationTimeEnd = undefined
registrationTimeEnd: undefined, this.listQuery.registrationTimeBegin = undefined
registrationTimeBegin: undefined, },
registrationDate: undefined change() {
} this.$forceUpdate()
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment