刘翔宇-旅管家 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">
<div slot="content"></div>
<slot>
<div>
<Input style="width: 200px; margin-right: 10px" v-model="searchFields.name" placeholder="关键字搜索" />
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
</div>
<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 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>
</LxHeader>
</div>
<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 :prop="column.field" :align="column.align" v-for="(column,index) in columns"
:label="column.title" :width="column.width">
@ -183,15 +198,29 @@
}, {
value: '已过期',
id: "3"
}]
}],
type_list: [{
value: '团体',
id: "1"
}, {
value: '个人',
id: "2"
}],
},
tableHeight: 0,
clientHeight: 0,
//
searchFields: {
name: ""
},
keyword: "",
start_date: "",
end_date: "",
is_export: 0,
type: "",
activity_name: "",
status: ""
},
visitRange:null,
tableData: [],
paginations: {
page: 1,
@ -269,6 +298,16 @@
},
mounted() {},
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() {
var that = this;
var clientHeight = document.documentElement.clientHeight
@ -288,7 +327,8 @@
listactiveorder({
page: this.paginations.page,
page_size: this.paginations.page_size,
activity_id: activityId
activity_id: activityId,
...this.searchFields
}).then(res => {
this.tableData = res.data;
this.paginations.total = res.total
@ -324,3 +364,31 @@
}
};
</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>
<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="订单结束时间">
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="请输入单位" />
<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>
@ -41,7 +31,7 @@
</LxHeader>
</div>
<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 :prop="column.field" :align="column.align" v-for="(column,index) in columns"
:label="column.title" :width="column.width" :fixed="column.fixed">
@ -144,12 +134,9 @@
keyword: "",
start_date: "",
end_date: "",
order_start_date: "",
order_end_date: "",
is_export: 0,
type: "",
unit: "",
time: "",
activity_name: "",
status: ""
},
tableData: [],
@ -160,28 +147,37 @@
},
columns: [{
field: "date",
title: "预约日期",
type: "date",
width: 180,
title: "活动时间",
type: "format",
width: 260,
align: "center",
fixed: "left"
},
{
field: "person",
title: "预约人",
field: "activity_name",
title: "活动名称",
type: "string",
align: "center",
width: 120
align: "left",
width: 220,
fixed: "left"
},
{
field: "name",
title: "游客",
title: "参与人",
type: "string",
align: "center",
width: 120
},
{
field: "personmobile",
title: "游客电话",
field: "mobile",
title: "联系电话",
type: "string",
align: "center",
width: 180,
},
{
field: "idcard",
title: "证件号",
type: "string",
align: "center",
width: 180,
@ -200,13 +196,6 @@
align: "center",
width: 120
},
{
field: "mobile",
title: "联系电话",
type: "string",
align: "center",
width: 180,
},
{
field: "unit",
title: "单位",
@ -276,10 +265,13 @@
let _data = [];
// let result = Object.assign(_data, res.data);
for (var m of res.data) {
var mod = {};
mod.status = m.status
_data.push(m)
m.date = m.activity_order.activity.start_time + "至" + this.$moment(m.activity_order.activity
.end_time).format("HH:mm:ss");
m.activity_name = m.activity_order.activity.name;
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.paginations.total = res.total
@ -295,13 +287,6 @@
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() {

@ -34,7 +34,7 @@
</LxHeader>
</div>
<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 :prop="column.field" :align="column.align" v-for="(column,index) in columns"
:label="column.title" :width="column.width">
@ -191,7 +191,8 @@
columns: [{
field: "time",
title: "预约时间",
type: "string",
type: "string",
},
{
field: "plate",

@ -41,7 +41,7 @@
</LxHeader>
</div>
<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 :prop="column.field" :align="column.align" v-for="(column,index) in columns"
:label="column.title" :width="column.width" :fixed="column.fixed">
@ -162,7 +162,7 @@
field: "date",
title: "预约日期",
type: "date",
width: 180,
width: 220,
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>
</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>
</slot>
</LxHeader>
</div>
<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 :prop="column.field" :align="column.align" v-for="(column,index) in columns"
:label="column.title" :width="column.width">
@ -180,6 +181,9 @@
listvisitorder,
get
} from "../../api/order/visitorder.js";
import {
getToken
} from '@/utils/auth'
export default {
components: {
LxHeader
@ -250,7 +254,8 @@
date: "",
type: "",
time: "",
status: ""
status: "",
is_export: 0
},
tableData: [],
paginations: {
@ -258,6 +263,7 @@
page_size: 15,
total: 0
},
baseurl: "",
form: {
date: "",
card_type: "",
@ -274,7 +280,14 @@
field: "date",
title: "预约日期",
type: "date",
width: 180
width: 210
},
{
field: "unit",
title: "预约单位",
type: "string",
align: "left",
width: 200
},
{
field: "leader",
@ -310,7 +323,8 @@
field: "created_at",
title: "下单时间",
type: "string",
align: "center"
align: "center",
width: 210
},
{
field: "status",
@ -341,21 +355,39 @@
var paginationHeight = 37; //
var topHeight = 50; //
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
that.baseurl = location.host; //process.env.VUE_APP_BASE_API
that.tableHeight = tableHeight;
},
load() {
load(isExcel) {
var that = this;
listvisitorder({
page: this.paginations.page,
page_size: this.paginations.page_size,
...this.searchFields
}).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.paginations.total = res.total
}).catch(error => {
})
},
exportExcel() {
this.searchFields.is_export = 1;
this.load(true);
},
show(obj) {
this.clientHeight = document.documentElement.clientHeight - 84 - 110;
this.dialogViewVisible = true;

@ -46,8 +46,8 @@ module.exports = {
//before: require('./mock/mock-server.js'),
proxy: {
[process.env.VUE_APP_BASE_API]: {
target: 'https://dangxingjiaoyujidi.langye.net/',
// target: 'http://leyitest.ali251.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