Commit 312d71e6 authored by 郭志伟's avatar 郭志伟

Merge branch 'fix/policy_fix' into 'master'

Fix:

See merge request !58
parents 2f4d9ed6 f3cbcd3f
...@@ -40,6 +40,7 @@ export default { ...@@ -40,6 +40,7 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
z-index: 9999;
.loading { .loading {
padding: 6px; padding: 6px;
border-radius: 6px; border-radius: 6px;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Description: 华贵大麦2020定期寿险 * @Description: 华贵大麦2020定期寿险
* @Date: 2020-07-27 15:46:37 * @Date: 2020-07-27 15:46:37
* @LastEditors: gzw * @LastEditors: gzw
* @LastEditTime: 2020-08-19 14:07:08 * @LastEditTime: 2020-08-20 14:51:17
*/ */
import goodsBg from "@/assets/images/goods/detail/shouxian/bg.png"; import goodsBg from "@/assets/images/goods/detail/shouxian/bg.png";
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Description:华太30万轻重疾险 * @Description:华太30万轻重疾险
* @Date: 2020-07-27 15:46:37 * @Date: 2020-07-27 15:46:37
* @LastEditors: gzw * @LastEditors: gzw
* @LastEditTime: 2020-08-12 15:58:44 * @LastEditTime: 2020-08-20 10:34:05
*/ */
import goodsBg from "@/assets/images/goods/detail/zhongjixian/bg.png"; import goodsBg from "@/assets/images/goods/detail/zhongjixian/bg.png";
...@@ -83,8 +83,8 @@ export default { ...@@ -83,8 +83,8 @@ export default {
], ],
insuredOptions: [ insuredOptions: [
{ label: "本人", value: "1" }, { label: "本人", value: "1" },
{ label: "配偶", value: "2" }, { label: "父母", value: "2" },
{ label: "父母", value: "3" }, { label: "配偶", value: "3" },
{ label: "子女", value: "4" } { label: "子女", value: "4" }
], ],
paywayOptions: [ paywayOptions: [
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Description: 泰康600万医疗保障 * @Description: 泰康600万医疗保障
* @Date: 2020-07-27 15:46:37 * @Date: 2020-07-27 15:46:37
* @LastEditors: gzw * @LastEditors: gzw
* @LastEditTime: 2020-08-12 16:40:46 * @LastEditTime: 2020-08-20 10:33:55
*/ */
import goodsBg from "@/assets/images/goods/detail/yiliaoxian/bg.png"; import goodsBg from "@/assets/images/goods/detail/yiliaoxian/bg.png";
...@@ -72,8 +72,8 @@ export default { ...@@ -72,8 +72,8 @@ export default {
planTipOptions: ["不限社保", "报销自费药", "额外400万特定赔付"], planTipOptions: ["不限社保", "报销自费药", "额外400万特定赔付"],
insuredOptions: [ insuredOptions: [
{ label: "本人", value: "1" }, { label: "本人", value: "1" },
{ label: "配偶", value: "2" }, { label: "父母", value: "2" },
{ label: "父母", value: "3" }, { label: "配偶", value: "3" },
{ label: "子女", value: "4" } { label: "子女", value: "4" }
], ],
medicalOptions: [ medicalOptions: [
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Description:众安50万意外险 * @Description:众安50万意外险
* @Date: 2020-07-27 15:46:37 * @Date: 2020-07-27 15:46:37
* @LastEditors: gzw * @LastEditors: gzw
* @LastEditTime: 2020-08-18 16:24:31 * @LastEditTime: 2020-08-20 10:33:46
*/ */
import goodsBg from "@/assets/images/goods/detail/yiwaixian/bg.png"; import goodsBg from "@/assets/images/goods/detail/yiwaixian/bg.png";
...@@ -101,8 +101,8 @@ export default { ...@@ -101,8 +101,8 @@ export default {
], ],
insuredOptions: [ insuredOptions: [
{ label: "本人", value: "1" }, { label: "本人", value: "1" },
{ label: "配偶", value: "2" }, { label: "父母", value: "2" },
{ label: "父母", value: "3" }, { label: "配偶", value: "3" },
{ label: "子女", value: "4" } { label: "子女", value: "4" }
], ],
noticeCellInfo: { noticeCellInfo: {
......
export default { export default {
basicHost: "http://yapi.quantgroups.com/mock/329/", // basicHost: "http://yapi.quantgroups.com/mock/329/",
basicHost: "https://hathaway-mg.liangkebang.net/",
// basicHost: "http://192.168.29.211:8964/", // basicHost: "http://192.168.29.211:8964/",
wxAppId: "wx514de17b23d53a20" wxAppId: "wx514de17b23d53a20"
}; };
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Description: autoSaveForm mixins * @Description: autoSaveForm mixins
* @LastEditors: gzw * @LastEditors: gzw
* @Date: 2019-08-14 15:53:37 * @Date: 2019-08-14 15:53:37
* @LastEditTime: 2020-08-14 16:16:58 * @LastEditTime: 2020-08-20 13:49:26
*/ */
import localStorage from "@/service/localStorage"; import localStorage from "@/service/localStorage";
...@@ -28,6 +28,9 @@ export default { ...@@ -28,6 +28,9 @@ export default {
hasAutoSaveData(key) { hasAutoSaveData(key) {
return !!localStorage.get(key); return !!localStorage.get(key);
}, },
getSaveParams(key) {
return localStorage.get(key);
},
getSaveInfoHandler(key, target) { getSaveInfoHandler(key, target) {
this[target] = localStorage.get(key); this[target] = localStorage.get(key);
this.$forceUpdate(); this.$forceUpdate();
......
...@@ -69,6 +69,15 @@ export function isIdNo(str) { ...@@ -69,6 +69,15 @@ export function isIdNo(str) {
return false; return false;
} }
// 判断输入的字符是否为中文姓名最少两个中文字符
export function isChineseName(str) {
if (!isNull(str)) {
const reg = /^[\u0391-\uFFE5]{2,}$/;
return reg.test(str);
}
return false;
}
// 判断输入的字符是否以数字开头 // 判断输入的字符是否以数字开头
export function isStartWithInteger(str) { export function isStartWithInteger(str) {
if (!isNull(str)) { if (!isNull(str)) {
...@@ -258,6 +267,16 @@ export function isBankNumber(str) { ...@@ -258,6 +267,16 @@ export function isBankNumber(str) {
return false; return false;
} }
// 判断中文地址不能少于5个汉字,且必须有一位数字
export function isChnAddress(str) {
const isNum = /[0-9]\d*/;
const isChinese_var = /[\u0391-\uFFE5]{5,}/g;
if (!isNull(str)) {
return isNum.test(str) && isChinese_var.test(str);
}
return false;
}
// 判断微信环境 // 判断微信环境
export const isWeixinBrower = window.navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == "micromessenger"; export const isWeixinBrower = window.navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == "micromessenger";
// 判断信用钱包环境 // 判断信用钱包环境
......
...@@ -109,60 +109,6 @@ export default { ...@@ -109,60 +109,6 @@ export default {
{ title: "重疾险", price: "50万" }, { title: "重疾险", price: "50万" },
{ title: "意外险", price: "60万" }, { title: "意外险", price: "60万" },
{ title: "寿险", price: "350万" } { title: "寿险", price: "350万" }
],
overviewList: [
{
id: 1,
goods: "国民保·百万医疗险",
type: "mi",
title: "医疗险",
amount: "600万",
range: "1年",
way: "趸交",
price: "350元",
goodsPirce: "3000",
goodsUnit: "元/每年",
reason: "推荐理由推荐理由推荐理由推荐理由推荐理由推荐理由推荐理由"
},
{
id: 2,
goods: "康惠保2020终身重疾险",
type: "cii",
title: "重疾险",
amount: "50万",
range: "终身",
way: "20年",
price: "6000元",
goodsPirce: "6000",
goodsUnit: "元/每年",
reason: "推荐理由推荐理由推荐理由推荐理由推荐理由推荐理由推荐理由"
},
{
id: 3,
goods: "国民保·百万意外险",
type: "ai",
title: "意外险",
amount: "50万",
range: "1年",
way: "趸交",
price: "350元",
goodsPirce: "3000",
goodsUnit: "元/每年",
reason: "推荐理由推荐理由推荐理由推荐理由推荐理由推荐理由推荐理由"
},
{
id: 4,
goods: "国民保·百万寿险",
type: "li",
title: "寿险",
amount: "350万",
range: "保至70岁",
way: "20年",
price: "3725元",
goodsPirce: "3000",
goodsUnit: "元/每年",
reason: "推荐理由推荐理由推荐理由推荐理由推荐理由推荐理由推荐理由"
}
] ]
}; };
}, },
......
...@@ -170,7 +170,13 @@ export default { ...@@ -170,7 +170,13 @@ export default {
const { idNo: oldidNo, amountInsured: oldamountInsured, selfIdNo: oldselfIdNo } = oldVal; const { idNo: oldidNo, amountInsured: oldamountInsured, selfIdNo: oldselfIdNo } = oldVal;
let idNoWho = !relation || relation === "1" ? selfIdNo : idNo; let idNoWho = !relation || relation === "1" ? selfIdNo : idNo;
let oldidNoWho = !relation || relation === "1" ? oldselfIdNo : oldidNo; let oldidNoWho = !relation || relation === "1" ? oldselfIdNo : oldidNo;
if (!isIdNo(idNoWho) && idNoWho === oldidNoWho && amountInsured === oldamountInsured) { if (
idNoWho &&
idNoWho.indexOf("************") === -1 &&
!isIdNo(idNoWho) &&
idNoWho === oldidNoWho &&
amountInsured === oldamountInsured
) {
return; return;
} }
this.calTimer = setTimeout(() => { this.calTimer = setTimeout(() => {
...@@ -268,7 +274,7 @@ export default { ...@@ -268,7 +274,7 @@ export default {
payType, payType,
autoRenewPolicy autoRenewPolicy
} = this.formData; } = this.formData;
this.subFromData = { this.subFormData = {
insuredUserInfo: { insuredUserInfo: {
userInfoSecId: userInfoSecId ?? null, userInfoSecId: userInfoSecId ?? null,
name, name,
......
...@@ -139,7 +139,7 @@ export default { ...@@ -139,7 +139,7 @@ export default {
name: "", name: "",
idNo: "", idNo: "",
relation: "", relation: "",
payType: "2", payType: "1",
amountInsured: "300000", amountInsured: "300000",
autoRenewPolicy: false, autoRenewPolicy: false,
read: true read: true
...@@ -186,12 +186,52 @@ export default { ...@@ -186,12 +186,52 @@ export default {
oldidNoWho = oldidNo; oldidNoWho = oldidNo;
} }
if (this.goInsureState) { if (this.goInsureState) {
sessionStorage.setItem( const subFormData = JSON.parse(JSON.stringify(this.formData));
"policyFormData", const {
JSON.stringify(Object.assign(this.formData, { productNo: this.goodId })) userInfoSecId,
); name,
idNo,
relation,
socialSecurity,
selfSocialSecurity,
selfName,
selfIdNo,
selfPhone,
selfSecId,
payType,
amountInsured,
autoRenewPolicy
} = subFormData;
const subFormDataCache = {
productNo: this.goodId,
holderUserInfo: {
phoneNo: selfPhone,
userInfoSecId: selfSecId ? selfSecId : null,
name: selfName,
idNo: selfIdNo
},
productItem: {
payType,
amountInsured
},
autoRenewPolicy: autoRenewPolicy
};
if (relation === "1") {
subFormDataCache.holderUserInfo.socialSecurity = !!Number(selfSocialSecurity);
} else {
subFormDataCache.insuredUserInfo = {
userInfoSecId: userInfoSecId ? userInfoSecId : undefined,
name,
idNo,
relation,
socialSecurity: !!Number(socialSecurity)
};
}
sessionStorage.setItem("policyFormData", JSON.stringify(subFormDataCache));
} }
if ( if (
idNoWho &&
idNoWho.indexOf("************") === -1 &&
!isIdNo(idNoWho) && !isIdNo(idNoWho) &&
idNoWho === oldidNoWho && idNoWho === oldidNoWho &&
payType === oldpayType && payType === oldpayType &&
......
...@@ -117,7 +117,6 @@ import detailLoginMixin from "./modules/detailLogin.mixin"; ...@@ -117,7 +117,6 @@ import detailLoginMixin from "./modules/detailLogin.mixin";
import Detail from "@/api/detail.huagui.shouxian"; import Detail from "@/api/detail.huagui.shouxian";
import { trail, list } from "@/api/product"; import { trail, list } from "@/api/product";
export default { export default {
name: "GoodsDetail-LI", name: "GoodsDetail-LI",
components: { components: {
...@@ -143,7 +142,7 @@ export default { ...@@ -143,7 +142,7 @@ export default {
mixins: [detailLoginMixin], mixins: [detailLoginMixin],
data() { data() {
return { return {
...Detail, ...JSON.parse(JSON.stringify(Detail)),
goodId: "", goodId: "",
calTimer: null, calTimer: null,
goodActionInfo: {}, goodActionInfo: {},
......
...@@ -140,7 +140,7 @@ export default { ...@@ -140,7 +140,7 @@ export default {
idNo: "", idNo: "",
socialSecurity: "", socialSecurity: "",
relation: "", relation: "",
payType: "2", payType: "1",
planValue: "3", planValue: "3",
autoRenewPolicy: false, autoRenewPolicy: false,
read: true read: true
...@@ -161,7 +161,10 @@ export default { ...@@ -161,7 +161,10 @@ export default {
}; };
this.goodBuyModalInfo = [ this.goodBuyModalInfo = [
{ title: `${price[2]}保费`, value: `${price[0]}${price[1]}` }, { title: `${price[2]}保费`, value: `${price[0]}${price[1]}` },
{ title: `${subPrice[2]}保费`, value: `${subPrice[0]}${subPrice[1]}${subPrice[3]}` } {
title: `${subPrice[2]}保费`,
value: `${subPrice[0]}${subPrice[1]}${subPrice[3]}`
}
]; ];
} }
}, },
...@@ -175,7 +178,13 @@ export default { ...@@ -175,7 +178,13 @@ export default {
const { idNo: oldidNo, selfIdNo: oldselfIdNo } = oldVal; const { idNo: oldidNo, selfIdNo: oldselfIdNo } = oldVal;
let idNoWho = !relation || relation === "1" ? selfIdNo : idNo; let idNoWho = !relation || relation === "1" ? selfIdNo : idNo;
let oldidNoWho = !relation || relation === "1" ? oldselfIdNo : oldidNo; let oldidNoWho = !relation || relation === "1" ? oldselfIdNo : oldidNo;
if (!isIdNo(idNoWho) && idNoWho === oldidNoWho) return; if (
idNoWho &&
idNoWho.indexOf("************") === -1 &&
!isIdNo(idNoWho) &&
idNoWho === oldidNoWho
)
return;
this.calTimer = setTimeout(() => { this.calTimer = setTimeout(() => {
this.calFee(); this.calFee();
}, 1000); }, 1000);
...@@ -246,7 +255,7 @@ export default { ...@@ -246,7 +255,7 @@ export default {
this.generateOrder(); this.generateOrder();
}, },
generateFormData() { generateFormData() {
const subFromData = JSON.parse(JSON.stringify(this.formData)); const subFormData = JSON.parse(JSON.stringify(this.formData));
const { const {
userInfoSecId, userInfoSecId,
name, name,
...@@ -260,8 +269,8 @@ export default { ...@@ -260,8 +269,8 @@ export default {
selfSecId, selfSecId,
payType, payType,
autoRenewPolicy autoRenewPolicy
} = subFromData; } = subFormData;
this.subFromData = { this.subFormData = {
productNo: this.goodId, productNo: this.goodId,
holderUserInfo: { holderUserInfo: {
phoneNo: selfPhone, phoneNo: selfPhone,
...@@ -275,17 +284,17 @@ export default { ...@@ -275,17 +284,17 @@ export default {
autoRenewPolicy: autoRenewPolicy autoRenewPolicy: autoRenewPolicy
}; };
if (relation === "1") { if (relation === "1") {
this.subFromData.holderUserInfo.socialSecurity = !!Number(selfSocialSecurity); this.subFormData.holderUserInfo.socialSecurity = !!Number(selfSocialSecurity);
this.subFromData.productItem.socialSecurity = !!Number(selfSocialSecurity); this.subFormData.productItem.socialSecurity = !!Number(selfSocialSecurity);
} else { } else {
this.subFromData.insuredUserInfo = { this.subFormData.insuredUserInfo = {
userInfoSecId: userInfoSecId ? userInfoSecId : undefined, userInfoSecId: userInfoSecId ? userInfoSecId : undefined,
name, name,
idNo, idNo,
relation, relation,
socialSecurity: !!Number(socialSecurity) socialSecurity: !!Number(socialSecurity)
}; };
this.subFromData.productItem.socialSecurity = !!Number(socialSecurity); this.subFormData.productItem.socialSecurity = !!Number(socialSecurity);
} }
}, },
async getDetail() { async getDetail() {
......
...@@ -7,7 +7,7 @@ import { mapActions } from "vuex"; ...@@ -7,7 +7,7 @@ import { mapActions } from "vuex";
export default { export default {
data() { data() {
return { return {
subFromData: {}, // 组装好的数据 subFormData: {}, // 组装好的数据
orderInfo: {}, orderInfo: {},
openId: localStorage.get("openId"), openId: localStorage.get("openId"),
tradeType: "", tradeType: "",
...@@ -22,7 +22,7 @@ export default { ...@@ -22,7 +22,7 @@ export default {
...mapActions(["setIsLoading"]), ...mapActions(["setIsLoading"]),
async generateOrder() { async generateOrder() {
const res = await placeOrder.create({ const res = await placeOrder.create({
...this.subFromData ...this.subFormData
}); });
if (res) { if (res) {
this.orderInfo = res; this.orderInfo = res;
......
...@@ -11,7 +11,13 @@ ...@@ -11,7 +11,13 @@
请如实告知 请如实告知
<strong>被保人</strong> 是否有以下情形之一 <strong>被保人</strong> 是否有以下情形之一
</span> </span>
<iframe class="inform-frame" :src="url" frameborder="0" height="100%"></iframe> <iframe
class="inform-frame"
:src="url"
frameborder="0"
height="100%"
v-if="refreshIframe"
></iframe>
</card> </card>
<div class="inform-btns"> <div class="inform-btns">
<cr-button @click="$router.back()">不符合</cr-button> <cr-button @click="$router.back()">不符合</cr-button>
...@@ -31,58 +37,25 @@ export default { ...@@ -31,58 +37,25 @@ export default {
}, },
data() { data() {
return { return {
formData: JSON.parse(sessionStorage.getItem("policyFormData") || "{}"), subFormData: JSON.parse(sessionStorage.getItem("policyFormData") || "{}"),
orderInfo: {}, orderInfo: {},
refreshIframe: true,
tradeType: "JSAPI", tradeType: "JSAPI",
url: "http://mangguo-contract.qthbx.com/huatai-jian-kang-gao-zhi-v1/" url: "http://mangguo-contract.qthbx.com/huatai-jian-kang-gao-zhi-v1/"
}; };
}, },
mounted() {
this.url = this.$route.query.url || this.url;
this.refreshIframe = false;
setTimeout(() => {
this.refreshIframe = true;
}, 1000);
},
methods: { methods: {
conform() { conform() {
// this.$router.push(`/policy/detail/123`); // this.$router.push(`/policy/detail/123`);
this.generateFormData(); // this.generateFormData();
this.generateOrder(); this.generateOrder();
},
generateFormData() {
const subFromData = JSON.parse(JSON.stringify(this.formData));
const {
userInfoSecId,
name,
idNo,
relation,
socialSecurity,
selfSocialSecurity,
selfName,
selfIdNo,
selfPhone,
selfSecId,
payType,
autoRenewPolicy
} = subFromData;
this.subFromData = {
productNo: this.goodId,
holderUserInfo: {
phoneNo: selfPhone,
userInfoSecId: selfSecId ? selfSecId : null,
name: selfName,
idNo: selfIdNo
},
productItem: {
payType
},
autoRenewPolicy: autoRenewPolicy
};
if (relation === "1") {
this.subFromData.holderUserInfo.socialSecurity = !!Number(selfSocialSecurity);
} else {
this.subFromData.insuredUserInfo = {
userInfoSecId: userInfoSecId ? userInfoSecId : undefined,
name,
idNo,
relation,
socialSecurity: !!Number(socialSecurity)
};
}
} }
} }
}; };
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment