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) {
data: params,
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 @@
</template>
</el-table-column>
<el-table-column width="150" align="center" label="订单价格(元)">
<el-table-column width="110" align="center" label="订单价格(元)">
<template scope="scope">
<span>{{scope.row.orderAmount}}</span>
</template>
</el-table-column>
<el-table-column width="180" align="center" label="优惠金额(元)">
<el-table-column width="110" align="center" label="优惠金额(元)">
<template scope="scope">
<span>{{scope.row.couponAmount}}</span>
</template>
</el-table-column>
<el-table-column width="180" align="center" label="实付金额(元)">
<el-table-column width="120" align="center" label="实付金额(元)">
<template scope="scope">
<span>{{scope.row.realAmount}}</span>
</template>
......@@ -199,7 +199,7 @@
</el-table-column>
<el-table-column align="center" label="操作" >
<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>
</el-table-column>
</el-table>
......@@ -253,7 +253,7 @@
<el-row>
<el-col :span="6">
<el-form-item label="注册终端:">
<span>{{userDetails.channel}}</span>
<span>{{userDetails.channel == 1 ? 'app' : '小程序'}}</span>
</el-form-item>
</el-col>
<el-col :span="8">
......@@ -288,7 +288,7 @@
</el-col>
<el-col :span="6">
<el-form-item label="性别: ">
<span>{{userDetails.sex}}</span>
<span>{{userDetails.sex == 1 ? '女' : '男'}}</span>
</el-form-item>
</el-col>
</el-row>
......@@ -303,7 +303,7 @@
</el-col>
<el-col :span="6">
<el-form-item label="有效期:">
<span>{{userDetails.validTime}}</span>
<span>{{userDetails.validTime == '0' ? '永久' : '无'}}</span>
</el-form-item>
</el-col>
<el-col :span="6">
......@@ -341,7 +341,7 @@
<el-row>
<el-col :span="6">
<el-form-item label="来源:">
<span>{{userDetails.source}}</span>
<span>{{userDetails.source == 0 ? '自来' : '用户邀请'}}</span>
</el-form-item>
</el-col>
<el-col :span="6">
......@@ -370,7 +370,7 @@
</template>
<script>
import { pageList, orderMemberExcel } from 'api/order/rentVehicle'
import { pageList, orderMemberExcel,user_info } from 'api/order/rentVehicle'
import { mapGetters } from 'vuex'
import rsCode from '../../../utils/rsCode'
// import dataFormattor from '../../../utils/dataFormattor'
......@@ -519,25 +519,48 @@ export default {
!val ? this.clearSearch() :''
},
timestamp(now) {
var year=now.getFullYear();
var month=now.getMonth()+1;
var date=now.getDate();
var Hours = now.getHours();
var Minutes = now.getMinutes();
var Seconds = now.getSeconds();
month = month.toString().length == 1 ? '0'+ month : month;
date = date.toString().length == 1 ? '0'+ date : date;
Hours = Hours.toString().length == 1 ? '0'+ Hours : Hours;
Minutes = Minutes.toString().length == 1 ? '0'+ Minutes : Minutes;
Seconds = Seconds.toString().length == 1 ? '0'+ Seconds : Seconds;
return year+"-"+month+"-"+date+' '+ Hours+':'+Minutes+":"+Seconds
var year=now.getFullYear();
var month=now.getMonth()+1;
var date=now.getDate();
var Hours = now.getHours();
var Minutes = now.getMinutes();
var Seconds = now.getSeconds();
month = month.toString().length == 1 ? '0'+ month : month;
date = date.toString().length == 1 ? '0'+ date : date;
Hours = Hours.toString().length == 1 ? '0'+ Hours : Hours;
Minutes = Minutes.toString().length == 1 ? '0'+ Minutes : Minutes;
Seconds = Seconds.toString().length == 1 ? '0'+ Seconds : Seconds;
return year+"-"+month+"-"+date+' '+ Hours+':'+Minutes+":"+Seconds
},
excel() {
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;
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'
if ('download' in document.createElement('a')) {
// 非IE下载
......@@ -556,7 +579,19 @@ export default {
})
},
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() {
this.listQuery.page = 1
......@@ -588,20 +623,20 @@ export default {
name: null
},
this.createTime = null,
this.aplyTime = null,
this.query = null,
this.aplyTime = null,
this.query = null,
this.getList()
},
getList() {
this.listLoading = true
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()
}
this.listLoading = true
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()
}
if (this.listQuery) {
localStorage.setItem(
'memberOrderInfo',
......@@ -609,10 +644,10 @@ export default {
)
}
pageList(this.listQuery).then(response => {
this.list = response.data.memberOrderPage.data
if (this.listQuery.page == 1) {
this.statistics = response.data.memberOrderStatisticsBo
}
this.list = response.data.memberOrderPage.data
if (this.listQuery.page == 1) {
this.statistics = response.data.memberOrderStatisticsBo
}
this.total = response.data.memberOrderPage.totalCount
})
setTimeout(() => {
......
......@@ -362,9 +362,12 @@
:src="orderReturnVehicleCrosstown.licenseImg"
style="width: 100px; height: 100px;margin-left:110px;"
@click="lookPic(orderReturnVehicleCrosstown.licenseImg)"
/> -->
/>-->
<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>
</div>
......@@ -376,11 +379,16 @@
:src="item"
:key="index"
style="width: 100px; height: 100px;margin-left:110px;"
@click="lookPic(item)"
/> -->
@click="lookPic(item)"
/>-->
<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>
<!-- <img src="../../../../dist/static/img/success.8304acb.png" style="width: 100px; height: 100px;margin-left:110px;"/>
......@@ -396,11 +404,13 @@
:src="orderReturnVehicleCrosstown.mileageImg"
style="width: 100px; height: 100px;margin-left:110px;"
@click="lookPic(orderReturnVehicleCrosstown.mileageImg)"
/> -->
/>-->
<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>
</div>
<div v-if="returnVehicle">
<span class="label-text">钥匙照片*:</span>
......@@ -409,9 +419,12 @@
:src="orderReturnVehicleCrosstown.vehicleKey"
style="width: 100px; height: 100px;margin-left:110px;"
@click="lookPic(orderReturnVehicleCrosstown.vehicleKey)"
/> -->
/>-->
<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>
</div>
<div v-if="returnVehicle">
......@@ -428,21 +441,25 @@
</el-form>
</el-dialog>
<el-dialog title="取消订单" :visible.sync="showDialog">
<el-form>
<el-form-item label="违约金金额:" >
<el-input v-model="violateAmount" type="number" @blur="checkViolateAmount()" auto-complete="off"></el-input>
<el-dialog title="取消订单" :visible.sync="showDialog">
<el-form>
<el-form-item label="违约金金额:">
<el-input
v-model="violateAmount"
type="number"
@blur="checkViolateAmount()"
auto-complete="off"
></el-input>
</el-form-item>
<el-form-item>
<span class="label-text">实际违约金是{{changeViolateAmount}}元</span>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click = "handleCancelDialog()">取 消</el-button>
<el-button type="primary" @click = "handleConfirm()">确 定</el-button>
</div>
</el-dialog>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="handleCancelDialog()">取 消</el-button>
<el-button type="primary" @click="handleConfirm()">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
......@@ -487,10 +504,10 @@ export default {
depositRefundRecord: [],
dedTotal: '',
Tel: '',
showDialog:false,
changeViolateAmount:null,
showDialog: false,
changeViolateAmount: null,
violateAmount: null,
row:null,
row: null,
topAmount: null,
form: {
couponAmount: undefined,
......@@ -715,7 +732,7 @@ export default {
methods: {
//取消订单
cancel(row, changeViolateAmount) {
let that = this;
let that = this
if (changeViolateAmount == null || changeViolateAmount == 0) {
this.$confirm('此操作将取消该订单, 是否继续?', '提示', {
confirmButtonText: '确定',
......@@ -761,19 +778,18 @@ export default {
// this.$message({
// type: 'info',
// message: '取消输入'
// });
// });
// });
that.showDialog = true
that.changeViolateAmount = changeViolateAmount
that.violateAmount = changeViolateAmount
that.row = row
}
},
checkViolateAmount() {
console.log(this.topAmount)
console.log(this.violateAmount)
if(this.topAmount < this.violateAmount) {
if (this.topAmount < this.violateAmount) {
this.$notify({
title: '失败',
message: '违约金额不能大于最高限制金额' + this.topAmount,
......@@ -815,15 +831,15 @@ export default {
this.showDialog = false
},
handleViolatePrice(row) {
let that = this;
let that = this
let params = {
cancelReason: '后台取消',
appUserId: row.userId
}
getViolatePrice(row.no).then(data => {
if (data.status == 200) {
that.topAmount = data.data.topAmount;
that.cancel(row, data.data.cutAmount);
that.topAmount = data.data.topAmount
that.cancel(row, data.data.cutAmount)
} else {
this.$notify({
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