Commit f6d161b9 authored by hanfeng's avatar hanfeng

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

parents 59c67417 098ab983
import fetch from 'utils/fetch';
export function page(query) {
return fetch({
url: '/api/order/baseOrder/getOrderList',
method: 'get',
params:query
});
}
\ No newline at end of file
import fetch from 'utils/fetch';
export function page(query) {
return fetch({
url: '/api/order/baseOrder/getOrderList',
method: 'get',
params:query
});
}
\ No newline at end of file
import fetch from 'utils/fetch';
export function page(query) {
return fetch({
url: '/api/order/baseOrder/getOrderList',
method: 'get',
params:query
});
}
\ No newline at end of file
...@@ -358,6 +358,33 @@ export const asyncRouterMap = [{ ...@@ -358,6 +358,33 @@ export const asyncRouterMap = [{
authority: 'tourLabel' authority: 'tourLabel'
} }
] ]
},
{
path: '/order',
component: Layout,
name: '订单管理',
icon: 'setting',
authority: 'order',
children: [
{
path: 'rentVehicleInfo',
component: _import('order/rentVehicleInfo/index'),
name: '租车订单管理',
authority: 'rentVehicleInfo'
},
{
path: 'tourOrderInfo',
component: _import('order/tourOrderInfo/index'),
name: '旅游订单管理',
authority: 'tourOrderInfo'
},
{
path: 'memberOrderInfo',
component: _import('order/memberOrderInfo/index'),
name: '会员订单管理',
authority: 'memberOrderInfo'
}
]
} }
, { , {
path: '/userManagement', path: '/userManagement',
......
<template>
<div class="app-container calendar-list-container">
<div class="filter-container" ref="filter-container">
<el-form ref="queryForm" :model="listQuery" label-width="100px">
<el-row>
<el-col :span="5">
<el-form-item label="订单号">
<el-input v-model="listQuery.no" type="text" placeholder="请输入订单号"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="手机号">
<el-input v-model="listQuery.phone" placeholder="请输入手机号"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="状态">
<el-select class="filter-item" v-model="listQuery.status" placeholder="请选择状态">
<el-option :key="null" label="无" :value="null" ></el-option>
<el-option :key="2" label="取消" :value="2"></el-option>
<el-option :key="3" label="待付款" :value="3"></el-option>
<el-option :key="6" label="已完成" :value="6"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="时间">
<el-date-picker v-model="listQuery.startTime" type = "date" placeholder = "请输入开始时间"></el-date-picker>
<span>——</span>
<el-date-picker v-model="listQuery.endTime" type = "date" placeholder = "请输入结束时间"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="会员类型">
<el-select class="filter-item" v-model="listQuery.name" placeholder="请选择会员类型">
<el-option :key="null" label="无" :value="null" ></el-option>
<el-option :key="1" label="普通会员" :value="1"></el-option>
<el-option :key="2" label="黄金会员" :value="2"></el-option>
<el-option :key="3" label="钻石会员" :value="3"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
<el-button class="filter-item" type="primary" v-waves icon="delete" @click="clearSearch">清除搜索</el-button>
</el-button>
</div>
<el-table :key='tableKey' :data="list" v-loading.body="listLoading"
border fit highlight-current-row
style="width: 100%">
<el-table-column align="center" label="ID" width="70">
<template scope="scope">
<span>{{scope.row.id}}</span>
</template>
</el-table-column>
<el-table-column width="200" align="center" label="订单号">
<template scope="scope">
<span>{{scope.row.no}}</span>
</template>
</el-table-column>
<el-table-column width="150" align="center" label="名称">
<template scope="scope">
<span>{{scope.row.name}}</span>
</template>
</el-table-column>
<el-table-column width="150" align="center" label="用户名">
<template scope="scope">
<span>{{scope.row.username}}</span>
</template>
</el-table-column>
<el-table-column width="110" align="center" label="商品价格">
<template scope="scope">
<span>{{scope.row.goodsAmount}}</span>
</template>
</el-table-column>
<el-table-column width="110" align="center" label="订单价格">
<template scope="scope">
<span>{{scope.row.orderAmount}}</span>
</template>
</el-table-column>
<el-table-column width="110" align="center" label="实际价格">
<template scope="scope">
<span>{{scope.row.realAmount}}</span>
</template>
</el-table-column>
<el-table-column width="110" align="center" label="状态">
<template scope="scope">
<span v-if="scope.row.status == '2'">取消</span>
<span v-if="scope.row.status == '3'">待付款</span>
<span v-if="scope.row.status == '6'">已完成</span>
</template>
</el-table-column>
<!-- <el-table-column width="150" align="center" label="手机号">
<template scope="scope">
<span>{{scope.row.telephone}}</span>
</template>
</el-table-column> -->
<el-table-column width="180" align="center" label="创建时间">
<template scope="scope">
<span>{{scope.row.crtTime}}</span>
</template>
</el-table-column>
<el-table-column width="180" align="center" label="更新时间">
<template scope="scope">
<span>{{scope.row.updTime}}</span>
</template>
</el-table-column>
<!-- <el-table-column align="center" label="操作" width="150">
<template scope="scope">
<el-button v-if="btn_buy && scope.row.state == 0" size="small" type="success" @click="handleBuy(scope.row)">订单详情</el-button>
<el-button v-if="btn_buy && scope.row.state == 0" size="small" type="success" @click="handleBuy(scope.row)">操作</el-button>
</template>
</el-table-column> -->
</el-table>
<div v-show="!listLoading" class="pagination-container">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page.sync="listQuery.page" :page-sizes="[10,20,30, 50]" :page-size="listQuery.limit"
layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</div>
</div>
</template>
<script>
import {
page
} from 'api/order/rentVehicle';
import { mapGetters } from 'vuex';
import rsCode from '../../../utils/rsCode';
export default {
name: 'branchCompanyStock',
data() {
return {
form: {
id: null,
companyId: null,
companyName: null,
name: null,
tel: null,
count: null,
state: null
},
rules: {
// companyName: [
// {
// required: true,
// message: '请输入用户',
// trigger: 'blur'
// }
// ],
},
applyState: {
'-1': {
key: -1,
label: '放弃购买'
},
0: {
key: 0,
label: '申请中'
},
1: {
key: 1,
label: '确认购买'
}
},
list: null,
total: null,
listLoading: true,
listQuery: {
page: 1,
limit: 20,
type: 3,
no: '',
phone:'',
status:null,
startTime: undefined,
endTime:undefined,
name:null
},
dialogFormVisible: false,
dialogStatus: '',
btn_del: true,
btn_buy: true,
btn_cancel: true,
tableKey: 0
}
},
created() {
this.getList();
this.btn_del = this.elements['branchCompany/stockApply:btn_delete'];
},
computed: {
...mapGetters([
'elements'
]),
provinceRegions() {
return getSonRegionByCodes(1);
},
cityRegions() {
if (!this.$utils.isInteger(this.form.addrProvince)) {
return null;
}
return getSonRegionByCodes(this.form.addrProvince);
}
},
methods: {
handleBuy(row) {
this.$confirm('此操作将确认购买, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
buyStock(row.id)
.then(() => {
this.$notify({
title: '成功',
message: '操作成功',
type: 'success',
duration: 2000
});
this.getList();
});
});
},
handleCancel(row) {
this.$confirm('此操作将放弃购买, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
cancelApply(row.id)
.then(() => {
this.$notify({
title: '成功',
message: '操作成功',
type: 'success',
duration: 2000
});
this.getList();
});
});
},
handleDelete(row) {
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
delObj(row.id)
.then(() => {
this.$notify({
title: '成功',
message: '删除成功',
type: 'success',
duration: 2000
});
const index = this.list.indexOf(row);
this.list.splice(index, 1);
});
});
},
handleFilter() {
this.listQuery.page = 1;
this.$refs.queryForm.validate(valid => {
if (valid) {
this.getList();
} else {
return false;
}
});
},
clearSearch() {
this.listQuery ={
page: 1,
limit: 20,
type: 3,
no: '',
phone:'',
status:null,
startTime: undefined,
endTime:undefined,
name:null
}
this.getList()
},
getList() {
this.listLoading = true;
console.log(this.listQuery)
if(this.listQuery.startTime){
this.listQuery.startTime = this.listQuery.startTime.getTime();
}
if(this.listQuery.endTime){
this.listQuery.endTime = this.listQuery.endTime.getTime();
}
if(this.listQuery.name == '1') {
this.listQuery.name = "普通会员"
} else
if(this.listQuery.name == '2') {
this.listQuery.name = "黄金会员"
} else
if(this.listQuery.name == '3') {
this.listQuery.name = "钻石会员"
} else {
this.listQuery.name = null
}
page(this.listQuery)
.then(response => {
this.list = response.data.data;
this.total = response.data.totalCount;
this.listLoading = false;
})
},
handleSizeChange(val) {
this.listQuery.limit = val;
this.getList();
},
handleCurrentChange(val) {
this.listQuery.page = val;
this.getList();
}
}
}
</script>
<template>
<div class="app-container calendar-list-container">
<div class="filter-container" ref="filter-container">
<el-form ref="queryForm" :model="listQuery" label-width="100px">
<el-row>
<el-col :span="5">
<el-form-item label="订单号">
<el-input v-model="listQuery.no" placeholder="请输入订单号"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="手机号">
<el-input v-model="listQuery.phone" placeholder="请输入手机号"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="状态">
<el-select class="filter-item" v-model="listQuery.status" placeholder="请选择状态">
<el-option :key="null" label="无" :value="null" ></el-option>
<el-option :key="2" label="取消" :value="2"></el-option>
<el-option :key="3" label="待付款" :value="3"></el-option>
<el-option :key="4" label="待出行" :value="4"></el-option>
<el-option :key="5" label="出行中" :value="5"></el-option>
<el-option :key="6" label="已完成" :value="6"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="时间">
<el-date-picker v-model="listQuery.startTime" type = "date" placeholder = "请输入开始时间"></el-date-picker>
<span>——</span>
<el-date-picker v-model="listQuery.endTime" type = "date" placeholder = "请输入结束时间"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
<el-button class="filter-item" type="primary" v-waves icon="delete" @click="clearSearch">清除搜索</el-button>
</el-button>
</div>
<el-table :key='tableKey' :data="list" v-loading.body="listLoading"
border fit highlight-current-row
style="width: 100%">
<el-table-column align="center" label="ID" width="70">
<template scope="scope">
<span>{{scope.row.id}}</span>
</template>
</el-table-column>
<el-table-column width="200" align="center" label="订单号/创建时间">
<template scope="scope">
<span>{{scope.row.no}}</span>/<span>{{scope.row.crtTime}}</span>
</template>
</el-table-column>
<el-table-column width="180" align="center" label="名称/车牌号">
<template scope="scope">
<span>{{scope.row.name}}</span><br/><span>{{scope.row.vehicleNumberPlat}}</span>
</template>
</el-table-column>
<el-table-column width="150" align="center" label="用户ID/用户名">
<template scope="scope">
<span>{{scope.row.userId}}</span>/<span>{{scope.row.username}}</span>
</template>
</el-table-column>
<el-table-column width="200" align="center" label="取车时间/还车时间">
<template scope="scope">
取:<span>{{dateFormat(scope.row.orderRentVehicleDetail.startTime)}}</span><br/>
还:<span>{{dateFormat(scope.row.orderRentVehicleDetail.endTime)}}</span>
</template>
</el-table-column>
<el-table-column width="200" align="center" label="交车公司">
<template scope="scope">
<span>{{scope.row.startCompanyName}}</span><br/>
<span>({{scope.row.orderRentVehicleDetail.startCityName}}{{scope.row.orderRentVehicleDetail.startAddr}})</span>
</template>
</el-table-column>
<el-table-column width="200" align="center" label="还车公司">
<template scope="scope">
<span>{{scope.row.endCompanyName}}</span><br/>
<span>({{scope.row.orderRentVehicleDetail.endCityName}}{{scope.row.orderRentVehicleDetail.endAddr}})</span>
</template>
</el-table-column>
<el-table-column width="110" align="center" label="订单价格">
<template scope="scope">
<span>{{scope.row.orderAmount}}</span>
</template>
</el-table-column>
<el-table-column width="110" align="center" label="状态">
<template scope="scope">
<span v-if="scope.row.status == '2'">取消</span>
<span v-if="scope.row.status == '3'">待付款</span>
<span v-if="scope.row.status == '4'">待出行</span>
<span v-if="scope.row.status == '5'">出行中</span>
<span v-if="scope.row.status == '6'">已完成</span>
</template>
</el-table-column>
<!-- <el-table-column align="center" label="操作" width="150">
<template scope="scope">
<el-button v-if="btn_buy && scope.row.state == 0" size="small" type="success" @click="handleBuy(scope.row)">订单详情</el-button>
<el-button v-if="btn_buy && scope.row.state == 0" size="small" type="success" @click="handleBuy(scope.row)">操作</el-button>
</template>
</el-table-column> -->
</el-table>
<div v-show="!listLoading" class="pagination-container">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page.sync="listQuery.page" :page-sizes="[10,20,30, 50]" :page-size="listQuery.limit"
layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</div>
</div>
</template>
<script>
import {
page
} from 'api/order/rentVehicle';
import { mapGetters } from 'vuex';
import rsCode from '../../../utils/rsCode';
import {
formatDate
} from '../../../utils/dateFormattor';
export default {
name: 'branchCompanyStock',
data() {
return {
form: {
id: null,
companyId: null,
companyName: null,
name: null,
tel: null,
count: null,
state: null
},
rules: {
// companyName: [
// {
// required: true,
// message: '请输入用户',
// trigger: 'blur'
// }
// ],
},
applyState: {
'-1': {
key: -1,
label: '放弃购买'
},
0: {
key: 0,
label: '申请中'
},
1: {
key: 1,
label: '确认购买'
}
},
list: null,
total: null,
listLoading: true,
listQuery: {
page: 1,
limit: 20,
type: 1,
no: null,
phone:null,
status:null,
startTime: undefined,
endTime:undefined
},
dialogFormVisible: false,
dialogStatus: '',
btn_del: true,
btn_buy: true,
btn_cancel: true,
tableKey: 0
}
},
created() {
this.getList();
this.btn_del = this.elements['branchCompany/stockApply:btn_delete'];
},
computed: {
...mapGetters([
'elements'
]),
provinceRegions() {
return getSonRegionByCodes(1);
},
cityRegions() {
if (!this.$utils.isInteger(this.form.addrProvince)) {
return null;
}
return getSonRegionByCodes(this.form.addrProvince);
}
},
methods: {
handleBuy(row) {
this.$confirm('此操作将确认购买, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
buyStock(row.id)
.then(() => {
this.$notify({
title: '成功',
message: '操作成功',
type: 'success',
duration: 2000
});
this.getList();
});
});
},
handleCancel(row) {
this.$confirm('此操作将放弃购买, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
cancelApply(row.id)
.then(() => {
this.$notify({
title: '成功',
message: '操作成功',
type: 'success',
duration: 2000
});
this.getList();
});
});
},
handleDelete(row) {
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
delObj(row.id)
.then(() => {
this.$notify({
title: '成功',
message: '删除成功',
type: 'success',
duration: 2000
});
const index = this.list.indexOf(row);
this.list.splice(index, 1);
});
});
},
handleFilter() {
this.listQuery.page = 1;
this.$refs.queryForm.validate(valid => {
if (valid) {
this.getList();
} else {
return false;
}
});
},
clearSearch() {
this.listQuery ={
page: 1,
limit: 20,
type: 1,
no: '',
phone:'',
status:null,
startTime: undefined,
endTime:undefined
}
this.getList()
},
getList() {
this.listLoading = true;
console.log(this.listQuery)
if(this.listQuery.startTime){
this.listQuery.startTime = this.listQuery.startTime.getTime();
}
if(this.listQuery.endTime){
this.listQuery.endTime = this.listQuery.endTime.getTime();
}
page(this.listQuery)
.then(response => {
this.list = response.data.data;
this.total = response.data.totalCount;
this.listLoading = false;
})
},
handleSizeChange(val) {
this.listQuery.limit = val;
this.getList();
},
dateFormat(timestamp) {
let date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
return formatDate(date, 'yyyy-MM-dd hh:mm:ss');
},
handleCurrentChange(val) {
this.listQuery.page = val;
this.getList();
}
}
}
</script>
<template>
<div class="app-container calendar-list-container">
<div class="filter-container" ref="filter-container">
<el-form ref="queryForm" :model="listQuery" label-width="100px">
<el-row>
<el-col :span="5">
<el-form-item label="订单号">
<el-input v-model="listQuery.no" type="text" placeholder="请输入订单号"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="手机号">
<el-input v-model="listQuery.phone" placeholder="请输入手机号"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="状态">
<el-select class="filter-item" v-model="listQuery.status" placeholder="请选择状态">
<el-option :key="null" label="无" :value="null" ></el-option>
<el-option :key="2" label="取消" :value="2"></el-option>
<el-option :key="3" label="待付款" :value="3"></el-option>
<el-option :key="4" label="待出行" :value="4"></el-option>
<el-option :key="5" label="出行中" :value="5"></el-option>
<el-option :key="6" label="已完成" :value="6"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="时间">
<el-date-picker v-model="listQuery.startTime" type = "date" placeholder = "请输入开始时间"></el-date-picker>
<span>——</span>
<el-date-picker v-model="listQuery.endTime" type = "date" placeholder = "请输入结束时间"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
<el-button class="filter-item" type="primary" v-waves icon="delete" @click="clearSearch">清除搜索</el-button>
</el-button>
</div>
<el-table :key='tableKey' :data="list" v-loading.body="listLoading"
border fit highlight-current-row
style="width: 100%">
<el-table-column align="center" label="ID" width="70">
<template scope="scope">
<span>{{scope.row.id}}</span>
</template>
</el-table-column>
<el-table-column width="200" align="center" label="订单号/创建时间">
<template scope="scope">
<span>{{scope.row.no}}</span><br/>
<span>{{scope.row.crtTime}}</span>
</template>
</el-table-column>
<el-table-column width="200" align="center" label="名称">
<template scope="scope">
<span>{{scope.row.name}}</span>
</template>
</el-table-column>
<el-table-column width="150" align="center" label="用户ID/用户名">
<template scope="scope">
<span>{{scope.row.userId}}</span>/<span>{{scope.row.username}}</span>
</template>
</el-table-column>
<el-table-column width="150" align="center" label="报名人数">
<template scope="scope">
<span>成人{{scope.row.orderTourDetail.adultNum}} 儿童{{scope.row.orderTourDetail.childNum}}</span>
</template>
</el-table-column>
<el-table-column width="200" align="center" label="活动日期">
<template scope="scope">
<span>{{dateFormat(scope.row.orderTourDetail.startTime)}}</span>
-
<span>{{dateFormat(scope.row.orderTourDetail.endTime)}}</span>
</template>
</el-table-column>
<el-table-column width="150" align="center" label="出发公司">
<template scope="scope">
<span>{{scope.row.startCompanyName}}</span>
</template>
</el-table-column>
<el-table-column width="110" align="center" label="订单价格">
<template scope="scope">
<span>{{scope.row.orderAmount}}</span>
</template>
</el-table-column>
<el-table-column width="110" align="center" label="状态">
<template scope="scope">
<span v-if="scope.row.status == '2'">取消</span>
<span v-if="scope.row.status == '3'">待付款</span>
<span v-if="scope.row.status == '4'">待出行</span>
<span v-if="scope.row.status == '5'">出行中</span>
<span v-if="scope.row.status == '6'">已完成</span>
</template>
</el-table-column>
<!-- <el-table-column align="center" label="操作" width="150">
<template scope="scope">
<el-button v-if="btn_buy && scope.row.state == 0" size="small" type="success" @click="handleBuy(scope.row)">订单详情</el-button>
<el-button v-if="btn_buy && scope.row.state == 0" size="small" type="success" @click="handleBuy(scope.row)">操作</el-button>
</template>
</el-table-column> -->
</el-table>
<div v-show="!listLoading" class="pagination-container">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page.sync="listQuery.page" :page-sizes="[10,20,30, 50]" :page-size="listQuery.limit"
layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</div>
</div>
</template>
<script>
import {
page
} from 'api/order/rentVehicle';
import { mapGetters } from 'vuex';
import rsCode from '../../../utils/rsCode';
import {
formatDate
} from '../../../utils/dateFormattor';
export default {
name: 'branchCompanyStock',
data() {
return {
form: {
id: null,
companyId: null,
companyName: null,
name: null,
tel: null,
count: null,
state: null
},
rules: {
// companyName: [
// {
// required: true,
// message: '请输入用户',
// trigger: 'blur'
// }
// ],
},
applyState: {
'-1': {
key: -1,
label: '放弃购买'
},
0: {
key: 0,
label: '申请中'
},
1: {
key: 1,
label: '确认购买'
}
},
list: null,
total: null,
listLoading: true,
listQuery: {
page: 1,
limit: 20,
type: 2,
no: '',
phone:'',
status:null,
startTime: undefined,
endTime:undefined
},
dialogFormVisible: false,
dialogStatus: '',
btn_del: true,
btn_buy: true,
btn_cancel: true,
tableKey: 0
}
},
created() {
this.getList();
this.btn_del = this.elements['branchCompany/stockApply:btn_delete'];
},
computed: {
...mapGetters([
'elements'
]),
provinceRegions() {
return getSonRegionByCodes(1);
},
cityRegions() {
if (!this.$utils.isInteger(this.form.addrProvince)) {
return null;
}
return getSonRegionByCodes(this.form.addrProvince);
}
},
methods: {
handleBuy(row) {
this.$confirm('此操作将确认购买, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
buyStock(row.id)
.then(() => {
this.$notify({
title: '成功',
message: '操作成功',
type: 'success',
duration: 2000
});
this.getList();
});
});
},
handleCancel(row) {
this.$confirm('此操作将放弃购买, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
cancelApply(row.id)
.then(() => {
this.$notify({
title: '成功',
message: '操作成功',
type: 'success',
duration: 2000
});
this.getList();
});
});
},
handleDelete(row) {
this.$confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
delObj(row.id)
.then(() => {
this.$notify({
title: '成功',
message: '删除成功',
type: 'success',
duration: 2000
});
const index = this.list.indexOf(row);
this.list.splice(index, 1);
});
});
},
handleFilter() {
this.listQuery.page = 1;
this.$refs.queryForm.validate(valid => {
if (valid) {
this.getList();
} else {
return false;
}
});
},
clearSearch() {
this.listQuery ={
page: 1,
limit: 20,
type: 2,
no: '',
phone:'',
status:null,
startTime: undefined,
endTime:undefined
}
this.getList()
},
getList() {
this.listLoading = true;
console.log(this.listQuery)
if(this.listQuery.startTime){
this.listQuery.startTime = this.listQuery.startTime.getTime();
}
if(this.listQuery.endTime){
this.listQuery.endTime = this.listQuery.endTime.getTime();
}
page(this.listQuery)
.then(response => {
this.list = response.data.data;
this.total = response.data.totalCount;
this.listLoading = false;
})
},
handleSizeChange(val) {
this.listQuery.limit = val;
this.getList();
},
dateFormat(timestamp) {
let date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
return formatDate(date, 'yyyy-MM-dd');
},
handleCurrentChange(val) {
this.listQuery.page = val;
this.getList();
}
}
}
</script>
...@@ -57,16 +57,32 @@ ...@@ -57,16 +57,32 @@
</el-col> </el-col>
</el-row> </el-row>
<!--<el-form-item label="热门车型">-->
<!--<el-radio class="radio" v-model="form.hotSign" label="1"></el-radio>-->
<!--<el-radio class="radio" v-model="form.hotSign" label="0"></el-radio>-->
<!--</el-form-item>-->
<!--租车优惠状态 0;没有优惠;1;会员折扣;2;固定值--> <!--租车优惠状态 0;没有优惠;1;会员折扣;2;固定值-->
<!--<el-form-item label="优惠状态">--> <el-form-item label="优惠状态">
<!--<el-radio class="radio" v-model="form.rentDiscountStatus" label="0">没有优惠</el-radio>--> <el-radio-group v-model="form.rentDiscountStatus">
<!--<el-radio class="radio" v-model="form.rentDiscountStatus" label="1">会员折扣</el-radio>--> <el-radio class="radio" label="0">没有优惠</el-radio>
<!--<el-radio class="radio" v-model="form.rentDiscountStatus" label="2">固定值</el-radio>--> <el-radio class="radio" label="1">会员折扣</el-radio>
<!--</el-form-item>--> <el-radio class="radio" label="2">固定值</el-radio>
</el-radio-group>
</el-form-item>
<el-row v-if="form.rentDiscountStatus==2">
<el-col :span="4">
<el-form-item label="普通会员">
<el-input v-model="form.pPrice" type="number" min="0" placeholder="请输入普通会员价格"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="黄金会员">
<el-input v-model="form.hPrice" type="number" min="0" placeholder="请输入黄金会员价格"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="钻石会员">
<el-input v-model="form.zPrice" type="number" min="0" placeholder="请输入钻石会员价格"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="房车配置"></el-form-item> <el-form-item label="房车配置"></el-form-item>
<el-row> <el-row>
...@@ -218,6 +234,9 @@ ...@@ -218,6 +234,9 @@
labelList:[],//全部车型标签 labelList:[],//全部车型标签
fileList2:[], fileList2:[],
form: { form: {
pPrice:0,//普通会员
hPrice:0,//黄金会员
zPrice:0,//钻石会员
name: undefined,//房车名称 name: undefined,//房车名称
config: "",//房车配置 config: "",//房车配置
keyword: "",//房车关键标签 keyword: "",//房车关键标签
...@@ -229,7 +248,7 @@ ...@@ -229,7 +248,7 @@
vioDeposit: 0,//违章押金 vioDeposit: 0,//违章押金
hotSign: "2",//热门车型 1、热门 2、非热门 hotSign: "2",//热门车型 1、热门 2、非热门
rentDiscountStatus:"0",//租车优惠状态 0--没有优惠;1--会员折扣;2--固定值 rentDiscountStatus:"0",//租车优惠状态 0--没有优惠;1--会员折扣;2--固定值
RentDiscountPrice: 0,//租车优惠价格 固定优化价格 rentDiscountPrice: 0,//租车优惠价格 固定优化价格
buyPrice: 0,//购买价格 buyPrice: 0,//购买价格
}, },
showDestinationVisible: false,//编辑目的地 showDestinationVisible: false,//编辑目的地
...@@ -385,8 +404,8 @@ ...@@ -385,8 +404,8 @@
deposit: this.form.deposit,//总押金 deposit: this.form.deposit,//总押金
vioDeposit: this.form.vioDeposit, vioDeposit: this.form.vioDeposit,
hotSign: this.form.hotSign,//热门车型 hotSign: this.form.hotSign,//热门车型
// "rentDiscountStatus":"0",//租车优惠状态 0--没有优惠;1--会员折扣;2--固定值 rentDiscountStatus: this.form.rentDiscountStatus,//租车优惠状态 0--没有优惠;1--会员折扣;2--固定值
// "RentDiscountPrice":"",//租车优惠价格 固定优化价格 rentDiscountPrice:this.form.pPrice+","+this.form.hPrice+","+this.form.zPrice,//租车优惠价格 固定优化价格
buyPrice: this.form.buyPrice,//购买价格 buyPrice: this.form.buyPrice,//购买价格
}; };
console.log(params); console.log(params);
...@@ -428,8 +447,8 @@ ...@@ -428,8 +447,8 @@
deposit: this.form.deposit,//总押金 deposit: this.form.deposit,//总押金
vioDeposit: this.form.vioDeposit, vioDeposit: this.form.vioDeposit,
hotSign: this.form.hotSign,//热门车型 hotSign: this.form.hotSign,//热门车型
// "rentDiscountStatus":"0",//租车优惠状态 0--没有优惠;1--会员折扣;2--固定值 rentDiscountStatus: this.form.rentDiscountStatus,//租车优惠状态 0--没有优惠;1--会员折扣;2--固定值
// "RentDiscountPrice":"",//租车优惠价格 固定优化价格 rentDiscountPrice:this.form.pPrice+","+this.form.hPrice+","+this.form.zPrice,//租车优惠价格 固定优化价格
buyPrice: this.form.buyPrice,//购买价格 buyPrice: this.form.buyPrice,//购买价格
}; };
console.log(params); console.log(params);
...@@ -622,6 +641,14 @@ ...@@ -622,6 +641,14 @@
fileList2.push(p); fileList2.push(p);
}); });
this.fileList2 = fileList2; this.fileList2 = fileList2;
let yhPrice = item.rentDiscountPrice?item.rentDiscountPrice.split(","):[];
if(item.rentDiscountPrice) {
item.pPrice = yhPrice.length>=1?parseInt(yhPrice[0]):0;
item.hPrice = yhPrice.length>=2?parseInt(yhPrice[1]):0;
item.zPrice = yhPrice.length>=3?parseInt(yhPrice[2]):0;
}
item.rentDiscountStatus = item.rentDiscountStatus+"";
item.hotSign = item.hotSign+"";
item.brand = item.brand*1; item.brand = item.brand*1;
item.number = item.number*1; item.number = item.number*1;
item.modelParam = JSON.parse(item.modelParam); item.modelParam = JSON.parse(item.modelParam);
...@@ -744,7 +771,7 @@ ...@@ -744,7 +771,7 @@
vioDeposit: 0,//违章押金 vioDeposit: 0,//违章押金
hotSign: "2",//热门车型 1、热门 2、非热门 hotSign: "2",//热门车型 1、热门 2、非热门
rentDiscountStatus:"0",//租车优惠状态 0--没有优惠;1--会员折扣;2--固定值 rentDiscountStatus:"0",//租车优惠状态 0--没有优惠;1--会员折扣;2--固定值
RentDiscountPrice: 0,//租车优惠价格 固定优化价格 rentDiscountPrice: "",//租车优惠价格 固定优化价格
buyPrice: 0,//购买价格 buyPrice: 0,//购买价格
} }
} }
......
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