addVehicle.vue 45 KB

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