entry.vue 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699
  1. <template>
  2. <view class="page">
  3. <public-module></public-module>
  4. <service-widget @btnClick="btn_click"></service-widget>
  5. <!-- <view class="inputPrompt mb-2">
  6. 请尽量与上年度保单保持一致!
  7. </view> -->
  8. <view class="banner mb-3" v-if="insuranceType==1">
  9. <image src="/static/image/car-insure/carban.png" mode=""></image>
  10. </view>
  11. <view class="carinfo">
  12. <view class="title dis a-c j-s mb-3">
  13. <text>车辆信息</text>
  14. <view class="rounded dis a-c j-c">
  15. <view class="left dis a-c j-c" :class="insuranceType==1? 'active':''" @click="insuranceType=1">
  16. <text>车牌号</text>
  17. </view>
  18. <view class="center"></view>
  19. <view class="right dis a-c j-c" :class="insuranceType==2? 'active':''" @click="insuranceType=2">
  20. <text>行驶证</text>
  21. </view>
  22. </view>
  23. </view>
  24. <view class="carinput" v-show="insuranceType==1">
  25. <view class="top dis a-c j-s mb-3">
  26. <text>车牌号码</text>
  27. <u-switch v-model="checked" active-color="#0052FF" inactive-color="#eee" size='30'
  28. @change="switchChange"></u-switch>
  29. </view>
  30. <view class="btn dis a-c j-s">
  31. <view class="so-plate-word dis a-c j-c" data-index="0" :class="currentInputIndex==0?'actives':''"
  32. @tap="inputSwitch">
  33. <text>{{LicenseInputValue[0]}}</text>
  34. </view>
  35. <view class="so-plate-word dis a-c j-c" data-index="1" :class="currentInputIndex==1?'actives':''"
  36. @tap="inputSwitch">
  37. <text>{{LicenseInputValue[1]}}</text>
  38. </view>
  39. <view class="so-plate-dot"></view>
  40. <view class="so-plate-word dis a-c j-c" data-index="2" :class="currentInputIndex==2?'actives':''"
  41. @tap="inputSwitch">
  42. <text>{{LicenseInputValue[2]}}</text>
  43. </view>
  44. <view class="so-plate-word dis a-c j-c" data-index="3" :class="currentInputIndex==3?'actives':''"
  45. @tap="inputSwitch">
  46. <text>{{LicenseInputValue[3]}}</text>
  47. </view>
  48. <view class="so-plate-word dis a-c j-c" data-index="4" :class="currentInputIndex==4?'actives':''"
  49. @tap="inputSwitch">
  50. <text>{{LicenseInputValue[4]}}</text>
  51. </view>
  52. <view class="so-plate-word dis a-c j-c" data-index="5" :class="currentInputIndex==5?'actives':''"
  53. @tap="inputSwitch">
  54. <text>{{LicenseInputValue[5]}}</text>
  55. </view>
  56. <view class="so-plate-word dis a-c j-c" data-index="6" :class="currentInputIndex==6?'actives':''"
  57. @tap="inputSwitch">
  58. <text>{{LicenseInputValue[6]}}</text>
  59. </view>
  60. <view class="so-plate-word dis a-c j-c" data-index="7" :class="currentInputIndex==7?'newactives':''"
  61. @tap="inputSwitch">
  62. <text v-if="LicenseInputValue[7]">{{LicenseInputValue[7]}}</text>
  63. <view v-else class="newEnergy dis f-c a-c j-c">
  64. <image src="/static/image/car-insure/leaf.png" mode="">
  65. </image>
  66. <text>新能源</text>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. <view v-show="insuranceType==2" class="OCRcar">
  72. <view class="title dis j-s a-c">
  73. <view class="dis a-c">
  74. <text>行驶证识别</text>
  75. <view class="switch-container ml-2" @tap="toggleSwitch" v-if="carbackImg">
  76. <view class="switch-track">
  77. <view class="switch-thumb dis a-c j-c" :class="{ thumbactive: !isActive }"></view>
  78. <view class="switch-thumb1 dis a-c j-c" :class="{ thumbactive1: isActive }">主页</view>
  79. <view class="switch-thumb2 dis a-c j-c" :class="{ thumbactive1: !isActive }">副本</view>
  80. </view>
  81. </view>
  82. </view>
  83. <view class="manualSwitch dis a-c j-s" @click="carSwitching=!carSwitching">
  84. <image
  85. :src="carSwitching?'../../static/image/car-insure/manualInput.png':'../../static/image/car-insure/captureRecognition.png'"
  86. mode=""></image>
  87. <text>{{carSwitching?'手动输入':'拍照识别'}}</text>
  88. </view>
  89. </view>
  90. <view v-if="carSwitching" class="ocr mt-2">
  91. <image v-show="!carfrontImg" @tap="ocrIdentify" src="/static/image/car-insure/carbg.png" mode=""
  92. style="width: 100%;height: 198px;">
  93. </image>
  94. <view v-show="carfrontImg">
  95. <view class="movable-view dis f-c a-c">
  96. <movable-area>
  97. <movable-view direction="all" :out-of-bounds="true" :scale="true" :damping="30"
  98. :friction="10">
  99. <image v-if="isActive" :src="carfrontImg" mode="widthFix"
  100. :style="{width:'100%',height:'100%',transform:`rotate(-${cardeg}deg)`}">
  101. </image>
  102. <image v-else :src="carbackImg" mode="widthFix"
  103. :style="{width:'100%',height:'100%',transform:`rotate(-${cardeg}deg)`}">
  104. </image>
  105. </movable-view>
  106. </movable-area>
  107. <view class="operate-img dis j-s a-c">
  108. <view class="dis a-c" @tap="rotatefront('cardeg')">
  109. <image src="/static/image/car-insure/rotate1.png" mode=""></image>
  110. 左转
  111. </view>
  112. <view class="dis a-c" @tap="ocrIdentify('carInfo')">
  113. <image src="/static/image/car-insure/upload.png" mode=""></image>
  114. 上传
  115. </view>
  116. <view class="dis a-c" @tap="rotateback('cardeg')">
  117. <image src="/static/image/car-insure/rotate2.png" mode=""></image>
  118. 右转
  119. </view>
  120. </view>
  121. </view>
  122. <u-form :model="carInfo" :rules="carRules" ref="carForm" :errorType="errorType"
  123. label-width="200" style="padding: 0 15px;">
  124. <u-form-item label-width="120" label="车牌号:">
  125. <u-input placeholder="输入车牌号" v-model="carInfo.licenseNo" type="text"
  126. :custom-style="{textAlign:'right'}" @input="upperCaseType('licenseNo')"></u-input>
  127. </u-form-item>
  128. <u-form-item label="品牌型号:" prop="modelcname">
  129. <u-input placeholder="请输入品牌型号" v-model="carInfo.modelcname" type="text"
  130. :custom-style="{textAlign:'right'}" @input="upperCaseType('modelcname')"></u-input>
  131. <view class="search ml-1" @tap="toChooseVehicleType(carInfo.modelcname)">查询</view>
  132. </u-form-item>
  133. <u-form-item label="车辆识别码:" prop="frameNo">
  134. <u-input type="text" placeholder="请输入车辆识别码" v-model="carInfo.frameNo"
  135. :custom-style="{textAlign:'right'}" @input="upperCaseType('frameNo')"></u-input>
  136. <view class="search ml-1" @tap="toChooseVin(carInfo.frameNo)">查询</view>
  137. </u-form-item>
  138. <u-form-item label="发动机号:" prop="engineNo">
  139. <u-input type="text" placeholder="请输入发动机号" v-model="carInfo.engineNo"
  140. :custom-style="{textAlign:'right'}" @input="upperCaseType('engineNo')"></u-input>
  141. </u-form-item>
  142. <u-form-item label="注册日期:" prop="registerDate">
  143. <u-input type="select" :custom-style="{textAlign:'right'}"
  144. :select-open="registerDateShow" v-model="carInfo.registerDate" placeholder="请选择注册日期"
  145. @click="registerDateShow = true" placeholder-style="color:#808080"></u-input>
  146. <u-picker v-model="registerDateShow" mode="time" :params="params" :end-year="endYear"
  147. :end-month="endMonth"
  148. @confirm="e=> Dateconfirm(e,'carInfo','registerDate')"></u-picker>
  149. </u-form-item>
  150. <u-form-item label="发证日期:" prop="issueDate">
  151. <u-input type="select" :custom-style="{textAlign:'right'}" :select-open="issueDateShow"
  152. v-model="carInfo.issueDate" placeholder="请选择发证日期" @click="issueDateShow = true"
  153. placeholder-style="color:#808080"></u-input>
  154. <u-picker v-model="issueDateShow" mode="time" :params="params"
  155. @confirm="e=> Dateconfirm(e,'carInfo','issueDate')"></u-picker>
  156. </u-form-item>
  157. <u-form-item label="整备质量:" prop="completeKerbMass">
  158. <u-input type="text" placeholder="请输入整备质量" v-model="carInfo.completeKerbMass"
  159. :custom-style="{textAlign:'right'}"></u-input>
  160. </u-form-item>
  161. <u-form-item label="核定载质量:" prop="frameNo">
  162. <u-input type="text" placeholder="请输入核定载质量" v-model="carInfo.limitLoad"
  163. :custom-style="{textAlign:'right'}"></u-input>
  164. </u-form-item>
  165. <u-form-item label="使用性质:" prop="carnature">
  166. <u-input v-model="carInfo1.carnature" type="select" :select-open="carnatureShow"
  167. @click="carnatureShow = true" :custom-style="{textAlign:'right'}"
  168. placeholder-style="color:#808080" placeholder="请选择使用性质" />
  169. <u-select mode="single-column" :list="natureOfVehicleUseoptions" v-model="carnatureShow"
  170. label-name="dictTag" value-name="dictValue"
  171. @confirm="dictionaryConfirm($event,'carnature')"></u-select>
  172. </u-form-item>
  173. <u-form-item label="能源种类: " prop="energyType">
  174. <u-input v-model="carInfo1.energyType" type="select" :select-open="energyTypeShow"
  175. @click="energyTypeShow = true" :custom-style="{textAlign:'right'}"
  176. placeholder-style="color:#808080" placeholder="请选择能源种类" />
  177. <u-select mode="single-column" :list="energyTypeoptions" v-model="energyTypeShow"
  178. label-name="dictTag" value-name="dictValue"
  179. @confirm="dictionaryConfirm($event,'energyType')"></u-select>
  180. </u-form-item>
  181. <u-form-item label="车辆用途: " prop="vehicleUse">
  182. <u-input v-model="carInfo1.vehicleUse" type="select" :select-open="vehicleUseShow"
  183. @click="vehicleUseShow = true" :custom-style="{textAlign:'right'}"
  184. placeholder-style="color:#808080" placeholder="请选择车辆用途" />
  185. <u-select v-if="carInfo.carnature=='01'" mode="single-column"
  186. :list="businessVehicleUseoptions" v-model="vehicleUseShow" label-name="dictTag"
  187. value-name="dictValue" @confirm="dictionaryConfirm($event,'vehicleUse')"></u-select>
  188. <u-select v-else mode="single-column" :list="outOfBusinessVehicleUseoptions"
  189. v-model="vehicleUseShow" label-name="dictTag" value-name="dictValue"
  190. @confirm="dictionaryConfirm($event,'vehicleUse')"></u-select>
  191. </u-form-item>
  192. <u-form-item label="车辆类型: " prop="cartype">
  193. <u-input v-model="carInfo1.cartype" type="select" :select-open="cartypeShow"
  194. @click="cartypeShow = true" :custom-style="{textAlign:'right'}"
  195. placeholder-style="color:#808080" placeholder="请选择车辆类型" />
  196. <u-select mode="single-column" :searchShow="true"
  197. :list="trafficManagementVehicleTypeoptions" v-model="cartypeShow"
  198. label-name="dictTag" value-name="dictValue"
  199. @confirm="dictionaryConfirm($event,'cartype')"></u-select>
  200. </u-form-item>
  201. <u-form-item label="车辆种类: " prop="cimodelclass">
  202. <u-input v-model="carInfo1.cimodelclass" type="select" :select-open="cimodelclassShow"
  203. @click="cimodelclassShow = true" :custom-style="{textAlign:'right'}"
  204. placeholder-style="color:#808080" placeholder="请选择车辆种类" />
  205. <u-select mode="single-column" :list="vehicleTypeoptions" v-model="cimodelclassShow"
  206. label-name="dictTag" value-name="dictValue"
  207. @confirm="dictionaryConfirm($event,'cimodelclass')"></u-select>
  208. </u-form-item>
  209. <u-form-item label="年款:">
  210. <u-input type="text" placeholder="请输入年款" v-model="carInfo.caryear"
  211. :custom-style="{textAlign:'right'}"></u-input>
  212. </u-form-item>
  213. <u-form-item label="座位数:">
  214. <u-input type="text" placeholder="请输入座位数" v-model="carInfo.seatCount"
  215. :custom-style="{textAlign:'right'}"></u-input>
  216. </u-form-item>
  217. <u-form-item label="排量:">
  218. <u-input type="text" placeholder="请输入排量" v-model="carInfo.enginedesc"
  219. :custom-style="{textAlign:'right'}"></u-input>
  220. </u-form-item>
  221. <u-form-item label="功率:">
  222. <u-input type="text" placeholder="请输入功率" v-model="carInfo.powerScale"
  223. :custom-style="{textAlign:'right'}"></u-input>
  224. </u-form-item>
  225. <u-form-item label="新车购置价:" prop="purchasePrice">
  226. <u-input type="text" placeholder="请输入新车购置价" v-model="carInfo.purchasePrice"
  227. :custom-style="{textAlign:'right'}"
  228. @input="upperCaseType('purchasePrice')"></u-input>
  229. </u-form-item>
  230. </u-form>
  231. </view>
  232. </view>
  233. <view v-if="!carSwitching" class="content mt-2">
  234. <u-form :model="carInfo" :rules="carRules" ref="carForm1" :errorType="errorType" label-width="200"
  235. style="padding: 0 15px;">
  236. <u-form-item label="车牌号:">
  237. <u-input placeholder="输入车牌号" v-model="carInfo.licenseNo" type="text"
  238. :custom-style="{textAlign:'right'}" @input="upperCaseType('licenseNo')"></u-input>
  239. </u-form-item>
  240. <u-form-item label="品牌型号:" prop="modelcname">
  241. <u-input placeholder="请输入品牌型号" v-model="carInfo.modelcname" type="text"
  242. :custom-style="{textAlign:'right'}" @input="upperCaseType('modelcname')"></u-input>
  243. <view class="search ml-1" @tap="toChooseVehicleType(carInfo.modelcname)">查询</view>
  244. </u-form-item>
  245. <u-form-item label="车辆识别码:" prop="frameNo">
  246. <u-input type="text" placeholder="请输入车辆识别码" v-model="carInfo.frameNo"
  247. :custom-style="{textAlign:'right'}" @input="upperCaseType('frameNo')"></u-input>
  248. <view class="search ml-1" @tap="toChooseVin(carInfo.frameNo)">查询</view>
  249. </u-form-item>
  250. <u-form-item label="发动机号:" prop="engineNo">
  251. <u-input type="text" placeholder="请输入发动机号" v-model="carInfo.engineNo"
  252. :custom-style="{textAlign:'right'}" @input="upperCaseType('engineNo')"></u-input>
  253. </u-form-item>
  254. <u-form-item label="注册日期:" prop="registerDate">
  255. <u-input type="select" :custom-style="{textAlign:'right'}" :select-open="registerDateShow"
  256. v-model="carInfo.registerDate" placeholder="请选择注册日期" @click="registerDateShow = true"
  257. placeholder-style="color:#808080"></u-input>
  258. <u-picker v-model="registerDateShow" mode="time" :params="params" :end-year="endYear"
  259. :end-month="endMonth" @confirm="e=> Dateconfirm(e,'carInfo','registerDate')"></u-picker>
  260. </u-form-item>
  261. <u-form-item label="发证日期:" prop="issueDate">
  262. <u-input type="select" :custom-style="{textAlign:'right'}" :select-open="issueDateShow"
  263. v-model="carInfo.issueDate" placeholder="请选择发证日期" @click="issueDateShow = true"
  264. placeholder-style="color:#808080"></u-input>
  265. <u-picker v-model="issueDateShow" mode="time" :params="params"
  266. @confirm="e=> Dateconfirm(e,'carInfo','issueDate')"></u-picker>
  267. </u-form-item>
  268. <u-form-item label="整备质量:" prop="completeKerbMass">
  269. <u-input type="text" placeholder="请输入整备质量" v-model="carInfo.completeKerbMass"
  270. :custom-style="{textAlign:'right'}"></u-input>
  271. </u-form-item>
  272. <u-form-item label="核定载质量:" prop="frameNo">
  273. <u-input type="text" placeholder="请输入核定载质量" v-model="carInfo.limitLoad"
  274. :custom-style="{textAlign:'right'}"></u-input>
  275. </u-form-item>
  276. <u-form-item label="使用性质:" prop="carnature">
  277. <u-input v-model="carInfo1.carnature" type="select" :select-open="carnatureShow"
  278. @click="carnatureShow = true" :custom-style="{textAlign:'right'}"
  279. placeholder-style="color:#808080" placeholder="请选择使用性质" />
  280. <u-select mode="single-column" :list="natureOfVehicleUseoptions" v-model="carnatureShow"
  281. label-name="dictTag" value-name="dictValue"
  282. @confirm="dictionaryConfirm($event,'carnature')"></u-select>
  283. </u-form-item>
  284. <u-form-item label="能源种类: " prop="energyType">
  285. <u-input v-model="carInfo1.energyType" type="select" :select-open="energyTypeShow"
  286. @click="energyTypeShow = true" :custom-style="{textAlign:'right'}"
  287. placeholder-style="color:#808080" placeholder="请选择能源种类" />
  288. <u-select mode="single-column" :list="energyTypeoptions" v-model="energyTypeShow"
  289. label-name="dictTag" value-name="dictValue"
  290. @confirm="dictionaryConfirm($event,'energyType')"></u-select>
  291. </u-form-item>
  292. <u-form-item label="车辆用途: " prop="vehicleUse">
  293. <u-input v-model="carInfo1.vehicleUse" type="select" :select-open="vehicleUseShow"
  294. @click="vehicleUseShow = true" :custom-style="{textAlign:'right'}"
  295. placeholder-style="color:#808080" placeholder="请选择车辆用途" />
  296. <u-select v-if="carInfo.carnature=='01'" mode="single-column"
  297. :list="businessVehicleUseoptions" v-model="vehicleUseShow" label-name="dictTag"
  298. value-name="dictValue" @confirm="dictionaryConfirm($event,'vehicleUse')"></u-select>
  299. <u-select v-else mode="single-column" :list="outOfBusinessVehicleUseoptions"
  300. v-model="vehicleUseShow" label-name="dictTag" value-name="dictValue"
  301. @confirm="dictionaryConfirm($event,'vehicleUse')"></u-select>
  302. </u-form-item>
  303. <u-form-item label="车辆类型: " prop="cartype">
  304. <u-input v-model="carInfo1.cartype" type="select" :select-open="cartypeShow"
  305. @click="cartypeShow = true" :custom-style="{textAlign:'right'}"
  306. placeholder-style="color:#808080" placeholder="请选择车辆类型" />
  307. <u-select mode="single-column" :searchShow="true"
  308. :list="trafficManagementVehicleTypeoptions" v-model="cartypeShow" label-name="dictTag"
  309. value-name="dictValue" @confirm="dictionaryConfirm($event,'cartype')"></u-select>
  310. </u-form-item>
  311. <u-form-item label="车辆种类: " prop="cimodelclass">
  312. <u-input v-model="carInfo1.cimodelclass" type="select" :select-open="cimodelclassShow"
  313. @click="cimodelclassShow = true" :custom-style="{textAlign:'right'}"
  314. placeholder-style="color:#808080" placeholder="请选择车辆种类" />
  315. <u-select mode="single-column" :list="vehicleTypeoptions" v-model="cimodelclassShow"
  316. label-name="dictTag" value-name="dictValue"
  317. @confirm="dictionaryConfirm($event,'cimodelclass')"></u-select>
  318. </u-form-item>
  319. <u-form-item label="年款:">
  320. <u-input type="text" placeholder="请输入年款" v-model="carInfo.caryear"
  321. :custom-style="{textAlign:'right'}"></u-input>
  322. </u-form-item>
  323. <u-form-item label="座位数:">
  324. <u-input type="text" placeholder="请输入座位数" v-model="carInfo.seatCount"
  325. :custom-style="{textAlign:'right'}"></u-input>
  326. </u-form-item>
  327. <u-form-item label="排量:">
  328. <u-input type="text" placeholder="请输入排量" v-model="carInfo.enginedesc"
  329. :custom-style="{textAlign:'right'}"></u-input>
  330. </u-form-item>
  331. <u-form-item label="功率:">
  332. <u-input type="text" placeholder="请输入功率" v-model="carInfo.powerScale"
  333. :custom-style="{textAlign:'right'}"></u-input>
  334. </u-form-item>
  335. <u-form-item label="新车购置价:" prop="purchasePrice">
  336. <u-input type="text" placeholder="请输入新车购置价" v-model="carInfo.purchasePrice"
  337. :custom-style="{textAlign:'right'}" @input="upperCaseType('purchasePrice')"></u-input>
  338. </u-form-item>
  339. </u-form>
  340. </view>
  341. </view>
  342. </view>
  343. <view class="fixed dis a-c j-c">
  344. <u-button type="warning" class="fiexdbtn" shape="circle" @click="toNext">立即投保</u-button>
  345. </view>
  346. <u-popup v-model="carModelLookupModal" mode="bottom" border-radius="10" height="1300">
  347. <view class="ZJcheckboxGroup dis f-c">
  348. <view class="title dis a-c j-c">
  349. <text>车辆型号</text>
  350. </view>
  351. <scroll-view scroll-y="true" class="scolcentent">
  352. <view class="noDataIndicator dis f-c a-c mt-4" v-if="carTypeVINList.length<0">
  353. <image src="../../static/image/car-insure/noDataIndicator.png" mode=""></image>
  354. <text>搜索不出内容,请点击下一步选择品牌型号,再进行报价!</text>
  355. </view>
  356. <view class="row mt-2" v-for="(item,index) in carTypeVINList" :key="index"
  357. :class="isFocusedIndex==index?'carTypeColor':''" @tap="carTypeClick(index,item)">
  358. <view class="row_header dis a-c j-s">
  359. <view class="left">{{item.modelName }}</view>
  360. <view class="right">¥{{item.replacementValue}}</view>
  361. </view>
  362. <view class="row_body dis f-c">
  363. <view class="dis j-s">
  364. <view style="margin-right: 5px;">车系:{{item.series}}</view>
  365. <view>{{item.remark}}</view>
  366. <view style="margin-left: auto;">({{item.ratedPassengerCapacity}}座)</view>
  367. </view>
  368. <view class="dis j-s">
  369. <view>年款:<text style="color: #2432ff;">{{item.marketYear}}</text></view>
  370. <view>排量:<text style="color: #2432ff;">{{item.displacement}}</text></view>
  371. <view>功率:<text style="color: #2432ff;">{{item.powerScale}}</text></view>
  372. </view>
  373. </view>
  374. </view>
  375. </scroll-view>
  376. <view class="operateBtn dis j-s a-c mb-1">
  377. <view class="confirm dis a-c j-c" @click="carModelLookupSubmit()">
  378. 确定
  379. </view>
  380. <view class="confirm dis a-c j-c" v-if="carTypeVINList.length<0" @click="carModelLookupNext()">
  381. 下一步
  382. </view>
  383. </view>
  384. </view>
  385. </u-popup>
  386. <u-popup v-model="brandModelLookupModal" mode="bottom" border-radius="10" height="1300">
  387. <view class="ZJcheckboxGroup dis f-c">
  388. <view class="title dis a-c j-c">
  389. <text>品牌型号</text>
  390. </view>
  391. <view class="">
  392. <u-input v-model="marketYear" type="select" :border="true" :select-open="marketYearShow"
  393. @click="marketYearShow = true" :custom-style="{textAlign:'center'}"
  394. placeholder-style="color:#808080" placeholder="选择年款"
  395. style="float: right;width: 100px;margin: 10px;" />
  396. </view>
  397. <scroll-view scroll-y="true" class="scolcentent">
  398. <view class="noDataIndicator dis f-c a-c" v-if="brandModelList && brandModelList.length==0">
  399. <image src="../../static/image/car-insure/noDataIndicator.png" mode=""></image>
  400. <text>搜索不出内容,请点击选择品牌型号,再进行报价!</text>
  401. </view>
  402. <view class="row mt-2" v-for="(item,index) in brandModelList" :key="index"
  403. :class="brandModelIndex==index?'carTypeColor':''" @tap="brandModelClick(index,item)">
  404. <view class="row_header dis a-c j-s">
  405. <view class="left">{{item.modelName }}</view>
  406. <view class="right">¥{{item.replacementValue}}</view>
  407. </view>
  408. <view class="row_body dis f-c">
  409. <view class="dis j-s">
  410. <view style="margin-right: 5px;">车系:{{item.series}}</view>
  411. <view>{{item.remark}}</view>
  412. <view style="margin-left: auto;">({{item.ratedPassengerCapacity}}座)</view>
  413. </view>
  414. <view class="dis j-s">
  415. <view>年款:<text style="color: #2432ff;">{{item.marketYear}}</text></view>
  416. <view>排量:<text style="color: #2432ff;">{{item.displacement}}</text></view>
  417. <view>功率:<text style="color: #2432ff;">{{item.powerScale}}</text></view>
  418. </view>
  419. </view>
  420. </view>
  421. </scroll-view>
  422. <view class="operateBtn dis j-s a-c mb-1">
  423. <view class="confirm dis a-c j-c" @click="brandModelLookupSubmit()">
  424. 确定
  425. </view>
  426. </view>
  427. </view>
  428. </u-popup>
  429. <OCRComponent :showModal='OCRShow' @closePopup="closePopup" :tabslist="tabslist" @tabschange="OCRtabschange"
  430. :tabsCurrent="tabsCurrent" :checkType='checkType' @carCallback="carCallback">
  431. </OCRComponent>
  432. <u-keyboard ref="uKeyboard" mode="car" :keyboardType="keyboardType" v-model="keyboardShow"
  433. @change="keyboardchange" @backspace="backspacesss" @confirm="backsconfirm"></u-keyboard>
  434. <u-picker v-model="marketYearShow" mode="time" :params="params1" @confirm="marketYearDateconfirm"></u-picker>
  435. <u-toast ref="uToast" />
  436. </view>
  437. </template>
  438. <script>
  439. import {
  440. nextTick
  441. } from 'process';
  442. import OCRComponent from '@/components/modules/carInsure/OCRComponent/OCRComponent.vue'; //引用图片信息检查插件
  443. var dateTime = new Date();
  444. let Year = dateTime.getFullYear();
  445. let Month = Number(dateTime.getMonth() + 1);
  446. export default {
  447. components: {
  448. OCRComponent,
  449. },
  450. data() {
  451. return {
  452. //品牌弹窗
  453. params1: {
  454. year: true, //年
  455. month: false, //月
  456. day: false, //日
  457. hour: false, //时
  458. minute: false, //分
  459. second: false, //秒
  460. },
  461. marketYearShow: false,
  462. marketYear: "", //年款查询条件
  463. brandModelIndex: "99",
  464. brandModelList: null,
  465. brandModelListIndex: {},
  466. brandModelLookupModal: false,
  467. //车型弹窗
  468. isFocusedIndex: "99",
  469. carTypeVINList: [],
  470. carTypeVINListIndex: {},
  471. carModelLookupModal: false,
  472. carRules: {
  473. frameNo: [{
  474. required: true,
  475. message: '请输入车辆识别码',
  476. trigger: ['blur', 'change'],
  477. },
  478. {
  479. pattern: /^([0-9A-Z]){17}$/,
  480. message: '请输入正确的车辆识别码',
  481. }
  482. ],
  483. modelcname: [{
  484. required: true,
  485. message: '请输入品牌型号',
  486. trigger: ['blur', 'change'],
  487. }],
  488. engineNo: [{
  489. required: true,
  490. message: '请输入发动机号',
  491. trigger: ['blur', 'change'],
  492. }],
  493. purchasePrice: [{
  494. required: true,
  495. message: '请输入新车购置价',
  496. trigger: ['blur', 'change'],
  497. },
  498. ],
  499. completeKerbMass: [{
  500. required: true,
  501. message: '请输入整备质量',
  502. trigger: ['blur', 'change'],
  503. }],
  504. carnature: [{
  505. required: true,
  506. message: '使用性质必选',
  507. trigger: 'change',
  508. }],
  509. energyType: [{
  510. required: true,
  511. message: '能源种类必选',
  512. trigger: 'change',
  513. }],
  514. vehicleUse: [{
  515. required: true,
  516. message: '车辆用途必选',
  517. trigger: 'change',
  518. }],
  519. cartype: [{
  520. required: true,
  521. message: '车辆类型必选',
  522. trigger: 'change',
  523. }],
  524. cimodelclass: [{
  525. required: true,
  526. message: '车辆种类必选',
  527. trigger: 'change',
  528. }],
  529. registerDate: [{
  530. required: true,
  531. message: '请选择注册日期',
  532. trigger: 'change',
  533. },
  534. {
  535. pattern: /^\d{4}-\d{2}-\d{2}$/,
  536. message: '注册日期格式错误',
  537. }
  538. ],
  539. issueDate: [{
  540. required: true,
  541. message: '请选择发证日期',
  542. trigger: 'change',
  543. },
  544. {
  545. pattern: /^\d{4}-\d{2}-\d{2}$/,
  546. message: '发证日期日期格式错误',
  547. }
  548. ],
  549. },
  550. model: {
  551. name: '',
  552. sex: '',
  553. likeFruit: '',
  554. intro: '',
  555. payType: '支付宝',
  556. agreement: false,
  557. region: '',
  558. goodsType: '2',
  559. phone: '',
  560. code: '',
  561. password: '',
  562. rePassword: '',
  563. remember: false,
  564. photo: ''
  565. },
  566. errorType: ['border-bottom', 'toast'],
  567. isActive: true,
  568. vehicleType: false, //车型查询调用标识
  569. keyboardType: false, //键盘中/英切换标识
  570. endYear: Year,
  571. endMonth: Month,
  572. params: {
  573. year: true, //年
  574. month: true, //月
  575. day: true, //日
  576. hour: false, //时
  577. minute: false, //分
  578. second: false, //秒
  579. },
  580. //影像信息
  581. carSwitching: true, //true识别 false录入
  582. keyboardShow: false,
  583. insuranceType: 2,
  584. checked: true,
  585. LicenseInputValue: ['晋', 'A', '', '', '', '', '', ''],
  586. currentInputIndex: 0,
  587. carInfoPositiveList: [], //车辆
  588. ownerInfoPositiveList: [], //车主
  589. policyHolderInfoPositiveList: [], //投保人
  590. insuredPersonInfoPositiveList: [], //被保人
  591. ownerInfo: {
  592. name: "",
  593. identifyType: "01",
  594. identifyNumber: "",
  595. addr: "",
  596. gender: "", //性别
  597. email: "", //邮箱
  598. mobile: "",
  599. identifyValidDate: "", //有效期起期
  600. identifyValidEndDate: "", //有效期止期
  601. age: "", //年龄
  602. },
  603. policyHolderInfo: {
  604. name: "",
  605. identifyType: "01",
  606. identifyNumber: "",
  607. addr: "",
  608. gender: "", //性别
  609. email: "",
  610. mobile: "",
  611. identifyValidDate: "", //有效期起期
  612. identifyValidEndDate: "", //有效期止期
  613. age: "", //年龄
  614. },
  615. insuredPersonInfo: {
  616. name: "",
  617. identifyType: "01",
  618. identifyNumber: "",
  619. addr: "",
  620. gender: "", //性别
  621. email: "",
  622. mobile: "",
  623. identifyValidDate: "", //有效期起期
  624. identifyValidEndDate: "", //有效期止期
  625. age: "", //年龄
  626. },
  627. //车辆信息
  628. carInfo: {
  629. licenseNo: "", //车牌号
  630. brandName: "", //车辆品牌型号
  631. vinNo: "", //车架号
  632. engineNo: "", //发动机号
  633. modelCode: "", //车型编码
  634. seatCount: "", //核定载客量 核定载人数
  635. purchasePrice: "", //新车购置价最低,行业实际价值,协商价值
  636. carBrand: "", //车型品牌
  637. ciCarName: "", //行业车型名称
  638. ciModelCode: "", //行业车型编码
  639. completeKerbMass: "", //整备质量
  640. exhaustScale: "", //排量
  641. factory: "", //工厂名称
  642. factoryid: "", //工厂编码
  643. frameNo: "", //车架号
  644. licenseTypeCode: "02", //号牌种类
  645. vehicleclass: "", //车辆类型
  646. familyName: "", //车型
  647. modelcname: "", //车型名称
  648. powertypecode: "", //燃料类型编码
  649. vehicleweight: "", //总质量
  650. limitLoad: "", //核定载质量
  651. caryear: "", //年款
  652. cimodelclass: "A0", //车辆种类客车A0 货车H0
  653. cartype: "K33", //车辆类型
  654. powertype: "汽油", //燃料类型
  655. energyType: "0", //能源种类
  656. enginedesc: "", //排量
  657. powerScale: "", //功率
  658. registerDate: "", //注册日期
  659. issueDate: "", //发证日期
  660. transferFlag: false, //过户标志
  661. transferFlagBi: false, //商业过户标志
  662. transferDate: "", //过户日期
  663. loanStatus: 0, //贷款标志
  664. firstBeneMan: "", //第一受益人
  665. noLicenseFlag: false, //是否新车
  666. carnature: "02", //使用性质 家庭自用8A 非营业企业8B 非营业党政机关,事业团体8C 非营业货车8D
  667. property: "1", //所属性质 1个人 2企业 3个人
  668. outOfInsurance: false, //脱保
  669. usedCar: false, //二手车
  670. vehicleUse: "05" //车辆用途
  671. },
  672. carInfo1: {
  673. carnature: "非营业",
  674. energyType: "燃油",
  675. vehicleUse: "家庭自用",
  676. cartype: "轿车",
  677. cimodelclass: "客车",
  678. },
  679. registerDateShow: false, //注册日期
  680. issueDateShow: false, //发证日期
  681. transferDateShow: false, //转移登记日期
  682. carnatureShow: false, //使用性质
  683. energyTypeShow: false, //能源种类
  684. vehicleUseShow: false, //车辆用途
  685. cartypeShow: false, //车辆类型
  686. cimodelclassShow: false, //车辆种类
  687. /* 数据字典 */
  688. natureOfVehicleUseoptions: [],
  689. vehicleTypeoptions: [],
  690. trafficManagementVehicleTypeoptions: [],
  691. energyTypeoptions: [],
  692. businessVehicleUseoptions: [],
  693. outOfBusinessVehicleUseoptions: [],
  694. /* 数据字典 */
  695. tabslist: [{
  696. name: '行驶证识别'
  697. }, ],
  698. OCRShow: false,
  699. tabsCurrent: 0,
  700. checkType: "carInfo", //组件类型
  701. carfrontImg: null, //展示图片
  702. carbackImg: null, //展示图片
  703. cardeg: 0, //旋转角度
  704. word: "word",
  705. }
  706. },
  707. async onLoad() {
  708. this.$http.get('/sysMenuRecord/add?type=1&menuType=1')
  709. this.getDicType("businessVehicleUse"); //车辆用途(营业)
  710. this.getDicType("outOfBusinessVehicleUse"); //车辆用途(非营业)
  711. this.getDicType("natureOfVehicleUse"); //车辆性质
  712. this.getDicType("vehicleType"); //车辆种类
  713. this.getDicType("trafficManagementVehicleType"); //车辆类型
  714. this.getDicType("energyType"); //能源种类
  715. if (this.checked) {
  716. this.LicenseInputValue.forEach((val, index) => {
  717. if (index < 7) {
  718. this.$set(this.LicenseInputValue, index, "*");
  719. }
  720. })
  721. let valueList = this.LicenseInputValue;
  722. const str = valueList.join("")
  723. this.carInfo.licenseNo = str;
  724. } else {
  725. this.LicenseInputValue.forEach((val, index) => {
  726. this.$set(this.LicenseInputValue, index, "");
  727. })
  728. this.carInfo.licenseNo = "";
  729. }
  730. },
  731. onReady() {
  732. this.$refs.carForm.setRules(this.carRules);
  733. },
  734. onShow() {
  735. let historyInfo = uni.getStorageSync('historyInfo');
  736. if (historyInfo) {
  737. this.carInfo = historyInfo.carInfo;
  738. this.ownerInfo = historyInfo.ownerInfo;
  739. this.policyHolderInfo = historyInfo.policyHolderInfo;
  740. this.insuredPersonInfo = historyInfo.insuredPersonInfo;
  741. this.carInfoPositiveList = historyInfo.carInfoPositiveList;
  742. this.ownerInfoPositiveList = historyInfo.ownerInfoPositiveList;
  743. this.policyHolderInfoPositiveList = historyInfo.policyHolderInfoPositiveList;
  744. this.insuredPersonInfoPositiveList = historyInfo.insuredPersonInfoPositiveList;
  745. }
  746. },
  747. watch: {
  748. carSwitching(newVal) {
  749. if (newVal) {
  750. this.$nextTick(() => {
  751. this.$refs.carForm.setRules(this.carRules);
  752. })
  753. } else {
  754. this.$nextTick(() => {
  755. this.$refs.carForm1.setRules(this.carRules);
  756. })
  757. }
  758. },
  759. currentInputIndex(newVal) {
  760. switch (newVal) {
  761. case 0:
  762. this.keyboardType = false;
  763. break;
  764. default:
  765. this.keyboardType = true;
  766. }
  767. },
  768. "carInfo.energyType": {
  769. handler(val) {
  770. if (val) {
  771. this.carInfo1.energyType = this.dictionaryMatching(this.energyTypeoptions,
  772. this
  773. .carInfo
  774. .energyType);
  775. }
  776. },
  777. deep: true
  778. },
  779. "carInfo.cartype": {
  780. handler(val) {
  781. if (val) {
  782. this.carInfo1.cartype = this.dictionaryMatching(this.trafficManagementVehicleTypeoptions,
  783. this
  784. .carInfo
  785. .cartype);
  786. }
  787. },
  788. deep: true
  789. },
  790. },
  791. methods: {
  792. btn_click() {
  793. uni.navigateTo({
  794. url: '/pages/chat/chat'
  795. })
  796. },
  797. toggleSwitch() {
  798. this.isActive = !this.isActive;
  799. },
  800. rotatefront(int) {
  801. this[int] = this[int] == 270 ? 0 : this[int] + 90;
  802. },
  803. rotateback(int) {
  804. this[int] = this[int] == 0 ? 270 : this[int] - 90;
  805. },
  806. dictionaryConfirm(e, name) {
  807. if (name == 'carnature') {
  808. this.carInfo1['vehicleUse'] = "";
  809. this.carInfo['vehicleUse'] = "";
  810. }
  811. this.carInfo[name] = e[0].value;
  812. this.carInfo1[name] = e[0].label;
  813. },
  814. async getDicType(type) {
  815. let res = await this.$http.get('/sysDict/dictDetails/' + type);
  816. if (res.code == 200) {
  817. this[type + 'options'] = res.data.ddList;
  818. // if (type == "trafficManagementVehicleType") {
  819. // this.carInfo1.cartype = this.dictionaryMatching(this.trafficManagementVehicleTypeoptions, this
  820. // .carInfo
  821. // .cartype)
  822. // this.carInfo1.cimodelclass = this.dictionaryMatching(this.vehicleTypeoptions,
  823. // this
  824. // .carInfo
  825. // .cimodelclass)
  826. // }
  827. }
  828. },
  829. //字典name匹配
  830. dictionaryMatching(list, value) {
  831. let obj = list.find(val => val.dictValue == value);
  832. return obj.dictTag;
  833. },
  834. //OC识别返回信息
  835. async carCallback(obj) {
  836. this.carfrontImg = obj.frontImg;
  837. this.carbackImg = obj.backImg;
  838. this.carInfoPositiveList = obj.ImgList;
  839. Object.assign(this.carInfo, obj.Info);
  840. this.carInfo1.cimodelclass = this.dictionaryMatching(this.vehicleTypeoptions,
  841. this
  842. .carInfo
  843. .cimodelclass)
  844. this.carInfo1.cartype = this.dictionaryMatching(this.trafficManagementVehicleTypeoptions,
  845. this
  846. .carInfo
  847. .cartype);
  848. this.carInfo1.carnature = this.carInfo.carnature ? this.dictionaryMatching(this
  849. .natureOfVehicleUseoptions,
  850. this
  851. .carInfo
  852. .carnature) : "";
  853. if (this.carInfo.carnature && this.carInfo.vehicleUse) {
  854. this.carInfo1.vehicleUse = this.carInfo.carnature == '02' ? this.dictionaryMatching(this
  855. .outOfBusinessVehicleUseoptions,
  856. this
  857. .carInfo
  858. .vehicleUse) : this.dictionaryMatching(this
  859. .BusinessVehicleUseoptions,
  860. this
  861. .carInfo
  862. .vehicleUse);
  863. } else {
  864. this.carInfo1.vehicleUse = "";
  865. }
  866. this.OCRShow = false;
  867. this.carModelLookupModal = true;
  868. let res = await this.$http.get('/order/carModel/vinSearch?frameNo=' + this.carInfo.frameNo);
  869. this.carTypeVINList = res.data;
  870. },
  871. upperCaseType(type) {
  872. this.carInfo[type] = this.carInfo[type].toUpperCase();
  873. if (type == 'frameNo') {
  874. this.carInfo.vinNo = this.carInfo.frameNo.trim();
  875. }
  876. },
  877. //
  878. transferFlagchange(status) {
  879. if (status) {
  880. this.carInfo.transferDate = this.carInfo.issueDate;
  881. } else {
  882. this.carInfo.transferDate = ""
  883. }
  884. },
  885. Dateconfirm(e, obj, param) {
  886. this[obj][param] = e.year + '-' + e.month + '-' + e.day;
  887. },
  888. //下一步
  889. toNext() {
  890. switch (this.insuranceType) {
  891. case 1:
  892. if (!this.carInfo.licenseNo && !this.islicense(this.carInfo.licenseNo)) {
  893. return uni.showToast({
  894. icon: "none",
  895. title: '请填写正确的车牌号码',
  896. duration: 1500
  897. });
  898. }
  899. let params = {
  900. carInfo: this
  901. .carInfo,
  902. ownerInfo: this
  903. .ownerInfo,
  904. policyHolderInfo: this
  905. .policyHolderInfo,
  906. insuredPersonInfo: this
  907. .insuredPersonInfo,
  908. carInfoPositiveList: this
  909. .carInfoPositiveList, //车辆
  910. ownerInfoPositiveList: this
  911. .ownerInfoPositiveList, //车主
  912. policyHolderInfoPositiveList: this
  913. .policyHolderInfoPositiveList, //投保人
  914. insuredPersonInfoPositiveList: this
  915. .insuredPersonInfoPositiveList, //被保人
  916. }
  917. this.navigate({
  918. url: "/pages/carInsure/Information?licenseNo=" + encodeURIComponent(this.carInfo
  919. .licenseNo) + '&historyInfo=' + `${JSON.stringify(params)}`
  920. }, "navigateTo", true)
  921. break;
  922. case 2:
  923. if (!this.carInfo.licenseNo && !this.carfrontImg) {
  924. return uni.showToast({
  925. icon: "none",
  926. title: '请上传资料或录入信息后再投保',
  927. duration: 1500
  928. });
  929. }
  930. if (this.carSwitching) {
  931. this.$refs['carForm'].validate(valid => {
  932. if (valid) {
  933. if (this.vehicleType) {
  934. this.navigate({
  935. url: '/pages/carInsure/Information',
  936. success: (res) => {
  937. res.eventChannel.emit(
  938. "acceptData", {
  939. carInfo: this
  940. .carInfo,
  941. ownerInfo: this
  942. .ownerInfo,
  943. policyHolderInfo: this
  944. .policyHolderInfo,
  945. insuredPersonInfo: this
  946. .insuredPersonInfo,
  947. carInfoPositiveList: this
  948. .carInfoPositiveList, //车辆
  949. ownerInfoPositiveList: this
  950. .ownerInfoPositiveList, //车主
  951. policyHolderInfoPositiveList: this
  952. .policyHolderInfoPositiveList, //投保人
  953. insuredPersonInfoPositiveList: this
  954. .insuredPersonInfoPositiveList, //被保人
  955. })
  956. }
  957. }, "navigateTo", true);
  958. } else {
  959. this.$refs.uToast.show({
  960. title: '检测到未精准校验车型,即将跳转到车型界面选择,请等待。。。',
  961. type: 'warning',
  962. icon: false,
  963. })
  964. setTimeout(() => {
  965. this.navigate({
  966. url: '/pages/carInsure/carType?frameNo=' +
  967. encodeURIComponent(this.carInfo
  968. .frameNo) +
  969. '&vehicleType=true'
  970. }, "navigateTo", true);
  971. }, 2000)
  972. }
  973. }
  974. });
  975. } else {
  976. this.$refs['carForm1'].validate(valid => {
  977. if (valid) {
  978. if (this.vehicleType) {
  979. this.navigate({
  980. url: '/pages/carInsure/Information',
  981. success: (res) => {
  982. res.eventChannel.emit(
  983. "acceptData", {
  984. carInfo: this
  985. .carInfo,
  986. ownerInfo: this
  987. .ownerInfo,
  988. policyHolderInfo: this
  989. .policyHolderInfo,
  990. insuredPersonInfo: this
  991. .insuredPersonInfo,
  992. carInfoPositiveList: this
  993. .carInfoPositiveList, //车辆
  994. ownerInfoPositiveList: this
  995. .ownerInfoPositiveList, //车主
  996. policyHolderInfoPositiveList: this
  997. .policyHolderInfoPositiveList, //投保人
  998. insuredPersonInfoPositiveList: this
  999. .insuredPersonInfoPositiveList, //被保人
  1000. })
  1001. }
  1002. }, "navigateTo", true);
  1003. } else {
  1004. this.$refs.uToast.show({
  1005. title: '检测到未精准校验车型,即将跳转到车型界面选择,请等待。。。',
  1006. type: 'warning',
  1007. icon: false,
  1008. })
  1009. setTimeout(() => {
  1010. this.navigate({
  1011. url: '/pages/carInsure/carType?frameNo=' +
  1012. encodeURIComponent(this.carInfo
  1013. .frameNo) +
  1014. '&vehicleType=true'
  1015. }, "navigateTo", true);
  1016. }, 2000)
  1017. }
  1018. }
  1019. });
  1020. }
  1021. break;
  1022. default:
  1023. }
  1024. // this.navigate({
  1025. // url: '/pages/carInsure/Information',
  1026. // })
  1027. },
  1028. switchChange(value) {
  1029. if (value) {
  1030. this.LicenseInputValue.forEach((val, index) => {
  1031. if (index < 7) {
  1032. this.$set(this.LicenseInputValue, index, "*");
  1033. }
  1034. })
  1035. let valueList = this.LicenseInputValue;
  1036. const str = valueList.join("")
  1037. this.carInfo.licenseNo = str;
  1038. } else {
  1039. this.LicenseInputValue.forEach((val, index) => {
  1040. this.$set(this.LicenseInputValue, index, "");
  1041. })
  1042. this.carInfo.licenseNo = "";
  1043. }
  1044. },
  1045. // 通过车架号获取车型
  1046. toChooseVin(cctype) {
  1047. if (cctype == '' || cctype == null) {
  1048. return uni.showToast({
  1049. icon: 'none',
  1050. title: '请输入车架号',
  1051. duration: 1500
  1052. });
  1053. } else {
  1054. if (!this.isFrameno(cctype.trim())) {
  1055. return uni.showToast({
  1056. title: '请输入正确的车辆识别码',
  1057. icon: "none"
  1058. });
  1059. }
  1060. this.getCarModel(cctype);
  1061. }
  1062. },
  1063. //车型查询
  1064. async getCarModel(cctype) {
  1065. this.carModelLookupModal = true;
  1066. let res = await this.$http.get('/order/carModel/vinSearch?frameNo=' + cctype);
  1067. this.carTypeVINList = res.data;
  1068. },
  1069. //品牌型号查询
  1070. async getBrandModel(cctype, marketYear) {
  1071. this.brandModelLookupModal = true;
  1072. let cctypeName = cctype.replace(/[^u4e00-u9fa5|,]+/ig, ''); //去掉中文
  1073. let res = await this.$http.post('/order/zhongMeiApi/modelsQuery', {
  1074. modelName: cctypeName,
  1075. marketYear: marketYear
  1076. });
  1077. this.brandModelList = res.data;
  1078. },
  1079. carTypeClick(index, item) {
  1080. this.isFocusedIndex = index;
  1081. this.carTypeVINListIndex = item;
  1082. },
  1083. //车型赋值
  1084. carModelLookupSubmit() {
  1085. if (this.isFocusedIndex !== "99") {
  1086. this.carInfo.brandName = this.carTypeVINListIndex.brandCN; //车型
  1087. this.carInfo.modelcname = this.carTypeVINListIndex.modelName; //车型
  1088. this.carInfo.caryear = this.carTypeVINListIndex.marketYear; //年款
  1089. this.carInfo.seatCount = this.carTypeVINListIndex.ratedPassengerCapacity; //座位数
  1090. this.carInfo.purchasePrice = this.carTypeVINListIndex.replacementValue; //价格
  1091. this.carInfo.modelCode = this.carTypeVINListIndex.modelCode; //车辆型号编码
  1092. this.carInfo.familyName = this.carTypeVINListIndex.series; //系列
  1093. this.carInfo.enginedesc = this.carTypeVINListIndex.displacement; //排量
  1094. this.carInfo.energyType = this.carTypeVINListIndex.fuelTypeCode; //燃油种类
  1095. this.carInfo.powerScale = this.carTypeVINListIndex.powerScale; //功率
  1096. this.carModelLookupModal = false;
  1097. this.vehicleType = true;
  1098. } else {
  1099. return uni.showToast({
  1100. title: '未选择车型',
  1101. icon: "none"
  1102. });
  1103. }
  1104. },
  1105. carModelLookupNext() {
  1106. this.carModelLookupModal = false;
  1107. this.getBrandModel(this.carInfo.modelcname);
  1108. },
  1109. //品牌
  1110. brandModelClick(index, item) {
  1111. this.brandModelIndex = index;
  1112. this.brandModelListIndex = item;
  1113. },
  1114. //品牌型号赋值
  1115. brandModelLookupSubmit() {
  1116. if (this.brandModelIndex !== "99") {
  1117. this.carInfo.brandName = this.brandModelListIndex.brandCN; //车型
  1118. this.carInfo.modelcname = this.brandModelListIndex.modelName; //车型
  1119. this.carInfo.caryear = this.brandModelListIndex.marketYear; //年款
  1120. this.carInfo.seatCount = this.brandModelListIndex.ratedPassengerCapacity; //座位数
  1121. this.carInfo.purchasePrice = this.brandModelListIndex.replacementValue; //价格
  1122. this.carInfo.modelCode = this.brandModelListIndex.modelCode; //车辆型号编码
  1123. this.carInfo.familyName = this.brandModelListIndex.series; //系列
  1124. this.carInfo.enginedesc = this.brandModelListIndex.displacement; //排量
  1125. this.carInfo.energyType = this.brandModelListIndex.fuelTypeCode; //燃油种类
  1126. this.carInfo.powerScale = this.brandModelListIndex.powerScale; //功率
  1127. this.brandModelLookupModal = false;
  1128. this.vehicleType = true;
  1129. } else {
  1130. return uni.showToast({
  1131. title: '未选择车型',
  1132. icon: "none"
  1133. });
  1134. }
  1135. },
  1136. marketYearDateconfirm(e) {
  1137. this.marketYear = e.year;
  1138. this.getBrandModel(this.carInfo.modelcname, this.marketYear);
  1139. },
  1140. //跳转选择车辆类型页面
  1141. async toChooseVehicleType(cctype) {
  1142. if (cctype == '' || cctype == null) {
  1143. uni.showToast({
  1144. icon: 'none',
  1145. title: '请输入车型名称',
  1146. duration: 1500
  1147. });
  1148. } else {
  1149. this.getBrandModel(cctype);
  1150. }
  1151. },
  1152. //验证车牌号
  1153. islicense(val) {
  1154. let mPattern = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4,5}[A-Z0-9挂学警港澳]{1}$/;
  1155. return mPattern.test(val);
  1156. },
  1157. //验证车架号
  1158. isFrameno(str) {
  1159. let mPattern = /^([0-9A-Z]){17}$/;
  1160. return mPattern.test(str);
  1161. },
  1162. //OCR识别
  1163. ocrIdentify() {
  1164. this.OCRShow = !this.OCRShow;
  1165. },
  1166. closePopup() {
  1167. this.OCRShow = false;
  1168. },
  1169. OCRtabschange(e) {
  1170. this.tabsCurrent = e;
  1171. },
  1172. keyboardchange(val) {
  1173. this.$set(this.LicenseInputValue, this.currentInputIndex, val);
  1174. if (this.currentInputIndex < 7) {
  1175. this.currentInputIndex++;
  1176. }
  1177. },
  1178. backsconfirm() {
  1179. let valueList = this.LicenseInputValue;
  1180. const str = valueList.join("")
  1181. this.carInfo.licenseNo = str;
  1182. },
  1183. //键盘退格键
  1184. backspacesss() {
  1185. this.$set(this.LicenseInputValue, this.currentInputIndex, '')
  1186. if (this.currentInputIndex != 0) this.currentInputIndex--
  1187. },
  1188. inputSwitch(e) {
  1189. const {
  1190. index
  1191. } = e.currentTarget.dataset;
  1192. this.currentInputIndex = parseInt(index);
  1193. this.keyboardShow = true;
  1194. console.log(this.currentInputIndex);
  1195. },
  1196. }
  1197. }
  1198. </script>
  1199. <style lang="scss" scoped>
  1200. .search {
  1201. background: linear-gradient(270deg, #FF9A47 0%, #FF5600 100%);
  1202. border-radius: 2px;
  1203. color: #fff;
  1204. font-size: 22rpx;
  1205. padding: 1px 6px;
  1206. }
  1207. /deep/ {
  1208. .u-form-item {
  1209. padding: 2px 0;
  1210. }
  1211. .u-form-item .uni-input-placeholder {
  1212. color: grey !important;
  1213. }
  1214. .u-form-item__border-bottom--error[data-v-5e7216f1]:after {
  1215. border-color: #D42426;
  1216. }
  1217. .u-border-bottom:after {
  1218. border-bottom-width: 2px;
  1219. }
  1220. }
  1221. .uni-forms-item .uni-input-input {
  1222. text-align: end;
  1223. }
  1224. ::v-deep .uni-forms-item {
  1225. border-bottom: 1px solid #f2f2f2;
  1226. }
  1227. ::v-deep .uni-forms-item:last-child {
  1228. border: none;
  1229. }
  1230. page {
  1231. height: 100vh;
  1232. background: #F8FAFE;
  1233. }
  1234. .page {
  1235. padding: 16px 16px 50px 16px;
  1236. }
  1237. .banner {
  1238. width: 100%;
  1239. height: 202px;
  1240. image {
  1241. width: 100%;
  1242. height: 100%;
  1243. }
  1244. }
  1245. .carinfo {
  1246. width: 100%;
  1247. height: auto;
  1248. >.title {
  1249. padding: 10px;
  1250. border-bottom: 1px solid #f2f2f2;
  1251. >text {
  1252. font-weight: bold;
  1253. font-size: 15px;
  1254. }
  1255. .rounded {
  1256. width: 120px;
  1257. height: 28px;
  1258. background: #0052FF;
  1259. border-radius: 15px;
  1260. padding: 1px;
  1261. box-sizing: border-box;
  1262. position: relative;
  1263. .left {
  1264. width: 50%;
  1265. height: 100%;
  1266. background-color: white;
  1267. border-top-left-radius: 15px;
  1268. border-bottom-left-radius: 15px;
  1269. font-size: 24rpx;
  1270. color: #0052FF;
  1271. }
  1272. .right {
  1273. width: 50%;
  1274. height: 100%;
  1275. background-color: #fff;
  1276. border-top-right-radius: 15px;
  1277. border-bottom-right-radius: 15px;
  1278. font-size: 24rpx;
  1279. color: #0052FF;
  1280. }
  1281. .center {
  1282. width: 8px;
  1283. height: 100%;
  1284. background-color: white;
  1285. position: absolute;
  1286. border-left: 1px solid #0052FF;
  1287. border-right: 1px solid #0052FF;
  1288. top: 50%;
  1289. left: 50%;
  1290. transform: translate(-50%, -50%) skewX(-10deg);
  1291. }
  1292. .active {
  1293. background-color: #0052FF;
  1294. color: #fff;
  1295. }
  1296. }
  1297. }
  1298. .carinput {
  1299. width: 100%;
  1300. height: auto;
  1301. background: #FFFFFF;
  1302. box-shadow: 0px 4px 10px 0px #DAE3F4;
  1303. border-radius: 12px;
  1304. padding: 10px;
  1305. .top {
  1306. font-weight: bold;
  1307. font-size: 15px;
  1308. }
  1309. .so-plate-word {
  1310. width: 40px;
  1311. height: 40px;
  1312. background-color: #f8f8fa;
  1313. border-radius: 5px;
  1314. margin: 0 4px;
  1315. box-sizing: border-box;
  1316. text {
  1317. font-size: 18px;
  1318. font-weight: bold;
  1319. }
  1320. .newEnergy {
  1321. image {
  1322. width: 12px;
  1323. height: 12px;
  1324. }
  1325. text {
  1326. font-size: 16rpx;
  1327. color: #0eb78e;
  1328. }
  1329. }
  1330. }
  1331. .so-plate-dot {
  1332. width: 15upx;
  1333. height: 15upx;
  1334. background: #ccc;
  1335. border-radius: 50%;
  1336. margin: 0 5upx
  1337. }
  1338. .actives {
  1339. border: 1px solid #0052FF;
  1340. background-color: rgba(0, 82, 255, 0.1);
  1341. }
  1342. .newactives {
  1343. border: 1px solid #0eb78e;
  1344. background-color: rgba(14, 183, 142, 0.1);
  1345. }
  1346. }
  1347. .OCRcar {
  1348. width: 100%;
  1349. height: auto;
  1350. //手动自动切换阳寿
  1351. .manualSwitch {
  1352. border-radius: 4px;
  1353. border: 1px solid #FF5600;
  1354. padding: 2px 5px;
  1355. image {
  1356. width: 18px;
  1357. height: 18px;
  1358. margin-right: 5px;
  1359. }
  1360. text {
  1361. font-weight: bold;
  1362. }
  1363. }
  1364. .title {
  1365. color: #FF5600;
  1366. text:nth-child(1) {
  1367. font-size: 15px;
  1368. font-weight: bold;
  1369. color: #232832;
  1370. }
  1371. }
  1372. .ocr {
  1373. width: 100%;
  1374. height: auto;
  1375. background-color: white;
  1376. box-shadow: 0px 4px 10px 0px #DAE3F4;
  1377. border-radius: 12px;
  1378. .content {
  1379. padding: 0 15px;
  1380. }
  1381. .movable-view {
  1382. .operate-img {
  1383. width: 90%;
  1384. height: 38px;
  1385. background-color: #F9F9F9;
  1386. border-radius: 8px;
  1387. padding: 10px 25px;
  1388. margin-top: 10px;
  1389. >view:nth-child(2) {
  1390. background-color: rgba(0, 82, 255, 0.06);
  1391. border-radius: 4px 4px 4px 4px;
  1392. border: 1px solid #0052FF;
  1393. color: #0052FF;
  1394. padding: 3px 5px;
  1395. }
  1396. >view {
  1397. font-size: 14px;
  1398. }
  1399. image {
  1400. width: 22px;
  1401. height: 22px;
  1402. margin-right: 5px;
  1403. }
  1404. }
  1405. }
  1406. }
  1407. .content {
  1408. width: 100%;
  1409. height: auto;
  1410. background-color: white;
  1411. box-shadow: 0px 4px 10px 0px #DAE3F4;
  1412. border-radius: 12px;
  1413. .input-align-right {
  1414. padding: 20px;
  1415. }
  1416. }
  1417. }
  1418. }
  1419. .fixed {
  1420. width: 100%;
  1421. height: 80px;
  1422. padding: 10px;
  1423. position: fixed;
  1424. bottom: 0;
  1425. left: 0;
  1426. right: 0;
  1427. background: white;
  1428. z-index: 9;
  1429. border-top: 1px solid #f2f2f2;
  1430. .fiexdbtn {
  1431. width: 50%;
  1432. background: linear-gradient(to bottom, #FFF9F5, #FCD4C0, #F8A67D);
  1433. color: #FF5600;
  1434. font-weight: bold;
  1435. font-size: 18px;
  1436. border: 1px solid #F8A67D;
  1437. }
  1438. }
  1439. movable-area {
  1440. height: 220px;
  1441. width: 100%;
  1442. border-top-left-radius: 12px;
  1443. border-top-right-radius: 12px;
  1444. background-color: #D8D8D8;
  1445. overflow: hidden;
  1446. }
  1447. movable-view {
  1448. display: flex;
  1449. align-items: center;
  1450. justify-content: center;
  1451. height: 100%;
  1452. width: 100%;
  1453. }
  1454. .switch-container {
  1455. width: 80px;
  1456. height: 30px;
  1457. background-color: #E6EEFF;
  1458. border-radius: 15px;
  1459. position: relative;
  1460. cursor: pointer;
  1461. }
  1462. .switch-track {
  1463. width: 100%;
  1464. height: 100%;
  1465. background-color: #E6EEFF;
  1466. border-radius: 4px;
  1467. position: relative;
  1468. transition: background-color 0.3s ease;
  1469. }
  1470. .switch-thumb {
  1471. width: 40px;
  1472. height: 26px;
  1473. background-color: #0052FF;
  1474. border-radius: 4px;
  1475. position: absolute;
  1476. top: 2px;
  1477. left: 2px;
  1478. transition: transform 0.3s ease;
  1479. font-size: 13px;
  1480. color: #fff;
  1481. }
  1482. .switch-thumb1 {
  1483. width: 40px;
  1484. height: 26px;
  1485. position: absolute;
  1486. top: 2px;
  1487. left: 2px;
  1488. font-size: 12px;
  1489. color: rgba(0, 82, 255, 0.8);
  1490. }
  1491. .switch-thumb2 {
  1492. width: 40px;
  1493. height: 26px;
  1494. position: absolute;
  1495. top: 2px;
  1496. right: 2px;
  1497. font-size: 12px;
  1498. color: rgba(0, 82, 255, 0.8);
  1499. }
  1500. .thumbactive {
  1501. background-color: #0052FF;
  1502. transform: translateX(35px);
  1503. }
  1504. .thumbactive1 {
  1505. color: #fff;
  1506. }
  1507. .ZJcheckboxGroup {
  1508. padding: 0 10px;
  1509. .title {
  1510. font-size: 14px;
  1511. color: #232832;
  1512. font-weight: bold;
  1513. padding: 10px;
  1514. border-bottom: 1px solid #f2f2f2;
  1515. }
  1516. .scolcentent {
  1517. max-height: 480px;
  1518. padding-bottom: 40px;
  1519. .row {
  1520. width: 100%;
  1521. height: auto;
  1522. background: #F9FBFE;
  1523. box-shadow: 0px 2px 5px 0px #DAE3F4;
  1524. border-radius: 6px;
  1525. padding: 0 10px;
  1526. margin-bottom: 10px;
  1527. .row_header {
  1528. width: 100%;
  1529. font-size: 28upx;
  1530. border-bottom: 1upx solid #EEEEEE;
  1531. padding: 5px 0;
  1532. font-weight: bold;
  1533. }
  1534. .row_body {
  1535. width: 100%;
  1536. padding: 10px 0;
  1537. view {
  1538. font-weight: bold;
  1539. font-size: 12px;
  1540. }
  1541. }
  1542. }
  1543. .carTypeColor {
  1544. border: 1px solid #0052FF;
  1545. }
  1546. .row .row_header .left {
  1547. flex: 5;
  1548. overflow: hidden;
  1549. text-overflow: ellipsis;
  1550. white-space: nowrap;
  1551. color: #333;
  1552. }
  1553. .row .row_header .right {
  1554. flex: 2;
  1555. color: #FF5600;
  1556. text-align: right;
  1557. }
  1558. .row .row .row_body view>view {
  1559. margin: 0 5px;
  1560. }
  1561. }
  1562. .noDataIndicator {
  1563. width: 70%;
  1564. margin: auto;
  1565. text-align: center;
  1566. image {
  1567. width: 180px;
  1568. height: 180px;
  1569. }
  1570. text {
  1571. color: #0052FF;
  1572. font-size: 14px;
  1573. }
  1574. }
  1575. .operateBtn {
  1576. position: absolute;
  1577. bottom: 0;
  1578. left: 0;
  1579. right: 0;
  1580. font-weight: bold;
  1581. font-size: 16px;
  1582. .confirm {
  1583. width: 45%;
  1584. height: 46px;
  1585. color: #fff;
  1586. margin: auto;
  1587. background: #0052FF;
  1588. border-radius: 25px;
  1589. }
  1590. }
  1591. }
  1592. .inputPrompt {
  1593. height: 30px;
  1594. background: linear-gradient(90deg, #FFE3DF 0%, #FBE9E7 100%);
  1595. border-radius: 2px;
  1596. color: #FF1717;
  1597. font-size: 15px;
  1598. text-align: center;
  1599. line-height: 30px;
  1600. }
  1601. </style>