4c6d8190 by qingxiao

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/api/api.js
#	src/pages/custom-service/components/policy-change-contact.js
2 parents 5a9b4f2a dfd6242d
......@@ -53,6 +53,11 @@ module.exports = {
policyDetail: "/pingan_hklife_webapi/policy/detail",
// 保单聯系方式變更
updatePolicyContanct: "/pingan_hklife_webapi/policy/updateContacts",
// 保单联系方式更改新版
policyContactApi: "/pingan_hklife_webapi/policy/updatePolicyContacts",
//保单联系方式查询
policyContactDetailApi: "/pingan_hklife_webapi/policy/policyContacts/detail",
// 保单客戶資料變更
updatePolicyInfo: "/pingan_hklife_webapi/policy/updateInfo",
updatePolicyInfoV2: "/pingan_hklife_webapi/policy/updatePolicyInfo",
......@@ -98,12 +103,9 @@ module.exports = {
// 刷新短信验证码
refreshSmgOtp: "/pingan_hklife_webapi/user/refreshSmgOtp",
// 保单联系方式更改
policyContactApi: "/pingan_hklife_webapi/policy/updatePolicyContacts",
// 上传excel
policyContactUploadExcelApi: "/pingan_hklife_webapi/policy/upload/excel",
//保单联系方式查询
policyContactDetailApi: "/pingan_hklife_webapi/policy/policyContacts/detail",
// 上传文件到iobs
uploadFileIobs: "/pingan_hklife_webapi/policy/upload/file/iobs"
//首页产品列表
indexManageListApi: "/pingan_hklife_webapi/cms/index/manage"
}
};
......
......@@ -73,7 +73,8 @@ let encryptPattern = [
let encryptWhileList = [
"/pingan_hklife_webapi/policy/idPicUpload",
"/pingan_hklife_webapi/policy/updateIdFileV2",
"/pingan_hklife_webapi/policy/clarmsUpload"
"/pingan_hklife_webapi/policy/clarmsUpload",
"/pingan_hklife_webapi/policy/upload/file/iobs",
]
// 请求拦截器
......
......@@ -708,10 +708,10 @@ module.exports = {
e2: "Please enter the collect address",
e3: "Please enter the collect E-mail",
e4: "请选择国际号码区号",
e5: "请选择国家(地区)",
e6: "请选择省",
e7: "请选择市",
e4: "Please select the collect nation(region)",
e5: "Please select the collect district",
e6: "Please select the collect province",
e7: "Please select the collect city",
},
form:{
InternationalArea:"International area",
......@@ -723,7 +723,13 @@ module.exports = {
Address:"Address",
Mail:"Please enter",
},
success: "Success",
tax:{
tt:"IRS website",
t1:"The country of your request for change of correspondence address / phone no. is the United States of America. To comply with the requirements of the US tax regulations, please complete the W8 / W9 form and submit it to us at the same time. The W8 / W9 form can be downloaded from the ",
t2:". For questions about US tax regulations, please contact your tax advisor",
},
success: "Successfully submitted",
uploadSuccess: "Uploaded successfully",
},
policyChangeInformation: {
title: "Change of Customer Information",
......
......@@ -718,10 +718,10 @@ module.exports = {
e2: "請填寫聯絡地址",
e3: "請填寫正確的電郵地址",
e4: "请选择国际号码区号",
e5: "请选择国家(地区)",
e6: "请选择省",
e7: "请选择市",
e4: "請選擇國際號碼區號",
e5: "請選擇國家(地區)",
e6: "請選擇省",
e7: "請選擇市",
},
form:{
InternationalArea:"國際號碼區號",
......@@ -733,7 +733,13 @@ module.exports = {
Address:"詳細地址",
Mail:"請輸入",
},
success: "更新成功"
tax:{
tt:"美國國稅局網站",
t1:"閣下遞交的更改聯繫地址/電話申请國家爲美國。爲符合美國稅務條例要求,請同時填妥W8/W9表格並遞交給我們,W8/W9表格可於",
t2:"下載。有關美國稅務條例疑問,請聯絡您的稅務顧問。",
},
success: "遞交申請成功",
uploadSuccess:"上傳成功"
},
policyChangeInformation: {
title: "客戶資料變更",
......
......@@ -733,7 +733,13 @@ module.exports = {
Address:"详细地址",
Mail:"请输入",
},
success: "更新成功"
tax:{
tt:"美国国税局网站",
t1:"阁下递交的更改联系地址/电话申请国家为美国。为符合美国税务条例要求,请同时填妥W8/W9表格并递交给我们,W8/W9表格可于",
t2:"下载。有关美国税务条例疑问,请联络您的税务顾问。",
},
success: "递交申请成功",
uploadSuccess:"上传成功"
},
policyChangeInformation: {
title: "客户资料变更",
......
......@@ -30,6 +30,7 @@ export default {
dataInit: false,
selectedPolicies: [],
data: {
policyContactCode: "",
// 国际号码区号列表
mobileAreaCode: "",
// 电话
......@@ -63,6 +64,7 @@ export default {
modalSimpleVisiable: false,
modalVisiable: false,
modalVisiableTimeoutIndex: 0, //定时隐藏索引
usTaxFormUploadCompVisible: false,
targetPath: "",
modalIcon: "succ",
......@@ -92,9 +94,22 @@ export default {
: {};
},
submitBtnDisabled() {
// let b1 = !this.selectedPolicies || this.selectedPolicies.length == 0;
// let b2 = !this.data.address && !this.data.email && !this.data.mobile;
let b1 = !this.selectedPolicies || this.selectedPolicies.length == 0;
let b2 = !this.data.address && !this.data.email && !this.data.mobile;
return b1 || b2;
let b2 =
!this.data.address ||
!this.data.email ||
!this.data.mobile ||
!this.data.mobileAreaCode ||
!this.data.countryId;
let b3 = false;
if (this.isChina) {
if (!this.data.provinceId || !this.data.cityId) {
b3 = true;
}
}
return b1 || b2 || b3;
},
isChina() {
let result = this.data.countryId == "28";
......@@ -102,6 +117,7 @@ export default {
},
isUSA() {
let result = this.data.countryId == "225";
// return true;
return result;
}
},
......@@ -113,11 +129,18 @@ export default {
this.modalVisiable = true;
},
modalCallback() {
clearTimeout(this.modalVisiableTimeoutIndex);
this.modalVisiable = false;
},
showSuccess() {
this.showModal(this.i18n.policyChangeContact.success);
},
showUploadSuccess() {
this.showModal(this.i18n.policyChangeContact.uploadSuccess);
this.modalVisiableTimeoutIndex = setTimeout(() => {
this.modalVisiable = false;
}, 3000);
},
// 提交前准备
updateContactsHandler() {
if (this.submitBtnDisabled) {
......@@ -140,7 +163,7 @@ export default {
let b5 = this.checkNations();
let b6 = this.checkProvince();
let b7 = this.checkCity();
let b = b1 & b2 & b3 & b4 & b5 & b6 & b7;
let b = b1 && b2 && b3 && b4 && b5 && b6 && b7;
if (b) {
// 判断是否美国 出
......@@ -163,29 +186,26 @@ export default {
this.selectedPolicies.forEach(element => {
policies.push({ policyId: element.id, policyCode: element.code });
});
// let data = {
// mobileNo: this.data.mobile,
// address: this.data.address,
// email: this.data.email,
// mobileNoAcceptMsg: this.checked1 ? 1 : 0,
// addressAcceptMsg: this.checked2 ? 1 : 0,
// emailAcceptMsg: this.checked3 ? 1 : 0,
// policies: policies
// };
let data = Object.assign(this.data, val);
data.policies = policies;
if (!this.isChina) {
data.provinceId = "";
data.cityId = "";
}
data.policyContactCode = "";
data.policyId = "";
data.policyCode = "";
this.loading = true;
httpPost({
url: api.updatePolicyContanct,
url: api.policyContactApi,
data: data,
sid: true
})
.then(() => {
this.loading = false;
this.usTaxFormUploadCompVisible = false;
this.showSuccess();
})
.catch(err => {
......@@ -199,8 +219,8 @@ export default {
/**
* 从美国税务表单组件提交
*/
onUsTaxSubmit(val){
this.doSubmit(val)
onUsTaxSubmit(val) {
this.doSubmit(val);
},
checkMobile() {
......@@ -262,11 +282,17 @@ export default {
return true;
},
/**
* 选择国家
*/
onChangeNations() {
// this.checkProvince();
},
/**
* 选择省份
*/
onChangeProvince() {
this.$set(this.data, "cityId", "");
this.cityList = getCityList(this.$i18n.locale, this.data.provinceId)
this.cityList = getCityList(this.$i18n.locale, this.data.provinceId);
this.data.cityId = this.cityList[0].v;
},
onAgreeHandler() {
......@@ -300,7 +326,6 @@ export default {
// 获取省份
this.provinceList = getCnProvinceList(this.$i18n.locale);
// console.log("this.provinceList:", this.provinceList);
if (this.dataInit) {
return;
......@@ -315,22 +340,21 @@ export default {
policyCode: this.selectedPolicies[0].code
};
httpPost({
url: api.policyDetail,
url: api.policyContactDetailApi,
data: param,
sid: true
})
.then(response => {
// this.data = {};
console.log("response:", response);
if (response) {
this.loading = false;
this.dataInit = true;
this.data.mobile = response.clientMobileNo;
this.checked1 = "1" == response.clientMobileAcceptMessage;
this.data.address = response.clientContactAddress;
this.checked2 = "1" == response.clientAddressAcceptMessage;
this.data.email = response.clientEmail;
this.checked3 = "1" == response.clientEmailAcceptMessage;
if (response) {
this.data = Object.assign(this.data, response);
if (response.provinceId) {
this.cityList = getCityList(
this.$i18n.locale,
this.data.provinceId
);
}
}
})
.catch(res => {
......@@ -358,19 +382,6 @@ export default {
}
},
uploadExcel() {},
queryPolicyContact() {
let param = { policyId: "4655100", policyCode: "P000200000000009" };
httpPost({
url: api.policyContactDetailApi,
data: param,
sid: true
})
.then(response => {
console.log("response:", response);
})
.catch(res => {});
},
uploadExcel() {},
// aaa(){
// httpPost({
// url: api.indexManageListApi,
......@@ -413,6 +424,7 @@ export default {
created() {
//this.aaa()
// this.loading = true;
// this.queryPolicyContact();
this.$root.eventBus.$on("langChange", () => {
try {
this.initData();
......
......@@ -5,7 +5,7 @@
<input type="password" style="display: none;" />
<auth @onLogin="userLogin" @onLogout="userLogout" :checkProfile="true" ref="auth" :tipModel="'m2'"></auth>
<modal-comp :visible="modalVisiable" :show-confirm="false" :icon="modalIcon" :content="modalContent" :confirm="modalCallback" :overlay="modalCallback"></modal-comp>
<us-tax-form-upload-comp :visible="usTaxFormUploadCompVisible" @close="usTaxFormUploadCompVisible = false" @submit="onUsTaxSubmit" ></us-tax-form-upload-comp>
<us-tax-form-upload-comp :visible="usTaxFormUploadCompVisible" @close="usTaxFormUploadCompVisible = false" @submit="onUsTaxSubmit" @uploadsuccess="showUploadSuccess"></us-tax-form-upload-comp>
<template v-if="showForm">
<policy-head-list :multiSelectable="true" @onSelect="handlePolicySelect"></policy-head-list>
......@@ -25,7 +25,7 @@
<div class="ipt-wrap-linear">
<div class="down-arrow"></div>
<div class="cont">
<el-select class="ipt" v-model="data.mobileAreaCode" :placeholder="$t('policyChangeContact.form.InternationalArea')" @change="checkNationsPhoneCode">
<el-select class="ipt sel" v-model="data.mobileAreaCode" :placeholder="$t('policyChangeContact.form.InternationalArea')" @change="checkNationsPhoneCode">
<el-option v-for="(item, index) in nationsPhoneCodeList" :key="index" :label="item.n" :value="item.n"></el-option>
</el-select>
</div>
......@@ -59,7 +59,7 @@
<div class="ipt-wrap-linear">
<div class="down-arrow"></div>
<div class="cont">
<el-select class="ipt" v-model="data.countryId" :placeholder="$t('policyChangeContact.form.Nation')" @change="checkNations">
<el-select class="ipt sel" v-model="data.countryId" :placeholder="$t('policyChangeContact.form.Nation')" @change="onChangeNations">
<el-option v-for="(item, index) in nationsList" :key="index" :label="item.n" :value="item.v"></el-option>
</el-select>
</div>
......@@ -75,7 +75,7 @@
<div class="ipt-wrap-linear">
<div class="down-arrow"></div>
<div class="cont">
<el-select class="ipt" v-model="data.provinceId" :placeholder="$t('policyChangeContact.form.Province')" @change="onChangeProvince">
<el-select class="ipt sel" v-model="data.provinceId" :placeholder="$t('policyChangeContact.form.Province')" @change="onChangeProvince">
<el-option v-for="(item, index) in provinceList" :key="index" :label="item.n" :value="item.v"></el-option>
</el-select>
</div>
......@@ -90,7 +90,7 @@
<div class="ipt-wrap-linear">
<div class="down-arrow"></div>
<div class="cont">
<el-select class="ipt" v-model="data.cityId" :placeholder="$t('policyChangeContact.form.City')" @change="checkCity">
<el-select class="ipt sel" v-model="data.cityId" :placeholder="$t('policyChangeContact.form.City')" @change="checkCity">
<el-option v-for="(item, index) in cityList" :key="index" :label="item.n" :value="item.v"></el-option>
</el-select>
</div>
......
......@@ -169,7 +169,7 @@ export default {
item.activity = false;
delete this.selectPolicyCodes[code];
}
// this.$set(this, 'myPolicyList', this.myPolicyList);
this.$set(this.myPolicyList, index, item);
let data = [];
for (let key in this.selectPolicyCodes) {
data.push(this.selectPolicyCodes[key]);
......
......@@ -115,6 +115,7 @@
overflow: auto;
.data-line {
// padding: 0 32px;
// background-color: wheat;
height: 58px;
margin: auto;
display: flex;
......
/**
* 组件描述:上传美国税务表格
*/
import api from "@/api/api";
import {
formdata
} from '@/api/fetch-api.js'
import { Loading } from 'vant';
export default {
props: {
......@@ -14,7 +19,9 @@ export default {
},
data() {
return {
iobsKey: "asdfs"
fileName: "",
iobsKey: "",
loading: false
};
},
components: {},
......@@ -35,9 +42,33 @@ export default {
},
onUploadHandler() {},
onSubmitHandler() {
if(!this.iobsKey) return;
this.$emit("submit", {
iobsKey: this.iobsKey
});
},
selectImgs() {
let _this = this;
this.iobsKey = "";
let file = this.$refs.file.files[0];
let item = {
name: file.name,
size: file.size,
file: file
};
// 转base64
this.loading = true;
let myFormData = new FormData();
myFormData.append("file", file);
formdata({ url: api.uploadFileIobs, myFormData: myFormData, sid: true })
.then(res => {
this.loading = false;
this.iobsKey = res;
this.$emit("uploadsuccess");
})
.catch(err => {
this.loading = false;
});
}
},
mounted() {},
......
......@@ -50,7 +50,7 @@
}
.message {
font-size: $fontSize-M2;
font-size: 0;
margin-left: 48px;
font-weight: bold;
color: $cOrange2;
......@@ -61,6 +61,10 @@
text-align-last: left;
span {
font-size: $fontSize-M2;
}
.link{
cursor: pointer;
text-decoration: underline;
}
......@@ -87,6 +91,7 @@
display: flex;
justify-content: center;
.btn {
position: relative;
@include btc4(144px, 42px, 16px);
margin: 20px 24px 0;
@extend .pointer;
......@@ -113,6 +118,16 @@
}
}
input[type="file"] {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: 0;
cursor: pointer;
}
@media (max-width: 1150px) {
.close {
right: -15px;
......
......@@ -10,15 +10,19 @@
<img src="@/assets/images/clarms/info.png">
</div>
<div class="message" :class="{'lsp':locale != 'en'}">
阁下更改联系地址/电话国家为美国。为符合美国税务条例要求,请同时填妥W8/W9表格并递交给我们,W8/W9表格可于<span @click="toDownLoadTaxForm">美国国税局网站</span>下载。有关美国税务条例疑问,请联络您的税务顾问。
<span>{{$t('policyChangeContact.tax.t1')}}</span>
<span class="link" @click="toDownLoadTaxForm">{{$t('policyChangeContact.tax.tt')}}</span>
<span>{{$t('policyChangeContact.tax.t2')}}</span>
</div>
</div>
<div class="modal-form">
us-tax.excel
<!-- {{fileName}} -->
</div>
<div class="modal-btn-wrap">
<div @click="onUploadHandler" class="btn">上载表格</div>
<div class="btn">
<input type="file" @change="selectImgs" ref="file">
<van-loading v-if="loading" />上载表格</div>
<div @click="onSubmitHandler" class="btn" :class="{'disable':iobsKey ==''}">提交</div>
</div>
......
......@@ -129,6 +129,12 @@
letter-spacing: 1.1px;
}
}
.sel{
padding: 0 48px 0 24px;
// @include ellipsis;
}
::-webkit-input-placeholder {
color: rgba(102, 102, 102, 0.5);
}
......
......@@ -3890,21 +3890,25 @@ export function getCnProvinceList(lan) {
switch (lan) {
case "zh":
data.n = element.ZH_NAME;
break;
case "en":
data.n = element.EN_NAME;
break;
default:
data.n = element.TC_NAME;
break;
}
result.push(data)
result.push(data);
});
return result;
}
// 获取根据省ID中国大陆城市
export function getCityList(lan,PROVINCE_ID) {
export function getCityList(lan, PROVINCE_ID) {
let result = [];
console.log("lan:", lan);
cnCityList.forEach(element => {
if(element.PROVINCE_ID == PROVINCE_ID){
if (element.PROVINCE_ID == PROVINCE_ID) {
let data = {
v: element.CITY_ID,
n: ""
......@@ -3912,12 +3916,15 @@ export function getCityList(lan,PROVINCE_ID) {
switch (lan) {
case "zh":
data.n = element.ZH_NAME;
break;
case "en":
data.n = element.EN_NAME;
break;
default:
data.n = element.TC_NAME;
break;
}
result.push(data)
result.push(data);
}
});
return result;
......