Browse Source

app订单详情-投保信息-费用信息字段数据填充
详情页、支付码页数据初始化增加loading过渡效果

@dongkboy 3 tuần trước cách đây
mục cha
commit
359ae16b5a

+ 2 - 1
pages/orders/orders1.vue

@@ -598,8 +598,9 @@
 				})
 			},
 			//分页列表查询事件
-			querySearch() {
+			async querySearch() {
 				this.orderFilterShow = false;
+				await this.getsubOrdersList();
 			},
 			// 下拉筛选清空操作
 			clearForm() {

+ 23 - 16
pages/quote/modules/insuranceInfo.vue

@@ -11,7 +11,7 @@
 			</view>
 			<view class="item">
 				<text class="mr-2">交强险系数</text>
-				<text>0.751</text>
+				<text>--</text>
 			</view>
 			<view class="item dis a-c j-s">
 				<text class="mr-2">商业险系数</text>
@@ -147,41 +147,43 @@
 				<text>费用信息</text>
 				<view class="">
 					<text class="mr-1" style="font-weight: 500;font-size: 28rpx;">费用总计</text>
-					<text class="price">¥4862.33</text>
+					<text class="price">¥{{insFeeOrders.totalExportPremium}}</text>
 				</view>
 			</view>
 			<view class="items dis f-c ">
 				<view class="item dis a-c j-s">
 					<text>交强险手续费</text>
-					<text>850.00 * 0.00% = 0.00</text>
+					<text>{{costs.ciPremium}} * {{costRatio.jqCommissionRatio}}% =
+						{{insFeeOrders.jqCommissionPremium}}</text>
 				</view>
-				<view class="item dis a-start j-s">
+				<view class="item dis a-start j-s" v-if="costRatio.jqFollowRatio">
 					<text>交强险跟单</text>
-					<text>850.00 * 0.20% = 170.00</text>
+					<text>{{costs.ciPremium}} * {{costRatio.jqFollowRatio}}% = {{insFeeOrders.jqFollowPremium}}</text>
 				</view>
 				<view class="item dis a-start j-s ">
-					<text>交强险保费</text>
-					<view class=" dis a-c j-end">
-						<text style="margin-right: auto;">¥170.00</text>
+					<text class="mr-2">交强险保费</text>
+					<text style="margin-right: auto;">¥{{costs.ciPremium}}</text>
+					<view class="item dis a-c j-end">
 						<text class="mr-2" style="font-weight: 500;color: #666;">费用</text>
-						<text>¥170.00</text>
+						<text>¥{{insFeeOrders.jqExportPremium}}</text>
 					</view>
 				</view>
 				<u-divider lineColor="#eee" style="margin: 0;"></u-divider>
 				<view class="item dis a-start j-s mt-3">
 					<text>商业险手续费</text>
-					<text>{{scoreVo.jqScore}}ddd</text>
+					<text>{{costs.biPremium}} * {{costRatio.syCommissionRatio}}% =
+						{{insFeeOrders.syCommissionPremium}}</text>
 				</view>
-				<view class="item dis a-start j-s ">
+				<view class="item dis a-start j-s " v-if="costRatio.syFollowRatio">
 					<text>商业险跟单</text>
-					<text>{{scoreVo.jqScore}}ddd</text>
+					<text>{{costs.biPremium}} * {{costRatio.syFollowRatio}}% = {{insFeeOrders.syFollowPremium}}</text>
 				</view>
 				<view class="item dis a-start j-s ">
-					<text>商业险保费</text>
-					<view class=" dis a-c j-end">
-						<text style="margin-right: auto;">¥170.00</text>
+					<text class="mr-2">商业险保费</text>
+					<text style="margin-right: auto;">¥{{costs.biPremium}}</text>
+					<view class="item dis a-c j-end">
 						<text class="mr-2" style="font-weight: 500;color: #666;">费用</text>
-						<text>¥170.00</text>
+						<text>¥{{insFeeOrders.syExportPremium}}</text>
 					</view>
 				</view>
 			</view>
@@ -252,6 +254,11 @@
 				type: Object,
 				default: null,
 			},
+			// 费用比例信息
+			costRatio: {
+				type: Object,
+				default: null,
+			},
 			//车船税信息
 			vehicleAndVesselTaxVo: {
 				type: Object,

+ 33 - 12
pages/quote/paymentCode.vue

@@ -82,6 +82,13 @@
 			</view>
 		</view>
 		<!-- #endif -->
+		<!-- 自定义加载动画 -->
+		<u-overlay :show="loadingShow" style="background-color: rgba(255, 255, 255, 0.6);">
+			<view class="dis f-c a-c j-c " style="height: 100%;">
+				<u-loading-icon></u-loading-icon>
+				<text style="color: #909399;" class="mt-1">{{loadingText}}</text>
+			</view>
+		</u-overlay>
 	</view>
 </template>
 <script>
@@ -99,6 +106,8 @@
 	export default {
 		data() {
 			return {
+				loadingText: '支付码加载中', //加载提示文字
+				loadingShow: false,
 				detailbackimg: "", //背景图
 				recommendImg: '', //二维码图片
 				payImg: "",
@@ -114,24 +123,36 @@
 			this.detailbackimg = await turnBase64Image('/static/image/detailback.png');
 		},
 		async onLoad(options) {
-			if (options.ordersNo) {
-				let res = await this.$http.get('/order/qrCode/getQrCode?orderNo=' + encodeURIComponent(options.ordersNo))
-				if (res.code == '200') {
-					this.info = res.data;
-					let res1 = await this.$http.get('/supplementOrder/getOrderDetail?ordersNo=' + options.ordersNo);
-					if (res1.code == "200") {
-						this.insCompanyVo = res1.data.insCompanyVo[0];
+			this.loadingShow = true;
+			try {
+				if (options.ordersNo) {
+					let res = await this.$http.get('/order/qrCode/getQrCode?orderNo=' + encodeURIComponent(options
+						.ordersNo))
+					if (res.code == '200') {
+						this.info = res.data;
+						let res1 = await this.$http.get('/supplementOrder/getOrderDetail?ordersNo=' + options
+							.ordersNo);
+						if (res1.code == "200") {
+							this.insCompanyVo = res1.data.insCompanyVo[0];
+						}
+					} else {
+						uni.showToast({
+							title: res.msg,
+							icon: "none"
+						})
 					}
+					this.recommendCode();
 				} else {
 					uni.showToast({
-						title: res.msg,
-						icon: "none"
+						icon: 'none',
+						title: '订单号为空'
 					})
 				}
-
-
+				this.loadingShow = false;
+			} catch (error) {
+				this.loadingShow = false;
 			}
-			this.recommendCode();
+
 		},
 		methods: {
 			//分享图片到微信

+ 80 - 61
pages/quote/quoteDetail.vue

@@ -64,8 +64,8 @@
 							:biRiskInfoVo="biRiskInfoVo" :costs="costs" :policy="policy" :scoreVo="scoreVo"
 							:accidentalDrivings="accidentalDrivings" :kindInfoVo="kindInfoVo"
 							:vehicleAndVesselTaxVo="vehicleAndVesselTaxVo" :insFeeOrders="insFeeOrders"
-							:car_tax_codeoptions="car_tax_codeoptions" @updateDiscount="updateDiscountShow=true"
-							@customerRightsDetail="customerRightsDetail">
+							:costRatio="costRatio" :car_tax_codeoptions="car_tax_codeoptions"
+							@updateDiscount="updateDiscountShow=true" @customerRightsDetail="customerRightsDetail">
 						</insuranceInfoVue>
 						<template v-if="current==2">
 							<imageDataVue @previewImage="previewImage" @delCheckImage="delCheckImage"
@@ -269,8 +269,14 @@
 		<previewImage ref="previewImage" :opacity="0.8" :circular="true" :imgs="previewImgs"></previewImage>
 		<u-loading-page :loading="loading" style="z-index: 999999;" loading-text="核保中" bg-color="rgb(0 ,0 ,0 ,0.4)"
 			color="#fff"></u-loading-page>
+		<!-- 自定义加载动画 -->
+		<u-overlay :show="loadingShow" style="background-color: rgba(255, 255, 255, 0.6);">
+			<view class="dis f-c a-c j-c " style="height: 100%;">
+				<u-loading-icon></u-loading-icon>
+				<text style="color: #909399;" class="mt-1">{{loadingText}}</text>
+			</view>
+		</u-overlay>
 	</view>
-
 </template>
 <script>
 	import store from '@/store';
@@ -297,6 +303,8 @@
 		},
 		data() {
 			return {
+				loadingShow: false,
+				loadingText: '加载中', //加载提示文字
 				loading: false,
 				insCompanyVo: {}, //保险公司信息
 				vvTaxDetailsShow: false, //车船税详情弹窗
@@ -339,6 +347,7 @@
 				insuredPersonInfo: {}, //被保人信息
 				scoreVo: {}, //保费因素
 				insFeeOrders: {}, //费用信息
+				costRatio: {}, //费用比例信息
 				insOrderRightsInfoVo: {}, //权益信息
 				order: {},
 				detailbackimg: "", //背景图
@@ -432,72 +441,82 @@
 			}
 		},
 		async onLoad(options) {
-			if (options) {
-				await this.getDicType("car_tax_code"); //车船税类型
-				await this.getDicType("taxpayerIdentifier"); //纳税人证件类型
-				await this.getDicType("car_tax_reason_code"); //减免税原因代码
-				await this.getDicType("car_nature_code"); //使用性质
-				await this.getDicType("vehicle_use_code", "01"); //营业
-				await this.getDicType("vehicle_use_code", "02"); //非营业
-				await this.getDicType("car_kind_code"); //车辆种类
-				await this.getDicType("energy_type_code"); //能源类型
-				await this.getDicType("car_type_code"); //车辆类型
-				let res = await this.$http.get('/supplementOrder/getOrderDetail?ordersNo=' + options.ordersNo);
-				if (res.code == 200) {
-					this.insCompanyVo = res.data.insCompanyVo[0]; //保险公司信息
-					this.orderStatus = res.data.order.orderStatus; //订单状态
-					this.companyName = res.data.order.companyName; //保险公司简称
-					this.ordersNo = res.data.order.ordersNo; //订单号
-					this.quoteNo = res.data.order.quoteNo; //报价号
-					this.ciRiskInfoVo = res.data.ciRiskInfoVo; //交强大类
-					this.biRiskInfoVo = res.data.biRiskInfoVo; //商业大类
-					this.costs = res.data.costs; //报价金额信息
-					this.policy = res.data.policy; //保单号信息
-					this.kindInfoVo = res.data.kindInfoVo; //商业险险别
-					this.accidentalDrivings = res.data.accidentalDrivings; //驾意险
-					this.carInfoVo = res.data.carInfoVo; //车辆信息
-					this.ownersInfo = res.data.ownersInfo; //车主信息
-					this.policyHolderInfo = res.data.policyHolderInfo; //投保人信息
-					this.insuredPersonInfo = res.data.insuredPersonInfo; //被保人信息
-					this.scoreVo = res.data.scoreVo; //保费因素
-					this.insFeeOrders = res.data.insFeeOrders; //费用信息
-					this.insOrderRightsInfoVo = res.data.insOrderRightsInfoVo; //权益信息
-					this.vehicleAndVesselTaxVo = res.data.vehicleAndVesselTaxVo; //车船税信息
-					this.order = res.data.order;
-					this.carInfoVo1.carNatureCode = dictionaryMatch(this.car_nature_codeoptions, res
-						.data.carInfoVo
-						.carNatureCode)
-					if (res.data.carInfoVo.carNatureCode == '01') {
-						this.carInfoVo1.vehicleUseCode = dictionaryMatch(this
-							.vehicle_use_code01options,
-							res.data
+			this.loadingShow = true;
+			try {
+				if (options) {
+					await this.getDicType("car_tax_code"); //车船税类型
+					await this.getDicType("taxpayerIdentifier"); //纳税人证件类型
+					await this.getDicType("car_tax_reason_code"); //减免税原因代码
+					await this.getDicType("car_nature_code"); //使用性质
+					await this.getDicType("vehicle_use_code", "01"); //营业
+					await this.getDicType("vehicle_use_code", "02"); //非营业
+					await this.getDicType("car_kind_code"); //车辆种类
+					await this.getDicType("energy_type_code"); //能源类型
+					await this.getDicType("car_type_code"); //车辆类型
+					let res = await this.$http.get('/supplementOrder/getOrderDetail?ordersNo=' + options.ordersNo);
+					if (res.code == 200) {
+						this.insCompanyVo = res.data.insCompanyVo[0]; //保险公司信息
+						this.orderStatus = res.data.order.orderStatus; //订单状态
+						this.companyName = res.data.order.companyName; //保险公司简称
+						this.ordersNo = res.data.order.ordersNo; //订单号
+						this.quoteNo = res.data.order.quoteNo; //报价号
+						this.ciRiskInfoVo = res.data.ciRiskInfoVo; //交强大类
+						this.biRiskInfoVo = res.data.biRiskInfoVo; //商业大类
+						this.costs = res.data.costs; //报价金额信息
+						this.policy = res.data.policy; //保单号信息
+						this.kindInfoVo = res.data.kindInfoVo; //商业险险别
+						this.accidentalDrivings = res.data.accidentalDrivings; //驾意险
+						this.carInfoVo = res.data.carInfoVo; //车辆信息
+						this.ownersInfo = res.data.ownersInfo; //车主信息
+						this.policyHolderInfo = res.data.policyHolderInfo; //投保人信息
+						this.insuredPersonInfo = res.data.insuredPersonInfo; //被保人信息
+						this.scoreVo = res.data.scoreVo; //保费因素
+						this.insFeeOrders = res.data.insFeeOrders; //费用信息
+						this.costRatio = res.data.costRatio; //比例信息
+						this.insOrderRightsInfoVo = res.data.insOrderRightsInfoVo; //权益信息
+						this.vehicleAndVesselTaxVo = res.data.vehicleAndVesselTaxVo; //车船税信息
+						this.order = res.data.order;
+						// 去掉this.kindInfoVo中的交强险
+						this.kindInfoVo = this.kindInfoVo.filter(item => item.kindCode != 'J1')
+						this.carInfoVo1.carNatureCode = dictionaryMatch(this.car_nature_codeoptions, res
+							.data.carInfoVo
+							.carNatureCode)
+						if (res.data.carInfoVo.carNatureCode == '01') {
+							this.carInfoVo1.vehicleUseCode = dictionaryMatch(this
+								.vehicle_use_code01options,
+								res.data
+								.carInfoVo
+								.vehicleUseCode)
+						} else {
+							this.carInfoVo1.vehicleUseCode = dictionaryMatch(this
+								.vehicle_use_code02options,
+								res.data
+								.carInfoVo
+								.vehicleUseCode)
+						}
+						this.carInfoVo1.carTypeCode = dictionaryMatch(this.car_type_codeoptions, res.data
 							.carInfoVo
-							.vehicleUseCode)
-					} else {
-						this.carInfoVo1.vehicleUseCode = dictionaryMatch(this
-							.vehicle_use_code02options,
-							res.data
+							.carTypeCode)
+						this.carInfoVo1.carKindCode = dictionaryMatch(this.car_kind_codeoptions, res.data
 							.carInfoVo
-							.vehicleUseCode)
-					}
-					this.carInfoVo1.carTypeCode = dictionaryMatch(this.car_type_codeoptions, res.data
-						.carInfoVo
-						.carTypeCode)
-					this.carInfoVo1.carKindCode = dictionaryMatch(this.car_kind_codeoptions, res.data
-						.carInfoVo
-						.carKindCode)
-					this.carInfoVo1.energyTypeCode = dictionaryMatch(this.energy_type_codeoptions, res
-						.data
-						.carInfoVo
-						.energyTypeCode)
+							.carKindCode)
+						this.carInfoVo1.energyTypeCode = dictionaryMatch(this.energy_type_codeoptions, res
+							.data
+							.carInfoVo
+							.energyTypeCode)
 
-					if (this.quoteNo) {
-						this.imageEcho(this.quoteNo) // 影像获取完毕
+						if (this.quoteNo) {
+							this.imageEcho(this.quoteNo) // 影像获取完毕
+						}
 					}
+					this.loadingShow = false;
 				}
+			} catch (error) {
+				this.loadingShow = false;
 			}
 
 
+
 		},
 		async mounted() {
 			this.detailbackimg = await turnBase64Image('/static/image/detailback.png');