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

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

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

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

Loading…
Cancel
Save