刘翔宇-旅管家 3 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>
@ -28,7 +39,23 @@
<div v-if="scope.row[column.field]==2"></div> <div v-if="scope.row[column.field]==2"></div>
<div v-if="scope.row[column.field]==3"></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=='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>
@ -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: {
@ -158,11 +190,27 @@
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;

@ -7,27 +7,21 @@
<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"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="至"
start-placeholder="参观开始时间"
end-placeholder="参观结束时间">
</el-date-picker> </el-date-picker>
<el-date-picker <el-select style="margin-left: 10px;margin-right: 10px;" v-model="searchFields.time" placeholder="预约时段">
class="vm10" <el-option value="">
v-model="orderRange" </el-option>
value-format="yyyy-MM-dd" <el-option v-for="item in parameters.visittime" :key="item.id" :label="item.value" :value="item.value">
type="daterange" </el-option>
range-separator="至"
start-placeholder="订单开始时间" </el-select>
end-placeholder="订单结束时间"> <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-date-picker>
<el-select class="vm10 vm15" v-model="searchFields.type" placeholder="请选择类型"> <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" <el-option v-for="item in parameters.type_list" :key="item.id" :label="item.value" :value="item.id">
:value="item.id">
</el-option> </el-option>
</el-select> </el-select>
<Input class="inputwrap" v-model="searchFields.keyword" placeholder="请输入关键词" /> <Input class="inputwrap" v-model="searchFields.keyword" placeholder="请输入关键词" />
@ -47,7 +41,7 @@
: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>
@ -87,14 +81,39 @@
data() { data() {
return { return {
parameters: { parameters: {
type_list:[{ 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: '团体', value: '团体',
id: "1" id: "1"
},{ }, {
value: '个人', value: '个人',
id: "2" id: "2"
}], }],
status_list:[{ status_list: [{
value: '待参观', value: '待参观',
id: "1" id: "1"
}, { }, {
@ -103,27 +122,28 @@
}, { }, {
value: '已取消', value: '已取消',
id: "0" id: "0"
},{ }, {
value: '已过期', value: '已过期',
id: "3" id: "3"
}] }]
}, },
tableHeight: 0, tableHeight: 0,
clientHeight:0, clientHeight: 0,
// //
visitRange:['',''], visitRange: ['', ''],
orderRange:['',''], orderRange: ['', ''],
tokens:"", tokens: "",
baseurl:"", baseurl: "",
searchFields: { 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: "",
time: ""
}, },
tableData: [], tableData: [],
paginations: { paginations: {
@ -135,72 +155,72 @@
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
} }
] ]
@ -220,44 +240,50 @@
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,
time: this.searchFields.time
}).then(res => { }).then(res => {
if(that.searchFields.is_export==1){ let tokens = getToken();
var url = "api/admin/visit/order-detail-index?token="+that.tokens console.log(is_export)
for(var m in that.searchFields){ console.log(tokens)
url +="&"+m+"="+that.searchFields[m] 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 url = that.baseurl + url
console.log(url) console.log(url)
window.open(url, '_blank') window.open("http://" + url, '_blank')
that.searchFields.is_export=0 that.searchFields.is_export = 0
return; return;
} }
let _data = []; let _data = [];
// let result = Object.assign(_data, res.data); // let result = Object.assign(_data, res.data);
for(var m of res.data){ for (var m of res.data) {
var mod ={}; var mod = {};
mod.date = m.visit_order.date +" "+ m.visit_order.time mod.date = m.visit_order.date + " " + m.visit_order.time
mod.leader = m.visit_order.type==1 ? m.visit_order.leader : m.name mod.leader = m.visit_order.type == 1 ? m.visit_order.leader : m.name
mod.mobile = m.visit_order.mobile mod.mobile = m.visit_order.mobile
mod.typeName = m.visit_order.type==1 ? "团体" : "个人" mod.typeName = m.visit_order.type == 1 ? "团体" : "个人"
mod.unit = m.visit_order.type==1 ? m.visit_order.unit : "无" mod.unit = m.visit_order.type == 1 ? m.visit_order.unit : "无"
mod.person = m.name mod.person = m.name
mod.personmobile = m.mobile mod.personmobile = m.mobile
mod.created_at = m.created_at mod.created_at = m.created_at
@ -271,42 +297,41 @@
}) })
}, },
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;
@ -317,25 +342,29 @@
</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 {
line-height: 40px !important;
} }
.vm10{
.vm10 {
vertical-align: middle; vertical-align: middle;
margin:10px; margin: 10px;
margin-left:0; margin-left: 0;
width: 360px !important; width: 360px !important;
} }
.vm15{
.vm15 {
width: 150px !important; 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>
@ -66,10 +83,10 @@
</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>
@ -166,21 +183,46 @@
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"
}, {
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"
}], }],
status_list:[{ cardType: [{
id: 1,
value: "身份证"
}, {
id: 2,
value: "护照"
}],
status_list: [{
value: '待参观', value: '待参观',
id: "1" id: "1"
}, { }, {
@ -189,16 +231,19 @@
}, { }, {
value: '已取消', value: '已取消',
id: "0" id: "0"
},{ }, {
value: '已过期', value: '已过期',
id: "3" id: "3"
}] }]
}, },
tableHeight: 0, tableHeight: 0,
clientHeight:0, clientHeight: 0,
// //
searchFields: { searchFields: {
name: "" keyword: "",
date: "",
type: "",
time: ""
}, },
tableData: [], tableData: [],
paginations: { paginations: {
@ -207,12 +252,12 @@
total: 0 total: 0
}, },
form: { form: {
date:"", date: "",
card_type: "", card_type: "",
rule_id: "", rule_id: "",
unit: "", unit: "",
card_type:"", card_type: "",
leader:"", leader: "",
idcard: "", idcard: "",
total: "", total: "",
mobile: "", mobile: "",
@ -222,49 +267,49 @@
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: "操作",
@ -296,7 +341,11 @@
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,
date: this.searchFields.date,
type: this.searchFields.type,
keyword: this.searchFields.keyword,
time: this.searchFields.time
}).then(res => { }).then(res => {
this.tableData = res.data; this.tableData = res.data;
this.paginations.total = res.total this.paginations.total = res.total

@ -47,6 +47,7 @@ module.exports = {
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