addVehicle.vue 45 KB

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