driverCertificationNext.vue 23 KB

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