|
|
|
@ -1,49 +1,50 @@ |
|
|
|
|
<template> |
|
|
|
|
<div class="app-container"> |
|
|
|
|
<el-form :model="queryParams" @submit.native.prevent @submit.native.prevent ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="120px"> |
|
|
|
|
<el-form v-show="showSearch" ref="queryForm" :inline="true" :model="queryParams" label-width="120px" |
|
|
|
|
size="small" @submit.native.prevent @submit.native.prevent> |
|
|
|
|
<el-form-item label="景区编码" prop="scenicCode"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="queryParams.scenicCode" |
|
|
|
|
placeholder="请输入景区编码" |
|
|
|
|
clearable |
|
|
|
|
placeholder="请输入景区编码" |
|
|
|
|
@keyup.enter.native="handleQuery" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="预约日期" prop="appointmentDate"> |
|
|
|
|
<el-date-picker clearable |
|
|
|
|
v-model="queryParams.appointmentDate" |
|
|
|
|
type="date" |
|
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
|
placeholder="请选择预约日期"> |
|
|
|
|
<el-date-picker v-model="queryParams.appointmentDate" |
|
|
|
|
clearable |
|
|
|
|
placeholder="请选择预约日期" |
|
|
|
|
type="date" |
|
|
|
|
value-format="yyyy-MM-dd"> |
|
|
|
|
</el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="预约时段" prop="appointmentSlot"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="queryParams.appointmentSlot" |
|
|
|
|
placeholder="请输入预约时段" |
|
|
|
|
clearable |
|
|
|
|
placeholder="请输入预约时段" |
|
|
|
|
@keyup.enter.native="handleQuery" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="预约人姓名" prop="appointmentPeopleName"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="queryParams.appointmentPeopleName" |
|
|
|
|
placeholder="请输入预约人姓名" |
|
|
|
|
clearable |
|
|
|
|
placeholder="请输入预约人姓名" |
|
|
|
|
@keyup.enter.native="handleQuery" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="预约人手机号" prop="appointmentPeoplePhone"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="queryParams.appointmentPeoplePhone" |
|
|
|
|
placeholder="请输入预约人手机号" |
|
|
|
|
clearable |
|
|
|
|
placeholder="请输入预约人手机号" |
|
|
|
|
@keyup.enter.native="handleQuery" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item> |
|
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
|
|
|
|
<el-button icon="el-icon-search" size="mini" type="primary" @click="handleQuery">搜索</el-button> |
|
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
@ -51,147 +52,168 @@ |
|
|
|
|
<el-row :gutter="10" class="mb8"> |
|
|
|
|
<el-col :span="1.5"> |
|
|
|
|
<el-button |
|
|
|
|
type="primary" |
|
|
|
|
plain |
|
|
|
|
v-hasPermi="['appointmentteamdata:appointmentteamdata:add']" |
|
|
|
|
icon="el-icon-plus" |
|
|
|
|
plain |
|
|
|
|
size="mini" |
|
|
|
|
type="primary" |
|
|
|
|
@click="handleAdd" |
|
|
|
|
v-hasPermi="['appointmentteamdata:appointmentteamdata:add']" |
|
|
|
|
>新增</el-button> |
|
|
|
|
>新增 |
|
|
|
|
</el-button> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="1.5"> |
|
|
|
|
<el-button |
|
|
|
|
type="danger" |
|
|
|
|
plain |
|
|
|
|
v-hasPermi="['appointmentteamdata:appointmentteamdata:remove']" |
|
|
|
|
:disabled="multiple" |
|
|
|
|
icon="el-icon-delete" |
|
|
|
|
plain |
|
|
|
|
size="mini" |
|
|
|
|
:disabled="multiple" |
|
|
|
|
type="danger" |
|
|
|
|
@click="handleDelete" |
|
|
|
|
v-hasPermi="['appointmentteamdata:appointmentteamdata:remove']" |
|
|
|
|
>删除</el-button> |
|
|
|
|
>删除 |
|
|
|
|
</el-button> |
|
|
|
|
</el-col> |
|
|
|
|
<!-- <el-col :span="1.5">--> |
|
|
|
|
<!-- <el-button--> |
|
|
|
|
<!-- type="warning"--> |
|
|
|
|
<!-- plain--> |
|
|
|
|
<!-- icon="el-icon-download"--> |
|
|
|
|
<!-- size="mini"--> |
|
|
|
|
<!-- @click="handleExport"--> |
|
|
|
|
<!-- v-hasPermi="['appointmentteamdata:appointmentteamdata:export']"--> |
|
|
|
|
<!-- >导出</el-button>--> |
|
|
|
|
<!-- </el-col>--> |
|
|
|
|
<!-- <el-col :span="1.5">--> |
|
|
|
|
<!-- <el-button--> |
|
|
|
|
<!-- type="warning"--> |
|
|
|
|
<!-- plain--> |
|
|
|
|
<!-- icon="el-icon-download"--> |
|
|
|
|
<!-- size="mini"--> |
|
|
|
|
<!-- @click="handleExport"--> |
|
|
|
|
<!-- v-hasPermi="['appointmentteamdata:appointmentteamdata:export']"--> |
|
|
|
|
<!-- >导出</el-button>--> |
|
|
|
|
<!-- </el-col>--> |
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="appointmentteamdataList" @selection-change="handleSelectionChange"> |
|
|
|
|
<el-table-column type="selection" width="55" align="center" /> |
|
|
|
|
<el-table-column align="center" type="selection" width="55"/> |
|
|
|
|
|
|
|
|
|
<el-table-column label="景区编码" align="center" prop="scenicCode" /> |
|
|
|
|
<el-table-column label="预约日期" align="center" prop="appointmentDate" width="180"> |
|
|
|
|
<el-table-column align="center" label="景区名称" prop="scenicName"/> |
|
|
|
|
<el-table-column align="center" label="预约日期" prop="appointmentDate" width="180"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{ parseTime(scope.row.appointmentDate, '{y}-{m}-{d}') }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="预约时段" align="center" prop="appointmentSlot" /> |
|
|
|
|
<el-table-column label="预约人姓名" align="center" prop="appointmentPeopleName" /> |
|
|
|
|
<el-table-column label="预约人手机号" align="center" prop="appointmentPeoplePhone" /> |
|
|
|
|
<el-table-column label="预约人数" align="center" prop="appointmentPeopleCount" /> |
|
|
|
|
<el-table-column align="center" label="预约时段" prop="appointmentSlot"/> |
|
|
|
|
<el-table-column align="center" label="预约人姓名" prop="appointmentPeopleName"/> |
|
|
|
|
<el-table-column align="center" label="预约人手机号" prop="appointmentPeoplePhone"/> |
|
|
|
|
<el-table-column align="center" label="预约人数" prop="appointmentPeopleCount"/> |
|
|
|
|
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
|
|
|
|
<el-table-column align="center" class-name="small-padding fixed-width" label="操作"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-button |
|
|
|
|
v-hasPermi="['appointmentteamdata:appointmentteamdata:edit']" |
|
|
|
|
size="mini" |
|
|
|
|
type="text" |
|
|
|
|
@click="handleUpdate(scope.row,1)" |
|
|
|
|
v-hasPermi="['appointmentteamdata:appointmentteamdata:edit']" |
|
|
|
|
>详情</el-button> |
|
|
|
|
>详情 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button |
|
|
|
|
v-hasPermi="['appointmentteamdata:appointmentteamdata:edit']" |
|
|
|
|
icon="el-icon-edit" |
|
|
|
|
size="mini" |
|
|
|
|
type="text" |
|
|
|
|
icon="el-icon-edit" |
|
|
|
|
@click="handleUpdate(scope.row)" |
|
|
|
|
v-hasPermi="['appointmentteamdata:appointmentteamdata:edit']" |
|
|
|
|
>修改</el-button> |
|
|
|
|
>修改 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button |
|
|
|
|
v-hasPermi="['appointmentteamdata:appointmentteamdata:remove']" |
|
|
|
|
icon="el-icon-delete" |
|
|
|
|
size="mini" |
|
|
|
|
type="text" |
|
|
|
|
icon="el-icon-delete" |
|
|
|
|
@click="handleDelete(scope.row)" |
|
|
|
|
v-hasPermi="['appointmentteamdata:appointmentteamdata:remove']" |
|
|
|
|
>删除</el-button> |
|
|
|
|
>删除 |
|
|
|
|
</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
|
|
|
|
|
<pagination |
|
|
|
|
v-show="total>0" |
|
|
|
|
:total="total" |
|
|
|
|
:page.sync="queryParams.pageNum" |
|
|
|
|
:limit.sync="queryParams.pageSize" |
|
|
|
|
:page.sync="queryParams.pageNum" |
|
|
|
|
:total="total" |
|
|
|
|
@pagination="getList" |
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
<!-- 添加或修改预约团队数据对话框 --> |
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="70%"append-to-body> |
|
|
|
|
<el-form :disabled="isEdit" ref="form" :model="form" :rules="rules" label-width="120px"> |
|
|
|
|
<el-form-item label="景区编码" prop="scenicCode"> |
|
|
|
|
<el-input v-model="form.scenicCode" placeholder="请输入景区编码" /> |
|
|
|
|
<el-dialog :title="title" :visible.sync="open" append-to-body width="70%"> |
|
|
|
|
<el-form ref="form" :disabled="isEdit" :model="form" :rules="rules" label-width="120px"> |
|
|
|
|
<el-form-item label="景区名称" prop="scenicCode"> |
|
|
|
|
<el-select v-model="form.scenicCode" placeholder="请选择景区"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="dict in resourceList" |
|
|
|
|
:key="dict.resourceCode" |
|
|
|
|
:label="dict.resourceName" |
|
|
|
|
:value="dict.resourceCode" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="预约日期" prop="appointmentDate"> |
|
|
|
|
<el-date-picker clearable |
|
|
|
|
v-model="form.appointmentDate" |
|
|
|
|
type="date" |
|
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
|
placeholder="请选择预约日期"> |
|
|
|
|
<el-date-picker v-model="form.appointmentDate" |
|
|
|
|
clearable |
|
|
|
|
placeholder="请选择预约日期" |
|
|
|
|
type="date" |
|
|
|
|
value-format="yyyy-MM-dd"> |
|
|
|
|
</el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="预约时段" prop="appointmentSlot"> |
|
|
|
|
<el-input v-model="form.appointmentSlot" placeholder="请输入预约时段" /> |
|
|
|
|
<el-input v-model="form.appointmentSlot" placeholder="请输入预约时段"/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="预约人姓名" prop="appointmentPeopleName"> |
|
|
|
|
<el-input v-model="form.appointmentPeopleName" disabled="true" placeholder="请输入预约人姓名" /> |
|
|
|
|
<el-input v-model="form.appointmentPeopleName" disabled="true" placeholder="请输入预约人姓名"/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="预约人手机号" prop="appointmentPeoplePhone"> |
|
|
|
|
<el-input v-model="form.appointmentPeoplePhone" disabled="true" placeholder="请输入预约人手机号" /> |
|
|
|
|
<el-input v-model="form.appointmentPeoplePhone" disabled="true" placeholder="请输入预约人手机号"/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
v-if="!isEdit&&!detail" |
|
|
|
|
plain |
|
|
|
|
<el-form-item v-if="isEdit" label="预约人数"> |
|
|
|
|
{{ form.newList ? form.newList.length : 0 }} |
|
|
|
|
<!-- <el-input v-model="form.newList?form.newList.length:0" disabled="true" placeholder="请输入号" />--> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item v-if="isEdit" label="提交时间"> |
|
|
|
|
{{ form.createTime }} |
|
|
|
|
<!-- <el-input v-model="form.createTime" disabled="true" placeholder="请输入" />--> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-button v-if="!isEdit&&!detail" |
|
|
|
|
icon="el-icon-upload2" |
|
|
|
|
plain |
|
|
|
|
size="mini" |
|
|
|
|
type="primary" |
|
|
|
|
@click="importFile"> |
|
|
|
|
导入数据 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
v-if="!isEdit&&detail" |
|
|
|
|
plain |
|
|
|
|
<el-button v-if="!isEdit&&detail" |
|
|
|
|
icon="el-icon-upload2" |
|
|
|
|
plain |
|
|
|
|
size="mini" |
|
|
|
|
type="primary" |
|
|
|
|
@click="addLine"> |
|
|
|
|
新增一人 |
|
|
|
|
</el-button> |
|
|
|
|
<el-table class="inner-table" :data="appointmentteamdataLists" @row-click="changeRow" @selection-change="handleSelectionChanges"> |
|
|
|
|
<!-- <el-table-column type="selection" width="60" align="center" />--> |
|
|
|
|
<el-table-column label="姓名" width="100" align="center" prop="name" > |
|
|
|
|
<el-table :data="appointmentteamdataLists" class="inner-table" @row-click="changeRow" |
|
|
|
|
@selection-change="handleSelectionChanges"> |
|
|
|
|
<!-- <el-table-column type="selection" width="60" align="center" />--> |
|
|
|
|
<el-table-column align="center" label="姓名" prop="name" width="100"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-form-item label-width="0" style="margin-bottom: 0 !important;"> |
|
|
|
|
<el-input v-model="scope.row.name" > |
|
|
|
|
<el-input v-model="scope.row.name"> |
|
|
|
|
</el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="手机号" width="150" align="center" prop="phone"> |
|
|
|
|
<el-table-column align="center" label="手机号" prop="phone" width="150"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-form-item label-width="0" style="margin-bottom: 0 !important;"> |
|
|
|
|
<el-input v-model="scope.row.phone" > |
|
|
|
|
<el-input v-model="scope.row.phone"> |
|
|
|
|
</el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="证件类型" width="130" align="center" prop="certificateType" > |
|
|
|
|
<el-table-column align="center" label="证件类型" prop="certificateType" width="130"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-form-item label-width="0" style="margin-bottom: 0 !important;"> |
|
|
|
|
<el-select v-model="scope.row.certificateType" placeholder="请选择"> |
|
|
|
|
<el-select v-model="scope.row.certificateType" placeholder="请选择"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="dict in dict.type.certificate_type" |
|
|
|
|
:key="dict.value" |
|
|
|
@ -202,31 +224,32 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="证件号码" width="230" align="center" prop="documentsNumber" > |
|
|
|
|
<el-table-column align="center" label="证件号码" prop="documentsNumber" width="230"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-form-item label-width="0" style="margin-bottom: 0 !important;"> |
|
|
|
|
<el-input v-model="scope.row.documentsNumber" > |
|
|
|
|
<el-input v-model="scope.row.documentsNumber"> |
|
|
|
|
</el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="备注" width="330" align="center" prop="remark"> |
|
|
|
|
<el-table-column align="center" label="备注" prop="remark" width="330"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-form-item label-width="0" style="margin-bottom: 0 !important;"> |
|
|
|
|
<el-input v-model="scope.row.remark" > |
|
|
|
|
<el-input v-model="scope.row.remark"> |
|
|
|
|
</el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
|
|
|
|
<el-table-column align="center" class-name="small-padding fixed-width" label="操作"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-button |
|
|
|
|
v-hasPermi="['appointmentteamdata:appointmentteamdata:remove']" |
|
|
|
|
icon="el-icon-delete" |
|
|
|
|
size="mini" |
|
|
|
|
type="text" |
|
|
|
|
icon="el-icon-delete" |
|
|
|
|
@click="handleDeletes(scope.row)" |
|
|
|
|
v-hasPermi="['appointmentteamdata:appointmentteamdata:remove']" |
|
|
|
|
>删除</el-button> |
|
|
|
|
>删除 |
|
|
|
|
</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
@ -237,19 +260,19 @@ |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px"> |
|
|
|
|
<el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" |
|
|
|
|
:action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading" |
|
|
|
|
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag |
|
|
|
|
<el-upload ref="upload" :action="upload.url + '?updateSupport=' + upload.updateSupport" :auto-upload="false" :disabled="upload.isUploading" |
|
|
|
|
:headers="upload.headers" :limit="1" |
|
|
|
|
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" accept=".xlsx, .xls" drag |
|
|
|
|
> |
|
|
|
|
<i class="el-icon-upload"></i> |
|
|
|
|
<div class="el-upload__text"> |
|
|
|
|
将文件拖到此处,或 |
|
|
|
|
<em>点击上传</em> |
|
|
|
|
</div> |
|
|
|
|
<div class="el-upload__tip" slot="tip"> |
|
|
|
|
<el-link type="info" style="font-size:12px" @click="downloadTemplate">下载模板</el-link> |
|
|
|
|
<div slot="tip" class="el-upload__tip"> |
|
|
|
|
<el-link style="font-size:12px" type="info" @click="downloadTemplate">下载模板</el-link> |
|
|
|
|
</div> |
|
|
|
|
<div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div> |
|
|
|
|
<div slot="tip" class="el-upload__tip" style="color:red">提示:仅允许导入“xls”或“xlsx”格式文件!</div> |
|
|
|
|
</el-upload> |
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button type="primary" @click="xlsSubmitFileForm">确 定</el-button> |
|
|
|
@ -268,17 +291,21 @@ import { |
|
|
|
|
updateAppointmentteamdata, |
|
|
|
|
delAppointmentteamdatas |
|
|
|
|
} from "@/api/appointmentteamdata/appointmentteamdata"; |
|
|
|
|
import { getUserProfile } from "@/api/system/user"; |
|
|
|
|
import { getToken } from '@/utils/auth' |
|
|
|
|
import {getUserProfile} from "@/api/system/user"; |
|
|
|
|
import {getToken} from '@/utils/auth' |
|
|
|
|
import {getResourceList} from "@/api/ticketing/site"; |
|
|
|
|
import item from "@/layout/components/Sidebar/Item"; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
name: "Appointmentteamdata", |
|
|
|
|
dicts:['certificate_type'], |
|
|
|
|
dicts: ['certificate_type'], |
|
|
|
|
data() { |
|
|
|
|
return {change:false, |
|
|
|
|
isEdit:false, |
|
|
|
|
detail:false, |
|
|
|
|
index:0, |
|
|
|
|
appointmentteamdataLists:[], |
|
|
|
|
return { |
|
|
|
|
change: false, |
|
|
|
|
isEdit: false, |
|
|
|
|
detail: false, |
|
|
|
|
index: 0, |
|
|
|
|
appointmentteamdataLists: [], |
|
|
|
|
baseUrl: process.env.VUE_APP_BASE_API, |
|
|
|
|
// 遮罩层 |
|
|
|
|
loading: true, |
|
|
|
@ -322,38 +349,38 @@ export default { |
|
|
|
|
// 是否更新已经存在的用户数据 |
|
|
|
|
updateSupport: 0, |
|
|
|
|
// 设置上传的请求头部 |
|
|
|
|
headers: { Authorization: 'Bearer ' + getToken() }, |
|
|
|
|
headers: {Authorization: 'Bearer ' + getToken()}, |
|
|
|
|
// 上传的地址 |
|
|
|
|
url: process.env.VUE_APP_BASE_API + '/appointmentteamdata/appointmentteamdata/importData' |
|
|
|
|
}, |
|
|
|
|
// 表单校验 |
|
|
|
|
rules: { |
|
|
|
|
scenicCode: [ |
|
|
|
|
{ required: true, message: "景区编码不能为空", trigger: "blur" } |
|
|
|
|
{required: true, message: "景区编码不能为空", trigger: "blur"} |
|
|
|
|
], |
|
|
|
|
appointmentDate: [ |
|
|
|
|
{ required: true, message: "预约日期不能为空", trigger: "blur" } |
|
|
|
|
{required: true, message: "预约日期不能为空", trigger: "blur"} |
|
|
|
|
], |
|
|
|
|
appointmentSlot: [ |
|
|
|
|
{ required: true, message: "预约时段不能为空", trigger: "blur" } |
|
|
|
|
{required: true, message: "预约时段不能为空", trigger: "blur"} |
|
|
|
|
], |
|
|
|
|
appointmentPeopleName: [ |
|
|
|
|
{ required: true, message: "预约人姓名不能为空", trigger: "blur" } |
|
|
|
|
{required: true, message: "预约人姓名不能为空", trigger: "blur"} |
|
|
|
|
], |
|
|
|
|
appointmentPeoplePhone: [ |
|
|
|
|
{ required: true, message: "预约人手机号不能为空", trigger: "blur" } |
|
|
|
|
{required: true, message: "预约人手机号不能为空", trigger: "blur"} |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
watch:{ |
|
|
|
|
'open':{ |
|
|
|
|
deep:true, |
|
|
|
|
immediate:true, |
|
|
|
|
handler(val){ |
|
|
|
|
if (val == false){ |
|
|
|
|
watch: { |
|
|
|
|
'open': { |
|
|
|
|
deep: true, |
|
|
|
|
immediate: true, |
|
|
|
|
handler(val) { |
|
|
|
|
if (val == false) { |
|
|
|
|
this.change = false |
|
|
|
|
}else { |
|
|
|
|
} else { |
|
|
|
|
this.change = true |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -362,22 +389,28 @@ export default { |
|
|
|
|
created() { |
|
|
|
|
this.getList(); |
|
|
|
|
this.getUser(); |
|
|
|
|
this.getScenicList() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
addLine(){ |
|
|
|
|
getScenicList() { |
|
|
|
|
getResourceList().then((les) => { |
|
|
|
|
this.resourceList = les.data |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
addLine() { |
|
|
|
|
const newLine = { |
|
|
|
|
name: '', |
|
|
|
|
phone: "", |
|
|
|
|
certificateType: "", |
|
|
|
|
documentsNumber: "", |
|
|
|
|
remark: "", |
|
|
|
|
dataState:'a' |
|
|
|
|
dataState: 'a' |
|
|
|
|
}; |
|
|
|
|
this.index++; |
|
|
|
|
this.appointmentteamdataLists.push(newLine); |
|
|
|
|
}, |
|
|
|
|
changeRow(row){ |
|
|
|
|
if (row.dataState==''){ |
|
|
|
|
changeRow(row) { |
|
|
|
|
if (row.dataState == '') { |
|
|
|
|
row.dataState = 'u' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -433,12 +466,12 @@ export default { |
|
|
|
|
// 多选框选中数据 |
|
|
|
|
handleSelectionChange(selection) { |
|
|
|
|
this.ids = selection.map(item => item.id) |
|
|
|
|
this.single = selection.length!==1 |
|
|
|
|
this.single = selection.length !== 1 |
|
|
|
|
this.multiple = !selection.length |
|
|
|
|
}, |
|
|
|
|
handleSelectionChanges(selection) { |
|
|
|
|
this.ids = selection.map(item => item.id) |
|
|
|
|
this.single = selection.length!==1 |
|
|
|
|
this.single = selection.length !== 1 |
|
|
|
|
this.multiple = !selection.length |
|
|
|
|
}, |
|
|
|
|
/** 新增按钮操作 */ |
|
|
|
@ -447,29 +480,29 @@ export default { |
|
|
|
|
this.open = true; |
|
|
|
|
this.isEdit = false |
|
|
|
|
this.detail = false |
|
|
|
|
this.form.appointmentPeopleName= this.user.nickName |
|
|
|
|
this.form.appointmentPeoplePhone =this.user.phonenumber |
|
|
|
|
this.form.appointmentPeopleName = this.user.nickName |
|
|
|
|
this.form.appointmentPeoplePhone = this.user.phonenumber |
|
|
|
|
}, |
|
|
|
|
/** 修改按钮操作 */ |
|
|
|
|
handleUpdate(row,val) { |
|
|
|
|
handleUpdate(row, val) { |
|
|
|
|
this.reset(); |
|
|
|
|
this.form.appointmentPeopleName= this.user.nickName |
|
|
|
|
this.form.appointmentPeoplePhone =this.user.phonenumber |
|
|
|
|
this.form.appointmentPeopleName = this.user.nickName |
|
|
|
|
this.form.appointmentPeoplePhone = this.user.phonenumber |
|
|
|
|
const id = row.id || this.ids |
|
|
|
|
getAppointmentteamdata(id).then(response => { |
|
|
|
|
this.form = response.data; |
|
|
|
|
response.data.newList.forEach(item=>{ |
|
|
|
|
response.data.newList.forEach(item => { |
|
|
|
|
item.dataState = '' |
|
|
|
|
}) |
|
|
|
|
this.index = response.data.newList.length |
|
|
|
|
this.appointmentteamdataLists = response.data.newList |
|
|
|
|
console.log(this.appointmentteamdataLists,'添加dis'); |
|
|
|
|
if (val == 1){ |
|
|
|
|
console.log(this.appointmentteamdataLists, '添加dis'); |
|
|
|
|
if (val == 1) { |
|
|
|
|
this.open = true; |
|
|
|
|
this.title = "预约团队数据详情"; |
|
|
|
|
this.isEdit = true |
|
|
|
|
this.detail = true |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
this.open = true; |
|
|
|
|
this.title = "修改预约团队数据"; |
|
|
|
|
this.isEdit = false |
|
|
|
@ -481,32 +514,58 @@ export default { |
|
|
|
|
submitForm() { |
|
|
|
|
this.$refs["form"].validate(valid => { |
|
|
|
|
if (valid) { |
|
|
|
|
this.handlePeople() |
|
|
|
|
if (this.form.id != null) { |
|
|
|
|
updateAppointmentteamdata(this.form).then(response => { |
|
|
|
|
this.$modal.msgSuccess("修改成功"); |
|
|
|
|
this.open = false; |
|
|
|
|
this.getList(); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
addAppointmentteamdata(this.form).then(response => { |
|
|
|
|
this.$modal.msgSuccess("新增成功"); |
|
|
|
|
this.open = false; |
|
|
|
|
this.getList(); |
|
|
|
|
}); |
|
|
|
|
let errorMsg = ''; |
|
|
|
|
if (this.appointmentteamdataLists && this.appointmentteamdataLists.length > 0) { |
|
|
|
|
this.appointmentteamdataLists.forEach((item, index) => { |
|
|
|
|
if (item.name == '') { |
|
|
|
|
errorMsg = "第" + (index + 1) + "行信息有误,请核验", "导入结果", {dangerouslyUseHTMLString: true}; |
|
|
|
|
} |
|
|
|
|
if (item.phone == '') { |
|
|
|
|
errorMsg = "第" + (index + 1) + "行信息有误,请核验", "导入结果", {dangerouslyUseHTMLString: true}; |
|
|
|
|
} |
|
|
|
|
if (item.certificateType == '') { |
|
|
|
|
errorMsg = "第" + (index + 1) + "行信息有误,请核验", "导入结果", {dangerouslyUseHTMLString: true}; |
|
|
|
|
} |
|
|
|
|
if (item.documentsNumber == '') { |
|
|
|
|
errorMsg = "第" + (index + 1) + "行信息有误,请核验", "导入结果", {dangerouslyUseHTMLString: true}; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
if (errorMsg) { |
|
|
|
|
// 显示错误提示 |
|
|
|
|
this.$message.error(errorMsg); |
|
|
|
|
event.preventDefault(); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.handlePeople() |
|
|
|
|
if (this.form.id != null) { |
|
|
|
|
updateAppointmentteamdata(this.form).then(response => { |
|
|
|
|
this.$modal.msgSuccess("修改成功"); |
|
|
|
|
this.open = false; |
|
|
|
|
this.getList(); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
addAppointmentteamdata(this.form).then(response => { |
|
|
|
|
this.$modal.msgSuccess("新增成功"); |
|
|
|
|
this.open = false; |
|
|
|
|
this.getList(); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
/** 删除按钮操作 */ |
|
|
|
|
handleDelete(row) { |
|
|
|
|
const ids = row.id || this.ids; |
|
|
|
|
this.$modal.confirm('是否确认删除预约团队数据编号为"' + ids + '"的数据项?').then(function() { |
|
|
|
|
this.$modal.confirm('是否确认删除预约团队数据编号为"' + ids + '"的数据项?').then(function () { |
|
|
|
|
return delAppointmentteamdata(ids); |
|
|
|
|
}).then(() => { |
|
|
|
|
this.getList(); |
|
|
|
|
this.$modal.msgSuccess("删除成功"); |
|
|
|
|
}).catch(() => {}); |
|
|
|
|
}).catch(() => { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleDeletes(row) { |
|
|
|
|
let this_ = this |
|
|
|
@ -548,7 +607,7 @@ export default { |
|
|
|
|
}, `appointmentteamdata_${new Date().getTime()}.xlsx`) |
|
|
|
|
}, |
|
|
|
|
//删除列表人员 |
|
|
|
|
delAppointmentteamdatas(val){ |
|
|
|
|
delAppointmentteamdatas(val) { |
|
|
|
|
delAppointmentteamdatas(val) |
|
|
|
|
}, |
|
|
|
|
importFile() { |
|
|
|
@ -572,28 +631,29 @@ export default { |
|
|
|
|
a.click() |
|
|
|
|
}, |
|
|
|
|
handleFileSuccess(response, file, fileList) { |
|
|
|
|
console.log(response, file, fileList,'0000') |
|
|
|
|
console.log(response, file, fileList, '0000') |
|
|
|
|
this.upload.open = false; |
|
|
|
|
this.upload.isUploading = false; |
|
|
|
|
this.$refs.upload.clearFiles(); |
|
|
|
|
console.log(response) |
|
|
|
|
if(response.code === 200){ |
|
|
|
|
if (response.code === 200 && response.msg.includes('请核验') == -1) { |
|
|
|
|
// this.$alert(response.msg, "导入结果", {dangerouslyUseHTMLString: true}); |
|
|
|
|
this.appointmentteamdataLists = JSON.parse(response.msg) |
|
|
|
|
}else{ |
|
|
|
|
this.$alert("模板或数据格式出错!", "导入结果", {dangerouslyUseHTMLString: true}); |
|
|
|
|
} else { |
|
|
|
|
this.$alert(response.msg, "导入结果", {dangerouslyUseHTMLString: true}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 处理多人数据 |
|
|
|
|
handlePeople(){ |
|
|
|
|
// 处理多人数据 |
|
|
|
|
handlePeople() { |
|
|
|
|
|
|
|
|
|
this.form.newList = this.appointmentteamdataLists |
|
|
|
|
this.form.appointmentPeopleCount = this.appointmentteamdataLists.length |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
<style scoped lang="scss"> |
|
|
|
|
.inner-table{ |
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
.inner-table { |
|
|
|
|
margin-top: 20px; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|