carCaptainAuthentication.vue 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033
  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]
  377. .bankDepositBranch
  378. this.dataDetails.payeeName = res.data.hyDriverPayeeInfoList[0].payeeName
  379. }
  380. }
  381. })
  382. .catch(res => {
  383. uni.$u.toast(res.message);
  384. });
  385. },
  386. confirmValidityPeriod(date) {
  387. this.dataDetails.cardValidityEndDate = date.date
  388. },
  389. confirmValidityPeriod1(date) {
  390. this.dataDetails.roadTransportOperationLicenseValidityDate = date.date
  391. this.$forceUpdate()
  392. },
  393. confirmValidityPeriod2(date) {
  394. this.dataDetails.cardValidityStartDate = date.date
  395. this.$forceUpdate()
  396. },
  397. selectValidityPeriod(num) {
  398. if (num == 1) {
  399. if (this.dataDetails.cardValidityEndDate && this.dataDetails.cardValidityEndDate != '长期') {
  400. var arr = this.dataDetails.cardValidityEndDate.split('-')
  401. this.year = arr[0]
  402. this.month = arr[1]
  403. this.day = arr[2]
  404. }
  405. if (this.dataDetails.cardValidityEndDate == '长期') {
  406. this.year = '长期'
  407. this.month = ''
  408. this.day = ''
  409. }
  410. this.$refs.dateEl.show()
  411. } else if (num == 2) {
  412. this.$refs.dateEl1.show()
  413. } else if (num == 3) {
  414. this.$refs.dateEl2.show()
  415. }
  416. },
  417. //设置图片
  418. setImage(e) {
  419. console.log(e);
  420. //显示在页面
  421. //this.imagesrc = e.path;
  422. if (e.dotype == 'idphoto') {
  423. _this.zjzClipper(e.path);
  424. } else if (e.dotype == 'watermark') {
  425. _this.watermark(e.path);
  426. } else {
  427. _this.savePhoto(e.path);
  428. }
  429. },
  430. //保存图片到相册,方便核查
  431. savePhoto(path) {
  432. this.imagesrc = path;
  433. // this.dataDetails.cardAddressUrl = path
  434. uploadImage(path, 'appData/',
  435. result => {
  436. // 上传成功
  437. console.log('图片地址', result)
  438. this.dataDetails.cardAddressUrl = result
  439. }
  440. )
  441. },
  442. uploadImg(type, index) {
  443. this.uploadType = type
  444. // this.isShowimgType = true
  445. this.index = index
  446. this.imgTypeSelect()
  447. },
  448. delCard(type) {
  449. var _this = this
  450. switch (type) {
  451. case 1:
  452. _this.dataDetails.cardAddressUrl = ""
  453. break;
  454. case 2:
  455. _this.dataDetails.cardBackAddressUrl = ""
  456. break;
  457. case 3:
  458. _this.dataDetails.payeeAddressUrl = ""
  459. _this.dataDetails.bankCard = ""
  460. _this.dataDetails.bankDeposit = ""
  461. _this.dataDetails.bankDepositBranch = ""
  462. _this.$forceUpdate()
  463. break;
  464. case 4:
  465. _this.dataDetails.roadTransportOperationLicense = ""
  466. break;
  467. }
  468. },
  469. // 上传图片
  470. imgTypeSelect() {
  471. // console.log(val)
  472. console.log(this.uploadType)
  473. // if (val.name == '相册') {
  474. uni.chooseImage({
  475. count: 1,
  476. sizeType: ['compressed'],
  477. // sourceType: this.$helper.chooseImage.sourceType,
  478. success: function(res) {
  479. console.log(JSON.stringify(res.tempFilePaths));
  480. uploadImage('image', res.tempFilePaths[0], 'appData/',
  481. result => {
  482. // 上传成功回调函数
  483. console.log('图片地址', result)
  484. switch (_this.uploadType) {
  485. // 身份正面
  486. case 1:
  487. _this.dataDetails.cardAddressUrl = result
  488. // 识别
  489. _this.$request.baseRequest('get',
  490. '/driverInfo/personShibie', {
  491. personImg: result,
  492. flag: 1
  493. }).then(res => {
  494. if (res.data) {
  495. _this.dataDetails.cardAddress = res.data
  496. .recPersonAddr
  497. _this.dataDetails.idCard = res.data.recPersonNo
  498. if (res.data.recPerson) {
  499. _this.dataDetails.name = res.data
  500. .recPerson
  501. // _this.dataDetails.driverCall = res.data
  502. // .recPerson.substring(0, 1)
  503. }
  504. _this.dataDetails.driverBirthday = res.data
  505. .recPersonBrithday
  506. }
  507. })
  508. .catch(res => {
  509. uni.$u.toast(res.message);
  510. });
  511. break
  512. // 身份反面
  513. case 2:
  514. _this.dataDetails.cardBackAddressUrl = result
  515. // 识别
  516. _this.$request.baseRequest('get',
  517. '/driverInfo/personShibie', {
  518. personImg: result,
  519. flag: 2
  520. }).then(res => {
  521. if (res.data.idCardValidity) {
  522. let date = res.data.idCardValidity.split("-")[1]
  523. _this.dataDetails.cardValidityEndDate = date
  524. .replace(
  525. '.', '-').replace('.', '-')
  526. }
  527. })
  528. .catch(res => {
  529. uni.$u.toast(res.message);
  530. });
  531. break
  532. case 3:
  533. _this.bankType[_this.index] = []
  534. _this.$request.baseRequest('get',
  535. '/driverInfo/bankShibie', {
  536. bankImg: result,
  537. }).then(res => {
  538. _this.dataDetails.hyDriverPayeeInfoList[_this.index]
  539. .payeeAddressUrl = result
  540. if (res.data) {
  541. if (res.data.bankNo) {
  542. _this.dataDetails.hyDriverPayeeInfoList[_this
  543. .index].bankCard = res.data.bankNo
  544. .replace(/\s*/g, "")
  545. }
  546. if (res.data.bankName) {
  547. _this.dataDetails.hyDriverPayeeInfoList[_this
  548. .index].bankDeposit = res.data.bankName
  549. }
  550. // 开户支行LIst
  551. if (res.data.bankNameZhihang) {
  552. _this.bankType[_this.index].push(res.data
  553. .bankNameZhihang)
  554. }
  555. }
  556. _this.$forceUpdate()
  557. })
  558. .catch(res => {
  559. uni.$u.toast(res.message);
  560. });
  561. break;
  562. case 4:
  563. _this.dataDetails.roadTransportOperationLicense = result
  564. _this.$forceUpdate()
  565. break;
  566. }
  567. }
  568. )
  569. }
  570. });
  571. },
  572. confirmClick(val) {
  573. this.auditShow = false
  574. uni.showLoading({
  575. mask: true,
  576. title: '加载中'
  577. })
  578. if (this.checkType == 1) {
  579. this.$request.baseRequest('post', '/hyCarCaptainInfo/api/addCarCaptain', this.dataDetails).then(
  580. res => {
  581. if (res.code == 200) {
  582. uni.hideLoading()
  583. this.$refs.uToast.show({
  584. type: 'success',
  585. message: "提交成功,待平台审核!",
  586. complete() {
  587. uni.navigateBack({
  588. delta: 1
  589. });
  590. }
  591. })
  592. // uni.$u.route('/pages/mine/index');
  593. } else {
  594. uni.hideLoading()
  595. uni.$u.toast(res.message);
  596. }
  597. }).catch(res => {
  598. uni.$u.toast(res.message);
  599. });
  600. } else if (this.checkType == 2) {
  601. this.$request.baseRequest('post', '/hyCarCaptainInfo/api/editCarCaptain', this.dataDetails).then(
  602. res => {
  603. if (res.code == 200) {
  604. uni.hideLoading()
  605. this.$refs.uToast.show({
  606. type: 'success',
  607. message: "修改成功,待平台审核!",
  608. complete() {
  609. uni.navigateBack({
  610. delta: 1
  611. });
  612. }
  613. })
  614. } else {
  615. uni.hideLoading()
  616. uni.$u.toast(res.message);
  617. }
  618. }).catch(res => {
  619. uni.$u.toast(res.message);
  620. });
  621. }
  622. },
  623. validate() {
  624. // true 为校验不通过
  625. if (uni.$u.test.isEmpty(this.dataDetails.cardAddressUrl)) {
  626. this.$refs.uToast.show({
  627. type: 'error',
  628. message: "身份证人像页不能为空!",
  629. })
  630. return true
  631. }
  632. if (uni.$u.test.isEmpty(this.dataDetails.cardBackAddressUrl)) {
  633. this.$refs.uToast.show({
  634. type: 'error',
  635. message: "身份证国徽页不能为空!",
  636. })
  637. return true
  638. }
  639. if (uni.$u.test.isEmpty(this.dataDetails.name)) {
  640. this.$refs.uToast.show({
  641. type: 'error',
  642. message: "姓名不能为空!",
  643. })
  644. return true
  645. }
  646. if (uni.$u.test.isEmpty(this.dataDetails.idCard)) {
  647. this.$refs.uToast.show({
  648. type: 'error',
  649. message: "身份证号不能为空!",
  650. })
  651. return true
  652. }
  653. if (uni.$u.test.isEmpty(this.dataDetails.cardValidityStartDate)) {
  654. this.$refs.uToast.show({
  655. type: 'error',
  656. message: "身份证起始日期不能为空!",
  657. })
  658. return true
  659. }
  660. if (uni.$u.test.isEmpty(this.dataDetails.cardValidityEndDate)) {
  661. this.$refs.uToast.show({
  662. type: 'error',
  663. message: "身份证截止日期不能为空!",
  664. })
  665. return true
  666. }
  667. if (uni.$u.test.isEmpty(this.dataDetails.payeeAddressUrl)) {
  668. this.$refs.uToast.show({
  669. type: 'error',
  670. message: "请上传银行卡卡号页!",
  671. })
  672. return true
  673. }
  674. if (uni.$u.test.isEmpty(this.dataDetails.bankCard)) {
  675. this.$refs.uToast.show({
  676. type: 'error',
  677. message: "银行卡卡号不能为空!",
  678. })
  679. return true
  680. }
  681. if (uni.$u.test.isEmpty(this.dataDetails.bankDeposit)) {
  682. this.$refs.uToast.show({
  683. type: 'error',
  684. message: "开户行不能为空!",
  685. })
  686. return true
  687. }
  688. if (uni.$u.test.isEmpty(this.dataDetails.bankDepositBranch)) {
  689. this.$refs.uToast.show({
  690. type: 'error',
  691. message: "开户支行不能为空!",
  692. })
  693. return true
  694. }
  695. if (uni.$u.test.isEmpty(this.dataDetails.payeeName)) {
  696. this.$refs.uToast.show({
  697. type: 'error',
  698. message: "收款人不能为空!",
  699. })
  700. return true
  701. }
  702. if (uni.$u.test.isEmpty(this.dataDetails.roadTransportOperationLicense)) {
  703. this.$refs.uToast.show({
  704. type: 'error',
  705. message: "道路运输许可证不能为空!",
  706. })
  707. return true
  708. }
  709. if (uni.$u.test.isEmpty(this.dataDetails.roadTransportOperationLicenseNo)) {
  710. this.$refs.uToast.show({
  711. type: 'error',
  712. message: "许可证编号不能为空!",
  713. })
  714. return true
  715. }
  716. if (uni.$u.test.isEmpty(this.dataDetails.roadTransportOperationLicenseValidityDate)) {
  717. this.$refs.uToast.show({
  718. type: 'error',
  719. message: "许可证有效期不能为空!",
  720. })
  721. return true
  722. }
  723. return false
  724. }
  725. },
  726. };
  727. </script>
  728. <style scoped lang="scss">
  729. /deep/.u-radio {
  730. margin-bottom: 0 !important;
  731. }
  732. .top-head {
  733. background: #2772FB;
  734. height: 80rpx;
  735. width: 100%;
  736. }
  737. .container {
  738. position: relative;
  739. top: -60rpx;
  740. margin: 0 20rpx;
  741. }
  742. .row4-img {
  743. width: 32rpx;
  744. height: 32rpx;
  745. }
  746. .content1,
  747. .content2,
  748. .content3 {
  749. .left-text {
  750. width: 290rpx;
  751. color: #333333;
  752. display: flex;
  753. align-items: center;
  754. }
  755. .row {
  756. border-bottom: 1px solid #EEEEEE;
  757. padding-bottom: 28rpx;
  758. margin-top: 26rpx;
  759. .ch-style {}
  760. }
  761. .row-ch {
  762. padding-right: 180rpx;
  763. box-sizing: border-box;
  764. }
  765. }
  766. .content1-car {
  767. margin-top: 20rpx;
  768. .left-text {
  769. width: 290rpx;
  770. color: #333333;
  771. display: flex;
  772. align-items: center;
  773. }
  774. .row {
  775. border-bottom: 1px solid #EEEEEE;
  776. padding-bottom: 28rpx;
  777. margin-top: 26rpx;
  778. .color {
  779. // background: blue;
  780. width: 340rpx;
  781. }
  782. }
  783. }
  784. .input-ckg {
  785. height: 86rpx;
  786. margin-top: 0 !important;
  787. padding-bottom: 0 !important;
  788. .u-input {
  789. height: 100%;
  790. background: #F7F8FA;
  791. padding-left: 10rpx !important;
  792. padding-right: 85rpx !important;
  793. }
  794. .star {
  795. display: flex;
  796. align-items: center;
  797. margin: 0 10rpx;
  798. }
  799. .input-positon {
  800. position: relative;
  801. }
  802. .position-right {
  803. position: absolute;
  804. right: 20rpx;
  805. top: 0;
  806. width: 60rpx;
  807. height: 50rpx;
  808. bottom: 0;
  809. margin: auto;
  810. }
  811. }
  812. .picture {
  813. margin-top: 20rpx;
  814. background: #F5F6FA;
  815. width: 212rpx;
  816. height: 212rpx;
  817. border-radius: 20rpx;
  818. display: flex;
  819. flex-direction: column;
  820. justify-content: center;
  821. align-items: center;
  822. color: #6A7282;
  823. }
  824. .add-car {
  825. background: #FFFFFF;
  826. margin: 20rpx 50rpx;
  827. border-radius: 50rpx;
  828. display: flex;
  829. justify-content: center;
  830. align-items: center;
  831. padding: 20rpx 0;
  832. .icon {
  833. margin-right: 20rpx;
  834. }
  835. .car-text {
  836. font-size: 36rpx;
  837. font-weight: 700;
  838. color: #2772FB;
  839. }
  840. }
  841. .carlist-item {
  842. margin-top: 20rpx;
  843. padding: 0 20rpx 20rpx 20rpx;
  844. background: white;
  845. border-radius: 10rpx;
  846. position: relative;
  847. .del-car {
  848. position: absolute;
  849. top: 0;
  850. right: 0;
  851. width: 80rpx;
  852. height: 80rpx;
  853. }
  854. }
  855. .content2,
  856. .content3 {
  857. .del-bank {
  858. position: absolute;
  859. top: 0;
  860. right: 0;
  861. width: 80rpx;
  862. height: 80rpx;
  863. }
  864. .picture {
  865. width: 100%;
  866. height: 440rpx;
  867. position: relative;
  868. .text {
  869. margin-top: 20rpx;
  870. }
  871. }
  872. .picture1 {
  873. background: url(../../../static/images/mine/zm.png);
  874. background-size: 100% 100%;
  875. }
  876. .picture2 {
  877. background: url(../../../static/images/mine/gh.png);
  878. background-size: 100% 100%;
  879. }
  880. .picture3 {
  881. background: url(../../../static/images/mine/yhkzm.png);
  882. background-size: 100% 100%;
  883. }
  884. .xj-image {
  885. width: 100rpx;
  886. height: 100rpx;
  887. }
  888. .title {
  889. color: #999999;
  890. margin: 20rpx 0;
  891. }
  892. }
  893. .content3 {
  894. position: relative;
  895. background: white;
  896. margin: 20rpx 0 0 0;
  897. border-radius: 10rpx;
  898. padding: 20rpx;
  899. .khzh-styel {
  900. // width: 350rpx;
  901. }
  902. .type {
  903. background: #2772FB;
  904. border-radius: 10rpx;
  905. color: white;
  906. box-sizing: border-box;
  907. padding: 4rpx 10rpx;
  908. font-size: 26rpx;
  909. display: flex;
  910. justify-content: center;
  911. align-items: center;
  912. }
  913. .select-bankzh {
  914. width: 230rpx;
  915. height: 48rpx;
  916. }
  917. }
  918. .content4 {
  919. display: flex;
  920. justify-content: center;
  921. background: white;
  922. padding: 40rpx 20rpx 50rpx 20rpx;
  923. .next-btn {
  924. background: rgb(39, 114, 251);
  925. width: 90%;
  926. padding: 20rpx 20rpx;
  927. text-align: center;
  928. color: #fff;
  929. border-radius: 50rpx;
  930. }
  931. }
  932. .yzm {}
  933. .yzm-btn {
  934. background: #2772FB;
  935. color: white;
  936. height: 60rpx;
  937. }
  938. .preview-card-img {
  939. // /deep/uni-image>div,
  940. // uni-image>img {
  941. // transform: scale(1.5) rotate(-90deg);
  942. // }
  943. }
  944. .del-card {
  945. position: absolute;
  946. top: -10rpx;
  947. right: -6rpx;
  948. width: 80rpx;
  949. height: 80rpx;
  950. z-index: 9;
  951. }
  952. /deep/.u-radio {
  953. margin-left: 10px;
  954. }
  955. /deep/.uni-input-input:disabled {
  956. background: #fff;
  957. }
  958. /deep/.u-radio-group--row {
  959. justify-content: flex-end;
  960. }
  961. /deep/.u-textarea {
  962. padding: 9px 0;
  963. }
  964. /deep/.u-textarea__field {
  965. color: #000;
  966. text-align: right;
  967. }
  968. </style>