editDriverCertificationNext.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769
  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">
  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">
  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(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 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(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" 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(1)"
  130. class="preview-card-img picture">
  131. <view @click.stop="delCard(1)">
  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(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='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(1)"
  177. class="preview-card-img picture">
  178. <view @click.stop="delCard(1)">
  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(res.tempFilePaths[0], 'appData/',
  347. result => {
  348. // 上传成功回调函数
  349. console.log('图片地址-----', result)
  350. switch (_this.uploadType) {
  351. case 1:
  352. _this.dataDetails.driverLicenseHomePage = result
  353. break;
  354. case 2:
  355. _this.dataDetails.driverLicenseBackPage = result
  356. break;
  357. case 3:
  358. _this.dataDetails.drivingLicenseHomePage = result
  359. break;
  360. case 4:
  361. _this.dataDetails.drivingLicenseBackPage = result
  362. break;
  363. case 5:
  364. _this.dataDetails.trailerLicenseHomePage = result
  365. break;
  366. case 6:
  367. _this.dataDetails.trailerLicenseBackPage = result
  368. break;
  369. case 7:
  370. _this.dataDetails.qualificationCertificate = result
  371. break;
  372. case 8:
  373. _this.dataDetails.operationCertificate = result
  374. break;
  375. case 9:
  376. _this.dataDetails.trailerOperationCertificate = result
  377. break;
  378. }
  379. }
  380. )
  381. }
  382. });
  383. } else {
  384. }
  385. },
  386. uploadImg(type) {
  387. this.uploadType = type
  388. this.isShowimgType = true
  389. },
  390. validate() {
  391. // true 为校验不通过
  392. if (uni.$u.test.isEmpty(this.dataDetails.driverLicenseHomePage)) {
  393. this.$refs.uToast.show({
  394. type: 'error',
  395. message: "驾驶证主页不能为空!",
  396. })
  397. return true
  398. }
  399. if (uni.$u.test.isEmpty(this.dataDetails.driverLicenseBackPage)) {
  400. this.$refs.uToast.show({
  401. type: 'error',
  402. message: "驾驶证副页不能为空!",
  403. })
  404. return true
  405. }
  406. if (uni.$u.test.isEmpty(this.dataDetails.driverLicenseValidityDate)) {
  407. this.$refs.uToast.show({
  408. type: 'error',
  409. message: "驾驶证有效期不能为空!",
  410. })
  411. return true
  412. }
  413. if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseHomePage)) {
  414. this.$refs.uToast.show({
  415. type: 'error',
  416. message: "行驶证主页不能为空!",
  417. })
  418. return true
  419. }
  420. if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseBackPage)) {
  421. this.$refs.uToast.show({
  422. type: 'error',
  423. message: "行驶证副页不能为空!",
  424. })
  425. return true
  426. }
  427. if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseValidityDate)) {
  428. this.$refs.uToast.show({
  429. type: 'error',
  430. message: "行驶证有效期不能为空!",
  431. })
  432. return true
  433. }
  434. if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseNumber)) {
  435. this.$refs.uToast.show({
  436. type: 'error',
  437. message: "行驶证档案编号不能为空!",
  438. })
  439. return true
  440. }
  441. if (uni.$u.test.isEmpty(this.dataDetails.qualificationCertificate)) {
  442. this.$refs.uToast.show({
  443. type: 'error',
  444. message: "从业资格证不能为空!",
  445. })
  446. return true
  447. }
  448. if (uni.$u.test.isEmpty(this.dataDetails.qualificationCertificateValidityDate)) {
  449. this.$refs.uToast.show({
  450. type: 'error',
  451. message: "从业资格证有效期不能为空!",
  452. })
  453. return true
  454. }
  455. if (uni.$u.test.isEmpty(this.dataDetails.operationCertificate)) {
  456. this.$refs.uToast.show({
  457. type: 'error',
  458. message: "道路运输证不能为空!",
  459. })
  460. return true
  461. }
  462. if (uni.$u.test.isEmpty(this.dataDetails.operationCertificateValidityDate)) {
  463. this.$refs.uToast.show({
  464. type: 'error',
  465. message: "道路运输证有效期不能为空!",
  466. })
  467. return true
  468. }
  469. if (this.radiovalue == '挂车司机') {
  470. if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseHomePage)) {
  471. this.$refs.uToast.show({
  472. type: 'error',
  473. message: "挂车行驶证主页不能为空!",
  474. })
  475. return true
  476. }
  477. if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseBackPage)) {
  478. this.$refs.uToast.show({
  479. type: 'error',
  480. message: "挂车行驶证副页不能为空!",
  481. })
  482. return true
  483. }
  484. if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseValidityDate)) {
  485. this.$refs.uToast.show({
  486. type: 'error',
  487. message: "挂车行驶证有效期不能为空!",
  488. })
  489. return true
  490. }
  491. if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificate)) {
  492. this.$refs.uToast.show({
  493. type: 'error',
  494. message: "挂车道路运输证不能为空!",
  495. })
  496. return true
  497. }
  498. if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateValidityDate)) {
  499. this.$refs.uToast.show({
  500. type: 'error',
  501. message: "挂车道路运输证有效期不能为空!",
  502. })
  503. return true
  504. }
  505. if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateNumber)) {
  506. this.$refs.uToast.show({
  507. type: 'error',
  508. message: "挂车道路运输证号不能为空!",
  509. })
  510. return true
  511. }
  512. if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseNumber)) {
  513. this.$refs.uToast.show({
  514. type: 'error',
  515. message: "挂车行驶证档案编号不能为空!",
  516. })
  517. return true
  518. }
  519. }
  520. if (uni.$u.test.isEmpty(this.dataDetails.postalAddress)) {
  521. this.$refs.uToast.show({
  522. type: 'error',
  523. message: "通讯地址不能为空!",
  524. })
  525. return true
  526. }
  527. return false
  528. },
  529. delSubmitObj() {
  530. delete this.dataDetails.authenticationStatus
  531. delete this.dataDetails.authenticationStatusKey
  532. delete this.dataDetails.compId
  533. delete this.dataDetails.createDate
  534. delete this.dataDetails.createUserId
  535. delete this.dataDetails.deleteFlag
  536. delete this.dataDetails.driverCarInfoList
  537. delete this.dataDetails.driverPayeeInfoList
  538. delete this.dataDetails.firstFlag
  539. delete this.dataDetails.updateDate
  540. },
  541. submit() {
  542. if (!this.consentStatus) {
  543. uni.showToast({
  544. title: '请勾选协议',
  545. icon: 'none',
  546. duration: 2000
  547. })
  548. return
  549. }
  550. // 校验
  551. if (this.validate()) return
  552. this.delSubmitObj()
  553. this.$request.baseRequest('post', '/driverInfo/api/editInfo', this.dataDetails).then(res => {
  554. if (res.code == 200) {
  555. this.$refs.uToast.show({
  556. type: 'success',
  557. message: "提交成功!",
  558. complete() {
  559. uni.switchTab({
  560. url: '/pages/mine/index'
  561. })
  562. }
  563. })
  564. }
  565. })
  566. .catch(res => {
  567. uni.$u.toast(res.message);
  568. });
  569. },
  570. radioChange(n) {
  571. console.log('radioChange', n);
  572. if (n == '挂车司机') {
  573. this.isGCar = true
  574. this.dataDetails.driverType = 1
  575. } else {
  576. this.dataDetails.driverType = 2
  577. this.isGCar = false
  578. }
  579. },
  580. //设置图片
  581. setImage(e) {
  582. console.log(e);
  583. //显示在页面
  584. //this.imagesrc = e.path;
  585. // if (e.dotype == 'idphoto') {
  586. // _this.zjzClipper(e.path);
  587. // } else if (e.dotype == 'watermark') {
  588. // _this.watermark(e.path);
  589. // } else {
  590. // _this.savePhoto(e.path);
  591. // }
  592. },
  593. }
  594. };
  595. </script>
  596. <style scoped lang="scss">
  597. .u-radio {
  598. margin-bottom: 0px !important;
  599. }
  600. .row4-img {
  601. width: 32rpx;
  602. height: 32rpx;
  603. }
  604. .preview {
  605. width: 100%;
  606. height: 100px;
  607. }
  608. .top-head {
  609. background: #2772FB;
  610. height: 80rpx;
  611. width: 100%;
  612. }
  613. .container {
  614. background: white;
  615. position: relative;
  616. top: -60rpx;
  617. margin: 0 20rpx;
  618. padding: 20rpx;
  619. box-sizing: border-box;
  620. border-radius: 10rpx;
  621. }
  622. .radio-group {
  623. display: flex;
  624. align-items: center;
  625. justify-content: space-between;
  626. }
  627. .level1-title {
  628. margin: 20rpx 0;
  629. border-bottom: 1px solid #EEEEEE;
  630. padding-bottom: 30rpx;
  631. }
  632. .content1 {
  633. .row {
  634. border-bottom: 1px solid #EEEEEE;
  635. padding-bottom: 28rpx;
  636. margin-top: 26rpx;
  637. }
  638. .left-text {
  639. // background: red;
  640. width: 320rpx;
  641. color: #333333;
  642. display: flex;
  643. align-items: center;
  644. }
  645. .picture {
  646. position: relative;
  647. width: 100%;
  648. height: 440rpx;
  649. display: flex;
  650. justify-content: center;
  651. flex-direction: column;
  652. align-items: center;
  653. .text {
  654. margin-top: 20rpx;
  655. }
  656. }
  657. .picture1 {
  658. background: url(../../static/images/mine/jzz.png);
  659. background-size: 100% 100%;
  660. }
  661. .picture2 {
  662. background: url(../../static/images/mine/jzf.png);
  663. background-size: 100% 100%;
  664. }
  665. .picture3 {
  666. background: url(../../static/images/mine/xsz.png);
  667. background-size: 100% 100%;
  668. }
  669. .picture4 {
  670. background: url(../../static/images/mine/xsf.png);
  671. background-size: 100% 100%;
  672. }
  673. .picture5 {
  674. background: url(../../static/images/mine/gcxsz.png);
  675. background-size: 100% 100%;
  676. }
  677. .picture6 {
  678. background: url(../../static/images/mine/gcxsf.png);
  679. background-size: 100% 100%;
  680. }
  681. .picture7 {
  682. background: url(../../static/images/mine/cy.png);
  683. background-size: 100% 100%;
  684. }
  685. .picture8 {
  686. background: url(../../static/images/mine/cy.png);
  687. background-size: 100% 100%;
  688. }
  689. .picture9 {
  690. background: url(../../static/images/mine/cy.png);
  691. background-size: 100% 100%;
  692. }
  693. .xj-image {
  694. width: 100rpx;
  695. height: 100rpx;
  696. }
  697. .title {
  698. color: #999999;
  699. margin: 20rpx 0;
  700. }
  701. }
  702. .service {
  703. font-size: 24rpx;
  704. margin: 20rpx;
  705. justify-content: center;
  706. /deep/.u-image {
  707. margin: 0 20rpx;
  708. }
  709. }
  710. .del-card {
  711. position: absolute;
  712. top: -10rpx;
  713. right: -6rpx;
  714. width: 80rpx;
  715. height: 80rpx;
  716. z-index: 9;
  717. }
  718. .path {
  719. color: #2772FB;
  720. }
  721. .btn-color {}
  722. </style>