editVehicle.vue 45 KB

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