12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466 |
- <template>
- <div v-loading.fullscreen.lock="fullscreenLoading">
- <div class="pickuplist-all">
- <div class="pickuplist-head">
- <div class="pickuplist-head-li">
- <label>团组名称:</label>
- <el-select style="width:220px" @change="delegationSelectChange" v-model="diId" clearable filterable
- placeholder="请选择">
- <el-option v-for="item in delegationInfoList" :key="item.id" :label="item.groupName"
- :value="item.id">
- </el-option>
- </el-select>
- </div>
- <div class="pickuplist-info">
- <div class="pickuplist-info-li">
- <label>团 号:</label>
- <span>{{ GroupInfo.tourCode }}</span>
- </div>
- <div class="pickuplist-info-li">
- <label>客 户:</label>
- <span>{{ GroupInfo.clientName }}</span>
- </div>
- <div class="pickuplist-info-li">
- <label>出访国家:</label>
- <span>{{ GroupInfo.visitCountry|filter_city }}</span>
- </div>
- <div class="pickuplist-info-li">
- <label>起止日期:</label>
- <span>{{ GroupInfo.visitStartDate|filter_time }}~{{ GroupInfo.visitEndDate|filter_time }}</span>
- </div>
- <div class="pickuplist-info-li">
- <label>天数/人数:</label>
- <span>{{ GroupInfo.visitDays }}/{{ GroupInfo.visitPNumber }}</span>
- </div>
- </div>
- </div>
- <div class="pickuplist-Upload-box">
- <el-upload
- class="upload-demo"
- ref="upload"
- action=""
- :on-change="httpRequest"
- :on-remove="httpRequest"
- accept=".png, .jpg, .jpeg"
- :limit="1"
- :file-list="fileList"
- :auto-upload="false">
- <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
- <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">识别图片</el-button>
- <div slot="tip" class="el-upload__tip">只能识别jpg/png文件</div>
- </el-upload>
- </div>
- <div class="pickuplist-table">
- <el-table
- :data="tableData"
- border
- style="width: 100%">
- <el-table-column
- type="index"
- label="序号"
- width="55">
- </el-table-column>
- <el-table-column
- prop="lastName"
- label="姓"
- width="100">
- </el-table-column>
- <el-table-column
- prop="firstName"
- label="名"
- width="100">
- </el-table-column>
- <el-table-column
- prop="companyFullName"
- label="单位">
- </el-table-column>
- <el-table-column
- prop="job"
- label="职务">
- </el-table-column>
- <el-table-column
- prop="idCardNo"
- label="身份证"
- width="180">
- </el-table-column>
- <el-table-column
- prop="sex"
- label="性别"
- width="55">
- <template slot-scope="scope">
- {{ scope.row.sex==0?'男':'女' }}
- </template>
- </el-table-column>
- <el-table-column
- label="操作"
- width="100">
- <template slot-scope="scope">
- <el-button
- @click.native.prevent="PostTourClientListDetails(scope.$index, scope.row)"
- type="text"
- size="small">
- 详细
- </el-button>
- <el-button
- @click.native.prevent="PostTourClientListDel(scope.$index, scope.row)"
- type="text"
- size="small">
- 删除
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <div class="pickuplist-btn">
- <div class="pickuplist-btn-lable">
- 详 情
- </div>
- <div>
- <el-button slot="trigger" @click="Exportlist" type="primary">导出团组名单</el-button>
- <el-button type="primary" @click="dialogTableVisible = true">添加多个资料</el-button>
- <el-button type="primary" @click="addhandoff">新增切换</el-button>
- <el-button type="primary" @click="preservation('pickupinif')">保存设置</el-button>
- </div>
- </div>
- <el-form
- :model="pickupinif"
- :rules="pickupinifRules"
- ref="pickupinif"
- label-width="110px"
- class="demo-OpHotelReservationsData pickuplist-form">
- <div style="display: flex;flex-wrap: wrap;justify-content: space-between;">
- <div style="width:395px ;display: flex;">
- <el-form-item style="width:50% ;" label="姓" prop="surname">
- <el-autocomplete
- popper-class="el-autocomplete-suggestion"
- :popper-append-to-body="false"
- class="inline-input"
- size="medium"
- v-model.trim="pickupinif.surname"
- :fetch-suggestions="querySearch"
- @select="PromptChecked"
- @input="InputValue"
- ></el-autocomplete>
- </el-form-item>
- <el-form-item label-width="50px" style="width:50% ;" label="名" prop="name">
- <el-input @input="InputValue" size="medium" type="text"
- v-model.trim="pickupinif.name"></el-input>
- </el-form-item>
- </div>
- <el-form-item style="width:395px ;" label="拼音" prop="Pinyin">
- <el-input size="medium" type="text"
- v-model.trim="pickupinif.Pinyin"></el-input>
- </el-form-item>
- <el-form-item style="width:395px ;" label="单位" prop="flats">
- <el-autocomplete
- style="width:100% ;"
- popper-class="el-autocomplete-suggestion"
- :popper-append-to-body="false"
- class="inline-input"
- size="medium"
- v-model.trim="pickupinif.flats"
- :fetch-suggestions="querySearchdw"
- ></el-autocomplete>
- </el-form-item>
- <el-form-item style="width:395px ;" label="职务" prop="office">
- <el-input size="medium" type="text"
- v-model.trim="pickupinif.office"></el-input>
- </el-form-item>
- <el-form-item style="width:395px ;" label="手机号" prop="phone">
- <el-input size="medium" type="text"
- v-model.trim="pickupinif.phone"></el-input>
- </el-form-item>
- <el-form-item style="width:395px ;" label="性别" prop="gender">
- <el-radio-group v-model="pickupinif.gender">
- <el-radio label="男"></el-radio>
- <el-radio label="女"></el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item style="width:395px ;" label="身份证" prop="identity">
- <el-input size="medium" type="text"
- v-model.trim="pickupinif.identity"></el-input>
- </el-form-item>
- <el-form-item style="width:395px ;" label="出生日期" prop="birth">
- <el-date-picker
- size="medium"
- type="date"
- placeholder="选择出生日期"
- v-model.trim="pickupinif.birth"
- style="width: 100%;">
- </el-date-picker>
- </el-form-item>
- <el-form-item style="width:395px ;" label="舱位类型" prop="Accommodation">
- <el-select style="width:100%" v-model="pickupinif.Accommodation" clearable filterable
- placeholder="请选择">
- <el-option v-for="item in cangweiType" :key="item.id" :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- </div>
- <el-form-item label="舱位备注">
- <el-input :rows="2" type="textarea" v-model="pickupinif.ClassRemarks"></el-input>
- </el-form-item>
- <el-form-item label="房间备注">
- <el-input :rows="2" type="textarea" v-model="pickupinif.Roomtype"></el-input>
- </el-form-item>
- <el-form-item label="餐食备注">
- <el-input :rows="2" type="textarea" v-model="pickupinif.Mealnotes"></el-input>
- </el-form-item>
- <el-form-item label="备注">
- <el-input :rows="2" type="textarea" v-model="pickupinif.remark"></el-input>
- </el-form-item>
- </el-form>
- <el-dialog class="dutzl" width="1242px" title="添加多条资料" :visible.sync="dialogTableVisible" :before-close="closeExpertFormDialog">
- <div class="dialog-hade">
- <label>PS:自动填写补全功能可能有误差请仔细核实,补全或修改(没有可用‘-’或‘暂无’代替)</label>
- <el-button @click="manysave" size="mini" type="primary">保 存</el-button>
- </div>
- <el-table :border="true" :data="tourClientListInfos">
- <el-table-column type="index" label="序号" width="50"></el-table-column>
- <el-table-column property="date" label="姓" width="100">
- <template slot-scope="scope">
- <el-autocomplete
- popper-class="el-autocomplete-suggestion"
- :popper-append-to-body="false"
- class="inline-input"
- size="mini"
- v-model.trim="scope.row.lastName"
- :fetch-suggestions="querySearch"
- @select="DTPromptChecked(scope.row)"
- ></el-autocomplete>
- </template>
- </el-table-column>
- <el-table-column label="名" width="100">
- <template slot-scope="scope">
- <el-input
- size="mini"
- type="text"
- v-model.trim="scope.row.firstName">
- </el-input>
- </template>
- </el-table-column>
- <el-table-column label="单位" width="150">
- <template slot-scope="scope">
- <el-autocomplete
- style="width:100% ;"
- popper-class="el-autocomplete-suggestion"
- :popper-append-to-body="false"
- class="inline-input"
- size="mini"
- v-model.trim="scope.row.companyFullName"
- :fetch-suggestions="querySearchdw"
- ></el-autocomplete>
- </template>
- </el-table-column>
- <el-table-column label="职务" width="150">
- <template slot-scope="scope">
- <el-input
- size="mini"
- type="text"
- v-model.trim="scope.row.job">
- </el-input>
- </template>
- </el-table-column>
- <el-table-column label="身份证" width="170">
- <template slot-scope="scope">
- <el-input
- size="mini"
- type="text"
- v-model.trim="scope.row.idCardNo">
- </el-input>
- </template>
- </el-table-column>
- <el-table-column label="手机号码" width="115">
- <template slot-scope="scope">
- <el-input
- size="mini"
- type="text"
- v-model.trim="scope.row.phone">
- </el-input>
- </template>
- </el-table-column>
- <el-table-column label="性别" width="150">
- <template slot-scope="scope">
- <el-radio-group size="mini" v-model="scope.row.sex">
- <el-radio label="男"></el-radio>
- <el-radio label="女"></el-radio>
- </el-radio-group>
- </template>
- </el-table-column>
- <el-table-column label="出生日期" width="100">
- <template slot-scope="scope">
- <el-date-picker
- :clearable="false"
- size="mini"
- type="date"
- placeholder="出生日期"
- v-model.trim="scope.row.birthDay"
- style="width: 100%;">
- </el-date-picker>
- </template>
- </el-table-column>
- <el-table-column label="舱位类型" width="115">
- <template slot-scope="scope">
- <el-select size="mini" style="width:100%" v-model="scope.row.shippingSpaceTypeId" clearable filterable
- placeholder="请选择">
- <el-option v-for="item in cangweiType" :key="item.id" :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </template>
- </el-table-column>
- </el-table>
- </el-dialog>
- </div>
- </div>
- </template>
- <script>
- import { pinyin } from 'pinyin-pro';
- import { cl, el } from '@fullcalendar/core/internal-common';
- export default {
- data () {
- return {
- dialogTableVisible: false,
- tourClientListInfos:[
- {
- lastName: "",
- firstName: "",
- pinyin:'',
- sex: '男',
- companyFullName: "",
- job: "",
- idCardNo: "",
- phone: "",
- birthDay: "",
- shippingSpaceTypeId: 460,
- shippingSpaceSpecialNeeds:'',
- hotelSpecialNeeds:'',
- mealSpecialNeeds:'',
- remark:'',
- },
- {
- lastName: "",
- firstName: "",
- pinyin:'',
- sex: '男',
- companyFullName: "",
- job: "",
- idCardNo: "",
- phone: "",
- birthDay: "",
- shippingSpaceTypeId: 460,
- shippingSpaceSpecialNeeds:'',
- hotelSpecialNeeds:'',
- mealSpecialNeeds:'',
- remark:'',
- },
- {
- lastName: "",
- firstName: "",
- pinyin:'',
- sex:'男',
- companyFullName: "",
- job: "",
- idCardNo: "",
- phone: "",
- birthDay: "",
- shippingSpaceTypeId: 460,
- shippingSpaceSpecialNeeds:'',
- hotelSpecialNeeds:'',
- mealSpecialNeeds:'',
- remark:'',
- },
- {
- lastName: "",
- firstName: "",
- pinyin:'',
- sex: '男',
- companyFullName: "",
- job: "",
- idCardNo: "",
- phone: "",
- birthDay: "",
- shippingSpaceTypeId: 460,
- shippingSpaceSpecialNeeds:'',
- hotelSpecialNeeds:'',
- mealSpecialNeeds:'',
- remark:'',
- },
- {
- lastName: "",
- firstName: "",
- pinyin:'',
- sex: '男',
- companyFullName: "",
- job: "",
- idCardNo: "",
- phone: "",
- birthDay: "",
- shippingSpaceTypeId: 460,
- shippingSpaceSpecialNeeds:'',
- hotelSpecialNeeds:'',
- mealSpecialNeeds:'',
- remark:'',
- },
- {
- lastName: "",
- firstName: "",
- pinyin:'',
- sex: '男',
- companyFullName: "",
- job: "",
- idCardNo: "",
- phone: "",
- birthDay: "",
- shippingSpaceTypeId: 460,
- shippingSpaceSpecialNeeds:'',
- hotelSpecialNeeds:'',
- mealSpecialNeeds:'',
- remark:'',
- },
- {
- lastName: "",
- firstName: "",
- pinyin:'',
- sex: '男',
- companyFullName: "",
- job: "",
- idCardNo: "",
- phone: "",
- birthDay: "",
- shippingSpaceTypeId: 460,
- shippingSpaceSpecialNeeds:'',
- hotelSpecialNeeds:'',
- mealSpecialNeeds:'',
- remark:'',
- },
- {
- lastName: "",
- firstName: "",
- pinyin:'',
- sex: '男',
- companyFullName: "",
- job: "",
- idCardNo: "",
- phone: "",
- birthDay: "",
- shippingSpaceTypeId: 460,
- shippingSpaceSpecialNeeds:'',
- hotelSpecialNeeds:'',
- mealSpecialNeeds:'',
- remark:'',
- },
- {
- lastName: "",
- firstName: "",
- pinyin:'',
- sex: '男',
- companyFullName: "",
- job: "",
- idCardNo: "",
- phone: "",
- birthDay: "",
- shippingSpaceTypeId: 460,
- shippingSpaceSpecialNeeds:'',
- hotelSpecialNeeds:'',
- mealSpecialNeeds:'',
- remark:'',
- },
- {
- lastName: "",
- firstName: "",
- pinyin:'',
- sex: '男',
- companyFullName: "",
- job: "",
- idCardNo: "",
- phone: "",
- birthDay: "",
- shippingSpaceTypeId: 460,
- shippingSpaceSpecialNeeds:'',
- hotelSpecialNeeds:'',
- mealSpecialNeeds:'',
- remark:'',
- },
- ],
- token:'',
- pageId:'',
- userId:'',
- diId:'',
- delegationInfoList:[],
- tableData: [],
- GroupInfo:{},
- cangweiType: [],//舱位类型
- restaurants:[],//姓数组
- restaurantss:[],
- units:[],
- unit:[],//danwei数组
- id:0,
- //必填参数
- pickupinif:{
- surname:'',//姓
- name:'',//名
- Pinyin:'',//拼音
- flats:'',//单位
- office:'',//职务
- phone:'',//手机号
- gender:'男',//性别
- identity:'',//身份证
- birth:'',//出生日期
- Accommodation:'',//舱位类型
- ClassRemarks:'',//舱位备注
- Roomtype:'',//房间类型
- Mealnotes:'',//餐食备注
- remark:'',//备注
- },
- pickupinifRules:{
- surname: [
- { required: true, message: '请输入姓', trigger: ['blur', 'change'] }
- ],
- name: [
- { required: true, message: '请输入名', trigger: ['blur', 'change'] }
- ],
- Pinyin: [
- { required: true, message: '请输入拼音', trigger: ['blur', 'change'] }
- ],
- flats: [
- { required: true, message: '请选择单位', trigger: ['blur', 'change'] }
- ],
- office: [
- { required: true, message: '请输入职务', trigger: ['blur', 'change'] }
- ],
- phone: [
- { required: true, message: '请输入手机号', trigger: ['blur', 'change'] }
- ],
- gender: [
- { required: true, message: '请选择性别', trigger: ['blur', 'change'] }
- ],
- identity: [
- { required: true, message: '请输入身份证', trigger: ['blur', 'change'] }
- ],
- birth: [
- { required: true, message: '请选择出生日期', trigger: ['blur', 'change'] }
- ],
- Accommodation: [
- { required: true, message: '请选择舱位类型', trigger: ['blur', 'change'] }
- ],
- },
- fileList: [],
- upLoadFile: [],
- fullscreenLoading:false,
- timeStamp:''
- }
- },
- methods:{
- //姓提示
- querySearch(queryString, cb) {
- var restaurants = this.restaurants;
- var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
- // 调用 callback 返回建议列表的数据
- cb(results);
- },
- //danwei提示
- querySearchdw(queryString, cb) {
- var unit = this.unit;
- var results = queryString ? unit.filter(this.createFilter(queryString)) : unit;
- // 调用 callback 返回建议列表的数据
- cb(results);
- },
- createFilter(queryString) {
- return (restaurant) => {
- return restaurant.value.replace(" ", "").toLowerCase().match(queryString.toLowerCase());
- };
- },
- delegationSelectChange(){
- this.PostShareGroupInfo()
- this.addhandoff()
- },
- //清空
- clearedlist(){
- this.tourClientListInfos=[
- {
- lastName: "",
- firstName: "",
- pinyin:'',
- sex: '男',
- companyFullName: "",
- job: "",
- idCardNo: "",
- phone: "",
- birthDay: "",
- shippingSpaceTypeId: 460,
- shippingSpaceSpecialNeeds:'',
- hotelSpecialNeeds:'',
- mealSpecialNeeds:'',
- remark:'',
- },
- {
- lastName: "",
- firstName: "",
- pinyin:'',
- sex: '男',
- companyFullName: "",
- job: "",
- idCardNo: "",
- phone: "",
- birthDay: "",
- shippingSpaceTypeId: 460,
- shippingSpaceSpecialNeeds:'',
- hotelSpecialNeeds:'',
- mealSpecialNeeds:'',
- remark:'',
- },
- {
- lastName: "",
- firstName: "",
- pinyin:'',
- sex:'男',
- companyFullName: "",
- job: "",
- idCardNo: "",
- phone: "",
- birthDay: "",
- shippingSpaceTypeId: 460,
- shippingSpaceSpecialNeeds:'',
- hotelSpecialNeeds:'',
- mealSpecialNeeds:'',
- remark:'',
- },
- {
- lastName: "",
- firstName: "",
- pinyin:'',
- sex: '男',
- companyFullName: "",
- job: "",
- idCardNo: "",
- phone: "",
- birthDay: "",
- shippingSpaceTypeId: 460,
- shippingSpaceSpecialNeeds:'',
- hotelSpecialNeeds:'',
- mealSpecialNeeds:'',
- remark:'',
- },
- {
- lastName: "",
- firstName: "",
- pinyin:'',
- sex: '男',
- companyFullName: "",
- job: "",
- idCardNo: "",
- phone: "",
- birthDay: "",
- shippingSpaceTypeId: 460,
- shippingSpaceSpecialNeeds:'',
- hotelSpecialNeeds:'',
- mealSpecialNeeds:'',
- remark:'',
- },
- {
- lastName: "",
- firstName: "",
- pinyin:'',
- sex: '男',
- companyFullName: "",
- job: "",
- idCardNo: "",
- phone: "",
- birthDay: "",
- shippingSpaceTypeId: 460,
- shippingSpaceSpecialNeeds:'',
- hotelSpecialNeeds:'',
- mealSpecialNeeds:'',
- remark:'',
- },
- {
- lastName: "",
- firstName: "",
- pinyin:'',
- sex: '男',
- companyFullName: "",
- job: "",
- idCardNo: "",
- phone: "",
- birthDay: "",
- shippingSpaceTypeId: 460,
- shippingSpaceSpecialNeeds:'',
- hotelSpecialNeeds:'',
- mealSpecialNeeds:'',
- remark:'',
- },
- {
- lastName: "",
- firstName: "",
- pinyin:'',
- sex: '男',
- companyFullName: "",
- job: "",
- idCardNo: "",
- phone: "",
- birthDay: "",
- shippingSpaceTypeId: 460,
- shippingSpaceSpecialNeeds:'',
- hotelSpecialNeeds:'',
- mealSpecialNeeds:'',
- remark:'',
- },
- {
- lastName: "",
- firstName: "",
- pinyin:'',
- sex: '男',
- companyFullName: "",
- job: "",
- idCardNo: "",
- phone: "",
- birthDay: "",
- shippingSpaceTypeId: 460,
- shippingSpaceSpecialNeeds:'',
- hotelSpecialNeeds:'',
- mealSpecialNeeds:'',
- remark:'',
- },
- {
- lastName: "",
- firstName: "",
- pinyin:'',
- sex: '男',
- companyFullName: "",
- job: "",
- idCardNo: "",
- phone: "",
- birthDay: "",
- shippingSpaceTypeId: 460,
- shippingSpaceSpecialNeeds:'',
- hotelSpecialNeeds:'',
- mealSpecialNeeds:'',
- remark:'',
- },
- ]
- },
- //获取团组
- GetGroupNameList() {
- var url = "/api/Business/GetGroupNameList"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + this.token
- },
- data: {
- portType: 1
- }
- }).then(function (res) {
- console.log(res)
- if (res.data.code == 200) {
- that.delegationInfoList=res.data.data;
- that.diId=that.delegationInfoList[0].id;
- that.PostShareGroupInfo();
- }
- }).catch(function (error) {
- that.$message.error("获取团组失败");
- });
- },
- //获取团组详情
- PostShareGroupInfo() {
- var url = "/api/Business/PostShareGroupInfo"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + this.token
- },
- data: {
- portType: 1,
- id:that.diId
- }
- }).then(function (res) {
- console.log(res)
- if (res.data.code == 200) {
- that.GroupInfo=res.data.data
- that.PostTourClientListByDiId()
- }else{
- that.$message.error(res.data.msg);
- }
- }).catch(function (error) {
- that.$message.error("获取团组详情失败!");
- });
- },
- //获取客户table
- PostTourClientListByDiId() {
- var url = "/api/Groups/PostTourClientListByDiId"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + this.token
- },
- data: {
- portType: 1,
- userId:that.userId,
- pageId:that.pageId,
- diId:that.diId,
- }
- }).then(function (res) {
- console.log(res)
- if (res.data.code == 200) {
- that.tableData=res.data.data;
- }else{
- that.$message.error(res.data.msg);
- }
- }).catch(function (error) {
- that.$message.error("获取接团名单失败!");
- });
- },
- //获取基础数据
- PostTourClientListBasicDataInit() {
- this.fullscreenLoading=true;
- var url = "/api/Groups/PostTourClientListBasicDataInit"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + this.token
- },
- data: {
- portType: 1,
- userId:that.userId,
- pageId: that.pageId,
- }
- }).then(function (res) {
- console.log(res)
- if (res.data.code == 200) {
- that.restaurantss=res.data.data.clientData;
- that.cangweiType=res.data.data.shippingSpaceTypeData;
- that.pickupinif.Accommodation=that.cangweiType[0].id;
- that.units=res.data.data.clientCompanyData;
- that.restaurants= that.restaurantss.map((terminal) => {
- return {
- value: terminal.lastName +' '+ terminal.firstName +' '+terminal.pinyin+' '+terminal.companyFullName+' '+terminal.job+' '+terminal.phone+' '+(terminal.sex==0?'男':'女')+' '+terminal.idCardNo+' '+(terminal.birthDay).split(' ')[0],
- };
- });
- that.unit= that.units.map((terminal) => {
- return {
- value: terminal.companyFullName,
- };
- });
- that.fullscreenLoading=false;
- }
- }).catch(function (error) {
- that.fullscreenLoading=false;
- that.$message.error("获取基础数据失败!");
- });
- },
- //提示选中
- PromptChecked(){
- console.log(this.pickupinif.surname.split(' '))
- var inif=this.pickupinif.surname.split(' ');
- this.pickupinif.surname=inif[0];
- this.pickupinif.name=inif[1];
- this.pickupinif.Pinyin=inif[2];
- if(this.pickupinif.Pinyin==''){
- let surname='';
- let surname1=pinyin(this.pickupinif.surname, {toneType: 'none'}).toUpperCase();
- let surname2=pinyin(this.pickupinif.name, {toneType: 'none'}).toUpperCase();
- surname=surname1+'/'+surname2;
- this.pickupinif.Pinyin=surname;
- console.log(surname)
- }
- this.pickupinif.flats=inif[3];
- this.pickupinif.office=inif[4];
- this.pickupinif.phone=inif[5];
- this.pickupinif.gender=inif[6];
- this.pickupinif.identity=inif[7];
- this.pickupinif.birth=inif[8];
-
- },
- //添加多条提示选中
- DTPromptChecked(val){
- console.log(val)
- var inif=val.lastName.split(' ');
- console.log(inif)
- val.lastName=inif[0]?inif[0]:''
- val.firstName=inif[1]?inif[1]:''
- val.companyFullName=inif[3]?inif[3]:''
- val.job=inif[4]?inif[4]:''
- val.idCardNo=inif[7]?inif[7]:''
- val.phone=inif[5]?inif[5]:''
- val.sex=inif[6]?inif[6]:''
- val.birthDay=inif[8]?inif[8]:''
- },
- //姓值改变
- ChangesValue(){
- console.log(this.pickupinif.surname)
- this.pickupinif.name='';
- this.pickupinif.Pinyin='';
- this.pickupinif.flats='';
- this.pickupinif.office='';
- this.pickupinif.phone='';
- this.pickupinif.gender='';
- this.pickupinif.identity='';
- this.pickupinif.birth='';
- if (this.$refs.pickupinif){
- this.$nextTick(() => {
- this.$refs['pickupinif'].clearValidate();
- })
- }
-
- },
- //转换日期
- transferdate(val){
- var today = new Date(val);
- var DD = String(today.getDate()).padStart(2, '0'); // 获取日
- var MM = String(today.getMonth() + 1).padStart(2, '0'); //获取月份,1 月为 0
- var yyyy = today.getFullYear(); // 获取年
- return yyyy+'-'+MM+'-'+DD
- },
- //输入
- InputValue(){
- let surname='';
- let surname1=pinyin(this.pickupinif.surname, {toneType: 'none'}).toUpperCase();
- let surname2=pinyin(this.pickupinif.name, {toneType: 'none'}).toUpperCase();
- surname=surname1+'/'+surname2;
- this.pickupinif.Pinyin=surname;
- console.log(surname)
- },
- //查询详情
- PostTourClientListDetails(index,row) {
- this.id=row.id;
- var url = "/api/Groups/PostTourClientListDetails"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + this.token
- },
- data: {
- portType: 1,
- userId:that.userId,
- pageId:that.pageId,
- id:row.id,
- }
- }).then(function (res) {
- console.log(res)
- if (res.data.code == 200) {
- that.pickupinif={
- surname:res.data.data.lastName,//姓
- name:res.data.data.firstName,//名
- flats:res.data.data.companyFullName,//单位
- office:res.data.data.job,//职务
- phone:res.data.data.phone,//手机号
- gender:res.data.data.sex==0?'男':'女',//性别
- identity:res.data.data.idCardNo,//身份证
- birth:res.data.data.birthDay,//出生日期
- Accommodation:res.data.data.shippingSpaceTypeId,//舱位类型
- ClassRemarks:res.data.data.shippingSpaceSpecialNeeds,//舱位备注
- Roomtype:res.data.data.hotelSpecialNeeds,//房间类型
- Mealnotes:res.data.data.mealSpecialNeeds,//餐食备注
- remark:res.data.data.remark,//备注
- };
- that.pickupinif.Pinyin=res.data.data.pinyin;//拼音
- if(that.pickupinif.Pinyin==''){
- let surname='';
- let surname1=pinyin(that.pickupinif.surname, {toneType: 'none'}).toUpperCase();
- let surname2=pinyin(that.pickupinif.name, {toneType: 'none'}).toUpperCase();
- surname=surname1+'/'+surname2;
- that.pickupinif.Pinyin=surname;
- }
- }else{
- that.$message.error(res.data.msg);
- }
- }).catch(function (error) {
- that.$message.error("查询详情失败!");
- });
- },
- //保存
- preservation(formName){
- this.$refs[formName].validate((valid) => {
- if (valid) {
- this.PostTourClientListAddOrEdit()
- } else {
- console.log('error submit!!');
- return false;
- }
- });
- },
- //保存修改api
- PostTourClientListAddOrEdit() {
- this.fullscreenLoading=true;
- var url = "/api/Groups/PostTourClientListAddOrEdit"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + this.token
- },
- data: {
- portType: 1,
- userId:that.userId,
- pageId:that.pageId,
- diId:that.diId,
- id:that.id,
- lastName:that.pickupinif.surname,//姓
- firstName:that.pickupinif.name,//名
- pinyin:that.pickupinif.Pinyin,//姓名拼音
- sex:that.pickupinif.gender=='男'?0:1,//性别 0 男1 女 其他值 未设置
- phone:that.pickupinif.phone,//手机号
- companyFullName:that.pickupinif.flats,//公司名全称
- job:that.pickupinif.office,//职位
- idCardNo:that.pickupinif.identity,//身份证No
- // tel:'',//...
- birthDay:that.pickupinif.birth,//生日
- shippingSpaceTypeId:that.pickupinif.Accommodation,//舱位类型(数据类型表Id)
- shippingSpaceSpecialNeeds:that.pickupinif.ClassRemarks,//舱位特殊需求
- hotelSpecialNeeds:that.pickupinif.Roomtype,//酒店特殊需求
- mealSpecialNeeds:that.pickupinif.Mealnotes,//餐食特殊需求
- remark:that.pickupinif.remark,//备注
- }
- }).then(function (res) {
- console.log(res)
- if (res.data.code == 200) {
- that.$message({
- type: 'success',
- message: res.data.msg,
- duration:'3000'
- });
- that.PostTourClientListByDiId();
- setTimeout(() => {
- that.addhandoff();
- that.loading=false;
- }, 500);
- that.fullscreenLoading=false;
- }else{
- that.$message.error(res.data.msg);
- that.fullscreenLoading=false;
- }
- }).catch(function (error) {
- that.fullscreenLoading=false;
- that.$message.error("保存或修改失败!");
- });
- },
- //新增切换
- addhandoff(){
- this.id=0;
- this.pickupinif={
- surname:'',//姓
- name:'',//名
- Pinyin:'',//拼音
- flats:'',//单位
- office:'',//职务
- phone:'',//手机号
- gender:'男',//性别
- identity:'',//身份证
- birth:'',//出生日期
- Accommodation:'',//舱位类型
- ClassRemarks:'',//舱位备注
- Roomtype:'',//房间类型
- Mealnotes:'',//餐食备注
- remark:'',//备注
- };
- if (this.$refs.pickupinif){
- this.$nextTick(() => {
- this.$refs['pickupinif'].clearValidate();
- })
- }
- this.PostTourClientListBasicDataInit()
- },
- //清空表单
- closeExpertFormDialog(done){
- this.clearedlist()
- done();//done 用于关闭 Dialog
- },
- //删除
- PostTourClientListDel(index,row) {
- this.$confirm('此操作将删除此条数据,是否确认', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- var url = "/api/Groups/PostTourClientListDel"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + this.token
- },
- data: {
- portType: 1,
- userId:that.userId,
- pageId:that.pageId,
- id:row.id,
- }
- }).then(function (res) {
- console.log(res)
- if (res.data.code == 200) {
- that.$message({
- type: 'success',
- message: res.data.msg,
- duration:'3000'
- });
- that.PostTourClientListByDiId();
- }else{
- that.$message.error(res.data.msg);
- }
- }).catch(function (error) {
- that.$message.error("删除失败!");
- });
- }).catch(() => {
- });
- },
- //多条保存
- manysave(){
- var tourClientList=[];
- console.log(this.tourClientListInfos)
- for(var i=0;i<this.tourClientListInfos.length;i++){
- if(this.tourClientListInfos[i].lastName!=""&&this.tourClientListInfos[i].firstName!=""){
- tourClientList.push(this.tourClientListInfos[i])
- }
- }
- tourClientList=JSON.parse(JSON.stringify(tourClientList))
- for(var x=0;x<tourClientList.length;x++){
- tourClientList[x].sex=tourClientList[x].sex=='男'?0:1
- }
- if(tourClientList){
- this.PostTourClientListAddMultiple(tourClientList)
- }
- console.log(tourClientList)
- },
- //多存api
- PostTourClientListAddMultiple(listinif) {
- var url = "/api/Groups/PostTourClientListAddMultiple"
- var that = this
- var data= {
- portType: 1,
- userId:that.userId,
- pageId:that.pageId,
- diId:that.diId,
- tourClientListInfos:listinif
- }
- console.log(JSON.stringify(data))
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + this.token
- },
- data: {
- portType: 1,
- userId:that.userId,
- pageId:that.pageId,
- diId:that.diId,
- tourClientListInfos:listinif
- }
- }).then(function (res) {
- console.log(res)
- if (res.data.code == 200) {
- that.$message({
- type: 'success',
- message: res.data.msg,
- duration:'3000'
- });
- that.PostTourClientListByDiId();
- that.clearedlist();
- that.dialogTableVisible=false;
- }else{
- that.$message.error(res.data.msg);
- }
- }).catch(function (error) {
- that.$message.error("保存失败!");
- });
- },
- //导出团组名单
- Exportlist(){
- var url = "/api/Groups/PostTourClientListDownloadFile"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + this.token
- },
- data: {
- portType: 1,
- userId:that.userId,
- pageId:that.pageId,
- diId:that.diId,
- }
- }).then(function (res) {
- console.log(res)
- if (res.data.code == 200) {
- window.location.href = res.data.data
- // that.$message({
- // type: 'success',
- // message: res.data.msg,
- // duration:'3000'
- // });
- }else{
- that.$message.error(res.data.msg);
- }
- }).catch(function (error) {
- that.$message.error("下载失败!");
- });
- },
- async httpRequest(file, fileList) {
- this.upLoadFile = []
- for (let i in fileList) {
- this.upLoadFile[i] = await this.getBase64(fileList[i].raw)
- }
- console.log('上传文件列表', this.upLoadFile)
- },
- // 转base64码
- getBase64(file) {
- return new Promise((resolve, reject) => {
- const reader = new FileReader()
- let fileResult = ''
- reader.readAsDataURL(file)
- // 开始转
- reader.onload = () => {
- fileResult = reader.result
- }
- // 转 失败
- reader.onerror = error => {
- reject(error)
- }
- // 转 结束
- reader.onloadend = () => {
- resolve(fileResult)
- }
- })
- },
- submitUpload() {
- console.log(this.upLoadFile)
- if(this.upLoadFile.length==0){
- this.$message.error("未选择图片!");
- }else{
- this.fullscreenLoading=true;
- var url = "/api/BaiduOCR/ClientOCR"
- var that = this
- this.$axios({
- method: 'post',
- url: url,
- headers: {
- Authorization: 'Bearer ' + this.token
- },
- data: {
- base64img:that.upLoadFile[0]
- }
- }).then(function (res) {
- console.log(res)
- if (res.data.code == 200) {
- that.fullscreenLoading=false;
- var dataarr=res.data.data;
- var dataarrnew=[];
- for(var i=0;i<dataarr.length;i++){
- dataarrnew.push(
- {
- lastName:dataarr[i].lastName,
- firstName:dataarr[i].firstName,
- pinyin:'',
- sex:dataarr[i].sex,
- companyFullName:dataarr[i].companyFullName,
- job:dataarr[i].job,
- idCardNo:dataarr[i].iDcard,
- phone:dataarr[i].phone,
- birthDay:dataarr[i].birthday=='-'?'':dataarr[i].birthday,
- shippingSpaceTypeId:dataarr[i].berth,
- shippingSpaceSpecialNeeds:'',
- hotelSpecialNeeds:'',
- mealSpecialNeeds:'',
- remark:'',
- }
- )
- // that.tourClientListInfos[i]=dataarrnew[i]
- }
- that.tourClientListInfos=dataarrnew
- console.log(10-dataarrnew.length)
- var len = 10 - dataarrnew.length
- console.log(len)
- for(var jk=0;jk<len;jk++){
- that.tourClientListInfos.push(
- {
- lastName: '',
- firstName: "",
- pinyin:'',
- sex: '男',
- companyFullName: "",
- job: "",
- idCardNo: "",
- phone: "",
- birthDay: "",
- shippingSpaceTypeId: 460,
- shippingSpaceSpecialNeeds:'',
- hotelSpecialNeeds:'',
- mealSpecialNeeds:'',
- remark:'',
- }
- )
- }
- that.$message({
- type: 'success',
- message: res.data.msg,
- duration:'3000'
- });
- // setTimeout(function(){ that.dialogTableVisible=true; }, 3000);
- that.dialogTableVisible=true;
- }else{
- that.fullscreenLoading=false;
- that.$message.error(res.data.msg);
- }
- }).catch(function (error) {
- that.fullscreenLoading=false;
- that.$message.error("导入失败!");
- });
-
- }
- },
- },
- filters:{
- filter_city(value){
- if(value){
- return value.replaceAll('|','、')
- }
- },
- filter_time(value){
- if(value){
- return value.split(" ")[0]
- }
- }
- },
- mounted(){
- console.log(this.tourClientListInfos)
- this.token = JSON.parse(localStorage.getItem('userinif')).token;
- this.pageId=Number(localStorage.getItem('indexs').split('-')[1]);//页面id
- this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
- this.GetGroupNameList();
- this.PostTourClientListBasicDataInit()
- }
- }
- </script>
- <style>
- .pickuplist-all {
- background-color: #fff;
- padding: 10px;
- box-shadow: 0 0 5px #0005;
- border-radius: 10px;
- height: 100%;
- min-height: 840px;
- min-width: 900px;
- }
- .pickuplist-all .block {
- margin-top: 10px;
- }
- .pickuplist-head-li label {
- color: #606266;
- font-size: 15px;
- font-weight: 600;
- }
- .pickuplist-head {
- display: flex;
- justify-content: space-between;
- }
- .pickuplist-info {
- display: flex;
- margin-top: 10px;
- }
- .pickuplist-info .pickuplist-info-li:last-child{
- margin-right: 0;
- }
- .pickuplist-info-li {
- margin-right: 30px;
- }
- .pickuplist-info-li label {
- color: #606266;
- font-size: 15px;
- font-weight: 600;
- }
- .pickuplist-info-li span {
- color: #606266;
- font-size: 14px;
- }
- .pickuplist-Upload-box{
- margin-top: 10px;
- display: flex;
- align-items: baseline;
- justify-content: end;
- }
- .pickuplist-Upload-box .upload-demo{
- display: flex;
- align-items: center;
- }
- .pickuplist-Upload-box .el-upload__tip{
- margin-top: 0px;
- }
- .pickuplist-Upload-box .el-upload-list__item:first-child{
- margin-top: 0px;
- }
- .pickuplist-table{
- margin-top: 20px;
- }
- .pickuplist-btn{
- margin-top: 30px;
- padding-bottom: 10px;
- display: flex;
- justify-content: space-between;
- align-items: center;
- border-bottom: 1px solid #C0C4CC;
- }
- .pickuplist-btn-lable{
- color: #606266;
- font-size: 15px;
- font-weight: 600;
- }
- .pickuplist-all .pickuplist-form{
- margin-top: 20px;
- }
- .pickuplist-all .el-autocomplete-suggestion {
- width: auto!important;
- }
- .dutzl .el-input__inner{
- padding: 0 5px;
- }
- .dutzl .el-date-editor .el-icon-date {
- display: none;
- }
- .dialog-hade{
- display: flex;
- justify-content:space-between ;
- align-items: center;
- margin-bottom: 10px;
- }
- .dialog-hade label{
- color: red;
- }
- .dutzl .el-dialog__body{
- padding-top: 0;
- }
- .dutzl .el-dialog__title{
- font-size: 17px;
- font-weight: 600;
- }
- .dutzl .el-input--prefix .el-input__inner{
- padding-left: 5px;
- padding-right: 5px
- }
- .dutzl .el-table td.el-table__cell div, .el-table th.el-table__cell>.cell{
- text-align: left;
- }
- </style>
|