editDriverCertificationNext.vue 23 KB

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