index.vue 172 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055
  1. <!-- 保险单页面模板 -->
  2. <template>
  3. <!-- 主容器 -->
  4. <div class="insurancePolicy">
  5. <!-- 表单组件:包含所有保险单信息 -->
  6. <el-form ref="InsurancePolicyRefs" :model="insurancePolicyForm" :rules="insurancePolicyRules">
  7. <!-- 业务员信息区域 -->
  8. <el-row :gutter="20" class="formItem">
  9. <el-col :span="6">
  10. <!-- 业务员输入框:用于搜索和选择业务员 -->
  11. <el-form-item label="业务员:" style="margin-top: 10px">
  12. <el-input v-model="insurancePolicyForm.salesman" placeholder="输入业务员工姓名,手机号,工号查找"
  13. @click="handleFocus"></el-input>
  14. </el-form-item>
  15. </el-col>
  16. <el-col :span="6" v-if="insurancePolicyForm.salesman">
  17. <!-- 业务员手机号显示框(只读) -->
  18. <el-form-item label="手机号:" style="margin-top: 10px">
  19. <el-input v-model="insurancePolicyForm.mobile" disabled></el-input>
  20. </el-form-item>
  21. </el-col>
  22. <el-col :span="6" v-if="insurancePolicyForm.salesman">
  23. <!-- 业务员归属部门选择器 -->
  24. <el-form-item label="归属:" style="margin-top: 10px">
  25. <el-cascader clearable style="width: 100%" v-model="insurancePolicyForm.deptId" :options="institutionList"
  26. :props="tableProps"></el-cascader>
  27. </el-form-item>
  28. </el-col>
  29. <el-col :span="6" v-if="insurancePolicyForm.salesman">
  30. <!-- 更换业务员按钮 -->
  31. <el-button link type="primary" @click="handleFocus" style="margin-top: 10px">更换业务员</el-button>
  32. </el-col>
  33. </el-row>
  34. <!-- 可折叠面板:包含各种信息模块 -->
  35. <el-collapse v-model="activeName">
  36. <!-- 车辆信息面板 -->
  37. <el-collapse-item name="car">
  38. <template #title>
  39. <span class="title">车辆信息</span>
  40. </template>
  41. <el-row :gutter="20" class="formItem formBlock">
  42. <el-col :span="6">
  43. <!-- 车辆是否上牌选项 -->
  44. <el-form-item label="车辆是否上牌?" prop="isRegistered">
  45. <el-radio-group v-model="insurancePolicyForm.isRegistered">
  46. <el-radio value="1">是</el-radio>
  47. <el-radio value="2">否</el-radio>
  48. </el-radio-group>
  49. </el-form-item>
  50. </el-col>
  51. <el-col :span="6">
  52. <!-- 车牌号输入框:当车辆未上牌时禁用 -->
  53. <el-form-item :disabled="insurancePolicyForm.isRegistered == '2'" label="车牌" prop="licenseNo">
  54. <el-input v-model="insurancePolicyForm.licenseNo" minlength="7" maxlength="8" placeholder="输入车牌号"
  55. @input="upperCaseType('licenseNo')" @change="getQuoteNumber"></el-input>
  56. </el-form-item>
  57. </el-col>
  58. <el-col :span="6">
  59. <!-- 车架号(VIN)输入框:带查询按钮 -->
  60. <el-form-item label="车牌识别代码" prop="vinNo">
  61. <el-input v-model="insurancePolicyForm.vinNo" placeholder="请输入车辆识别代码" @input="upperCaseType('vinNo')"
  62. @change="getQuoteNumber">
  63. <template #append>
  64. <el-button icon="Search" @click="handleCarNumber" />
  65. </template>
  66. </el-input>
  67. </el-form-item>
  68. </el-col>
  69. <el-col :span="6">
  70. <!-- 品牌型号输入框:带查询按钮 -->
  71. <el-form-item label="品牌型号" prop="brandName">
  72. <el-input v-model="insurancePolicyForm.brandName" placeholder="请输入品牌型号"
  73. @input="upperCaseType('brandName')">
  74. <template #append>
  75. <el-button icon="Search" @click="handleCarCode" />
  76. </template>
  77. </el-input>
  78. </el-form-item>
  79. </el-col>
  80. <el-col :span="6">
  81. <!-- 发动机号输入框 -->
  82. <el-form-item label="发动机号" prop="engineNo">
  83. <el-input v-model="insurancePolicyForm.engineNo" placeholder="请输入发动机号"
  84. @input="upperCaseType('engineNo')" @change="getQuoteNumber"></el-input>
  85. </el-form-item>
  86. </el-col>
  87. <el-col :span="6">
  88. <!-- 使用性质下拉选择 -->
  89. <el-form-item label="使用性质" prop="carNatureCode">
  90. <el-select v-model="insurancePolicyForm.carNatureCode" placeholder="请选择">
  91. <el-option v-for="item in optionObj.car_nature_code" :label="item.label" :value="item.value"
  92. :key="item.value"></el-option>
  93. </el-select>
  94. </el-form-item>
  95. </el-col>
  96. <el-col :span="6">
  97. <!-- 车辆用途下拉选择 -->
  98. <el-form-item label="车辆用途" prop="vehicleUseCode">
  99. <el-select v-model="insurancePolicyForm.vehicleUseCode" placeholder="请选择">
  100. <el-option v-for="item in optionObj.vehicle_use_code" :label="item.label" :value="item.value"
  101. :key="item.value"></el-option>
  102. </el-select>
  103. </el-form-item>
  104. </el-col>
  105. <el-col :span="6">
  106. <!-- 车辆种类下拉选择 -->
  107. <el-form-item label="车辆种类" prop="plateType">
  108. <el-select v-model="insurancePolicyForm.plateType" placeholder="请选择">
  109. <el-option v-for="item in optionObj.car_kind_code" :label="item.label" :value="item.value"
  110. :key="item.value"></el-option>
  111. </el-select>
  112. </el-form-item>
  113. </el-col>
  114. <el-col :span="6">
  115. <!-- 车辆类型下拉选择 -->
  116. <el-form-item label="车辆类型" prop="carTypeCode">
  117. <el-select v-model="insurancePolicyForm.carTypeCode" placeholder="请选择">
  118. <el-option v-for="item in optionObj.car_type_code" :label="item.label" :value="item.value"
  119. :key="item.value"></el-option>
  120. </el-select>
  121. </el-form-item>
  122. </el-col>
  123. <el-col :span="6">
  124. <!-- 能源种类下拉选择 -->
  125. <el-form-item label="能源种类" prop="energyTypeCode">
  126. <el-select v-model="insurancePolicyForm.energyTypeCode" placeholder="请选择">
  127. <el-option v-for="item in optionObj.energy_type_code" :label="item.label" :value="item.value"
  128. :key="item.value"></el-option>
  129. </el-select>
  130. </el-form-item>
  131. </el-col>
  132. <el-col :span="6">
  133. <!-- 注册日期选择器 -->
  134. <el-form-item label="注册日期" prop="registerDate">
  135. <el-date-picker v-model="insurancePolicyForm.registerDate" type="date" placeholder="请选择"
  136. value-format="YYYY-MM-DD" style="width: 100%" />
  137. </el-form-item>
  138. </el-col>
  139. <el-col :span="6">
  140. <!-- 发证日期选择器 -->
  141. <el-form-item label="发证日期" prop="issueDate">
  142. <el-date-picker v-model="insurancePolicyForm.issueDate" type="date" placeholder="请选择"
  143. value-format="YYYY-MM-DD" style="width: 100%" @change="issueDateChange" />
  144. </el-form-item>
  145. </el-col>
  146. <el-col :span="6">
  147. <!-- 整备质量输入框 -->
  148. <el-form-item label="整备质量" prop="completeKerbMass">
  149. <el-input v-model="insurancePolicyForm.completeKerbMass" type="number" placeholder="输入整备质量">
  150. <template #append>
  151. <span>千克(KG)</span>
  152. </template>
  153. </el-input>
  154. </el-form-item>
  155. </el-col>
  156. <el-col :span="6">
  157. <!-- 核定载质量输入框 -->
  158. <el-form-item label="核定载质量" prop="limitLoad">
  159. <el-input v-model="insurancePolicyForm.limitLoad" type="number" placeholder="请输入核定载质量">
  160. <template #append>
  161. <span>千克(KG)</span>
  162. </template>
  163. </el-input>
  164. </el-form-item>
  165. </el-col>
  166. <el-col :span="6">
  167. <!-- 座位数输入框 -->
  168. <el-form-item label="座位数" prop="seatCount">
  169. <el-input v-model="insurancePolicyForm.seatCount" type="number" placeholder="请输入座位数">
  170. <template #append>
  171. <span>座</span>
  172. </template>
  173. </el-input>
  174. </el-form-item>
  175. </el-col>
  176. <el-col :span="6">
  177. <!-- 年款输入框 -->
  178. <el-form-item label="年款" prop="carYear">
  179. <el-input v-model="insurancePolicyForm.carYear" type="number" placeholder="请输入年款"></el-input>
  180. </el-form-item>
  181. </el-col>
  182. <el-col :span="6">
  183. <!-- 新车购置价输入框 -->
  184. <el-form-item label="新车购置价" prop="purchasePrice">
  185. <el-input v-model="insurancePolicyForm.purchasePrice" type="number" placeholder="请输入新车购置价">
  186. <template #append>
  187. <span>元</span>
  188. </template>
  189. </el-input>
  190. </el-form-item>
  191. </el-col>
  192. <el-col :span="6">
  193. <!-- 排量输入框 -->
  194. <el-form-item label="排量" prop="displacement">
  195. <el-input v-model="insurancePolicyForm.displacement" type="number" placeholder="请输入排量">
  196. <template #append>
  197. <span>升(L)</span>
  198. </template>
  199. </el-input>
  200. </el-form-item>
  201. </el-col>
  202. <el-col :span="6">
  203. <!-- 功率输入框 -->
  204. <el-form-item label="功率" prop="powerScale">
  205. <el-input v-model="insurancePolicyForm.powerScale" type="number" placeholder="输入功率">
  206. <template #append>
  207. <span>千瓦(KW)</span>
  208. </template>
  209. </el-input>
  210. </el-form-item>
  211. </el-col>
  212. <el-col v-if="insurancePolicyForm.transfer" :span="6">
  213. <!-- 转移登记日期选择器 -->
  214. <el-form-item label="转移登记日期" prop="transferDate">
  215. <el-date-picker v-model="insurancePolicyForm.transferDate" type="date" placeholder="请选择"
  216. value-format="YYYY-MM-DD" style="width: 100%" />
  217. </el-form-item>
  218. </el-col>
  219. </el-row>
  220. <template #icon="{ isActive }">
  221. <div class="icon">
  222. <!-- 证件识别按钮 -->
  223. <el-button link type="primary" @click.stop="handleRecognition('clxx')"><img
  224. src="@/assets/images/insurancePolicy/sao.png" class="myIcon" />证件识别</el-button>
  225. <span class="icon-ele flex a-c ">
  226. {{ isActive ? '收起' : '展开' }}
  227. </span>
  228. <el-icon v-if="isActive" color="#333">
  229. <ArrowDownBold />
  230. </el-icon>
  231. <el-icon v-else color="#333">
  232. <ArrowUpBold />
  233. </el-icon>
  234. </div>
  235. </template>
  236. </el-collapse-item>
  237. <!-- 车主信息面板 -->
  238. <el-collapse-item name="owner">
  239. <template #title>
  240. <span class="title">车主信息</span>
  241. </template>
  242. <el-row :gutter="20" class="formItem formBlock">
  243. <el-col :span="6">
  244. <!-- 车主姓名输入框 -->
  245. <el-form-item label="车主姓名" prop="name1">
  246. <el-input v-model="insurancePolicyForm.name1" placeholder="输入车主姓名"></el-input>
  247. </el-form-item>
  248. </el-col>
  249. <el-col :span="6">
  250. <!-- 车主手机号输入框 -->
  251. <el-form-item label="车主手机号" prop="mobile1">
  252. <el-input v-model="insurancePolicyForm.mobile1" placeholder="请输入车主手机号" maxlength="11"
  253. show-word-limit></el-input>
  254. </el-form-item>
  255. </el-col>
  256. <el-col :span="6">
  257. <!-- 证件类型选择器 -->
  258. <el-form-item label="证件类型" prop="personType1">
  259. <el-select v-model="insurancePolicyForm.identifyType1" placeholder="请选择">
  260. <el-option label="身份证" value="01" key="01"></el-option>
  261. <el-option label="营业执照" value="02" key="02"></el-option>
  262. </el-select>
  263. </el-form-item>
  264. </el-col>
  265. <el-col v-if="insurancePolicyForm.identifyType1 === '01'" :span="6">
  266. <!-- 证件号码输入框(身份证) -->
  267. <el-form-item label="证件号码" prop="identifyNumber1">
  268. <el-input v-model="insurancePolicyForm.identifyNumber1" placeholder="请输入证件号码"
  269. @change="getAgeByIdCard($event, insurancePolicyForm)"></el-input>
  270. </el-form-item>
  271. </el-col>
  272. <el-col v-else :span="6">
  273. <!-- 统一社会信用代码输入框(企业) -->
  274. <el-form-item label="统一社会信用代码" prop="identifyNumber1">
  275. <el-input v-model="insurancePolicyForm.identifyNumber1" placeholder="请输入证件号码"></el-input>
  276. </el-form-item>
  277. </el-col>
  278. <el-col :span="6">
  279. <!-- 证件有效期起期选择器 -->
  280. <el-form-item prop="identifyValidDate1" label="有效期起期">
  281. <el-date-picker v-model="insurancePolicyForm.identifyValidDate1" type="date" placeholder="请选择"
  282. value-format="YYYY-MM-DD" style="width: 100%"
  283. @blur="(e: any) => insurancePolicyForm.identifyValidDate1 = changeDate(e)" />
  284. </el-form-item>
  285. </el-col>
  286. <el-col :span="6">
  287. <!-- 证件有效期止期选择器 -->
  288. <el-form-item prop="identifyValidEndDate1" label="有效期止期">
  289. <div style="display: flex; align-items: center; justify-content: flex-start; width: 100%">
  290. <el-date-picker v-model="insurancePolicyForm.identifyValidEndDate1" type="date" placeholder="请选择"
  291. value-format="YYYY-MM-DD" style="width: calc(100% - 64px)"
  292. @blur="(e: any) => insurancePolicyForm.identifyValidEndDate1 = changeDate(e)" />
  293. <el-button type="primary" @click="longTime">长期</el-button>
  294. </div>
  295. </el-form-item>
  296. </el-col>
  297. <el-col :span="6">
  298. <!-- 地址输入框 -->
  299. <el-form-item label="地址" prop="addr1">
  300. <el-input v-model="insurancePolicyForm.addr1" placeholder="请输入地址"></el-input>
  301. </el-form-item>
  302. </el-col>
  303. <el-col :span="6">
  304. <!-- 投保人座机输入框(仅企业) -->
  305. <el-form-item v-if="insurancePolicyForm.identifyType1 === '02'" label="投保人座机" prop="telephone">
  306. <el-input v-model="insurancePolicyForm.telephone1" placeholder="请输入投保人座机"></el-input>
  307. </el-form-item>
  308. </el-col>
  309. <el-col :span="6">
  310. <!-- 投保人联系人输入框(仅企业) -->
  311. <el-form-item v-if="insurancePolicyForm.identifyType1 === '02'" label="投保人联系人" prop="person">
  312. <el-input v-model="insurancePolicyForm.person1" placeholder="请输入投保人联系人"></el-input>
  313. </el-form-item>
  314. </el-col>
  315. <el-col :span="6">
  316. <!-- 联系人证件号码输入框(仅企业) -->
  317. <el-form-item v-if="insurancePolicyForm.identifyType1 === '02'" label="联系人证件号码" prop="age">
  318. <el-input v-model.number="insurancePolicyForm.age1" placeholder="请输入联系人证件号码"></el-input>
  319. </el-form-item>
  320. </el-col>
  321. <el-col :span="6">
  322. <!-- 有效期止期选择器(仅企业) -->
  323. <el-form-item v-if="insurancePolicyForm.identifyType1 === '02'" prop="identifyValidEndDate" label="有效期止期">
  324. <el-date-picker v-model="insurancePolicyForm.identifyValidEndDate1" type="date" placeholder="请选择"
  325. value-format="YYYY-MM-DD" style="width: 100%" />
  326. </el-form-item>
  327. </el-col>
  328. <el-col :span="6">
  329. <!-- 地区选择器(仅企业) -->
  330. <el-form-item v-if="insurancePolicyForm.identifyType1 === '02'" prop="area" label="地区">
  331. <el-cascader clearable style="width: 100%" v-model="insurancePolicyForm.address1" :options="areaOptins"
  332. :props="areaProps"></el-cascader>
  333. </el-form-item>
  334. </el-col>
  335. <el-col :span="6">
  336. <!-- 注册资金输入框(仅企业) -->
  337. <el-form-item v-if="insurancePolicyForm.identifyType1 === '02'" label="注册资金" prop="money">
  338. <el-input v-model="insurancePolicyForm.registeredCapital1" placeholder="请输入注册资金">
  339. <template #append>
  340. <span>元</span>
  341. </template>
  342. </el-input>
  343. </el-form-item>
  344. </el-col>
  345. <el-col :span="6">
  346. <el-form-item v-if="insurancePolicyForm.identifyType1 === '02'" label="电子邮箱" prop="email">
  347. <el-input v-model="insurancePolicyForm.email1" placeholder="请输入电子邮箱"></el-input>
  348. </el-form-item>
  349. </el-col>
  350. <!-- <el-col :span="6">
  351. <el-form-item label="是否二手车" prop="gender">
  352. <el-select v-model="insurancePolicyForm.gender" placeholder="请选择">
  353. <el-option label="是" value="1" key="1"></el-option>
  354. <el-option label="否" value="2" key="2"></el-option>
  355. </el-select>
  356. </el-form-item>
  357. </el-col>
  358. <el-col :span="6">
  359. <el-form-item label="商业险是否过户" prop="gender">
  360. <el-select v-model="insurancePolicyForm.gender" placeholder="请选择">
  361. <el-option label="是" value="1" key="1"></el-option>
  362. <el-option label="否" value="2" key="2"></el-option>
  363. </el-select>
  364. </el-form-item>
  365. </el-col>-->
  366. </el-row>
  367. <template #icon="{ isActive }">
  368. <div class="icon">
  369. <el-button link type="primary" @click.stop="handleRecognition('czxx')"><img
  370. src="@/assets/images/insurancePolicy/sao.png" class="myIcon" />证件识别</el-button>
  371. <span class="icon-ele">
  372. {{ isActive ? '收起' : '展开' }}
  373. </span>
  374. <el-icon v-if="isActive" color="#333">
  375. <ArrowDownBold />
  376. </el-icon>
  377. <el-icon v-else color="#333">
  378. <ArrowUpBold />
  379. </el-icon>
  380. </div>
  381. </template>
  382. </el-collapse-item>
  383. <el-collapse-item name="owner1">
  384. <template #title>
  385. <div class="title">
  386. 投保人信息
  387. <div class="ml-5 flex a-c">
  388. <span class="ordinary" :class="{ 'active': item.checked }" v-for="item in btns.owner1" :key="item.text"
  389. @click.stop="handleChange(item, 'owner1')">
  390. {{ item.text }}
  391. </span>
  392. </div>
  393. </div>
  394. </template>
  395. <el-row :gutter="20" class="formItem formBlock" v-if="btns.owner1Text === '其他人'">
  396. <el-col :span="6">
  397. <el-form-item label="车主姓名" prop="name2">
  398. <el-input v-model="insurancePolicyForm.name2" placeholder="输入车主姓名"></el-input>
  399. </el-form-item>
  400. </el-col>
  401. <el-col :span="6">
  402. <el-form-item label="车主手机号" prop="mobile2">
  403. <el-input v-model="insurancePolicyForm.mobile2" placeholder="请输入车主手机号"></el-input>
  404. </el-form-item>
  405. </el-col>
  406. <el-col :span="6">
  407. <el-form-item label="证件类型" prop="personType2">
  408. <el-select v-model="insurancePolicyForm.identifyType2" placeholder="请选择">
  409. <el-option label="身份证" value="01" key="01"></el-option>
  410. <el-option label="营业执照" value="02" key="02"></el-option>
  411. </el-select>
  412. </el-form-item>
  413. </el-col>
  414. <el-col v-if="insurancePolicyForm.identifyType2 === '01'" :span="6">
  415. <el-form-item label="证件号码" prop="identifyNumber2">
  416. <el-input v-model="insurancePolicyForm.identifyNumber2" placeholder="请输入证件号码"
  417. @change="getAgeByIdCard($event, insurancePolicyForm)"></el-input>
  418. </el-form-item>
  419. </el-col>
  420. <el-col v-else :span="6">
  421. <el-form-item label="统一社会信用代码" prop="identifyNumber2">
  422. <el-input v-model="insurancePolicyForm.identifyNumber2" placeholder="请输入证件号码"></el-input>
  423. </el-form-item>
  424. </el-col>
  425. <el-col :span="6">
  426. <el-form-item prop="identifyValidDate2" label="有效期起期">
  427. <el-date-picker v-model="insurancePolicyForm.identifyValidDate2" type="date" placeholder="请选择"
  428. value-format="YYYY-MM-DD" style="width: 100%"
  429. @blur="(e: any) => insurancePolicyForm.identifyValidDate2 = changeDate(e)" />
  430. </el-form-item>
  431. </el-col>
  432. <el-col :span="6">
  433. <el-form-item prop="identifyValidEndDate2" label="有效期止期">
  434. <el-date-picker v-model="insurancePolicyForm.identifyValidEndDate2" type="date" placeholder="请选择"
  435. value-format="YYYY-MM-DD" style="width: 100%"
  436. @blur="(e: any) => insurancePolicyForm.identifyValidEndDate2 = changeDate(e)" />
  437. </el-form-item>
  438. </el-col>
  439. <el-col :span="6">
  440. <el-form-item label="地址" prop="addr2">
  441. <el-input v-model="insurancePolicyForm.addr2" placeholder="请输入地址"></el-input>
  442. </el-form-item>
  443. </el-col>
  444. <el-col :span="6">
  445. <el-form-item v-if="insurancePolicyForm.identifyType2 === '02'" label="投保人座机" prop="telephone">
  446. <el-input v-model="insurancePolicyForm.telephone2" placeholder="请输入投保人座机"></el-input>
  447. </el-form-item>
  448. </el-col>
  449. <el-col :span="6">
  450. <el-form-item v-if="insurancePolicyForm.identifyType2 === '02'" label="投保人联系人" prop="person">
  451. <el-input v-model="insurancePolicyForm.person2" placeholder="请输入投保人联系人"></el-input>
  452. </el-form-item>
  453. </el-col>
  454. <el-col :span="6">
  455. <el-form-item v-if="insurancePolicyForm.identifyType2 === '02'" label="联系人证件号码" prop="age">
  456. <el-input v-model.number="insurancePolicyForm.age2" placeholder="请输入联系人证件号码"></el-input>
  457. </el-form-item>
  458. </el-col>
  459. <el-col :span="6">
  460. <el-form-item v-if="insurancePolicyForm.identifyType2 === '02'" prop="identifyValidEndDate" label="有效期止期">
  461. <el-date-picker v-model="insurancePolicyForm.identifyValidEndDate2" type="date" placeholder="请选择"
  462. value-format="YYYY-MM-DD" style="width: 100%" />
  463. </el-form-item>
  464. </el-col>
  465. <el-col :span="6">
  466. <el-form-item v-if="insurancePolicyForm.identifyType2 === '02'" prop="area" label="地区">
  467. <el-cascader clearable style="width: 100%" v-model="insurancePolicyForm.address2" :options="areaOptins"
  468. :props="areaProps"></el-cascader>
  469. </el-form-item>
  470. </el-col>
  471. <el-col :span="6">
  472. <el-form-item v-if="insurancePolicyForm.identifyType2 === '02'" label="注册资金" prop="money">
  473. <el-input v-model="insurancePolicyForm.registeredCapital2" placeholder="请输入注册资金">
  474. <template #append>
  475. <span>元</span>
  476. </template>
  477. </el-input>
  478. </el-form-item>
  479. </el-col>
  480. <el-col :span="6">
  481. <el-form-item v-if="insurancePolicyForm.identifyType2 === '02'" label="电子邮箱" prop="email">
  482. <el-input v-model="insurancePolicyForm.email2" placeholder="请输入电子邮箱"></el-input>
  483. </el-form-item>
  484. </el-col>
  485. <!-- <el-col :span="6">
  486. <el-form-item label="是否二手车" prop="gender">
  487. <el-select v-model="insurancePolicyForm.policyHolderInfo.gender" placeholder="请选择">
  488. <el-option label="是" value="1" key="1"></el-option>
  489. <el-option label="否" value="2" key="2"></el-option>
  490. </el-select>
  491. </el-form-item>
  492. </el-col>
  493. <el-col :span="6">
  494. <el-form-item label="商业险是否过户" prop="gender">
  495. <el-select v-model="insurancePolicyForm.policyHolderInfo.gender" placeholder="请选择">
  496. <el-option label="是" value="1" key="1"></el-option>
  497. <el-option label="否" value="2" key="2"></el-option>
  498. </el-select>
  499. </el-form-item>
  500. </el-col>-->
  501. </el-row>
  502. <template #icon="{ isActive }">
  503. <div class="icon">
  504. <el-button link type="primary" @click.stop="handleRecognition('tbrxx')"><img
  505. src="@/assets/images/insurancePolicy/sao.png" class="myIcon" />证件识别</el-button>
  506. <span class="icon-ele">
  507. {{ isActive ? '收起' : '展开' }}
  508. </span>
  509. <el-icon v-if="isActive" color="#333">
  510. <ArrowDownBold />
  511. </el-icon>
  512. <el-icon v-else color="#333">
  513. <ArrowUpBold />
  514. </el-icon>
  515. </div>
  516. </template>
  517. </el-collapse-item>
  518. <el-collapse-item name="owner2">
  519. <template #title>
  520. <div class="title">
  521. 被保人信息
  522. <div class="ml-5 flex a-c">
  523. <span class="ordinary" :class="{ 'active': item.checked }" v-for="item in btns.owner2" :key="item.text"
  524. @click.stop="handleChange(item, 'owner2')">
  525. {{ item.text }}
  526. </span>
  527. </div>
  528. </div>
  529. </template>
  530. <el-row :gutter="20" class="formItem formBlock" v-if="btns.owner2Text === '其他人'">
  531. <el-col :span="6">
  532. <el-form-item label="车主姓名" prop="name3">
  533. <el-input v-model="insurancePolicyForm.name3" placeholder="输入车主姓名"></el-input>
  534. </el-form-item>
  535. </el-col>
  536. <el-col :span="6">
  537. <el-form-item label="车主手机号" prop="mobile3">
  538. <el-input v-model="insurancePolicyForm.mobile3" placeholder="请输入车主手机号"></el-input>
  539. </el-form-item>
  540. </el-col>
  541. <el-col :span="6">
  542. <el-form-item label="证件类型" prop="personType3">
  543. <el-select v-model="insurancePolicyForm.identifyType3" placeholder="请选择">
  544. <el-option label="身份证" value="01" key="01"></el-option>
  545. <el-option label="营业执照" value="02" key="02"></el-option>
  546. </el-select>
  547. </el-form-item>
  548. </el-col>
  549. <el-col v-if="insurancePolicyForm.identifyType3 === '01'" :span="6">
  550. <el-form-item label="证件号码" prop="identifyNumber3">
  551. <el-input v-model="insurancePolicyForm.identifyNumber3" placeholder="请输入证件号码"
  552. @change="getAgeByIdCard($event, insurancePolicyForm)"></el-input>
  553. </el-form-item>
  554. </el-col>
  555. <el-col v-else :span="6">
  556. <el-form-item label="统一社会信用代码" prop="identifyNumber3">
  557. <el-input v-model="insurancePolicyForm.identifyNumber3" placeholder="请输入证件号码"></el-input>
  558. </el-form-item>
  559. </el-col>
  560. <el-col :span="6">
  561. <el-form-item prop="identifyValidDate3" label="有效期起期">
  562. <el-date-picker v-model="insurancePolicyForm.identifyValidDate3" type="date" placeholder="请选择"
  563. value-format="YYYY-MM-DD" style="width: 100%"
  564. @blur="(e: any) => insurancePolicyForm.identifyValidDate3 = changeDate(e)" />
  565. </el-form-item>
  566. </el-col>
  567. <el-col :span="6">
  568. <el-form-item prop="identifyValidEndDate3" label="有效期止期">
  569. <el-date-picker v-model="insurancePolicyForm.identifyValidEndDate3" type="date" placeholder="请选择"
  570. value-format="YYYY-MM-DD" style="width: 100%"
  571. @blur="(e: any) => insurancePolicyForm.identifyValidEndDate3 = changeDate(e)" />
  572. </el-form-item>
  573. </el-col>
  574. <el-col :span="6">
  575. <el-form-item label="地址" prop="addr3">
  576. <el-input v-model="insurancePolicyForm.addr3" placeholder="请输入地址"></el-input>
  577. </el-form-item>
  578. </el-col>
  579. <el-col :span="6">
  580. <el-form-item v-if="insurancePolicyForm.identifyType3 === '02'" label="投保人座机" prop="telephone">
  581. <el-input v-model="insurancePolicyForm.telephone3" placeholder="请输入投保人座机"></el-input>
  582. </el-form-item>
  583. </el-col>
  584. <el-col :span="6">
  585. <el-form-item v-if="insurancePolicyForm.identifyType3 === '02'" label="投保人联系人" prop="person">
  586. <el-input v-model="insurancePolicyForm.person3" placeholder="请输入投保人联系人"></el-input>
  587. </el-form-item>
  588. </el-col>
  589. <el-col :span="6">
  590. <el-form-item v-if="insurancePolicyForm.identifyType3 === '02'" label="联系人证件号码" prop="age">
  591. <el-input v-model.number="insurancePolicyForm.age3" placeholder="请输入联系人证件号码"></el-input>
  592. </el-form-item>
  593. </el-col>
  594. <el-col :span="6">
  595. <el-form-item v-if="insurancePolicyForm.identifyType3 === '02'" prop="identifyValidEndDate" label="有效期止期">
  596. <el-date-picker v-model="insurancePolicyForm.identifyValidEndDate3" type="date" placeholder="请选择"
  597. value-format="YYYY-MM-DD" style="width: 100%" />
  598. </el-form-item>
  599. </el-col>
  600. <el-col :span="6">
  601. <el-form-item v-if="insurancePolicyForm.identifyType3 === '02'" prop="area" label="地区">
  602. <el-cascader clearable style="width: 100%" v-model="insurancePolicyForm.address3" :options="areaOptins"
  603. :props="areaProps"></el-cascader>
  604. </el-form-item>
  605. </el-col>
  606. <el-col :span="6">
  607. <el-form-item v-if="insurancePolicyForm.identifyType3 === '02'" label="注册资金" prop="money">
  608. <el-input v-model="insurancePolicyForm.registeredCapital3" placeholder="请输入注册资金">
  609. <template #append>
  610. <span>元</span>
  611. </template>
  612. </el-input>
  613. </el-form-item>
  614. </el-col>
  615. <el-col :span="6">
  616. <el-form-item v-if="insurancePolicyForm.identifyType3 === '02'" label="电子邮箱" prop="email">
  617. <el-input v-model="insurancePolicyForm.email3" placeholder="请输入电子邮箱"></el-input>
  618. </el-form-item>
  619. </el-col>
  620. <!-- <el-col :span="6">
  621. <el-form-item label="是否二手车" prop="gender">
  622. <el-select v-model="insurancePolicyForm.gender3" placeholder="请选择">
  623. <el-option label="是" value="1" key="1"></el-option>
  624. <el-option label="否" value="2" key="2"></el-option>
  625. </el-select>
  626. </el-form-item>
  627. </el-col>
  628. <el-col :span="6">
  629. <el-form-item label="商业险是否过户" prop="gender">
  630. <el-select v-model="insurancePolicyForm.gender3" placeholder="请选择">
  631. <el-option label="是" value="1" key="1"></el-option>
  632. <el-option label="否" value="2" key="2"></el-option>
  633. </el-select>
  634. </el-form-item>
  635. </el-col>-->
  636. </el-row>
  637. <template #icon="{ isActive }">
  638. <div class="icon">
  639. <el-button link type="primary" @click.stop="handleRecognition('bbrxx')"><img
  640. src="@/assets/images/insurancePolicy/sao.png" class="myIcon" />证件识别</el-button>
  641. <span class="icon-ele">
  642. {{ isActive ? '收起' : '展开' }}
  643. </span>
  644. <el-icon v-if="isActive" color="#333">
  645. <ArrowDownBold />
  646. </el-icon>
  647. <el-icon v-else color="#333">
  648. <ArrowUpBold />
  649. </el-icon>
  650. </div>
  651. </template>
  652. </el-collapse-item>
  653. <el-collapse-item name="tax">
  654. <template #title>
  655. <div class="title">
  656. 车船税
  657. <div class="ml-5 flex a-c">
  658. <span class="ordinary" :class="{ 'active': item.checked }" v-for="item in btns.owner3" :key="item.text"
  659. @click.stop="handleChange(item, 'owner3')">
  660. {{ item.text }}
  661. </span>
  662. </div>
  663. </div>
  664. </template>
  665. <div v-if="btns.owner3show === '正常交税'" style="width: 100%">
  666. <el-row :gutter="20" class="formItem formBlock">
  667. <el-col :span="6">
  668. <el-form-item label="纳税人名称" prop="taxpayerName">
  669. <el-input v-model="insurancePolicyForm.taxpayerName" placeholder="请输入纳税人名称" maxlength="50"></el-input>
  670. </el-form-item>
  671. </el-col>
  672. <el-col :span="6">
  673. <el-form-item label="证件类型" prop="taxpayerIdentifier">
  674. <el-select v-model="insurancePolicyForm.taxpayerIdentifier" placeholder="请选择">
  675. <el-option label="身份证" value="01" key="01"></el-option>
  676. <el-option label="营业执照" value="02" key="02"></el-option>
  677. </el-select>
  678. </el-form-item>
  679. </el-col>
  680. <el-col :span="6">
  681. <el-form-item label="证件号码" prop="identifyNumber">
  682. <el-input v-model="insurancePolicyForm.identifyNumber" placeholder="请输入证件号码"
  683. maxlength="50"></el-input>
  684. </el-form-item>
  685. </el-col>
  686. </el-row>
  687. </div>
  688. <div v-if="btns.owner3show === '免税'" style="width: 100%">
  689. <el-row :gutter="20" class="formItem formBlock">
  690. <el-col :span="6">
  691. <el-form-item label="减免税凭证号" prop="extendChar2">
  692. <el-input v-model="insurancePolicyForm.extendChar2" placeholder="请输入减免税凭证号" maxlength="50"></el-input>
  693. </el-form-item>
  694. </el-col>
  695. <el-col :span="6">
  696. <el-form-item label="减免税原因" prop="relifReason">
  697. <el-select v-model="insurancePolicyForm.relifReason" placeholder="请选择">
  698. <el-option label="原因1" value="1" key="1"></el-option>
  699. </el-select>
  700. </el-form-item>
  701. </el-col>
  702. <el-col :span="6">
  703. <el-form-item label="税务机关代码" prop="taxComCode">
  704. <el-input v-model="insurancePolicyForm.taxComCode" placeholder="请输入税务机关代码" maxlength="50"></el-input>
  705. </el-form-item>
  706. </el-col>
  707. <el-col :span="6">
  708. <el-form-item label="税务机关名称" prop="taxComName">
  709. <el-input v-model="insurancePolicyForm.taxComName" placeholder="请输入税务机关名称" maxlength="50"></el-input>
  710. </el-form-item>
  711. </el-col>
  712. </el-row>
  713. </div>
  714. <div v-if="btns.owner3show === '减税'" style="width: 100%">
  715. <el-row :gutter="20" class="formItem formBlock">
  716. <el-col :span="6">
  717. <el-form-item label="减免税凭证号" prop="extendChar2">
  718. <el-input v-model="insurancePolicyForm.extendChar2" placeholder="请输入减免税凭证号" maxlength="50"></el-input>
  719. </el-form-item>
  720. </el-col>
  721. <el-col :span="6">
  722. <el-form-item label="减免税原因" prop="relifReason">
  723. <el-select v-model="insurancePolicyForm.relifReason" placeholder="请选择">
  724. <el-option label="原因1" value="1" key="1"></el-option>
  725. </el-select>
  726. </el-form-item>
  727. </el-col>
  728. <el-col :span="6">
  729. <el-form-item label="税务机关代码" prop="taxComCode">
  730. <el-input v-model="insurancePolicyForm.taxComCode" placeholder="请输入税务机关代码" maxlength="50"></el-input>
  731. </el-form-item>
  732. </el-col>
  733. <el-col :span="6">
  734. <el-form-item label="税务机关名称" prop="taxComName">
  735. <el-input v-model="insurancePolicyForm.taxComName" placeholder="请输入税务机关名称" maxlength="50"></el-input>
  736. </el-form-item>
  737. </el-col>
  738. <el-col :span="6">
  739. <el-form-item label="减税比例" prop="taxRelief">
  740. <el-input v-model="insurancePolicyForm.taxRelief" type="number" placeholder="请输入减税比例">
  741. <template #append>
  742. <span>%</span>
  743. </template>
  744. </el-input>
  745. </el-form-item>
  746. </el-col>
  747. </el-row>
  748. </div>
  749. <div v-if="btns.owner3show === '完税'" style="width: 100%">
  750. <el-row :gutter="20" class="formItem formBlock">
  751. <el-col :span="6">
  752. <el-form-item label="完税凭证号" prop="extendChar2">
  753. <el-input v-model="insurancePolicyForm.extendChar2" placeholder="请输入完税凭证号" maxlength="50"></el-input>
  754. </el-form-item>
  755. </el-col>
  756. <el-col :span="6">
  757. <el-form-item label="税务机关代码" prop="taxComCode">
  758. <el-input v-model="insurancePolicyForm.taxComCode" placeholder="请输入税务机关代码" maxlength="50"></el-input>
  759. </el-form-item>
  760. </el-col>
  761. <el-col :span="6">
  762. <el-form-item label="税务机关名称" prop="taxComName">
  763. <el-input v-model="insurancePolicyForm.taxComName" placeholder="请输入税务机关名称" maxlength="50"></el-input>
  764. </el-form-item>
  765. </el-col>
  766. <el-col :span="6">
  767. <el-form-item prop="taxDocumentDate" label="完税凭证填发日期">
  768. <el-date-picker v-model="insurancePolicyForm.taxDocumentDate" type="date" placeholder="请选择"
  769. value-format="YYYY-MM-DD" style="width: 100%" />
  770. </el-form-item>
  771. </el-col>
  772. <el-col :span="6">
  773. <el-form-item prop="taxPaidAreaCode" label="完税凭证地区">
  774. <el-cascader filterable clearable style="width: 100%" v-model="insurancePolicyForm.taxPaidAreaCode"
  775. :options="areaOptins" :props="areaProps"></el-cascader>
  776. </el-form-item>
  777. </el-col>
  778. </el-row>
  779. </div>
  780. <template #icon="{ isActive }">
  781. <div class="icon">
  782. <span class="icon-ele">
  783. {{ isActive ? '收起' : '展开' }}
  784. </span>
  785. <el-icon v-if="isActive" color="#333">
  786. <ArrowDownBold />
  787. </el-icon>
  788. <el-icon v-else color="#333">
  789. <ArrowUpBold />
  790. </el-icon>
  791. </div>
  792. </template>
  793. </el-collapse-item>
  794. <el-collapse-item name="insurance">
  795. <template #title>
  796. <div class="title">
  797. 投保信息
  798. <div class="ml-5 flex a-c">
  799. <span class="ordinary" :class="{ 'active': item.checked }" v-for="item in optionObj.insuranceType"
  800. :key="item.value" @click.stop="handleChange(item, 'insurance')">
  801. {{ item.label }}
  802. </span>
  803. </div>
  804. </div>
  805. </template>
  806. <el-form-item class="white-m-p24" label="车辆其他信息">
  807. <el-checkbox v-model="insurancePolicyForm.transfer" value="1">是否过户</el-checkbox>
  808. <el-checkbox v-model="insurancePolicyForm.biTransfer" value="2">商业险是否过户</el-checkbox>
  809. <el-checkbox v-model="insurancePolicyForm.secondHandCar" value="3">二手车</el-checkbox>
  810. </el-form-item>
  811. <div class="insurance-jq flex a-c "
  812. v-if="insurancePolicyForm.productId === '0330' || insurancePolicyForm.productId === '0330034002' || insurancePolicyForm.productId === '0330034001'">
  813. <span>交强险</span>
  814. <span class="checkbox" :class="{ 'cehcked': item.checked }" v-for="item in jqWork" :key="item.text"
  815. @click="JQChange(item)">{{ item.text }}</span>
  816. <div class="time">
  817. <el-form-item prop="startDate" label="">
  818. <el-date-picker v-model="insurancePolicyForm.JQStartDate" type="datetime" placeholder="请选择"
  819. value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" @change="jqChange"
  820. :disabled-date="disabledDate" />
  821. </el-form-item>
  822. <span class="ml-5 mr-5">至</span>
  823. <el-form-item prop="endDate" label="">
  824. <el-date-picker v-model="insurancePolicyForm.JQEndDate" type="datetime" placeholder="请选择"
  825. value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
  826. </el-form-item>
  827. </div>
  828. </div>
  829. <div class="insurance-jq flex a-c "
  830. v-if="insurancePolicyForm.productId === '034001' || insurancePolicyForm.productId === '034002' || insurancePolicyForm.productId === '0330034002' || insurancePolicyForm.productId === '0330034001'">
  831. <span>商业险</span>
  832. <span class="checkbox" :class="{ 'cehcked': item.checked }" v-for="item in syWork" :key="item.text"
  833. @click="SYChange(item)">{{ item.text }}</span>
  834. <div class="time">
  835. <el-form-item prop="startDate" label="">
  836. <el-date-picker v-model="insurancePolicyForm.SYStartDate" type="datetime" placeholder="请选择"
  837. value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" @change="syChange"
  838. :disabled-date="disabledDate" />
  839. </el-form-item>
  840. <span class="ml-5 mr-5">至</span>
  841. <el-form-item prop="endDate" label="">
  842. <el-date-picker v-model="insurancePolicyForm.SYEndDate" type="datetime" placeholder="请选择"
  843. value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
  844. </el-form-item>
  845. </div>
  846. </div>
  847. <template #icon="{ isActive }">
  848. <div class="icon">
  849. <span class="icon-ele">
  850. {{ isActive ? '收起' : '展开' }}
  851. </span>
  852. <el-icon v-if="isActive" color="#333">
  853. <ArrowDownBold />
  854. </el-icon>
  855. <el-icon v-else color="#333">
  856. <ArrowUpBold />
  857. </el-icon>
  858. </div>
  859. </template>
  860. </el-collapse-item>
  861. <el-collapse-item name="company">
  862. <template #title>
  863. <span class="title">
  864. 报价公司
  865. </span>
  866. </template>
  867. <el-table :data="quoteData" style="width: calc(100% - 48px); margin: 0 24px" row-key="id"
  868. :preserve-expanded-content="true" @selection-change="handleSelect" @select="handelSelectRow"
  869. @row-click="handleClickRow" @expand-change="handelExpend">
  870. <el-table-column type="expand">
  871. <template #default="scope">
  872. <div class="equities">
  873. <div class="mr-3 equitiesTitle">客户权益</div>
  874. <div class="equitiesBox">
  875. <div class="equitiesLabel">
  876. <img src="@/assets/images/home/quanyi.png" />
  877. <div>掌柜权益</div>
  878. </div>
  879. <div class="circle"></div>
  880. <div>为车主提供 "省心、省时、又省钱" 的全场景服务</div>
  881. <el-button style="margin: 0 20px" size="small" type="primary"
  882. @click="handleOpenEquities(scope.row.quoteResult.ordersNo)">选择权益</el-button>
  883. </div>
  884. <div class="equitiesChoice">
  885. 已选<span style="color: #0083FF">{{ insOrderRightsInfoDto.length || 0 }}</span>项权益,共计<span
  886. style="color: #FF8C21">{{ insOrderRightsInfoDto.totalPriceCount || 0 }}</span>元
  887. </div>
  888. </div>
  889. <div class="expandFlex">
  890. <div class="expandTitle flex a-c j-c">车险方案</div>
  891. <div style="width: calc(100% - 50px); ">
  892. <div class="product">
  893. <span class="productItem" :class="{ 'productActive': scope.row.productIndex === index }"
  894. v-for="(item, index) in scope.row.projectList"
  895. @click.stop="handleProduct(scope, item, index)">{{ item.schemeName }}</span>
  896. </div>
  897. <el-row :gutter="20">
  898. <el-col :span="12">
  899. <div class="quoteTitle">方案明细</div>
  900. <el-table :data="scope.row.projectList?.[scope.row.productIndex]?.kinds">
  901. <el-table-column width="50" align="center"
  902. v-if="scope.row.projectList?.[scope.row.productIndex]?.schemeType != '1'">
  903. <template #header>
  904. <el-icon style="cursor: pointer;" @click="handlePopover(scope)">
  905. <CirclePlus />
  906. </el-icon>
  907. </template>
  908. <template #default="props">
  909. <el-icon @click="handleInsuranceDel(scope, props)">
  910. <Delete />
  911. </el-icon>
  912. </template>
  913. </el-table-column>
  914. <el-table-column label="险种" prop="kindName" align="center"></el-table-column>
  915. <el-table-column label="保额" align="center">
  916. <template #default="props">
  917. <el-select v-model="props.row.amount"
  918. :disabled="scope.row.projectList?.[scope.row.productIndex]?.schemeType == '1'">
  919. <el-option v-for="item in props.row.options" :label="item.label"
  920. :value="item.value"></el-option>
  921. </el-select>
  922. </template>
  923. </el-table-column>
  924. <el-table-column label="保费" prop="unitAmount" align="center"></el-table-column>
  925. </el-table>
  926. <div class="quoteTitle"
  927. v-if="scope.row.projectList?.[scope.row.productIndex]?.rescue && scope.row.projectList?.[scope.row.productIndex]?.detection && scope.row.projectList?.[scope.row.productIndex]?.driver && scope.row.projectList?.[scope.row.productIndex]?.inspect">
  928. 增值服务</div>
  929. <el-row :gutter="20"
  930. v-if="scope.row.projectList?.[scope.row.productIndex]?.rescue && scope.row.projectList?.[scope.row.productIndex]?.detection && scope.row.projectList?.[scope.row.productIndex]?.driver && scope.row.projectList?.[scope.row.productIndex]?.inspect">
  931. <el-col :span="6" class="quoteFlex">
  932. 救援
  933. <el-select v-model="scope.row.projectList[scope.row.productIndex].rescue"
  934. :disabled="scope.row.projectList?.[scope.row.productIndex]?.schemeType == '1'"
  935. size="small" style="width: 80px; margin: 0 10px">
  936. <el-option label="1" value="1"></el-option>
  937. </el-select>
  938. 次
  939. </el-col>
  940. <el-col :span="6" class="quoteFlex">
  941. 检测
  942. <el-select v-model="scope.row.projectList[scope.row.productIndex].detection"
  943. :disabled="scope.row.projectList?.[scope.row.productIndex]?.schemeType == '1'"
  944. size="small" style="width: 80px; margin: 0 10px">
  945. <el-option label="1" value="1"></el-option>
  946. </el-select>
  947. 次
  948. </el-col>
  949. <el-col :span="6" class="quoteFlex">
  950. 代驾
  951. <el-select v-model="scope.row.projectList[scope.row.productIndex].driver"
  952. :disabled="scope.row.projectList?.[scope.row.productIndex]?.schemeType == '1'"
  953. size="small" style="width: 80px; margin: 0 10px">
  954. <el-option label="1" value="1"></el-option>
  955. </el-select>
  956. 次
  957. </el-col>
  958. <el-col :span="6" class="quoteFlex">
  959. 送检
  960. <el-select v-model="scope.row.projectList[scope.row.productIndex].inspect"
  961. :disabled="scope.row.projectList?.[scope.row.productIndex]?.schemeType == '1'"
  962. size="small" style="width: 80px; margin: 0 10px">
  963. <el-option label="1" value="1"></el-option>
  964. </el-select>
  965. 次
  966. </el-col>
  967. </el-row>
  968. <div class="quoteTitle">驾意险</div>
  969. <el-table :data="scope.row.projectList?.[scope.row.productIndex]?.drivings">
  970. <el-table-column width="50" align="center"
  971. v-if="scope.row.projectList?.[scope.row.productIndex]?.schemeType != '1'">
  972. <template #header>
  973. <el-icon @click="handleDriving(scope)">
  974. <CirclePlus />
  975. </el-icon>
  976. </template>
  977. <template #default="props">
  978. <el-icon @click="handleDrivingDel(scope, props)">
  979. <Delete />
  980. </el-icon>
  981. </template>
  982. </el-table-column>
  983. <el-table-column label="产品名称" prop="productName" align="center">
  984. <template #default="props">
  985. <el-button link type="primary" @click="getJYXDetail(props.row)">{{ props.row.productName
  986. }}</el-button>
  987. </template>
  988. </el-table-column>
  989. <el-table-column label="数量" align="center">
  990. <template #default="props">
  991. <el-input :disabled="scope.row.projectList?.[scope.row.productIndex]?.schemeType === '1'"
  992. v-model="props.row.quantity" style="width: 140px">
  993. <template #append>
  994. <span>份</span>
  995. </template>
  996. </el-input>
  997. </template>
  998. </el-table-column>
  999. <el-table-column label="保费" prop="premium" align="center"></el-table-column>
  1000. </el-table>
  1001. <el-button size="small" link type="primary" @click="handleSelectSpecial(scope)">选择特约</el-button>
  1002. <el-table :data="scope.row.specialSelectedList"
  1003. v-show="scope.row.specialSelectedList?.length > 0">
  1004. <el-table-column prop="clauseName" label="特约名称"></el-table-column>
  1005. </el-table>
  1006. </el-col>
  1007. <el-col :span="12" style="border-left: 1px dashed #eeeeee">
  1008. <div class="premiumFactor">
  1009. <div class="header ">保费因素</div>
  1010. <div class="flex a-start f-wrap">
  1011. <div class="Factor-item flex a-c f-c ">
  1012. <span class="item-header flex a-c ">总赔付率</span>
  1013. <span>{{ scope.row.quoteResult?.scoreVo?.lossRation || '--' }}</span>
  1014. </div>
  1015. <div class="Factor-item flex a-c f-c ">
  1016. <span class="item-header flex a-c ">交强赔付率</span>
  1017. <span>{{ scope.row.quoteResult?.scoreVo?.jqLossRation || '--' }}</span>
  1018. </div>
  1019. <div class="Factor-item flex a-c f-c ">
  1020. <span class="item-header flex a-c ">商业赔付率</span>
  1021. <span>{{ scope.row.quoteResult?.scoreVo?.syLossRation || '--' }}</span>
  1022. </div>
  1023. <div class="Factor-item flex a-c f-c ">
  1024. <span class="item-header flex a-c ">类型</span>
  1025. <span>{{ scope.row.quoteResult?.scoreVo?.type || '--' }}</span>
  1026. </div>
  1027. <div class="Factor-item flex a-c f-c ">
  1028. <span class="item-header flex a-c ">交强出险次数</span>
  1029. <span>{{ scope.row.quoteResult?.scoreVo?.ciClaims || '--' }}</span>
  1030. </div>
  1031. <div class="Factor-item flex a-c f-c ">
  1032. <span class="item-header flex a-c ">商业出险次数</span>
  1033. <span>{{ scope.row.quoteResult?.scoreVo?.biClaims || '--' }}</span>
  1034. </div>
  1035. <div class="Factor-item flex a-c f-c ">
  1036. <span class="item-header flex a-c ">交强续保</span>
  1037. <span>{{ scope.row.quoteResult?.scoreVo?.jqRenewal || '--' }}</span>
  1038. </div>
  1039. <div class="Factor-item flex a-c f-c ">
  1040. <span class="item-header flex a-c ">商业续保</span>
  1041. <span>{{ scope.row.quoteResult?.scoreVo?.syRenewal || '--' }}</span>
  1042. </div>
  1043. <div class="Factor-item flex a-c f-c ">
  1044. <span class="item-header flex a-c ">总折扣率</span>
  1045. <span>{{ scope.row.quoteResult?.scoreVo?.totalAdjustRate || '--' }}</span>
  1046. </div>
  1047. <div class="Factor-item flex a-c f-c ">
  1048. <span class="item-header flex a-c ">商业折扣</span>
  1049. <span>{{ scope.row.quoteResult?.scoreVo?.syAdjustRate || '--' }}</span>
  1050. </div>
  1051. <div class="Factor-item flex a-c f-c ">
  1052. <span class="item-header flex a-c ">交强折扣</span>
  1053. <span>{{ scope.row.quoteResult?.scoreVo?.jqAdjustRate || '--' }}</span>
  1054. </div>
  1055. <!-- 各保司定制评分 -->
  1056. <div class="Factor-item flex a-c f-c "
  1057. v-for="(item, index) in scope.row.quoteResult?.scoreVo?.scoreJson" :key="index">
  1058. <span class="item-header flex a-c ">{{ item.scoreName }}</span>
  1059. <span>{{ item.score || '--' }}</span>
  1060. </div>
  1061. </div>
  1062. </div>
  1063. </el-col>
  1064. <el-col :span="12" style="border-left: 1px dashed #eeeeee">
  1065. <p style="text-align: center">优惠信息</p>
  1066. <el-table class="factorTable" :data="scope.row.discounts">
  1067. <el-table-column label="险种" prop="name"></el-table-column>
  1068. <el-table-column label="比例" prop="commissionRatio"></el-table-column>
  1069. <el-table-column label="优惠金额" prop="commissionPremium"></el-table-column>
  1070. <el-table-column label="返还结算比例" prop="exportRatio"></el-table-column>
  1071. <el-table-column label="返还金额" prop="exportPremium"></el-table-column>
  1072. </el-table>
  1073. </el-col>
  1074. </el-row>
  1075. </div>
  1076. </div>
  1077. </template>
  1078. </el-table-column>
  1079. <el-table-column type="selection" width="55" />
  1080. <el-table-column label="保险公司" prop="" align="center" width="200">
  1081. <template #default="scope">
  1082. <div class="company">
  1083. <img :src="scope.row.logo" />
  1084. <span>{{ scope.row.nameSimple }}</span>
  1085. </div>
  1086. <div class="company " style="margin-top: 10px;" v-if="scope.row.underwritingMsg">
  1087. <span style="display: flex; align-items: center; color: #FF4545;"><el-icon class="mr-2">
  1088. <WarningFilled size="14" color="#FF4545" />
  1089. </el-icon>核保失败</span>
  1090. <el-popover title="提示" :width="300" raw-content placement="bottom-end">
  1091. <template #default>
  1092. <span v-html="scope.row.underwritingMsg.replace(/\n/g, '<br>')"></span>
  1093. </template>
  1094. <template #reference>
  1095. <el-button link type="primary">查看详情</el-button>
  1096. </template>
  1097. </el-popover>
  1098. </div>
  1099. </template>
  1100. </el-table-column>
  1101. <el-table-column label="报价协议" prop="" align="center" width="300">
  1102. <template #default="scope">
  1103. <el-select v-model="scope.row.agreement"
  1104. :disabled="!!scope.row.isDispatch || scope.row.agreements?.length == 1"
  1105. v-if="currentRow.some((a: any) => a.id === scope.row.id)"
  1106. :placeholder="scope.row.isDispatch ? '默认' : '请选择'">
  1107. <el-option v-for="item in scope.row.agreements" :value="item.id"
  1108. :label="item.agreementName"></el-option>
  1109. </el-select>
  1110. </template>
  1111. </el-table-column>
  1112. <el-table-column prop="">
  1113. <template #header>
  1114. <div style="">
  1115. <span style="margin-right: 10px">报价结果</span>
  1116. <el-checkbox @change="handleViewSuccess">仅查看报价成功</el-checkbox>
  1117. </div>
  1118. </template>
  1119. <template #default="scope">
  1120. <div class="result" v-if="currentRow.some((a: any) => a.id === scope.row.id) && !scope.row.loading">
  1121. <div class="resultItem">
  1122. <span v-if="scope.row.quoteResult?.costs?.sumPremium">总保费:{{
  1123. scope.row.quoteResult?.costs?.sumPremium }}</span>
  1124. <div class="resultTips" v-if="scope.row.quoteResult?.feeNoDescription" @click="handleOpen(scope)">
  1125. <el-icon size="14" color="#FAA21E">
  1126. <WarningFilled />
  1127. </el-icon>
  1128. <span class="ml-1">未匹配到销管费用,不建议投保</span>
  1129. </div>
  1130. </div>
  1131. <div class="resultItem">
  1132. <span v-if="scope.row.quoteResult?.costs?.ciPremium"
  1133. style="text-align: left; margin-right: 10px">交强:{{ `¥${scope.row.quoteResult?.costs?.ciPremium}`
  1134. }}</span>
  1135. <span v-if="scope.row.quoteResult?.costs?.vvTax" style="text-align: left; margin-right: 10px">车船税:{{
  1136. `¥${scope.row.quoteResult?.costs?.vvTax}` }}</span>
  1137. </div>
  1138. <div class="resultItem">
  1139. <span v-if="scope.row.quoteResult?.costs?.biPremium"
  1140. style="text-align: left; margin-right: 10px">商业险:{{ `¥${scope.row.quoteResult.costs?.biPremium}`
  1141. }}</span>
  1142. <span v-if="scope.row.quoteResult?.costs?.niPremium"
  1143. style="text-align: left; margin-right: 10px">驾意险:{{ `¥${scope.row.quoteResult?.costs?.niPremium}`
  1144. }}</span>
  1145. </div>
  1146. <span class="resultItem"
  1147. v-if="scope.row.quoteResult?.ciRiskInfoVo?.startDate || scope.row.quoteResult?.ciRiskInfoVo?.endDate">
  1148. <span>交强险保险期:{{ `${scope.row.quoteResult?.ciRiskInfoVo?.startDate} 至
  1149. ${scope.row.quoteResult?.ciRiskInfoVo?.endDate}` }}</span>
  1150. </span>
  1151. <span class="resultItem"
  1152. v-if="scope.row.quoteResult?.biRiskInfoVo?.startDate || scope.row.quoteResult?.biRiskInfoVo?.endDate">
  1153. <span>商业险保险期:{{ `${scope.row.quoteResult?.biRiskInfoVo?.startDate} 至
  1154. ${scope.row.quoteResult?.biRiskInfoVo?.endDate}` }}</span>
  1155. </span>
  1156. <div>
  1157. <div class="quoteFail" v-if="scope.row.quoteResult?.failMsg">
  1158. <el-icon style="color: #FF4545; font-size: 14px">
  1159. <Warning />
  1160. </el-icon>&nbsp;&nbsp;{{ scope.row.quoteResult?.failMsg }}
  1161. </div>
  1162. </div>
  1163. </div>
  1164. <!-- loding动效 -->
  1165. <QuoteLoader v-show="scope.row.loading" />
  1166. </template>
  1167. </el-table-column>
  1168. <el-table-column label="操作" align="center" width="360">
  1169. <template #default="scope">
  1170. <div v-if="currentRow.some((a: any) => a.id === scope.row.id)">
  1171. <el-button v-if="scope.row.quoteResult?.code===200" link type="primary"
  1172. @click="handleCount(scope)">优惠测算</el-button>
  1173. <el-button v-if="scope.row.quoteResult?.code===200" link type="primary"
  1174. @click="toDetail(scope.row.quoteResult.ordersNo)">详情</el-button>
  1175. <el-button link type="primary" :loading="scope.row.loading"
  1176. @click="handleSubmit(InsurancePolicyRefs, scope)">计算保费</el-button>
  1177. <el-button v-if="scope.row.quoteResult?.code===200" link type="primary"
  1178. @click="handleShare(scope.row.quoteResult.ordersNo)">分享</el-button>
  1179. <el-button v-if="scope.row.quoteResult?.code===200" link type="primary"
  1180. @click="handleUnderwriting(scope)">核保</el-button>
  1181. </div>
  1182. </template>
  1183. </el-table-column>
  1184. </el-table>
  1185. <template #icon="{ isActive }">
  1186. <div class="icon">
  1187. <span class="icon-ele">
  1188. {{ isActive ? '收起' : '展开' }}
  1189. </span>
  1190. <el-icon v-if="isActive" color="#333">
  1191. <ArrowDownBold />
  1192. </el-icon>
  1193. <el-icon v-else color="#333">
  1194. <ArrowUpBold />
  1195. </el-icon>
  1196. </div>
  1197. </template>
  1198. </el-collapse-item>
  1199. <el-collapse-item name="history">
  1200. <template #title>
  1201. <span class="title">
  1202. 报价历史
  1203. </span>
  1204. </template>
  1205. <el-table :data="tableData" style="width: calc(100% - 48px); margin: 0 24px">
  1206. <el-table-column label="保险公司" prop="companyName"></el-table-column>
  1207. <el-table-column label="报价时间" prop="quoteTime"></el-table-column>
  1208. <el-table-column label="险种" prop="productName"></el-table-column>
  1209. <el-table-column label="状态" prop="orderStatusName">
  1210. <template #default="scope">
  1211. <span v-if="scope.row.orderStatusName == '报价成功'" class="success">报价成功</span>
  1212. <span v-if="scope.row.orderStatus == '6' || scope.row.orderStatus == '7'"
  1213. style="display: flex; align-items: center">
  1214. <span class="fail">{{ scope.row.orderStatusName }}</span>
  1215. <el-tooltip class="box-item" effect="dark" :content="scope.row.errorMessage" placement="bottom">
  1216. <el-icon style="color: #FF4545; font-size: 18px">
  1217. <Warning />
  1218. </el-icon>
  1219. </el-tooltip>
  1220. </span>
  1221. </template>
  1222. </el-table-column>
  1223. <el-table-column label="保费计算" prop="sumPremium"></el-table-column>
  1224. <el-table-column label="交强险" prop="jqPremium"></el-table-column>
  1225. <el-table-column label="商业险" prop="syPremium"></el-table-column>
  1226. <el-table-column label="驾意险" prop="jyPremium"></el-table-column>
  1227. <el-table-column label="操作">
  1228. <template #default="scope">
  1229. <el-button link type="primary" @click="toDetail(scope.row.orderNo)">详情</el-button>
  1230. <el-popover v-if="scope.row.orderStatus === '5'" :width="200" placement="bottom" trigger="click">
  1231. <template #reference>
  1232. <el-button size="small" type="primary" link @click="handleCode(scope.row.orderNo)">分享</el-button>
  1233. </template>
  1234. <div class="popover">
  1235. <img style="display: block; width: 128px; height: 128px; margin: 5px auto;" :src="payCodeUrl">
  1236. <p>使用微信扫码,查看报价单</p>
  1237. <div class="popoverBtns">
  1238. <el-button size="small" type="primary" plain @click="handlePopoverCancel">保存二维码</el-button>
  1239. <el-button size="small" type="primary" plain @click="handlePopoverConfirm">复制链接</el-button>
  1240. </div>
  1241. </div>
  1242. </el-popover>
  1243. <el-button link type="primary" v-if="scope.row.orderStatus === '1'"
  1244. @click="historyhandleUnderwriting(scope.row.orderNo)">核保</el-button>
  1245. <el-button link type="primary" v-if="scope.row.orderStatus === '4'"
  1246. @click="getPayCode(scope.row.orderNo)">支付码</el-button>
  1247. <!-- <el-button link type="primary" v-if="scope.row.orderStatus === '1'" @click="handleImageSave(scope)">上传影像</el-button>-->
  1248. <el-button link type="primary" v-if="scope.row.orderStatus === '7'"
  1249. @click="historyhandleUnderwriting(scope.row.orderNo)">重新核保</el-button>
  1250. </template>
  1251. </el-table-column>
  1252. </el-table>
  1253. <template #icon="{ isActive }">
  1254. <div class="icon">
  1255. <span class="icon-ele">
  1256. {{ isActive ? '收起' : '展开' }}
  1257. </span>
  1258. <el-icon v-if="isActive" color="#333">
  1259. <ArrowDownBold />
  1260. </el-icon>
  1261. <el-icon v-else color="#333">
  1262. <ArrowUpBold />
  1263. </el-icon>
  1264. </div>
  1265. </template>
  1266. </el-collapse-item>
  1267. </el-collapse>
  1268. </el-form>
  1269. <div class="footer">
  1270. <span>已选保司:{{ currentRow.length }}家</span>&nbsp;&nbsp;&nbsp;
  1271. <el-button type="primary" :loading="loading" @click="handleSubmit(InsurancePolicyRefs)">确定</el-button>
  1272. <el-button type="primary" @click="handleNext">录下一单</el-button>
  1273. </div>
  1274. <el-dialog title="选择业务员" v-model="salesmanShow" width="700">
  1275. <salesmanSelect ref="SalesmanSelectRef" @close="handleSalesmanSelect"></salesmanSelect>
  1276. </el-dialog>
  1277. <el-dialog v-model="shareShow" width="300" title="分享">
  1278. <div class="imageCode">
  1279. <img :src="shareImageUrl" />
  1280. </div>
  1281. <template #footer>
  1282. <el-button plain type="primary" @click="handleSaveImage">保存图片</el-button>
  1283. <el-button plain type="primary" @click="handleCopyLink">复制链接</el-button>
  1284. </template>
  1285. </el-dialog>
  1286. <el-dialog title="优惠测算" v-model="calculatingShow" width="600">
  1287. <calculating ref="calculatingRefs"></calculating>
  1288. </el-dialog>
  1289. <el-dialog title="提交核保" width="1100" v-model="underwritingShow">
  1290. <underwriting v-if="underwritingShow" ref="UnderwritingRefs" :insOrderRightsInfoDto="insOrderRightsInfoDto"
  1291. :availableAmount="availableAmount" :recipientInfo="[owerFormInfo, policyHolderInfo, insuredPersonInfo]"
  1292. @close="handleUnderwritingClose"></underwriting>
  1293. </el-dialog>
  1294. <el-dialog title="证件识别" width="800" v-model="imageShow">
  1295. <recognition ref="RecognitionRefs" :option="optionObj.car_type_code" @close="handleImageClose"></recognition>
  1296. </el-dialog>
  1297. <el-dialog v-model="insuranceShow" title="选择险种" width="500">
  1298. <insurance ref="InsuranceTypeRef" @close="handleClose"></insurance>
  1299. </el-dialog>
  1300. <el-dialog v-model="drivingShow" title="选择驾意险" width="700">
  1301. <driving ref="DrivingTypeRef" @close="handleDrivingClose"></driving>
  1302. </el-dialog>
  1303. <el-dialog v-model="licenseNoShow" width="900" title="车型查询">
  1304. <span class="flex a-c mb-2" style="color: #409eff;font-size: 13px;">(单击后确定 或 双击选中车型)</span>
  1305. <el-table ref="LicenseNoTable" :data="licenseNoData" row-key="id" highlight-current-row
  1306. @row-dblclick="handleSelectedRow" @current-change="handleCurrentChange">
  1307. <el-table-column prop="modelCode" label="厂牌型号代码"></el-table-column>
  1308. <el-table-column prop="modelName" label="厂牌型号"></el-table-column>
  1309. <el-table-column prop="replacementValue" label="新车购置价"></el-table-column>
  1310. <el-table-column prop="marketYear" label="年款"></el-table-column>
  1311. <el-table-column prop="ratedPassengerCapacity" label="座位数"></el-table-column>
  1312. <el-table-column prop="displacement" label="排量"></el-table-column>
  1313. <el-table-column prop="vehicleDescription" label="配置"></el-table-column>
  1314. </el-table>
  1315. <div class="footer">
  1316. <el-button plain @click="licenseNoDataCancel">取消</el-button>
  1317. <el-button type="primary" @click="licenseNoDataSubmit">确定</el-button>
  1318. </div>
  1319. </el-dialog>
  1320. <el-dialog v-model="JYXDetailShow" title="驾意险详情" width="600">
  1321. <detail ref="JYXDetail"></detail>
  1322. </el-dialog>
  1323. <el-dialog v-model="specialShow" width="700" title="选择特约">
  1324. <el-table :data="specialTableData" @selection-change="handleSpecialSelectChage">
  1325. <el-table-column type="selection" width="50" align="center"></el-table-column>
  1326. <el-table-column label="特约类型" prop="riskCode" align="center"></el-table-column>
  1327. <el-table-column label="特约名称" prop="clauseName" align="center"></el-table-column>
  1328. <el-table-column label="编码" prop="clauseCode" align="center"></el-table-column>
  1329. <el-table-column label="特别约定内容" prop="clauseContent" width="300" align="center"></el-table-column>
  1330. </el-table>
  1331. <div class="footer">
  1332. <el-button plain type="primary" @click="handleSpecialTableDataCancel">取消</el-button>
  1333. <el-button type="primary" @click="handleSpecialTableDataSubmit">确定</el-button>
  1334. </div>
  1335. </el-dialog>
  1336. <el-dialog v-model="underwritingMsgShow" title="核保信息" width="400">
  1337. <div style="
  1338. font-size: 18px;
  1339. color: #d42426;
  1340. font-weight: 700;
  1341. padding: 10px 30px;
  1342. ">
  1343. 订单状态:已核保待缴费
  1344. </div>
  1345. <template #footer>
  1346. <el-button size="small" type="primary" @click="handleGetPayCode">缴费二维码</el-button>
  1347. </template>
  1348. </el-dialog>
  1349. <el-dialog v-model="payCodeShow" title="支付码" width="400">
  1350. <div style="display: flex; align-items: center; justify-content: center">
  1351. <img style="width: 200px; height: 200px" :src="payCodeSrc" />
  1352. </div>
  1353. <template #footer>
  1354. <el-button size="small" type="primary" @click="handlePayCodeClose">关闭</el-button>
  1355. </template>
  1356. </el-dialog>
  1357. <Equities v-if="equitiesShow" :show="equitiesShow"
  1358. :recipientInfo="[owerFormInfo, policyHolderInfo, insuredPersonInfo]" :availableAmount="availableAmount"
  1359. @cancel="equitiesShow = false" @save="handleEquitiesSave"></Equities>
  1360. </div>
  1361. </template>
  1362. <!-- 保险单页面逻辑脚本 -->
  1363. <script setup lang="ts">
  1364. // 导入Element Plus表单相关类型定义
  1365. import type { FormInstance, FormRules } from 'element-plus'
  1366. // 导入API接口
  1367. import api from "@/api";
  1368. // 导入Element Plus消息提示组件
  1369. import { ElMessage, ElNotification } from "element-plus";
  1370. // 导入Vue Router路由相关函数
  1371. import { useRoute, useRouter } from 'vue-router'
  1372. // 导入子组件
  1373. import underwriting from './modules/underwriting.vue' // 核保模块
  1374. import recognition from './modules/recognition.vue' // 证件识别模块
  1375. import calculating from './modules/calculating.vue' // 优惠测算模块
  1376. import salesmanSelect from '../additionalOrder/additional/modules/salesmanSelect.vue' // 业务员选择模块
  1377. import insurance from "../additionalOrder/additional/modules/insuranceSelect.vue"; // 保险选择模块
  1378. import driving from '../../layouts/components/DrivingType/index.vue' // 驾意险模块
  1379. import detail from '../../layouts/components/JYXDetail/index.vue' // 驾意险详情模块
  1380. import Equities from './modules/Equities.vue' // 驾意险详情模块
  1381. // 导入二维码生成库
  1382. import QRCode from 'qrcode'
  1383. // 导入日期处理库
  1384. import dayjs from "dayjs"
  1385. // 下拉选项接口定义
  1386. interface OptionItem {
  1387. label: string; // 显示标签
  1388. value: string; // 实际值
  1389. checked?: boolean; // 是否选中
  1390. };
  1391. // 车辆信息接口定义
  1392. interface CarInfo {
  1393. ratedPassengerCapacity: number; // 核定载客数
  1394. modelName: string; // 品牌型号
  1395. marketYear: number; // 年款
  1396. replacementValue: number; // 新车购置价
  1397. displacement: number; // 排量
  1398. powerScale: number; // 功率
  1399. };
  1400. // 报价数据项接口定义
  1401. interface QuoteDataItem {
  1402. id: string; // 公司ID
  1403. loading: boolean; // 加载状态
  1404. quoteResult?: any; // 报价结果
  1405. isDispatch?: boolean; // 是否分派
  1406. dispatchAgreementId?: string; // 分派协议ID
  1407. agreement?: string; // 协议
  1408. discounts?: any[]; // 优惠信息
  1409. underwritingMsg?: string; // 核保消息
  1410. specialSelectedList?: any[]; // 特约选择列表
  1411. projectList?: any[]; // 方案列表
  1412. productIndex?: number; // 产品索引
  1413. nameSimple?: string; // 公司简称
  1414. logo?: string; // 公司Logo
  1415. agreements?: any[]; // 协议列表
  1416. insuranceCompanyCode?: string; // 保险公司代码
  1417. };
  1418. // 引用子组件实例
  1419. const RecognitionRefs = ref() // 证件识别组件引用
  1420. const SalesmanSelectRef = ref() // 业务员选择组件引用
  1421. const InsuranceTypeRef = ref() // 保险类型选择组件引用
  1422. const DrivingTypeRef = ref() // 驾意险类型组件引用
  1423. const UnderwritingRefs = ref() // 核保组件引用
  1424. const LicenseNoTable = ref() // 车牌号表格引用
  1425. const JYXDetail = ref() // 驾意险详情引用
  1426. // 路由相关
  1427. const myRoute = useRoute() // 当前路由实例
  1428. const router = useRouter() // 路由器实例
  1429. /**
  1430. * 将日期格式化为 YYYY-MM-DD 格式
  1431. * @param e 事件对象
  1432. * @returns 格式化后的日期字符串
  1433. */
  1434. const changeDate = (e: any) => {
  1435. return dayjs(e.target.value).format('YYYY-MM-DD')
  1436. }
  1437. /**
  1438. * 初始化详情数据
  1439. * 从路由参数获取订单号,请求订单详情并填充表单
  1440. */
  1441. const initDetail = () => {
  1442. // 请求订单详情
  1443. api.insurancePolicyApi.getOrderDetail(myRoute.query.orderNo).then((res: any) => {
  1444. if (res.code == 200) {
  1445. let obj = res.data
  1446. // 设置业务员信息
  1447. insurancePolicyForm.value.salesman = obj?.salesmanInfo?.name
  1448. insurancePolicyForm.value.mobile = obj?.salesmanInfo?.mobile
  1449. insurancePolicyForm.value.deptId = obj?.salesmanInfo?.deptId
  1450. // 设置车辆信息
  1451. insurancePolicyForm.value.isRegistered = obj?.carInfoVo?.isRegistered || '1'
  1452. insurancePolicyForm.value.licenseNo = obj?.carInfoVo?.licenseNo
  1453. insurancePolicyForm.value.vinNo = obj?.carInfoVo?.vinNo
  1454. insurancePolicyForm.value.brandName = obj?.carInfoVo?.brandName
  1455. insurancePolicyForm.value.engineNo = obj?.carInfoVo?.engineNo
  1456. insurancePolicyForm.value.carNatureCode = obj?.carInfoVo?.carNatureCode
  1457. insurancePolicyForm.value.vehicleUseCode = obj?.carInfoVo?.vehicleUseCode
  1458. insurancePolicyForm.value.plateType = obj?.carInfoVo?.carKindCode
  1459. insurancePolicyForm.value.carTypeCode = obj?.carInfoVo?.carTypeCode
  1460. insurancePolicyForm.value.energyTypeCode = obj?.carInfoVo?.energyTypeCode
  1461. insurancePolicyForm.value.registerDate = obj?.carInfoVo?.registerDate
  1462. insurancePolicyForm.value.issueDate = obj?.carInfoVo?.issueDate
  1463. insurancePolicyForm.value.completeKerbMass = obj?.carInfoVo?.completeKerbMass
  1464. insurancePolicyForm.value.limitLoad = obj?.carInfoVo?.limitLoad
  1465. insurancePolicyForm.value.seatCount = obj?.carInfoVo?.seatCount
  1466. insurancePolicyForm.value.carYear = obj?.carInfoVo?.carYear
  1467. insurancePolicyForm.value.purchasePrice = obj?.carInfoVo?.purchasePrice
  1468. insurancePolicyForm.value.displacement = obj?.carInfoVo?.displacement
  1469. insurancePolicyForm.value.powerScale = obj?.carInfoVo?.powerScale
  1470. // 设置车主信息
  1471. insurancePolicyForm.value.name1 = obj?.ownersInfo?.name
  1472. insurancePolicyForm.value.mobile1 = obj?.ownersInfo?.mobile
  1473. insurancePolicyForm.value.identifyType1 = obj?.ownersInfo?.identifyType
  1474. insurancePolicyForm.value.identifyNumber1 = obj?.ownersInfo?.identifyNumber
  1475. insurancePolicyForm.value.identifyValidDate1 = obj?.ownersInfo?.identifyValidDate
  1476. insurancePolicyForm.value.addr1 = obj?.ownersInfo?.addr
  1477. insurancePolicyForm.value.telephone1 = obj?.ownersInfo?.telephone
  1478. insurancePolicyForm.value.person1 = obj?.ownersInfo?.person
  1479. insurancePolicyForm.value.age1 = obj?.ownersInfo?.age
  1480. insurancePolicyForm.value.identifyValidEndDate1 = obj?.ownersInfo?.identifyValidEndDate
  1481. insurancePolicyForm.value.address1 = obj?.ownersInfo?.address
  1482. insurancePolicyForm.value.registeredCapital1 = obj?.ownersInfo?.registeredCapital
  1483. insurancePolicyForm.value.email1 = obj?.ownersInfo?.email
  1484. insurancePolicyForm.value.taxpayerName = obj?.vehicleAndVesselTaxVo?.taxpayerName || obj?.ownersInfo?.name
  1485. insurancePolicyForm.value.taxpayerIdentifier = obj?.vehicleAndVesselTaxVo?.taxpayerIdentifier || obj?.ownersInfo?.identifyType
  1486. insurancePolicyForm.value.identifyNumber = obj?.vehicleAndVesselTaxVo?.identifyNumber || obj?.ownersInfo?.identifyNumber
  1487. // 设置投保人信息
  1488. insurancePolicyForm.value.name2 = obj?.policyHolderInfo?.name
  1489. insurancePolicyForm.value.mobile2 = obj?.policyHolderInfo?.mobile
  1490. insurancePolicyForm.value.identifyType2 = obj?.policyHolderInfo?.identifyType
  1491. insurancePolicyForm.value.identifyNumber2 = obj?.policyHolderInfo?.identifyNumber
  1492. insurancePolicyForm.value.identifyValidDate2 = obj?.policyHolderInfo?.identifyValidDate
  1493. insurancePolicyForm.value.addr2 = obj?.policyHolderInfo?.addr
  1494. insurancePolicyForm.value.telephone2 = obj?.policyHolderInfo?.telephone
  1495. insurancePolicyForm.value.person2 = obj?.policyHolderInfo?.person
  1496. insurancePolicyForm.value.age2 = obj?.policyHolderInfo?.age
  1497. insurancePolicyForm.value.identifyValidEndDate2 = obj?.policyHolderInfo?.identifyValidEndDate
  1498. insurancePolicyForm.value.address2 = obj?.policyHolderInfo?.address
  1499. insurancePolicyForm.value.registeredCapital2 = obj?.policyHolderInfo?.registeredCapital
  1500. insurancePolicyForm.value.email2 = obj?.policyHolderInfo?.email
  1501. // 设置被保人信息
  1502. insurancePolicyForm.value.name3 = obj?.insuredPersonInfo?.name
  1503. insurancePolicyForm.value.mobile3 = obj?.insuredPersonInfo?.mobile
  1504. insurancePolicyForm.value.identifyType3 = obj?.insuredPersonInfo?.identifyType
  1505. insurancePolicyForm.value.identifyNumber3 = obj?.insuredPersonInfo?.identifyNumber
  1506. insurancePolicyForm.value.identifyValidDate3 = obj?.insuredPersonInfo?.identifyValidDate
  1507. insurancePolicyForm.value.addr3 = obj?.insuredPersonInfo?.addr
  1508. insurancePolicyForm.value.telephone3 = obj?.insuredPersonInfo?.telephone
  1509. insurancePolicyForm.value.person3 = obj?.insuredPersonInfo?.person
  1510. insurancePolicyForm.value.age3 = obj?.insuredPersonInfo?.age
  1511. insurancePolicyForm.value.identifyValidEndDate3 = obj?.insuredPersonInfo?.identifyValidEndDate
  1512. insurancePolicyForm.value.address3 = obj?.insuredPersonInfo?.address
  1513. insurancePolicyForm.value.registeredCapital3 = obj?.insuredPersonInfo?.registeredCapital
  1514. insurancePolicyForm.value.email3 = obj?.insuredPersonInfo?.email
  1515. // 重置车主关系选择状态
  1516. btns.value.owner1.forEach(a => {
  1517. a.checked = false
  1518. })
  1519. btns.value.owner2.forEach(a => {
  1520. a.checked = false
  1521. })
  1522. // 判断车主与投保人关系
  1523. if (obj?.ownersInfo?.identifyNumber == obj?.policyHolderInfo?.identifyNumber) {
  1524. btns.value.owner1[0].checked = true
  1525. btns.value.owner1Text = '同车主'
  1526. } else {
  1527. btns.value.owner1[1].checked = true
  1528. btns.value.owner1Text = '其他人'
  1529. }
  1530. // 判断车主、投保人与被保人关系
  1531. if (obj?.ownersInfo?.identifyNumber == obj?.insuredPersonInfo?.identifyNumber) {
  1532. btns.value.owner2[1].checked = true
  1533. btns.value.owner2Text = '同车主'
  1534. } else if (obj?.policyHolderInfo?.identifyNumber == obj?.insuredPersonInfo?.identifyNumber) {
  1535. btns.value.owner2[0].checked = true
  1536. btns.value.owner2Text = '同投保人'
  1537. } else {
  1538. btns.value.owner2[2].checked = true
  1539. btns.value.owner2Text = '其他人'
  1540. }
  1541. // 设置车船税信息
  1542. insurancePolicyForm.value.extendChar2 = obj?.vehicleAndVesselTaxVo?.extendChar2
  1543. insurancePolicyForm.value.relifReason = obj?.vehicleAndVesselTaxVo?.relifReason
  1544. insurancePolicyForm.value.taxComCode = obj?.vehicleAndVesselTaxVo?.taxComCode
  1545. insurancePolicyForm.value.taxComName = obj?.vehicleAndVesselTaxVo?.taxComName
  1546. insurancePolicyForm.value.taxRelief = obj?.vehicleAndVesselTaxVo?.taxRelief
  1547. insurancePolicyForm.value.taxDocumentDate = obj?.vehicleAndVesselTaxVo?.taxDocumentDate
  1548. insurancePolicyForm.value.taxPaidAreaCode = obj?.vehicleAndVesselTaxVo?.taxPaidAreaCode
  1549. // 重置车船税选择状态
  1550. btns.value.owner3.forEach(a => {
  1551. a.checked = false
  1552. })
  1553. // 设置车船税类型
  1554. switch (obj?.vehicleAndVesselTaxVo?.taxRelifFlag) {
  1555. case '1':
  1556. btns.value.owner3[0].checked = true
  1557. btns.value.owner3show = '正常交税'
  1558. break;
  1559. case '2':
  1560. btns.value.owner3[1].checked = true
  1561. btns.value.owner3show = '免税'
  1562. break;
  1563. case '3':
  1564. btns.value.owner3[2].checked = true
  1565. btns.value.owner3show = '减税'
  1566. break;
  1567. case '4':
  1568. btns.value.owner3[3].checked = true
  1569. btns.value.owner3show = '完税'
  1570. break;
  1571. }
  1572. // 设置投保信息
  1573. insurancePolicyForm.value.productId = obj?.order?.productId
  1574. jqWork.value[0].checked = obj?.ciRiskInfoVo?.instantFlag
  1575. insurancePolicyForm.value.JQStartDate = obj?.ciRiskInfoVo?.startDate
  1576. insurancePolicyForm.value.JQEndDate = obj?.ciRiskInfoVo?.endDate
  1577. // 设置保险类型选择状态
  1578. optionObj.value.insuranceType.forEach(a => {
  1579. if (a.value == obj?.order?.productId) {
  1580. a.checked = true
  1581. } else {
  1582. a.checked = false
  1583. }
  1584. })
  1585. // 根据选择的保险类型过滤公司
  1586. let newObj = optionObj.value.insuranceType.find(a => a.checked)
  1587. if (newObj) {
  1588. ruleFilterCompany(newObj)
  1589. }
  1590. syWork.value[0].checked = obj?.biRiskInfoVo?.instantFlag
  1591. insurancePolicyForm.value.SYStartDate = obj?.biRiskInfoVo?.startDate
  1592. insurancePolicyForm.value.SYEndDate = obj?.biRiskInfoVo?.endDate
  1593. insurancePolicyForm.value.imageVoList = obj?.imageVoList
  1594. images.value = obj?.imageVoList.map(v=>({imageType:v.imageCode,fileUrl:v.imageBase64List[0]?.imageBase64Str})) || []
  1595. // 获取报价号
  1596. getQuoteNumber()
  1597. }
  1598. })
  1599. }
  1600. // 业务员选择相关
  1601. let salesmanShow = ref(false) // 控制业务员选择弹窗显示状态
  1602. /**
  1603. * 处理业务员输入框聚焦事件
  1604. * 显示业务员选择弹窗并初始化数据
  1605. */
  1606. const handleFocus = () => {
  1607. salesmanShow.value = true
  1608. nextTick(() => {
  1609. SalesmanSelectRef.value.initEditData()
  1610. })
  1611. }
  1612. /**
  1613. * 处理业务员选择回调
  1614. * @param data 选中的业务员数据
  1615. */
  1616. const handleSalesmanSelect = (data: any) => {
  1617. salesmanShow.value = false
  1618. if (data) {
  1619. // 如果已有业务员信息且选择了险种,则清空报价数据并重新过滤公司
  1620. if (insurancePolicyForm.value.salesman && insurancePolicyForm.value.mobile && insurancePolicyForm.value.deptId && insurancePolicyForm.value.productId) {
  1621. quoteData.value = []
  1622. ruleFilterCompany({
  1623. value: insurancePolicyForm.value.productId
  1624. })
  1625. }
  1626. // 更新业务员信息
  1627. insurancePolicyForm.value.salesman = data.name
  1628. insurancePolicyForm.value.mobile = data.mobile
  1629. insurancePolicyForm.value.deptId = data.deptId
  1630. }
  1631. }
  1632. // 机构归属相关
  1633. let institutionList = ref([]) // 机构列表数据
  1634. const tableProps = ref({
  1635. value: "id", // 选项值字段
  1636. label: "name", // 选项标签字段
  1637. children: "children", // 子级字段
  1638. checkStrictly: true, // 父子节点取消关联
  1639. })
  1640. /**
  1641. * 初始化部门树结构
  1642. * 获取当前登录系统的部门层级结构
  1643. */
  1644. const initDept = () => {
  1645. api.insuranceApi.getDeptTree({ sysCode: localStorage.getItem('login_system') }).then((res: any) => {
  1646. if (res.code == 200) {
  1647. institutionList.value = res.data
  1648. } else {
  1649. ElMessage({
  1650. message: res.msg,
  1651. type: 'warning'
  1652. })
  1653. }
  1654. })
  1655. }
  1656. // 折叠面板默认展开项
  1657. let activeName = ref(['car', 'owner', 'owner1', 'owner2', 'tax', 'insurance', 'company', 'history'])
  1658. // 表单引用
  1659. const InsurancePolicyRefs = ref<FormInstance>()
  1660. // 保险单表单数据
  1661. let insurancePolicyForm = ref({
  1662. systemType: '2', // 系统类型
  1663. propertyCode: '1', // 车辆性质代码
  1664. isRegistered: '1', // 车辆是否上牌 ('1': 是, '2': 否)
  1665. // 业务员信息
  1666. salesman: '', // 业务员姓名
  1667. mobile: '', // 业务员手机号
  1668. deptId: '', // 所属部门ID
  1669. // 车辆信息
  1670. licenseNo: '', // 车牌号
  1671. vinNo: '', // 车架号(VIN)
  1672. brandName: '', // 品牌型号
  1673. engineNo: '', // 发动机号
  1674. carNatureCode: '', // 使用性质代码
  1675. vehicleUseCode: '', // 车辆用途代码
  1676. carTypeCode: '', // 车辆类型代码
  1677. plateType: '', // 车辆种类代码
  1678. energyTypeCode: '', // 能源种类代码
  1679. registerDate: '', // 注册日期
  1680. issueDate: '', // 发证日期
  1681. completeKerbMass: 0, // 整备质量
  1682. limitLoad: 0, // 核定载质量
  1683. seatCount: 0, // 座位数
  1684. carYear: 0, // 年款
  1685. purchasePrice: 0, // 新车购置价
  1686. displacement: 0, // 排量
  1687. powerScale: 0, // 功率
  1688. carOwner: '', // 车主
  1689. transferDate: '', // 转移登记日期
  1690. // 险种类型
  1691. productId: '', // 产品ID
  1692. // 车主信息 (第一方)
  1693. name1: '', // 车主姓名
  1694. mobile1: '', // 车主手机号
  1695. identifyType1: '01', // 车主证件类型 ('01': 身份证, '02': 营业执照)
  1696. identifyNumber1: '', // 车主证件号码
  1697. identifyValidDate1: '', // 车主证件有效期起始
  1698. identifyValidEndDate1: '', // 车主证件有效期截止
  1699. addr1: '', // 车主地址
  1700. telephone1: '', // 车主座机(企业)
  1701. person1: '', // 车主联系人(企业)
  1702. age1: '', // 车主年龄(企业)
  1703. address1: '', // 车主地区(企业)
  1704. registeredCapital1: '', // 车主注册资金(企业)
  1705. email1: '', // 车主邮箱
  1706. personType1: '1', // 车主人类型
  1707. // 投保人信息 (第二方)
  1708. name2: '', // 投保人姓名
  1709. mobile2: '', // 投保人手机号
  1710. identifyType2: '01', // 投保人证件类型
  1711. identifyNumber2: '', // 投保人证件号码
  1712. identifyValidDate2: '', // 投保人证件有效期起始
  1713. identifyValidEndDate2: '', // 投保人证件有效期截止
  1714. addr2: '', // 投保人地址
  1715. telephone2: '', // 投保人座机(企业)
  1716. person2: '', // 投保人联系人(企业)
  1717. age2: '', // 投保人年龄(企业)
  1718. address2: '', // 投保人地区(企业)
  1719. registeredCapital2: '', // 投保人注册资金(企业)
  1720. email2: '', // 投保人邮箱
  1721. personType2: '1', // 投保人人类型
  1722. // 被保人信息 (第三方)
  1723. name3: '', // 被保人姓名
  1724. mobile3: '', // 被保人手机号
  1725. identifyType3: '01', // 被保人证件类型
  1726. identifyNumber3: '', // 被保人证件号码
  1727. identifyValidDate3: '', // 被保人证件有效期起始
  1728. identifyValidEndDate3: '', // 被保人证件有效期截止
  1729. addr3: '', // 被保人地址
  1730. telephone3: '', // 被保人座机(企业)
  1731. person3: '', // 被保人联系人(企业)
  1732. age3: '', // 被保人年龄(企业)
  1733. address3: '', // 被保人地区(企业)
  1734. registeredCapital3: '', // 被保人注册资金(企业)
  1735. email3: '', // 被保人邮箱
  1736. personType3: '1', // 被保人人类型
  1737. // 订单信息
  1738. order: {
  1739. quoteNo: '', // 报价单号
  1740. insuranceCompanyCode: '' // 保险公司代码
  1741. },
  1742. // 车船税信息
  1743. taxRelifFlag: '1', // 车船税减免标志 ('1': 正常交税, '2': 免税, '3': 减税, '4': 完税)
  1744. extendChar2: '', // 车船税扩展字符2
  1745. relifReason: '', // 减免税原因
  1746. taxComCode: '', // 税务公司代码
  1747. taxComName: '', // 税务公司名称
  1748. taxRelief: '', // 税务减免信息
  1749. taxDocumentDate: '', // 税务凭证日期
  1750. taxPaidAreaCode: '', // 已缴税地区代码
  1751. taxpayerName: '', // 纳税人姓名
  1752. taxpayerIdentifier: '', // 纳税人证件类型
  1753. identifyNumber: '', // 纳税人证件号码
  1754. // 交强险信息
  1755. JQRiskCode: '0507', // 交强险代码
  1756. JQStartDate: '', // 交强险起始日期
  1757. JQEndDate: '', // 交强险结束日期
  1758. JQInstantFlag: false, // 交强险即时生效标志
  1759. // 商业险信息
  1760. SYRiskCode: '0507', // 商业险代码
  1761. SYStartDate: '', // 商业险起始日期
  1762. SYEndDate: '', // 商业险结束日期
  1763. SYInstantFlag: false, // 商业险即时生效标志
  1764. // 其他标记
  1765. transfer: false, // 转移标记
  1766. biTransfer: false, // 商业险转移标记
  1767. secondHandCar: false, // 二手车标记
  1768. imageVoList: [] // 影像资料列表
  1769. })
  1770. // 保险单表单验证规则
  1771. let insurancePolicyRules = ref<FormRules>({
  1772. isRegistered: [
  1773. { required: true, trigger: 'change', message: '请选择车辆是否上牌' },
  1774. ],
  1775. licenseNo: [
  1776. { required: true, trigger: 'blur', message: '请输入车牌' },
  1777. {
  1778. pattern: /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-HJ-NP-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/,
  1779. message: '请填写正确的车牌号',
  1780. trigger: 'blur'
  1781. }
  1782. ],
  1783. vinNo: [
  1784. { required: true, trigger: 'blur', message: '请输入车辆识别代码' },
  1785. {
  1786. pattern: /^(?=.*[a-z])(?=.*\d).+$/i,
  1787. message: '请填写正确的车牌识别代码',
  1788. trigger: 'blur'
  1789. }
  1790. ],
  1791. brandName: [
  1792. { required: true, trigger: 'blur', message: '请输入品牌型号' },
  1793. ],
  1794. engineNo: [
  1795. { required: true, trigger: 'blur', message: '请输入发动机号' },
  1796. ],
  1797. carNatureCode: [
  1798. { required: true, trigger: 'change', message: '请选择车辆是否上牌' },
  1799. ],
  1800. vehicleUseCode: [
  1801. { required: true, trigger: 'change', message: '请选择车辆是否上牌' },
  1802. ],
  1803. carTypeCode: [
  1804. { required: true, trigger: 'change', message: '请选择车辆是否上牌' },
  1805. ],
  1806. plateType: [
  1807. { required: true, trigger: 'change', message: '请选择车辆类型' },
  1808. ],
  1809. energyTypeCode: [
  1810. { required: true, trigger: 'change', message: '请选择能源种类' },
  1811. ],
  1812. registerDate: [
  1813. { required: true, trigger: 'change', message: '请选择注册日期' },
  1814. ],
  1815. issueDate: [
  1816. { required: true, trigger: 'change', message: '请选择发证日期' },
  1817. ],
  1818. completeKerbMass: [
  1819. { required: true, trigger: 'blur', message: '请输入整备质量' }
  1820. ],
  1821. // limitLoad: [
  1822. // { required: true, trigger: 'blur', message: '请输入核定载质量' }
  1823. // ],
  1824. seatCount: [
  1825. { required: true, trigger: 'blur', message: '请输入座位数' }
  1826. ],
  1827. // carYear: [
  1828. // { required: true, trigger: 'blur', message: '请输入年款' }
  1829. // ],
  1830. purchasePrice: [
  1831. { required: true, trigger: 'blur', message: '请输入新车购置价' }
  1832. ],
  1833. displacement: [
  1834. { required: true, trigger: 'blur', message: '请输入排量' }
  1835. ],
  1836. powerScale: [
  1837. { required: true, trigger: 'blur', message: '请输入功率' }
  1838. ],
  1839. transferDate: [
  1840. { required: true, trigger: 'change', message: '请选择转移登记日期' },
  1841. ],
  1842. name1: [
  1843. { required: true, trigger: 'blur', message: '请输入姓名' }
  1844. ],
  1845. mobile1: [
  1846. { required: true, trigger: 'blur', message: '请输入手机号' },
  1847. {
  1848. pattern: /^1[0-9]{10}$/,
  1849. message: '请填写正确的手机号',
  1850. trigger: 'blur'
  1851. }
  1852. ],
  1853. personType1: [
  1854. { required: true, trigger: 'change', message: '请选择证件类型' }
  1855. ],
  1856. identifyNumber1: [
  1857. { required: true, trigger: 'blur', message: '请输入证件号' },
  1858. {
  1859. pattern: /^[A-Z0-9]+$/i,
  1860. message: '请填写正确的证件号',
  1861. trigger: 'blur'
  1862. }
  1863. ],
  1864. identifyValidDate1: [
  1865. { required: true, trigger: 'change', message: '请选择有效期起期' }
  1866. ],
  1867. identifyValidEndDate1: [
  1868. { required: true, trigger: 'change', message: '请选择有效期止期' }
  1869. ],
  1870. addr1: [
  1871. { required: true, trigger: 'blur', message: '请输入地址' }
  1872. ],
  1873. name2: [
  1874. { required: true, trigger: 'blur', message: '请输入姓名' }
  1875. ],
  1876. mobile2: [
  1877. { required: true, trigger: 'blur', message: '请输入手机号' },
  1878. {
  1879. pattern: /^1[0-9]{10}$/,
  1880. message: '请填写正确的手机号',
  1881. trigger: 'blur'
  1882. }
  1883. ],
  1884. personType2: [
  1885. { required: true, trigger: 'change', message: '请选择证件类型' }
  1886. ],
  1887. identifyNumber2: [
  1888. { required: true, trigger: 'blur', message: '请输入证件号' },
  1889. {
  1890. pattern: /^[A-Z0-9]+$/i,
  1891. message: '请填写正确的证件号',
  1892. trigger: 'blur'
  1893. }
  1894. ],
  1895. identifyValidDate2: [
  1896. { required: true, trigger: 'change', message: '请选择有效期起期' }
  1897. ],
  1898. identifyValidEndDate2: [
  1899. { required: true, trigger: 'change', message: '请选择有效期止期' }
  1900. ],
  1901. addr2: [
  1902. { required: true, trigger: 'blur', message: '请输入地址' }
  1903. ],
  1904. name3: [
  1905. { required: true, trigger: 'blur', message: '请输入姓名' }
  1906. ],
  1907. mobile3: [
  1908. { required: true, trigger: 'blur', message: '请输入手机号' },
  1909. {
  1910. pattern: /^1[0-9]{10}$/,
  1911. message: '请填写正确的手机号',
  1912. trigger: 'blur'
  1913. }
  1914. ],
  1915. personType3: [
  1916. { required: true, trigger: 'change', message: '请选择证件类型' }
  1917. ],
  1918. identifyNumber3: [
  1919. { required: true, trigger: 'blur', message: '请输入证件号' },
  1920. {
  1921. pattern: /^[A-Z0-9]+$/i,
  1922. message: '请填写正确的证件号',
  1923. trigger: 'blur'
  1924. }
  1925. ],
  1926. identifyValidDate3: [
  1927. { required: true, trigger: 'change', message: '请选择有效期起期' }
  1928. ],
  1929. identifyValidEndDate3: [
  1930. { required: true, trigger: 'change', message: '请选择有效期止期' }
  1931. ],
  1932. addr3: [
  1933. { required: true, trigger: 'blur', message: '请输入地址' }
  1934. ],
  1935. extendChar2: [
  1936. { required: true, trigger: 'blur', message: '请输入' },
  1937. ],
  1938. relifReason: [
  1939. { required: true, trigger: 'blur', message: '请输入' }
  1940. ],
  1941. taxComCode: [
  1942. { required: true, trigger: 'blur', message: '请输入' }
  1943. ],
  1944. taxComName: [
  1945. { required: true, trigger: 'blur', message: '请输入' }
  1946. ],
  1947. taxRelief: [
  1948. { required: true, trigger: 'blur', message: '请输入' }
  1949. ],
  1950. taxDocumentDate: [
  1951. { required: true, trigger: 'change', message: '请选择' }
  1952. ],
  1953. taxPaidAreaCode: [
  1954. { required: true, trigger: 'change', message: '请选择' }
  1955. ]
  1956. })
  1957. // 使用性质,车辆用途,车辆类型,能源种类,车辆种类
  1958. let optionObj = ref({
  1959. vehicle_use_code: [] as OptionItem[], // 车辆用途
  1960. car_nature_code: [] as OptionItem[], // 使用性质
  1961. energy_type_code: [] as OptionItem[], // 能源种类
  1962. car_kind_code: [] as OptionItem[], // 车辆种类
  1963. vehicleType: [] as OptionItem[],
  1964. taxpayerIdentifier: [] as OptionItem[], // 证件类型
  1965. insuranceType: [] as OptionItem[], // 险种类型
  1966. car_type_code: [] as OptionItem[], // 车辆类型
  1967. })
  1968. // 地区
  1969. const areaOptins = ref([]);
  1970. const areaProps = ref({
  1971. value: "areaCode",
  1972. label: "areaCname",
  1973. children: "child",
  1974. });
  1975. const getAreaList = () => {
  1976. api.areaApi.areaList({}).then((res) => {
  1977. areaOptins.value = res.data;
  1978. });
  1979. };
  1980. // 车牌识别
  1981. let licenseNoShow = ref(false)
  1982. let licenseNoData = ref([])//
  1983. const handleCarNumber = () => {
  1984. api.additionalApi.vinSearch(insurancePolicyForm.value.vinNo).then((res: any) => {
  1985. if (res.code == 200) {
  1986. licenseNoShow.value = true
  1987. licenseNoData.value = res.data
  1988. } else {
  1989. ElMessage({
  1990. message: res.msg,
  1991. type: 'warning'
  1992. })
  1993. }
  1994. })
  1995. }
  1996. let selectRowData = ref<CarInfo | {}>({})
  1997. // 车型双击事件
  1998. const handleSelectedRow = (row: any, column: any) => {
  1999. selectRowData.value = row
  2000. licenseNoDataSubmit()
  2001. }
  2002. // 车型选中事件
  2003. const handleCurrentChange = (row: any) => {
  2004. selectRowData.value = row
  2005. }
  2006. const licenseNoDataCancel = () => {
  2007. selectRowData.value = {}
  2008. licenseNoShow.value = false
  2009. }
  2010. const licenseNoDataSubmit = () => {
  2011. console.log(selectRowData.value)
  2012. if (selectRowData.value && 'ratedPassengerCapacity' in selectRowData.value) {
  2013. const carData = selectRowData.value as CarInfo;
  2014. insurancePolicyForm.value.seatCount = carData.ratedPassengerCapacity
  2015. insurancePolicyForm.value.brandName = carData.modelName
  2016. insurancePolicyForm.value.carYear = carData.marketYear
  2017. insurancePolicyForm.value.purchasePrice = carData.replacementValue
  2018. insurancePolicyForm.value.displacement = carData.displacement
  2019. insurancePolicyForm.value.powerScale = carData.powerScale
  2020. licenseNoShow.value = false
  2021. } else {
  2022. ElMessage({
  2023. message: '请选择车型',
  2024. type: 'warning'
  2025. })
  2026. }
  2027. }
  2028. // 车架号识别
  2029. const handleCarCode = () => {
  2030. api.additionalApi.licenseSearch({
  2031. modelName: insurancePolicyForm.value.brandName.replace(/[^u4e00-u9fa5|,]+/gi, "")
  2032. }).then((res: any) => {
  2033. if (res.code == 200) {
  2034. licenseNoShow.value = true
  2035. licenseNoData.value = res.data
  2036. } else {
  2037. ElMessage({
  2038. message: res.msg,
  2039. type: 'warning'
  2040. })
  2041. }
  2042. })
  2043. }
  2044. // 大写转换
  2045. const upperCaseType = (type: 'licenseNo' | 'vinNo' | 'engineNo' | 'brandName') => {
  2046. const value = insurancePolicyForm.value[type];
  2047. if (typeof value === 'string') {
  2048. insurancePolicyForm.value[type] = value.toUpperCase();
  2049. }
  2050. }
  2051. // 获取报价号
  2052. const getQuoteNumber = () => {
  2053. if (insurancePolicyForm.value.licenseNo && insurancePolicyForm.value.vinNo && insurancePolicyForm.value.engineNo) {
  2054. api.insurancePolicyApi.getQuoteNo({
  2055. licenseNo: insurancePolicyForm.value.licenseNo,
  2056. vinNo: insurancePolicyForm.value.vinNo,
  2057. engineNo: insurancePolicyForm.value.engineNo
  2058. }).then((res: any) => {
  2059. if (res.code == 200) {
  2060. // insuranceCompanyCode
  2061. insurancePolicyForm.value.order.quoteNo = res.msg
  2062. } else {
  2063. ElMessage({
  2064. message: res.msg,
  2065. type: "warning"
  2066. })
  2067. }
  2068. })
  2069. }
  2070. if (insurancePolicyForm.value.licenseNo) {
  2071. api.insurancePolicyApi.getHistoryQuoteList({
  2072. licenseNo: insurancePolicyForm.value.licenseNo,
  2073. pages: 1,
  2074. size: 999
  2075. }).then((res: any) => {
  2076. if (res.code === 200) {
  2077. tableData.value = res.data.records
  2078. } else {
  2079. ElMessage({
  2080. message: res.msg,
  2081. type: 'warning'
  2082. })
  2083. }
  2084. })
  2085. }
  2086. }
  2087. const longTime = () => {
  2088. insurancePolicyForm.value.identifyValidEndDate1 = '9999-12-31'
  2089. }
  2090. const issueDateChange = (e: any) => {
  2091. insurancePolicyForm.value.transferDate = insurancePolicyForm.value.issueDate
  2092. }
  2093. // 是否同车主/同投保人
  2094. let btns = ref({
  2095. owner1Show: true,
  2096. owner2show: true,
  2097. owner1Text: '同车主',
  2098. owner2Text: '同投保人',
  2099. owner3show: '正常交税',
  2100. owner1: [{
  2101. text: '同车主',
  2102. checked: true
  2103. }, {
  2104. text: '其他人',
  2105. checked: false
  2106. },],
  2107. owner2: [{
  2108. text: '同投保人',
  2109. checked: true
  2110. }, {
  2111. text: '同车主',
  2112. checked: false
  2113. }, {
  2114. text: '其他人',
  2115. checked: false
  2116. }],
  2117. owner3: [{
  2118. text: '正常交税',
  2119. checked: true
  2120. }, {
  2121. text: '免税',
  2122. checked: false
  2123. }, {
  2124. text: '减税',
  2125. checked: false
  2126. }, {
  2127. text: '完税',
  2128. checked: false
  2129. }],
  2130. })
  2131. const handleChange = (item: any, type: any) => {
  2132. switch (type) {
  2133. case 'owner1':
  2134. item.checked = !item.checked
  2135. let list1 = btns.value.owner1.filter(a => a.text != item.text)
  2136. list1.forEach(a => a.checked = false)
  2137. btns.value.owner1Show = btns.value.owner1.some(a => a.checked)
  2138. let obj1 = btns.value.owner1.find(a => a.checked)
  2139. if (obj1) {
  2140. btns.value.owner1Text = obj1.text
  2141. if (obj1.text === '同车主') {
  2142. insurancePolicyForm.value.name2 = insurancePolicyForm.value.name1
  2143. insurancePolicyForm.value.mobile2 = insurancePolicyForm.value.mobile1
  2144. insurancePolicyForm.value.identifyType2 = insurancePolicyForm.value.identifyType1
  2145. insurancePolicyForm.value.identifyNumber2 = insurancePolicyForm.value.identifyNumber1
  2146. insurancePolicyForm.value.identifyValidDate2 = insurancePolicyForm.value.identifyValidDate1
  2147. insurancePolicyForm.value.identifyValidEndDate2 = insurancePolicyForm.value.identifyValidEndDate1
  2148. insurancePolicyForm.value.addr2 = insurancePolicyForm.value.addr1
  2149. insurancePolicyForm.value.telephone2 = insurancePolicyForm.value.telephone1
  2150. insurancePolicyForm.value.person2 = insurancePolicyForm.value.person1
  2151. insurancePolicyForm.value.age2 = insurancePolicyForm.value.age1
  2152. insurancePolicyForm.value.address2 = insurancePolicyForm.value.address1
  2153. insurancePolicyForm.value.registeredCapital2 = insurancePolicyForm.value.registeredCapital1
  2154. insurancePolicyForm.value.email2 = insurancePolicyForm.value.email1
  2155. }
  2156. }
  2157. break;
  2158. case 'owner2':
  2159. item.checked = !item.checked
  2160. let list2 = btns.value.owner2.filter(a => a.text != item.text)
  2161. list2.forEach(a => a.checked = false)
  2162. btns.value.owner2show = btns.value.owner2.some(a => a.checked)
  2163. let obj2 = btns.value.owner2.find(a => a.checked)
  2164. if (obj2) {
  2165. btns.value.owner2Text = obj2.text
  2166. if (obj2.text === '同车主') {
  2167. insurancePolicyForm.value.name3 = insurancePolicyForm.value.name1
  2168. insurancePolicyForm.value.mobile3 = insurancePolicyForm.value.mobile1
  2169. insurancePolicyForm.value.identifyType3 = insurancePolicyForm.value.identifyType1
  2170. insurancePolicyForm.value.identifyNumber3 = insurancePolicyForm.value.identifyNumber1
  2171. insurancePolicyForm.value.identifyValidDate3 = insurancePolicyForm.value.identifyValidDate1
  2172. insurancePolicyForm.value.identifyValidEndDate3 = insurancePolicyForm.value.identifyValidEndDate1
  2173. insurancePolicyForm.value.addr3 = insurancePolicyForm.value.addr1
  2174. insurancePolicyForm.value.telephone3 = insurancePolicyForm.value.telephone1
  2175. insurancePolicyForm.value.person3 = insurancePolicyForm.value.person1
  2176. insurancePolicyForm.value.age3 = insurancePolicyForm.value.age1
  2177. insurancePolicyForm.value.address3 = insurancePolicyForm.value.address1
  2178. insurancePolicyForm.value.registeredCapital3 = insurancePolicyForm.value.registeredCapital1
  2179. insurancePolicyForm.value.email3 = insurancePolicyForm.value.email1
  2180. }
  2181. if (obj2.text === '同投保人') {
  2182. insurancePolicyForm.value.name3 = insurancePolicyForm.value.name2
  2183. insurancePolicyForm.value.mobile3 = insurancePolicyForm.value.mobile2
  2184. insurancePolicyForm.value.identifyType3 = insurancePolicyForm.value.identifyType2
  2185. insurancePolicyForm.value.identifyNumber3 = insurancePolicyForm.value.identifyNumber2
  2186. insurancePolicyForm.value.identifyValidDate3 = insurancePolicyForm.value.identifyValidDate2
  2187. insurancePolicyForm.value.identifyValidEndDate3 = insurancePolicyForm.value.identifyValidEndDate2
  2188. insurancePolicyForm.value.addr3 = insurancePolicyForm.value.addr2
  2189. insurancePolicyForm.value.telephone3 = insurancePolicyForm.value.telephone2
  2190. insurancePolicyForm.value.person3 = insurancePolicyForm.value.person2
  2191. insurancePolicyForm.value.age3 = insurancePolicyForm.value.age2
  2192. insurancePolicyForm.value.address3 = insurancePolicyForm.value.address2
  2193. insurancePolicyForm.value.registeredCapital3 = insurancePolicyForm.value.registeredCapital2
  2194. insurancePolicyForm.value.email3 = insurancePolicyForm.value.email2
  2195. }
  2196. }
  2197. break;
  2198. case 'owner3':
  2199. item.checked = true
  2200. let list3 = btns.value.owner3.filter(a => a.text != item.text)
  2201. list3.forEach(a => a.checked = false)
  2202. let obj3 = btns.value.owner3.find(a => a.checked)
  2203. if (obj3) {
  2204. btns.value.owner3show = obj3.text
  2205. insurancePolicyForm.value.taxRelifFlag = btns.value.owner3show === '正常交税' ? '1' : btns.value.owner3show === '免税' ? '2' : btns.value.owner3show === '减税' ? '3' : btns.value.owner3show === '完税' ? '4' : ''
  2206. }
  2207. break;
  2208. case 'insurance':
  2209. ruleFilterCompany(item)
  2210. let list4 = optionObj.value.insuranceType.filter(a => a.label != item.label)
  2211. list4.forEach(a => a.checked = false)
  2212. item.checked = true
  2213. insurancePolicyForm.value.productId = item.value
  2214. if (insurancePolicyForm.value.productId === '0330' || insurancePolicyForm.value.productId === '0330034001' || insurancePolicyForm.value.productId === '0330034002') {
  2215. // let date = new Date()
  2216. // let year = date.getFullYear()
  2217. // let month = date.getMonth() + 1<10?`0${date.getMonth() + 1}`:date.getMonth() + 1
  2218. // let day = date.getDate() + 1< 10?`0${date.getDate() + 1}`:date.getDate() + 1
  2219. insurancePolicyForm.value.JQStartDate = transformTime1()
  2220. insurancePolicyForm.value.JQEndDate = oneYearPast1(insurancePolicyForm.value.JQStartDate)
  2221. }
  2222. if (insurancePolicyForm.value.productId === '034001' || insurancePolicyForm.value.productId === '034002' || insurancePolicyForm.value.productId === '0330034001' || insurancePolicyForm.value.productId === '0330034002') {
  2223. // let date = new Date()
  2224. // let year = date.getFullYear()
  2225. // let month = date.getMonth() + 1<10?`0${date.getMonth() + 1}`:date.getMonth() + 1
  2226. // let day = date.getDate() + 1< 10?`0${date.getDate() + 1}`:date.getDate() + 1
  2227. // insurancePolicyForm.value.SYStartDate = `${year}-${month}-${day} 00:00:00`
  2228. // insurancePolicyForm.value.SYEndDate = `${year + 1}-${month}-${day - 1} 23:59:59`
  2229. insurancePolicyForm.value.SYStartDate = transformTime1()
  2230. insurancePolicyForm.value.SYEndDate = oneYearPast1(insurancePolicyForm.value.SYStartDate)
  2231. }
  2232. break;
  2233. }
  2234. }
  2235. const initOption = () => {
  2236. let list: Array<'vehicle_use_code' | 'car_nature_code' | 'energy_type_code' | 'car_kind_code' | 'car_type_code'> = ['vehicle_use_code', 'car_nature_code', 'energy_type_code', 'car_kind_code', 'car_type_code']
  2237. list.forEach(item => {
  2238. api.additionalApi.dictDetails(item).then((res: any) => {
  2239. if (res.code == 200) {
  2240. if (res.data) {
  2241. optionObj.value[item] = res.data
  2242. }
  2243. }
  2244. })
  2245. })
  2246. api.commonApi.personInfo('insurance_type').then((res: any) => {
  2247. if (res.code == 200) {
  2248. if (res.data && res.data.length > 0) {
  2249. res.data.forEach((a: any) => {
  2250. a.checked = false
  2251. })
  2252. optionObj.value.insuranceType = res.data
  2253. }
  2254. } else {
  2255. ElMessage({
  2256. message: res.msg,
  2257. type: 'warning'
  2258. })
  2259. }
  2260. })
  2261. }
  2262. // 交强即时生效
  2263. let jqWork = ref([
  2264. { text: '即时生效', checked: false }
  2265. ])
  2266. // 根据身份证号换算年龄
  2267. const getAgeByIdCard = (idCard: any, type?: any) => {
  2268. //获取用户身份证号码
  2269. const userCard = idCard
  2270. //如果用户身份证号码为undefined则返回空
  2271. if (!userCard) {
  2272. return ''
  2273. }
  2274. // 获取出生日期
  2275. const yearBirth = userCard.substring(6, 10)
  2276. const monthBirth = userCard.substring(10, 12)
  2277. const dayBirth = userCard.substring(12, 14)
  2278. // 获取当前年月日并计算年龄
  2279. const myDate = new Date()
  2280. const monthNow = myDate.getMonth() + 1
  2281. const dayNow = myDate.getDate()
  2282. let age = myDate.getFullYear() - yearBirth
  2283. if (monthNow > monthBirth || (monthNow == monthBirth && dayNow > dayBirth)) {
  2284. age++
  2285. }
  2286. // type.age = age
  2287. return age
  2288. }
  2289. const noeYearPast = (time: any) => {
  2290. let strYear: any = time.getFullYear();
  2291. let strDay: any = time.getDate();
  2292. let strMonth: any = time.getMonth() + 1;
  2293. let hh: any = time.getHours();
  2294. let minutes: any = time.getMinutes(); // 分
  2295. let Seconds: any = time.getSeconds();
  2296. if (hh < 10) {
  2297. hh = "0" + hh;
  2298. }
  2299. if (minutes < 10) {
  2300. minutes = "0" + minutes;
  2301. }
  2302. if (Seconds < 10) {
  2303. Seconds = "0" + Seconds;
  2304. }
  2305. if (strMonth < 10) {
  2306. strMonth = "0" + strMonth;
  2307. }
  2308. if (strDay < 10) {
  2309. strDay = "0" + strDay;
  2310. }
  2311. let datastr =
  2312. strYear +
  2313. "-" +
  2314. strMonth +
  2315. "-" +
  2316. strDay +
  2317. " " +
  2318. hh +
  2319. ":" +
  2320. minutes +
  2321. ":" +
  2322. Seconds;
  2323. return datastr;
  2324. }
  2325. const oneYearPast1 = (time: any) => {
  2326. //明年减一秒
  2327. let date = new Date(time);
  2328. date.setSeconds(date.getSeconds() - 1);
  2329. date.setFullYear(date.getFullYear() + 1); //一年后
  2330. date.setTime(date.getTime()); //一年后的前一天
  2331. let strYear: any = date.getFullYear();
  2332. let strDay: any = date.getDate();
  2333. let strMonth: any = date.getMonth() + 1;
  2334. let hh: any = date.getHours();
  2335. let minutes: any = date.getMinutes(); // 分
  2336. let Seconds: any = date.getSeconds();
  2337. if (hh < 10) {
  2338. hh = "0" + hh;
  2339. }
  2340. if (minutes < 10) {
  2341. minutes = "0" + minutes;
  2342. }
  2343. if (Seconds < 10) {
  2344. Seconds = "0" + Seconds;
  2345. }
  2346. if (strMonth < 10) {
  2347. strMonth = "0" + strMonth;
  2348. }
  2349. if (strDay < 10) {
  2350. strDay = "0" + strDay;
  2351. }
  2352. let datastr =
  2353. strYear +
  2354. "-" +
  2355. strMonth +
  2356. "-" +
  2357. strDay +
  2358. " " +
  2359. hh +
  2360. ":" +
  2361. minutes +
  2362. ":" +
  2363. Seconds;
  2364. return datastr;
  2365. }
  2366. //当前日期的次日
  2367. const transformTime1 = () => {
  2368. let date = new Date();
  2369. date.setFullYear(date.getFullYear());
  2370. date.setTime(date.getTime() + 24 * 60 * 60 * 1000);
  2371. let strYear: any = date.getFullYear();
  2372. let strDay: any = date.getDate();
  2373. let strMonth: any = date.getMonth() + 1;
  2374. let hh: any = date.getHours();
  2375. if (hh < 10) {
  2376. hh = "0" + hh;
  2377. }
  2378. if (strMonth < 10) {
  2379. strMonth = "0" + strMonth;
  2380. }
  2381. if (strDay < 10) {
  2382. strDay = "0" + strDay;
  2383. }
  2384. let datastr = strYear + "-" + strMonth + "-" + strDay + " " + "00:00:00";
  2385. return datastr;
  2386. }
  2387. const JQChange = (item: any) => {
  2388. item.checked = !item.checked
  2389. if (jqWork.value.some(a => a.checked)) {
  2390. let date: any = new Date();
  2391. date.setHours(date.getHours() + 2);
  2392. date.setMinutes(0);
  2393. date.setSeconds(0);
  2394. insurancePolicyForm.value.JQStartDate = noeYearPast(date)
  2395. insurancePolicyForm.value.JQEndDate = oneYearPast1(date)
  2396. insurancePolicyForm.value.JQInstantFlag = true
  2397. } else {
  2398. insurancePolicyForm.value.JQStartDate = transformTime1()
  2399. insurancePolicyForm.value.JQEndDate = oneYearPast1(insurancePolicyForm.value.JQStartDate)
  2400. insurancePolicyForm.value.JQInstantFlag = false
  2401. }
  2402. }
  2403. const jqChange = (e: any) => {
  2404. insurancePolicyForm.value.JQEndDate = oneYearPast1(e)
  2405. }
  2406. // 日期限制函数
  2407. const disabledDate = (time: any) => {
  2408. const today = new Date();
  2409. today.setHours(0, 0, 0, 0);
  2410. const thirtyDaysLater = new Date();
  2411. thirtyDaysLater.setDate(today.getDate() + 30);
  2412. thirtyDaysLater.setHours(23, 59, 59, 999);
  2413. return time.getTime() < today.getTime() || time.getTime() > thirtyDaysLater.getTime();
  2414. };
  2415. // 商业即时生效
  2416. let syWork = ref([
  2417. { text: '即时生效', checked: false }
  2418. ])
  2419. const SYChange = (item: any) => {
  2420. item.checked = !item.checked
  2421. if (syWork.value.some(a => a.checked)) {
  2422. let date: any = new Date();
  2423. date.setHours(date.getHours() + 2);
  2424. date.setMinutes(0);
  2425. date.setSeconds(0);
  2426. insurancePolicyForm.value.SYStartDate = noeYearPast(date)
  2427. insurancePolicyForm.value.SYEndDate = oneYearPast1(date)
  2428. insurancePolicyForm.value.SYInstantFlag = true
  2429. } else {
  2430. insurancePolicyForm.value.SYStartDate = transformTime1()
  2431. insurancePolicyForm.value.SYEndDate = oneYearPast1(insurancePolicyForm.value.SYStartDate)
  2432. insurancePolicyForm.value.SYInstantFlag = false
  2433. }
  2434. }
  2435. const syChange = (e: any) => {
  2436. insurancePolicyForm.value.SYEndDate = oneYearPast1(e)
  2437. }
  2438. // 报价公司
  2439. let currentRow = ref([])
  2440. let quoteData = ref<QuoteDataItem[]>([])
  2441. // 选择权益
  2442. let equitiesShow = ref(false)//权益弹窗是否显示
  2443. const availableAmount = ref(1700)//可选金额
  2444. const insOrderRightsInfoDto = ref<any>({})//权益信息
  2445. const handleOpenEquities = (row: string) => {
  2446. console.log(row)
  2447. equitiesShow.value = true
  2448. // api.insurancePolicyApi.getOrderDetail(row).then((res: any) => {
  2449. // if (res.code == '200') {
  2450. // availableAmount.value = res.data?.insFeeOrders.availableAmount || 0
  2451. // }
  2452. // })
  2453. }
  2454. // 保存权益
  2455. const handleEquitiesSave = (data: any) => {
  2456. insOrderRightsInfoDto.value = data
  2457. console.log(insOrderRightsInfoDto.value)
  2458. equitiesShow.value = false
  2459. }
  2460. const handleSelect = (a: any, b: any) => {
  2461. currentRow.value = a
  2462. // currentRow.value = a
  2463. // insurancePolicyForm.value.order.insuranceCompanyCode = a[0].id
  2464. }
  2465. const handelSelectRow = (a: any, b: any) => {
  2466. currentRow.value = a
  2467. if (a.some((c: any) => c.id === b.id)) {
  2468. insurancePolicyForm.value.order.insuranceCompanyCode = b.id
  2469. if (insurancePolicyForm.value.productId) {
  2470. api.insurancePolicyApi.getSchemeResult({
  2471. companyId: b.id,
  2472. productId: insurancePolicyForm.value.productId
  2473. }).then((res: any) => {
  2474. let list = res.data?.schemes || [];
  2475. if (res.data?.optionalScheme) {
  2476. list.push(res.data.optionalScheme)
  2477. console.log(123123123, list)
  2478. }
  2479. if (list.length > 0) {
  2480. list.forEach((item: any) => {
  2481. item.checked = false
  2482. })
  2483. }
  2484. quoteData.value.forEach((item: any) => {
  2485. item.productIndex = 0
  2486. if (item.id === b.id) {
  2487. item.projectList = list.map((item: any) => {
  2488. return {
  2489. ...item,
  2490. rescue: [],
  2491. detection: [],
  2492. driver: [],
  2493. inspect: []
  2494. }
  2495. })
  2496. }
  2497. })
  2498. })
  2499. }
  2500. } else {
  2501. insurancePolicyForm.value.order.insuranceCompanyCode = ''
  2502. }
  2503. }
  2504. const handelExpend = (e: any) => {
  2505. insurancePolicyForm.value.order.insuranceCompanyCode = e.id
  2506. if (insurancePolicyForm.value.productId) {
  2507. api.insurancePolicyApi.getSchemeResult({
  2508. companyId: e.id,
  2509. productId: insurancePolicyForm.value.productId
  2510. }).then((res: any) => {
  2511. let list = res.data?.schemes || [];
  2512. if (res.data?.optionalScheme) {
  2513. list.push(res.data.optionalScheme)
  2514. console.log(123123123, list)
  2515. }
  2516. if (list.length > 0) {
  2517. list.forEach((item: any) => {
  2518. item.checked = false
  2519. })
  2520. }
  2521. quoteData.value.forEach((item: any) => {
  2522. item.productIndex = 0
  2523. if (item.id === e.id) {
  2524. item.projectList = list.map((item: any) => {
  2525. return {
  2526. ...item,
  2527. rescue: [],
  2528. detection: [],
  2529. driver: [],
  2530. inspect: []
  2531. }
  2532. })
  2533. }
  2534. })
  2535. })
  2536. }
  2537. }
  2538. const handleClickRow = (a: any, b: any) => {
  2539. }
  2540. const handleViewSuccess = (e: any) => {
  2541. console.log(11111, quoteData.value)
  2542. }
  2543. // 选择险种
  2544. let insuranceShow = ref(false)
  2545. const handlePopover = (scope: any) => {
  2546. insuranceShow.value = true
  2547. nextTick(() => {
  2548. InsuranceTypeRef.value.initEditData(scope.row.projectList[scope.row.productIndex].kinds)
  2549. })
  2550. }
  2551. // 删除险种
  2552. const handleInsuranceDel = (scope: any, props: any) => {
  2553. let obj = scope.row.projectList[scope.row.productIndex].kinds.filter((a: any) => a.id != props.row.id)
  2554. quoteData.value.forEach((a: any) => {
  2555. if (a.id === scope.row.id) {
  2556. a.projectList[scope.row.productIndex].kinds = obj
  2557. }
  2558. })
  2559. }
  2560. const handleClose = (data: any) => {
  2561. insuranceShow.value = false
  2562. if (data && data.list.length > 0) {
  2563. data.list.forEach((item: any) => {
  2564. let obj = item.options.find((b: any) => b.checked)
  2565. item.amount = obj.value
  2566. item.unitAmount = obj.value
  2567. })
  2568. }
  2569. quoteData.value.forEach((a: any) => {
  2570. if (insurancePolicyForm.value.order.insuranceCompanyCode === a.id) {
  2571. a.projectList[a.productIndex].kinds = data.list
  2572. }
  2573. })
  2574. }
  2575. // 选择驾意险
  2576. let drivingShow = ref(false)
  2577. let drivingRow = ref(0)
  2578. let JYXDetailShow = ref(false)
  2579. const handleDriving = (scope: any) => {
  2580. drivingRow.value = scope.$index
  2581. drivingShow.value = true
  2582. nextTick(() => {
  2583. DrivingTypeRef.value.initEditData(scope.row.projectList[scope.row.productIndex].drivings, 0, insurancePolicyForm.value.order.insuranceCompanyCode)
  2584. })
  2585. }
  2586. // 删除驾意险
  2587. const handleDrivingDel = (scope: any, props: any) => {
  2588. let obj = scope.row.projectList[scope.row.productIndex].drivings.filter((a: any) => a.id != props.row.id)
  2589. quoteData.value.forEach((a: any) => {
  2590. if (a.id === scope.row.id) {
  2591. a.projectList[scope.row.productIndex].drivings = obj
  2592. }
  2593. })
  2594. }
  2595. // 驾意险详情
  2596. const getJYXDetail = (row: any) => {
  2597. JYXDetailShow.value = true
  2598. nextTick(() => {
  2599. JYXDetail.value.initData(row.id)
  2600. })
  2601. }
  2602. const handleDrivingClose = (data: any) => {
  2603. if (data && data.list.length > 0) {
  2604. data.list.forEach((a: any) => {
  2605. a.quantity = 1
  2606. })
  2607. const quoteItem = quoteData.value[drivingRow.value]
  2608. if (quoteItem && quoteItem.projectList && quoteItem.productIndex !== undefined) {
  2609. const project = quoteItem.projectList[quoteItem.productIndex]
  2610. if (project) {
  2611. project.drivings = [...data.list]
  2612. }
  2613. }
  2614. }
  2615. drivingShow.value = false
  2616. }
  2617. // 选择特约
  2618. let specialIndex = ref(-1)
  2619. let specialShow = ref(false)
  2620. let specialTableData = ref([])
  2621. let specialSelectList = ref<any[]>([])
  2622. const handleSelectSpecial = (scope: any) => {
  2623. specialIndex.value = scope.$index
  2624. specialShow.value = true
  2625. api.insurancePolicyApi.getClausePage({
  2626. pages: 1,
  2627. size: 99999,
  2628. companyId: scope.row.id,//id
  2629. clauseName: "",//特约名称
  2630. riskCode: "",//特约类型
  2631. clauseCode: "",//特约编码
  2632. clauseContent: "",//特约内容
  2633. }).then((res: any) => {
  2634. if (res.code == 200) {
  2635. specialTableData.value = res.data.records
  2636. }
  2637. })
  2638. }
  2639. const handleSpecialSelectChage = (a: any) => {
  2640. specialSelectList.value = [...a]
  2641. }
  2642. const handleSpecialTableDataCancel = () => {
  2643. specialSelectList.value = []
  2644. specialShow.value = false
  2645. }
  2646. const handleSpecialTableDataSubmit = () => {
  2647. if (specialSelectList.value.length > 0) {
  2648. quoteData.value[specialIndex.value].specialSelectedList = [...specialSelectList.value]
  2649. specialShow.value = false
  2650. } else {
  2651. ElMessage({
  2652. message: '请选择特约!',
  2653. type: 'warning'
  2654. })
  2655. }
  2656. }
  2657. // 优惠信息
  2658. let discounts = ref([])
  2659. let productIndex = ref(0)
  2660. const handleProduct = (scope: any, e: any, index: any) => {
  2661. scope.row.productIndex = index
  2662. }
  2663. // 报价历史
  2664. let tableData = ref([])
  2665. // 分享
  2666. let shareShow = ref(false)
  2667. let shareImageUrl = ref('')
  2668. const handleShare = async (scope: any) => {
  2669. shareImageUrl.value = await QRCode.toDataURL(`http://test-tennat.baoxianzhanggui.com/h5/#/pages/quote/paymentCode?ordersNo=${scope}`, {
  2670. width: 150,
  2671. margin: 2
  2672. });
  2673. console.log(shareImageUrl.value)
  2674. shareShow.value = true
  2675. }
  2676. const handleSaveImage = () => {
  2677. shareShow.value = false
  2678. const link = document.createElement('a');
  2679. link.href = shareImageUrl.value;
  2680. link.download = '报价.png';
  2681. link.click();
  2682. }
  2683. const handleCopyLink = async () => {
  2684. shareShow.value = false
  2685. try {
  2686. await navigator.clipboard.writeText('你想要复制的文本');
  2687. ElMessage({
  2688. message: '复制成功!',
  2689. type: 'success'
  2690. })
  2691. } catch (err) {
  2692. ElMessage({
  2693. message: '复制失败!',
  2694. type: 'error'
  2695. })
  2696. }
  2697. }
  2698. // 优惠测算
  2699. let calculatingShow = ref(false)
  2700. const handleCount = (scope: any) => {
  2701. calculatingShow.value = true
  2702. }
  2703. // 详情
  2704. const toDetail = (scope: any) => {
  2705. console.log(scope)
  2706. router.push({
  2707. path: '/insurancePolicy/order/insurancePolicyOrderDetail',
  2708. query: {
  2709. orderNo: scope
  2710. }
  2711. })
  2712. }
  2713. // 上传影像
  2714. const handleImageSave = (scope: any) => {
  2715. let list = images.value.filter((a: any) => a.checked)
  2716. if (list.length > 0) {
  2717. let arr = list.map((a: any) => {
  2718. return {
  2719. imageCode: a.imageType,
  2720. imageBase64List: [
  2721. {
  2722. imageId: a.imageId
  2723. }
  2724. ]
  2725. }
  2726. })
  2727. api.insurancePolicyApi.imageSave({
  2728. order: {
  2729. quoteNo: insurancePolicyForm.value.order.quoteNo
  2730. },
  2731. imageVoList: arr
  2732. }).then((res: any) => {
  2733. if (res.code == 200) {
  2734. ElMessage({
  2735. message: '上传成功!',
  2736. type: 'success'
  2737. })
  2738. }
  2739. })
  2740. } else {
  2741. ElMessage({
  2742. message: '请选择影像资料!',
  2743. type: 'warning'
  2744. })
  2745. }
  2746. }
  2747. //支付码
  2748. const getPayCode = (orderNo: any) => {
  2749. api.insurancePolicyApi.getQrCode(orderNo).then((res: any) => {
  2750. if (res.code == 200) {
  2751. payCodeUrl.value = res.data?.qrcode
  2752. } else {
  2753. payCodeUrl.value = ''
  2754. ElMessage({
  2755. message: res.msg,
  2756. type: 'warning'
  2757. })
  2758. }
  2759. })
  2760. }
  2761. //分享
  2762. let qrImageUrl = ref('')
  2763. let payCodeUrl = ref('')
  2764. const handleCode = async (orderNo: any) => {
  2765. api.insurancePolicyApi.getQrCode(orderNo).then((res: any) => {
  2766. if (res.code == 200) {
  2767. payCodeUrl.value = res.data?.qrcode
  2768. qrImageUrl.value = QRCode.toDataURL(payCodeUrl.value, {
  2769. width: 150,
  2770. margin: 2
  2771. });
  2772. } else {
  2773. payCodeUrl.value = ''
  2774. ElMessage({
  2775. message: res.msg,
  2776. type: 'warning'
  2777. })
  2778. }
  2779. })
  2780. }
  2781. const handlePopoverCancel = async () => {
  2782. const link = document.createElement('a');
  2783. link.href = qrImageUrl.value;
  2784. link.download = 'qrcode.png';
  2785. link.click();
  2786. }
  2787. const handlePopoverConfirm = async () => {
  2788. try {
  2789. await navigator.clipboard.writeText('你想要复制的文本');
  2790. ElMessage({
  2791. message: '复制成功!',
  2792. type: 'success'
  2793. })
  2794. } catch (err) {
  2795. ElMessage({
  2796. message: '复制失败!',
  2797. type: 'error'
  2798. })
  2799. }
  2800. }
  2801. // 提交核保
  2802. let underwritingShow = ref(false)
  2803. let underwritingIndex = ref(-1)
  2804. const handleUnderwriting = (scope: any) => {
  2805. underwritingShow.value = true
  2806. underwritingIndex.value = scope.$index
  2807. // insurancePolicyForm.value.imageVoList
  2808. let data = {
  2809. // ordersNo: '1915570359429222400'
  2810. order:{
  2811. ordersNo: scope.row.quoteResult.ordersNo,
  2812. quoteNo: insurancePolicyForm.value.order.quoteNo,
  2813. },
  2814. imageVoList: insurancePolicyForm.value.imageVoList,
  2815. list: images.value
  2816. }
  2817. nextTick(() => {
  2818. UnderwritingRefs.value.initEdit(data)
  2819. })
  2820. api.insurancePolicyApi.imagesUpload(data).then((res: any) => {
  2821. if (res.code === 200) {
  2822. } else {
  2823. ElMessage({
  2824. message: res.msg,
  2825. type: 'warning'
  2826. })
  2827. }
  2828. })
  2829. }
  2830. const historyhandleUnderwriting = (ordersNo:String) => {
  2831. underwritingShow.value = true
  2832. let data = {
  2833. order:{
  2834. ordersNo,
  2835. quoteNo: insurancePolicyForm.value.order.quoteNo,
  2836. },
  2837. imageVoList: insurancePolicyForm.value.imageVoList,
  2838. list: images.value
  2839. }
  2840. nextTick(() => {
  2841. UnderwritingRefs.value.initEdit(data)
  2842. })
  2843. api.insurancePolicyApi.imagesUpload(data).then((res: any) => {
  2844. if (res.code === 200) {
  2845. } else {
  2846. ElMessage({
  2847. message: res.msg,
  2848. type: 'warning'
  2849. })
  2850. }
  2851. })
  2852. }
  2853. let underwritingMsgShow = ref(false)
  2854. const handleUnderwritingClose = (bool: any, dataObj: any) => {
  2855. if (dataObj) {
  2856. insOrderRightsInfoDto.value.length = dataObj.equitiesData;
  2857. insOrderRightsInfoDto.value.totalPriceCount = dataObj.totalPriceCount;
  2858. }
  2859. underwritingShow.value = false
  2860. if (bool.code == 200) {
  2861. ElMessage({
  2862. message: bool.msg,
  2863. type: 'success'
  2864. })
  2865. if(underwritingIndex.value>=0) quoteData.value[underwritingIndex.value].underwritingMsg = "";
  2866. underwritingMsgShow.value = true
  2867. } else {
  2868. ElMessage({
  2869. message: bool.msg,
  2870. type: 'error'
  2871. })
  2872. if(underwritingIndex.value>=0) quoteData.value[underwritingIndex.value].underwritingMsg = bool.msg
  2873. }
  2874. }
  2875. let payCodeShow = ref(false)
  2876. let payCodeSrc = ref('')
  2877. const handleGetPayCode = () => {
  2878. api.insurancePolicyApi.getQrCode(
  2879. quoteData.value[underwritingIndex.value]?.quoteResult.ordersNo
  2880. ).then((res: any) => {
  2881. if (res.code == 200) {
  2882. srcChange(res.data?.qrcode)
  2883. payCodeShow.value = true
  2884. } else {
  2885. payCodeSrc.value = ''
  2886. ElMessage({
  2887. message: res.msg,
  2888. type: 'warning'
  2889. })
  2890. }
  2891. })
  2892. }
  2893. const srcChange = async (url: any) => {
  2894. payCodeSrc.value = await QRCode.toDataURL(url, {
  2895. width: 150,
  2896. margin: 2
  2897. });
  2898. }
  2899. const handlePayCodeClose = () => {
  2900. payCodeSrc.value = ''
  2901. payCodeShow.value = false
  2902. }
  2903. const owerFormInfo = ref<any>({})
  2904. const policyHolderInfo = ref<any>({})
  2905. const insuredPersonInfo = ref<any>({})
  2906. // 证件识别
  2907. let imageShow = ref(false)
  2908. let images = ref([])
  2909. const handleImageClose = (data: any) => {
  2910. btns.value.owner1.forEach((a: any) => {
  2911. a.checked = false
  2912. })
  2913. btns.value.owner2.forEach((a: any) => {
  2914. a.checked = false
  2915. })
  2916. imageShow.value = false
  2917. images.value = []
  2918. if (data) {
  2919. const { carForm, owerForm, ower1Form, ower2Form, imageVoList, list } = data
  2920. if (carForm) {
  2921. insurancePolicyForm.value.isRegistered = '1'
  2922. insurancePolicyForm.value.licenseNo = carForm.licenseNo || hadWritedData.value.licenseNo
  2923. insurancePolicyForm.value.vinNo = carForm.vinNo || hadWritedData.value.vinNo
  2924. insurancePolicyForm.value.brandName = carForm.brandName || hadWritedData.value.brandName
  2925. insurancePolicyForm.value.engineNo = carForm.engineNo || hadWritedData.value.engineNo
  2926. insurancePolicyForm.value.carNatureCode = carForm.carNatureCode || hadWritedData.value.carNatureCode
  2927. insurancePolicyForm.value.vehicleUseCode = carForm.vehicleUseCode || hadWritedData.value.vehicleUseCode
  2928. insurancePolicyForm.value.carTypeCode = carForm.carTypeCode || hadWritedData.value.carTypeCode
  2929. insurancePolicyForm.value.plateType = carForm.plateType || hadWritedData.value.plateType
  2930. insurancePolicyForm.value.energyTypeCode = carForm.energyTypeCode || hadWritedData.value.energyTypeCode || insurancePolicyForm.value.licenseNo.length == 7 ? '0' : insurancePolicyForm.value.licenseNo.length == 8 ? '1' : ''
  2931. insurancePolicyForm.value.registerDate = carForm.registerDate || hadWritedData.value.registerDate
  2932. insurancePolicyForm.value.issueDate = carForm.issueDate || hadWritedData.value.issueDate
  2933. insurancePolicyForm.value.completeKerbMass = carForm.completeKerbMass || hadWritedData.value.completeKerbMass
  2934. insurancePolicyForm.value.limitLoad = carForm.limitLoad || hadWritedData.value.limitLoad
  2935. insurancePolicyForm.value.seatCount = carForm.seatCount || hadWritedData.value.seatCount
  2936. insurancePolicyForm.value.carYear = carForm.carYear || hadWritedData.value.carYear
  2937. insurancePolicyForm.value.purchasePrice = carForm.purchasePrice || hadWritedData.value.purchasePrice
  2938. insurancePolicyForm.value.displacement = carForm.displacement || hadWritedData.value.displacement
  2939. insurancePolicyForm.value.powerScale = carForm.powerScale || hadWritedData.value.powerScale
  2940. insurancePolicyForm.value.carOwner = carForm.carOwner || hadWritedData.value.carOwner
  2941. if (carForm.licenseNo && carForm.vinNo && carForm.engineNo) {
  2942. getQuoteNumber()
  2943. }
  2944. }
  2945. if (owerForm) {
  2946. insurancePolicyForm.value.name1 = owerForm.name || hadWritedData.value.name1
  2947. insurancePolicyForm.value.mobile1 = owerForm.mobile || hadWritedData.value.mobile1
  2948. insurancePolicyForm.value.identifyType1 = owerForm.identifyType || hadWritedData.value.identifyType1
  2949. insurancePolicyForm.value.identifyNumber1 = owerForm.identifyNumber || hadWritedData.value.identifyNumber1
  2950. insurancePolicyForm.value.identifyValidDate1 = owerForm.identifyValidDate || hadWritedData.value.identifyValidDate1
  2951. insurancePolicyForm.value.identifyValidEndDate1 = owerForm.identifyValidEndDate || hadWritedData.value.identifyValidEndDate1
  2952. insurancePolicyForm.value.addr1 = owerForm.addr || hadWritedData.value.addr1
  2953. insurancePolicyForm.value.telephone1 = owerForm.telephone || hadWritedData.value.telephone1
  2954. insurancePolicyForm.value.person1 = owerForm.person || hadWritedData.value.person1
  2955. insurancePolicyForm.value.age1 = owerForm.age || hadWritedData.value.age1
  2956. insurancePolicyForm.value.address1 = owerForm.address || hadWritedData.value.address1
  2957. insurancePolicyForm.value.registeredCapital1 = owerForm.registeredCapital || hadWritedData.value.registeredCapital1
  2958. insurancePolicyForm.value.email1 = owerForm.email || hadWritedData.value.email1
  2959. insurancePolicyForm.value.taxpayerName = owerForm.name || hadWritedData.value.taxpayerName
  2960. insurancePolicyForm.value.taxpayerIdentifier = owerForm.identifyType || hadWritedData.value.taxpayerIdentifier
  2961. insurancePolicyForm.value.identifyNumber = owerForm.identifyNumber || hadWritedData.value.identifyNumber
  2962. }
  2963. if (ower1Form) {
  2964. insurancePolicyForm.value.name2 = ower1Form.name || hadWritedData.value.name2
  2965. insurancePolicyForm.value.mobile2 = ower1Form.mobile || hadWritedData.value.mobile2
  2966. insurancePolicyForm.value.identifyType2 = ower1Form.identifyType || hadWritedData.value.identifyType2
  2967. insurancePolicyForm.value.identifyNumber2 = ower1Form.identifyNumber || hadWritedData.value.identifyNumber2
  2968. insurancePolicyForm.value.identifyValidDate2 = ower1Form.identifyValidDate || hadWritedData.value.identifyValidDate2
  2969. insurancePolicyForm.value.identifyValidEndDate2 = ower1Form.identifyValidEndDate || hadWritedData.value.identifyValidEndDate2
  2970. insurancePolicyForm.value.addr2 = ower1Form.addr || hadWritedData.value.addr2
  2971. insurancePolicyForm.value.telephone2 = ower1Form.telephone || hadWritedData.value.telephone2
  2972. insurancePolicyForm.value.person2 = ower1Form.person || hadWritedData.value.person2
  2973. insurancePolicyForm.value.age2 = ower1Form.age || hadWritedData.value.age2
  2974. insurancePolicyForm.value.address2 = ower1Form.address || hadWritedData.value.address2
  2975. insurancePolicyForm.value.registeredCapital2 = ower1Form.registeredCapital || hadWritedData.value.registeredCapital2
  2976. insurancePolicyForm.value.email2 = ower1Form.email || hadWritedData.value.email2
  2977. if (!insurancePolicyForm.value.identifyNumber2 || insurancePolicyForm.value.identifyNumber2 && insurancePolicyForm.value.identifyNumber1 == insurancePolicyForm.value.identifyNumber2) {
  2978. btns.value.owner1[0].checked = true
  2979. btns.value.owner1Text = '同车主'
  2980. } else if (insurancePolicyForm.value.identifyNumber2 && insurancePolicyForm.value.identifyNumber1 != insurancePolicyForm.value.identifyNumber2) {
  2981. btns.value.owner1[1].checked = true
  2982. btns.value.owner1Text = '其他人'
  2983. }
  2984. }
  2985. if (ower2Form) {
  2986. insurancePolicyForm.value.name3 = ower2Form.name || hadWritedData.value.name3
  2987. insurancePolicyForm.value.mobile3 = ower2Form.mobile || hadWritedData.value.mobile3
  2988. insurancePolicyForm.value.identifyType3 = ower2Form.identifyType || hadWritedData.value.identifyType3
  2989. insurancePolicyForm.value.identifyNumber3 = ower2Form.identifyNumber || hadWritedData.value.identifyNumber3
  2990. insurancePolicyForm.value.identifyValidDate3 = ower2Form.identifyValidDate || hadWritedData.value.identifyValidDate3
  2991. insurancePolicyForm.value.identifyValidEndDate3 = ower2Form.identifyValidEndDate || hadWritedData.value.identifyValidEndDate3
  2992. insurancePolicyForm.value.addr3 = ower2Form.addr || hadWritedData.value.addr3
  2993. insurancePolicyForm.value.telephone3 = ower2Form.telephone || hadWritedData.value.telephone3
  2994. insurancePolicyForm.value.person3 = ower2Form.person || hadWritedData.value.person3
  2995. insurancePolicyForm.value.age3 = ower2Form.age || hadWritedData.value.age3
  2996. insurancePolicyForm.value.address3 = ower2Form.address || hadWritedData.value.address3
  2997. insurancePolicyForm.value.registeredCapital3 = ower2Form.registeredCapital || hadWritedData.value.registeredCapital3
  2998. insurancePolicyForm.value.email3 = ower2Form.email || hadWritedData.value.email3
  2999. if (insurancePolicyForm.value.identifyNumber3 && insurancePolicyForm.value.identifyNumber1 == insurancePolicyForm.value.identifyNumber3) {
  3000. btns.value.owner2[1].checked = true
  3001. btns.value.owner2Text = '同车主'
  3002. } else if (!insurancePolicyForm.value.identifyNumber3 || insurancePolicyForm.value.identifyNumber3 && insurancePolicyForm.value.identifyNumber2 == insurancePolicyForm.value.identifyNumber3) {
  3003. btns.value.owner2[0].checked = true
  3004. btns.value.owner2Text = '同投保人'
  3005. } else if (insurancePolicyForm.value.identifyNumber3 && insurancePolicyForm.value.identifyNumber2 != insurancePolicyForm.value.identifyNumber3) {
  3006. btns.value.owner2[2].checked = true
  3007. btns.value.owner2Text = '其他人'
  3008. }
  3009. }
  3010. if (imageVoList && imageVoList.length > 0) {
  3011. insurancePolicyForm.value.imageVoList = imageVoList.filter((a: any) => a.imageBase64List[0].imageId)
  3012. }
  3013. if (list && list.length > 0) {
  3014. images.value = list
  3015. }
  3016. }
  3017. }
  3018. // 记录已填好的信息,防止再次进行证件识别
  3019. let hadWritedData = ref<Partial<typeof insurancePolicyForm.value>>({})
  3020. const handleRecognition = (achor: any) => {
  3021. imageShow.value = true
  3022. hadWritedData.value = JSON.parse(JSON.stringify(insurancePolicyForm.value))
  3023. nextTick(() => {
  3024. RecognitionRefs.value.setAnchor(achor)
  3025. })
  3026. }
  3027. // 提交相关
  3028. let loading = ref(false) // 提交加载状态
  3029. /**
  3030. * 处理保险单提交
  3031. * 验证表单数据并提交给后端
  3032. * @param InsurancePolicyRefs 表单引用实例
  3033. * @param scope 当前行作用域
  3034. */
  3035. const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined, scope: any) => {
  3036. // 检查货车是否填写核定载质量
  3037. if (insurancePolicyForm.value.plateType == 'A1') {
  3038. if (!insurancePolicyForm.value.limitLoad) {
  3039. ElMessage({
  3040. message: '车辆种类为货车时,核定载质量必传!',
  3041. type: 'warning'
  3042. })
  3043. return
  3044. }
  3045. }
  3046. if (!InsurancePolicyRefs) {
  3047. InsurancePolicyRefs?.resetFields()
  3048. return
  3049. }
  3050. await InsurancePolicyRefs.validate((valid: any) => {
  3051. if (valid) {
  3052. // 设置当前报价项的加载状态
  3053. quoteData.value[scope.$index].loading = true
  3054. let arr = [], brr = [], crr = [] // 分别存储险种、驾意险、特约信息
  3055. // 获取当前选中公司的报价方案
  3056. if (quoteData.value.length > 0) {
  3057. let obj = quoteData.value.find((a: QuoteDataItem) => a.id === insurancePolicyForm.value.order.insuranceCompanyCode)
  3058. if (obj && obj.projectList && obj.productIndex !== undefined) {
  3059. // 收集险种信息
  3060. obj.projectList[obj.productIndex].kinds?.forEach((a: any) => {
  3061. arr.push(a)
  3062. })
  3063. // 收集驾意险信息
  3064. obj.projectList[obj.productIndex].drivings?.forEach((a: any) => {
  3065. brr.push(a)
  3066. })
  3067. }
  3068. // 收集特约信息
  3069. if (obj?.specialSelectedList && obj.specialSelectedList.length > 0) {
  3070. obj.specialSelectedList.forEach((a: any) => {
  3071. crr.push(a)
  3072. })
  3073. }
  3074. // obj.projectList?.forEach((sub:any) => {
  3075. // sub.kinds?.forEach((max:any) => {
  3076. // arr.push(max)
  3077. // })
  3078. // sub.drivings?.forEach((max:any) => {
  3079. // brr.push(max)
  3080. // })
  3081. // })
  3082. }
  3083. // 处理车主与投保人关系
  3084. let obj1 = btns.value.owner1.find((a: any) => a.checked)
  3085. btns.value.owner1Text = obj1.text
  3086. if (obj1.text === '同车主') {
  3087. // 如果选择"同车主",则将投保人信息设为车主信息
  3088. insurancePolicyForm.value.name2 = insurancePolicyForm.value.name1
  3089. insurancePolicyForm.value.mobile2 = insurancePolicyForm.value.mobile1
  3090. insurancePolicyForm.value.identifyType2 = insurancePolicyForm.value.identifyType1
  3091. insurancePolicyForm.value.identifyNumber2 = insurancePolicyForm.value.identifyNumber1
  3092. insurancePolicyForm.value.identifyValidDate2 = insurancePolicyForm.value.identifyValidDate1
  3093. insurancePolicyForm.value.identifyValidEndDate2 = insurancePolicyForm.value.identifyValidEndDate1
  3094. insurancePolicyForm.value.addr2 = insurancePolicyForm.value.addr1
  3095. insurancePolicyForm.value.telephone2 = insurancePolicyForm.value.telephone1
  3096. insurancePolicyForm.value.person2 = insurancePolicyForm.value.person1
  3097. insurancePolicyForm.value.age2 = insurancePolicyForm.value.age1
  3098. insurancePolicyForm.value.address2 = insurancePolicyForm.value.address1
  3099. insurancePolicyForm.value.registeredCapital2 = insurancePolicyForm.value.registeredCapital1
  3100. insurancePolicyForm.value.email2 = insurancePolicyForm.value.email1
  3101. }
  3102. // 处理投保人与被保人关系
  3103. let obj2 = btns.value.owner2.find((a: any) => a.checked)
  3104. btns.value.owner2Text = obj2.text
  3105. if (obj2.text === '同车主') {
  3106. // 如果被保人选择"同车主",则将被保人信息设为车主信息
  3107. insurancePolicyForm.value.name3 = insurancePolicyForm.value.name1
  3108. insurancePolicyForm.value.mobile3 = insurancePolicyForm.value.mobile1
  3109. insurancePolicyForm.value.identifyType3 = insurancePolicyForm.value.identifyType1
  3110. insurancePolicyForm.value.identifyNumber3 = insurancePolicyForm.value.identifyNumber1
  3111. insurancePolicyForm.value.identifyValidDate3 = insurancePolicyForm.value.identifyValidDate1
  3112. insurancePolicyForm.value.identifyValidEndDate3 = insurancePolicyForm.value.identifyValidEndDate1
  3113. insurancePolicyForm.value.addr3 = insurancePolicyForm.value.addr1
  3114. insurancePolicyForm.value.telephone3 = insurancePolicyForm.value.telephone1
  3115. insurancePolicyForm.value.person3 = insurancePolicyForm.value.person1
  3116. insurancePolicyForm.value.age3 = insurancePolicyForm.value.age1
  3117. insurancePolicyForm.value.address3 = insurancePolicyForm.value.address1
  3118. insurancePolicyForm.value.registeredCapital3 = insurancePolicyForm.value.registeredCapital1
  3119. insurancePolicyForm.value.email3 = insurancePolicyForm.value.email1
  3120. }
  3121. if (obj2.text === '同投保人') {
  3122. // 如果被保人选择"同投保人",则将被保人信息设为投保人信息
  3123. insurancePolicyForm.value.name3 = insurancePolicyForm.value.name2
  3124. insurancePolicyForm.value.mobile3 = insurancePolicyForm.value.mobile2
  3125. insurancePolicyForm.value.identifyType3 = insurancePolicyForm.value.identifyType2
  3126. insurancePolicyForm.value.identifyNumber3 = insurancePolicyForm.value.identifyNumber2
  3127. insurancePolicyForm.value.identifyValidDate3 = insurancePolicyForm.value.identifyValidDate2
  3128. insurancePolicyForm.value.identifyValidEndDate3 = insurancePolicyForm.value.identifyValidEndDate2
  3129. insurancePolicyForm.value.addr3 = insurancePolicyForm.value.addr2
  3130. insurancePolicyForm.value.telephone3 = insurancePolicyForm.value.telephone2
  3131. insurancePolicyForm.value.person3 = insurancePolicyForm.value.person2
  3132. insurancePolicyForm.value.age3 = insurancePolicyForm.value.age2
  3133. insurancePolicyForm.value.address3 = insurancePolicyForm.value.address2
  3134. insurancePolicyForm.value.registeredCapital3 = insurancePolicyForm.value.registeredCapital2
  3135. insurancePolicyForm.value.email3 = insurancePolicyForm.value.email2
  3136. }
  3137. // 构建提交数据
  3138. let data = {
  3139. systemType: '2',
  3140. order: {
  3141. insuranceCompanyCode: quoteData.value[scope.$index].id, // 保险公司代码
  3142. quoteNo: insurancePolicyForm.value.order.quoteNo, // 报价单号
  3143. agreementId: quoteData.value[scope.$index].isDispatch ? quoteData.value[scope.$index].dispatchAgreementId : quoteData.value[scope.$index].agreement, // 协议ID
  3144. productId: insurancePolicyForm.value.productId, // 产品ID
  3145. },
  3146. carInfoVo: { // 车辆信息
  3147. licenseKindCode: '02', // 车牌种类代码
  3148. propertyCode: insurancePolicyForm.value.propertyCode, // 车辆性质代码
  3149. licenseNo: insurancePolicyForm.value.licenseNo, // 车牌号
  3150. vinNo: insurancePolicyForm.value.vinNo, // 车架号
  3151. brandName: insurancePolicyForm.value.brandName, // 品牌型号
  3152. engineNo: insurancePolicyForm.value.engineNo, // 发动机号
  3153. carNatureCode: insurancePolicyForm.value.carNatureCode, // 使用性质代码
  3154. vehicleUseCode: insurancePolicyForm.value.vehicleUseCode, // 车辆用途代码
  3155. carTypeCode: insurancePolicyForm.value.carTypeCode, // 车辆类型代码
  3156. energyTypeCode: insurancePolicyForm.value.energyTypeCode, // 能源种类代码
  3157. registerDate: insurancePolicyForm.value.registerDate, // 注册日期
  3158. issueDate: insurancePolicyForm.value.issueDate, // 发证日期
  3159. completeKerbMass: insurancePolicyForm.value.completeKerbMass, // 整备质量
  3160. limitLoad: insurancePolicyForm.value.limitLoad, // 核定载质量
  3161. seatCount: insurancePolicyForm.value.seatCount, // 座位数
  3162. carYear: insurancePolicyForm.value.carYear, // 年款
  3163. purchasePrice: insurancePolicyForm.value.purchasePrice, // 新车购置价
  3164. displacement: insurancePolicyForm.value.displacement, // 排量
  3165. powerScale: insurancePolicyForm.value.powerScale, // 功率
  3166. carKindCode: insurancePolicyForm.value.plateType, // 车辆种类代码
  3167. transfer: insurancePolicyForm.value.transfer, // 转移标记
  3168. biTransfer: insurancePolicyForm.value.biTransfer, // 商业险转移标记
  3169. secondHandCar: insurancePolicyForm.value.secondHandCar, // 二手车标记
  3170. transferDate: insurancePolicyForm.value.transferDate // 转移登记日期
  3171. },
  3172. ownersInfo: { // 车主信息
  3173. property: 1,
  3174. name: insurancePolicyForm.value.name1, // 车主姓名
  3175. mobile: insurancePolicyForm.value.mobile1, // 车主手机号
  3176. identifyType: insurancePolicyForm.value.identifyType1, // 车主证件类型
  3177. identifyNumber: insurancePolicyForm.value.identifyNumber1, // 车主证件号码
  3178. identifyValidDate: insurancePolicyForm.value.identifyValidDate1, // 车主证件有效期起始
  3179. identifyValidEndDate: insurancePolicyForm.value.identifyValidEndDate1, // 车主证件有效期截止
  3180. addr: insurancePolicyForm.value.addr1, // 车主地址
  3181. telephone: insurancePolicyForm.value.telephone1, // 车主座机
  3182. person: insurancePolicyForm.value.person1, // 车主联系人
  3183. age: insurancePolicyForm.value.age1, // 车主年龄
  3184. address: insurancePolicyForm.value.address1, // 车主地区
  3185. registeredCapital: insurancePolicyForm.value.registeredCapital1, // 车主注册资金
  3186. email: insurancePolicyForm.value.email1, // 车主邮箱
  3187. },
  3188. policyHolderInfo: { // 投保人信息
  3189. property: 1,
  3190. name: insurancePolicyForm.value.name2, // 投保人姓名
  3191. mobile: insurancePolicyForm.value.mobile2, // 投保人手机号
  3192. identifyType: insurancePolicyForm.value.identifyType2, // 投保人证件类型
  3193. identifyNumber: insurancePolicyForm.value.identifyNumber2, // 投保人证件号码
  3194. identifyValidDate: insurancePolicyForm.value.identifyValidDate2, // 投保人证件有效期起始
  3195. identifyValidEndDate: insurancePolicyForm.value.identifyValidEndDate2, // 投保人证件有效期截止
  3196. addr: insurancePolicyForm.value.addr2, // 投保人地址
  3197. telephone: insurancePolicyForm.value.telephone2, // 投保人座机
  3198. person: insurancePolicyForm.value.person2, // 投保人联系人
  3199. age: insurancePolicyForm.value.age2, // 投保人年龄
  3200. address: insurancePolicyForm.value.address2, // 投保人地区
  3201. registeredCapital: insurancePolicyForm.value.registeredCapital2, // 投保人注册资金
  3202. email: insurancePolicyForm.value.email2, // 投保人邮箱
  3203. },
  3204. insuredPersonInfo: { // 被保人信息
  3205. property: 1,
  3206. name: insurancePolicyForm.value.name3, // 被保人姓名
  3207. mobile: insurancePolicyForm.value.mobile3, // 被保人手机号
  3208. identifyType: insurancePolicyForm.value.identifyType3, // 被保人证件类型
  3209. identifyNumber: insurancePolicyForm.value.identifyNumber3, // 被保人证件号码
  3210. identifyValidDate: insurancePolicyForm.value.identifyValidDate3, // 被保人证件有效期起始
  3211. identifyValidEndDate: insurancePolicyForm.value.identifyValidEndDate3, // 被保人证件有效期截止
  3212. addr: insurancePolicyForm.value.addr3, // 被保人地址
  3213. telephone: insurancePolicyForm.value.telephone3, // 被保人座机
  3214. person: insurancePolicyForm.value.person3, // 被保人联系人
  3215. age: insurancePolicyForm.value.age3, // 被保人年龄
  3216. address: insurancePolicyForm.value.address3, // 被保人地区
  3217. registeredCapital: insurancePolicyForm.value.registeredCapital3, // 被保人注册资金
  3218. email: insurancePolicyForm.value.email3, // 被保人邮箱
  3219. },
  3220. // 交强险信息,根据产品ID和日期判断是否需要提交
  3221. ciRiskInfoVo: insurancePolicyForm.value.productId === '0330' || insurancePolicyForm.value.productId === '0330034002' || insurancePolicyForm.value.productId === '0330034001' && insurancePolicyForm.value.JQStartDate && insurancePolicyForm.value.JQEndDate ? {
  3222. riskCode: '0507', // 风险代码
  3223. startDate: insurancePolicyForm.value.JQStartDate, // 开始日期
  3224. endDate: insurancePolicyForm.value.JQEndDate, // 结束日期
  3225. instantFlag: insurancePolicyForm.value.JQInstantFlag // 即时生效标志
  3226. } : null,
  3227. // 商业险信息,根据产品ID和日期判断是否需要提交
  3228. biRiskInfoVo: insurancePolicyForm.value.productId === '034001' || insurancePolicyForm.value.productId === '034002' || insurancePolicyForm.value.productId === '0330034002' || insurancePolicyForm.value.productId === '0330034001' && insurancePolicyForm.value.SYStartDate && insurancePolicyForm.value.SYEndDate ? {
  3229. riskCode: '0510', // 风险代码
  3230. startDate: insurancePolicyForm.value.SYStartDate, // 开始日期
  3231. endDate: insurancePolicyForm.value.SYEndDate, // 结束日期
  3232. instantFlag: insurancePolicyForm.value.SYInstantFlag // 即时生效标志
  3233. } : null,
  3234. vehicleAndVesselTaxVo: { // 车船税信息
  3235. taxRelifFlag: insurancePolicyForm.value.taxRelifFlag, // 车船税减免标志
  3236. extendChar2: insurancePolicyForm.value.extendChar2, // 扩展字符2
  3237. relifReason: insurancePolicyForm.value.relifReason,
  3238. taxComCode: insurancePolicyForm.value.taxComCode,
  3239. taxComName: insurancePolicyForm.value.taxComName,
  3240. taxRelief: insurancePolicyForm.value.taxRelief,
  3241. taxDocumentDate: insurancePolicyForm.value.taxDocumentDate,
  3242. taxPaidAreaCode: insurancePolicyForm.value.taxPaidAreaCode,
  3243. taxpayerName: insurancePolicyForm.value.taxpayerName,
  3244. taxpayerIdentifier: insurancePolicyForm.value.taxpayerIdentifier,
  3245. identifyNumber: insurancePolicyForm.value.identifyNumber,
  3246. },
  3247. kindInfoVo: [...arr],
  3248. accidentalDrivings: [...brr],
  3249. specialInfoVo: [...crr]
  3250. }
  3251. owerFormInfo.value = { ...data.ownersInfo, title: '车主', policyPersonType: '1' };
  3252. policyHolderInfo.value = { ...data.policyHolderInfo, title: '投保人', policyPersonType: '2' };
  3253. insuredPersonInfo.value = { ...data.insuredPersonInfo, title: '被保人', policyPersonType: '3' };
  3254. // 先保存影像资料
  3255. api.insurancePolicyApi.imageSave({
  3256. order: {
  3257. quoteNo: insurancePolicyForm.value.order.quoteNo
  3258. },
  3259. imageVoList: insurancePolicyForm.value.imageVoList
  3260. }).then((res: any) => {
  3261. if (res.code == 200) {
  3262. ElMessage({
  3263. message: res.msg,
  3264. type: 'success'
  3265. })
  3266. // 再进行报价
  3267. api.insurancePolicyApi.quote(data).then((res: any) => {
  3268. if (res.code == 200) {
  3269. ElMessage({
  3270. message: res.msg,
  3271. type: 'success'
  3272. })
  3273. // 计算总保费
  3274. if (res.data) {
  3275. let a = res.data.ciPremium ? res.data.ciPremium : 0 // 交强险保费
  3276. let b = res.data.vvTax ? res.data.vvTax : 0 // 车船税
  3277. let c = res.data.biPremium ? res.data.biPremium : 0 // 商业险保费
  3278. let d = res.data.niPremium ? res.data.niPremium : 0 // 未知险种保费
  3279. res.data.quoteTotal = Number(a) + Number(b) + Number(c) + Number(d) // 总保费
  3280. // 替换保险公司返回的正确日期
  3281. if (res.data.ciStartDate) {
  3282. insurancePolicyForm.value.JQStartDate = res.data.ciStartDate
  3283. insurancePolicyForm.value.JQEndDate = res.data.ciEndDate
  3284. }
  3285. if (res.data.biStartDate) {
  3286. insurancePolicyForm.value.SYStartDate = res.data.biStartDate
  3287. insurancePolicyForm.value.SYEndDate = res.data.biEndDate
  3288. }
  3289. }
  3290. // 设置折扣信息
  3291. quoteData.value[scope.$index].discounts = [
  3292. {
  3293. name: '交强', // 交强险费用明细
  3294. additionalPremium: res.data?.feeOrders?.jqAdditionalPremium,
  3295. additionalRatio: res.data?.feeOrders?.jqAdditionalRatio,
  3296. commissionPremium: res.data?.feeOrders?.jqCommissionPremium,
  3297. commissionRatio: res.data?.feeOrders?.jqCommissionRatio,
  3298. exportPremium: res.data?.feeOrders?.jqExportPremium,
  3299. exportRatio: res.data?.feeOrders?.jqExportRatio,
  3300. }, {
  3301. name: '商业', // 商业险费用明细
  3302. additionalPremium: res.data?.feeOrders?.syAdditionalPremium,
  3303. additionalRatio: res.data?.feeOrders?.syAdditionalRatio,
  3304. commissionPremium: res.data?.feeOrders?.syCommissionPremium,
  3305. commissionRatio: res.data?.feeOrders?.syCommissionRatio,
  3306. exportPremium: res.data?.feeOrders?.syExportPremium,
  3307. exportRatio: res.data?.feeOrders?.syExportRatio,
  3308. }, {
  3309. name: '驾意险', // 驾意险费用明细
  3310. additionalPremium: res.data?.feeOrders?.jyAdditionalPremium,
  3311. additionalRatio: res.data?.feeOrders?.jyAdditionalRatio,
  3312. commissionPremium: res.data?.feeOrders?.jyCommissionPremium,
  3313. commissionRatio: res.data?.feeOrders?.jyCommissionRatio,
  3314. exportPremium: res.data?.feeOrders?.jyExportPremium,
  3315. exportRatio: res.data?.feeOrders?.jyExportRatio,
  3316. },
  3317. ]
  3318. // 保存报价结果
  3319. quoteData.value[scope.$index].quoteResult = res.data
  3320. quoteData.value[scope.$index].quoteResult.code = res.code
  3321. console.log(res.data)
  3322. loading.value = false
  3323. quoteData.value[scope.$index].loading = false
  3324. console.log('报价后的数据', quoteData.value)
  3325. } else {
  3326. // ElMessage({
  3327. // message: res.msg,
  3328. // type: 'warning'
  3329. // })
  3330. quoteData.value[scope.$index].quoteResult = res.data
  3331. quoteData.value[scope.$index].quoteResult.failMsg = res.msg
  3332. loading.value = false
  3333. quoteData.value[scope.$index].loading = false
  3334. }
  3335. // InsurancePolicyRefs.resetFields()
  3336. }).catch((e: any) => {
  3337. // 处理异常情况,重置加载状态
  3338. loading.value = false
  3339. quoteData.value[scope.$index].loading = false
  3340. quoteData.value.forEach((a: any) => {
  3341. a.loading = false
  3342. })
  3343. })
  3344. } else {
  3345. ElMessage({
  3346. message: res.msg,
  3347. type: 'warning'
  3348. })
  3349. }
  3350. })
  3351. // api.insurancePolicyApi.imageSave({
  3352. // order: {
  3353. // quoteNo: insurancePolicyForm.value.order.quoteNo
  3354. // },
  3355. // imageVoList: insurancePolicyForm.value.imageVoList
  3356. // }).then((res: any) => {
  3357. // if(res.code == 200) {
  3358. // api.insurancePolicyApi.quote(data).then((res: any) => {
  3359. // if(res.code == 200) {
  3360. // ElMessage({
  3361. // message: res.msg,
  3362. // type: 'success'
  3363. // })
  3364. // if(res.data) {
  3365. // let a = res.data.ciPremium?res.data.ciPremium:0
  3366. // let b = res.data.vvTax?res.data.vvTax:0
  3367. // let c = res.data.biPremium?res.data.biPremium:0
  3368. // let d = res.data.niPremium?res.data.niPremium:0
  3369. // res.data.quoteTotal = Number(a) + Number(b) + Number(c) + Number(d)
  3370. // }
  3371. // quoteData.value[scope.$index].discounts = [
  3372. // {
  3373. // name: '交强',
  3374. // additionalPremium: res.data?.feeOrders?.jqAdditionalPremium,
  3375. // additionalRatio: res.data?.feeOrders?.jqAdditionalRatio,
  3376. // commissionPremium: res.data?.feeOrders?.jqCommissionPremium,
  3377. // commissionRatio: res.data?.feeOrders?.jqCommissionRatio,
  3378. // exportPremium: res.data?.feeOrders?.jqExportPremium,
  3379. // exportRatio: res.data?.feeOrders?.jqExportRatio,
  3380. // },{
  3381. // name: '商业',
  3382. // additionalPremium: res.data?.feeOrders?.syAdditionalPremium,
  3383. // additionalRatio: res.data?.feeOrders?.syAdditionalRatio,
  3384. // commissionPremium: res.data?.feeOrders?.syCommissionPremium,
  3385. // commissionRatio: res.data?.feeOrders?.syCommissionRatio,
  3386. // exportPremium: res.data?.feeOrders?.syExportPremium,
  3387. // exportRatio: res.data?.feeOrders?.syExportRatio,
  3388. // },{
  3389. // name: '驾意险',
  3390. // additionalPremium: res.data?.feeOrders?.jyAdditionalPremium,
  3391. // additionalRatio: res.data?.feeOrders?.jyAdditionalRatio,
  3392. // commissionPremium: res.data?.feeOrders?.jyCommissionPremium,
  3393. // commissionRatio: res.data?.feeOrders?.jyCommissionRatio,
  3394. // exportPremium: res.data?.feeOrders?.jyExportPremium,
  3395. // exportRatio: res.data?.feeOrders?.jyExportRatio,
  3396. // },
  3397. // ]
  3398. // quoteData.value[scope.$index].quoteResult = res.data
  3399. // loading.value = false
  3400. // quoteData.value[scope.$index].loading = false
  3401. // console.log('报价后的数据', quoteData.value)
  3402. // } else {
  3403. // ElMessage({
  3404. // message: res.msg,
  3405. // type: 'warning'
  3406. // })
  3407. // quoteData.value[scope.$index].quoteResult.failMsg = res.msg
  3408. // loading.value = false
  3409. // quoteData.value[scope.$index].loading = false
  3410. // }
  3411. // // InsurancePolicyRefs.resetFields()
  3412. // }).catch(e => {
  3413. // loading.value = false
  3414. // quoteData.value[scope.$index].loading = false
  3415. // quoteData.value.forEach(a => {
  3416. // a.loading = false
  3417. // })
  3418. // })
  3419. // } else {
  3420. // ElMessage({
  3421. // message: res.msg,
  3422. // type: 'warning'
  3423. // })
  3424. // }
  3425. // })
  3426. } else {
  3427. // 表单验证失败提示
  3428. ElMessage({
  3429. message: '请完整填写相关信息',
  3430. type: 'warning'
  3431. })
  3432. }
  3433. })
  3434. }
  3435. /**
  3436. * 处理下一步操作
  3437. * 在新窗口打开保险单页面
  3438. */
  3439. const handleNext = () => {
  3440. const urlLink = router.resolve({
  3441. path: '/insurancePolicy/index',
  3442. })
  3443. window.open(urlLink.href, '_blank')
  3444. }
  3445. /**
  3446. * 显示费用匹配错误信息
  3447. * @param scope 当前行作用域
  3448. */
  3449. const handleOpen = (scope: any) => {
  3450. ElNotification({
  3451. title: '费用匹配错误信息',
  3452. message: h('p', { style: 'white-space: pre-line' }, `${scope.row.quoteResult?.feeNoDescription}`),
  3453. })
  3454. }
  3455. /**
  3456. * 根据规则筛选保险公司
  3457. * 根据产品ID和车辆及人员信息获取可报价的保险公司列表
  3458. * @param item 选中的产品信息
  3459. */
  3460. const ruleFilterCompany = (item: any) => {
  3461. let data = {
  3462. productId: item.value, // 产品ID
  3463. carInfo: { // 车辆信息
  3464. carOwner: insurancePolicyForm.value.carOwner,
  3465. licenseNo: insurancePolicyForm.value.licenseNo,
  3466. vinNo: insurancePolicyForm.value.vinNo,
  3467. brandName: insurancePolicyForm.value.brandName,
  3468. engineNo: insurancePolicyForm.value.engineNo,
  3469. carNatureCode: insurancePolicyForm.value.carNatureCode,
  3470. vehicleUseCode: insurancePolicyForm.value.vehicleUseCode,
  3471. carTypeCode: insurancePolicyForm.value.carTypeCode,
  3472. energyTypeCode: insurancePolicyForm.value.energyTypeCode,
  3473. registerDate: insurancePolicyForm.value.registerDate,
  3474. issueDate: insurancePolicyForm.value.issueDate,
  3475. completeKerbMass: insurancePolicyForm.value.completeKerbMass,
  3476. limitLoad: insurancePolicyForm.value.limitLoad,
  3477. seatCount: insurancePolicyForm.value.seatCount,
  3478. carYear: insurancePolicyForm.value.carYear,
  3479. purchasePrice: insurancePolicyForm.value.purchasePrice,
  3480. displacement: insurancePolicyForm.value.displacement,
  3481. powerScale: insurancePolicyForm.value.powerScale,
  3482. carKindCode: insurancePolicyForm.value.plateType
  3483. },
  3484. ownerInfo: { // 车主信息
  3485. name: insurancePolicyForm.value.name1,
  3486. mobile: insurancePolicyForm.value.mobile1,
  3487. identifyType: insurancePolicyForm.value.identifyType1,
  3488. identifyNumber: insurancePolicyForm.value.identifyNumber1,
  3489. identifyValidDate: insurancePolicyForm.value.identifyValidDate1,
  3490. identifyValidEndDate: insurancePolicyForm.value.identifyValidEndDate1,
  3491. addr: insurancePolicyForm.value.addr1,
  3492. telephone: insurancePolicyForm.value.telephone1,
  3493. person: insurancePolicyForm.value.person1,
  3494. age: insurancePolicyForm.value.age1,
  3495. address: insurancePolicyForm.value.address1,
  3496. registeredCapital: insurancePolicyForm.value.registeredCapital1,
  3497. email: insurancePolicyForm.value.email1,
  3498. },
  3499. applyInfo: { // 投保人信息
  3500. name: insurancePolicyForm.value.name2,
  3501. mobile: insurancePolicyForm.value.mobile2,
  3502. identifyType: insurancePolicyForm.value.identifyType2,
  3503. identifyNumber: insurancePolicyForm.value.identifyNumber2,
  3504. identifyValidDate: insurancePolicyForm.value.identifyValidDate2,
  3505. identifyValidEndDate: insurancePolicyForm.value.identifyValidEndDate2,
  3506. addr: insurancePolicyForm.value.addr2,
  3507. telephone: insurancePolicyForm.value.telephone2,
  3508. person: insurancePolicyForm.value.person2,
  3509. age: insurancePolicyForm.value.age2,
  3510. address: insurancePolicyForm.value.address2,
  3511. registeredCapital: insurancePolicyForm.value.registeredCapital2,
  3512. email: insurancePolicyForm.value.email2,
  3513. },
  3514. insureInfo: { // 被保人信息
  3515. name: insurancePolicyForm.value.name3,
  3516. mobile: insurancePolicyForm.value.mobile3,
  3517. identifyType: insurancePolicyForm.value.identifyType3,
  3518. identifyNumber: insurancePolicyForm.value.identifyNumber3,
  3519. identifyValidDate: insurancePolicyForm.value.identifyValidDate3,
  3520. identifyValidEndDate: insurancePolicyForm.value.identifyValidEndDate3,
  3521. addr: insurancePolicyForm.value.addr3,
  3522. telephone: insurancePolicyForm.value.telephone3,
  3523. person: insurancePolicyForm.value.person3,
  3524. age: insurancePolicyForm.value.age3,
  3525. address: insurancePolicyForm.value.address3,
  3526. registeredCapital: insurancePolicyForm.value.registeredCapital3,
  3527. email: insurancePolicyForm.value.email3,
  3528. },
  3529. }
  3530. // 调用API获取符合规则的保险公司列表
  3531. api.insurancePolicyApi.ruleFilterCompany(data).then((res: any) => {
  3532. if (res.code == 200) {
  3533. // 设置每个保险公司的加载状态
  3534. res.data.forEach((a: any) => {
  3535. a.loading = false
  3536. })
  3537. quoteData.value = res.data
  3538. // 如果只有一个协议,自动选择
  3539. quoteData.value.forEach((item: any) => {
  3540. if (item.agreements && item.agreements.length == 1) {
  3541. item.agreement = item.agreements[0].id
  3542. }
  3543. })
  3544. } else {
  3545. quoteData.value = []
  3546. ElMessage({
  3547. message: res.msg,
  3548. type: 'warning'
  3549. })
  3550. }
  3551. })
  3552. }
  3553. // 组件挂载后执行初始化操作
  3554. onMounted(() => {
  3555. getAreaList() // 获取地区列表
  3556. initDept() // 初始化部门数据
  3557. initOption() // 初始化下拉选项
  3558. if (myRoute.query.orderNo) {
  3559. initDetail() // 如果有订单号,初始化详情
  3560. }
  3561. })
  3562. </script>
  3563. <style scoped lang="scss">
  3564. @use "@/assets/styles/common/style";
  3565. .insurancePolicy {
  3566. width: calc(100% - 48px);
  3567. height: calc(100vh - 128px);
  3568. margin: 10px 24px 0;
  3569. overflow-y: auto;
  3570. overflow-x: hidden;
  3571. .formItem {
  3572. padding: 0 24px;
  3573. background: #FFFFFF;
  3574. border-radius: 6px;
  3575. }
  3576. .title {
  3577. height: 18px;
  3578. border-left: 4px solid #00a0f4;
  3579. display: flex;
  3580. align-items: center;
  3581. padding-left: 8px;
  3582. margin-left: 24px;
  3583. color: #333333;
  3584. font-size: 18px;
  3585. font-weight: bold;
  3586. }
  3587. .icon {
  3588. padding-right: 24px;
  3589. display: flex;
  3590. align-items: center;
  3591. }
  3592. .myIcon {
  3593. display: inline-block;
  3594. width: 14px;
  3595. height: 14px;
  3596. margin-right: 10px;
  3597. }
  3598. .icon-ele {
  3599. font-size: 14px;
  3600. margin-left: 10px;
  3601. color: #333;
  3602. margin-right: 6px;
  3603. }
  3604. .ordinary {
  3605. height: 28px;
  3606. line-height: 28px;
  3607. padding: 0 12px;
  3608. border: 1px solid #EEEEEE;
  3609. border-radius: 2px;
  3610. color: #666666;
  3611. display: flex;
  3612. font-size: 14px;
  3613. margin: 0 5px;
  3614. font-weight: 400;
  3615. border-radius: 2px;
  3616. }
  3617. .active {
  3618. border: 1px solid #0083FF;
  3619. color: #0083FF;
  3620. background: url("@/assets/images/additional/right.png") no-repeat right bottom;
  3621. background-size: 12px 12px;
  3622. }
  3623. .insurance-jq {
  3624. margin: 10px 0 24px 24px;
  3625. .checkbox {
  3626. margin: 0 24px;
  3627. height: 28px;
  3628. line-height: 28px;
  3629. padding: 0 12px;
  3630. border: 1px solid #EEEEEE;
  3631. border-radius: 2px;
  3632. color: #666666;
  3633. display: flex;
  3634. font-size: 14px;
  3635. cursor: pointer;
  3636. }
  3637. .cehcked {
  3638. border: 1px solid #0083FF;
  3639. color: #0083FF;
  3640. background: url("@/assets/images/additional/right.png") no-repeat right bottom;
  3641. background-size: 12px 12px;
  3642. }
  3643. .time {
  3644. display: flex;
  3645. align-items: center;
  3646. .el-form-item {
  3647. margin-bottom: 0;
  3648. }
  3649. }
  3650. }
  3651. .success {
  3652. color: #1DAEFF;
  3653. border: 1px solid #1DAEFF;
  3654. background: #E7F7FF;
  3655. padding: 2px 4px;
  3656. border-radius: 2px;
  3657. font-size: 12px;
  3658. }
  3659. .fail {
  3660. color: #FF4545;
  3661. border: 1px solid #FF4545;
  3662. background: #FFF4F4;
  3663. padding: 2px 4px;
  3664. border-radius: 2px;
  3665. font-size: 12px;
  3666. margin-right: 10px;
  3667. }
  3668. .company {
  3669. display: flex;
  3670. align-items: center;
  3671. justify-content: center;
  3672. img {
  3673. width: 24px;
  3674. height: 24px;
  3675. margin-right: 10px;
  3676. }
  3677. }
  3678. .resultItem {
  3679. display: flex;
  3680. align-items: center;
  3681. justify-content: flex-start;
  3682. font-size: 14px;
  3683. color: #666;
  3684. .resultTips {
  3685. display: flex;
  3686. align-items: center;
  3687. justify-content: flex-start;
  3688. background: #FFFAEF;
  3689. border: 1px solid #FAA21E;
  3690. border-radius: 2px;
  3691. padding: 0 10px 0 5px;
  3692. font-size: 12px;
  3693. margin-left: 10px;
  3694. color: #333;
  3695. }
  3696. }
  3697. .resultItem:first-child>span {
  3698. font-size: 14px;
  3699. color: #333;
  3700. font-weight: bold;
  3701. }
  3702. .costFactor {
  3703. width: 100%;
  3704. display: flex;
  3705. align-items: center;
  3706. justify-content: flex-start;
  3707. }
  3708. .quoteFail {
  3709. display: flex;
  3710. align-items: center;
  3711. justify-content: flex-start;
  3712. font-size: 12px;
  3713. }
  3714. .quoteReason {
  3715. text-align: left;
  3716. padding-left: 22px;
  3717. width: 100%;
  3718. display: -webkit-box;
  3719. /* 必须设置,用于多行溢出 */
  3720. -webkit-box-orient: vertical;
  3721. /* 设置盒子排列方向为垂直 */
  3722. line-clamp: 2;
  3723. /* 限制显示的行数,例如显示 3 行 */
  3724. overflow: hidden;
  3725. font-size: 12px;
  3726. }
  3727. .product {
  3728. margin-top: 12px;
  3729. .productItem {
  3730. padding: 5px 12px;
  3731. box-sizing: border-box;
  3732. font-size: 14px;
  3733. color: #666;
  3734. border: 1px solid #E5E5E5;
  3735. border-radius: 2px;
  3736. cursor: pointer;
  3737. margin-right: 10px;
  3738. }
  3739. .productActive {
  3740. border: 1px solid #0083FF;
  3741. color: #0083FF;
  3742. }
  3743. }
  3744. .quoteTitle {
  3745. height: 16px;
  3746. border-left: 4px solid #00a0f4;
  3747. display: flex;
  3748. align-items: center;
  3749. padding-left: 6px;
  3750. color: #333333;
  3751. font-size: 16px;
  3752. font-weight: bold;
  3753. margin: 16px 0;
  3754. }
  3755. .quoteFlex {
  3756. display: flex;
  3757. align-items: center;
  3758. justify-content: center;
  3759. }
  3760. .imageCode {
  3761. height: 140px;
  3762. display: flex;
  3763. align-items: center;
  3764. justify-content: center;
  3765. img {
  3766. width: 140px;
  3767. height: 140px;
  3768. }
  3769. }
  3770. .expandFlex {
  3771. display: flex;
  3772. .expandTitle {
  3773. width: 50px;
  3774. margin-right: 10px;
  3775. background: #F0F8FF;
  3776. font-size: 18px;
  3777. color: #333;
  3778. font-weight: bold;
  3779. writing-mode: vertical-rl;
  3780. letter-spacing: 4px;
  3781. }
  3782. }
  3783. .equities {
  3784. display: flex;
  3785. align-items: center;
  3786. justify-content: flex-start;
  3787. margin-bottom: 10px;
  3788. .equitiesTitle {
  3789. color: #333333;
  3790. font-size: 16px;
  3791. font-weight: bold;
  3792. }
  3793. .equitiesBox {
  3794. display: flex;
  3795. align-items: center;
  3796. justify-content: flex-start;
  3797. background: #F0F8FF;
  3798. border-radius: 2px;
  3799. .equitiesLabel {
  3800. display: flex;
  3801. align-items: center;
  3802. justify-content: flex-start;
  3803. background: #DFF1FF;
  3804. padding: 9px 10px;
  3805. color: #00AAFF;
  3806. font-size: 14px;
  3807. img {
  3808. width: 16px;
  3809. height: 16px;
  3810. margin-right: 5px;
  3811. }
  3812. }
  3813. .circle {
  3814. width: 0;
  3815. height: 0;
  3816. border-bottom: 42px solid #DFF1FF;
  3817. border-right: 20px solid transparent;
  3818. }
  3819. }
  3820. .equitiesChoice {
  3821. margin-left: 10px;
  3822. }
  3823. }
  3824. :deep(.el-collapse-item__header) {
  3825. display: flex;
  3826. align-items: center;
  3827. justify-content: space-between;
  3828. }
  3829. :deep(.el-form .el-form-item) {
  3830. margin-bottom: 10px;
  3831. }
  3832. .formBlock {
  3833. :deep(.el-form-item) {
  3834. display: block;
  3835. }
  3836. }
  3837. .factorTable {
  3838. .more {
  3839. border: 1px solid #0083FF;
  3840. display: flex;
  3841. align-items: center;
  3842. justify-content: center;
  3843. border-radius: 50%;
  3844. width: 12px;
  3845. height: 12px;
  3846. color: #0083FF;
  3847. font-size: 10px;
  3848. margin-left: 2px;
  3849. }
  3850. :deep(.cell) {
  3851. font-size: 14px;
  3852. }
  3853. }
  3854. :deep(thead .el-table__cell) {
  3855. background: #eeeeee;
  3856. }
  3857. .footer {
  3858. display: flex;
  3859. align-items: center;
  3860. justify-content: center;
  3861. margin-top: 10px;
  3862. background: #FFFFFF;
  3863. padding: 16px 0;
  3864. }
  3865. }
  3866. // 保费因子
  3867. .premiumFactor {
  3868. width: 100%;
  3869. margin: 10px 0;
  3870. border: 1px solid #eee;
  3871. border-radius: 5px;
  3872. .header {
  3873. font-size: 14px;
  3874. font-weight: bold;
  3875. color: #333333;
  3876. padding: 6px 8px;
  3877. box-sizing: border-box;
  3878. text-align: center;
  3879. }
  3880. .flex.a-start.f-wrap {
  3881. gap: 0;
  3882. }
  3883. .Factor-item {
  3884. min-width: 50px;
  3885. flex: auto;
  3886. .item-header {
  3887. width: 100%;
  3888. font-size: 14px;
  3889. color: #666666;
  3890. font-weight: bold;
  3891. background: #F7F7F9;
  3892. justify-content: center;
  3893. padding: 6px 8px;
  3894. box-sizing: border-box;
  3895. }
  3896. span:last-child {
  3897. font-size: 14px;
  3898. color: #333333;
  3899. padding: 6px 8px;
  3900. box-sizing: border-box;
  3901. }
  3902. }
  3903. }
  3904. </style>