OpVisaPriec.vue 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734
  1. <template>
  2. <div class="car_add">
  3. <div>
  4. <div class="communal-title">
  5. <div>{{ title }}</div>
  6. </div>
  7. </div>
  8. <hr style='background-color:#5555; height:1px; border:none;' />
  9. <div>
  10. <el-form :model="delegationInfo" label-width="100px" class="demo-ruleForm">
  11. <div style="display: flex;">
  12. <div style="width: 25%;">
  13. <el-form-item label="团组名称:" label-width="160px">
  14. <el-select v-model="OpVisaPriceData.diId" clearable filterable placeholder="团组选择"
  15. :disabled="isShow" style="width: 100%;" @change="DiIdSelectChange">
  16. <el-option v-for="item in delegationInfoList" :key="item.id" :label="item.teamName"
  17. :value="item.id">
  18. </el-option>
  19. </el-select>
  20. </el-form-item>
  21. </div>
  22. <div style="width: 25%;">
  23. <el-form-item label="团 号:" prop="tourCode" label-width="160px">
  24. <el-input placeholder="团号" v-model="delegationInfo.tourCode" :disabled="true">
  25. </el-input>
  26. </el-form-item>
  27. </div>
  28. <div style="width: 25%;">
  29. <el-form-item label="客户:" prop="clientName" label-width="160px">
  30. <el-input placeholder="客户" v-model="delegationInfo.clientName" :disabled="true">
  31. </el-input>
  32. </el-form-item>
  33. </div>
  34. <div style="width: 25%;">
  35. <el-form-item label="出访国家:" prop="visitCountry" label-width="160px">
  36. <el-input placeholder="出访国家" v-model="delegationInfo.visitCountry" :disabled="true">
  37. </el-input>
  38. </el-form-item>
  39. </div>
  40. </div>
  41. <div style="display: flex;">
  42. <div style="width: 25%;">
  43. <el-form-item label="出访时间:" label-width="160px">
  44. <el-input placeholder="出访时间" v-model="VisitDate" :disabled="true">
  45. </el-input>
  46. </el-form-item>
  47. </div>
  48. <div style="width: 25%;">
  49. <el-form-item label="出访人数:" label-width="160px">
  50. <el-input placeholder="出访人数" v-model="delegationInfo.visitPNumber" :disabled="true">
  51. </el-input>
  52. </el-form-item>
  53. </div>
  54. <div style="width: 25%;">
  55. <el-form-item label="出访天数:" label-width="160px">
  56. <el-input placeholder="出访天数" v-model="delegationInfo.visitDays" :disabled="true">
  57. </el-input>
  58. </el-form-item>
  59. </div>
  60. </div>
  61. </el-form>
  62. <el-form :model="OpVisaPriceData" ref="OpVisaPriceData" :rules="OpVisaPriceDataRules" label-width="100px"
  63. class="demo-ruleForm">
  64. <div style="width: 100%;">
  65. <el-form-item label="此舱位客人名称:" prop="visaClient" label-width="160px">
  66. <el-select @change="clientNamechange" style="width: 100%;" v-model="OpVisaPriceData.visaClient" placeholder="此舱位客人名称" multiple clearable
  67. filterable >
  68. <el-option v-for="item in fliterClient" :key="item.id" :label="item.lastName+item.firstName" :value="item.id">
  69. </el-option>
  70. </el-select>
  71. </el-form-item>
  72. </div>
  73. <div style="display: flex;flex-wrap: wrap;">
  74. <!-- <div style="width: 25%;">
  75. <el-form-item label="签证客户:" prop="visaClient" label-width="160px">
  76. <el-input placeholder="签证客户" v-model="OpVisaPriceData.visaClient">
  77. </el-input>
  78. </el-form-item>
  79. </div> -->
  80. <div style="width: 25%;">
  81. <el-form-item label="签证费用:" prop="visaPrice" label-width="160px">
  82. <el-input placeholder="签证费用" v-model="OpVisaPriceData.visaPrice" style="width: 58%;">
  83. </el-input>
  84. <el-select v-model="OpVisaPriceData.visaCurrency" filterable placeholder="币种"
  85. style="width: 35%;">
  86. <el-option v-for="item in currencyList" :key="item.id" :label="item.name" :value="item.id">
  87. </el-option>
  88. </el-select>
  89. </el-form-item>
  90. </div>
  91. <div style="width: 25%;">
  92. <el-form-item label="是否第三方代办:" prop="isThird" label-width="160px">
  93. <el-radio-group v-model="OpVisaPriceData.isThird">
  94. <el-radio :label=1>是</el-radio>
  95. <el-radio :label=0>否</el-radio>
  96. </el-radio-group>
  97. </el-form-item>
  98. </div>
  99. <div style="width: 25%;">
  100. <el-form-item label="客户类型:" prop="passengerType" label-width="160px">
  101. <el-select v-model="OpVisaPriceData.passengerType" clearable filterable placeholder="客户类型">
  102. <el-option v-for="item in passengerTypeSelect" :key="item.id" :label="item.name"
  103. :value="item.id">
  104. </el-option>
  105. </el-select>
  106. </el-form-item>
  107. </div>
  108. <div style="width: 25%;">
  109. <el-form-item label="签证办理人数:" prop="visaNumber" label-width="160px">
  110. <el-input placeholder="签证办理人数" v-model="OpVisaPriceData.visaNumber" style="width: 100%;">
  111. </el-input>
  112. </el-form-item>
  113. </div>
  114. <div style="width: 25%;">
  115. <el-form-item label="免签人数:" prop="visaFreeNumber" label-width="160px">
  116. <el-input placeholder="免签人数" v-model="OpVisaPriceData.visaFreeNumber" style="width: 100%;">
  117. </el-input>
  118. </el-form-item>
  119. </div>
  120. </div>
  121. <div style="display: flex;">
  122. <div style="width: 100%;">
  123. <el-form-item label="备 注:" prop="Remark" label-width="160px">
  124. <el-input type="textarea" :rows="5" placeholder="备注"
  125. v-model="OpVisaPriceData.remark"></el-input>
  126. </el-form-item>
  127. </div>
  128. </div>
  129. <hr style='background-color:#5555; height:1px; border:none;margin-top: 10px;' />
  130. <div style="display: flex;">
  131. <div style="width: 25%;">
  132. <el-form-item label="支付方式:" prop="payDId" label-width="160px">
  133. <el-select v-model="OpVisaPriceData.payDId" placeholder="支付方式" style="width: 100%;"
  134. @change="payChange">
  135. <el-option v-for="item in payment" :key="item.id" :label="item.name" :value="item.id">
  136. </el-option>
  137. </el-select>
  138. </el-form-item>
  139. </div>
  140. <div style="width: 25%;">
  141. <el-form-item label="消费方式:" prop="consumptionPatterns" label-width="160px">
  142. <el-input placeholder="消费方式" v-model="OpVisaPriceData.consumptionPatterns">
  143. </el-input>
  144. </el-form-item>
  145. </div>
  146. <div style="width: 25%;">
  147. <el-form-item label="消费日期:" prop="consumptionDate" label-width="160px">
  148. <el-date-picker style="width:100%" v-model="OpVisaPriceData.consumptionDate" placeholder="消费日期" type="date">
  149. </el-date-picker>
  150. </el-form-item>
  151. </div>
  152. <div style="width: 25%;">
  153. <el-form-item label="付款金额:" prop="payMoney" label-width="160px">
  154. <el-input placeholder="付款金额" v-model="OpVisaPriceData.visaPrice" style="width: 52%;"
  155. :disabled="true">
  156. </el-input>
  157. <el-select v-model="OpVisaPriceData.visaCurrency" style="width: 45%;" :disabled="true">
  158. <el-option v-for="item in currencyList" :key="item.id" :label="item.name" :value="item.id">
  159. </el-option>
  160. </el-select>
  161. </el-form-item>
  162. </div>
  163. </div>
  164. <div v-if="OpVisaPriceData.payDId == 72">
  165. <div style="display: flex;">
  166. <div style="width: 25%;">
  167. <el-form-item label="卡类型:" prop="ctdId" label-width="160px">
  168. <el-select v-model="OpVisaPriceData.ctdId" placeholder="卡类型" style="width: 100%;"
  169. @change="ctdChange">
  170. <el-option v-for="item in bankCard" :key="item.id" :label="item.name" :value="item.id">
  171. </el-option>
  172. </el-select>
  173. </el-form-item>
  174. </div>
  175. <div style="width: 25%;">
  176. <el-form-item label="银行卡号:" prop="bankNo" label-width="160px">
  177. <el-input placeholder="银行卡号" v-model="OpVisaPriceData.bankNo" :disabled="true">
  178. </el-input>
  179. </el-form-item>
  180. </div>
  181. <div style="width: 25%;">
  182. <el-form-item label="持卡人姓名:" prop="cardholderName" label-width="160px">
  183. <el-input placeholder="持卡人姓名" v-model="OpVisaPriceData.cardholderName" :disabled="true">
  184. </el-input>
  185. </el-form-item>
  186. </div>
  187. </div>
  188. </div>
  189. <div v-else-if="OpVisaPriceData.payDId == 73">
  190. <div style="display: flex;">
  191. <div style="width: 25%;">
  192. <el-form-item label="公司银行账号:" label-width="160px" prop="companyBankNo">
  193. <el-input placeholder="公司银行账号" v-model="OpVisaPriceData.companyBankNo">
  194. </el-input>
  195. </el-form-item>
  196. </div>
  197. <div style="width: 25%;">
  198. <el-form-item label="对方开户行:" prop="otherBankName" label-width="160px">
  199. <el-input placeholder="对方开户行:" v-model="OpVisaPriceData.otherBankName">
  200. </el-input>
  201. </el-form-item>
  202. </div>
  203. <div style="width: 25%;">
  204. <el-form-item label="对方银行卡号:" prop="otherSideNo" label-width="160px">
  205. <el-input placeholder="对方银行卡号" v-model="OpVisaPriceData.otherSideNo">
  206. </el-input>
  207. </el-form-item>
  208. </div>
  209. <div style="width: 25%;">
  210. <el-form-item label="对方姓名:" prop="otherSideName" label-width="160px">
  211. <el-input placeholder="对方姓名" v-model="OpVisaPriceData.otherSideName">
  212. </el-input>
  213. </el-form-item>
  214. </div>
  215. </div>
  216. </div>
  217. <div v-else-if="OpVisaPriceData.payDId == 83">
  218. <div style="display: flex;">
  219. <div style="width: 25%;">
  220. <el-form-item label="对方开户行:" prop="otherBankName" label-width="160px">
  221. <el-input placeholder="对方开户行" v-model="OpVisaPriceData.otherBankName">
  222. </el-input>
  223. </el-form-item>
  224. </div>
  225. <div style="width: 25%;">
  226. <el-form-item label="对方银行卡号:" prop="otherSideNo" label-width="160px">
  227. <el-input placeholder="对方银行卡号" v-model="OpVisaPriceData.otherSideNo">
  228. </el-input>
  229. </el-form-item>
  230. </div>
  231. <div style="width: 25%;">
  232. <el-form-item label="对方姓名:" prop="otherSideName" label-width="160px">
  233. <el-input placeholder="对方姓名" v-model="OpVisaPriceData.otherSideName">
  234. </el-input>
  235. </el-form-item>
  236. </div>
  237. </div>
  238. </div>
  239. <div v-else></div>
  240. <div style="display:flex;">
  241. <div style="width: 25%;">
  242. <el-form-item label="收款方:" prop="payee" label-width="160px">
  243. <el-input placeholder="对方姓名:" v-model="OpVisaPriceData.payee">
  244. </el-input>
  245. </el-form-item>
  246. </div>
  247. <div style="width: 25%;">
  248. <el-form-item label="费用标识:" prop="orbitalPrivateTransfer" label-width="160px">
  249. <el-select v-model="OpVisaPriceData.orbitalPrivateTransfer" placeholder="费用标识"
  250. style="width: 100%;">
  251. <el-option key="0" label="公转" :value=0>
  252. </el-option>
  253. <el-option key="1" label="私转" :value=1>
  254. </el-option>
  255. </el-select>
  256. </el-form-item>
  257. </div>
  258. </div>
  259. <div style="display: flex;">
  260. <div style="width: 100%;">
  261. <el-form-item label="备 注:" prop="Remark" label-width="160px">
  262. <el-input type="textarea" :rows="5" placeholder="备注"
  263. v-model="OpVisaPriceData.cRemark"></el-input>
  264. </el-form-item>
  265. </div>
  266. </div>
  267. <el-form-item>
  268. <div style="text-align: right;">
  269. <el-button type="primary" @click="addBtn">保存</el-button>
  270. <el-button @click="EscAdd">取消</el-button>
  271. </div>
  272. </el-form-item>
  273. </el-form>
  274. </div>
  275. </div>
  276. </template>
  277. <script>
  278. import { dE } from '@fullcalendar/core/internal-common';
  279. export default {
  280. data() {
  281. return {
  282. title: "新增商邀费用",
  283. token: '',
  284. userId: 0,
  285. id: '',
  286. isShow: false,
  287. delegationInfo: {},
  288. delegationInfoList: [],//团组下拉框
  289. currencyList: [],//币种下拉框
  290. bankCard: [],//卡类型下拉框
  291. payment: [],//支付方式下拉框
  292. OpVisaPriceData: {
  293. status: 0,
  294. id: 0,
  295. diId: '',
  296. visaClient: '',
  297. visaPrice: 0,
  298. visaCurrency: '',
  299. isThird: '',
  300. passengerType: '',
  301. visaNumber: 0,
  302. visaFreeNumber: 0,
  303. createUserId: 0,
  304. remark: '',
  305. payDId: 72,
  306. consumptionPatterns: '',
  307. consumptionDate: '',
  308. ctdId: '',
  309. companyBankNo: '',
  310. otherBankName: '',
  311. otherSideNo: '',
  312. otherSideName: '',
  313. bankNo: '',
  314. cardholderName: '',
  315. payee: '',
  316. orbitalPrivateTransfer: 0,
  317. cRemark: '',
  318. },
  319. IsAuditGM: 0,
  320. VisitDate: '',
  321. passengerTypeSelect: [],
  322. fliterClient:[],
  323. transformDateFormat: function (value) {
  324. // 将value转换为Date对象
  325. var date = new Date(value);
  326. // 获取年、月、日
  327. var year = date.getFullYear();
  328. var month = date.getMonth() + 1;
  329. var day = date.getDate();
  330. // 将月份和日期转换为两位数的格式
  331. if (month < 10) {
  332. month = '0' + month;
  333. }
  334. if (day < 10) {
  335. day = '0' + day;
  336. }
  337. // 返回格式化后的日期字符串
  338. return year + '-' + month + '-' + day;
  339. },
  340. OpVisaPriceDataRules: {
  341. visaPrice: [
  342. { required: true, message: '请输入费用金额', trigger: ['blur', 'change'] },
  343. { pattern: /^(([1-9]?\d{0,8}(\.\d{1,2})?)|999999999|999999999\.(0){1,2})$/, message: '请输入正确的金额(最多2位小数)' }
  344. ],
  345. visaClient: [
  346. { required: true, message: '请输入费用名称', trigger: ['blur'] },
  347. ],
  348. isThird: [
  349. { required: true, message: '请选择是否第三方代办', trigger: ['blur', 'change'] },
  350. ],
  351. passengerType: [
  352. { required: true, message: '请选择客户类型', trigger: ['blur', 'change'] },
  353. ],
  354. visaNumber: [
  355. { required: true, message: '请输入办理人数', trigger: ['blur', 'change'] },
  356. { pattern: /^[0-9]\d*$/, message: '请输入正确的数字', trigger: ['blur', 'change'] },
  357. ],
  358. visaFreeNumber: [
  359. { required: true, message: '请输入办理人数', trigger: ['blur', 'change'] },
  360. { pattern: /^[0-9]\d*$/, message: '请输入正确的数字', trigger: ['blur', 'change'] },
  361. ],
  362. payDId: [
  363. { required: true, message: '请选择支付方式', trigger: ['blur', 'change'] },
  364. ],
  365. consumptionPatterns: [
  366. { required: true, message: '请输入消费方式', trigger: ['blur', 'change'] },
  367. ],
  368. consumptionDate: [
  369. { required: true, message: '请选择消费日期', trigger: ['blur', 'change'] },
  370. ],
  371. payee: [
  372. { required: true, message: '请输入收款方', trigger: ['blur', 'change'] },
  373. ],
  374. ctdId: [
  375. { required: true, message: '请选择卡类型', trigger: ['blur', 'change'] },
  376. ],
  377. companyBankNo: [{ required: true, message: '公司银行账号', trigger: ['blur', 'change'] },],
  378. otherBankName: [{ required: true, message: '对方开户行', trigger: ['blur', 'change'] },],
  379. otherSideNo: [{ required: true, message: '对方银行卡号', trigger: ['blur', 'change'] },],
  380. totherSideName: [{ required: true, message: '对方姓名', trigger: ['blur', 'change'] },],
  381. }
  382. }
  383. },
  384. methods: {
  385. //初始化下拉框
  386. initializeSelect() {
  387. //团组下拉框绑定
  388. var url = "/api/Groups/DecreasePaymentsSelect"
  389. var that = this
  390. this.$axios({
  391. method: 'post',
  392. url: url,
  393. headers: {
  394. Authorization: 'Bearer ' + this.token
  395. },
  396. data: {
  397. userId: that.userId,
  398. ctId: 80
  399. }
  400. }).then(function (res) {
  401. if (res.data.code == 200) {
  402. that.delegationInfoList = res.data.data.groupName;
  403. that.payment = res.data.data.payment
  404. for (let index = 0; index < that.delegationInfoList.length; index++) {
  405. if (that.delegationInfoList[index].id == that.OpVisaPriceData.diId) {
  406. that.delegationInfo = that.delegationInfoList[index];
  407. that.VisitDate = that.transformDateFormat(that.delegationInfo.visitStartDate) + '至' + that.transformDateFormat(that.delegationInfo.visitEndDate);
  408. break;
  409. }
  410. }
  411. }
  412. })
  413. var url = "/api/Groups/VisaPriceAddSelect"
  414. this.$axios({
  415. method: 'post',
  416. url: url,
  417. headers: {
  418. Authorization: 'Bearer ' + this.token
  419. },
  420. }).then(function (res) {
  421. if (res.data.code == 200) {
  422. that.bankCard = res.data.data.bankCard;
  423. that.payment = res.data.data.payment;
  424. that.currencyList = res.data.data.currencyList;
  425. that.passengerTypeSelect = res.data.data.passengerType;
  426. }
  427. })
  428. },
  429. DiIdSelectChange() {
  430. var that = this;
  431. for (let index = 0; index < that.delegationInfoList.length; index++) {
  432. if (that.delegationInfoList[index].id == that.OpVisaPriceData.diId) {
  433. that.delegationInfo = that.delegationInfoList[index];
  434. that.VisitDate = that.transformDateFormat(that.delegationInfo.visitStartDate) + '至' + that.transformDateFormat(that.delegationInfo.visitEndDate);
  435. that.QueryClientInfoByDIID()
  436. break;
  437. }
  438. }
  439. },
  440. payChange() {
  441. this.OpVisaPriceData.ctdId = '';
  442. this.OpVisaPriceData.bankNo = '';
  443. this.OpVisaPriceData.cardholderName = '';
  444. this.OpVisaPriceData.companyBankNo = '';
  445. this.OpVisaPriceData.otherBankName = '';
  446. this.OpVisaPriceData.otherSideNo = '';
  447. this.OpVisaPriceData.otherSideName = '';
  448. this.OpVisaPriceData.cRemark = '';
  449. if (this.OpVisaPriceData.payDId == 73) {
  450. this.OpVisaPriceDataRules.companyBankNo = [{ required: true, message: '公司银行账号', trigger: ['blur', 'change'] },]
  451. this.OpVisaPriceDataRules.otherBankName = [{ required: true, message: '对方开户行', trigger: ['blur', 'change'] },]
  452. this.OpVisaPriceDataRules.otherSideNo = [{ required: true, message: '对方银行卡号', trigger: ['blur', 'change'] },]
  453. this.OpVisaPriceDataRules.otherSideName = [{ required: true, message: '对方姓名', trigger: ['blur', 'change'] },]
  454. this.OpVisaPriceDataRules.ctdId = []
  455. } else if (this.OpVisaPriceData.payDId == 72) {
  456. this.OpVisaPriceDataRules.ctdId = [{ required: true, message: '请选择卡类型', trigger: ['blur', 'change'] },]
  457. this.OpVisaPriceDataRules.companyBankNo = []
  458. this.OpVisaPriceDataRules.otherBankName = []
  459. this.OpVisaPriceDataRules.otherSideNo = []
  460. this.OpVisaPriceDataRules.otherSideName = []
  461. } else if (this.OpVisaPriceData.payDId == 83) {
  462. this.OpVisaPriceDataRules.companyBankNo = []
  463. this.OpVisaPriceDataRules.otherBankName = [{ required: true, message: '对方开户行', trigger: ['blur', 'change'] },]
  464. this.OpVisaPriceDataRules.otherSideNo = [{ required: true, message: '对方银行卡号', trigger: ['blur', 'change'] },]
  465. this.OpVisaPriceDataRules.otherSideName = [{ required: true, message: '对方姓名', trigger: ['blur', 'change'] },]
  466. this.OpVisaPriceDataRules.ctdId = []
  467. } else {
  468. this.OpVisaPriceDataRules.companyBankNo = []
  469. this.OpVisaPriceDataRules.otherBankName = []
  470. this.OpVisaPriceDataRules.otherSideNo = []
  471. this.OpVisaPriceDataRules.otherSideName = []
  472. this.OpVisaPriceDataRules.ctdId = []
  473. }
  474. },
  475. ctdChange(id) {
  476. this.OpVisaPriceData.cardholderName = 'Zhang Hailin';
  477. for (var i = 0; i < this.bankCard.length; i++) {
  478. if (this.bankCard[i].id == parseInt(id)) {
  479. this.OpVisaPriceData.bankNo = this.bankCard[i].remark
  480. }
  481. }
  482. },
  483. //选择客户名单
  484. clientNamechange(val){
  485. this.OpVisaPriceData.visaNumber=val.length;
  486. console.log(this.ClientFormat(this.OpVisaPriceData.visaClient))
  487. },
  488. //获取团组客户名单
  489. QueryClientInfoByDIID() {
  490. var url = "/api/Groups/QueryClientInfoByDIID"
  491. var that = this
  492. this.$axios({
  493. method: 'post',
  494. url: url,
  495. headers: {
  496. Authorization: 'Bearer ' + this.token
  497. },
  498. data: {
  499. diid: that.OpVisaPriceData.diId
  500. }
  501. }).then(function (res) {
  502. console.log(res);
  503. if (res.data.code == 200) {
  504. that.fliterClient=res.data.data;
  505. }
  506. })
  507. },
  508. //根据Id获取单挑数据及C表数据
  509. QueryVisaById() {
  510. var url = "/api/Groups/QueryVisaById"
  511. var that = this
  512. this.$axios({
  513. method: 'post',
  514. url: url,
  515. headers: {
  516. Authorization: 'Bearer ' + this.token
  517. },
  518. data: {
  519. id: that.OpVisaPriceData.id
  520. }
  521. }).then(function (res) {
  522. if (res.data.code == 200) {
  523. var CreditCardPayment = res.data.data.creditCardPayment;
  524. var VisaInfo = res.data.data.visaInfo;
  525. that.IsAuditGM = CreditCardPayment.isAuditGM;
  526. that.OpVisaPriceData.visaClient = that.ClientFormat(VisaInfo.visaClient);
  527. that.OpVisaPriceData.visaPrice = VisaInfo.visaPrice;
  528. that.OpVisaPriceData.visaCurrency = VisaInfo.visaCurrency;
  529. that.OpVisaPriceData.isThird = VisaInfo.isThird;
  530. that.OpVisaPriceData.passengerType = parseInt(VisaInfo.passengerType);
  531. that.OpVisaPriceData.visaNumber = VisaInfo.visaNumber;
  532. that.OpVisaPriceData.visaFreeNumber = VisaInfo.visaFreeNumber;
  533. that.OpVisaPriceData.createUserId = VisaInfo.createUserId;
  534. that.OpVisaPriceData.remark = VisaInfo.remark;
  535. that.OpVisaPriceData.payDId = CreditCardPayment.payDId;
  536. that.OpVisaPriceData.consumptionPatterns = CreditCardPayment.consumptionPatterns;
  537. that.OpVisaPriceData.consumptionDate = CreditCardPayment.consumptionDate;
  538. that.OpVisaPriceData.ctdId = CreditCardPayment.ctdId;
  539. that.OpVisaPriceData.bankNo = CreditCardPayment.bankNo;
  540. that.OpVisaPriceData.cardholderName = CreditCardPayment.cardholderName;
  541. that.OpVisaPriceData.companyBankNo = CreditCardPayment.companyBankNo
  542. that.OpVisaPriceData.otherBankName = CreditCardPayment.otherBankName
  543. that.OpVisaPriceData.otherSideNo = CreditCardPayment.otherSideNo
  544. that.OpVisaPriceData.otherSideName = CreditCardPayment.otherSideName
  545. that.OpVisaPriceData.payee = CreditCardPayment.payee;
  546. that.OpVisaPriceData.orbitalPrivateTransfer = CreditCardPayment.orbitalPrivateTransfer;
  547. that.OpVisaPriceData.cRemark = CreditCardPayment.remark;
  548. }
  549. })
  550. },
  551. //验证人数W
  552. verifytoll(){
  553. console.log(Number(this.OpVisaPriceData.visaNumber)+Number(this.OpVisaPriceData.visaFreeNumber)>this.OpVisaPriceData.visaClient.length)
  554. if(Number(this.OpVisaPriceData.visaNumber)+Number(this.OpVisaPriceData.visaFreeNumber)>this.OpVisaPriceData.visaClient.length){
  555. this.$message.error("请检查人数");
  556. return
  557. }else{
  558. this.OpVisaPriceData.visaClient=this.ClientFormat(this.OpVisaPriceData.visaClient);
  559. }
  560. },
  561. addBtn() {
  562. if (this.IsAuditGM == 1) {
  563. this.$message.error('已通过审核,不可修改!');
  564. } else {
  565. if (this.OpVisaPriceData.diId == null && this.OpVisaPriceData.diId == undefined && this.OpVisaPriceData.diId == "") {
  566. this.$message.error("请选择团组名称");
  567. return;
  568. } else {
  569. const that = this;
  570. that.$refs.OpVisaPriceData.validate((valid) => {
  571. if (valid) {
  572. debugger
  573. that.OpVisaPriceData.createUserId = that.userId;
  574. if (that.OpVisaPriceData.ctdId == '') {
  575. that.OpVisaPriceData.ctdId = 0
  576. }
  577. that.verifytoll()
  578. var url = "/api/Groups/OpVisaPrice"
  579. that.$axios({
  580. method: 'post',
  581. url: url,
  582. headers: {
  583. Authorization: 'Bearer ' + that.token
  584. },
  585. data: that.OpVisaPriceData
  586. }).then(function (res) {
  587. if (res.data.code == 200) {
  588. that.$message({
  589. message: res.data.msg,
  590. type: 'success'
  591. });
  592. that.loading = true;
  593. setTimeout(() => {
  594. that.$router.push({
  595. path: "/home/VisaPriec",
  596. query: {
  597. diId: that.OpVisaPriceData.diId
  598. }
  599. })
  600. }, 3000);
  601. } else {
  602. that.$message.error(res.data.msg);
  603. }
  604. })
  605. } else {
  606. this.$message.error('请完善信息在保存!');
  607. return false;
  608. }
  609. })
  610. }
  611. }
  612. },
  613. EscAdd() {
  614. this.$router.push({
  615. path: "/home/VisaPriec",
  616. query: {
  617. diId: this.OpVisaPriceData.diId
  618. }
  619. })
  620. },
  621. //处理名单
  622. ClientFormat(val) {
  623. var result = [];
  624. if (typeof val == "string") {
  625. if (val.indexOf(',') != -1) {
  626. result = val.split(',').map(x => { return Number(x) }).filter(f => f > 0)
  627. } else {
  628. var clientId = Number(val);
  629. if (clientId > 0) {
  630. result = [clientId]
  631. }
  632. }
  633. } else if (Array.isArray(val)) {
  634. if (val.length > 0) {
  635. result = val.join();
  636. }
  637. } else {
  638. result = val;
  639. }
  640. return result;
  641. }
  642. },
  643. mounted() {
  644. this.token = JSON.parse(localStorage.getItem('userinif')).token;
  645. this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId;
  646. this.initializeSelect();
  647. this.OpVisaPriceData.diId = parseInt(this.$route.query.DiId);
  648. this.OpVisaPriceData.id = this.$route.query.id;
  649. this.QueryClientInfoByDIID()
  650. if (this.OpVisaPriceData.id != null && this.OpVisaPriceData.id != undefined && this.OpVisaPriceData.id != 0) {
  651. this.QueryVisaById();
  652. this.title = "修改签证费用";
  653. this.OpVisaPriceData.status = 2;
  654. this.isShow = true;
  655. } else {
  656. this.OpVisaPriceData.status = 1;
  657. this.title = "新增签证费用";
  658. this.isShow = false;
  659. }
  660. }
  661. }
  662. </script>
  663. <style>
  664. .communal-list {
  665. background-color: #fff;
  666. padding: 10px;
  667. box-shadow: 0 0 5px #0005;
  668. border-radius: 10px;
  669. }
  670. .car_add .communal-title {
  671. display: flex;
  672. font-size: 17px;
  673. font-weight: 600;
  674. color: #555;
  675. margin-bottom: 20px;
  676. justify-content: space-between;
  677. align-items: center;
  678. }
  679. .appraise-box {
  680. display: flex;
  681. flex-wrap: wrap;
  682. justify-content: space-between;
  683. margin: 50px 0;
  684. }
  685. .appraise-box>div {
  686. width: 30%;
  687. }
  688. .communal-box {
  689. display: flex;
  690. }
  691. .communal-box>button {
  692. margin-left: 10px;
  693. padding: 8px 20px;
  694. }
  695. .car_add {
  696. background-color: #fff;
  697. padding: 20px;
  698. box-shadow: 0 0 5px #0005;
  699. border-radius: 10px;
  700. }
  701. @media screen and (max-width: 1700px) {
  702. .appraise-box>div {
  703. width: 48%;
  704. }
  705. .appraise-box>div el-form-item__content {
  706. width: 260px !important;
  707. }
  708. }
  709. </style>