driverCertificationNext.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812
  1. <template>
  2. <view class="content">
  3. <view class="top-head"></view>
  4. <view class="container">
  5. <u-radio-group v-model="radiovalue" iconPlacement="row" class='radio-group'>
  6. <u-radio :customStyle="{marginBottom: '8px',marginRight:'4px'}" v-for="(item, index) in radiolist" :key="index"
  7. :label="item.name" :name="item.name" @change="radioChange">
  8. </u-radio>
  9. </u-radio-group>
  10. <view class="level1-title">证件信息</view>
  11. <view class="content1">
  12. <view class="title">上传驾驶证主页</view>
  13. <view @click="uploadImg(1)" class="picture picture1" v-if="!dataDetails.driverLicenseHomePage">
  14. <image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
  15. <view class="text">上传驾驶证主页</view>
  16. </view>
  17. <view v-if="dataDetails.driverLicenseHomePage" @click.stop="uploadImg(1)"
  18. class="preview-card-img picture">
  19. <view @click.stop="delCard(1)">
  20. <image class='del-card' src="@/static/images/common/quxiao@2x.png">
  21. </image>
  22. </view>
  23. <image class="" :src="dataDetails.driverLicenseHomePage" mode="aspectFit"></image>
  24. </view>
  25. <view class="title">上传驾驶证副页</view>
  26. <view @click="uploadImg(2)" class="picture picture2" v-if="!dataDetails.driverLicenseBackPage">
  27. <image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
  28. <view class="text">上传驾驶证副页</view>
  29. </view>
  30. <view v-if="dataDetails.driverLicenseBackPage" @click.stop="uploadImg(2)"
  31. class="preview-card-img picture">
  32. <view @click.stop="delCard(2)">
  33. <image class='del-card' src="@/static/images/common/quxiao@2x.png">
  34. </image>
  35. </view>
  36. <image class="" :src="dataDetails.driverLicenseBackPage" mode="aspectFit"></image>
  37. </view>
  38. <view class="flex row flex-space-between">
  39. <view class="left-text">驾驶证有效期</view>
  40. <!-- <view class="" @click="selectValidityPeriod(0)">
  41. {{dataDetails.driverLicenseValidityDate?dataDetails.driverLicenseValidityDate:'选择有效截止日期>'}}
  42. </view> -->
  43. <view style='font-size:12px;' class="" @click="selectValidityPeriod(0)">
  44. {{dataDetails.driverLicenseValidityStartDate?dataDetails.driverLicenseValidityStartDate:'起始时间'}}
  45. </view>
  46. <view>~</view>
  47. <view style='font-size:12px;' class="" @click="selectValidityPeriod(9)">
  48. {{dataDetails.driverLicenseValidityDate?dataDetails.driverLicenseValidityDate:'结束时间'}}
  49. </view>
  50. </view>
  51. <view class="flex row flex-space-between">
  52. <view class="left-text">准驾车型</view>
  53. <view class="" @click="driveType">
  54. {{dataDetails.quasiDrivingVehicle?dataDetails.quasiDrivingVehicle:'选择准驾车型>'}}
  55. </view>
  56. </view>
  57. <view class="flex row noborder">
  58. <view class="left-text">驾驶证发证机关</view>
  59. <u--input placeholder="请输入驾驶证发证机关" inputAlign='right' border="none" v-model="dataDetails.lssuingAuthority" >
  60. </u--input>
  61. </view>
  62. <view class="title">从业资格证</view>
  63. <view @click="uploadImg(7)" class="picture picture7" v-if="!dataDetails.qualificationCertificate">
  64. <image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
  65. <view class="text">上传从业资格证</view>
  66. </view>
  67. <view v-if="dataDetails.qualificationCertificate" @click.stop="uploadImg(7)"
  68. class="preview-card-img picture">
  69. <view @click.stop="delCard(7)">
  70. <image class='del-card' src="@/static/images/common/quxiao@2x.png">
  71. </image>
  72. </view>
  73. <image class="" :src="dataDetails.qualificationCertificate" mode="aspectFit"></image>
  74. </view>
  75. <view class="flex row flex-space-between">
  76. <view class="left-text">从业资格证有效期</view>
  77. <view></view>
  78. <view class="" @click="selectValidityPeriod(3)">
  79. {{dataDetails.qualificationCertificateValidityDate?dataDetails.qualificationCertificateValidityDate:'选择有效期>'}}
  80. </view>
  81. </view>
  82. <view class="flex row ">
  83. <view class="left-text">从业资格证号</view>
  84. <u--input maxlength='30' placeholder="请输入从业资格证号" inputAlign='right' border="none" v-model="dataDetails.qualificationCertificateNumber">
  85. </u--input>
  86. </view>
  87. <view class="flex row ">
  88. <view class="left-text">道路运输经营许可证号</view>
  89. <u--input maxlength='30' placeholder="请输入道路运输经营许可证号" inputAlign='right' border="none" v-model="dataDetails.actualCarrierBusinessLicense">
  90. </u--input>
  91. </view>
  92. <view class="flex row noborder">
  93. <view class="left-text">通讯地址</view>
  94. <u--textarea v-model="dataDetails.postalAddress" border="none" placeholder="输入通讯地址" autoHeight maxlength="30"></u--textarea>
  95. <!-- <u--input placeholder="输入通讯地址" inputAlign='right' border="none" v-model="dataDetails.postalAddress"></u--input> -->
  96. </view>
  97. </view>
  98. <view class="flex service align-center">
  99. <u--image @click='consent'
  100. :src="consentStatus==true?'../../static/images/mine/duihao@2x.png':'../../static/images/mine/wxz.png'"
  101. width="12px" height="12px"></u--image>
  102. 我已阅读并同意
  103. <navigator
  104. url="/pages/sale/webview?can_share=false&url=https://liangxin.zthymaoyi.com/userAgreement.html"
  105. class="path" hover-class="navigator-hover">《服务协议》</navigator>和<navigator
  106. url="/pages/sale/webview?can_share=false&url=https://liangxin.zthymaoyi.com/screctAgreement.html"
  107. class="path" hover-class="navigator-hover">《隐私政策》</navigator>
  108. </view>
  109. <u-button type="primary" @click="btnBClick">提交</u-button>
  110. <u-toast ref="uToast"></u-toast>
  111. <u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
  112. @select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true"
  113. @close="isShowimgType=false">
  114. </u-action-sheet>
  115. <!-- <u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
  116. :closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
  117. </u-picker> -->
  118. <itmister-date-picker :dateStatus="0"
  119. ref="datestartEl" :startYear="1980" :futureYear="10"
  120. @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
  121. <itmister-date-picker :overdueContent="overdueContent" :dateStatus="status"
  122. :periodOfValidity="true"
  123. ref="dateEl" :startYear="1980" :futureYear="10"
  124. @dateConfirm="confirmValidityPeriod"></itmister-date-picker>
  125. <u-picker :show="isShowDrive" ref="uPicker" :columns="driveList" @confirm="confirmDriveType"
  126. :closeOnClickOverlay='true' @close='isShowDrive=false' @cancel='isShowDrive=false'>
  127. </u-picker>
  128. </view>
  129. </view>
  130. </template>
  131. <script>
  132. import uploadImage from '@/components/ossutil/uploadFile.js';
  133. import permision from "@/js_sdk/wa-permission/permission.js"
  134. var _this;
  135. export default {
  136. components: {},
  137. data() {
  138. return {
  139. consentStatus: false,
  140. isGCar: true,
  141. ValidityPeriodType: '',
  142. isShowValidity: false,
  143. isShowDrive:false,
  144. driveList:[["A2","B2"]],
  145. overdueContent:'',
  146. uploadType: '',
  147. status:1,
  148. isShowimgType: false,
  149. dataDetails: {},
  150. radiolist: [{
  151. name: '挂车司机',
  152. disabled: false
  153. },
  154. {
  155. name: '非挂车司机',
  156. disabled: false
  157. }
  158. ],
  159. // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
  160. radiovalue: '挂车司机',
  161. };
  162. },
  163. onLoad(options) {
  164. _this = this;
  165. console.log(options)
  166. this.get_camera_permission()
  167. if(options.data){
  168. this.dataDetails = JSON.parse(options.data)
  169. this.dataDetails.driverType = 1
  170. }
  171. },
  172. methods: {
  173. async get_camera_permission() {
  174. var photol=await permision.requestAndroidPermission("android.permission.CAMERA")
  175. if(photol == false){
  176. uni.showModal({
  177. title: '提示',
  178. content: '您已经关闭相册权限,去设置',
  179. success: function (res) {
  180. if (res.confirm) {
  181. permision.gotoAppPermissionSetting()
  182. // plus.runtime.openURL("app-settings:");
  183. } else if (res.cancel) {
  184. console.log('用户点击取消');
  185. }
  186. }
  187. });
  188. }
  189. },
  190. delCard(type) {
  191. switch (type) {
  192. case 1:
  193. _this.dataDetails.driverLicenseHomePage = ""
  194. break;
  195. case 2:
  196. _this.dataDetails.driverLicenseBackPage = ""
  197. break;
  198. case 3:
  199. _this.dataDetails.drivingLicenseHomePage = ""
  200. break;
  201. case 4:
  202. _this.dataDetails.drivingLicenseBackPage = ""
  203. break;
  204. case 5:
  205. _this.dataDetails.trailerLicenseHomePage = ""
  206. break;
  207. case 6:
  208. _this.dataDetails.trailerLicenseBackPage = ""
  209. break;
  210. case 7:
  211. _this.dataDetails.qualificationCertificate = ""
  212. break;
  213. case 8:
  214. _this.dataDetails.operationCertificate = ""
  215. break;
  216. case 9:
  217. _this.dataDetails.trailerOperationCertificate = ""
  218. break;
  219. }
  220. },
  221. consent() {
  222. this.consentStatus = !this.consentStatus
  223. // uni.setStorage({
  224. // key: 'policyStorageKey',
  225. // data: this.consentStatus
  226. // });
  227. },
  228. validate(data) {},
  229. confirmValidityPeriod(date) {
  230. console.log('confirm', date)
  231. switch (this.ValidityPeriodType) {
  232. case 0:
  233. this.dataDetails.driverLicenseValidityStartDate = date.date
  234. break
  235. case 1:
  236. this.dataDetails.drivingLicenseValidityDate = date.date
  237. break
  238. case 2:
  239. this.dataDetails.trailerLicenseValidityDate = date.date
  240. break
  241. case 3:
  242. this.dataDetails.qualificationCertificateValidityDate = date.date
  243. break
  244. case 4:
  245. this.dataDetails.operationCertificateValidityDate = date.date
  246. break
  247. case 5:
  248. this.dataDetails.trailerOperationCertificateValidityDate = date.date
  249. break
  250. case 9:
  251. this.dataDetails.driverLicenseValidityDate = date.date
  252. break
  253. }
  254. this.$forceUpdate()
  255. },
  256. selectValidityPeriod(type) {
  257. this.ValidityPeriodType = type
  258. if(type==0){
  259. this.$refs.datestartEl.show()
  260. }else{
  261. switch (this.ValidityPeriodType) {
  262. case 3:
  263. this.status=0
  264. this.overdueContent='从业资格证已过期'
  265. break
  266. case 9:
  267. this.overdueContent='驾驶证已过期'
  268. break
  269. }
  270. this.$refs.dateEl.show()
  271. }
  272. },
  273. driveType(){
  274. this.isShowDrive = true
  275. },
  276. confirmDriveType(e){
  277. this.dataDetails.quasiDrivingVehicle = e.value[0]
  278. this.isShowDrive = false
  279. },
  280. // 上传图片
  281. imgTypeSelect(val) {
  282. // console.log(val)
  283. console.log(this.uploadType)
  284. // if (val.name == '相册') {
  285. uni.chooseImage({
  286. count: 1,
  287. // sourceType: this.$helper.chooseImage.sourceType,
  288. success: function(res) {
  289. console.log(JSON.stringify(res.tempFilePaths));
  290. uploadImage("images",res.tempFilePaths[0], 'appData/',
  291. result => {
  292. // 上传成功回调函数
  293. console.log('图片地址-----', result)
  294. switch (_this.uploadType) {
  295. case 1:
  296. _this.dataDetails.driverLicenseHomePage = result
  297. _this.$request.baseRequest('get',
  298. '/driverInfo/api/driverLicenseShibie', {
  299. image: result
  300. }).then(res => {
  301. if (res.data) {
  302. let date = res.data.driverEndDate.substr(0,4)+"-"+res.data.driverEndDate.substr(4,2)+"-"+res.data.driverEndDate.substr(6,2)
  303. _this.dataDetails.driverLicenseValidityDate = date
  304. if(res.data.allowCar == 'A2' || res.data.allowCar == 'B2'){
  305. _this.dataDetails.quasiDrivingVehicle = res.data.allowCar
  306. }
  307. _this.dataDetails.lssuingAuthority = res.data.issuingAuthority
  308. _this.$forceUpdate()
  309. }
  310. })
  311. .catch(res => {
  312. uni.$u.toast(res.message);
  313. });
  314. break;
  315. case 2:
  316. _this.dataDetails.driverLicenseBackPage = result
  317. break;
  318. case 3:
  319. _this.dataDetails.drivingLicenseHomePage = result
  320. break;
  321. case 4:
  322. _this.dataDetails.drivingLicenseBackPage = result
  323. break;
  324. case 5:
  325. _this.dataDetails.trailerLicenseHomePage = result
  326. break;
  327. case 6:
  328. _this.dataDetails.trailerLicenseBackPage = result
  329. break;
  330. case 7:
  331. _this.dataDetails.qualificationCertificate = result
  332. _this.$request.baseRequest('get',
  333. '/driverInfo/api/qualificationLicenseShibie', {
  334. image: result
  335. }).then(res => {
  336. if (res.data&&res.data.qualificationCertificate) {
  337. _this.dataDetails.qualificationCertificateValidityDate = res.data.qualificationCertificate
  338. // _this.dataDetails.driverLicenseValidityDate =
  339. // res.data.driverEndDate
  340. }
  341. if(res.data&&res.data.qualificationCertificateNum){
  342. _this.dataDetails.qualificationCertificateNumber = res.data.qualificationCertificateNum.replace(/\s*/g,"")
  343. }
  344. _this.$forceUpdate()
  345. })
  346. .catch(res => {
  347. uni.$u.toast(res.message);
  348. });
  349. break;
  350. case 8:
  351. _this.dataDetails.operationCertificate = result
  352. break;
  353. case 9:
  354. _this.dataDetails.trailerOperationCertificate = result
  355. break;
  356. }
  357. _this.$forceUpdate()
  358. }
  359. )
  360. }
  361. });
  362. // } else {
  363. // }
  364. },
  365. uploadImg(type) {
  366. this.uploadType = type
  367. this.imgTypeSelect()
  368. // this.isShowimgType = true
  369. },
  370. validate() {
  371. // true 为校验不通过
  372. if (uni.$u.test.isEmpty(this.dataDetails.driverLicenseHomePage)) {
  373. this.$refs.uToast.show({
  374. type: 'error',
  375. message: "驾驶证主页不能为空!",
  376. })
  377. return true
  378. }
  379. if (uni.$u.test.isEmpty(this.dataDetails.driverLicenseHomePage)) {
  380. this.$refs.uToast.show({
  381. type: 'error',
  382. message: "驾驶证副页不能为空!",
  383. })
  384. return true
  385. }
  386. if (uni.$u.test.isEmpty(this.dataDetails.driverLicenseValidityDate)) {
  387. this.$refs.uToast.show({
  388. type: 'error',
  389. message: "驾驶证有效期不能为空!",
  390. })
  391. return true
  392. }
  393. if (uni.$u.test.isEmpty(this.dataDetails.quasiDrivingVehicle)) {
  394. this.$refs.uToast.show({
  395. type: 'error',
  396. message: "准驾车型不能为空!",
  397. })
  398. return true
  399. }
  400. if (uni.$u.test.isEmpty(this.dataDetails.lssuingAuthority)) {
  401. this.$refs.uToast.show({
  402. type: 'error',
  403. message: "驾驶证发证机关不能为空!",
  404. })
  405. return true
  406. }
  407. // if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseHomePage)) {
  408. // this.$refs.uToast.show({
  409. // type: 'error',
  410. // message: "行驶证主页不能为空!",
  411. // })
  412. // return true
  413. // }
  414. // if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseBackPage)) {
  415. // this.$refs.uToast.show({
  416. // type: 'error',
  417. // message: "行驶证副页不能为空!",
  418. // })
  419. // return true
  420. // }
  421. // if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseValidityDate)) {
  422. // this.$refs.uToast.show({
  423. // type: 'error',
  424. // message: "行驶证有效期不能为空!",
  425. // })
  426. // return true
  427. // }
  428. // if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseNumber)) {
  429. // this.$refs.uToast.show({
  430. // type: 'error',
  431. // message: "行驶证档案编号不能为空!",
  432. // })
  433. // return true
  434. // }
  435. // if(this.radiovalue=='挂车司机'){
  436. // if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseHomePage)) {
  437. // this.$refs.uToast.show({
  438. // type: 'error',
  439. // message: "挂车行驶证主页不能为空!",
  440. // })
  441. // return true
  442. // }
  443. // if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseBackPage)) {
  444. // this.$refs.uToast.show({
  445. // type: 'error',
  446. // message: "挂车行驶证副页不能为空!",
  447. // })
  448. // return true
  449. // }
  450. // if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseNumber)) {
  451. // this.$refs.uToast.show({
  452. // type: 'error',
  453. // message: "挂车行驶证档案编号不能为空!",
  454. // })
  455. // return true
  456. // }
  457. // if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseValidityDate)) {
  458. // this.$refs.uToast.show({
  459. // type: 'error',
  460. // message: "挂车行驶证有效期不能为空!",
  461. // })
  462. // return true
  463. // }
  464. // }
  465. // if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseBackPage)) {
  466. // this.$refs.uToast.show({
  467. // type: 'error',
  468. // message: "行驶证副页不能为空!",
  469. // })
  470. // return true
  471. // }
  472. if (uni.$u.test.isEmpty(this.dataDetails.qualificationCertificate)) {
  473. this.$refs.uToast.show({
  474. type: 'error',
  475. message: "从业资格证不能为空!",
  476. })
  477. return true
  478. }
  479. if (uni.$u.test.isEmpty(this.dataDetails.qualificationCertificateValidityDate)) {
  480. this.$refs.uToast.show({
  481. type: 'error',
  482. message: "从业资格证有效期不能为空!",
  483. })
  484. return true
  485. }
  486. if (uni.$u.test.isEmpty(this.dataDetails.qualificationCertificateNumber)) {
  487. this.$refs.uToast.show({
  488. type: 'error',
  489. message: "从业资格证号不能为空!",
  490. })
  491. return true
  492. }
  493. // if (!uni.$u.test.rangeLength(this.dataDetails.qualificationCertificateNumber,[12,19])) {
  494. // this.$refs.uToast.show({
  495. // type: 'error',
  496. // message: "从业资格证号输入错误!",
  497. // })
  498. // return true
  499. // }
  500. if (this.dataDetails.qualificationCertificateNumber.length > 30) {
  501. this.$refs.uToast.show({
  502. type: 'error',
  503. message: "从业资格证号输入错误!",
  504. })
  505. return true
  506. }
  507. // if (uni.$u.test.isEmpty(this.dataDetails.operationCertificate)) {
  508. // this.$refs.uToast.show({
  509. // type: 'error',
  510. // message: "道路运输证不能为空!",
  511. // })
  512. // return true
  513. // }
  514. // if (uni.$u.test.isEmpty(this.dataDetails.operationCertificateNumber)) {
  515. // this.$refs.uToast.show({
  516. // type: 'error',
  517. // message: "道路运输证号不能为空!",
  518. // })
  519. // return true
  520. // }
  521. // if (uni.$u.test.isEmpty(this.dataDetails.operationCertificateValidityDate)) {
  522. // this.$refs.uToast.show({
  523. // type: 'error',
  524. // message: "道路运输证有效期不能为空!",
  525. // })
  526. // return true
  527. // }
  528. // if(this.radiovalue=='挂车司机'){
  529. // if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificate)) {
  530. // this.$refs.uToast.show({
  531. // type: 'error',
  532. // message: "挂车道路运输证不能为空!",
  533. // })
  534. // return true
  535. // }
  536. // if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateNumber)) {
  537. // this.$refs.uToast.show({
  538. // type: 'error',
  539. // message: "挂车道路运输证号不能为空!",
  540. // })
  541. // return true
  542. // }
  543. // if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateValidityDate)) {
  544. // this.$refs.uToast.show({
  545. // type: 'error',
  546. // message: "挂车道路运输证有效期不能为空!",
  547. // })
  548. // return true
  549. // }
  550. // }
  551. if (uni.$u.test.isEmpty(this.dataDetails.actualCarrierBusinessLicense)) {
  552. this.$refs.uToast.show({
  553. type: 'error',
  554. message: "道路运输经营许可证号不能为空!",
  555. })
  556. return true
  557. }
  558. if (uni.$u.test.isEmpty(this.dataDetails.postalAddress)) {
  559. this.$refs.uToast.show({
  560. type: 'error',
  561. message: "通讯地址不能为空!",
  562. })
  563. return true
  564. }
  565. return false
  566. },
  567. btnBClick() {
  568. // 此处用法为在js中调用,需要写uni.$u.throttle()
  569. uni.$u.throttle(this.submit(), 1000)
  570. },
  571. submit() {
  572. // 校验
  573. if (this.validate()) return
  574. // if(this.dataDetails.driverSex=='男'){
  575. // this.dataDetails.driverCall = this.dataDetails.driverCall+'先生'
  576. // }else{
  577. // this.dataDetails.driverCall = this.dataDetails.driverCall+'女士'
  578. // }
  579. if(!this.consentStatus){
  580. this.$refs.uToast.show({
  581. type: 'error',
  582. message: "请勾选协议!",
  583. })
  584. return
  585. }
  586. //账号传
  587. this.dataDetails.accountNumber = uni.getStorageSync("userInfo").phone
  588. uni.showLoading({
  589. mask: true,
  590. title: '加载中'
  591. })
  592. this.$request.baseRequest('post', '/driverInfo/api/addInfo', this.dataDetails).then(res => {
  593. if(res.code==200){
  594. uni.hideLoading()
  595. this.$refs.uToast.show({
  596. type: 'success',
  597. message: "提交成功,待平台审核!",
  598. complete() {
  599. uni.switchTab({
  600. url: '/pages/mine/index'
  601. })
  602. }
  603. })
  604. // uni.$u.route('/pages/mine/index');
  605. }else{
  606. uni.hideLoading()
  607. uni.$u.toast(res.message);
  608. }
  609. })
  610. .catch(res => {
  611. uni.hideLoading()
  612. uni.$u.toast(res.message);
  613. });
  614. },
  615. radioChange(n) {
  616. if (n == '挂车司机') {
  617. this.isGCar = true
  618. this.dataDetails.driverType = 1
  619. } else {
  620. this.dataDetails.driverType = 2
  621. this.isGCar = false
  622. }
  623. },
  624. //设置图片
  625. setImage(e) {
  626. console.log(e);
  627. //显示在页面
  628. //this.imagesrc = e.path;
  629. // if (e.dotype == 'idphoto') {
  630. // _this.zjzClipper(e.path);
  631. // } else if (e.dotype == 'watermark') {
  632. // _this.watermark(e.path);
  633. // } else {
  634. // _this.savePhoto(e.path);
  635. // }
  636. },
  637. }
  638. };
  639. </script>
  640. <style scoped lang="scss">
  641. .u-radio {
  642. margin-bottom: 0px !important;
  643. }
  644. .row4-img {
  645. width: 32rpx;
  646. height: 32rpx;
  647. }
  648. .preview {
  649. width: 100%;
  650. height: 100px;
  651. }
  652. .top-head {
  653. background: #2772FB;
  654. height: 80rpx;
  655. width: 100%;
  656. }
  657. .container {
  658. background: white;
  659. position: relative;
  660. top: -60rpx;
  661. margin: 0 20rpx;
  662. padding: 20rpx;
  663. box-sizing: border-box;
  664. border-radius: 10rpx;
  665. }
  666. .radio-group {
  667. display: flex;
  668. align-items: center;
  669. }
  670. .level1-title {
  671. margin: 20rpx 0;
  672. border-bottom: 1px solid #EEEEEE;
  673. padding-bottom: 30rpx;
  674. }
  675. .content1 {
  676. .row {
  677. border-bottom: 1px solid #EEEEEE;
  678. padding-bottom: 28rpx;
  679. margin-top: 26rpx;
  680. }
  681. .left-text {
  682. // background: red;
  683. width: 320rpx;
  684. color: #333333;
  685. display: flex;
  686. align-items: center;
  687. }
  688. .picture {
  689. position: relative;
  690. width: 100%;
  691. height: 440rpx;
  692. display: flex;
  693. justify-content: center;
  694. flex-direction: column;
  695. align-items: center;
  696. .text {
  697. margin-top: 20rpx;
  698. }
  699. }
  700. .picture1 {
  701. background: url(../../static/images/mine/jzz.png);
  702. background-size: 100% 100%;
  703. }
  704. .picture2 {
  705. background: url(../../static/images/mine/jzf.png);
  706. background-size: 100% 100%;
  707. }
  708. .picture3 {
  709. background: url(../../static/images/mine/xsz.png);
  710. background-size: 100% 100%;
  711. }
  712. .picture4 {
  713. background: url(../../static/images/mine/xsf.png);
  714. background-size: 100% 100%;
  715. }
  716. .picture5 {
  717. background: url(../../static/images/mine/gcxsz.png);
  718. background-size: 100% 100%;
  719. }
  720. .picture6 {
  721. background: url(../../static/images/mine/gcxsf.png);
  722. background-size: 100% 100%;
  723. }
  724. .picture7 {
  725. background: url(../../static/images/mine/cy.png);
  726. background-size: 100% 100%;
  727. }
  728. .picture8 {
  729. background: url(../../static/images/mine/cy.png);
  730. background-size: 100% 100%;
  731. }
  732. .picture9 {
  733. background: url(../../static/images/mine/cy.png);
  734. background-size: 100% 100%;
  735. }
  736. .xj-image {
  737. width: 100rpx;
  738. height: 100rpx;
  739. }
  740. .title {
  741. color: #999999;
  742. margin: 20rpx 0;
  743. }
  744. }
  745. .service {
  746. font-size: 24rpx;
  747. margin: 20rpx;
  748. justify-content: center;
  749. /deep/.u-image {
  750. margin: 0 20rpx;
  751. }
  752. }
  753. .del-card {
  754. position: absolute;
  755. top: -10rpx;
  756. right: -6rpx;
  757. width: 80rpx;
  758. height: 80rpx;
  759. z-index: 9;
  760. }
  761. .path{
  762. color: #2772FB;
  763. }
  764. /deep/.u-textarea{
  765. padding:9px 0;
  766. }
  767. /deep/.u-textarea__field{
  768. color:#000;
  769. text-align:right;
  770. }
  771. </style>