Commit de2339a5 authored by guoyou's avatar guoyou

钱包

parent 329709ea
...@@ -71,3 +71,21 @@ export function editObj(obj) { ...@@ -71,3 +71,21 @@ export function editObj(obj) {
params: obj params: obj
}); });
} }
// 禁止||允许提现
export function forbidden(query) {
return fetch({
url: '/api/admin/wallet/admin/forbidden',
method: 'put',
params: query
});
}
// 佣金记录
export function recordList(params) {
return fetch({
url: 'api/admin/sellingwater/admin/page',
method: 'post',
data: params
});
}
...@@ -489,6 +489,12 @@ export const asyncRouterMap = [{ ...@@ -489,6 +489,12 @@ export const asyncRouterMap = [{
component: _import('purseManage/discountRecord'), component: _import('purseManage/discountRecord'),
name: '提现记录', name: '提现记录',
authority: 'discountRecord' authority: 'discountRecord'
},
{
path: 'commissionRecord',
component: _import('purseManage/commissionRecord'),
name: '佣金记录',
authority: 'commissionRecord'
} }
] ]
}, },
......
...@@ -190,6 +190,7 @@ ...@@ -190,6 +190,7 @@
created() { created() {
let t = this; let t = this;
let query = localStorage.getItem("memberOrderInfo"); let query = localStorage.getItem("memberOrderInfo");
this.listQuery.no = this.$route.query.id || null
if(query !="null" && query){ if(query !="null" && query){
let queryJson = JSON.parse(query); let queryJson = JSON.parse(query);
if(queryJson.page){ if(queryJson.page){
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
:page-size="listQuery.limit" :page-size="listQuery.limit"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
:total="total" :total="total"
style="margin-top:20px" style="margin-top:20px"
></el-pagination> ></el-pagination>
</div> </div>
</div> </div>
...@@ -135,15 +135,15 @@ export default { ...@@ -135,15 +135,15 @@ export default {
: (this.listQuery.startTime = null) : (this.listQuery.startTime = null)
!!this.listQuery.time[1] !!this.listQuery.time[1]
? (this.listQuery.endTime = this.listQuery.time[1].getTime()) ? (this.listQuery.endTime = this.listQuery.time[1].getTime())
: (this.listQuery.endTime = null); : (this.listQuery.endTime = null)
this.listQuery.page = 1; this.listQuery.page = 1
this.getList() this.getList()
}, },
//统计方式筛选 //统计方式筛选
changeWay(val) { changeWay(val) {
this.isactive = val.label this.isactive = val.label
this.listQuery.type = val.id; this.listQuery.type = val.id
this.listQuery.page = 1; this.listQuery.page = 1
this.getList() this.getList()
}, },
//导出 //导出
...@@ -204,8 +204,8 @@ export default { ...@@ -204,8 +204,8 @@ export default {
element.hNumber = element.members[i].number element.hNumber = element.members[i].number
} }
} }
}) })
this.total = data.data.total; this.total = data.data.total
this.list = data.data.list this.list = data.data.list
} }
setTimeout(() => { setTimeout(() => {
......
...@@ -645,6 +645,7 @@ export default { ...@@ -645,6 +645,7 @@ export default {
created() { created() {
let t = this; let t = this;
let query = localStorage.getItem("rentVehicleInfo"); let query = localStorage.getItem("rentVehicleInfo");
this.listQuery.no = this.$route.query.id || null
if(query !="null" && query){ if(query !="null" && query){
let queryJson = JSON.parse(query); let queryJson = JSON.parse(query);
if(queryJson.type){ if(queryJson.type){
......
...@@ -288,6 +288,7 @@ ...@@ -288,6 +288,7 @@
created() { created() {
let t = this; let t = this;
let query = localStorage.getItem("tourOrderInfo"); let query = localStorage.getItem("tourOrderInfo");
this.listQuery.no = this.$route.query.id || null
if(query !="null" && query){ if(query !="null" && query){
let queryJson = JSON.parse(query); let queryJson = JSON.parse(query);
if(queryJson.page){ if(queryJson.page){
......
<template>
<div class="app-container calendar-list-container">
<div class="filter-container">
<el-row :gutter="20">
<el-col :span="4">
<el-input v-model="search.userName" placeholder="请输入用户姓名"></el-input>
</el-col>
<el-col :span="4">
<el-input v-model="search.phone" placeholder="请输入手机号"></el-input>
</el-col>
<el-col :span="6">
<el-date-picker v-model="time" type="datetimerange" placeholder="选择时间范围"></el-date-picker>
</el-col>
<el-col :span="4">
<el-button type="primary" @click="searchBtn">搜索</el-button>
</el-col>
</el-row>
<el-table
:data="list"
border
fit
highlight-current-row
style="width: 100%;margin-top:10px"
v-loading="loading"
>
<el-table-column align="center" label="姓名">
<template scope="scope">
<span>{{scope.row.userName}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="手机号">
<template scope="scope">
<span>{{scope.row.phone}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="来源">
<template scope="scope">
<span>{{scope.row.sourceName}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="订单金额">
<template scope="scope">
<span>{{scope.row.price}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="提成比例">
<template scope="scope">
<span>{{scope.row.extract}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="金额变动">
<template scope="scope">
<span>{{scope.row.commission}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="状态">
<template scope="scope">
<span>{{scope.row.waiting == 1 ? '入账' : '未入账'}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="时间">
<template scope="scope">
<span>{{getLocalTime(scope.row.crtTime)}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" fixed="right">
<template scope="scope">
<el-button
size="small"
class="el-button el-button--text el-button--small"
@click="deposit(scope.row)"
>详情</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="search.page"
:page-sizes="[10,20,30, 50]"
:page-size="search.limit"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
style="margin-top:20px"
></el-pagination>
</div>
</div>
</template>
<script>
import { recordList } from 'api/purseManage'
export default {
created() {
this.getList()
},
data() {
return {
loading: false,
time: [],
list: [],
total: null,
search: {
page: 1,
limit: 10,
userName: null,
phone: null,
startTime: null,
endTime: null
}
}
},
methods: {
deposit(row) {
switch (row.orderType) {
case 1:
this.$router.push({
path: '/order/rentVehicleInfo',
query: {
id: row.orderNo
}
})
break
case 2:
this.$router.push({
path: '/order/tourOrderInfo',
query: {
id: row.orderNo
}
})
break
case 3:
this.$router.push({
path: '/order/memberOrderInfo',
query: {
id: row.orderNo
}
})
break
default:
break
}
},
handleSizeChange(val) {
this.search.limit = val
this.getList()
},
handleCurrentChange(val) {
this.search.page = val
this.getList()
},
getList() {
this.loading = true
this.search.startTime = new Date(this.time[0]).getTime() || null
this.search.endTime = new Date(this.time[1]).getTime() || null
recordList(this.search).then(data => {
if (data.status == 200) {
this.list = data.data.data
this.total = data.data.totalCount
}
setTimeout(() => {
this.loading = false
}, 300)
})
},
searchBtn() {
this.search.page = 1
this.getList()
},
getLocalTime(nS) {
//将时间戳(十三位时间搓,也就是带毫秒的时间搓)转换成时间格式
// d.cTime = 1539083829787
let date = new Date(nS)
let year = date.getFullYear()
let month = date.getMonth() + 1
let day = date.getDate()
let hours = date.getHours()
let minutes = date.getMinutes()
let secibds = date.getSeconds()
month = month < 10 ? '0' + month : month
day = day < 10 ? '0' + day : day
hours = hours < 10 ? '0' + hours : hours
minutes = minutes < 10 ? '0' + minutes : minutes
secibds = secibds < 10 ? '0' + secibds : secibds
date =
year +
'-' +
month +
'-' +
day +
' ' +
hours +
':' +
minutes +
':' +
secibds
return date
}
}
}
</script>
<style>
</style>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
type="daterange" type="daterange"
placeholder="选择日期范围" placeholder="选择日期范围"
style="width:100%" style="width:100%"
@chage="changeData" @change="changeData"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="倍数" prop="multiple" style="width:500px"> <el-form-item label="倍数" prop="multiple" style="width:500px">
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
class="el-button el-button--text el-button--small" class="el-button el-button--text el-button--small"
@click="edidor(scope.row)" @click="edidor(scope.row)"
>编辑</el-button> >编辑</el-button>
<el-button <el-button
size="small" size="small"
class="el-button el-button--text el-button--small" class="el-button el-button--text el-button--small"
@click="deleteData(scope.row)" @click="deleteData(scope.row)"
...@@ -150,21 +150,22 @@ export default { ...@@ -150,21 +150,22 @@ export default {
} }
}, },
methods: { methods: {
deleteData(row){ deleteData(row) {
deleteList(row.id).then(data=>{ deleteList(row.id).then(data => {
if (data.status == 200) { if (data.status == 200) {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getList() this.getList()
}else{ } else {
this.$message.error(data.message) this.$message.error(data.message)
} }
}) })
}, },
addBtn() { addBtn() {
this.dialogVisible = true this.dialogVisible = true
this.popTitle = '添加节假日' this.popTitle = '添加节假日'
}, },
changeData(val) { changeData(val) {
console.log(!val);
if (!val) { if (!val) {
this.ruleForm.date = [] this.ruleForm.date = []
} }
...@@ -224,36 +225,48 @@ export default { ...@@ -224,36 +225,48 @@ export default {
this.$refs[formName].validate(valid => { this.$refs[formName].validate(valid => {
if (valid) { if (valid) {
console.log(this.ruleForm) console.log(this.ruleForm)
if (this.popTitle == '添加节假日') { if (this.ruleForm.date == '') {
this.ruleForm.startDate = this.format( this.$message.error('请选择节假日')
this.ruleForm.date[0] return false
)
this.ruleForm.endDate = this.format(
this.ruleForm.date[1]
)
delete this.ruleForm.id
this.successApi()
} else { } else {
this.ruleForm.startDate = this.ruleForm.date[0] if (this.popTitle == '添加节假日') {
this.ruleForm.endDate = this.ruleForm.date[1] this.ruleForm.startDate = this.format(
!this.activeId ? '' : (this.ruleForm.id = this.activeId) this.ruleForm.date[0]
this.successApi() )
this.ruleForm.endDate = this.format(
this.ruleForm.date[1]
)
delete this.ruleForm.id
this.successApi()
} else {
this.ruleForm.startDate = this.ruleForm.date[0]
this.ruleForm.endDate = this.ruleForm.date[1]
!this.activeId
? ''
: (this.ruleForm.id = this.activeId)
this.successApi()
}
} }
} }
}) })
}, },
successApi() { successApi() {
delete this.ruleForm.date if (this.ruleForm.date == '') {
add_edit_set(this.ruleForm).then(data => { this.$message.error('请选择节假日')
console.log(data) return false
if (data.status == 200) { } else {
this.$message.success('成功') delete this.ruleForm.date
this.dialogVisible = false add_edit_set(this.ruleForm).then(data => {
this.getList() console.log(data)
} else { if (data.status == 200) {
this.$message.error(data.message) this.$message.success('成功')
} this.dialogVisible = false
}) this.getList()
} else {
this.$message.error(data.message)
}
})
}
}, },
pickerOptions0: { pickerOptions0: {
disabledDate(time) { disabledDate(time) {
......
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
</div> </div>
</template> </template>
<script> <script>
import { priceList, dayList, add_edit, levels,rule } from 'api/vehicleType' import { priceList, dayList, add_edit, levels, rule } from 'api/vehicleType'
export default { export default {
data() { data() {
...@@ -208,14 +208,13 @@ export default { ...@@ -208,14 +208,13 @@ export default {
freeDays: '' freeDays: ''
}, },
rules: { rules: {
multiple: [ multiple: [
{ required: true, message: '请输入倍/天', trigger: 'blur' }, { required: true, message: '请输入倍/天', trigger: 'blur' }
], ],
freeDays: [ freeDays: [
{ required: true, message: '请输入/天', trigger: 'blur' }, { required: true, message: '请输入/天', trigger: 'blur' }
], ]
},
},
dialogVisible: false, dialogVisible: false,
isSetBorder: false, isSetBorder: false,
setHeight: true, setHeight: true,
...@@ -246,14 +245,17 @@ export default { ...@@ -246,14 +245,17 @@ export default {
submitForm(formName) { submitForm(formName) {
this.$refs[formName].validate(valid => { this.$refs[formName].validate(valid => {
if (valid) { if (valid) {
rule({multiple:this.ruleForm.multiple,freeDays:this.ruleForm.freeDays}).then(data=>{ rule({
if (data.status == 200) { multiple: this.ruleForm.multiple,
this.$message.success('设置成功') freeDays: this.ruleForm.freeDays
this.dialogVisible = false }).then(data => {
}else{ if (data.status == 200) {
this.$message.error(data.message) this.$message.success('设置成功')
} this.dialogVisible = false
}) } else {
this.$message.error(data.message)
}
})
} else { } else {
console.log('error submit!!') console.log('error submit!!')
return false return false
...@@ -401,21 +403,29 @@ export default { ...@@ -401,21 +403,29 @@ export default {
matching(val) { matching(val) {
let diploid = '' let diploid = ''
this.dataList.forEach(element => { this.dataList.forEach(element => {
console.log(element)
if (element.vehicleModelDay == val) { if (element.vehicleModelDay == val) {
if (element.type == 1) { if (element.isGlobal == false) {
if (element.vehicleModelDay == val) diploid = '特殊设置'
!!element.multiple } else {
? (diploid = element.multiple + '倍') if (element.type == 1) {
if (element.vehicleModelDay == val)
!!element.multiple
? (diploid = element.multiple + '倍')
: ''
} else if (element.type == 2) {
!!element.price
? (diploid = element.price + '元')
: '' : ''
} else if (element.type == 2) { } else if (element.type == 3) {
!!element.price ? (diploid = element.price + '元') : '' diploid =
} else if (element.type == 3) { element.level === 1
diploid = ? '普通会员'
element.level === 1 : element.level === 2
? '普通会员' ? '黄金会员'
: element.level === 2 : '钻石会员'
? '黄金会员' }
: '钻石会员'
} }
} }
}) })
......
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