editDriverCertificationNext.vue 25 KB

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