carInfo1.vue 64 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919
  1. <template>
  2. <view class="body">
  3. <!-- 公共组件-每个页面必须引入 -->
  4. <public-module></public-module>
  5. <uni-group title="" class="carInfo">
  6. <uni-forms :rules="carRules" :value="carInfo" ref="carForm" validate-trigger="bind" err-show-type="toast"
  7. label-width="100">
  8. <uni-forms-item>
  9. <view class="title d-flex a-center j-sb font-md">
  10. <text class="font-weight">车辆信息</text>
  11. <view class="icon iconfont icon-hangshizhengshibie font-lg main-text-color"
  12. @tap="chooseImage('carInfo',1)" style="margin-right: 14px;"></view>
  13. </view>
  14. </uni-forms-item>
  15. <uni-forms-item label="车牌号: ">
  16. <input class="uni-input-input textColor" placeholder="暂未上牌" v-model="carInfo.licenseNo"
  17. placeholder-style="font-size:28upx" @input="upperCaseType('licenseNo')" />
  18. </uni-forms-item>
  19. <uni-forms-item name="frameNo" required label="车辆识别码:">
  20. <view class="d-flex a-center" style="height: 100%;">
  21. <input class="uni-input-input flex-1 textColor" placeholder="请输入车辆识别码" v-model="carInfo.frameNo"
  22. maxlength="17" @blur="binddata('frameNo', $event.detail.value,'carForm')"
  23. placeholder-style="font-size:28upx" @input="upperCaseType('frameNo')" />
  24. <text class="checkButton d-flex a-center j-center" @tap="toChooseVin(carInfo.frameNo)">校验</text>
  25. </view>
  26. </uni-forms-item>
  27. <uni-forms-item name="modelcname" required label="品牌型号: ">
  28. <view class="d-flex a-center textColor" style="height: 100%;">
  29. <input class="uni-input-input flex-1 textColor" placeholder="请输入品牌型号"
  30. v-model="carInfo.modelcname" @blur="binddata('modelcname', $event.detail.value,'carForm')"
  31. placeholder-style="font-size:28upx" @input="upperCaseType('modelcname')" />
  32. <text class="checkButton d-flex a-center j-center"
  33. @tap="toChooseVehicleType(carInfo.modelcname)">校验</text>
  34. </view>
  35. </uni-forms-item>
  36. <uni-forms-item name="engineNo" required label="发动机号: ">
  37. <input class="uni-input-input textColor" placeholder="请输入发动机号" v-model="carInfo.engineNo"
  38. @blur="binddata('engineNo', $event.detail.value,'carForm')" placeholder-style="font-size:28upx"
  39. @input="upperCaseType('engineNo')" />
  40. </uni-forms-item>
  41. <uni-forms-item label="年款: ">
  42. <input class="uni-input-input textColor" placeholder="请输入年款" v-model="carInfo.caryear"
  43. placeholder-style="font-size:28upx" />
  44. </uni-forms-item>
  45. <uni-forms-item label="座位数: ">
  46. <input class="uni-input-input textColor" placeholder="请输入座位数" v-model="carInfo.seatCount"
  47. placeholder-style="font-size:28upx" />
  48. </uni-forms-item>
  49. <uni-forms-item label="排量: ">
  50. <input class="uni-input-input textColor" placeholder="请输入排量" v-model="carInfo.enginedesc"
  51. placeholder-style="font-size:28upx" />
  52. </uni-forms-item>
  53. <uni-forms-item label="功率: ">
  54. <input class="uni-input-input textColor" placeholder="请输入功率" v-model="carInfo.powerScale"
  55. placeholder-style="font-size:28upx" />
  56. </uni-forms-item>
  57. <uni-forms-item label="新车购置价: " required name="purchasePrice">
  58. <input class="uni-input-input textColor" placeholder="请输入新车购置价" v-model="carInfo.purchasePrice"
  59. placeholder-style="font-size:28upx"
  60. @blur="binddata('purchasePrice', $event.detail.value,'carForm')"
  61. @input="upperCaseType('purchasePrice')" />
  62. </uni-forms-item>
  63. <uni-forms-item required label="使用性质: " required>
  64. <view class="d-flex a-center" style="width:100%;height: 100%;" @click="carnatureshow=true">
  65. <u-select v-model="carnatureshow" mode="single-column" :list="natureOfVehicleUseoptions"
  66. @confirm="dictionaryConfirm($event,'carnature')" label-name="dictTag"
  67. value-name="dictValue"></u-select>
  68. <view class="textColor">{{carInfo1.carnature}}</view>
  69. </view>
  70. </uni-forms-item>
  71. <uni-forms-item label="车辆用途: ">
  72. <view class="d-flex a-center" style="width:100%;height: 100%;" @click="vehicleUseshow=true">
  73. <u-select v-if="carInfo.carnature=='01'" v-model="vehicleUseshow" mode="single-column"
  74. :list="businessVehicleUseoptions" @confirm="dictionaryConfirm($event,'vehicleUse')"
  75. label-name="dictTag" value-name="dictValue"></u-select>
  76. <u-select v-if="carInfo.carnature=='02'" v-model="vehicleUseshow" mode="single-column"
  77. :list="outOfBusinessVehicleUseoptions" @confirm="dictionaryConfirm($event,'vehicleUse')"
  78. label-name="dictTag" value-name="dictValue"></u-select>
  79. <view class="textColor">{{carInfo1.vehicleUse}}</view>
  80. </view>
  81. </uni-forms-item>
  82. <uni-forms-item label="车辆类型: " required>
  83. <view class="d-flex a-center" style="width:100%;height: 100%;" @click="cartypeshow=true">
  84. <u-select v-model="cartypeshow" mode="single-column" :list="trafficManagementVehicleTypeoptions"
  85. @confirm="dictionaryConfirm($event,'cartype')" label-name="dictTag"
  86. value-name="dictValue"></u-select>
  87. <view class="textColor">{{carInfo1.cartype}}</view>
  88. </view>
  89. </uni-forms-item>
  90. <uni-forms-item label="车辆种类:" required>
  91. <view class="d-flex a-center" style="width:100%;height: 100%;" @click="cimodelclassshow=true">
  92. <u-select v-model="cimodelclassshow" mode="single-column" :list="vehicleTypeoptions"
  93. @confirm="dictionaryConfirm($event,'cimodelclass')" label-name="dictTag"
  94. value-name="dictValue"></u-select>
  95. <view class="textColor">{{carInfo1.cimodelclass}}</view>
  96. </view>
  97. </uni-forms-item>
  98. <uni-forms-item label="能源种类: " required name="energyType">
  99. <view class="d-flex a-center" style="width:100%;height: 100%;" @click="energyTypeshow=true">
  100. <u-select v-model="energyTypeshow" mode="single-column" :list="energyTypeoptions"
  101. @confirm="dictionaryConfirm($event,'energyType')" label-name="dictTag"
  102. value-name="dictValue"></u-select>
  103. <view class="textColor">{{carInfo1.energyType}}</view>
  104. </view>
  105. </uni-forms-item>
  106. <uni-forms-item required label="注册日期" name="registerDate" style="margin-right: 14px;">
  107. <u-input type="select" :select-open="registerDateShow" v-model="carInfo.registerDate"
  108. placeholder="请选择注册日期" @click="registerDateShow = true"
  109. placeholder-style="color:#808080"></u-input>
  110. <u-picker v-model="registerDateShow" mode="time" :params="params" :end-year="endYear"
  111. :end-month="endMonth" @confirm="e=> Dateconfirm(e,'carInfo','registerDate')"></u-picker>
  112. </uni-forms-item>
  113. <uni-forms-item required label="发证日期" name="issueDate" style="margin-right: 14px;">
  114. <u-input type="select" :select-open="issueDateShow" v-model="carInfo.issueDate"
  115. placeholder="请选择发证日期" @click="issueDateShow = true" placeholder-style="color:#808080"></u-input>
  116. <u-picker v-model="issueDateShow" mode="time" :params="params"
  117. @confirm="e=> Dateconfirm(e,'carInfo','issueDate')"></u-picker>
  118. </uni-forms-item>
  119. <uni-forms-item v-if="carInfo.transferFlag" required label="转移登记日期" name="transferDate"
  120. style="margin-right: 14px;">
  121. <u-input type="select" :select-open="transferDateShow" v-model="carInfo.transferDate"
  122. placeholder="请选择过户日期" @click="transferDateShow = true"
  123. placeholder-style="color:#808080"></u-input>
  124. <u-picker v-model="transferDateShow" mode="time" :params="params" :end-year="endYear"
  125. :end-month="endMonth" @confirm="e=> Dateconfirm(e,'carInfo','transferDate')"></u-picker>
  126. </uni-forms-item>
  127. <uni-forms-item required label="是否过户: ">
  128. <view class="d-flex j-end a-c" style="height:100%">
  129. <u-switch v-model="carInfo.transferFlag" active-color="#ea552d " size="30"
  130. style="margin-right: 15px;" @change="transferFlagchange"></u-switch>
  131. </view>
  132. </uni-forms-item>
  133. <uni-forms-item required label="是否脱保: ">
  134. <view class="d-flex j-end a-c" style="height:100%">
  135. <u-switch v-model="carInfo.outOfInsurance" active-color="#ea552d " size="30"
  136. style="margin-right: 15px;"></u-switch>
  137. </view>
  138. </uni-forms-item>
  139. <uni-forms-item required label="是否二手车: ">
  140. <view class="d-flex j-end a-c" style="height:100%">
  141. <u-switch v-model="carInfo.secondhandcarflag" active-color="#ea552d " size="30"
  142. style="margin-right: 15px;"></u-switch>
  143. </view>
  144. </uni-forms-item>
  145. </uni-forms>
  146. </uni-group>
  147. <uni-group title="" top="10">
  148. <uni-forms :rules="ownerRules" :value="ownerInfo" ref="ownerForm" validate-trigger="bind"
  149. err-show-type="toast" label-width="100">
  150. <uni-forms-item>
  151. <view class="title d-flex a-center j-sb font-md">
  152. <text class="font-weight">车主</text>
  153. <view class="icon iconfont icon-shenfenzhengshibie font-lg main-text-color"
  154. @tap="chooseImage('ownerInfo',2)" style="margin-right: 14px;"></view>
  155. </view>
  156. </uni-forms-item>
  157. <uni-forms-item name="name" required label="姓名: ">
  158. <input class="uni-input-input textColor" placeholder="请输入姓名" v-model="ownerInfo.name" maxlength="5"
  159. placeholder-style="font-size:28upx" />
  160. </uni-forms-item>
  161. <uni-forms-item name="identifyType" required label="证件类型:">
  162. <view class="d-flex a-center" style="width:100%;height: 100%;">
  163. <picker disabled class="d-flex a-center" style="width:100%;height: 100%;" mode="selector"
  164. range-key="label" :range="identifyList" v-model="ownerIdentifyIndex"
  165. @change="bindIdentifyTypeChange($event,'owner')">
  166. <view class="textColor">{{identifyList[ownerIdentifyIndex]['label']}}</view>
  167. </picker>
  168. </view>
  169. </uni-forms-item>
  170. <uni-forms-item required name="identifyNumber" label="证件号: ">
  171. <input class="uni-input-input textColor" placeholder="请输入证件号" v-model="ownerInfo.identifyNumber"
  172. maxlength="18" @blur="binddata('identifyNumber', $event.detail.value,'ownerInfo')"
  173. placeholder-style="font-size:28upx" />
  174. </uni-forms-item>
  175. <uni-forms-item required name="age" label="年龄: ">
  176. <input class="uni-input-input textColor" disabled placeholder="请输入年龄" v-model="ownerInfo.age"
  177. maxlength="18" placeholder-style="font-size:28upx" />
  178. </uni-forms-item>
  179. <uni-forms-item name="gender" required label="性别:">
  180. <view class="d-flex a-center" style="width:100%;height: 100%;">
  181. <picker class="d-flex a-center" style="width:100%;height: 100%;" mode="selector"
  182. range-key="label" :range="genderList" v-model="ownerGenderIndex"
  183. @change="bindGenderChange($event,'owner')">
  184. <view class="textColor">{{genderList[ownerGenderIndex]['label']}}</view>
  185. </picker>
  186. </view>
  187. </uni-forms-item>
  188. <uni-forms-item required name="mobile" label="手机号: ">
  189. <input class="uni-input-input textColor" placeholder="请输入手机号" v-model="ownerInfo.mobile"
  190. maxlength="11" placeholder-style="font-size:28upx" />
  191. </uni-forms-item>
  192. <uni-forms-item required name="addr" label="地址: " style="margin-right: 14px;">
  193. <textarea class="textColor" v-model="ownerInfo.addr"
  194. style="width:100%;line-height: 50upx;margin-top: 15upx;" placeholder-style="font-size:28upx;"
  195. placeholder="请输入地址" auto-height />
  196. </uni-forms-item>
  197. <uni-forms-item name="email" label="邮箱: ">
  198. <input class="uni-input-input textColor" placeholder="请输入邮箱" v-model="ownerInfo.email"
  199. placeholder-style="font-size:28upx" />
  200. </uni-forms-item>
  201. <uni-forms-item required label="有效期起期" name="identifyValidDate" style="margin-right: 14px;">
  202. <u-input type="select" :select-open="ownerDateShow" v-model="ownerInfo.identifyValidDate"
  203. placeholder="请选择有效期起期" @click="ownerDateShow = true"
  204. placeholder-style="color:#808080"></u-input>
  205. <u-picker v-model="ownerDateShow" mode="time" :params="params"
  206. @confirm="e=> Dateconfirm(e,'ownerInfo','identifyValidDate')"></u-picker>
  207. </uni-forms-item>
  208. <uni-forms-item required label="有效期止期" name="identifyValidEndDate">
  209. <view class="dis j-s a-c">
  210. <u-input type="select" :select-open="ownerEndDateShow" v-model="ownerInfo.identifyValidEndDate"
  211. placeholder="请选择有效期止期" @click="ownerEndDateShow = true" placeholder-style="color:#808080"
  212. style="margin-right: 14px;"></u-input>
  213. <view class=" dis j-c a-c ">
  214. <text>长期</text>
  215. <switch style="transform: scale(0.6)"
  216. @change="checked=> insureLongterm(checked,'ownerInfo')" />
  217. </view>
  218. </view>
  219. <u-picker v-model="ownerEndDateShow" mode="time" :params="params"
  220. @confirm="e=> Dateconfirm(e,'ownerInfo','identifyValidEndDate')"></u-picker>
  221. </uni-forms-item>
  222. </uni-forms>
  223. </uni-group>
  224. <uni-group title="" top="10">
  225. <uni-forms :rules="policyHolderRules" :value="policyHolderInfo" ref="policyHolderForm"
  226. validate-trigger="bind" err-show-type="toast" label-width="100">
  227. <uni-forms-item>
  228. <view class="title d-flex a-center j-sb font-md">
  229. <text class="font-weight">投保人</text>
  230. <view class="d-flex a-center j-sb">
  231. <switch style="transform: scale(0.6);" :checked="holderAndOwner"
  232. @change="e=>syncPersonInfo(e,'holderAndOwner','policyHolder','owner')" />
  233. <text style="margin-right: 10px;">同车主</text>
  234. <view class="icon iconfont icon-shenfenzhengshibie font-lg main-text-color"
  235. @tap="chooseImage('policyHolderInfo',3)" style="margin-right: 14px;"></view>
  236. </view>
  237. </view>
  238. </uni-forms-item>
  239. <template v-if="!holderAndOwner">
  240. <uni-forms-item name="name" required label="姓名: ">
  241. <input class="uni-input-input textColor" placeholder="请输入姓名" v-model="policyHolderInfo.name"
  242. maxlength="5" @blur="binddata('name', $event.detail.value,'policyHolderForm')"
  243. placeholder-style="font-size:28upx" />
  244. </uni-forms-item>
  245. <uni-forms-item name="identifyType" required label="证件类型: ">
  246. <view class="d-flex a-center" style="width:100%;height: 100%;">
  247. <picker disabled class="d-flex a-center" style="width:100%;height: 100%;" mode="selector"
  248. range-key="label" :range="identifyList" v-model="policyHolderIdentifyIndex"
  249. @change="bindIdentifyTypeChange($event,'policyHolder')">
  250. <view class="textColor">{{identifyList[policyHolderIdentifyIndex]['label']}}</view>
  251. </picker>
  252. </view>
  253. </uni-forms-item>
  254. <uni-forms-item required name="identifyNumber" label="证件号: ">
  255. <input class="uni-input-input textColor" placeholder="请输入证件号"
  256. v-model="policyHolderInfo.identifyNumber" maxlength="18"
  257. @blur="binddata('identifyNumber', $event.detail.value,'policyHolderInfo')"
  258. placeholder-style="font-size:28upx" />
  259. </uni-forms-item>
  260. <uni-forms-item required name="age" label="年龄: ">
  261. <input class="uni-input-input textColor" disabled placeholder="请输入年龄"
  262. v-model="policyHolderInfo.age" maxlength="18" placeholder-style="font-size:28upx" />
  263. </uni-forms-item>
  264. <uni-forms-item name="gender" required label="性别:">
  265. <view class="d-flex a-center" style="width:100%;height: 100%;">
  266. <picker class="d-flex a-center" style="width:100%;height: 100%;" mode="selector"
  267. range-key="label" :range="genderList" v-model="policyHolderGenderIndex"
  268. @change="bindGenderChange($event,'policyHolder')">
  269. <view class="textColor">{{genderList[policyHolderGenderIndex]['label']}}</view>
  270. </picker>
  271. </view>
  272. </uni-forms-item>
  273. <uni-forms-item required name="mobile" label="手机号: ">
  274. <input class="uni-input-input textColor" placeholder="请输入手机号" v-model="policyHolderInfo.mobile"
  275. maxlength="11" @blur="binddata('mobile', $event.detail.value,'policyHolderForm')"
  276. placeholder-style="font-size:28upx" />
  277. </uni-forms-item>
  278. <uni-forms-item required name="addr" label="地址: ">
  279. <textarea class="textColor" v-model="policyHolderInfo.addr"
  280. style="width:100%;line-height: 50upx;margin-top: 15upx;"
  281. placeholder-style="font-size:28upx;" placeholder="请输入地址" auto-height
  282. @blur="binddata('addr', $event.detail.value,'policyHolderForm')" />
  283. </uni-forms-item>
  284. <uni-forms-item name="email" label="邮箱: ">
  285. <input class="uni-input-input textColor" placeholder="请输入邮箱" v-model="policyHolderInfo.email"
  286. placeholder-style="font-size:28upx" />
  287. </uni-forms-item>
  288. <uni-forms-item required label="有效期起期" name="identifyValidDate" style="margin-right: 14px;">
  289. <u-input type="select" :select-open="policyHolderDateShow"
  290. v-model="policyHolderInfo.identifyValidDate" placeholder="请选择有效期起期"
  291. @click="policyHolderDateShow = true" placeholder-style="color:#808080"></u-input>
  292. <u-picker v-model="policyHolderDateShow" mode="time" :params="params"
  293. @confirm="e=> Dateconfirm(e,'policyHolderInfo','identifyValidDate')"></u-picker>
  294. </uni-forms-item>
  295. <uni-forms-item required label="有效期止期" name="identifyValidEndDate">
  296. <view class="dis j-s a-c">
  297. <u-input type="select" :select-open="policyHolderEndDateShow"
  298. v-model="policyHolderInfo.identifyValidEndDate" placeholder="请选择有效期止期"
  299. @click="policyHolderEndDateShow = true" placeholder-style="color:#808080"
  300. style="margin-right: 14px;"></u-input>
  301. <view class=" dis j-c a-c ">
  302. <text>长期</text>
  303. <switch style="transform: scale(0.6)"
  304. @change="checked=>insureLongterm(checked,'policyHolderInfo')" />
  305. </view>
  306. </view>
  307. <u-picker v-model="policyHolderEndDateShow" mode="time" :params="params"
  308. @confirm="e=> Dateconfirm(e,'policyHolderInfo','identifyValidEndDate')"></u-picker>
  309. </uni-forms-item>
  310. </template>
  311. </uni-forms>
  312. </uni-group>
  313. <uni-group title="" top="10">
  314. <uni-forms :rules="insuredPersonRules" :value="insuredPersonInfo" ref="insuredPersonForm"
  315. validate-trigger="bind" err-show-type="toast" label-width="100">
  316. <uni-forms-item>
  317. <view class="title d-flex a-center j-sb font-md">
  318. <text class="font-weight">被保人</text>
  319. <view class="d-flex a-center j-sb">
  320. <view class="d-flex a-center j-sb">
  321. <switch style="transform: scale(0.6);" :checked="tbrAndOwner"
  322. @change="e=>syncPersonInfo(e,'tbrAndOwner','insuredPerson','policyHolder','insuredAndOwner')" />
  323. <text style="margin-right: 10px;">同投保人</text>
  324. </view>
  325. <view class="d-flex a-center j-sb" v>
  326. <switch style="transform: scale(0.6);" :checked="insuredAndOwner"
  327. @change="e=>syncPersonInfo(e,'insuredAndOwner','insuredPerson','owner','tbrAndOwner')" />
  328. <text style="margin-right: 10px;">同车主</text>
  329. </view>
  330. <view class="icon iconfont icon-shenfenzhengshibie font-lg main-text-color"
  331. @tap="chooseImage('insuredPersonInfo',4)" style="margin-right: 14px;"></view>
  332. </view>
  333. </view>
  334. </uni-forms-item>
  335. <template v-if="!insuredAndOwner && !tbrAndOwner">
  336. <uni-forms-item name="name" required label="姓名: ">
  337. <input class="uni-input-input textColor" placeholder="请输入姓名" v-model="insuredPersonInfo.name"
  338. maxlength="5" @blur="binddata('name', $event.detail.value,'insuredPersonForm')"
  339. placeholder-style="font-size:28upx" />
  340. </uni-forms-item>
  341. <uni-forms-item name="identifyType" required label="证件类型: ">
  342. <view class="d-flex a-center" style="width:100%;height: 100%;">
  343. <picker disabled class="d-flex a-center" style="width:100%;height: 100%;" mode="selector"
  344. range-key="label" :range="identifyList" v-model="insuredPersonIdentifyIndex"
  345. @change="bindIdentifyTypeChange($event,'insuredPerson')">
  346. <view class="textColor">{{identifyList[insuredPersonIdentifyIndex]['label']}}</view>
  347. </picker>
  348. </view>
  349. </uni-forms-item>
  350. <uni-forms-item required name="identifyNumber" label="证件号: ">
  351. <input class="uni-input-input textColor" placeholder="请输入证件号"
  352. v-model="insuredPersonInfo.identifyNumber" maxlength="18"
  353. @blur="binddata('identifyNumber', $event.detail.value,'insuredPersonInfo')"
  354. placeholder-style="font-size:28upx" />
  355. </uni-forms-item>
  356. <uni-forms-item required name="age" label="年龄: ">
  357. <input class="uni-input-input textColor" disabled placeholder="请输入年龄"
  358. v-model="insuredPersonInfo.age" maxlength="18" placeholder-style="font-size:28upx" />
  359. </uni-forms-item>
  360. <uni-forms-item name="gender" required label="性别:">
  361. <view class="d-flex a-center" style="width:100%;height: 100%;">
  362. <picker class="d-flex a-center" style="width:100%;height: 100%;" mode="selector"
  363. range-key="label" :range="genderList" v-model="insuredPersonGenderIndex"
  364. @change="bindGenderChange($event,'insuredPerson')">
  365. <view class="textColor">{{genderList[insuredPersonGenderIndex]['label']}}</view>
  366. </picker>
  367. </view>
  368. </uni-forms-item>
  369. <uni-forms-item required name="mobile" label="手机号: ">
  370. <input class="uni-input-input textColor" placeholder="请输入手机号" v-model="insuredPersonInfo.mobile"
  371. maxlength="11" @blur="binddata('mobile', $event.detail.value,'insuredPersonForm')"
  372. placeholder-style="font-size:28upx" />
  373. </uni-forms-item>
  374. <uni-forms-item required name="addr" label="地址: ">
  375. <textarea class="textColor" v-model="insuredPersonInfo.addr"
  376. style="width:100%;line-height: 50upx;margin-top: 15upx;"
  377. placeholder-style="font-size:28upx;" placeholder="请输入地址" auto-height
  378. @blur="binddata('addr', $event.detail.value,'insuredPersonForm')" />
  379. </uni-forms-item>
  380. <uni-forms-item name="email" label="邮箱: ">
  381. <input class="uni-input-input textColor" placeholder="请输入邮箱" v-model="insuredPersonInfo.email"
  382. placeholder-style="font-size:28upx" />
  383. </uni-forms-item>
  384. <uni-forms-item required label="有效期起期" name="identifyValidDate" style="margin-right: 14px;">
  385. <u-input type="select" :select-open="insuredPersonDateShow"
  386. v-model="insuredPersonInfo.identifyValidDate" placeholder="请选择有效期起期"
  387. @click="insuredPersonDateShow = true" placeholder-style="color:#808080"></u-input>
  388. <u-picker v-model="insuredPersonDateShow" mode="time" :params="params"
  389. @confirm="e=> Dateconfirm(e,'insuredPersonInfo','identifyValidDate')"></u-picker>
  390. </uni-forms-item>
  391. <uni-forms-item required label="有效期止期" name="identifyValidEndDate">
  392. <view class="dis j-s a-c">
  393. <u-input type="select" :select-open="insuredPersonEndDateShow"
  394. v-model="insuredPersonInfo.identifyValidEndDate" placeholder="请选择有效期止期"
  395. @click="insuredPersonEndDateShow = true" placeholder-style="color:#808080"
  396. style="margin-right: 14px;"></u-input>
  397. <view class=" dis j-c a-c ">
  398. <text>长期</text>
  399. <switch style="transform: scale(0.6)"
  400. @change="checked=>insureLongterm(checked,'insuredPersonInfo')" />
  401. </view>
  402. </view>
  403. <u-picker v-model="insuredPersonEndDateShow" mode="time" :params="params"
  404. @confirm="e=> Dateconfirm(e,'insuredPersonInfo','identifyValidEndDate')"></u-picker>
  405. </uni-forms-item>
  406. </template>
  407. </uni-forms>
  408. </uni-group>
  409. <view style="height: 160upx;"></view>
  410. <view class="infoBottom d-flex a-center j-center j-sb">
  411. <button type="default" class="d-flex a-center j-center" @tap="toNext">下一步</button>
  412. </view>
  413. <view class="mask mask-show" v-if="lodingshow">
  414. <!-- 加载动画开始 -->
  415. <view class="preloader">
  416. <view class="loader"></view>
  417. </view>
  418. <!-- 加载动画结束 -->
  419. <view class="title">加载中...</view>
  420. </view>
  421. <u-popup v-model="ImageOcrShow" mode="center" width="90%" border-radius="10" @close="ImagePopClose">
  422. <view class="popContent dis f-c a-c j-s">
  423. <view class="popHeader ">信息校验</view>
  424. <view v-if="checkType=='carInfo'" class="" style="padding: 4px 10px;width: 100%;">
  425. <view class="imgOcr dis j-s a-c">
  426. <view class="imgOcr-border">
  427. <u-icon v-if="carfrontImg" class="del_btn" name="close-circle-fill" style="font-size: 20px;"
  428. color="rgb(247, 247, 247)" @click="del_btn('carfrontImg')"></u-icon>
  429. <image class="obverseimg" :src="carfrontImg?carfrontImg:'/static/carfront.png'"
  430. @click="carfrontChange" mode="">
  431. </view>
  432. <view class="imgOcr-border">
  433. <u-icon v-if="carbackImg" class="del_btn" name="close-circle-fill" style="font-size: 20px;"
  434. color="rgb(247, 247, 247)" @click="del_btn('carbackImg')"></u-icon>
  435. <image class="obverseimg" :src="carbackImg?carbackImg:'/static/carback.png'"
  436. @click="carbackChange" mode="">
  437. </view>
  438. </view>
  439. <view class="line dis j-s a-c" style="margin-top: 10px;">
  440. <text>车主</text>
  441. <u-input v-model="carfront.carOwner" placeholder="请输入车主" />
  442. </view>
  443. <view class="line dis j-s a-c">
  444. <text>车牌号</text>
  445. <u-input v-model="carfront.licenseNo" placeholder="请输入车牌号" />
  446. </view>
  447. <view class="line dis j-s a-c">
  448. <text>发动机号</text>
  449. <u-input v-model="carfront.engineNo" placeholder="请输入发动机号" />
  450. </view>
  451. <view class="line dis j-s a-c">
  452. <text>车架号</text>
  453. <u-input v-model="carfront.vinNo" placeholder="请输入车架号" />
  454. </view>
  455. <view class="line dis j-s a-c">
  456. <text>注册日期</text>
  457. <u-input v-model="carfront.registerDate" placeholder="请输入注册日期" />
  458. </view>
  459. <view class="line dis j-s a-c">
  460. <text>发证日期</text>
  461. <u-input v-model="carfront.issueDate" placeholder="请输入发证日期" />
  462. </view>
  463. </view>
  464. <view v-else class="" style="padding: 4px 10px;width: 100%;">
  465. <view class="imgOcr dis j-s a-c">
  466. <view class="imgOcr-border">
  467. <u-icon v-if="userfrontImg" class="del_btn" name="close-circle-fill"
  468. style="font-size: 20px;" color="rgb(247, 247, 247)"
  469. @click="del_btn('userfrontImg')"></u-icon>
  470. <image class="obverseimg" :src="userfrontImg?userfrontImg:'/static/userfront.png'"
  471. @click="userfrontChange" mode="">
  472. </view>
  473. <view class="imgOcr-border">
  474. <u-icon v-if="userbackImg" class="del_btn" name="close-circle-fill" style="font-size: 20px;"
  475. color="rgb(247, 247, 247)" @click="del_btn('userbackImg')"></u-icon>
  476. <image class="obverseimg" :src="userbackImg?userbackImg:'/static/userback.png'"
  477. @click="userbackChange" mode="">
  478. </view>
  479. </view>
  480. <view class="line dis j-s a-c" style="margin-top: 10px;">
  481. <text>姓名</text>
  482. <u-input v-model="userfront.name" placeholder="请输入姓名" />
  483. </view>
  484. <view class="line dis j-s a-c">
  485. <text>证件号</text>
  486. <u-input v-model="userfront.identifyNumber" placeholder="请输入证件号" />
  487. </view>
  488. <view class="line dis j-s a-c">
  489. <text>地址</text>
  490. <u-input v-model="userfront.addr" placeholder="请输入地址" />
  491. </view>
  492. <view class="line dis j-s a-c">
  493. <text>有效期起期</text>
  494. <u-input v-model="userback.identifyValidDate" placeholder="请输入有效期起期" />
  495. </view>
  496. <view class="line dis j-s a-c">
  497. <text>有效期止期</text>
  498. <u-input v-model="userback.identifyValidEndDate" placeholder="请输入有效期止期" />
  499. </view>
  500. </view>
  501. <view class="popFooter dis">
  502. <view class="popFooter-btn" @click="ImageOcrShow=false">取消</view>
  503. <view class="popFooter-btn" @click="CarOCRconfirm">确认</view>
  504. </view>
  505. </view>
  506. </u-popup>
  507. <previewImage ref="previewImage" :opacity="0.8" :circular="true" :imgs="previewImgs"></previewImage>
  508. <u-toast ref="uToast" />
  509. </view>
  510. </template>
  511. <script>
  512. import checkImageInfo from '@/components/modules/carInsure/checkImageInfo/checkImageInfo.vue'; //引用图片信息检查插件
  513. import previewImage from '@/components/common/previewImage/previewImage.vue'; //引用插件
  514. import {
  515. pathToBase64,
  516. base64ToPath
  517. } from '@/common/image-tools-base64.js';
  518. import {
  519. userInfo
  520. } from 'os';
  521. import store from '@/store';
  522. import $http from '../../config/requestConfig';
  523. import {
  524. getAgeByIdCard,
  525. addressCode
  526. } from '@/plugins/utils';
  527. import {
  528. Promise
  529. } from 'bluebird';
  530. var dateTime = new Date();
  531. let Year = dateTime.getFullYear();
  532. let Month = Number(dateTime.getMonth() + 1);
  533. export default {
  534. components: {
  535. checkImageInfo,
  536. previewImage
  537. },
  538. watch: {
  539. "carInfo.frameNo": {
  540. handler(val) {
  541. if (val) {
  542. this.carInfo.vinNo = val;
  543. }
  544. },
  545. deep: true
  546. },
  547. },
  548. data() {
  549. return {
  550. form: {
  551. name: "",
  552. },
  553. //影像id上传列表
  554. checkType: "",
  555. checkIndex: 1,
  556. carInfoPositiveList: [], //车辆
  557. ownerInfoPositiveList: [], //车主
  558. policyHolderInfoPositiveList: [], //投保人
  559. insuredPersonInfoPositiveList: [], //被保人
  560. carfront: {},
  561. carback: {},
  562. userfront: {},
  563. userback: {},
  564. carfrontImg: '', //车辆正面
  565. carbackImg: '', //车辆背面
  566. userfrontImg: '', //车主正面
  567. userbackImg: '', //车主背面
  568. carFile: [], //车辆识别list
  569. userFile: [], //车主识别list
  570. ImageOcrShow: false, //影像识别框
  571. vehicleUseshow: false,
  572. carnatureshow: false,
  573. cartypeshow: false,
  574. cimodelclassshow: false,
  575. energyTypeshow: false,
  576. lodingshow: false,
  577. endYear: Year,
  578. endMonth: Month,
  579. registerDateShow: false,
  580. issueDateShow: false,
  581. ownerDateShow: false,
  582. ownerEndDateShow: false,
  583. policyHolderDateShow: false,
  584. policyHolderEndDateShow: false,
  585. insuredPersonDateShow: false,
  586. insuredPersonEndDateShow: false,
  587. transferDateShow: false,
  588. params: {
  589. year: true, //年
  590. month: true, //月
  591. day: true, //日
  592. hour: false, //时
  593. minute: false, //分
  594. second: false, //秒
  595. },
  596. carInfo: {
  597. licenseNo: "", //车牌号
  598. brandName: "", //车辆品牌型号
  599. vinNo: "", //车架号
  600. engineNo: "", //发动机号
  601. modelCode: "", //车型编码
  602. seatCount: "0", //核定载客量 核定载人数
  603. purchasePrice: "", //新车购置价最低,行业实际价值,协商价值
  604. carBrand: "", //车型品牌
  605. ciCarName: "", //行业车型名称
  606. ciModelCode: "", //行业车型编码
  607. completeKerbMass: "", //整备质量
  608. exhaustScale: "", //排量
  609. factory: "", //工厂名称
  610. factoryid: "", //工厂编码
  611. frameNo: "", //车架号
  612. licenseTypeCode: "02", //号牌种类
  613. vehicleclass: "", //车辆类型
  614. familyName: "", //车型
  615. modelcname: "", //车型名称
  616. powertypecode: "", //燃料类型编码
  617. vehicleweight: "", //总质量
  618. limitLoad: "", //核定载质量
  619. caryear: "0", //年款
  620. cimodelclass: "A0", //车辆种类
  621. powertype: "汽油", //燃料类型
  622. energyType: "0", //能源种类
  623. enginedesc: "", //排量
  624. powerScale: "", //功率
  625. registerDate: "", //注册日期
  626. issueDate: "", //发证日期
  627. transferFlag: false, //过户标志
  628. transferDate: "", //过户日期
  629. loanStatus: 0, //贷款标志
  630. firstBeneMan: "", //第一受益人
  631. noLicenseFlag: false, //是否新车
  632. cartype: "K33", //客车A0 货车H0          
  633. carnature: "02", //使用性质 家庭自用8A 非营业企业8B 非营业党政机关,事业团体8C 非营业货车8D
  634. property: "1", //所属性质 1个人 2企业 3个人
  635. outOfInsurance: false, //脱保
  636. secondhandcarflag: false, //二手车
  637. vehicleUse: "05" //车辆用途
  638. },
  639. carInfo1: {
  640. energyType: "汽油",
  641. cimodelclass: "客车", //车辆种类
  642. carnature: "非营业",
  643. cartype: "k33轿车",
  644. vehicleUse: "",
  645. },
  646. carRules: {
  647. modelcname: {
  648. rules: [{
  649. required: true,
  650. errorMessage: '请输入品牌型号',
  651. }, ]
  652. },
  653. frameNo: {
  654. rules: [{
  655. required: true,
  656. errorMessage: '请输入车辆识别码',
  657. }, {
  658. pattern: /^([0-9A-Z]){17}$/,
  659. errorMessage: '请输入正确的车辆识别码',
  660. }]
  661. },
  662. engineNo: {
  663. rules: [{
  664. required: true,
  665. errorMessage: '请输入发动机号',
  666. }, ]
  667. },
  668. purchasePrice: {
  669. rules: [{
  670. required: true,
  671. errorMessage: '请输入新车购置价',
  672. }, {
  673. validateField: function(rule, value, data, callback) {
  674. if (value == 0) {
  675. callback('新车购置价不能为零')
  676. }
  677. return true
  678. }
  679. }]
  680. },
  681. registerDate: {
  682. rules: [{
  683. required: true,
  684. errorMessage: '请选择注册日期',
  685. }, ]
  686. },
  687. issueDate: {
  688. rules: [{
  689. required: true,
  690. errorMessage: '请选择发证日期',
  691. }, ]
  692. }
  693. },
  694. ownerRules: {
  695. name: {
  696. rules: [{
  697. required: true,
  698. errorMessage: '请输入车主姓名',
  699. },
  700. {
  701. minLength: 2,
  702. maxLength: 5,
  703. errorMessage: '车主姓名长度在 {minLength} 到 {maxLength} 个字符',
  704. },
  705. {
  706. pattern: /^([\u4e00-\u9fa5]{1,6}|[a-zA-Z\.\s]{1,6})$/,
  707. errorMessage: '请输入正确的车主姓名',
  708. }
  709. ]
  710. },
  711. identifyNumber: {
  712. rules: [{
  713. required: true,
  714. errorMessage: '请输入车主证件号',
  715. },
  716. {
  717. 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]$/,
  718. errorMessage: '请输入正确的车主证件号',
  719. }
  720. ]
  721. },
  722. mobile: {
  723. rules: [{
  724. required: true,
  725. errorMessage: '请输入车主手机号',
  726. },
  727. {
  728. pattern: /^1[3-9]\d{9}$/,
  729. errorMessage: '请输入正确的手机号',
  730. }
  731. ]
  732. },
  733. addr: {
  734. rules: [{
  735. required: true,
  736. errorMessage: '请输入车主地址',
  737. },
  738. {
  739. minLength: 8,
  740. maxLength: 40,
  741. errorMessage: '车主地址长度在 {minLength} 到 {maxLength} 个字符',
  742. },
  743. ]
  744. }
  745. },
  746. policyHolderRules: {
  747. name: {
  748. rules: [{
  749. required: true,
  750. errorMessage: '请输入投保人姓名',
  751. },
  752. {
  753. minLength: 2,
  754. maxLength: 5,
  755. errorMessage: '投保人姓名长度在 {minLength} 到 {maxLength} 个字符',
  756. },
  757. {
  758. pattern: /^([\u4e00-\u9fa5]{1,6}|[a-zA-Z\.\s]{1,6})$/,
  759. errorMessage: '请输入正确的投保人姓名',
  760. }
  761. ]
  762. },
  763. identifyNumber: {
  764. rules: [{
  765. required: true,
  766. errorMessage: '请输入投保人证件号',
  767. },
  768. {
  769. 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]$/,
  770. errorMessage: '请输入正确的投保人证件号',
  771. }
  772. ]
  773. },
  774. mobile: {
  775. rules: [{
  776. required: true,
  777. errorMessage: '请输入投保人手机号',
  778. },
  779. {
  780. pattern: /^1[3-9]\d{9}$/,
  781. errorMessage: '请输入正确的手机号',
  782. }
  783. ]
  784. },
  785. addr: {
  786. rules: [{
  787. required: true,
  788. errorMessage: '请输入投保人地址',
  789. },
  790. {
  791. minLength: 8,
  792. maxLength: 40,
  793. errorMessage: '投保人地址长度在 {minLength} 到 {maxLength} 个字符',
  794. },
  795. ]
  796. }
  797. },
  798. insuredPersonRules: {
  799. name: {
  800. rules: [{
  801. required: true,
  802. errorMessage: '请输入被保人姓名',
  803. },
  804. {
  805. minLength: 2,
  806. maxLength: 5,
  807. errorMessage: '被保人姓名长度在 {minLength} 到 {maxLength} 个字符',
  808. },
  809. {
  810. pattern: /^([\u4e00-\u9fa5]{1,6}|[a-zA-Z\.\s]{1,6})$/,
  811. errorMessage: '请输入正确的被保人姓名',
  812. }
  813. ]
  814. },
  815. identifyNumber: {
  816. rules: [{
  817. required: true,
  818. errorMessage: '请输入被保人证件号',
  819. },
  820. {
  821. 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]$/,
  822. errorMessage: '请输入正确的被保人证件号',
  823. }
  824. ]
  825. },
  826. mobile: {
  827. rules: [{
  828. required: true,
  829. errorMessage: '请输入被保人手机号',
  830. },
  831. {
  832. pattern: /^(13[0-9]|14[01456879]|15[0-3,5-9]|16[2567]|17[0-8]|18[0-9]|19[0-3,5-9])\d{8}$/,
  833. errorMessage: '请输入正确的手机号',
  834. }
  835. ]
  836. },
  837. addr: {
  838. rules: [{
  839. required: true,
  840. errorMessage: '请输入被保人地址',
  841. },
  842. {
  843. minLength: 8,
  844. maxLength: 40,
  845. errorMessage: '被保人地址长度在 {minLength} 到 {maxLength} 个字符',
  846. },
  847. ]
  848. }
  849. },
  850. checkInfo: {},
  851. checkImage: [],
  852. licenseNo: '', //车牌号
  853. //使用性质
  854. carnatureIndex: 0,
  855. cartypeIndex: 0,
  856. cimodelclassIndex: 0,
  857. fuelTypeCodeIndex: 0,
  858. propertyIndex: 0,
  859. ownerGenderIndex: 0,
  860. policyHolderGenderIndex: 0,
  861. insuredPersonGenderIndex: 0,
  862. genderList: [{
  863. label: "男",
  864. value: "男",
  865. },
  866. {
  867. label: "女",
  868. value: "女",
  869. }
  870. ],
  871. identifyList: [{
  872. label: '身份证',
  873. id: "01"
  874. },
  875. {
  876. label: '护照',
  877. id: "02"
  878. },
  879. {
  880. label: '港澳台居民居住证',
  881. id: "03"
  882. },
  883. {
  884. label: '组织机构代码证',
  885. id: "04"
  886. },
  887. {
  888. label: '统一社会信用代码证',
  889. id: "05"
  890. },
  891. {
  892. label: '营业执照',
  893. id: "06"
  894. }
  895. ],
  896. ownerIdentifyIndex: 0,
  897. policyHolderIdentifyIndex: 0,
  898. insuredPersonIdentifyIndex: 0,
  899. holderAndOwner: true, //投保人同车主
  900. insuredAndOwner: false, //被保人同车主
  901. tbrAndOwner: true, //被保人同投保人
  902. ownerInfo: {
  903. name: "",
  904. identifyType: "01",
  905. identifyNumber: "",
  906. addr: "",
  907. gender: "", //性别
  908. email: "", //邮箱
  909. mobile: "",
  910. identifyValidDate: "", //有效期起期
  911. identifyValidEndDate: "", //有效期止期
  912. age: "", //年龄
  913. },
  914. policyHolderInfo: {
  915. name: "",
  916. identifyType: "01",
  917. identifyNumber: "",
  918. addr: "",
  919. gender: "", //性别
  920. email: "",
  921. mobile: "",
  922. identifyValidDate: "", //有效期起期
  923. identifyValidEndDate: "", //有效期止期
  924. age: "", //年龄
  925. },
  926. insuredPersonInfo: {
  927. name: "",
  928. identifyType: "01",
  929. identifyNumber: "",
  930. addr: "",
  931. gender: "", //性别
  932. email: "",
  933. mobile: "",
  934. identifyValidDate: "", //有效期起期
  935. identifyValidEndDate: "", //有效期止期
  936. age: "", //年龄
  937. },
  938. riskList: [], //交强险和商业险的选择
  939. kindList: [], //商业险险种的选择
  940. token: "",
  941. /* 数据字典 */
  942. natureOfVehicleUseoptions: [],
  943. vehicleTypeoptions: [],
  944. trafficManagementVehicleTypeoptions: [],
  945. energyTypeoptions: [],
  946. businessVehicleUseoptions: [],
  947. outOfBusinessVehicleUseoptions: [],
  948. /* 数据字典 */
  949. model: {
  950. ownerInforegion: '',
  951. policyHolderInforegion: '',
  952. insuredPersonInforegion: '',
  953. },
  954. previewImgs: [],
  955. }
  956. },
  957. onShow() {
  958. this.getDicType("businessVehicleUse"); //车辆用途(营业)
  959. this.getDicType("outOfBusinessVehicleUse"); //车辆用途(非营业)
  960. this.getDicType("natureOfVehicleUse"); //车辆性质
  961. this.getDicType("vehicleType"); //车辆种类
  962. this.getDicType("trafficManagementVehicleType"); //车辆类型
  963. this.getDicType("energyType"); //能源种类
  964. },
  965. onLoad(options) {
  966. //--数据字典 begin --
  967. if (!!options.licenseNo) {
  968. // this.licenseNo = decodeURIComponent(options.licenseNo);
  969. } else {
  970. const eventChannel = this.getOpenerEventChannel()
  971. // 监听acceptData事件,获取上一页面通过eventChannel传送到当前页面的数据
  972. eventChannel.on('acceptData', (data) => {
  973. console.log(data)
  974. if (!!data) {
  975. //读取上一个页面传过来数据(车辆信息,人员信息,险种信息)
  976. this.carInfo = data.carInfo; //车辆信息
  977. this.ownerInfo = JSON.parse(JSON.stringify(data.ownerInfo));
  978. this.policyHolderInfo = JSON.parse(JSON.stringify(data.policyHolderInfo));
  979. this.insuredPersonInfo = JSON.parse(JSON.stringify(data.insuredPersonInfo));
  980. this.carInfoPositiveList = data.carInfoPositiveList; //车辆
  981. this.ownerInfoPositiveList = data.ownerInfoPositiveList; //车主
  982. this.policyHolderInfoPositiveList = data.policyHolderInfoPositiveList; //投保
  983. this.insuredPersonInfoPositiveList = data.insuredPersonInfoPositiveList; //被保人
  984. this.riskList = data.riskList; //险种大类
  985. this.kindList = data.kindList; //商业险险别
  986. this.licenseNo = this.carInfo.licenseNo;
  987. this.holderAndOwner = false; //投保人同车主
  988. this.insuredAndOwner = false; //被保人同车主
  989. this.tbrAndOwner = false; //被保人同投保人
  990. }
  991. })
  992. };
  993. this.token = store.state.token
  994. },
  995. // 监听导航栏的按钮
  996. onNavigationBarButtonTap(e) {
  997. if (e.index == 0) {
  998. this.navigate({
  999. url: '/pages/index/index'
  1000. }, "switchTab", true);
  1001. }
  1002. },
  1003. computed: {
  1004. startDate() {
  1005. return this.getDate('start');
  1006. },
  1007. endDate() {
  1008. return this.getDate('end');
  1009. },
  1010. },
  1011. methods: {
  1012. transferFlagchange(status) {
  1013. if (status) {
  1014. this.carInfo.transferDate = this.carInfo.issueDate;
  1015. } else {
  1016. this.carInfo.transferDate = ""
  1017. }
  1018. },
  1019. async getDicType(type) {
  1020. let res = await this.$http.get('/sysDict/dictDetails/' + type);
  1021. if (res.code == 200) {
  1022. this[type + 'options'] = res.data.ddList;
  1023. }
  1024. },
  1025. dictionaryConfirm(e, name) {
  1026. console.log(e, name)
  1027. this.carInfo[name] = e[0].value;
  1028. this.carInfo1[name] = e[0].label;
  1029. },
  1030. /**
  1031. * @param {String} e 时间选择器的值
  1032. * @param {String} obj 储存表单对象
  1033. * @param {String} param 储存表单参数
  1034. */
  1035. Dateconfirm(e, obj, param) {
  1036. this[obj][param] = e.year + '-' + e.month + '-' + e.day;
  1037. },
  1038. //选择驾照图片或拍摄驾照图片
  1039. chooseImage(type, index) {
  1040. this.checkType = type;
  1041. this.checkIndex = index;
  1042. this.ImageOcrShow = true;
  1043. },
  1044. //行驶证正面
  1045. async carfrontChange() {
  1046. if (this.carfrontImg) {
  1047. this.previewImgs = [{
  1048. url: this.carfrontImg
  1049. }];
  1050. this.$refs.previewImage.open(0); // 传入当前选中的图片地址或序号
  1051. } else {
  1052. let [chooseImageErr, chooseImageRes] = await uni.chooseImage({
  1053. count: 1,
  1054. sizeType: ['compressed']
  1055. });
  1056. let size = chooseImageRes.tempFiles[0].size / 1024 / 1024 < 5;
  1057. if (!size) {
  1058. this.$refs.uToast.show({
  1059. title: '上传图片大小不能超过 5MB!',
  1060. type: 'error',
  1061. })
  1062. return false
  1063. }
  1064. if (chooseImageRes) {
  1065. this.lodingshow = true;
  1066. this.carfrontImg = chooseImageRes.tempFilePaths[0];
  1067. uni.uploadFile({
  1068. url: this.$base.baseUrl + '/ins/taskImage/uploadFile',
  1069. filePath: this.carfrontImg,
  1070. name: "multipartFile",
  1071. formData: {
  1072. 'type': 'image',
  1073. },
  1074. header: {
  1075. Authorization: this.token,
  1076. },
  1077. success: (imgRes) => {
  1078. let data = JSON.parse(imgRes.data);
  1079. if (data.code == '200') {
  1080. if (this.carInfoPositiveList.some(v => v.imageType == 'C01')) {
  1081. this.carInfoPositiveList.map(val => {
  1082. if (val.imageType == 'C01') {
  1083. val.imageId = data.data.id;
  1084. }
  1085. })
  1086. } else {
  1087. this.carInfoPositiveList.push({
  1088. imageId: data.data.id,
  1089. imageType: "C01",
  1090. })
  1091. }
  1092. uni.uploadFile({
  1093. url: this.$base.baseUrl + '/order/identify/drivingPermit',
  1094. filePath: this.carfrontImg,
  1095. name: "image1",
  1096. header: {
  1097. Authorization: this.token,
  1098. },
  1099. success: (uploadFileRes) => {
  1100. let data = JSON.parse(uploadFileRes.data).data;
  1101. let rdate = '';
  1102. if (!!data.carInfo.registerDate) {
  1103. rdate = data.carInfo.registerDate.substr(0,
  1104. 4) +
  1105. '-' + data.carInfo
  1106. .registerDate.substr(4, 2) + '-' + data
  1107. .carInfo
  1108. .registerDate
  1109. .substr(6,
  1110. 2)
  1111. }
  1112. let isdate = '';
  1113. if (!!data.carInfo.issueDate) {
  1114. isdate = data.carInfo.issueDate.substr(0, 4) +
  1115. '-' + data.carInfo
  1116. .issueDate.substr(4, 2) + '-' + data
  1117. .carInfo
  1118. .issueDate.substr(6, 2)
  1119. }
  1120. this.ownerInfo.name = data.carInfo.carOwner; //车主
  1121. this.carfront = {
  1122. carOwner: data.carInfo.carOwner, //车主
  1123. licenseNo: data.carInfo.plateNo, //车牌号
  1124. modelcname: data.carInfo.backOcrID, //品牌型号
  1125. frameNo: data.carInfo.vin, //车架号
  1126. engineNo: data.carInfo.engine, //发动机号
  1127. vinNo: data.carInfo.vin, //车架号
  1128. issueDate: isdate, //发证日期
  1129. registerDate: rdate, //注册日期
  1130. cimodelclass: data.carInfo.motorTypeCode,
  1131. carnature: data.carInfo.motorUsageTypeCode,
  1132. }
  1133. this.lodingshow = false;
  1134. }
  1135. });
  1136. }
  1137. }
  1138. });
  1139. } else {
  1140. this.lodingshow = false;
  1141. }
  1142. }
  1143. },
  1144. //行驶证反面
  1145. async carbackChange() {
  1146. if (this.carbackImg) {
  1147. this.previewImgs = [{
  1148. url: this.carbackImg
  1149. }];
  1150. this.$refs.previewImage.open(0); // 传入当前选中的图片地址或序号
  1151. } else {
  1152. let [chooseImageErr, chooseImageRes] = await uni.chooseImage({
  1153. count: 1,
  1154. sizeType: ['compressed']
  1155. });
  1156. let size = chooseImageRes.tempFiles[0].size / 1024 / 1024 < 5;
  1157. if (!size) {
  1158. this.$refs.uToast.show({
  1159. title: '上传图片大小不能超过 5MB!',
  1160. type: 'error',
  1161. })
  1162. return false
  1163. }
  1164. if (chooseImageRes) {
  1165. this.lodingshow = true;
  1166. this.carbackImg = chooseImageRes.tempFilePaths[0];
  1167. uni.uploadFile({
  1168. url: this.$base.baseUrl + '/ins/taskImage/uploadFile',
  1169. filePath: this.carbackImg,
  1170. name: "multipartFile",
  1171. formData: {
  1172. 'type': 'image',
  1173. },
  1174. header: {
  1175. Authorization: this.token,
  1176. },
  1177. success: (imgRes) => {
  1178. let data = JSON.parse(imgRes.data);
  1179. if (data.code == '200') {
  1180. if (this.carInfoPositiveList.some(v => v.imageType == 'D01')) {
  1181. this.carInfoPositiveList.map(val => {
  1182. if (val.imageType == 'D01') {
  1183. val.imageId = data.data.id;
  1184. }
  1185. })
  1186. } else {
  1187. this.carInfoPositiveList.push({
  1188. imageId: data.data.id,
  1189. imageType: "D01",
  1190. })
  1191. }
  1192. uni.uploadFile({
  1193. url: this.$base.baseUrl + '/order/identify/drivingPermit',
  1194. filePath: this.carbackImg,
  1195. name: "image2",
  1196. header: {
  1197. Authorization: this.token,
  1198. },
  1199. success: (uploadFileRes) => {
  1200. let data1 = JSON.parse(uploadFileRes.data).data;
  1201. this.carback = {
  1202. vehicleweight: data1.carInfo
  1203. .grossMass, //总质量
  1204. completeKerbMass: data1.carInfo
  1205. .unladenMass, //整备质量
  1206. seatCount: data1.carInfo
  1207. .approvedPassengersCapacity, //核定载客数
  1208. }
  1209. this.lodingshow = false;
  1210. }
  1211. });
  1212. }
  1213. }
  1214. });
  1215. } else {
  1216. this.lodingshow = false;
  1217. }
  1218. }
  1219. },
  1220. //身份证正面
  1221. async userfrontChange() {
  1222. if (this.userfrontImg) {
  1223. this.previewImgs = [{
  1224. url: this.userfrontImg
  1225. }];
  1226. this.$refs.previewImage.open(0); // 传入当前选中的图片地址或序号
  1227. } else {
  1228. let [chooseImageErr, chooseImageRes] = await uni.chooseImage({
  1229. count: 1,
  1230. sizeType: ['compressed']
  1231. });
  1232. let size = chooseImageRes.tempFiles[0].size / 1024 / 1024 < 5;
  1233. if (!size) {
  1234. this.$refs.uToast.show({
  1235. title: '上传图片大小不能超过 5MB!',
  1236. type: 'error',
  1237. })
  1238. return false
  1239. }
  1240. if (chooseImageRes) {
  1241. this.lodingshow = true;
  1242. this.userfrontImg = chooseImageRes.tempFilePaths[0];
  1243. uni.uploadFile({
  1244. url: this.$base.baseUrl + '/ins/taskImage/uploadFile',
  1245. filePath: this.userfrontImg,
  1246. name: "multipartFile",
  1247. formData: {
  1248. 'type': 'image',
  1249. },
  1250. header: {
  1251. Authorization: this.token,
  1252. },
  1253. success: (imgRes) => {
  1254. let data = JSON.parse(imgRes.data);
  1255. if (data.code == '200') {
  1256. let type = 'C0' + this.checkIndex;
  1257. if (this[this.checkType + 'PositiveList'].some(v => v.imageType ==
  1258. type)) {
  1259. this[this.checkType + 'PositiveList'].map(val => {
  1260. if (val.imageType == type) {
  1261. val.imageId = data.data.id;
  1262. }
  1263. })
  1264. } else {
  1265. this[this.checkType + 'PositiveList'].push({
  1266. imageId: data.data.id,
  1267. imageType: type,
  1268. })
  1269. }
  1270. uni.uploadFile({
  1271. url: this.$base.baseUrl + '/order/identify/idCard',
  1272. filePath: this.userfrontImg,
  1273. name: "image1",
  1274. header: {
  1275. Authorization: this.token,
  1276. },
  1277. success: (uploadFileRes) => {
  1278. let data = JSON.parse(uploadFileRes.data).data;
  1279. this.userfront = {
  1280. age: getAgeByIdCard(data.customerInfo
  1281. .identifyNumber),
  1282. name: data.customerInfo.name,
  1283. gender: data.customerInfo
  1284. .identifyIssuedCom,
  1285. identifyNumber: data.customerInfo
  1286. .identifyNumber,
  1287. addr: data.customerInfo.addr,
  1288. }
  1289. this.lodingshow = false;
  1290. }
  1291. });
  1292. }
  1293. }
  1294. });
  1295. } else {
  1296. this.lodingshow = false;
  1297. }
  1298. }
  1299. },
  1300. //身份证反面
  1301. async userbackChange() {
  1302. if (this.userbackImg) {
  1303. this.previewImgs = [{
  1304. url: this.userbackImg
  1305. }];
  1306. this.$refs.previewImage.open(0); // 传入当前选中的图片地址或序号
  1307. } else {
  1308. let [chooseImageErr, chooseImageRes] = await uni.chooseImage({
  1309. count: 1,
  1310. sizeType: ['compressed']
  1311. });
  1312. let size = chooseImageRes.tempFiles[0].size / 1024 / 1024 < 5;
  1313. if (!size) {
  1314. this.$refs.uToast.show({
  1315. title: '上传图片大小不能超过 5MB!',
  1316. type: 'error',
  1317. })
  1318. return false
  1319. }
  1320. if (chooseImageRes) {
  1321. this.lodingshow = true;
  1322. this.userbackImg = chooseImageRes.tempFilePaths[0];
  1323. uni.uploadFile({
  1324. url: this.$base.baseUrl + '/ins/taskImage/uploadFile',
  1325. filePath: this.userbackImg,
  1326. name: "multipartFile",
  1327. formData: {
  1328. 'type': 'image',
  1329. },
  1330. header: {
  1331. Authorization: this.token,
  1332. },
  1333. success: (imgRes) => {
  1334. let data = JSON.parse(imgRes.data);
  1335. if (data.code == '200') {
  1336. let type = 'D0' + this.checkIndex;
  1337. if (this[this.checkType + 'PositiveList'].some(v => v.imageType ==
  1338. type)) {
  1339. this[this.checkType + 'PositiveList'].map(val => {
  1340. if (val.imageType == type) {
  1341. val.imageId = data.data.id;
  1342. }
  1343. })
  1344. } else {
  1345. this[this.checkType + 'PositiveList'].push({
  1346. imageId: data.data.id,
  1347. imageType: type,
  1348. })
  1349. }
  1350. uni.uploadFile({
  1351. url: this.$base.baseUrl +
  1352. '/order/identify/idCard',
  1353. filePath: this.userbackImg,
  1354. name: "image2",
  1355. header: {
  1356. Authorization: this.token,
  1357. },
  1358. success: (uploadFileRes) => {
  1359. let data1 = JSON.parse(uploadFileRes.data).data;
  1360. let identifyValidDate = '';
  1361. if (!!data1.customerInfo
  1362. .identifyValidDate) {
  1363. identifyValidDate = data1
  1364. .customerInfo
  1365. .identifyValidDate
  1366. .substr(0, 4) +
  1367. '-' + data1
  1368. .customerInfo
  1369. .identifyValidDate
  1370. .substr(4, 2) + '-' +
  1371. data1
  1372. .customerInfo
  1373. .identifyValidDate
  1374. .substr(6,
  1375. 2)
  1376. }
  1377. let identifyValidEndDate = '';
  1378. if (!!data1.customerInfo
  1379. .identifyValidEndDate) {
  1380. identifyValidEndDate =
  1381. data1.customerInfo
  1382. .identifyValidEndDate
  1383. .substr(0,
  1384. 4) + '-' + data1
  1385. .customerInfo
  1386. .identifyValidEndDate
  1387. .substr(4, 2) + '-' +
  1388. data1
  1389. .customerInfo
  1390. .identifyValidEndDate
  1391. .substr(6, 2)
  1392. }
  1393. this.userback = {
  1394. identifyValidDate: identifyValidDate, //起期
  1395. identifyValidEndDate: identifyValidEndDate, //止期
  1396. }
  1397. this.lodingshow = false;
  1398. }
  1399. });
  1400. }
  1401. }
  1402. });
  1403. } else {
  1404. this.lodingshow = false;
  1405. }
  1406. }
  1407. },
  1408. CarOCRconfirm() {
  1409. switch (this.checkType) {
  1410. case 'carInfo':
  1411. Object.assign(this.carInfo, this.carfront, this
  1412. .carback);
  1413. this.ImageOcrShow = false;
  1414. break;
  1415. case 'ownerInfo':
  1416. case "policyHolderInfo":
  1417. case "insuredPersonInfo":
  1418. Object.assign(this[this.checkType], this.userfront, this
  1419. .userback);
  1420. this.ImageOcrShow = false;
  1421. break;
  1422. default:
  1423. break;
  1424. }
  1425. },
  1426. //图片删除
  1427. del_btn(val) {
  1428. this[val] = "";
  1429. },
  1430. //弹框关闭事件
  1431. ImagePopClose() {
  1432. this.carfrontImg = "";
  1433. this.carbackImg = "";
  1434. this.userfrontImg = "";
  1435. this.userbackImg = "";
  1436. this.carfront = {};
  1437. this.carback = {};
  1438. this.userfront = {};
  1439. this.userback = {};
  1440. },
  1441. /**
  1442. * 复写 binddata 方法,如果只是为了校验,无复杂自定义操作,可忽略此方法
  1443. * @param {String} name 字段名称
  1444. * @param {String} value 表单域的值
  1445. */
  1446. binddata(name, value, type) {
  1447. if (name == 'identifyNumber') {
  1448. this[type].age = getAgeByIdCard(value)
  1449. }
  1450. },
  1451. //转变大写(车型/车架号/发动机号)
  1452. upperCaseType(type) {
  1453. this.carInfo[type] = this.carInfo[type].toUpperCase();
  1454. if (type == 'vinNo') {
  1455. this.carInfo.frameNo = this.carInfo.vinNo.trim();
  1456. }
  1457. },
  1458. //下拉改变触发该方法
  1459. bindPickerChange(e, type, list) {
  1460. this[type + 'Index'] = e.target.value;
  1461. this.carInfo[type] = this[list][e.target.value].dictValue;
  1462. },
  1463. // 身份证类型选择
  1464. bindIdentifyTypeChange(e, type) {
  1465. this[type + 'IdentifyIndex'] = e.target.value;
  1466. this[type + 'Info'].identifyType = this.identifyList[e.target.value].id;
  1467. this[type + 'Info'].identifyNumber = '';
  1468. },
  1469. //性别匹配
  1470. bindGenderChange(e, type) {
  1471. this[type + 'GenderIndex'] = e.target.value;
  1472. this[type + 'Info'].gender = this.genderList[e.target.value].label;
  1473. },
  1474. bindDateChange(e, type) { //日期赋值
  1475. if ((type == 'issueDate') && (!this.carInfo.registerDate)) {
  1476. return uni.showToast({
  1477. title: '请先输入注册日期',
  1478. icon: "none"
  1479. });
  1480. }
  1481. this.carInfo[type] = e.detail.value;
  1482. if (new Date(this.carInfo.registerDate) > new Date(this.carInfo.issueDate)) {
  1483. this.carInfo.issueDate = ""
  1484. return uni.showToast({
  1485. title: '注册日期大于发证日期',
  1486. icon: "none"
  1487. });
  1488. }
  1489. },
  1490. //长期
  1491. insureLongterm(checked, e) {
  1492. checked.detail.value == true ? this[e].identifyValidEndDate = "9999-12-31" : this[e]
  1493. .identifyValidEndDate =
  1494. "";
  1495. },
  1496. //日期(可以选择20年以内的时间)
  1497. getDate(type) {
  1498. const date = new Date();
  1499. let year = date.getFullYear();
  1500. let month = date.getMonth() + 1;
  1501. let day = date.getDate();
  1502. if (type === 'start') {
  1503. year = year - 20;
  1504. } else if (type === 'end') {}
  1505. month = month > 9 ? month : '0' + month;;
  1506. day = day > 9 ? day : '0' + day;
  1507. return `${year}-${month}-${day}`;
  1508. },
  1509. //同车主信息
  1510. syncPersonInfo(e, type, touch1, touch2, touch3) {
  1511. this[type] = e.detail.value;
  1512. this[touch1 + 'IdentifyIndex'] = this[touch2 + 'IdentifyIndex'];
  1513. if (this[type]) {
  1514. this[touch1 + 'Info'] = JSON.parse(JSON.stringify(this[touch2 + 'Info']));
  1515. this[touch3] = false;
  1516. } else {
  1517. for (let key in this[touch1 + "Info"]) {
  1518. this[touch1 + "Info"][key] = '';
  1519. }
  1520. }
  1521. },
  1522. //跳转选择车辆类型页面
  1523. toChooseVehicleType(cctype) {
  1524. if (cctype == '' || cctype == null) {
  1525. uni.showToast({
  1526. icon: 'none',
  1527. title: '请输入车型名称',
  1528. duration: 1500
  1529. });
  1530. } else {
  1531. let cctypeName = cctype.replace(/[^u4e00-u9fa5|,]+/ig, '')
  1532. this.navigate({
  1533. url: '/pages/carInsure1/carType1?modelName=' + encodeURIComponent(cctypeName)
  1534. }, "navigateTo", true);
  1535. }
  1536. },
  1537. // 通过车架号获取车型
  1538. async toChooseVin(cctype) {
  1539. if (cctype == '' || cctype == null) {
  1540. return uni.showToast({
  1541. icon: 'none',
  1542. title: '请输入车架号',
  1543. duration: 1500
  1544. });
  1545. } else {
  1546. if (!this.isFrameno(cctype.trim())) {
  1547. return uni.showToast({
  1548. title: '请输入正确的车辆识别码',
  1549. icon: "none"
  1550. });
  1551. }
  1552. this.navigate({
  1553. url: '/pages/carInsure1/carType1?frameNo=' + encodeURIComponent(cctype)
  1554. }, "navigateTo", true);
  1555. }
  1556. },
  1557. //验证车架号
  1558. isFrameno(str) {
  1559. let mPattern = /^([0-9A-Z]){17}$/;
  1560. return mPattern.test(str);
  1561. },
  1562. toNext() {
  1563. if (this.holderAndOwner) { //投保人同车主
  1564. this.policyHolderInfo = this.ownerInfo;
  1565. if (this.ownerInfoPositiveList.length > 0) {
  1566. this.policyHolderInfoPositiveList = JSON.parse(JSON.stringify(this
  1567. .ownerInfoPositiveList));
  1568. if (this.policyHolderInfoPositiveList.length == 1) {
  1569. this.policyHolderInfoPositiveList[0].imageType = "C03";
  1570. } else {
  1571. this.policyHolderInfoPositiveList[0].imageType = "C03";
  1572. this.policyHolderInfoPositiveList[1].imageType = "D03";
  1573. }
  1574. }
  1575. }
  1576. if (this.insuredAndOwner) { //被保人同车主
  1577. this.insuredPersonInfo = this.ownerInfo;
  1578. if (this.ownerInfoPositiveList.length > 0) {
  1579. this.insuredPersonInfoPositiveList = JSON.parse(JSON.stringify(this
  1580. .ownerInfoPositiveList));
  1581. if (this.insuredPersonInfoPositiveList.length == 1) {
  1582. this.insuredPersonInfoPositiveList[0].imageType = "C04";
  1583. } else {
  1584. this.insuredPersonInfoPositiveList[0].imageType = "C04";
  1585. this.insuredPersonInfoPositiveList[1].imageType = "D04";
  1586. }
  1587. }
  1588. }
  1589. if (this.tbrAndOwner) { //被保人同投保人
  1590. this.insuredPersonInfo = this.policyHolderInfo;
  1591. if (this.policyHolderInfoPositiveList.length > 0) {
  1592. this.insuredPersonInfoPositiveList = JSON.parse(JSON.stringify(this
  1593. .policyHolderInfoPositiveList));
  1594. if (this.insuredPersonInfoPositiveList.length == 1) {
  1595. this.insuredPersonInfoPositiveList[0].imageType = "C04";
  1596. } else {
  1597. this.insuredPersonInfoPositiveList[0].imageType = "C04";
  1598. this.insuredPersonInfoPositiveList[1].imageType = "D04";
  1599. }
  1600. }
  1601. }
  1602. this.$refs.carForm.submit().then(res => {
  1603. this.$refs.ownerForm.submit().then(res1 => {
  1604. this.$refs.policyHolderForm.submit().then(res2 => {
  1605. this.$refs.insuredPersonForm.submit().then(res3 => {
  1606. this.navigate({
  1607. url: '/pages/carInsure1/insureItems1',
  1608. success: (res) => {
  1609. res.eventChannel.emit(
  1610. "acceptData", {
  1611. carInfo: this
  1612. .carInfo,
  1613. ownerInfo: this
  1614. .ownerInfo,
  1615. policyHolderInfo: this
  1616. .policyHolderInfo,
  1617. insuredPersonInfo: this
  1618. .insuredPersonInfo,
  1619. riskList: this
  1620. .riskList,
  1621. kindList: this
  1622. .kindList,
  1623. carInfoPositiveList: this
  1624. .carInfoPositiveList, //车辆
  1625. ownerInfoPositiveList: this
  1626. .ownerInfoPositiveList, //车主
  1627. policyHolderInfoPositiveList: this
  1628. .policyHolderInfoPositiveList, //投保人
  1629. insuredPersonInfoPositiveList: this
  1630. .insuredPersonInfoPositiveList, //被保人
  1631. })
  1632. }
  1633. }, "navigateTo", true);
  1634. })
  1635. })
  1636. })
  1637. })
  1638. }
  1639. }
  1640. }
  1641. </script>
  1642. <style lang="scss" scoped>
  1643. @import '@/style/mixin.scss';
  1644. /deep/ .uni-group__content {
  1645. padding-top: 0;
  1646. }
  1647. /deep/ .uni-forms--top {
  1648. padding: 0;
  1649. }
  1650. /deep/ .uni-forms-item {
  1651. margin-bottom: 0;
  1652. }
  1653. /deep/ .uni-input-input {
  1654. font-size: 26upx;
  1655. }
  1656. /deep/ .uni-switch-input-checked {
  1657. background-color: $themeColor !important;
  1658. border-color: $themeColor !important;
  1659. }
  1660. /deep/ .uni-group__content {
  1661. padding-bottom: 0;
  1662. }
  1663. /deep/ .uni-input-input {
  1664. font-size: 28upx;
  1665. }
  1666. .body {
  1667. width: 100vw;
  1668. /* min-height: 100vh; */
  1669. background: #f5f5f5;
  1670. /* background: #FFFFFF; */
  1671. font-family: "Arial,Helvetica,sans-serif,PingFangSC";
  1672. }
  1673. .title {
  1674. height: 90upx;
  1675. border-bottom: 1px solid #EEEEEE;
  1676. }
  1677. .checkButton {
  1678. margin: 0 20upx;
  1679. width: 100upx;
  1680. height: 50upx;
  1681. flex-shrink: 1;
  1682. background: rgba($themeColor, 0.6);
  1683. color: #FFFFFF;
  1684. border-radius: 5upx;
  1685. }
  1686. .textColor {
  1687. color: #6091f5;
  1688. }
  1689. textarea {
  1690. font-size: 28upx;
  1691. width: 330upx;
  1692. }
  1693. /* 底部的样式Start */
  1694. .infoBottom {
  1695. height: 140upx;
  1696. position: fixed;
  1697. bottom: 0;
  1698. left: 0;
  1699. right: 0;
  1700. background: #FFFFFF;
  1701. border-top: 1upx solid #EEEEEE;
  1702. z-index: 99;
  1703. }
  1704. .infoBottom>button {
  1705. // font-size: 30upx;
  1706. background: $themeColor;
  1707. color: #FFFFFF;
  1708. flex: 1;
  1709. margin: 0upx 30upx;
  1710. }
  1711. /* 底部的样式End */
  1712. .popContent {
  1713. height: 100%;
  1714. background-color: #f9f9f9;
  1715. .popHeader {
  1716. width: 100%;
  1717. text-align: center;
  1718. padding: 10px;
  1719. font-weight: bold;
  1720. background-color: #FFFFFF;
  1721. }
  1722. .imgOcr {
  1723. width: 100%;
  1724. background-color: #f9f9f9;
  1725. .imgOcr-border {
  1726. position: relative;
  1727. width: 49%;
  1728. background-color: #fff;
  1729. padding: 2px;
  1730. .del_btn {
  1731. cursor: pointer;
  1732. position: absolute;
  1733. top: 5rpx;
  1734. right: 0;
  1735. width: 50rpx;
  1736. height: 50rpx;
  1737. border-radius: 50%;
  1738. z-index: 20;
  1739. }
  1740. .obverseimg {
  1741. height: 120px;
  1742. border-radius: 4px;
  1743. }
  1744. }
  1745. }
  1746. .line {
  1747. width: 100%;
  1748. margin: 2px 0;
  1749. background-color: #FFFFFF;
  1750. padding: 0 10px;
  1751. >text {
  1752. font-weight: bold;
  1753. width: 100px;
  1754. }
  1755. }
  1756. .popFooter {
  1757. width: 100%;
  1758. height: 50px;
  1759. font-weight: bold;
  1760. background-color: #FFFFFF;
  1761. color: #3e5cd7;
  1762. .popFooter-btn:nth-child(1) {
  1763. border-right: 1px solid #f9f9f9;
  1764. }
  1765. .popFooter-btn {
  1766. width: 50%;
  1767. text-align: center;
  1768. line-height: 50px;
  1769. }
  1770. }
  1771. }
  1772. .mask {
  1773. /* pointer-events: none; */
  1774. position: fixed;
  1775. z-index: 99999;
  1776. top: 0;
  1777. left: 0;
  1778. right: 0;
  1779. bottom: 0;
  1780. height: 100vh;
  1781. width: 100vw;
  1782. display: flex;
  1783. flex-direction: column;
  1784. justify-content: center;
  1785. align-items: center;
  1786. flex-wrap: wrap;
  1787. }
  1788. .mask.mask-show {
  1789. background: rgba(255, 255, 255, 0.3);
  1790. }
  1791. .title {
  1792. color: #333;
  1793. font-size: 28rpx;
  1794. margin-top: 20rpx;
  1795. }
  1796. .loader {
  1797. display: block;
  1798. width: 120rpx;
  1799. height: 120rpx;
  1800. border-radius: 50%;
  1801. border: 3rpx solid transparent;
  1802. border-top-color: #9370db;
  1803. -webkit-animation: spin 2s linear infinite;
  1804. animation: spin 2s linear infinite;
  1805. }
  1806. .loader::before {
  1807. content: "";
  1808. position: absolute;
  1809. top: 5rpx;
  1810. left: 5rpx;
  1811. right: 5rpx;
  1812. bottom: 5rpx;
  1813. border-radius: 50%;
  1814. border: 3rpx solid transparent;
  1815. border-top-color: #ba55d3;
  1816. -webkit-animation: spin 3s linear infinite;
  1817. animation: spin 3s linear infinite;
  1818. }
  1819. .loader::after {
  1820. content: "";
  1821. position: absolute;
  1822. top: 15rpx;
  1823. left: 15rpx;
  1824. right: 15rpx;
  1825. bottom: 15rpx;
  1826. border-radius: 50%;
  1827. border: 3rpx solid transparent;
  1828. border-top-color: #ff00ff;
  1829. -webkit-animation: spin 1.5s linear infinite;
  1830. animation: spin 1.5s linear infinite;
  1831. }
  1832. @-webkit-keyframes spin {
  1833. 0% {
  1834. -webkit-transform: rotate(0deg);
  1835. -ms-transform: rotate(0deg);
  1836. transform: rotate(0deg);
  1837. }
  1838. 100% {
  1839. -webkit-transform: rotate(360deg);
  1840. -ms-transform: rotate(360deg);
  1841. transform: rotate(360deg);
  1842. }
  1843. }
  1844. @keyframes spin {
  1845. 0% {
  1846. -webkit-transform: rotate(0deg);
  1847. -ms-transform: rotate(0deg);
  1848. transform: rotate(0deg);
  1849. }
  1850. 100% {
  1851. -webkit-transform: rotate(360deg);
  1852. -ms-transform: rotate(360deg);
  1853. transform: rotate(360deg);
  1854. }
  1855. }
  1856. </style>