carCaptainAuthentication.vue 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031
  1. <template>
  2. <view class="content">
  3. <view class="top-head"></view>
  4. <view class="container">
  5. <view class="content2 content-other">
  6. <view class="title">上传身份证人像面</view>
  7. <view @click.stop="uploadImg(1,1)" class="picture picture1" v-if="!dataDetails.cardAddressUrl">
  8. <image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
  9. <view class="text">上传身份证人像面</view>
  10. </view>
  11. <view v-if="dataDetails.cardAddressUrl" @click.stop="uploadImg(1,1)" class="preview-card-img picture">
  12. <view @click.stop="delCard(1)">
  13. <image class='del-card' src="@/static/images/common/quxiao@2x.png">
  14. </image>
  15. </view>
  16. <image class="" :src="dataDetails.cardAddressUrl" mode="aspectFit" style=""></image>
  17. </view>
  18. <view class="title">上传身份证国徽面</view>
  19. <view @click="uploadImg(2,2)" class="picture picture2" v-if="!dataDetails.cardBackAddressUrl">
  20. <image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
  21. <view class="text">上传身份证国徽面</view>
  22. </view>
  23. <view v-if="dataDetails.cardBackAddressUrl" @click.stop="uploadImg(2,2)"
  24. class="preview-card-img picture">
  25. <view @click.stop="delCard(2)">
  26. <image class='del-card' src="@/static/images/common/quxiao@2x.png">
  27. </image>
  28. </view>
  29. <image class="" :src="dataDetails.cardBackAddressUrl" mode="aspectFit" style=""></image>
  30. </view>
  31. <view class="flex row">
  32. <view class="left-text">姓名</view>
  33. <u--input placeholder="输入姓名" inputAlign='right' border="none" v-model="dataDetails.name">
  34. </u--input>
  35. </view>
  36. <view class="flex row">
  37. <view class="left-text">身份证号</view>
  38. <u--input disabled placeholder="请输入身份证号" inputAlign='right' border="none"
  39. v-model="dataDetails.idCard" maxlength="18">
  40. </u--input>
  41. </view>
  42. <view class="flex row flex-space-between">
  43. <view class="left-text">身份证有效期</view>
  44. <!-- <view class="" @click="selectValidityPeriod(1)">
  45. {{dataDetails.cardValidityStartDate?dataDetails.cardValidityStartDate:"选择身份证起始日期>"}}
  46. {{dataDetails.cardValidityEndDate?dataDetails.cardValidityEndDate:'选择身份证截止日期>'}}
  47. </view> -->
  48. <view style='font-size:14px;' class="" @click="selectValidityPeriod(3)">
  49. {{dataDetails.cardValidityStartDate?dataDetails.cardValidityStartDate:'起始时间'}}
  50. </view>
  51. <view>~</view>
  52. <view style='font-size:14px;' class="" @click="selectValidityPeriod(1)">
  53. {{dataDetails.cardValidityEndDate?dataDetails.cardValidityEndDate:'结束时间'}}
  54. </view>
  55. </view>
  56. </view>
  57. <!-- v-for="(item,index) in dataDetails.hyDriverPayeeInfoList" :key='index' -->
  58. <view class="content3 flex s-row">
  59. <!-- <view class="flex">
  60. 银行卡-{{index+1}}
  61. </view> -->
  62. <!-- <view class="">
  63. <image class='del-bank' src="@/static/images/common/quxiao@2x.png">
  64. </image>
  65. </view> -->
  66. <view class="title">上传银行卡卡号页</view>
  67. <view @click="uploadImg(3,0)" class="picture picture3" v-if="!dataDetails.payeeAddressUrl">
  68. <image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
  69. <view class="text">上传银行卡卡号页</view>
  70. </view>
  71. <view v-if="dataDetails.payeeAddressUrl" @click.stop="uploadImg(3,0)" class="preview-card-img picture">
  72. <!-- <image class="card-img" :src="dataDetails.cardAddressUrl"></image> -->
  73. <view @click.stop="delCard(3)">
  74. <image class='del-card' src="@/static/images/common/quxiao@2x.png">
  75. </image>
  76. </view>
  77. <image class="" :src="dataDetails.payeeAddressUrl" mode="aspectFit"></image>
  78. </view>
  79. <view class="flex row flex-space-between">
  80. <view class="left-text">银行卡卡号</view>
  81. <view class="flex">
  82. <u--input placeholder="输入银行卡号码" inputAlign='right' border="none" v-model="dataDetails.bankCard"
  83. maxlength="19">
  84. </u--input>
  85. </view>
  86. </view>
  87. <view class="flex row">
  88. <view class="left-text">开户行</view>
  89. <u--input placeholder="输入开户行" inputAlign='right' border="none" v-model="dataDetails.bankDeposit">
  90. </u--input>
  91. </view>
  92. <view class="flex row">
  93. <view class="left-text khzh-styel">开户支行</view>
  94. <view class="flex" v-if="isShowManualInput">
  95. <u--input class="select-bankzh" placeholder="输入开户支行" inputAlign='right' border="none"
  96. v-model="dataDetails.bankDepositBranch">
  97. </u--input>
  98. <view @click="manualInput" class="type">选择支行</view>
  99. </view>
  100. <view class="flex align-center" v-if="!isShowManualInput">
  101. <view :style="{'color':dataDetails.bankDepositBranch?'#000':'#C6CBD5'}"
  102. style='font-size:15px;text-align:right;' class="select-bankzh point" @click="selectZhbank">
  103. {{dataDetails.bankDepositBranch?dataDetails.bankDepositBranch:'选择开户支行'}}
  104. </view>
  105. <view @click="manualInput" class="type">手动输入</view>
  106. </view>
  107. </view>
  108. <view class="flex row flex-space-between">
  109. <view class="left-text">收款人</view>
  110. <view class="flex">
  111. <u--input placeholder="自动获取,不可编辑" inputAlign='right' border="none"
  112. v-model="dataDetails.payeeName" readonly>
  113. </u--input>
  114. </view>
  115. </view>
  116. <u-picker :show="isShowBank" :columns="bankType[0]" :closeOnClickOverlay='true' @close='zhBankClose'
  117. @cancel='zhBankClose' @confirm='confirmBank'></u-picker>
  118. </u-picker>
  119. </view>
  120. <view class="content3 flex s-row">
  121. <view class="title">道路运输许可证</view>
  122. <view @click="uploadImg(4)" class="picture picture8" v-if="!dataDetails.roadTransportOperationLicense">
  123. <image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
  124. <view class="text">上传道路运输许可证</view>
  125. </view>
  126. <view v-if="dataDetails.roadTransportOperationLicense" @click.stop="uploadImg(4)"
  127. class="preview-card-img picture">
  128. <view @click.stop="delCard(4)">
  129. <image class='del-card' src="@/static/images/common/quxiao@2x.png">
  130. </image>
  131. </view>
  132. <image class="" :src="dataDetails.roadTransportOperationLicense" mode="aspectFit"></image>
  133. </view>
  134. <view class="flex row">
  135. <view class="left-text">许可证编号</view>
  136. <u--input maxlength='20' placeholder="输入许可证编号" inputAlign='right' border="none"
  137. v-model="dataDetails.roadTransportOperationLicenseNo">
  138. </u--input>
  139. </view>
  140. <view class="flex row flex-space-between">
  141. <view class="left-text">许可证有效期</view>
  142. <view class="" @click="selectValidityPeriod(2)">
  143. <view
  144. :style="{'color':dataDetails.roadTransportOperationLicenseValidityDate?'#000':'rgb(192, 196, 204)'}">
  145. {{dataDetails.roadTransportOperationLicenseValidityDate?dataDetails.roadTransportOperationLicenseValidityDate:'选择有效期'}}
  146. <image v-if='!dataDetails.roadTransportOperationLicenseValidityDate'
  147. style='width:12px;height:12px;' src="../../../static/right.png" mode=""></image>
  148. </view>
  149. </view>
  150. </view>
  151. </view>
  152. <u-picker :show="isShowcardValidity" ref="uPicker" :columns="validityPeriod"
  153. @confirm="confirmValidityPeriod" @change="changeHandler" @cancel='isShowcardValidity= false'>
  154. </u-picker>
  155. <itmister-date-picker :overdueContent="'身份证已过期'" :dateStatus="status" :periodOfValidity="true"
  156. :checkYear="year" :checkMonth="month" :checkDay="day" ref="dateEl" :startYear="1999" :futureYear="30"
  157. @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
  158. <itmister-date-picker :overdueContent="'许可证已过期'" :dateStatus="status" :periodOfValidity="true"
  159. :checkYear="year" :checkMonth="month" :checkDay="day" ref="dateEl1" :startYear="1999" :futureYear="30"
  160. @dateConfirm="confirmValidityPeriod1"></itmister-date-picker>
  161. <itmister-date-picker :dateStatus="0" :checkYear="year" :checkMonth="month" :checkDay="day" ref="dateEl2"
  162. :startYear="1980" :futureYear="30" @dateConfirm="confirmValidityPeriod2">
  163. </itmister-date-picker>
  164. <u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
  165. @select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true"
  166. @close="isShowimgType=false">
  167. </u-action-sheet>
  168. <u-toast ref="uToast"></u-toast>
  169. </view>
  170. <u-modal :show="auditShow" :title="alertTitle" :closeOnClickOverlay='true' :showCancelButton='true'
  171. confirmColor='#2772FB' @confirm="confirmClick" @close="cancelClick" @cancel="cancelClick"></u-modal>
  172. <u-toast ref="uToast"></u-toast>
  173. <view class="content4">
  174. <view class="next-btn" @click="next()">提交</view>
  175. </view>
  176. </view>
  177. </template>
  178. <script>
  179. import upload from '@/components/upload.vue';
  180. import permision from "@/js_sdk/wa-permission/permission.js"
  181. import uploadImage from '@/components/ossutil/uploadFile.js';
  182. var _this
  183. import {
  184. mapState
  185. } from 'vuex';
  186. export default {
  187. components: {
  188. upload
  189. },
  190. data() {
  191. return {
  192. status: 1,
  193. seconds: 30,
  194. year: '',
  195. month: '',
  196. day: '',
  197. validityPeriod: [],
  198. isShowcardValidity: false,
  199. uploadType: '',
  200. isShowimgType: false,
  201. dataDetails: {
  202. commonId: '',
  203. name: '',
  204. idCard: '',
  205. cardAddressUrl: '',
  206. cardBackAddressUrl: '',
  207. cardValidityEndDate: '',
  208. roadTransportOperationLicense: '',
  209. roadTransportOperationLicenseValidityDate: "",
  210. },
  211. action: this.$helper.ossUploadUrl,
  212. // maxSize: 50 * 1024 * 1024, //限制文件大小 50M
  213. // isAdd: true,
  214. imagesrc: null,
  215. isShowBank: false,
  216. isShowManualInput: false,
  217. bankType: [],
  218. auditShow: false,
  219. alertTitle: "",
  220. checkType:"",
  221. };
  222. },
  223. onLoad(options) {
  224. _this = this;
  225. this.get_camera_permission()
  226. if (options.data) { //编辑
  227. this.dataDetails = JSON.parse(options.data)
  228. this.checkType = "2" //编辑
  229. } else {
  230. //获取认证状态
  231. this.getAuthenticationStatus()
  232. this.dataDetails.commonId = this.userInfo.id
  233. this.checkType = "1" //新增
  234. }
  235. },
  236. computed: {
  237. ...mapState(['hasLogin', 'userInfo']),
  238. },
  239. methods: {
  240. cancelClick() {
  241. this.auditShow = false
  242. },
  243. next() {
  244. if (this.validate()) return
  245. this.alertTitle = "确定提交认证信息?"
  246. this.auditShow = true
  247. },
  248. confirmBank(e) {
  249. this.dataDetails.hyDriverPayeeInfoList[this.index].bankDepositBranch = e.value[0]
  250. this.isShowBank = false
  251. },
  252. zhBankClose() {
  253. this.isShowBank = false
  254. },
  255. // 选择支行
  256. selectZhbank() {
  257. if (uni.$u.test.isEmpty(this.bankType[this.index])) {
  258. this.$refs.uToast.show({
  259. type: 'error',
  260. message: "请选择手动输入!",
  261. })
  262. return true
  263. }
  264. this.isShowBank = true
  265. },
  266. manualInput(val) {
  267. this.index = val
  268. if (this.isShowManualInput) {
  269. if (!this.dataDetails.payeeAddressUrl) {
  270. this.$refs.uToast.show({
  271. type: 'error',
  272. message: "请先上传银行卡!",
  273. })
  274. return true
  275. } else if (this.dataDetails.payeeAddressUrl && uni.$u.test.isEmpty(
  276. this.bankType[0])) {
  277. this.$refs.uToast.show({
  278. type: 'error',
  279. message: "请选择手动输入开户支行!",
  280. })
  281. return true
  282. }
  283. this.isShowBank = true
  284. } else {
  285. this.isShowBank = false
  286. }
  287. this.isShowManualInput = !this.isShowManualInput
  288. },
  289. async get_camera_permission() {
  290. var photol = await permision.requestAndroidPermission("android.permission.CAMERA")
  291. if (photol == false) {
  292. uni.showModal({
  293. title: '提示',
  294. content: '您已经关闭相册权限,去设置',
  295. success: function(res) {
  296. if (res.confirm) {
  297. permision.gotoAppPermissionSetting()
  298. // plus.runtime.openURL("app-settings:");
  299. } else if (res.cancel) {
  300. console.log('用户点击取消');
  301. }
  302. }
  303. });
  304. }
  305. },
  306. changeHandler(e) {
  307. const {
  308. columnIndex,
  309. value,
  310. values,
  311. index,
  312. picker = this.$refs.uPicker
  313. } = e
  314. // if (columnIndex === 0) {
  315. // if (e.index != 0) {
  316. // picker.setColumnValues(1, this.validityPeriod[1].shift())
  317. // }
  318. // } else if (columnIndex === 1) {
  319. // if (e.index != 0) {
  320. // picker.setColumnValues(2, this.validityPeriod[2].shift())
  321. // }
  322. // }
  323. },
  324. getCode() {
  325. if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.dataDetails.driverPhone)) {
  326. if (this.$refs.uCode.canGetCode) {
  327. // 模拟向后端请求验证码
  328. uni.showLoading({
  329. title: '正在获取验证码'
  330. })
  331. _this.$request.baseRequest('get', '/commonUser/sendVerifyCode', {
  332. phone: this.dataDetails.driverPhone
  333. }).then(res => {
  334. uni.hideLoading();
  335. // 这里此提示会被this.start()方法中的提示覆盖
  336. uni.$u.toast('验证码已发送');
  337. // 通知验证码组件内部开始倒计时
  338. this.$refs.uCode.start();
  339. })
  340. .catch(res => {
  341. uni.$u.toast(res.message);
  342. });
  343. // setTimeout(() => {
  344. // }, 2000);
  345. } else {
  346. uni.$u.toast('倒计时结束后再发送');
  347. }
  348. } else {
  349. uni.$u.toast('请输入正确手机号');
  350. }
  351. },
  352. end() {
  353. // uni.$u.toast('倒计时结束');
  354. },
  355. start() {
  356. // uni.$u.toast('倒计时开始');
  357. },
  358. //判断是否是初次认证
  359. getAuthenticationStatus() {
  360. this.$request.baseRequest('', '/driverInfo/firstAuthentication', {
  361. driverPhone: this.userInfo.phone,
  362. }).then(res => {
  363. if (res.code == 200) {
  364. // this.dataDetails = res.data
  365. if( res.data.authenticationStatus !="未认证"){
  366. this.dataDetails.accountNumber = res.data.accountNumber
  367. this.dataDetails.cardAddressUrl = res.data.cardAddressUrl
  368. this.dataDetails.cardBackAddressUrl = res.data.cardBackAddressUrl
  369. this.dataDetails.name = res.data.driverName
  370. this.dataDetails.idCard = res.data.numberCard
  371. this.dataDetails.cardValidityStartDate = res.data.cardValidityStartDate
  372. this.dataDetails.cardValidityEndDate = res.data.cardValidityDate
  373. this.dataDetails.payeeAddressUrl = res.data.hyDriverPayeeInfoList[0].payeeAddressUrl
  374. this.dataDetails.bankCard = res.data.hyDriverPayeeInfoList[0].bankCard
  375. this.dataDetails.bankDeposit = res.data.hyDriverPayeeInfoList[0].bankDeposit
  376. this.dataDetails.bankDepositBranch = res.data.hyDriverPayeeInfoList[0].bankDepositBranch
  377. this.dataDetails.payeeName = res.data.hyDriverPayeeInfoList[0].payeeName
  378. }
  379. }
  380. })
  381. .catch(res => {
  382. uni.$u.toast(res.message);
  383. });
  384. },
  385. confirmValidityPeriod(date) {
  386. this.dataDetails.cardValidityEndDate = date.date
  387. },
  388. confirmValidityPeriod1(date) {
  389. this.dataDetails.roadTransportOperationLicenseValidityDate = date.date
  390. this.$forceUpdate()
  391. },
  392. confirmValidityPeriod2(date) {
  393. this.dataDetails.cardValidityStartDate = date.date
  394. this.$forceUpdate()
  395. },
  396. selectValidityPeriod(num) {
  397. if (num == 1) {
  398. if (this.dataDetails.cardValidityEndDate && this.dataDetails.cardValidityEndDate != '长期') {
  399. var arr = this.dataDetails.cardValidityEndDate.split('-')
  400. this.year = arr[0]
  401. this.month = arr[1]
  402. this.day = arr[2]
  403. }
  404. if (this.dataDetails.cardValidityEndDate == '长期') {
  405. this.year = '长期'
  406. this.month = ''
  407. this.day = ''
  408. }
  409. this.$refs.dateEl.show()
  410. } else if (num == 2) {
  411. this.$refs.dateEl1.show()
  412. } else if (num == 3) {
  413. this.$refs.dateEl2.show()
  414. }
  415. },
  416. //设置图片
  417. setImage(e) {
  418. console.log(e);
  419. //显示在页面
  420. //this.imagesrc = e.path;
  421. if (e.dotype == 'idphoto') {
  422. _this.zjzClipper(e.path);
  423. } else if (e.dotype == 'watermark') {
  424. _this.watermark(e.path);
  425. } else {
  426. _this.savePhoto(e.path);
  427. }
  428. },
  429. //保存图片到相册,方便核查
  430. savePhoto(path) {
  431. this.imagesrc = path;
  432. // this.dataDetails.cardAddressUrl = path
  433. uploadImage(path, 'appData/',
  434. result => {
  435. // 上传成功
  436. console.log('图片地址', result)
  437. this.dataDetails.cardAddressUrl = result
  438. }
  439. )
  440. },
  441. uploadImg(type, index) {
  442. this.uploadType = type
  443. // this.isShowimgType = true
  444. this.index = index
  445. this.imgTypeSelect()
  446. },
  447. delCard(type) {
  448. var _this = this
  449. switch (type) {
  450. case 1:
  451. _this.dataDetails.cardAddressUrl = ""
  452. break;
  453. case 2:
  454. _this.dataDetails.cardBackAddressUrl = ""
  455. break;
  456. case 3:
  457. _this.dataDetails.payeeAddressUrl = ""
  458. _this.dataDetails.bankCard = ""
  459. _this.dataDetails.bankDeposit = ""
  460. _this.dataDetails.bankDepositBranch = ""
  461. _this.$forceUpdate()
  462. break;
  463. case 4:
  464. _this.dataDetails.roadTransportOperationLicense = ""
  465. break;
  466. }
  467. },
  468. // 上传图片
  469. imgTypeSelect() {
  470. // console.log(val)
  471. console.log(this.uploadType)
  472. // if (val.name == '相册') {
  473. uni.chooseImage({
  474. count: 1,
  475. // sourceType: this.$helper.chooseImage.sourceType,
  476. success: function(res) {
  477. console.log(JSON.stringify(res.tempFilePaths));
  478. uploadImage('image', res.tempFilePaths[0], 'appData/',
  479. result => {
  480. // 上传成功回调函数
  481. console.log('图片地址', result)
  482. switch (_this.uploadType) {
  483. // 身份正面
  484. case 1:
  485. _this.dataDetails.cardAddressUrl = result
  486. // 识别
  487. _this.$request.baseRequest('get',
  488. '/driverInfo/personShibie', {
  489. personImg: result,
  490. flag: 1
  491. }).then(res => {
  492. if (res.data) {
  493. _this.dataDetails.cardAddress = res.data
  494. .recPersonAddr
  495. _this.dataDetails.idCard = res.data.recPersonNo
  496. if (res.data.recPerson) {
  497. _this.dataDetails.name = res.data
  498. .recPerson
  499. // _this.dataDetails.driverCall = res.data
  500. // .recPerson.substring(0, 1)
  501. }
  502. _this.dataDetails.driverBirthday = res.data
  503. .recPersonBrithday
  504. }
  505. })
  506. .catch(res => {
  507. uni.$u.toast(res.message);
  508. });
  509. break
  510. // 身份反面
  511. case 2:
  512. _this.dataDetails.cardBackAddressUrl = result
  513. // 识别
  514. _this.$request.baseRequest('get',
  515. '/driverInfo/personShibie', {
  516. personImg: result,
  517. flag: 2
  518. }).then(res => {
  519. if (res.data.idCardValidity) {
  520. let date = res.data.idCardValidity.split("-")[1]
  521. _this.dataDetails.cardValidityEndDate = date
  522. .replace(
  523. '.', '-').replace('.', '-')
  524. }
  525. })
  526. .catch(res => {
  527. uni.$u.toast(res.message);
  528. });
  529. break
  530. case 3:
  531. _this.bankType[_this.index] = []
  532. _this.$request.baseRequest('get',
  533. '/driverInfo/bankShibie', {
  534. bankImg: result,
  535. }).then(res => {
  536. _this.dataDetails.hyDriverPayeeInfoList[_this.index]
  537. .payeeAddressUrl = result
  538. if (res.data) {
  539. if (res.data.bankNo) {
  540. _this.dataDetails.hyDriverPayeeInfoList[_this
  541. .index].bankCard = res.data.bankNo
  542. .replace(/\s*/g, "")
  543. }
  544. if (res.data.bankName) {
  545. _this.dataDetails.hyDriverPayeeInfoList[_this
  546. .index].bankDeposit = res.data.bankName
  547. }
  548. // 开户支行LIst
  549. if (res.data.bankNameZhihang) {
  550. _this.bankType[_this.index].push(res.data
  551. .bankNameZhihang)
  552. }
  553. }
  554. _this.$forceUpdate()
  555. })
  556. .catch(res => {
  557. uni.$u.toast(res.message);
  558. });
  559. break;
  560. case 4:
  561. _this.dataDetails.roadTransportOperationLicense = result
  562. _this.$forceUpdate()
  563. break;
  564. }
  565. }
  566. )
  567. }
  568. });
  569. },
  570. confirmClick(val) {
  571. this.auditShow = false
  572. uni.showLoading({
  573. mask: true,
  574. title: '加载中'
  575. })
  576. if (this.checkType == 1) {
  577. this.$request.baseRequest('post', '/hyCarCaptainInfo/api/addCarCaptain', this.dataDetails).then(
  578. res => {
  579. if (res.code == 200) {
  580. uni.hideLoading()
  581. this.$refs.uToast.show({
  582. type: 'success',
  583. message: "提交成功,待平台审核!",
  584. complete() {
  585. uni.navigateBack({
  586. delta: 1
  587. });
  588. }
  589. })
  590. // uni.$u.route('/pages/mine/index');
  591. } else {
  592. uni.hideLoading()
  593. uni.$u.toast(res.message);
  594. }
  595. }).catch(res => {
  596. uni.$u.toast(res.message);
  597. });
  598. } else if (this.checkType == 2) {
  599. this.$request.baseRequest('post', '/hyCarCaptainInfo/api/editCarCaptain', this.dataDetails).then(
  600. res => {
  601. if (res.code == 200) {
  602. uni.hideLoading()
  603. this.$refs.uToast.show({
  604. type: 'success',
  605. message: "修改成功,待平台审核!",
  606. complete() {
  607. uni.navigateBack({
  608. delta: 1
  609. });
  610. }
  611. })
  612. } else {
  613. uni.hideLoading()
  614. uni.$u.toast(res.message);
  615. }
  616. }).catch(res => {
  617. uni.$u.toast(res.message);
  618. });
  619. }
  620. },
  621. validate() {
  622. // true 为校验不通过
  623. if (uni.$u.test.isEmpty(this.dataDetails.cardAddressUrl)) {
  624. this.$refs.uToast.show({
  625. type: 'error',
  626. message: "身份证人像页不能为空!",
  627. })
  628. return true
  629. }
  630. if (uni.$u.test.isEmpty(this.dataDetails.cardBackAddressUrl)) {
  631. this.$refs.uToast.show({
  632. type: 'error',
  633. message: "身份证国徽页不能为空!",
  634. })
  635. return true
  636. }
  637. if (uni.$u.test.isEmpty(this.dataDetails.name)) {
  638. this.$refs.uToast.show({
  639. type: 'error',
  640. message: "姓名不能为空!",
  641. })
  642. return true
  643. }
  644. if (uni.$u.test.isEmpty(this.dataDetails.idCard)) {
  645. this.$refs.uToast.show({
  646. type: 'error',
  647. message: "身份证号不能为空!",
  648. })
  649. return true
  650. }
  651. if (uni.$u.test.isEmpty(this.dataDetails.cardValidityStartDate)) {
  652. this.$refs.uToast.show({
  653. type: 'error',
  654. message: "身份证起始日期不能为空!",
  655. })
  656. return true
  657. }
  658. if (uni.$u.test.isEmpty(this.dataDetails.cardValidityEndDate)) {
  659. this.$refs.uToast.show({
  660. type: 'error',
  661. message: "身份证截止日期不能为空!",
  662. })
  663. return true
  664. }
  665. if (uni.$u.test.isEmpty(this.dataDetails.payeeAddressUrl)) {
  666. this.$refs.uToast.show({
  667. type: 'error',
  668. message: "请上传银行卡卡号页!",
  669. })
  670. return true
  671. }
  672. if (uni.$u.test.isEmpty(this.dataDetails.bankCard)) {
  673. this.$refs.uToast.show({
  674. type: 'error',
  675. message: "银行卡卡号不能为空!",
  676. })
  677. return true
  678. }
  679. if (uni.$u.test.isEmpty(this.dataDetails.bankDeposit)) {
  680. this.$refs.uToast.show({
  681. type: 'error',
  682. message: "开户行不能为空!",
  683. })
  684. return true
  685. }
  686. if (uni.$u.test.isEmpty(this.dataDetails.bankDepositBranch)) {
  687. this.$refs.uToast.show({
  688. type: 'error',
  689. message: "开户支行不能为空!",
  690. })
  691. return true
  692. }
  693. if (uni.$u.test.isEmpty(this.dataDetails.payeeName)) {
  694. this.$refs.uToast.show({
  695. type: 'error',
  696. message: "收款人不能为空!",
  697. })
  698. return true
  699. }
  700. if (uni.$u.test.isEmpty(this.dataDetails.roadTransportOperationLicense)) {
  701. this.$refs.uToast.show({
  702. type: 'error',
  703. message: "道路运输许可证不能为空!",
  704. })
  705. return true
  706. }
  707. if (uni.$u.test.isEmpty(this.dataDetails.roadTransportOperationLicenseNo)) {
  708. this.$refs.uToast.show({
  709. type: 'error',
  710. message: "许可证编号不能为空!",
  711. })
  712. return true
  713. }
  714. if (uni.$u.test.isEmpty(this.dataDetails.roadTransportOperationLicenseValidityDate)) {
  715. this.$refs.uToast.show({
  716. type: 'error',
  717. message: "许可证有效期不能为空!",
  718. })
  719. return true
  720. }
  721. return false
  722. }
  723. },
  724. };
  725. </script>
  726. <style scoped lang="scss">
  727. /deep/.u-radio {
  728. margin-bottom: 0 !important;
  729. }
  730. .top-head {
  731. background: #2772FB;
  732. height: 80rpx;
  733. width: 100%;
  734. }
  735. .container {
  736. position: relative;
  737. top: -60rpx;
  738. margin: 0 20rpx;
  739. }
  740. .row4-img {
  741. width: 32rpx;
  742. height: 32rpx;
  743. }
  744. .content1,
  745. .content2,
  746. .content3 {
  747. .left-text {
  748. width: 290rpx;
  749. color: #333333;
  750. display: flex;
  751. align-items: center;
  752. }
  753. .row {
  754. border-bottom: 1px solid #EEEEEE;
  755. padding-bottom: 28rpx;
  756. margin-top: 26rpx;
  757. .ch-style {}
  758. }
  759. .row-ch {
  760. padding-right: 180rpx;
  761. box-sizing: border-box;
  762. }
  763. }
  764. .content1-car {
  765. margin-top: 20rpx;
  766. .left-text {
  767. width: 290rpx;
  768. color: #333333;
  769. display: flex;
  770. align-items: center;
  771. }
  772. .row {
  773. border-bottom: 1px solid #EEEEEE;
  774. padding-bottom: 28rpx;
  775. margin-top: 26rpx;
  776. .color {
  777. // background: blue;
  778. width: 340rpx;
  779. }
  780. }
  781. }
  782. .input-ckg {
  783. height: 86rpx;
  784. margin-top: 0 !important;
  785. padding-bottom: 0 !important;
  786. .u-input {
  787. height: 100%;
  788. background: #F7F8FA;
  789. padding-left: 10rpx !important;
  790. padding-right: 85rpx !important;
  791. }
  792. .star {
  793. display: flex;
  794. align-items: center;
  795. margin: 0 10rpx;
  796. }
  797. .input-positon {
  798. position: relative;
  799. }
  800. .position-right {
  801. position: absolute;
  802. right: 20rpx;
  803. top: 0;
  804. width: 60rpx;
  805. height: 50rpx;
  806. bottom: 0;
  807. margin: auto;
  808. }
  809. }
  810. .picture {
  811. margin-top: 20rpx;
  812. background: #F5F6FA;
  813. width: 212rpx;
  814. height: 212rpx;
  815. border-radius: 20rpx;
  816. display: flex;
  817. flex-direction: column;
  818. justify-content: center;
  819. align-items: center;
  820. color: #6A7282;
  821. }
  822. .add-car {
  823. background: #FFFFFF;
  824. margin: 20rpx 50rpx;
  825. border-radius: 50rpx;
  826. display: flex;
  827. justify-content: center;
  828. align-items: center;
  829. padding: 20rpx 0;
  830. .icon {
  831. margin-right: 20rpx;
  832. }
  833. .car-text {
  834. font-size: 36rpx;
  835. font-weight: 700;
  836. color: #2772FB;
  837. }
  838. }
  839. .carlist-item {
  840. margin-top: 20rpx;
  841. padding: 0 20rpx 20rpx 20rpx;
  842. background: white;
  843. border-radius: 10rpx;
  844. position: relative;
  845. .del-car {
  846. position: absolute;
  847. top: 0;
  848. right: 0;
  849. width: 80rpx;
  850. height: 80rpx;
  851. }
  852. }
  853. .content2,
  854. .content3 {
  855. .del-bank {
  856. position: absolute;
  857. top: 0;
  858. right: 0;
  859. width: 80rpx;
  860. height: 80rpx;
  861. }
  862. .picture {
  863. width: 100%;
  864. height: 440rpx;
  865. position: relative;
  866. .text {
  867. margin-top: 20rpx;
  868. }
  869. }
  870. .picture1 {
  871. background: url(../../../static/images/mine/zm.png);
  872. background-size: 100% 100%;
  873. }
  874. .picture2 {
  875. background: url(../../../static/images/mine/gh.png);
  876. background-size: 100% 100%;
  877. }
  878. .picture3 {
  879. background: url(../../../static/images/mine/yhkzm.png);
  880. background-size: 100% 100%;
  881. }
  882. .xj-image {
  883. width: 100rpx;
  884. height: 100rpx;
  885. }
  886. .title {
  887. color: #999999;
  888. margin: 20rpx 0;
  889. }
  890. }
  891. .content3 {
  892. position: relative;
  893. background: white;
  894. margin: 20rpx 0 0 0;
  895. border-radius: 10rpx;
  896. padding: 20rpx;
  897. .khzh-styel {
  898. // width: 350rpx;
  899. }
  900. .type {
  901. background: #2772FB;
  902. border-radius: 10rpx;
  903. color: white;
  904. box-sizing: border-box;
  905. padding: 4rpx 10rpx;
  906. font-size: 26rpx;
  907. display: flex;
  908. justify-content: center;
  909. align-items: center;
  910. }
  911. .select-bankzh {
  912. width: 230rpx;
  913. height: 48rpx;
  914. }
  915. }
  916. .content4 {
  917. display: flex;
  918. justify-content: center;
  919. background: white;
  920. padding: 40rpx 20rpx 50rpx 20rpx;
  921. .next-btn {
  922. background: rgb(39, 114, 251);
  923. width: 90%;
  924. padding: 20rpx 20rpx;
  925. text-align: center;
  926. color: #fff;
  927. border-radius: 50rpx;
  928. }
  929. }
  930. .yzm {}
  931. .yzm-btn {
  932. background: #2772FB;
  933. color: white;
  934. height: 60rpx;
  935. }
  936. .preview-card-img {
  937. // /deep/uni-image>div,
  938. // uni-image>img {
  939. // transform: scale(1.5) rotate(-90deg);
  940. // }
  941. }
  942. .del-card {
  943. position: absolute;
  944. top: -10rpx;
  945. right: -6rpx;
  946. width: 80rpx;
  947. height: 80rpx;
  948. z-index: 9;
  949. }
  950. /deep/.u-radio {
  951. margin-left: 10px;
  952. }
  953. /deep/.uni-input-input:disabled {
  954. background: #fff;
  955. }
  956. /deep/.u-radio-group--row {
  957. justify-content: flex-end;
  958. }
  959. /deep/.u-textarea {
  960. padding: 9px 0;
  961. }
  962. /deep/.u-textarea__field {
  963. color: #000;
  964. text-align: right;
  965. }
  966. </style>