editDriverCertificationNext.vue 24 KB

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