OpVisaPriec.vue 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942
  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" clearable filterable placeholder="团组选择"
  50. :disabled="isShow" style="width: 100%;" @change="DiIdSelectChange">
  51. <el-option v-for="item in delegationInfoList" :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. currencyList: [],//币种下拉框
  363. bankCard: [],//卡类型下拉框
  364. payment: [],//支付方式下拉框
  365. OpVisaPriceData: {
  366. visaDescription:'',
  367. status: 0,
  368. id: 0,
  369. diId: '',
  370. visaClient: '',
  371. visaPrice: 0,
  372. visaCurrency: 836,
  373. isThird: '',
  374. passengerType: '',
  375. agencyFeeType:'',
  376. visaNumber: 0,
  377. visaFreeNumber: 0,
  378. createUserId: 0,
  379. remark: '',
  380. payDId: 72,
  381. consumptionPatterns: '暂无',
  382. consumptionDate: '',
  383. ctdId: '',
  384. companyBankNo: '',
  385. otherBankName: '',
  386. otherSideNo: '',
  387. otherSideName: '',
  388. bankNo: '',
  389. cardholderName: '',
  390. payee: '',
  391. orbitalPrivateTransfer: 0,
  392. cRemark: '',
  393. area:''
  394. },
  395. IsAuditGM: 0,
  396. VisitDate: '',
  397. passengerTypeSelect: [],
  398. areaarr:[],
  399. fliterClient: [],
  400. agencyFeeTypearr:[],
  401. transformDateFormat: function (value) {
  402. // 将value转换为Date对象
  403. var date = new Date(value);
  404. // 获取年、月、日
  405. var year = date.getFullYear();
  406. var month = date.getMonth() + 1;
  407. var day = date.getDate();
  408. // 将月份和日期转换为两位数的格式
  409. if (month < 10) {
  410. month = '0' + month;
  411. }
  412. if (day < 10) {
  413. day = '0' + day;
  414. }
  415. // 返回格式化后的日期字符串
  416. return year + '-' + month + '-' + day;
  417. },
  418. OpVisaPriceDataRules: {
  419. visaPrice: [
  420. { required: true, message: '请输入费用金额', trigger: ['blur', 'change'] },
  421. ],
  422. visaClient: [
  423. { required: true, message: '请选择客户名单', trigger: ['blur'] },
  424. ],
  425. visaDescription: [
  426. { required: true, message: '请输入', trigger: ['blur'] },
  427. ],
  428. area: [
  429. { required: true, message: '请选择区域', trigger: ['blur'] },
  430. ],
  431. isThird: [
  432. { required: true, message: '请选择是否第三方代办', trigger: ['blur', 'change'] },
  433. ],
  434. passengerType: [
  435. { required: true, message: '请选择客户类型', trigger: ['blur', 'change'] },
  436. ],
  437. visaNumber: [
  438. { required: true, message: '请输入办理人数', trigger: ['blur', 'change'] },
  439. { pattern: /^[0-9]\d*$/, message: '请输入正确的数字', trigger: ['blur', 'change'] },
  440. ],
  441. visaFreeNumber: [
  442. { required: true, message: '请输入办理人数', trigger: ['blur', 'change'] },
  443. { pattern: /^[0-9]\d*$/, message: '请输入正确的数字', trigger: ['blur', 'change'] },
  444. ],
  445. payDId: [
  446. { required: true, message: '请选择支付方式', trigger: ['blur', 'change'] },
  447. ],
  448. agencyFeeType:[
  449. { required: true, message: '请选择代办费类型', trigger: ['blur', 'change'] },
  450. ],
  451. consumptionPatterns: [
  452. { required: true, message: '请输入消费方式', trigger: ['blur', 'change'] },
  453. ],
  454. visaCurrency:[{ required: true, message: '选择币种', trigger: ['blur', 'change'] },],
  455. consumptionDate: [
  456. { required: true, message: '请选择消费日期', trigger: ['blur', 'change'] },
  457. ],
  458. payee: [
  459. { required: true, message: '请输入收款方', trigger: ['blur', 'change'] },
  460. ],
  461. ctdId: [
  462. { required: true, message: '请选择卡类型', trigger: ['blur', 'change'] },
  463. ],
  464. companyBankNo: [{ required: true, message: '公司银行账号', trigger: ['blur', 'change'] },],
  465. otherBankName: [{ required: true, message: '对方开户行', trigger: ['blur', 'change'] },],
  466. otherSideNo: [{ required: true, message: '对方银行卡号', trigger: ['blur', 'change'] },],
  467. totherSideName: [{ required: true, message: '对方姓名', trigger: ['blur', 'change'] },],
  468. },
  469. rateList: [],
  470. rollcallarr:[],
  471. }
  472. },
  473. methods: {
  474. //拼音
  475. pinyingxing(val){
  476. return pinyin(val, { toneType: 'none' }).toUpperCase();
  477. },
  478. //fenge
  479. fgarr(val){
  480. val=val+""
  481. return val.split(' ')[0]
  482. },
  483. //初始化下拉框
  484. initializeSelect() {
  485. //团组下拉框绑定
  486. var url = "/api/Groups/DecreasePaymentsSelect"
  487. var that = this
  488. this.$axios({
  489. method: 'post',
  490. url: url,
  491. headers: {
  492. Authorization: 'Bearer ' + this.token
  493. },
  494. data: {
  495. userId: that.userId,
  496. ctId: 80
  497. }
  498. }).then(function (res) {
  499. if (res.data.code == 200) {
  500. that.delegationInfoList = res.data.data.groupName;
  501. that.payment = res.data.data.payment
  502. for (let index = 0; index < that.delegationInfoList.length; index++) {
  503. if (that.delegationInfoList[index].id == that.OpVisaPriceData.diId) {
  504. that.delegationInfo = that.delegationInfoList[index];
  505. that.VisitDate = that.transformDateFormat(that.delegationInfo.visitStartDate) + '至' + that.transformDateFormat(that.delegationInfo.visitEndDate);
  506. break;
  507. }
  508. }
  509. that.PostTourClientListByDiId();
  510. }
  511. })
  512. var url = "/api/Groups/VisaPriceAddSelect"
  513. this.$axios({
  514. method: 'post',
  515. url: url,
  516. headers: {
  517. Authorization: 'Bearer ' + this.token
  518. },
  519. }).then(function (res) {
  520. if (res.data.code == 200) {
  521. that.agencyFeeTypearr=res.data.data.agencyFeeType;
  522. that.areaarr=res.data.data.countryFeeData;
  523. that.bankCard = res.data.data.bankCard;
  524. that.payment = res.data.data.payment;
  525. that.currencyList = res.data.data.currencyList;
  526. that.passengerTypeSelect = res.data.data.passengerType;
  527. }
  528. })
  529. },
  530. DiIdSelectChange(val) {
  531. var that = this;
  532. this.QueryRate();
  533. for (let index = 0; index < that.delegationInfoList.length; index++) {
  534. if (that.delegationInfoList[index].id == that.OpVisaPriceData.diId) {
  535. that.delegationInfo = that.delegationInfoList[index];
  536. that.VisitDate = that.transformDateFormat(that.delegationInfo.visitStartDate) + '至' + that.transformDateFormat(that.delegationInfo.visitEndDate);
  537. break;
  538. }
  539. }
  540. setTimeout(function () {
  541. that.QueryClientInfoByDIID()
  542. },500)
  543. // that.QueryClientInfoByDIID()
  544. setTimeout(function () {
  545. that.PostTourClientListByDiId(val);
  546. },1000)
  547. },
  548. payChange() {
  549. this.OpVisaPriceData.ctdId = '';
  550. this.OpVisaPriceData.bankNo = '';
  551. this.OpVisaPriceData.cardholderName = '';
  552. this.OpVisaPriceData.companyBankNo = '';
  553. this.OpVisaPriceData.otherBankName = '';
  554. this.OpVisaPriceData.otherSideNo = '';
  555. this.OpVisaPriceData.otherSideName = '';
  556. this.OpVisaPriceData.cRemark = '';
  557. if (this.OpVisaPriceData.payDId == 73) {
  558. this.OpVisaPriceDataRules.companyBankNo = [{ required: true, message: '公司银行账号', trigger: ['blur', 'change'] },]
  559. this.OpVisaPriceDataRules.otherBankName = [{ required: true, message: '对方开户行', trigger: ['blur', 'change'] },]
  560. this.OpVisaPriceDataRules.otherSideNo = [{ required: true, message: '对方银行卡号', trigger: ['blur', 'change'] },]
  561. this.OpVisaPriceDataRules.otherSideName = [{ required: true, message: '对方姓名', trigger: ['blur', 'change'] },]
  562. this.OpVisaPriceDataRules.ctdId = []
  563. } else if (this.OpVisaPriceData.payDId == 72) {
  564. this.OpVisaPriceDataRules.ctdId = [{ required: true, message: '请选择卡类型', trigger: ['blur', 'change'] },]
  565. this.OpVisaPriceDataRules.companyBankNo = []
  566. this.OpVisaPriceDataRules.otherBankName = []
  567. this.OpVisaPriceDataRules.otherSideNo = []
  568. this.OpVisaPriceDataRules.otherSideName = []
  569. } else if (this.OpVisaPriceData.payDId == 83) {
  570. this.OpVisaPriceDataRules.companyBankNo = []
  571. this.OpVisaPriceDataRules.otherBankName = [{ required: true, message: '对方开户行', trigger: ['blur', 'change'] },]
  572. this.OpVisaPriceDataRules.otherSideNo = [{ required: true, message: '对方银行卡号', trigger: ['blur', 'change'] },]
  573. this.OpVisaPriceDataRules.otherSideName = [{ required: true, message: '对方姓名', trigger: ['blur', 'change'] },]
  574. this.OpVisaPriceDataRules.ctdId = []
  575. } else {
  576. this.OpVisaPriceDataRules.companyBankNo = []
  577. this.OpVisaPriceDataRules.otherBankName = []
  578. this.OpVisaPriceDataRules.otherSideNo = []
  579. this.OpVisaPriceDataRules.otherSideName = []
  580. this.OpVisaPriceDataRules.ctdId = []
  581. }
  582. },
  583. //获取客户名单info
  584. PostTourClientListByDiId(val) {
  585. this.rollcallarr=[];
  586. var that = this
  587. var url = "/api/Groups/PostTourClientListByDiId"
  588. this.$axios({
  589. method: 'post',
  590. url: url,
  591. headers: {
  592. Authorization: 'Bearer ' + that.token
  593. },
  594. data: {
  595. portType:1,
  596. diid: val?val:that.OpVisaPriceData.diId,
  597. pageId:104,
  598. userId:233
  599. }
  600. }).then(function (res) {
  601. if (res.data.code == 200) {
  602. that.rollcallarr=res.data.data;
  603. } else {
  604. that.$message.error(res.data.msg);
  605. }
  606. })
  607. },
  608. ctdChange(id) {
  609. this.OpVisaPriceData.cardholderName = 'Zhang Hailin';
  610. for (var i = 0; i < this.bankCard.length; i++) {
  611. if (this.bankCard[i].id == parseInt(id)) {
  612. this.OpVisaPriceData.bankNo = this.bankCard[i].remark
  613. }
  614. }
  615. },
  616. //选择客户名单
  617. clientNamechange(val) {
  618. this.OpVisaPriceData.visaNumber = val.length;
  619. console.log(this.ClientFormat(this.OpVisaPriceData.visaClient))
  620. },
  621. //处理日期
  622. getdate(val){
  623. var date=new Date(val);
  624. var y=date.getFullYear();
  625. var m=date.getMonth()+1<10?'0'+(date.getMonth()+1):date.getMonth()+1;
  626. var d=date.getDate()<10?'0'+date.getDate():date.getDate();
  627. return y+'-'+m+'-'+d
  628. },
  629. //获取团组客户名单
  630. QueryClientInfoByDIID() {
  631. this.OpVisaPriceData.visaClient=[];
  632. var url = "/api/Groups/QueryClientInfoByDIID"
  633. var that = this
  634. this.$axios({
  635. method: 'post',
  636. url: url,
  637. headers: {
  638. Authorization: 'Bearer ' + this.token
  639. },
  640. data: {
  641. diid: that.OpVisaPriceData.diId
  642. }
  643. }).then(function (res) {
  644. if (res.data.code == 200) {
  645. that.fliterClient = res.data.data;
  646. if(that.OpVisaPriceData.visaClient.length==0){
  647. for(var i=0;i<that.fliterClient.length;i++){
  648. that.OpVisaPriceData.visaClient.push(that.fliterClient[i].id)
  649. }
  650. }
  651. }
  652. })
  653. },
  654. //根据Id获取单挑数据及C表数据
  655. QueryVisaById() {
  656. // this.OpVisaPriceData.visaClient=""
  657. var url = "/api/Groups/QueryVisaById"
  658. var that = this
  659. this.$axios({
  660. method: 'post',
  661. url: url,
  662. headers: {
  663. Authorization: 'Bearer ' + this.token
  664. },
  665. data: {
  666. id: that.OpVisaPriceData.id
  667. }
  668. }).then(function (res) {
  669. if (res.data.code == 200) {
  670. var CreditCardPayment = res.data.data.creditCardPayment;
  671. var VisaInfo = res.data.data.visaInfo;
  672. that.IsAuditGM = CreditCardPayment.isAuditGM;
  673. that.OpVisaPriceData.visaClient = that.ClientFormat(VisaInfo.visaClient);
  674. console.log(that.OpVisaPriceData.visaClient);
  675. that.OpVisaPriceData.visaPrice = VisaInfo.visaPrice;
  676. that.OpVisaPriceData.visaCurrency = VisaInfo.visaCurrency;
  677. that.OpVisaPriceData.isThird = VisaInfo.isThird;
  678. that.OpVisaPriceData.passengerType = parseInt(VisaInfo.passengerType);
  679. that.OpVisaPriceData.visaNumber = VisaInfo.visaNumber;
  680. that.OpVisaPriceData.visaFreeNumber = VisaInfo.visaFreeNumber;
  681. that.OpVisaPriceData.createUserId = VisaInfo.createUserId;
  682. that.OpVisaPriceData.remark = VisaInfo.remark;
  683. that.OpVisaPriceData.payDId = CreditCardPayment.payDId;
  684. that.OpVisaPriceData.area = VisaInfo.area;
  685. that.OpVisaPriceData.agencyFeeType = VisaInfo.agencyFeeType;
  686. that.OpVisaPriceData.visaDescription = VisaInfo.visaDescription;
  687. // that.OpVisaPriceData.consumptionPatterns = CreditCardPayment.consumptionPatterns;
  688. that.OpVisaPriceData.consumptionDate = CreditCardPayment.consumptionDate;
  689. that.OpVisaPriceData.ctdId = CreditCardPayment.ctdId;
  690. that.OpVisaPriceData.bankNo = CreditCardPayment.bankNo;
  691. that.OpVisaPriceData.cardholderName = CreditCardPayment.cardholderName;
  692. that.OpVisaPriceData.companyBankNo = CreditCardPayment.companyBankNo
  693. that.OpVisaPriceData.otherBankName = CreditCardPayment.otherBankName
  694. that.OpVisaPriceData.otherSideNo = CreditCardPayment.otherSideNo
  695. that.OpVisaPriceData.otherSideName = CreditCardPayment.otherSideName
  696. that.OpVisaPriceData.payee = CreditCardPayment.payee;
  697. that.OpVisaPriceData.orbitalPrivateTransfer = CreditCardPayment.orbitalPrivateTransfer;
  698. that.OpVisaPriceData.cRemark = CreditCardPayment.remark;
  699. }
  700. })
  701. },
  702. //验证人数W
  703. verifytoll() {
  704. if (Number(this.OpVisaPriceData.visaNumber) + Number(this.OpVisaPriceData.visaFreeNumber) > this.OpVisaPriceData.visaClient.length) {
  705. this.$message.error("请检查人数");
  706. return false
  707. }
  708. },
  709. addBtn() {
  710. if(this.OpVisaPriceData.payDId!=72){
  711. this.OpVisaPriceData.ctdId=0;
  712. this.OpVisaPriceData.bankNo="";
  713. this.OpVisaPriceData.cardholderName="";
  714. }
  715. if (this.IsAuditGM == 1) {
  716. this.$message.error('已通过审核,不可修改!');
  717. } else {
  718. if (this.OpVisaPriceData.diId == null && this.OpVisaPriceData.diId == undefined && this.OpVisaPriceData.diId == "") {
  719. this.$message.error("请选择团组名称");
  720. return;
  721. } else {
  722. const that = this;
  723. that.$refs.OpVisaPriceData.validate((valid) => {
  724. if (valid) {
  725. that.OpVisaPriceData.createUserId = that.userId;
  726. if (that.OpVisaPriceData.ctdId == '') {
  727. that.OpVisaPriceData.ctdId = 0
  728. }
  729. if (Number(that.OpVisaPriceData.visaNumber) + Number(that.OpVisaPriceData.visaFreeNumber) > that.OpVisaPriceData.visaClient.length) {
  730. that.$message.error("请检查人数");
  731. return false
  732. }
  733. var url = "/api/Groups/OpVisaPrice"
  734. that.$axios({
  735. method: 'post',
  736. url: url,
  737. headers: {
  738. Authorization: 'Bearer ' + that.token
  739. },
  740. data:{
  741. status:that.OpVisaPriceData.id?2:1,
  742. id:that.OpVisaPriceData.id,
  743. diId:that.OpVisaPriceData.diId,
  744. visaClient:that.ClientFormat(that.OpVisaPriceData.visaClient),
  745. visaPrice:that.OpVisaPriceData.visaPrice,
  746. visaCurrency:that.OpVisaPriceData.visaCurrency,
  747. isThird:that.OpVisaPriceData.isThird,
  748. passengerType:that.OpVisaPriceData.passengerType,
  749. visaNumber:that.OpVisaPriceData.visaNumber,
  750. visaFreeNumber:that.OpVisaPriceData.visaFreeNumber,
  751. createUserId:that.OpVisaPriceData.createUserId,
  752. area:that.OpVisaPriceData.area,
  753. agencyFeeType:that.OpVisaPriceData.agencyFeeType,
  754. remark:that.OpVisaPriceData.remark,
  755. payDId:that.OpVisaPriceData.payDId,
  756. consumptionPatterns:that.OpVisaPriceData.consumptionPatterns,
  757. consumptionDate:that.getdate(that.OpVisaPriceData.consumptionDate),
  758. ctdId:that.OpVisaPriceData.ctdId,
  759. companyBankNo:that.OpVisaPriceData.companyBankNo,
  760. otherBankName:that.OpVisaPriceData.otherBankName,
  761. otherSideNo:that.OpVisaPriceData.otherSideNo,
  762. otherSideName:that.OpVisaPriceData.otherSideName,
  763. visaDescription:that.OpVisaPriceData.visaDescription,
  764. bankNo:that.OpVisaPriceData.bankNo,
  765. cardholderName:that.OpVisaPriceData.cardholderName,
  766. payee:that.OpVisaPriceData.payee,
  767. orbitalPrivateTransfer:that.OpVisaPriceData.orbitalPrivateTransfer,
  768. cRemark:that.OpVisaPriceData.cRemark
  769. } ,
  770. }).then(function (res) {
  771. if (res.data.code == 200) {
  772. that.$message({
  773. message: res.data.msg,
  774. type: 'success'
  775. });
  776. that.loading = true;
  777. setTimeout(() => {
  778. that.$router.push({
  779. path: "/home/VisaPriec",
  780. query: {
  781. diId: that.OpVisaPriceData.diId
  782. }
  783. })
  784. }, 3000);
  785. } else {
  786. that.$message.error(res.data.msg);
  787. }
  788. })
  789. } else {
  790. this.$message.error('请完善信息在保存!');
  791. return false;
  792. }
  793. })
  794. }
  795. }
  796. },
  797. EscAdd() {
  798. this.$router.push({
  799. path: "/home/VisaPriec",
  800. query: {
  801. diId: this.OpVisaPriceData.diId
  802. }
  803. })
  804. },
  805. //处理名单
  806. ClientFormat(val) {
  807. var result = [];
  808. if (typeof val == "string") {
  809. if (val.indexOf(',') != -1) {
  810. result = val.split(',').map(x => { return Number(x) }).filter(f => f > 0)
  811. } else {
  812. var clientId = Number(val);
  813. if (clientId > 0) {
  814. result = [clientId]
  815. }
  816. }
  817. } else if (Array.isArray(val)) {
  818. if (val.length > 0) {
  819. result = val.join();
  820. }
  821. } else {
  822. result = val;
  823. }
  824. return result;
  825. },
  826. QueryRate() {
  827. var url = "/api/Business/PostGroupTeamRateByDiIdAndCTableId"
  828. var that = this
  829. this.$axios({
  830. method: 'post',
  831. url: url,
  832. headers: {
  833. Authorization: 'Bearer ' + that.token
  834. },
  835. data: {
  836. "portType": 1,
  837. "diId": this.OpVisaPriceData.diId,
  838. "cTable": 80
  839. }
  840. }).then(function (res) {
  841. if (res.data.code == 200) {
  842. //汇率
  843. console.log("汇率--", res.data.data);
  844. that.rateList = res.data.data.teamRates;
  845. }
  846. })
  847. }
  848. },
  849. mounted() {
  850. this.OpVisaPriceData.diId = parseInt(this.$route.query.DiId);
  851. this.token = JSON.parse(localStorage.getItem('userinif')).token;
  852. this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
  853. this.initializeSelect();
  854. this.QueryRate();
  855. this.OpVisaPriceData.id = this.$route.query.id?this.$route.query.id:0;
  856. this.QueryClientInfoByDIID()
  857. if (this.OpVisaPriceData.id != null && this.OpVisaPriceData.id != undefined && this.OpVisaPriceData.id != 0) {
  858. this.QueryVisaById();
  859. this.title = "修改签证费用";
  860. this.OpVisaPriceData.status = 2;
  861. this.isShow = true;
  862. } else {
  863. this.OpVisaPriceData.status = 1;
  864. this.title = "新增签证费用";
  865. this.isShow = false;
  866. }
  867. }
  868. }
  869. </script>
  870. <style>
  871. .communal-list {
  872. background-color: #fff;
  873. padding: 10px;
  874. box-shadow: 0 0 5px #0005;
  875. border-radius: 10px;
  876. }
  877. .car_add .communal-title {
  878. display: flex;
  879. font-size: 17px;
  880. font-weight: 600;
  881. color: #555;
  882. margin-bottom: 20px;
  883. justify-content: space-between;
  884. align-items: center;
  885. }
  886. .appraise-box {
  887. display: flex;
  888. flex-wrap: wrap;
  889. justify-content: space-between;
  890. margin: 50px 0;
  891. }
  892. .appraise-box>div {
  893. width: 30%;
  894. }
  895. .communal-box {
  896. display: flex;
  897. }
  898. .communal-box>button {
  899. margin-left: 10px;
  900. padding: 8px 20px;
  901. }
  902. .car_add {
  903. background-color: #fff;
  904. padding: 20px;
  905. box-shadow: 0 0 5px #0005;
  906. border-radius: 10px;
  907. }
  908. @media screen and (max-width: 1700px) {
  909. .appraise-box>div {
  910. width: 48%;
  911. }
  912. .appraise-box>div el-form-item__content {
  913. width: 260px !important;
  914. }
  915. }
  916. </style>