1206cad3 by joe

1

1 parent 307f5bf0
......@@ -312,10 +312,10 @@ module.exports = {
cancel: "Skip",
candidates: {
sex: [{
name: "",
name: "Male",
value: "M"
}, {
name: "",
name: "Female",
value: "F"
}],
idType: [{
......
......@@ -339,7 +339,7 @@ export default {
} catch (e) { }
this.$root.eventBus.$on("_evt_to_account_information", () => {
this.$nextTick(() => {
console.log("ccccc:", document.getElementById("sc"));
// console.log("ccccc:", document.getElementById("sc"));
let sc = document.getElementById("sc");
if (sc) {
document.getElementById("sc").scrollIntoView();
......
......@@ -22,11 +22,11 @@
<div class="down-arrow"></div>
<el-select style="text-align: center;" class="clarms-select" v-model="data.insuredIndex" :placeholder="''">
<template v-if="lan == 'en'">
<el-option v-for="(item,index) in insuredList" :key="index" :label="item.insuredNameEn" :value="index + 1">
<el-option v-for="(item,index) in insuredList" :key="index" :label="item.insuredNameEn?item.insuredNameEn:insuredNameCn" :value="index + 1">
</el-option>
</template>
<template v-else>
<el-option v-for="(item,index) in insuredList" :key="index" :label="item.insuredNameCn" :value="index + 1">
<el-option v-for="(item,index) in insuredList" :key="index" :label="item.insuredNameCn?item.insuredNameCn:insuredNameEn" :value="index + 1">
</el-option>
</template>
</el-select>
......
......@@ -16,7 +16,7 @@ export default {
hadLoadPolicy: false,
ignorePolicyCodes: [],
// 显示
policyDetail: {}
policyDetail: null
}
},
components: {},
......
......@@ -8,7 +8,7 @@ import {
import Auth from '@components/auth/auth.vue';
import PolicyHeadList from "./policy-head-list.vue";
import { formatMoney } from "@/utils/biz.js";
import { formatMoney, getInsuredPeriod, getBenefitType, getPayPeriod, getPayType, getMoneyName, getPayMode } from "@/utils/biz.js";
export default {
name: "InsuranceQuery",
......@@ -88,6 +88,38 @@ export default {
}
return formatMoney(s, t);
},
// 保障年限,保n年
formatInsuredPeriod(t, v) {
return getInsuredPeriod(this.$i18n.locale, t, v);
},
formatBenefitType(t) {
return getBenefitType(this.$i18n.locale, t);
},
// 缴费方式,交n年
formatPayPeriod(t, v) {
return getPayPeriod(this.$i18n.locale, t, v);
},
// 支付方式,支票xxx
formatPayMode(v) {
return getPayMode(this.$i18n.locale, v);
},
// 缴费频率
formatPayType(v) {
return getPayType(this.$i18n.locale, v);
},
// 钱的名字
formatMoneyName(c) {
return getMoneyName(this.$i18n.locale, c);
},
formatPanduPayPeriod(y, p) {
switch (this.$i18n.locale) {
case "zh":
case "tc":
return "第" + y + "年第" + p + "期";
default:
return "Year " + y + " issue " + p;
}
},
userLogout() {
this.showForm = false;
},
......@@ -99,6 +131,9 @@ export default {
...mapState({
userInfo: state => state.userInfo
}),
i18n() {
return this.$i18n.messages && this.$i18n.locale ? this.$i18n.messages[this.$i18n.locale] : {};
},
},
components: {
Auth,
......
......@@ -33,7 +33,7 @@
<div class="separator-v"></div>
<div class="cell1">
<div class="label">{{$t('customService.insuranceQuery.t2n4')}}</div>
<div class="label">{{dataForm.insuredPeriod}}</div>
<div class="label">{{formatInsuredPeriod(dataForm.periodType,dataForm.periodValue)}}</div>
</div>
</div>
<div class="separator-h"></div>
......@@ -143,7 +143,7 @@
<div class="data-line">
<div class="td w2">{{item.name}}</div>
<div class="td w2">{{item.nameEn}}</div>
<div class="td w2">{{item.benefitType}}</div>
<div class="td w2">{{formatBenefitType(item.relationshipWithLA)}}</div>
<div class="td w2">{{item.benefitRate}}</div>
</div>
<div class="separator-h" v-if="index < dataForm.benefitList.length - 1"></div>
......@@ -162,12 +162,12 @@
<div class="data-line">
<div class="cell1">
<div class="label">{{$t('customService.insuranceQuery.t5PaymentPeriod')}}</div>
<div class="label">{{dataForm.payPeriod}}</div>
<div class="label">{{formatPayPeriod(dataForm.payPeriodType,dataForm.payPeriodValue)}}</div>
</div>
<div class="separator-v"></div>
<div class="cell1">
<div class="label">{{$t('customService.insuranceQuery.t5PaymentMethod')}}</div>
<div class="label">{{dataForm.payType}}</div>
<div class="label">{{formatPayMode(dataForm.payMode)}}</div>
</div>
</div>
<div class="separator-h"></div>
......@@ -175,7 +175,7 @@
<div class="data-line">
<div class="cell1">
<div class="label">{{$t('customService.insuranceQuery.t5PaymentCurrency')}}</div>
<div class="label">{{dataForm.moneyName}}</div>
<div class="label">{{formatMoneyName(dataForm.moneyId)}}</div>
</div>
<div class="separator-v"></div>
<div class="cell1">
......@@ -217,8 +217,9 @@
<div class="separator-h"></div>
<div v-for="(item,index) in dataForm.pandupList" :key="index">
<div class="data-line">
<div class="td w2">{{item.paidPeriod}}</div>
<div class="td w2">{{item.payType}}</div>
<!-- <div class="td w2">{{item.paidPeriod}}</div> -->
<div class="td w2">{{formatPanduPayPeriod(item.policyYear,item.policyPeriod)}}</div>
<div class="td w2">{{formatPayType(item.payTypeValue)}}</div>
<div class="td w2">{{item.receiptDate?item.receiptDate.split(" ")[0]:""}}</div>
<div class="td w2">{{dataForm.moneyMark}} {{formatMoney(item.totalPremium)}}</div>
</div>
......
......@@ -116,10 +116,12 @@ export default {
this.policy.clientBirthday = this.policy.clientBirthday ? this.policy.clientBirthday.split(" ")[0] : "";
this.policy.insuredBirthday = this.policy.insuredBirthday ? this.policy.insuredBirthday.split(" ")[0] : "";
let clientName = res.clientNameCn ? res.clientNameCn : res.clientNameEn;
let insuredName = res.insuredNameCn ? res.insuredNameCn : res.insuredNameEn;
this.policy.clientName = clientName;
this.policy.insuredName = insuredName;
let clientNameCn = res.clientNameCn ? res.clientNameCn : res.clientNameEn;
let clientNameEn = res.clientNameEn ? res.clientNameEn : res.clientNameCn;
let insuredNameCn = res.insuredNameCn ? res.insuredNameCn : res.insuredNameEn;
let insuredNameEn = res.insuredNameEn ? res.insuredNameEn : res.insuredNameCn;
this.policy.clientName = this.locale == 'en' ? clientNameEn : clientNameCn;
this.policy.insuredName = this.locale == 'en' ? insuredNameEn : insuredNameCn;
// 证件类型、证件号要备份,用于比较
this.policy.clientIdTypeBak = this.policy.clientIdType;
this.policy.clientIdNumberBak = this.policy.clientIdNumber;
......
......@@ -7,7 +7,7 @@ import {
import {
mapState
} from 'vuex';
import { formatMoney } from "@/utils/biz.js";
import { formatMoney, getInsuredPeriod } from "@/utils/biz.js";
export default {
props: {
......@@ -35,6 +35,12 @@ export default {
...mapState({
policyList: state => state.policyList
}),
lan() {
return this.$i18n.locale;
},
i18n() {
return this.$i18n.messages && this.$i18n.locale ? this.$i18n.messages[this.$i18n.locale] : {};
},
},
methods: {
toContactUs() {
......@@ -190,6 +196,10 @@ export default {
}
return formatMoney(s, t);
},
// 保障年限,保n年
formatInsuredPeriod(t, v) {
return getInsuredPeriod(this.$i18n.locale, t, v);
},
downloadPolicy(policy) {
if (policy) {
httpPost({ url: api.getDownloadPath, sid: true, data: { policyCode: policy.policyCode } }).then(res => {
......
......@@ -36,11 +36,14 @@
</template>
</template>
</div>
<div class="td w2">{{item.insuredName}}</div>
<div class="td w2">{{lan == 'en' ? (item.insuredNameEn ? item.insuredNameEn : item.insuredNameCn) : (item.insuredNameCn ? item.insuredNameCn : item.insuredNameEn)}}</div>
<div class="td w1">{{item.productName}}</div>
<div class="td w2">{{item.moneyCode}} {{formatMoney(item.amount,0)}}</div>
<div class="td w2">{{item.expireAt?item.expireAt.split(" ")[0]:""}}</div>
<div class="td w2">{{item.guaranteeAge?item.guaranteeAge.split(" ")[0]:""}}</div>
<!-- <div class="td w2">{{item.guaranteeAge?item.guaranteeAge.split(" ")[0]:""}}</div> -->
<div class="td w2">{{formatInsuredPeriod(item.insuredPeriodType,item.insuredPeriodValue)}}</div>
</div>
<div class="separator-h" v-if="index < myPolicyList.length - 1 && index < maxShow - 1"></div>
</template>
......
......@@ -784,6 +784,184 @@ let policyIdTypeEnList = [
{ "v": "52", "n": "Chinese birth certificate" },
{ "v": "9", "n": "Others" },
];
let relationList = [
{ "v": "22", "n": "本人" },
{ "v": "23", "n": "父母" },
{ "v": "86", "n": "祖父母" },
{ "v": "116", "n": "其他" },
{ "v": "151", "n": "夫妻" },
{ "v": "172", "n": "受益人的托管人" },
{ "v": "175", "n": "法定继承人" },
{ "v": "176", "n": "兄弟姐妹" },
{ "v": "178", "n": "未婚夫妻" },
{ "v": "25", "n": "子女" },
{ "v": "177", "n": "祖孙关系" }
];
let relationTcList = [
{ "v": "22", "n": "本人" },
{ "v": "23", "n": "父母" },
{ "v": "86", "n": "祖父母" },
{ "v": "116", "n": "其他" },
{ "v": "151", "n": "夫妻" },
{ "v": "172", "n": "受益人的託管人" },
{ "v": "175", "n": "法定繼承人" },
{ "v": "176", "n": "兄弟姐妹" },
{ "v": "178", "n": "未婚夫妻" },
{ "v": "25", "n": "子女" },
{ "v": "177", "n": "祖孫關係" }
];
let relationEnList = [
{ "v": "22", "n": "THE SAME PERSON" },
{ "v": "23", "n": "PARENTS" },
{ "v": "86", "n": "GRANDPARENT" },
{ "v": "116", "n": "OTHERS" },
{ "v": "151", "n": "SPOUSE" },
{ "v": "172", "n": "TRUSTEE-OF-BENEFICIARY" },
{ "v": "175", "n": "LEGAL BENEFICIARY" },
{ "v": "176", "n": "BROTHERS/SISTERS" },
{ "v": "178", "n": "FIANCE/FIANCEE" },
{ "v": "25", "n": "CHILDREN" },
{ "v": "177", "n": "GRANDCHILD" }
];
let payTypeList = [
{ "v": "0", "n": "无关" },
{ "v": "1", "n": "年缴" },
{ "v": "2", "n": "半年缴" },
{ "v": "3", "n": "季缴" },
{ "v": "4", "n": "月缴" },
{ "v": "5", "n": "趸缴" }
]
let payTypeEnList = [
{ "v": "0", "n": "Not Relevant" },
{ "v": "1", "n": "Yearly" },
{ "v": "2", "n": "Half-Yearly" },
{ "v": "3", "n": "Quarterly" },
{ "v": "4", "n": "Monthly" },
{ "v": "5", "n": "Single" }
]
let payTypeTcList = [
{ "v": "0", "n": "無關" },
{ "v": "1", "n": "年繳" },
{ "v": "2", "n": "半年繳" },
{ "v": "3", "n": "季繳" },
{ "v": "4", "n": "月繳" },
{ "v": "5", "n": "躉繳" }
]
// 1-Cash现金,2-Cheque支票,84-EPS 易办事,93-银行本票Cashier’s Order,61-Bank Draft银行汇票,23-E-banking转账,30-Credit Card信用卡;
let payModeList = [
{ "v": "0", "n": "其他" },
{ "v": "1", "n": "现金" },
{ "v": "2", "n": "支票" },
{ "v": "84", "n": "易办事" },
{ "v": "93", "n": "银行本票" },
{ "v": "61", "n": "银行汇票" },
{ "v": "23", "n": "转账" },
{ "v": "30", "n": "信用卡" }
];
let payModeEnList = [
{ "v": "0", "n": "Others" },
{ "v": "1", "n": "Cash" },
{ "v": "2", "n": "Cheque" },
{ "v": "84", "n": "EPS" },
{ "v": "93", "n": "Cashier’s Order" },
{ "v": "61", "n": "Bank Draft" },
{ "v": "23", "n": "E-banking" },
{ "v": "30", "n": "Credit Card" }
];
let payModeTcList = [
{ "v": "0", "n": "其他" },
{ "v": "1", "n": "現金" },
{ "v": "2", "n": "支票" },
{ "v": "84", "n": "易辦事" },
{ "v": "93", "n": "銀行本票" },
{ "v": "61", "n": "銀行匯票" },
{ "v": "23", "n": "轉賬" },
{ "v": "30", "n": "信用卡" }
];
let moneyNameList = [
{ "v": "0", "n": "其他" },
{ "v": "27", "n": "文莱币" },
{ "v": "29", "n": "卢比(斯里兰卡)" },
{ "v": "1", "n": "人民币" },
{ "v": "2", "n": "英镑" },
{ "v": "3", "n": "港币" },
{ "v": "4", "n": "美元" },
{ "v": "5", "n": "瑞士法郎" },
{ "v": "8", "n": "新加坡元" },
{ "v": "12", "n": "日元" },
{ "v": "13", "n": "CAD" },
{ "v": "14", "n": "澳大利亚元" },
{ "v": "16", "n": "欧元" },
{ "v": "18", "n": "新西兰元" },
{ "v": "20", "n": "挪威克朗" },
{ "v": "21", "n": "泰国铢" },
{ "v": "22", "n": "丹麦克朗" },
{ "v": "23", "n": "菲律宾比索" },
{ "v": "24", "n": "瑞典克朗" },
{ "v": "25", "n": "澳门元" },
{ "v": "26", "n": "台币" },
{ "v": "28", "n": "马币" },
{ "v": "30", "n": "印度尼西亚 卢比" },
{ "v": "31", "n": "卢比(印度)" }
];
let moneyNameEnList = [
{ "v": "0", "n": "Others" },
{ "v": "27", "n": "Dollar (Brunei)" },
{ "v": "29", "n": "Rupee (Sri Lankan)" },
{ "v": "1", "n": "RMB (China)" },
{ "v": "2", "n": "Pound (UK)" },
{ "v": "3", "n": "Dollar (HK)" },
{ "v": "4", "n": "Dollar (USA)" },
{ "v": "5", "n": "Franc (Switzerland)" },
{ "v": "8", "n": "Dollar (Singapore)" },
{ "v": "12", "n": "Yen (Japan)" },
{ "v": "13", "n": "Dollar (Canada)" },
{ "v": "14", "n": "Dollar (Australia)" },
{ "v": "16", "n": "Euro" },
{ "v": "18", "n": "Dollar (New Zealand)" },
{ "v": "20", "n": "Krone (Norway)" },
{ "v": "21", "n": "Baht (Thailand)" },
{ "v": "22", "n": "Krone (Denmark)" },
{ "v": "23", "n": "Peso (Philippines)" },
{ "v": "24", "n": "Krone (Sweden)" },
{ "v": "25", "n": "Pataca (Macao)" },
{ "v": "26", "n": "TWD (Taiwan) " },
{ "v": "28", "n": "Ringgit (Malaysia)" },
{ "v": "30", "n": "Rupiah (Indonesia)" },
{ "v": "31", "n": "Rupee (Indian)" }
];
let moneyNameTcList = [
{ "v": "0", "n": "其他" },
{ "27": "汶萊幣" },
{ "29": "盧比(斯里蘭卡)" },
{ "1": "人民幣" },
{ "2": "英鎊" },
{ "3": "港幣" },
{ "4": "美元" },
{ "5": "瑞士法郎" },
{ "8": "新加坡元" },
{ "12": "日元" },
{ "13": "CAD" },
{ "14": "澳大利亞元" },
{ "16": "歐元" },
{ "18": "新西蘭元" },
{ "20": "挪威克朗" },
{ "21": "泰國銖" },
{ "22": "丹麥克朗" },
{ "23": "菲律賓比索" },
{ "24": "瑞典克朗" },
{ "25": "澳門元" },
{ "26": "台幣" },
{ "28": "馬幣" },
{ "30": "印尼盧比" },
{ "31": "盧比(印度)" }
];
/**
*
* @param {string} lan 语言
......@@ -883,3 +1061,126 @@ export function getNationsByCode(code) {
});
return n;
}
export function getInsuredPeriod(lan, t, v) {
let value = "";
switch (t) {
case "1":
value = lan == "zh" ? "保终身" : lan == "tc" ? "保終身" : "Cover whole life";
break;
case "2":
value = lan == "zh" ? "保" + v + "年" : lan == "tc" ? "保" + v + "年" : "Cover " + v + " year";
break;
case "3":
value = lan == "zh" ? "至" + v + "岁" : lan == "tc" ? "至" + v + "歲" : "Cover up to " + v + " age";
break;
case "4":
value = lan == "zh" ? "保" + v + "月" : lan == "tc" ? "保" + v + "月" : "Cover " + v + " month";
break;
default:
value = lan == "zh" ? "无关" : lan == "tc" ? "無關" : "NA";
break;
}
return value;
}
export function getBenefitType(lan, t) {
let value = "";
let candidates = lan == "zh" ? relationList : lan == "tc" ? relationTcList : relationEnList;
candidates.forEach(element => {
if (element.v == t) {
value = element.n;
}
});
// 默认返回其他
if (!value) {
t = "116";
candidates.forEach(element => {
if (element.v == t) {
value = element.n;
}
});
}
return value;
}
// 缴费方式
export function getPayMode(lan, t) {
let value = "";
let candidates = lan == "zh" ? payModeList : lan == "tc" ? payModeTcList : payModeEnList;
candidates.forEach(element => {
if (element.v == t) {
value = element.n;
}
});
// 默认返回其他
if (!value) {
t = "0";
candidates.forEach(element => {
if (element.v == t) {
value = element.n;
}
});
}
return value;
}
// 缴费频率,交n年
export function getPayPeriod(lan, t, v) {
let value = "";
switch (t) {
case "1":
value = lan == "zh" ? "趸交" : lan == "tc" ? "躉繳" : "Single";
break;
case "2":
value = lan == "zh" ? "缴" + v + "年" : lan == "tc" ? "繳" + v + "年" : "" + v + " year";
break;
case "3":
value = lan == "zh" ? "缴至" + v + "岁" : lan == "tc" ? "繳至" + v + "歲" : "Pay to" + v + " year old";
break;
default:
value = lan == "zh" ? "缴终身" : lan == "tc" ? "繳終身" : "Whole life";
break;
}
return value;
}
// 支付方式,
export function getPayType(lan, t) {
let value = "";
let candidates = lan == "zh" ? payTypeList : lan == "tc" ? payTypeTcList : payTypeEnList;
candidates.forEach(element => {
if (element.v == t) {
value = element.n;
}
});
// 默认返回其他
if (!value) {
t = "0";
candidates.forEach(element => {
if (element.v == t) {
value = element.n;
}
});
}
return value;
}
// 钱的名字
export function getMoneyName(lan, t) {
let value = "";
let candidates = lan == "zh" ? moneyNameList : lan == "tc" ? moneyNameTcList : moneyNameEnList;
candidates.forEach(element => {
if (element.v == t) {
value = element.n;
}
});
// 默认返回其他
if (!value) {
t = "0";
candidates.forEach(element => {
if (element.v == t) {
value = element.n;
}
});
}
return value;
}
\ No newline at end of file
......
......@@ -285,5 +285,5 @@ export function checkVerifyCode(verifyCode) {
}
export function checkName(name) {
return /^\D+$/.test(name);
return /^[\u4E00-\u9FA5_a-zA-Z\s\.]+$/.test(name);
}
......