driverCertificationNext.vue 23 KB

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