ソースを参照

Merge branch 'new-dev' of http://www.baoxianzhanggui.com:8090/sxzgd/vue-insagent-app into new-dev

lihongxiao 2 年 前
コミット
039756384b

+ 4 - 4
config/baseUrl.js

@@ -4,13 +4,13 @@ let socketUrl = "";
 if (process.env.NODE_ENV === 'development') {
 	// 开发环境
 	// baseUrl = "http://192.168.0.106:8080"; //屈晨
-	// baseUrl = "http://192.168.0.55:8080"; //蔡雅茹
+	baseUrl = "http://192.168.0.253:8080"; //蔡雅茹
 	// baseUrl = "https://test.baoxianzhanggui.com/web-api"; //测试
-	// h5BaseUrl = "https://test.baoxianzhanggui.com/h5";
+	h5BaseUrl = "https://test.baoxianzhanggui.com/h5";
 	// baseUrl = "https://pre.baoxianzhanggui.com/web-api"; //预生产
 	// h5BaseUrl = "https://pre.baoxianzhanggui.com/h5";
-	baseUrl = "https://sxzgkj.baoxianzhanggui.com/web-api"; //生产
-	h5BaseUrl = "https://sxzgkj.baoxianzhanggui.com/h5";
+	// baseUrl = "https://sxzgkj.baoxianzhanggui.com/web-api"; //生产
+	// h5BaseUrl = "https://sxzgkj.baoxianzhanggui.com/h5";
 	socketUrl = "";
 } else if (process.env.NODE_ENV === 'production') {
 	// 生产环境

+ 37 - 7
pages/carInsure/companyQuotable.vue

@@ -214,10 +214,12 @@
 			<view class="insuranceType mt-2 dis f-c ">
 				<text class="title">可报价保险公司</text>
 				<view class="dis j-s f-wrap mt-2">
-					<view class="insurer dis j-s a-c">
-						<image src="/static/insuranceicon/dajia.png" mode=""></image>
-						<text>自检财险</text>
+					<view class="insurer dis j-s a-c" @tap="CompIntro" v-for="(item,index) in quotableCompanyList"
+						:key="index">
+						<image :src="item.logo" mode=""></image>
+						<text>{{item.namesimple}}</text>
 					</view>
+
 				</view>
 			</view>
 		</view>
@@ -225,6 +227,16 @@
 			<u-button type="primary" style="background:#E6EEFF;color:#0052FF;" @tap="back">上一步</u-button>
 			<u-button type="primary" style="background:#0052FF;" @tap="next">下一步</u-button>
 		</view>
+		<u-modal v-model="CompIntroShow" title="公司简介"
+			:title-style="{fontWeight: 'bold',borderBottom:'1px solid #f2f2f2',padding:'10px'}"
+			:show-cancel-button="false"
+			:confirm-style="{background:'#E6EEFF',color:'#0052FF',height:'40px',lineHeight:'40px'}"
+			@confirm="CompIntroShow=false">
+			<view class="slot-content dis  a-c f-c  p-2">
+				<text>永诚财产保险股份有限公司是一家由国内实力雄厚的大型电企业集团和产业投资集团共同发起组建的全国性股份制财产保险公司。</text>
+				<text>客服电话:</text>
+			</view>
+		</u-modal>
 	</view>
 
 </template>
@@ -236,6 +248,8 @@
 	export default {
 		data() {
 			return {
+				quotableCompanyList: [],
+				CompIntroShow: false,
 				carInfo: {},
 				carInfo1: {
 					carnature: "",
@@ -275,6 +289,7 @@
 			await this.getDicType("vehicleType"); //车辆种类
 			await this.getDicType("trafficManagementVehicleType"); //车辆类型
 			await this.getDicType("energyType"); //能源种类
+			this.ruleFilterCompany();
 			const eventChannel = this.getOpenerEventChannel()
 			// 监听acceptData事件,获取上一页面通过eventChannel传送到当前页面的数据
 			eventChannel.on('acceptData', (data) => {
@@ -309,20 +324,33 @@
 			})
 		},
 		methods: {
+			async ruleFilterCompany() {
+				let res = await this.$http.post('/plt/scheme/ruleFilterCompany', {});
+				this.quotableCompanyList = res.data;
+			},
+			CompIntro() {
+				this.CompIntroShow = true;
+			},
 			async getDicType(type) {
 				let res = await this.$http.get('/sysDict/dictDetails/' + type);
 				this[type + "options"] = res.data.ddList;
 			},
-			statusclick(e) {
+			async statusclick(e) {
 				this.insuranceTypeId = e;
+				let res = await this.$http.post('/plt/scheme/ruleFilterCompany', {
+					carInfo: this.carInfo,
+					ownerInfo: this.ownerInfo,
+					applyInfo: this.policyHolderInfo,
+					insureInfo: this.insuredPersonInfo,
+					productId: this.insuranceTypeId
+				});
+				this.quotableCompanyList = res.data;
 			},
 			back() {
 				uni.navigateBack(1)
 			},
 			next() {
-				uni.navigateTo({
-					url: ''
-				})
+
 				this.navigate({
 					url: '/pages/carInsure/premiumCalc',
 					success: (res) => {
@@ -344,6 +372,8 @@
 									.policyHolderInfoPositiveList, //投保
 								insuredPersonInfoPositiveList: this
 									.insuredPersonInfoPositiveList, //被保人
+								quotableCompanyList: this.quotableCompanyList, //可报价公司
+								productId: this.insuranceTypeId, //险种id
 
 							})
 					}

+ 152 - 102
pages/carInsure/premiumCalc.vue

@@ -49,7 +49,7 @@
 							active-color="rgb(250, 53, 52)">全选</u-checkbox>
 					</view> -->
 				</view>
-				<block v-for="(totalitem,totalindex) in totalCompanyList" :key="totalindex">
+				<block v-for="(totalitem,totalindex) in quotableCompanyList" :key="totalindex">
 					<template>
 						<view class="quoteCompanyItem dis f-c j-s" :class="totalitem.checked? 'quoteactive':''">
 							<view class="top dis f-c">
@@ -81,29 +81,9 @@
 									<text
 										v-show="(totalitem.quoteCode != '200') && (totalitem.quoteCode != '0') && (totalitem.quoteCode != '1')"
 										class="sum" style="color: #999;font-size: 12px;"
-										@tap.stop.prevent="ErrorMsg(totalitem.msg,totalitem.namesimple)">报价失败,请点击查看</text>
+										@tap.stop.prevent="ErrorMsg(totalitem.msg,totalitem.namesimple)">报价失败,查看原因</text>
 								</view>
-								<view class="planDetails mb-2 dis a-c j-c f-c">
-									<view class="headers dis j-c a-c"
-										@tap="totalitem.planDetailsshow = !totalitem.planDetailsshow">
-										<image
-											:src="totalitem.planDetailsshow?'/static/image/car-insure/DoubleLeft1.png':'/static/image/car-insure/DoubleLeft.png'"
-											mode=""></image>
-										<text>展开方案详情</text>
-									</view>
-									<view v-if="totalitem.planDetailsshow">
-										321321321
-									</view>
-								</view>
-								<view class="footer-btn dis j-s a-c">
-									<u-button type="primary" size="medium"
-										style="background:#E6EEFF;color:#0052FF; width: 45%;"
-										@tap="SchemeSelection">方案选择</u-button>
-									<u-button type="primary" size="medium"
-										style="background:#FFEFE6;color: #FF5600; width: 45%;"
-										@tap="next">单独报价</u-button>
-								</view>
-								<view class="Premium dis f-c" v-show="totalitem.quoteCode==200">
+								<view class="Premium dis f-c mb-2" v-show="totalitem.quoteCode==200">
 									<view class="dis price" v-if="totalitem.result.feeNoDescription">
 										<text>该车未匹配销管费用,不建议投保!</text>
 										<u-icon name="chat-fill" color="#ff0000" size="40"
@@ -173,18 +153,41 @@
 										totalitem.result.syClaims : '无' }}</text>
 									</view>
 									<view class="dis a-c j-end lastyear">
-										<view class=" left dis j-c a-c" v-if="totalitem.lastYearMsg"
+										<view class=" left  dis j-c a-c" v-if="totalitem.lastYearMsg"
 											@click="YearMsg(totalitem.lastYearMsg,totalitem.namesimple)">
-											<image src="/static/image/car-insure/lastyear.png" mode=""></image>
 											<text>上年信息</text>
 										</view>
-										<view class=" right dis j-c a-c" v-if='totalitem.result.predictInfo'
+										<view class=" right ml-2 dis j-c a-c" v-if='totalitem.result.predictInfo'
 											@click="preUnderwriting(totalitem.result.predictInfo)">
-											<image src="/static/image/car-insure/advance.png" mode=""></image>
 											<text>预核保信息</text>
 										</view>
+										<u-button class="ml-2" type="error" size="mini"
+											:custom-style="{borderRadius:'2px'}"
+											style="background: linear-gradient( 90deg, #FF4D4D 0%, #FF784D 100%);">报价单</u-button>
+										<u-button class="ml-2" type="primary" size="mini"
+											:custom-style="{borderRadius:'2px'}"
+											style="background: linear-gradient( 90deg, #0052FF 0%, #0D8BFF 100%);">查看详情</u-button>
+									</view>
+								</view>
+								<view class="planDetails mb-2 dis a-c j-c f-c">
+									<view class="headers dis j-c a-c" @tap="togglePlanDetails(totalindex)">
+										<image
+											:src="totalitem.planDetailsshow?'/static/image/car-insure/DoubleLeft1.png':'/static/image/car-insure/DoubleLeft.png'"
+											mode=""></image>
+										<text>展开方案详情</text>
+									</view>
+									<view v-if="totalitem.planDetailsshow">
+										321321321
 									</view>
 								</view>
+								<view class="footer-btn dis j-s a-c">
+									<u-button type="primary" size="mini"
+										style="background:#E6EEFF;color:#0052FF; width: 45%;"
+										@tap="SchemeSelection(totalitem)">方案选择</u-button>
+									<u-button type="primary" size="mini"
+										style="background:#FFEFE6;color: #FF5600; width: 45%;"
+										@tap="next">单独报价</u-button>
+								</view>
 								<view class="quotebtn dis j-s a-c" v-show="totalitem.quoteCode==200">
 									<view class="dis a-c j-c" @click="bjdpreview(totalitem.result.companyId)"
 										style="background-color: #0052FF;border-bottom-left-radius:6px;color: #fff;">
@@ -219,7 +222,7 @@
 					<view class="Plancontent dis  f-c ">
 						<text class="title mb-1">方案选择</text>
 						<view class="dis  a-c f-wrap j-s modelformcss" style="margin-top: 10px;">
-							<view class="status-data" :class="item.value==SelectedPlanId? 'active':''"
+							<view class="status-data" :class="index+1==SelectedPlanId? 'active':''"
 								v-for="(item,index) in InsurerPlanList" @tap.stop.prevent="statusclick(item.value)"
 								:key="index">
 								{{item.label}}
@@ -339,37 +342,51 @@
 								</view>
 							</view>
 							<u-form ref="uForm" label-width="120px">
-								<u-form-item label="交强险投保日期" class="modelformcss">
+								<u-form-item label="商业险投保日期" class="modelformcss">
 									<u-input type="select" :select-open="systartShow"
 										:custom-style="{textAlign:'right'}" v-model="systartDate" placeholder="请选择开始时间"
 										@click="systartShow = true"></u-input>
 									<u-picker v-model="systartShow" mode="time" :params="params"
 										@confirm="systartconfirm"></u-picker>
 								</u-form-item>
-								<u-form-item label="交强险终保日期" class="modelformcss">
+								<u-form-item label="商业险终保日期" class="modelformcss" :border-bottom='false'>
 									<u-input type="select" :select-open="syendShow" :custom-style="{textAlign:'right'}"
 										v-model="syendDate" placeholder="请选择结束时间" @click="syendShow = true"></u-input>
 									<u-picker v-model="syendShow" mode="time" :params="params"
 										@confirm="syendconfirm"></u-picker>
 								</u-form-item>
 							</u-form>
+							<view class="insuranceType">
+								<view class="dis a-c j-s">
+									<text>三者责任险:</text>
+									<text>321321321</text>
+								</view>
+							</view>
 						</view>
 						<view class="Plancontent dis  f-c ">
 							<text class="title mb-1">意外险</text>
 							<view class=" modelformcss">
 								<text>山西驾乘非营业客车2万档</text>
-								<view class="Accident mt-1">
+								<view class="Accident mt-2">
 									<view class="dis a-c j-s">
 										<view class="head dis a-c j-c">保险责任</view>
 										<view class="head dis a-c j-c">保险金额</view>
 										<view class="head dis a-c j-c">保费(元)</view>
 									</view>
 									<view class="dis a-c j-s" v-for="(item,index) in 3" :key="index">
-										<view class="tr"></view>
-										<view class="tr"></view>
-										<view class="tr"></view>
+										<view class="tr dis a-c j-c"> 意外伤害身故</view>
+										<view class="tr dis a-c j-c"> 20000/座</view>
+										<view class="tr dis a-c j-c">¥70.00</view>
 									</view>
 								</view>
+								<view class="dis a-c j-s mt-2" style="font-size: 14px;color: #232832;">
+									<text>份数</text>
+									<text>一份</text>
+								</view>
+								<view class="dis a-c j-s mt-2" style="font-size: 14px;color: #232832;">
+									<text>总保费</text>
+									<text>¥70.00</text>
+								</view>
 							</view>
 						</view>
 					</view>
@@ -379,7 +396,7 @@
 				</scroll-view>
 				<view class="PlanPopup-btn dis a-c j-c">
 					<u-button type="primary" shape="circle" size="medium"
-						style="background: linear-gradient( 90deg, #0052FF 0%, #6595FA 100%);">确定方案</u-button>
+						style="background: linear-gradient( 90deg, #0052FF 0%, #0D8BFF 100%);">确定方案</u-button>
 				</view>
 			</view>
 		</u-popup>
@@ -395,6 +412,11 @@
 		},
 		data() {
 			return {
+				hengbangParamSet: {
+					riskList: [], //险种大类
+					kindList: [], //商业险别
+					accidentalDrivingVo: {}, //驾意险信息
+				},
 				model: {
 					taxRelifFlag: "正常交税",
 					taxpayerIdentifier: "身份证",
@@ -459,7 +481,6 @@
 				jqendShow: false,
 				systartShow: false,
 				syendShow: false,
-
 				jqstartDate: "",
 				jqendDate: "",
 				systartDate: "",
@@ -487,53 +508,30 @@
 					city: false,
 					area: false
 				},
-				totalCompanyList: [],
+				quotableCompanyList: [],
+				productId: "",
 				animation: 'twinkle', //动画类型
 				InsureGuidePopup: false,
 				/* 投保指引弹窗*/
 				InsureGuideContent: "", // 指引内容
 				PlanPopup: false, //方案选择弹窗
-				SelectedPlanId: "", //已选方案id
+				SelectedPlanId: "2", //已选方案id
 				InsurerPlanList: [{
-						label: "方案一",
-						value: "1",
-						PlanSet: []
-					},
-					{
-						label: "方案二",
-						value: "2",
-						PlanSet: []
-					},
-					{
-						label: "方案三",
-						value: "3",
-						PlanSet: []
-					},
-					{
-						label: "自选方案",
-						value: "4",
-						PlanSet: []
-					}
-				],
-
+					label: "自选方案",
+					value: "4",
+					PlanSet: []
+				}],
+				anshenginsurancePlanInfo: {},
 
 			}
 		},
 		onShow() {
 
 		},
-		onLoad() {
-			this.getDicType("taxRelifFlag"); //车船税类型
-			this.getDicType("taxpayerIdentifier"); //纳税人证件类型
-			this.getDicType("relifReason"); //减免税原因代码
-			this.jqstartDate = this.nextday();
-			this.jqendDate = this.oneYearPast(this.jqstartDate);
-			this.systartDate = this.nextday();
-			this.syendDate = this.oneYearPast(this.jqstartDate);
-			this.commpanyList();
+		async onLoad() {
 			const eventChannel = this.getOpenerEventChannel()
 			// 监听acceptData事件,获取上一页面通过eventChannel传送到当前页面的数据
-			eventChannel.on('acceptData', async (data) => {
+			await eventChannel.on('acceptData', (data) => {
 				console.log(data);
 				this.carInfo = data.carInfo; //车辆信息
 				this.ownerInfo = data.ownerInfo; //车主信息
@@ -543,10 +541,36 @@
 				this.ownerInfoPositiveList = data.ownerInfoPositiveList; //车主
 				this.policyHolderInfoPositiveList = data.policyHolderInfoPositiveList; //投保
 				this.insuredPersonInfoPositiveList = data.insuredPersonInfoPositiveList; //被保人
+				this.productId = data.productId; //险种id
+				this.quotableCompanyList = data.quotableCompanyList; //可报价公司
+				this.commpanyList();
 			})
+			this.getDicType("taxRelifFlag"); //车船税类型
+			this.getDicType("taxpayerIdentifier"); //纳税人证件类型
+			this.getDicType("relifReason"); //减免税原因代码
+			this.jqstartDate = this.nextday();
+			this.jqendDate = this.oneYearPast(this.jqstartDate);
+			this.systartDate = this.nextday();
+			this.syendDate = this.oneYearPast(this.jqstartDate);
 
 		},
 		methods: {
+			togglePlanDetails(index) {
+				this.quotableCompanyList[index].planDetailsshow = !this.quotableCompanyList[index]
+					.planDetailsshow; // 切换对应项的显示状态
+				this.quotableCompanyList = [...this.quotableCompanyList]; // 强制 Vue 重新渲染
+			},
+			// 显示报错信息
+			ErrorMsg(msg, title) {
+				uni.showModal({
+					title: title + "报价提示",
+					content: msg,
+					showCancel: false,
+					confirmText: "关闭"
+				})
+
+			},
+			//车船税类型选择
 			taxRelifFlagConfirm(val, name) {
 				this.vehicleAndVesselTaxForm[name] = val[0].value;
 				this.model[name] = val[0].label;
@@ -558,6 +582,7 @@
 				this.vehicleAndVesselTaxForm.taxPaidAreaCode = e.province.value;
 				this.model.taxPaidAreaCode = e.province.label;
 			},
+			//数据字典
 			async getDicType(type) {
 				let res = await this.$http.get('/sysDict/dictDetails/' + type);
 				this[type + "options"] = res.data.ddList;
@@ -582,10 +607,20 @@
 			InsureGuideclick() {
 				this.InsureGuidePopup = true;
 			},
-			SchemeSelection() {
+			async SchemeSelection(item) {
+				let params = {
+					companyId: item.id,
+					productId: this.productId,
+					seatNum: this.carInfo.seatCount,
+				}
+				let res = await this.$http.post('/plt/scheme/getCompanySchemeInfo', params);
+				if (res.code == '200') {
+					this[item.cnName + 'insurancePlanInfo'].planList = res.data;
+				}
 				this.PlanPopup = true;
+				console.log(this.$data);
 			},
-
+			//即使投保时处理时间
 			datelyClick(value, name, startDate, endDate) {
 				this[name] = value;
 				if (value == 1) {
@@ -601,13 +636,8 @@
 				}
 			},
 			//获取保险公司列表
-			async commpanyList() {
-				let commpanykad = await this.$http.get('/tax/manager/getAllAgreement', {
-					// kindList: this.kindList,
-					// riskList: this.riskList,
-					// systemType: "2",
-				});
-				commpanykad.data.map(ele => {
+			commpanyList() {
+				this.quotableCompanyList.map(ele => {
 					ele["result"] = {};
 					ele["quoteCode"] = 0;
 					ele["checked"] = false;
@@ -623,15 +653,13 @@
 					ele['planDetailsshow'] = false;
 					ele['isComparableshowHide'] = false;
 					ele['isComparableDisabled'] = false;
+					this.$set(this, `${ele.cnName}insurancePlanInfo`, {
+						isSelectedPlan: {},
+						kindList: [],
+						accidentalDrivingVo: {},
+					});
+					return ele;
 				})
-				commpanykad.data.map(obj => {
-					obj.agreement.map(ele => {
-						ele.businessDescription = ele.businessDescription + "(" +
-							ele.jobDescription + ")";
-						return ele;
-					})
-				});
-				this.totalCompanyList = commpanykad.data;
 			},
 			immediatelyClick(name) {
 				this.carInfo[name] = !this.carInfo[name];
@@ -772,6 +800,12 @@
 		padding: 16px 16px 100px 16px;
 	}
 
+	.sum {
+		color: #0052FF;
+		font-size: 14px;
+		font-weight: bold;
+	}
+
 	.scroll-Y {
 		height: 600px;
 	}
@@ -829,13 +863,36 @@
 
 			.tr {
 				width: 33.33%;
-				height: 40px;
+				height: 50px;
 				color: #232832;
 				border: 1rpx solid #0874FF;
+				font-size: 24rpx;
+				color: #232832;
+
+				&:nth-child(1) {
+					width: 50%;
+					background: rgba(8, 116, 255, 0.05);
+				}
+
+				&:nth-child(3) {
+					background: rgba(8, 116, 255, 0.05);
+				}
 			}
 
 		}
 
+		.insuranceType {
+			margin: 5px 15px;
+			background: #F2F6FF;
+			border-radius: 10px;
+
+			>view {
+				padding: 8px;
+				border-bottom: 1px solid #f2f2f2;
+				color: #232832;
+			}
+		}
+
 	}
 
 	.quotePlan {
@@ -903,17 +960,16 @@
 		position: relative;
 
 		.head-name {
-			margin-left: 20px;
+			margin-left: 10px;
 
 			&>text {
 				font-weight: bold;
-				font-size: 15px;
+				font-size: 14px;
 				color: #232832;
 			}
 
 			.name1 text {
 				font-size: 14px;
-				font-weight: bold;
 				color: #333333;
 			}
 		}
@@ -971,9 +1027,9 @@
 
 	.insuranceGuide {
 		background: rgba(255, 86, 0, 0.05);
-		border-radius: 4px 4px 4px 4px;
+		border-radius: 2px;
 		font-weight: bold;
-		font-size: 14px;
+		font-size: 12px;
 		color: #FF5600;
 		padding: 0 4px;
 	}
@@ -1013,7 +1069,8 @@
 
 	.quoteCompanyItem .top .Premium {
 		padding: 10px 8px;
-		border-top: 1px solid #f2f2f2;
+		background-color: #FFF6F2;
+		border-radius: 4px;
 
 		.price {
 			font-size: 12px;
@@ -1050,26 +1107,19 @@
 	.lastyear {
 		view {
 			font-size: 12px;
-			font-weight: bold;
-
-			image {
-				width: 14px;
-				height: 14px;
-			}
 		}
 
 		.left {
 			border: 1px solid #229805;
-			border-radius: 2px 2px 2px 2px;
+			border-radius: 2px;
 			padding: 1px 6px;
 			color: #229805;
 		}
 
 		.right {
-			border-radius: 2px 2px 2px 2px;
+			border-radius: 2px;
 			padding: 1px 6px;
 			border: 1px solid #FF5600;
-			margin-left: 10px;
 			color: #FF5600;
 		}
 	}

+ 1 - 0
pages/carInsure/quote.vue

@@ -2766,6 +2766,7 @@
 			//动态函数
 			async ToolClickFun(MethodName, Parameter, companyId) {
 				await this[`${MethodName}`](Parameter, companyId)
+				//获取已报价成功个数
 				let filteredObjects = [];
 				this.totalCompanyList.map(ele => {
 					if (ele.quoteCode == 200) {