editDriverCertificationNext.vue 27 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'}" 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. import permision from "@/js_sdk/wa-permission/permission.js"
  253. var _this;
  254. export default {
  255. components: {},
  256. data() {
  257. return {
  258. isShowAlert: false,
  259. consentStatus: false,
  260. isGCar: true,
  261. ValidityPeriodType: '',
  262. validityPeriod: [],
  263. isShowValidity: false,
  264. isShowDrive:false,
  265. driveList:[["A2","B2"]],
  266. uploadType: '',
  267. isShowimgType: false,
  268. dataDetails: {},
  269. radiolist: [{
  270. name: '挂车司机',
  271. disabled: false
  272. },
  273. {
  274. name: '非挂车司机',
  275. disabled: false
  276. }
  277. ],
  278. // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
  279. radiovalue: '',
  280. };
  281. },
  282. onLoad(options) {
  283. _this = this;
  284. this.get_camera_permission()
  285. this.dataDetails = JSON.parse(options.data)
  286. if (this.dataDetails.driverType == 1) {
  287. this.radiovalue = '挂车司机'
  288. } else {
  289. this.radiovalue = '非挂车司机'
  290. }
  291. this.validityPeriod = this.$helper.makeValidityPeriod()
  292. },
  293. methods: {
  294. async get_camera_permission() {
  295. var photol=await permision.requestAndroidPermission("android.permission.CAMERA")
  296. if(photol == false){
  297. uni.showModal({
  298. title: '提示',
  299. content: '您已经关闭相册权限,去设置',
  300. success: function (res) {
  301. if (res.confirm) {
  302. permision.gotoAppPermissionSetting()
  303. // plus.runtime.openURL("app-settings:");
  304. } else if (res.cancel) {
  305. console.log('用户点击取消');
  306. }
  307. }
  308. });
  309. }
  310. },
  311. delCard(type) {
  312. switch (type) {
  313. case 1:
  314. _this.dataDetails.driverLicenseHomePage = ""
  315. break;
  316. case 2:
  317. _this.dataDetails.driverLicenseBackPage = ""
  318. break;
  319. case 3:
  320. _this.dataDetails.drivingLicenseHomePage = ""
  321. break;
  322. case 4:
  323. _this.dataDetails.drivingLicenseBackPage = ""
  324. break;
  325. case 5:
  326. _this.dataDetails.trailerLicenseHomePage = ""
  327. break;
  328. case 6:
  329. _this.dataDetails.trailerLicenseBackPage = ""
  330. break;
  331. case 7:
  332. _this.dataDetails.qualificationCertificate = ""
  333. break;
  334. case 8:
  335. _this.dataDetails.operationCertificate = ""
  336. break;
  337. case 9:
  338. _this.dataDetails.trailerOperationCertificate = ""
  339. break;
  340. }
  341. },
  342. consent() {
  343. this.consentStatus = !this.consentStatus
  344. // uni.setStorage({
  345. // key: 'policyStorageKey',
  346. // data: this.consentStatus
  347. // });
  348. },
  349. validate(data) {},
  350. confirmValidityPeriod(e) {
  351. console.log('confirm', e)
  352. switch (this.ValidityPeriodType) {
  353. case 0:
  354. this.dataDetails.driverLicenseValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
  355. break
  356. case 1:
  357. this.dataDetails.drivingLicenseValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
  358. break
  359. case 2:
  360. this.dataDetails.trailerLicenseValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
  361. break
  362. case 3:
  363. this.dataDetails.qualificationCertificateValidityDate = e.value[0] + '-' + e.value[1] + '-' + e
  364. .value[2]
  365. break
  366. case 4:
  367. this.dataDetails.operationCertificateValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[
  368. 2]
  369. break
  370. case 5:
  371. this.dataDetails.trailerOperationCertificateValidityDate = e.value[0] + '-' + e.value[1] + '-' + e
  372. .value[2]
  373. break
  374. }
  375. this.isShowValidity = false
  376. },
  377. selectValidityPeriod(type) {
  378. this.ValidityPeriodType = type
  379. this.isShowValidity = true
  380. },
  381. driveType(){
  382. this.isShowDrive = true
  383. },
  384. confirmDriveType(e){
  385. this.dataDetails.quasiDrivingVehicle = e.value[0]
  386. this.isShowDrive = false
  387. },
  388. // 上传图片
  389. imgTypeSelect(val) {
  390. if (val.name == '相册') {
  391. uni.chooseImage({
  392. count: 1,
  393. sourceType: this.$helper.chooseImage.sourceType,
  394. success: function(res) {
  395. console.log(JSON.stringify(res.tempFilePaths));
  396. uploadImage('image', res.tempFilePaths[0], 'appData/',
  397. result => {
  398. // 上传成功回调函数
  399. console.log('图片地址-----', result)
  400. switch (_this.uploadType) {
  401. case 1:
  402. _this.dataDetails.driverLicenseHomePage = result
  403. _this.$request.baseRequest('get',
  404. '/driverInfo/api/driverLicenseShibie', {
  405. image: result
  406. }).then(res => {
  407. if (res.data) {
  408. let date = res.data.driverEndDate.substr(0,4)+"-"+res.data.driverEndDate.substr(4,2)+"-"+res.data.driverEndDate.substr(6,2)
  409. _this.dataDetails.driverLicenseValidityDate = date
  410. if(res.data.allowCar == 'A2' || res.data.allowCar == 'B2'){
  411. _this.dataDetails.quasiDrivingVehicle = res.data.allowCar
  412. }
  413. _this.dataDetails.lssuingAuthority = res.data.issuingAuthority
  414. _this.$forceUpdate()
  415. }
  416. })
  417. .catch(res => {
  418. uni.$u.toast(res.message);
  419. });
  420. break;
  421. case 2:
  422. _this.dataDetails.driverLicenseBackPage = result
  423. break;
  424. case 3:
  425. _this.dataDetails.drivingLicenseHomePage = result
  426. break;
  427. case 4:
  428. _this.dataDetails.drivingLicenseBackPage = result
  429. break;
  430. case 5:
  431. _this.dataDetails.trailerLicenseHomePage = result
  432. break;
  433. case 6:
  434. _this.dataDetails.trailerLicenseBackPage = result
  435. break;
  436. case 7:
  437. _this.dataDetails.qualificationCertificate = result
  438. _this.$request.baseRequest('get',
  439. '/driverInfo/api/qualificationLicenseShibie', {
  440. image: result
  441. }).then(res => {
  442. if (res.data&&res.data.qualificationCertificate) {
  443. _this.dataDetails.qualificationCertificateValidityDate = res.data.qualificationCertificate
  444. }
  445. if(res.data&&res.data.qualificationCertificateNum){
  446. _this.dataDetails.qualificationCertificateNumber = res.data.qualificationCertificateNum
  447. }
  448. _this.$forceUpdate()
  449. })
  450. .catch(res => {
  451. uni.$u.toast(res.message);
  452. });
  453. break;
  454. case 8:
  455. _this.dataDetails.operationCertificate = result
  456. break;
  457. case 9:
  458. _this.dataDetails.trailerOperationCertificate = result
  459. break;
  460. }
  461. }
  462. )
  463. }
  464. });
  465. } else {
  466. }
  467. },
  468. uploadImg(type) {
  469. this.uploadType = type
  470. this.isShowimgType = true
  471. },
  472. validate() {
  473. // true 为校验不通过
  474. if (uni.$u.test.isEmpty(this.dataDetails.driverLicenseHomePage)) {
  475. this.$refs.uToast.show({
  476. type: 'error',
  477. message: "驾驶证主页不能为空!",
  478. })
  479. return true
  480. }
  481. if (uni.$u.test.isEmpty(this.dataDetails.driverLicenseBackPage)) {
  482. this.$refs.uToast.show({
  483. type: 'error',
  484. message: "驾驶证副页不能为空!",
  485. })
  486. return true
  487. }
  488. if (uni.$u.test.isEmpty(this.dataDetails.driverLicenseValidityDate)) {
  489. this.$refs.uToast.show({
  490. type: 'error',
  491. message: "驾驶证有效期不能为空!",
  492. })
  493. return true
  494. }
  495. // if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseHomePage)) {
  496. // this.$refs.uToast.show({
  497. // type: 'error',
  498. // message: "行驶证主页不能为空!",
  499. // })
  500. // return true
  501. // }
  502. // if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseBackPage)) {
  503. // this.$refs.uToast.show({
  504. // type: 'error',
  505. // message: "行驶证副页不能为空!",
  506. // })
  507. // return true
  508. // }
  509. // if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseValidityDate)) {
  510. // this.$refs.uToast.show({
  511. // type: 'error',
  512. // message: "行驶证有效期不能为空!",
  513. // })
  514. // return true
  515. // }
  516. // if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseNumber)) {
  517. // this.$refs.uToast.show({
  518. // type: 'error',
  519. // message: "行驶证档案编号不能为空!",
  520. // })
  521. // return true
  522. // }
  523. if (uni.$u.test.isEmpty(this.dataDetails.qualificationCertificate)) {
  524. this.$refs.uToast.show({
  525. type: 'error',
  526. message: "从业资格证不能为空!",
  527. })
  528. return true
  529. }
  530. if (uni.$u.test.isEmpty(this.dataDetails.qualificationCertificateValidityDate)) {
  531. this.$refs.uToast.show({
  532. type: 'error',
  533. message: "从业资格证有效期不能为空!",
  534. })
  535. return true
  536. }
  537. // if (uni.$u.test.isEmpty(this.dataDetails.operationCertificate)) {
  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.trailerLicenseHomePage)) {
  553. // this.$refs.uToast.show({
  554. // type: 'error',
  555. // message: "挂车行驶证主页不能为空!",
  556. // })
  557. // return true
  558. // }
  559. // if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseBackPage)) {
  560. // this.$refs.uToast.show({
  561. // type: 'error',
  562. // message: "挂车行驶证副页不能为空!",
  563. // })
  564. // return true
  565. // }
  566. // if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseValidityDate)) {
  567. // this.$refs.uToast.show({
  568. // type: 'error',
  569. // message: "挂车行驶证有效期不能为空!",
  570. // })
  571. // return true
  572. // }
  573. // if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificate)) {
  574. // this.$refs.uToast.show({
  575. // type: 'error',
  576. // message: "挂车道路运输证不能为空!",
  577. // })
  578. // return true
  579. // }
  580. // if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateValidityDate)) {
  581. // this.$refs.uToast.show({
  582. // type: 'error',
  583. // message: "挂车道路运输证有效期不能为空!",
  584. // })
  585. // return true
  586. // }
  587. // if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateNumber)) {
  588. // this.$refs.uToast.show({
  589. // type: 'error',
  590. // message: "挂车道路运输证号不能为空!",
  591. // })
  592. // return true
  593. // }
  594. // if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseNumber)) {
  595. // this.$refs.uToast.show({
  596. // type: 'error',
  597. // message: "挂车行驶证档案编号不能为空!",
  598. // })
  599. // return true
  600. // }
  601. // }
  602. if (uni.$u.test.isEmpty(this.dataDetails.postalAddress)) {
  603. this.$refs.uToast.show({
  604. type: 'error',
  605. message: "通讯地址不能为空!",
  606. })
  607. return true
  608. }
  609. return false
  610. },
  611. delSubmitObj() {
  612. delete this.dataDetails.authenticationStatus
  613. delete this.dataDetails.authenticationStatusKey
  614. delete this.dataDetails.compId
  615. delete this.dataDetails.createDate
  616. delete this.dataDetails.createUserId
  617. delete this.dataDetails.deleteFlag
  618. delete this.dataDetails.driverCarInfoList
  619. delete this.dataDetails.driverPayeeInfoList
  620. delete this.dataDetails.firstFlag
  621. delete this.dataDetails.updateDate
  622. },
  623. submit() {
  624. if (!this.consentStatus) {
  625. uni.showToast({
  626. title: '请勾选协议',
  627. icon: 'none',
  628. duration: 2000
  629. })
  630. return
  631. }
  632. // 校验
  633. if (this.validate()) return
  634. this.delSubmitObj()
  635. this.$request.baseRequest('post', '/driverInfo/api/editInfo', this.dataDetails).then(res => {
  636. if (res.code == 200) {
  637. this.$refs.uToast.show({
  638. type: 'success',
  639. message: "提交成功,待平台审核!",
  640. complete() {
  641. uni.switchTab({
  642. url: '/pages/mine/index'
  643. })
  644. }
  645. })
  646. } else {
  647. uni.$u.toast(res.message);
  648. }
  649. })
  650. .catch(res => {
  651. uni.$u.toast(res.message);
  652. });
  653. },
  654. radioChange(n) {
  655. console.log('radioChange', n);
  656. if (n == '挂车司机') {
  657. this.isGCar = true
  658. this.dataDetails.driverType = 1
  659. } else {
  660. this.dataDetails.driverType = 2
  661. this.isGCar = false
  662. }
  663. },
  664. //设置图片
  665. setImage(e) {
  666. console.log(e);
  667. //显示在页面
  668. //this.imagesrc = e.path;
  669. // if (e.dotype == 'idphoto') {
  670. // _this.zjzClipper(e.path);
  671. // } else if (e.dotype == 'watermark') {
  672. // _this.watermark(e.path);
  673. // } else {
  674. // _this.savePhoto(e.path);
  675. // }
  676. },
  677. }
  678. };
  679. </script>
  680. <style scoped lang="scss">
  681. .u-radio {
  682. margin-bottom: 0px !important;
  683. }
  684. .row4-img {
  685. width: 32rpx;
  686. height: 32rpx;
  687. }
  688. .preview {
  689. width: 100%;
  690. height: 100px;
  691. }
  692. .top-head {
  693. background: #2772FB;
  694. height: 80rpx;
  695. width: 100%;
  696. }
  697. .container {
  698. background: white;
  699. position: relative;
  700. top: -60rpx;
  701. margin: 0 20rpx;
  702. padding: 20rpx;
  703. box-sizing: border-box;
  704. border-radius: 10rpx;
  705. }
  706. .radio-group {
  707. display: flex;
  708. align-items: center;
  709. justify-content: space-between;
  710. }
  711. .level1-title {
  712. margin: 20rpx 0;
  713. border-bottom: 1px solid #EEEEEE;
  714. padding-bottom: 30rpx;
  715. }
  716. .content1 {
  717. .row {
  718. border-bottom: 1px solid #EEEEEE;
  719. padding-bottom: 28rpx;
  720. margin-top: 26rpx;
  721. }
  722. .left-text {
  723. // background: red;
  724. width: 320rpx;
  725. color: #333333;
  726. display: flex;
  727. align-items: center;
  728. }
  729. .picture {
  730. position: relative;
  731. width: 100%;
  732. height: 440rpx;
  733. display: flex;
  734. justify-content: center;
  735. flex-direction: column;
  736. align-items: center;
  737. .text {
  738. margin-top: 20rpx;
  739. }
  740. }
  741. .picture1 {
  742. background: url(../../static/images/mine/jzz.png);
  743. background-size: 100% 100%;
  744. }
  745. .picture2 {
  746. background: url(../../static/images/mine/jzf.png);
  747. background-size: 100% 100%;
  748. }
  749. .picture3 {
  750. background: url(../../static/images/mine/xsz.png);
  751. background-size: 100% 100%;
  752. }
  753. .picture4 {
  754. background: url(../../static/images/mine/xsf.png);
  755. background-size: 100% 100%;
  756. }
  757. .picture5 {
  758. background: url(../../static/images/mine/gcxsz.png);
  759. background-size: 100% 100%;
  760. }
  761. .picture6 {
  762. background: url(../../static/images/mine/gcxsf.png);
  763. background-size: 100% 100%;
  764. }
  765. .picture7 {
  766. background: url(../../static/images/mine/cy.png);
  767. background-size: 100% 100%;
  768. }
  769. .picture8 {
  770. background: url(../../static/images/mine/cy.png);
  771. background-size: 100% 100%;
  772. }
  773. .picture9 {
  774. background: url(../../static/images/mine/cy.png);
  775. background-size: 100% 100%;
  776. }
  777. .xj-image {
  778. width: 100rpx;
  779. height: 100rpx;
  780. }
  781. .title {
  782. color: #999999;
  783. margin: 20rpx 0;
  784. }
  785. }
  786. .service {
  787. font-size: 24rpx;
  788. margin: 20rpx;
  789. justify-content: center;
  790. /deep/.u-image {
  791. margin: 0 20rpx;
  792. }
  793. }
  794. .del-card {
  795. position: absolute;
  796. top: -10rpx;
  797. right: -6rpx;
  798. width: 80rpx;
  799. height: 80rpx;
  800. z-index: 9;
  801. }
  802. .path {
  803. color: #2772FB;
  804. }
  805. .btn-color {}
  806. </style>