carInfo1.vue 59 KB

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