OpVisaPriec.vue 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972
  1. <template>
  2. <div class="car_add">
  3. <div>
  4. <div class="communal-title">
  5. <div>{{ title }}</div>
  6. <!-- 客户名单 -->
  7. <el-popover
  8. placement="bottom"
  9. width="662"
  10. trigger="hover">
  11. <el-table max-height="600" border :data="rollcallarr">
  12. <el-table-column width="100" property="date" label="姓名">
  13. <template slot-scope="scope">
  14. {{ scope.row.lastName}}{{scope.row.firstName}}
  15. </template>
  16. </el-table-column>
  17. <el-table-column width="200" property="lastName" label="拼音">
  18. <template slot-scope="scope">
  19. {{ pinyingxing(scope.row.lastName) }}/{{ pinyingxing(scope.row.firstName) }}
  20. </template>
  21. </el-table-column>
  22. <el-table-column width="50" property="sex" label="性别">
  23. <template slot-scope="scope">
  24. {{ scope.row.sex==0?'男':'女'}}
  25. </template>
  26. </el-table-column>
  27. <el-table-column width="110" property="birthDay" label="生日">
  28. <template slot-scope="scope">
  29. {{ fgarr(scope.row.birthDay) }}
  30. </template>
  31. </el-table-column>
  32. <el-table-column width="200" property="idCardNo" label="身份证号码">
  33. <template slot-scope="scope">
  34. {{ scope.row.idCardNo }}
  35. </template>
  36. </el-table-column>
  37. </el-table>
  38. <el-button style="margin-left: 10px;" type="primary" slot="reference">移上查看客户名单</el-button>
  39. <!-- <span slot="reference" style="cursor: pointer;margin-left: 20px;">"移上查看客户名单"</span> -->
  40. </el-popover>
  41. </div>
  42. </div>
  43. <hr style='background-color:#5555; height:1px; border:none;margin: 10px 0;' />
  44. <div>
  45. <el-form :model="delegationInfo" label-width="100px" class="demo-ruleForm">
  46. <div style="display: flex;flex-wrap: wrap;">
  47. <div style="width: 385px;">
  48. <el-form-item label="团组名称:" label-width="160px">
  49. <el-select v-model="OpVisaPriceData.diId" remote :remote-method="GroupFeeKeywordSearch" clearable filterable placeholder="团组选择"
  50. :disabled="isShow" style="width: 100%;" @change="DiIdSelectChange">
  51. <el-option v-for="item in delegationInfoLists" :key="item.id" :label="item.teamName"
  52. :value="item.id">
  53. </el-option>
  54. </el-select>
  55. </el-form-item>
  56. </div>
  57. <div style="width: 385px;">
  58. <el-form-item label="团 号:" prop="tourCode" label-width="160px">
  59. <el-input placeholder="团号" v-model="delegationInfo.tourCode" :disabled="true">
  60. </el-input>
  61. </el-form-item>
  62. </div>
  63. <div style="width: 385px;">
  64. <el-form-item label="客户:" prop="clientName" label-width="160px">
  65. <el-input placeholder="客户" v-model="delegationInfo.clientName" :disabled="true">
  66. </el-input>
  67. </el-form-item>
  68. </div>
  69. <div style="width: 385px;">
  70. <el-form-item label="出访国家:" prop="visitCountry" label-width="160px">
  71. <el-input placeholder="出访国家" v-model="delegationInfo.visitCountry" :disabled="true">
  72. </el-input>
  73. </el-form-item>
  74. </div>
  75. </div>
  76. <div style="display: flex;flex-wrap: wrap;">
  77. <div style="width: 385px;">
  78. <el-form-item label="出访时间:" label-width="160px">
  79. <el-input placeholder="出访时间" v-model="VisitDate" :disabled="true">
  80. </el-input>
  81. </el-form-item>
  82. </div>
  83. <div style="width: 385px;">
  84. <el-form-item label="出访人数:" label-width="160px">
  85. <el-input placeholder="出访人数" v-model="delegationInfo.visitPNumber" :disabled="true">
  86. </el-input>
  87. </el-form-item>
  88. </div>
  89. <div style="width: 385px;">
  90. <el-form-item label="出访天数:" label-width="160px">
  91. <el-input placeholder="出访天数" v-model="delegationInfo.visitDays" :disabled="true">
  92. </el-input>
  93. </el-form-item>
  94. </div>
  95. </div>
  96. </el-form>
  97. <el-form :model="OpVisaPriceData" ref="OpVisaPriceData" :rules="OpVisaPriceDataRules" label-width="100px"
  98. class="demo-ruleForm">
  99. <div style="width: 98.5%;">
  100. <el-form-item label="签证描述:" prop="visaDescription" label-width="160px">
  101. <!-- <el-select @change="clientNamechange" style="width: 100%;" v-model="OpVisaPriceData.visaClient"
  102. placeholder="签证客户" multiple clearable filterable>
  103. <el-option v-for="item in fliterClient" :key="item.id"
  104. :label="item.lastName + item.firstName" :value="item.id">
  105. </el-option>
  106. </el-select> -->
  107. <el-input placeholder="签证描述" v-model="OpVisaPriceData.visaDescription">
  108. </el-input>
  109. </el-form-item>
  110. </div>
  111. <div style="width: 98.5%;">
  112. <el-form-item label="签证客户:" prop="visaClient" label-width="160px">
  113. <el-select @change="clientNamechange" style="width: 100%;" v-model="OpVisaPriceData.visaClient"
  114. placeholder="签证客户" multiple clearable filterable>
  115. <el-option v-for="item in fliterClient" :key="item.id"
  116. :label="item.lastName + item.firstName" :value="item.id">
  117. </el-option>
  118. </el-select>
  119. </el-form-item>
  120. </div>
  121. <div style="display: flex;flex-wrap: wrap;">
  122. <!-- <div style="width: 385px;">
  123. <el-form-item label="签证客户:" prop="visaClient" label-width="160px">
  124. <el-input placeholder="签证客户" v-model="OpVisaPriceData.visaClient">
  125. </el-input>
  126. </el-form-item>
  127. </div> -->
  128. <div style="width: 385px;">
  129. <el-form-item prop="area" label="区域:" label-width="160px">
  130. <el-select v-model="OpVisaPriceData.area" clearable filterable placeholder="代办费类型选择"
  131. style="width: 100%;">
  132. <el-option v-for="item in areaarr" :key="item.id" :label="item.country"
  133. :value="item.country">
  134. </el-option>
  135. </el-select>
  136. </el-form-item>
  137. </div>
  138. <div style="width: 385px;">
  139. <el-form-item prop="agencyFeeType" label="代办费类型:" label-width="160px">
  140. <el-select v-model="OpVisaPriceData.agencyFeeType" clearable filterable placeholder="代办费类型选择"
  141. style="width: 100%;">
  142. <el-option v-for="item in agencyFeeTypearr" :key="item.id" :label="item.text"
  143. :value="item.id">
  144. </el-option>
  145. </el-select>
  146. </el-form-item>
  147. </div>
  148. <div style="width: 385px;">
  149. <el-form-item label="签证费用:" prop="visaCurrency" label-width="160px">
  150. <el-input-number style="width:52%" :precision="2" placeholder="付款金额" v-model="OpVisaPriceData.visaPrice" :controls='false'>
  151. </el-input-number>
  152. <!-- <el-input placeholder="签证费用" v-model="OpVisaPriceData.visaPrice" style="width: 58%;">
  153. </el-input> -->
  154. <el-select v-model="OpVisaPriceData.visaCurrency" filterable placeholder="币种"
  155. style="width: 35%;">
  156. <el-option v-for="item in rateList" :key="item.currencyId" :label="item.currencyCode"
  157. :value="item.currencyId"></el-option>
  158. </el-select>
  159. </el-form-item>
  160. </div>
  161. <div style="width: 385px;">
  162. <el-form-item label="是否第三方代办:" prop="isThird" label-width="160px">
  163. <el-radio-group v-model="OpVisaPriceData.isThird">
  164. <el-radio :label=1>是</el-radio>
  165. <el-radio :label=0>否</el-radio>
  166. </el-radio-group>
  167. </el-form-item>
  168. </div>
  169. <div style="width: 385px;">
  170. <el-form-item label="客户类型:" prop="passengerType" label-width="160px">
  171. <el-select style="width: 100%;" v-model="OpVisaPriceData.passengerType" clearable filterable placeholder="客户类型">
  172. <el-option v-for="item in passengerTypeSelect" :key="item.id" :label="item.name"
  173. :value="item.id">
  174. </el-option>
  175. </el-select>
  176. </el-form-item>
  177. </div>
  178. <div style="width: 385px;">
  179. <el-form-item label="签证办理人数:" prop="visaNumber" label-width="160px">
  180. <el-input placeholder="签证办理人数" v-model="OpVisaPriceData.visaNumber" style="width: 100%;">
  181. </el-input>
  182. </el-form-item>
  183. </div>
  184. <div style="width: 385px;">
  185. <el-form-item label="免签人数:" prop="visaFreeNumber" label-width="160px">
  186. <el-input placeholder="免签人数" v-model="OpVisaPriceData.visaFreeNumber" style="width: 100%;">
  187. </el-input>
  188. </el-form-item>
  189. </div>
  190. </div>
  191. <div style="display: flex;flex-wrap: wrap;">
  192. <div style="width: 100%;">
  193. <el-form-item label="备 注:" prop="Remark" label-width="160px">
  194. <el-input type="textarea" :rows="5" placeholder="备注"
  195. v-model="OpVisaPriceData.remark"></el-input>
  196. </el-form-item>
  197. </div>
  198. </div>
  199. <hr style='background-color:#5555; height:1px; border:none;margin: 10px 0;' />
  200. <div style="display: flex;flex-wrap: wrap;">
  201. <div style="width: 385px;">
  202. <el-form-item label="支付方式:" prop="payDId" label-width="160px">
  203. <el-select v-model="OpVisaPriceData.payDId" placeholder="支付方式" style="width: 100%;"
  204. @change="payChange">
  205. <el-option v-for="item in payment" :key="item.id" :label="item.name" :value="item.id">
  206. </el-option>
  207. </el-select>
  208. </el-form-item>
  209. </div>
  210. <!-- <div style="width: 385px;">
  211. <el-form-item label="消费方式:" prop="consumptionPatterns" label-width="160px">
  212. <el-input placeholder="消费方式" v-model="OpVisaPriceData.consumptionPatterns">
  213. </el-input>
  214. </el-form-item>
  215. </div> -->
  216. <div style="width: 385px;">
  217. <el-form-item label="消费日期:" prop="consumptionDate" label-width="160px">
  218. <el-date-picker style="width:100%" v-model="OpVisaPriceData.consumptionDate"
  219. placeholder="消费日期" type="date">
  220. </el-date-picker>
  221. </el-form-item>
  222. </div>
  223. <div style="width: 385px;">
  224. <el-form-item label="付款金额:" label-width="160px">
  225. <el-input placeholder="付款金额" v-model="OpVisaPriceData.visaPrice" style="width: 52%;"
  226. :disabled="true">
  227. </el-input>
  228. <el-select v-model="OpVisaPriceData.visaCurrency" style="width: 45%;" :disabled="true">
  229. <el-option v-for="item in rateList" :key="item.currencyId" :label="item.currencyCode"
  230. :value="item.currencyId"></el-option>
  231. </el-select>
  232. </el-form-item>
  233. </div>
  234. </div>
  235. <div v-if="OpVisaPriceData.payDId == 72">
  236. <div style="display: flex;flex-wrap: wrap;">
  237. <div style="width: 385px;">
  238. <el-form-item label="卡类型:" prop="ctdId" label-width="160px">
  239. <el-select v-model="OpVisaPriceData.ctdId" placeholder="卡类型" style="width: 100%;"
  240. @change="ctdChange">
  241. <el-option v-for="item in bankCard" :key="item.id" :label="item.name"
  242. :value="item.id">
  243. </el-option>
  244. </el-select>
  245. </el-form-item>
  246. </div>
  247. <div style="width: 385px;">
  248. <el-form-item label="银行卡号:" prop="bankNo" label-width="160px">
  249. <el-input placeholder="银行卡号" v-model="OpVisaPriceData.bankNo" :disabled="true">
  250. </el-input>
  251. </el-form-item>
  252. </div>
  253. <div style="width: 385px;">
  254. <el-form-item label="持卡人姓名:" prop="cardholderName" label-width="160px">
  255. <el-input placeholder="持卡人姓名" v-model="OpVisaPriceData.cardholderName" :disabled="true">
  256. </el-input>
  257. </el-form-item>
  258. </div>
  259. </div>
  260. </div>
  261. <div v-else-if="OpVisaPriceData.payDId == 73">
  262. <div style="display: flex;flex-wrap: wrap;">
  263. <div style="width: 385px;">
  264. <el-form-item label="公司银行账号:" label-width="160px" prop="companyBankNo">
  265. <el-input placeholder="公司银行账号" v-model="OpVisaPriceData.companyBankNo">
  266. </el-input>
  267. </el-form-item>
  268. </div>
  269. <div style="width: 385px;">
  270. <el-form-item label="对方开户行:" prop="otherBankName" label-width="160px">
  271. <el-input placeholder="对方开户行:" v-model="OpVisaPriceData.otherBankName">
  272. </el-input>
  273. </el-form-item>
  274. </div>
  275. <div style="width: 385px;">
  276. <el-form-item label="对方银行卡号:" prop="otherSideNo" label-width="160px">
  277. <el-input placeholder="对方银行卡号" v-model="OpVisaPriceData.otherSideNo">
  278. </el-input>
  279. </el-form-item>
  280. </div>
  281. <div style="width: 385px;">
  282. <el-form-item label="对方姓名:" prop="otherSideName" label-width="160px">
  283. <el-input placeholder="对方姓名" v-model="OpVisaPriceData.otherSideName">
  284. </el-input>
  285. </el-form-item>
  286. </div>
  287. </div>
  288. </div>
  289. <div v-else-if="OpVisaPriceData.payDId == 83">
  290. <div style="display: flex;flex-wrap: wrap;">
  291. <div style="width: 385px;">
  292. <el-form-item label="对方开户行:" prop="otherBankName" label-width="160px">
  293. <el-input placeholder="对方开户行" v-model="OpVisaPriceData.otherBankName">
  294. </el-input>
  295. </el-form-item>
  296. </div>
  297. <div style="width: 385px;">
  298. <el-form-item label="对方银行卡号:" prop="otherSideNo" label-width="160px">
  299. <el-input placeholder="对方银行卡号" v-model="OpVisaPriceData.otherSideNo">
  300. </el-input>
  301. </el-form-item>
  302. </div>
  303. <div style="width: 385px;">
  304. <el-form-item label="对方姓名:" prop="otherSideName" label-width="160px">
  305. <el-input placeholder="对方姓名" v-model="OpVisaPriceData.otherSideName">
  306. </el-input>
  307. </el-form-item>
  308. </div>
  309. </div>
  310. </div>
  311. <div v-else></div>
  312. <div style="display:flex;flex-wrap: wrap;">
  313. <div style="width: 385px;">
  314. <el-form-item label="收款方:" label-width="160px">
  315. <el-input placeholder="对方姓名:" v-model="OpVisaPriceData.payee">
  316. </el-input>
  317. </el-form-item>
  318. </div>
  319. <div style="width: 385px;">
  320. <el-form-item label="费用标识:" prop="orbitalPrivateTransfer" label-width="160px">
  321. <el-select v-model="OpVisaPriceData.orbitalPrivateTransfer" placeholder="费用标识"
  322. style="width: 100%;">
  323. <el-option key="0" label="公转" :value=0>
  324. </el-option>
  325. <el-option key="1" label="私转" :value=1>
  326. </el-option>
  327. </el-select>
  328. </el-form-item>
  329. </div>
  330. </div>
  331. <div style="display: flex;flex-wrap: wrap;">
  332. <div style="width: 100%;">
  333. <el-form-item label="备 注:" prop="Remark" label-width="160px">
  334. <el-input type="textarea" :rows="5" placeholder="备注"
  335. v-model="OpVisaPriceData.cRemark"></el-input>
  336. </el-form-item>
  337. </div>
  338. </div>
  339. <el-form-item>
  340. <div style="text-align: right;">
  341. <el-button type="primary" @click="addBtn">保存</el-button>
  342. <el-button @click="EscAdd">取消</el-button>
  343. </div>
  344. </el-form-item>
  345. </el-form>
  346. </div>
  347. </div>
  348. </template>
  349. <script>
  350. import { dE } from '@fullcalendar/core/internal-common';
  351. import { pinyin } from 'pinyin-pro';
  352. export default {
  353. data() {
  354. return {
  355. title: "新增商邀费用",
  356. token: '',
  357. userId: 0,
  358. id: '',
  359. isShow: false,
  360. delegationInfo: {},
  361. delegationInfoList: [],//团组下拉框
  362. delegationInfoLists: [],//团组下拉框
  363. currencyList: [],//币种下拉框
  364. bankCard: [],//卡类型下拉框
  365. payment: [],//支付方式下拉框
  366. OpVisaPriceData: {
  367. visaDescription:'',
  368. status: 0,
  369. id: 0,
  370. diId: '',
  371. visaClient: '',
  372. visaPrice: 0,
  373. visaCurrency: 836,
  374. isThird: '',
  375. passengerType: '',
  376. agencyFeeType:'',
  377. visaNumber: 0,
  378. visaFreeNumber: 0,
  379. createUserId: 0,
  380. remark: '',
  381. payDId: 72,
  382. consumptionPatterns: '暂无',
  383. consumptionDate: '',
  384. ctdId: '',
  385. companyBankNo: '',
  386. otherBankName: '',
  387. otherSideNo: '',
  388. otherSideName: '',
  389. bankNo: '',
  390. cardholderName: '',
  391. payee: '',
  392. orbitalPrivateTransfer: 0,
  393. cRemark: '',
  394. area:''
  395. },
  396. IsAuditGM: 0,
  397. VisitDate: '',
  398. passengerTypeSelect: [],
  399. areaarr:[],
  400. fliterClient: [],
  401. agencyFeeTypearr:[],
  402. transformDateFormat: function (value) {
  403. // 将value转换为Date对象
  404. var date = new Date(value);
  405. // 获取年、月、日
  406. var year = date.getFullYear();
  407. var month = date.getMonth() + 1;
  408. var day = date.getDate();
  409. // 将月份和日期转换为两位数的格式
  410. if (month < 10) {
  411. month = '0' + month;
  412. }
  413. if (day < 10) {
  414. day = '0' + day;
  415. }
  416. // 返回格式化后的日期字符串
  417. return year + '-' + month + '-' + day;
  418. },
  419. OpVisaPriceDataRules: {
  420. visaPrice: [
  421. { required: true, message: '请输入费用金额', trigger: ['blur', 'change'] },
  422. ],
  423. visaClient: [
  424. { required: true, message: '请选择客户名单', trigger: ['blur'] },
  425. ],
  426. visaDescription: [
  427. { required: true, message: '请输入', trigger: ['blur'] },
  428. ],
  429. area: [
  430. { required: true, message: '请选择区域', trigger: ['blur'] },
  431. ],
  432. isThird: [
  433. { required: true, message: '请选择是否第三方代办', trigger: ['blur', 'change'] },
  434. ],
  435. passengerType: [
  436. { required: true, message: '请选择客户类型', trigger: ['blur', 'change'] },
  437. ],
  438. visaNumber: [
  439. { required: true, message: '请输入办理人数', trigger: ['blur', 'change'] },
  440. { pattern: /^[0-9]\d*$/, message: '请输入正确的数字', trigger: ['blur', 'change'] },
  441. ],
  442. visaFreeNumber: [
  443. { required: true, message: '请输入办理人数', trigger: ['blur', 'change'] },
  444. { pattern: /^[0-9]\d*$/, message: '请输入正确的数字', trigger: ['blur', 'change'] },
  445. ],
  446. payDId: [
  447. { required: true, message: '请选择支付方式', trigger: ['blur', 'change'] },
  448. ],
  449. agencyFeeType:[
  450. { required: true, message: '请选择代办费类型', trigger: ['blur', 'change'] },
  451. ],
  452. consumptionPatterns: [
  453. { required: true, message: '请输入消费方式', trigger: ['blur', 'change'] },
  454. ],
  455. visaCurrency:[{ required: true, message: '选择币种', trigger: ['blur', 'change'] },],
  456. consumptionDate: [
  457. { required: true, message: '请选择消费日期', trigger: ['blur', 'change'] },
  458. ],
  459. payee: [
  460. { required: true, message: '请输入收款方', trigger: ['blur', 'change'] },
  461. ],
  462. ctdId: [
  463. { required: true, message: '请选择卡类型', trigger: ['blur', 'change'] },
  464. ],
  465. companyBankNo: [{ required: true, message: '公司银行账号', trigger: ['blur', 'change'] },],
  466. otherBankName: [{ required: true, message: '对方开户行', trigger: ['blur', 'change'] },],
  467. otherSideNo: [{ required: true, message: '对方银行卡号', trigger: ['blur', 'change'] },],
  468. totherSideName: [{ required: true, message: '对方姓名', trigger: ['blur', 'change'] },],
  469. },
  470. rateList: [],
  471. rollcallarr:[],
  472. }
  473. },
  474. methods: {
  475. //联想
  476. GroupFeeKeywordSearch(query) {
  477. if (query !== '') {
  478. // this.selectLoading=true;
  479. var url = "/api/search/GroupFeeKeywordSearch/" +this.userId+'/'+80 +'/'+query
  480. var that = this
  481. this.$axios({
  482. method: 'get',
  483. url: url,
  484. headers: {
  485. Authorization: 'Bearer ' + this.token
  486. },
  487. }).then(function (res) {
  488. if (res.data.code == 200) {
  489. that.delegationInfoLists = res.data.data;
  490. }else{
  491. that.delegationInfoLists=[];
  492. }
  493. }).finally(()=>{
  494. // that.selectLoading=false;
  495. })
  496. }else{
  497. this.delegationInfoLists=this.delegationInfoList;
  498. }
  499. },
  500. //拼音
  501. pinyingxing(val){
  502. return pinyin(val, { toneType: 'none' }).toUpperCase();
  503. },
  504. //fenge
  505. fgarr(val){
  506. val=val+""
  507. return val.split(' ')[0]
  508. },
  509. //初始化下拉框
  510. initializeSelect() {
  511. //团组下拉框绑定
  512. var url = "/api/Groups/DecreasePaymentsSelect"
  513. var that = this
  514. this.$axios({
  515. method: 'post',
  516. url: url,
  517. headers: {
  518. Authorization: 'Bearer ' + this.token
  519. },
  520. data: {
  521. userId: that.userId,
  522. ctId: 80
  523. }
  524. }).then(function (res) {
  525. if (res.data.code == 200) {
  526. that.delegationInfoList = res.data.data.groupName;
  527. that.delegationInfoLists = that.delegationInfoList;
  528. that.payment = res.data.data.payment
  529. for (let index = 0; index < that.delegationInfoList.length; index++) {
  530. if (that.delegationInfoList[index].id == that.OpVisaPriceData.diId) {
  531. that.delegationInfo = that.delegationInfoList[index];
  532. that.VisitDate = that.transformDateFormat(that.delegationInfo.visitStartDate) + '至' + that.transformDateFormat(that.delegationInfo.visitEndDate);
  533. break;
  534. }
  535. }
  536. that.PostTourClientListByDiId();
  537. }
  538. })
  539. var url = "/api/Groups/VisaPriceAddSelect"
  540. this.$axios({
  541. method: 'post',
  542. url: url,
  543. headers: {
  544. Authorization: 'Bearer ' + this.token
  545. },
  546. }).then(function (res) {
  547. if (res.data.code == 200) {
  548. that.agencyFeeTypearr=res.data.data.agencyFeeType;
  549. that.areaarr=res.data.data.countryFeeData;
  550. that.bankCard = res.data.data.bankCard;
  551. that.payment = res.data.data.payment;
  552. that.currencyList = res.data.data.currencyList;
  553. that.passengerTypeSelect = res.data.data.passengerType;
  554. }
  555. })
  556. },
  557. DiIdSelectChange(val) {
  558. var that = this;
  559. this.QueryRate();
  560. for (let index = 0; index < that.delegationInfoList.length; index++) {
  561. if (that.delegationInfoList[index].id == that.OpVisaPriceData.diId) {
  562. that.delegationInfo = that.delegationInfoList[index];
  563. that.VisitDate = that.transformDateFormat(that.delegationInfo.visitStartDate) + '至' + that.transformDateFormat(that.delegationInfo.visitEndDate);
  564. break;
  565. }
  566. }
  567. setTimeout(function () {
  568. that.QueryClientInfoByDIID()
  569. },500)
  570. // that.QueryClientInfoByDIID()
  571. setTimeout(function () {
  572. that.PostTourClientListByDiId(val);
  573. },1000)
  574. },
  575. payChange() {
  576. this.OpVisaPriceData.ctdId = '';
  577. this.OpVisaPriceData.bankNo = '';
  578. this.OpVisaPriceData.cardholderName = '';
  579. this.OpVisaPriceData.companyBankNo = '';
  580. this.OpVisaPriceData.otherBankName = '';
  581. this.OpVisaPriceData.otherSideNo = '';
  582. this.OpVisaPriceData.otherSideName = '';
  583. this.OpVisaPriceData.cRemark = '';
  584. if (this.OpVisaPriceData.payDId == 73) {
  585. this.OpVisaPriceDataRules.companyBankNo = [{ required: true, message: '公司银行账号', trigger: ['blur', 'change'] },]
  586. this.OpVisaPriceDataRules.otherBankName = [{ required: true, message: '对方开户行', trigger: ['blur', 'change'] },]
  587. this.OpVisaPriceDataRules.otherSideNo = [{ required: true, message: '对方银行卡号', trigger: ['blur', 'change'] },]
  588. this.OpVisaPriceDataRules.otherSideName = [{ required: true, message: '对方姓名', trigger: ['blur', 'change'] },]
  589. this.OpVisaPriceDataRules.ctdId = []
  590. } else if (this.OpVisaPriceData.payDId == 72) {
  591. this.OpVisaPriceDataRules.ctdId = [{ required: true, message: '请选择卡类型', trigger: ['blur', 'change'] },]
  592. this.OpVisaPriceDataRules.companyBankNo = []
  593. this.OpVisaPriceDataRules.otherBankName = []
  594. this.OpVisaPriceDataRules.otherSideNo = []
  595. this.OpVisaPriceDataRules.otherSideName = []
  596. } else if (this.OpVisaPriceData.payDId == 83) {
  597. this.OpVisaPriceDataRules.companyBankNo = []
  598. this.OpVisaPriceDataRules.otherBankName = [{ required: true, message: '对方开户行', trigger: ['blur', 'change'] },]
  599. this.OpVisaPriceDataRules.otherSideNo = [{ required: true, message: '对方银行卡号', trigger: ['blur', 'change'] },]
  600. this.OpVisaPriceDataRules.otherSideName = [{ required: true, message: '对方姓名', trigger: ['blur', 'change'] },]
  601. this.OpVisaPriceDataRules.ctdId = []
  602. } else {
  603. this.OpVisaPriceDataRules.companyBankNo = []
  604. this.OpVisaPriceDataRules.otherBankName = []
  605. this.OpVisaPriceDataRules.otherSideNo = []
  606. this.OpVisaPriceDataRules.otherSideName = []
  607. this.OpVisaPriceDataRules.ctdId = []
  608. }
  609. },
  610. //获取客户名单info
  611. PostTourClientListByDiId(val) {
  612. this.rollcallarr=[];
  613. var that = this
  614. var url = "/api/Groups/PostTourClientListByDiId"
  615. this.$axios({
  616. method: 'post',
  617. url: url,
  618. headers: {
  619. Authorization: 'Bearer ' + that.token
  620. },
  621. data: {
  622. portType:1,
  623. diid: val?val:that.OpVisaPriceData.diId,
  624. pageId:104,
  625. userId:233
  626. }
  627. }).then(function (res) {
  628. if (res.data.code == 200) {
  629. that.rollcallarr=res.data.data;
  630. } else {
  631. that.$message.error(res.data.msg);
  632. }
  633. })
  634. },
  635. ctdChange(id) {
  636. this.OpVisaPriceData.cardholderName = 'Zhang Hailin';
  637. for (var i = 0; i < this.bankCard.length; i++) {
  638. if (this.bankCard[i].id == parseInt(id)) {
  639. this.OpVisaPriceData.bankNo = this.bankCard[i].remark
  640. }
  641. }
  642. },
  643. //选择客户名单
  644. clientNamechange(val) {
  645. this.OpVisaPriceData.visaNumber = val.length;
  646. console.log(this.ClientFormat(this.OpVisaPriceData.visaClient))
  647. },
  648. //处理日期
  649. getdate(val){
  650. var date=new Date(val);
  651. var y=date.getFullYear();
  652. var m=date.getMonth()+1<10?'0'+(date.getMonth()+1):date.getMonth()+1;
  653. var d=date.getDate()<10?'0'+date.getDate():date.getDate();
  654. return y+'-'+m+'-'+d
  655. },
  656. //获取团组客户名单
  657. QueryClientInfoByDIID() {
  658. this.OpVisaPriceData.visaClient=[];
  659. var url = "/api/Groups/QueryClientInfoByDIID"
  660. var that = this
  661. this.$axios({
  662. method: 'post',
  663. url: url,
  664. headers: {
  665. Authorization: 'Bearer ' + this.token
  666. },
  667. data: {
  668. diid: that.OpVisaPriceData.diId
  669. }
  670. }).then(function (res) {
  671. if (res.data.code == 200) {
  672. that.fliterClient = res.data.data;
  673. if(that.OpVisaPriceData.visaClient.length==0){
  674. for(var i=0;i<that.fliterClient.length;i++){
  675. that.OpVisaPriceData.visaClient.push(that.fliterClient[i].id)
  676. }
  677. }
  678. }
  679. })
  680. },
  681. //根据Id获取单挑数据及C表数据
  682. QueryVisaById() {
  683. // this.OpVisaPriceData.visaClient=""
  684. var url = "/api/Groups/QueryVisaById"
  685. var that = this
  686. this.$axios({
  687. method: 'post',
  688. url: url,
  689. headers: {
  690. Authorization: 'Bearer ' + this.token
  691. },
  692. data: {
  693. id: that.OpVisaPriceData.id
  694. }
  695. }).then(function (res) {
  696. if (res.data.code == 200) {
  697. var CreditCardPayment = res.data.data.creditCardPayment;
  698. var VisaInfo = res.data.data.visaInfo;
  699. that.IsAuditGM = CreditCardPayment.isAuditGM;
  700. that.OpVisaPriceData.visaClient = that.ClientFormat(VisaInfo.visaClient);
  701. console.log(that.OpVisaPriceData.visaClient);
  702. that.OpVisaPriceData.visaPrice = VisaInfo.visaPrice;
  703. that.OpVisaPriceData.visaCurrency = VisaInfo.visaCurrency;
  704. that.OpVisaPriceData.isThird = VisaInfo.isThird;
  705. that.OpVisaPriceData.passengerType = parseInt(VisaInfo.passengerType);
  706. that.OpVisaPriceData.visaNumber = VisaInfo.visaNumber;
  707. that.OpVisaPriceData.visaFreeNumber = VisaInfo.visaFreeNumber;
  708. that.OpVisaPriceData.createUserId = VisaInfo.createUserId;
  709. that.OpVisaPriceData.remark = VisaInfo.remark;
  710. that.OpVisaPriceData.payDId = CreditCardPayment.payDId;
  711. that.OpVisaPriceData.area = VisaInfo.area;
  712. that.OpVisaPriceData.agencyFeeType = VisaInfo.agencyFeeType;
  713. that.OpVisaPriceData.visaDescription = VisaInfo.visaDescription;
  714. // that.OpVisaPriceData.consumptionPatterns = CreditCardPayment.consumptionPatterns;
  715. that.OpVisaPriceData.consumptionDate = CreditCardPayment.consumptionDate;
  716. that.OpVisaPriceData.ctdId = CreditCardPayment.ctdId;
  717. that.OpVisaPriceData.bankNo = CreditCardPayment.bankNo;
  718. that.OpVisaPriceData.cardholderName = CreditCardPayment.cardholderName;
  719. that.OpVisaPriceData.companyBankNo = CreditCardPayment.companyBankNo
  720. that.OpVisaPriceData.otherBankName = CreditCardPayment.otherBankName
  721. that.OpVisaPriceData.otherSideNo = CreditCardPayment.otherSideNo
  722. that.OpVisaPriceData.otherSideName = CreditCardPayment.otherSideName
  723. that.OpVisaPriceData.payee = CreditCardPayment.payee;
  724. that.OpVisaPriceData.orbitalPrivateTransfer = CreditCardPayment.orbitalPrivateTransfer;
  725. that.OpVisaPriceData.cRemark = CreditCardPayment.remark;
  726. }
  727. })
  728. },
  729. //验证人数W
  730. verifytoll() {
  731. if (Number(this.OpVisaPriceData.visaNumber) + Number(this.OpVisaPriceData.visaFreeNumber) > this.OpVisaPriceData.visaClient.length) {
  732. this.$message.error("请检查人数");
  733. return false
  734. }
  735. },
  736. addBtn() {
  737. if(this.OpVisaPriceData.payDId!=72){
  738. this.OpVisaPriceData.ctdId=0;
  739. this.OpVisaPriceData.bankNo="";
  740. this.OpVisaPriceData.cardholderName="";
  741. }
  742. if (this.IsAuditGM == 1) {
  743. this.$message.error('已通过审核,不可修改!');
  744. } else {
  745. if (this.OpVisaPriceData.diId == null && this.OpVisaPriceData.diId == undefined && this.OpVisaPriceData.diId == "") {
  746. this.$message.error("请选择团组名称");
  747. return;
  748. } else {
  749. const that = this;
  750. that.$refs.OpVisaPriceData.validate((valid) => {
  751. if (valid) {
  752. that.OpVisaPriceData.createUserId = that.userId;
  753. if (that.OpVisaPriceData.ctdId == '') {
  754. that.OpVisaPriceData.ctdId = 0
  755. }
  756. if (Number(that.OpVisaPriceData.visaNumber) + Number(that.OpVisaPriceData.visaFreeNumber) > that.OpVisaPriceData.visaClient.length) {
  757. that.$message.error("请检查人数");
  758. return false
  759. }
  760. var url = "/api/Groups/OpVisaPrice"
  761. that.$axios({
  762. method: 'post',
  763. url: url,
  764. headers: {
  765. Authorization: 'Bearer ' + that.token
  766. },
  767. data:{
  768. status:that.OpVisaPriceData.id?2:1,
  769. id:that.OpVisaPriceData.id,
  770. diId:that.OpVisaPriceData.diId,
  771. visaClient:that.ClientFormat(that.OpVisaPriceData.visaClient),
  772. visaPrice:that.OpVisaPriceData.visaPrice,
  773. visaCurrency:that.OpVisaPriceData.visaCurrency,
  774. isThird:that.OpVisaPriceData.isThird,
  775. passengerType:that.OpVisaPriceData.passengerType,
  776. visaNumber:that.OpVisaPriceData.visaNumber,
  777. visaFreeNumber:that.OpVisaPriceData.visaFreeNumber,
  778. createUserId:that.OpVisaPriceData.createUserId,
  779. area:that.OpVisaPriceData.area,
  780. agencyFeeType:that.OpVisaPriceData.agencyFeeType,
  781. remark:that.OpVisaPriceData.remark,
  782. payDId:that.OpVisaPriceData.payDId,
  783. consumptionPatterns:that.OpVisaPriceData.consumptionPatterns,
  784. consumptionDate:that.getdate(that.OpVisaPriceData.consumptionDate),
  785. ctdId:that.OpVisaPriceData.ctdId,
  786. companyBankNo:that.OpVisaPriceData.companyBankNo,
  787. otherBankName:that.OpVisaPriceData.otherBankName,
  788. otherSideNo:that.OpVisaPriceData.otherSideNo,
  789. otherSideName:that.OpVisaPriceData.otherSideName,
  790. visaDescription:that.OpVisaPriceData.visaDescription,
  791. bankNo:that.OpVisaPriceData.bankNo,
  792. cardholderName:that.OpVisaPriceData.cardholderName,
  793. payee:that.OpVisaPriceData.payee,
  794. orbitalPrivateTransfer:that.OpVisaPriceData.orbitalPrivateTransfer,
  795. cRemark:that.OpVisaPriceData.cRemark
  796. } ,
  797. }).then(function (res) {
  798. if (res.data.code == 200) {
  799. that.$message({
  800. message: res.data.msg,
  801. type: 'success'
  802. });
  803. that.loading = true;
  804. setTimeout(() => {
  805. that.$router.push({
  806. path: "/home/VisaPriec",
  807. query: {
  808. diId: that.OpVisaPriceData.diId
  809. }
  810. })
  811. }, 3000);
  812. } else {
  813. that.$message.error(res.data.msg);
  814. }
  815. })
  816. } else {
  817. this.$message.error('请完善信息在保存!');
  818. return false;
  819. }
  820. })
  821. }
  822. }
  823. },
  824. EscAdd() {
  825. this.$router.push({
  826. path: "/home/VisaPriec",
  827. query: {
  828. diId: this.OpVisaPriceData.diId
  829. }
  830. })
  831. },
  832. //处理名单
  833. ClientFormat(val) {
  834. var result = [];
  835. if (typeof val == "string") {
  836. if (val.indexOf(',') != -1) {
  837. result = val.split(',').map(x => { return Number(x) }).filter(f => f > 0)
  838. } else {
  839. var clientId = Number(val);
  840. if (clientId > 0) {
  841. result = [clientId]
  842. }
  843. }
  844. } else if (Array.isArray(val)) {
  845. if (val.length > 0) {
  846. result = val.join();
  847. }
  848. } else {
  849. result = val;
  850. }
  851. return result;
  852. },
  853. QueryRate() {
  854. var url = "/api/Business/PostGroupTeamRateByDiIdAndCTableId"
  855. var that = this
  856. this.$axios({
  857. method: 'post',
  858. url: url,
  859. headers: {
  860. Authorization: 'Bearer ' + that.token
  861. },
  862. data: {
  863. "portType": 1,
  864. "diId": this.OpVisaPriceData.diId,
  865. "cTable": 80
  866. }
  867. }).then(function (res) {
  868. if (res.data.code == 200) {
  869. //汇率
  870. console.log("汇率--", res.data.data);
  871. that.rateList = res.data.data.teamRates;
  872. }
  873. })
  874. }
  875. },
  876. mounted() {
  877. this.OpVisaPriceData.diId = parseInt(this.$route.query.DiId);
  878. this.token = JSON.parse(localStorage.getItem('userinif')).token;
  879. this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
  880. this.initializeSelect();
  881. this.QueryRate();
  882. this.OpVisaPriceData.id = this.$route.query.id?this.$route.query.id:0;
  883. this.QueryClientInfoByDIID()
  884. if (this.OpVisaPriceData.id != null && this.OpVisaPriceData.id != undefined && this.OpVisaPriceData.id != 0) {
  885. this.QueryVisaById();
  886. this.title = "修改签证费用";
  887. this.OpVisaPriceData.status = 2;
  888. this.isShow = true;
  889. } else {
  890. this.OpVisaPriceData.status = 1;
  891. this.title = "新增签证费用";
  892. this.isShow = false;
  893. }
  894. }
  895. }
  896. </script>
  897. <style>
  898. .communal-list {
  899. background-color: #fff;
  900. padding: 10px;
  901. box-shadow: 0 0 5px #0005;
  902. border-radius: 10px;
  903. }
  904. .car_add .communal-title {
  905. display: flex;
  906. font-size: 17px;
  907. font-weight: 600;
  908. color: #555;
  909. margin-bottom: 20px;
  910. justify-content: space-between;
  911. align-items: center;
  912. }
  913. .appraise-box {
  914. display: flex;
  915. flex-wrap: wrap;
  916. justify-content: space-between;
  917. margin: 50px 0;
  918. }
  919. .appraise-box>div {
  920. width: 30%;
  921. }
  922. .communal-box {
  923. display: flex;
  924. }
  925. .communal-box>button {
  926. margin-left: 10px;
  927. padding: 8px 20px;
  928. }
  929. .car_add {
  930. background-color: #fff;
  931. padding: 20px;
  932. box-shadow: 0 0 5px #0005;
  933. border-radius: 10px;
  934. }
  935. @media screen and (max-width: 1700px) {
  936. .appraise-box>div {
  937. width: 48%;
  938. }
  939. .appraise-box>div el-form-item__content {
  940. width: 260px !important;
  941. }
  942. }
  943. </style>