Kaynağa Gözat

app计算保费页面重选方案后增加重新报价按钮

@dongkboy 3 hafta önce
ebeveyn
işleme
7725937239

+ 5 - 0
pages/quote/chooseOption1.vue

@@ -114,6 +114,11 @@
 				this.quotableCompanyList.map(val => {
 				this.quotableCompanyList.map(val => {
 					if (val.id == this.planDataExpansion.id) {
 					if (val.id == this.planDataExpansion.id) {
 						val.insurancePlanInfo = this.planDataExpansion.genericPlanInfo;
 						val.insurancePlanInfo = this.planDataExpansion.genericPlanInfo;
+						// 重选标记:已有报价结果说明是“重选”方案(区别于首次选择方案),
+						// 供计算保费页区分重选前/重选后——重选后保留旧价格并显示“重新报价”按钮
+						if (val.result) {
+							val.isReSelect = true;
+						}
 						if (val.insurancePlanInfo.kinds.length > 0) {
 						if (val.insurancePlanInfo.kinds.length > 0) {
 							let objkindList = [];
 							let objkindList = [];
 							val.insurancePlanInfo.kinds.map((ele, index) => {
 							val.insurancePlanInfo.kinds.map((ele, index) => {

+ 9 - 2
pages/quote/premiumCalc1.vue

@@ -133,6 +133,10 @@
 								<text>¥</text>
 								<text>¥</text>
 								<text>{{companyItem.result.costs.sumPremium}}</text>
 								<text>{{companyItem.result.costs.sumPremium}}</text>
 							</view>
 							</view>
+							<view v-if="companyItem.isReSelect" class="quoteBtn dis a-c j-c"
+							@click.stop="individualQuote(companyItem)">
+							立即报价
+						</view>
 							<text class="discountedPrice" v-if="companyItem.result.insFeeOrders">优惠
 							<text class="discountedPrice" v-if="companyItem.result.insFeeOrders">优惠
 								{{ companyItem.result.insFeeOrders.totalPayablePremium }}</text>
 								{{ companyItem.result.insFeeOrders.totalPayablePremium }}</text>
 						</view>
 						</view>
@@ -736,14 +740,17 @@
 						company.result = res.data;
 						company.result = res.data;
 						const updatedItem = {
 						const updatedItem = {
 							...company,
 							...company,
-							quoteCode: 200
+							quoteCode: 200,
+							isReSelect: false // 清除重选标记,回到“仅展示价格”状态
 						};
 						};
 						this.quotableCompanyList.splice(companyIndex, 1, updatedItem);
 						this.quotableCompanyList.splice(companyIndex, 1, updatedItem);
 					} else {
 					} else {
 						company.msg = res.msg;
 						company.msg = res.msg;
 						const updatedItem = {
 						const updatedItem = {
 							...company,
 							...company,
-							quoteCode: '3'
+							quoteCode: '3',
+							isReSelect: false // 清除重选标记,回到“仅展示价格”状态
+
 						};
 						};
 						this.quotableCompanyList.splice(companyIndex, 1, updatedItem);
 						this.quotableCompanyList.splice(companyIndex, 1, updatedItem);
 						return;
 						return;