Commit 32a59f7a authored by libin's avatar libin

Merge remote-tracking branch 'origin/base-modify' into base-modify

parents 377c76e9 e7a8de73
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
} else { } else {
allPage(this.listQuery) allPage(this.listQuery)
.then(response => { .then(response => {
let listTemp = response.data.data; let listTemp = response.data;
let arr = []; let arr = [];
listTemp.map(function(item){ listTemp.map(function(item){
arr.push(item); arr.push(item);
...@@ -202,7 +202,7 @@ ...@@ -202,7 +202,7 @@
type: 'get', type: 'get',
url: 'https://api.map.baidu.com/geocoder/v2/?ak=wWYw0yCb8ntXmSgTxTx40vKR&callback=renderReverse&location=' + r.point.lat + ',' + r.point.lng + '&output=json&pois=1', url: 'https://api.map.baidu.com/geocoder/v2/?ak=wWYw0yCb8ntXmSgTxTx40vKR&callback=renderReverse&location=' + r.point.lat + ',' + r.point.lng + '&output=json&pois=1',
async: false, async: false,
jsonp: "callback", jsonp: "callback",
dataType: 'jsonp', dataType: 'jsonp',
success: function (data) { success: function (data) {
var addrCity = data.result.addressComponent.adcode var addrCity = data.result.addressComponent.adcode
......
...@@ -328,7 +328,7 @@ ...@@ -328,7 +328,7 @@
} }
}, },
created() { created() {
}, },
computed: { computed: {
...mapGetters([ ...mapGetters([
...@@ -381,7 +381,7 @@ ...@@ -381,7 +381,7 @@
//鼠标释放时候的函数 //鼠标释放时候的函数
end(){ end(){
this.flags = false; this.flags = false;
}, },
close(){ close(){
this.otherProvince = false this.otherProvince = false
this.quanguo() this.quanguo()
...@@ -490,7 +490,7 @@ ...@@ -490,7 +490,7 @@
.then(res => { .then(res => {
this.loading = false; this.loading = false;
let allList = []; let allList = [];
let listTemp = res.data.data; let listTemp = res.data;
//一次读入所有涉及地区,防止多次读取 //一次读入所有涉及地区,防止多次读取
// if (!this.$utils.isEmpty(listTemp)) { // if (!this.$utils.isEmpty(listTemp)) {
// let allRegions = new Set(); // let allRegions = new Set();
...@@ -503,11 +503,11 @@ ...@@ -503,11 +503,11 @@
// } // }
// getRegionByCodes([...allRegions]); // getRegionByCodes([...allRegions]);
// } // }
if(res.data.data){ if(res.data){
res.data.data.forEach(function (item) { res.data.forEach(function (item) {
allList.push(item); allList.push(item);
}); });
if(res.data.data.length< this.listQuery.limit && this.list.length>0){ if(res.data.length< this.listQuery.limit && this.list.length>0){
//已加载全部 //已加载全部
this.nomore = true; this.nomore = true;
} }
......
<template> <template>
<div class="app-container calendar-list-container"> <div class="app-container calendar-list-container">
<div class="filter-container" ref="filter-container"> <div class="filter-container" ref="filter-container">
<el-form ref="queryForm" :model="listQuery" label-width="100px"> <el-form ref="queryForm" :model="listQuery" label-width="100px">
<el-row> <el-row>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="所属地区" prop="zoneId"> <el-form-item label="所属地区" prop="zoneId">
<el-select class="filter-item" v-model="listQuery.zoneId" placeholder="请选择" @change="getProvinceRegions"> <el-select class="filter-item" v-model="listQuery.zoneId" placeholder="请选择" @change="getProvinceRegions">
<el-option :key="undefined" label="无" :value="undefined"></el-option> <el-option :key="undefined" label="无" :value="undefined"></el-option>
<el-option v-for="val in getAllZoneList" :key="val.id" :label="val.name" :value="val.id"> </el-option> <el-option v-for="val in getAllZoneList" :key="val.id" :label="val.name" :value="val.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="所属公司" prop="startCompanyId"> <el-form-item label="所属公司" prop="startCompanyId">
<el-select class="filter-item" v-model="listQuery.startCompanyId" placeholder="请选择" @change="getAllBranchCompanyChange"> <el-select class="filter-item" v-model="listQuery.startCompanyId" placeholder="请选择"
<el-option :key="undefined" label="无" :value="undefined"></el-option> @change="getAllBranchCompanyChange">
<el-option v-for="val in allBranchCompany" :key="val.id" :label="val.name" :value="val.id"> </el-option> <el-option :key="undefined" label="无" :value="undefined"></el-option>
</el-select> <el-option v-for="val in allBranchCompany" :key="val.id" :label="val.name" :value="val.id"></el-option>
</el-form-item> </el-select>
</el-col> </el-form-item>
<el-col :span="5"> </el-col>
<el-form-item label="手机号"> <el-col :span="5">
<el-input v-model="listQuery.phone" type="text" placeholder="请输入手机号"></el-input> <el-form-item label="手机号">
</el-form-item> <el-input v-model="listQuery.phone" type="text" placeholder="请输入手机号"></el-input>
</el-col> </el-form-item>
</el-row> </el-col>
<el-col :span="5"> </el-row>
<el-form-item label="订单号"> <el-row>
<el-input v-model="listQuery.no" type="text" placeholder="请输入订单号"></el-input> <el-col :span="5">
</el-form-item> <el-form-item label="订单号">
</el-col> <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-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 :span="5"> </el-row>
<el-form-item label="状态"> </el-form>
<el-select class="filter-item" v-model="listQuery.status" placeholder="请选择状态"> <el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
<el-option :key="null" label="无" :value="null" ></el-option> <el-button class="filter-item" type="primary" v-waves icon="delete" @click="clearSearch">清除搜索</el-button>
<el-option :key="2" label="取消" :value="2"></el-option> </div>
<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-row>
</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>
</div>
<el-table :key='tableKey' :data="list" v-loading.body="listLoading" <el-table :key='tableKey' :data="list" v-loading.body="listLoading"
border fit highlight-current-row border fit highlight-current-row
style="width: 100%"> style="width: 100%">
<el-table-column align="center" label="ID" width="70"> <el-table-column align="center" label="ID" width="70">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.id}}</span> <span>{{scope.row.id}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="200" align="center" label="订单号/创建时间"> <el-table-column width="200" align="center" label="订单号/创建时间">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.no}}</span><br/> <span>{{scope.row.no}}</span><br/>
<span>{{scope.row.crtTime}}</span> <span>{{scope.row.crtTime}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="名称"> <el-table-column align="center" label="名称">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.name}}</span> <span>{{scope.row.name}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="用户ID/用户名"> <el-table-column align="center" label="用户ID/用户名">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.username}}</span>/<span>{{scope.row.telephone}}</span> <span>{{scope.row.username}}</span>/<span>{{scope.row.telephone}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="150" align="center" label="报名人数"> <el-table-column width="150" align="center" label="报名人数">
<template scope="scope"> <template scope="scope">
<span>成人{{scope.row.orderTourDetail.adultNum}} 儿童{{scope.row.orderTourDetail.childNum}}</span> <span>成人{{scope.row.orderTourDetail.adultNum}} 儿童{{scope.row.orderTourDetail.childNum}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="200" align="center" label="活动日期"> <el-table-column width="200" align="center" label="活动日期">
<template scope="scope"> <template scope="scope">
<span>{{dateFormat(scope.row.orderTourDetail.startTime)}}</span> <span>{{dateFormat(scope.row.orderTourDetail.startTime)}}</span>
- -
<span>{{dateFormat(scope.row.orderTourDetail.endTime)}}</span> <span>{{dateFormat(scope.row.orderTourDetail.endTime)}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="150" align="center" label="出发公司"> <el-table-column width="150" align="center" label="出发公司">
<template scope="scope"> <template scope="scope">
<span>{{scope.row.startCompanyName}}</span> <span>{{scope.row.startCompanyName}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="110" align="center" label="订单价格"> <el-table-column width="110" align="center" label="订单价格">
<template scope="scope"> <template scope="scope">
...@@ -99,20 +99,20 @@ ...@@ -99,20 +99,20 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="110" align="center" label="状态"> <el-table-column width="110" align="center" label="状态">
<template scope="scope"> <template scope="scope">
<span v-if="scope.row.status == '2'">取消</span> <span v-if="scope.row.status == '2'">取消</span>
<span v-if="scope.row.status == '3'">待付款</span> <span v-if="scope.row.status == '3'">待付款</span>
<span v-if="scope.row.status == '4'">待出行</span> <span v-if="scope.row.status == '4'">待出行</span>
<span v-if="scope.row.status == '5'">出行中</span> <span v-if="scope.row.status == '5'">出行中</span>
<span v-if="scope.row.status == '6'">已完成</span> <span v-if="scope.row.status == '6'">已完成</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="110" align="center" label="订单详情" fixed="right"> <el-table-column width="110" align="center" label="订单详情" fixed="right">
<template scope="scope"> <template scope="scope">
<span style="color: #13CE66;cursor: pointer;" @click="handleBuy(scope.row)">订单详情</span> <span style="color: #13CE66;cursor: pointer;" @click="handleBuy(scope.row)">订单详情</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div v-show="!listLoading" class="pagination-container"> <div v-show="!listLoading" class="pagination-container">
...@@ -120,8 +120,10 @@ ...@@ -120,8 +120,10 @@
:current-page.sync="listQuery.page" :page-sizes="[10,20,30, 50]" :page-size="listQuery.limit" :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> layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</div> </div>
<!--订单详情--> <!--订单详情-->
<tourOrderDetailModal :tourRow="tourRow" :insureDetail="insureDetail" v-if="tourDialogVisible" :tourCostDetail="tourCostDetail" v-on:tourOrderDetailDialogEvent="tourOrderDetailDialogEvent"></tourOrderDetailModal> <tourOrderDetailModal :tourRow="tourRow" :insureDetail="insureDetail" v-if="tourDialogVisible"
:tourCostDetail="tourCostDetail"
v-on:tourOrderDetailDialogEvent="tourOrderDetailDialogEvent"></tourOrderDetailModal>
</div> </div>
</template> </template>
...@@ -129,21 +131,22 @@ ...@@ -129,21 +131,22 @@
import Detail from "./detail";//违章查询 import Detail from "./detail";//违章查询
import tourOrderDetailModal from "../modal/tourOrderDetailModal";//租车订单详情 import tourOrderDetailModal from "../modal/tourOrderDetailModal";//租车订单详情
import { import {
page, page,
getAllBranchCompany, getAllBranchCompany,
getAllBranchCompanyByZoneId getAllBranchCompanyByZoneId
} from 'api/order/rentVehicle'; } from 'api/order/rentVehicle';
import { mapGetters } from 'vuex'; import {mapGetters} from 'vuex';
import rsCode from '../../../utils/rsCode'; import rsCode from '../../../utils/rsCode';
import { import {
timestamp2Date timestamp2Date
} from 'utils/dateUtils'; } from 'utils/dateUtils';
import { import {
getAllZone getAllZone
} from 'api/base_info/constant/'; } from 'api/base_info/constant/';
import { import {
formatDate formatDate
} from '../../../utils/dateFormattor'; } from '../../../utils/dateFormattor';
export default { export default {
name: 'branchCompanyStock', name: 'branchCompanyStock',
components: { components: {
...@@ -152,69 +155,69 @@ ...@@ -152,69 +155,69 @@
}, },
data() { data() {
return { return {
form: { form: {
couponAmount: undefined, couponAmount: undefined,
crtHost: undefined, crtHost: undefined,
crtName: undefined, crtName: undefined,
crtTime: undefined, crtTime: undefined,
crtUser: undefined, crtUser: undefined,
detailId: undefined, detailId: undefined,
endCompanyName: undefined, endCompanyName: undefined,
goodsAmount: undefined, goodsAmount: undefined,
hasDiscount: undefined, hasDiscount: undefined,
hasMemberRight: undefined, hasMemberRight: undefined,
hasPay: undefined, hasPay: undefined,
id: undefined, id: undefined,
name: undefined, name: undefined,
no: undefined, no: undefined,
orderAmount: undefined, orderAmount: undefined,
orderOrigin: undefined, orderOrigin: undefined,
orderTourDetail: { orderTourDetail: {
adultNum: undefined, adultNum: undefined,
childNum: undefined, childNum: undefined,
contactEmail: undefined, contactEmail: undefined,
contactMan: undefined, contactMan: undefined,
contactPhone: undefined, contactPhone: undefined,
costDetail: undefined, costDetail: undefined,
crtTime: undefined, crtTime: undefined,
dayNum: undefined, dayNum: undefined,
endAddr: undefined, endAddr: undefined,
endTime: undefined, endTime: undefined,
goodId: undefined, goodId: undefined,
hasInsure: undefined, hasInsure: undefined,
id: undefined, id: undefined,
isOutside: undefined, isOutside: undefined,
orderId: undefined, orderId: undefined,
siteId: undefined, siteId: undefined,
spePriceId: undefined, spePriceId: undefined,
startAddr: undefined, startAddr: undefined,
startCity: undefined, startCity: undefined,
startCityName: undefined, startCityName: undefined,
startCompanyId: undefined, startCompanyId: undefined,
startTime: undefined, startTime: undefined,
totalNumber: undefined, totalNumber: undefined,
tourUserIds: undefined, tourUserIds: undefined,
updTime: undefined, updTime: undefined,
verificationId: undefined verificationId: undefined
}, },
payOrigin: undefined, payOrigin: undefined,
picture: undefined, picture: undefined,
realAmount: undefined, realAmount: undefined,
refundStatus: undefined, refundStatus: undefined,
startCompanyName: undefined, startCompanyName: undefined,
status: undefined, status: undefined,
ststusName:undefined, ststusName: undefined,
telephone: undefined, telephone: undefined,
type: undefined, type: undefined,
updTime: undefined, updTime: undefined,
userId: undefined, userId: undefined,
username: undefined, username: undefined,
vehicleNumberPlat: undefined, vehicleNumberPlat: undefined,
version: undefined, version: undefined,
}, },
detailVisible:false, detailVisible: false,
bannerDialogVisible: false,//添加、编辑弹框 bannerDialogVisible: false,//添加、编辑弹框
modalTitle: '订单详情', modalTitle: '订单详情',
rules: { rules: {
// companyName: [ // companyName: [
// { // {
...@@ -241,43 +244,43 @@ ...@@ -241,43 +244,43 @@
list: null, list: null,
total: null, total: null,
listLoading: true, listLoading: true,
listQuery: { listQuery: {
page: 1, page: 1,
limit: 20, limit: 20,
type: 2, type: 2,
no: null, no: undefined,
phone:null, phone: undefined,
status:null, status: null,
startTime: undefined, startTime: undefined,
endTime:undefined, endTime: undefined,
zoneId:undefined, zoneId: undefined,
startCompanyId: undefined startCompanyId: undefined
}, },
tourRow: {},//旅游订单详情-当前行 tourRow: {},//旅游订单详情-当前行
//"{"key":"费用明细","val":"","children":[{"key":"成人价格","detail":"¥13800.00/人×1人","val":"¥13800.00"}]}" //"{"key":"费用明细","val":"","children":[{"key":"成人价格","detail":"¥13800.00/人×1人","val":"¥13800.00"}]}"
costDetail:{ costDetail: {
key:undefined, key: undefined,
val:undefined, val: undefined,
children:[ children: [
{ {
key:undefined, key: undefined,
detail:undefined, detail: undefined,
val:undefined val: undefined
} }
] ]
}, },
baranchQuery: { baranchQuery: {
zoneId:null zoneId: null
}, },
dialogFormVisible: false, dialogFormVisible: false,
dialogStatus: '', dialogStatus: '',
btn_del: true, btn_del: true,
btn_buy: true, btn_buy: true,
btn_cancel: true, btn_cancel: true,
allBranchCompany:[], allBranchCompany: [],
tourCostDetail:'', tourCostDetail: '',
insureDetail:'',//保险 insureDetail: '',//保险
tableKey: 0, tableKey: 0,
tourDialogVisible: false,//旅游详情 tourDialogVisible: false,//旅游详情
} }
...@@ -293,10 +296,10 @@ ...@@ -293,10 +296,10 @@
provinceRegions() { provinceRegions() {
return getSonRegionByCodes(1); return getSonRegionByCodes(1);
}, },
//获取大区列表 //获取大区列表
getAllZoneList(){ getAllZoneList() {
return getAllZone(); return getAllZone();
}, },
cityRegions() { cityRegions() {
if (!this.$utils.isInteger(this.form.addrProvince)) { if (!this.$utils.isInteger(this.form.addrProvince)) {
return null; return null;
...@@ -305,26 +308,26 @@ ...@@ -305,26 +308,26 @@
} }
}, },
methods: { methods: {
/** /**
* 操作-查看详情按钮,显示详情弹框 * 操作-查看详情按钮,显示详情弹框
*/ */
detailInquiry(row){ detailInquiry(row) {
this.currentRow = row; this.currentRow = row;
this.detailVisible = true; this.detailVisible = true;
}, },
/** /**
* 关闭违章查询弹框 * 关闭违章查询弹框
* */ * */
detailEvent(params){ detailEvent(params) {
this.detailVisible = false; this.detailVisible = false;
if(params){ if (params) {
console.log(params); console.log(params);
} }
}, },
/** /**
* 旅游订单详情弹框关闭 * 旅游订单详情弹框关闭
* */ * */
tourOrderDetailDialogEvent(e){ tourOrderDetailDialogEvent(e) {
this.tourDialogVisible = false; this.tourDialogVisible = false;
}, },
/** /**
...@@ -335,18 +338,18 @@ ...@@ -335,18 +338,18 @@
this.tourRow = row; this.tourRow = row;
this.tourDialogVisible = true; this.tourDialogVisible = true;
}, },
getProvinceRegions(item) { getProvinceRegions(item) {
this.listQuery.zoneId = item this.listQuery.zoneId = item
this.baranchQuery.zoneId = item this.baranchQuery.zoneId = item
this.listQuery.startCompanyId = undefined; this.listQuery.startCompanyId = undefined;
getAllBranchCompanyByZoneId(this.baranchQuery) getAllBranchCompanyByZoneId(this.baranchQuery)
.then(response => { .then(response => {
this.allBranchCompany = response.data; this.allBranchCompany = response.data;
}) })
}, },
getAllBranchCompanyChange(item) { getAllBranchCompanyChange(item) {
this.listQuery.startCompanyId = item this.listQuery.startCompanyId = item
}, },
handleCancel(row) { handleCancel(row) {
this.$confirm('此操作将放弃购买, 是否继续?', '提示', { this.$confirm('此操作将放弃购买, 是否继续?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
...@@ -386,41 +389,41 @@ ...@@ -386,41 +389,41 @@
}); });
}); });
}, },
handleFilter() { handleFilter() {
this.listQuery.page = 1; this.listQuery.page = 1;
this.$refs.queryForm.validate(valid => { this.$refs.queryForm.validate(valid => {
if (valid) { if (valid) {
this.getList(); this.getList();
} else { } else {
return false; return false;
} }
}); });
}, },
clearSearch() { clearSearch() {
this.listQuery ={ this.listQuery = {
page: 1, page: 1,
limit: 20, limit: 20,
type: 2, type: 2,
no: null, no: null,
phone:null, phone: null,
status:null, status: null,
startTime: undefined, startTime: undefined,
endTime:undefined, endTime: undefined,
zoneId:undefined, zoneId: undefined,
startCompanyId: undefined startCompanyId: undefined
} }
this.getList() this.getList()
}, },
getList() { getList() {
this.listLoading = true; this.listLoading = true;
console.log(this.listQuery) console.log(this.listQuery)
// if(this.listQuery.startTime){ // if(this.listQuery.startTime){
// this.listQuery.startTime = this.listQuery.startTime.getTime(); // this.listQuery.startTime = this.listQuery.startTime.getTime();
// } // }
// if(this.listQuery.endTime){ // if(this.listQuery.endTime){
// this.listQuery.endTime = this.listQuery.endTime.getTime(); // this.listQuery.endTime = this.listQuery.endTime.getTime();
// } // }
page(this.listQuery) page(this.listQuery)
.then(response => { .then(response => {
this.list = response.data.data; this.list = response.data.data;
...@@ -432,10 +435,10 @@ ...@@ -432,10 +435,10 @@
this.listQuery.limit = val; this.listQuery.limit = val;
this.getList(); this.getList();
}, },
dateFormat(timestamp) { dateFormat(timestamp) {
let date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000 let date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
return formatDate(date, 'yyyy-MM-dd'); return formatDate(date, 'yyyy-MM-dd');
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.listQuery.page = val; this.listQuery.page = val;
this.getList(); this.getList();
...@@ -444,22 +447,25 @@ ...@@ -444,22 +447,25 @@
} }
</script> </script>
<style> <style>
.label-text{ .label-text {
margin-left: 10px; margin-left: 10px;
margin-right: 20px; margin-right: 20px;
} }
.label-title{
margin-top: 10px; .label-title {
} margin-top: 10px;
.orderDetail tr td{ }
width: 500px;
text-align: center; .orderDetail tr td {
border: 0.0625rem solid; width: 500px;
margin-left: 100px; text-align: center;
margin-right: 100px; border: 0.0625rem solid;
} margin-left: 100px;
.label-value{ margin-right: 100px;
margin-left: 80px; }
margin-right: 100px;
} .label-value {
margin-left: 80px;
margin-right: 100px;
}
</style> </style>
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