editDriverCertificationNext.vue 23 KB

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