刘翔宇-旅管家 3 years ago
parent c1ae040734
commit 822b943581

@ -6,15 +6,30 @@
<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>
<Input style="width: 200px; margin-right: 10px" v-model="searchFields.name" placeholder="关键字搜索" /> <div>
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button> <el-date-picker class="vm10" v-model="visitRange" value-format="yyyy-MM-dd" type="daterange"
</div> 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.activity_name" placeholder="请输入活动名称" />
<el-select style="margin-right: 10px;width: 120px;" v-model="searchFields.status" placeholder="请选择状态">
<el-option value="">
</el-option>
<el-option v-for="item in parameters.status_list" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
<Button type="primary" style="margin-right:10px" @click="searchload"></Button>
</div>
</slot> </slot>
</LxHeader> </LxHeader>
</div> </div>
<div class="table-tree"> <div class="table-tree">
<el-table :data="tableData" :height="tableHeight" style="width: 100%"> <el-table :data="tableData" class="v-table" :height="tableHeight" style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号"> </el-table-column> <el-table-column type="index" width="50" align="center" label="序号"> </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"> :label="column.title" :width="column.width">
@ -183,15 +198,29 @@
}, { }, {
value: '已过期', value: '已过期',
id: "3" id: "3"
}] }],
type_list: [{
value: '团体',
id: "1"
}, {
value: '个人',
id: "2"
}],
}, },
tableHeight: 0, tableHeight: 0,
clientHeight: 0, clientHeight: 0,
// //
searchFields: { searchFields: {
name: "" keyword: "",
}, start_date: "",
end_date: "",
is_export: 0,
type: "",
activity_name: "",
status: ""
},
visitRange:null,
tableData: [], tableData: [],
paginations: { paginations: {
page: 1, page: 1,
@ -269,6 +298,16 @@
}, },
mounted() {}, mounted() {},
methods: { methods: {
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 = ""
}
this.load()
},
initLoad() { initLoad() {
var that = this; var that = this;
var clientHeight = document.documentElement.clientHeight var clientHeight = document.documentElement.clientHeight
@ -288,7 +327,8 @@
listactiveorder({ listactiveorder({
page: this.paginations.page, page: this.paginations.page,
page_size: this.paginations.page_size, page_size: this.paginations.page_size,
activity_id: activityId activity_id: activityId,
...this.searchFields
}).then(res => { }).then(res => {
this.tableData = res.data; this.tableData = res.data;
this.paginations.total = res.total this.paginations.total = res.total
@ -324,3 +364,31 @@
} }
}; };
</script> </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>

@ -8,24 +8,14 @@
<slot> <slot>
<div> <div>
<el-date-picker class="vm10" v-model="visitRange" value-format="yyyy-MM-dd" type="daterange" <el-date-picker class="vm10" v-model="visitRange" value-format="yyyy-MM-dd" type="daterange"
range-separator="至" start-placeholder="参观开始时间" end-placeholder="参观结束时间"> 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-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" :value="item.id"> <el-option v-for="item in parameters.type_list" :key="item.id" :label="item.value" :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="请输入关键词" />
<Input class="inputwrap" v-model="searchFields.unit" placeholder="请输入单位" /> <Input class="inputwrap" v-model="searchFields.activity_name" placeholder="请输入活动名称" />
<el-select style="margin-right: 10px;width: 120px;" v-model="searchFields.status" placeholder="请选择状态"> <el-select style="margin-right: 10px;width: 120px;" v-model="searchFields.status" placeholder="请选择状态">
<el-option value=""> <el-option value="">
</el-option> </el-option>
@ -41,7 +31,7 @@
</LxHeader> </LxHeader>
</div> </div>
<div class="table-tree"> <div class="table-tree">
<el-table :data="tableData" :height="tableHeight" style="width: 100%"> <el-table :data="tableData" class="v-table" :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">
@ -144,12 +134,9 @@
keyword: "", keyword: "",
start_date: "", start_date: "",
end_date: "", end_date: "",
order_start_date: "",
order_end_date: "",
is_export: 0, is_export: 0,
type: "", type: "",
unit: "", activity_name: "",
time: "",
status: "" status: ""
}, },
tableData: [], tableData: [],
@ -160,28 +147,37 @@
}, },
columns: [{ columns: [{
field: "date", field: "date",
title: "预约日期", title: "活动时间",
type: "date", type: "format",
width: 180, width: 260,
align: "center",
fixed: "left" fixed: "left"
}, },
{ {
field: "person", field: "activity_name",
title: "预约人", title: "活动名称",
type: "string", type: "string",
align: "center", align: "left",
width: 120 width: 220,
fixed: "left"
}, },
{ {
field: "name", field: "name",
title: "游客", title: "参与人",
type: "string", type: "string",
align: "center", align: "center",
width: 120 width: 120
}, },
{ {
field: "personmobile", field: "mobile",
title: "游客电话", title: "联系电话",
type: "string",
align: "center",
width: 180,
},
{
field: "idcard",
title: "证件号",
type: "string", type: "string",
align: "center", align: "center",
width: 180, width: 180,
@ -200,13 +196,6 @@
align: "center", align: "center",
width: 120 width: 120
}, },
{
field: "mobile",
title: "联系电话",
type: "string",
align: "center",
width: 180,
},
{ {
field: "unit", field: "unit",
title: "单位", title: "单位",
@ -276,10 +265,13 @@
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 = {}; m.date = m.activity_order.activity.start_time + "至" + this.$moment(m.activity_order.activity
.end_time).format("HH:mm:ss");
mod.status = m.status m.activity_name = m.activity_order.activity.name;
_data.push(m) m.typeName = m.activity_order.type == 1 ? "团体" : "个人"
m.unit = m.activity_order.type == 1 ? m.activity_order.unit : "无"
m.leader = m.activity_order.type == 1 ? m.activity_order.leader : "无"
_data.push(m);
} }
that.tableData = _data; that.tableData = _data;
that.paginations.total = res.total that.paginations.total = res.total
@ -295,13 +287,6 @@
this.searchFields.start_date = "" this.searchFields.start_date = ""
this.searchFields.end_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() this.load()
}, },
resetload() { resetload() {

@ -34,7 +34,7 @@
</LxHeader> </LxHeader>
</div> </div>
<div class="table-tree"> <div class="table-tree">
<el-table :data="tableData" :height="tableHeight" style="width: 100%"> <el-table :data="tableData" class="v-table" :height="tableHeight" style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号"> </el-table-column> <el-table-column type="index" width="50" align="center" label="序号"> </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"> :label="column.title" :width="column.width">
@ -191,7 +191,8 @@
columns: [{ columns: [{
field: "time", field: "time",
title: "预约时间", title: "预约时间",
type: "string", type: "string",
}, },
{ {
field: "plate", field: "plate",

@ -41,7 +41,7 @@
</LxHeader> </LxHeader>
</div> </div>
<div class="table-tree"> <div class="table-tree">
<el-table :data="tableData" :height="tableHeight" style="width: 100%"> <el-table :data="tableData" class="v-table" :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">
@ -162,7 +162,7 @@
field: "date", field: "date",
title: "预约日期", title: "预约日期",
type: "date", type: "date",
width: 180, width: 220,
fixed: "left" fixed: "left"
}, },
{ {

@ -31,13 +31,14 @@
<el-option v-for="item in parameters.status_list" :key="item.id" :label="item.value" :value="item.id"> <el-option v-for="item in parameters.status_list" :key="item.id" :label="item.value" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button> <Button type="primary" @click="load(false)" style="margin-left: 10px">查询</Button>
<Button type="primary" @click="exportExcel" style="margin-left: 10px">导出</Button>
</div> </div>
</slot> </slot>
</LxHeader> </LxHeader>
</div> </div>
<div class="table-tree"> <div class="table-tree">
<el-table :data="tableData" :height="tableHeight" style="width: 100%"> <el-table :data="tableData" class="v-table" :height="tableHeight" style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号"> </el-table-column> <el-table-column type="index" width="50" align="center" label="序号"> </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"> :label="column.title" :width="column.width">
@ -180,6 +181,9 @@
listvisitorder, listvisitorder,
get get
} from "../../api/order/visitorder.js"; } from "../../api/order/visitorder.js";
import {
getToken
} from '@/utils/auth'
export default { export default {
components: { components: {
LxHeader LxHeader
@ -250,7 +254,8 @@
date: "", date: "",
type: "", type: "",
time: "", time: "",
status: "" status: "",
is_export: 0
}, },
tableData: [], tableData: [],
paginations: { paginations: {
@ -258,6 +263,7 @@
page_size: 15, page_size: 15,
total: 0 total: 0
}, },
baseurl: "",
form: { form: {
date: "", date: "",
card_type: "", card_type: "",
@ -274,7 +280,14 @@
field: "date", field: "date",
title: "预约日期", title: "预约日期",
type: "date", type: "date",
width: 180 width: 210
},
{
field: "unit",
title: "预约单位",
type: "string",
align: "left",
width: 200
}, },
{ {
field: "leader", field: "leader",
@ -310,7 +323,8 @@
field: "created_at", field: "created_at",
title: "下单时间", title: "下单时间",
type: "string", type: "string",
align: "center" align: "center",
width: 210
}, },
{ {
field: "status", field: "status",
@ -341,21 +355,39 @@
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.baseurl = location.host; //process.env.VUE_APP_BASE_API
that.tableHeight = tableHeight; that.tableHeight = tableHeight;
}, },
load() { load(isExcel) {
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,
...this.searchFields ...this.searchFields
}).then(res => { }).then(res => {
console.log("isExcel", isExcel)
let tokens = getToken();
if (isExcel) {
var url = "/api/admin/visit/order-index?token=" + tokens
console.log(url)
for (var m in that.searchFields) {
url += "&" + m + "=" + that.searchFields[m]
}
url = that.baseurl + url
window.open("https://" + url, '_blank')
that.searchFields.is_export = 0
return;
}
this.tableData = res.data; this.tableData = res.data;
this.paginations.total = res.total this.paginations.total = res.total
}).catch(error => { }).catch(error => {
}) })
}, },
exportExcel() {
this.searchFields.is_export = 1;
this.load(true);
},
show(obj) { show(obj) {
this.clientHeight = document.documentElement.clientHeight - 84 - 110; this.clientHeight = document.documentElement.clientHeight - 84 - 110;
this.dialogViewVisible = true; this.dialogViewVisible = true;

@ -46,8 +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/', 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