Commit 887c3a41 authored by jiaorz's avatar jiaorz

Merge branch 'base-modify' of http://113.105.137.151:22280/youjj/cloud-platform-ui into base-modify

parents 85a3482f 64ae9a02
...@@ -145,4 +145,12 @@ export function orderMemberExcel(params) { ...@@ -145,4 +145,12 @@ export function orderMemberExcel(params) {
data: params, data: params,
responseType: 'blob' responseType: 'blob'
}); });
}
//用户信息
export function user_info(id) {
return fetch({
url: '/api/admin/appUsersManage/user_info/' + id,
method: 'get'
});
} }
\ No newline at end of file
...@@ -177,17 +177,17 @@ ...@@ -177,17 +177,17 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="150" align="center" label="订单价格(元)"> <el-table-column width="110" align="center" label="订单价格(元)">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.orderAmount}}</span> <span>{{scope.row.orderAmount}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="180" align="center" label="优惠金额(元)"> <el-table-column width="110" align="center" label="优惠金额(元)">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.couponAmount}}</span> <span>{{scope.row.couponAmount}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="180" align="center" label="实付金额(元)"> <el-table-column width="120" align="center" label="实付金额(元)">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.realAmount}}</span> <span>{{scope.row.realAmount}}</span>
</template> </template>
...@@ -199,7 +199,7 @@ ...@@ -199,7 +199,7 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作" > <el-table-column align="center" label="操作" >
<template scope="scope"> <template scope="scope">
<el-button size="small" type="text" @click="handleBuy(scope.row)">订单详情</el-button> <el-button size="small" type="text" @click="handleBuy(scope.row)">用户详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -253,7 +253,7 @@ ...@@ -253,7 +253,7 @@
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="注册终端:"> <el-form-item label="注册终端:">
<span>{{userDetails.channel}}</span> <span>{{userDetails.channel == 1 ? 'app' : '小程序'}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
...@@ -288,7 +288,7 @@ ...@@ -288,7 +288,7 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="性别: "> <el-form-item label="性别: ">
<span>{{userDetails.sex}}</span> <span>{{userDetails.sex == 1 ? '女' : '男'}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -303,7 +303,7 @@ ...@@ -303,7 +303,7 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="有效期:"> <el-form-item label="有效期:">
<span>{{userDetails.validTime}}</span> <span>{{userDetails.validTime == '0' ? '永久' : '无'}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
...@@ -341,7 +341,7 @@ ...@@ -341,7 +341,7 @@
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="来源:"> <el-form-item label="来源:">
<span>{{userDetails.source}}</span> <span>{{userDetails.source == 0 ? '自来' : '用户邀请'}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
...@@ -370,7 +370,7 @@ ...@@ -370,7 +370,7 @@
</template> </template>
<script> <script>
import { pageList, orderMemberExcel } from 'api/order/rentVehicle' import { pageList, orderMemberExcel,user_info } from 'api/order/rentVehicle'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import rsCode from '../../../utils/rsCode' import rsCode from '../../../utils/rsCode'
// import dataFormattor from '../../../utils/dataFormattor' // import dataFormattor from '../../../utils/dataFormattor'
...@@ -519,25 +519,48 @@ export default { ...@@ -519,25 +519,48 @@ export default {
!val ? this.clearSearch() :'' !val ? this.clearSearch() :''
}, },
timestamp(now) { timestamp(now) {
var year=now.getFullYear(); var year=now.getFullYear();
var month=now.getMonth()+1; var month=now.getMonth()+1;
var date=now.getDate(); var date=now.getDate();
var Hours = now.getHours(); var Hours = now.getHours();
var Minutes = now.getMinutes(); var Minutes = now.getMinutes();
var Seconds = now.getSeconds(); var Seconds = now.getSeconds();
month = month.toString().length == 1 ? '0'+ month : month; month = month.toString().length == 1 ? '0'+ month : month;
date = date.toString().length == 1 ? '0'+ date : date; date = date.toString().length == 1 ? '0'+ date : date;
Hours = Hours.toString().length == 1 ? '0'+ Hours : Hours; Hours = Hours.toString().length == 1 ? '0'+ Hours : Hours;
Minutes = Minutes.toString().length == 1 ? '0'+ Minutes : Minutes; Minutes = Minutes.toString().length == 1 ? '0'+ Minutes : Minutes;
Seconds = Seconds.toString().length == 1 ? '0'+ Seconds : Seconds; Seconds = Seconds.toString().length == 1 ? '0'+ Seconds : Seconds;
return year+"-"+month+"-"+date+' '+ Hours+':'+Minutes+":"+Seconds return year+"-"+month+"-"+date+' '+ Hours+':'+Minutes+":"+Seconds
}, },
excel() { excel() {
this.listQuery.isExport = true; this.listQuery.isExport = true;
orderMemberExcel(this.listQuery).then(res => { // if (!!this.createTime && !!this.createTime[0]) {
// this.listQuery.startOrderTime = formatDate(this.createTime[0], 'yyyy-MM-dd')+ ' 00:00:00'
// this.listQuery.endOrderTime = formatDate(this.createTime[1], 'yyyy-MM-dd')+ ' 23:59:59'
// }
// if (!!this.aplyTime && !!this.aplyTime[0]) {
// this.listQuery.startPayTime = this.aplyTime[0].getTime()
// this.listQuery.endPayTime = this.aplyTime[1].getTime()
// }
// let endOrderTime = this.listQuery.endOrderTime
// let endPayTime = this.listQuery.endPayTime
// let facilitatePhone = this.listQuery.facilitatePhone
// let isExport = 'true'
// let leaderPhone = this.listQuery.leaderPhone
// let level = this.listQuery.level
// let name = this.listQuery.name
// let orderNo = this.listQuery.orderNo
// let phone = this.listQuery.phone
// let startOrderTime = this.listQuery.startOrderTime
// let startPayTime = this.listQuery.startPayTime
// let state = this.listQuery.state
// let type = this.listQuery.type
// window.location.href=process.env.BASE_API+'/api/order/orderMember/app/unauth/export'+'?isExport='+isExport
orderMemberExcel(this.listQuery,{responseType: 'arraybuffer'}).then(res => {
this.listQuery.isExport = false; this.listQuery.isExport = false;
const content = res const content = res
const blob = new Blob([content]) const blob = new Blob([content], {type: "application/vnd.ms-excel"})
const fileName = this.timestamp(new Date())+'.xlsx' const fileName = this.timestamp(new Date())+'.xlsx'
if ('download' in document.createElement('a')) { if ('download' in document.createElement('a')) {
// 非IE下载 // 非IE下载
...@@ -556,7 +579,19 @@ export default { ...@@ -556,7 +579,19 @@ export default {
}) })
}, },
handleBuy(row) { handleBuy(row) {
console.log(row); this.detailsDialogFormVisible = true;
user_info(row.userId).then(data=>{
if (data.status == 200) {
this.userDetails = data.data
this.userDetails.recentRecharge = !!row.payTime ? this.timestamp(new Date(row.payTime)) : ''
this.getBoolean(this.userDetails.certificationStatus)
}
})
},
getBoolean(bool) {
if (bool === '1') {
this.statusBoolean = true
}
}, },
handleFilter() { handleFilter() {
this.listQuery.page = 1 this.listQuery.page = 1
...@@ -588,20 +623,20 @@ export default { ...@@ -588,20 +623,20 @@ export default {
name: null name: null
}, },
this.createTime = null, this.createTime = null,
this.aplyTime = null, this.aplyTime = null,
this.query = null, this.query = null,
this.getList() this.getList()
}, },
getList() { getList() {
this.listLoading = true this.listLoading = true
if (!!this.createTime && !!this.createTime[0]) { if (!!this.createTime && !!this.createTime[0]) {
this.listQuery.startOrderTime = formatDate(this.createTime[0], 'yyyy-MM-dd')+ ' 00:00:00' this.listQuery.startOrderTime = formatDate(this.createTime[0], 'yyyy-MM-dd')+ ' 00:00:00'
this.listQuery.endOrderTime = formatDate(this.createTime[1], 'yyyy-MM-dd')+ ' 23:59:59' this.listQuery.endOrderTime = formatDate(this.createTime[1], 'yyyy-MM-dd')+ ' 23:59:59'
} }
if (!!this.aplyTime && !!this.aplyTime[0]) { if (!!this.aplyTime && !!this.aplyTime[0]) {
this.listQuery.startPayTime = this.aplyTime[0].getTime() this.listQuery.startPayTime = this.aplyTime[0].getTime()
this.listQuery.endPayTime = this.aplyTime[1].getTime() this.listQuery.endPayTime = this.aplyTime[1].getTime()
} }
if (this.listQuery) { if (this.listQuery) {
localStorage.setItem( localStorage.setItem(
'memberOrderInfo', 'memberOrderInfo',
...@@ -609,10 +644,10 @@ export default { ...@@ -609,10 +644,10 @@ export default {
) )
} }
pageList(this.listQuery).then(response => { pageList(this.listQuery).then(response => {
this.list = response.data.memberOrderPage.data this.list = response.data.memberOrderPage.data
if (this.listQuery.page == 1) { if (this.listQuery.page == 1) {
this.statistics = response.data.memberOrderStatisticsBo this.statistics = response.data.memberOrderStatisticsBo
} }
this.total = response.data.memberOrderPage.totalCount this.total = response.data.memberOrderPage.totalCount
}) })
setTimeout(() => { setTimeout(() => {
......
...@@ -362,9 +362,12 @@ ...@@ -362,9 +362,12 @@
:src="orderReturnVehicleCrosstown.licenseImg" :src="orderReturnVehicleCrosstown.licenseImg"
style="width: 100px; height: 100px;margin-left:110px;" style="width: 100px; height: 100px;margin-left:110px;"
@click="lookPic(orderReturnVehicleCrosstown.licenseImg)" @click="lookPic(orderReturnVehicleCrosstown.licenseImg)"
/> --> />-->
<viewer> <viewer>
<img :src="orderReturnVehicleCrosstown.licenseImg" style="width: 100px; height: 100px;margin-left:110px;"> <img
:src="orderReturnVehicleCrosstown.licenseImg"
style="width: 100px; height: 100px;margin-left:110px;"
/>
</viewer> </viewer>
</div> </div>
...@@ -376,11 +379,16 @@ ...@@ -376,11 +379,16 @@
:src="item" :src="item"
:key="index" :key="index"
style="width: 100px; height: 100px;margin-left:110px;" style="width: 100px; height: 100px;margin-left:110px;"
@click="lookPic(item)" @click="lookPic(item)"
/> --> />-->
<viewer :images="otherImg"> <viewer :images="otherImg">
<img v-for="src in otherImg" :src="src" :key="src" style="width: 100px; height: 100px;margin-left:110px;"> <img
v-for="src in otherImg"
:src="src"
:key="src"
style="width: 100px; height: 100px;margin-left:110px;"
/>
</viewer> </viewer>
<!-- <img src="../../../../dist/static/img/success.8304acb.png" style="width: 100px; height: 100px;margin-left:110px;"/> <!-- <img src="../../../../dist/static/img/success.8304acb.png" style="width: 100px; height: 100px;margin-left:110px;"/>
...@@ -396,11 +404,13 @@ ...@@ -396,11 +404,13 @@
:src="orderReturnVehicleCrosstown.mileageImg" :src="orderReturnVehicleCrosstown.mileageImg"
style="width: 100px; height: 100px;margin-left:110px;" style="width: 100px; height: 100px;margin-left:110px;"
@click="lookPic(orderReturnVehicleCrosstown.mileageImg)" @click="lookPic(orderReturnVehicleCrosstown.mileageImg)"
/> --> />-->
<viewer> <viewer>
<img :src="orderReturnVehicleCrosstown.mileageImg" style="width: 100px; height: 100px;margin-left:110px;"> <img
:src="orderReturnVehicleCrosstown.mileageImg"
style="width: 100px; height: 100px;margin-left:110px;"
/>
</viewer> </viewer>
</div> </div>
<div v-if="returnVehicle"> <div v-if="returnVehicle">
<span class="label-text">钥匙照片*:</span> <span class="label-text">钥匙照片*:</span>
...@@ -409,9 +419,12 @@ ...@@ -409,9 +419,12 @@
:src="orderReturnVehicleCrosstown.vehicleKey" :src="orderReturnVehicleCrosstown.vehicleKey"
style="width: 100px; height: 100px;margin-left:110px;" style="width: 100px; height: 100px;margin-left:110px;"
@click="lookPic(orderReturnVehicleCrosstown.vehicleKey)" @click="lookPic(orderReturnVehicleCrosstown.vehicleKey)"
/> --> />-->
<viewer> <viewer>
<img :src="orderReturnVehicleCrosstown.vehicleKey" style="width: 100px; height: 100px;margin-left:110px;"> <img
:src="orderReturnVehicleCrosstown.vehicleKey"
style="width: 100px; height: 100px;margin-left:110px;"
/>
</viewer> </viewer>
</div> </div>
<div v-if="returnVehicle"> <div v-if="returnVehicle">
...@@ -428,21 +441,25 @@ ...@@ -428,21 +441,25 @@
</el-form> </el-form>
</el-dialog> </el-dialog>
<el-dialog title="取消订单" :visible.sync="showDialog"> <el-dialog title="取消订单" :visible.sync="showDialog">
<el-form> <el-form>
<el-form-item label="违约金金额:" > <el-form-item label="违约金金额:">
<el-input v-model="violateAmount" type="number" @blur="checkViolateAmount()" auto-complete="off"></el-input> <el-input
v-model="violateAmount"
type="number"
@blur="checkViolateAmount()"
auto-complete="off"
></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<span class="label-text">实际违约金是{{changeViolateAmount}}元</span> <span class="label-text">实际违约金是{{changeViolateAmount}}元</span>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click = "handleCancelDialog()">取 消</el-button> <el-button @click="handleCancelDialog()">取 消</el-button>
<el-button type="primary" @click = "handleConfirm()">确 定</el-button> <el-button type="primary" @click="handleConfirm()">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -487,10 +504,10 @@ export default { ...@@ -487,10 +504,10 @@ export default {
depositRefundRecord: [], depositRefundRecord: [],
dedTotal: '', dedTotal: '',
Tel: '', Tel: '',
showDialog:false, showDialog: false,
changeViolateAmount:null, changeViolateAmount: null,
violateAmount: null, violateAmount: null,
row:null, row: null,
topAmount: null, topAmount: null,
form: { form: {
couponAmount: undefined, couponAmount: undefined,
...@@ -715,7 +732,7 @@ export default { ...@@ -715,7 +732,7 @@ export default {
methods: { methods: {
//取消订单 //取消订单
cancel(row, changeViolateAmount) { cancel(row, changeViolateAmount) {
let that = this; let that = this
if (changeViolateAmount == null || changeViolateAmount == 0) { if (changeViolateAmount == null || changeViolateAmount == 0) {
this.$confirm('此操作将取消该订单, 是否继续?', '提示', { this.$confirm('此操作将取消该订单, 是否继续?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
...@@ -761,19 +778,18 @@ export default { ...@@ -761,19 +778,18 @@ export default {
// this.$message({ // this.$message({
// type: 'info', // type: 'info',
// message: '取消输入' // message: '取消输入'
// }); // });
// }); // });
that.showDialog = true that.showDialog = true
that.changeViolateAmount = changeViolateAmount that.changeViolateAmount = changeViolateAmount
that.violateAmount = changeViolateAmount that.violateAmount = changeViolateAmount
that.row = row that.row = row
} }
}, },
checkViolateAmount() { checkViolateAmount() {
console.log(this.topAmount) console.log(this.topAmount)
console.log(this.violateAmount) console.log(this.violateAmount)
if(this.topAmount < this.violateAmount) { if (this.topAmount < this.violateAmount) {
this.$notify({ this.$notify({
title: '失败', title: '失败',
message: '违约金额不能大于最高限制金额' + this.topAmount, message: '违约金额不能大于最高限制金额' + this.topAmount,
...@@ -815,15 +831,15 @@ export default { ...@@ -815,15 +831,15 @@ export default {
this.showDialog = false this.showDialog = false
}, },
handleViolatePrice(row) { handleViolatePrice(row) {
let that = this; let that = this
let params = { let params = {
cancelReason: '后台取消', cancelReason: '后台取消',
appUserId: row.userId appUserId: row.userId
} }
getViolatePrice(row.no).then(data => { getViolatePrice(row.no).then(data => {
if (data.status == 200) { if (data.status == 200) {
that.topAmount = data.data.topAmount; that.topAmount = data.data.topAmount
that.cancel(row, data.data.cutAmount); that.cancel(row, data.data.cutAmount)
} else { } else {
this.$notify({ this.$notify({
title: '失败', title: '失败',
......
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