1
Showing
11 changed files
with
374 additions
and
22 deletions
| ... | @@ -312,10 +312,10 @@ module.exports = { | ... | @@ -312,10 +312,10 @@ module.exports = { |
| 312 | cancel: "Skip", | 312 | cancel: "Skip", |
| 313 | candidates: { | 313 | candidates: { |
| 314 | sex: [{ | 314 | sex: [{ |
| 315 | name: "男", | 315 | name: "Male", |
| 316 | value: "M" | 316 | value: "M" |
| 317 | }, { | 317 | }, { |
| 318 | name: "女", | 318 | name: "Female", |
| 319 | value: "F" | 319 | value: "F" |
| 320 | }], | 320 | }], |
| 321 | idType: [{ | 321 | idType: [{ | ... | ... |
| ... | @@ -339,7 +339,7 @@ export default { | ... | @@ -339,7 +339,7 @@ export default { |
| 339 | } catch (e) { } | 339 | } catch (e) { } |
| 340 | this.$root.eventBus.$on("_evt_to_account_information", () => { | 340 | this.$root.eventBus.$on("_evt_to_account_information", () => { |
| 341 | this.$nextTick(() => { | 341 | this.$nextTick(() => { |
| 342 | console.log("ccccc:", document.getElementById("sc")); | 342 | // console.log("ccccc:", document.getElementById("sc")); |
| 343 | let sc = document.getElementById("sc"); | 343 | let sc = document.getElementById("sc"); |
| 344 | if (sc) { | 344 | if (sc) { |
| 345 | document.getElementById("sc").scrollIntoView(); | 345 | document.getElementById("sc").scrollIntoView(); | ... | ... |
| ... | @@ -22,11 +22,11 @@ | ... | @@ -22,11 +22,11 @@ |
| 22 | <div class="down-arrow"></div> | 22 | <div class="down-arrow"></div> |
| 23 | <el-select style="text-align: center;" class="clarms-select" v-model="data.insuredIndex" :placeholder="''"> | 23 | <el-select style="text-align: center;" class="clarms-select" v-model="data.insuredIndex" :placeholder="''"> |
| 24 | <template v-if="lan == 'en'"> | 24 | <template v-if="lan == 'en'"> |
| 25 | <el-option v-for="(item,index) in insuredList" :key="index" :label="item.insuredNameEn" :value="index + 1"> | 25 | <el-option v-for="(item,index) in insuredList" :key="index" :label="item.insuredNameEn?item.insuredNameEn:insuredNameCn" :value="index + 1"> |
| 26 | </el-option> | 26 | </el-option> |
| 27 | </template> | 27 | </template> |
| 28 | <template v-else> | 28 | <template v-else> |
| 29 | <el-option v-for="(item,index) in insuredList" :key="index" :label="item.insuredNameCn" :value="index + 1"> | 29 | <el-option v-for="(item,index) in insuredList" :key="index" :label="item.insuredNameCn?item.insuredNameCn:insuredNameEn" :value="index + 1"> |
| 30 | </el-option> | 30 | </el-option> |
| 31 | </template> | 31 | </template> |
| 32 | </el-select> | 32 | </el-select> | ... | ... |
| ... | @@ -16,7 +16,7 @@ export default { | ... | @@ -16,7 +16,7 @@ export default { |
| 16 | hadLoadPolicy: false, | 16 | hadLoadPolicy: false, |
| 17 | ignorePolicyCodes: [], | 17 | ignorePolicyCodes: [], |
| 18 | // 显示 | 18 | // 显示 |
| 19 | policyDetail: {} | 19 | policyDetail: null |
| 20 | } | 20 | } |
| 21 | }, | 21 | }, |
| 22 | components: {}, | 22 | components: {}, | ... | ... |
| ... | @@ -8,7 +8,7 @@ import { | ... | @@ -8,7 +8,7 @@ import { |
| 8 | import Auth from '@components/auth/auth.vue'; | 8 | import Auth from '@components/auth/auth.vue'; |
| 9 | import PolicyHeadList from "./policy-head-list.vue"; | 9 | import PolicyHeadList from "./policy-head-list.vue"; |
| 10 | 10 | ||
| 11 | import { formatMoney } from "@/utils/biz.js"; | 11 | import { formatMoney, getInsuredPeriod, getBenefitType, getPayPeriod, getPayType, getMoneyName, getPayMode } from "@/utils/biz.js"; |
| 12 | 12 | ||
| 13 | export default { | 13 | export default { |
| 14 | name: "InsuranceQuery", | 14 | name: "InsuranceQuery", |
| ... | @@ -88,6 +88,38 @@ export default { | ... | @@ -88,6 +88,38 @@ export default { |
| 88 | } | 88 | } |
| 89 | return formatMoney(s, t); | 89 | return formatMoney(s, t); |
| 90 | }, | 90 | }, |
| 91 | // 保障年限,保n年 | ||
| 92 | formatInsuredPeriod(t, v) { | ||
| 93 | return getInsuredPeriod(this.$i18n.locale, t, v); | ||
| 94 | }, | ||
| 95 | formatBenefitType(t) { | ||
| 96 | return getBenefitType(this.$i18n.locale, t); | ||
| 97 | }, | ||
| 98 | // 缴费方式,交n年 | ||
| 99 | formatPayPeriod(t, v) { | ||
| 100 | return getPayPeriod(this.$i18n.locale, t, v); | ||
| 101 | }, | ||
| 102 | // 支付方式,支票xxx | ||
| 103 | formatPayMode(v) { | ||
| 104 | return getPayMode(this.$i18n.locale, v); | ||
| 105 | }, | ||
| 106 | // 缴费频率 | ||
| 107 | formatPayType(v) { | ||
| 108 | return getPayType(this.$i18n.locale, v); | ||
| 109 | }, | ||
| 110 | // 钱的名字 | ||
| 111 | formatMoneyName(c) { | ||
| 112 | return getMoneyName(this.$i18n.locale, c); | ||
| 113 | }, | ||
| 114 | formatPanduPayPeriod(y, p) { | ||
| 115 | switch (this.$i18n.locale) { | ||
| 116 | case "zh": | ||
| 117 | case "tc": | ||
| 118 | return "第" + y + "年第" + p + "期"; | ||
| 119 | default: | ||
| 120 | return "Year " + y + " issue " + p; | ||
| 121 | } | ||
| 122 | }, | ||
| 91 | userLogout() { | 123 | userLogout() { |
| 92 | this.showForm = false; | 124 | this.showForm = false; |
| 93 | }, | 125 | }, |
| ... | @@ -99,6 +131,9 @@ export default { | ... | @@ -99,6 +131,9 @@ export default { |
| 99 | ...mapState({ | 131 | ...mapState({ |
| 100 | userInfo: state => state.userInfo | 132 | userInfo: state => state.userInfo |
| 101 | }), | 133 | }), |
| 134 | i18n() { | ||
| 135 | return this.$i18n.messages && this.$i18n.locale ? this.$i18n.messages[this.$i18n.locale] : {}; | ||
| 136 | }, | ||
| 102 | }, | 137 | }, |
| 103 | components: { | 138 | components: { |
| 104 | Auth, | 139 | Auth, | ... | ... |
| ... | @@ -33,7 +33,7 @@ | ... | @@ -33,7 +33,7 @@ |
| 33 | <div class="separator-v"></div> | 33 | <div class="separator-v"></div> |
| 34 | <div class="cell1"> | 34 | <div class="cell1"> |
| 35 | <div class="label">{{$t('customService.insuranceQuery.t2n4')}}</div> | 35 | <div class="label">{{$t('customService.insuranceQuery.t2n4')}}</div> |
| 36 | <div class="label">{{dataForm.insuredPeriod}}</div> | 36 | <div class="label">{{formatInsuredPeriod(dataForm.periodType,dataForm.periodValue)}}</div> |
| 37 | </div> | 37 | </div> |
| 38 | </div> | 38 | </div> |
| 39 | <div class="separator-h"></div> | 39 | <div class="separator-h"></div> |
| ... | @@ -143,7 +143,7 @@ | ... | @@ -143,7 +143,7 @@ |
| 143 | <div class="data-line"> | 143 | <div class="data-line"> |
| 144 | <div class="td w2">{{item.name}}</div> | 144 | <div class="td w2">{{item.name}}</div> |
| 145 | <div class="td w2">{{item.nameEn}}</div> | 145 | <div class="td w2">{{item.nameEn}}</div> |
| 146 | <div class="td w2">{{item.benefitType}}</div> | 146 | <div class="td w2">{{formatBenefitType(item.relationshipWithLA)}}</div> |
| 147 | <div class="td w2">{{item.benefitRate}}</div> | 147 | <div class="td w2">{{item.benefitRate}}</div> |
| 148 | </div> | 148 | </div> |
| 149 | <div class="separator-h" v-if="index < dataForm.benefitList.length - 1"></div> | 149 | <div class="separator-h" v-if="index < dataForm.benefitList.length - 1"></div> |
| ... | @@ -162,12 +162,12 @@ | ... | @@ -162,12 +162,12 @@ |
| 162 | <div class="data-line"> | 162 | <div class="data-line"> |
| 163 | <div class="cell1"> | 163 | <div class="cell1"> |
| 164 | <div class="label">{{$t('customService.insuranceQuery.t5PaymentPeriod')}}</div> | 164 | <div class="label">{{$t('customService.insuranceQuery.t5PaymentPeriod')}}</div> |
| 165 | <div class="label">{{dataForm.payPeriod}}</div> | 165 | <div class="label">{{formatPayPeriod(dataForm.payPeriodType,dataForm.payPeriodValue)}}</div> |
| 166 | </div> | 166 | </div> |
| 167 | <div class="separator-v"></div> | 167 | <div class="separator-v"></div> |
| 168 | <div class="cell1"> | 168 | <div class="cell1"> |
| 169 | <div class="label">{{$t('customService.insuranceQuery.t5PaymentMethod')}}</div> | 169 | <div class="label">{{$t('customService.insuranceQuery.t5PaymentMethod')}}</div> |
| 170 | <div class="label">{{dataForm.payType}}</div> | 170 | <div class="label">{{formatPayMode(dataForm.payMode)}}</div> |
| 171 | </div> | 171 | </div> |
| 172 | </div> | 172 | </div> |
| 173 | <div class="separator-h"></div> | 173 | <div class="separator-h"></div> |
| ... | @@ -175,7 +175,7 @@ | ... | @@ -175,7 +175,7 @@ |
| 175 | <div class="data-line"> | 175 | <div class="data-line"> |
| 176 | <div class="cell1"> | 176 | <div class="cell1"> |
| 177 | <div class="label">{{$t('customService.insuranceQuery.t5PaymentCurrency')}}</div> | 177 | <div class="label">{{$t('customService.insuranceQuery.t5PaymentCurrency')}}</div> |
| 178 | <div class="label">{{dataForm.moneyName}}</div> | 178 | <div class="label">{{formatMoneyName(dataForm.moneyId)}}</div> |
| 179 | </div> | 179 | </div> |
| 180 | <div class="separator-v"></div> | 180 | <div class="separator-v"></div> |
| 181 | <div class="cell1"> | 181 | <div class="cell1"> |
| ... | @@ -217,8 +217,9 @@ | ... | @@ -217,8 +217,9 @@ |
| 217 | <div class="separator-h"></div> | 217 | <div class="separator-h"></div> |
| 218 | <div v-for="(item,index) in dataForm.pandupList" :key="index"> | 218 | <div v-for="(item,index) in dataForm.pandupList" :key="index"> |
| 219 | <div class="data-line"> | 219 | <div class="data-line"> |
| 220 | <div class="td w2">{{item.paidPeriod}}</div> | 220 | <!-- <div class="td w2">{{item.paidPeriod}}</div> --> |
| 221 | <div class="td w2">{{item.payType}}</div> | 221 | <div class="td w2">{{formatPanduPayPeriod(item.policyYear,item.policyPeriod)}}</div> |
| 222 | <div class="td w2">{{formatPayType(item.payTypeValue)}}</div> | ||
| 222 | <div class="td w2">{{item.receiptDate?item.receiptDate.split(" ")[0]:""}}</div> | 223 | <div class="td w2">{{item.receiptDate?item.receiptDate.split(" ")[0]:""}}</div> |
| 223 | <div class="td w2">{{dataForm.moneyMark}} {{formatMoney(item.totalPremium)}}</div> | 224 | <div class="td w2">{{dataForm.moneyMark}} {{formatMoney(item.totalPremium)}}</div> |
| 224 | </div> | 225 | </div> | ... | ... |
| ... | @@ -116,10 +116,12 @@ export default { | ... | @@ -116,10 +116,12 @@ export default { |
| 116 | this.policy.clientBirthday = this.policy.clientBirthday ? this.policy.clientBirthday.split(" ")[0] : ""; | 116 | this.policy.clientBirthday = this.policy.clientBirthday ? this.policy.clientBirthday.split(" ")[0] : ""; |
| 117 | this.policy.insuredBirthday = this.policy.insuredBirthday ? this.policy.insuredBirthday.split(" ")[0] : ""; | 117 | this.policy.insuredBirthday = this.policy.insuredBirthday ? this.policy.insuredBirthday.split(" ")[0] : ""; |
| 118 | 118 | ||
| 119 | let clientName = res.clientNameCn ? res.clientNameCn : res.clientNameEn; | 119 | let clientNameCn = res.clientNameCn ? res.clientNameCn : res.clientNameEn; |
| 120 | let insuredName = res.insuredNameCn ? res.insuredNameCn : res.insuredNameEn; | 120 | let clientNameEn = res.clientNameEn ? res.clientNameEn : res.clientNameCn; |
| 121 | this.policy.clientName = clientName; | 121 | let insuredNameCn = res.insuredNameCn ? res.insuredNameCn : res.insuredNameEn; |
| 122 | this.policy.insuredName = insuredName; | 122 | let insuredNameEn = res.insuredNameEn ? res.insuredNameEn : res.insuredNameCn; |
| 123 | this.policy.clientName = this.locale == 'en' ? clientNameEn : clientNameCn; | ||
| 124 | this.policy.insuredName = this.locale == 'en' ? insuredNameEn : insuredNameCn; | ||
| 123 | // 证件类型、证件号要备份,用于比较 | 125 | // 证件类型、证件号要备份,用于比较 |
| 124 | this.policy.clientIdTypeBak = this.policy.clientIdType; | 126 | this.policy.clientIdTypeBak = this.policy.clientIdType; |
| 125 | this.policy.clientIdNumberBak = this.policy.clientIdNumber; | 127 | this.policy.clientIdNumberBak = this.policy.clientIdNumber; | ... | ... |
| ... | @@ -7,7 +7,7 @@ import { | ... | @@ -7,7 +7,7 @@ import { |
| 7 | import { | 7 | import { |
| 8 | mapState | 8 | mapState |
| 9 | } from 'vuex'; | 9 | } from 'vuex'; |
| 10 | import { formatMoney } from "@/utils/biz.js"; | 10 | import { formatMoney, getInsuredPeriod } from "@/utils/biz.js"; |
| 11 | 11 | ||
| 12 | export default { | 12 | export default { |
| 13 | props: { | 13 | props: { |
| ... | @@ -35,6 +35,12 @@ export default { | ... | @@ -35,6 +35,12 @@ export default { |
| 35 | ...mapState({ | 35 | ...mapState({ |
| 36 | policyList: state => state.policyList | 36 | policyList: state => state.policyList |
| 37 | }), | 37 | }), |
| 38 | lan() { | ||
| 39 | return this.$i18n.locale; | ||
| 40 | }, | ||
| 41 | i18n() { | ||
| 42 | return this.$i18n.messages && this.$i18n.locale ? this.$i18n.messages[this.$i18n.locale] : {}; | ||
| 43 | }, | ||
| 38 | }, | 44 | }, |
| 39 | methods: { | 45 | methods: { |
| 40 | toContactUs() { | 46 | toContactUs() { |
| ... | @@ -190,6 +196,10 @@ export default { | ... | @@ -190,6 +196,10 @@ export default { |
| 190 | } | 196 | } |
| 191 | return formatMoney(s, t); | 197 | return formatMoney(s, t); |
| 192 | }, | 198 | }, |
| 199 | // 保障年限,保n年 | ||
| 200 | formatInsuredPeriod(t, v) { | ||
| 201 | return getInsuredPeriod(this.$i18n.locale, t, v); | ||
| 202 | }, | ||
| 193 | downloadPolicy(policy) { | 203 | downloadPolicy(policy) { |
| 194 | if (policy) { | 204 | if (policy) { |
| 195 | httpPost({ url: api.getDownloadPath, sid: true, data: { policyCode: policy.policyCode } }).then(res => { | 205 | httpPost({ url: api.getDownloadPath, sid: true, data: { policyCode: policy.policyCode } }).then(res => { | ... | ... |
| ... | @@ -36,11 +36,14 @@ | ... | @@ -36,11 +36,14 @@ |
| 36 | </template> | 36 | </template> |
| 37 | </template> | 37 | </template> |
| 38 | </div> | 38 | </div> |
| 39 | <div class="td w2">{{item.insuredName}}</div> | 39 | |
| 40 | <div class="td w2">{{lan == 'en' ? (item.insuredNameEn ? item.insuredNameEn : item.insuredNameCn) : (item.insuredNameCn ? item.insuredNameCn : item.insuredNameEn)}}</div> | ||
| 40 | <div class="td w1">{{item.productName}}</div> | 41 | <div class="td w1">{{item.productName}}</div> |
| 41 | <div class="td w2">{{item.moneyCode}} {{formatMoney(item.amount,0)}}</div> | 42 | <div class="td w2">{{item.moneyCode}} {{formatMoney(item.amount,0)}}</div> |
| 42 | <div class="td w2">{{item.expireAt?item.expireAt.split(" ")[0]:""}}</div> | 43 | <div class="td w2">{{item.expireAt?item.expireAt.split(" ")[0]:""}}</div> |
| 43 | <div class="td w2">{{item.guaranteeAge?item.guaranteeAge.split(" ")[0]:""}}</div> | 44 | <!-- <div class="td w2">{{item.guaranteeAge?item.guaranteeAge.split(" ")[0]:""}}</div> --> |
| 45 | <div class="td w2">{{formatInsuredPeriod(item.insuredPeriodType,item.insuredPeriodValue)}}</div> | ||
| 46 | |||
| 44 | </div> | 47 | </div> |
| 45 | <div class="separator-h" v-if="index < myPolicyList.length - 1 && index < maxShow - 1"></div> | 48 | <div class="separator-h" v-if="index < myPolicyList.length - 1 && index < maxShow - 1"></div> |
| 46 | </template> | 49 | </template> | ... | ... |
| ... | @@ -784,6 +784,184 @@ let policyIdTypeEnList = [ | ... | @@ -784,6 +784,184 @@ let policyIdTypeEnList = [ |
| 784 | { "v": "52", "n": "Chinese birth certificate" }, | 784 | { "v": "52", "n": "Chinese birth certificate" }, |
| 785 | { "v": "9", "n": "Others" }, | 785 | { "v": "9", "n": "Others" }, |
| 786 | ]; | 786 | ]; |
| 787 | |||
| 788 | let relationList = [ | ||
| 789 | { "v": "22", "n": "本人" }, | ||
| 790 | { "v": "23", "n": "父母" }, | ||
| 791 | { "v": "86", "n": "祖父母" }, | ||
| 792 | { "v": "116", "n": "其他" }, | ||
| 793 | { "v": "151", "n": "夫妻" }, | ||
| 794 | { "v": "172", "n": "受益人的托管人" }, | ||
| 795 | { "v": "175", "n": "法定继承人" }, | ||
| 796 | { "v": "176", "n": "兄弟姐妹" }, | ||
| 797 | { "v": "178", "n": "未婚夫妻" }, | ||
| 798 | { "v": "25", "n": "子女" }, | ||
| 799 | { "v": "177", "n": "祖孙关系" } | ||
| 800 | ]; | ||
| 801 | let relationTcList = [ | ||
| 802 | { "v": "22", "n": "本人" }, | ||
| 803 | { "v": "23", "n": "父母" }, | ||
| 804 | { "v": "86", "n": "祖父母" }, | ||
| 805 | { "v": "116", "n": "其他" }, | ||
| 806 | { "v": "151", "n": "夫妻" }, | ||
| 807 | { "v": "172", "n": "受益人的託管人" }, | ||
| 808 | { "v": "175", "n": "法定繼承人" }, | ||
| 809 | { "v": "176", "n": "兄弟姐妹" }, | ||
| 810 | { "v": "178", "n": "未婚夫妻" }, | ||
| 811 | { "v": "25", "n": "子女" }, | ||
| 812 | { "v": "177", "n": "祖孫關係" } | ||
| 813 | ]; | ||
| 814 | let relationEnList = [ | ||
| 815 | { "v": "22", "n": "THE SAME PERSON" }, | ||
| 816 | { "v": "23", "n": "PARENTS" }, | ||
| 817 | { "v": "86", "n": "GRANDPARENT" }, | ||
| 818 | { "v": "116", "n": "OTHERS" }, | ||
| 819 | { "v": "151", "n": "SPOUSE" }, | ||
| 820 | { "v": "172", "n": "TRUSTEE-OF-BENEFICIARY" }, | ||
| 821 | { "v": "175", "n": "LEGAL BENEFICIARY" }, | ||
| 822 | { "v": "176", "n": "BROTHERS/SISTERS" }, | ||
| 823 | { "v": "178", "n": "FIANCE/FIANCEE" }, | ||
| 824 | { "v": "25", "n": "CHILDREN" }, | ||
| 825 | { "v": "177", "n": "GRANDCHILD" } | ||
| 826 | ]; | ||
| 827 | |||
| 828 | let payTypeList = [ | ||
| 829 | { "v": "0", "n": "无关" }, | ||
| 830 | { "v": "1", "n": "年缴" }, | ||
| 831 | { "v": "2", "n": "半年缴" }, | ||
| 832 | { "v": "3", "n": "季缴" }, | ||
| 833 | { "v": "4", "n": "月缴" }, | ||
| 834 | { "v": "5", "n": "趸缴" } | ||
| 835 | ] | ||
| 836 | |||
| 837 | let payTypeEnList = [ | ||
| 838 | { "v": "0", "n": "Not Relevant" }, | ||
| 839 | { "v": "1", "n": "Yearly" }, | ||
| 840 | { "v": "2", "n": "Half-Yearly" }, | ||
| 841 | { "v": "3", "n": "Quarterly" }, | ||
| 842 | { "v": "4", "n": "Monthly" }, | ||
| 843 | { "v": "5", "n": "Single" } | ||
| 844 | ] | ||
| 845 | |||
| 846 | let payTypeTcList = [ | ||
| 847 | { "v": "0", "n": "無關" }, | ||
| 848 | { "v": "1", "n": "年繳" }, | ||
| 849 | { "v": "2", "n": "半年繳" }, | ||
| 850 | { "v": "3", "n": "季繳" }, | ||
| 851 | { "v": "4", "n": "月繳" }, | ||
| 852 | { "v": "5", "n": "躉繳" } | ||
| 853 | ] | ||
| 854 | // 1-Cash现金,2-Cheque支票,84-EPS 易办事,93-银行本票Cashier’s Order,61-Bank Draft银行汇票,23-E-banking转账,30-Credit Card信用卡; | ||
| 855 | let payModeList = [ | ||
| 856 | { "v": "0", "n": "其他" }, | ||
| 857 | { "v": "1", "n": "现金" }, | ||
| 858 | { "v": "2", "n": "支票" }, | ||
| 859 | { "v": "84", "n": "易办事" }, | ||
| 860 | { "v": "93", "n": "银行本票" }, | ||
| 861 | { "v": "61", "n": "银行汇票" }, | ||
| 862 | { "v": "23", "n": "转账" }, | ||
| 863 | { "v": "30", "n": "信用卡" } | ||
| 864 | ]; | ||
| 865 | let payModeEnList = [ | ||
| 866 | { "v": "0", "n": "Others" }, | ||
| 867 | { "v": "1", "n": "Cash" }, | ||
| 868 | { "v": "2", "n": "Cheque" }, | ||
| 869 | { "v": "84", "n": "EPS" }, | ||
| 870 | { "v": "93", "n": "Cashier’s Order" }, | ||
| 871 | { "v": "61", "n": "Bank Draft" }, | ||
| 872 | { "v": "23", "n": "E-banking" }, | ||
| 873 | { "v": "30", "n": "Credit Card" } | ||
| 874 | ]; | ||
| 875 | let payModeTcList = [ | ||
| 876 | { "v": "0", "n": "其他" }, | ||
| 877 | { "v": "1", "n": "現金" }, | ||
| 878 | { "v": "2", "n": "支票" }, | ||
| 879 | { "v": "84", "n": "易辦事" }, | ||
| 880 | { "v": "93", "n": "銀行本票" }, | ||
| 881 | { "v": "61", "n": "銀行匯票" }, | ||
| 882 | { "v": "23", "n": "轉賬" }, | ||
| 883 | { "v": "30", "n": "信用卡" } | ||
| 884 | ]; | ||
| 885 | |||
| 886 | let moneyNameList = [ | ||
| 887 | { "v": "0", "n": "其他" }, | ||
| 888 | { "v": "27", "n": "文莱币" }, | ||
| 889 | { "v": "29", "n": "卢比(斯里兰卡)" }, | ||
| 890 | { "v": "1", "n": "人民币" }, | ||
| 891 | { "v": "2", "n": "英镑" }, | ||
| 892 | { "v": "3", "n": "港币" }, | ||
| 893 | { "v": "4", "n": "美元" }, | ||
| 894 | { "v": "5", "n": "瑞士法郎" }, | ||
| 895 | { "v": "8", "n": "新加坡元" }, | ||
| 896 | { "v": "12", "n": "日元" }, | ||
| 897 | { "v": "13", "n": "CAD" }, | ||
| 898 | { "v": "14", "n": "澳大利亚元" }, | ||
| 899 | { "v": "16", "n": "欧元" }, | ||
| 900 | { "v": "18", "n": "新西兰元" }, | ||
| 901 | { "v": "20", "n": "挪威克朗" }, | ||
| 902 | { "v": "21", "n": "泰国铢" }, | ||
| 903 | { "v": "22", "n": "丹麦克朗" }, | ||
| 904 | { "v": "23", "n": "菲律宾比索" }, | ||
| 905 | { "v": "24", "n": "瑞典克朗" }, | ||
| 906 | { "v": "25", "n": "澳门元" }, | ||
| 907 | { "v": "26", "n": "台币" }, | ||
| 908 | { "v": "28", "n": "马币" }, | ||
| 909 | { "v": "30", "n": "印度尼西亚 卢比" }, | ||
| 910 | { "v": "31", "n": "卢比(印度)" } | ||
| 911 | ]; | ||
| 912 | let moneyNameEnList = [ | ||
| 913 | { "v": "0", "n": "Others" }, | ||
| 914 | { "v": "27", "n": "Dollar (Brunei)" }, | ||
| 915 | { "v": "29", "n": "Rupee (Sri Lankan)" }, | ||
| 916 | { "v": "1", "n": "RMB (China)" }, | ||
| 917 | { "v": "2", "n": "Pound (UK)" }, | ||
| 918 | { "v": "3", "n": "Dollar (HK)" }, | ||
| 919 | { "v": "4", "n": "Dollar (USA)" }, | ||
| 920 | { "v": "5", "n": "Franc (Switzerland)" }, | ||
| 921 | { "v": "8", "n": "Dollar (Singapore)" }, | ||
| 922 | { "v": "12", "n": "Yen (Japan)" }, | ||
| 923 | { "v": "13", "n": "Dollar (Canada)" }, | ||
| 924 | { "v": "14", "n": "Dollar (Australia)" }, | ||
| 925 | { "v": "16", "n": "Euro" }, | ||
| 926 | { "v": "18", "n": "Dollar (New Zealand)" }, | ||
| 927 | { "v": "20", "n": "Krone (Norway)" }, | ||
| 928 | { "v": "21", "n": "Baht (Thailand)" }, | ||
| 929 | { "v": "22", "n": "Krone (Denmark)" }, | ||
| 930 | { "v": "23", "n": "Peso (Philippines)" }, | ||
| 931 | { "v": "24", "n": "Krone (Sweden)" }, | ||
| 932 | { "v": "25", "n": "Pataca (Macao)" }, | ||
| 933 | { "v": "26", "n": "TWD (Taiwan) " }, | ||
| 934 | { "v": "28", "n": "Ringgit (Malaysia)" }, | ||
| 935 | { "v": "30", "n": "Rupiah (Indonesia)" }, | ||
| 936 | { "v": "31", "n": "Rupee (Indian)" } | ||
| 937 | ]; | ||
| 938 | let moneyNameTcList = [ | ||
| 939 | { "v": "0", "n": "其他" }, | ||
| 940 | { "27": "汶萊幣" }, | ||
| 941 | { "29": "盧比(斯里蘭卡)" }, | ||
| 942 | { "1": "人民幣" }, | ||
| 943 | { "2": "英鎊" }, | ||
| 944 | { "3": "港幣" }, | ||
| 945 | { "4": "美元" }, | ||
| 946 | { "5": "瑞士法郎" }, | ||
| 947 | { "8": "新加坡元" }, | ||
| 948 | { "12": "日元" }, | ||
| 949 | { "13": "CAD" }, | ||
| 950 | { "14": "澳大利亞元" }, | ||
| 951 | { "16": "歐元" }, | ||
| 952 | { "18": "新西蘭元" }, | ||
| 953 | { "20": "挪威克朗" }, | ||
| 954 | { "21": "泰國銖" }, | ||
| 955 | { "22": "丹麥克朗" }, | ||
| 956 | { "23": "菲律賓比索" }, | ||
| 957 | { "24": "瑞典克朗" }, | ||
| 958 | { "25": "澳門元" }, | ||
| 959 | { "26": "台幣" }, | ||
| 960 | { "28": "馬幣" }, | ||
| 961 | { "30": "印尼盧比" }, | ||
| 962 | { "31": "盧比(印度)" } | ||
| 963 | ]; | ||
| 964 | |||
| 787 | /** | 965 | /** |
| 788 | * | 966 | * |
| 789 | * @param {string} lan 语言 | 967 | * @param {string} lan 语言 |
| ... | @@ -882,4 +1060,127 @@ export function getNationsByCode(code) { | ... | @@ -882,4 +1060,127 @@ export function getNationsByCode(code) { |
| 882 | } | 1060 | } |
| 883 | }); | 1061 | }); |
| 884 | return n; | 1062 | return n; |
| 1063 | } | ||
| 1064 | |||
| 1065 | export function getInsuredPeriod(lan, t, v) { | ||
| 1066 | let value = ""; | ||
| 1067 | switch (t) { | ||
| 1068 | case "1": | ||
| 1069 | value = lan == "zh" ? "保终身" : lan == "tc" ? "保終身" : "Cover whole life"; | ||
| 1070 | break; | ||
| 1071 | case "2": | ||
| 1072 | value = lan == "zh" ? "保" + v + "年" : lan == "tc" ? "保" + v + "年" : "Cover " + v + " year"; | ||
| 1073 | break; | ||
| 1074 | case "3": | ||
| 1075 | value = lan == "zh" ? "至" + v + "岁" : lan == "tc" ? "至" + v + "歲" : "Cover up to " + v + " age"; | ||
| 1076 | break; | ||
| 1077 | case "4": | ||
| 1078 | value = lan == "zh" ? "保" + v + "月" : lan == "tc" ? "保" + v + "月" : "Cover " + v + " month"; | ||
| 1079 | break; | ||
| 1080 | default: | ||
| 1081 | value = lan == "zh" ? "无关" : lan == "tc" ? "無關" : "NA"; | ||
| 1082 | break; | ||
| 1083 | } | ||
| 1084 | return value; | ||
| 1085 | } | ||
| 1086 | export function getBenefitType(lan, t) { | ||
| 1087 | let value = ""; | ||
| 1088 | let candidates = lan == "zh" ? relationList : lan == "tc" ? relationTcList : relationEnList; | ||
| 1089 | candidates.forEach(element => { | ||
| 1090 | if (element.v == t) { | ||
| 1091 | value = element.n; | ||
| 1092 | } | ||
| 1093 | }); | ||
| 1094 | // 默认返回其他 | ||
| 1095 | if (!value) { | ||
| 1096 | t = "116"; | ||
| 1097 | candidates.forEach(element => { | ||
| 1098 | if (element.v == t) { | ||
| 1099 | value = element.n; | ||
| 1100 | } | ||
| 1101 | }); | ||
| 1102 | } | ||
| 1103 | return value; | ||
| 1104 | } | ||
| 1105 | |||
| 1106 | // 缴费方式 | ||
| 1107 | export function getPayMode(lan, t) { | ||
| 1108 | let value = ""; | ||
| 1109 | let candidates = lan == "zh" ? payModeList : lan == "tc" ? payModeTcList : payModeEnList; | ||
| 1110 | candidates.forEach(element => { | ||
| 1111 | if (element.v == t) { | ||
| 1112 | value = element.n; | ||
| 1113 | } | ||
| 1114 | }); | ||
| 1115 | // 默认返回其他 | ||
| 1116 | if (!value) { | ||
| 1117 | t = "0"; | ||
| 1118 | candidates.forEach(element => { | ||
| 1119 | if (element.v == t) { | ||
| 1120 | value = element.n; | ||
| 1121 | } | ||
| 1122 | }); | ||
| 1123 | } | ||
| 1124 | return value; | ||
| 1125 | } | ||
| 1126 | |||
| 1127 | // 缴费频率,交n年 | ||
| 1128 | export function getPayPeriod(lan, t, v) { | ||
| 1129 | let value = ""; | ||
| 1130 | switch (t) { | ||
| 1131 | case "1": | ||
| 1132 | value = lan == "zh" ? "趸交" : lan == "tc" ? "躉繳" : "Single"; | ||
| 1133 | break; | ||
| 1134 | case "2": | ||
| 1135 | value = lan == "zh" ? "缴" + v + "年" : lan == "tc" ? "繳" + v + "年" : "" + v + " year"; | ||
| 1136 | break; | ||
| 1137 | case "3": | ||
| 1138 | value = lan == "zh" ? "缴至" + v + "岁" : lan == "tc" ? "繳至" + v + "歲" : "Pay to" + v + " year old"; | ||
| 1139 | break; | ||
| 1140 | default: | ||
| 1141 | value = lan == "zh" ? "缴终身" : lan == "tc" ? "繳終身" : "Whole life"; | ||
| 1142 | break; | ||
| 1143 | } | ||
| 1144 | return value; | ||
| 1145 | } | ||
| 1146 | |||
| 1147 | // 支付方式, | ||
| 1148 | export function getPayType(lan, t) { | ||
| 1149 | let value = ""; | ||
| 1150 | let candidates = lan == "zh" ? payTypeList : lan == "tc" ? payTypeTcList : payTypeEnList; | ||
| 1151 | candidates.forEach(element => { | ||
| 1152 | if (element.v == t) { | ||
| 1153 | value = element.n; | ||
| 1154 | } | ||
| 1155 | }); | ||
| 1156 | // 默认返回其他 | ||
| 1157 | if (!value) { | ||
| 1158 | t = "0"; | ||
| 1159 | candidates.forEach(element => { | ||
| 1160 | if (element.v == t) { | ||
| 1161 | value = element.n; | ||
| 1162 | } | ||
| 1163 | }); | ||
| 1164 | } | ||
| 1165 | return value; | ||
| 1166 | } | ||
| 1167 | // 钱的名字 | ||
| 1168 | export function getMoneyName(lan, t) { | ||
| 1169 | let value = ""; | ||
| 1170 | let candidates = lan == "zh" ? moneyNameList : lan == "tc" ? moneyNameTcList : moneyNameEnList; | ||
| 1171 | candidates.forEach(element => { | ||
| 1172 | if (element.v == t) { | ||
| 1173 | value = element.n; | ||
| 1174 | } | ||
| 1175 | }); | ||
| 1176 | // 默认返回其他 | ||
| 1177 | if (!value) { | ||
| 1178 | t = "0"; | ||
| 1179 | candidates.forEach(element => { | ||
| 1180 | if (element.v == t) { | ||
| 1181 | value = element.n; | ||
| 1182 | } | ||
| 1183 | }); | ||
| 1184 | } | ||
| 1185 | return value; | ||
| 885 | } | 1186 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -285,5 +285,5 @@ export function checkVerifyCode(verifyCode) { | ... | @@ -285,5 +285,5 @@ export function checkVerifyCode(verifyCode) { |
| 285 | } | 285 | } |
| 286 | 286 | ||
| 287 | export function checkName(name) { | 287 | export function checkName(name) { |
| 288 | return /^\D+$/.test(name); | 288 | return /^[\u4E00-\u9FA5_a-zA-Z\s\.]+$/.test(name); |
| 289 | } | 289 | } | ... | ... |
-
Please register or sign in to post a comment