driverCertificationNext.vue 24 KB

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