editVehicle.vue 45 KB

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