carCaptainAuthentication.vue 25 KB

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