Bladeren bron

测试问题处理,更新版本

@dongkboy 1 jaar geleden
bovenliggende
commit
02aa9ba07c

+ 20 - 10
components/modules/carInsure/OCRComponent/OCRComponent.vue

@@ -140,11 +140,13 @@
 					});
 				} else {
 					let ImgList = this.ownerInfoPositiveList;
-					let img = this.userfrontImg;
+					let frontImg = this.userfrontImg;
+					let backImg = this.userbackImg;
 					this.$emit('ownerInfoCallback', {
 						Info,
 						ImgList,
-						img,
+						frontImg,
+						backImg,
 					});
 					this.userfrontImg = '';
 					this.userbackImg = '';
@@ -154,7 +156,6 @@
 			},
 			userocrInt2() {
 				let Info = Object.assign({}, this.userfront, this.userback)
-				console.log(Info);
 				if (this.isEmptyObject(Info)) {
 					uni.showToast({
 						icon: 'none',
@@ -163,11 +164,13 @@
 					});
 				} else {
 					let ImgList = this.applicantInfoPositiveList;
-					let img = this.userfrontImg;
+					let frontImg = this.userfrontImg;
+					let backImg = this.userbackImg;
 					this.$emit('applicantInfoCallback', {
 						Info,
 						ImgList,
-						img,
+						frontImg,
+						backImg,
 					});
 					this.userfrontImg = '';
 					this.userbackImg = '';
@@ -185,11 +188,13 @@
 					});
 				} else {
 					let ImgList = this.InsuredInfoPositiveList;
-					let img = this.userfrontImg;
+					let frontImg = this.userfrontImg;
+					let backImg = this.userbackImg;
 					this.$emit('InsuredInfoCallback', {
 						Info,
 						ImgList,
-						img,
+						frontImg,
+						backImg,
 					});
 					this.userfrontImg = '';
 					this.userbackImg = '';
@@ -207,11 +212,13 @@
 					});
 				} else {
 					let ImgList = this.carInfoPositiveList;
-					let img = this.carfrontImg;
+					let frontImg = this.carfrontImg;
+					let backImg = this.carbackImg;
 					this.$emit('carCallback', {
 						Info,
 						ImgList,
-						img,
+						frontImg,
+						backImg,
 					});
 					this.userfrontImg = '';
 					this.userbackImg = '';
@@ -300,6 +307,7 @@
 											cimodelclass: data.carInfo
 												.plateType, //车辆种类
 											cartype: data.carInfo.category, //车辆类型
+											vehicleUse: data.carInfo.vehicleUse, //车辆用途
 
 										}
 										this.lodingshow = false;
@@ -614,7 +622,9 @@
 										}
 										this.userback = {
 											identifyValidDate: identifyValidDate, //起期
-											identifyValidEndDate: identifyValidEndDate, //止期
+											identifyValidEndDate: identifyValidEndDate ==
+												'长期--' ? '9999-12-31' :
+												identifyValidEndDate, //止期
 										}
 										this.lodingshow = false;
 									}

+ 2 - 2
manifest.json

@@ -7,8 +7,8 @@
 		"sizes": "分辨率,192x192",
 		"src": "图片路径"
 	}],
-	"versionName": "1.7.7",
-	"versionCode": 177,
+	"versionName": "1.8.2",
+	"versionCode": 182,
 	"app-plus": {
 		"error": {
 			"url": "hybrid/html/error.html"

+ 6 - 1
pages.json

@@ -893,7 +893,12 @@
 				"navigationBarTitleText": "保费计算",
 				"app-plus": {
 					"scrollIndicator": "none",
-					"bounce": "none"
+					"bounce": "none",
+					"titleNView": {
+						"buttons": [{
+							"type": "home"
+						}]
+					}
 				}
 			}
 		},

+ 187 - 116
pages/carInsure2/Information.vue

@@ -9,20 +9,20 @@
 		<view v-show="carInfoShow" class="Information" style="margin-top: -84px;">
 			<text class="title">车辆信息</text>
 			<view class="collapse">
-				<view class="top-ocr dis j-c a-c" v-show="!carimg">
+				<view class="top-ocr dis j-c a-c" v-show="!carfrontImg">
 					<image src="../../static/image/car-insure/Frame.png" mode="">
 					</image>
 					<text @tap="ocrIdentify('carInfo')" style="margin-left: 5px;">点击上传/拍摄行驶证 自动填写信息</text>
 				</view>
-				<view v-show="!carExpand && !carimg" class="btn-collapse dis a-c j-c" @click="expand('carExpand')">
+				<view v-show="!carExpand && !carfrontImg" class="btn-collapse dis a-c j-c" @click="expand('carExpand')">
 					<text>展开手动输入车辆信息</text>
 					<u-icon name="arrow-down" size="30" color="rgb(60 60 60 / 60%)" style="margin-left: 5px;"></u-icon>
 				</view>
 				<view v-show="carExpand" class="">
-					<view v-if=" carimg" class="movable-view dis f-c a-c">
+					<view v-if=" carfrontImg" class="movable-view dis f-c a-c">
 						<movable-area>
 							<movable-view direction="all" out-of-bounds :scale="true">
-								<image :src="carimg" mode=""
+								<image :src="carfrontImg" mode=""
 									:style="{width:'100%',height:'100%',transform:`rotate(-${cardeg}deg)`}">
 								</image>
 							</movable-view>
@@ -88,13 +88,13 @@
 							<u-picker v-model="issueDateShow" mode="time" :params="params"
 								@confirm="e=> Dateconfirm(e,'carInfo','issueDate')"></u-picker>
 						</uni-forms-item>
-						<uni-forms-item v-if="carInfo.transferFlag" required label="转移登记日期" name="transferDate">
+						<!-- <uni-forms-item v-if="carInfo.transferFlag" required label="转移登记日期" name="transferDate">
 							<u-input type="select" :custom-style="{textAlign:'right'}" :select-open="transferDateShow"
 								v-model="carInfo.transferDate" placeholder="请选择过户日期" @click="transferDateShow = true"
 								placeholder-style="color:#808080"></u-input>
 							<u-picker v-model="transferDateShow" mode="time" :params="params" :end-year="endYear"
 								:end-month="endMonth" @confirm="e=> Dateconfirm(e,'carInfo','transferDate')"></u-picker>
-						</uni-forms-item>
+						</uni-forms-item> -->
 						<uni-forms-item label="整备质量: " required name="completeKerbMass">
 							<input class="uni-input-input textColor" placeholder="请输入整备质量"
 								v-model="carInfo.completeKerbMass" placeholder-style="font-size:28upx" />
@@ -168,12 +168,12 @@
 								@blur="binddata('purchasePrice', $event.detail.value,'carForm')"
 								@input="upperCaseType('purchasePrice')" />
 						</uni-forms-item>
-						<uni-forms-item label="是否过户: ">
+						<!-- 	<uni-forms-item label="是否过户: ">
 							<view class="d-flex j-end a-c" style="height:100%">
 								<u-switch v-model="carInfo.transferFlag" active-color="#0052FF " size="30"
 									@change="transferFlagchange"></u-switch>
 							</view>
-						</uni-forms-item>
+						</uni-forms-item> -->
 					</uni-forms>
 				</view>
 			</view>
@@ -181,21 +181,21 @@
 		<view class="Information">
 			<text class="title">车主信息</text>
 			<view class="collapse">
-				<view class="top-ocr dis j-c a-c" v-show="!ownerimg">
+				<view class="top-ocr dis j-c a-c" v-show="!ownerfrontImg">
 					<image src="../../static/image/car-insure/Frame1.png" mode="">
 					</image>
 					<text @tap="ocrIdentify('ownerInfo')" style="margin-left: 5px;">点击上传/拍摄身份证 自动填写信息</text>
 				</view>
-				<view v-show="!ownersExpand  && !ownerimg" class="btn-collapse dis a-c j-c"
+				<view v-show="!ownersExpand  && !ownerfrontImg" class="btn-collapse dis a-c j-c"
 					@click="expand('ownersExpand')">
 					<text>展开手动输入车主信息</text>
 					<u-icon name="arrow-down" size="30" color="rgb(60 60 60 / 60%)" style="margin-left: 5px;"></u-icon>
 				</view>
 				<view v-show="ownersExpand">
-					<view v-show=" ownerimg" class="movable-view dis f-c a-c">
+					<view v-show=" ownerfrontImg" class="movable-view dis f-c a-c">
 						<movable-area>
 							<movable-view direction="all" out-of-bounds :scale="true">
-								<image :src="ownerimg" mode=""
+								<image :src="ownerfrontImg" mode=""
 									:style="{width:'100%',height:'100%',transform:`rotate(-${user1deg}deg)`}">
 								</image>
 							</movable-view>
@@ -237,11 +237,8 @@
 								v-model="ownerInfo.age" maxlength="18" placeholder-style="font-size:28upx" />
 						</uni-forms-item>
 						<uni-forms-item name="gender" required label="性别:">
-							<u-input v-model="ownerInfo.gender" type="select" :select-open="ownergenderShow"
-								@click="ownergenderShow = true" :custom-style="{textAlign:'right'}"
-								placeholder-style="color:#808080" placeholder="请选择性别" />
-							<u-select mode="single-column" :list="genderList" v-model="ownergenderShow"
-								@confirm="e=>genderConfirm(e,'ownerInfo')"></u-select>
+							<input class="uni-input-input textColor" disabled placeholder="请输入性别"
+								v-model="ownerInfo.gender" maxlength="1" placeholder-style="font-size:28upx" />
 						</uni-forms-item>
 						<uni-forms-item required name="mobile" label="手机号: ">
 							<input class="uni-input-input textColor" placeholder="请输入手机号" v-model="ownerInfo.mobile"
@@ -262,12 +259,19 @@
 							<u-picker v-model="ownerDateShow" mode="time" :params="params"
 								@confirm="e=> Dateconfirm(e,'ownerInfo','identifyValidDate')"></u-picker>
 						</uni-forms-item>
-						<uni-forms-item required label="有效期止期" name="identifyValidEndDate">
-							<u-input v-model="ownerInfo.identifyValidEndDate" :custom-style="{textAlign:'right'}"
-								type="select" placeholder="请输入有效期止期" :select-open="ownerEndDateShow"
-								placeholder-style="color:#808080" @click="ownerEndDateShow=true"></u-input>
-							<u-select mode="single-column" :list="endDateList" v-model="ownerEndDateShow"
-								@confirm="e=>endDateConfirm(e,'ownerInfo','identifyValidDate','identifyValidEndDate')"></u-select>
+						<uni-forms-item required label="有效期止期" name="identifyValidEndDate" style="padding-right: 18px;">
+							<input class="uni-input-input textColor" disabled placeholder="有效期止期"
+								v-model="ownerInfo.identifyValidEndDate" placeholder-style="font-size:28upx" />
+						</uni-forms-item>
+						<uni-forms-item label="止期年限" style="padding: 10px 0 5px;">
+							<view class="dis a-c j-c">
+								<view class="status-data" :class="item.value==ownerValidEndDateholder? 'active':''"
+									v-for="(item,index) in endDateList"
+									@tap="ValidEndDateClick(item.value,'ownerValidEndDateholder','ownerInfo')"
+									:key="index">
+									{{item.label}}
+								</view>
+							</view>
 						</uni-forms-item>
 					</uni-forms>
 				</view>
@@ -286,22 +290,22 @@
 			<uni-forms :rules="policyHolderRules" :value="policyHolderInfo" ref="policyHolderForm"
 				validate-trigger="bind" err-show-type="toast" label-width="80">
 				<view v-show="policyHolderholder=='99'" class="collapse">
-					<view class="top-ocr dis j-c a-c" v-show="!policyHolderimg">
+					<view class="top-ocr dis j-c a-c" v-show="!policyHolderfrontImg">
 						<image src="../../static/image/car-insure/Frame1.png" mode="">
 						</image>
 						<text @tap="ocrIdentify('policyHolderInfo')" style="margin-left: 5px;">点击上传/拍摄身份证 自动填写信息</text>
 					</view>
-					<view v-show="!policyHolderExpand && !policyHolderimg" class="btn-collapse dis a-c j-c"
+					<view v-show="!policyHolderExpand && !policyHolderfrontImg" class="btn-collapse dis a-c j-c"
 						@click="expand('policyHolderExpand')">
 						<text>展开手动输入投保人信息</text>
 						<u-icon name="arrow-down" size="30" color="rgb(60 60 60 / 60%)"
 							style="margin-left: 5px;"></u-icon>
 					</view>
 					<view v-show="policyHolderExpand">
-						<view v-show=" policyHolderimg" class="movable-view dis f-c a-c">
+						<view v-show=" policyHolderfrontImg" class="movable-view dis f-c a-c">
 							<movable-area>
 								<movable-view direction="all" out-of-bounds :scale="true">
-									<image :src="policyHolderimg" mode=""
+									<image :src="policyHolderfrontImg" mode=""
 										:style="{width:'100%',height:'100%',transform:`rotate(-${user2deg}deg)`}">
 									</image>
 								</movable-view>
@@ -342,12 +346,7 @@
 									v-model="policyHolderInfo.age" maxlength="18" placeholder-style="font-size:28upx" />
 							</uni-forms-item>
 							<uni-forms-item name="gender" required label="性别:">
-								<u-input v-model="policyHolderInfo.gender" type="select"
-									:select-open="applicantgenderShow" @click="applicantgenderShow = true"
-									:custom-style="{textAlign:'right'}" placeholder-style="color:#808080"
-									placeholder="请选择性别" />
-								<u-select mode="single-column" :list="genderList" v-model="applicantgenderShow"
-									@confirm="e=>genderConfirm(e,'policyHolderInfo')"></u-select>
+
 							</uni-forms-item>
 							<uni-forms-item required name="mobile" label="手机号: ">
 								<input class="uni-input-input textColor" placeholder="请输入手机号"
@@ -371,13 +370,21 @@
 								<u-picker v-model="applicantDateShow" mode="time" :params="params"
 									@confirm="e=> Dateconfirm(e,'policyHolderInfo','identifyValidDate')"></u-picker>
 							</uni-forms-item>
-							<uni-forms-item required label="有效期止期" name="identifyValidEndDate">
-								<u-input v-model="policyHolderInfo.identifyValidEndDate"
-									:custom-style="{textAlign:'right'}" type="select" placeholder="请输入有效期止期"
-									:select-open="applicantEndDateShow" placeholder-style="color:#808080"
-									@click="applicantEndDateShow=true"></u-input>
-								<u-select mode="single-column" :list="endDateList" v-model="applicantEndDateShow"
-									@confirm="e=>endDateConfirm(e,'policyHolderInfo','identifyValidDate','identifyValidEndDate')"></u-select>
+							<uni-forms-item required label="有效期止期" name="identifyValidEndDate"
+								style="padding-right: 18px;">
+								<input class="uni-input-input textColor" disabled placeholder="有效期止期"
+									v-model="policyHolderInfo.identifyValidEndDate"
+									placeholder-style="font-size:28upx" />
+							</uni-forms-item>
+							<uni-forms-item label="止期年限" style="padding: 10px 0 5px;">
+								<view class="dis a-c j-c">
+									<view class="status-data" :class="item.value==policyValidEndDateholder? 'active':''"
+										v-for="(item,index) in endDateList"
+										@tap="ValidEndDateClick(item.value,'policyValidEndDateholder','policyHolderInfo')"
+										:key="index">
+										{{item.label}}
+									</view>
+								</view>
 							</uni-forms-item>
 						</view>
 					</view>
@@ -397,22 +404,22 @@
 			<uni-forms :rules="InsuredRules" :value="insuredPersonInfo" ref="InsuredForm" validate-trigger="bind"
 				err-show-type="toast" label-width="80">
 				<view v-show="Insuredholder=='99'" class="collapse">
-					<view class="top-ocr dis j-c a-c" v-show="!Insuredimg">
+					<view class="top-ocr dis j-c a-c" v-show="!InsuredfrontImg">
 						<image src="../../static/image/car-insure/Frame1.png" mode="">
 						</image>
 						<text @tap="ocrIdentify('insuredPersonInfo')" style="margin-left: 5px;">点击上传/拍摄身份证 自动填写信息</text>
 					</view>
-					<view v-show="!InsuredExpand && !Insuredimg" class="btn-collapse dis a-c j-c"
+					<view v-show="!InsuredExpand && !InsuredfrontImg" class="btn-collapse dis a-c j-c"
 						@click="expand('InsuredExpand')">
 						<text>展开手动输入被保人信息</text>
 						<u-icon name="arrow-down" size="30" color="rgb(60 60 60 / 60%)"
 							style="margin-left: 5px;"></u-icon>
 					</view>
 					<view v-show='InsuredExpand'>
-						<view v-show=" Insuredimg" class="movable-view dis f-c a-c">
+						<view v-show=" InsuredfrontImg" class="movable-view dis f-c a-c">
 							<movable-area>
 								<movable-view direction="all" out-of-bounds :scale="true">
-									<image :src="Insuredimg" mode=""
+									<image :src="InsuredfrontImg" mode=""
 										:style="{width:'100%',height:'100%',transform:`rotate(-${user3deg}deg)`}">
 									</image>
 								</movable-view>
@@ -455,12 +462,7 @@
 									placeholder-style="font-size:28upx" />
 							</uni-forms-item>
 							<uni-forms-item name="gender" required label="性别:">
-								<u-input v-model="insuredPersonInfo.gender" type="select"
-									:select-open="InsuredgenderShow" @click="InsuredgenderShow = true"
-									:custom-style="{textAlign:'right'}" placeholder-style="color:#808080"
-									placeholder="请选择性别" />
-								<u-select mode="single-column" :list="genderList" v-model="InsuredgenderShow"
-									@confirm="e=>genderConfirm(e,'insuredPersonInfo')"></u-select>
+
 							</uni-forms-item>
 							<uni-forms-item required name="mobile" label="手机号: ">
 								<input class="uni-input-input textColor" placeholder="请输入手机号"
@@ -484,13 +486,22 @@
 								<u-picker v-model="InsuredDateShow" mode="time" :params="params"
 									@confirm="e=> Dateconfirm(e,'insuredPersonInfo','identifyValidDate')"></u-picker>
 							</uni-forms-item>
-							<uni-forms-item required label="有效期止期" name="identifyValidEndDate">
-								<u-input v-model="insuredPersonInfo.identifyValidEndDate"
-									:custom-style="{textAlign:'right'}" type="select" placeholder="请输入有效期止期"
-									:select-open="InsuredEndDateShow" placeholder-style="color:#808080"
-									@click="InsuredEndDateShow=true"></u-input>
-								<u-select mode="single-column" :list="endDateList" v-model="InsuredEndDateShow"
-									@confirm="e=>endDateConfirm(e,'insuredPersonInfo','identifyValidDate','identifyValidEndDate')"></u-select>
+							<uni-forms-item required label="有效期止期" name="identifyValidEndDate"
+								style="padding-right: 18px;">
+								<input class="uni-input-input textColor" disabled placeholder="有效期止期"
+									v-model="insuredPersonInfo.identifyValidEndDate"
+									placeholder-style="font-size:28upx" />
+							</uni-forms-item>
+							<uni-forms-item label="止期年限" style="padding: 10px 0 5px;">
+								<view class="dis a-c j-c">
+									<view class="status-data"
+										:class="item.value==insuredValidEndDateholder? 'active':''"
+										v-for="(item,index) in endDateList"
+										@tap="ValidEndDateClick(item.value,'insuredValidEndDateholder','insuredPersonInfo')"
+										:key="index">
+										{{item.label}}
+									</view>
+								</view>
 							</uni-forms-item>
 						</view>
 					</view>
@@ -511,7 +522,8 @@
 <script>
 	import OCRComponent from '@/components/modules/carInsure/OCRComponent/OCRComponent.vue'; //引用图片信息检查插件
 	import {
-		getAgeByIdCard
+		getAgeByIdCard,
+		getGenderFromIdCard
 	} from '@/plugins/utils';
 	var dateTime = new Date();
 	let Year = dateTime.getFullYear();
@@ -610,10 +622,14 @@
 				policyHolderInfoPositiveList: [], //投保人
 				insuredPersonInfoPositiveList: [], //被保人
 				//影像信息
-				carimg: "", //显示图片
-				ownerimg: "", //显示图片
-				policyHolderimg: "", //显示图片
-				Insuredimg: "", //显示图片
+				carfrontImg: "", //显示图片
+				carbackImg: "", //显示图片
+				ownerfrontImg: "", //显示图片
+				ownerbackImg: "", //显示图片
+				policyHolderfrontImg: "", //显示图片
+				policyHolderbackImg: "", //显示图片
+				InsuredfrontImg: "", //显示图片
+				InsuredbackImg: "", //显示图片
 				OCRShow: false,
 				tabsCurrent: 0,
 				checkType: "carInfo", //组件类型
@@ -918,18 +934,13 @@
 
 				endYear: Year,
 				endMonth: Month,
-				ownergenderShow: false, //性别选择
-				applicantgenderShow: false, //性别选择
-				InsuredgenderShow: false, //性别选择
+
 				registerDateShow: false, //注册日期
 				issueDateShow: false, //发证日期
 				transferDateShow: false, //转移登记日期
 				ownerDateShow: false, //
-				ownerEndDateShow: false, //止期选择
 				applicantDateShow: false, //
-				applicantEndDateShow: false, //止期选择
 				InsuredDateShow: false, //
-				InsuredEndDateShow: false, //止期选择
 				identifyType: "身份证",
 				carExpand: false,
 				ownersExpand: false,
@@ -943,6 +954,9 @@
 				prevScrollTop: 0,
 				policyHolderholder: "1",
 				Insuredholder: "2",
+				ownerValidEndDateholder: null,
+				policyValidEndDateholder: null,
+				insuredValidEndDateholder: null,
 				holderstatusList: [{
 						label: '同车主',
 						value: "1",
@@ -980,16 +994,7 @@
 						value: "长期"
 					},
 				],
-				genderList: [{
-						label: '男',
-						value: "男"
-					},
-					{
-						label: '女',
-						value: "女"
-					},
 
-				],
 
 				cardeg: 0, //旋转角度
 				user1deg: 0, //旋转角度
@@ -1034,13 +1039,52 @@
 					}
 				},
 				deep: true
-			}
+			},
+			// "carInfo.energyType": {
+			// 	handler(val) {
+			// 		if (val) {
+			// 			this.carInfo1.energyType = this.dictionaryMatching(this.energyTypeoptions,
+			// 				this
+			// 				.carInfo
+			// 				.energyType);
+			// 		}
+			// 	},
+			// 	deep: true
+			// },
+			"carInfo.cartype": {
+				handler(val) {
+					if (val) {
+						this.carInfo1.cartype = this.dictionaryMatching(this.trafficManagementVehicleTypeoptions,
+							this
+							.carInfo
+							.cartype);
+					}
+				},
+				deep: true
+			},
+			"carInfo.vehicleUse": {
+				handler(val) {
+					if (val) {
+						this.carInfo1.vehicleUse = this.carInfo.carnature == '02' ? this.dictionaryMatching(this
+							.outOfBusinessVehicleUseoptions,
+							this
+							.carInfo
+							.vehicleUse) : "";
+					}
+				},
+				deep: true
+			},
 		},
 		onShow() {
 
 		},
 		onLoad(params) {
-
+			this.getDicType("businessVehicleUse"); //车辆用途(营业)
+			this.getDicType("outOfBusinessVehicleUse"); //车辆用途(非营业)
+			this.getDicType("natureOfVehicleUse"); //车辆性质
+			this.getDicType("vehicleType"); //车辆种类
+			this.getDicType("trafficManagementVehicleType"); //车辆类型
+			this.getDicType("energyType"); //能源种类
 			let pages = getCurrentPages(); // 当前页面路由
 			if (pages.length > 1) {
 				let beforePage = pages[pages.length - 2].route; // 上一个页面路由
@@ -1060,12 +1104,22 @@
 							case 'pages/carInsure2/entry':
 								this.carInfoShow = false;
 								this.carInfo = info.carInfo; //车辆信息
+								if (this.carInfo.cimodelclass == 'A0') {
+									this.carInfo1.cimodelclass = "客车"
+								} else {
+									this.carInfo1.cimodelclass = "货车"
+								}
 								this.ownerInfo.name = info.carInfo.carOwner; //车主
 								this.carInfoPositiveList = info.carInfoPositiveList; //车辆
 								break;
 							case 'pages/carInsure2/quote':
 							case 'pages/carInsure2/quoteDetail':
 								this.carInfo = info.carInfo; //车辆信息
+								if (this.carInfo.cimodelclass == 'A0') {
+									this.carInfo1.cimodelclass = "客车"
+								} else {
+									this.carInfo1.cimodelclass = "货车"
+								}
 								this.ownerInfo = info.ownerInfo; //车主信息
 								this.policyHolderInfo = info.policyHolderInfo; //投保人信息
 								this.insuredPersonInfo = info.insuredPersonInfo; //被保人信息
@@ -1091,12 +1145,7 @@
 
 				})
 			}
-			this.getDicType("businessVehicleUse"); //车辆用途(营业)
-			this.getDicType("outOfBusinessVehicleUse"); //车辆用途(非营业)
-			this.getDicType("natureOfVehicleUse"); //车辆性质
-			this.getDicType("vehicleType"); //车辆种类
-			this.getDicType("trafficManagementVehicleType"); //车辆类型
-			this.getDicType("energyType"); //能源种类
+
 		},
 		onPageScroll(e) {
 			this.handleScroll(e);
@@ -1183,33 +1232,43 @@
 				this.x = e.detail.x;
 				this.y = e.detail.y;
 			},
+			//字典name匹配
+			dictionaryMatching(list, value) {
+				let obj = list.find(val => val.dictValue == value);
+				return obj.dictTag;
+			},
 			//OC识别返回信息
 			carCallback(obj) {
-				this.carimg = obj.img;
+				this.carfrontImg = obj.frontImg;
+				this.carbackImg = obj.backImg;
 				this.carInfoPositiveList = obj.ImgList;
 				Object.assign(this.carInfo, obj.Info);
+				this.carInfo1.cimodelclass = this.dictionaryMatching(this.vehicleTypeoptions,
+					this
+					.carInfo
+					.cimodelclass)
 				this.OCRShow = false;
 				this.carExpand = true;
 			},
 			ownerInfoCallback(obj) {
-				console.log(obj);
-				this.ownerimg = obj.img;
+				this.ownerfrontImg = obj.frontImg;
+				this.ownerbackImg = obj.backImg;
 				this.ownerInfoPositiveList = obj.ImgList;
 				Object.assign(this.ownerInfo, obj.Info);
 				this.OCRShow = false;
 				this.ownersExpand = true;
 			},
 			applicantInfoCallback(obj) {
-				console.log(obj);
-				this.policyHolderimg = obj.img;
+				this.policyHolderfrontImg = obj.frontImg;
+				this.policyHolderbackImg = obj.backImg;
 				this.policyHolderInfoPositiveList = obj.ImgList;
 				Object.assign(this.policyHolderInfo, obj.Info);
 				this.OCRShow = false;
 				this.policyHolderExpand = true;
 			},
 			InsuredInfoCallback(obj) {
-				console.log(obj);
-				this.Insuredimg = obj.img;
+				this.InsuredfrontImg = obj.frontImg;
+				this.InsuredbackImg = obj.backImg;
 				this.insuredPersonInfoPositiveList = obj.ImgList;
 				Object.assign(this.insuredPersonInfo, obj.Info);
 				this.OCRShow = false;
@@ -1233,11 +1292,11 @@
 				}
 			},
 			binddata(name, value, type) {
-				if (name == 'identifyNumber') {
+				if (name == 'identifyNumber' && value) {
 					this[type].age = getAgeByIdCard(value)
+					this[type].gender = getGenderFromIdCard(value)
 				}
 			},
-
 			//转变大写(车型/车架号/发动机号)
 			upperCaseType(type) {
 				this.carInfo[type] = this.carInfo[type].toUpperCase();
@@ -1245,28 +1304,10 @@
 					this.carInfo.vinNo = this.carInfo.frameNo.trim();
 				}
 			},
-			//身份证止期(10/20/长期)处理
-			endDateConfirm(e, obj, param1, param2) {
-				switch (e[0].label) {
-					case '10年':
-						this[obj][param2] = this.endDateInt(this[obj][param1], 10)
-						break;
-					case '20年':
-						this[obj][param2] = this.endDateInt(this[obj][param1], 20)
-						break;
-					case '长期':
-						this[obj][param2] = "9999-12-31"
-						break;
-					default:
-				}
-			},
 			Dateconfirm(e, obj, param) {
 				this[obj][param] = e.year + '-' + e.month + '-' + e.day;
 			},
-			//性别匹配
-			genderConfirm(val, name) {
-				this[name].gender = val[0].label;
-			},
+
 			//(同车主/同投保人)数据处理
 			setPersonInfoAndImageType(sourceInfo, targetInfo, imageType) {
 				let obj = Object.assign({}, this[sourceInfo]);
@@ -1340,6 +1381,24 @@
 			},
 			expand(int) {
 				this[int] = true;
+			},
+			//人员止期
+			ValidEndDateClick(value, identify, info) {
+				this[identify] = value;
+				switch (value) {
+					case '10年':
+						this[info].identifyValidEndDate = this.endDateInt(this[info].identifyValidDate, 10)
+						break;
+					case '20年':
+						this[info].identifyValidEndDate = this.endDateInt(this[info].identifyValidDate, 20)
+						break;
+					case '长期':
+						this[info].identifyValidEndDate = '9999-12-31'
+						break;
+					default:
+				}
+
+
 			},
 			//投保人同车主
 			applicantholderClick(value) {
@@ -1512,15 +1571,27 @@
 	.movable-view {
 		.operate-img {
 			width: 90%;
-			height: 38px;
+			height: auto;
 			background-color: #F9F9F9;
 			border-radius: 8px;
 			padding: 10px 25px;
 			margin-top: 10px;
 
+			>view:nth-child(2) {
+				background-color: rgba(0, 82, 255, 0.06);
+				border-radius: 4px 4px 4px 4px;
+				border: 1px solid #0052FF;
+				color: #0052FF;
+				padding: 3px 5px;
+			}
+
+			>view {
+				font-size: 14px;
+			}
+
 			image {
-				width: 20px;
-				height: 20px;
+				width: 22px;
+				height: 22px;
 				margin-right: 5px;
 			}
 		}

+ 2 - 1
pages/carInsure2/carType.vue

@@ -105,11 +105,12 @@
 				prevPage.$vm.carInfo.modelCode = this.typeList[index].modelCode; //车辆型号编码
 				prevPage.$vm.carInfo.familyName = this.typeList[index].series; //系列
 				prevPage.$vm.carInfo.enginedesc = this.typeList[index].displacement; //排量
-				prevPage.$vm.carInfo.powertype = this.typeList[index].fuelType; //燃油种类
+				prevPage.$vm.carInfo.energyType = this.typeList[index].fuelTypeCode; //燃油种类
 				prevPage.$vm.carInfo.powerScale = this.typeList[index].powerScale; //功率
 				if (this.vehicleType) {
 					prevPage.$vm.vehicleType = this.vehicleType;
 				}
+
 				uni.navigateBack({ //uni.navigateTo跳转的返回,默认1为返回上一级
 					delta: 1
 				});

+ 145 - 15
pages/carInsure2/entry.vue

@@ -66,18 +66,30 @@
 			</view>
 			<view v-show="insuranceType==2" class="OCRcar">
 				<view class="title dis j-s a-c">
-					<text>行驶证识别</text>
+					<view class="dis a-c">
+						<text>行驶证识别</text>
+						<view class="switch-container ml-2" @tap="toggleSwitch" v-if="carbackImg">
+							<view class="switch-track">
+								<view class="switch-thumb dis a-c j-c" :class="{ thumbactive: !isActive }"></view>
+								<view class="switch-thumb1 dis a-c j-c" :class="{ thumbactive1: isActive }">主</view>
+								<view class="switch-thumb2 dis a-c j-c" :class="{ thumbactive1: !isActive }">副</view>
+							</view>
+						</view>
+					</view>
 					<text @click="carSwitching=!carSwitching">{{carSwitching?'手动输入':'拍照识别'}}</text>
 				</view>
 				<view v-show="carSwitching" class="ocr mt-2">
-					<image v-if="!carimg" @tap="ocrIdentify" src="/static/image/car-insure/carbg.png" mode=""
+					<image v-if="!carfrontImg" @tap="ocrIdentify" src="/static/image/car-insure/carbg.png" mode=""
 						style="width: 100%;height: 198px;">
 					</image>
 					<template v-else>
-						<view v-if=" carimg" class="movable-view dis f-c a-c">
+						<view v-if=" carfrontImg" class="movable-view dis f-c a-c">
 							<movable-area>
 								<movable-view direction="all" out-of-bounds :scale="true">
-									<image :src="carimg" mode=""
+									<image v-if="isActive" :src="carfrontImg" mode=""
+										:style="{width:'100%',height:'100%',transform:`rotate(-${cardeg}deg)`}">
+									</image>
+									<image v-else :src="carbackImg" mode=""
 										:style="{width:'100%',height:'100%',transform:`rotate(-${cardeg}deg)`}">
 									</image>
 								</movable-view>
@@ -367,7 +379,7 @@
 								@blur="binddata('purchasePrice', $event.detail.value,'carForm')"
 								@input="upperCaseType('purchasePrice')" />
 						</uni-forms-item>
-						<uni-forms-item label="是否过户: ">
+						<!-- <uni-forms-item label="是否过户: ">
 							<view class="d-flex j-end a-c" style="height:100%">
 								<u-switch v-model="carInfo.transferFlag" active-color="#0052FF " size="30"
 									@change="transferFlagchange"></u-switch>
@@ -379,7 +391,7 @@
 								:custom-style="{textAlign:'right'}" placeholder-style="color:#808080"></u-input>
 							<u-picker v-model="transferDateShow" mode="time" :params="params" :end-year="endYear"
 								:end-month="endMonth" @confirm="e=> Dateconfirm(e,'carInfo','transferDate')"></u-picker>
-						</uni-forms-item>
+						</uni-forms-item> -->
 					</uni-forms>
 				</view>
 			</view>
@@ -405,8 +417,10 @@
 		components: {
 			OCRComponent,
 		},
+
 		data() {
 			return {
+				isActive: true,
 				vehicleType: false, //车型查询调用标识
 				keyboardType: false, //键盘中/英切换标识
 				endYear: Year,
@@ -574,11 +588,13 @@
 				OCRShow: false,
 				tabsCurrent: 0,
 				checkType: "carInfo", //组件类型
-				carimg: null, //展示图片
+				carfrontImg: null, //展示图片
+				carbackImg: null, //展示图片
 				cardeg: 0, //旋转角度
-
+				word: "word",
 			}
 		},
+
 		async onLoad() {
 			this.getDicType("businessVehicleUse"); //车辆用途(营业)
 			this.getDicType("outOfBusinessVehicleUse"); //车辆用途(非营业)
@@ -611,9 +627,46 @@
 					default:
 						this.keyboardType = true;
 				}
-			}
+			},
+			// "carInfo.energyType": {
+			// 	handler(val) {
+			// 		if (val) {
+			// 			this.carInfo1.energyType = this.dictionaryMatching(this.energyTypeoptions,
+			// 				this
+			// 				.carInfo
+			// 				.energyType);
+			// 		}
+			// 	},
+			// 	deep: true
+			// },
+			"carInfo.cartype": {
+				handler(val) {
+					if (val) {
+						this.carInfo1.cartype = this.dictionaryMatching(this.trafficManagementVehicleTypeoptions,
+							this
+							.carInfo
+							.cartype);
+					}
+				},
+				deep: true
+			},
+			"carInfo.vehicleUse": {
+				handler(val) {
+					if (val) {
+						this.carInfo1.vehicleUse = this.carInfo.carnature == '02' ? this.dictionaryMatching(this
+							.outOfBusinessVehicleUseoptions,
+							this
+							.carInfo
+							.vehicleUse) : "";
+					}
+				},
+				deep: true
+			},
 		},
 		methods: {
+			toggleSwitch() {
+				this.isActive = !this.isActive;
+			},
 			rotatefront(int) {
 				this[int] = this[int] == 270 ? 0 : this[int] + 90;
 			},
@@ -649,7 +702,8 @@
 			},
 			//OC识别返回信息
 			carCallback(obj) {
-				this.carimg = obj.img;
+				this.carfrontImg = obj.frontImg;
+				this.carbackImg = obj.backImg;
 				this.carInfoPositiveList = obj.ImgList;
 				Object.assign(this.carInfo, obj.Info);
 				this.carInfo1.cimodelclass = this.dictionaryMatching(this.vehicleTypeoptions,
@@ -678,7 +732,6 @@
 
 			//下一步
 			toNext() {
-				console.log(this.vehicleType);
 				switch (this.insuranceType) {
 					case 1:
 						if (!this.carInfo.licenseNo && !this.islicense(this.carInfo.licenseNo)) {
@@ -688,10 +741,13 @@
 								duration: 1500
 							});
 						}
-
+						this.navigate({
+							url: "/pages/carInsure2/Information?licenseNo=" + encodeURIComponent(this.carInfo
+								.licenseNo)
+						}, "navigateTo", true)
 						break;
 					case 2:
-						if (!this.carInfo.licenseNo && !this.carimg) {
+						if (!this.carInfo.licenseNo && !this.carfrontImg) {
 							return uni.showToast({
 								icon: "none",
 								title: '请上传资料或录入信息后再投保',
@@ -700,6 +756,7 @@
 						}
 						this.$refs.carForm.submit().then(res => {
 							if (this.vehicleType) {
+								console.log(this.carInfo);
 								this.navigate({
 									url: '/pages/carInsure2/Information',
 									success: (res) => {
@@ -1026,9 +1083,21 @@
 						padding: 10px 25px;
 						margin-top: 10px;
 
+						>view:nth-child(2) {
+							background-color: rgba(0, 82, 255, 0.06);
+							border-radius: 4px 4px 4px 4px;
+							border: 1px solid #0052FF;
+							color: #0052FF;
+							padding: 3px 5px;
+						}
+
+						>view {
+							font-size: 14px;
+						}
+
 						image {
-							width: 20px;
-							height: 20px;
+							width: 22px;
+							height: 22px;
 							margin-right: 5px;
 						}
 					}
@@ -1089,4 +1158,65 @@
 		height: 100%;
 		width: 100%;
 	}
+
+	.switch-container {
+		width: 60px;
+		height: 30px;
+		background-color: #E6EEFF;
+		border-radius: 15px;
+		position: relative;
+		cursor: pointer;
+	}
+
+	.switch-track {
+		width: 100%;
+		height: 100%;
+		background-color: #E6EEFF;
+		border-radius: 4px;
+		position: relative;
+		transition: background-color 0.3s ease;
+	}
+
+	.switch-thumb {
+		width: 26px;
+		height: 26px;
+		background-color: #0052FF;
+		border-radius: 4px;
+		position: absolute;
+		top: 2px;
+		left: 2px;
+		transition: transform 0.3s ease;
+		font-size: 13px;
+		color: #fff;
+
+	}
+
+	.switch-thumb1 {
+		width: 26px;
+		height: 26px;
+		position: absolute;
+		top: 2px;
+		left: 2px;
+		font-size: 13px;
+		color: rgba(0, 82, 255, 0.8);
+	}
+
+	.switch-thumb2 {
+		width: 26px;
+		height: 26px;
+		position: absolute;
+		top: 2px;
+		right: 2px;
+		font-size: 13px;
+		color: rgba(0, 82, 255, 0.8);
+	}
+
+	.thumbactive {
+		background-color: #0052FF;
+		transform: translateX(30px);
+	}
+
+	.thumbactive1 {
+		color: #fff;
+	}
 </style>

+ 150 - 29
pages/carInsure2/quote.vue

@@ -65,22 +65,21 @@
 				</view>
 			</view>
 			<view class="header dis a-c j-s mt-3">
-				<text class="title ">投保注意:</text>
+				<text class="title " style="color:#FF5600;">投保注意:</text>
 				<view class="dis a-c  f-wrap">
-
-					<view class="status-data" :class="carInfo.transferFlag? 'active':''"
+					<view class="status-data" :class="carInfo.transferFlag? 'active1':''"
 						@tap="immediatelyClick('transferFlag')">
 						过户车
 					</view>
-					<view class="status-data" :class="carInfo.transferFlagBi? 'active':''"
+					<view class="status-data" :class="carInfo.transferFlagBi? 'active1':''"
 						@tap="immediatelyClick('transferFlagBi')">
 						商业险过户
 					</view>
-					<view class="status-data" :class="carInfo.outOfInsurance? 'active':''"
+					<view class="status-data" :class="carInfo.outOfInsurance? 'active1':''"
 						@tap="immediatelyClick('outOfInsurance')">
 						脱保
 					</view>
-					<view class="status-data" :class="carInfo.usedCar? 'active':''" @tap="immediatelyClick('usedCar')">
+					<view class="status-data" :class="carInfo.usedCar? 'active1':''" @tap="immediatelyClick('usedCar')">
 						二手车
 					</view>
 				</view>
@@ -93,8 +92,12 @@
 					@confirm="transferconfirm"></u-picker>
 			</view>
 			<view class="quoteCompany mt-3">
-				<view class="header dis a-c j-s">
+				<view class="header dis a-c">
 					<view class="title  d-flex">保险公司</view>
+					<view class="Discount dis a-c " style="margin-left: 10px;">
+						<image src="/static/image/car-insure/youhui.png" mode=""></image>
+						<text style="margin-left: 3px;">优惠金额</text>
+					</view>
 					<!-- 	<view class="">
 						<u-checkbox v-model="Selectchecked" @change="SelectAll($event)"
 							active-color="rgb(250, 53, 52)">全选</u-checkbox>
@@ -116,8 +119,15 @@
 									<ls-loading v-show="totalitem.quoteCode==1" text="掌柜正在为您报价,请稍等......"
 										:animation="animation" fontSize="22" />
 									<!-- 价格 -->
-									<text v-show="totalitem.quoteCode==200"
-										class="sum">¥{{totalitem.result.sumPermium}}</text>
+									<view class="dis a-c" v-if="totalitem.quoteCode==200">
+										<view class="dis a-c" style="margin-right: 10px;">
+											<image src="/static/image/car-insure/youhui.png" mode=""
+												style="width: 16px;height: 16px;margin-right: 0;"></image>
+											<text
+												style="color: #FF4D4D;font-size: 12px;">¥{{totalitem.result.sumExportFee}}</text>
+										</view>
+										<text class="sum">¥{{totalitem.result.sumPermium}}</text>
+									</view>
 									<text
 										v-show="(totalitem.quoteCode != '200') && (totalitem.quoteCode != '0') && (totalitem.quoteCode != '1')"
 										class="sum" style="color: #999;font-size: 12px;"
@@ -183,7 +193,7 @@
 													<text>份数:</text>
 													<u-number-box v-model="renshouaccidentalDrivingVo.quantity" :min="1"
 														:max="1" :disabled-input="true" :input-width="70"
-														:input-height="44" size="26"></u-number-box>
+														:input-height="44" size="26" :long-press="false"></u-number-box>
 												</view>
 											</view>
 										</view>
@@ -214,7 +224,7 @@
 													<u-number-box v-model="zhongmeiaccidentalDrivingVo.quantity"
 														:min="1" :max="Number(zhongmeiaccidentalDrivingVo.maxQuantity)"
 														:disabled-input="true" :input-width="70" :input-height="44"
-														size="26"></u-number-box>
+														:long-press="false" size="26"></u-number-box>
 												</view>
 											</view>
 										</view>
@@ -249,8 +259,8 @@
 														<u-number-box v-model="item.quantity" :min="1"
 															:max="item.maxQuantity"
 															:disabled-input="item.maxQuantity==1?true :false"
-															:input-width="70" :input-height="44"
-															size="26"></u-number-box>
+															:input-width="70" :input-height="44" size="26"
+															:long-press="false"></u-number-box>
 													</view>
 												</view>
 											</view>
@@ -281,7 +291,7 @@
 													<text>份数:</text>
 													<u-number-box v-model="bohaiaccidentalDrivingVo.copies" :min="1"
 														:max="1" :disabled-input="true" :input-width="70"
-														:input-height="44" size="26"></u-number-box>
+														:input-height="44" size="26" :long-press="false"></u-number-box>
 												</view>
 											</view>
 										</view>
@@ -311,7 +321,7 @@
 													<text>份数:</text>
 													<u-number-box v-model="hengbangaccidentalDrivingVo.quantity"
 														:min="1" :max="1" :disabled-input="true" :input-width="70"
-														:input-height="44" size="26"></u-number-box>
+														:input-height="44" size="26" :long-press="false"></u-number-box>
 												</view>
 
 											</view>
@@ -344,7 +354,7 @@
 													<u-number-box v-model="taipingaccidentalDrivingVo.quantity" :min="1"
 														:max="taipingaccidentalDrivingVo.maxQuantity"
 														:disabled-input="true" :input-width="70" :input-height="44"
-														size="26"></u-number-box>
+														:long-press="false" size="26"></u-number-box>
 												</view>
 											</view>
 										</view>
@@ -368,7 +378,7 @@
 												<text>份数:</text>
 												<u-number-box v-model="zhonganaccidentalDrivingVo.quantity" :min="1"
 													:max="1" :disabled-input="true" :input-width="70" :input-height="44"
-													size="26"></u-number-box>
+													:long-press="false" size="26"></u-number-box>
 											</view>
 										</view>
 									</view>
@@ -390,7 +400,8 @@
 											<view class=" dis j-s a-c">
 												<text>份数:</text>
 												<u-number-box v-model="huanongaccidentalDrivingVo.allQuantity" :min="1"
-													:input-width="70" :input-height="44" size="26"></u-number-box>
+													:long-press="false" :input-width="70" :input-height="44"
+													size="26"></u-number-box>
 											</view>
 										</view>
 									</view>
@@ -419,7 +430,7 @@
 													<text>份数:</text>
 													<u-number-box v-model="yongchengaccidentalDrivingVo.quantity"
 														:min="1" :max="100" :input-width="70" :input-height="44"
-														size="26"></u-number-box>
+														:long-press="false" size="26"></u-number-box>
 												</view>
 											</view>
 										</view>
@@ -447,8 +458,8 @@
 												<view class=" dis j-s a-c">
 													<text>份数:</text>
 													<u-number-box v-model="anshengaccidentalDrivingVo.quantity" :min="1"
-														:max="1" :disabled-input="true" :input-width="70"
-														:input-height="44" size="26"></u-number-box>
+														:long-press="false" :max="1" :disabled-input="true"
+														:input-width="70" :input-height="44" size="26"></u-number-box>
 												</view>
 											</template>
 										</view>
@@ -483,7 +494,7 @@
 														<text>份数:</text>
 														<u-number-box v-model="guoRenaccidentalDrivingVo.quantity"
 															:min="1" :max="Number(guoRenaccidentalDrivingVo.policyNum)"
-															:input-width="70" :input-height="44"
+															:input-width="70" :input-height="44" :long-press="false"
 															size="26"></u-number-box>
 													</view>
 												</view>
@@ -515,7 +526,7 @@
 													<text>份数:</text>
 													<u-number-box v-model="dajiaaccidentalDrivingVo.quantity" :min="1"
 														:max="1" :disabled-input="true" :input-width="70"
-														:input-height="44" size="26"></u-number-box>
+														:long-press="false" :input-height="44" size="26"></u-number-box>
 												</view>
 
 											</view>
@@ -534,6 +545,17 @@
 										<text
 											v-if="totalitem.result.jyPremium">驾意险:¥{{totalitem.result.jyPremium}}</text>
 									</view>
+									<view class="dis a-c  f-wrap price" style="font-size: 20rpx;color: #FF4D4D;">
+										<text>优惠金额:【
+											<text
+												v-if="totalitem.result.jqPremium">交强险:{{totalitem.result.jqExportFee}}</text>
+											<text
+												v-if="totalitem.result.syPremium">商业险:{{totalitem.result.syExportFee}}</text>
+											<text
+												v-if="totalitem.result.jyPremium">驾意险:{{totalitem.result.noExportFee}}</text>
+											】</text>
+
+									</view>
 									<view class="dis a-c j-s ">
 										<view class="dis f-c time">
 											<text
@@ -845,8 +867,9 @@
 				<text>将跳转至保险配置页面添加或修改商业险</text>
 			</view>
 		</u-modal>
-		<view class="footer-btn">
-			<u-button type="primary" style="background:#0052FF;" @tap="toNext">保费计算</u-button>
+		<view class="footer-btn dis a-c j-s">
+			<u-button type="primary" style="background:#ff9000;width: 20%;" @tap="tempSave">暂存</u-button>
+			<u-button type="primary" style="background:#0052FF; width: 75%;" @tap="toNext">保费计算</u-button>
 		</view>
 	</view>
 </template>
@@ -1558,13 +1581,23 @@
 					for (let i = 0; i < this.riskList.length; i++) {
 						if (this.riskList[i].riskCode == '0507') {
 							this.jqchecked = true;
-							this.jqstartDate = this.riskList[i].startDate;
-							this.jqendDate = this.riskList[i].endDate;
+							if (this.isDateBeforeToday(this.riskList[i].startDate)) {
+								this.jqstartDate = this.nextday();
+								this.jqendDate = this.oneYearPast(this.jqstartDate)
+							} else {
+								this.jqstartDate = this.riskList[i].startDate;
+								this.jqendDate = this.riskList[i].endDate;
+							}
 						}
 						if (this.riskList[i].riskCode == '0510') {
 							this.sychecked = true;
-							this.systartDate = this.riskList[i].startDate;
-							this.syendDate = this.riskList[i].endDate;
+							if (this.isDateBeforeToday(this.riskList[i].startDate)) {
+								this.systartDate = this.nextday();
+								this.syendDate = this.oneYearPast(this.systartDate)
+							} else {
+								this.systartDate = this.riskList[i].startDate;
+								this.syendDate = this.riskList[i].endDate;
+							}
 							this.kindList.map(ele1 => {
 								this.insureList.map(ele2 => {
 									if (ele2.kindCode == ele1.kindCode) {
@@ -1693,6 +1726,42 @@
 			uni.removeStorageSync("companyId")
 		},
 		methods: {
+			async tempSave() {
+				let param = {
+					userId: this.userInfo.sysUser.id,
+					quoteno: this.quoteno ? this.quoteno : "",
+					orderNo: this.orderno ? this.orderno : "",
+					carInfo: this.carInfo,
+					insuredPersonInfo: this.insuredPersonInfo,
+					ownerInfo: this.ownerInfo,
+					policyHolderInfo: this.policyHolderInfo,
+					kindList: this.kindList,
+					riskList: this.riskList,
+					vehicleAndVesselTax: this.vehicleAndVesselTaxForm,
+				};
+				let orders = await this.$http.post('/insurance/order/generateOrder', param);
+				if (orders.code == '200') {
+					uni.showToast({
+						title: '暂存成功',
+						icon: 'none',
+					});
+				} else {
+					uni.showToast({
+						title: res.msg,
+						icon: 'none',
+					});
+				}
+			},
+			isDateBeforeToday(date) {
+				const inputDate = new Date(date); // 将输入的日期转换为 Date 对象
+				const today = new Date(); // 获取当前日期
+				// 比较日期是否小于当前日期
+				if (inputDate < today) {
+					return true; // 输入日期小于当前日期
+				} else {
+					return false; // 输入日期大于等于当前日期
+				}
+			},
 			Guidedconfirm() {
 				this.toInsureItems();
 			},
@@ -3210,6 +3279,27 @@
 					duration: 1000
 				});
 			},
+			//次日
+			nextday() {
+				var date = new Date();
+				date.setFullYear(date.getFullYear());
+				date.setTime(date.getTime() + 24 * 60 * 60 * 1000);
+				var strYear = date.getFullYear();
+				var strDay = date.getDate();
+				var strMonth = date.getMonth() + 1;
+				var hh = date.getHours();
+				if (hh < 10) {
+					hh = "0" + hh;
+				}
+				if (strMonth < 10) {
+					strMonth = "0" + strMonth;
+				}
+				if (strDay < 10) {
+					strDay = "0" + strDay;
+				}
+				var datastr = strYear + "-" + strMonth + "-" + strDay + " " + "00:00:00";
+				return datastr;
+			},
 			oneYearPast(time) {
 				var date = new Date(time);
 				date.setSeconds(date.getSeconds() - 1);
@@ -3769,6 +3859,25 @@
 		background-size: cover;
 	}
 
+	.active1 {
+		position: relative;
+		background: rgba(255, 86, 0, 0.1);
+		color: #FF5600;
+		border: 1px solid #FF5600;
+		font-weight: 700;
+	}
+
+	.active1::before {
+		content: "";
+		position: absolute;
+		top: 0;
+		left: 0;
+		width: 10px;
+		height: 10px;
+		background-image: url("/static/image/car-insure/before1.png");
+		background-size: cover;
+	}
+
 	.quoteactive {
 		border: 1px solid #0052FF;
 
@@ -3784,4 +3893,16 @@
 
 
 	}
+
+	.Discount {
+		image {
+			width: 16px;
+			height: 16px;
+		}
+
+		text {
+			font-size: 12px;
+			color: #333333;
+		}
+	}
 </style>

+ 46 - 5
pages/carInsure2/quoteDetail.vue

@@ -36,17 +36,33 @@
 		</view>
 		<view class="page">
 			<view class="quotePlan">
-				<view class="header d-flex a-center j-sb">
+				<view class="header d-flex a-center">
 					<view class="title">报价方案</view>
+					<view class="Discount dis a-c " style="margin-left: 10px;">
+						<image src="/static/image/car-insure/youhui.png" mode=""></image>
+						<text style="margin-left: 3px;">优惠金额</text>
+					</view>
 				</view>
 				<view class="body" style="box-shadow: 0px 4px 10px 0px #DAE3F4;">
 					<view class="row d-flex a-center j-sb">
 						<view v-if="sumPermium">总额:</view>
-						<view>{{sumPermium}}</view>
+						<view class="dis a-c">
+							<view class="Discount dis a-c " style="margin-right: 10px;">
+								<image src="/static/image/car-insure/youhui.png" mode=""></image>
+								<text style="margin-left: 3px;color: #FF4D4D;">¥{{orderInfo.sumExportFee}}</text>
+							</view>
+							<text> ¥{{sumPermium}}</text>
+						</view>
 					</view>
 					<view v-if="jqpremium" class="row d-flex a-center j-sb">
 						<view>交强险:</view>
-						<view>{{jqpremium}}</view>
+						<view class="dis a-c">
+							<view class="Discount dis a-c " style="margin-right: 10px;">
+								<image src="/static/image/car-insure/youhui.png" mode=""></image>
+								<text style="margin-left: 3px;color: #FF4D4D;">¥{{orderInfo.jqExportFee}}</text>
+							</view>
+							<text> ¥{{jqpremium}}</text>
+						</view>
 					</view>
 					<view class="row d-flex a-center j-sb">
 						<view>车船税:</view>
@@ -54,13 +70,25 @@
 					</view>
 					<view v-if="jypremium" class="row d-flex a-center j-sb">
 						<view>驾意险:</view>
-						<view>{{jypremium}}</view>
+						<view class="dis a-c">
+							<view class="Discount dis a-c " style="margin-right: 10px;">
+								<image src="/static/image/car-insure/youhui.png" mode=""></image>
+								<text style="margin-left: 3px;color: #FF4D4D;">¥{{orderInfo.noExportFee}}</text>
+							</view>
+							<text> ¥{{jypremium}}</text>
+						</view>
 					</view>
 
 					<view v-if="sypremium" class="row dis f-c">
 						<view class="dis a-c j-s" style="width: 100%;">
 							<view>商业险:</view>
-							<view>{{sypremium}}</view>
+							<view class="dis a-c">
+								<view class="Discount dis a-c " style="margin-right: 10px;">
+									<image src="/static/image/car-insure/youhui.png" mode=""></image>
+									<text style="margin-left: 3px;color: #FF4D4D;">¥{{orderInfo.syExportFee}}</text>
+								</view>
+								<text> ¥{{sypremium}}</text>
+							</view>
 						</view>
 						<view class="kindList mt-3">
 							<block v-for="(item,index) in kindList" :key="index">
@@ -3345,4 +3373,17 @@
 		width: 100%;
 		height: 100%;
 	}
+
+	.Discount {
+		image {
+			width: 16px;
+			height: 16px;
+		}
+
+		text {
+			font-size: 12px;
+			color: #333333;
+		}
+	}
+</style>
 </style>

+ 11 - 10
pages/orders1/paymentCode.vue

@@ -50,22 +50,23 @@
 								<text>投保人:</text>
 								<text>{{applyName}}</text>
 							</view>
-							<view class="dis j-s a-c">
-								<text>车船税:</text>
-								<text>¥{{taxamount}}</text>
-							</view>
-							<view v-if="jypremium" class="dis j-s a-c">
-								<text>驾意险:</text>
-								<text>¥{{jypremium}}</text>
-							</view>
 							<view v-if="jqpremium" class="dis j-s a-c">
 								<text>交强险:</text>
 								<text>¥{{jqpremium}}</text>
 							</view>
+							<view class="dis j-s a-c">
+								<text>车船税:</text>
+								<text>¥{{taxamount}}</text>
+							</view>
 							<view v-if="sypremium" class="dis j-s a-c">
 								<text>商业险:</text>
 								<text>¥{{sypremium}}</text>
 							</view>
+							<view v-if="jypremium" class="dis j-s a-c">
+								<text>驾意险:</text>
+								<text>¥{{jypremium}}</text>
+							</view>
+
 							<view v-if="sumPermium" class="dis j-s a-c">
 								<text>保费合计:</text>
 								<text>¥{{sumPermium}}</text>
@@ -396,11 +397,11 @@
 
 	.fixed-bottom {
 		position: fixed;
-		bottom: 20px;
+		bottom: 0;
 		left: 0;
 		right: 0;
 		width: 100%;
-		height: 62px;
+		height: auto;
 		padding: 16px;
 	}
 

+ 16 - 0
plugins/utils.js

@@ -39,6 +39,22 @@ export const getAgeByIdCard = function(idCard) {
 	sexAndAge.age = age
 
 	return sexAndAge.age
+
+}
+//根据身份证号计算性别
+export const getGenderFromIdCard = function(idCard) {
+	// 判断身份证号长度是否正确
+	if (idCard.length !== 18) {
+		return "无效身份证号";
+	}
+	// 获取身份证号倒数第二位数字
+	var digit = parseInt(idCard.charAt(idCard.length - 2));
+	// 判断性别
+	if (digit % 2 === 0) {
+		return "女";
+	} else {
+		return "男";
+	}
 }
 // 身份证格式校验
 export const checkIdCard = function(sIdCard) {

BIN
static/image/car-insure/before1.png


BIN
static/image/car-insure/upload.png


BIN
static/image/car-insure/youhui.png