Calculate.vue 106 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044
  1. <template>
  2. <el-container>
  3. <el-row class="rightContainer">
  4. <div class="u-f-ac" style="width: 100%;padding-left: 20px;height: 140px;" v-if="(orderStatus!='99')">
  5. <el-steps style="width:100%" align-center :active="historyActive" :space="260" finish-status="success">
  6. <el-step title="报价中"></el-step>
  7. <el-step title="待核保"></el-step>
  8. <el-step title="已核保"></el-step>
  9. <el-step title="已核保待缴费"></el-step>
  10. <el-step title="已缴费待配送"></el-step>
  11. <el-step title="已承保"></el-step>
  12. </el-steps>
  13. </div>
  14. <div class="u-f-ac" style="width: 100%;padding-left: 20px;height: 50px;color: red;font-weight: bold;" v-if="(orderStatus=='99') && isHistoryOrder">
  15. 该订单已关闭
  16. </div>
  17. <el-row>
  18. <el-row class="u-f-ac bodyTitle">
  19. <label>销售信息</label>
  20. <el-checkbox v-if="isHistoryOrder" v-model="isNewOrder">是否开启新的报价</el-checkbox>
  21. </el-row>
  22. <el-row class="body" style="margin-bottom: 60px;">
  23. <el-form :disabled="isHistoryOrder" size="medium" ref="carForm" label-width="140px">
  24. <el-row>
  25. <el-col :span="8">
  26. <el-form-item label="工号" >
  27. <el-select size="medium" v-model="userId" filterable placeholder="请选择" style="width: 100%;" @change="peopleInfoChange">
  28. <el-option :label="item.id" :value="item.id" v-for="(item,index) in personList " :key="index">
  29. <span style="float: left;margin-right: 20px;">{{ item.name }}</span>
  30. <span style="float: right; color: #8492a6; font-size: 13px">{{ item.id }}</span>
  31. </el-option>
  32. </el-select>
  33. </el-form-item>
  34. </el-col>
  35. <el-col :span="8">
  36. <el-form-item label="代理人">
  37. <el-input disabled size="medium" v-model="personInfo.name" placeholder="请选择"></el-input>
  38. </el-form-item>
  39. </el-col>
  40. <el-col :span="8">
  41. <el-form-item label="电话">
  42. <el-input disabled size="medium" v-model="personInfo.mobile" placeholder="请选择"></el-input>
  43. </el-form-item>
  44. </el-col>
  45. <el-col :span="8">
  46. <el-form-item label="所属团队">
  47. <el-input disabled size="medium" v-model="personInfo.deptId" placeholder="请选择"></el-input>
  48. </el-form-item>
  49. </el-col>
  50. <el-col :span="8">
  51. <el-form-item label="所属部门">
  52. <el-input disabled size="medium" v-model="personInfo.deptName" placeholder="请选择"></el-input>
  53. </el-form-item>
  54. </el-col>
  55. <el-col :span="8">
  56. <el-form-item label="所属机构">
  57. <el-input disabled size="medium" v-model="deptInfo.name" placeholder="请选择"></el-input>
  58. </el-form-item>
  59. </el-col>
  60. </el-row>
  61. </el-form>
  62. </el-row>
  63. </el-row>
  64. <el-card>
  65. <el-row class="header">
  66. <el-col class="u-f u-f-ac">
  67. <div>车辆信息</div>
  68. <el-upload v-if="!isHistoryOrder" action='' ref="uploadCarImage" :on-change="getCarImage" :limit="1" :show-file-list="false" :auto-upload="false">
  69. <div class="icon iconfont icon-hangshizhengshibie u-f-ac" style="margin-left: 20px;font-size: 23px;color: #0066CC;"></div>
  70. </el-upload>
  71. </el-col>
  72. </el-row>
  73. <el-divider></el-divider>
  74. <el-row class="body">
  75. <el-form ref="carForm" :disabled="isHistoryOrder" :model="carInfo" :rules="carRules" label-width="140px">
  76. <el-row>
  77. <el-col :span="8">
  78. <el-form-item label="号牌号码" prop="licenseNo">
  79. <el-input size="medium" v-model="carInfo.licenseNo" @blur="carInfo.licenseNo = carInfo.licenseNo.toUpperCase() " placeholder="请输入车牌"></el-input>
  80. </el-form-item>
  81. </el-col>
  82. <el-col :span="8">
  83. <el-form-item label="品牌型号" prop="brandName">
  84. <el-row class="u-f">
  85. <el-input size="medium" v-model="carInfo.brandName" @blur="carInfo.brandName = carInfo.brandName.toUpperCase() " placeholder="请输入品牌型号"></el-input>
  86. <!-- <el-button size="medium" type="primary">校验</el-button> -->
  87. </el-row>
  88. </el-form-item>
  89. </el-col>
  90. <el-col :span="8">
  91. <el-form-item label="车辆识别码" prop="vinNo">
  92. <el-row class="u-f">
  93. <el-input size="medium" v-model="carInfo.vinNo" @blur="carInfo.vinNo = carInfo.vinNo.toUpperCase() " placeholder="请输入车辆识别码"></el-input>
  94. <el-button size="medium" type="primary" @click="toChooseVin">校验</el-button>
  95. </el-row>
  96. </el-form-item>
  97. </el-col>
  98. </el-row>
  99. <el-row>
  100. <el-col :span="8">
  101. <el-form-item label="发动机号" prop="engineNo">
  102. <el-input size="medium" v-model="carInfo.engineNo" @blur="carInfo.engineNo = carInfo.engineNo.toUpperCase() " placeholder="请输入发动机号"></el-input>
  103. </el-form-item>
  104. </el-col>
  105. <el-col :span="8">
  106. <el-form-item label="年款">
  107. <el-input size="medium" disabled v-model="carInfo.caryear" placeholder="年款"></el-input>
  108. </el-form-item>
  109. </el-col>
  110. <el-col :span="8">
  111. <el-form-item label="座位数">
  112. <el-input size="medium" v-model="carInfo.seatCount" placeholder="座位数"></el-input>
  113. </el-form-item>
  114. </el-col>
  115. </el-row>
  116. <el-row>
  117. <el-col :span="8">
  118. <el-form-item label="车型编码">
  119. <el-input size="medium" disabled v-model="carInfo.ciModelCode" placeholder="车型编码"></el-input>
  120. </el-form-item>
  121. </el-col>
  122. <el-col :span="8">
  123. <el-form-item label="新车购置价">
  124. <el-input size="medium" disabled v-model="carInfo.purchasePrice" placeholder="新车购置价"></el-input>
  125. </el-form-item>
  126. </el-col>
  127. <el-col :span="8">
  128. <el-form-item label="核定载质量">
  129. <el-input size="medium" disabled v-model="carInfo.limitLoad" placeholder="核定载质量"></el-input>
  130. </el-form-item>
  131. </el-col>
  132. </el-row>
  133. <el-row>
  134. <el-col :span="8">
  135. <el-form-item label="注册日期" prop="registerDate">
  136. <el-date-picker size="medium" format="yyyy-MM-dd" value-format="yyyy-MM-dd" v-model="carInfo.registerDate" type="date" placeholder="选择日期" style="width: 100%;"> </el-date-picker>
  137. </el-form-item>
  138. </el-col>
  139. <el-col :span="8">
  140. <el-form-item label="发证日期" prop="issueDate">
  141. <el-date-picker size="medium" format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="changeIssueDateDate" v-model="carInfo.issueDate" type="date" placeholder="选择日期" style="width: 100%;" > </el-date-picker>
  142. </el-form-item>
  143. </el-col>
  144. <el-col :span="8">
  145. <el-form-item label="是否过户">
  146. <el-select size="medium" v-model="carInfo.transferFlag" @change="changeTransferFlag" placeholder="请选择" style="width: 100%;">
  147. <el-option label="是" :value="1"></el-option>
  148. <el-option label="否" :value="0"></el-option>
  149. </el-select>
  150. </el-form-item>
  151. </el-col>
  152. </el-row>
  153. </el-form>
  154. </el-row>
  155. </el-card>
  156. <!-- 关系人 -->
  157. <el-card>
  158. <el-row class="header">
  159. <el-col>关系人信息</el-col>
  160. </el-row>
  161. <el-divider></el-divider>
  162. <div>
  163. <el-row class="u-f-ac bodyTitle">
  164. <label>车主</label>
  165. <el-upload v-if="!isHistoryOrder" action='' ref="uploadPersonImage" :on-change="getpersonImage" :limit="1" :show-file-list="false" :auto-upload="false">
  166. <div class="icon iconfont icon-hangshizhengshibie u-f-ac" style="margin-left: 20px;font-size: 23px;color: #0066CC;"></div>
  167. </el-upload>
  168. </el-row>
  169. <el-row class="body">
  170. <el-form :disabled="isHistoryOrder" ref="ownerInfoForm" :model="ownerInfo" :rules="personRules" label-width="140px">
  171. <el-row>
  172. <el-col :span="6">
  173. <el-form-item label="证件类型">
  174. <el-select size="medium" disabled v-model="ownerInfo.identifyType" placeholder="请选择" style="width: 100%;">
  175. <el-option label="身份证" value="01"></el-option>
  176. <el-option label="护照" value="02"></el-option>
  177. <el-option label="港澳台居民居住证" value="03"></el-option>
  178. <el-option label="组织机构代码证" value="04"></el-option>
  179. <el-option label="统一社会信用代码证" value="05"></el-option>
  180. <el-option label="营业执照" value="06"></el-option>
  181. </el-select>
  182. </el-form-item>
  183. </el-col>
  184. <el-col :span="6">
  185. <el-form-item label="证件号码" prop="identifyNumber">
  186. <el-input size="medium" v-model="ownerInfo.identifyNumber" placeholder="请输入证件号码"></el-input>
  187. </el-form-item>
  188. </el-col>
  189. <el-col :span="6">
  190. <el-form-item label="姓名" prop="name">
  191. <el-input size="medium" v-model="ownerInfo.name" placeholder="请输入姓名"></el-input>
  192. </el-form-item>
  193. </el-col>
  194. <el-col :span="6">
  195. <el-form-item label="手机号" prop="mobile">
  196. <el-input size="medium" v-model="ownerInfo.mobile" placeholder="请输入手机号"></el-input>
  197. </el-form-item>
  198. </el-col>
  199. </el-row>
  200. <el-row>
  201. <el-col :span="12">
  202. <el-form-item label="地址" prop="addr">
  203. <el-input size="medium" v-model="ownerInfo.addr" placeholder="请输入地址"></el-input>
  204. </el-form-item>
  205. </el-col>
  206. </el-row>
  207. </el-form>
  208. </el-row>
  209. <el-row class="u-f-ac bodyTitle">
  210. <label>投保人</label>
  211. <el-checkbox v-if="!isHistoryOrder" v-model="holderAndOwner" @change="syncPersonInfo('holderAndOwner','policyHolder','owner')">同车主</el-checkbox>
  212. </el-row>
  213. <el-row class="body">
  214. <el-form :disabled="isHistoryOrder" ref="policyHolderInfoForm" :model="policyHolderInfo" :rules="personRules" label-width="140px">
  215. <el-row>
  216. <el-col :span="6">
  217. <el-form-item label="证件类型">
  218. <el-select size="medium" disabled v-model="policyHolderInfo.identifyType" placeholder="请选择" style="width: 100%;">
  219. <el-option label="身份证" value="01"></el-option>
  220. <el-option label="护照" value="02"></el-option>
  221. <el-option label="港澳台居民居住证" value="03"></el-option>
  222. <el-option label="组织机构代码证" value="04"></el-option>
  223. <el-option label="统一社会信用代码证" value="05"></el-option>
  224. <el-option label="营业执照" value="06"></el-option>
  225. </el-select>
  226. </el-form-item>
  227. </el-col>
  228. <el-col :span="6">
  229. <el-form-item label="证件号码" prop="identifyNumber">
  230. <el-input size="medium" v-model="policyHolderInfo.identifyNumber" placeholder="请输入证件号码"></el-input>
  231. </el-form-item>
  232. </el-col>
  233. <el-col :span="6">
  234. <el-form-item label="姓名" prop="name">
  235. <el-input size="medium" v-model="policyHolderInfo.name" placeholder="请输入姓名"></el-input>
  236. </el-form-item>
  237. </el-col>
  238. <el-col :span="6">
  239. <el-form-item label="手机号" prop="mobile">
  240. <el-input size="medium" v-model="policyHolderInfo.mobile" placeholder="请输入手机号"></el-input>
  241. </el-form-item>
  242. </el-col>
  243. </el-row>
  244. <el-row>
  245. <el-col :span="12">
  246. <el-form-item label="地址" prop="addr">
  247. <el-input size="medium" v-model="policyHolderInfo.addr" placeholder="请输入地址"></el-input>
  248. </el-form-item>
  249. </el-col>
  250. </el-row>
  251. </el-form>
  252. </el-row>
  253. <el-row class="u-f-ac bodyTitle">
  254. <label>被保险人</label>
  255. <el-checkbox v-if="!isHistoryOrder" v-model="insuredAndOwner" @change="syncPersonInfo('insuredAndOwner','insuredPerson','owner')">同车主</el-checkbox>
  256. </el-row>
  257. <el-row class="body">
  258. <el-form :disabled="isHistoryOrder" ref="insuredPersonInfoForm" :model="insuredPersonInfo" :rules="personRules" label-width="140px">
  259. <el-row>
  260. <el-col :span="6">
  261. <el-form-item label="证件类型">
  262. <el-select disabled size="medium" v-model="insuredPersonInfo.identifyType" placeholder="请选择" style="width: 100%;">
  263. <el-option label="身份证" value="01"></el-option>
  264. <el-option label="护照" value="02"></el-option>
  265. <el-option label="港澳台居民居住证" value="03"></el-option>
  266. <el-option label="组织机构代码证" value="04"></el-option>
  267. <el-option label="统一社会信用代码证" value="05"></el-option>
  268. <el-option label="营业执照" value="06"></el-option>
  269. </el-select>
  270. </el-form-item>
  271. </el-col>
  272. <el-col :span="6">
  273. <el-form-item label="证件号码" prop="identifyNumber">
  274. <el-input size="medium" v-model="insuredPersonInfo.identifyNumber" placeholder="请输入证件号码"></el-input>
  275. </el-form-item>
  276. </el-col>
  277. <el-col :span="6">
  278. <el-form-item label="姓名" prop="name">
  279. <el-input size="medium" v-model="insuredPersonInfo.name" placeholder="请输入姓名"></el-input>
  280. </el-form-item>
  281. </el-col>
  282. <el-col :span="6">
  283. <el-form-item label="手机号" prop="mobile">
  284. <el-input size="medium" v-model="insuredPersonInfo.mobile" placeholder="请输入手机号"></el-input>
  285. </el-form-item>
  286. </el-col>
  287. </el-row>
  288. <el-row>
  289. <el-col :span="12">
  290. <el-form-item label="地址" prop="addr">
  291. <el-input size="medium" v-model="insuredPersonInfo.addr" placeholder="请输入地址"></el-input>
  292. </el-form-item>
  293. </el-col>
  294. </el-row>
  295. </el-form>
  296. </el-row>
  297. </div>
  298. </el-card>
  299. <el-card>
  300. <el-row class="header">
  301. <el-col>保单信息</el-col>
  302. </el-row>
  303. <el-divider></el-divider>
  304. <div>
  305. <el-row class="u-f-ac bodyTitle" :style="!CIChoose?'margin-bottom: 15px;':''">
  306. <el-checkbox :disabled="isHistoryOrder" :checked="CIChoose" v-model="CIChoose" @change="changeRisk($event,'CI')">交强险</el-checkbox>
  307. </el-row>
  308. <el-row class="body" v-if="CIChoose">
  309. <el-form :disabled="isHistoryOrder" ref="ciTimeRef" label-width="140px">
  310. <el-row>
  311. <el-col :span="8">
  312. <el-row class="u-f">
  313. <el-col>
  314. <el-form-item label="起保时间">
  315. <el-date-picker :disabled="jqchecked" size="medium" format="yyyy-MM-dd HH:mm" v-model="CIStartDate" type="date" placeholder="选择日期" @change="getEndDate($event,'CIStartDate','CIEndDate')" style="width: 100%;"> </el-date-picker>
  316. </el-form-item>
  317. </el-col>
  318. <el-col style="width: 80px;flex-shrink: 0;">
  319. <el-checkbox v-model="jqchecked">即时</el-checkbox>
  320. <el-time-select prefix-icon=" " ref="jqTimePicker" v-model="jqTimePicker" :picker-options="{ start: timePickerStart, step: '01:00', end: '23:00' }" placeholder="选择时间" @change="jqTimePickerChange"></el-time-select>
  321. </el-col>
  322. </el-row>
  323. </el-col>
  324. <el-col :span="8">
  325. <el-form-item label="终保时间">
  326. <el-input disabled size="medium" :value="CIEndDate"></el-input>
  327. </el-form-item>
  328. </el-col>
  329. <el-col :span="8">
  330. <el-form-item label="保额">
  331. <el-input size="medium" disabled value="200000"></el-input>
  332. </el-form-item>
  333. </el-col>
  334. </el-row>
  335. </el-form>
  336. </el-row>
  337. <el-row class="u-f-ac bodyTitle">
  338. <el-checkbox :disabled="isHistoryOrder" :checked="BIChoose" v-model="BIChoose" @change="changeRisk($event,'BI')">商业险</el-checkbox>
  339. </el-row>
  340. <el-row class="body" v-if="!!BIChoose">
  341. <el-form :disabled="isHistoryOrder" ref="biTimeRef" label-width="140px">
  342. <el-row>
  343. <el-col :span="8">
  344. <el-row class="u-f">
  345. <el-col>
  346. <el-form-item label="起保时间">
  347. <el-date-picker :disabled="sychecked" size="medium" format="yyyy-MM-dd HH:mm" v-model="BIStartDate" type="date" placeholder="选择日期" @change="getEndDate($event,'BIStartDate','BIEndDate')" style="width: 100%;"> </el-date-picker>
  348. </el-form-item>
  349. </el-col>
  350. <el-col style="width: 80px;flex-shrink: 0;">
  351. <el-checkbox v-model="sychecked">即时</el-checkbox>
  352. <el-time-select prefix-icon=" " ref="syTimePicker" v-model="syTimePicker" :picker-options="{ start: timePickerStart, step: '01:00', end: '23:00' }" placeholder="选择时间" @change="syTimePickerChange"></el-time-select>
  353. </el-col>
  354. </el-row>
  355. </el-col>
  356. <el-col :span="8">
  357. <el-form-item label="终保时间">
  358. <el-input disabled size="medium" :value="BIEndDate"></el-input>
  359. </el-form-item>
  360. </el-col>
  361. </el-row>
  362. </el-form>
  363. <!-- <el-row>
  364. <el-col :span="2">
  365. <label>起保时间</label>
  366. </el-col>
  367. <el-col :span="5">
  368. <el-date-picker size="medium" format="yyyy-MM-dd HH:mm" v-model="BIStartDate" type="date" placeholder="选择日期" @change="getEndDate($event,'BIStartDate','BIEndDate')"> </el-date-picker>
  369. </el-col>
  370. <el-col :span="3">
  371. <label>终保时间</label>
  372. </el-col>
  373. <el-col :span="5">
  374. <el-input size="medium" disabled :value="BIEndDate"></el-input>
  375. </el-col>
  376. </el-row> -->
  377. <el-row>
  378. <el-form :disabled="isHistoryOrder" >
  379. <el-row class="u-f-ac bodyTitle">商业险险种信息</el-row>
  380. <el-row class="body insuretable">
  381. <el-row class="u-f" style="font-weight: bold;">
  382. <el-col class="u-f flex-1 u-f-ajc">险种名称</el-col>
  383. <el-col class="u-f flex-1 u-f-ajc">保额(元)</el-col>
  384. <el-col class="u-f flex-1 u-f-ajc">绝对免赔率(%)</el-col>
  385. </el-row>
  386. <el-row class="u-f">
  387. <el-col class="u-f flex-1 u-f-ac">
  388. <el-checkbox @change="changeKind($event,'0',insureListForm[0].kindCode)" :checked="insureListForm[0].checked" v-model="insureListForm[0].checked">{{insureListForm[0].kindName}}</el-checkbox>
  389. </el-col>
  390. <el-col class="u-f flex-1 u-f-ajc">
  391. <el-select @change="changeKindValue($event,'0',insureListForm[0].kindCode)" size="mini" v-model="insureListForm[0].amount" placeholder="请选择">
  392. <el-option :label="item.label" :value="item.value" v-for="(item,index) in insureListForm[0].amtList" :key="index"></el-option>
  393. </el-select>
  394. </el-col>
  395. <el-col class="u-f flex-1 u-f-ajc">
  396. <el-select :disabled="!insureListForm[0].checked" @change="changeKindValue($event,'5',insureListForm[5].kindCode)" size="mini" v-model="insureListForm[5].amount" placeholder="请选择">
  397. <el-option :label="item.label" :value="item.value" v-for="(item,index) in insureListForm[5].amtList" :key="index"></el-option>
  398. </el-select>
  399. </el-col>
  400. </el-row>
  401. <el-row class="u-f">
  402. <el-col class="u-f flex-1 u-f-ac">
  403. <el-checkbox @change="changeKind($event,'1',insureListForm[1].kindCode)" :checked="insureListForm[1].checked" v-model="insureListForm[1].checked">{{insureListForm[1].kindName}}</el-checkbox>
  404. </el-col>
  405. <el-col class="u-f flex-1 u-f-ajc">
  406. <el-select @change="changeKindValue($event,'1',insureListForm[1].kindCode)" size="mini" v-model="insureListForm[1].amount" placeholder="请选择">
  407. <el-option :label="item.label" :value="item.value" v-for="(item,index) in insureListForm[1].amtList" :key="index"></el-option>
  408. </el-select>
  409. </el-col>
  410. <el-col class="u-f flex-1 u-f-ajc">
  411. <el-select :disabled="!insureListForm[1].checked" @change="changeKindValue($event,'6',insureListForm[6].kindCode)" size="mini" v-model="insureListForm[6].amount" placeholder="请选择">
  412. <el-option :label="item.label" :value="item.value" v-for="(item,index) in insureListForm[6].amtList" :key="index"></el-option>
  413. </el-select>
  414. </el-col>
  415. </el-row>
  416. <el-row class="u-f">
  417. <el-col class="u-f flex-1 u-f-ac">
  418. <el-checkbox @change="changeKind($event,'2',insureListForm[2].kindCode)" :checked="insureListForm[2].checked" v-model="insureListForm[2].checked">{{insureListForm[2].kindName}}</el-checkbox>
  419. </el-col>
  420. <el-col class="u-f flex-1 u-f-ajc">
  421. <el-select @change="changeKindValue($event,'2',insureListForm[2].kindCode)" size="mini" v-model="insureListForm[2].amount" placeholder="请选择">
  422. <el-option :label="item.label" :value="item.value" v-for="(item,index) in insureListForm[2].amtList" :key="index"></el-option>
  423. </el-select>
  424. </el-col>
  425. <el-col class="u-f flex-1 u-f-ajc">
  426. <el-select :disabled="!insureListForm[2].checked" @change="changeKindValue($event,'7',insureListForm[7].kindCode)" size="mini" v-model="insureListForm[7].amount" placeholder="请选择">
  427. <el-option :label="item.label" :value="item.value" v-for="(item,index) in insureListForm[7].amtList" :key="index"></el-option>
  428. </el-select>
  429. </el-col>
  430. </el-row>
  431. <el-row class="u-f">
  432. <el-col class="u-f flex-1 u-f-ac">
  433. <el-checkbox @change="changeKind($event,'3',insureListForm[3].kindCode)" :checked="insureListForm[3].checked" v-model="insureListForm[3].checked">{{insureListForm[3].kindName}}</el-checkbox>
  434. </el-col>
  435. <el-col class="u-f flex-1 u-f-ajc">
  436. <el-select @change="changeKindValue($event,'3',insureListForm[3].kindCode)" size="mini" v-model="insureListForm[3].amount" placeholder="请选择">
  437. <el-option :label="item.label" :value="item.value" v-for="(item,index) in insureListForm[3].amtList" :key="index"></el-option>
  438. </el-select>
  439. </el-col>
  440. <el-col class="u-f flex-1 u-f-ajc">
  441. <el-select :disabled="!insureListForm[3].checked" @change="changeKindValue($event,'8',insureListForm[8].kindCode)" size="mini" v-model="insureListForm[8].amount" placeholder="请选择">
  442. <el-option :label="item.label" :value="item.value" v-for="(item,index) in insureListForm[8].amtList" :key="index"></el-option>
  443. </el-select>
  444. </el-col>
  445. </el-row>
  446. <el-row class="u-f" v-if="insureListForm[0].checked">
  447. <el-col class="u-f flex-1 u-f-ac">
  448. <el-checkbox @change="changeKind($event,'4',insureListForm[4].kindCode)" :checked="insureListForm[4].checked" v-model="insureListForm[4].checked">{{insureListForm[4].kindName}}(车损附加险)</el-checkbox>
  449. </el-col>
  450. <el-col class="u-f flex-1 u-f-ajc">
  451. <el-select @change="changeKindValue($event,'4',insureListForm[4].kindCode)" size="mini" v-model="insureListForm[4].amount" placeholder="请选择">
  452. <el-option :label="item.label" :value="item.value" v-for="(item,index) in insureListForm[4].amtList" :key="index"></el-option>
  453. </el-select>
  454. </el-col>
  455. <el-col class="u-f flex-1 u-f-ajc"></el-col>
  456. </el-row>
  457. <el-row class="u-f" v-if="insureListForm[1].checked">
  458. <el-col class="u-f flex-1 u-f-ac">
  459. <el-checkbox @change="changeKind($event,'9',insureListForm[9].kindCode)" :checked="insureListForm[9].checked" v-model="insureListForm[9].checked">{{insureListForm[9].kindName}}(三者附加险)</el-checkbox>
  460. </el-col>
  461. <el-col class="u-f flex-1 u-f-ajc">
  462. <el-select size="mini" v-model="insureListForm[9].amount" placeholder="请选择">
  463. <el-option :label="item.label" :value="item.value" v-for="(item,index) in insureListForm[9].amtList" :key="index"></el-option>
  464. </el-select>
  465. </el-col>
  466. <el-col class="u-f flex-1 u-f-ajc"></el-col>
  467. </el-row>
  468. </el-row>
  469. </el-form>
  470. </el-row>
  471. </el-row>
  472. </div>
  473. </el-card>
  474. <el-card>
  475. <el-row class="header">
  476. <el-col>报价公司</el-col>
  477. </el-row>
  478. <el-divider></el-divider>
  479. <div>
  480. <el-row class="u-f-ac bodyTitle">
  481. <label>选择报价公司</label>
  482. <label style="font-size:12px;font-weight: normal;" v-if="!isHistoryOrder">
  483. <el-checkbox :checked="chooseTotalCompany" v-model="chooseTotalCompany" @change="changeChooseTotalCompany">全选</el-checkbox>(至少选择一家报价)
  484. </label>
  485. </el-row>
  486. <el-row class="body">
  487. <el-row class="quoteCompany">
  488. <el-checkbox-group v-model="quoteCompanyList" :min="1">
  489. <el-checkbox :disabled="item.code == 'tianan'" :label="item.code" v-for="(item,index) in totalCompanyList" :key="index">{{item.name}}</el-checkbox>
  490. </el-checkbox-group>
  491. </el-row>
  492. </el-row>
  493. </div>
  494. </el-card>
  495. <el-row class="u-f-ajc" style="margin: 20px 0;" v-if="isNewOrder">
  496. <el-button type="primary" @click="quote">计算保费</el-button>
  497. <!-- <el-button @click="showIframe(global.baseUrl.split(':80')[0]+':8091/#/pages/carInsure/quoteDetail?orderno=1410512434299760640')" type="primary" style="margin-left: 16px;">
  498. 点我打开
  499. </el-button> -->
  500. </el-row>
  501. <el-card v-if="(isNewOrder && showResult) || isHistoryOrder">
  502. <el-row class="header">
  503. <el-col>报价结果</el-col>
  504. </el-row>
  505. <el-divider></el-divider>
  506. <el-row class="body">
  507. <el-row style="border-bottom: 1px solid #DDDDDD;padding-bottom: 10px;background: #F0F0F0;height: 50px;">
  508. <el-col class="u-f-ajc" style="height: 50px;" :span="5">订单号</el-col>
  509. <el-col class="u-f-ajc" style="height: 50px;" :span="3">报价公司</el-col>
  510. <el-col class="u-f-ajc" style="height: 50px;" :span="3">交强险</el-col>
  511. <el-col class="u-f-ajc" style="height: 50px;" :span="3">车船税</el-col>
  512. <el-col class="u-f-ajc" style="height: 50px;" :span="3">商业险</el-col>
  513. <el-col class="u-f-ajc" style="height: 50px;" :span="3">总价</el-col>
  514. <el-col class="u-f-ajc" style="height: 50px;" :span="2">信息</el-col>
  515. <el-col class="u-f-ajc" style="height: 50px;" :span="2">操作</el-col>
  516. </el-row>
  517. <el-row v-for="(item,index) in totalCompanyList" :key="index+'2'">
  518. <el-row v-for="(item1,index1) in quoteCompanyList" :key="index1" v-if="item.code == item1">
  519. <el-row class="u-f-ajc" style="height: 50px;">
  520. <el-col class="u-f-ajc" style="height: 50px;" :span="5">{{item.result.orderno}}</el-col>
  521. <el-col class="u-f-ajc" style="height: 50px;" :span="3">{{item.name}}</el-col>
  522. <el-col class="u-f-ajc" style="height: 50px;" :span="3">{{item.result.ciPermium}}</el-col>
  523. <el-col class="u-f-ajc" style="height: 50px;" :span="3">{{item.result.taxPermium}}</el-col>
  524. <el-col class="u-f-ajc" style="height: 50px;" :span="3">{{item.result.biPermium}}</el-col>
  525. <el-col class="u-f-ajc" style="height: 50px;" :span="3">{{item.result.sumPermium}}</el-col>
  526. <el-col class="u-f-ajc" style="height: 50px;" :span="2">
  527. <el-tooltip class="item" effect="dark" :content="item.msg" placement="top-end">
  528. <div class="u-f-ac" style="width: 120px; white-space:nowrap;height: 50px; overflow:hidden;text-overflow:ellipsis;">{{item.msg}}</div>
  529. </el-tooltip>
  530. </el-col>
  531. <el-col class="u-f-ajc" style="height: 50px;" :span="2">
  532. <div class="u-f-ajc" style="color: #0086B3;cursor: pointer;" @click="item.showInsureList=!item.showInsureList">{{item.showInsureList?"收起":"展开"}}</div>
  533. </el-col>
  534. </el-row>
  535. <template v-if="item.showInsureList">
  536. <el-row style="margin: 0px 40px;">
  537. <el-row class="u-f-ac" style="border-bottom: 1px solid #DDDDDD;height:40px;margin-bottom: 0;background: #F3F3F3;">
  538. <el-col :span="8" class="u-f-ajc">险种名称</el-col>
  539. <el-col :span="8" class="u-f-ajc">保额</el-col>
  540. <el-col :span="8" class="u-f-ajc">保费</el-col>
  541. </el-row>
  542. <el-row class="u-f-ac" style="border-bottom: 1px solid #DDDDDD;height:40px;margin-bottom: 0;" v-if="item.result.ciPermium>0" >
  543. <el-col :span="8" class="u-f-ajc">交强险</el-col>
  544. <el-col :span="8" class="u-f-ajc">投保</el-col>
  545. <el-col :span="8" class="u-f-ajc">{{item.result.ciPermium}}</el-col>
  546. </el-row>
  547. <el-row class="u-f-ac" style="border-bottom: 1px solid #DDDDDD;height:40px;margin-bottom: 0;" v-if="item.result.ciPermium>0" >
  548. <el-col :span="8" class="u-f-ajc">车船税</el-col>
  549. <el-col :span="8" class="u-f-ajc">投保</el-col>
  550. <el-col :span="8" class="u-f-ajc">{{item.result.taxPermium}}</el-col>
  551. </el-row>
  552. <el-row class="u-f-ac" style="border-bottom: 1px solid #DDDDDD;height:40px;margin-bottom: 0;" v-for="(insureItem,insureIndex) in item.result.kindList" :key="insureIndex" v-if="insureItem.amount>0">
  553. <el-col :span="8" class="u-f-ajc">{{insureItem.kindName}}</el-col>
  554. <el-col :span="8" class="u-f-ajc" v-for="(amtItem,amtIndex) in insureItem.amtList" :key="amtIndex" v-if="amtItem.value == insureItem.amount">{{amtItem.label}}</el-col>
  555. <el-col :span="8" class="u-f-ajc">{{insureItem.coveragePremium}}</el-col>
  556. </el-row>
  557. <el-row v-if="item.quoteCode=='200'" class="u-f-je" style="margin-top: 15px;">
  558. <el-button type="primary" @click="showIframe(process.env.BASE_URL.split(':80')[0]+':8091/#/pages/carInsure/quoteDetail?orderno='+item.result.orderno)">报价详情</el-button>
  559. </el-row>
  560. </el-row>
  561. </template>
  562. </el-row>
  563. </el-row>
  564. </el-row>
  565. </el-card>
  566. <el-card id="demo6" v-if="(orderStatus!='')">
  567. <el-row class="header">
  568. <el-col>影像</el-col>
  569. </el-row>
  570. <el-divider></el-divider>
  571. <div style="margin-bottom: 10px;">
  572. <el-row class="u-f-ac bodyTitle" style="margin-bottom:0 ;"><label @click="pic1Control = !pic1Control">行驶证影像</label></el-row>
  573. <el-row class="body" v-show="pic1Control" >
  574. <el-row class="u-f">
  575. <viewer :images="carImageList">
  576. <div v-for="(imageItem,imageIndex) in carImageList" :key="imageIndex" style="position: relative;display: inline-block;">
  577. <img class="imageStyle" :src="imageItem">
  578. <div class="delImgIcon d-flex u-f-ajc" @click="delCheckImage('car',imageIndex)" >×</div>
  579. </div>
  580. </viewer>
  581. <el-upload
  582. :disabled="!((orderStatus=='0') || (orderStatus == '3')) "
  583. class="avatar-uploader"
  584. action=""
  585. name="carImageList"
  586. :show-file-list="false"
  587. :http-request="httpRequest"
  588. :before-upload="beforeAvatarUpload">
  589. <i class="el-icon-plus avatar-uploader-icon"></i>
  590. </el-upload>
  591. </el-row>
  592. </el-row>
  593. </div>
  594. <div style="margin-bottom: 10px;">
  595. <el-row class="u-f-ac bodyTitle" style="margin-bottom:0 ;"><label @click="pic2Control = !pic2Control">车主身份证影像</label></el-row>
  596. <el-row class="body" v-show="pic2Control">
  597. <el-row class="u-f">
  598. <viewer :images="ownerImageList" >
  599. <div v-for="(imageItem,imageIndex) in ownerImageList" :key="imageIndex" style="position: relative;display: inline-block;">
  600. <img class="imageStyle" :src="imageItem">
  601. <div class="delImgIcon d-flex u-f-ajc" @click="delCheckImage('owner',imageIndex)" >×</div>
  602. </div>
  603. </viewer>
  604. <el-upload
  605. :disabled="!((orderStatus=='0') || (orderStatus == '3')) "
  606. class="avatar-uploader"
  607. action=""
  608. name="ownerImageList"
  609. :show-file-list="false"
  610. :http-request="httpRequest"
  611. :before-upload="beforeAvatarUpload">
  612. <i class="el-icon-plus avatar-uploader-icon"></i>
  613. </el-upload>
  614. </el-row>
  615. </el-row>
  616. </div>
  617. <div style="margin-bottom: 10px;">
  618. <el-row class="u-f-ac bodyTitle" style="margin-bottom:0 ;"><label @click="pic3Control = !pic3Control">投保人身份证影像</label></el-row>
  619. <el-row class="body" v-show="pic3Control">
  620. <el-row class="u-f">
  621. <viewer :images="policyImageList">
  622. <div v-for="(imageItem,imageIndex) in policyImageList" :key="imageIndex" style="position: relative;display: inline-block;">
  623. <img class="imageStyle" :src="imageItem">
  624. <div class="delImgIcon d-flex u-f-ajc" @click="delCheckImage('policy',imageIndex)" >×</div>
  625. </div>
  626. </viewer>
  627. <el-upload
  628. :disabled="!((orderStatus=='0') || (orderStatus == '3')) "
  629. class="avatar-uploader"
  630. action=""
  631. name="policyImageList"
  632. :show-file-list="false"
  633. :http-request="httpRequest"
  634. :before-upload="beforeAvatarUpload">
  635. <i class="el-icon-plus avatar-uploader-icon"></i>
  636. </el-upload>
  637. </el-row>
  638. </el-row>
  639. </div>
  640. <div style="margin-bottom: 10px;">
  641. <el-row class="u-f-ac bodyTitle" style="margin-bottom:0 ;"><label @click="pic4Control = !pic4Control">被保人身份证影像</label></el-row>
  642. <el-row class="body" v-show="pic4Control">
  643. <el-row class="u-f">
  644. <viewer :images="insuredImageList">
  645. <div v-for="(imageItem,imageIndex) in insuredImageList" :key="imageIndex" style="position: relative;display: inline-block;">
  646. <img class="imageStyle" :src="imageItem">
  647. <div class="delImgIcon d-flex u-f-ajc" @click="delCheckImage('insured',imageIndex)" >×</div>
  648. </div>
  649. </viewer>
  650. <el-upload
  651. :disabled="!((orderStatus=='0') || (orderStatus == '3')) "
  652. class="avatar-uploader"
  653. action=""
  654. name="insuredImageList"
  655. :show-file-list="false"
  656. :http-request="httpRequest"
  657. :before-upload="beforeAvatarUpload">
  658. <i class="el-icon-plus avatar-uploader-icon"></i>
  659. </el-upload>
  660. </el-row>
  661. </el-row>
  662. </div>
  663. <div style="margin-bottom: 10px;">
  664. <el-row class="u-f-ac bodyTitle" style="margin-bottom:0 ;"><label @click="pic5Control = !pic5Control">验车照影像</label></el-row>
  665. <el-row class="body" v-show="pic5Control">
  666. <el-row class="u-f">
  667. <viewer :images="carCheckImageList">
  668. <div v-for="(imageItem,imageIndex) in carCheckImageList" :key="imageIndex" style="position: relative;display: inline-block;">
  669. <img class="imageStyle" :src="imageItem">
  670. <div class="delImgIcon d-flex u-f-ajc" @click="delCheckImage('carCheck',imageIndex)" >×</div>
  671. </div>
  672. </viewer>
  673. <el-upload
  674. :disabled="!((orderStatus=='0') || (orderStatus == '3')) "
  675. class="avatar-uploader"
  676. action=""
  677. name="carCheckImageList"
  678. :show-file-list="false"
  679. :http-request="httpRequest"
  680. :before-upload="beforeAvatarUpload">
  681. <i class="el-icon-plus avatar-uploader-icon"></i>
  682. </el-upload>
  683. </el-row>
  684. </el-row>
  685. </div>
  686. </el-card>
  687. <el-row class="u-f-ajc" style="margin: 20px 0;" v-if="(orderStatus=='0') || (orderStatus == '3')">
  688. <el-button type="primary" @click="submit(orderId)">提交核保</el-button>
  689. </el-row>
  690. <el-card id="demo9" v-if="orderStatus>=2">
  691. <el-row class="header">
  692. <el-col>配送信息</el-col>
  693. </el-row>
  694. <el-divider></el-divider>
  695. <el-row class="u-f-ac bodyTitle" style="margin-bottom:0 ;"><label>保单形式</label></el-row>
  696. <el-row class="body">
  697. <el-row style="margin-left: 60px;">
  698. <el-radio-group v-model="policytype" :disabled="!(orderStatus=='2') ">
  699. <el-radio label="纸质">纸质</el-radio>
  700. <el-radio label="电子">电子</el-radio>
  701. </el-radio-group>
  702. </el-row>
  703. </el-row>
  704. <template v-if="policytype=='纸质'">
  705. <el-row class="u-f-ac bodyTitle" style="margin-bottom:0 ;"><label>配送方式</label></el-row>
  706. <el-row class="body">
  707. <el-row style="margin-left: 60px;">
  708. <el-radio-group v-model="mailtype" :disabled="!(orderStatus=='2') ">
  709. <el-radio label="邮寄">邮寄</el-radio>
  710. <!-- <el-radio label="网点自取">网点自取</el-radio> -->
  711. </el-radio-group>
  712. </el-row>
  713. </el-row>
  714. </template>
  715. <template v-if="(policytype=='电子') || (policytype=='纸质' && mailtype=='邮寄' )">
  716. <el-row class="u-f-ac bodyTitle" style="margin-bottom:0 ;"><label>配送信息</label></el-row>
  717. <el-row class="body">
  718. <template v-if="policytype=='电子'">
  719. <el-row>
  720. <el-col :span="2">
  721. <label>邮箱地址</label>
  722. </el-col>
  723. <el-col :span="3">
  724. <el-input size="medium" v-model="email" :disabled="!(orderStatus=='2') "></el-input>
  725. </el-col>
  726. </el-row>
  727. </template>
  728. <template v-if="policytype=='纸质' && mailtype=='邮寄' ">
  729. <el-row>
  730. <el-col :span="2">
  731. <label>收件人</label>
  732. </el-col>
  733. <el-col :span="3">
  734. <el-input size="medium" v-model="receiptname" :disabled="!(orderStatus=='2') "></el-input>
  735. </el-col>
  736. <el-col :span="3">
  737. <label>手机号</label>
  738. </el-col>
  739. <el-col :span="3">
  740. <el-input size="medium" v-model="receiptphone" :disabled="!(orderStatus=='2') "></el-input>
  741. </el-col>
  742. <el-col :span="3">
  743. <label>配送地址</label>
  744. </el-col>
  745. <el-col :span="3">
  746. <el-input size="medium" v-model="mailAddress" :disabled="!(orderStatus=='2') "></el-input>
  747. </el-col>
  748. </el-row>
  749. </template>
  750. </el-row>
  751. </template>
  752. </el-card>
  753. <el-row class="u-f-ajc" style="margin: 20px 0;" v-if="orderStatus=='2'">
  754. <el-button type="primary" @click="onPayComfirm(orderId)">去线上支付</el-button>
  755. </el-row>
  756. <el-card id="demo8" v-if="(orderStatus>=2) && (orderStatus!=99)">
  757. <el-row class="header">
  758. <el-col>投保单号</el-col>
  759. </el-row>
  760. <el-divider></el-divider>
  761. <el-row class="u-f-ac bodyTitle" v-if="orderStatus>=2"><label>投保单号</label></el-row>
  762. <el-row class="body" v-if="orderStatus>=2">
  763. <el-row>
  764. <el-col :span="2" v-if="!!jqapplyno">
  765. <label>交强险投保单号</label>
  766. </el-col>
  767. <el-col :span="3" v-if="!!jqapplyno">
  768. <el-input disabled size="medium" v-model="jqapplyno"></el-input>
  769. </el-col>
  770. <el-col :span="3" v-if="!!syapplyno">
  771. <label>商业险投保单号</label>
  772. </el-col>
  773. <el-col :span="3" v-if="!!syapplyno">
  774. <el-input disabled size="medium" v-model="syapplyno"></el-input>
  775. </el-col>
  776. </el-row>
  777. </el-row>
  778. <el-row class="u-f-ac bodyTitle" v-if="orderStatus>=6"><label>保单号</label></el-row>
  779. <el-row class="body" v-if="orderStatus>=6">
  780. <el-row>
  781. <el-col :span="2" v-if="!!jqpolicyno">
  782. <label>交强险保单号</label>
  783. </el-col>
  784. <el-col :span="3" v-if="!!jqpolicyno">
  785. <el-input disabled size="medium" v-model="jqpolicyno"></el-input>
  786. </el-col>
  787. <el-col :span="3" v-if="!!sypolicyno">
  788. <label>商业险保单号</label>
  789. </el-col>
  790. <el-col :span="3" v-if="!!sypolicyno">
  791. <el-input disabled size="medium" v-model="sypolicyno"></el-input>
  792. </el-col>
  793. </el-row>
  794. </el-row>
  795. </el-card>
  796. <el-row class="u-f-ajc" style="margin: 20px 0;" v-if="orderStatus=='5'">
  797. <el-button type="primary" @click="showIframe(process.env.BASE_URL.split(':80')[0]+':8091/#/pages/carInsure/payCode?orderno='+orderId)">生成缴费二维码</el-button>
  798. </el-row>
  799. <el-card id="demo10" v-if="orderStatus>6">
  800. <el-row class="header">
  801. <el-col>电子保单</el-col>
  802. </el-row>
  803. <el-divider></el-divider>
  804. <el-row class="u-f-ac bodyTitle"><label>电子保单管理</label></el-row>
  805. <el-row class="body">
  806. <el-row v-for="(oldfileItem,oldfileIndex) in oldfileList" :key="oldfileIndex" >
  807. <el-col :span="2">
  808. <label>电子保单{{oldfileIndex+1}}:</label>
  809. </el-col>
  810. <el-col :span="6" class="u-f u-f-column">
  811. <el-row>
  812. <div class="u-f u-f-jsb u-f-ac" style="width: 250px;">
  813. <div style="height: 36px;line-height: 36px; width: 200px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" >{{oldfileItem.originalfilename}}</div>
  814. <el-button style="cursor: pointer;" type="text" @click="viewfile(oldfileIndex,'oldfileList')">下载</el-button>
  815. </div>
  816. </el-row>
  817. </el-col>
  818. </el-row>
  819. </el-row>
  820. </el-card>
  821. </el-row>
  822. <el-dialog
  823. title="请选择车型"
  824. :visible.sync="carTypeDialogVisible"
  825. width="1000px"
  826. :before-close="carTypeHandleDialogBefore">
  827. <el-table :data="carTypeList" stripe style="width: 100%">
  828. <el-table-column prop="carseriesname" label="车系" min-width="100"></el-table-column>
  829. <el-table-column prop="modelname" label="车型名称" min-width="180"></el-table-column>
  830. <el-table-column prop="transmissiontype" label="档位" min-width="100"></el-table-column>
  831. <el-table-column prop="caryear" label="年款" min-width="80"></el-table-column>
  832. <el-table-column prop="seatmax" label="座位数" min-width="80"></el-table-column>
  833. <el-table-column prop="purchaseprice" label="新车购置价" min-width="180"></el-table-column>
  834. <el-table-column prop="purchaseprice" label="操作" min-width="180">
  835. <template slot-scope="scope">
  836. <el-button size="mini" type="primary" @click="carTypeHandle(scope)">选择</el-button>
  837. </template>
  838. </el-table-column>
  839. </el-table>
  840. <span slot="footer" class="dialog-footer">
  841. <el-button size="small" @click="carTypeDialogVisible = false">取 消</el-button>
  842. </span>
  843. </el-dialog>
  844. <el-drawer
  845. title="我是标题"
  846. :visible.sync="drawerVisible"
  847. :with-header="false"
  848. :show-close="false"
  849. size="460px"
  850. class="u-f u-f-ajc">
  851. <iframe style="width: 375px;min-height: 667px;margin:60px 40px;height: auto;" :src="iframeSrc" scrolling="auto" frameborder="0'" class="iframe"></iframe>
  852. </el-drawer>
  853. </el-container>
  854. </template>
  855. <script>
  856. import Cookies from "js-cookie"
  857. var dateTime = new Date();
  858. dateTime.setTime(dateTime.getTime()+24*60*60*1000);
  859. var tomorrow = dateTime.getFullYear()+"-" +(((dateTime.getMonth()+1)<10)?("0"+(dateTime.getMonth()+1)):(dateTime.getMonth()+1))+ "-" + ((dateTime.getDate()<10)?("0"+dateTime.getDate()):dateTime.getDate());
  860. export default {
  861. data() {
  862. return {
  863. oldfileList:[],
  864. jqapplyno:'',
  865. syapplyno:'',
  866. jqpolicyno:'',
  867. sypolicyno:'',
  868. email:"",
  869. paytype:"线上缴费",//缴费方式
  870. policytype:"电子",//保单类型
  871. mailtype:"邮寄",
  872. receiptname:"",//邮寄地址名字
  873. receiptphone:"",//邮寄地址电话
  874. mailAddress:"",//邮寄地址
  875. carImageList:[],//车辆影像
  876. ownerImageList:[],//车主影像
  877. policyImageList:[],//投保人影像
  878. insuredImageList:[],//被保人影像
  879. carCheckImageList:[],//验车照影像
  880. // 影像控制
  881. pic1Control:false,
  882. pic2Control:false,
  883. pic3Control:false,
  884. pic4Control:false,
  885. pic5Control:false,
  886. orderId:'',
  887. isHistoryOrder:false,
  888. isNewOrder:true,
  889. inscompany:'',
  890. historyActive:0,
  891. orderStatus:'',
  892. orderQueryForm:{
  893. orderno:'',
  894. id:'',
  895. licenseNo:'',
  896. orderstatus:'0'
  897. },
  898. queryOrdersList:[],
  899. drawerVisible:false,
  900. iframeSrc:'',
  901. jqchecked:false,
  902. sychecked:false,
  903. syTimePicker:'',
  904. jqTimePicker:'',
  905. timePickerStart:'',
  906. carTypeDialogVisible:false,
  907. deptId:"",
  908. companyList:[], //机构下拉列表
  909. personList:[],
  910. userId:"",
  911. personInfo:{},
  912. deptInfo:{},
  913. quoteno:'',
  914. peopleid:"",
  915. carInfo: {
  916. licenseNo: "",//车牌号
  917. brandName:"",//车辆品牌型号
  918. vinNo:"",//车架号
  919. engineNo: "", //发动机号
  920. modelCode: "",//车型编码
  921. seatCount: "0",//核定载客量 核定载人数
  922. purchasePrice: "0", //新车购置价最低,行业实际价值,协商价值
  923. carBrand:"", //车型品牌
  924. ciCarName:"",//行业车型名称
  925. ciModelCode:"",//行业车型编码
  926. completeKerbMass:"",//整备质量
  927. exhaustScale:"",//排量
  928. factory:"",//工厂名称
  929. factoryid:"",//工厂编码
  930. frameNo: "", //车架号
  931. licenseTypeCode: "02", //号牌种类
  932. vehicleclass:"",//车辆类型
  933. familyName:"",//车型
  934. modelcname:"",//车型名称
  935. powertypecode:"",//燃料类型编码
  936. vehicleweight:"",//总质量
  937. limitLoad:"",//核定载质量
  938. caryear:"0",//年款
  939. cimodelclass:"",//车辆种类
  940. powertype:"汽油",//燃料类型
  941. enginedesc:"",//排量
  942. registerDate: "",//注册日期
  943. issueDate: "",//发证日期
  944. transferFlag: 0,//过户标志
  945. transferDate:"",
  946. loanStatus:0,//贷款标志
  947. firstBeneMan:"",//第一受益人
  948. noLicenseFlag: false,//是否新车
  949. cartype: "A0", //客车A0 货车H0          
  950. carnature: "8A", //使用性质 家庭自用8A 非营业企业8B 非营业党政机关,事业团体8C 非营业货车8D
  951. property:"1"//所属性质 1个人 2企业 3个人
  952. },
  953. carRules:{
  954. licenseNo: [
  955. { required: true,message: '请输入车牌号码', trigger: 'blur' },
  956. {pattern: /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4,5}[A-Z0-9挂学警港澳]{1}$/,message: '请输入正确的车牌号'}],
  957. brandName:[{required: true,message: '请输入品牌型号', trigger: 'blur'}],
  958. vinNo:[{required: true,message: '请输入车辆识别码',trigger: 'blur'},
  959. {pattern: /^([0-9A-Z]){17}$/,message: '请输入正确的车辆识别码'}],
  960. engineNo:[{required: true,message: '请输入发动机号', trigger: 'blur'}],
  961. registerDate:[{required: true,message: '请选择注册日期', trigger: 'blur'}],
  962. issueDate:[{required: true,message: '请选择发证日期', trigger: 'blur'}]
  963. },
  964. personRules:{
  965. name:[{required: true,message: '请输入姓名', trigger: 'blur'},{pattern: /^([\u4e00-\u9fa5]{1,6}|[a-zA-Z\.\s]{1,6})$/,message: '请输入正确的姓名'}],
  966. identifyNumber:[{required: true,message: '请输入证件号', trigger: 'blur'},,{pattern: /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X|x)$/,message: '请输入正确的证件号'}],
  967. mobile:[{required: true,message: '请输入手机号', trigger: 'blur'},{pattern: /^1[3456789]\d{9}$/,message: '请输入正确的手机号'}],
  968. addr:[{required: true,message: '请输入地址', trigger: 'blur'}],
  969. },
  970. checkImage:"",//识别的图片base64
  971. checkInfo:{},//校验信息数据
  972. ownerInfo: {
  973. name:"",
  974. identifyType:"01",
  975. identifyNumber:"",
  976. addr:"",
  977. email:"",
  978. mobile:""
  979. },
  980. policyHolderInfo: {
  981. name:"",
  982. identifyType:"01",
  983. identifyNumber:"",
  984. addr:"",
  985. email:"",
  986. mobile:""
  987. },
  988. insuredPersonInfo: {
  989. name:"",
  990. identifyType:"01",
  991. identifyNumber:"",
  992. addr:"",
  993. email:"",
  994. mobile:""
  995. },
  996. holderAndOwner:false,
  997. insuredAndOwner:false,
  998. CIStartDate:tomorrow+' 00:00',
  999. CIEndDate:'',
  1000. CIChoose:true,
  1001. BIStartDate:tomorrow+' 00:00',
  1002. BIEndDate:'',
  1003. BIChoose:true,
  1004. kindList:[
  1005. {"amount":'1',"kindCode":"A","kindName":"机动车损失险"},
  1006. {"amount":"1000000","kindCode":"B","kindName":"第三者责任险"},
  1007. {"amount":"10000","kindCode":"D3","kindName":"司机责任险"},
  1008. {"unitAmount":"10000","kindCode":"D4","kindName":"乘客责任险"},
  1009. ],
  1010. riskList:[
  1011. {"amount":"200000","premium":"0","riskCode":"0507","startDate":this.CIStartDate,"endDate":this.CIEndDate,"instantFlag":"0"},
  1012. {"startDate":'',"endDate":'',"quotePreceptName":"","quotePreceptCode":"","instantFlag":"0","premium":"0","riskCode":"0510"}],
  1013. chooseKindList:['A','B','D3','D4'],
  1014. insureListForm:[],//险种信息的原始版本,当回写时使用
  1015. showInsureList:false,
  1016. totalCompanyList: [
  1017. // {
  1018. // showInsureList:false,
  1019. // name: "华农财险",
  1020. // code: "huanong",
  1021. // quoteCode: "0",
  1022. // quoteStatus: "掌柜正在为您报价,请稍等......",
  1023. // msg: "",
  1024. // result: {}
  1025. // },
  1026. {
  1027. showInsureList:false,
  1028. name: "天安财险",
  1029. code: "tianan",
  1030. quoteCode: "0",
  1031. quoteStatus: "掌柜正在为您报价,请稍等......",
  1032. msg: "",
  1033. result: {}
  1034. },
  1035. {
  1036. showInsureList:false,
  1037. name: "中煤财险",
  1038. code: "zhongmei",
  1039. quoteCode: "0",
  1040. quoteStatus: "掌柜正在为您报价,请稍等......",
  1041. msg: "",
  1042. result: {}
  1043. },
  1044. {
  1045. showInsureList:false,
  1046. name: "恒邦财险",
  1047. code: "hengbang",
  1048. quoteCode: "0",
  1049. quoteStatus: "掌柜正在为您报价,请稍等......",
  1050. msg: "",
  1051. result: {}
  1052. }
  1053. ],
  1054. chooseTotalCompany:false,
  1055. quoteCompanyList:["tianan"],
  1056. // quoteCompanyList:["huanong","hengbang","zhongmei","tianan"],
  1057. carTypeList:[],
  1058. showResult:false
  1059. }
  1060. },
  1061. async created() {
  1062. this.peopleid = Cookies.get('user');
  1063. if(this.peopleid!='admin'){
  1064. this.peopledeptid = Cookies.get('user').split('D')[0];
  1065. }else{
  1066. this.peopledeptid = '9';
  1067. }
  1068. await this.getAllPerson();
  1069. await this.getAllCompany();
  1070. var query=this.$route.query;
  1071. if(!!query.id){
  1072. this.isUserOrder = true;
  1073. this.userId = query.id;
  1074. this.peopleInfoChange(this.userId);
  1075. }
  1076. this.CIEndDate=this.oneYearPast1(this.CIStartDate)
  1077. this.BIEndDate=this.oneYearPast1(this.BIStartDate)
  1078. this.insureListForm = JSON.parse(JSON.stringify(this.global.insureList1))
  1079. this.insureListForm[0].checked=true;
  1080. this.insureListForm[0].amount='1';
  1081. this.insureListForm[1].checked=true;
  1082. this.insureListForm[1].amount='1000000';
  1083. this.insureListForm[2].checked=true;
  1084. this.insureListForm[2].amount='10000';
  1085. this.insureListForm[3].checked=true;
  1086. this.insureListForm[3].amount='10000';
  1087. for(let i=0;i<this.riskList.length;i++){
  1088. if(this.riskList[i].riskCode=='0507'){
  1089. this.riskList[i].startDate = this.CIStartDate
  1090. this.riskList[i].endDate =this.CIEndDate
  1091. }else if(this.riskList[i].riskCode=='0510'){
  1092. this.riskList[i].startDate = this.BIStartDate
  1093. this.riskList[i].endDate =this.BIEndDate
  1094. }
  1095. }
  1096. },
  1097. watch:{
  1098. isNewOrder(){
  1099. if(this.isNewOrder){
  1100. this.oldfileList = [];
  1101. this.jqapplyno='';
  1102. this.syapplyno='';
  1103. this.jqpolicyno='';
  1104. this.sypolicyno='';
  1105. this.email="";
  1106. this.paytype="线上缴费";//缴费方式
  1107. this.policytype="电子";//保单类型
  1108. this.mailtype="邮寄";
  1109. this.receiptname="";//邮寄地址名字
  1110. this.receiptphone="";//邮寄地址电话
  1111. this.mailAddress="";//邮寄地址
  1112. this.carImageList=[];
  1113. this.ownerImageList=[];//车主影像
  1114. this.policyImageList=[];//投保人影像
  1115. this.insuredImageList=[];//被保人影像
  1116. this.carCheckImageList=[];//验车照影像
  1117. // 影像控制
  1118. this.pic1Control=false;
  1119. this.pic2Control=false;
  1120. this.pic3Control=false;
  1121. this.pic4Control=false;
  1122. this.pic5Control=false;
  1123. this.orderId = '';
  1124. this.orderStatus = '';
  1125. this.inscompany='';
  1126. this.userId = '';
  1127. this.personInfo={};
  1128. this.deptInfo={};
  1129. for(var key in this.carInfo){
  1130. this.carInfo[key]="";
  1131. }
  1132. this.carInfo.seatCount= "0";
  1133. this.carInfo.purchasePrice= "0";
  1134. this.carInfo.licenseTypeCode="02";
  1135. this.carInfo.caryear="0";//年款
  1136. this.carInfo.powertype="汽油";
  1137. this.carInfo.transferFlag=0;
  1138. this.carInfo.loanStatus=0;
  1139. this.carInfo.noLicenseFlag= false;
  1140. this.carInfo.cartype="A0";         
  1141. this.carInfo.carnature="8A";
  1142. this.carInfo.property="1";
  1143. this.holderAndOwner=false,
  1144. this.insuredAndOwner=false,
  1145. this.ownerInfo={
  1146. name:"",
  1147. identifyType:"01",
  1148. identifyNumber:"",
  1149. addr:"",
  1150. email:"",
  1151. mobile:""
  1152. },
  1153. this.policyHolderInfo={
  1154. name:"",
  1155. identifyType:"01",
  1156. identifyNumber:"",
  1157. addr:"",
  1158. email:"",
  1159. mobile:""
  1160. },
  1161. this.insuredPersonInfo={
  1162. name:"",
  1163. identifyType:"01",
  1164. identifyNumber:"",
  1165. addr:"",
  1166. email:"",
  1167. mobile:""
  1168. },
  1169. this.riskList = [];
  1170. this.CIChoose = true;
  1171. this.BIChoose = true;
  1172. var dateTime2 = new Date();
  1173. dateTime2.setTime(dateTime2.getTime()+24*60*60*1000);
  1174. var tomorrow = dateTime2.getFullYear()+"-" +(((dateTime2.getMonth()+1)<10)?("0"+(dateTime2.getMonth()+1)):(dateTime2.getMonth()+1))+ "-" + ((dateTime2.getDate()<10)?("0"+dateTime2.getDate()):dateTime2.getDate());
  1175. this.CIStartDate = tomorrow+' 00:00';
  1176. this.BIStartDate = tomorrow+' 00:00';
  1177. this.CIEndDate=this.oneYearPast1(this.CIStartDate)
  1178. this.BIEndDate=this.oneYearPast1(this.BIStartDate)
  1179. this.insureListForm = JSON.parse(JSON.stringify(this.global.insureList1))
  1180. this.insureListForm[0].checked=true;
  1181. this.insureListForm[0].amount='1';
  1182. this.insureListForm[1].checked=true;
  1183. this.insureListForm[1].amount='1000000';
  1184. this.insureListForm[2].checked=true;
  1185. this.insureListForm[2].amount='10000';
  1186. this.insureListForm[3].checked=true;
  1187. this.insureListForm[3].amount='10000';
  1188. for(let i=0;i<this.riskList.length;i++){
  1189. if(this.riskList[i].riskCode=='0507'){
  1190. this.riskList[i].startDate = this.CIStartDate
  1191. this.riskList[i].endDate =this.CIEndDate
  1192. }else if(this.riskList[i].riskCode=='0510'){
  1193. this.riskList[i].startDate = this.BIStartDate
  1194. this.riskList[i].endDate =this.BIEndDate
  1195. }
  1196. }
  1197. this.totalCompanyList=[
  1198. // {
  1199. // showInsureList:false,
  1200. // name: "华农财险",
  1201. // code: "huanong",
  1202. // quoteCode: "0",
  1203. // quoteStatus: "掌柜正在为您报价,请稍等......",
  1204. // msg: "",
  1205. // result: {}
  1206. // },
  1207. {
  1208. showInsureList:false,
  1209. name: "天安财险",
  1210. code: "tianan",
  1211. quoteCode: "0",
  1212. quoteStatus: "掌柜正在为您报价,请稍等......",
  1213. msg: "",
  1214. result: {}
  1215. },
  1216. {
  1217. showInsureList:false,
  1218. name: "中煤财险",
  1219. code: "zhongmei",
  1220. quoteCode: "0",
  1221. quoteStatus: "掌柜正在为您报价,请稍等......",
  1222. msg: "",
  1223. result: {}
  1224. },
  1225. {
  1226. showInsureList:false,
  1227. name: "恒邦财险",
  1228. code: "hengbang",
  1229. quoteCode: "0",
  1230. quoteStatus: "掌柜正在为您报价,请稍等......",
  1231. msg: "",
  1232. result: {}
  1233. }
  1234. ];
  1235. }
  1236. this.isHistoryOrder = !this.isNewOrder;
  1237. },
  1238. jqchecked(){
  1239. if(this.jqchecked){
  1240. let hours = new Date().getHours()+1;
  1241. hours = hours<10?('0'+hours):hours;
  1242. this.timePickerStart = hours+':00';
  1243. this.$refs.jqTimePicker.focus();
  1244. }else{
  1245. var dateTime2 = new Date();
  1246. dateTime2.setTime(dateTime2.getTime()+24*60*60*1000);
  1247. var tomorrow = dateTime2.getFullYear()+"-" +(((dateTime2.getMonth()+1)<10)?("0"+(dateTime2.getMonth()+1)):(dateTime2.getMonth()+1))+ "-" + ((dateTime2.getDate()<10)?("0"+dateTime2.getDate()):dateTime2.getDate());
  1248. this.CIStartDate = tomorrow+' 00:00';
  1249. for (let i = 0; i < this.riskList.length; i++) {
  1250. if (this.riskList[i].riskCode == '0507') {
  1251. this.riskList[i].startDate = this.CIStartDate;
  1252. this.riskList[i].endDate = this.oneYearPast1(this.CIStartDate);
  1253. }
  1254. }
  1255. }
  1256. },
  1257. sychecked(){
  1258. if(this.sychecked){
  1259. let hours = new Date().getHours()+1;
  1260. hours = hours<10?('0'+hours):hours;
  1261. this.timePickerStart = hours+':00';
  1262. this.$refs.syTimePicker.focus();
  1263. }else{
  1264. var dateTime2 = new Date();
  1265. dateTime2.setTime(dateTime2.getTime()+24*60*60*1000);
  1266. var tomorrow = dateTime2.getFullYear()+"-" +(((dateTime2.getMonth()+1)<10)?("0"+(dateTime2.getMonth()+1)):(dateTime2.getMonth()+1))+ "-" + ((dateTime2.getDate()<10)?("0"+dateTime2.getDate()):dateTime2.getDate());
  1267. this.BIStartDate = tomorrow+' 00:00';
  1268. for (let i = 0; i < this.riskList.length; i++) {
  1269. if (this.riskList[i].riskCode == '0510') {
  1270. this.riskList[i].startDate = this.BIStartDate;
  1271. this.riskList[i].endDate = this.oneYearPast1(this.BIStartDate);
  1272. }
  1273. }
  1274. }
  1275. }
  1276. },
  1277. methods: {
  1278. //预览文件
  1279. viewfile(index,type){
  1280. var win = window.open();
  1281. win.document.write(
  1282. '<body style="margin:0px;"><object data="' + this[type][index].url +'" type="application/pdf" width="100%" height="100%"><iframe src="' +this[type][index].url +'" scrolling="no" width="100%" height="100%" frameborder="0" ></iframe></object></body>'
  1283. );
  1284. },
  1285. getOrderDetail(item){
  1286. this.oldfileList=[];
  1287. if(item.orderstatus>=6){
  1288. this.$api.task.queryUploadList(item.orderno).then((resUpload)=>{
  1289. this.oldfileList = resUpload.data;
  1290. })
  1291. }
  1292. this.jqapplyno =item.jqapplyno ;
  1293. this.syapplyno =item.syapplyno ;
  1294. this.jqpolicyno =item.jqpolicyno;
  1295. this.sypolicyno =item.sypolicyno;
  1296. this.email=item.mailaddress;
  1297. this.paytype="线上缴费";//缴费方式
  1298. this.policytype=item.policytype;//保单类型
  1299. this.mailtype=item.mailtype;
  1300. this.receiptname=item.receiptname;//邮寄地址名字
  1301. this.receiptphone=item.receiptphone;//邮寄地址电话
  1302. this.mailAddress=item.mailaddress;//邮寄地址
  1303. this.carImageList=[];
  1304. this.ownerImageList=[];//车主影像
  1305. this.policyImageList=[];//投保人影像
  1306. this.insuredImageList=[];//被保人影像
  1307. this.carCheckImageList=[];//验车照影像
  1308. // 影像控制
  1309. this.pic1Control=false;
  1310. this.pic2Control=false;
  1311. this.pic3Control=false;
  1312. this.pic4Control=false;
  1313. this.pic5Control=false;
  1314. this.orderId = item.orderno;
  1315. this.orderStatus = item.orderstatus;
  1316. this.userId = item.userid;
  1317. this.inscompany = item.inscompany;
  1318. this.peopleInfoChange(this.userId);
  1319. Object.assign(this.carInfo,item.carinfo)
  1320. if(this.carInfo.transferFlag){
  1321. this.carInfo.transferFlag = 1;
  1322. }else{
  1323. this.carInfo.transferFlag = 0;
  1324. }
  1325. this.holderAndOwner=false,
  1326. this.insuredAndOwner=false,
  1327. Object.assign(this.ownerInfo,item.ownerinfo)
  1328. Object.assign(this.policyHolderInfo,item.applyinfo)
  1329. Object.assign(this.insuredPersonInfo,item.insureinfo)
  1330. console.log(item.orderstatus)
  1331. if(item.orderstatus=='0'){
  1332. this.historyActive = 1;
  1333. }else if(item.orderstatus=='1'){
  1334. this.historyActive = 2;
  1335. }else if(item.orderstatus=='2'){
  1336. this.historyActive = 3;
  1337. }else if(item.orderstatus=='5'){
  1338. this.historyActive = 4;
  1339. }else if(item.orderstatus=='6'){
  1340. this.historyActive = 5;
  1341. }else if(item.orderstatus=='7'){
  1342. this.historyActive = 6;
  1343. }
  1344. this.riskList = [];
  1345. this.CIChoose = false;
  1346. this.BIChoose = false;
  1347. for(let i=0;i<item.riskinfo.length;i++){
  1348. let param = {};
  1349. Object.assign(param,item.riskinfo[i]);
  1350. this.riskList.push(param)
  1351. if(item.riskinfo[i].riskCode =='0507'){
  1352. this.CIStartDate=item.riskinfo[i].startDate;
  1353. this.CIEndDate = item.riskinfo[i].endDate;
  1354. this.CIChoose = true;
  1355. }
  1356. if(item.riskinfo[i].riskCode =='0510'){
  1357. this.BIStartDate=item.riskinfo[i].startDate;
  1358. this.BIEndDate = item.riskinfo[i].endDate;
  1359. this.BIChoose = true;
  1360. }
  1361. }
  1362. // 获取影像
  1363. this.$api.task.findTaskImage({
  1364. taskid:item.orderno,
  1365. imgtype:"C01"
  1366. }).then((resImage)=>{
  1367. this.carImageList=resImage.data.imgList
  1368. })
  1369. this.$api.task.findTaskImage({
  1370. taskid:item.orderno,
  1371. imgtype:"C02"
  1372. }).then((resImage)=>{
  1373. this.ownerImageList=resImage.data.imgList
  1374. })
  1375. this.$api.task.findTaskImage({
  1376. taskid:item.orderno,
  1377. imgtype:"C03"
  1378. }).then((resImage)=>{
  1379. this.policyImageList=resImage.data.imgList
  1380. })
  1381. this.$api.task.findTaskImage({
  1382. taskid:item.orderno,
  1383. imgtype:"C04"
  1384. }).then((resImage)=>{
  1385. this.insuredImageList=resImage.data.imgList
  1386. })
  1387. this.$api.task.findTaskImage({
  1388. taskid:item.orderno,
  1389. imgtype:"C05"
  1390. }).then((resImage)=>{
  1391. this.carCheckImageList=resImage.data.imgList
  1392. })
  1393. this.insureListForm = JSON.parse(JSON.stringify(this.global.insureList1));
  1394. for (let j = 0; j < item.kindinfo.length; j++) {
  1395. for (let m = 0; m < this.insureListForm.length; m++) {
  1396. if (item.kindinfo[j].kindCode == this.insureListForm[m].kindCode) {
  1397. this.insureListForm[m].coveragePremium = item.kindinfo[j].coveragePremium;
  1398. this.insureListForm[m].checked=true;
  1399. if (item.kindinfo[j].kindCode == 'B') {
  1400. this.insureListForm[9].amtList[0].value = item.kindinfo[j].amount.toString();
  1401. }
  1402. if (item.kindinfo[j].kindCode == 'A') {
  1403. this.insureListForm[0].amount = '1';
  1404. this.insureListForm[0].checked=true;
  1405. }else if (this.insureListForm[m].kindCode == 'D4') {
  1406. this.insureListForm[m].amount = item.kindinfo[j].unitAmount.toString();
  1407. this.insureListForm[m].checked=true;
  1408. } else if (this.insureListForm[m].isMainRisk || (this.insureListForm[m].kindCode == 'BD') || (this.insureListForm[m].kindCode == 'L')) {
  1409. this.insureListForm[m].amount = item.kindinfo[j].amount.toString();
  1410. this.insureListForm[m].checked=true;
  1411. } else {
  1412. this.insureListForm[m].amount = item.kindinfo[j].deductibleRate.toString();
  1413. this.insureListForm[m].checked=true;
  1414. }
  1415. }
  1416. }
  1417. }
  1418. if(item.inscompany == '华农财险'){
  1419. this.totalCompanyList=[
  1420. {
  1421. showInsureList:false,
  1422. name: "华农财险",
  1423. code: "huanong",
  1424. quoteCode: "200",
  1425. quoteStatus: "掌柜正在为您报价,请稍等......",
  1426. msg: "",
  1427. result: {}
  1428. }
  1429. ];
  1430. let paramData = {
  1431. kindList:item.kindinfo,
  1432. riskList:item.riskinfo,
  1433. orderno:item.orderno,
  1434. taxAmount:item.taxamount,
  1435. sumPermium:item.sumpremium,
  1436. }
  1437. this.formatData(0,paramData);
  1438. this.quoteCompanyList=["huanong"];
  1439. }
  1440. if(item.inscompany == '天安财险'){
  1441. this.totalCompanyList=[
  1442. {
  1443. showInsureList:false,
  1444. name: "天安财险",
  1445. code: "tianan",
  1446. quoteCode: "200",
  1447. quoteStatus: "掌柜正在为您报价,请稍等......",
  1448. msg: "成功",
  1449. result: {}
  1450. }
  1451. ];
  1452. let paramData = {
  1453. kindList:item.kindinfo,
  1454. riskList:item.riskinfo,
  1455. orderno:item.orderno,
  1456. taxAmount:item.taxamount,
  1457. sumPermium:item.sumpremium,
  1458. }
  1459. this.formatData(0,paramData);
  1460. this.quoteCompanyList=["tianan"];
  1461. }
  1462. if(item.inscompany == '中煤财险'){
  1463. this.totalCompanyList=[
  1464. {
  1465. showInsureList:false,
  1466. name: "中煤财险",
  1467. code: "zhongmei",
  1468. quoteCode: "200",
  1469. quoteStatus: "掌柜正在为您报价,请稍等......",
  1470. msg: "成功",
  1471. result: {}
  1472. }
  1473. ];
  1474. let paramData = {
  1475. kindList:item.kindinfo,
  1476. riskList:item.riskinfo,
  1477. orderno:item.orderno,
  1478. taxAmount:item.taxamount,
  1479. sumPermium:item.sumpremium,
  1480. }
  1481. this.formatData(0,paramData);
  1482. this.quoteCompanyList=["zhongmei"];
  1483. }
  1484. if(item.inscompany == '恒邦财险'){
  1485. this.totalCompanyList=[
  1486. {
  1487. showInsureList:false,
  1488. name: "恒邦财险",
  1489. code: "hengbang",
  1490. quoteCode: "200",
  1491. quoteStatus: "掌柜正在为您报价,请稍等......",
  1492. msg: "成功",
  1493. result: {}
  1494. }
  1495. ];
  1496. let paramData = {
  1497. kindList:item.kindinfo,
  1498. riskList:item.riskinfo,
  1499. orderno:item.orderno,
  1500. taxAmount:item.taxamount,
  1501. sumPermium:item.sumpremium,
  1502. }
  1503. this.formatData(0,paramData);
  1504. this.quoteCompanyList=["hengbang"];
  1505. }
  1506. this.isHistoryOrder = true;
  1507. this.isNewOrder = false;
  1508. },
  1509. getOrderQuery(){
  1510. var data = {
  1511. "columnFilters": {
  1512. "licenseNo": {"name": "licenseNo","value":this.orderQueryForm.licenseNo},
  1513. "userid": {"name": "userid","value": this.orderQueryForm.id},
  1514. "orderno": {"name": "orderno","value": this.orderQueryForm.orderno},
  1515. "orderstatus": {"name": "orderstatus","value": this.orderQueryForm.orderstatus},
  1516. "quotestatus": {"name": "quotestatus","value": "1"}
  1517. },
  1518. "pageNum": 1,
  1519. "pageSize": 20
  1520. }
  1521. this.$api.task.findPage(data).then(res => {
  1522. console.log(res.data)
  1523. this.queryOrdersList = res.data.content;
  1524. });
  1525. },
  1526. changeTransferFlag(e){
  1527. if(e){
  1528. this.carInfo.transferDate = this.carInfo.registerDate;
  1529. }else{
  1530. this.carInfo.transferDate = '';
  1531. }
  1532. },
  1533. changeIssueDateDate(e){
  1534. if(this.carInfo.transferDate){
  1535. this.carInfo.transferDate = e;
  1536. }else{
  1537. this.carInfo.transferDate = '';
  1538. }
  1539. },
  1540. showIframe(src){
  1541. console.log(src)
  1542. // +item.result.orderno
  1543. this.iframeSrc = src;
  1544. this.drawerVisible = true;
  1545. },
  1546. confirmQuote(src){
  1547. this.iframeSrc = src;
  1548. this.drawerVisible = true;
  1549. },
  1550. jqTimePickerChange(e){
  1551. var dateTime1 = new Date();
  1552. var currentDate = dateTime1.getFullYear()+"-" +(((dateTime1.getMonth()+1)<10)?("0"+(dateTime1.getMonth()+1)):(dateTime1.getMonth()+1))+ "-" + ((dateTime1.getDate()<10)?("0"+dateTime1.getDate()):dateTime1.getDate());
  1553. this.CIStartDate = currentDate+' '+e;
  1554. for (let i = 0; i < this.riskList.length; i++) {
  1555. if (this.riskList[i].riskCode == '0507') {
  1556. this.riskList[i].startDate = this.CIStartDate;
  1557. this.riskList[i].endDate = this.oneYearPast1(this.CIStartDate);
  1558. }
  1559. }
  1560. },
  1561. syTimePickerChange(e){
  1562. var dateTime1 = new Date();
  1563. var currentDate = dateTime1.getFullYear()+"-" +(((dateTime1.getMonth()+1)<10)?("0"+(dateTime1.getMonth()+1)):(dateTime1.getMonth()+1))+ "-" + ((dateTime1.getDate()<10)?("0"+dateTime1.getDate()):dateTime1.getDate());
  1564. this.BIStartDate = currentDate+' '+e;
  1565. for (let i = 0; i < this.riskList.length; i++) {
  1566. if (this.riskList[i].riskCode == '0510') {
  1567. this.riskList[i].startDate = this.BIStartDate;
  1568. this.riskList[i].endDate = this.oneYearPast1(this.BIStartDate);
  1569. }
  1570. }
  1571. },
  1572. peopleInfoChange(e){
  1573. Object.assign(this.personInfo,{});
  1574. Object.assign(this.deptInfo,{});
  1575. for(let i=0;i<this.personList.length;i++){
  1576. if(this.personList[i].id == e){
  1577. this.personInfo = this.personList[i];
  1578. console.log(this.companyList)
  1579. for(let j=0;j<this.companyList.length;j++){
  1580. if(this.personInfo.id.split('D')[0]==this.companyList[j].id){
  1581. this.deptInfo = this.companyList[j];
  1582. break;
  1583. }
  1584. }
  1585. break;
  1586. }
  1587. }
  1588. },
  1589. carTypeHandleDialogBefore(done) {
  1590. // 退出对话框之前确认提示
  1591. var that = this;
  1592. this.$confirm('确认关闭?').then(_ => {
  1593. done();
  1594. }).catch(_ => {});
  1595. },
  1596. async carTypeHandle(scope){
  1597. let item = {};
  1598. Object.assign(item,scope.row)
  1599. this.carInfo.brandName = item.modelname; //品牌型号
  1600. this.carInfo.ciModelCode = item.vehiclecode; //行业车型编码
  1601. this.carInfo.modelCode = item.modelcode;
  1602. this.carInfo.seatCount = item.seatmax + '';
  1603. this.carInfo.caryear = item.caryear;
  1604. this.carInfo.exhaustScale = (item.exhaustscale * 1000) + '';
  1605. this.carInfo.factory = item.factory;
  1606. this.carInfo.factoryid = item.factorycode;
  1607. this.carInfo.cimodelclass = item.inscarclassname;
  1608. this.carInfo.powertype = item.powerType;
  1609. this.carInfo.purchasePrice = item.purchaseprice + '';
  1610. this.carInfo.modelcname = item.modelname;
  1611. this.carTypeDialogVisible = false;
  1612. let d = await this.tiananquote(0);
  1613. if(this.totalCompanyList[0].quoteCode == 200){
  1614. this.formatData(0,d);
  1615. }
  1616. // console.log("华农报价")
  1617. // let a = await this.huanongquote(0);
  1618. // if(this.totalCompanyList[0].quoteCode == 200){
  1619. // this.formatData(0,a);
  1620. // }
  1621. // console.log("恒邦报价")
  1622. // let b = await this.hengbangquote(1);
  1623. // if(this.totalCompanyList[1].quoteCode == 200){
  1624. // this.formatData(1,b);
  1625. // }
  1626. // let c = await this.zhongmeiquote(2);
  1627. // if(this.totalCompanyList[2].quoteCode == 200){
  1628. // this.formatData(2,c);
  1629. // }
  1630. // console.log("华农报价")
  1631. // let a = await this.huanongquote(0);
  1632. // if(this.totalCompanyList[0].quoteCode == 200){
  1633. // this.formatData(0,a);
  1634. // }
  1635. // console.log("恒邦报价")
  1636. // let b = await this.hengbangquote(1);
  1637. // if(this.totalCompanyList[1].quoteCode == 200){
  1638. // this.formatData(1,b);
  1639. // }
  1640. // let c = await this.zhongmeiquote(2);
  1641. // if(this.totalCompanyList[2].quoteCode == 200){
  1642. // this.formatData(2,c);
  1643. // }
  1644. // let d = await this.tiananquote(3);
  1645. // if(this.totalCompanyList[3].quoteCode == 200){
  1646. // this.formatData(3,d);
  1647. // }
  1648. },
  1649. //获取所有机构列表Start
  1650. async getAllCompany(){
  1651. this.companyList = [];
  1652. await this.$api.dept.findLeftDeptTree(this.peopledeptid).then(res => {
  1653. for(let i=0;i<res.data.length;i++){
  1654. this.companyList.push(res.data[i]);
  1655. }
  1656. for(let j=0;j<this.companyList.length;j++){
  1657. if('99140109M01'==this.companyList[j].id){
  1658. this.deptInfo = this.companyList[j];
  1659. break;
  1660. }
  1661. }
  1662. });
  1663. },
  1664. // 获取所有机构列表End
  1665. // 查询该机构下所有的代理人
  1666. async getAllPerson(){
  1667. let param = {
  1668. pageNum: 1,
  1669. pageSize: 999999,
  1670. columnFilters: {
  1671. "deptId": {
  1672. "name": "deptId",
  1673. "value": '99'
  1674. },
  1675. "containsSubDept": {
  1676. "name": "containsSubDept",
  1677. "value": 1
  1678. },
  1679. "usertype": {
  1680. "name": "usertype",
  1681. "value": "B"
  1682. }
  1683. },
  1684. }
  1685. await this.$api.user.findPage(param).then((res) => {
  1686. this.personList = res.data.content;
  1687. })
  1688. },
  1689. // 识别车辆信息
  1690. getCarImage(file, fileList) {
  1691. this.checkInfo={};
  1692. this.checkImage="";
  1693. const loading = this.$loading({
  1694. lock: true,
  1695. text: '证件识别中...',
  1696. spinner: 'el-icon-loading',
  1697. background: 'rgba(0, 0, 0, 0.7)'
  1698. });
  1699. this.getBase64(file.raw).then(base64 => {
  1700. var paramImg = {
  1701. "image": base64, //图片base64
  1702. "imgType": "2" //1身份证 2行驶证
  1703. }
  1704. this.$api.task.imgAI(paramImg).then((resUpload)=>{
  1705. loading.close();
  1706. if(resUpload.data.carInfo == null){
  1707. return this.$message({type: 'info',message: '请选择正确行驶证',duration:2000});
  1708. }
  1709. this.checkInfo={
  1710. licenseNo:resUpload.data.carInfo.plateNo,
  1711. engineNo:resUpload.data.carInfo.engine,
  1712. issueDate:resUpload.data.carInfo.issueDate.substr(0,4)+'-'+resUpload.data.carInfo.issueDate.substr(4,2)+'-'+resUpload.data.carInfo.issueDate.substr(6,2),
  1713. cartype:resUpload.data.carInfo.motorTypeCode,
  1714. carnature:resUpload.data.carInfo.motorUsageTypeCode,
  1715. licenseTypeCode: resUpload.data.carInfo.plateType,//所属性质
  1716. registerDate: resUpload.data.carInfo.registerDate.substr(0,4)+'-'+resUpload.data.carInfo.registerDate.substr(4,2)+'-'+resUpload.data.carInfo.registerDate.substr(6,2),//注册日期
  1717. vinNo:resUpload.data.carInfo.vIN,//车架号
  1718. frameNo:resUpload.data.carInfo.vIN,//车架号
  1719. }
  1720. Object.assign(this.carInfo,this.checkInfo)
  1721. this.$refs.uploadCarImage.clearFiles();
  1722. }).catch(Error=>{
  1723. loading.close();
  1724. this.$refs.uploadCarImage.clearFiles();
  1725. this.$message({type: 'error',message: '识别失败',duration:2000});
  1726. })
  1727. })
  1728. },
  1729. // 识别人员信息
  1730. getpersonImage(file, fileList) {
  1731. this.checkInfo={};
  1732. this.checkImage="";
  1733. const loading = this.$loading({
  1734. lock: true,
  1735. text: '证件识别中...',
  1736. spinner: 'el-icon-loading',
  1737. background: 'rgba(0, 0, 0, 0.7)'
  1738. });
  1739. this.getBase64(file.raw).then(base64 => {
  1740. var paramImg = {
  1741. "image": base64, //图片base64
  1742. "imgType": "1" //1身份证 2行驶证
  1743. }
  1744. this.$api.task.imgAI(paramImg).then((resUpload)=>{
  1745. loading.close();
  1746. if(!resUpload.data.customerInfo.addr && !resUpload.data.customerInfo.identifyNumber && !resUpload.data.customerInfo.name){
  1747. return this.$message({type: 'info',message: '无法正确识别该证件',duration:2000});
  1748. }
  1749. this.checkInfo={
  1750. name:resUpload.data.customerInfo.name,
  1751. identifyNumber:resUpload.data.customerInfo.identifyNumber,
  1752. addr:resUpload.data.customerInfo.addr
  1753. }
  1754. Object.assign(this.ownerInfo ,this.checkInfo)
  1755. this.$refs.uploadPersonImage.clearFiles();
  1756. }).catch(Error=>{
  1757. loading.close();
  1758. this.$refs.uploadPersonImage.clearFiles();
  1759. this.$message({type: 'error',message: '识别失败',duration:2000});
  1760. })
  1761. })
  1762. },
  1763. //验证车架号
  1764. isFrameno(str){
  1765. let mPattern = /^([0-9A-Z]){17}$/;
  1766. return mPattern.test(str);
  1767. },
  1768. // 天安vin校验
  1769. toChooseVin(){
  1770. if(this.carInfo.vinNo=='' || this.carInfo.vinNo == null){
  1771. return this.$message({type: 'info',message: '请输入车架号',duration:2000});
  1772. }else{
  1773. if(!this.isFrameno(this.carInfo.vinNo.trim())){
  1774. return this.$message({type: 'info',message: '请输入正确的车架号',duration:2000});
  1775. }
  1776. var param = {
  1777. "checkAnswer": "",
  1778. "engineNo": "",
  1779. "inquiryType": "1",
  1780. "licenseNo": !!this.carInfo.licenseNo ? this.carInfo.licenseNo :'暂无车牌' ,
  1781. "licenseTypeCode": this.carInfo.licenseTypeCode,
  1782. "modelCName": "",
  1783. "modelCode": "",
  1784. "pmQueryNo": "",
  1785. "vin": this.carInfo.vinNo.trim()
  1786. }
  1787. this.$api.task.vinModelQuery(param).then(res=>{
  1788. if((res.data == null)&& (res.code == 200)){
  1789. return this.$message({type: 'info',message: res.data.msg,duration:2000});
  1790. }
  1791. for(let key in res.data){
  1792. if(!!res.data[key]){
  1793. if(key != 'licenseNo'){
  1794. this.carInfo[key]=res.data[key];
  1795. }
  1796. }
  1797. }
  1798. this.carInfo.vinNo = this.carInfo.vinNo.trim();
  1799. this.carInfo.frameNo = this.carInfo.vinNo.trim();
  1800. })
  1801. }
  1802. },
  1803. // 图片base64转化
  1804. getBase64(file) {
  1805. return new Promise(function(resolve, reject) {
  1806. let reader = new FileReader();
  1807. let imgResult = "";
  1808. reader.readAsDataURL(file);
  1809. reader.onload = function() {
  1810. imgResult = reader.result;
  1811. };
  1812. reader.onerror = function(error) {
  1813. reject(error);
  1814. };
  1815. reader.onloadend = function() {
  1816. resolve(imgResult);
  1817. };
  1818. });
  1819. },
  1820. //同车主信息
  1821. syncPersonInfo(type,touch1,touch2){
  1822. if(this[type]){
  1823. this[touch1+'Info']=this[touch2+'Info'];
  1824. }else{
  1825. this[touch1+'Info']={
  1826. name:"",
  1827. identifyType:"01",
  1828. identifyNumber:"",
  1829. addr:"",
  1830. email:"",
  1831. mobile:""
  1832. };
  1833. for(let key in this[touch2+'Info']){
  1834. this[touch1+'Info'][key] = this[touch2+'Info'][key];
  1835. }
  1836. }
  1837. },
  1838. // 获取终保日期
  1839. getEndDate(e,type1,type2){
  1840. this[type2] = this.oneYearPast1(this[type1]);
  1841. },
  1842. oneYearPast(time) {
  1843. var date = new Date(time);
  1844. date.setFullYear(date.getFullYear() + 1);//一年后
  1845. date.setTime(date.getTime()-24*60*60*1000);//一年后的前一天
  1846. var strYear = date.getFullYear();
  1847. var strDay = date.getDate();
  1848. var strMonth = date.getMonth()+1;
  1849. if(strMonth<10)
  1850. {
  1851. strMonth="0"+strMonth;
  1852. }
  1853. if(strDay<10)
  1854. {
  1855. strDay="0"+strDay;
  1856. }
  1857. var datastr = strYear+"-"+strMonth+"-"+strDay;
  1858. return datastr;
  1859. },
  1860. oneYearPast1(time) {
  1861. var date = new Date(time);
  1862. var strHours = date.getHours();
  1863. var strMinutes =date.getMinutes();
  1864. if((strHours==0) && (strMinutes==0)){
  1865. date.setFullYear(date.getFullYear() + 1);//一年后
  1866. date.setTime(date.getTime()-24*60*60*1000);//一年后的前一天
  1867. var strYear = date.getFullYear();
  1868. var strDay = date.getDate();
  1869. var strMonth = date.getMonth()+1;
  1870. if(strMonth<10)
  1871. {
  1872. strMonth="0"+strMonth;
  1873. }
  1874. if(strDay<10)
  1875. {
  1876. strDay="0"+strDay;
  1877. }
  1878. var datastr = strYear+"-"+strMonth+"-"+strDay;
  1879. return datastr+" 24:00";
  1880. }else{
  1881. var time1 = time.substr(11,5);
  1882. date.setFullYear(date.getFullYear() + 1);//一年后
  1883. var strYear = date.getFullYear();
  1884. var strDay = date.getDate();
  1885. var strMonth = date.getMonth()+1;
  1886. if(strMonth<10)
  1887. {
  1888. strMonth="0"+strMonth;
  1889. }
  1890. if(strDay<10)
  1891. {
  1892. strDay="0"+strDay;
  1893. }
  1894. if(strHours<10)
  1895. {
  1896. strHours="0"+strHours;
  1897. }
  1898. if(strMinutes<10)
  1899. {
  1900. strMinutes="0"+strMinutes;
  1901. }
  1902. var datastr = strYear+"-"+strMonth+"-"+strDay;
  1903. return datastr+" "+strHours+":"+strMinutes;
  1904. }
  1905. },
  1906. // 选择险种类型(交强 商业)
  1907. changeRisk(e,type){
  1908. if(e){
  1909. if(type == 'CI'){
  1910. this.CIStartDate = tomorrow+' 00:00'
  1911. this.CIEndDate=this.oneYearPast1(this.CIStartDate)
  1912. }
  1913. if(type == 'BI'){
  1914. this.BIStartDate = tomorrow+' 00:00';
  1915. this.chooseKindList=['A','B','D3','D4'];
  1916. this.BIEndDate=this.oneYearPast1(this.BIStartDate)
  1917. this.insureListForm = JSON.parse(JSON.stringify(this.global.insureList1))
  1918. this.insureListForm[0].checked=true;
  1919. this.insureListForm[0].amount='1';
  1920. this.insureListForm[1].checked=true;
  1921. this.insureListForm[1].amount='1000000';
  1922. this.insureListForm[2].checked=true;
  1923. this.insureListForm[2].amount='10000';
  1924. this.insureListForm[3].checked=true;
  1925. this.insureListForm[3].amount='10000';
  1926. this.kindList.push({"amount":'1',"kindCode":"A","kindName":"机动车损失险"});
  1927. this.kindList.push({"amount":"1000000","kindCode":"B","kindName":"第三者责任险"});
  1928. this.kindList.push({"amount":"10000","kindCode":"D3","kindName":"司机责任险"});
  1929. this.kindList.push({"unitAmount":"10000","kindCode":"D4","kindName":"乘客责任险"});
  1930. }
  1931. this.riskList.push({
  1932. startDate: this[type+'StartDate'],
  1933. endDate: this[type+'EndDate'],
  1934. quotePreceptName: "",
  1935. quotePreceptCode: "",
  1936. instantFlag: "0",
  1937. premium: "0",
  1938. amount:(type=='CI')?'200000':"",
  1939. riskCode: (type=='CI')?'0507':"0510"
  1940. })
  1941. }else{
  1942. for(let i=0;i<this.riskList.length;i++){
  1943. if((this.riskList[i].riskCode=='0507')&&(type == 'CI')){
  1944. this.riskList.splice(i,1)
  1945. }else if((this.riskList[i].riskCode=='0510')&&(type == 'BI')){
  1946. this.riskList.splice(i,1)
  1947. this.kindList=[];
  1948. this.chooseKindList = [];
  1949. }
  1950. }
  1951. }
  1952. },
  1953. // 选择险种类别(车损,三者,司机,乘客,绝对免赔,附加险)
  1954. changeKind(e,index,code,value='0'){
  1955. if(e){
  1956. if(this.chooseKindList.indexOf(code)>=0){
  1957. if(value!='0'){
  1958. this.kindList[this.chooseKindList.indexOf(code)].amount=value;
  1959. if((code=='B')&&(this.chooseKindList.indexOf('BD')>=0)){
  1960. this.kindList[this.chooseKindList.indexOf('BD')].amount = this.kindList[this.chooseKindList.indexOf('B')].amount;
  1961. }
  1962. }else{
  1963. this.kindList[this.chooseKindList.indexOf(code)].amount='0';
  1964. }
  1965. }else{
  1966. if(value=='0'){
  1967. if(index == 0){
  1968. this.insureListForm[index].amount='1';
  1969. }
  1970. if(index == 1){
  1971. this.insureListForm[index].amount='1000000';
  1972. }
  1973. if(index == 2){
  1974. this.insureListForm[index].amount='10000';
  1975. }
  1976. if(index == 4){
  1977. this.insureListForm[index].amount='2000';
  1978. }
  1979. if(index == 9){
  1980. this.insureListForm[index].amount='1';
  1981. }
  1982. }else{
  1983. this.insureListForm[index].amount=value;
  1984. }
  1985. if(index==3){
  1986. if(value=='0'){
  1987. this.insureListForm[index].amount='10000';
  1988. }else{
  1989. this.insureListForm[index].amount=value;
  1990. }
  1991. this.kindList.push({
  1992. "unitAmount": this.insureListForm[index].amount,
  1993. "kindCode": this.insureListForm[index].kindCode,
  1994. "kindName": this.insureListForm[index].kindName
  1995. })
  1996. }else if((index==5) || (index==6) ||(index==7) ||(index==8)){
  1997. this.kindList.push({
  1998. "deductibleRate": this.insureListForm[index].amount,
  1999. "kindCode": this.insureListForm[index].kindCode,
  2000. "kindName": this.insureListForm[index].kindName
  2001. })
  2002. }else if(index==9){
  2003. this.kindList.push({
  2004. "amount": this.insureListForm[1].amount,
  2005. "kindCode": this.insureListForm[index].kindCode,
  2006. "kindName": this.insureListForm[index].kindName
  2007. })
  2008. }else{
  2009. this.kindList.push({
  2010. "amount": this.insureListForm[index].amount,
  2011. "kindCode": this.insureListForm[index].kindCode,
  2012. "kindName": this.insureListForm[index].kindName
  2013. })
  2014. }
  2015. this.chooseKindList.push(code);
  2016. }
  2017. }else{
  2018. for(let i=0;i<this.kindList.length;i++){
  2019. if(this.kindList[i].kindCode==code){
  2020. this.kindList.splice(i,1);
  2021. this.chooseKindList.splice(i,1);
  2022. this.insureListForm[index].amount='0';
  2023. }
  2024. }
  2025. for(let i=0;i<this.kindList.length;i++){
  2026. if((code=='A')&&(this.kindList[i].kindCode=='L')){
  2027. this.kindList.splice(i,1);
  2028. this.chooseKindList.splice(i,1);
  2029. this.insureListForm[4].amount='0';
  2030. this.insureListForm[4].checked=false;
  2031. }
  2032. if((code=='B')&&(this.kindList[i].kindCode=='BD')){
  2033. this.kindList.splice(i,1);
  2034. this.chooseKindList.splice(i,1);
  2035. this.insureListForm[9].amount='0';
  2036. this.insureListForm[9].checked=false;
  2037. }
  2038. if((code=='A')&&(this.kindList[i].kindCode=='MJ1')){
  2039. this.kindList.splice(i,1);
  2040. this.chooseKindList.splice(i,1);
  2041. this.insureListForm[5].amount='0';
  2042. this.insureListForm[5].checked=false;
  2043. }
  2044. if((code=='B')&&(this.kindList[i].kindCode=='MJ2')){
  2045. this.kindList.splice(i,1);
  2046. this.chooseKindList.splice(i,1);
  2047. this.insureListForm[6].amount='0';
  2048. this.insureListForm[6].checked=false;
  2049. }
  2050. if((code=='D3')&&(this.kindList[i].kindCode=='MJ3')){
  2051. this.kindList.splice(i,1);
  2052. this.chooseKindList.splice(i,1);
  2053. this.insureListForm[7].amount='0';
  2054. this.insureListForm[7].checked=false;
  2055. }
  2056. if((code=='D4')&&(this.kindList[i].kindCode=='MJ4')){
  2057. this.kindList.splice(i,1);
  2058. this.chooseKindList.splice(i,1);
  2059. this.insureListForm[8].amount='0';
  2060. this.insureListForm[8].checked=false;
  2061. }
  2062. }
  2063. }
  2064. },
  2065. // 选择险种类别(车损,三者,司机,乘客,绝对免赔,附加险)
  2066. changeKindValue(e,index,code){
  2067. if(e==0){
  2068. this.changeKind(false,index,code,e);
  2069. this.insureListForm[index].checked=false;
  2070. }else{
  2071. this.changeKind(true,index,code,e);
  2072. this.insureListForm[index].checked=true;
  2073. }
  2074. },
  2075. changeChooseTotalCompany(e){
  2076. this.quoteCompanyList=[];
  2077. if(e){
  2078. for(let i=0;i<this.totalCompanyList.length;i++){
  2079. this.quoteCompanyList.push(this.totalCompanyList[i].code)
  2080. }
  2081. }else{
  2082. this.quoteCompanyList=["tianan"];
  2083. }
  2084. },
  2085. // 报价
  2086. async quote(){
  2087. // this.$router.push("/task/underwrite");
  2088. // return;
  2089. if(!this.userId){
  2090. this.$message({type: 'error',message: '请完善销售信息',duration:2000});
  2091. }else{
  2092. this.$refs.carForm.validate((valid1) => {
  2093. if (!valid1) {
  2094. this.$message({type: 'error',message: '请完善车辆信息',duration:2000});
  2095. return false;
  2096. } else {
  2097. this.$refs.ownerInfoForm.validate((valid2) => {
  2098. if (!valid2) {
  2099. this.$message({type: 'error',message: '请完车主信息',duration:2000});
  2100. return false;
  2101. } else {
  2102. this.$refs.policyHolderInfoForm.validate((valid3) => {
  2103. if (!valid3) {
  2104. this.$message({type: 'error',message: '请完投保人信息',duration:2000});
  2105. return false;
  2106. } else {
  2107. this.$refs.insuredPersonInfoForm.validate(async (valid4) => {
  2108. if (!valid4) {
  2109. this.$message({type: 'error',message: '请完被保人信息',duration:2000});
  2110. return false;
  2111. } else {
  2112. this.showResult=true;
  2113. for(let j=0;j<this.totalCompanyList.length;j++){
  2114. this.totalCompanyList[j].showInsureList = false;
  2115. this.totalCompanyList[j].quoteCode = "0";
  2116. this.totalCompanyList[j].msg = "";
  2117. Object.assign(this.totalCompanyList[j].result,{
  2118. orderno:'',
  2119. ciPermium:'',
  2120. biPermium:'',
  2121. taxPermium:'',
  2122. sumPermium:'',
  2123. kindList:[]
  2124. })
  2125. }
  2126. this.quoteno = new Date().getTime(); //报价号
  2127. let d = await this.tiananquote(0);
  2128. if(this.totalCompanyList[0].quoteCode == 200){
  2129. this.formatData(0,d);
  2130. }
  2131. for(let m =0;m<this.totalCompanyList.length;m++){
  2132. for(let n=0;n<this.quoteCompanyList.length;n++){
  2133. if((this.quoteCompanyList[n] == 'zhongmei')&&(this.totalCompanyList[m].code ==this.quoteCompanyList[n] )){
  2134. let c = await this.zhongmeiquote(m);
  2135. if(this.totalCompanyList[m].quoteCode == 200){
  2136. this.formatData(m,c);
  2137. }
  2138. }
  2139. if((this.quoteCompanyList[n] == 'hengbang')&&(this.totalCompanyList[m].code ==this.quoteCompanyList[n] )){
  2140. let c = await this.hengbangquote(m);
  2141. if(this.totalCompanyList[m].quoteCode == 200){
  2142. this.formatData(m,c);
  2143. }
  2144. }
  2145. }
  2146. }
  2147. // let c = await this.zhongmeiquote(1);
  2148. // if(this.totalCompanyList[1].quoteCode == 200){
  2149. // this.formatData(1,c);
  2150. // }
  2151. // let b = await this.hengbangquote(2);
  2152. // if(this.totalCompanyList[2].quoteCode == 200){
  2153. // this.formatData(2,b);
  2154. // }
  2155. // let a = await this.huanongquote(0);
  2156. // if(this.totalCompanyList[0].quoteCode == 200){
  2157. // this.formatData(0,a);
  2158. // }
  2159. // let b = await this.hengbangquote(1);
  2160. // if(this.totalCompanyList[1].quoteCode == 200){
  2161. // this.formatData(1,b);
  2162. // }
  2163. // let c = await this.zhongmeiquote(2);
  2164. // if(this.totalCompanyList[2].quoteCode == 200){
  2165. // this.formatData(2,c);
  2166. // }
  2167. // let d = await this.tiananquote(3);
  2168. // if(this.totalCompanyList[3].quoteCode == 200){
  2169. // this.formatData(3,d);
  2170. // }
  2171. }
  2172. });
  2173. }
  2174. });
  2175. }
  2176. });
  2177. }
  2178. });
  2179. }
  2180. },
  2181. formatData(index,res){
  2182. let ciPermium = 0;
  2183. let biPermium = 0;
  2184. let taxPermium = res.taxAmount;
  2185. let sumPermium = res.sumPermium;
  2186. let kindList = JSON.parse(JSON.stringify(this.global.insureList1));
  2187. for(let i=0;i<res.riskList.length;i++){
  2188. if(res.riskList[i].riskCode == '0507'){
  2189. ciPermium = res.riskList[i].premium;
  2190. }
  2191. if(res.riskList[i].riskCode == '0510'){
  2192. biPermium = res.riskList[i].premium;
  2193. }
  2194. }
  2195. for (let j = 0; j < res.kindList.length; j++) {
  2196. for (let m = 0; m < kindList.length; m++) {
  2197. if (res.kindList[j].kindCode == kindList[m].kindCode) {
  2198. kindList[m].coveragePremium = res.kindList[j].coveragePremium;
  2199. if (res.kindList[j].kindCode == 'B') {
  2200. kindList[9].amtList[0].value = res.kindList[j].amount;
  2201. }
  2202. if (res.kindList[j].kindCode == 'A') {
  2203. kindList[0].amount = '1';
  2204. }else if (kindList[m].kindCode == 'D4') {
  2205. kindList[m].amount = res.kindList[j].unitAmount;
  2206. } else if (kindList[m].isMainRisk || (kindList[m].kindCode == 'BD') || (kindList[m].kindCode == 'L')) {
  2207. kindList[m].amount = res.kindList[j].amount;
  2208. } else {
  2209. kindList[m].amount = res.kindList[j].deductibleRate;
  2210. }
  2211. }
  2212. }
  2213. }
  2214. this.totalCompanyList[index].result={
  2215. orderno:res.orderno,
  2216. ciPermium:ciPermium,
  2217. biPermium:biPermium,
  2218. taxPermium:taxPermium,
  2219. sumPermium:sumPermium,
  2220. kindList:kindList
  2221. }
  2222. },
  2223. //查询车辆实际价值
  2224. async huanongActualValue() {
  2225. let data = {};
  2226. let car = {};
  2227. let kinds = [];
  2228. Object.assign(car, this.carInfo);
  2229. Object.assign(kinds, this.kindList);
  2230. let res = await this.$api.task.huanongActualValue({
  2231. "approvedPassengersCapacity": this.carInfo.seatCount,
  2232. "localModelCode": this.carInfo.ciModelCode,
  2233. "motorTypeCode": "A0",
  2234. "motorUsageTypeCode": "8A",
  2235. "purchasePrice": this.carInfo.purchasePrice,
  2236. "registerDate": this.carInfo.registerDate,
  2237. "validDate": (this.BIStartDate != "") ? this.BIStartDate : (new Date())
  2238. })
  2239. for (let j = 0; j < kinds.length; j++) {
  2240. if (kinds[j].kindCode == 'A') {
  2241. kinds[j].amount = res.data.actualValue;
  2242. }
  2243. }
  2244. this.carInfo.modelCode = res.data.localModelCode;
  2245. car.localModelCode = res.data.localModelCode;
  2246. return {
  2247. kinds: kinds,
  2248. car: car
  2249. }
  2250. },
  2251. //华农报价
  2252. async huanongquote(num=0) {
  2253. this.totalCompanyList[num].msg = "";
  2254. let result = await this.huanongActualValue();
  2255. let res = await this.$api.task.huanongQuote({
  2256. // userId: '99140105M01D01001',
  2257. userId: this.userId,
  2258. quoteno: this.quoteno,
  2259. carInfo: result.car,
  2260. ownerInfo: this.ownerInfo,
  2261. policyHolderInfo: this.policyHolderInfo,
  2262. insuredPersonInfo: this.insuredPersonInfo,
  2263. riskList: this.riskList,
  2264. kindList: result.kinds,
  2265. })
  2266. this.msg = "";
  2267. this.totalCompanyList[num].msg = res.msg;
  2268. if (res.msg == '成功') { //所选险种可以报价
  2269. this.totalCompanyList[num].quoteCode = '200'
  2270. } else if (res.msg.indexOf("不存在有效协议") >= 0) {
  2271. this.totalCompanyList[num].quoteCode = '4'
  2272. this.totalCompanyList[num].msg = res.msg;
  2273. return;
  2274. } else if (res.msg.indexOf("投保算费异常! 异常信息:中保信平台提示:起保日期必须在当前日期的规定时间范围内。") >= 0) {
  2275. this.totalCompanyList[num].quoteCode = '31'
  2276. this.totalCompanyList[num].msg = res.msg;
  2277. return;
  2278. } else if (res.data.state == '201') { //商业险重复
  2279. if ((res.msg.indexOf('交强险重复投保提示') >= 0) && (res.msg.indexOf('商业险重复投保') >= 0)) {
  2280. if ((res.msg.indexOf('终保日期 ') >= 0) && (!res.data.lastDateBI)) {
  2281. this.totalCompanyList[num].quoteCode = '10'; //商业险重复投保
  2282. this.totalCompanyList[num].msg = res.msg;
  2283. return;
  2284. } else if ((res.msg.indexOf('终保日期 ') >= 0) && (!!res.data.lastDateBI)) {
  2285. this.CIStartDate = res.msg.substr(res.msg.indexOf('终保日期 ') + 5, 16);
  2286. this.BIStartDate = res.data.lastDateBI;
  2287. if (this.riskList.length > 0) {
  2288. for (let i = 0; i < this.riskList.length; i++) {
  2289. if (this.riskList[i].riskCode == '0507') {
  2290. this.riskList[i].startDate = this.CIStartDate;
  2291. this.riskList[i].endDate = this.oneYearPast1(this.CIStartDate);
  2292. }
  2293. if (this.riskList[i].riskCode == '0510') {
  2294. this.riskList[i].startDate = this.BIStartDate;
  2295. this.riskList[i].endDate = this.oneYearPast1(this.BIStartDate);
  2296. }
  2297. }
  2298. }
  2299. return await this.huanongquote(num);
  2300. } else if ((res.data.msg.indexOf('终保日期 ') < 0) && (!!res.data.data.lastDateBI)) {
  2301. this.totalCompanyList[num].msg = res.data.msg;
  2302. this.totalCompanyList[num].quoteCode = '01';
  2303. return;
  2304. } else if ((res.data.msg.indexOf('终保日期 ') < 0) && (!res.data.data.lastDateBI)) {
  2305. this.totalCompanyList[num].msg = res.data.msg;
  2306. this.totalCompanyList[num].quoteCode = '11';
  2307. return;
  2308. }
  2309. } else if ((!!res.data.data.lastDateBI) && (res.data.msg.indexOf('交强险重复投保提示') >= 0)) { //交强商业险重复可报价
  2310. if (res.data.msg.indexOf('终保日期 ') >= 0) {
  2311. this.CIStartDate = res.data.msg.substr(res.data.msg.indexOf('终保日期 ') + 5, 16);
  2312. this.BIStartDate = res.data.data.lastDateBI;
  2313. if (this.riskList.length > 0) {
  2314. for (let i = 0; i < this.riskList.length; i++) {
  2315. if (this.riskList[i].riskCode == '0507') {
  2316. this.riskList[i].startDate = this.CIStartDate;
  2317. this.riskList[i].endDate = this.oneYearPast1(this.CIStartDate);
  2318. }
  2319. if (this.riskList[i].riskCode == '0510') {
  2320. this.riskList[i].startDate = this.BIStartDate;
  2321. this.riskList[i].endDate = this.oneYearPast1(this.BIStartDate);
  2322. }
  2323. }
  2324. }
  2325. return await this.huanongquote(num);
  2326. } else {
  2327. this.totalCompanyList[num].msg = res.msg;
  2328. this.totalCompanyList[num].quoteCode = '01'
  2329. return;
  2330. }
  2331. } else if ((!!res.data.lastDateBI) && (res.msg.indexOf('交强险重复投保提示') < 0)) { //商业险重复可报价
  2332. this.BIStartDate = res.data.lastDateBI;
  2333. if (this.riskList.length > 0) {
  2334. for (let i = 0; i < this.riskList.length; i++) {
  2335. if (this.riskList[i].riskCode == '0510') {
  2336. this.riskList[i].startDate = this.BIStartDate;
  2337. this.riskList[i].endDate = this.oneYearPast1(this.BIStartDate);
  2338. }
  2339. }
  2340. }
  2341. return await this.huanongquote(num);
  2342. } else if ((!res.data.lastDateBI) && (res.msg.indexOf('商业险重复投保') >= 0) && (res.msg.indexOf(
  2343. '交强险重复投保提示') < 0)) { //商业险重复可报价
  2344. this.totalCompanyList[num].quoteCode = '10'
  2345. this.totalCompanyList[num].msg = res.msg;
  2346. return;
  2347. } else if ((res.msg.indexOf('交强险重复投保提示') >= 0) && (!res.data.lastDateCI) && (res.msg.indexOf(
  2348. '商业险重复投保') < 0) && (res.msg.indexOf('终保日期 ') >= 0)) {
  2349. this.CIStartDate = res.msg.substr(res.msg.indexOf('终保日期 ') + 5, 16);
  2350. if (this.riskList.length > 0) {
  2351. for (let i = 0; i < this.riskList.length; i++) {
  2352. if (this.riskList[i].riskCode == '0507') {
  2353. this.riskList[i].startDate = this.CIStartDate;
  2354. this.riskList[i].endDate = this.oneYearPast1(this.CIStartDate);
  2355. }
  2356. }
  2357. }
  2358. return await this.huanongquote(num);
  2359. } else if (res.msg.indexOf('查询的车主名称与上张保单不一致') >= 0) {
  2360. this.totalCompanyList[num].quoteCode = '200';
  2361. return res.data.data;
  2362. } else if (res.msg.indexOf('查询的车主名称与上张保单一致') >= 0) {
  2363. this.totalCompanyList[num].quoteCode = '200';
  2364. return res.data.data;
  2365. } else if (res.msg.indexOf('精准服务返回:没有找到行业标准车型信息,请核实车辆信息是否正确,若正确请自行选择车型进行投保/批改查询') >= 0) {
  2366. this.totalCompanyList[num].quoteCode = '200';
  2367. return res.data.data;
  2368. } else { //商业险重复,不可报价
  2369. this.totalCompanyList[num].quoteCode = '3';
  2370. this.totalCompanyList[num].msg = res.msg;
  2371. return;
  2372. }
  2373. } else if (res.data.state == '11') { //交强险或者交商重复
  2374. if ((!!res.data.lastDateCI) && (!!res.data.lastDateBI)) { //交商重复可报价
  2375. this.CIStartDate = res.data.lastDateCI;
  2376. this.BIStartDate = res.data.lastDateBI;
  2377. if (this.riskList.length > 0) {
  2378. for (let i = 0; i < this.riskList.length; i++) {
  2379. if (this.riskList[i].riskCode == '0507') {
  2380. this.riskList[i].startDate = this.CIStartDate;
  2381. this.riskList[i].endDate = this.oneYearPast1(this.CIStartDate);
  2382. }
  2383. if (this.riskList[i].riskCode == '0510') {
  2384. this.riskList[i].startDate = this.BIStartDate;
  2385. this.riskList[i].endDate = this.oneYearPast1(this.BIStartDate);
  2386. }
  2387. }
  2388. }
  2389. return await this.huanongquote(num);
  2390. } else if (!!res.data.lastDateCI) { //交强险重复,可报价
  2391. this.CIStartDate = res.data.lastDateCI;
  2392. if (this.riskList.length > 0) {
  2393. for (let i = 0; i < this.riskList.length; i++) {
  2394. if (this.riskList[i].riskCode == '0507') {
  2395. this.riskList[i].startDate = this.CIStartDate;
  2396. this.riskList[i].endDate = this.oneYearPast1(this.CIStartDate);
  2397. }
  2398. }
  2399. }
  2400. return await this.huanongquote(num);
  2401. }
  2402. } else if ((res.data.state == '4') || (res.data.state == '7')) {
  2403. return await this.huanongquote(num);
  2404. } else if (res.msg == '请选择品牌型号') {
  2405. this.carTypeList = res.data;
  2406. this.totalCompanyList[num].quoteCode = '0'
  2407. this.totalCompanyList[num].msg = res.msg;
  2408. this.carTypeDialogVisible = true;
  2409. return;
  2410. } else if (res.data.state == '1') {
  2411. if (res.msg.indexOf('商业险重复投保') >= 0) {
  2412. this.totalCompanyList[num].msg = res.msg;
  2413. this.totalCompanyList[num].quoteCode = '11'
  2414. return;
  2415. } else {
  2416. this.totalCompanyList[num].msg = res.msg;
  2417. this.totalCompanyList[num].quoteCode = '01'
  2418. return;
  2419. }
  2420. } else if (res.data.state == '0') {
  2421. this.totalCompanyList[num].quoteCode = '3'
  2422. this.totalCompanyList[num].msg = res.msg;
  2423. return;
  2424. }
  2425. this.totalCompanyList[num].quoteCode = '200'
  2426. return res.data;
  2427. },
  2428. //恒邦车辆实际价值
  2429. async hengbangActualValue() {
  2430. let kinds = [];
  2431. Object.assign(kinds, this.kindList);
  2432. let res = await this.$api.task.hengbangActualValue(this.carInfo);
  2433. for (let j = 0; j < kinds.length; j++) {
  2434. if (kinds[j].kindCode == 'A') {
  2435. kinds[j].amount = res.data;
  2436. }
  2437. }
  2438. return kinds;
  2439. },
  2440. //恒邦报价
  2441. async hengbangquote(num=1) {
  2442. this.totalCompanyList[num].msg = "";
  2443. let kinds = await this.hengbangActualValue();
  2444. let res = await this.$api.task.hengbangQuote({
  2445. userId: this.userId,
  2446. quoteno: this.quoteno,
  2447. carInfo: this.carInfo,
  2448. ownerInfo: this.ownerInfo,
  2449. policyHolderInfo: this.policyHolderInfo,
  2450. insuredPersonInfo: this.insuredPersonInfo,
  2451. riskList: this.riskList,
  2452. kindList: kinds,
  2453. });
  2454. // 报价成功
  2455. this.totalCompanyList[num].msg = res.msg;
  2456. if (res.msg.indexOf("不存在有效协议") >= 0) {
  2457. this.totalCompanyList[num].quoteCode = '4'
  2458. this.totalCompanyList[num].msg = res.msg;
  2459. return;
  2460. } else if (res.data != null) {
  2461. this.totalCompanyList[num].quoteCode = 200;
  2462. return res.data;
  2463. } else if (res.msg.indexOf("重复") >= 0) {
  2464. this.totalCompanyList[num].quoteCode = '31'
  2465. this.totalCompanyList[num].msg = res.msg;
  2466. return;
  2467. } else if (res.msg.indexOf("失败:商业险平台返回:起保日期必须在当前日期的规定时间范围内。") >= 0) {
  2468. this.totalCompanyList[num].quoteCode = '31'
  2469. this.totalCompanyList[num].msg = res.msg;
  2470. return;
  2471. } else {
  2472. this.totalCompanyList[num].quoteCode = '3'
  2473. this.totalCompanyList[num].msg = res.msg;
  2474. return;
  2475. }
  2476. },
  2477. async zhongmeiquote(num){
  2478. this.totalCompanyList[num].msg = "";
  2479. let res = await this.$api.task.zhongmeiQuote({
  2480. userId: this.userId,
  2481. quoteno: this.quoteno,
  2482. carInfo: this.carInfo,
  2483. ownerInfo: this.ownerInfo,
  2484. policyHolderInfo: this.policyHolderInfo,
  2485. insuredPersonInfo: this.insuredPersonInfo,
  2486. riskList: this.riskList,
  2487. kindList: this.kindList,
  2488. });
  2489. this.totalCompanyList[num].msg = res.msg;
  2490. if (!!res.msg && (res.msg.indexOf("不存在有效协议") >= 0)) {
  2491. this.totalCompanyList[num].quoteCode = '4'
  2492. this.totalCompanyList[num].msg = res.msg;
  2493. return;
  2494. }else if((res.data==null) && (res.msg.indexOf('交强险平台返回')>-1) && (res.msg.indexOf(';终保日期')>-1)){
  2495. let a = res.msg.substr(res.msg.indexOf(';终保日期 ') + 6, 16);
  2496. if(a.substring(11) != '00:00'){
  2497. let b = new Date(a.substr(0,10));
  2498. b.setTime(b.getTime()+24*60*60*1000);//一年后的前一天
  2499. let year = b.getFullYear();
  2500. let month = b.getMonth()+1;
  2501. month = month < 10 ? '0' + month : month;
  2502. let day = new Date(b).getDate();
  2503. day = day < 10 ? '0' + day : day;
  2504. this.CIStartDate= year+"-"+month+"-"+day+" 00:00";
  2505. console.log(this.CIStartDate)
  2506. }else{
  2507. this.CIStartDate = res.msg.substr(res.msg.indexOf(';终保日期 ') + 6, 16);
  2508. console.log(this.CIStartDate)
  2509. }
  2510. if (this.riskList.length > 0) {
  2511. for (let i = 0; i < this.riskList.length; i++) {
  2512. if (this.riskList[i].riskCode == '0507') {
  2513. this.riskList[i].startDate = this.CIStartDate;
  2514. this.riskList[i].endDate = this.oneYearPast1(this.CIStartDate);
  2515. }
  2516. }
  2517. }
  2518. return this.zhongmeiquote(num);
  2519. }else if (!!res.data) {
  2520. this.totalCompanyList[num].quoteCode = 200;
  2521. return res.data;
  2522. } else {
  2523. this.totalCompanyList[num].quoteCode = '3'
  2524. this.totalCompanyList[num].msg = res.msg;
  2525. return;
  2526. }
  2527. },
  2528. async tiananquote(num){
  2529. this.totalCompanyList[num].msg = "";
  2530. let res = await this.$api.task.tiananQuote({
  2531. userId: this.userId,
  2532. quoteno: this.quoteno,
  2533. carInfo: this.carInfo,
  2534. ownerInfo: this.ownerInfo,
  2535. policyHolderInfo: this.policyHolderInfo,
  2536. insuredPersonInfo: this.insuredPersonInfo,
  2537. riskList: this.riskList,
  2538. kindList: this.kindList,
  2539. });
  2540. this.totalCompanyList[num].msg = res.msg;
  2541. if (!!res.msg && (res.msg.indexOf("不存在有效协议") >= 0)) {
  2542. this.totalCompanyList[num].quoteCode = '4'
  2543. this.totalCompanyList[num].msg = res.msg;
  2544. return;
  2545. } else if (!!res.data) {
  2546. this.totalCompanyList[num].quoteCode = 200;
  2547. if(res.data.riskList.length>0){
  2548. for(let i = 0;i<res.data.riskList.length;i++){
  2549. if(res.data.riskList[i].riskCode =='0507'){
  2550. this.CIStartDate = res.data.riskList[i].startDate;
  2551. for (let j = 0; j < this.riskList.length; j++) {
  2552. if (this.riskList[j].riskCode == '0507') {
  2553. this.riskList[j].startDate = res.data.riskList[i].startDate;
  2554. this.riskList[j].endDate = res.data.riskList[i].endDate;
  2555. }
  2556. }
  2557. }
  2558. console.log(res.data.riskList[i].startDate);
  2559. if(res.data.riskList[i].riskCode =='0510'){
  2560. this.BIStartDate = res.data.riskList[i].startDate;
  2561. for (let j = 0; j < this.riskList.length; j++) {
  2562. if (this.riskList[j].riskCode == '0510') {
  2563. this.riskList[j].startDate = res.data.riskList[i].startDate;
  2564. this.riskList[j].endDate = res.data.riskList[i].endDate;
  2565. }
  2566. }
  2567. }
  2568. }
  2569. }
  2570. return res.data;
  2571. } else {
  2572. this.totalCompanyList[num].quoteCode = '3'
  2573. this.totalCompanyList[num].msg = res.msg;
  2574. return;
  2575. }
  2576. },
  2577. // 上传图片的方法Start
  2578. beforeAvatarUpload(file) {
  2579. const isJPG = (file.type === 'image/jpeg' || file.type === 'image/png') ;
  2580. // const isLt2M = file.size / 1024 / 1024 < 0.2;
  2581. if (!isJPG) {
  2582. this.$message({message: '上传图片只能是 JPG 或者 PNG 格式!',type: 'error',duration:2000})
  2583. }
  2584. // if (!isLt2M) {
  2585. // this.$message.error('上传图片大小不能超过 200KB!');
  2586. // }
  2587. // return isJPG && isLt2M;
  2588. return isJPG;
  2589. },
  2590. httpRequest(options) {
  2591. let file = options.file;
  2592. let filename = options.filename;
  2593. let reader = new FileReader();
  2594. if (file) {
  2595. reader.readAsDataURL(file)
  2596. }
  2597. reader.onload = () => {
  2598. let base64Str = reader.result;
  2599. console.log(options.filename)
  2600. this[options.filename].push(base64Str);
  2601. }
  2602. },
  2603. //删除图片
  2604. delCheckImage(type,index){
  2605. this[type+'ImageList'].splice(index,1);
  2606. },
  2607. // 上传图片的方法End
  2608. submit(orderno){
  2609. this.$confirm('是否确认提交核保?', '提示', {}).then(async() => {
  2610. await this.$api.user.savePersonImage({
  2611. taskid:orderno,
  2612. imgtype:"C01",
  2613. imgList:this.carImageList
  2614. })
  2615. await this.$api.user.savePersonImage({
  2616. taskid:orderno,
  2617. imgtype:"C02",
  2618. imgList:this.ownerImageList
  2619. })
  2620. await this.$api.user.savePersonImage({
  2621. taskid:orderno,
  2622. imgtype:"C03",
  2623. imgList:this.policyImageList
  2624. })
  2625. await this.$api.user.savePersonImage({
  2626. taskid:orderno,
  2627. imgtype:"C04",
  2628. imgList:this.insuredImageList
  2629. })
  2630. await this.$api.user.savePersonImage({
  2631. taskid:orderno,
  2632. imgtype:"C05",
  2633. imgList:this.carCheckImageList
  2634. })
  2635. let param={
  2636. orderno:orderno,
  2637. jqappoint:'',
  2638. syappoint:'',
  2639. }
  2640. await this.$api.task.submitAudit(param).then((res)=>{
  2641. if(res.code == 200){
  2642. this.$message({message: '操作成功',type: 'success',duration:2000})
  2643. this.dialogVisible = false;
  2644. this.currentPage= 1; //当前页码
  2645. this.totalSize= 0; //全部的数据条数
  2646. this.getOrderList();
  2647. }else{
  2648. this.$message({message: '操作失败, ' + res.msg,type: 'error',duration:2000})
  2649. }
  2650. })
  2651. })
  2652. },
  2653. // 验证是否是邮箱
  2654. checkEmail(str) {
  2655. return /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/.test(str);
  2656. },
  2657. // 手机号验证
  2658. isMobile(str){
  2659. return /^1[3456789]\d{9}$/.test(str.trim())
  2660. },
  2661. checkPayForm(){
  2662. if(this.policytype == '电子'){
  2663. if(!this.checkEmail(this.email)){
  2664. this.$message.error('请输入正确的邮箱地址');
  2665. return false;
  2666. }else{
  2667. return true;
  2668. }
  2669. }
  2670. if((this.policytype == '纸质') && (this.mailtype == '邮寄')){
  2671. if(!this.receiptname){
  2672. this.$message.error('请输入收件人姓名');
  2673. return false;
  2674. }else if(!this.isMobile(this.receiptphone)){
  2675. this.$message.error('请输入正确的手机号');
  2676. return false;
  2677. }else if(!this.mailAddress){
  2678. this.$message.error('请选择邮寄地址');
  2679. return false;
  2680. }else{
  2681. return true;
  2682. }
  2683. }
  2684. },
  2685. // 去支付
  2686. onPayComfirm(orderno){
  2687. if(this.checkPayForm()){
  2688. var data = {
  2689. "billtype": "",
  2690. "mailaddress": "",
  2691. "mailtype": "",
  2692. "orderno": orderno,
  2693. "paytype": this.paytype,
  2694. "policytype": "",
  2695. "receiptname":"",
  2696. "receiptphone":""
  2697. }
  2698. if(this.policytype == '电子'){
  2699. data.policytype = this.policytype;
  2700. data.mailtype = '邮箱';
  2701. data.mailaddress = this.email;
  2702. }
  2703. if(this.policytype == '纸质'){
  2704. data.policytype = this.policytype;
  2705. data.mailtype = this.mailtype;
  2706. data.mailaddress = this.mailAddress;
  2707. data.receiptname = this.receiptname;
  2708. data.receiptphone = this.receiptphone;
  2709. }
  2710. this.$api.task.savePayType(data).then(res => {
  2711. if(res.code ==200){
  2712. this.$message.success('提交成功');
  2713. }
  2714. })
  2715. }
  2716. },
  2717. }
  2718. }
  2719. </script>
  2720. <style scoped>
  2721. .el-row {
  2722. /* margin-bottom: 15px; */
  2723. }
  2724. .el-row .el-col label {
  2725. text-align: right;
  2726. width: 80px;
  2727. font-size: 14px;
  2728. width: 100%;
  2729. line-height: 36px;
  2730. display: inline-block;
  2731. box-sizing: border-box;
  2732. padding-right: 15px;
  2733. }
  2734. /* 弹出窗口(订单详情)Start */
  2735. /* .leftContainer {
  2736. width: 260px;
  2737. background-color: #F0F0F0;
  2738. position: fixed;
  2739. min-height: calc(100vh - 120px);
  2740. }
  2741. .leftContainer .queryOrder{
  2742. height: calc(100vh - 385px);
  2743. overflow-y: auto;
  2744. }
  2745. .leftContainer .queryOrder .taskCard{
  2746. padding: 15px 10px 5px;
  2747. margin: 0 5px 10px;
  2748. box-sizing: border-box;
  2749. font-size: 13px;
  2750. background-color: #FFFFFF;
  2751. border-radius: 10px;
  2752. } */
  2753. .rightContainer {
  2754. width: calc(100vw);
  2755. margin-left: 20px;
  2756. margin-right: 20px;
  2757. }
  2758. .rightContainer .header .el-col{
  2759. font-size:18px;
  2760. font-weight: bold;
  2761. }
  2762. .rightContainer .bodyTitle{
  2763. height: 40px;
  2764. background: #F3F3F3;
  2765. border:1px solid #DDDDDD;
  2766. margin-bottom:15px;
  2767. }
  2768. .rightContainer .bodyTitle>label{
  2769. margin: 0px 15px;
  2770. font-weight: bold;
  2771. }
  2772. .rightContainer #demo2 .body,.rightContainer #demo3 .body,.rightContainer #demo5 .body,.rightContainer #demo6 .body,.rightContainer #demo7 .body,.rightContainer #demo8 .body,.rightContainer #demo9 .body,.rightContainer #demo10 .body,.rightContainer #demo11 .body{
  2773. border: 1px solid #DDD;
  2774. padding: 15px;
  2775. border-top: none;
  2776. }
  2777. .rightContainer .el-card {
  2778. margin-bottom: 15px;
  2779. }
  2780. .imageStyle{
  2781. display: inline-block;
  2782. width: 100px;
  2783. height: 100px;
  2784. box-shadow:#ddd 0px 0px 5px;
  2785. margin-left: 20px;
  2786. }
  2787. /* 弹出窗口(订单详情)End */
  2788. .insuretable .el-row{
  2789. margin: 0;
  2790. padding: 0;
  2791. border-top: 1px solid #ddd;
  2792. min-height: 40px;
  2793. }
  2794. .insuretable .el-row .el-col:nth-child(2){
  2795. border-left:1px solid #ddd;
  2796. border-right:1px solid #ddd;
  2797. }
  2798. .insuretable .el-row .el-col label{
  2799. text-align: left;
  2800. }
  2801. .quoteCompany .el-checkbox{
  2802. margin: 15px;
  2803. }
  2804. /deep/ .el-input.is-disabled .el-input__inner{
  2805. color: #333;
  2806. }
  2807. /deep/ .el-date-editor.el-input.el-input--prefix.el-input--suffix.el-date-editor--time-select .el-input__inner{
  2808. height: 0px;
  2809. border: none;
  2810. }
  2811. /deep/ .el-date-editor.el-input, .el-date-editor.el-input__inner {
  2812. width: 220px;
  2813. height: 0;
  2814. }
  2815. .iframe-wrap{
  2816. position: relative;
  2817. overflow: hidden;
  2818. width: 300px; height: 150px; background: #eee;
  2819. }
  2820. .iframe{
  2821. width: 100%; border: none;
  2822. position: absolute;
  2823. right: -20px; top: 0; bottom: 0;
  2824. overflow-x: hidden;
  2825. overflow-y: scroll;
  2826. }
  2827. /* 上传图片样式Start */
  2828. .avatar-uploader .el-upload {
  2829. border: 1px dashed #d9d9d9;
  2830. border-radius: 6px;
  2831. cursor: pointer;
  2832. position: relative;
  2833. overflow: hidden;
  2834. }
  2835. .avatar-uploader .el-upload:hover {
  2836. border-color: #409EFF;
  2837. }
  2838. .avatar-uploader-icon {
  2839. font-size: 28px;
  2840. color: #8c939d;
  2841. width: 100px;
  2842. height: 100px;
  2843. line-height: 100px;
  2844. text-align: center;
  2845. border: 1px dashed #d9d9d9;
  2846. }
  2847. .avatar {
  2848. border: 1px dashed #d9d9d9;
  2849. padding: 5px;
  2850. border-radius: 6px;
  2851. width: 100px;
  2852. height: 100px;
  2853. display: block;
  2854. }
  2855. .imageStyle{
  2856. display: inline-block;
  2857. width: 100px;
  2858. height: 100px;
  2859. box-shadow:#ddd 0px 0px 5px;
  2860. margin-right: 20px;
  2861. }
  2862. /* 上传图片样式End */
  2863. .delImgIcon{
  2864. width: 20px;
  2865. height: 20px;
  2866. background-color: #999;
  2867. position: absolute;
  2868. right: 20px;
  2869. top: 0px;
  2870. color: #FFFFFF;
  2871. }
  2872. </style>