Information.vue 93 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650
  1. <template>
  2. <view class="page">
  3. <public-module></public-module>
  4. <service-widget @btnClick="btn_click"></service-widget>
  5. <view class="fixed dis a-c j-start" :style="headerStyle">
  6. <u-icon name="arrow-left" size="40" @tap="back"></u-icon>
  7. <text style="margin: auto;">{{headerText}}</text>
  8. </view>
  9. <!-- <view class="inputPrompt">
  10. 请尽量与上年度保单保持一致!
  11. </view> -->
  12. <view v-show="carInfoShow && carModificationLabel" class="Information" style="margin-top: 84px;">
  13. <text class="title">车辆信息</text>
  14. <view class="title dis j-s a-c">
  15. <view class="dis a-c">
  16. <text>行驶证识别</text>
  17. <view class="switch-container ml-2" @tap="toggleSwitch" v-if="carbackImg">
  18. <view class="switch-track">
  19. <view class="switch-thumb dis a-c j-c" :class="{ thumbactive: !isActive }"></view>
  20. <view class="switch-thumb1 dis a-c j-c" :class="{ thumbactive1: isActive }">主页</view>
  21. <view class="switch-thumb2 dis a-c j-c" :class="{ thumbactive1: !isActive }">副本</view>
  22. </view>
  23. </view>
  24. </view>
  25. <view class="manualSwitch dis a-c j-s" @click="carSwitching=!carSwitching">
  26. <image
  27. :src="carSwitching?'../../static/image/car-insure/manualInput.png':'../../static/image/car-insure/captureRecognition.png'"
  28. mode=""></image>
  29. <text>{{carSwitching?'手动输入':'拍照识别'}}</text>
  30. </view>
  31. </view>
  32. <view v-show="carSwitching" class="collapse">
  33. <image v-show="!carfrontImg" @tap="ocrIdentify('carInfo')" src="/static/image/car-insure/carbg.png"
  34. mode="" style="width: 100%;height: 198px;">
  35. </image>
  36. <view v-show="carfrontImg">
  37. <view class="movable-view dis f-c a-c">
  38. <movable-area>
  39. <movable-view direction="all" out-of-bounds :scale="true" :damping="30" :friction="10">
  40. <image v-if="isActive" :src="carfrontImg" mode="widthFix"
  41. :style="{width:'100%',height:'100%',transform:`rotate(-${cardeg}deg)`}">
  42. </image>
  43. <image v-else :src="carbackImg" mode="widthFix"
  44. :style="{width:'100%',height:'100%',transform:`rotate(-${cardeg}deg)`}">
  45. </image>
  46. </movable-view>
  47. </movable-area>
  48. <view class="operate-img dis j-s a-c">
  49. <view class="dis a-c" @tap="rotatefront('cardeg')">
  50. <image src="/static/image/car-insure/rotate1.png" mode=""></image>
  51. 左转
  52. </view>
  53. <view class="dis a-c" @tap="ocrIdentify('carInfo')">
  54. <image src="/static/image/car-insure/upload.png" mode=""></image>
  55. 上传
  56. </view>
  57. <view class="dis a-c" @tap="rotateback('cardeg')">
  58. <image src="/static/image/car-insure/rotate2.png" mode=""></image>
  59. 右转
  60. </view>
  61. </view>
  62. </view>
  63. <u-form :model="carInfo" :rules="carRules" ref="carForm" :errorType="errorType" label-width="200"
  64. style="padding: 0 15px;">
  65. <u-form-item label-width="120" label="车牌号:">
  66. <u-input placeholder="输入车牌号" v-model="carInfo.licenseNo" type="text"
  67. :custom-style="{textAlign:'right'}" @input="upperCaseType('licenseNo')"></u-input>
  68. </u-form-item>
  69. <u-form-item label="品牌型号:" prop="modelcname">
  70. <u-input placeholder="请输入品牌型号" v-model="carInfo.modelcname" type="text"
  71. :custom-style="{textAlign:'right'}" @input="upperCaseType('modelcname')"></u-input>
  72. <view class="search ml-1" @tap="toChooseVehicleType(carInfo.modelcname)">查询</view>
  73. </u-form-item>
  74. <u-form-item label="车辆识别码:" prop="frameNo">
  75. <u-input type="text" placeholder="请输入车辆识别码" v-model="carInfo.frameNo"
  76. :custom-style="{textAlign:'right'}" @input="upperCaseType('frameNo')"></u-input>
  77. <view class="search ml-1" @tap="toChooseVin(carInfo.frameNo)">查询</view>
  78. </u-form-item>
  79. <u-form-item label="发动机号:" prop="engineNo">
  80. <u-input type="text" placeholder="请输入发动机号" v-model="carInfo.engineNo"
  81. :custom-style="{textAlign:'right'}" @input="upperCaseType('engineNo')"></u-input>
  82. </u-form-item>
  83. <u-form-item label="注册日期:" prop="registerDate">
  84. <u-input type="select" :custom-style="{textAlign:'right'}" :select-open="registerDateShow"
  85. v-model="carInfo.registerDate" placeholder="请选择注册日期" @click="registerDateShow = true"
  86. placeholder-style="color:#808080"></u-input>
  87. <u-picker v-model="registerDateShow" mode="time" :params="params" :end-year="endYear"
  88. :end-month="endMonth" @confirm="e=> Dateconfirm(e,'carInfo','registerDate')"></u-picker>
  89. </u-form-item>
  90. <u-form-item label="发证日期:" prop="issueDate">
  91. <u-input type="select" :custom-style="{textAlign:'right'}" :select-open="issueDateShow"
  92. v-model="carInfo.issueDate" placeholder="请选择发证日期" @click="issueDateShow = true"
  93. placeholder-style="color:#808080"></u-input>
  94. <u-picker v-model="issueDateShow" mode="time" :params="params"
  95. @confirm="e=> Dateconfirm(e,'carInfo','issueDate')"></u-picker>
  96. </u-form-item>
  97. <u-form-item label="整备质量:" prop="completeKerbMass">
  98. <u-input type="text" placeholder="请输入整备质量" v-model="carInfo.completeKerbMass"
  99. :custom-style="{textAlign:'right'}"></u-input>
  100. </u-form-item>
  101. <u-form-item label="核定载质量:" prop="frameNo">
  102. <u-input type="text" placeholder="请输入核定载质量" v-model="carInfo.limitLoad"
  103. :custom-style="{textAlign:'right'}"></u-input>
  104. </u-form-item>
  105. <u-form-item label="使用性质:" prop="carnature">
  106. <u-input v-model="carInfo1.carnature" type="select" :select-open="carnatureShow"
  107. @click="carnatureShow = true" :custom-style="{textAlign:'right'}"
  108. placeholder-style="color:#808080" placeholder="请选择使用性质" />
  109. <u-select mode="single-column" :list="natureOfVehicleUseoptions" v-model="carnatureShow"
  110. label-name="dictTag" value-name="dictValue"
  111. @confirm="dictionaryConfirm($event,'carnature')"></u-select>
  112. </u-form-item>
  113. <u-form-item label="能源种类: " prop="energyType">
  114. <u-input v-model="carInfo1.energyType" type="select" :select-open="energyTypeShow"
  115. @click="energyTypeShow = true" :custom-style="{textAlign:'right'}"
  116. placeholder-style="color:#808080" placeholder="请选择能源种类" />
  117. <u-select mode="single-column" :list="energyTypeoptions" v-model="energyTypeShow"
  118. label-name="dictTag" value-name="dictValue"
  119. @confirm="dictionaryConfirm($event,'energyType')"></u-select>
  120. </u-form-item>
  121. <u-form-item label="车辆用途: " prop="vehicleUse">
  122. <u-input v-model="carInfo1.vehicleUse" type="select" :select-open="vehicleUseShow"
  123. @click="vehicleUseShow = true" :custom-style="{textAlign:'right'}"
  124. placeholder-style="color:#808080" placeholder="请选择车辆用途" />
  125. <u-select v-if="carInfo.carnature=='01'" mode="single-column"
  126. :list="businessVehicleUseoptions" v-model="vehicleUseShow" label-name="dictTag"
  127. value-name="dictValue" @confirm="dictionaryConfirm($event,'vehicleUse')"></u-select>
  128. <u-select v-else mode="single-column" :list="outOfBusinessVehicleUseoptions"
  129. v-model="vehicleUseShow" label-name="dictTag" value-name="dictValue"
  130. @confirm="dictionaryConfirm($event,'vehicleUse')"></u-select>
  131. </u-form-item>
  132. <u-form-item label="车辆类型: " prop="cartype">
  133. <u-input v-model="carInfo1.cartype" type="select" :select-open="cartypeShow"
  134. @click="cartypeShow = true" :custom-style="{textAlign:'right'}"
  135. placeholder-style="color:#808080" placeholder="请选择车辆类型" />
  136. <u-select mode="single-column" :searchShow="true"
  137. :list="trafficManagementVehicleTypeoptions" v-model="cartypeShow" label-name="dictTag"
  138. value-name="dictValue" @confirm="dictionaryConfirm($event,'cartype')"></u-select>
  139. </u-form-item>
  140. <u-form-item label="车辆种类: " prop="cimodelclass">
  141. <u-input v-model="carInfo1.cimodelclass" type="select" :select-open="cimodelclassShow"
  142. @click="cimodelclassShow = true" :custom-style="{textAlign:'right'}"
  143. placeholder-style="color:#808080" placeholder="请选择车辆种类" />
  144. <u-select mode="single-column" :list="vehicleTypeoptions" v-model="cimodelclassShow"
  145. label-name="dictTag" value-name="dictValue"
  146. @confirm="dictionaryConfirm($event,'cimodelclass')"></u-select>
  147. </u-form-item>
  148. <u-form-item label="年款:">
  149. <u-input type="text" placeholder="请输入年款" v-model="carInfo.caryear"
  150. :custom-style="{textAlign:'right'}"></u-input>
  151. </u-form-item>
  152. <u-form-item label="座位数:">
  153. <u-input type="text" placeholder="请输入座位数" v-model="carInfo.seatCount"
  154. :custom-style="{textAlign:'right'}"></u-input>
  155. </u-form-item>
  156. <u-form-item label="排量:">
  157. <u-input type="text" placeholder="请输入排量" v-model="carInfo.enginedesc"
  158. :custom-style="{textAlign:'right'}"></u-input>
  159. </u-form-item>
  160. <u-form-item label="功率:">
  161. <u-input type="text" placeholder="请输入功率" v-model="carInfo.powerScale"
  162. :custom-style="{textAlign:'right'}"></u-input>
  163. </u-form-item>
  164. <u-form-item label="新车购置价:" prop="purchasePrice">
  165. <u-input type="text" placeholder="请输入新车购置价" v-model="carInfo.purchasePrice"
  166. :custom-style="{textAlign:'right'}" @input="upperCaseType('purchasePrice')"></u-input>
  167. </u-form-item>
  168. </u-form>
  169. </view>
  170. </view>
  171. <view class="collapse" v-show="!carSwitching">
  172. <u-form :model="carInfo" :rules="carRules" ref="carForm1" :errorType="errorType" label-width="200"
  173. style="padding: 0 15px;">
  174. <u-form-item label-width="120" label="车牌号:">
  175. <u-input placeholder="输入车牌号" v-model="carInfo.licenseNo" type="text"
  176. :custom-style="{textAlign:'right'}" @input="upperCaseType('licenseNo')"></u-input>
  177. </u-form-item>
  178. <u-form-item label="品牌型号:" prop="modelcname">
  179. <u-input placeholder="请输入品牌型号" v-model="carInfo.modelcname" type="text"
  180. :custom-style="{textAlign:'right'}" @input="upperCaseType('modelcname')"></u-input>
  181. <view class="search ml-1" @tap="toChooseVehicleType(carInfo.modelcname)">查询</view>
  182. </u-form-item>
  183. <u-form-item label="车辆识别码:" prop="frameNo">
  184. <u-input type="text" placeholder="请输入车辆识别码" v-model="carInfo.frameNo"
  185. :custom-style="{textAlign:'right'}" @input="upperCaseType('frameNo')"></u-input>
  186. <view class="search ml-1" @tap="toChooseVin(carInfo.frameNo)">查询</view>
  187. </u-form-item>
  188. <u-form-item label="发动机号:" prop="engineNo">
  189. <u-input type="text" placeholder="请输入发动机号" v-model="carInfo.engineNo"
  190. :custom-style="{textAlign:'right'}" @input="upperCaseType('engineNo')"></u-input>
  191. </u-form-item>
  192. <u-form-item label="注册日期:" prop="registerDate">
  193. <u-input type="select" :custom-style="{textAlign:'right'}" :select-open="registerDateShow"
  194. v-model="carInfo.registerDate" placeholder="请选择注册日期" @click="registerDateShow = true"
  195. placeholder-style="color:#808080"></u-input>
  196. <u-picker v-model="registerDateShow" mode="time" :params="params" :end-year="endYear"
  197. :end-month="endMonth" @confirm="e=> Dateconfirm(e,'carInfo','registerDate')"></u-picker>
  198. </u-form-item>
  199. <u-form-item label="发证日期:" prop="issueDate">
  200. <u-input type="select" :custom-style="{textAlign:'right'}" :select-open="issueDateShow"
  201. v-model="carInfo.issueDate" placeholder="请选择发证日期" @click="issueDateShow = true"
  202. placeholder-style="color:#808080"></u-input>
  203. <u-picker v-model="issueDateShow" mode="time" :params="params"
  204. @confirm="e=> Dateconfirm(e,'carInfo','issueDate')"></u-picker>
  205. </u-form-item>
  206. <u-form-item label="整备质量:" prop="completeKerbMass">
  207. <u-input type="text" placeholder="请输入整备质量" v-model="carInfo.completeKerbMass"
  208. :custom-style="{textAlign:'right'}"></u-input>
  209. </u-form-item>
  210. <u-form-item label="核定载质量:" prop="frameNo">
  211. <u-input type="text" placeholder="请输入核定载质量" v-model="carInfo.limitLoad"
  212. :custom-style="{textAlign:'right'}"></u-input>
  213. </u-form-item>
  214. <u-form-item label="使用性质:" prop="carnature">
  215. <u-input v-model="carInfo1.carnature" type="select" :select-open="carnatureShow"
  216. @click="carnatureShow = true" :custom-style="{textAlign:'right'}"
  217. placeholder-style="color:#808080" placeholder="请选择使用性质" />
  218. <u-select mode="single-column" :list="natureOfVehicleUseoptions" v-model="carnatureShow"
  219. label-name="dictTag" value-name="dictValue"
  220. @confirm="dictionaryConfirm($event,'carnature')"></u-select>
  221. </u-form-item>
  222. <u-form-item label="能源种类: " prop="energyType">
  223. <u-input v-model="carInfo1.energyType" type="select" :select-open="energyTypeShow"
  224. @click="energyTypeShow = true" :custom-style="{textAlign:'right'}"
  225. placeholder-style="color:#808080" placeholder="请选择能源种类" />
  226. <u-select mode="single-column" :list="energyTypeoptions" v-model="energyTypeShow"
  227. label-name="dictTag" value-name="dictValue"
  228. @confirm="dictionaryConfirm($event,'energyType')"></u-select>
  229. </u-form-item>
  230. <u-form-item label="车辆用途: " prop="vehicleUse">
  231. <u-input v-model="carInfo1.vehicleUse" type="select" :select-open="vehicleUseShow"
  232. @click="vehicleUseShow = true" :custom-style="{textAlign:'right'}"
  233. placeholder-style="color:#808080" placeholder="请选择车辆用途" />
  234. <u-select v-if="carInfo.carnature=='01'" mode="single-column" :list="businessVehicleUseoptions"
  235. v-model="vehicleUseShow" label-name="dictTag" value-name="dictValue"
  236. @confirm="dictionaryConfirm($event,'vehicleUse')"></u-select>
  237. <u-select v-else mode="single-column" :list="outOfBusinessVehicleUseoptions"
  238. v-model="vehicleUseShow" label-name="dictTag" value-name="dictValue"
  239. @confirm="dictionaryConfirm($event,'vehicleUse')"></u-select>
  240. </u-form-item>
  241. <u-form-item label="车辆类型: " prop="cartype">
  242. <u-input v-model="carInfo1.cartype" type="select" :select-open="cartypeShow"
  243. @click="cartypeShow = true" :custom-style="{textAlign:'right'}"
  244. placeholder-style="color:#808080" placeholder="请选择车辆类型" />
  245. <u-select mode="single-column" :searchShow="true" :list="trafficManagementVehicleTypeoptions"
  246. v-model="cartypeShow" label-name="dictTag" value-name="dictValue"
  247. @confirm="dictionaryConfirm($event,'cartype')"></u-select>
  248. </u-form-item>
  249. <u-form-item label="车辆种类: " prop="cimodelclass">
  250. <u-input v-model="carInfo1.cimodelclass" type="select" :select-open="cimodelclassShow"
  251. @click="cimodelclassShow = true" :custom-style="{textAlign:'right'}"
  252. placeholder-style="color:#808080" placeholder="请选择车辆种类" />
  253. <u-select mode="single-column" :list="vehicleTypeoptions" v-model="cimodelclassShow"
  254. label-name="dictTag" value-name="dictValue"
  255. @confirm="dictionaryConfirm($event,'cimodelclass')"></u-select>
  256. </u-form-item>
  257. <u-form-item label="年款:">
  258. <u-input type="text" placeholder="请输入年款" v-model="carInfo.caryear"
  259. :custom-style="{textAlign:'right'}"></u-input>
  260. </u-form-item>
  261. <u-form-item label="座位数:">
  262. <u-input type="text" placeholder="请输入座位数" v-model="carInfo.seatCount"
  263. :custom-style="{textAlign:'right'}"></u-input>
  264. </u-form-item>
  265. <u-form-item label="排量:">
  266. <u-input type="text" placeholder="请输入排量" v-model="carInfo.enginedesc"
  267. :custom-style="{textAlign:'right'}"></u-input>
  268. </u-form-item>
  269. <u-form-item label="功率:">
  270. <u-input type="text" placeholder="请输入功率" v-model="carInfo.powerScale"
  271. :custom-style="{textAlign:'right'}"></u-input>
  272. </u-form-item>
  273. <u-form-item label="新车购置价:" prop="purchasePrice">
  274. <u-input type="text" placeholder="请输入新车购置价" v-model="carInfo.purchasePrice"
  275. :custom-style="{textAlign:'right'}" @input="upperCaseType('purchasePrice')"></u-input>
  276. </u-form-item>
  277. </u-form>
  278. </view>
  279. </view>
  280. <view v-show="userModificationLabel">
  281. <view class="Information" style="margin-top: 84px;">
  282. <text class="title">车主信息</text>
  283. <view class="title dis j-s a-c">
  284. <view class="dis a-c">
  285. <text>身份证识别</text>
  286. <view class="switch-container ml-2" @tap="toggleSwitch" v-if="ownerbackImg">
  287. <view class="switch-track">
  288. <view class="switch-thumb dis a-c j-c" :class="{ thumbactive: !isActive }"></view>
  289. <view class="switch-thumb1 dis a-c j-c" :class="{ thumbactive1: isActive }">正面</view>
  290. <view class="switch-thumb2 dis a-c j-c" :class="{ thumbactive1: !isActive }">反面</view>
  291. </view>
  292. </view>
  293. </view>
  294. <view class="manualSwitch dis a-c j-s" @click="ownerSwitching=!ownerSwitching">
  295. <image
  296. :src="ownerSwitching?'../../static/image/car-insure/manualInput.png':'../../static/image/car-insure/captureRecognition.png'"
  297. mode=""></image>
  298. <text>{{ownerSwitching?'手动输入':'拍照识别'}}</text>
  299. </view>
  300. </view>
  301. <view v-show="ownerSwitching" class="collapse">
  302. <!-- 未识别时图片显示 -->
  303. <image v-show="!ownerfrontImg" @tap="ocrIdentify('ownerInfo')"
  304. src="/static/image/car-insure/userbg.png" mode="" style="width: 100%;height: 198px;">
  305. </image>
  306. <view v-show="ownerfrontImg">
  307. <!-- 识别后可拖动窗口 -->
  308. <view class="movable-view dis f-c a-c">
  309. <movable-area>
  310. <movable-view direction="all" out-of-bounds :scale="true" :damping="30" :friction="10">
  311. <image v-if="isActive" :src="ownerfrontImg" mode="widthFix"
  312. :style="{width:'100%',height:'100%',transform:`rotate(-${user1deg}deg)`}">
  313. </image>
  314. <image v-else :src="ownerbackImg" mode="widthFix"
  315. :style="{width:'100%',height:'100%',transform:`rotate(-${user1deg}deg)`}">
  316. </image>
  317. </movable-view>
  318. </movable-area>
  319. <view class="operate-img dis j-s a-c">
  320. <view class="dis a-c" @tap="rotatefront('user1deg')">
  321. <image src="/static/image/car-insure/rotate1.png" mode=""></image>
  322. 左转
  323. </view>
  324. <view class="dis a-c" @tap="ocrIdentify('ownerInfo')">
  325. <image src="/static/image/car-insure/upload.png" mode=""></image>
  326. 上传
  327. </view>
  328. <view class="dis a-c" @tap="rotateback('user1deg')">
  329. <image src="/static/image/car-insure/rotate2.png" mode=""></image>
  330. 右转
  331. </view>
  332. </view>
  333. </view>
  334. <!-- 识别后表单 -->
  335. <u-form :model="ownerInfo" :rules="ownerRules" ref="ownerForm" :errorType="errorType"
  336. label-width="200" style="padding: 0 15px;">
  337. <u-form-item label="姓名:" prop="name">
  338. <u-input placeholder="请输入姓名" v-model="ownerInfo.name" type="text"
  339. :custom-style="{textAlign:'right'}"></u-input>
  340. </u-form-item>
  341. <u-form-item label="证件类型:" prop="identifyType" style="padding: 14rpx 0;">
  342. <view class="dis a-c j-end" style="width:100%;height: 100%;">
  343. 身份证
  344. </view>
  345. </u-form-item>
  346. <u-form-item label="证件号:" prop="identifyNumber">
  347. <u-input placeholder="请输入证件号" v-model="ownerInfo.identifyNumber" type="text"
  348. :custom-style="{textAlign:'right'}"></u-input>
  349. </u-form-item>
  350. <u-form-item label="年龄:" prop="age">
  351. <u-input placeholder="请输入年龄" v-model="ownerInfo.age" disabled type="text"
  352. :custom-style="{textAlign:'right'}"></u-input>
  353. </u-form-item>
  354. <u-form-item label="性别:" prop="gender">
  355. <u-input placeholder="请输入性别" v-model="ownerInfo.gender" disabled type="text"
  356. :custom-style="{textAlign:'right'}"></u-input>
  357. </u-form-item>
  358. <u-form-item label="手机号:" prop="mobile">
  359. <u-input placeholder="请输入手机号" v-model="ownerInfo.mobile" type="text" maxlength="11"
  360. :custom-style="{textAlign:'right'}"></u-input>
  361. </u-form-item>
  362. <u-form-item label="地址:" prop="addr">
  363. <u-input type="textarea" v-model="ownerInfo.addr" :custom-style="{textAlign:'right'}"
  364. placeholder-style="color:#808080" :auto-height="true" placeholder="请输入地址" />
  365. </u-form-item>
  366. <u-form-item label="邮箱:">
  367. <u-input placeholder="请输入邮箱" v-model="ownerInfo.email" type="text"
  368. :custom-style="{textAlign:'right'}"></u-input>
  369. </u-form-item>
  370. <u-form-item label="有效期起期:" prop="identifyValidDate">
  371. <u-input type="select" :select-open="ownerDateShow"
  372. v-model="ownerInfo.identifyValidDate" placeholder="请选择有效期起期"
  373. @click="ownerDateShow = true" :custom-style="{textAlign:'right'}"
  374. placeholder-style="color:#808080"></u-input>
  375. <u-picker v-model="ownerDateShow" mode="time" :params="params"
  376. @confirm="e=> Dateconfirm(e,'ownerInfo','identifyValidDate')"></u-picker>
  377. </u-form-item>
  378. <u-form-item label="有效期止期:" prop="identifyValidEndDate">
  379. <u-input placeholder="有效期止期" v-model="ownerInfo.identifyValidEndDate" type="text"
  380. :custom-style="{textAlign:'right'}"></u-input>
  381. </u-form-item>
  382. <u-form-item label="止期年限:" style="padding: 10rpx 0;">
  383. <view class="dis a-c j-c">
  384. <view class="status-data" :class="item.value==ownerValidEndDateholder? 'active':''"
  385. v-for="(item,index) in endDateList"
  386. @tap="ValidEndDateClick(item.value,'ownerValidEndDateholder','ownerInfo')"
  387. :key="index">
  388. {{item.label}}
  389. </view>
  390. </view>
  391. </u-form-item>
  392. </u-form>
  393. </view>
  394. </view>
  395. <view v-show="!ownerSwitching" class="collapse">
  396. <u-form :model="ownerInfo" :rules="ownerRules" ref="ownerForm1" :errorType="errorType"
  397. label-width="200" style="padding: 0 15px;">
  398. <u-form-item label="姓名:" prop="name">
  399. <u-input placeholder="请输入姓名" v-model="ownerInfo.name" type="text"
  400. :custom-style="{textAlign:'right'}"></u-input>
  401. </u-form-item>
  402. <u-form-item label="证件类型:" prop="identifyType" style="padding: 14rpx 0;">
  403. <view class="dis a-c j-end" style="width:100%;height: 100%;">
  404. 身份证
  405. </view>
  406. </u-form-item>
  407. <u-form-item label="证件号:" prop="identifyNumber">
  408. <u-input placeholder="请输入证件号" v-model="ownerInfo.identifyNumber" type="text"
  409. :custom-style="{textAlign:'right'}"
  410. @blur="binddata('identifyNumber', $event,'ownerInfo')"></u-input>
  411. </u-form-item>
  412. <u-form-item label="年龄:" prop="age">
  413. <u-input placeholder="请输入年龄" v-model="ownerInfo.age" disabled type="text"
  414. :custom-style="{textAlign:'right'}"></u-input>
  415. </u-form-item>
  416. <u-form-item label="性别:" prop="gender">
  417. <u-input placeholder="请输入性别" v-model="ownerInfo.gender" disabled type="text"
  418. :custom-style="{textAlign:'right'}"></u-input>
  419. </u-form-item>
  420. <u-form-item label="手机号:" prop="mobile">
  421. <u-input placeholder="请输入手机号" v-model="ownerInfo.mobile" type="text" maxlength="11"
  422. :custom-style="{textAlign:'right'}"></u-input>
  423. </u-form-item>
  424. <u-form-item label="地址:" prop="addr">
  425. <u-input type="textarea" v-model="ownerInfo.addr" :custom-style="{textAlign:'right'}"
  426. placeholder-style="color:#808080" :auto-height="true" placeholder="请输入地址" />
  427. </u-form-item>
  428. <u-form-item label="邮箱:">
  429. <u-input placeholder="请输入邮箱" v-model="ownerInfo.email" type="text"
  430. :custom-style="{textAlign:'right'}"></u-input>
  431. </u-form-item>
  432. <u-form-item label="有效期起期:" prop="identifyValidDate">
  433. <u-input type="select" :select-open="ownerDateShow" v-model="ownerInfo.identifyValidDate"
  434. placeholder="请选择有效期起期" @click="ownerDateShow = true" :custom-style="{textAlign:'right'}"
  435. placeholder-style="color:#808080"></u-input>
  436. <u-picker v-model="ownerDateShow" mode="time" :params="params"
  437. @confirm="e=> Dateconfirm(e,'ownerInfo','identifyValidDate')"></u-picker>
  438. </u-form-item>
  439. <u-form-item label="有效期止期:" prop="identifyValidEndDate">
  440. <u-input placeholder="有效期止期" v-model="ownerInfo.identifyValidEndDate" type="text"
  441. :custom-style="{textAlign:'right'}"></u-input>
  442. </u-form-item>
  443. <u-form-item label="止期年限:" style="padding: 10rpx 0;">
  444. <view class="dis a-c j-start f-wrap">
  445. <view class="status-data" :class="item.value==ownerValidEndDateholder? 'active':''"
  446. v-for="(item,index) in endDateList"
  447. @tap="ValidEndDateClick(item.value,'ownerValidEndDateholder','ownerInfo')"
  448. :key="index">
  449. {{item.label}}
  450. </view>
  451. </view>
  452. </u-form-item>
  453. </u-form>
  454. </view>
  455. </view>
  456. <view class="Information" style="padding-bottom: 10px;border-bottom: 1px solid #f2f2f2;">
  457. <view class=" dis j-s a-c">
  458. <text class="title">投保人信息</text>
  459. <view class="dis a-c j-c">
  460. <view class="status-data" :class="item.value==policyHolderholder? 'active':''"
  461. v-for="(item,index) in holderstatusList" @tap="applicantholderClick(item.value)"
  462. :key="index">
  463. {{item.label}}
  464. </view>
  465. </view>
  466. </view>
  467. <view class="title dis j-s a-c mt-2" v-show="policyHolderholder=='99'">
  468. <view class="dis a-c">
  469. <text>身份证识别</text>
  470. <view class="switch-container ml-2" @tap="toggleSwitch" v-if="policyHolderbackImg">
  471. <view class="switch-track">
  472. <view class="switch-thumb dis a-c j-c" :class="{ thumbactive: !isActive }"></view>
  473. <view class="switch-thumb1 dis a-c j-c" :class="{ thumbactive1: isActive }">正面</view>
  474. <view class="switch-thumb2 dis a-c j-c" :class="{ thumbactive1: !isActive }">反面</view>
  475. </view>
  476. </view>
  477. </view>
  478. <view class="manualSwitch dis a-c j-s" @click="policySwitching=!policySwitching">
  479. <image
  480. :src="policySwitching?'../../static/image/car-insure/manualInput.png':'../../static/image/car-insure/captureRecognition.png'"
  481. mode=""></image>
  482. <text>{{policySwitching?'手动输入':'拍照识别'}}</text>
  483. </view>
  484. </view>
  485. <view v-show="policyHolderholder=='99' && policySwitching" class="collapse">
  486. <!-- 未识别时图片显示 -->
  487. <image v-show="!policyHolderfrontImg" @tap="ocrIdentify('policyHolderInfo')"
  488. src="/static/image/car-insure/userbg.png" mode="" style="width: 100%;height: 198px;">
  489. </image>
  490. <view v-show=" policyHolderfrontImg">
  491. <view class="movable-view dis f-c a-c">
  492. <movable-area>
  493. <movable-view direction="all" out-of-bounds :scale="true" :damping="30" :friction="10">
  494. <image v-if="isActive" :src="policyHolderfrontImg" mode="widthFix"
  495. :style="{width:'100%',height:'100%',transform:`rotate(-${user2deg}deg)`}">
  496. </image>
  497. <image v-else :src="policyHolderbackImg" mode="widthFix"
  498. :style="{width:'100%',height:'100%',transform:`rotate(-${user2deg}deg)`}">
  499. </image>
  500. </movable-view>
  501. </movable-area>
  502. <view class="operate-img dis j-s a-c">
  503. <view class="dis a-c" @tap="rotatefront('user2deg')">
  504. <image src="/static/image/car-insure/rotate1.png" mode=""></image>
  505. 左转
  506. </view>
  507. <view class="dis a-c" @tap="ocrIdentify('policyHolderInfo')">
  508. <image src="/static/image/car-insure/upload.png" mode=""></image>
  509. 上传
  510. </view>
  511. <view class="dis a-c" @tap="rotateback('user2deg')">
  512. <image src="/static/image/car-insure/rotate2.png" mode=""></image>
  513. 右转
  514. </view>
  515. </view>
  516. </view>
  517. <u-form :model="policyHolderInfo" :rules="policyRules" ref="policyForm" :errorType="errorType"
  518. label-width="200" style="padding: 0 15px;">
  519. <u-form-item label="姓名:" prop="name">
  520. <u-input placeholder="请输入姓名" v-model="policyHolderInfo.name" type="text"
  521. :custom-style="{textAlign:'right'}"></u-input>
  522. </u-form-item>
  523. <u-form-item label="证件类型:" prop="identifyType" style="padding: 14rpx 0;">
  524. <view class="dis a-c j-end" style="width:100%;height: 100%;">
  525. 身份证
  526. </view>
  527. </u-form-item>
  528. <u-form-item label="证件号:" prop="identifyNumber">
  529. <u-input placeholder="请输入证件号" v-model="policyHolderInfo.identifyNumber" type="text"
  530. :custom-style="{textAlign:'right'}"
  531. @blur="binddata('identifyNumber', $event,'policyHolderInfo')"></u-input>
  532. </u-form-item>
  533. <u-form-item label="年龄:" prop="age">
  534. <u-input placeholder="请输入年龄" v-model="policyHolderInfo.age" disabled type="text"
  535. :custom-style="{textAlign:'right'}"></u-input>
  536. </u-form-item>
  537. <u-form-item label="性别:" prop="gender">
  538. <u-input placeholder="请输入性别" v-model="policyHolderInfo.gender" disabled type="text"
  539. :custom-style="{textAlign:'right'}"></u-input>
  540. </u-form-item>
  541. <u-form-item label="手机号:" prop="mobile">
  542. <u-input placeholder="请输入手机号" v-model="policyHolderInfo.mobile" type="text"
  543. maxlength="11" :custom-style="{textAlign:'right'}"></u-input>
  544. </u-form-item>
  545. <u-form-item label="地址:" prop="addr">
  546. <u-input type="textarea" v-model="policyHolderInfo.addr"
  547. :custom-style="{textAlign:'right'}" placeholder-style="color:#808080"
  548. :auto-height="true" placeholder="请输入地址" />
  549. </u-form-item>
  550. <u-form-item label="邮箱:">
  551. <u-input placeholder="请输入邮箱" v-model="policyHolderInfo.email" type="text"
  552. :custom-style="{textAlign:'right'}"></u-input>
  553. </u-form-item>
  554. <u-form-item label="有效期起期:" prop="identifyValidDate">
  555. <u-input type="select" :select-open="applicantDateShow"
  556. v-model="policyHolderInfo.identifyValidDate" placeholder="请选择有效期起期"
  557. @click="applicantDateShow = true" :custom-style="{textAlign:'right'}"
  558. placeholder-style="color:#808080"></u-input>
  559. <u-picker v-model="applicantDateShow" mode="time" :params="params"
  560. @confirm="e=> Dateconfirm(e,'policyHolderInfo','identifyValidDate')"></u-picker>
  561. </u-form-item>
  562. <u-form-item label="有效期止期:" prop="identifyValidEndDate">
  563. <u-input placeholder="有效期止期" v-model="policyHolderInfo.identifyValidEndDate" type="text"
  564. :custom-style="{textAlign:'right'}"></u-input>
  565. </u-form-item>
  566. <u-form-item label="止期年限:" style="padding: 10rpx 0;">
  567. <view class="dis a-c j-c">
  568. <view class="status-data" :class="item.value==policyValidEndDateholder? 'active':''"
  569. v-for="(item,index) in endDateList"
  570. @tap="ValidEndDateClick(item.value,'policyValidEndDateholder','policyHolderInfo')"
  571. :key="index">
  572. {{item.label}}
  573. </view>
  574. </view>
  575. </u-form-item>
  576. </u-form>
  577. </view>
  578. </view>
  579. <view v-show="policyHolderholder=='99' && !policySwitching" class="collapse">
  580. <u-form :model="policyHolderInfo" :rules="policyRules" ref="policyForm1" :errorType="errorType"
  581. label-width="200" style="padding: 0 15px;">
  582. <u-form-item label="姓名:" prop="name">
  583. <u-input placeholder="请输入姓名" v-model="policyHolderInfo.name" type="text"
  584. :custom-style="{textAlign:'right'}"></u-input>
  585. </u-form-item>
  586. <u-form-item label="证件类型:" prop="identifyType" style="padding: 14rpx 0;">
  587. <view class="dis a-c j-end" style="width:100%;height: 100%;">
  588. 身份证
  589. </view>
  590. </u-form-item>
  591. <u-form-item label="证件号:" prop="identifyNumber">
  592. <u-input placeholder="请输入证件号" v-model="policyHolderInfo.identifyNumber" type="text"
  593. :custom-style="{textAlign:'right'}"
  594. @blur="binddata('identifyNumber', $event,'policyHolderInfo')"></u-input>
  595. </u-form-item>
  596. <u-form-item label="年龄:" prop="age">
  597. <u-input placeholder="请输入年龄" v-model="policyHolderInfo.age" disabled type="text"
  598. :custom-style="{textAlign:'right'}"></u-input>
  599. </u-form-item>
  600. <u-form-item label="性别:" prop="gender">
  601. <u-input placeholder="请输入性别" v-model="policyHolderInfo.gender" disabled type="text"
  602. :custom-style="{textAlign:'right'}"></u-input>
  603. </u-form-item>
  604. <u-form-item label="手机号:" prop="mobile">
  605. <u-input placeholder="请输入手机号" v-model="policyHolderInfo.mobile" type="text" maxlength="11"
  606. :custom-style="{textAlign:'right'}"></u-input>
  607. </u-form-item>
  608. <u-form-item label="地址:" prop="addr">
  609. <u-input type="textarea" v-model="policyHolderInfo.addr" :custom-style="{textAlign:'right'}"
  610. placeholder-style="color:#808080" :auto-height="true" placeholder="请输入地址" />
  611. </u-form-item>
  612. <u-form-item label="邮箱:">
  613. <u-input placeholder="请输入邮箱" v-model="policyHolderInfo.email" type="text"
  614. :custom-style="{textAlign:'right'}"></u-input>
  615. </u-form-item>
  616. <u-form-item label="有效期起期:" prop="identifyValidDate">
  617. <u-input type="select" :select-open="applicantDateShow"
  618. v-model="policyHolderInfo.identifyValidDate" placeholder="请选择有效期起期"
  619. @click="applicantDateShow = true" :custom-style="{textAlign:'right'}"
  620. placeholder-style="color:#808080"></u-input>
  621. <u-picker v-model="applicantDateShow" mode="time" :params="params"
  622. @confirm="e=> Dateconfirm(e,'policyHolderInfo','identifyValidDate')"></u-picker>
  623. </u-form-item>
  624. <u-form-item label="有效期止期:" prop="identifyValidEndDate">
  625. <u-input placeholder="有效期止期" v-model="policyHolderInfo.identifyValidEndDate" type="text"
  626. :custom-style="{textAlign:'right'}"></u-input>
  627. </u-form-item>
  628. <u-form-item label="止期年限:" style="padding: 10rpx 0;">
  629. <view class="dis a-c j-c">
  630. <view class="status-data" :class="item.value==policyValidEndDateholder? 'active':''"
  631. v-for="(item,index) in endDateList"
  632. @tap="ValidEndDateClick(item.value,'policyValidEndDateholder','policyHolderInfo')"
  633. :key="index">
  634. {{item.label}}
  635. </view>
  636. </view>
  637. </u-form-item>
  638. </u-form>
  639. </view>
  640. </view>
  641. <view class="Information " style="padding-bottom: 10px;border-bottom: 1px solid #f2f2f2;">
  642. <view class="dis j-s a-c">
  643. <text class="title">被保人信息</text>
  644. <view class="dis a-c j-c">
  645. <view class="status-data" :class="item.value==Insuredholder? 'active':''"
  646. v-for="(item,index) in insuredstatusList" @tap="InsuredholderClick(item.value)"
  647. :key="index">
  648. {{item.label}}
  649. </view>
  650. </view>
  651. </view>
  652. <view class="title dis j-s a-c mt-2" v-show="Insuredholder=='99'">
  653. <view class="dis a-c">
  654. <text>身份证识别</text>
  655. <view class="switch-container ml-2" @tap="toggleSwitch" v-if="InsuredbackImg">
  656. <view class="switch-track">
  657. <view class="switch-thumb dis a-c j-c" :class="{ thumbactive: !isActive }"></view>
  658. <view class="switch-thumb1 dis a-c j-c" :class="{ thumbactive1: isActive }">正面</view>
  659. <view class="switch-thumb2 dis a-c j-c" :class="{ thumbactive1: !isActive }">反面</view>
  660. </view>
  661. </view>
  662. </view>
  663. <view class="manualSwitch dis a-c j-s" @click="insuredSwitching=!insuredSwitching">
  664. <image
  665. :src="insuredSwitching?'../../static/image/car-insure/manualInput.png':'../../static/image/car-insure/captureRecognition.png'"
  666. mode=""></image>
  667. <text>{{insuredSwitching?'手动输入':'拍照识别'}}</text>
  668. </view>
  669. </view>
  670. <view v-show="Insuredholder=='99' && insuredSwitching" class="collapse">
  671. <!-- 未识别时图片显示 -->
  672. <image v-show="!InsuredfrontImg" @tap="ocrIdentify('insuredPersonInfo')"
  673. src="/static/image/car-insure/userbg.png" mode="" style="width: 100%;height: 198px;">
  674. </image>
  675. <view v-show='InsuredfrontImg'>
  676. <view class="movable-view dis f-c a-c">
  677. <movable-area>
  678. <movable-view direction="all" out-of-bounds :scale="true">
  679. <image v-if="isActive" :src="InsuredfrontImg" mode=""
  680. :style="{width:'100%',height:'100%',transform:`rotate(-${user3deg}deg)`}">
  681. </image>
  682. <image v-else :src="InsuredbackImg" mode=""
  683. :style="{width:'100%',height:'100%',transform:`rotate(-${user3deg}deg)`}">
  684. </image>
  685. </movable-view>
  686. </movable-area>
  687. <view class="operate-img dis j-s a-c">
  688. <view class="dis a-c" @tap="rotatefront('user3deg')">
  689. <image src="/static/image/car-insure/rotate1.png" mode=""></image>
  690. 左转
  691. </view>
  692. <view class="dis a-c" @tap="ocrIdentify('insuredPersonInfo')">
  693. <image src="/static/image/car-insure/upload.png" mode=""></image>
  694. 上传
  695. </view>
  696. <view class="dis a-c" @tap="rotateback('user3deg')">
  697. <image src="/static/image/car-insure/rotate2.png" mode=""></image>
  698. 右转
  699. </view>
  700. </view>
  701. </view>
  702. <u-form :model="insuredPersonInfo" :rules="insuredRules" ref="insuredForm"
  703. :errorType="errorType" label-width="200" style="padding: 0 15px;">
  704. <u-form-item label="姓名:" prop="name">
  705. <u-input placeholder="请输入姓名" v-model="insuredPersonInfo.name" type="text"
  706. :custom-style="{textAlign:'right'}"></u-input>
  707. </u-form-item>
  708. <u-form-item label="证件类型:" prop="identifyType" style="padding: 14rpx 0;">
  709. <view class="dis a-c j-end" style="width:100%;height: 100%;">
  710. 身份证
  711. </view>
  712. </u-form-item>
  713. <u-form-item label="证件号:" prop="identifyNumber">
  714. <u-input placeholder="请输入证件号" v-model="insuredPersonInfo.identifyNumber" type="text"
  715. :custom-style="{textAlign:'right'}"
  716. @blur="binddata('identifyNumber', $event,'insuredPersonInfo')"></u-input>
  717. </u-form-item>
  718. <u-form-item label="年龄:" prop="age">
  719. <u-input placeholder="请输入年龄" v-model="insuredPersonInfo.age" disabled type="text"
  720. :custom-style="{textAlign:'right'}"></u-input>
  721. </u-form-item>
  722. <u-form-item label="性别:" prop="gender">
  723. <u-input placeholder="请输入性别" v-model="insuredPersonInfo.gender" disabled type="text"
  724. :custom-style="{textAlign:'right'}"></u-input>
  725. </u-form-item>
  726. <u-form-item label="手机号:" prop="mobile">
  727. <u-input placeholder="请输入手机号" v-model="insuredPersonInfo.mobile" type="text"
  728. maxlength="11" :custom-style="{textAlign:'right'}"></u-input>
  729. </u-form-item>
  730. <u-form-item label="地址:" prop="addr">
  731. <u-input type="textarea" v-model="insuredPersonInfo.addr"
  732. :custom-style="{textAlign:'right'}" placeholder-style="color:#808080"
  733. :auto-height="true" placeholder="请输入地址" />
  734. </u-form-item>
  735. <u-form-item label="邮箱:">
  736. <u-input placeholder="请输入邮箱" v-model="insuredPersonInfo.email" type="text"
  737. :custom-style="{textAlign:'right'}"></u-input>
  738. </u-form-item>
  739. <u-form-item label="有效期起期:" prop="identifyValidDate">
  740. <u-input type="select" :select-open="InsuredDateShow"
  741. v-model="insuredPersonInfo.identifyValidDate" placeholder="请选择有效期起期"
  742. @click="InsuredDateShow = true" :custom-style="{textAlign:'right'}"
  743. placeholder-style="color:#808080"></u-input>
  744. <u-picker v-model="InsuredDateShow" mode="time" :params="params"
  745. @confirm="e=> Dateconfirm(e,'insuredPersonInfo','identifyValidDate')"></u-picker>
  746. </u-form-item>
  747. <u-form-item label="有效期止期:" prop="identifyValidEndDate">
  748. <u-input placeholder="有效期止期" v-model="insuredPersonInfo.identifyValidEndDate"
  749. type="text" :custom-style="{textAlign:'right'}"></u-input>
  750. </u-form-item>
  751. <u-form-item label="止期年限:" style="padding: 10rpx 0;">
  752. <view class="dis a-c j-c">
  753. <view class="status-data"
  754. :class="item.value==insuredValidEndDateholder? 'active':''"
  755. v-for="(item,index) in endDateList"
  756. @tap="ValidEndDateClick(item.value,'insuredValidEndDateholder','insuredPersonInfo')"
  757. :key="index">
  758. {{item.label}}
  759. </view>
  760. </view>
  761. </u-form-item>
  762. </u-form>
  763. </view>
  764. </view>
  765. <view v-show="Insuredholder=='99' && !insuredSwitching" class="collapse">
  766. <u-form :model="insuredPersonInfo" :rules="insuredRules" ref="insuredForm1" :errorType="errorType"
  767. label-width="200" style="padding: 0 15px;">
  768. <u-form-item label="姓名:" prop="name">
  769. <u-input placeholder="请输入姓名" v-model="insuredPersonInfo.name" type="text"
  770. :custom-style="{textAlign:'right'}"></u-input>
  771. </u-form-item>
  772. <u-form-item label="证件类型:" prop="identifyType" style="padding: 14rpx 0;">
  773. <view class="dis a-c j-end" style="width:100%;height: 100%;">
  774. 身份证
  775. </view>
  776. </u-form-item>
  777. <u-form-item label="证件号:" prop="identifyNumber">
  778. <u-input placeholder="请输入证件号" v-model="insuredPersonInfo.identifyNumber" type="text"
  779. :custom-style="{textAlign:'right'}"
  780. @blur="binddata('identifyNumber', $event,'insuredPersonInfo')"></u-input>
  781. </u-form-item>
  782. <u-form-item label="年龄:" prop="age">
  783. <u-input placeholder="请输入年龄" v-model="insuredPersonInfo.age" disabled type="text"
  784. :custom-style="{textAlign:'right'}"></u-input>
  785. </u-form-item>
  786. <u-form-item label="性别:" prop="gender">
  787. <u-input placeholder="请输入性别" v-model="insuredPersonInfo.gender" disabled type="text"
  788. :custom-style="{textAlign:'right'}"></u-input>
  789. </u-form-item>
  790. <u-form-item label="手机号:" prop="mobile">
  791. <u-input placeholder="请输入手机号" v-model="insuredPersonInfo.mobile" type="text" maxlength="11"
  792. :custom-style="{textAlign:'right'}"></u-input>
  793. </u-form-item>
  794. <u-form-item label="地址:" prop="addr">
  795. <u-input type="textarea" v-model="insuredPersonInfo.addr"
  796. :custom-style="{textAlign:'right'}" placeholder-style="color:#808080"
  797. :auto-height="true" placeholder="请输入地址" />
  798. </u-form-item>
  799. <u-form-item label="邮箱:">
  800. <u-input placeholder="请输入邮箱" v-model="insuredPersonInfo.email" type="text"
  801. :custom-style="{textAlign:'right'}"></u-input>
  802. </u-form-item>
  803. <u-form-item label="有效期起期:" prop="identifyValidDate">
  804. <u-input type="select" :select-open="InsuredDateShow"
  805. v-model="insuredPersonInfo.identifyValidDate" placeholder="请选择有效期起期"
  806. @click="InsuredDateShow = true" :custom-style="{textAlign:'right'}"
  807. placeholder-style="color:#808080"></u-input>
  808. <u-picker v-model="InsuredDateShow" mode="time" :params="params"
  809. @confirm="e=> Dateconfirm(e,'insuredPersonInfo','identifyValidDate')"></u-picker>
  810. </u-form-item>
  811. <u-form-item label="有效期止期:" prop="identifyValidEndDate">
  812. <u-input placeholder="有效期止期" v-model="insuredPersonInfo.identifyValidEndDate" type="text"
  813. :custom-style="{textAlign:'right'}"></u-input>
  814. </u-form-item>
  815. <u-form-item label="止期年限:" style="padding: 10rpx 0;">
  816. <view class="dis a-c j-c">
  817. <view class="status-data" :class="item.value==insuredValidEndDateholder? 'active':''"
  818. v-for="(item,index) in endDateList"
  819. @tap="ValidEndDateClick(item.value,'insuredValidEndDateholder','insuredPersonInfo')"
  820. :key="index">
  821. {{item.label}}
  822. </view>
  823. </view>
  824. </u-form-item>
  825. </u-form>
  826. </view>
  827. </view>
  828. </view>
  829. <view class="footer-btn">
  830. <button type="primary"
  831. style="background:#0052FF;color:#fff; width: 100%;height: 40px;font-size: 15px;line-height: 40px;"
  832. @tap="next">下一步</button>
  833. <!-- <u-button type="primary" style="background:#0052FF;" hover-class="none" @tap="next">下一步</u-button> -->
  834. </view>
  835. <u-popup v-model="carModelLookupModal" mode="bottom" border-radius="10" height="1300">
  836. <view class="ZJcheckboxGroup dis f-c">
  837. <view class="title dis a-c j-c">
  838. <text>车辆型号</text>
  839. </view>
  840. <scroll-view scroll-y="true" class="scolcentent">
  841. <view class="noDataIndicator dis f-c a-c mt-4" v-if="carTypeVINList.length<0">
  842. <image src="../../static/image/car-insure/noDataIndicator.png" mode=""></image>
  843. <text>搜索不出内容,请点击下一步选择品牌型号,再进行报价!</text>
  844. </view>
  845. <view class="row mt-2" v-for="(item,index) in carTypeVINList" :key="index"
  846. :class="isFocusedIndex==index?'carTypeColor':''" @tap="carTypeClick(index,item)">
  847. <view class="row_header dis a-c j-s">
  848. <view class="left">{{item.modelName }}</view>
  849. <view class="right">¥{{item.replacementValue}}</view>
  850. </view>
  851. <view class="row_body dis f-c">
  852. <view class="dis j-s">
  853. <view style="margin-right: 5px;">车系:{{item.series}}</view>
  854. <view>{{item.remark}}</view>
  855. <view style="margin-left: auto;">({{item.ratedPassengerCapacity}}座)</view>
  856. </view>
  857. <view class="dis j-s">
  858. <view>年款:<text style="color: #2432ff;">{{item.marketYear}}</text></view>
  859. <view>排量:<text style="color: #2432ff;">{{item.displacement}}</text></view>
  860. <view>功率:<text style="color: #2432ff;">{{item.powerScale}}</text></view>
  861. </view>
  862. </view>
  863. </view>
  864. </scroll-view>
  865. <view class="operateBtn dis j-s a-c mb-1">
  866. <view class="confirm dis a-c j-c" @click="carModelLookupSubmit()">
  867. 确定
  868. </view>
  869. <view class="confirm dis a-c j-c" v-if="carTypeVINList.length<0" @click="carModelLookupNext()">
  870. 下一步
  871. </view>
  872. </view>
  873. </view>
  874. </u-popup>
  875. <u-popup v-model="brandModelLookupModal" mode="bottom" border-radius="10" height="1300">
  876. <view class="ZJcheckboxGroup dis f-c">
  877. <view class="title dis a-c j-c">
  878. <text>品牌型号</text>
  879. </view>
  880. <view class="">
  881. <u-input v-model="marketYear" type="select" :border="true" :select-open="marketYearShow"
  882. @click="marketYearShow = true" :custom-style="{textAlign:'center'}"
  883. placeholder-style="color:#808080" placeholder="选择年款"
  884. style="float: right;width: 100px;margin: 10px;" />
  885. </view>
  886. <scroll-view scroll-y="true" class="scolcentent">
  887. <view class="noDataIndicator dis f-c a-c" v-if="brandModelList && brandModelList.length==0">
  888. <image src="../../static/image/car-insure/noDataIndicator.png" mode=""></image>
  889. <text>搜索不出内容,请点击选择品牌型号,再进行报价!</text>
  890. </view>
  891. <view class="row mt-2" v-for="(item,index) in brandModelList" :key="index"
  892. :class="brandModelIndex==index?'carTypeColor':''" @tap="brandModelClick(index,item)">
  893. <view class="row_header dis a-c j-s">
  894. <view class="left">{{item.modelName }}</view>
  895. <view class="right">¥{{item.replacementValue}}</view>
  896. </view>
  897. <view class="row_body dis f-c">
  898. <view class="dis j-s">
  899. <view style="margin-right: 5px;">车系:{{item.series}}</view>
  900. <view>{{item.remark}}</view>
  901. <view style="margin-left: auto;">({{item.ratedPassengerCapacity}}座)</view>
  902. </view>
  903. <view class="dis j-s">
  904. <view>年款:<text style="color: #2432ff;">{{item.marketYear}}</text></view>
  905. <view>排量:<text style="color: #2432ff;">{{item.displacement}}</text></view>
  906. <view>功率:<text style="color: #2432ff;">{{item.powerScale}}</text></view>
  907. </view>
  908. </view>
  909. </view>
  910. </scroll-view>
  911. <view class="operateBtn dis j-s a-c mb-1">
  912. <view class="confirm dis a-c j-c" @click="brandModelLookupSubmit()">
  913. 确定
  914. </view>
  915. </view>
  916. </view>
  917. </u-popup>
  918. <OCRComponent :showModal='OCRShow' @closePopup="closePopup" :tabslist="tabslist" @tabschange="OCRtabschange"
  919. :tabsCurrent="tabsCurrent" :checkType='checkType' @carCallback="carCallback"
  920. @ownerInfoCallback="ownerInfoCallback" @applicantInfoCallback="applicantInfoCallback"
  921. @InsuredInfoCallback="InsuredInfoCallback">
  922. </OCRComponent>
  923. <u-picker v-model="marketYearShow" mode="time" :params="params1" @confirm="marketYearDateconfirm"></u-picker>
  924. </view>
  925. </template>
  926. <script>
  927. import OCRComponent from '@/components/modules/carInsure/OCRComponent/OCRComponent.vue'; //引用图片信息检查插件
  928. import {
  929. getAgeByIdCard,
  930. getGenderFromIdCard
  931. } from '@/plugins/utils';
  932. var dateTime = new Date();
  933. let Year = dateTime.getFullYear();
  934. let Month = Number(dateTime.getMonth() + 1);
  935. export default {
  936. components: {
  937. OCRComponent
  938. },
  939. data() {
  940. return {
  941. //品牌弹窗
  942. params1: {
  943. year: true, //年
  944. month: false, //月
  945. day: false, //日
  946. hour: false, //时
  947. minute: false, //分
  948. second: false, //秒
  949. },
  950. marketYearShow: false,
  951. marketYear: "", //年款查询条件
  952. brandModelIndex: "99",
  953. brandModelList: null,
  954. brandModelListIndex: {},
  955. brandModelLookupModal: false,
  956. //车型弹窗
  957. isFocusedIndex: "99",
  958. carTypeVINList: [],
  959. carTypeVINListIndex: {},
  960. carModelLookupModal: false,
  961. // ----------------------------------
  962. carSwitching: true, //true识别 false录入
  963. ownerSwitching: true, //true识别 false录入
  964. policySwitching: true, //true识别 false录入
  965. insuredSwitching: true, //true识别 false录入
  966. carInfo: {
  967. licenseNo: "", //车牌号
  968. brandName: "", //车辆品牌型号
  969. vinNo: "", //车架号
  970. engineNo: "", //发动机号
  971. modelCode: "", //车型编码
  972. seatCount: "", //核定载客量 核定载人数
  973. purchasePrice: "", //新车购置价最低,行业实际价值,协商价值
  974. carBrand: "", //车型品牌
  975. ciCarName: "", //行业车型名称
  976. ciModelCode: "", //行业车型编码
  977. completeKerbMass: "", //整备质量
  978. exhaustScale: "", //排量
  979. factory: "", //工厂名称
  980. factoryid: "", //工厂编码
  981. frameNo: "", //车架号
  982. licenseTypeCode: "02", //号牌种类
  983. vehicleclass: "", //车辆类型
  984. familyName: "", //车型
  985. modelcname: "", //车型名称
  986. powertypecode: "", //燃料类型编码
  987. vehicleweight: "", //总质量
  988. limitLoad: "", //核定载质量
  989. caryear: "", //年款
  990. cimodelclass: "A0", //车辆种类
  991. powertype: "汽油", //燃料类型
  992. energyType: "0", //能源种类
  993. enginedesc: "", //排量
  994. powerScale: "", //功率
  995. registerDate: "", //注册日期
  996. issueDate: "", //发证日期
  997. transferFlag: false, //过户标志
  998. transferFlagBi: false, //商业过户标志
  999. transferDate: "", //过户日期
  1000. loanStatus: 0, //贷款标志
  1001. firstBeneMan: "", //第一受益人
  1002. noLicenseFlag: false, //是否新车
  1003. cartype: "K33", //客车A0 货车H0          
  1004. carnature: "02", //使用性质 家庭自用8A 非营业企业8B 非营业党政机关,事业团体8C 非营业货车8D
  1005. property: "1", //所属性质 1个人 2企业 3个人
  1006. outOfInsurance: false, //脱保
  1007. usedCar: false, //二手车
  1008. vehicleUse: "05" //车辆用途
  1009. },
  1010. ownerInfo: {
  1011. name: "",
  1012. identifyType: "01",
  1013. identifyNumber: "",
  1014. addr: "",
  1015. gender: "", //性别
  1016. email: "", //邮箱
  1017. mobile: "",
  1018. identifyValidDate: "", //有效期起期
  1019. identifyValidEndDate: "", //有效期止期
  1020. age: "", //年龄
  1021. },
  1022. policyHolderInfo: {
  1023. name: "",
  1024. identifyType: "01",
  1025. identifyNumber: "",
  1026. addr: "",
  1027. gender: "", //性别
  1028. email: "",
  1029. mobile: "",
  1030. identifyValidDate: "", //有效期起期
  1031. identifyValidEndDate: "", //有效期止期
  1032. age: "", //年龄
  1033. owner: false,
  1034. },
  1035. insuredPersonInfo: {
  1036. name: "",
  1037. identifyType: "01",
  1038. identifyNumber: "",
  1039. addr: "",
  1040. gender: "", //性别
  1041. email: "",
  1042. mobile: "",
  1043. identifyValidDate: "", //有效期起期
  1044. identifyValidEndDate: "", //有效期止期
  1045. age: "", //年龄
  1046. insuranceHolder: false,
  1047. owner: false,
  1048. },
  1049. //影像信息
  1050. riskList: [], //交强险和商业险的选择
  1051. kindList: [], //商业险险种的选择
  1052. carInfoPositiveList: [], //车辆
  1053. ownerInfoPositiveList: [], //车主
  1054. policyHolderInfoPositiveList: [], //投保人
  1055. insuredPersonInfoPositiveList: [], //被保人
  1056. //影像信息
  1057. carfrontImg: "", //显示图片
  1058. carbackImg: "", //显示图片
  1059. ownerfrontImg: "", //显示图片
  1060. ownerbackImg: "", //显示图片
  1061. policyHolderfrontImg: "", //显示图片
  1062. policyHolderbackImg: "", //显示图片
  1063. InsuredfrontImg: "", //显示图片
  1064. InsuredbackImg: "", //显示图片
  1065. OCRShow: false,
  1066. tabsCurrent: 0,
  1067. checkType: "carInfo", //组件类型
  1068. tabslist: [{
  1069. name: '行驶证识别'
  1070. }],
  1071. params: {
  1072. year: true, //年
  1073. month: true, //月
  1074. day: true, //日
  1075. hour: false, //时
  1076. minute: false, //分
  1077. second: false, //秒
  1078. },
  1079. errorType: ['border-bottom', 'toast'],
  1080. carRules: {
  1081. frameNo: [{
  1082. required: true,
  1083. message: '请输入车辆识别码',
  1084. trigger: ['blur', 'change'],
  1085. },
  1086. {
  1087. pattern: /^([0-9A-Z]){17}$/,
  1088. message: '请输入正确的车辆识别码',
  1089. }
  1090. ],
  1091. modelcname: [{
  1092. required: true,
  1093. message: '请输入品牌型号',
  1094. trigger: ['blur', 'change'],
  1095. }],
  1096. engineNo: [{
  1097. required: true,
  1098. message: '请输入发动机号',
  1099. trigger: ['blur', 'change'],
  1100. }],
  1101. purchasePrice: [{
  1102. required: true,
  1103. message: '请输入新车购置价',
  1104. trigger: ['blur', 'change'],
  1105. },
  1106. ],
  1107. completeKerbMass: [{
  1108. required: true,
  1109. message: '请输入整备质量',
  1110. trigger: ['blur', 'change'],
  1111. }],
  1112. carnature: [{
  1113. required: true,
  1114. message: '使用性质必选',
  1115. trigger: 'change',
  1116. }],
  1117. energyType: [{
  1118. required: true,
  1119. message: '能源种类必选',
  1120. trigger: 'change',
  1121. }],
  1122. vehicleUse: [{
  1123. required: true,
  1124. message: '车辆用途必选',
  1125. trigger: 'change',
  1126. }],
  1127. cartype: [{
  1128. required: true,
  1129. message: '车辆类型必选',
  1130. trigger: 'change',
  1131. }],
  1132. cimodelclass: [{
  1133. required: true,
  1134. message: '车辆种类必选',
  1135. trigger: 'change',
  1136. }],
  1137. registerDate: [{
  1138. required: true,
  1139. message: '请选择注册日期',
  1140. trigger: 'change',
  1141. },
  1142. {
  1143. pattern: /^\d{4}-\d{2}-\d{2}$/,
  1144. message: '注册日期格式错误',
  1145. }
  1146. ],
  1147. issueDate: [{
  1148. required: true,
  1149. message: '请选择发证日期',
  1150. trigger: 'change',
  1151. },
  1152. {
  1153. pattern: /^\d{4}-\d{2}-\d{2}$/,
  1154. message: '发证日期日期格式错误',
  1155. }
  1156. ],
  1157. },
  1158. ownerRules: {
  1159. name: [{
  1160. required: true,
  1161. message: '请输入车主姓名',
  1162. trigger: ['blur', 'change'],
  1163. },
  1164. {
  1165. minLength: 2,
  1166. maxLength: 5,
  1167. message: '车主姓名长度在 {minLength} 到 {maxLength} 个字符',
  1168. },
  1169. {
  1170. pattern: /^([\u4e00-\u9fa5]{1,6}|[a-zA-Z\.\s]{1,6})$/,
  1171. message: '请输入正确的车主姓名',
  1172. }
  1173. ],
  1174. identifyNumber: [{
  1175. required: true,
  1176. message: '请输入车主证件号',
  1177. trigger: ['blur', 'change'],
  1178. },
  1179. {
  1180. pattern: /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
  1181. message: '请输入正确的车主证件号',
  1182. }
  1183. ],
  1184. mobile: [{
  1185. required: true,
  1186. message: '请输入车主手机号',
  1187. trigger: ['blur', 'change'],
  1188. },
  1189. {
  1190. pattern: /^1[3-9]\d{9}$/,
  1191. message: '请输入正确的手机号',
  1192. }
  1193. ],
  1194. addr: [{
  1195. required: true,
  1196. message: '请输入车主地址',
  1197. trigger: ['blur', 'change'],
  1198. },
  1199. {
  1200. minLength: 8,
  1201. maxLength: 40,
  1202. message: '车主地址长度在 {minLength} 到 {maxLength} 个字符',
  1203. },
  1204. ],
  1205. identifyValidDate: [{
  1206. required: true,
  1207. message: '请选择身份证起期',
  1208. trigger: ['blur', 'change'],
  1209. }, {
  1210. pattern: /^\d{4}-\d{2}-\d{2}$/,
  1211. message: '身份证起期格式错误',
  1212. }],
  1213. identifyValidEndDate: [{
  1214. required: true,
  1215. message: '请选择身份证止期',
  1216. trigger: ['blur', 'change'],
  1217. }, {
  1218. pattern: /^\d{4}-\d{2}-\d{2}$/,
  1219. message: '身份证止期格式错误',
  1220. }]
  1221. },
  1222. policyRules: {
  1223. name: [{
  1224. required: true,
  1225. message: '请输入投保人姓名',
  1226. trigger: ['blur', 'change'],
  1227. },
  1228. {
  1229. minLength: 2,
  1230. maxLength: 5,
  1231. message: '投保人姓名长度在 {minLength} 到 {maxLength} 个字符',
  1232. },
  1233. {
  1234. pattern: /^([\u4e00-\u9fa5]{1,6}|[a-zA-Z\.\s]{1,6})$/,
  1235. message: '请输入正确的投保人姓名',
  1236. }
  1237. ],
  1238. identifyNumber: [{
  1239. required: true,
  1240. message: '请输入投保人证件号',
  1241. trigger: ['blur', 'change'],
  1242. },
  1243. {
  1244. pattern: /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
  1245. message: '请输入正确的投保人证件号',
  1246. }
  1247. ],
  1248. mobile: [{
  1249. required: true,
  1250. message: '请输入投保人手机号',
  1251. trigger: ['blur', 'change'],
  1252. },
  1253. {
  1254. pattern: /^1[3-9]\d{9}$/,
  1255. message: '请输入正确的手机号',
  1256. }
  1257. ],
  1258. addr: [{
  1259. required: true,
  1260. message: '请输入投保人地址',
  1261. trigger: ['blur', 'change'],
  1262. },
  1263. {
  1264. minLength: 8,
  1265. maxLength: 40,
  1266. message: '投保人地址长度在 {minLength} 到 {maxLength} 个字符',
  1267. },
  1268. ],
  1269. identifyValidDate: [{
  1270. required: true,
  1271. message: '请选择身份证起期',
  1272. trigger: ['blur', 'change'],
  1273. }, {
  1274. pattern: /^\d{4}-\d{2}-\d{2}$/,
  1275. message: '身份证起期格式错误',
  1276. }],
  1277. identifyValidEndDate: [{
  1278. required: true,
  1279. message: '请选择身份证止期',
  1280. trigger: ['blur', 'change'],
  1281. }, {
  1282. pattern: /^\d{4}-\d{2}-\d{2}$/,
  1283. message: '身份证止期格式错误',
  1284. }]
  1285. },
  1286. insuredRules: {
  1287. name: [{
  1288. required: true,
  1289. message: '请输入被保人姓名',
  1290. trigger: ['blur', 'change'],
  1291. },
  1292. {
  1293. minLength: 2,
  1294. maxLength: 5,
  1295. message: '被保人姓名长度在 {minLength} 到 {maxLength} 个字符',
  1296. },
  1297. {
  1298. pattern: /^([\u4e00-\u9fa5]{1,6}|[a-zA-Z\.\s]{1,6})$/,
  1299. message: '请输入正确的被保人姓名',
  1300. }
  1301. ],
  1302. identifyNumber: [{
  1303. required: true,
  1304. message: '请输入被保人证件号',
  1305. trigger: ['blur', 'change'],
  1306. },
  1307. {
  1308. pattern: /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
  1309. message: '请输入正确的被保人证件号',
  1310. }
  1311. ],
  1312. mobile: [{
  1313. required: true,
  1314. message: '请输入被保人手机号',
  1315. trigger: ['blur', 'change'],
  1316. },
  1317. {
  1318. pattern: /^1[3-9]\d{9}$/,
  1319. message: '请输入正确的手机号',
  1320. }
  1321. ],
  1322. addr: [{
  1323. required: true,
  1324. message: '请输入被保人地址',
  1325. trigger: ['blur', 'change'],
  1326. },
  1327. {
  1328. minLength: 8,
  1329. maxLength: 40,
  1330. message: '被保人地址长度在 {minLength} 到 {maxLength} 个字符',
  1331. },
  1332. ],
  1333. identifyValidDate: [{
  1334. required: true,
  1335. message: '请选择身份证起期',
  1336. trigger: ['blur', 'change'],
  1337. }, {
  1338. pattern: /^\d{4}-\d{2}-\d{2}$/,
  1339. message: '身份证起期格式错误',
  1340. }],
  1341. identifyValidEndDate: [{
  1342. required: true,
  1343. message: '请选择身份证止期',
  1344. trigger: ['blur', 'change'],
  1345. }, {
  1346. pattern: /^\d{4}-\d{2}-\d{2}$/,
  1347. message: '身份证止期格式错误',
  1348. }]
  1349. },
  1350. endYear: Year,
  1351. endMonth: Month,
  1352. registerDateShow: false, //注册日期
  1353. issueDateShow: false, //发证日期
  1354. transferDateShow: false, //转移登记日期
  1355. ownerDateShow: false, //
  1356. applicantDateShow: false, //
  1357. InsuredDateShow: false, //
  1358. identifyType: "身份证",
  1359. carExpand: false,
  1360. ownersExpand: false,
  1361. policyHolderExpand: false,
  1362. InsuredExpand: false,
  1363. carInfoShow: true, //车辆信息显示
  1364. headerText: '信息录入',
  1365. headerStyle: {
  1366. backgroundColor: 'transparent',
  1367. },
  1368. prevScrollTop: 0,
  1369. policyHolderholder: null,
  1370. Insuredholder: null,
  1371. ownerValidEndDateholder: null,
  1372. policyValidEndDateholder: null,
  1373. insuredValidEndDateholder: null,
  1374. holderstatusList: [{
  1375. label: '同车主',
  1376. value: "1",
  1377. },
  1378. {
  1379. label: '其他人',
  1380. value: "99",
  1381. },
  1382. ],
  1383. insuredstatusList: [{
  1384. label: '同车主',
  1385. value: '1',
  1386. },
  1387. {
  1388. label: '同投保人',
  1389. value: '2',
  1390. },
  1391. {
  1392. label: '其他人',
  1393. value: '99',
  1394. },
  1395. ],
  1396. endDateList: [{
  1397. label: '10年',
  1398. value: "10年"
  1399. },
  1400. {
  1401. label: '20年',
  1402. value: "20年"
  1403. },
  1404. {
  1405. label: '长期',
  1406. value: "长期"
  1407. },
  1408. ],
  1409. cardeg: 0, //旋转角度
  1410. user1deg: 0, //旋转角度
  1411. user2deg: 0, //旋转角度
  1412. user3deg: 0, //旋转角度
  1413. routepage: "",
  1414. carInfo1: {
  1415. carnature: "非营业",
  1416. energyType: "燃油",
  1417. vehicleUse: "家庭自用",
  1418. cartype: "轿车",
  1419. cimodelclass: "客车",
  1420. },
  1421. carnatureShow: false, //使用性质
  1422. energyTypeShow: false, //能源种类
  1423. vehicleUseShow: false, //车辆用途
  1424. cartypeShow: false, //车辆类型
  1425. cimodelclassShow: false, //车辆种类
  1426. natureOfVehicleUseoptions: [],
  1427. vehicleTypeoptions: [],
  1428. trafficManagementVehicleTypeoptions: [],
  1429. energyTypeoptions: [],
  1430. businessVehicleUseoptions: [],
  1431. outOfBusinessVehicleUseoptions: [],
  1432. productId: "",
  1433. productName: "",
  1434. isActive: true,
  1435. quoteno: "",
  1436. carModificationLabel: true, //车辆修改标识
  1437. userModificationLabel: true, //人员修改标识
  1438. }
  1439. },
  1440. watch: {
  1441. carSwitching(newVal) {
  1442. if (newVal) {
  1443. this.$nextTick(() => {
  1444. this.$refs.carForm.setRules(this.carRules);
  1445. })
  1446. } else {
  1447. this.$nextTick(() => {
  1448. this.$refs.carForm1.setRules(this.carRules);
  1449. })
  1450. }
  1451. },
  1452. ownerSwitching(newVal) {
  1453. if (newVal) {
  1454. this.$nextTick(() => {
  1455. this.$refs.ownerForm.setRules(this.ownerRules);
  1456. })
  1457. } else {
  1458. this.$nextTick(() => {
  1459. this.$refs.ownerForm1.setRules(this.ownerRules);
  1460. })
  1461. }
  1462. },
  1463. policySwitching(newVal) {
  1464. if (newVal) {
  1465. this.$nextTick(() => {
  1466. this.$refs.policyForm.setRules(this.policyRules);
  1467. })
  1468. } else {
  1469. this.$nextTick(() => {
  1470. this.$refs.policyForm1.setRules(this.policyRules);
  1471. })
  1472. }
  1473. },
  1474. insuredSwitching(newVal) {
  1475. if (newVal) {
  1476. this.$nextTick(() => {
  1477. this.$refs.insuredForm.setRules(this.insuredRules);
  1478. })
  1479. } else {
  1480. this.$nextTick(() => {
  1481. this.$refs.insuredForm1.setRules(this.insuredRules);
  1482. })
  1483. }
  1484. },
  1485. checkType: {
  1486. handler(val) {
  1487. switch (val) {
  1488. case 'carInfo':
  1489. this.tabslist = [{
  1490. name: '行驶证识别'
  1491. }]
  1492. break;
  1493. default:
  1494. this.tabslist = [{
  1495. name: '证件识别'
  1496. }]
  1497. break;
  1498. }
  1499. },
  1500. deep: true
  1501. },
  1502. },
  1503. onReady() {
  1504. this.$refs.carForm.setRules(this.carRules);
  1505. this.$refs.ownerForm.setRules(this.ownerRules);
  1506. this.$refs.policyForm.setRules(this.policyRules);
  1507. this.$refs.insuredForm.setRules(this.insuredRules);
  1508. },
  1509. onShow() {
  1510. uni.pageScrollTo({
  1511. scrollTop: 0,
  1512. duration: 0
  1513. });
  1514. },
  1515. onLoad(params) {
  1516. let pages = getCurrentPages(); // 当前页面路由
  1517. if (pages.length > 1) {
  1518. let beforePage = pages[pages.length - 2].route; // 上一个页面路由
  1519. this.routepage = beforePage;
  1520. }
  1521. if (!!params.licenseNo) {
  1522. let historys = JSON.parse(params.historyInfo);
  1523. this.carExpand = true;
  1524. this.carInfo.licenseNo = decodeURIComponent(params.licenseNo);
  1525. this.carInfo = historys.carInfo;
  1526. this.ownerInfo = historys.ownerInfo;
  1527. this.policyHolderInfo = historys.policyHolderInfo;
  1528. this.insuredPersonInfo = historys.insuredPersonInfo;
  1529. this.carInfoPositiveList = historys.carInfoPositiveList;
  1530. this.ownerInfoPositiveList = historys.ownerInfoPositiveList;
  1531. this.policyHolderInfoPositiveList = historys.policyHolderInfoPositiveList;
  1532. this.insuredPersonInfoPositiveList = historys.insuredPersonInfoPositiveList;
  1533. if (this.ownerInfo.identifyNumber) {
  1534. this.ownersExpand = true;
  1535. }
  1536. } else {
  1537. const eventChannel = this.getOpenerEventChannel()
  1538. eventChannel.on('acceptData', (data) => {
  1539. if (!!data) {
  1540. let info = JSON.parse(JSON.stringify(data));
  1541. console.log(info);
  1542. let page = this.routepage;
  1543. switch (page) {
  1544. case 'pages/carInsure/entry':
  1545. this.carInfoShow = false;
  1546. this.carInfo = info.carInfo; //车辆信息
  1547. this.ownerInfo = info.ownerInfo; //车辆信息
  1548. this.policyHolderInfo = info.policyHolderInfo; //车辆信息
  1549. this.insuredPersonInfo = info.insuredPersonInfo; //车辆信息
  1550. if (this.carInfo.cimodelclass == 'A0') {
  1551. this.carInfo1.cimodelclass = "客车"
  1552. } else {
  1553. this.carInfo1.cimodelclass = "货车"
  1554. }
  1555. this.ownerInfo.name = info.carInfo.carOwner; //车主
  1556. this.carInfoPositiveList = info.carInfoPositiveList; //车辆
  1557. break;
  1558. case 'pages/carInsure/quote':
  1559. case 'pages/carInsure/premiumCalc':
  1560. case 'pages/carInsure/quoteDetail':
  1561. case 'pages/carInsure/companyQuotable':
  1562. this.productId = data.productId;
  1563. this.productName = data.productName;
  1564. this.carInfoShow = true;
  1565. this.carInfo = info.carInfo; //车辆信息
  1566. if (this.carInfo.cimodelclass == 'A0') {
  1567. this.carInfo1.cimodelclass = "客车"
  1568. } else {
  1569. this.carInfo1.cimodelclass = "货车"
  1570. }
  1571. this.ownerInfo = info.ownerInfo; //车主信息
  1572. this.policyHolderInfo = info.policyHolderInfo; //投保人信息
  1573. this.insuredPersonInfo = info.insuredPersonInfo; //被保人信息
  1574. this.riskList = info.riskList; //险种大类
  1575. this.kindList = info.kindList; //商业险险别
  1576. this.carInfoPositiveList = info.carInfoPositiveList; //车辆
  1577. this.ownerInfoPositiveList = info.ownerInfoPositiveList; //车主
  1578. this.policyHolderInfoPositiveList = info.policyHolderInfoPositiveList; //投保
  1579. this.insuredPersonInfoPositiveList = info.insuredPersonInfoPositiveList; //被保人
  1580. if (this.policyHolderInfo.owner) {
  1581. this.policyHolderholder = '1';
  1582. } else {
  1583. this.policyHolderholder = '99';
  1584. }
  1585. if (this.insuredPersonInfo.owner) {
  1586. this.Insuredholder = '1';
  1587. } else if (this.insuredPersonInfo.insuranceHolder) {
  1588. this.Insuredholder = '2';
  1589. } else {
  1590. this.Insuredholder = '99';
  1591. }
  1592. if (info.identifier) {
  1593. this[info.identifier] = false;
  1594. }
  1595. this.quoteno = info.quoteno;
  1596. this.imageEcho(info.quoteno)
  1597. // this.carfrontImg = this.$base.baseUrl +
  1598. // '/upload/image/2024/10/21/8962531b02138cd842833fdc3b84b3df.jpg'
  1599. break;
  1600. default:
  1601. break;
  1602. }
  1603. }
  1604. })
  1605. }
  1606. this.getDicType("businessVehicleUse"); //车辆用途(营业)
  1607. this.getDicType("outOfBusinessVehicleUse"); //车辆用途(非营业)
  1608. this.getDicType("natureOfVehicleUse"); //车辆性质
  1609. this.getDicType("vehicleType"); //车辆种类
  1610. this.getDicType("trafficManagementVehicleType"); //车辆类型
  1611. this.getDicType("energyType"); //能源种类
  1612. },
  1613. onUnload() {
  1614. //投保人同车主
  1615. if (this.policyHolderholder == '1') {
  1616. this.setPersonInfoAndImageType('ownerInfo', 'policyHolderInfo', "C03");
  1617. }
  1618. if (this.Insuredholder == '1') {
  1619. this.setPersonInfoAndImageType('ownerInfo', 'insuredPersonInfo', "C04");
  1620. }
  1621. if (this.Insuredholder == '2') {
  1622. this.setPersonInfoAndImageType('policyHolderInfo', 'insuredPersonInfo', "C04");
  1623. }
  1624. uni.setStorageSync('historyInfo', {
  1625. carInfo: this.carInfo,
  1626. ownerInfo: this.ownerInfo,
  1627. policyHolderInfo: this.policyHolderInfo,
  1628. insuredPersonInfo: this.insuredPersonInfo,
  1629. carInfoPositiveList: this.carInfoPositiveList,
  1630. ownerInfoPositiveList: this.ownerInfoPositiveList,
  1631. policyHolderInfoPositiveList: this.policyHolderInfoPositiveList,
  1632. insuredPersonInfoPositiveList: this.insuredPersonInfoPositiveList,
  1633. });
  1634. },
  1635. onPageScroll(e) {
  1636. this.handleScroll(e);
  1637. },
  1638. mounted() {
  1639. uni.pageScrollTo({
  1640. scrollTop: 0,
  1641. duration: 0
  1642. });
  1643. uni.$on('scroll', this.handleScroll);
  1644. },
  1645. destroyed() {
  1646. uni.$off('scroll', this.handleScroll);
  1647. },
  1648. methods: {
  1649. async imageEcho(quotenos) {
  1650. let imgres = await this.$http.get('/ins/taskImage/findByQuoteNo?quoteNo=' + quotenos);
  1651. if (imgres.code == "200") {
  1652. Object.keys(imgres.data).forEach((keys) => {
  1653. if (imgres.data[keys].url) {
  1654. imgres.data[keys].url = this.$base.baseUrl + imgres.data[keys].url;
  1655. switch (keys) {
  1656. case 'C01':
  1657. this.carfrontImg = imgres.data[keys].url;
  1658. break;
  1659. case 'D01':
  1660. this.carbackImg = imgres.data[keys].url;
  1661. break;
  1662. case 'C02':
  1663. this.ownerfrontImg = imgres.data[keys].url;
  1664. break;
  1665. case 'D02':
  1666. this.ownerbackImg = imgres.data[keys].url;
  1667. break;
  1668. case 'C03':
  1669. this.policyHolderfrontImg = imgres.data[keys].url;
  1670. break;
  1671. case 'D03':
  1672. this.policyHolderbackImg = imgres.data[keys].url;
  1673. break;
  1674. case 'C04':
  1675. this.InsuredfrontImg = imgres.data[keys].url;
  1676. break;
  1677. case 'D04':
  1678. this.InsuredbackImg = imgres.data[keys].url;
  1679. break;
  1680. default:
  1681. break;
  1682. }
  1683. } else {
  1684. switch (keys) {
  1685. case 'C01':
  1686. this.carSwitching = false;
  1687. break;
  1688. case 'C02':
  1689. this.ownerSwitching = false;
  1690. break;
  1691. case 'C03':
  1692. this.policySwitching = false;
  1693. break;
  1694. case 'C04':
  1695. this.insuredSwitching = false;
  1696. break;
  1697. default:
  1698. break;
  1699. }
  1700. }
  1701. });
  1702. } else {
  1703. this.carSwitching = false;
  1704. this.ownerSwitching = false;
  1705. this.policySwitching = false;
  1706. this.insuredSwitching = false;
  1707. }
  1708. },
  1709. btn_click() {
  1710. uni.navigateTo({
  1711. url: '/pages/chat/chat'
  1712. })
  1713. },
  1714. toggleSwitch() {
  1715. this.isActive = !this.isActive;
  1716. },
  1717. async getDicType(type) {
  1718. let res = await this.$http.get('/sysDict/dictDetails/' + type);
  1719. if (res.code == 200) {
  1720. this[type + 'options'] = res.data.ddList;
  1721. if (type == "energyType") {
  1722. this.carInfo1.energyType = this.dictionaryMatching(this.energyTypeoptions, this
  1723. .carInfo
  1724. .energyType)
  1725. }
  1726. if (type == "vehicleType") {
  1727. this.carInfo1.cimodelclass = this.dictionaryMatching(this.vehicleTypeoptions,
  1728. this
  1729. .carInfo
  1730. .cimodelclass)
  1731. }
  1732. if (type == "trafficManagementVehicleType") {
  1733. this.carInfo1.cartype = this.dictionaryMatching(this.trafficManagementVehicleTypeoptions,
  1734. this
  1735. .carInfo
  1736. .cartype);
  1737. }
  1738. if (type == "natureOfVehicleUse") {
  1739. this.carInfo1.carnature = this.carInfo.carnature ? this.dictionaryMatching(this
  1740. .natureOfVehicleUseoptions,
  1741. this
  1742. .carInfo
  1743. .carnature) : "";
  1744. }
  1745. if ((type == "BusinessVehicleUse" || type == 'outOfBusinessVehicleUse') && this.carInfo
  1746. .carnature) {
  1747. this.carInfo1.vehicleUse = this.carInfo.carnature == '01' ? this.dictionaryMatching(this
  1748. .businessVehicleUseoptions,
  1749. this
  1750. .carInfo
  1751. .vehicleUse) : this.dictionaryMatching(this
  1752. .outOfBusinessVehicleUseoptions,
  1753. this
  1754. .carInfo
  1755. .vehicleUse);
  1756. }
  1757. }
  1758. },
  1759. dictionaryConfirm(e, name) {
  1760. if (name == 'carnature') {
  1761. this.carInfo1['vehicleUse'] = "";
  1762. this.carInfo['vehicleUse'] = "";
  1763. }
  1764. this.carInfo[name] = e[0].value;
  1765. this.carInfo1[name] = e[0].label;
  1766. },
  1767. async toChooseVin(cctype) {
  1768. if (cctype == '' || cctype == null) {
  1769. return uni.showToast({
  1770. icon: 'none',
  1771. title: '请输入车架号',
  1772. duration: 1500
  1773. });
  1774. } else {
  1775. if (!this.isFrameno(cctype.trim())) {
  1776. return uni.showToast({
  1777. title: '请输入正确的车辆识别码',
  1778. icon: "none"
  1779. });
  1780. }
  1781. this.getCarModel(cctype);
  1782. }
  1783. },
  1784. //车型查询
  1785. async getCarModel(cctype) {
  1786. this.carModelLookupModal = true;
  1787. let res = await this.$http.get('/order/carModel/vinSearch?frameNo=' + cctype);
  1788. this.carTypeVINList = res.data;
  1789. },
  1790. //品牌型号查询
  1791. async getBrandModel(cctype, marketYear) {
  1792. this.brandModelLookupModal = true;
  1793. let cctypeName = cctype.replace(/[^u4e00-u9fa5|,]+/ig, ''); //去掉中文
  1794. let res = await this.$http.post('/order/zhongMeiApi/modelsQuery', {
  1795. modelName: cctypeName,
  1796. marketYear: marketYear
  1797. });
  1798. this.brandModelList = res.data;
  1799. },
  1800. carTypeClick(index, item) {
  1801. this.isFocusedIndex = index;
  1802. this.carTypeVINListIndex = item;
  1803. },
  1804. //车型赋值
  1805. carModelLookupSubmit() {
  1806. if (this.isFocusedIndex !== "99") {
  1807. this.carInfo.brandName = this.carTypeVINListIndex.brandCN; //车型
  1808. this.carInfo.modelcname = this.carTypeVINListIndex.modelName; //车型
  1809. this.carInfo.caryear = this.carTypeVINListIndex.marketYear; //年款
  1810. this.carInfo.seatCount = this.carTypeVINListIndex.ratedPassengerCapacity; //座位数
  1811. this.carInfo.purchasePrice = this.carTypeVINListIndex.replacementValue; //价格
  1812. this.carInfo.modelCode = this.carTypeVINListIndex.modelCode; //车辆型号编码
  1813. this.carInfo.familyName = this.carTypeVINListIndex.series; //系列
  1814. this.carInfo.enginedesc = this.carTypeVINListIndex.displacement; //排量
  1815. this.carInfo.energyType = this.carTypeVINListIndex.fuelTypeCode; //燃油种类
  1816. this.carInfo.powerScale = this.carTypeVINListIndex.powerScale; //功率
  1817. this.carModelLookupModal = false;
  1818. this.vehicleType = true;
  1819. } else {
  1820. return uni.showToast({
  1821. title: '未选择车型',
  1822. icon: "none"
  1823. });
  1824. }
  1825. },
  1826. carModelLookupNext() {
  1827. this.carModelLookupModal = false;
  1828. this.getBrandModel(this.carInfo.modelcname);
  1829. },
  1830. //品牌
  1831. brandModelClick(index, item) {
  1832. this.brandModelIndex = index;
  1833. this.brandModelListIndex = item;
  1834. },
  1835. //品牌型号赋值
  1836. brandModelLookupSubmit() {
  1837. if (this.brandModelIndex !== "99") {
  1838. this.carInfo.brandName = this.brandModelListIndex.brandCN; //车型
  1839. this.carInfo.modelcname = this.brandModelListIndex.modelName; //车型
  1840. this.carInfo.caryear = this.brandModelListIndex.marketYear; //年款
  1841. this.carInfo.seatCount = this.brandModelListIndex.ratedPassengerCapacity; //座位数
  1842. this.carInfo.purchasePrice = this.brandModelListIndex.replacementValue; //价格
  1843. this.carInfo.modelCode = this.brandModelListIndex.modelCode; //车辆型号编码
  1844. this.carInfo.familyName = this.brandModelListIndex.series; //系列
  1845. this.carInfo.enginedesc = this.brandModelListIndex.displacement; //排量
  1846. this.carInfo.energyType = this.brandModelListIndex.fuelTypeCode; //燃油种类
  1847. this.carInfo.powerScale = this.brandModelListIndex.powerScale; //功率
  1848. this.brandModelLookupModal = false;
  1849. this.vehicleType = true;
  1850. } else {
  1851. return uni.showToast({
  1852. title: '未选择车型',
  1853. icon: "none"
  1854. });
  1855. }
  1856. },
  1857. marketYearDateconfirm(e) {
  1858. this.marketYear = e.year;
  1859. this.getBrandModel(this.carInfo.modelcname, this.marketYear);
  1860. },
  1861. //跳转选择车辆类型页面
  1862. toChooseVehicleType(cctype) {
  1863. if (cctype == '' || cctype == null) {
  1864. uni.showToast({
  1865. icon: 'none',
  1866. title: '请输入车型名称',
  1867. duration: 1500
  1868. });
  1869. } else {
  1870. this.getBrandModel(cctype);
  1871. }
  1872. },
  1873. //验证车架号
  1874. isFrameno(str) {
  1875. let mPattern = /^([0-9A-Z]){17}$/;
  1876. return mPattern.test(str);
  1877. },
  1878. rotatefront(int) {
  1879. this[int] = this[int] == 270 ? 0 : this[int] + 90;
  1880. },
  1881. rotateback(int) {
  1882. this[int] = this[int] == 0 ? 270 : this[int] - 90;
  1883. },
  1884. onMove(e) {
  1885. this.x = e.detail.x;
  1886. this.y = e.detail.y;
  1887. },
  1888. //字典name匹配
  1889. dictionaryMatching(list, value) {
  1890. let obj = list.find(val => val.dictValue == value);
  1891. if (obj) {
  1892. return obj.dictTag;
  1893. }
  1894. },
  1895. //OC识别返回信息
  1896. async carCallback(obj) {
  1897. console.log(obj.frontImg);
  1898. this.carfrontImg = obj.frontImg;
  1899. this.carbackImg = obj.backImg;
  1900. this.carInfoPositiveList = obj.ImgList;
  1901. Object.assign(this.carInfo, obj.Info);
  1902. this.carInfo1.cimodelclass = this.dictionaryMatching(this.vehicleTypeoptions,
  1903. this
  1904. .carInfo
  1905. .cimodelclass)
  1906. this.carInfo1.cartype = this.dictionaryMatching(this.trafficManagementVehicleTypeoptions,
  1907. this
  1908. .carInfo
  1909. .cartype);
  1910. this.carInfo1.carnature = this.carInfo.carnature ? this.dictionaryMatching(this
  1911. .natureOfVehicleUseoptions,
  1912. this
  1913. .carInfo
  1914. .carnature) : "";
  1915. if (this.carInfo.carnature && this.carInfo.vehicleUse) {
  1916. this.carInfo1.vehicleUse = this.carInfo.carnature == '02' ? this.dictionaryMatching(this
  1917. .outOfBusinessVehicleUseoptions,
  1918. this
  1919. .carInfo
  1920. .vehicleUse) : this.dictionaryMatching(this
  1921. .BusinessVehicleUseoptions,
  1922. this
  1923. .carInfo
  1924. .vehicleUse);
  1925. } else {
  1926. this.carInfo1.vehicleUse = "";
  1927. }
  1928. this.OCRShow = false;
  1929. this.carModelLookupModal = true;
  1930. let res = await this.$http.get('/order/carModel/vinSearch?frameNo=' + this.carInfo.frameNo);
  1931. this.carTypeVINList = res.data;
  1932. },
  1933. ownerInfoCallback(obj) {
  1934. this.ownerfrontImg = obj.frontImg;
  1935. this.ownerbackImg = obj.backImg;
  1936. this.ownerInfoPositiveList = obj.ImgList;
  1937. Object.assign(this.ownerInfo, obj.Info);
  1938. this.OCRShow = false;
  1939. this.ownersExpand = true;
  1940. },
  1941. applicantInfoCallback(obj) {
  1942. this.policyHolderfrontImg = obj.frontImg;
  1943. this.policyHolderbackImg = obj.backImg;
  1944. this.policyHolderInfoPositiveList = obj.ImgList;
  1945. Object.assign(this.policyHolderInfo, obj.Info);
  1946. this.OCRShow = false;
  1947. this.policyHolderExpand = true;
  1948. },
  1949. InsuredInfoCallback(obj) {
  1950. this.InsuredfrontImg = obj.frontImg;
  1951. this.InsuredbackImg = obj.backImg;
  1952. this.insuredPersonInfoPositiveList = obj.ImgList;
  1953. Object.assign(this.insuredPersonInfo, obj.Info);
  1954. this.OCRShow = false;
  1955. this.InsuredExpand = true;
  1956. },
  1957. OCRtabschange(e) {
  1958. this.tabsCurrent = e;
  1959. },
  1960. closePopup() {
  1961. this.OCRShow = false;
  1962. },
  1963. ocrIdentify(name) {
  1964. this.checkType = name;
  1965. this.OCRShow = !this.OCRShow;
  1966. },
  1967. transferFlagchange(status) {
  1968. if (status) {
  1969. this.carInfo.transferDate = this.carInfo.issueDate;
  1970. } else {
  1971. this.carInfo.transferDate = ""
  1972. }
  1973. },
  1974. binddata(name, value, type) {
  1975. if (name == 'identifyNumber' && value) {
  1976. this[type].age = getAgeByIdCard(value)
  1977. this[type].gender = getGenderFromIdCard(value)
  1978. }
  1979. },
  1980. //转变大写(车型/车架号/发动机号)
  1981. upperCaseType(type) {
  1982. this.carInfo[type] = this.carInfo[type].toUpperCase();
  1983. if (type == 'frameNo') {
  1984. this.carInfo.vinNo = this.carInfo.frameNo.trim();
  1985. }
  1986. },
  1987. Dateconfirm(e, obj, param) {
  1988. this[obj][param] = e.year + '-' + e.month + '-' + e.day;
  1989. },
  1990. //(同车主/同投保人)数据处理
  1991. setPersonInfoAndImageType(sourceInfo, targetInfo, imageType) {
  1992. let obj = JSON.parse(JSON.stringify(this[sourceInfo]));
  1993. this[targetInfo] = {
  1994. ...obj
  1995. };
  1996. if (this[sourceInfo + 'PositiveList'].length > 0) {
  1997. this[targetInfo + 'PositiveList'] = JSON.parse(JSON.stringify(this[sourceInfo + 'PositiveList']));
  1998. if (this[targetInfo + 'PositiveList'].length == 1) {
  1999. this[targetInfo + 'PositiveList'][0].imageType = imageType;
  2000. } else {
  2001. this[targetInfo + 'PositiveList'][0].imageType = imageType;
  2002. this[targetInfo + 'PositiveList'][1].imageType = `D${imageType.substr(1)}`;
  2003. }
  2004. }
  2005. },
  2006. isEveryPropertyFilled(obj, excludedKey) {
  2007. // 通过 Object.keys() 遍历对象的所有键,并使用 every() 方法检查每个键对应的值
  2008. return Object.keys(obj).every(key => {
  2009. // 如果当前键是要排除的键,则认为这个键“有效”
  2010. if (key === excludedKey) {
  2011. return true;
  2012. }
  2013. // 对于其他键,检查值是否不是 undefined、null 或空字符串
  2014. const value = obj[key];
  2015. return value !== undefined && value !== null && value !== '';
  2016. });
  2017. },
  2018. //校验事件
  2019. async next() {
  2020. let _this = this;
  2021. if (this.policyHolderholder == '1') {
  2022. await this.setPersonInfoAndImageType('ownerInfo',
  2023. 'policyHolderInfo',
  2024. "C03");
  2025. this.policyHolderInfo.owner = true;
  2026. this.policyHolderInfo = {
  2027. ...this.policyHolderInfo
  2028. };
  2029. }
  2030. if (this.Insuredholder == '1') {
  2031. await this.setPersonInfoAndImageType('ownerInfo',
  2032. 'insuredPersonInfo',
  2033. "C04");
  2034. this.insuredPersonInfo.owner = true;
  2035. this.insuredPersonInfo = {
  2036. ...this.insuredPersonInfo
  2037. };
  2038. }
  2039. if (this.Insuredholder == '2') {
  2040. await this.setPersonInfoAndImageType('policyHolderInfo',
  2041. 'insuredPersonInfo', "C04");
  2042. this.insuredPersonInfo.insuranceHolder = true;
  2043. this.insuredPersonInfo = {
  2044. ...this.insuredPersonInfo
  2045. };
  2046. }
  2047. _this.$refs[this.carSwitching ? 'carForm' : 'carForm1'].validate(carvalid => {
  2048. if (carvalid) {
  2049. _this.$refs[this.ownerSwitching ? 'ownerForm' : 'ownerForm1'].validate(
  2050. ownervalid => {
  2051. if (ownervalid) {
  2052. _this.$refs[this.policySwitching ? 'policyForm' : 'policyForm1']
  2053. .validate(
  2054. policyvalid => {
  2055. if (policyvalid) {
  2056. _this.$refs[this.insuredSwitching ? 'insuredForm' :
  2057. 'insuredForm1']
  2058. .validate(insuredvalid => {
  2059. if (insuredvalid) {
  2060. _this.navigate({
  2061. url: '/pages/carInsure/companyQuotable',
  2062. success: (res) => {
  2063. res.eventChannel
  2064. .emit(
  2065. "acceptData", {
  2066. carInfo: _this
  2067. .carInfo,
  2068. ownerInfo: _this
  2069. .ownerInfo,
  2070. policyHolderInfo: _this
  2071. .policyHolderInfo,
  2072. insuredPersonInfo: _this
  2073. .insuredPersonInfo,
  2074. riskList: _this
  2075. .riskList,
  2076. kindList: _this
  2077. .kindList,
  2078. carInfoPositiveList: _this
  2079. .carInfoPositiveList, //车辆
  2080. ownerInfoPositiveList: _this
  2081. .ownerInfoPositiveList, //车主
  2082. policyHolderInfoPositiveList: _this
  2083. .policyHolderInfoPositiveList, //投保人
  2084. insuredPersonInfoPositiveList: _this
  2085. .insuredPersonInfoPositiveList, //被保人
  2086. productId: _this
  2087. .productId,
  2088. productName: _this
  2089. .productName,
  2090. quoteno: this
  2091. .quoteno
  2092. })
  2093. }
  2094. }, "navigateTo", true);
  2095. }
  2096. });
  2097. }
  2098. });
  2099. }
  2100. });
  2101. }
  2102. });
  2103. },
  2104. expand(int) {
  2105. this[int] = true;
  2106. },
  2107. //人员止期
  2108. ValidEndDateClick(value, identify, info) {
  2109. this[identify] = value;
  2110. switch (value) {
  2111. case '10年':
  2112. this[info].identifyValidEndDate = this.endDateInt(this[info].identifyValidDate, 10)
  2113. break;
  2114. case '20年':
  2115. this[info].identifyValidEndDate = this.endDateInt(this[info].identifyValidDate, 20)
  2116. break;
  2117. case '长期':
  2118. this[info].identifyValidEndDate = '9999-12-31'
  2119. break;
  2120. default:
  2121. }
  2122. },
  2123. //投保人同车主
  2124. async applicantholderClick(value) {
  2125. this.policyHolderholder = value;
  2126. if (value == '99') {
  2127. for (let key in this.policyHolderInfo) {
  2128. if (key !== 'identifyType') {
  2129. this.policyHolderInfo[key] = '';
  2130. }
  2131. }
  2132. this.policyHolderfrontImg = "";
  2133. this.policyHolderbackImg = "";
  2134. } else {
  2135. await this.setPersonInfoAndImageType('ownerInfo',
  2136. 'policyHolderInfo',
  2137. "C03");
  2138. this.policyHolderInfo.owner = true;
  2139. this.policyHolderInfo = {
  2140. ...this.policyHolderInfo
  2141. };
  2142. }
  2143. },
  2144. //被保人同车主/投保人
  2145. async InsuredholderClick(value) {
  2146. this.Insuredholder = value;
  2147. if (value == '99') {
  2148. for (let key in this.insuredPersonInfo) {
  2149. if (key !== 'identifyType') {
  2150. this.insuredPersonInfo[key] = '';
  2151. }
  2152. }
  2153. this.InsuredfrontImg = "";
  2154. this.InsuredbackImg = "";
  2155. } else if (value == '1') {
  2156. await this.setPersonInfoAndImageType('ownerInfo',
  2157. 'insuredPersonInfo',
  2158. "C04");
  2159. this.insuredPersonInfo.owner = true;
  2160. this.insuredPersonInfo = {
  2161. ...this.insuredPersonInfo
  2162. };
  2163. } else {
  2164. await this.setPersonInfoAndImageType('policyHolderInfo',
  2165. 'insuredPersonInfo', "C04");
  2166. this.insuredPersonInfo.insuranceHolder = true;
  2167. this.insuredPersonInfo = {
  2168. ...this.insuredPersonInfo
  2169. };
  2170. }
  2171. },
  2172. //头部颜色变化js
  2173. handleScroll(e) {
  2174. const scrollTop = e.scrollTop;
  2175. let opacity = 1;
  2176. let shadowOpacity = 0;
  2177. if (scrollTop > this.prevScrollTop) {
  2178. // 向下滚动
  2179. opacity = Math.min((scrollTop - 50) / 100, 1); // 根据滚动距离计算透明度,最大为1
  2180. shadowOpacity = Math.min((scrollTop - 50) / 500, 0.3); // 根据滚动距离计算阴影透明度,最大为0.3
  2181. } else if (scrollTop < 50) {
  2182. // 在顶部附近,设置透明度和阴影透明度均为0
  2183. opacity = 0;
  2184. shadowOpacity = 0;
  2185. } else {
  2186. // 向上滚动
  2187. opacity = Math.max(0, 1 - (scrollTop / 100)); // 根据滚动距离计算透明度,最小为0
  2188. shadowOpacity = Math.max(0, 0.3 - (scrollTop / 500)); // 根据滚动距离计算阴影透明度,最小为0
  2189. }
  2190. const rgbaOpacity = opacity * 100; // 将透明度转换为百分比形式
  2191. const backgroundColor = `rgb(255 255 255 / ${rgbaOpacity}%)`; // 根据透明度设置背景颜色
  2192. // 计算阴影的颜色和大小
  2193. const shadowBlur = shadowOpacity * 10; // 阴影模糊程度为阴影透明度的10像素
  2194. const shadowColor = `rgba(218, 227, 244, ${shadowOpacity})`; // 阴影颜色为黑色,透明度根据阴影透明度计算
  2195. const boxShadow = `0 0 ${shadowBlur}px ${shadowColor}`; // 生成box-shadow属性值
  2196. this.headerStyle.backgroundColor = backgroundColor;
  2197. this.headerStyle.boxShadow = boxShadow;
  2198. this.prevScrollTop = scrollTop;
  2199. },
  2200. //页面返回按钮
  2201. back() {
  2202. uni.navigateBack({
  2203. delta: 1, // 返回的页面数,如果是1表示返回上一页
  2204. success: function() {}
  2205. });
  2206. },
  2207. endDateInt(time, sum) {
  2208. let currentDate = new Date(time);
  2209. currentDate.setFullYear(currentDate.getFullYear() + sum);
  2210. let year = currentDate.getFullYear();
  2211. let month = ('0' + (currentDate.getMonth() + 1)).slice(-2);
  2212. let day = ('0' + currentDate.getDate()).slice(-2);
  2213. let formattedDate = year + '-' + month + '-' + day;
  2214. return formattedDate;
  2215. }
  2216. },
  2217. }
  2218. </script>
  2219. <style lang="scss" scoped>
  2220. .search {
  2221. background: linear-gradient(270deg, #FF9A47 0%, #FF5600 100%);
  2222. border-radius: 2px;
  2223. color: #fff;
  2224. font-size: 22rpx;
  2225. padding: 1px 6px;
  2226. }
  2227. /deep/ {
  2228. .u-form-item {
  2229. padding: 2px 0;
  2230. }
  2231. .u-form-item .uni-input-placeholder {
  2232. color: grey !important;
  2233. }
  2234. .u-form-item__border-bottom--error[data-v-5e7216f1]:after {
  2235. border-color: #D42426;
  2236. }
  2237. .u-border-bottom:after {
  2238. border-bottom-width: 2px;
  2239. }
  2240. .u-input__textarea[data-v-fdbb9fe6] {
  2241. min-height: auto !important;
  2242. }
  2243. }
  2244. .uni-forms-item ::v-deep .uni-input-input {
  2245. text-align: end;
  2246. }
  2247. .uni-forms-item ::v-deep .u-input__textarea {
  2248. min-height: auto !important;
  2249. }
  2250. ::v-deep .uni-forms-item {
  2251. border-bottom: 1px solid #f2f2f2;
  2252. }
  2253. ::v-deep .uni-forms-item:last-child {
  2254. border: none;
  2255. }
  2256. .page {
  2257. height: auto;
  2258. background: #F8FAFE;
  2259. padding: 12px 16px 50px 16px;
  2260. }
  2261. .fixed {
  2262. position: fixed;
  2263. top: 0;
  2264. left: 0;
  2265. width: 100%;
  2266. height: auto;
  2267. background-color: transparent;
  2268. padding: 50px 16px 16px 16px;
  2269. z-index: 99;
  2270. transition: background-color 0.2s;
  2271. text {
  2272. font-size: 18px;
  2273. font-weight: bold;
  2274. }
  2275. }
  2276. .banner {
  2277. width: 100%;
  2278. height: 120px;
  2279. }
  2280. .Information {
  2281. width: 100%;
  2282. height: auto;
  2283. margin-bottom: 24px;
  2284. .title {
  2285. font-size: 15px;
  2286. font-weight: bold;
  2287. }
  2288. //手动自动切换阳寿
  2289. .manualSwitch {
  2290. border-radius: 4px;
  2291. border: 1px solid #FF5600;
  2292. padding: 2px 5px;
  2293. image {
  2294. width: 18px;
  2295. height: 18px;
  2296. margin-right: 5px;
  2297. }
  2298. text {
  2299. color: #FF5600;
  2300. }
  2301. }
  2302. .collapse {
  2303. width: 100%;
  2304. height: auto;
  2305. background: #FFFFFF;
  2306. margin-top: 10px;
  2307. box-shadow: 0px 4px 10px 0px #DAE3F4;
  2308. border-radius: 12px 12px 12px 12px;
  2309. .top-ocr {
  2310. background-color: #F9F9F9;
  2311. border-top-left-radius: 12px;
  2312. border-top-right-radius: 12px;
  2313. color: #0052FF;
  2314. font-size: 14px;
  2315. image {
  2316. width: 20px;
  2317. height: 20px;
  2318. }
  2319. }
  2320. .btn-collapse {
  2321. height: 42px;
  2322. font-size: 12px;
  2323. background-color: white;
  2324. border-bottom-left-radius: 12px;
  2325. border-bottom-right-radius: 12px;
  2326. color: rgba(60, 60, 60, 0.6);
  2327. }
  2328. }
  2329. }
  2330. .movable-view {
  2331. .operate-img {
  2332. width: 90%;
  2333. height: auto;
  2334. background-color: #F9F9F9;
  2335. border-radius: 8px;
  2336. padding: 10px 25px;
  2337. margin-top: 10px;
  2338. >view:nth-child(2) {
  2339. background-color: rgba(0, 82, 255, 0.06);
  2340. border-radius: 4px 4px 4px 4px;
  2341. border: 1px solid #0052FF;
  2342. color: #0052FF;
  2343. padding: 3px 5px;
  2344. }
  2345. >view {
  2346. font-size: 14px;
  2347. }
  2348. image {
  2349. width: 22px;
  2350. height: 22px;
  2351. margin-right: 5px;
  2352. }
  2353. }
  2354. }
  2355. .status-data {
  2356. width: 66px;
  2357. height: 30px;
  2358. margin: 0 7px;
  2359. font-size: 14px;
  2360. border: 1px solid #CDCDCD;
  2361. cursor: pointer;
  2362. text-align: center;
  2363. line-height: 30px;
  2364. }
  2365. .active {
  2366. position: relative;
  2367. background: rgba(0, 82, 255, 0.1);
  2368. color: #0052FF;
  2369. border: 1px solid #0052FF;
  2370. font-weight: 700;
  2371. }
  2372. .active::before {
  2373. content: "";
  2374. position: absolute;
  2375. top: 0;
  2376. left: 0;
  2377. width: 10px;
  2378. height: 10px;
  2379. background-image: url("/static/image/car-insure/before.png");
  2380. background-size: cover;
  2381. }
  2382. .footer-btn {
  2383. position: fixed;
  2384. bottom: 0;
  2385. left: 0;
  2386. width: 100%;
  2387. height: 62px;
  2388. background: #FFFFFF;
  2389. box-shadow: 0px -4px 10px 0px #DAE3F4;
  2390. border-radius: 0px 0px 0px 0px;
  2391. padding: 12px 16px;
  2392. z-index: 99;
  2393. }
  2394. movable-area {
  2395. height: 220px;
  2396. width: 100%;
  2397. border-top-left-radius: 12px;
  2398. border-top-right-radius: 12px;
  2399. background-color: #D8D8D8;
  2400. overflow: hidden;
  2401. }
  2402. movable-view {
  2403. display: flex;
  2404. align-items: center;
  2405. justify-content: center;
  2406. height: 100%;
  2407. width: 100%;
  2408. }
  2409. .inputPrompt {
  2410. height: 30px;
  2411. background: linear-gradient(90deg, #FFE3DF 0%, #FBE9E7 100%);
  2412. border-radius: 2px;
  2413. color: #FF1717;
  2414. font-size: 15px;
  2415. text-align: center;
  2416. line-height: 30px;
  2417. }
  2418. //主副本切换样式
  2419. .switch-container {
  2420. width: 80px;
  2421. height: 30px;
  2422. background-color: #E6EEFF;
  2423. border-radius: 15px;
  2424. position: relative;
  2425. cursor: pointer;
  2426. }
  2427. .switch-track {
  2428. width: 100%;
  2429. height: 100%;
  2430. background-color: #E6EEFF;
  2431. border-radius: 4px;
  2432. position: relative;
  2433. transition: background-color 0.3s ease;
  2434. }
  2435. .switch-thumb {
  2436. width: 40px;
  2437. height: 26px;
  2438. background-color: #0052FF;
  2439. border-radius: 4px;
  2440. position: absolute;
  2441. top: 2px;
  2442. left: 2px;
  2443. transition: transform 0.3s ease;
  2444. font-size: 13px;
  2445. color: #fff;
  2446. }
  2447. .switch-thumb1 {
  2448. width: 40px;
  2449. height: 26px;
  2450. position: absolute;
  2451. top: 2px;
  2452. left: 2px;
  2453. font-size: 12px;
  2454. color: rgba(0, 82, 255, 0.8);
  2455. }
  2456. .switch-thumb2 {
  2457. width: 40px;
  2458. height: 26px;
  2459. position: absolute;
  2460. top: 2px;
  2461. right: 2px;
  2462. font-size: 12px;
  2463. color: rgba(0, 82, 255, 0.8);
  2464. }
  2465. .thumbactive {
  2466. background-color: #0052FF;
  2467. transform: translateX(35px);
  2468. }
  2469. .thumbactive1 {
  2470. color: #fff;
  2471. }
  2472. .ZJcheckboxGroup {
  2473. padding: 0 10px;
  2474. .title {
  2475. font-size: 14px;
  2476. color: #232832;
  2477. font-weight: bold;
  2478. padding: 10px;
  2479. border-bottom: 1px solid #f2f2f2;
  2480. }
  2481. .scolcentent {
  2482. max-height: 480px;
  2483. padding-bottom: 40px;
  2484. .row {
  2485. width: 100%;
  2486. height: auto;
  2487. background: #F9FBFE;
  2488. box-shadow: 0px 2px 5px 0px #DAE3F4;
  2489. border-radius: 6px;
  2490. padding: 0 10px;
  2491. margin-bottom: 10px;
  2492. .row_header {
  2493. width: 100%;
  2494. font-size: 28upx;
  2495. border-bottom: 1upx solid #EEEEEE;
  2496. padding: 5px 0;
  2497. font-weight: bold;
  2498. }
  2499. .row_body {
  2500. width: 100%;
  2501. padding: 10px 0;
  2502. view {
  2503. font-weight: bold;
  2504. font-size: 12px;
  2505. }
  2506. }
  2507. }
  2508. .carTypeColor {
  2509. border: 1px solid #0052FF;
  2510. }
  2511. .row .row_header .left {
  2512. flex: 5;
  2513. overflow: hidden;
  2514. text-overflow: ellipsis;
  2515. white-space: nowrap;
  2516. color: #333;
  2517. }
  2518. .row .row_header .right {
  2519. flex: 2;
  2520. color: #FF5600;
  2521. text-align: right;
  2522. }
  2523. .row .row .row_body view>view {
  2524. margin: 0 5px;
  2525. }
  2526. }
  2527. .noDataIndicator {
  2528. width: 70%;
  2529. margin: auto;
  2530. text-align: center;
  2531. image {
  2532. width: 180px;
  2533. height: 180px;
  2534. }
  2535. text {
  2536. color: #0052FF;
  2537. font-size: 14px;
  2538. }
  2539. }
  2540. .operateBtn {
  2541. position: absolute;
  2542. bottom: 0;
  2543. left: 0;
  2544. right: 0;
  2545. font-weight: bold;
  2546. font-size: 16px;
  2547. .confirm {
  2548. width: 45%;
  2549. height: 46px;
  2550. color: #fff;
  2551. margin: auto;
  2552. background: #0052FF;
  2553. border-radius: 25px;
  2554. }
  2555. }
  2556. }
  2557. </style>