|
|
|
|
@ -7,9 +7,8 @@
|
|
|
|
|
<div slot="content"></div>
|
|
|
|
|
<slot>
|
|
|
|
|
<div>
|
|
|
|
|
<Input style="width: 200px; margin-right: 10px" v-model.number="searchFields.Name" placeholder="关键字搜索" />
|
|
|
|
|
<Input style="width: 200px; margin-right: 10px" v-model="searchFields.name" placeholder="关键字搜索" />
|
|
|
|
|
<Button type="primary" @click="load" style="margin-left: 10px">查询</Button>
|
|
|
|
|
<Button type="primary" @click="edit()" style="margin-left: 10px">新增</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</slot>
|
|
|
|
|
</LxHeader>
|
|
|
|
|
@ -21,11 +20,10 @@
|
|
|
|
|
:label="column.title" :width="column.width">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div v-if="column.type=='opt'">
|
|
|
|
|
<Button ghost size="small" @click="edit(scope.row)" type="primary"
|
|
|
|
|
style="margin-left: 10px;">编辑</Button>
|
|
|
|
|
<Button ghost size="small" type="error" @click="del(scope.row)" style="margin-left: 10px;">删除</Button>
|
|
|
|
|
<Button ghost size="small" @click="show(scope.row)" type="primary"
|
|
|
|
|
style="margin-left: 10px;">查看</Button>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else-if="column.type=='type'" v-for="item in parameters.orderRule">
|
|
|
|
|
<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>
|
|
|
|
|
@ -33,124 +31,166 @@
|
|
|
|
|
<div v-else>{{scope.row[column.field]}}</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</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>
|
|
|
|
|
<div v-if="form.type==1">
|
|
|
|
|
<el-form-item 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>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-scrollbar>
|
|
|
|
|
</div>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="resetForm('form')">关 闭</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<el-dialog title="详情编辑" :visible.sync="dialogFormVisible" fullscreen width="90%">
|
|
|
|
|
<el-form :model="form" :rules="rules" ref="form" label-position="right" :label-width="formLabelWidth">
|
|
|
|
|
<el-form-item label="名称" prop="name">
|
|
|
|
|
<el-input v-model="form.name" placeholder="请填写名称" autocomplete="off"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="10">
|
|
|
|
|
<el-form-item label="预约时间" prop="date">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
style="width:100%"
|
|
|
|
|
v-model="form.date"
|
|
|
|
|
type="datetime"
|
|
|
|
|
placeholder="选择开始时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10" :offset="4">
|
|
|
|
|
<el-form-item label="类型" prop="type">
|
|
|
|
|
<el-select v-model="form.type" placeholder="请选择类型" style="width:100%">
|
|
|
|
|
<el-option v-for="item in parameters.orderRule" :key="item.value" :label="item.value" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-form-item label="预约人数" prop="name">
|
|
|
|
|
<el-input v-model="form.num" placeholder="请填写预约人数" autocomplete="off"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<div style="padding: 20px 0px;" class="form-sub-title">
|
|
|
|
|
<span>预约人信息
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="table-tree tableswidth">
|
|
|
|
|
<div style="display: flex;justify-content: flex-end;margin-right: 20px;margin-bottom: 10px;">
|
|
|
|
|
<Button type="primary" @click="addRow()" size="small" style="margin-left: 10px;" ghost>新增</Button>
|
|
|
|
|
</div>
|
|
|
|
|
<el-table :data="form.people_list" height="400" class="v-table" style="width: 100%;margin-bottom: 20px;">
|
|
|
|
|
<el-table-column type="index" align="center">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="name" label="姓名">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.name" placeholder="请填写姓名" autocomplete="off"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="card" label="证件号">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.card" placeholder="请填写证件号" autocomplete="off"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="tel" label="联系方式">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.tel" placeholder="请填写联系方式" autocomplete="off"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" width="120px" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<Button type="error" @click="delRow(scope.$index)" size="small" style="margin-left: 10px;"
|
|
|
|
|
ghost>删除</Button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</div>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="resetForm('form')">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="submitForm('form')">确 定</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import LxHeader from "@/components/LxHeader/index.vue";
|
|
|
|
|
import {
|
|
|
|
|
|
|
|
|
|
} from "../../api/resource/visit.js";
|
|
|
|
|
import {
|
|
|
|
|
getparameteritem
|
|
|
|
|
} from "../../api/system/dictionary.js"
|
|
|
|
|
listactiveorder,
|
|
|
|
|
get
|
|
|
|
|
} from "../../api/order/activeorder.js";
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
LxHeader
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
dialogFormVisible: false,
|
|
|
|
|
dialogViewVisible: false,
|
|
|
|
|
formLabelWidth: "120px",
|
|
|
|
|
parameters: {
|
|
|
|
|
orderRule: []
|
|
|
|
|
visitType:[{
|
|
|
|
|
id:1,
|
|
|
|
|
value:"团体"
|
|
|
|
|
},{
|
|
|
|
|
id:2,
|
|
|
|
|
value:"个人"
|
|
|
|
|
}],
|
|
|
|
|
cardType:[{
|
|
|
|
|
id:1,
|
|
|
|
|
value:"身份证"
|
|
|
|
|
},{
|
|
|
|
|
id:2,
|
|
|
|
|
value:"护照"
|
|
|
|
|
}]
|
|
|
|
|
},
|
|
|
|
|
tableHeight: 0,
|
|
|
|
|
clientHeight:0,
|
|
|
|
|
//查询条件字段
|
|
|
|
|
searchFields: {
|
|
|
|
|
name: ""
|
|
|
|
|
},
|
|
|
|
|
tableData: [],
|
|
|
|
|
paginations: {
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 15,
|
|
|
|
|
total: 0
|
|
|
|
|
},
|
|
|
|
|
form: {
|
|
|
|
|
name: "苏州市党性教育实训基地停车场",
|
|
|
|
|
date: "2022",
|
|
|
|
|
type: "1",
|
|
|
|
|
people_list: [{
|
|
|
|
|
name: "",
|
|
|
|
|
card:"",
|
|
|
|
|
tel:""
|
|
|
|
|
}]
|
|
|
|
|
card_type: "",
|
|
|
|
|
rule_id: "",
|
|
|
|
|
unit: "",
|
|
|
|
|
card_type:"",
|
|
|
|
|
leader:"",
|
|
|
|
|
idcard: "",
|
|
|
|
|
total: "",
|
|
|
|
|
mobile: "",
|
|
|
|
|
type:"",
|
|
|
|
|
details_list: []
|
|
|
|
|
},
|
|
|
|
|
columns: [{
|
|
|
|
|
field: "name",
|
|
|
|
|
title: "名称",
|
|
|
|
|
type: "string",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "type",
|
|
|
|
|
title: "类型",
|
|
|
|
|
type: "type",
|
|
|
|
|
},
|
|
|
|
|
columns: [
|
|
|
|
|
{
|
|
|
|
|
field: "date",
|
|
|
|
|
title: "预约时间",
|
|
|
|
|
type: "string",
|
|
|
|
|
width:300
|
|
|
|
|
field: "type",
|
|
|
|
|
title: "类型",
|
|
|
|
|
type: "type",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "操作",
|
|
|
|
|
@ -158,30 +198,8 @@
|
|
|
|
|
width: 220,
|
|
|
|
|
type: "opt",
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
rules: {
|
|
|
|
|
name: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入参观须知',
|
|
|
|
|
trigger: 'blur'
|
|
|
|
|
}]
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
tableHeight: 0,
|
|
|
|
|
//查询条件字段
|
|
|
|
|
searchFields: {
|
|
|
|
|
KeyWord: ""
|
|
|
|
|
},
|
|
|
|
|
tableData: [{
|
|
|
|
|
name: "苏州市党性教育实训基地停车场",
|
|
|
|
|
date: "2022-05-07 10:20",
|
|
|
|
|
type: 24,
|
|
|
|
|
people_list: [{
|
|
|
|
|
name: "",
|
|
|
|
|
card:"",
|
|
|
|
|
tel:""
|
|
|
|
|
}]
|
|
|
|
|
}]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
@ -198,13 +216,28 @@
|
|
|
|
|
var topHeight = 50; //页面 头部
|
|
|
|
|
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
|
|
|
|
|
that.tableHeight = tableHeight;
|
|
|
|
|
//加载自定义参数
|
|
|
|
|
getparameteritem("order-rule").then(res => {
|
|
|
|
|
this.parameters.orderRule = res.detail;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
load() {
|
|
|
|
|
var that = this;
|
|
|
|
|
var that = this;
|
|
|
|
|
var query=this.$route.query;
|
|
|
|
|
let activityId = query.activity_id;
|
|
|
|
|
if(activityId){
|
|
|
|
|
listactiveorder({
|
|
|
|
|
page: this.paginations.page,
|
|
|
|
|
page_size: this.paginations.page_size,
|
|
|
|
|
activity_id: activityId
|
|
|
|
|
}).then(res => {
|
|
|
|
|
this.tableData = res.data;
|
|
|
|
|
this.paginations.total = res.total
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.$Message.error('请在活动管理页选择要查询的活动!');
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
window.location.href='/#/active/activity'
|
|
|
|
|
},2000)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
show(obj) {
|
|
|
|
|
@ -214,79 +247,23 @@
|
|
|
|
|
},
|
|
|
|
|
info(obj) {
|
|
|
|
|
var that = this;
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
edit(obj) {
|
|
|
|
|
this.form = this.$options.data().form;
|
|
|
|
|
this.clientHeight = document.documentElement.clientHeight - 84 - 110;
|
|
|
|
|
if (obj) {
|
|
|
|
|
var that = this;
|
|
|
|
|
that.info(obj);
|
|
|
|
|
} else {}
|
|
|
|
|
this.dialogFormVisible = true;
|
|
|
|
|
},
|
|
|
|
|
submitForm(formName) {
|
|
|
|
|
var that = this;
|
|
|
|
|
this.$refs[formName].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (that.form.id) {
|
|
|
|
|
save(that.form).then(response => {
|
|
|
|
|
console.log(response)
|
|
|
|
|
this.$Message.success('操作成功');
|
|
|
|
|
that.dialogFormVisible = false;
|
|
|
|
|
that.load();
|
|
|
|
|
}).catch(error => {})
|
|
|
|
|
} else {
|
|
|
|
|
store(that.form).then(response => {
|
|
|
|
|
console.log(response)
|
|
|
|
|
this.$Message.success('操作成功');
|
|
|
|
|
that.dialogFormVisible = false;
|
|
|
|
|
that.load();
|
|
|
|
|
}).catch(error => {})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
this.$Message.error('数据校验失败');
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
resetForm(formName) {
|
|
|
|
|
var that = this;
|
|
|
|
|
this.$refs[formName].resetFields();
|
|
|
|
|
that.dialogFormVisible = false;
|
|
|
|
|
},
|
|
|
|
|
del(obj) {
|
|
|
|
|
var that = this;
|
|
|
|
|
if (obj) {
|
|
|
|
|
this.$Modal.confirm({
|
|
|
|
|
title: '确认要删除数据?',
|
|
|
|
|
onOk: () => {
|
|
|
|
|
del(obj.id).then(response => {
|
|
|
|
|
this.$Message.success('操作成功');
|
|
|
|
|
that.load();
|
|
|
|
|
}).catch(error => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
reject(error)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
onCancel: () => {
|
|
|
|
|
//this.$Message.info('Clicked cancel');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
addRow() {
|
|
|
|
|
var len = this.form.people_list.length;
|
|
|
|
|
this.form.people_list.push({
|
|
|
|
|
name: "",
|
|
|
|
|
card:"",
|
|
|
|
|
tel:""
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
delRow(index) {
|
|
|
|
|
this.form.people_list.splice(index, 1);
|
|
|
|
|
},
|
|
|
|
|
get(obj.id).then(res => {
|
|
|
|
|
let result = Object.assign(that.form, res);
|
|
|
|
|
that.form = result;
|
|
|
|
|
that.for.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>
|
|
|
|
|
|