You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
395 lines
13 KiB
395 lines
13 KiB
<template>
|
|
<div class="container">
|
|
<!-- 查询配置 -->
|
|
<div style="padding: 0px 20px">
|
|
<div ref="lxHeader">
|
|
<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-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" 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">
|
|
<template slot-scope="scope">
|
|
<div v-if="column.type=='opt'">
|
|
<Button ghost size="small" @click="show(scope.row)" type="primary"
|
|
style="margin-left: 10px;">查看</Button>
|
|
</div>
|
|
<div v-if="column.type=='format'">
|
|
<div v-if="column.field=='activityName'">
|
|
{{scope.row["activity"].name}}
|
|
</div>
|
|
</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]==3" type="info">{{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]==0" 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>
|
|
</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="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 {
|
|
listactiveorder,
|
|
get
|
|
} from "../../api/order/activeorder.js";
|
|
export default {
|
|
components: {
|
|
LxHeader
|
|
},
|
|
data() {
|
|
return {
|
|
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"
|
|
}],
|
|
type_list: [{
|
|
value: '团体',
|
|
id: "1"
|
|
}, {
|
|
value: '个人',
|
|
id: "2"
|
|
}],
|
|
},
|
|
|
|
tableHeight: 0,
|
|
clientHeight: 0,
|
|
//查询条件字段
|
|
searchFields: {
|
|
keyword: "",
|
|
start_date: "",
|
|
end_date: "",
|
|
is_export: 0,
|
|
type: "",
|
|
activity_name: "",
|
|
status: ""
|
|
},
|
|
visitRange:null,
|
|
tableData: [],
|
|
paginations: {
|
|
page: 1,
|
|
page_size: 15,
|
|
total: 0
|
|
},
|
|
form: {
|
|
card_type: "",
|
|
rule_id: "",
|
|
unit: "",
|
|
card_type: "",
|
|
leader: "",
|
|
idcard: "",
|
|
total: "",
|
|
mobile: "",
|
|
type: "",
|
|
details_list: []
|
|
},
|
|
columns: [{
|
|
field: "activityName",
|
|
title: "活动名称",
|
|
type: "string",
|
|
align: "center",
|
|
type: "format"
|
|
|
|
}, {
|
|
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: "created_at",
|
|
title: "下单时间",
|
|
type: "string",
|
|
align: "center"
|
|
},
|
|
{
|
|
field: "status",
|
|
title: "订单状态",
|
|
type: "status",
|
|
align: "center"
|
|
},
|
|
{
|
|
field: "操作",
|
|
title: "操作",
|
|
width: 120,
|
|
type: "opt",
|
|
}
|
|
]
|
|
|
|
}
|
|
},
|
|
created() {
|
|
this.initLoad();
|
|
this.load();
|
|
},
|
|
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
|
|
var lxHeader_height = 96.5; //查询 头部
|
|
var paginationHeight = 37; //分页的高度
|
|
var topHeight = 50; //页面 头部
|
|
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
|
|
that.tableHeight = tableHeight;
|
|
},
|
|
load() {
|
|
var that = this;
|
|
var query = this.$route.query;
|
|
let activityId = "";
|
|
if (query.activity_id)
|
|
activityId = query.activity_id
|
|
|
|
listactiveorder({
|
|
page: this.paginations.page,
|
|
page_size: this.paginations.page_size,
|
|
activity_id: activityId,
|
|
...this.searchFields
|
|
}).then(res => {
|
|
this.tableData = res.data;
|
|
this.paginations.total = res.total
|
|
}).catch(error => {
|
|
|
|
})
|
|
|
|
},
|
|
show(obj) {
|
|
this.clientHeight = document.documentElement.clientHeight - 84 - 110;
|
|
this.dialogViewVisible = true;
|
|
this.info(obj);
|
|
},
|
|
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)
|
|
})
|
|
},
|
|
resetForm(formName) {
|
|
var that = this;
|
|
that.dialogViewVisible = false;
|
|
this.$refs[formName].resetFields();
|
|
},
|
|
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;
|
|
}
|
|
</style>
|