addVehicle.vue 46 KB

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