carCaptainAuthentication.vue 28 KB

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