carCaptainAuthentication.vue 28 KB

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