addVehicle.vue 45 KB

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