PickupList.vue 59 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477
  1. <template>
  2. <div v-loading.fullscreen.lock="fullscreenLoading">
  3. <div class="pickuplist-all">
  4. <div class="pickuplist-head">
  5. <div class="pickuplist-head-li">
  6. <label>团组名称:</label>
  7. <el-select style="width:220px" @change="delegationSelectChange" v-model="diId" clearable filterable
  8. placeholder="请选择">
  9. <el-option v-for="item in delegationInfoList" :key="item.id" :label="item.groupName"
  10. :value="item.id">
  11. </el-option>
  12. </el-select>
  13. </div>
  14. <div class="pickuplist-info">
  15. <div class="pickuplist-info-li">
  16. <label>团 号:</label>
  17. <span>{{ GroupInfo.tourCode }}</span>
  18. </div>
  19. <div class="pickuplist-info-li">
  20. <label>客 户:</label>
  21. <span>{{ GroupInfo.clientName }}</span>
  22. </div>
  23. <div class="pickuplist-info-li">
  24. <label>出访国家:</label>
  25. <span>{{ GroupInfo.visitCountry | filter_city }}</span>
  26. </div>
  27. <div class="pickuplist-info-li">
  28. <label>起止日期:</label>
  29. <span>{{ GroupInfo.visitStartDate | filter_time }}~{{ GroupInfo.visitEndDate | filter_time }}</span>
  30. </div>
  31. <div class="pickuplist-info-li">
  32. <label>天数/人数:</label>
  33. <span>{{ GroupInfo.visitDays }}/{{ GroupInfo.visitPNumber }}</span>
  34. </div>
  35. </div>
  36. </div>
  37. <div class="pickuplist-Upload-box">
  38. <div slot="tip" class="el-upload__tip">只能识别jpg/png文件&nbsp;&nbsp;&nbsp;</div>
  39. <el-upload class="upload-demo" ref="upload" action="" :on-change="httpRequest" :on-remove="httpRequest"
  40. accept=".png, .jpg, .jpeg" :limit="1" :file-list="fileList" :auto-upload="false">
  41. <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
  42. <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">识别图片</el-button>
  43. </el-upload>
  44. </div>
  45. <div class="pickuplist-table">
  46. <el-table :data="tableData" border style="width: 100%">
  47. <el-table-column type="index" label="序号" width="55">
  48. </el-table-column>
  49. <el-table-column prop="lastName" label="姓" width="100">
  50. </el-table-column>
  51. <el-table-column prop="firstName" label="名" width="100">
  52. </el-table-column>
  53. <el-table-column prop="companyFullName" label="单位">
  54. </el-table-column>
  55. <el-table-column prop="job" label="职务">
  56. </el-table-column>
  57. <el-table-column prop="idCardNo" label="身份证" width="180">
  58. </el-table-column>
  59. <el-table-column prop="sex" label="性别" width="55">
  60. <template slot-scope="scope">
  61. {{ scope.row.sex == 0 ? '男' : '女' }}
  62. </template>
  63. </el-table-column>
  64. <el-table-column prop="isAccompany" label="是否陪同" width="80">
  65. <template slot-scope="scope">
  66. {{ scope.row.isAccompany == 1 ? '否' : '是' }}
  67. </template>
  68. </el-table-column>
  69. <el-table-column prop="operator" label="操作人" width="80">
  70. </el-table-column>
  71. <el-table-column label="操作" width="100">
  72. <template slot-scope="scope">
  73. <el-button @click.native.prevent="PostTourClientListDetails(scope.$index, scope.row)"
  74. type="text" size="small">
  75. 详细
  76. </el-button>
  77. <el-button @click.native.prevent="PostTourClientListDel(scope.$index, scope.row)" type="text"
  78. size="small">
  79. 删除
  80. </el-button>
  81. </template>
  82. </el-table-column>
  83. </el-table>
  84. </div>
  85. <div class="pickuplist-btn">
  86. <div class="pickuplist-btn-lable">
  87. 详 情
  88. </div>
  89. <div>
  90. <el-button slot="trigger" @click="Exportlist(1)" type="primary">导出团组名单(英文)</el-button>
  91. <el-button slot="trigger" @click="Exportlist(0)" type="primary">导出团组名单</el-button>
  92. <el-button type="primary" @click="dialogTableVisible = true">添加多个资料</el-button>
  93. <el-button type="primary" @click="addhandoff">新增切换</el-button>
  94. <el-button type="primary" @click="preservation('pickupinif')">保存设置</el-button>
  95. </div>
  96. </div>
  97. <el-form :model="pickupinif" :rules="pickupinifRules" ref="pickupinif" label-width="110px"
  98. class="demo-OpHotelReservationsData pickuplist-form">
  99. <div style="display: flex;flex-wrap: wrap;">
  100. <div style="width:395px ;display: flex;">
  101. <el-form-item style="width:50% ;" label="姓" prop="surname">
  102. <el-autocomplete popper-class="el-autocomplete-suggestion" :popper-append-to-body="false"
  103. class="inline-input" size="medium" v-model.trim="pickupinif.surname"
  104. :fetch-suggestions="querySearch" @select="PromptChecked"
  105. @input="InputValue"></el-autocomplete>
  106. </el-form-item>
  107. <el-form-item label-width="50px" style="width:50% ;" label="名" prop="name">
  108. <el-input @input="InputValue" size="medium" type="text"
  109. v-model.trim="pickupinif.name"></el-input>
  110. </el-form-item>
  111. </div>
  112. <el-form-item style="width:395px ;" label="拼音" prop="Pinyin">
  113. <el-input size="medium" type="text" v-model.trim="pickupinif.Pinyin"></el-input>
  114. </el-form-item>
  115. <el-form-item style="width:395px ;" label="单位" prop="flats">
  116. <el-autocomplete style="width:100% ;" popper-class="el-autocomplete-suggestion"
  117. :popper-append-to-body="false" class="inline-input" size="medium"
  118. v-model.trim="pickupinif.flats" :fetch-suggestions="querySearchdw"></el-autocomplete>
  119. </el-form-item>
  120. <el-form-item style="width:395px ;" label="职务" prop="office">
  121. <el-input size="medium" type="text" v-model.trim="pickupinif.office"></el-input>
  122. </el-form-item>
  123. <el-form-item style="width:395px ;" label="性别">
  124. <el-radio-group v-model="pickupinif.gender">
  125. <el-radio label="男"></el-radio>
  126. <el-radio label="女"></el-radio>
  127. </el-radio-group>
  128. </el-form-item>
  129. <el-form-item style="width:395px ;" label="出生日期">
  130. <el-date-picker size="medium" type="date" placeholder="选择出生日期" v-model.trim="pickupinif.birth"
  131. style="width: 100%;">
  132. </el-date-picker>
  133. </el-form-item>
  134. <el-form-item style="width:395px ;" label="舱位类型" prop="Accommodation">
  135. <el-select style="width:100%" v-model="pickupinif.Accommodation" clearable filterable
  136. placeholder="请选择">
  137. <el-option v-for="item in cangweiType" :key="item.id" :label="item.name" :value="item.id">
  138. </el-option>
  139. </el-select>
  140. </el-form-item>
  141. <el-form-item style="width:395px ;" label="是否陪同">
  142. <el-radio-group v-model="pickupinif.isAccompany">
  143. <el-radio label="是"></el-radio>
  144. <el-radio label="否"></el-radio>
  145. </el-radio-group>
  146. </el-form-item>
  147. <el-form-item style="width:395px ;" label="手机号">
  148. <el-input size="medium" type="text" v-model.trim="pickupinif.phone"></el-input>
  149. </el-form-item>
  150. <el-form-item style="width:395px ;" label="身份证">
  151. <el-input size="medium" type="text" v-model.trim="pickupinif.identity"></el-input>
  152. </el-form-item>
  153. </div>
  154. <el-form-item label="舱位备注">
  155. <el-input :rows="2" type="textarea" v-model="pickupinif.ClassRemarks"></el-input>
  156. </el-form-item>
  157. <el-form-item label="房间备注">
  158. <el-input :rows="2" type="textarea" v-model="pickupinif.Roomtype"></el-input>
  159. </el-form-item>
  160. <el-form-item label="餐食备注">
  161. <el-input :rows="2" type="textarea" v-model="pickupinif.Mealnotes"></el-input>
  162. </el-form-item>
  163. <el-form-item label="备注">
  164. <el-input :rows="2" type="textarea" v-model="pickupinif.remark"></el-input>
  165. </el-form-item>
  166. </el-form>
  167. <el-dialog class="dutzl" width="1392px" title="添加多条资料" :visible.sync="dialogTableVisible"
  168. :before-close="closeExpertFormDialog">
  169. <div class="dialog-hade">
  170. <label>PS:自动填写补全功能可能有误差请仔细核实,补全或修改(没有可用‘-’或‘暂无’代替)</label>
  171. <el-button @click="manysave" size="mini" type="primary">保 存</el-button>
  172. </div>
  173. <el-table :border="true" :data="tourClientListInfos">
  174. <el-table-column type="index" label="序号" width="50"></el-table-column>
  175. <el-table-column property="date" label="姓" width="100">
  176. <template slot-scope="scope">
  177. <el-autocomplete popper-class="el-autocomplete-suggestion" :popper-append-to-body="false"
  178. class="inline-input" size="mini" v-model.trim="scope.row.lastName"
  179. :fetch-suggestions="querySearch" @select="DTPromptChecked(scope.row)"></el-autocomplete>
  180. </template>
  181. </el-table-column>
  182. <el-table-column label="名" width="100">
  183. <template slot-scope="scope">
  184. <el-input size="mini" type="text" v-model.trim="scope.row.firstName">
  185. </el-input>
  186. </template>
  187. </el-table-column>
  188. <el-table-column label="单位" width="150">
  189. <template slot-scope="scope">
  190. <el-autocomplete style="width:100% ;" popper-class="el-autocomplete-suggestion"
  191. :popper-append-to-body="false" class="inline-input" size="mini"
  192. v-model.trim="scope.row.companyFullName"
  193. :fetch-suggestions="querySearchdw"></el-autocomplete>
  194. </template>
  195. </el-table-column>
  196. <el-table-column label="职务" width="150">
  197. <template slot-scope="scope">
  198. <el-input size="mini" type="text" v-model.trim="scope.row.job">
  199. </el-input>
  200. </template>
  201. </el-table-column>
  202. <el-table-column label="身份证" width="170">
  203. <template slot-scope="scope">
  204. <el-input size="mini" type="text" v-model.trim="scope.row.idCardNo">
  205. </el-input>
  206. </template>
  207. </el-table-column>
  208. <el-table-column label="手机号码" width="115">
  209. <template slot-scope="scope">
  210. <el-input size="mini" type="text" v-model.trim="scope.row.phone">
  211. </el-input>
  212. </template>
  213. </el-table-column>
  214. <el-table-column label="性别" width="150">
  215. <template slot-scope="scope">
  216. <el-radio-group size="mini" v-model="scope.row.sex">
  217. <el-radio label="男"></el-radio>
  218. <el-radio label="女"></el-radio>
  219. </el-radio-group>
  220. </template>
  221. </el-table-column>
  222. <el-table-column label="是否陪同" width="150">
  223. <template slot-scope="scope">
  224. <el-radio-group size="mini" v-model="scope.row.isAccompany">
  225. <el-radio label="是"></el-radio>
  226. <el-radio label="否"></el-radio>
  227. </el-radio-group>
  228. </template>
  229. </el-table-column>
  230. <el-table-column label="出生日期" width="100">
  231. <template slot-scope="scope">
  232. <el-date-picker :clearable="false" size="mini" type="date" placeholder="出生日期"
  233. v-model.trim="scope.row.birthDay" style="width: 100%;padding-left: 0px;padding-right: 0px;">
  234. </el-date-picker>
  235. </template>
  236. </el-table-column>
  237. <el-table-column label="舱位类型" width="115">
  238. <template slot-scope="scope">
  239. <el-select size="mini" style="width:100%" v-model="scope.row.shippingSpaceTypeId" clearable
  240. filterable placeholder="请选择">
  241. <el-option v-for="item in cangweiType" :key="item.id" :label="item.name" :value="item.id">
  242. </el-option>
  243. </el-select>
  244. </template>
  245. </el-table-column>
  246. </el-table>
  247. </el-dialog>
  248. </div>
  249. </div>
  250. </template>
  251. <script>
  252. import { pinyin } from 'pinyin-pro';
  253. import { cl, el } from '@fullcalendar/core/internal-common';
  254. export default {
  255. data() {
  256. return {
  257. dialogTableVisible: false,
  258. tourClientListInfos: [
  259. {
  260. lastName: "",
  261. firstName: "",
  262. pinyin: '',
  263. sex: '男',
  264. isAccompany: '否',//陪同
  265. companyFullName: "",
  266. job: "",
  267. idCardNo: "",
  268. phone: "",
  269. birthDay: "",
  270. shippingSpaceTypeId: 460,
  271. shippingSpaceSpecialNeeds: '',
  272. hotelSpecialNeeds: '',
  273. mealSpecialNeeds: '',
  274. remark: '',
  275. },
  276. {
  277. lastName: "",
  278. firstName: "",
  279. pinyin: '',
  280. sex: '男',
  281. isAccompany: '否',//陪同
  282. companyFullName: "",
  283. job: "",
  284. idCardNo: "",
  285. phone: "",
  286. birthDay: "",
  287. shippingSpaceTypeId: 460,
  288. shippingSpaceSpecialNeeds: '',
  289. hotelSpecialNeeds: '',
  290. mealSpecialNeeds: '',
  291. remark: '',
  292. },
  293. {
  294. lastName: "",
  295. firstName: "",
  296. pinyin: '',
  297. sex: '男',
  298. isAccompany: '否',//陪同
  299. companyFullName: "",
  300. job: "",
  301. idCardNo: "",
  302. phone: "",
  303. birthDay: "",
  304. shippingSpaceTypeId: 460,
  305. shippingSpaceSpecialNeeds: '',
  306. hotelSpecialNeeds: '',
  307. mealSpecialNeeds: '',
  308. remark: '',
  309. },
  310. {
  311. lastName: "",
  312. firstName: "",
  313. pinyin: '',
  314. sex: '男',
  315. isAccompany: '否',//陪同
  316. companyFullName: "",
  317. job: "",
  318. idCardNo: "",
  319. phone: "",
  320. birthDay: "",
  321. shippingSpaceTypeId: 460,
  322. shippingSpaceSpecialNeeds: '',
  323. hotelSpecialNeeds: '',
  324. mealSpecialNeeds: '',
  325. remark: '',
  326. },
  327. {
  328. lastName: "",
  329. firstName: "",
  330. pinyin: '',
  331. sex: '男',
  332. isAccompany: '否',//陪同
  333. companyFullName: "",
  334. job: "",
  335. idCardNo: "",
  336. phone: "",
  337. birthDay: "",
  338. shippingSpaceTypeId: 460,
  339. shippingSpaceSpecialNeeds: '',
  340. hotelSpecialNeeds: '',
  341. mealSpecialNeeds: '',
  342. remark: '',
  343. },
  344. {
  345. lastName: "",
  346. firstName: "",
  347. pinyin: '',
  348. sex: '男',
  349. isAccompany: '否',//陪同
  350. companyFullName: "",
  351. job: "",
  352. idCardNo: "",
  353. phone: "",
  354. birthDay: "",
  355. shippingSpaceTypeId: 460,
  356. shippingSpaceSpecialNeeds: '',
  357. hotelSpecialNeeds: '',
  358. mealSpecialNeeds: '',
  359. remark: '',
  360. },
  361. {
  362. lastName: "",
  363. firstName: "",
  364. pinyin: '',
  365. sex: '男',
  366. isAccompany: '否',//陪同
  367. companyFullName: "",
  368. job: "",
  369. idCardNo: "",
  370. phone: "",
  371. birthDay: "",
  372. shippingSpaceTypeId: 460,
  373. shippingSpaceSpecialNeeds: '',
  374. hotelSpecialNeeds: '',
  375. mealSpecialNeeds: '',
  376. remark: '',
  377. },
  378. {
  379. lastName: "",
  380. firstName: "",
  381. pinyin: '',
  382. sex: '男',
  383. isAccompany: '否',//陪同
  384. companyFullName: "",
  385. job: "",
  386. idCardNo: "",
  387. phone: "",
  388. birthDay: "",
  389. shippingSpaceTypeId: 460,
  390. shippingSpaceSpecialNeeds: '',
  391. hotelSpecialNeeds: '',
  392. mealSpecialNeeds: '',
  393. remark: '',
  394. },
  395. {
  396. lastName: "",
  397. firstName: "",
  398. pinyin: '',
  399. sex: '男',
  400. isAccompany: '否',//陪同
  401. companyFullName: "",
  402. job: "",
  403. idCardNo: "",
  404. phone: "",
  405. birthDay: "",
  406. shippingSpaceTypeId: 460,
  407. shippingSpaceSpecialNeeds: '',
  408. hotelSpecialNeeds: '',
  409. mealSpecialNeeds: '',
  410. remark: '',
  411. },
  412. {
  413. lastName: "",
  414. firstName: "",
  415. pinyin: '',
  416. sex: '男',
  417. isAccompany: '否',//陪同
  418. companyFullName: "",
  419. job: "",
  420. idCardNo: "",
  421. phone: "",
  422. birthDay: "",
  423. shippingSpaceTypeId: 460,
  424. shippingSpaceSpecialNeeds: '',
  425. hotelSpecialNeeds: '',
  426. mealSpecialNeeds: '',
  427. remark: '',
  428. },
  429. ],
  430. token: '',
  431. pageId: '',
  432. userId: '',
  433. diId: '',
  434. delegationInfoList: [],
  435. tableData: [],
  436. GroupInfo: {},
  437. cangweiType: [],//舱位类型
  438. restaurants: [],//姓数组
  439. restaurantss: [],
  440. units: [],
  441. unit: [],//danwei数组
  442. id: 0,
  443. //必填参数
  444. pickupinif: {
  445. surname: '',//姓
  446. name: '',//名
  447. Pinyin: '',//拼音
  448. flats: '',//单位
  449. office: '',//职务
  450. phone: '',//手机号
  451. gender: '男',//性别
  452. isAccompany:'否',//是否陪同
  453. identity: '',//身份证
  454. birth: '',//出生日期
  455. Accommodation: '',//舱位类型
  456. ClassRemarks: '',//舱位备注
  457. Roomtype: '',//房间类型
  458. Mealnotes: '',//餐食备注
  459. remark: '',//备注
  460. },
  461. pickupinifRules: {
  462. surname: [
  463. { required: true, message: '请输入姓', trigger: ['blur', 'change'] }
  464. ],
  465. name: [
  466. { required: true, message: '请输入名', trigger: ['blur', 'change'] }
  467. ],
  468. Pinyin: [
  469. { required: true, message: '请输入拼音', trigger: ['blur', 'change'] }
  470. ],
  471. flats: [
  472. { required: true, message: '请选择单位', trigger: ['blur', 'change'] }
  473. ],
  474. office: [
  475. { required: true, message: '请输入职务', trigger: ['blur', 'change'] }
  476. ],
  477. phone: [
  478. { required: true, message: '请输入手机号', trigger: ['blur', 'change'] }
  479. ],
  480. gender: [
  481. { required: true, message: '请选择性别', trigger: ['blur', 'change'] }
  482. ],
  483. identity: [
  484. { required: true, message: '请输入身份证', trigger: ['blur', 'change'] }
  485. ],
  486. birth: [
  487. { required: true, message: '请选择出生日期', trigger: ['blur', 'change'] }
  488. ],
  489. Accommodation: [
  490. { required: true, message: '请选择舱位类型', trigger: ['blur', 'change'] }
  491. ],
  492. },
  493. fileList: [],
  494. upLoadFile: [],
  495. fullscreenLoading: false,
  496. timeStamp: ''
  497. }
  498. },
  499. methods: {
  500. //姓提示
  501. querySearch(queryString, cb) {
  502. var restaurants = this.restaurants;
  503. var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
  504. // 调用 callback 返回建议列表的数据
  505. cb(results);
  506. },
  507. //danwei提示
  508. querySearchdw(queryString, cb) {
  509. var unit = this.unit;
  510. var results = queryString ? unit.filter(this.createFilter(queryString)) : unit;
  511. // 调用 callback 返回建议列表的数据
  512. cb(results);
  513. },
  514. createFilter(queryString) {
  515. return (restaurant) => {
  516. return restaurant.value.replace(" ", "").toLowerCase().match(queryString.toLowerCase());
  517. };
  518. },
  519. delegationSelectChange() {
  520. this.PostShareGroupInfo()
  521. this.addhandoff()
  522. },
  523. //清空
  524. clearedlist() {
  525. this.tourClientListInfos = [
  526. {
  527. lastName: "",
  528. firstName: "",
  529. pinyin: '',
  530. sex: '男',
  531. isAccompany: '否',//陪同
  532. companyFullName: "",
  533. job: "",
  534. idCardNo: "",
  535. phone: "",
  536. birthDay: "",
  537. shippingSpaceTypeId: 460,
  538. shippingSpaceSpecialNeeds: '',
  539. hotelSpecialNeeds: '',
  540. mealSpecialNeeds: '',
  541. remark: '',
  542. },
  543. {
  544. lastName: "",
  545. firstName: "",
  546. pinyin: '',
  547. sex: '男',
  548. isAccompany: '否',//陪同
  549. companyFullName: "",
  550. job: "",
  551. idCardNo: "",
  552. phone: "",
  553. birthDay: "",
  554. shippingSpaceTypeId: 460,
  555. shippingSpaceSpecialNeeds: '',
  556. hotelSpecialNeeds: '',
  557. mealSpecialNeeds: '',
  558. remark: '',
  559. },
  560. {
  561. lastName: "",
  562. firstName: "",
  563. pinyin: '',
  564. sex: '男',
  565. isAccompany: '否',//陪同
  566. companyFullName: "",
  567. job: "",
  568. idCardNo: "",
  569. phone: "",
  570. birthDay: "",
  571. shippingSpaceTypeId: 460,
  572. shippingSpaceSpecialNeeds: '',
  573. hotelSpecialNeeds: '',
  574. mealSpecialNeeds: '',
  575. remark: '',
  576. },
  577. {
  578. lastName: "",
  579. firstName: "",
  580. pinyin: '',
  581. sex: '男',
  582. isAccompany: '否',//陪同
  583. companyFullName: "",
  584. job: "",
  585. idCardNo: "",
  586. phone: "",
  587. birthDay: "",
  588. shippingSpaceTypeId: 460,
  589. shippingSpaceSpecialNeeds: '',
  590. hotelSpecialNeeds: '',
  591. mealSpecialNeeds: '',
  592. remark: '',
  593. },
  594. {
  595. lastName: "",
  596. firstName: "",
  597. pinyin: '',
  598. sex: '男',
  599. isAccompany: '否',//陪同
  600. companyFullName: "",
  601. job: "",
  602. idCardNo: "",
  603. phone: "",
  604. birthDay: "",
  605. shippingSpaceTypeId: 460,
  606. shippingSpaceSpecialNeeds: '',
  607. hotelSpecialNeeds: '',
  608. mealSpecialNeeds: '',
  609. remark: '',
  610. },
  611. {
  612. lastName: "",
  613. firstName: "",
  614. pinyin: '',
  615. sex: '男',
  616. isAccompany: '否',//陪同
  617. companyFullName: "",
  618. job: "",
  619. idCardNo: "",
  620. phone: "",
  621. birthDay: "",
  622. shippingSpaceTypeId: 460,
  623. shippingSpaceSpecialNeeds: '',
  624. hotelSpecialNeeds: '',
  625. mealSpecialNeeds: '',
  626. remark: '',
  627. },
  628. {
  629. lastName: "",
  630. firstName: "",
  631. pinyin: '',
  632. sex: '男',
  633. isAccompany: '否',//陪同
  634. companyFullName: "",
  635. job: "",
  636. idCardNo: "",
  637. phone: "",
  638. birthDay: "",
  639. shippingSpaceTypeId: 460,
  640. shippingSpaceSpecialNeeds: '',
  641. hotelSpecialNeeds: '',
  642. mealSpecialNeeds: '',
  643. remark: '',
  644. },
  645. {
  646. lastName: "",
  647. firstName: "",
  648. pinyin: '',
  649. sex: '男',
  650. isAccompany: '否',//陪同
  651. companyFullName: "",
  652. job: "",
  653. idCardNo: "",
  654. phone: "",
  655. birthDay: "",
  656. shippingSpaceTypeId: 460,
  657. shippingSpaceSpecialNeeds: '',
  658. hotelSpecialNeeds: '',
  659. mealSpecialNeeds: '',
  660. remark: '',
  661. },
  662. {
  663. lastName: "",
  664. firstName: "",
  665. pinyin: '',
  666. sex: '男',
  667. isAccompany: '否',//陪同
  668. companyFullName: "",
  669. job: "",
  670. idCardNo: "",
  671. phone: "",
  672. birthDay: "",
  673. shippingSpaceTypeId: 460,
  674. shippingSpaceSpecialNeeds: '',
  675. hotelSpecialNeeds: '',
  676. mealSpecialNeeds: '',
  677. remark: '',
  678. },
  679. {
  680. lastName: "",
  681. firstName: "",
  682. pinyin: '',
  683. sex: '男',
  684. isAccompany: '否',//陪同
  685. companyFullName: "",
  686. job: "",
  687. idCardNo: "",
  688. phone: "",
  689. birthDay: "",
  690. shippingSpaceTypeId: 460,
  691. shippingSpaceSpecialNeeds: '',
  692. hotelSpecialNeeds: '',
  693. mealSpecialNeeds: '',
  694. remark: '',
  695. },
  696. ]
  697. },
  698. //获取团组
  699. GetGroupNameList() {
  700. var url = "/api/Business/GetGroupNameList"
  701. var that = this
  702. this.$axios({
  703. method: 'post',
  704. url: url,
  705. headers: {
  706. Authorization: 'Bearer ' + this.token
  707. },
  708. data: {
  709. portType: 1
  710. }
  711. }).then(function (res) {
  712. console.log(res)
  713. if (res.data.code == 200) {
  714. that.delegationInfoList = res.data.data;
  715. that.diId = that.delegationInfoList[0].id;
  716. that.PostShareGroupInfo();
  717. }
  718. }).catch(function (error) {
  719. that.$message.error("获取团组失败");
  720. });
  721. },
  722. //获取团组详情
  723. PostShareGroupInfo() {
  724. var url = "/api/Business/PostShareGroupInfo"
  725. var that = this
  726. this.$axios({
  727. method: 'post',
  728. url: url,
  729. headers: {
  730. Authorization: 'Bearer ' + this.token
  731. },
  732. data: {
  733. portType: 1,
  734. id: that.diId
  735. }
  736. }).then(function (res) {
  737. console.log(res)
  738. if (res.data.code == 200) {
  739. that.GroupInfo = res.data.data
  740. that.PostTourClientListByDiId()
  741. } else {
  742. that.$message.error(res.data.msg);
  743. }
  744. }).catch(function (error) {
  745. that.$message.error("获取团组详情失败!");
  746. });
  747. },
  748. //获取客户table
  749. PostTourClientListByDiId() {
  750. var url = "/api/Groups/PostTourClientListByDiId"
  751. var that = this
  752. this.$axios({
  753. method: 'post',
  754. url: url,
  755. headers: {
  756. Authorization: 'Bearer ' + this.token
  757. },
  758. data: {
  759. portType: 1,
  760. userId: that.userId,
  761. pageId: that.pageId,
  762. diId: that.diId,
  763. }
  764. }).then(function (res) {
  765. console.log(res)
  766. if (res.data.code == 200) {
  767. that.tableData = res.data.data;
  768. } else {
  769. that.$message.error(res.data.msg);
  770. }
  771. }).catch(function (error) {
  772. that.$message.error("获取接团名单失败!");
  773. });
  774. },
  775. //获取基础数据
  776. PostTourClientListBasicDataInit() {
  777. this.fullscreenLoading = true;
  778. var url = "/api/Groups/PostTourClientListBasicDataInit"
  779. var that = this
  780. this.$axios({
  781. method: 'post',
  782. url: url,
  783. headers: {
  784. Authorization: 'Bearer ' + this.token
  785. },
  786. data: {
  787. portType: 1,
  788. userId: that.userId,
  789. pageId: that.pageId,
  790. }
  791. }).then(function (res) {
  792. console.log(res)
  793. if (res.data.code == 200) {
  794. that.restaurantss = res.data.data.clientData;
  795. that.cangweiType = res.data.data.shippingSpaceTypeData;
  796. that.pickupinif.Accommodation = 460;
  797. that.units = res.data.data.clientCompanyData;
  798. that.restaurants = that.restaurantss.map((terminal) => {
  799. return {
  800. value: terminal.lastName + ' ' + terminal.firstName + ' ' + terminal.pinyin + ' ' + terminal.companyFullName + ' ' + terminal.job + ' ' + terminal.phone + ' ' + (terminal.sex == 0 ? '男' : '女') + ' ' + terminal.idCardNo + ' ' + (terminal.birthDay).split(' ')[0],
  801. };
  802. });
  803. that.unit = that.units.map((terminal) => {
  804. return {
  805. value: terminal.companyFullName,
  806. };
  807. });
  808. that.fullscreenLoading = false;
  809. }
  810. }).catch(function (error) {
  811. that.fullscreenLoading = false;
  812. that.$message.error("获取基础数据失败!");
  813. });
  814. },
  815. //提示选中
  816. PromptChecked() {
  817. console.log(this.pickupinif.surname.split(' '))
  818. var inif = this.pickupinif.surname.split(' ');
  819. this.pickupinif.surname = inif[0];
  820. this.pickupinif.name = inif[1];
  821. this.pickupinif.Pinyin = inif[2];
  822. if (this.pickupinif.Pinyin == '') {
  823. let surname = '';
  824. let surname1 = pinyin(this.pickupinif.surname, { toneType: 'none' }).toUpperCase();
  825. let surname2 = pinyin(this.pickupinif.name, { toneType: 'none' }).toUpperCase();
  826. surname = surname1 + '/' + surname2;
  827. this.pickupinif.Pinyin = surname;
  828. console.log(surname)
  829. }
  830. this.pickupinif.flats = inif[3];
  831. this.pickupinif.office = inif[4];
  832. this.pickupinif.phone = inif[5];
  833. this.pickupinif.gender = inif[6];
  834. this.pickupinif.identity = inif[7];
  835. this.pickupinif.birth = inif[8];
  836. },
  837. //添加多条提示选中
  838. DTPromptChecked(val) {
  839. console.log(val)
  840. var inif = val.lastName.split(' ');
  841. console.log(inif)
  842. val.lastName = inif[0] ? inif[0] : ''
  843. val.firstName = inif[1] ? inif[1] : ''
  844. val.companyFullName = inif[3] ? inif[3] : ''
  845. val.job = inif[4] ? inif[4] : ''
  846. val.idCardNo = inif[7] ? inif[7] : ''
  847. val.phone = inif[5] ? inif[5] : ''
  848. val.sex = inif[6] ? inif[6] : ''
  849. val.birthDay = inif[8] ? inif[8] : ''
  850. },
  851. //姓值改变
  852. ChangesValue() {
  853. console.log(this.pickupinif.surname)
  854. this.pickupinif.name = '';
  855. this.pickupinif.Pinyin = '';
  856. this.pickupinif.flats = '';
  857. this.pickupinif.office = '';
  858. this.pickupinif.phone = '';
  859. this.pickupinif.gender = '';
  860. this.pickupinif.identity = '';
  861. this.pickupinif.birth = '';
  862. if (this.$refs.pickupinif) {
  863. this.$nextTick(() => {
  864. this.$refs['pickupinif'].clearValidate();
  865. })
  866. }
  867. },
  868. //转换日期
  869. transferdate(val) {
  870. var today = new Date(val);
  871. var DD = String(today.getDate()).padStart(2, '0'); // 获取日
  872. var MM = String(today.getMonth() + 1).padStart(2, '0'); //获取月份,1 月为 0
  873. var yyyy = today.getFullYear(); // 获取年
  874. return yyyy + '-' + MM + '-' + DD
  875. },
  876. //输入
  877. InputValue() {
  878. let surname = '';
  879. let surname1 = pinyin(this.pickupinif.surname, { toneType: 'none' }).toUpperCase();
  880. let surname2 = pinyin(this.pickupinif.name, { toneType: 'none' }).toUpperCase();
  881. surname = surname1 + '/' + surname2;
  882. this.pickupinif.Pinyin = surname;
  883. console.log(surname)
  884. },
  885. //查询详情
  886. PostTourClientListDetails(index, row) {
  887. this.id = row.id;
  888. var url = "/api/Groups/PostTourClientListDetails"
  889. var that = this
  890. this.$axios({
  891. method: 'post',
  892. url: url,
  893. headers: {
  894. Authorization: 'Bearer ' + this.token
  895. },
  896. data: {
  897. portType: 1,
  898. userId: that.userId,
  899. pageId: that.pageId,
  900. id: row.id,
  901. }
  902. }).then(function (res) {
  903. console.log(res)
  904. if (res.data.code == 200) {
  905. that.pickupinif = {
  906. surname: res.data.data.lastName,//姓
  907. name: res.data.data.firstName,//名
  908. flats: res.data.data.companyFullName,//单位
  909. office: res.data.data.job,//职务
  910. phone: res.data.data.phone,//手机号
  911. gender: res.data.data.sex == 0 ? '男' : '女',//性别
  912. isAccompany: res.data.data.isAccompany == 1 ? '否' : '是',//性别
  913. identity: res.data.data.idCardNo,//身份证
  914. birth: res.data.data.birthDay,//出生日期
  915. Accommodation: res.data.data.shippingSpaceTypeId,//舱位类型
  916. ClassRemarks: res.data.data.shippingSpaceSpecialNeeds,//舱位备注
  917. Roomtype: res.data.data.hotelSpecialNeeds,//房间类型
  918. Mealnotes: res.data.data.mealSpecialNeeds,//餐食备注
  919. remark: res.data.data.remark,//备注
  920. };
  921. that.pickupinif.Pinyin = res.data.data.pinyin;//拼音
  922. if (that.pickupinif.Pinyin == '') {
  923. let surname = '';
  924. let surname1 = pinyin(that.pickupinif.surname, { toneType: 'none' }).toUpperCase();
  925. let surname2 = pinyin(that.pickupinif.name, { toneType: 'none' }).toUpperCase();
  926. surname = surname1 + '/' + surname2;
  927. that.pickupinif.Pinyin = surname;
  928. }
  929. } else {
  930. that.$message.error(res.data.msg);
  931. }
  932. }).catch(function (error) {
  933. that.$message.error("查询详情失败!");
  934. });
  935. },
  936. //保存
  937. preservation(formName) {
  938. this.$refs[formName].validate((valid) => {
  939. if (valid) {
  940. this.PostTourClientListAddOrEdit()
  941. } else {
  942. console.log('error submit!!');
  943. return false;
  944. }
  945. });
  946. },
  947. //保存修改api
  948. PostTourClientListAddOrEdit() {
  949. let pdarr=[];
  950. for (let k = 0; k < this.tableData.length; k++) {
  951. if(this.tableData[k].isAccompany==1){
  952. pdarr.push(this.tableData[k])
  953. }
  954. }
  955. console.log(this.pickupinif.isAccompany);
  956. if(pdarr.length>=this.GroupInfo.visitPNumber&&this.id==0&&this.pickupinif.isAccompany!="是"){
  957. this.$message.error("保存失败!录入的客户名单超过本团组的出访人数,请检查仔细删除多余人!");
  958. return
  959. }
  960. this.fullscreenLoading = true;
  961. var url = "/api/Groups/PostTourClientListAddOrEdit"
  962. var that = this
  963. this.$axios({
  964. method: 'post',
  965. url: url,
  966. headers: {
  967. Authorization: 'Bearer ' + this.token
  968. },
  969. data: {
  970. portType: 1,
  971. userId: that.userId,
  972. pageId: that.pageId,
  973. diId: that.diId,
  974. id: that.id,
  975. lastName: that.pickupinif.surname,//姓
  976. firstName: that.pickupinif.name,//名
  977. pinyin: that.pickupinif.Pinyin,//姓名拼音
  978. sex: that.pickupinif.gender == '男' ? 0 : 1,//性别 0 男1 女 其他值 未设置
  979. isAccompany:that.pickupinif.isAccompany == '否' ? 1 : 2,
  980. phone: that.pickupinif.phone,//手机号
  981. companyFullName: that.pickupinif.flats,//公司名全称
  982. job: that.pickupinif.office,//职位
  983. idCardNo: that.pickupinif.identity,//身份证No
  984. // tel:'',//...
  985. birthDay: that.pickupinif.birth,//生日
  986. shippingSpaceTypeId: that.pickupinif.Accommodation,//舱位类型(数据类型表Id)
  987. shippingSpaceSpecialNeeds: that.pickupinif.ClassRemarks,//舱位特殊需求
  988. hotelSpecialNeeds: that.pickupinif.Roomtype,//酒店特殊需求
  989. mealSpecialNeeds: that.pickupinif.Mealnotes,//餐食特殊需求
  990. remark: that.pickupinif.remark,//备注
  991. }
  992. }).then(function (res) {
  993. console.log(res)
  994. if (res.data.code == 200) {
  995. that.$message({
  996. type: 'success',
  997. message: res.data.msg,
  998. duration: '3000'
  999. });
  1000. that.PostTourClientListByDiId();
  1001. setTimeout(() => {
  1002. that.addhandoff();
  1003. that.loading = false;
  1004. }, 500);
  1005. that.fullscreenLoading = false;
  1006. } else {
  1007. that.$message.error(res.data.msg);
  1008. that.fullscreenLoading = false;
  1009. }
  1010. }).catch(function (error) {
  1011. that.fullscreenLoading = false;
  1012. that.$message.error("保存或修改失败!");
  1013. });
  1014. },
  1015. //新增切换
  1016. addhandoff() {
  1017. this.id = 0;
  1018. this.pickupinif = {
  1019. surname: '',//姓
  1020. name: '',//名
  1021. Pinyin: '',//拼音
  1022. flats: '',//单位
  1023. office: '',//职务
  1024. phone: '',//手机号
  1025. gender: '男',//性别
  1026. isAccompany: '否',//陪同
  1027. identity: '',//身份证
  1028. birth: '',//出生日期
  1029. Accommodation: '',//舱位类型
  1030. ClassRemarks: '',//舱位备注
  1031. Roomtype: '',//房间类型
  1032. Mealnotes: '',//餐食备注
  1033. remark: '',//备注
  1034. };
  1035. if (this.$refs.pickupinif) {
  1036. this.$nextTick(() => {
  1037. this.$refs['pickupinif'].clearValidate();
  1038. })
  1039. }
  1040. this.PostTourClientListBasicDataInit()
  1041. },
  1042. //清空表单
  1043. closeExpertFormDialog(done) {
  1044. this.clearedlist()
  1045. done();//done 用于关闭 Dialog
  1046. },
  1047. //删除
  1048. PostTourClientListDel(index, row) {
  1049. this.$confirm('此操作将删除此条数据,是否确认', '提示', {
  1050. confirmButtonText: '确定',
  1051. cancelButtonText: '取消',
  1052. type: 'warning'
  1053. }).then(() => {
  1054. var url = "/api/Groups/PostTourClientListDel"
  1055. var that = this
  1056. this.$axios({
  1057. method: 'post',
  1058. url: url,
  1059. headers: {
  1060. Authorization: 'Bearer ' + this.token
  1061. },
  1062. data: {
  1063. portType: 1,
  1064. userId: that.userId,
  1065. pageId: that.pageId,
  1066. id: row.id,
  1067. }
  1068. }).then(function (res) {
  1069. console.log(res)
  1070. if (res.data.code == 200) {
  1071. that.$message({
  1072. type: 'success',
  1073. message: res.data.msg,
  1074. duration: '3000'
  1075. });
  1076. that.PostTourClientListByDiId();
  1077. } else {
  1078. that.$message.error(res.data.msg);
  1079. }
  1080. }).catch(function (error) {
  1081. that.$message.error("删除失败!");
  1082. });
  1083. }).catch(() => {
  1084. });
  1085. },
  1086. //多条保存
  1087. manysave() {
  1088. var tourClientList = [];
  1089. console.log(this.tourClientListInfos)
  1090. for (var i = 0; i < this.tourClientListInfos.length; i++) {
  1091. if (this.tourClientListInfos[i].lastName != "" && this.tourClientListInfos[i].firstName != "") {
  1092. tourClientList.push(this.tourClientListInfos[i])
  1093. }
  1094. }
  1095. tourClientList = JSON.parse(JSON.stringify(tourClientList))
  1096. for (var x = 0; x < tourClientList.length; x++) {
  1097. tourClientList[x].sex = tourClientList[x].sex == '男' ? 0 : 1
  1098. tourClientList[x].isAccompany = tourClientList[x].isAccompany == '否' ? 1 : 2
  1099. }
  1100. if (tourClientList) {
  1101. this.PostTourClientListAddMultiple(tourClientList)
  1102. }
  1103. },
  1104. //多存api
  1105. PostTourClientListAddMultiple(listinif) {
  1106. let pdarr=[];
  1107. let pdarrs=[];
  1108. for (let k = 0; k < this.tableData.length; k++) {
  1109. if(this.tableData[k].isAccompany==1){
  1110. pdarr.push(this.tableData[k])
  1111. }
  1112. }
  1113. for (let g = 0; g < listinif.length; g++) {
  1114. if(listinif[g].isAccompany==1){
  1115. pdarrs.push(listinif[g])
  1116. }
  1117. }
  1118. if((pdarr.length+pdarrs.length)>this.GroupInfo.visitPNumber){
  1119. this.$message.error("保存失败!录入的客户名单超过本团组的出访人数,请检查仔细删除多余人!");
  1120. return
  1121. }
  1122. var url = "/api/Groups/PostTourClientListAddMultiple"
  1123. var that = this
  1124. var data = {
  1125. portType: 1,
  1126. userId: that.userId,
  1127. pageId: that.pageId,
  1128. diId: that.diId,
  1129. tourClientListInfos: listinif
  1130. }
  1131. console.log(JSON.stringify(data))
  1132. this.$axios({
  1133. method: 'post',
  1134. url: url,
  1135. headers: {
  1136. Authorization: 'Bearer ' + this.token
  1137. },
  1138. data: {
  1139. portType: 1,
  1140. userId: that.userId,
  1141. pageId: that.pageId,
  1142. diId: that.diId,
  1143. tourClientListInfos: listinif
  1144. }
  1145. }).then(function (res) {
  1146. console.log(res)
  1147. if (res.data.code == 200) {
  1148. that.$message({
  1149. type: 'success',
  1150. message: res.data.msg,
  1151. duration: '3000'
  1152. });
  1153. that.PostTourClientListByDiId();
  1154. that.clearedlist();
  1155. that.dialogTableVisible = false;
  1156. } else {
  1157. that.$message.error(res.data.msg);
  1158. }
  1159. }).catch(function (error) {
  1160. that.$message.error("保存失败!");
  1161. });
  1162. },
  1163. //导出团组名单
  1164. Exportlist(val) {
  1165. var url = "/api/Groups/PostTourClientListDownloadFile"
  1166. var that = this
  1167. this.$axios({
  1168. method: 'post',
  1169. url: url,
  1170. headers: {
  1171. Authorization: 'Bearer ' + this.token
  1172. },
  1173. data: {
  1174. portType: 1,
  1175. userId: that.userId,
  1176. pageId: that.pageId,
  1177. diId: that.diId,
  1178. language: val
  1179. }
  1180. }).then(function (res) {
  1181. console.log(res)
  1182. if (res.data.code == 200) {
  1183. window.location.href = res.data.data
  1184. // that.$message({
  1185. // type: 'success',
  1186. // message: res.data.msg,
  1187. // duration:'3000'
  1188. // });
  1189. } else {
  1190. that.$message.error(res.data.msg);
  1191. }
  1192. }).catch(function (error) {
  1193. that.$message.error("下载失败!");
  1194. });
  1195. },
  1196. async httpRequest(file, fileList) {
  1197. this.upLoadFile = []
  1198. for (let i in fileList) {
  1199. this.upLoadFile[i] = await this.getBase64(fileList[i].raw)
  1200. }
  1201. console.log('上传文件列表', this.upLoadFile)
  1202. },
  1203. // 转base64码
  1204. getBase64(file) {
  1205. return new Promise((resolve, reject) => {
  1206. const reader = new FileReader()
  1207. let fileResult = ''
  1208. reader.readAsDataURL(file)
  1209. // 开始转
  1210. reader.onload = () => {
  1211. fileResult = reader.result
  1212. }
  1213. // 转 失败
  1214. reader.onerror = error => {
  1215. reject(error)
  1216. }
  1217. // 转 结束
  1218. reader.onloadend = () => {
  1219. resolve(fileResult)
  1220. }
  1221. })
  1222. },
  1223. submitUpload() {
  1224. console.log(this.upLoadFile)
  1225. if (this.upLoadFile.length == 0) {
  1226. this.$message.error("未选择图片!");
  1227. } else {
  1228. this.fullscreenLoading = true;
  1229. var url = "/api/BaiduOCR/ClientOCR"
  1230. var that = this
  1231. this.$axios({
  1232. method: 'post',
  1233. url: url,
  1234. headers: {
  1235. Authorization: 'Bearer ' + this.token
  1236. },
  1237. data: {
  1238. base64img: that.upLoadFile[0]
  1239. }
  1240. }).then(function (res) {
  1241. console.log(res)
  1242. if (res.data.code == 200) {
  1243. that.fullscreenLoading = false;
  1244. var dataarr = res.data.data;
  1245. var dataarrnew = [];
  1246. for (var i = 0; i < dataarr.length; i++) {
  1247. dataarrnew.push(
  1248. {
  1249. lastName: dataarr[i].lastName,
  1250. firstName: dataarr[i].firstName,
  1251. pinyin: dataarr[i].pinyin,
  1252. sex: dataarr[i].sex == 0 ? '男' : '女',
  1253. isAccompany: '否',//陪同
  1254. companyFullName: dataarr[i].companyFullName,
  1255. job: dataarr[i].job,
  1256. idCardNo: dataarr[i].iDcard,
  1257. phone: dataarr[i].phone,
  1258. birthDay: dataarr[i].birthday == '-' ? '' : dataarr[i].birthday,
  1259. shippingSpaceTypeId: dataarr[i].berth,
  1260. shippingSpaceSpecialNeeds: '',
  1261. hotelSpecialNeeds: '',
  1262. mealSpecialNeeds: '',
  1263. remark: '',
  1264. }
  1265. )
  1266. // that.tourClientListInfos[i]=dataarrnew[i]
  1267. }
  1268. that.tourClientListInfos = dataarrnew
  1269. var len = 10 - dataarrnew.length
  1270. for (var jk = 0; jk < len; jk++) {
  1271. that.tourClientListInfos.push(
  1272. {
  1273. lastName: '',
  1274. firstName: "",
  1275. pinyin: '',
  1276. sex: '男',
  1277. isAccompany: '否',//陪同
  1278. companyFullName: "",
  1279. job: "",
  1280. idCardNo: "",
  1281. phone: "",
  1282. birthDay: "",
  1283. shippingSpaceTypeId: 460,
  1284. shippingSpaceSpecialNeeds: '',
  1285. hotelSpecialNeeds: '',
  1286. mealSpecialNeeds: '',
  1287. remark: '',
  1288. }
  1289. )
  1290. }
  1291. console.log(that.tourClientListInfos)
  1292. that.$message({
  1293. type: 'success',
  1294. message: res.data.msg,
  1295. duration: '3000'
  1296. });
  1297. // setTimeout(function(){ that.dialogTableVisible=true; }, 3000); 
  1298. that.dialogTableVisible = true;
  1299. } else {
  1300. that.fullscreenLoading = false;
  1301. that.$message.error(res.data.msg);
  1302. }
  1303. }).catch(function (error) {
  1304. that.fullscreenLoading = false;
  1305. that.$message.error("导入失败!");
  1306. });
  1307. }
  1308. },
  1309. },
  1310. filters: {
  1311. filter_city(value) {
  1312. if (value) {
  1313. return value.replaceAll('|', '、')
  1314. }
  1315. },
  1316. filter_time(value) {
  1317. if (value) {
  1318. return value.split(" ")[0]
  1319. }
  1320. }
  1321. },
  1322. mounted() {
  1323. console.log(this.tourClientListInfos)
  1324. this.token = JSON.parse(localStorage.getItem('userinif')).token;
  1325. this.pageId = Number(localStorage.getItem('indexs').split('-')[1]);//页面id
  1326. this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
  1327. this.GetGroupNameList();
  1328. this.PostTourClientListBasicDataInit()
  1329. }
  1330. }
  1331. </script>
  1332. <style>
  1333. .pickuplist-all {
  1334. background-color: #fff;
  1335. padding: 10px;
  1336. box-shadow: 0 0 5px #0005;
  1337. border-radius: 10px;
  1338. height: 100%;
  1339. min-height: 840px;
  1340. min-width: 900px;
  1341. }
  1342. .pickuplist-all .block {
  1343. margin-top: 10px;
  1344. }
  1345. .pickuplist-head-li label {
  1346. color: #606266;
  1347. font-size: 15px;
  1348. font-weight: 600;
  1349. }
  1350. .pickuplist-head {
  1351. display: flex;
  1352. justify-content: space-between;
  1353. }
  1354. .pickuplist-info {
  1355. display: flex;
  1356. margin-top: 10px;
  1357. }
  1358. .pickuplist-info .pickuplist-info-li:last-child {
  1359. margin-right: 0;
  1360. }
  1361. .pickuplist-info-li {
  1362. margin-right: 30px;
  1363. }
  1364. .pickuplist-info-li label {
  1365. color: #606266;
  1366. font-size: 15px;
  1367. font-weight: 600;
  1368. }
  1369. .pickuplist-info-li span {
  1370. color: #606266;
  1371. font-size: 14px;
  1372. }
  1373. .pickuplist-Upload-box {
  1374. margin-top: 10px;
  1375. display: flex;
  1376. align-items: baseline;
  1377. justify-content: flex-end;
  1378. }
  1379. .pickuplist-Upload-box .upload-demo {
  1380. display: flex;
  1381. align-items: center;
  1382. }
  1383. .pickuplist-Upload-box .el-upload__tip {
  1384. margin-top: 0px;
  1385. }
  1386. .pickuplist-Upload-box .el-upload-list__item:first-child {
  1387. margin-top: 0px;
  1388. }
  1389. .pickuplist-table {
  1390. margin-top: 20px;
  1391. }
  1392. .pickuplist-btn {
  1393. margin-top: 30px;
  1394. padding-bottom: 10px;
  1395. display: flex;
  1396. justify-content: space-between;
  1397. align-items: center;
  1398. border-bottom: 1px solid #C0C4CC;
  1399. }
  1400. .pickuplist-btn-lable {
  1401. color: #606266;
  1402. font-size: 15px;
  1403. font-weight: 600;
  1404. }
  1405. .pickuplist-all .pickuplist-form {
  1406. margin-top: 20px;
  1407. }
  1408. .pickuplist-all .el-autocomplete-suggestion {
  1409. width: auto !important;
  1410. }
  1411. .pickuplist-all .el-input--prefix .el-input__inner{
  1412. padding-left: 0px;
  1413. padding-right: 0px;
  1414. }
  1415. .dutzl .el-input__inner {
  1416. padding: 0 5px;
  1417. }
  1418. .dutzl .el-date-editor .el-icon-date {
  1419. display: none;
  1420. }
  1421. .dialog-hade {
  1422. display: flex;
  1423. justify-content: space-between;
  1424. align-items: center;
  1425. margin-bottom: 10px;
  1426. }
  1427. .dialog-hade label {
  1428. color: red;
  1429. }
  1430. </style>
  1431. <style scoped>
  1432. .dutzl .el-dialog__body {
  1433. padding-top: 0;
  1434. }
  1435. .dutzl .el-dialog__title {
  1436. font-size: 17px;
  1437. font-weight: 600;
  1438. }
  1439. .dutzl .el-input--prefix .el-input__inner {
  1440. padding-left: 5px;
  1441. padding-right: 5px
  1442. }
  1443. .dutzl .el-table td.el-table__cell div,
  1444. .el-table th.el-table__cell>.cell {
  1445. text-align: left;
  1446. }
  1447. </style>