index.vue 191 KB

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