Browse Source

fix:添加权益

wuguojie 1 year ago
parent
commit
c45adad4e0

+ 1 - 1
components/uni-popup/uni-popup.vue

@@ -10,7 +10,7 @@
 </template>
 
 <script>
-	// import uniTransition from '../uni-transition/uni-transition.vue'
+	import uniTransition from '../../uni_modules/uni-transition/components/uni-transition/uni-transition.vue'
 	/**
 	 * PopUp 弹出层
 	 * @description 弹出层组件,为了解决遮罩弹层的问题

+ 7 - 7
config/baseUrl.js

@@ -4,26 +4,26 @@ let socketUrl = "";
 if (process.env.NODE_ENV === 'development') {
 	// 开发环境
 	// baseUrl = "https://test.baoxianzhanggui.com/dx/"; //屈晨
-	// baseUrl = "https://test.baoxianzhanggui.com/test/"
+	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";
 	// baseUrl = "https://pre.baoxianzhanggui.com/web-api"; //预生产
 	// h5BaseUrl = "https://pre.baoxianzhanggui.com/h5";
 	// baseUrl = "https://pre.baoxianzhanggui.com/test"; //生产
-	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 = "wss://sxzgkj.baoxianzhanggui.com/web-api/websocket";
 	// socketUrl = "ws://192.168.0.52:8080/websocket";
 } else if (process.env.NODE_ENV === 'production') {
 	// 生产环境
-	// baseUrl = "http://192.168.0.115:8090"; //董鑫
+	baseUrl = "http://192.168.0.115:8090"; //董鑫
 	// baseUrl = "https://test.baoxianzhanggui.com/web-api"; //测试
 	// 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 = "wss://sxzgkj.baoxianzhanggui.com/web-api/websocket";
 }
 const courtConfig = {
@@ -130,4 +130,4 @@ export default Object.assign({
 	mailRegular,
 	passwordRegular,
 	insCompanyList
-}, courtConfig);
+}, courtConfig);

+ 30 - 0
pages.json

@@ -869,6 +869,36 @@
 				}
 			}
 		},
+		{
+			"path": "pages/carInsure/customerInterest",
+			"style": {
+				"navigationBarTitleText": "客户权益",
+				"app-plus": {
+					"scrollIndicator": "none", //隐藏滚动条
+					"bounce": "none", //关闭反弹效果
+					"titleNView": {
+						"buttons": [{
+							"type": "home"
+						}]
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/carInsure/interest",
+			"style": {
+				"navigationBarTitleText": "权益礼包",
+				"app-plus": {
+					"scrollIndicator": "none", //隐藏滚动条
+					"bounce": "none", //关闭反弹效果
+					"titleNView": {
+						"buttons": [{
+							"type": "home"
+						}]
+					}
+				}
+			}
+		},
 		{
 			"path": "pages/carInsure/entry",
 			"style": {

+ 125 - 4
pages/carInsure/premiumCalc.vue

@@ -152,6 +152,7 @@
 										@tap.stop.prevent="ErrorMsg(totalitem.msg,totalitem.namesimple)">报价失败,查看原因</text>
 								</view>
 								<view class=" dis j-end a-c mt-2 f-wrap">
+									<view class="ml-2 mb-1" v-if="totalitem.result.companyId" @click="handleCustomerInterest(totalitem)" style="border: 1px solid #303133;border-radius: 2px;padding:1px 6px;font-size: 24rpx;">客户权益</view>
 									<view class="ml-2 mb-1 "
 										v-if="totalitem.namesimple=='诚泰财险' && totalitem.result.companyId"
 										style="border: 1px solid #06A8DC;border-radius: 2px;padding:1px 6px;color:#06A8DC;font-size: 24rpx;"
@@ -291,7 +292,7 @@
 												v-if="totalitem.result.orderstatus==0"
 												:custom-style="{borderRadius:'2px'}"
 												style="background: linear-gradient( 90deg, #0052FF 0%, #0D8BFF 100%);"
-												@click="submitUnderwriting(totalitem.result.companyId,totalitem.result.apiType ,totalitem.namesimple)">提交核保</u-button>
+												@click="submitUnderwriting(totalitem.result.companyId,totalitem.result.apiType ,totalitem.namesimple, totalitem)">提交核保</u-button>
 										</view>
 									</view>
 								</view>
@@ -1358,9 +1359,31 @@
 			</view>
 		</u-popup>
 		<previewImage ref="previewImage" :opacity="0.8" :circular="true" :imgs="previewImgs"></previewImage>
+		<!-- 提交核保确认是否选择了某种优惠方式 -->
+		<uni-popup ref='popup' type="bottom">
+			<view class="popup">
+				<view class="dis a-c j-c title">
+					<view>选择优惠方式</view>
+					<view class="close" @click="closePopup()">
+						<uni-icons type='closeempty' size='16'></uni-icons>
+					</view>
+				</view>
+				<view class="list">
+					<view class="radio" @click='handleAcceptCustomer(1)'>
+						<view>客户权益</view>
+						<view>当前客户出单后,可赠送客户价值688的权益礼包</view>
+					</view>
+					<view class="radio" @click='handleAcceptCustomer(0)'>
+						<view>现金优惠</view>
+						<view>选择为当前客户最多优惠365.25元</view>
+					</view>
+				</view>
+			</view>
+		</uni-popup>
 	</view>
 </template>
 <script>
+	import uniIcons from '../../components/uni-icons/components/uni-icons/uni-icons.vue'
 	import {
 		mapState
 	} from "vuex"
@@ -1371,7 +1394,8 @@
 		components: {
 			wybPopup,
 			lsLoading,
-			previewImage
+			previewImage,
+			uniIcons
 		},
 		watch: {
 			comparableQuantity: {
@@ -1781,6 +1805,34 @@
 				this.ZJcoefficientIndex = index;
 				this.ZJcoefficientShow = true;
 			},
+			handleCustomerInterest(item) {
+				let params = {
+					option: [
+						{
+							type: '车主', // 2
+							name: this.ownerInfo.name,
+							mobile: this.ownerInfo.mobile,
+							identifyNumber: this.ownerInfo.identifyNumber,
+						},
+						{
+							type: '投保人', // 0
+							name: this.policyHolderInfo.name,
+							mobile: this.policyHolderInfo.mobile,
+							identifyNumber: this.policyHolderInfo.identifyNumber
+						},
+						{
+							type: '被保人', // 1
+							name: this.insuredPersonInfo.name,
+							mobile: this.insuredPersonInfo.mobile,
+							identifyNumber: this.insuredPersonInfo.identifyNumber
+						},
+					],
+					companyId: item.editingDto.companyId
+				}
+				uni.navigateTo({
+					url: `/pages/carInsure/customerInterest?params=${JSON.stringify(params)}`,
+				})
+			},
 			change(index, name) {
 				this[name + 'current'] = index;
 			},
@@ -3992,11 +4044,56 @@
 				}, 1000)
 			},
 			// 上传影像并提交核保
-			async submitUnderwriting(id, apiType, name) {
+			async submitUnderwriting(id, apiType, name, item) {
+				console.log(1111, item)
 				this.companyId = id;
 				this.apiType = apiType;
 				this.insuranceCompanyName = name;
-				this.auditNextShow = true;
+				this.$http.post(`/equity/createEquityOrder?companyId=${id}`).then(res => {
+					if(res.code === 200) {
+						if(item.editingDto.equityType === 1 || item.editingDto.equityType === 0) {
+							this.auditNextShow = true;
+						} else {
+							this.$refs.popup.open()
+						}
+					}
+				})
+			},
+			closePopup() {
+				this.$refs.popup.close()
+			},
+			handleAcceptCustomer(type) {
+				if(type === 1) {
+					let params = {
+						option: [
+							{
+								type: '车主', // 2
+								name: this.ownerInfo.name,
+								mobile: this.ownerInfo.mobile,
+								identifyNumber: this.ownerInfo.identifyNumber,
+							},
+							{
+								type: '投保人', // 0
+								name: this.policyHolderInfo.name,
+								mobile: this.policyHolderInfo.mobile,
+								identifyNumber: this.policyHolderInfo.identifyNumber
+							},
+							{
+								type: '被保人', // 1
+								name: this.insuredPersonInfo.name,
+								mobile: this.insuredPersonInfo.mobile,
+								identifyNumber: this.insuredPersonInfo.identifyNumber
+							},
+						],
+						companyId: this.companyId
+					}
+					uni.navigateTo({
+						url: `/pages/carInsure/customerInterest?params=${JSON.stringify(params)}`,
+					})
+				}
+				this.$http.post(`/equity/saveEquityType?companyId=${this.companyId}&type=${type}`).then(res => {
+					this.closePopup()
+				})
 			},
 			//核保弹窗关闭事件
 			underwritecancel() {
@@ -4843,4 +4940,28 @@
 		color: #FFFFFF;
 		font-size: 20rpx;
 	}
+	.popup{
+		width: 100%;
+		height: 410rpx;
+		background-color: #ffffff;
+		.title{
+			padding: 27rpx 0;
+			color: #333333;
+			font-size: 34rpx;
+			position: relative;
+			.close{
+				position: absolute;
+				top: 20rpx;
+				right: 20rpx;
+			}
+		}
+		.list{
+			height: calc(100% - 100rpx);
+			overflow-y: auto;
+			.radio{
+				padding: 28rpx 20px;
+				border-top: 1px solid #eeeeee;
+			}
+		}
+	}
 </style>

+ 7 - 0
pages/carInsure/quoteDetail.vue

@@ -775,6 +775,13 @@
 					</view>
 				</view>
 			</view>
+			<view class="car">
+				<view class="header d-flex a-center j-sb"
+					style="background: linear-gradient( 180deg, #DBFFBF 0%, rgba(219,255,191,0) 100%);">
+					<view class="title">客户权益</view>
+					<text style="color: #0055FF;font-size: 12px;"></text>
+				</view>
+			</view>
 		</view>
 		<view class="bottomBtn dis f-c"
 			v-if="orderstatus==0 && routepage!='pages/orders/subOrders' && routepage!='pages/orders/quoteHistory'">