刘翔宇-旅管家 3 years ago
parent 3d160a1618
commit 7eef4d9818

@ -7,7 +7,18 @@
<div slot="content"></div>
<slot>
<div>
<Input style="width: 200px; margin-right: 10px" v-model="searchFields.name" placeholder="关键字搜索" />
<el-input style="width: 200px;" v-model="searchFields.keyword" placeholder="关键字搜索" />
<el-date-picker v-model="searchFields.date" value-format="yyyy-MM-dd" type="date" placeholder="预约日期"
style="margin-left: 10px;">
</el-date-picker>
<el-select style="margin-left: 10px;" v-model="searchFields.type" placeholder="请选择类型">
<el-option value="">
</el-option>
<el-option v-for="item in parameters.parkType" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
</div>
</slot>
@ -22,13 +33,29 @@
<div v-if="column.type=='opt'">
<Button ghost size="small" @click="show(scope.row)" type="primary"
style="margin-left: 10px;">查看</Button>
</div>
<div v-else-if="column.type=='type'">
<div v-if="scope.row[column.field]==1"></div>
<div v-if="scope.row[column.field]==2"></div>
<div v-if="scope.row[column.field]==3"></div>
</div>
<div v-else>{{scope.row[column.field]}}</div>
<div v-else-if="column.type=='type'">
<div v-if="scope.row[column.field]==1"></div>
<div v-if="scope.row[column.field]==2"></div>
<div v-if="scope.row[column.field]==3"></div>
</div>
<div v-else-if="column.type=='format'">
<div v-if="column.field=='orderType'">
{{scope.row["visit_order"]?"参观预约":"活动预约"}}
</div>
<div v-if="column.field=='teamType'">
{{scope.row["visit_order"].type=="1"?"团队":"个人"}}
</div>
<div v-if="column.field=='teamunit'">
{{scope.row["visit_order"].unit?scope.row["visit_order"].unit:"无"}}
</div>
</div>
<div v-else>
{{scope.row[column.field]}}
</div>
</template>
</el-table-column>
</el-table>
@ -64,9 +91,9 @@
</div>
<div v-if="form.type==2">
大车位
</div>
<div v-if="form.type==3">
残疾人车位
</div>
<div v-if="form.type==3">
残疾人车位
</div>
</el-form-item>
<el-form-item label="车辆类型" prop="car_type">
@ -109,6 +136,9 @@
}, {
id: 2,
value: "大车位"
}, {
id: 3,
value: "残疾人车位"
}],
carType: [{
id: 1,
@ -122,7 +152,9 @@
clientHeight: 0,
//
searchFields: {
name: ""
keyword: "",
date: "",
type: ""
},
tableData: [],
paginations: {
@ -147,22 +179,38 @@
field: "plate",
title: "车牌号",
type: "string",
},
{
field: "type",
title: "车位类型",
type: "type",
},
{
field: "type",
title: "车位类型",
type: "type",
},
{
field: "mobile",
title: "联系方式",
type: "string",
},
{
field: "orderType",
title: "关联类型",
type: "format",
},
{
field: "teamType",
title: "类型",
type: "format",
},
{
field: "teamunit",
title: "团队名称",
type: "format",
},
{
field: "操作",
title: "操作",
width: 220,
type: "opt",
fixed: "right"
}
]
@ -192,7 +240,8 @@
listparkorder({
page: this.paginations.page,
page_size: this.paginations.page_size,
car_park_id: carId
car_park_id: carId,
...this.searchFields
}).then(res => {
this.tableData = res.data;
this.paginations.total = res.total
@ -200,9 +249,6 @@
})
},
show(obj) {
this.clientHeight = document.documentElement.clientHeight - 84 - 110;

@ -6,35 +6,29 @@
<LxHeader icon="md-apps" text="参观游客" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content"></div>
<slot>
<div>
<el-date-picker
class="vm10"
v-model="visitRange"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="至"
start-placeholder="参观开始时间"
end-placeholder="参观结束时间">
</el-date-picker>
<el-date-picker
class="vm10"
v-model="orderRange"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="至"
start-placeholder="订单开始时间"
end-placeholder="订单结束时间">
</el-date-picker>
<el-select class="vm10 vm15" v-model="searchFields.type" placeholder="请选择类型">
<el-option v-for="item in parameters.type_list" :key="item.id" :label="item.value"
:value="item.id">
</el-option>
<div>
<el-date-picker class="vm10" v-model="visitRange" value-format="yyyy-MM-dd" type="daterange"
range-separator="至" start-placeholder="参观开始时间" end-placeholder="参观结束时间">
</el-date-picker>
<el-select style="margin-left: 10px;margin-right: 10px;" v-model="searchFields.time" placeholder="预约时段">
<el-option value="">
</el-option>
<el-option v-for="item in parameters.visittime" :key="item.id" :label="item.value" :value="item.value">
</el-option>
</el-select>
<el-date-picker class="vm10" v-model="orderRange" value-format="yyyy-MM-dd" type="daterange"
range-separator="至" start-placeholder="订单开始时间" end-placeholder="订单结束时间">
</el-date-picker>
<el-select class="vm10 vm15" v-model="searchFields.type" placeholder="请选择类型">
<el-option v-for="item in parameters.type_list" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
<Input class="inputwrap" v-model="searchFields.keyword" placeholder="请输入关键词" />
<Input class="inputwrap" v-model="searchFields.unit" placeholder="请输入单位" />
<Button type="primary" style="margin-right:10px" @click="searchload"></Button>
<Button type="primary" style="margin-right:10px" @click="resetload"></Button>
<Button type="primary" @click="exportExcel"></Button>
<Input class="inputwrap" v-model="searchFields.keyword" placeholder="请输入关键词" />
<Input class="inputwrap" v-model="searchFields.unit" placeholder="请输入单位" />
<Button type="primary" style="margin-right:10px" @click="searchload"></Button>
<Button type="primary" style="margin-right:10px" @click="resetload"></Button>
<Button type="primary" @click="exportExcel"></Button>
<!-- <Button type="primary" @click="searchload"></Button> -->
</div>
</slot>
@ -44,28 +38,28 @@
<el-table :data="tableData" :height="tableHeight" style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号" fixed="left"> </el-table-column>
<el-table-column :prop="column.field" :align="column.align" v-for="(column,index) in columns"
:label="column.title" :width="column.width" :fixed="column.fixed">
:label="column.title" :width="column.width" :fixed="column.fixed">
<template slot-scope="scope">
<div v-if="column.type=='status'" >
<div v-for="item in parameters.status_list">
<div v-if="item.id==scope.row[column.field]">
<el-tag v-if="scope.row[column.field]==1" type="warning">{{item.value}}</el-tag>
<el-tag v-if="scope.row[column.field]==2" type="success">{{item.value}}</el-tag>
<el-tag v-if="scope.row[column.field]==0" type="info">{{item.value}}</el-tag>
<el-tag v-if="scope.row[column.field]==3" type="info">{{item.value}}</el-tag>
</div>
</div>
</div>
<div v-else>{{scope.row[column.field]}}</div>
<template slot-scope="scope">
<div v-if="column.type=='status'">
<div v-for="item in parameters.status_list">
<div v-if="item.id==scope.row[column.field]">
<el-tag v-if="scope.row[column.field]==1" type="warning">{{item.value}}</el-tag>
<el-tag v-if="scope.row[column.field]==2" type="success">{{item.value}}</el-tag>
<el-tag v-if="scope.row[column.field]==0" type="info">{{item.value}}</el-tag>
<el-tag v-if="scope.row[column.field]==3" type="info">{{item.value}}</el-tag>
</div>
</div>
</div>
<div v-else>{{scope.row[column.field]}}</div>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination @current-change="handleCurrentChange" :current-page="paginations.page"
:page-size="paginations.page_size" background layout="prev, pager, next" :total="paginations.total">
</el-pagination>
</el-table>
<div class="pagination">
<el-pagination @current-change="handleCurrentChange" :current-page="paginations.page"
:page-size="paginations.page_size" background layout="prev, pager, next" :total="paginations.total">
</el-pagination>
</div>
</div>
</div>
@ -76,9 +70,9 @@
import LxHeader from "@/components/LxHeader/index.vue";
import {
listvisitor
} from "../../api/order/visitorder.js";
import {
getToken
} from "../../api/order/visitorder.js";
import {
getToken
} from '@/utils/auth'
export default {
components: {
@ -86,121 +80,147 @@
},
data() {
return {
parameters: {
type_list:[{
value: '团体',
id: "1"
},{
value: '个人',
id: "2"
}],
status_list:[{
value: '待参观',
id: "1"
}, {
value: '已参观',
id: "2"
}, {
value: '已取消',
id: "0"
},{
value: '已过期',
id: "3"
}]
},
tableHeight: 0,
clientHeight:0,
//
visitRange:['',''],
orderRange:['',''],
tokens:"",
baseurl:"",
searchFields: {
keyword: "",
start_date:"",
end_date:"",
order_start_date:"",
order_end_date:"",
is_export:0,
type:"",
unit:""
},
tableData: [],
paginations: {
page: 1,
page_size: 15,
total: 0
parameters: {
visittime: [{
value: "09:00-10:00",
id: "1"
}, {
value: "10:00-11:00",
id: "2"
}, {
value: "11:00-12:00",
id: "3"
}, {
value: "12:00-13:00",
id: "4"
}, {
value: "13:00-14:00",
id: "41"
}, {
value: "14:00-15:00",
id: "51"
}, {
value: "15:00-16:00",
id: "61"
}, {
value: "16:00-17:00",
id: "71"
}],
type_list: [{
value: '团体',
id: "1"
}, {
value: '个人',
id: "2"
}],
status_list: [{
value: '待参观',
id: "1"
}, {
value: '已参观',
id: "2"
}, {
value: '已取消',
id: "0"
}, {
value: '已过期',
id: "3"
}]
},
tableHeight: 0,
clientHeight: 0,
//
visitRange: ['', ''],
orderRange: ['', ''],
tokens: "",
baseurl: "",
searchFields: {
keyword: "",
start_date: "",
end_date: "",
order_start_date: "",
order_end_date: "",
is_export: 0,
type: "",
unit: "",
time: ""
},
tableData: [],
paginations: {
page: 1,
page_size: 15,
total: 0
},
columns: [{
field: "date",
title: "预约日期",
type: "date",
width:180,
fixed:"left"
},
{
field: "person",
title: "预约人",
type: "string",
align:"center",
width:120
},
{
field: "personmobile",
title: "游客电话",
type: "string",
align:"center",
width:180,
},
{
field: "is_disability",
title: "是否行动不便",
type: "string",
align:"center",
width:120
},
{
field: "typeName",
title: "类型",
type: "string",
align:"center",
width:120
},
{
field: "leader",
title: "领队人",
type: "string",
align:"center",
width:120
},
{
field: "mobile",
title: "联系电话",
type: "string",
align:"center",
width:180,
},
{
field: "unit",
title: "单位",
type: "string",
align:"center",
width:200,
},
{
field: "created_at",
title: "下单时间",
type: "string",
align:"center",
width:180,
},
{
field: "status",
title: "订单状态",
type: "status",
align:"center",
fixed:"right",
width:120
type: "date",
width: 180,
fixed: "left"
},
{
field: "person",
title: "预约人",
type: "string",
align: "center",
width: 120
},
{
field: "personmobile",
title: "游客电话",
type: "string",
align: "center",
width: 180,
},
{
field: "is_disability",
title: "是否行动不便",
type: "string",
align: "center",
width: 120
},
{
field: "typeName",
title: "类型",
type: "string",
align: "center",
width: 120
},
{
field: "leader",
title: "领队人",
type: "string",
align: "center",
width: 120
},
{
field: "mobile",
title: "联系电话",
type: "string",
align: "center",
width: 180,
},
{
field: "unit",
title: "单位",
type: "string",
align: "center",
width: 200,
},
{
field: "created_at",
title: "下单时间",
type: "string",
align: "center",
width: 180,
},
{
field: "status",
title: "订单状态",
type: "status",
align: "center",
fixed: "right",
width: 120
}
]
@ -219,123 +239,132 @@
var paginationHeight = 37; //
var topHeight = 50; //
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
that.tableHeight = tableHeight;
that.tokens = getToken()
that.baseurl = process.env.VUE_APP_BASE_API
console.log("aa",process.env)
that.tableHeight = tableHeight;
that.baseurl = location.host; //process.env.VUE_APP_BASE_API
console.log("aa", process.env)
},
load() {
load(is_export) {
console.log(is_export)
var that = this;
listvisitor({
page: this.paginations.page,
page_size: this.paginations.page_size,
keyword:this.searchFields.keyword,
start_date:this.searchFields.start_date,
is_export:this.searchFields.is_export,
end_date:this.searchFields.end_date,
order_start_date:this.searchFields.order_start_date,
order_end_date:this.searchFields.order_end_date,
type:this.searchFields.type,
unit:this.searchFields.unit
}).then(res => {
if(that.searchFields.is_export==1){
var url = "api/admin/visit/order-detail-index?token="+that.tokens
for(var m in that.searchFields){
url +="&"+m+"="+that.searchFields[m]
}
url = that.baseurl + url
console.log(url)
window.open(url, '_blank')
that.searchFields.is_export=0
return;
}
let _data = [];
// let result = Object.assign(_data, res.data);
for(var m of res.data){
var mod ={};
mod.date = m.visit_order.date +" "+ m.visit_order.time
mod.leader = m.visit_order.type==1 ? m.visit_order.leader : m.name
mod.mobile = m.visit_order.mobile
mod.typeName = m.visit_order.type==1 ? "团体" : "个人"
mod.unit = m.visit_order.type==1 ? m.visit_order.unit : "无"
mod.person = m.name
mod.personmobile = m.mobile
mod.created_at = m.created_at
mod.is_disability = m.is_disability == 0 ? "否" : "是"
mod.status = m.status
_data.push(mod)
}
that.tableData = _data;
that.paginations.total = res.total
}).catch(error => {
listvisitor({
page: this.paginations.page,
page_size: this.paginations.page_size,
keyword: this.searchFields.keyword,
start_date: this.searchFields.start_date,
//is_export: this.searchFields.is_export,
end_date: this.searchFields.end_date,
order_start_date: this.searchFields.order_start_date,
order_end_date: this.searchFields.order_end_date,
type: this.searchFields.type,
unit: this.searchFields.unit,
time: this.searchFields.time
}).then(res => {
let tokens = getToken();
console.log(is_export)
console.log(tokens)
console.log(that.searchFields.is_export)
if (is_export) {
var url = "/api/admin/visit/order-detail-index?token=" + tokens
console.log(url)
for (var m in that.searchFields) {
url += "&" + m + "=" + that.searchFields[m]
}
url = that.baseurl + url
console.log(url)
window.open("http://" + url, '_blank')
that.searchFields.is_export = 0
return;
}
let _data = [];
// let result = Object.assign(_data, res.data);
for (var m of res.data) {
var mod = {};
mod.date = m.visit_order.date + " " + m.visit_order.time
mod.leader = m.visit_order.type == 1 ? m.visit_order.leader : m.name
mod.mobile = m.visit_order.mobile
mod.typeName = m.visit_order.type == 1 ? "团体" : "个人"
mod.unit = m.visit_order.type == 1 ? m.visit_order.unit : "无"
mod.person = m.name
mod.personmobile = m.mobile
mod.created_at = m.created_at
mod.is_disability = m.is_disability == 0 ? "否" : "是"
mod.status = m.status
_data.push(mod)
}
that.tableData = _data;
that.paginations.total = res.total
}).catch(error => {
})
},
searchload(){
if(this.visitRange){
this.searchFields.start_date = this.visitRange[0]
this.searchFields.end_date = this.visitRange[1]
}else{
this.searchFields.start_date = ""
this.searchFields.end_date = ""
}
if(this.orderRange){
this.searchFields.order_start_date = this.orderRange[0]
this.searchFields.order_end_date = this.orderRange[1]
}else{
this.searchFields.order_start_date = ""
this.searchFields.order_end_date = ""
}
this.load()
},
resetload(){
this.searchFields = {
keyword: "",
start_date:"",
end_date:"",
order_start_date:"",
order_end_date:"",
// is_export:0,
type:"",
unit:""
},
this.visitRange = ['','']
this.orderRange = ['','']
this.load()
},
exportExcel(){
this.searchFields.is_export = 1
this.load()
},
handleCurrentChange(page) {
this.paginations.page = page;
this.load();
},
searchload() {
if (this.visitRange) {
this.searchFields.start_date = this.visitRange[0]
this.searchFields.end_date = this.visitRange[1]
} else {
this.searchFields.start_date = ""
this.searchFields.end_date = ""
}
if (this.orderRange) {
this.searchFields.order_start_date = this.orderRange[0]
this.searchFields.order_end_date = this.orderRange[1]
} else {
this.searchFields.order_start_date = ""
this.searchFields.order_end_date = ""
}
this.load()
},
resetload() {
this.searchFields = {
keyword: "",
start_date: "",
end_date: "",
order_start_date: "",
order_end_date: "",
// is_export:0,
type: "",
unit: ""
},
this.visitRange = ['', '']
this.orderRange = ['', '']
this.load()
},
exportExcel() {
this.searchFields.is_export = 1;
this.load(true);
},
handleCurrentChange(page) {
this.paginations.page = page;
this.load();
}
}
};
</script>
<style>
.inputwrap{
width:150px;
margin:10px;
margin-left:0;
}
.inputwrap input{
height:40px;
}
.inputwrap .ivu-input-suffix{
line-height: 40px!important;
}
.vm10{
vertical-align: middle;
margin:10px;
margin-left:0;
width: 360px !important;
}
.vm15{
width: 150px !important;
}
</script>
<style>
.inputwrap {
width: 150px;
margin: 10px;
margin-left: 0;
}
.inputwrap input {
height: 40px;
}
.inputwrap .ivu-input-suffix {
line-height: 40px !important;
}
.vm10 {
vertical-align: middle;
margin: 10px;
margin-left: 0;
width: 360px !important;
}
.vm15 {
width: 150px !important;
}
</style>

@ -7,7 +7,24 @@
<div slot="content"></div>
<slot>
<div>
<Input style="width: 200px; margin-right: 10px" v-model="searchFields.name" placeholder="关键字搜索" />
<el-input style="width: 200px;" v-model="searchFields.keyword" placeholder="关键字搜索" />
<el-date-picker v-model="searchFields.date" value-format="yyyy-MM-dd" type="date" placeholder="预约日期"
style="margin-left: 10px;">
</el-date-picker>
<el-select style="margin-left: 10px;" v-model="searchFields.time" placeholder="预约时段">
<el-option value="">
</el-option>
<el-option v-for="item in parameters.visittime" :key="item.id" :label="item.value" :value="item.value">
</el-option>
</el-select>
<el-select style="margin-left: 10px;" v-model="searchFields.type" placeholder="请选择类型">
<el-option value="">
</el-option>
<el-option v-for="item in parameters.visitType" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
</div>
</slot>
@ -22,139 +39,139 @@
<div v-if="column.type=='opt'">
<Button ghost size="small" @click="show(scope.row)" type="primary"
style="margin-left: 10px;">查看</Button>
</div>
<div v-else-if="column.type=='date'">
{{scope.row['date']+" "+scope.row['time']}}
</div>
<div v-else-if="column.type=='is_disability'">
<div v-if="scope.row[column.field]==0">
</div>
<el-tag v-if="scope.row[column.field]==1" type="success"></el-tag>
</div>
<div v-else-if="column.type=='type'" v-for="item in parameters.visitType">
<div v-if="item.id==scope.row[column.field]">
{{item.value}}
</div>
</div>
<div v-else-if="column.type=='status'" v-for="item in parameters.status_list">
<div v-if="item.id==scope.row[column.field]">
<el-tag v-if="scope.row[column.field]==1" type="warning">{{item.value}}</el-tag>
<el-tag v-if="scope.row[column.field]==2" type="success">{{item.value}}</el-tag>
<el-tag v-if="scope.row[column.field]==0" type="info">{{item.value}}</el-tag>
<el-tag v-if="scope.row[column.field]==3" type="info">{{item.value}}</el-tag>
</div>
</div>
<div v-else-if="column.type=='date'">
{{scope.row['date']+" "+scope.row['time']}}
</div>
<div v-else-if="column.type=='is_disability'">
<div v-if="scope.row[column.field]==0">
</div>
<el-tag v-if="scope.row[column.field]==1" type="success"></el-tag>
</div>
<div v-else-if="column.type=='type'" v-for="item in parameters.visitType">
<div v-if="item.id==scope.row[column.field]">
{{item.value}}
</div>
</div>
<div v-else-if="column.type=='status'" v-for="item in parameters.status_list">
<div v-if="item.id==scope.row[column.field]">
<el-tag v-if="scope.row[column.field]==1" type="warning">{{item.value}}</el-tag>
<el-tag v-if="scope.row[column.field]==2" type="success">{{item.value}}</el-tag>
<el-tag v-if="scope.row[column.field]==0" type="info">{{item.value}}</el-tag>
<el-tag v-if="scope.row[column.field]==3" type="info">{{item.value}}</el-tag>
</div>
</div>
<div v-else>{{scope.row[column.field]}}</div>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination @current-change="handleCurrentChange" :current-page="paginations.page"
:page-size="paginations.page_size" background layout="prev, pager, next" :total="paginations.total">
</el-pagination>
</el-table>
<div class="pagination">
<el-pagination @current-change="handleCurrentChange" :current-page="paginations.page"
:page-size="paginations.page_size" background layout="prev, pager, next" :total="paginations.total">
</el-pagination>
</div>
</div>
</div>
<el-dialog title="预约信息查看" :visible.sync="dialogViewVisible" fullscreen>
<div class="dialogConcent">
<el-scrollbar style="flex: 1">
<el-form :model="form" ref="form" label-position="right" :label-width="formLabelWidth">
<el-form-item label="预约日期" prop="date">
<div>
{{form.date+" "+form.time}}
</div>
</el-form-item>
<el-form-item label="类型" prop="type">
<el-tag v-if="form.type==1" type="" effect="dark" >
团体
</el-tag>
<el-tag v-if="form.type==2" type="" effect="dark" >
个人
</el-tag>
</el-form-item>
<el-form-item label="联系方式" prop="mobile">
<div>
{{form.mobile}}
</div>
</el-form-item>
<el-form-item v-if="form.type==1" label="单位名称" prop="unit">
<div>
{{form.unit}}
</div>
</el-form-item>
<el-form-item label="领队人" prop="leader">
<div>
{{form.leader}}
</div>
</el-form-item>
<el-form-item label="证件类型" prop="card_type">
<div v-if="form.card_type==1">
身份证
</div>
<div v-if="form.card_type==2">
护照
</div>
</el-form-item>
<el-form-item label="证件号" prop="idcard">
<div>
{{form.idcard}}
</div>
</el-form-item>
<el-form-item label="参观人数" prop="total">
<div>
{{form.total}}
</div>
</el-form-item>
<div style="padding: 20px 0px;" class="form-sub-title">
<span>详细人员资料
</span>
</div>
<div v-if="form.details_list.length>0" class="table-tree tableswidth">
<el-table :data="form.details_list" class="v-table" style="width: 100%;margin-bottom: 20px;">
<el-table-column type="index" label="序号" align="center">
</el-table-column>
<el-table-column width="200px" prop="name" label="姓名">
<template slot-scope="scope">
{{scope.row.name}}
</template>
</el-table-column>
<el-table-column prop="mobile" label="联系方式">
<template slot-scope="scope">
{{scope.row.mobile}}
</template>
</el-table-column>
<el-table-column prop="card_type" label="证件类型">
<template slot-scope="scope">
<div v-if="scope.row.card_type==1">
身份证
</div>
<div v-if="scope.row.card_type==2">
护照
</div>
</template>
</el-table-column>
<el-table-column prop="idcard" label="证件号">
<template slot-scope="scope">
{{scope.row.idcard}}
</template>
</el-table-column>
</el-table>
</div>
</el-form>
</el-scrollbar>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="resetForm('form')"> </el-button>
</div>
</el-dialog>
<el-dialog title="预约信息查看" :visible.sync="dialogViewVisible" fullscreen>
<div class="dialogConcent">
<el-scrollbar style="flex: 1">
<el-form :model="form" ref="form" label-position="right" :label-width="formLabelWidth">
<el-form-item label="预约日期" prop="date">
<div>
{{form.date+" "+form.time}}
</div>
</el-form-item>
<el-form-item label="类型" prop="type">
<el-tag v-if="form.type==1" type="" effect="dark">
团体
</el-tag>
<el-tag v-if="form.type==2" type="" effect="dark">
个人
</el-tag>
</el-form-item>
<el-form-item label="联系方式" prop="mobile">
<div>
{{form.mobile}}
</div>
</el-form-item>
<el-form-item v-if="form.type==1" label="单位名称" prop="unit">
<div>
{{form.unit}}
</div>
</el-form-item>
<el-form-item label="领队人" prop="leader">
<div>
{{form.leader}}
</div>
</el-form-item>
<el-form-item label="证件类型" prop="card_type">
<div v-if="form.card_type==1">
身份证
</div>
<div v-if="form.card_type==2">
护照
</div>
</el-form-item>
<el-form-item label="证件号" prop="idcard">
<div>
{{form.idcard}}
</div>
</el-form-item>
<el-form-item label="参观人数" prop="total">
<div>
{{form.total}}
</div>
</el-form-item>
<div style="padding: 20px 0px;" class="form-sub-title">
<span>详细人员资料
</span>
</div>
<div v-if="form.details_list.length>0" class="table-tree tableswidth">
<el-table :data="form.details_list" class="v-table" style="width: 100%;margin-bottom: 20px;">
<el-table-column type="index" label="序号" align="center">
</el-table-column>
<el-table-column width="200px" prop="name" label="姓名">
<template slot-scope="scope">
{{scope.row.name}}
</template>
</el-table-column>
<el-table-column prop="mobile" label="联系方式">
<template slot-scope="scope">
{{scope.row.mobile}}
</template>
</el-table-column>
<el-table-column prop="card_type" label="证件类型">
<template slot-scope="scope">
<div v-if="scope.row.card_type==1">
身份证
</div>
<div v-if="scope.row.card_type==2">
护照
</div>
</template>
</el-table-column>
<el-table-column prop="idcard" label="证件号">
<template slot-scope="scope">
{{scope.row.idcard}}
</template>
</el-table-column>
</el-table>
</div>
</el-form>
</el-scrollbar>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="resetForm('form')"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import LxHeader from "@/components/LxHeader/index.vue";
import {
listvisitorder,
listvisitorder,
get
} from "../../api/order/visitorder.js";
export default {
@ -166,111 +183,139 @@
dialogViewVisible: false,
formLabelWidth: "120px",
parameters: {
visitType:[{
id:1,
value:"团体"
},{
id:2,
value:"个人"
}],
cardType:[{
id:1,
value:"身份证"
},{
id:2,
value:"护照"
}],
status_list:[{
value: '待参观',
id: "1"
}, {
value: '已参观',
id: "2"
}, {
value: '已取消',
id: "0"
},{
value: '已过期',
id: "3"
visitType: [{
id: 1,
value: "团体"
}, {
id: 2,
value: "个人"
}],
visittime: [{
value: "09:00-10:00",
id: "1"
}, {
value: "10:00-11:00",
id: "2"
}, {
value: "11:00-12:00",
id: "3"
}, {
value: "12:00-13:00",
id: "4"
}, {
value: "13:00-14:00",
id: "41"
}, {
value: "14:00-15:00",
id: "51"
}, {
value: "15:00-16:00",
id: "61"
}, {
value: "16:00-17:00",
id: "71"
}],
cardType: [{
id: 1,
value: "身份证"
}, {
id: 2,
value: "护照"
}],
status_list: [{
value: '待参观',
id: "1"
}, {
value: '已参观',
id: "2"
}, {
value: '已取消',
id: "0"
}, {
value: '已过期',
id: "3"
}]
},
tableHeight: 0,
clientHeight:0,
//
searchFields: {
name: ""
},
tableData: [],
paginations: {
page: 1,
page_size: 15,
total: 0
},
form: {
date:"",
tableHeight: 0,
clientHeight: 0,
//
searchFields: {
keyword: "",
date: "",
type: "",
time: ""
},
tableData: [],
paginations: {
page: 1,
page_size: 15,
total: 0
},
form: {
date: "",
card_type: "",
rule_id: "",
unit: "",
card_type:"",
leader:"",
idcard: "",
total: "",
unit: "",
card_type: "",
leader: "",
idcard: "",
total: "",
mobile: "",
details_list: []
},
columns: [{
field: "date",
title: "预约日期",
type: "date",
width:180
},
{
field: "leader",
title: "联系人",
type: "string",
align:"center"
},
{
field: "mobile",
title: "联系电话",
type: "string",
align:"center"
},
{
field: "type",
title: "类型",
type: "type",
align:"center"
},
{
field: "total",
title: "人数",
type: "string",
align:"center"
},
{
field: "is_disability",
title: "是否有行动不便者",
type: "is_disability",
align:"center"
},
{
field: "created_at",
title: "下单时间",
type: "string",
align:"center"
},
{
field: "status",
title: "订单状态",
type: "status",
align:"center"
},
{
field: "操作",
title: "操作",
width: 120,
type: "opt",
type: "date",
width: 180
},
{
field: "leader",
title: "联系人",
type: "string",
align: "center"
},
{
field: "mobile",
title: "联系电话",
type: "string",
align: "center"
},
{
field: "type",
title: "类型",
type: "type",
align: "center"
},
{
field: "total",
title: "人数",
type: "string",
align: "center"
},
{
field: "is_disability",
title: "是否有行动不便者",
type: "is_disability",
align: "center"
},
{
field: "created_at",
title: "下单时间",
type: "string",
align: "center"
},
{
field: "status",
title: "订单状态",
type: "status",
align: "center"
},
{
field: "操作",
title: "操作",
width: 120,
type: "opt",
}
]
@ -293,15 +338,19 @@
},
load() {
var that = this;
listvisitorder({
page: this.paginations.page,
page_size: this.paginations.page_size,
name:this.searchFields.name
}).then(res => {
this.tableData = res.data;
this.paginations.total = res.total
}).catch(error => {
listvisitorder({
page: this.paginations.page,
page_size: this.paginations.page_size,
name: this.searchFields.name,
date: this.searchFields.date,
type: this.searchFields.type,
keyword: this.searchFields.keyword,
time: this.searchFields.time
}).then(res => {
this.tableData = res.data;
this.paginations.total = res.total
}).catch(error => {
})
},
show(obj) {
@ -311,22 +360,22 @@
},
info(obj) {
var that = this;
get(obj.id).then(res => {
let result = Object.assign(that.form, res);
that.form = result;
that.form.details_list = result.details;
}).catch(error => {
//reject(error)
get(obj.id).then(res => {
let result = Object.assign(that.form, res);
that.form = result;
that.form.details_list = result.details;
}).catch(error => {
//reject(error)
})
},
resetForm(formName) {
var that = this;
that.dialogViewVisible = false;
this.$refs[formName].resetFields();
},
handleCurrentChange(page) {
this.paginations.page = page;
this.load();
},
resetForm(formName) {
var that = this;
that.dialogViewVisible = false;
this.$refs[formName].resetFields();
},
handleCurrentChange(page) {
this.paginations.page = page;
this.load();
}
}
};

@ -46,7 +46,8 @@ module.exports = {
//before: require('./mock/mock-server.js'),
proxy: {
[process.env.VUE_APP_BASE_API]: {
target: 'https://dangxingjiaoyujidi.langye.net/',
target: 'https://dangxingjiaoyujidi.langye.net/',
//target: 'http://leyitest.ali251.langye.net/',
changeOrigin: true, //配置跨域
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''

Loading…
Cancel
Save