quote1.vue 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702
  1. <template>
  2. <view :style="getHeight" style="background-color: #F5F5F5;">
  3. <!-- 头部 -->
  4. <view class="carInfo w-100 px-3 box-sizing">
  5. <view class="d-flex">
  6. <view class="icon iconfont icon-tree-round-car flex-shrink topLeft"></view>
  7. <view class="topRight d-flex flex-1 p-3 flex-column" style="color: #FFFFFF;">
  8. <view class="d-flex flex-1">
  9. <view class="font-lg d-flex a-center">{{this.carInfo.licenseNo}}
  10. <view class="icon iconfont icon-bianji1 ml-2" @tap="toCarInfo"></view>
  11. </view>
  12. </view>
  13. <view class="brandName">{{this.carInfo.modelcname}}</view>
  14. </view>
  15. </view>
  16. <view class="other d-flex j-sb px-3">
  17. <view class="d-flex flex-1 a-center">
  18. <view class="privilege d-flex a-center j-center flex-shrink px-2">特权</view>
  19. <view class="content">每月自动查违章,无违章领奖励</view>
  20. </view>
  21. <view class="flex-shrink icon iconfont icon-youjiantou d-flex a-center font-sm"></view>
  22. </view>
  23. </view>
  24. <!-- 报价方案 -->
  25. <view class="pageContent">
  26. <view class="quotePlan mx-3">
  27. <view class="header j-sb d-flex a-center px-3">
  28. <view class="title font-md">报价方案</view>
  29. <view class="adjustPlan main-text-color" @tap="toInsureItems">调整方案</view>
  30. </view>
  31. <view class="body">
  32. <view class="insurance">
  33. <template v-if="jqstartDate">
  34. <view class="row j-sb d-flex a-center">
  35. <view>交强险</view>
  36. <view>投保</view>
  37. </view>
  38. </template>
  39. <template v-if="systartDate">
  40. <block v-for="(item,index) in insureList" :key="index">
  41. <template v-if="item.amount!=0">
  42. <view class="row j-sb d-flex a-center">
  43. <view>{{item.kindName}}</view>
  44. <block v-for="(item2,index2) in item.amtList" :key="index2">
  45. <template v-if="item2.value == item.amount">
  46. <view>{{item2.label}}</view>
  47. </template>
  48. </block>
  49. </view>
  50. </template>
  51. </block>
  52. </template>
  53. <view class="dis j-s a-c">
  54. <view style="margin-right: 40px;">交强起保日期:</view>
  55. <u-input type="select" :select-open="jqstartShow" v-model="jqstartDate"
  56. @click="jqstartShow = true" style="width: 100px;"></u-input>
  57. <u-picker v-model="jqstartShow" mode="time" :params="params"
  58. @confirm="jqstartconfirm"></u-picker>
  59. </view>
  60. <view class="dis j-s a-c">
  61. <view style="margin-right: 40px;">交强终保日期:</view>
  62. <u-input type="select" :select-open="jqendShow" v-model="jqendDate"
  63. @click="jqendShow = true" style="width: 100px;"></u-input>
  64. <u-picker v-model="jqendShow" mode="time" :params="params"
  65. @confirm="jqendconfirm"></u-picker>
  66. </view>
  67. <view class="dis j-s a-c">
  68. <view style="margin-right: 40px;">商业起保日期:</view>
  69. <u-input type="select" :select-open="systartShow" v-model="systartDate"
  70. @click="systartShow = true" style="width: 100px;"></u-input>
  71. <u-picker v-model="systartShow" mode="time" :params="params"
  72. @confirm="systartconfirm"></u-picker>
  73. </view>
  74. <view class="dis j-s a-c">
  75. <view style="margin-right: 40px;">商业终保日期:</view>
  76. <u-input type="select" :select-open="syendShow" v-model="syendDate"
  77. @click="syendShow = true" style="width: 100px;"></u-input>
  78. <u-picker v-model="syendShow" mode="time" :params="params"
  79. @confirm="syendconfirm"></u-picker>
  80. </view>
  81. </view>
  82. <!-- <view class="addedServices">
  83. <view class="row j-sb d-flex a-center">
  84. <view>增值服务</view>
  85. <view>赠送</view>
  86. </view>
  87. <view style="padding: 15upx;color: #A6A6A6;font-size: 24upx;background-color: #F8FAFC;">
  88. 注:包含道路救援/安全检测/代为驾驶/代为送检,投保以上商业主险免费赠送,各家保司各个地区旅游差异,具体以保单信息为准</view>
  89. </view> -->
  90. </view>
  91. </view>
  92. <view class="quoteCompany">
  93. <view class="header j-sb d-flex a-center">
  94. <view class="title d-flex">精选保险公司<view class="icon iconfont icon-Group-"></view>
  95. </view>
  96. </view>
  97. <block v-for="(totalitem,totalindex) in totalCompanyList" :key="index">
  98. <template>
  99. <view class="quoteCompanyItem">
  100. <view class="top dis f-c">
  101. <ls-loading v-show="totalitem.quoteCode==1" text="掌柜正在为您报价,请稍等......"
  102. :animation="animation" fontSize="22" />
  103. <view class="companyIcon dis j-s a-c">
  104. <view class="dis">
  105. <!-- 勾选框 -->
  106. <u-checkbox
  107. @change="event=>checkboxChange(event,totalitem.id,totalitem.cnName, totalindex)"
  108. v-model="totalitem.checked" active-color="rgb(250, 53, 52)"></u-checkbox>
  109. <!-- logo -->
  110. <image :src="totalitem.logo"></image>
  111. <!-- 名称 -->
  112. <view class="companyName">{{totalitem.namesimple}}</view>
  113. </view>
  114. <!-- 价格 -->
  115. <text v-show="totalitem.quoteCode==200"
  116. class="sum">¥{{totalitem.result.sumPermium}}</text>
  117. <text
  118. v-show="(totalitem.quoteCode != '200') && (totalitem.quoteCode != '0') && (totalitem.quoteCode != '1')"
  119. class="sum" style="color: #999;font-size: 12px;"
  120. @click="ErrorMsg(totalitem.msg,totalitem.namesimple)">报价失败,请点击查看</text>
  121. </view>
  122. <view v-show="totalitem.quoteCode==200" class="dis j-s"
  123. style="font-size: 12px;color: #ee7000;">
  124. <text v-if="totalitem.result.jqPremium">交强险:¥{{totalitem.result.jqPremium}}</text>
  125. <text v-if="totalitem.result.jqPremium"
  126. style="margin: 0 5px;">商业险:¥{{totalitem.result.syPremium}}</text>
  127. <text>车船税:¥{{totalitem.result.taxAmount}}</text>
  128. </view>
  129. <view v-show="totalitem.quoteCode==200" class="dis f-c"
  130. style="font-size: 12px;color: #6495ed;border-top: 1px solid #f2f2f2;">
  131. <text
  132. v-if="totalitem.result.jqPremium">交强险:{{totalitem.result.startDateJq}}~{{totalitem.result.endDateJq}}
  133. </text>
  134. <text
  135. v-if="totalitem.result.startDateSy">商业险:{{totalitem.result.startDateSy}}~{{totalitem.result.endDateSy}}
  136. <u-icon style="color:#ee7000;margin-left: 20px;font-size: 16px;" name="clock"
  137. @click="syncData(totalitem.result)"></u-icon>
  138. </text>
  139. <text v-if="totalitem.namesimple == '永诚财险'">光博分:{{ totalitem.result.ilogPreUdwMess ?
  140. totalitem.result.ilogPreUdwMess : '无' }}</text>
  141. <text v-else>评分:{{ totalitem.result.ilogPreUdwMess ?
  142. totalitem.result.ilogPreUdwMess : '无' }}</text>
  143. <text v-if="totalitem.result.accidentInfoStr">出险信息:{{ totalitem.result.accidentInfoStr ?
  144. totalitem.result.accidentInfoStr : '无' }}</text>
  145. </view>
  146. <text v-if="totalitem.result.tips" style="color: red;">{{ totalitem.result.tips}}</text>
  147. <view class="" v-if="totalitem.checked">
  148. <u-form-item label="报价协议选择" :prop="totalitem.agreementId" label-width="200"
  149. :border-bottom='false' style="width: 250px;padding: 0;">
  150. <u-input type="select" :select-open="totalitem.selectShow"
  151. v-model="totalitem.agreementName" placeholder="请选择协议"
  152. @click="totalitem.selectShow = true"></u-input>
  153. <u-select mode="single-column" :list="totalitem.agreement" value-name="id"
  154. label-name="agreementName" v-model="totalitem.selectShow"
  155. @confirm="val=>selectConfirm(val,totalindex)"></u-select>
  156. </u-form-item>
  157. </view>
  158. <view v-show="totalitem.quoteCode==200" class="dis j-end"
  159. style="border-top: 1px solid #f2f2f2;padding: 10px 0;">
  160. <u-button v-if="totalitem.lastYearMsg" size="mini " type="warning"
  161. :hair-line="false" @click="YearMsg(totalitem.lastYearMsg,totalitem.namesimple)"
  162. style="margin-left: 10px;">上年信息</u-button>
  163. <u-button size="mini " type="warning" :hair-line="false"
  164. @click="bjdpreview(totalitem.result.companyId)"
  165. style="margin-left: 10px;">报价单</u-button>
  166. <u-button size="mini" style="background-color: #ea552d;margin-left: 10px;"
  167. type="error" :hair-line="false" :disabled="totalitem.result.tips"
  168. @click="querydetial(totalitem.result.companyId)">查看详情</u-button>
  169. </view>
  170. </view>
  171. </view>
  172. </template>
  173. </block>
  174. </view>
  175. </view>
  176. <wyb-popup ref="lastYearMsgCI" type="center" mode="size-fixed" height="900" radius="6" :showCloseIcon="true">
  177. <view class="popupBody">
  178. <view class="popHeader d-flex a-center j-center">
  179. 投保方案建议
  180. </view>
  181. <scroll-view scroll-top="0" scroll-y="true" class="popupScroll">
  182. </scroll-view>
  183. <view class="popBottom d-flex a-center j-center main-text-color" @tap="adjustPopupInsureSubmit">我知道了
  184. </view>
  185. </view>
  186. </wyb-popup>
  187. <view class="infoBottom d-flex a-center j-center j-sb">
  188. <button type="default" class="d-flex a-center j-center" @tap="toNext">保费计算</button>
  189. </view>
  190. </view>
  191. </template>
  192. <script>
  193. import {
  194. mapState
  195. } from "vuex"
  196. import wybPopup from '@/components/common/wyb-popup/wyb-popup.vue'
  197. import lsLoading from '@/components/common/ls-loading/ls-loading.vue';
  198. export default {
  199. components: {
  200. wybPopup,
  201. lsLoading
  202. },
  203. computed: {
  204. ...mapState(['userInfo']),
  205. getHeight() {
  206. let height = uni.getSystemInfoSync().windowHeight;
  207. return `minHeight: ${height}px;`;
  208. }
  209. },
  210. // 监听导航栏的按钮
  211. onNavigationBarButtonTap(e) {
  212. if (e.index == 0) {
  213. this.navigate({
  214. url: '/pages/index/index'
  215. }, "switchTab", true);
  216. }
  217. },
  218. data() {
  219. return {
  220. params: {
  221. year: true, //年
  222. month: true, //月
  223. day: true, //日
  224. hour: true, //时
  225. minute: true, //分
  226. second: true, //秒
  227. },
  228. jqstartShow: false, //交强起保日期
  229. jqendShow: false, //交强终保日期
  230. systartShow: false, //商业起保日期
  231. syendShow: false, //商业终保日期
  232. content: ``,
  233. vehicleAndVesselTaxForm: {}, //车船税信息
  234. agreementList: [],
  235. zmDrivingForm: {}, //中煤驾意险
  236. zjaccidentalDrivingVo: [], //紫金驾意险
  237. carInfoPositiveList: [], //车辆影像
  238. ownerInfoPositiveList: [], //车主影像
  239. policyHolderInfoPositiveList: [], //投保人影像
  240. insuredPersonInfoPositiveList: [], //被保人影像
  241. orderno: "", //订单号
  242. show1: false, //华农
  243. animation: 'twinkle', //动画类型
  244. jqjishi: false,
  245. syjishi: false,
  246. timeArray: [],
  247. jqTimeIndex: 0,
  248. syTimeIndex: 0,
  249. time1: "",
  250. time2: "",
  251. carTypeList: [], //车辆品牌型号列表
  252. msg: "",
  253. quoteno: "", //报价编号
  254. hasKindCodeA: false, //是否含有车损险
  255. carInfo: {}, //车辆信息
  256. ownerInfo: {}, //车主信息
  257. policyHolderInfo: {}, //投保人信息
  258. insuredPersonInfo: {}, //被保人信息
  259. riskList: [], //险种大类信息
  260. kindList: [], //商业险险别
  261. showCarInfo: false, //控制车辆信息显示
  262. showInsureDate: true, //控制险种时间显示
  263. jqstartDate: "", //交强险日期
  264. jqendDate: " ", //交强险日期
  265. systartDate: "", //商业险日期
  266. syendDate: "", //商业险日期
  267. insureList: [{
  268. amount: "0",
  269. amountDesc: "投保",
  270. amtList: [{
  271. "label": "不投保",
  272. "value": "0"
  273. }, {
  274. "label": "投保",
  275. "value": "1"
  276. }],
  277. kindCode: "A",
  278. isMainRisk: true,
  279. kindName: "机动车损失险",
  280. desc: "保险期间内,被保险人或被保险机动车驾驶人在使用被保险机动车过程中,因自然灾害、意外事故、机动车被盗窃、抢劫、抢夺等情况(详见保险条款)造成被保险机动车直接损失,且不属于免除保险人责任的范围,保险人依照本保险合同的约定负责赔偿的险种。"
  281. },
  282. {
  283. amount: "0",
  284. amountDesc: "不投保",
  285. amtList: [{
  286. label: "不投保",
  287. value: "0"
  288. },
  289. {
  290. label: "50万",
  291. value: "500000"
  292. },
  293. {
  294. label: "100万",
  295. value: "1000000"
  296. },
  297. {
  298. label: "150万",
  299. value: "1500000"
  300. },
  301. {
  302. label: "200万",
  303. value: "2000000"
  304. },
  305. {
  306. label: "250万",
  307. value: "2500000"
  308. },
  309. {
  310. label: "300万",
  311. value: "3000000"
  312. },
  313. {
  314. label: "500万",
  315. value: "5000000"
  316. },
  317. {
  318. label: "1000万",
  319. value: "10000000"
  320. }
  321. ],
  322. kindCode: "B",
  323. isMainRisk: true,
  324. kindName: "第三者责任险",
  325. desc: "保险期间内,被保险人或其允许的驾驶人在使用被保险机动车过程中发生意外事故,致使第三者遭受人身伤亡或财产直接损毁,依法应当对第三者承担的损害赔偿责任,且不属于免除保险人责任的范围,保险人依照本保险合同的约定,对于超过机动车交通事故责任强制保险各分项赔偿限额的部分负责赔偿的险种。"
  326. },
  327. {
  328. amount: "0",
  329. amountDesc: "不投保",
  330. amtList: [{
  331. label: "不投保",
  332. value: "0"
  333. },
  334. {
  335. label: "1万",
  336. value: "10000"
  337. },
  338. {
  339. label: "2万",
  340. value: "20000"
  341. },
  342. {
  343. label: "3万",
  344. value: "30000"
  345. },
  346. {
  347. label: "4万",
  348. value: "40000"
  349. },
  350. {
  351. label: "5万",
  352. value: "50000"
  353. },
  354. {
  355. label: "6万",
  356. value: "60000"
  357. },
  358. {
  359. label: "7万",
  360. value: "70000"
  361. },
  362. {
  363. label: "8万",
  364. value: "80000"
  365. },
  366. {
  367. label: "9万",
  368. value: "90000"
  369. },
  370. {
  371. label: "10万",
  372. value: "100000"
  373. },
  374. {
  375. label: "15万",
  376. value: "150000"
  377. },
  378. {
  379. label: "20万",
  380. value: "200000"
  381. },
  382. {
  383. label: "25万",
  384. value: "250000"
  385. },
  386. {
  387. label: "30万",
  388. value: "300000"
  389. },
  390. {
  391. label: "35万",
  392. value: "350000"
  393. },
  394. {
  395. label: "40万",
  396. value: "400000"
  397. },
  398. {
  399. label: "45万",
  400. value: "450000"
  401. },
  402. {
  403. label: "50万",
  404. value: "500000"
  405. },
  406. ],
  407. kindCode: "D3",
  408. isMainRisk: true,
  409. kindName: "司机责任险",
  410. desc: "保险期间内,被保险人或其允许的驾驶人在使用被保险机动车过程中发生意外事故,致使车上人员遭受人身伤亡,且不属于免除保险人责任的范围,依法应当对车上人员承担的损害赔偿责任,保险人依照本保险合同的约定负责赔偿的险种。"
  411. },
  412. {
  413. amount: "0",
  414. amountDesc: "不投保",
  415. amtList: [{
  416. "label": "不投保",
  417. "value": "0"
  418. }, {
  419. "label": "1万",
  420. "value": "10000"
  421. }, {
  422. "label": "2万",
  423. "value": "20000"
  424. }, {
  425. "label": "4万",
  426. "value": "40000"
  427. }, {
  428. "label": "5万",
  429. "value": "50000"
  430. }, {
  431. "label": "10万",
  432. "value": "100000"
  433. }, {
  434. "label": "15万",
  435. "value": "150000"
  436. }, {
  437. "label": "20万",
  438. "value": "200000"
  439. }],
  440. kindCode: "D4",
  441. isMainRisk: true,
  442. kindName: "乘客责任险",
  443. desc: "保险期间内,被保险人或其允许的驾驶人在使用被保险机动车过程中发生意外事故,致使车上人员遭受人身伤亡,且不属于免除保险人责任的范围,依法应当对车上人员承担的损害赔偿责任,保险人依照本保险合同的约定负责赔偿的险种。"
  444. },
  445. {
  446. amount: "0",
  447. amountDesc: "不投保",
  448. amtList: [{
  449. "label": "不投保",
  450. "value": "0"
  451. }, {
  452. "label": "2000",
  453. "value": "2000"
  454. }, {
  455. "label": "5000",
  456. "value": "5000"
  457. }, {
  458. "label": "1万",
  459. "value": "10000"
  460. }],
  461. desc: "保险期间内,被保险机动车在被保险人或被保险机动车驾驶人使用过程中,发生无明显碰撞痕迹的车身划痕损失,保险人按照保险合同约定负责赔偿的险种",
  462. isMainRisk: true,
  463. kindCode: "L",
  464. kindName: "车身划痕险",
  465. mainRiskCodeList: "A"
  466. },
  467. {
  468. amount: "0",
  469. amountDesc: "不投保",
  470. amtList: [{
  471. "label": "不投保",
  472. "value": "0"
  473. }, {
  474. "label": "5%",
  475. "value": "5"
  476. }, {
  477. "label": "10%",
  478. "value": "10"
  479. }, {
  480. "label": "15%",
  481. "value": "15"
  482. }, {
  483. "label": "20%",
  484. "value": "20"
  485. }],
  486. desc: "被保险机动车发生主险约定的保险事故,保险人按照主险的约定计算赔款后,扣减本特约条款约定的免赔的险种。",
  487. isMainRisk: true,
  488. kindCode: "MJ1",
  489. kindName: "绝对免赔率特约险(车损)",
  490. mainRiskCodeList: "A"
  491. },
  492. {
  493. amount: "0",
  494. amountDesc: "不投保",
  495. amtList: [{
  496. "label": "不投保",
  497. "value": "0"
  498. }, {
  499. "label": "5%",
  500. "value": "5"
  501. }, {
  502. "label": "10%",
  503. "value": "10"
  504. }, {
  505. "label": "15%",
  506. "value": "15"
  507. }, {
  508. "label": "20%",
  509. "value": "20"
  510. }],
  511. desc: "被保险机动车发生主险约定的保险事故,保险人按照主险的约定计算赔款后,扣减本特约条款约定的免赔的险种。",
  512. isMainRisk: true,
  513. kindCode: "MJ2",
  514. kindName: "绝对免赔率特约险(三者)",
  515. mainRiskCodeList: "B"
  516. },
  517. {
  518. amount: "0",
  519. amountDesc: "不投保",
  520. amtList: [{
  521. "label": "不投保",
  522. "value": "0"
  523. }, {
  524. "label": "5%",
  525. "value": "5"
  526. }, {
  527. "label": "10%",
  528. "value": "10"
  529. }, {
  530. "label": "15%",
  531. "value": "15"
  532. }, {
  533. "label": "20%",
  534. "value": "20"
  535. }],
  536. desc: "被保险机动车发生主险约定的保险事故,保险人按照主险的约定计算赔款后,扣减本特约条款约定的免赔的险种。",
  537. isMainRisk: true,
  538. kindCode: "MJ3",
  539. kindName: "绝对免赔率特约险(司机)",
  540. mainRiskCodeList: "D3"
  541. },
  542. {
  543. amount: "0",
  544. amountDesc: "不投保",
  545. amtList: [{
  546. "label": "不投保",
  547. "value": "0"
  548. }, {
  549. "label": "5%",
  550. "value": "5"
  551. }, {
  552. "label": "10%",
  553. "value": "10"
  554. }, {
  555. "label": "15%",
  556. "value": "15"
  557. }, {
  558. "label": "20%",
  559. "value": "20"
  560. }],
  561. desc: "被保险机动车发生主险约定的保险事故,保险人按照主险的约定计算赔款后,扣减本特约条款约定的免赔的险种。",
  562. isMainRisk: true,
  563. kindCode: "MJ4",
  564. kindName: "绝对免赔率特约险(乘客)",
  565. mainRiskCodeList: "D4"
  566. },
  567. {
  568. amount: "0",
  569. amountDesc: "不投保",
  570. coveragePremium: 0,
  571. amtList: [{
  572. label: "不投保",
  573. value: "0"
  574. },
  575. {
  576. label: "1万",
  577. value: "10000"
  578. },
  579. {
  580. label: "2万",
  581. value: "20000"
  582. },
  583. {
  584. label: "4万",
  585. value: "40000"
  586. },
  587. {
  588. label: "5万",
  589. value: "50000"
  590. },
  591. {
  592. label: "8万",
  593. value: "80000"
  594. },
  595. {
  596. label: "10万",
  597. value: "100000"
  598. },
  599. {
  600. label: "20万",
  601. value: "200000"
  602. },
  603. {
  604. label: "30万",
  605. value: "300000"
  606. },
  607. {
  608. label: "50万",
  609. value: "500000"
  610. },
  611. {
  612. label: "100万",
  613. value: "1000000"
  614. },
  615. {
  616. label: "200万",
  617. value: "2000000"
  618. },
  619. {
  620. label: "300万",
  621. value: "3000000"
  622. },
  623. ],
  624. kindCode: "SY_FJ_YBW1",
  625. isMainRisk: true,
  626. kindName: "附加医保-三者",
  627. desc: "附加医保外医疗费用责任险(机动车第三者责任保险)"
  628. },
  629. {
  630. amount: "0",
  631. amountDesc: "不投保",
  632. coveragePremium: 0,
  633. amtList: [{
  634. label: "不投保",
  635. value: "0"
  636. },
  637. {
  638. label: "1万",
  639. value: "10000"
  640. },
  641. {
  642. label: "2万",
  643. value: "20000"
  644. },
  645. {
  646. label: "5万",
  647. value: "50000"
  648. },
  649. {
  650. label: "10万",
  651. value: "100000"
  652. }
  653. ],
  654. kindCode: "SY_FJ_YBW2",
  655. isMainRisk: true,
  656. kindName: "附加医保-座位险(乘客)",
  657. desc: "附加医保外医疗费用责任险(机动车第三者责任保险)"
  658. },
  659. {
  660. amount: "0",
  661. amountDesc: "不投保",
  662. coveragePremium: 0,
  663. amtList: [{
  664. label: "不投保",
  665. value: "0"
  666. },
  667. {
  668. label: "1万",
  669. value: "10000"
  670. },
  671. {
  672. label: "2万",
  673. value: "20000"
  674. },
  675. {
  676. label: "5万",
  677. value: "50000"
  678. },
  679. {
  680. label: "10万",
  681. value: "100000"
  682. }
  683. ],
  684. kindCode: "SY_FJ_YBW3",
  685. isMainRisk: true,
  686. kindName: "附加医保-座位险(司机)",
  687. desc: "附加医保外医疗费用责任险(机动车第三者责任保险)"
  688. },
  689. {
  690. amount: "0",
  691. amountDesc: "不投保",
  692. amtList: [{
  693. label: "不投保",
  694. value: "0"
  695. },
  696. {
  697. label: "50万",
  698. value: "500000"
  699. },
  700. {
  701. label: "100万",
  702. value: "1000000"
  703. },
  704. {
  705. label: "150万",
  706. value: "1500000"
  707. },
  708. {
  709. label: "200万",
  710. value: "2000000"
  711. },
  712. {
  713. label: "250万",
  714. value: "2500000"
  715. },
  716. {
  717. label: "300万",
  718. value: "3000000"
  719. },
  720. {
  721. label: "500万",
  722. value: "5000000"
  723. },
  724. {
  725. label: "1000万",
  726. value: "10000000"
  727. }
  728. ],
  729. desc: "保险期间内,被保险人或其允许的驾驶人在法定节假日期间使用被保险机动车发生机动车第三者责任保险范围内的事故,并经公安部门或保险人查勘确认的,被保险机动车第三者责任保险所适用的责任限额在保险单载明的基础上增加一倍的险种",
  730. isMainRisk: true,
  731. kindCode: "BD",
  732. kindName: "法定节假日限额翻倍险",
  733. mainRiskCodeList: "B"
  734. }
  735. ],
  736. accidentForm: {
  737. fen: "1"
  738. }, //意外险内容
  739. //永诚转保确认码
  740. cqryCdeJq: "",
  741. cqryCdeSy: "",
  742. renewalCodeJq: "", //交强确认码
  743. renewalCodeSy: "", //商业确认码
  744. //-----------------
  745. totalCompanyList: [], //保险公司列表
  746. notStartedQuote: true, //未开始报价(true表示未开始报价,false表示已经报价结束)
  747. quoteCompanyCount: 0,
  748. }
  749. },
  750. async onLoad() {
  751. const eventChannel = this.getOpenerEventChannel()
  752. // 监听acceptData事件,获取上一页面通过eventChannel传送到当前页面的数据
  753. eventChannel.on('acceptData', async (data) => {
  754. console.log(data)
  755. this.carInfo = data.carInfo; //车辆信息
  756. this.ownerInfo = data.ownerInfo; //车主信息
  757. this.policyHolderInfo = data.policyHolderInfo; //投保人信息
  758. this.insuredPersonInfo = data.insuredPersonInfo; //被保人信息
  759. this.riskList = data.riskList; //险种大类
  760. this.kindList = data.kindList; //商业险险别
  761. this.vehicleAndVesselTaxForm = data.vehicleAndVesselTaxForm; //车船税信息
  762. this.orderno = data.orderno;
  763. this.quoteno = data.quoteno;
  764. if (data.quoteno) {
  765. this.imageEcho(data.quoteno) // 影像获取完毕
  766. } else {
  767. this.carInfoPositiveList = data.carInfoPositiveList; //车辆
  768. this.ownerInfoPositiveList = data.ownerInfoPositiveList; //车主
  769. this.policyHolderInfoPositiveList = data.policyHolderInfoPositiveList; //投保
  770. this.insuredPersonInfoPositiveList = data.insuredPersonInfoPositiveList; //被保人
  771. }
  772. if (this.riskList.length > 0) {
  773. for (let i = 0; i < this.riskList.length; i++) {
  774. if (this.riskList[i].riskCode == '0507') {
  775. this.jqstartDate = this.riskList[i].startDate;
  776. this.jqendDate = this.riskList[i].endDate;
  777. }
  778. if (this.riskList[i].riskCode == '0510') {
  779. this.systartDate = this.riskList[i].startDate;
  780. this.syendDate = this.riskList[i].endDate;
  781. this.kindList.map(ele1 => {
  782. this.insureList.map(ele2 => {
  783. if (ele2.kindCode == ele1.kindCode) {
  784. console.log(ele1.kindCode)
  785. switch (ele1.kindCode) {
  786. case 'D4':
  787. case 'SY_FJ_YBW2':
  788. ele2.amount = ele1.unitAmount;
  789. break;
  790. case "MJ1":
  791. case "MJ2":
  792. case "MJ3":
  793. case "MJ4":
  794. ele2.amount = ele1.deductibleRate;
  795. break;
  796. default:
  797. ele2.amount = ele1.amount;
  798. }
  799. }
  800. })
  801. })
  802. console.log(this.insureList)
  803. }
  804. }
  805. }
  806. })
  807. this.commpanyList();
  808. },
  809. methods: {
  810. jqstartconfirm(e) {
  811. this.jqstartDate = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
  812. this.jqendDate = this.oneYearPast(this.jqstartDate)
  813. },
  814. jqendconfirm(e) {
  815. this.jqendDate = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
  816. },
  817. systartconfirm(e) {
  818. this.systartDate = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
  819. this.syendDate = this.oneYearPast(this.systartDate)
  820. },
  821. syendconfirm(e) {
  822. this.syendDate = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
  823. },
  824. //影像查询
  825. async imageEcho(quotenos) {
  826. let imgres = await this.$http.get('/ins/taskImage/findByQuoteNo?quoteNo=' + quotenos);
  827. if (imgres.code == "200") {
  828. Object.keys(imgres.data).forEach((keys) => {
  829. if (imgres.data[keys].url) {
  830. imgres.data[keys].url = this.$base.baseUrl + imgres.data[keys].url;
  831. switch (keys) {
  832. case 'C01':
  833. this.carInfoPositiveList.push({
  834. imageId: imgres.data[keys].imageId,
  835. imageType: imgres.data[keys].imageType,
  836. })
  837. break;
  838. case 'D01':
  839. this.carInfoPositiveList.push({
  840. imageId: imgres.data[keys].imageId,
  841. imageType: imgres.data[keys].imageType,
  842. })
  843. break;
  844. case 'C02':
  845. this.ownerInfoPositiveList.push({
  846. imageId: imgres.data[keys].imageId,
  847. imageType: imgres.data[keys].imageType,
  848. });
  849. break;
  850. case 'D02':
  851. this.ownerInfoPositiveList.push({
  852. imageId: imgres.data[keys].imageId,
  853. imageType: imgres.data[keys].imageType,
  854. });
  855. break;
  856. case 'C03':
  857. this.policyHolderInfoPositiveList.push({
  858. imageId: imgres.data[keys].imageId,
  859. imageType: imgres.data[keys].imageType,
  860. });
  861. break;
  862. case 'D03':
  863. this.policyHolderInfoPositiveList.push({
  864. imageId: imgres.data[keys].imageId,
  865. imageType: imgres.data[keys].imageType,
  866. });
  867. break;
  868. case 'C04':
  869. this.insuredPersonInfoPositiveList.push({
  870. imageId: imgres.data[keys].imageId,
  871. imageType: imgres.data[keys].imageType,
  872. });
  873. break;
  874. case 'D04':
  875. this.insuredPersonInfoPositiveList.push({
  876. imageId: imgres.data[keys].imageId,
  877. imageType: imgres.data[keys].imageType,
  878. });
  879. break;
  880. default:
  881. break;
  882. }
  883. }
  884. });
  885. }
  886. },
  887. //查看详情
  888. querydetial(id) {
  889. this.navigate({
  890. url: "/pages/carInsure1/quoteDetail1?companyId=" + id
  891. },
  892. "navigateTo", true);
  893. },
  894. //报价单
  895. bjdpreview(id) {
  896. uni.navigateTo({
  897. url: "/pages/orders/quotation?companyId=" + id
  898. })
  899. },
  900. //选择协议
  901. selectConfirm(e, index) {
  902. this.totalCompanyList[index].agreementId = e[0].value;
  903. this.totalCompanyList[index].agreementName = e[0].label;
  904. this.totalCompanyList[index].apiType = e[0].extra;
  905. },
  906. /**
  907. * 选择保险公司方法
  908. * @param {String} event change选中事件
  909. * @param {String} code 保险公司ID
  910. * @param {String} name 保险公司主体全拼
  911. * @param {String} index 选中下标
  912. */
  913. checkboxChange(event, code, name, index) {
  914. this.totalCompanyList[index].checked = event.value;
  915. let arr = this.totalCompanyList[index].agreement;
  916. let list = [];
  917. list = arr.filter(item => {
  918. return item.licenseNo.length > 0 ? item.licenseNo.includes(this.carInfo.licenseNo.slice(
  919. 0,
  920. 2)) : "true"
  921. })
  922. list.map(ele => {
  923. ele.extra = ele.apiType;
  924. return ele;
  925. })
  926. this.totalCompanyList[index].agreement = list;
  927. this.totalCompanyList[index].agreementId = this.totalCompanyList[index].agreement[0].id;
  928. this.totalCompanyList[index].agreementName = this.totalCompanyList[index].agreement[0].agreementName;
  929. this.totalCompanyList[index].apiType = this.totalCompanyList[index].agreement[0].extra;
  930. },
  931. //获取保险公司列表
  932. async commpanyList() {
  933. let commpanykad = await this.$http.get('/insurance/order/getAgreementInsCompany');
  934. commpanykad.data.map(ele => {
  935. ele["result"] = {};
  936. ele["quoteCode"] = 0;
  937. ele["checked"] = false;
  938. ele["msg"] = "";
  939. ele["agreementId"] = "";
  940. ele["lastYearMsg"] = "";
  941. ele["agreementName"] = "";
  942. ele["apiType"] = "";
  943. ele["selectShow"] = false;
  944. })
  945. this.totalCompanyList = commpanykad.data;
  946. },
  947. async toNext() {
  948. if (this.quoteno) {
  949. this.OrderStageProcessing();
  950. } else {
  951. let getquote = await this.$http.get('/ins/tool/getQuoteNo');
  952. this.quoteno = getquote.data;
  953. this.OrderStageProcessing();
  954. }
  955. },
  956. async OrderStageProcessing() {
  957. let mergedArray = [];
  958. let mergedArrayList = mergedArray.concat(this.carInfoPositiveList, this.ownerInfoPositiveList, this
  959. .policyHolderInfoPositiveList, this.insuredPersonInfoPositiveList)
  960. if (mergedArrayList.length > 0) {
  961. await this.$http.post('/ins/taskImage/uploadImages', {
  962. imageList: mergedArrayList,
  963. quoteNo: this.quoteno,
  964. })
  965. }
  966. let param = {
  967. userId: this.userInfo.sysUser.id,
  968. quoteno: this.quoteno,
  969. orderNo: this.orderno ? this.orderno : "",
  970. carInfo: this.carInfo,
  971. insuredPersonInfo: this.insuredPersonInfo,
  972. ownerInfo: this.ownerInfo,
  973. policyHolderInfo: this.policyHolderInfo,
  974. kindList: this.kindList,
  975. riskList: this.riskList,
  976. vehicleAndVesselTax: this.vehicleAndVesselTaxForm,
  977. };
  978. let orders = await this.$http.post('/insurance/order/generateOrder', param);
  979. if (orders.code == '200') {
  980. this.orderno = orders.data.orderno;
  981. this.totalCompanyList.map((ele, index) => {
  982. if (ele.checked) {
  983. //动态调用报价接口
  984. ele.quoteCode = "1";
  985. this.ToolClickFun(ele.cnName, index, ele.id);
  986. }
  987. });
  988. }
  989. },
  990. //动态函数
  991. ToolClickFun(MethodName, Parameter, companyId) {
  992. this[`${MethodName}`](Parameter, companyId)
  993. },
  994. //永安报价
  995. async yongan(num, id) {
  996. let params = {
  997. orderNo: this.orderno,
  998. companyId: id
  999. };
  1000. let quote = await this.$http('/order/yongAn/quote', params);
  1001. if (quote.msg == "重复投保" && quote.code == "501") {
  1002. if (!!quote.data.jqStartDate && !quote.data.syStartDate) {
  1003. this.jqstartDate = quote.data.jqStartDate;
  1004. this.jqendDate = quote.data.jqEndDate;
  1005. if (this.riskList.length > 0) {
  1006. for (let i = 0; i < this.riskList.length; i++) {
  1007. if (this.riskList[i].riskCode == "0507") {
  1008. this.riskList[i].startDate = quote.data.jqStartDate;
  1009. this.riskList[i].endDate = quote.data.jqEndDate;
  1010. }
  1011. }
  1012. }
  1013. let param = {
  1014. userId: this.userInfo.sysUser.id,
  1015. quoteno: this.quoteno,
  1016. orderNo: this.orderno,
  1017. carInfo: this.carInfo,
  1018. insuredPersonInfo: this.insuredPersonInfo,
  1019. ownerInfo: this.ownerInfo,
  1020. policyHolderInfo: this.policyHolderInfo,
  1021. kindList: this.kindList,
  1022. riskList: this.riskList,
  1023. vehicleAndVesselTax: this.vehicleAndVesselTaxForm,
  1024. };
  1025. await this.$http.post('/insurance/order/generateOrder', param);
  1026. return this.yongan(num, id);
  1027. } else if (!!quote.data.syStartDate && !quote.data.jqStartDate) {
  1028. } else if (!!quote.data.syStartDate && !!quote.data.jqStartDate) {
  1029. } else {
  1030. this.totalCompanyList[num].quoteCode = "3";
  1031. this.totalCompanyList[num].msg = "重复投保";
  1032. }
  1033. } else if (quote.code == "500" || quote.code == "502" || quote.code == "-9999") {
  1034. this.totalCompanyList[num].quoteCode = "-9999";
  1035. this.totalCompanyList[num].msg = quote.msg;
  1036. } else {
  1037. this.totalCompanyList[num].quoteCode = 200;
  1038. this.totalCompanyList[num].result = quote.data;
  1039. }
  1040. },
  1041. //中煤报价
  1042. async zhongmei(num, id) {
  1043. let params = {
  1044. accidentalDrivingVo: this.zmDrivingForm,
  1045. orderNo: this.orderno,
  1046. companyId: id,
  1047. agreementId: this.totalCompanyList[num].agreementId,
  1048. };
  1049. let res = await this.$http.post('/order/zhongMeiApi/quote', params);
  1050. this.totalCompanyList[num].msg = res.msg;
  1051. if (!!res.msg && res.msg.indexOf("不存在有效协议") >= 0) {
  1052. this.totalCompanyList[num].quoteCode = "4";
  1053. this.totalCompanyList[num].msg = res.msg;
  1054. return;
  1055. } else if (
  1056. res.data == null &&
  1057. res.msg.indexOf("交强险平台返回") > -1 &&
  1058. res.msg.indexOf(";终保日期") > -1
  1059. ) {
  1060. let time =
  1061. res.msg.substr(res.msg.indexOf(";终保日期 ") + 6, 16) + ":00";
  1062. this.jqstartDate = time;
  1063. this.jqendDate = this.oneYearPast(time);
  1064. if (this.riskList.length > 0) {
  1065. for (let i = 0; i < this.riskList.length; i++) {
  1066. if (this.riskList[i].riskCode == "0507") {
  1067. this.riskList[i].startDate = time;
  1068. this.riskList[i].endDate = this.oneYearPast(time);
  1069. }
  1070. }
  1071. }
  1072. let param = {
  1073. userId: this.userInfo.sysUser.id,
  1074. quoteno: this.quoteno,
  1075. orderNo: this.orderno,
  1076. carInfo: this.carInfo,
  1077. insuredPersonInfo: this.insuredPersonInfo,
  1078. ownerInfo: this.ownerInfo,
  1079. policyHolderInfo: this.policyHolderInfo,
  1080. kindList: this.kindList,
  1081. riskList: this.riskList,
  1082. vehicleAndVesselTax: this.vehicleAndVesselTaxForm,
  1083. };
  1084. await this.$http.post('/insurance/order/generateOrder', param);
  1085. return this.zhongmei(num, id);
  1086. } else if (res.code == '200') {
  1087. if (res.data.warnMessageList.length > 0) {
  1088. this.totalCompanyList[num].lastYearMsg = "";
  1089. let dat = res.data.warnMessageList;
  1090. dat.map(ele => {
  1091. this.totalCompanyList[num].lastYearMsg += ele + '<br>';
  1092. })
  1093. }
  1094. this.totalCompanyList[num].quoteCode = 200;
  1095. this.totalCompanyList[num].result = res.data;
  1096. } else {
  1097. this.totalCompanyList[num].quoteCode = "3";
  1098. this.totalCompanyList[num].msg = res.msg;
  1099. return;
  1100. }
  1101. },
  1102. //永诚报价
  1103. async yongcheng(num, id) {
  1104. let accidentalDrivingVo = {};
  1105. if (this.accidentForm.id) {
  1106. let data = this.accidentDataList.find(
  1107. val => val.id == this.accidentForm.accidentType
  1108. );
  1109. accidentalDrivingVo = {
  1110. rideRiskCode: data.code ? data.code : "",
  1111. rideRiskName: data.name ? data.name : "",
  1112. quantity: this.accidentForm.fen ? this.accidentForm.fen : ""
  1113. };
  1114. }
  1115. let params = {
  1116. accidentalDrivingVo,
  1117. orderNo: this.orderno,
  1118. companyId: id,
  1119. cqryCdeJq: this.cqryCdeJq,
  1120. cqryCdeSy: this.cqryCdeSy,
  1121. renewalCodeJq: this.renewalCodeJq,
  1122. renewalCodeSy: this.renewalCodeSy,
  1123. agreementId: this.totalCompanyList[num].agreementId,
  1124. };
  1125. let res = await this.$http.post('/api/yongCheng/quote', params);
  1126. this.totalCompanyList[num].msg = res.msg;
  1127. if (res.code == "200") {
  1128. if (res.data.warnMessageList.length > 0) {
  1129. this.totalCompanyList[num].lastYearMsg = "";
  1130. let dat = res.data.warnMessageList;
  1131. dat.map(ele => {
  1132. this.totalCompanyList[num].lastYearMsg += ele + '<br>';
  1133. })
  1134. }
  1135. this.totalCompanyList[num].quoteCode = 200;
  1136. this.totalCompanyList[num].result = res.data;
  1137. } else if (res.code == "101") {
  1138. this.totalCompanyList[num].quoteCode = "101";
  1139. this.totalCompanyList[num].msg = res.msg;
  1140. this.cqryCdeJq = res.data.cqryCdeJq;
  1141. this.cqryCdeSy = res.data.cqryCdeSy;
  1142. let jq = res.data.renewalCodeJq.replace(/[\r\n]/g, "");
  1143. let jqBase64 = `data:image/png;base64,${jq}`;
  1144. this.renewalCodeJqImg = jqBase64;
  1145. if (res.data.renewalCodeSy) {
  1146. let sy = res.data.renewalCodeSy.replace(/[\r\n]/g, "");
  1147. let syBase64 = `data:image/png;base64,${sy}`;
  1148. this.renewalCodeSyImg = syBase64;
  1149. }
  1150. this.renewalCodedialogVisible = true;
  1151. } else {
  1152. this.totalCompanyList[num].quoteCode = "3";
  1153. this.totalCompanyList[num].msg = res.msg;
  1154. return;
  1155. }
  1156. },
  1157. //紫金报价
  1158. async zijin(num, id) {
  1159. let params = {
  1160. accidentalDrivingVo: this.zjaccidentalDrivingVo,
  1161. orderNo: this.orderno,
  1162. companyId: id,
  1163. agreementId: this.totalCompanyList[num].agreementId,
  1164. };
  1165. let res = await this.$http.post('/order/zijin/quote', params);
  1166. this.totalCompanyList[num].msg = res.msg;
  1167. if (res.code == '200') {
  1168. if (res.data.warnMessageList.length > 0) {
  1169. this.totalCompanyList[num].lastYearMsg = "";
  1170. let dat = res.data.warnMessageList;
  1171. dat.map(ele => {
  1172. this.totalCompanyList[num].lastYearMsg += ele + '<br>';
  1173. })
  1174. }
  1175. this.totalCompanyList[num].quoteCode = 200;
  1176. this.totalCompanyList[num].result = res.data;
  1177. } else {
  1178. this.totalCompanyList[num].quoteCode = "3";
  1179. this.totalCompanyList[num].msg = res.msg;
  1180. return;
  1181. }
  1182. },
  1183. //爬虫统一报价接口
  1184. async quoteInsurance(num, id, apiType) {
  1185. let api = apiType === 2 ? "/insurance/crawler/quote" : "anshengquote";
  1186. let params = {
  1187. orderNo: this.orderno,
  1188. companyId: id,
  1189. agreementId: this.totalCompanyList[num].agreementId,
  1190. };
  1191. let res = await this.$http.post(`${api}`, params);
  1192. this.totalCompanyList[num].msg = res.msg;
  1193. if (!!res.data) {
  1194. if (res.data.warnMessageList[0] != null && res.data.warnMessageList[0] != "") {
  1195. this.totalCompanyList[num].lastYearMsg = "";
  1196. let dat = res.data.warnMessageList;
  1197. dat.map(ele => {
  1198. this.totalCompanyList[num].lastYearMsg += ele;
  1199. })
  1200. }
  1201. this.totalCompanyList[num].quoteCode = 200;
  1202. this.totalCompanyList[num].result = res.data;
  1203. } else {
  1204. this.totalCompanyList[num].quoteCode = "3";
  1205. this.totalCompanyList[num].msg = res.msg;
  1206. return;
  1207. }
  1208. },
  1209. //安盛天平
  1210. ansheng(num, id) {
  1211. this.quoteInsurance(num, id, this.totalCompanyList[num].apiType);
  1212. },
  1213. //众安
  1214. zhongan(num, id) {
  1215. this.quoteInsurance(num, id, this.totalCompanyList[num].apiType);
  1216. },
  1217. //人寿
  1218. renshou(num, id) {
  1219. this.quoteInsurance(num, id, this.totalCompanyList[num].apiType);
  1220. },
  1221. //恒邦
  1222. hengbang(num, id) {
  1223. this.quoteInsurance(num, id, this.totalCompanyList[num].apiType);
  1224. },
  1225. Lastyear() {
  1226. this.$refs.lastYearMsgCI.show() // 显示
  1227. },
  1228. adjustPopupInsureSubmit() {
  1229. this.$refs.lastYearMsgCI.hide() // 显示
  1230. },
  1231. // 重新选择车型
  1232. toCarInfo() {
  1233. this.navigate({
  1234. url: '/pages/carInsure1/carInfo1',
  1235. success: (res) => {
  1236. res.eventChannel.emit("acceptData", {
  1237. carInfo: this.carInfo,
  1238. ownerInfo: this.ownerInfo,
  1239. policyHolderInfo: this.policyHolderInfo,
  1240. insuredPersonInfo: this.insuredPersonInfo,
  1241. riskList: this.riskList,
  1242. kindList: this.kindList,
  1243. carInfoPositiveList: this.carInfoPositiveList, //车辆
  1244. ownerInfoPositiveList: this.ownerInfoPositiveList, //车主
  1245. policyHolderInfoPositiveList: this.policyHolderInfoPositiveList, //投保
  1246. insuredPersonInfoPositiveList: this.insuredPersonInfoPositiveList, //被保人
  1247. })
  1248. }
  1249. }, "navigateTo", true);
  1250. },
  1251. // 重新选择方案
  1252. toInsureItems() {
  1253. this.navigate({
  1254. url: '/pages/carInsure1/insureItems1',
  1255. success: (res) => {
  1256. res.eventChannel.emit("acceptData", {
  1257. carInfo: this.carInfo,
  1258. ownerInfo: this.ownerInfo,
  1259. policyHolderInfo: this.policyHolderInfo,
  1260. insuredPersonInfo: this.insuredPersonInfo,
  1261. riskList: this.riskList,
  1262. kindList: this.kindList,
  1263. carInfoPositiveList: this.carInfoPositiveList, //车辆
  1264. ownerInfoPositiveList: this.ownerInfoPositiveList, //车主
  1265. policyHolderInfoPositiveList: this.policyHolderInfoPositiveList, //投保
  1266. insuredPersonInfoPositiveList: this.insuredPersonInfoPositiveList, //被保人
  1267. vehicleModel: this.vehicleModel,
  1268. })
  1269. }
  1270. }, "navigateTo", true);
  1271. },
  1272. // 显示报错信息
  1273. ErrorMsg(msg, title) {
  1274. uni.showModal({
  1275. title: title + "报价提示",
  1276. content: msg,
  1277. showCancel: false,
  1278. confirmText: "关闭"
  1279. })
  1280. },
  1281. //上年信息
  1282. YearMsg(msg, title) {
  1283. uni.showModal({
  1284. title: title + "上年信息",
  1285. content: msg,
  1286. showCancel: false,
  1287. confirmText: "关闭"
  1288. })
  1289. },
  1290. //使用此时间
  1291. syncData(item) {
  1292. this.jqstartDate = item.startDateJq ? item.startDateJq : this.jqstartDate
  1293. this.jqendDate = item.endDateJq ? item.endDateJq : this.endDateJq
  1294. this.systartDate = item.startDateSy ? item.startDateSy : this.systartDate
  1295. this.syendDate = item.endDateSy ? item.endDateSy : this.syendDate
  1296. uni.showToast({
  1297. title: '时间已替换',
  1298. icon: 'none',
  1299. duration: 1000
  1300. });
  1301. },
  1302. oneYearPast(time) {
  1303. var date = new Date(time);
  1304. date.setSeconds(date.getSeconds() - 1);
  1305. date.setFullYear(date.getFullYear() + 1); //一年后
  1306. date.setTime(date.getTime()); //一年后的前一天
  1307. var strYear = date.getFullYear();
  1308. var strDay = date.getDate();
  1309. var strMonth = date.getMonth() + 1;
  1310. var hh = date.getHours();
  1311. var minutes = date.getMinutes(); // 分
  1312. var Seconds = date.getSeconds();
  1313. if (hh < 10) {
  1314. hh = "0" + hh;
  1315. }
  1316. if (minutes < 10) {
  1317. minutes = "0" + minutes;
  1318. }
  1319. if (Seconds < 10) {
  1320. Seconds = "0" + Seconds;
  1321. }
  1322. if (strMonth < 10) {
  1323. strMonth = "0" + strMonth;
  1324. }
  1325. if (strDay < 10) {
  1326. strDay = "0" + strDay;
  1327. }
  1328. var datastr =
  1329. strYear + "-" + strMonth + "-" + strDay + " " + hh + ":" + minutes + ":" + Seconds;
  1330. return datastr;
  1331. },
  1332. }
  1333. }
  1334. </script>
  1335. <style lang="scss" scoped>
  1336. @import '@/style/mixin.scss';
  1337. /* 头部车辆信息和特权Start */
  1338. .carInfo {
  1339. height: 330upx;
  1340. background: -webkit-linear-gradient(0deg, rgba($themeColor, 0.6), rgba($themeColor, 0.8));
  1341. background-size: 100% 100%;
  1342. }
  1343. .carInfo .topLeft {
  1344. width: 120upx;
  1345. font-size: 90upx;
  1346. color: #FFFFFF;
  1347. }
  1348. .carInfo .topRight .brandName {
  1349. width: 400upx;
  1350. overflow: hidden;
  1351. text-overflow: ellipsis;
  1352. white-space: nowrap;
  1353. }
  1354. .carInfo .other {
  1355. background-color: #FFFFFF;
  1356. height: 80upx;
  1357. border-radius: 15upx;
  1358. box-sizing: border-box;
  1359. }
  1360. .carInfo .other .privilege {
  1361. background-color: rgba($themeColor, 0.6);
  1362. font-size: 24upx;
  1363. color: #FFFFFF;
  1364. font-weight: bold;
  1365. }
  1366. .carInfo .other .content {
  1367. width: 460upx;
  1368. margin-left: 15upx;
  1369. overflow: hidden;
  1370. text-overflow: ellipsis;
  1371. white-space: nowrap;
  1372. }
  1373. .carInfo .other .icon {
  1374. width: 30upx;
  1375. }
  1376. /* 头部车辆信息和特权End */
  1377. .pageContent {
  1378. position: relative;
  1379. top: -50upx;
  1380. padding-bottom: 100px;
  1381. }
  1382. /* 报价方案Start */
  1383. .quotePlan {
  1384. background: #FFFFFF;
  1385. position: relative;
  1386. border-radius: 20upx;
  1387. }
  1388. .quotePlan .header {
  1389. height: 80upx;
  1390. position: relative;
  1391. border-bottom: 1px solid #E6E8EA;
  1392. }
  1393. .quotePlan .header .title {
  1394. // font-size: 30upx;
  1395. font-weight: bold;
  1396. padding-left: 25upx;
  1397. }
  1398. .quotePlan .header .title:before {
  1399. content: "";
  1400. position: absolute;
  1401. left: 30upx;
  1402. top: 25upx;
  1403. width: 8upx;
  1404. height: 30upx;
  1405. background-color: $themeColor;
  1406. }
  1407. .quotePlan .body {
  1408. padding: 0 30upx 10upx;
  1409. }
  1410. .quotePlan .body .insurance {
  1411. padding-bottom: 20upx;
  1412. border-bottom: 1px dashed #E6E8EA;
  1413. }
  1414. .carTypeItem {
  1415. padding: 0 30upx 20upx;
  1416. border-bottom: 1px solid #e5e5e5;
  1417. margin-top: 20upx;
  1418. width: 100%;
  1419. box-sizing: border-box;
  1420. }
  1421. .carTypeItem .nav .carseriesName {
  1422. font-size: 34upx;
  1423. width: 360upx;
  1424. font-family: PingFangSC-Medium, PingFangSC;
  1425. color: #4a4a4a;
  1426. overflow: hidden;
  1427. text-overflow: ellipsis;
  1428. white-space: nowrap;
  1429. }
  1430. .carTypeItem .nav .modelName {
  1431. font-size: 26upx;
  1432. width: 400upx;
  1433. font-family: PingFangSC-Medium, PingFangSC;
  1434. overflow: hidden;
  1435. text-overflow: ellipsis;
  1436. white-space: nowrap;
  1437. }
  1438. .carTypeItem .nav .nav_box {
  1439. margin: 10upx 0;
  1440. }
  1441. .carTypeItem .nav .nav_box .zid {
  1442. display: inline-block;
  1443. padding: 6upx 10upx;
  1444. font-size: 24upx;
  1445. height: 40upx;
  1446. background: #AFC9F7;
  1447. border-radius: 25upx;
  1448. color: #007AFF;
  1449. font-weight: bold;
  1450. line-height: 40upx;
  1451. }
  1452. .carTypeItem .nav .nav_box>p {
  1453. margin-left: 30upx;
  1454. color: #999;
  1455. font-size: 24upx;
  1456. }
  1457. .carTypeItem .price {
  1458. font-size: 16px;
  1459. width: 200upx;
  1460. flex-shrink: 0;
  1461. font-family: PingFangSC-Regular, PingFangSC;
  1462. font-weight: 400;
  1463. color: #007AFF;
  1464. }
  1465. .quotePlan .body .row {
  1466. height: 70upx;
  1467. }
  1468. .quotePlan .body .date {
  1469. background-color: $themeColor;
  1470. color: $themeColor;
  1471. font-size: 22upx;
  1472. padding: 0upx 7upx;
  1473. border-radius: 3upx;
  1474. margin: 10upx;
  1475. margin-right: 10upx;
  1476. }
  1477. /* 报价方案End */
  1478. /* 报价公司Start */
  1479. .quoteCompany {
  1480. margin: 20upx 30upx;
  1481. box-sizing: border-box;
  1482. /* background:#FFFFFF; */
  1483. position: relative;
  1484. border-radius: 20upx;
  1485. }
  1486. .quoteCompany .header {
  1487. height: 80upx;
  1488. padding: 0 30upx;
  1489. position: relative;
  1490. }
  1491. .quoteCompany .header .title {
  1492. font-size: 30upx;
  1493. font-weight: bold;
  1494. padding-left: 25upx;
  1495. }
  1496. .quoteCompany .header .title:before {
  1497. content: "";
  1498. position: absolute;
  1499. left: 30upx;
  1500. top: 25upx;
  1501. width: 8upx;
  1502. height: 30upx;
  1503. background-color: rgba($themeColor, 0.6);
  1504. }
  1505. .quoteCompany .header .title .icon {
  1506. color: rgba($themeColor, 0.6);
  1507. margin-left: 15upx;
  1508. }
  1509. .quoteCompanyItem {
  1510. margin-bottom: 20upx;
  1511. background: #FFFFFF;
  1512. border-radius: 15upx;
  1513. padding: 10px 20px 0 20px;
  1514. box-sizing: border-box;
  1515. cursor: pointer;
  1516. }
  1517. .quoteCompanyItem>view>view {
  1518. padding: 5px 0;
  1519. }
  1520. .quoteCompanyItem .top {
  1521. position: relative;
  1522. }
  1523. .quoteCompanyItem .top .companyIcon {
  1524. flex-shrink: 0;
  1525. }
  1526. .quoteCompanyItem .top .companyIcon image {
  1527. width: 34px;
  1528. height: 34px;
  1529. margin-right: 10px;
  1530. }
  1531. .quoteCompanyItem .top .companyName {
  1532. font-size: 32upx;
  1533. font-weight: bold;
  1534. width: 180upx;
  1535. overflow: hidden;
  1536. text-overflow: ellipsis;
  1537. white-space: nowrap;
  1538. }
  1539. .quoteCompanyItem .top .totalMoney {
  1540. font-size: 40upx;
  1541. font-weight: bold;
  1542. color: $themeColor;
  1543. position: absolute;
  1544. top: -15upx;
  1545. right: 0;
  1546. }
  1547. .quoteCompanyItem .top .tip {
  1548. font-size: 26upx;
  1549. font-weight: bold;
  1550. color: #999;
  1551. position: absolute;
  1552. top: 0upx;
  1553. right: 0;
  1554. }
  1555. .sum {
  1556. color: #ea552d;
  1557. font-size: 22px;
  1558. font-weight: bold;
  1559. }
  1560. .quoteCompanyItem .top .signs {
  1561. width: 500upx;
  1562. overflow: hidden;
  1563. text-overflow: ellipsis;
  1564. white-space: nowrap;
  1565. }
  1566. .quoteCompanyItem .top .sign {
  1567. height: 40upx;
  1568. margin: 0upx 10upx;
  1569. background: rgba($themeColor, 0.6);
  1570. color: $themeColor;
  1571. font-size: 20upx;
  1572. margin-right: 10upx;
  1573. border-radius: 6upx;
  1574. padding: 0 2px;
  1575. line-height: 40upx;
  1576. }
  1577. .jqsign {
  1578. height: 20px;
  1579. background: rgba(255, 177, 177, 0.55);
  1580. color: #fd0a0a;
  1581. font-size: 20upx;
  1582. border-radius: 6upx;
  1583. padding: 0 10px;
  1584. box-sizing: border-box;
  1585. }
  1586. .quoteCompanyItem .body {
  1587. padding: 20upx 0;
  1588. flex-wrap: wrap;
  1589. }
  1590. .quoteCompanyItem .body>view {
  1591. flex-shrink: 0;
  1592. width: 50%;
  1593. overflow: hidden;
  1594. text-overflow: ellipsis;
  1595. white-space: nowrap;
  1596. }
  1597. .quoteCompanyItem .body .icon-exchange {
  1598. margin-right: 15upx;
  1599. display: inline-block;
  1600. }
  1601. /* 报价公司End */
  1602. /* 查看详情按钮Start */
  1603. .btn {
  1604. font-size: 16px;
  1605. color: #fff;
  1606. background-color: #ea552d;
  1607. margin-top: 10px;
  1608. }
  1609. /* 底部的样式Start */
  1610. .infoBottom {
  1611. height: 140upx;
  1612. position: fixed;
  1613. bottom: 0;
  1614. left: 0;
  1615. right: 0;
  1616. background: #FFFFFF;
  1617. border-top: 1upx solid #EEEEEE;
  1618. z-index: 99;
  1619. }
  1620. .infoBottom>button {
  1621. // font-size: 30upx;
  1622. background: $themeColor;
  1623. color: #FFFFFF;
  1624. flex: 1;
  1625. margin: 0upx 30upx;
  1626. }
  1627. /* 查看详情按钮End */
  1628. </style>