editDriverCertificationNext.vue 26 KB

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