addVehicle.vue 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381
  1. <!-- 管理车辆 -->
  2. <template>
  3. <view class="content">
  4. <view class="flex s-row container">
  5. <view class="flex row">
  6. <view class="left-text">车型</view>
  7. <view class="color" @click="selectCarModel">{{dataDetails.carCategory}} {{dataDetails.carType}}</view>
  8. <view>></view>
  9. <u-picker :show="carModel" :columns="carModelColumns" :closeOnClickOverlay='true' @close='carModelClose'
  10. @cancel='carModelClose' @confirm='confirmCarModel' @change="changeCarModel"></u-picker>
  11. </view>
  12. <view class="title">道路运输证</view>
  13. <view @click="uploadImg(8)" class="picture picture8" v-if="!dataDetails.operationCertificate">
  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.operationCertificate" @click.stop="uploadImg(1)" class="preview-card-img picture">
  18. <view @click.stop="delCard(1)">
  19. <image class='del-card' src="@/static/images/common/quxiao@2x.png">
  20. </image>
  21. </view>
  22. <image class="" :src="dataDetails.operationCertificate" mode="aspectFit"></image>
  23. </view>
  24. <view class="flex row">
  25. <view class="left-text">道路运输证号</view>
  26. <u--input placeholder="输入道路运输证号" inputAlign='right' border="none"
  27. v-model="dataDetails.operationCertificateNumber">
  28. </u--input>
  29. </view>
  30. <view class="flex row flex-space-between">
  31. <view class="left-text">道路运输证有效期</view>
  32. <view class="" @click="selectValidityPeriod(4)">
  33. {{dataDetails.operationCertificateValidityDate?dataDetails.operationCertificateValidityDate:'选择有效期>'}}
  34. </view>
  35. </view>
  36. <view v-if="sign == '挂车'">
  37. <view class="title">挂车道路运输证</view>
  38. <view @click="uploadImg(9)" class="picture picture9" v-if="!dataDetails.trailerOperationCertificate">
  39. <image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
  40. <view class="text">上传挂车道路运输证</view>
  41. </view>
  42. <view v-if="dataDetails.trailerOperationCertificate" @click.stop="uploadImg(1)"
  43. class="preview-card-img picture">
  44. <view @click.stop="delCard(2)">
  45. <image class='del-card' src="@/static/images/common/quxiao@2x.png">
  46. </image>
  47. </view>
  48. <image class="" :src="dataDetails.trailerOperationCertificate" mode="aspectFit"></image>
  49. </view>
  50. </view>
  51. <view class="flex row" v-if="sign == '挂车'">
  52. <view class="left-text">挂车道路运输证号</view>
  53. <u--input placeholder="输入挂车道路运输证号" inputAlign='right' border="none"
  54. v-model="dataDetails.trailerOperationCertificateNumber">
  55. </u--input>
  56. </view>
  57. <view class="flex row flex-space-between" v-if="sign == '挂车'">
  58. <view class="left-text">挂车道路运输证有效期</view>
  59. <view class="" @click="selectValidityPeriod(5)">
  60. {{dataDetails.trailerOperationCertificateValidityDate?dataDetails.trailerOperationCertificateValidityDate:'选择有效期>'}}
  61. </view>
  62. </view>
  63. <view class="title" v-if="sign == '挂车'">牵引车行驶证主页</view>
  64. <view class="title" v-if="sign == '非挂车'">行驶证主页</view>
  65. <view @click="uploadImg(3)" class="picture picture3" v-if="!dataDetails.drivingLicenseHomePage">
  66. <image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
  67. <view class="text" v-if="sign == '挂车'">上传牵引车行驶证主页</view>
  68. <view class="text" v-else>上传行驶证主页</view>
  69. </view>
  70. <view v-if="dataDetails.drivingLicenseHomePage" @click.stop="uploadImg(1)" class="preview-card-img picture">
  71. <view @click.stop="delCard(3)">
  72. <image class='del-card' src="@/static/images/common/quxiao@2x.png">
  73. </image>
  74. </view>
  75. <image class="" :src="dataDetails.drivingLicenseHomePage" mode="aspectFit"></image>
  76. </view>
  77. <view class="title" v-if="sign == '挂车'">牵引车行驶证副页</view>
  78. <view class="title" v-if="sign == '非挂车'">行驶证副页</view>
  79. <view @click="uploadImg(4)" class="picture picture4" v-if="!dataDetails.drivingLicenseBackPage">
  80. <image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
  81. <view class="text" v-if="sign == '挂车'">上传牵引车行驶证副页</view>
  82. <view class="text" v-else>上传行驶证副页</view>
  83. </view>
  84. <view v-if="dataDetails.drivingLicenseBackPage" @click.stop="uploadImg(1)" class="preview-card-img picture">
  85. <view @click.stop="delCard(4)">
  86. <image class='del-card' src="@/static/images/common/quxiao@2x.png">
  87. </image>
  88. </view>
  89. <image class="" :src="dataDetails.drivingLicenseBackPage" mode="aspectFit"></image>
  90. </view>
  91. <view class="flex row flex-space-between">
  92. <view class="left-text">行驶证档案编号</view>
  93. <u--input placeholder="输入行驶证档案编号" inputAlign='right' border="none"
  94. v-model="dataDetails.drivingLicenseNumber">
  95. </u--input>
  96. </view>
  97. <view class="flex row flex-space-between">
  98. <view class="left-text">注册日期</view>
  99. <view class="" @click="selectValidityPeriod(6)">
  100. {{dataDetails.drivingLicenseRegistrationDate?dataDetails.drivingLicenseRegistrationDate:'选择注册日期>'}}
  101. </view>
  102. </view>
  103. <view class="flex row flex-space-between">
  104. <view class="left-text">发证日期</view>
  105. <view class="" @click="selectValidityPeriod(7)">
  106. {{dataDetails.drivingLicenseIssueDate?dataDetails.drivingLicenseIssueDate:'选择发证日期>'}}
  107. </view>
  108. </view>
  109. <view class="flex row flex-space-between">
  110. <view class="left-text">行驶证有效期</view>
  111. <view class="" @click="selectValidityPeriod(1)">
  112. {{dataDetails.drivingLicenseValidityDate?dataDetails.drivingLicenseValidityDate:'选择有效截止日期>'}}
  113. </view>
  114. </view>
  115. <view class="flex row flex-space-between">
  116. <view class="left-text">使用性质</view>
  117. <u--input placeholder="输入使用性质" inputAlign='right' border="none" v-model="dataDetails.useNature"
  118. disabled>
  119. </u--input>
  120. </view>
  121. <view class="flex row flex-space-between">
  122. <view class="left-text">发证机关</view>
  123. <u--input placeholder="输入发证机关" inputAlign='right' border="none" maxlength="25" v-model="dataDetails.lssuingAuthority">
  124. </u--input>
  125. </view>
  126. <view class="flex row noborder">
  127. <view class="left-text">车辆能源类型</view>
  128. <view class="" @click="driveType">
  129. {{dataDetails.energyType?dataDetails.energyType:'选择车辆能源类型>'}}
  130. </view>
  131. </view>
  132. <view class="" v-if="sign == '挂车'">
  133. <view class="title">挂车行驶证主页</view>
  134. <view @click="uploadImg(5)" class="picture picture5" v-if="!dataDetails.trailerLicenseHomePage">
  135. <image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
  136. <view class="text">上传挂车行驶证主页</view>
  137. </view>
  138. <view v-if="dataDetails.trailerLicenseHomePage" @click.stop="uploadImg(1)"
  139. class="preview-card-img picture">
  140. <view @click.stop="delCard(5)">
  141. <image class='del-card' src="@/static/images/common/quxiao@2x.png">
  142. </image>
  143. </view>
  144. <image class="" :src="dataDetails.trailerLicenseHomePage" mode="aspectFit"></image>
  145. </view>
  146. </view>
  147. <view v-if="sign == '挂车'">
  148. <view class="title">挂车行驶证副页</view>
  149. <view @click="uploadImg(6)" class="picture picture6" v-if="!dataDetails.trailerLicenseBackPage">
  150. <image class="xj-image" src="@/static/images/mine/ic_shanchuan@2x.png"></image>
  151. <view class="text">上传挂车行驶证副页</view>
  152. </view>
  153. <view v-if="dataDetails.trailerLicenseBackPage" @click.stop="uploadImg(1)"
  154. class="preview-card-img picture">
  155. <view @click.stop="delCard(6)">
  156. <image class='del-card' src="@/static/images/common/quxiao@2x.png">
  157. </image>
  158. </view>
  159. <image class="" :src="dataDetails.trailerLicenseBackPage" mode="aspectFit"></image>
  160. </view>
  161. </view>
  162. <view class="flex row" v-if="sign == '挂车'">
  163. <view class="left-text">挂车行驶证档案编号</view>
  164. <u--input placeholder="输入挂车行驶证档案编号" inputAlign='right' border="none"
  165. v-model="dataDetails.trailerLicenseNumber">
  166. </u--input>
  167. </view>
  168. <view class="flex row flex-space-between" v-if="sign == '挂车'">
  169. <view class="left-text">注册日期</view>
  170. <view class="" @click="selectValidityPeriod(8)">
  171. {{dataDetails.trailerLicenseRegistrationDate?dataDetails.trailerLicenseRegistrationDate:'选择注册日期>'}}
  172. </view>
  173. </view>
  174. <view class="flex row flex-space-between" v-if="sign == '挂车'">
  175. <view class="left-text">发证日期</view>
  176. <view class="" @click="selectValidityPeriod(9)">
  177. {{dataDetails.trailerLicenseIssueDate?dataDetails.trailerLicenseIssueDate:'选择发证日期>'}}
  178. </view>
  179. </view>
  180. <view class="flex row flex-space-between" v-if="sign == '挂车'">
  181. <view class="left-text">挂车行驶证有效期</view>
  182. <view class="" @click="selectValidityPeriod(2)">
  183. {{dataDetails.trailerLicenseValidityDate?dataDetails.trailerLicenseValidityDate:'选择有效截止日期>'}}
  184. </view>
  185. </view>
  186. <view class="flex row flex-space-between" v-if="sign == '挂车'">
  187. <view class="left-text">使用性质</view>
  188. <u--input placeholder="输入使用性质" inputAlign='right' border="none" v-model="dataDetails.guaUseNature"
  189. disabled>
  190. </u--input>
  191. </view>
  192. <view class="flex row flex-space-between" v-if="sign == '挂车'">
  193. <view class="left-text">发证机关</view>
  194. <u--input placeholder="输入发证机关" inputAlign='right' border="none" maxlength="25"
  195. v-model="dataDetails.guaLssuingAuthority">
  196. </u--input>
  197. </view>
  198. <!-- 牵引车 -->
  199. <view class="flex row" v-if="sign == '挂车'">
  200. <view class="left left-text">牵引车车牌号</view>
  201. <view class="right flex">
  202. <input class="car-uumber" v-model='dataDetails.carNumber' @click.stop="handleShowKeyboard(index)"
  203. :disabled="true" placeholder="输入牵引车车牌号" name="input"></input>
  204. </view>
  205. </view>
  206. <view class="flex row" v-if="sign == '非挂车'">
  207. <view class="left left-text">车牌号</view>
  208. <view class="right flex">
  209. <input class="car-uumber" v-model='dataDetails.carNumber' @click.stop="handleShowKeyboard(index)"
  210. :disabled="true" placeholder="输入车牌号" name="input"></input>
  211. </view>
  212. </view>
  213. <view class="flex row">
  214. <view class="left-text">车牌颜色</view>
  215. <view class="color" @click="selectNoColor">{{dataDetails.carNumberColour}}</view>
  216. <view>></view>
  217. <u-picker :show="carColor" :columns="colorColumns" :closeOnClickOverlay='true' @close='colorClose'
  218. @cancel='colorClose' @confirm='confirmColor' @change="changeCarModel"></u-picker>
  219. </view>
  220. <view class="flex row">
  221. <view class="left-text">车辆所属车主</view>
  222. <u--input placeholder="输入车主姓名" inputAlign='left' border="none" v-model="dataDetails.owner">
  223. </u--input>
  224. </view>
  225. <view class="flex row" v-if="sign == '非挂车'">
  226. <view class="left-text">总质量(千克)</view>
  227. <u--input placeholder="输入总质量" inputAlign='left' border="none" v-model="dataDetails.carTotalWeight">
  228. </u--input>
  229. </view>
  230. <view class="flex row" v-if="sign == '挂车'">
  231. <view class="left-text">整备质量(千克)</view>
  232. <u--input placeholder="输入整备质量" inputAlign='left' border="none" v-model="dataDetails.servicingWeight">
  233. </u--input>
  234. </view>
  235. <view class="flex row noborder" v-if="sign == '挂车'">
  236. <view class="left-text">牵引车外廓尺寸(毫米)</view>
  237. </view>
  238. <view class="flex row noborder" v-if="sign == '非挂车'">
  239. <view class="left-text">外廓尺寸(毫米)</view>
  240. </view>
  241. <view class="flex row noborder input-ckg">
  242. <view class="input-positon">
  243. <u--input class="input" placeholder="长" inputAlign='left' border="none"
  244. v-model="dataDetails.carLong">
  245. </u--input>
  246. <view class="position-right">
  247. mm
  248. </view>
  249. </view>
  250. <view class="star">*</view>
  251. <view class="input-positon">
  252. <u--input placeholder="宽" inputAlign='left' border="none" v-model="dataDetails.carWidth">
  253. </u--input>
  254. <view class="position-right">
  255. mm
  256. </view>
  257. </view>
  258. <view class="star">*</view>
  259. <view class="input-positon">
  260. <u--input placeholder="高" inputAlign='left' border="none" v-model="dataDetails.carHeight">
  261. </u--input>
  262. <view class="position-right">
  263. mm
  264. </view>
  265. </view>
  266. </view>
  267. <view class="flex row noborder s-row">
  268. <view class="left-text" style="width: 100%;" v-if="sign == '挂车'">上传人和牵引车合影(牵引车牌号可见)</view>
  269. <view class="left-text" style="width: 100%;" v-if="sign == '非挂车'">上传人车合影(车头车牌号可见)</view>
  270. <u-upload class="uview-upload" :fileList="fileList1" @afterRead="afterRead($event,'1')"
  271. @delete="deletePic" name="1" multiple :maxCount="1"></u-upload>
  272. </view>
  273. <!-- 挂车 -->
  274. <view v-if="sign == '挂车'">
  275. <view class="flex row">
  276. <view class="left left-text">挂车车牌号</view>
  277. <view class="right flex">
  278. <input class="car-uumber" v-model='dataDetails.guaCarNumber'
  279. @click.stop="handleShowKeyboard1(index)" :disabled="true" placeholder="输入挂车牌号"
  280. name="input"></input>
  281. </view>
  282. </view>
  283. <view class="flex row">
  284. <view class="left-text">车辆所属车主</view>
  285. <u--input placeholder="输入车主姓名" inputAlign='left' border="none" v-model="dataDetails.guaOwner">
  286. </u--input>
  287. </view>
  288. <view class="flex row">
  289. <view class="left-text">整备质量(千克)</view>
  290. <u--input placeholder="输入整备质量" inputAlign='left' border="none"
  291. v-model="dataDetails.guaServicingWeight">
  292. </u--input>
  293. </view>
  294. <view class="flex row">
  295. <view class="left-text">核定载质量(千克)</view>
  296. <u--input placeholder="输入核定载质量" inputAlign='left' border="none"
  297. v-model="dataDetails.guaCarApprovedWeight">
  298. </u--input>
  299. </view>
  300. <view class="flex row noborder">
  301. <view class="left-text">挂车外廓尺寸(毫米)</view>
  302. </view>
  303. <view class="flex row noborder input-ckg">
  304. <view class="input-positon">
  305. <u--input class="input" placeholder="长" inputAlign='left' border="none"
  306. v-model="dataDetails.guaCarLong">
  307. </u--input>
  308. <view class="position-right">
  309. mm
  310. </view>
  311. </view>
  312. <view class="star">*</view>
  313. <view class="input-positon">
  314. <u--input placeholder="宽" inputAlign='left' border="none" v-model="dataDetails.guaCarWidth">
  315. </u--input>
  316. <view class="position-right">
  317. mm
  318. </view>
  319. </view>
  320. <view class="star">*</view>
  321. <view class="input-positon">
  322. <u--input placeholder="高" inputAlign='left' border="none" v-model="dataDetails.guaCarHeight">
  323. </u--input>
  324. <view class="position-right">
  325. mm
  326. </view>
  327. </view>
  328. </view>
  329. <view class="flex row noborder s-row">
  330. <view class="left-text" style="width: 100%;">上传人和挂车合影(挂车车牌号可见)</view>
  331. <u-upload class="uview-upload" :fileList="fileList2" @afterRead="afterRead1($event,'2')"
  332. @delete="deletePic" name="2" multiple :maxCount="1"></u-upload>
  333. </view>
  334. </view>
  335. <!-- <view class="level1-title">证件信息</view> -->
  336. </view>
  337. <view class="submit-btn" @click="submit">提交</view>
  338. <master-keyboard ref="keyboard" keyboardtype="car" :show="keyShow" :randomNumber="true" :newCar="false"
  339. :defaultValue="carNumber" @keyboardClick="handleClick"></master-keyboard>
  340. <master-keyboard ref="keyboard1" keyboardtype="car" :show="keyShow1" :randomNumber="true" :newCar="false"
  341. :defaultValue="carNumber1" @keyboardClick="handleClick1"></master-keyboard>
  342. <u-toast ref="uToast"></u-toast>
  343. <u-action-sheet :actions="$helper.imgTypeList" :title="$helper.imgType" :show="isShowimgType"
  344. @select="imgTypeSelect" :closeOnClickOverlay="true" :closeOnClickAction="true" @close="isShowimgType=false">
  345. </u-action-sheet>
  346. <u-picker :show="isShowValidity" ref="uPicker" :columns="validityPeriod" @confirm="confirmValidityPeriod"
  347. :closeOnClickOverlay='true' @close='isShowValidity=false' @cancel='isShowValidity=false'>
  348. </u-picker>
  349. <u-picker :show="isShowCarType" ref="uPicker" :columns="carTypeList" @confirm="confirmCarType"
  350. :closeOnClickOverlay='true' @close='isShowCarType=false' @cancel='isShowCarType=false'>
  351. </u-picker>
  352. </view>
  353. </template>
  354. <script>
  355. import uploadImage from '@/components/ossutil/uploadFile.js';
  356. import keyboard from "@/components/master-keyboard/master-keyboard.vue";
  357. var _this;
  358. import {
  359. mapState
  360. } from 'vuex';
  361. export default {
  362. data() {
  363. return {
  364. index: '',
  365. keyShow: false,
  366. keyShow1: false,
  367. carNumber: '',
  368. carNumber1: "",
  369. dataDetails: {
  370. // driverId: '',
  371. // carNumber: '',
  372. carNumberColour: '黄色',
  373. carCategory: '挂车',
  374. carType: '高栏',
  375. useNature: "营业特种车",
  376. guaUseNature: "营运挂车",
  377. energyType:"汽油",
  378. // carTotalWeight: '',
  379. // carApprovedWeight: '',
  380. // carLong: '',
  381. // carWidth: '',
  382. // carHeight: '',
  383. // addressUrl: ''
  384. },
  385. carTypeList:[["汽油","柴油","油电混合","纯电动","插电式混合动力","增程式"]],
  386. isShowCarType:false,
  387. carModelColumns: [
  388. ['挂车', '非挂车'],
  389. ['高栏', '集装箱', '自卸车']
  390. ],
  391. carModelColumnData: [
  392. ['高栏', '集装箱', '自卸车'],
  393. ['重型仓栏']
  394. ],
  395. colorColumns: [
  396. ['黄色', '蓝色']
  397. ],
  398. carColor: false,
  399. carModel: false,
  400. fileList1: [],
  401. fileList2: [],
  402. ValidityPeriodType: "",
  403. validityPeriod: [],
  404. isShowValidity: false,
  405. uploadType: '',
  406. isShowimgType: false,
  407. sign: "挂车"
  408. };
  409. },
  410. computed: {
  411. ...mapState(['hasLogin', 'userInfo', 'firstAuthentication']),
  412. },
  413. onLoad(options) {
  414. _this = this;
  415. this.dataDetails.commonId = this.userInfo.id
  416. this.validityPeriod = this.$helper.makeValidityPeriod()
  417. },
  418. methods: {
  419. driveType(){
  420. this.isShowCarType = true
  421. },
  422. confirmCarType(e){
  423. this.dataDetails.energyType = e.value[0]
  424. this.isShowCarType = false
  425. },
  426. //挂车牌号弹出键盘
  427. handleShowKeyboard1(index) {
  428. if (this.dataDetails.guaCarNumber == '') {
  429. this.carNumber1 = ''
  430. } else {
  431. this.carNumber1 = this.dataDetails.guaCarNumber
  432. }
  433. if (this.$refs.keyboard1.open) {
  434. this.$refs.keyboard1.open(false) //true 键盘显示 false 键盘隐藏
  435. } else {
  436. this.$refs.keyboard1[0].open(false)
  437. }
  438. this.index = index
  439. if (this.$refs.keyboard1.open) {
  440. this.$refs.keyboard1.open(true) //true 键盘显示 false 键盘隐藏
  441. } else {
  442. this.$refs.keyboard1[0].open(true)
  443. }
  444. },
  445. handleClick1(e) {
  446. this.carNumber1 = e.value
  447. this.dataDetails.guaCarNumber = e.value //键盘输入值
  448. },
  449. delCard(type) {
  450. switch (type) {
  451. case 1:
  452. _this.dataDetails.operationCertificate = "" //道路运输证
  453. break;
  454. case 2:
  455. _this.dataDetails.trailerOperationCertificate = "" //挂车道路运输证
  456. break;
  457. case 3:
  458. _this.dataDetails.drivingLicenseHomePage = "" //牵引车行驶证
  459. break;
  460. case 4:
  461. _this.dataDetails.drivingLicenseBackPage = "" //牵引车行驶证副页
  462. break;
  463. case 5:
  464. _this.dataDetails.trailerLicenseHomePage = "" //挂车行驶证
  465. break;
  466. case 6:
  467. _this.dataDetails.trailerLicenseBackPage = ""//挂车行驶证副页
  468. break;
  469. }
  470. _this.$forceUpdate()
  471. },
  472. uploadImg(type) {
  473. this.uploadType = type
  474. this.imgTypeSelect()
  475. // this.isShowimgType = true
  476. },
  477. selectValidityPeriod(type) {
  478. this.ValidityPeriodType = type
  479. this.isShowValidity = true
  480. },
  481. // 上传图片
  482. imgTypeSelect(val) {
  483. // if (val.name == '相册') {
  484. uni.chooseImage({
  485. count: 1,
  486. success: function(res) {
  487. uploadImage("images", res.tempFilePaths[0], 'appData/',
  488. result => {
  489. // 上传成功回调函数
  490. console.log('图片地址-----', result)
  491. switch (_this.uploadType) {
  492. case 1:
  493. _this.dataDetails.driverLicenseHomePage = result
  494. break;
  495. case 2:
  496. _this.dataDetails.driverLicenseBackPage = result
  497. break;
  498. case 3:
  499. _this.dataDetails.drivingLicenseHomePage = result
  500. _this.$request.baseRequest('get',
  501. '/driverCarInfo/api/driveringLicenseShibie', {
  502. image: result,
  503. flag: 1
  504. }).then(res => {
  505. if (res.data) {
  506. _this.dataDetails.carNumber = res.data
  507. .carNum //车牌号
  508. _this.dataDetails.owner = res.data
  509. .owner //车辆所有人
  510. _this.$forceUpdate()
  511. }
  512. })
  513. .catch(res => {
  514. uni.$u.toast(res.message);
  515. });
  516. break;
  517. case 4:
  518. _this.dataDetails.drivingLicenseBackPage = result
  519. _this.$request.baseRequest('get',
  520. '/driverCarInfo/api/driveringLicenseShibie', {
  521. image: result,
  522. flag: 2
  523. }).then(res => {
  524. if (res.data) {
  525. if (res.data.issuingAuthority) { //行驶证发证机关
  526. _this.dataDetails.lssuingAuthority = res
  527. .data.issuingAuthority
  528. }
  529. if (res.data
  530. .licenseRegistrationDate) { //行驶证注册日期
  531. _this.dataDetails
  532. .drivingLicenseRegistrationDate = res
  533. .data.licenseRegistrationDate
  534. }
  535. if (res.data.licenseIssueDate) { //行驶证发证日期
  536. _this.dataDetails.drivingLicenseIssueDate =
  537. res.data.licenseIssueDate
  538. }
  539. _this.dataDetails.drivingLicenseValidityDate =
  540. res.data.driveringEndDate //行驶证有效期
  541. _this.dataDetails.drivingLicenseNumber = res
  542. .data.driveringNum //行驶证档案编号
  543. if (_this.sign == "非挂车") {
  544. if (res.data.servicingMass && res.data
  545. .servicingMass.indexOf("kg") != -1) {
  546. res.data.servicingMass = res.data
  547. .servicingMass.slice(0, res.data
  548. .servicingMass.length - 2)
  549. }
  550. _this.dataDetails.carTotalWeight = res.data
  551. .servicingMass //总质量
  552. }
  553. if(res.data.approvedLoadMass.indexOf("kg") != -1){
  554. res.data.approvedLoadMass = res.data.approvedLoadMass.slice(0, res.data.approvedLoadMass.length - 2)
  555. }
  556. _this.dataDetails.carApprovedWeight = res.data
  557. .approvedLoadMass //核定载质量
  558. if (res.data.size && res.data.size.indexOf(
  559. "mm") != -1) {
  560. res.data.size = res.data.size.slice(0, res
  561. .data.size.length - 2);
  562. }
  563. _this.dataDetails.carLong = res.data.size
  564. .split("X")[0] //车长
  565. _this.dataDetails.carWidth = res.data.size
  566. .split("X")[1] //车宽
  567. _this.dataDetails.carHeight = res.data.size
  568. .split("X")[2] //车高
  569. _this.$forceUpdate()
  570. }
  571. })
  572. .catch(res => {
  573. uni.$u.toast(res.message);
  574. });
  575. break;
  576. case 5: //挂车行驶证
  577. _this.dataDetails.trailerLicenseHomePage = result
  578. _this.$request.baseRequest('get',
  579. '/driverCarInfo/api/driveringLicenseShibie', {
  580. image: result,
  581. flag: 1
  582. }).then(res => {
  583. if (res.data.issuingAuthority) { //行驶证发证机关
  584. _this.dataDetails.guaLssuingAuthority = res
  585. .data.issuingAuthority
  586. }
  587. if (res.data.licenseRegistrationDate) { //行驶证注册日期
  588. _this.dataDetails
  589. .trailerLicenseRegistrationDate = res.data
  590. .licenseRegistrationDate
  591. }
  592. if (res.data.licenseIssueDate) { //行驶证发证日期
  593. _this.dataDetails.trailerLicenseIssueDate = res
  594. .data.licenseIssueDate
  595. }
  596. if (res.data) {
  597. _this.dataDetails.guaCarNumber = res.data
  598. .carNum //车牌号
  599. _this.dataDetails.guaOwner = res.data
  600. .owner //车辆所有人
  601. _this.$forceUpdate()
  602. }
  603. })
  604. .catch(res => {
  605. uni.$u.toast(res.message);
  606. });
  607. break;
  608. case 6:
  609. _this.dataDetails.trailerLicenseBackPage = result
  610. _this.$request.baseRequest('get',
  611. '/driverCarInfo/api/driveringLicenseShibie', {
  612. image: result,
  613. flag: 2
  614. }).then(res => {
  615. if (res.data) {
  616. _this.dataDetails.trailerLicenseValidityDate =
  617. res.data.driveringEndDate //挂车行驶证有效期
  618. _this.dataDetails.trailerLicenseNumber = res
  619. .data.driveringNum //挂车行驶证档案编号
  620. if (res.data.servicingMass && res.data
  621. .servicingMass.indexOf("kg") != -1) {
  622. res.data.servicingMass = res.data
  623. .servicingMass.slice(0, res.data
  624. .servicingMass.length - 2)
  625. }
  626. if(res.data.approvedLoadMass.indexOf("kg") != -1){
  627. res.data.approvedLoadMass = res.data.approvedLoadMass.slice(0, res.data.approvedLoadMass.length - 2)
  628. }
  629. _this.dataDetails.guaServicingWeight = res.data.servicingMass //总质量
  630. _this.dataDetails.guaCarApprovedWeight = res.data.approvedLoadMass //核定载质量
  631. if (res.data.size && res.data.size.indexOf(
  632. "mm") != -1) {
  633. res.data.size = res.data.size.slice(0, res
  634. .data.size.length - 2);
  635. }
  636. _this.dataDetails.guaCarLong = res.data.size
  637. .split("X")[0] //车长
  638. _this.dataDetails.guaCarWidth = res.data.size
  639. .split("X")[1] //车宽
  640. _this.dataDetails.guaCarHeight = res.data.size
  641. .split("X")[2] //车高
  642. _this.$forceUpdate()
  643. }
  644. })
  645. .catch(res => {
  646. uni.$u.toast(res.message);
  647. });
  648. break;
  649. case 7:
  650. _this.dataDetails.qualificationCertificate = result
  651. break;
  652. case 8:
  653. _this.dataDetails.operationCertificate = result
  654. _this.$request.baseRequest('get',
  655. '/driverCarInfo/api/tranLicenseShibie', {
  656. image: result
  657. }).then(res => {
  658. if (res.data) {
  659. _this.dataDetails.operationCertificateNumber =
  660. res.data.tranNumber
  661. _this.dataDetails
  662. .operationCertificateValidityDate = res
  663. .data.tranEndDate
  664. _this.$forceUpdate()
  665. }
  666. })
  667. .catch(res => {
  668. uni.$u.toast(res.message);
  669. });
  670. break;
  671. case 9:
  672. _this.dataDetails.trailerOperationCertificate = result
  673. _this.$request.baseRequest('get',
  674. '/driverCarInfo/api/tranLicenseShibie', {
  675. image: result
  676. }).then(res => {
  677. if (res.data) {
  678. _this.dataDetails
  679. .trailerOperationCertificateNumber = res
  680. .data.tranNumber
  681. _this.dataDetails
  682. .trailerOperationCertificateValidityDate =
  683. res.data.tranEndDate
  684. _this.$forceUpdate()
  685. }
  686. })
  687. .catch(res => {
  688. uni.$u.toast(res.message);
  689. });
  690. break;
  691. }
  692. _this.$forceUpdate()
  693. }
  694. )
  695. }
  696. });
  697. // }
  698. },
  699. confirmValidityPeriod(e) {
  700. console.log('confirm', e)
  701. switch (this.ValidityPeriodType) {
  702. case 0:
  703. this.dataDetails.driverLicenseValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
  704. break
  705. case 1:
  706. this.dataDetails.drivingLicenseValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
  707. break
  708. case 2:
  709. this.dataDetails.trailerLicenseValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
  710. break
  711. case 3:
  712. this.dataDetails.qualificationCertificateValidityDate = e.value[0] + '-' + e.value[1] + '-' + e
  713. .value[2]
  714. break
  715. case 4:
  716. this.dataDetails.operationCertificateValidityDate = e.value[0] + '-' + e.value[1] + '-' + e.value[
  717. 2]
  718. break
  719. case 5:
  720. this.dataDetails.trailerOperationCertificateValidityDate = e.value[0] + '-' + e.value[1] + '-' + e
  721. .value[2]
  722. case 6: //行驶证注册日期
  723. this.dataDetails.drivingLicenseRegistrationDate = e.value[0] + '-' + e.value[1] + '-' + e
  724. .value[2]
  725. break
  726. case 7: //行驶证发证日期
  727. this.dataDetails.drivingLicenseIssueDate = e.value[0] + '-' + e.value[1] + '-' + e
  728. .value[2]
  729. break
  730. case 8: //挂车行驶证注册日期
  731. this.dataDetails.trailerLicenseRegistrationDate = e.value[0] + '-' + e.value[1] + '-' + e
  732. .value[2]
  733. break
  734. case 9: //挂车行驶证发证日期
  735. this.dataDetails.trailerLicenseIssueDate = e.value[0] + '-' + e.value[1] + '-' + e
  736. .value[2]
  737. break
  738. }
  739. this.isShowValidity = false
  740. },
  741. // 车型切换
  742. changeCarModel(e) {
  743. const {
  744. columnIndex,
  745. index,
  746. // 微信小程序无法将picker实例传出来,只能通过ref操作
  747. picker = this.$refs.carTypePicker
  748. } = e
  749. if (columnIndex === 0) {
  750. // 模拟网络请求
  751. picker.setColumnValues(1, this.carModelColumnData[index])
  752. }
  753. },
  754. // 删除图片
  755. deletePic(event) {
  756. this[`fileList${event.name}`].splice(event.index, 1)
  757. },
  758. // 新增图片
  759. async afterRead(event, num) {
  760. // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
  761. let lists = [].concat(event.file)
  762. let fileListLen = this[`fileList${event.name}`].length
  763. lists.map((item) => {
  764. this[`fileList${event.name}`].push({
  765. ...item,
  766. status: 'uploading',
  767. message: '上传中'
  768. })
  769. })
  770. for (let i = 0; i < lists.length; i++) {
  771. const result = await this.uploadFilePromise(lists[i].url, num)
  772. let item = this[`fileList${event.name}`][fileListLen]
  773. this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
  774. status: 'success',
  775. message: '',
  776. url: result
  777. }))
  778. fileListLen++
  779. }
  780. },
  781. // 新增图片
  782. async afterRead1(event, num) {
  783. console.log(event)
  784. // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
  785. let lists = [].concat(event.file)
  786. let fileListLen = this[`fileList${event.name}`].length
  787. lists.map((item) => {
  788. this[`fileList${event.name}`].push({
  789. ...item,
  790. status: 'uploading',
  791. message: '上传中'
  792. })
  793. })
  794. for (let i = 0; i < lists.length; i++) {
  795. const result = await this.uploadFilePromise(lists[i].url, num)
  796. let item = this[`fileList${event.name}`][fileListLen]
  797. this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
  798. status: 'success',
  799. message: '',
  800. url: result
  801. }))
  802. fileListLen++
  803. }
  804. },
  805. uploadFilePromise(url, num) {
  806. uploadImage('image', url, 'appData/',
  807. result => {
  808. // 上传成功回调函数
  809. console.log('图片地址', result)
  810. if (num == 1) {
  811. if (!this.dataDetails.addressUrl) {
  812. this.dataDetails.addressUrl = result
  813. } else {
  814. this.dataDetails.addressUrl = this.dataDetails.addressUrl + ',' + result
  815. }
  816. } else if (num == 2) {
  817. if (!this.dataDetails.guaAddressUrl) {
  818. this.dataDetails.guaAddressUrl = result
  819. } else {
  820. this.dataDetails.guaAddressUrl = this.dataDetails.guaAddressUrl + ',' + result
  821. }
  822. }
  823. }
  824. )
  825. },
  826. //车牌号弹出键盘
  827. handleShowKeyboard(index) {
  828. if (this.dataDetails.carNumber == '') {
  829. this.carNumber = ''
  830. } else {
  831. this.carNumber = this.dataDetails.carNumber
  832. }
  833. if (this.$refs.keyboard.open) {
  834. this.$refs.keyboard.open(false) //true 键盘显示 false 键盘隐藏
  835. } else {
  836. this.$refs.keyboard[0].open(false)
  837. }
  838. this.index = index
  839. if (this.$refs.keyboard.open) {
  840. this.$refs.keyboard.open(true) //true 键盘显示 false 键盘隐藏
  841. } else {
  842. this.$refs.keyboard[0].open(true)
  843. }
  844. },
  845. //车牌号弹出键盘
  846. handleClick(e) {
  847. this.carNumber = e.value
  848. this.dataDetails.carNumber = e.value //键盘输入值
  849. },
  850. confirmColor(val) {
  851. this.dataDetails.carNumberColour = val.value[0]
  852. this.carColor = false
  853. },
  854. colorClose() {
  855. this.carColor = false
  856. },
  857. selectNoColor() {
  858. this.carColor = true
  859. },
  860. confirmCarModel(val) {
  861. if (val.value[0] == '挂车') {
  862. this.dataDetails.useNature = "营业特种车"
  863. this.dataDetails.guaUseNature = "营运挂车"
  864. } else if (val.value[0] == '非挂车') {
  865. this.dataDetails.useNature = "营运货车"
  866. }
  867. this.sign = val.value[0]
  868. // this.dataDetails.carType = val.value[0] + ' ' + val.value[1]
  869. this.dataDetails.carCategory = val.value[0]
  870. this.dataDetails.carType = val.value[1]
  871. this.carModel = false
  872. },
  873. carModelClose() {
  874. this.carModel = false
  875. },
  876. selectCarModel() {
  877. this.carModel = true
  878. },
  879. selectNoColor() {
  880. this.carColor = true
  881. },
  882. unloadGroupPhoto() {
  883. uni.chooseImage({
  884. count: 1,
  885. success: function(res) {
  886. console.log(JSON.stringify(res.tempFilePaths));
  887. uploadImage('image', res.tempFilePaths[0], 'appData/',
  888. result => {
  889. // 上传成功
  890. console.log('图片地址', result)
  891. }
  892. )
  893. }
  894. });
  895. },
  896. validate() {
  897. // true 为校验不通过
  898. if (uni.$u.test.isEmpty(this.dataDetails.carNumber)) {
  899. this.$refs.uToast.show({
  900. type: 'error',
  901. message: "车牌号不能为空!",
  902. })
  903. return true
  904. }
  905. if (uni.$u.test.isEmpty(this.dataDetails.carTotalWeight) && this.sign == '非挂车') {
  906. this.$refs.uToast.show({
  907. type: 'error',
  908. message: "总质量不能为空!",
  909. })
  910. return true
  911. }
  912. if (uni.$u.test.isEmpty(this.dataDetails.servicingWeight) && this.sign == '挂车') {
  913. this.$refs.uToast.show({
  914. type: 'error',
  915. message: "整备质量不能为空!",
  916. })
  917. return true
  918. }
  919. if (uni.$u.test.isEmpty(this.dataDetails.owner)) {
  920. this.$refs.uToast.show({
  921. type: 'error',
  922. message: "车辆所属车主不能为空!",
  923. })
  924. return true
  925. }
  926. if (uni.$u.test.isEmpty(this.dataDetails.carLong) && uni.$u.test.isEmpty(this.dataDetails.caWidth) && uni
  927. .$u.test.isEmpty(this.dataDetails.carHeight)) {
  928. this.$refs.uToast.show({
  929. type: 'error',
  930. message: "外廓尺寸不能为空!",
  931. })
  932. return true
  933. }
  934. if (uni.$u.test.isEmpty(this.dataDetails.operationCertificate)) {
  935. this.$refs.uToast.show({
  936. type: 'error',
  937. message: "道路运输证不能为空!",
  938. })
  939. return true
  940. }
  941. if (uni.$u.test.isEmpty(this.dataDetails.operationCertificateNumber)) {
  942. this.$refs.uToast.show({
  943. type: 'error',
  944. message: "道路运输证号不能为空!",
  945. })
  946. return true
  947. }
  948. if (uni.$u.test.isEmpty(this.dataDetails.operationCertificateValidityDate)) {
  949. this.$refs.uToast.show({
  950. type: 'error',
  951. message: "道路运输证有效期不能为空!",
  952. })
  953. return true
  954. }
  955. if (this.sign == '挂车') {
  956. if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificate)) {
  957. this.$refs.uToast.show({
  958. type: 'error',
  959. message: "挂车道路运输证不能为空!",
  960. })
  961. return true
  962. }
  963. if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateNumber)) {
  964. this.$refs.uToast.show({
  965. type: 'error',
  966. message: "挂车道路运输证号不能为空!",
  967. })
  968. return true
  969. }
  970. if (uni.$u.test.isEmpty(this.dataDetails.trailerOperationCertificateValidityDate)) {
  971. this.$refs.uToast.show({
  972. type: 'error',
  973. message: "挂车道路运输证有效期不能为空!",
  974. })
  975. return true
  976. }
  977. }
  978. if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseHomePage)) {
  979. this.$refs.uToast.show({
  980. type: 'error',
  981. message: "行驶证主页不能为空!",
  982. })
  983. return true
  984. }
  985. if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseBackPage)) {
  986. this.$refs.uToast.show({
  987. type: 'error',
  988. message: "行驶证副页不能为空!",
  989. })
  990. return true
  991. }
  992. if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseNumber)) {
  993. this.$refs.uToast.show({
  994. type: 'error',
  995. message: "行驶证档案编号不能为空!",
  996. })
  997. return true
  998. }
  999. if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseRegistrationDate)) {
  1000. this.$refs.uToast.show({
  1001. type: 'error',
  1002. message: "行驶证注册日期不能为空!",
  1003. })
  1004. return true
  1005. }
  1006. if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseIssueDate)) {
  1007. this.$refs.uToast.show({
  1008. type: 'error',
  1009. message: "行驶证发证日期不能为空!",
  1010. })
  1011. return true
  1012. }
  1013. if (uni.$u.test.isEmpty(this.dataDetails.drivingLicenseValidityDate)) {
  1014. this.$refs.uToast.show({
  1015. type: 'error',
  1016. message: "行驶证有效期不能为空!",
  1017. })
  1018. return true
  1019. }
  1020. if (uni.$u.test.isEmpty(this.dataDetails.lssuingAuthority)) {
  1021. this.$refs.uToast.show({
  1022. type: 'error',
  1023. message: "行驶证发证机关不能为空!",
  1024. })
  1025. return true
  1026. }
  1027. if (uni.$u.test.isEmpty(this.dataDetails.energyType)) {
  1028. this.$refs.uToast.show({
  1029. type: 'error',
  1030. message: "能源类型不能为空!",
  1031. })
  1032. return true
  1033. }
  1034. if (this.sign == '挂车') {
  1035. if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseHomePage)) {
  1036. this.$refs.uToast.show({
  1037. type: 'error',
  1038. message: "挂车行驶证主页不能为空!",
  1039. })
  1040. return true
  1041. }
  1042. if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseBackPage)) {
  1043. this.$refs.uToast.show({
  1044. type: 'error',
  1045. message: "挂车行驶证副页不能为空!",
  1046. })
  1047. return true
  1048. }
  1049. if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseNumber)) {
  1050. this.$refs.uToast.show({
  1051. type: 'error',
  1052. message: "挂车行驶证档案编号不能为空!",
  1053. })
  1054. return true
  1055. }
  1056. if (uni.$u.test.isEmpty(this.dataDetails.guaCarNumber)) {
  1057. this.$refs.uToast.show({
  1058. type: 'error',
  1059. message: "挂车车牌号不能为空!",
  1060. })
  1061. return true
  1062. }
  1063. if (uni.$u.test.isEmpty(this.dataDetails.guaOwner)) {
  1064. this.$refs.uToast.show({
  1065. type: 'error',
  1066. message: "车辆所属车主不能为空!",
  1067. })
  1068. return true
  1069. }
  1070. if (uni.$u.test.isEmpty(this.dataDetails.guaServicingWeight)) {
  1071. this.$refs.uToast.show({
  1072. type: 'error',
  1073. message: "挂车整备质量不能为空!",
  1074. })
  1075. return true
  1076. }
  1077. if (uni.$u.test.isEmpty(this.dataDetails.guaCarApprovedWeight)) {
  1078. this.$refs.uToast.show({
  1079. type: 'error',
  1080. message: "挂车核定载质量不能为空!",
  1081. })
  1082. return true
  1083. }
  1084. if (uni.$u.test.isEmpty(this.dataDetails.guaCarLong) || uni.$u.test.isEmpty(this.dataDetails.guaCarWidth) || uni.$u.test.isEmpty(this.dataDetails.guaCarHeight)) {
  1085. this.$refs.uToast.show({
  1086. type: 'error',
  1087. message: "挂车外廓尺寸不能为空!",
  1088. })
  1089. return true
  1090. }
  1091. // if (this.dataDetails.fileList2.length == 0) {
  1092. // this.$refs.uToast.show({
  1093. // type: 'error',
  1094. // message: "人和挂车合影不能为空!",
  1095. // })
  1096. // return true
  1097. // }
  1098. if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseRegistrationDate)) {
  1099. this.$refs.uToast.show({
  1100. type: 'error',
  1101. message: "挂车行驶证注册日期不能为空!",
  1102. })
  1103. return true
  1104. }
  1105. if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseIssueDate)) {
  1106. this.$refs.uToast.show({
  1107. type: 'error',
  1108. message: "挂车行驶证发证日期不能为空!!",
  1109. })
  1110. return true
  1111. }
  1112. if (uni.$u.test.isEmpty(this.dataDetails.trailerLicenseValidityDate)) {
  1113. this.$refs.uToast.show({
  1114. type: 'error',
  1115. message: "挂车行驶证有效期不能为空!",
  1116. })
  1117. return true
  1118. }
  1119. if (uni.$u.test.isEmpty(this.dataDetails.guaLssuingAuthority)) {
  1120. this.$refs.uToast.show({
  1121. type: 'error',
  1122. message: "挂车行驶证发证机关不能为空!",
  1123. })
  1124. return true
  1125. }
  1126. }
  1127. return false
  1128. },
  1129. submit() {
  1130. this.dataDetails.driverId = uni.getStorageSync("firstAuthentication").id
  1131. // 校验
  1132. if (this.validate()) return
  1133. if (!this.dataDetails.carApprovedWeight) {
  1134. delete this.dataDetails.carApprovedWeight
  1135. }
  1136. if(this.dataDetails.carCategory == "非挂车"){
  1137. delete this.dataDetails.guaUseNature
  1138. }
  1139. this.$request.baseRequest('post', '/driverCarInfo/api/addInfo', this.dataDetails).then(res => {
  1140. if (res.code == '200') {
  1141. this.$refs.uToast.show({
  1142. type: 'success',
  1143. message: "提交成功!",
  1144. complete() {
  1145. // uni.navigateBack({
  1146. // delta: 1
  1147. // });
  1148. uni.$u.route('/pages/mine/manageVehicles/index');
  1149. }
  1150. })
  1151. // this.$refs.uToast.show({
  1152. // ...params
  1153. // })
  1154. // uni.$u.route('/pages/mine/manageVehicles/index');
  1155. } else {
  1156. uni.$u.toast(res.message);
  1157. }
  1158. })
  1159. .catch(res => {
  1160. uni.$u.toast(res.message);
  1161. });
  1162. },
  1163. },
  1164. }
  1165. </script>
  1166. <style lang="scss" scoped>
  1167. .container {
  1168. margin: 20rpx;
  1169. background: white;
  1170. padding: 0 20rpx;
  1171. border-radius: 20rpx;
  1172. padding-bottom: 200rpx;
  1173. .left-text {
  1174. // background: red;
  1175. width: 290rpx;
  1176. color: #333333;
  1177. display: flex;
  1178. align-items: center;
  1179. }
  1180. .row {
  1181. border-bottom: 1px solid #EEEEEE;
  1182. padding-bottom: 28rpx;
  1183. margin-top: 26rpx;
  1184. .ch-style {}
  1185. }
  1186. .row-ch {
  1187. padding-right: 250rpx;
  1188. box-sizing: border-box;
  1189. }
  1190. .row {
  1191. border-bottom: 1px solid #EEEEEE;
  1192. padding-bottom: 28rpx;
  1193. margin-top: 26rpx;
  1194. }
  1195. .left-text {
  1196. // background: red;
  1197. width: 320rpx;
  1198. color: #333333;
  1199. display: flex;
  1200. align-items: center;
  1201. }
  1202. .picture {
  1203. position: relative;
  1204. width: 100%;
  1205. height: 440rpx;
  1206. display: flex;
  1207. justify-content: center;
  1208. flex-direction: column;
  1209. align-items: center;
  1210. .text {
  1211. margin-top: 20rpx;
  1212. }
  1213. }
  1214. .picture1 {
  1215. background: url(../../../static/images/mine/jzz.png);
  1216. background-size: 100% 100%;
  1217. }
  1218. .picture2 {
  1219. background: url(../../../static/images/mine/jzf.png);
  1220. background-size: 100% 100%;
  1221. }
  1222. .picture3 {
  1223. background: url(../../../static/images/mine/xsz.png);
  1224. background-size: 100% 100%;
  1225. }
  1226. .picture4 {
  1227. background: url(../../../static/images/mine/xsf.png);
  1228. background-size: 100% 100%;
  1229. }
  1230. .picture5 {
  1231. background: url(../../../static/images/mine/gcxsz.png);
  1232. background-size: 100% 100%;
  1233. }
  1234. .picture6 {
  1235. background: url(../../../static/images/mine/gcxsf.png);
  1236. background-size: 100% 100%;
  1237. }
  1238. .picture7 {
  1239. background: url(../../../static/images/mine/cy.png);
  1240. background-size: 100% 100%;
  1241. }
  1242. .picture8 {
  1243. background: url(../../../static/images/mine/cy.png);
  1244. background-size: 100% 100%;
  1245. }
  1246. .picture9 {
  1247. background: url(../../../static/images/mine/cy.png);
  1248. background-size: 100% 100%;
  1249. }
  1250. .xj-image {
  1251. width: 100rpx;
  1252. height: 100rpx;
  1253. }
  1254. .title {
  1255. color: #999999;
  1256. margin: 20rpx 0;
  1257. }
  1258. }
  1259. .input-ckg {
  1260. height: 86rpx;
  1261. margin-top: 0 !important;
  1262. padding-bottom: 0 !important;
  1263. .u-input {
  1264. height: 100%;
  1265. background: #F7F8FA;
  1266. padding-left: 10rpx !important;
  1267. padding-right: 85rpx !important;
  1268. }
  1269. .star {
  1270. display: flex;
  1271. align-items: center;
  1272. margin: 0 10rpx;
  1273. }
  1274. .input-positon {
  1275. position: relative;
  1276. }
  1277. .position-right {
  1278. position: absolute;
  1279. right: 20rpx;
  1280. top: 0;
  1281. width: 60rpx;
  1282. height: 50rpx;
  1283. bottom: 0;
  1284. margin: auto;
  1285. }
  1286. }
  1287. .picture {
  1288. margin-top: 20rpx;
  1289. background: #F5F6FA;
  1290. width: 212rpx;
  1291. height: 212rpx;
  1292. border-radius: 10rpx;
  1293. display: flex;
  1294. flex-direction: column;
  1295. justify-content: center;
  1296. align-items: center;
  1297. color: #6A7282;
  1298. }
  1299. .submit-btn {
  1300. position: fixed;
  1301. bottom: 40rpx;
  1302. width: 90%;
  1303. background: #2772FB;
  1304. color: white;
  1305. text-align: center;
  1306. margin-left: 5%;
  1307. padding: 30rpx 0;
  1308. border-radius: 50rpx;
  1309. }
  1310. .del-card {
  1311. position: absolute;
  1312. top: -10rpx;
  1313. right: -6rpx;
  1314. width: 80rpx;
  1315. height: 80rpx;
  1316. z-index: 9;
  1317. }
  1318. /deep/.uni-input-input:disabled{
  1319. background:#fff;
  1320. }
  1321. </style>