联络方式变更
Showing
8 changed files
with
117 additions
and
81 deletions
| ... | @@ -53,6 +53,11 @@ module.exports = { | ... | @@ -53,6 +53,11 @@ module.exports = { |
| 53 | policyDetail: "/pingan_hklife_webapi/policy/detail", | 53 | policyDetail: "/pingan_hklife_webapi/policy/detail", |
| 54 | // 保单聯系方式變更 | 54 | // 保单聯系方式變更 |
| 55 | updatePolicyContanct: "/pingan_hklife_webapi/policy/updateContacts", | 55 | updatePolicyContanct: "/pingan_hklife_webapi/policy/updateContacts", |
| 56 | // 保单联系方式更改新版 | ||
| 57 | policyContactApi: "/pingan_hklife_webapi/policy/updatePolicyContacts", | ||
| 58 | //保单联系方式查询 | ||
| 59 | policyContactDetailApi: "/pingan_hklife_webapi/policy/policyContacts/detail", | ||
| 60 | |||
| 56 | // 保单客戶資料變更 | 61 | // 保单客戶資料變更 |
| 57 | updatePolicyInfo: "/pingan_hklife_webapi/policy/updateInfo", | 62 | updatePolicyInfo: "/pingan_hklife_webapi/policy/updateInfo", |
| 58 | updatePolicyInfoV2: "/pingan_hklife_webapi/policy/updatePolicyInfo", | 63 | updatePolicyInfoV2: "/pingan_hklife_webapi/policy/updatePolicyInfo", |
| ... | @@ -80,7 +85,6 @@ module.exports = { | ... | @@ -80,7 +85,6 @@ module.exports = { |
| 80 | // 用户电子函列表 | 85 | // 用户电子函列表 |
| 81 | letterRecordList: "/pingan_hklife_webapi/policy/letterRecordList", | 86 | letterRecordList: "/pingan_hklife_webapi/policy/letterRecordList", |
| 82 | 87 | ||
| 83 | |||
| 84 | // cms相关 | 88 | // cms相关 |
| 85 | indexVideo: "/pingan_hklife_webapi/cms/indexVideo", | 89 | indexVideo: "/pingan_hklife_webapi/cms/indexVideo", |
| 86 | banner: "/pingan_hklife_webapi/cms/banner/list", | 90 | banner: "/pingan_hklife_webapi/cms/banner/list", |
| ... | @@ -98,10 +102,6 @@ module.exports = { | ... | @@ -98,10 +102,6 @@ module.exports = { |
| 98 | // 刷新短信验证码 | 102 | // 刷新短信验证码 |
| 99 | refreshSmgOtp: "/pingan_hklife_webapi/user/refreshSmgOtp", | 103 | refreshSmgOtp: "/pingan_hklife_webapi/user/refreshSmgOtp", |
| 100 | 104 | ||
| 101 | // 保单联系方式更改 | 105 | // 上传文件到iobs |
| 102 | policyContactApi:"/pingan_hklife_webapi/policy/updatePolicyContacts", | 106 | uploadFileIobs: "/pingan_hklife_webapi/policy/upload/file/iobs" |
| 103 | // 上传excel | 107 | }; |
| 104 | policyContactUploadExcelApi:"/pingan_hklife_webapi/policy/upload/excel", | ||
| 105 | //保单联系方式查询 | ||
| 106 | policyContactDetailApi:"/pingan_hklife_webapi/policy/policyContacts/detail" | ||
| 107 | } | ... | ... |
| ... | @@ -73,7 +73,8 @@ let encryptPattern = [ | ... | @@ -73,7 +73,8 @@ let encryptPattern = [ |
| 73 | let encryptWhileList = [ | 73 | let encryptWhileList = [ |
| 74 | "/pingan_hklife_webapi/policy/idPicUpload", | 74 | "/pingan_hklife_webapi/policy/idPicUpload", |
| 75 | "/pingan_hklife_webapi/policy/updateIdFileV2", | 75 | "/pingan_hklife_webapi/policy/updateIdFileV2", |
| 76 | "/pingan_hklife_webapi/policy/clarmsUpload" | 76 | "/pingan_hklife_webapi/policy/clarmsUpload", |
| 77 | "/pingan_hklife_webapi/policy/upload/file/iobs", | ||
| 77 | ] | 78 | ] |
| 78 | 79 | ||
| 79 | // 请求拦截器 | 80 | // 请求拦截器 | ... | ... |
| ... | @@ -30,6 +30,7 @@ export default { | ... | @@ -30,6 +30,7 @@ export default { |
| 30 | dataInit: false, | 30 | dataInit: false, |
| 31 | selectedPolicies: [], | 31 | selectedPolicies: [], |
| 32 | data: { | 32 | data: { |
| 33 | policyContactCode: "", | ||
| 33 | // 国际号码区号列表 | 34 | // 国际号码区号列表 |
| 34 | mobileAreaCode: "", | 35 | mobileAreaCode: "", |
| 35 | // 电话 | 36 | // 电话 |
| ... | @@ -92,9 +93,22 @@ export default { | ... | @@ -92,9 +93,22 @@ export default { |
| 92 | : {}; | 93 | : {}; |
| 93 | }, | 94 | }, |
| 94 | submitBtnDisabled() { | 95 | submitBtnDisabled() { |
| 96 | // let b1 = !this.selectedPolicies || this.selectedPolicies.length == 0; | ||
| 97 | // let b2 = !this.data.address && !this.data.email && !this.data.mobile; | ||
| 95 | let b1 = !this.selectedPolicies || this.selectedPolicies.length == 0; | 98 | let b1 = !this.selectedPolicies || this.selectedPolicies.length == 0; |
| 96 | let b2 = !this.data.address && !this.data.email && !this.data.mobile; | 99 | let b2 = |
| 97 | return b1 || b2; | 100 | !this.data.address || |
| 101 | !this.data.email || | ||
| 102 | !this.data.mobile || | ||
| 103 | !this.data.mobileAreaCode || | ||
| 104 | !this.data.countryId; | ||
| 105 | let b3 = false; | ||
| 106 | if (this.isChina) { | ||
| 107 | if (!this.data.provinceId || !this.data.cityId) { | ||
| 108 | b3 = true; | ||
| 109 | } | ||
| 110 | } | ||
| 111 | return b1 || b2 || b3; | ||
| 98 | }, | 112 | }, |
| 99 | isChina() { | 113 | isChina() { |
| 100 | let result = this.data.countryId == "28"; | 114 | let result = this.data.countryId == "28"; |
| ... | @@ -102,6 +116,7 @@ export default { | ... | @@ -102,6 +116,7 @@ export default { |
| 102 | }, | 116 | }, |
| 103 | isUSA() { | 117 | isUSA() { |
| 104 | let result = this.data.countryId == "225"; | 118 | let result = this.data.countryId == "225"; |
| 119 | // return true; | ||
| 105 | return result; | 120 | return result; |
| 106 | } | 121 | } |
| 107 | }, | 122 | }, |
| ... | @@ -140,7 +155,7 @@ export default { | ... | @@ -140,7 +155,7 @@ export default { |
| 140 | let b5 = this.checkNations(); | 155 | let b5 = this.checkNations(); |
| 141 | let b6 = this.checkProvince(); | 156 | let b6 = this.checkProvince(); |
| 142 | let b7 = this.checkCity(); | 157 | let b7 = this.checkCity(); |
| 143 | let b = b1 & b2 & b3 & b4 & b5 & b6 & b7; | 158 | let b = b1 && b2 && b3 && b4 && b5 && b6 && b7; |
| 144 | 159 | ||
| 145 | if (b) { | 160 | if (b) { |
| 146 | // 判断是否美国 出 | 161 | // 判断是否美国 出 |
| ... | @@ -163,24 +178,20 @@ export default { | ... | @@ -163,24 +178,20 @@ export default { |
| 163 | this.selectedPolicies.forEach(element => { | 178 | this.selectedPolicies.forEach(element => { |
| 164 | policies.push({ policyId: element.id, policyCode: element.code }); | 179 | policies.push({ policyId: element.id, policyCode: element.code }); |
| 165 | }); | 180 | }); |
| 166 | // let data = { | 181 | |
| 167 | // mobileNo: this.data.mobile, | ||
| 168 | // address: this.data.address, | ||
| 169 | // email: this.data.email, | ||
| 170 | // mobileNoAcceptMsg: this.checked1 ? 1 : 0, | ||
| 171 | // addressAcceptMsg: this.checked2 ? 1 : 0, | ||
| 172 | // emailAcceptMsg: this.checked3 ? 1 : 0, | ||
| 173 | // policies: policies | ||
| 174 | // }; | ||
| 175 | let data = Object.assign(this.data, val); | 182 | let data = Object.assign(this.data, val); |
| 176 | data.policies = policies; | 183 | data.policies = policies; |
| 177 | if (!this.isChina) { | 184 | if (!this.isChina) { |
| 178 | data.provinceId = ""; | 185 | data.provinceId = ""; |
| 179 | data.cityId = ""; | 186 | data.cityId = ""; |
| 180 | } | 187 | } |
| 188 | data.policyContactCode = ""; | ||
| 189 | data.policyId = ""; | ||
| 190 | data.policyCode = ""; | ||
| 191 | |||
| 181 | this.loading = true; | 192 | this.loading = true; |
| 182 | httpPost({ | 193 | httpPost({ |
| 183 | url: api.updatePolicyContanct, | 194 | url: api.policyContactApi, |
| 184 | data: data, | 195 | data: data, |
| 185 | sid: true | 196 | sid: true |
| 186 | }) | 197 | }) |
| ... | @@ -199,8 +210,8 @@ export default { | ... | @@ -199,8 +210,8 @@ export default { |
| 199 | /** | 210 | /** |
| 200 | * 从美国税务表单组件提交 | 211 | * 从美国税务表单组件提交 |
| 201 | */ | 212 | */ |
| 202 | onUsTaxSubmit(val){ | 213 | onUsTaxSubmit(val) { |
| 203 | this.doSubmit(val) | 214 | this.doSubmit(val); |
| 204 | }, | 215 | }, |
| 205 | 216 | ||
| 206 | checkMobile() { | 217 | checkMobile() { |
| ... | @@ -262,11 +273,17 @@ export default { | ... | @@ -262,11 +273,17 @@ export default { |
| 262 | return true; | 273 | return true; |
| 263 | }, | 274 | }, |
| 264 | /** | 275 | /** |
| 276 | * 选择国家 | ||
| 277 | */ | ||
| 278 | onChangeNations() { | ||
| 279 | // this.checkProvince(); | ||
| 280 | }, | ||
| 281 | /** | ||
| 265 | * 选择省份 | 282 | * 选择省份 |
| 266 | */ | 283 | */ |
| 267 | onChangeProvince() { | 284 | onChangeProvince() { |
| 268 | this.$set(this.data, "cityId", ""); | 285 | this.$set(this.data, "cityId", ""); |
| 269 | this.cityList = getCityList(this.$i18n.locale, this.data.provinceId) | 286 | this.cityList = getCityList(this.$i18n.locale, this.data.provinceId); |
| 270 | this.data.cityId = this.cityList[0].v; | 287 | this.data.cityId = this.cityList[0].v; |
| 271 | }, | 288 | }, |
| 272 | onAgreeHandler() { | 289 | onAgreeHandler() { |
| ... | @@ -315,23 +332,34 @@ export default { | ... | @@ -315,23 +332,34 @@ export default { |
| 315 | policyCode: this.selectedPolicies[0].code | 332 | policyCode: this.selectedPolicies[0].code |
| 316 | }; | 333 | }; |
| 317 | httpPost({ | 334 | httpPost({ |
| 318 | url: api.policyDetail, | 335 | url: api.policyContactDetailApi, |
| 319 | data: param, | 336 | data: param, |
| 320 | sid: true | 337 | sid: true |
| 321 | }) | 338 | }) |
| 322 | .then(response => { | 339 | .then(response => { |
| 323 | // this.data = {}; | 340 | // this.data = {}; |
| 324 | console.log("response:", response); | 341 | // console.log("response:", response); |
| 342 | this.loading = false; | ||
| 343 | this.dataInit = true; | ||
| 325 | if (response) { | 344 | if (response) { |
| 326 | this.loading = false; | 345 | this.data = Object.assign(this.data, response); |
| 327 | this.dataInit = true; | 346 | if (response.provinceId) { |
| 328 | this.data.mobile = response.clientMobileNo; | 347 | this.cityList = getCityList( |
| 329 | this.checked1 = "1" == response.clientMobileAcceptMessage; | 348 | this.$i18n.locale, |
| 330 | this.data.address = response.clientContactAddress; | 349 | this.data.provinceId |
| 331 | this.checked2 = "1" == response.clientAddressAcceptMessage; | 350 | ); |
| 332 | this.data.email = response.clientEmail; | 351 | } |
| 333 | this.checked3 = "1" == response.clientEmailAcceptMessage; | ||
| 334 | } | 352 | } |
| 353 | // if (response) { | ||
| 354 | // this.loading = false; | ||
| 355 | // this.dataInit = true; | ||
| 356 | // this.data.mobile = response.clientMobileNo; | ||
| 357 | // this.checked1 = "1" == response.clientMobileAcceptMessage; | ||
| 358 | // this.data.address = response.clientContactAddress; | ||
| 359 | // this.checked2 = "1" == response.clientAddressAcceptMessage; | ||
| 360 | // this.data.email = response.clientEmail; | ||
| 361 | // this.checked3 = "1" == response.clientEmailAcceptMessage; | ||
| 362 | // } | ||
| 335 | }) | 363 | }) |
| 336 | .catch(res => { | 364 | .catch(res => { |
| 337 | if (res.code == "404") { | 365 | if (res.code == "404") { |
| ... | @@ -340,6 +368,7 @@ export default { | ... | @@ -340,6 +368,7 @@ export default { |
| 340 | }); | 368 | }); |
| 341 | }, | 369 | }, |
| 342 | handlePolicySelect(data) { | 370 | handlePolicySelect(data) { |
| 371 | console.log("handlePolicySelect:",data); | ||
| 343 | this.selectedPolicies = data; | 372 | this.selectedPolicies = data; |
| 344 | this.initData(); | 373 | this.initData(); |
| 345 | }, | 374 | }, |
| ... | @@ -358,19 +387,7 @@ export default { | ... | @@ -358,19 +387,7 @@ export default { |
| 358 | } | 387 | } |
| 359 | }, | 388 | }, |
| 360 | uploadExcel() {}, | 389 | uploadExcel() {}, |
| 361 | queryPolicyContact() { | 390 | uploadExcel() {} |
| 362 | let param = { policyId: "4655100", policyCode: "P000200000000009" }; | ||
| 363 | httpPost({ | ||
| 364 | url: api.policyContactDetailApi, | ||
| 365 | data: param, | ||
| 366 | sid: true | ||
| 367 | }) | ||
| 368 | .then(response => { | ||
| 369 | console.log("response:", response); | ||
| 370 | }) | ||
| 371 | .catch(res => {}); | ||
| 372 | }, | ||
| 373 | uploadExcel() {}, | ||
| 374 | }, | 391 | }, |
| 375 | watch: { | 392 | watch: { |
| 376 | "data.mobile": function() { | 393 | "data.mobile": function() { |
| ... | @@ -400,6 +417,7 @@ export default { | ... | @@ -400,6 +417,7 @@ export default { |
| 400 | }, | 417 | }, |
| 401 | created() { | 418 | created() { |
| 402 | // this.loading = true; | 419 | // this.loading = true; |
| 420 | // this.queryPolicyContact(); | ||
| 403 | this.$root.eventBus.$on("langChange", () => { | 421 | this.$root.eventBus.$on("langChange", () => { |
| 404 | try { | 422 | try { |
| 405 | this.initData(); | 423 | this.initData(); |
| ... | @@ -407,32 +425,3 @@ export default { | ... | @@ -407,32 +425,3 @@ export default { |
| 407 | }); | 425 | }); |
| 408 | } | 426 | } |
| 409 | }; | 427 | }; |
| 410 | |||
| 411 | // var ttt = { | ||
| 412 | // areaCode:"", | ||
| 413 | // mobileNo: "1232321", | ||
| 414 | // address: "CHINA, GuangdongShenzhen咯农户心情来来来", | ||
| 415 | // email: "zhangwenjun110@ocft.com", | ||
| 416 | // mobileNoAcceptMsg: 0, | ||
| 417 | // addressAcceptMsg: 0, | ||
| 418 | // emailAcceptMsg: 0, | ||
| 419 | // policies: [{ policyId: "4661690", policyCode: "P000200000000458" }] | ||
| 420 | // }; | ||
| 421 | |||
| 422 | // var tttt2 = { | ||
| 423 | // policyContactCode: "", | ||
| 424 | // policyId: "4655100", | ||
| 425 | // policyCode: "P000200000000009", | ||
| 426 | |||
| 427 | // mobileAreaCode: "0668", | ||
| 428 | // mobile: "13727826666", | ||
| 429 | // countryId: "156", | ||
| 430 | // provinceId: "1", | ||
| 431 | // cityId: "304", | ||
| 432 | // address: "上海迪士尼乐园", | ||
| 433 | // acceptMessage: 1, | ||
| 434 | // iobsKey: "a", | ||
| 435 | // fileFormat: "xlsx", | ||
| 436 | // fileSize: 123, | ||
| 437 | // fileContentType: "mp4" | ||
| 438 | // }; | ... | ... |
| ... | @@ -59,7 +59,7 @@ | ... | @@ -59,7 +59,7 @@ |
| 59 | <div class="ipt-wrap-linear"> | 59 | <div class="ipt-wrap-linear"> |
| 60 | <div class="down-arrow"></div> | 60 | <div class="down-arrow"></div> |
| 61 | <div class="cont"> | 61 | <div class="cont"> |
| 62 | <el-select class="ipt" v-model="data.countryId" :placeholder="$t('policyChangeContact.form.Nation')" @change="checkNations"> | 62 | <el-select class="ipt" v-model="data.countryId" :placeholder="$t('policyChangeContact.form.Nation')" @change="onChangeNations"> |
| 63 | <el-option v-for="(item, index) in nationsList" :key="index" :label="item.n" :value="item.v"></el-option> | 63 | <el-option v-for="(item, index) in nationsList" :key="index" :label="item.n" :value="item.v"></el-option> |
| 64 | </el-select> | 64 | </el-select> |
| 65 | </div> | 65 | </div> | ... | ... |
| ... | @@ -115,6 +115,7 @@ | ... | @@ -115,6 +115,7 @@ |
| 115 | overflow: auto; | 115 | overflow: auto; |
| 116 | .data-line { | 116 | .data-line { |
| 117 | // padding: 0 32px; | 117 | // padding: 0 32px; |
| 118 | // background-color: wheat; | ||
| 118 | height: 58px; | 119 | height: 58px; |
| 119 | margin: auto; | 120 | margin: auto; |
| 120 | display: flex; | 121 | display: flex; | ... | ... |
| 1 | /** | 1 | /** |
| 2 | * 组件描述:上传美国税务表格 | 2 | * 组件描述:上传美国税务表格 |
| 3 | */ | 3 | */ |
| 4 | import api from "@/api/api"; | ||
| 5 | import { | ||
| 6 | formdata | ||
| 7 | } from '@/api/fetch-api.js' | ||
| 8 | import { Loading } from 'vant'; | ||
| 4 | 9 | ||
| 5 | export default { | 10 | export default { |
| 6 | props: { | 11 | props: { |
| ... | @@ -14,7 +19,9 @@ export default { | ... | @@ -14,7 +19,9 @@ export default { |
| 14 | }, | 19 | }, |
| 15 | data() { | 20 | data() { |
| 16 | return { | 21 | return { |
| 17 | iobsKey: "asdfs" | 22 | fileName: "", |
| 23 | iobsKey: "", | ||
| 24 | loading: false | ||
| 18 | }; | 25 | }; |
| 19 | }, | 26 | }, |
| 20 | components: {}, | 27 | components: {}, |
| ... | @@ -35,9 +42,34 @@ export default { | ... | @@ -35,9 +42,34 @@ export default { |
| 35 | }, | 42 | }, |
| 36 | onUploadHandler() {}, | 43 | onUploadHandler() {}, |
| 37 | onSubmitHandler() { | 44 | onSubmitHandler() { |
| 45 | if(!this.iobsKey) return; | ||
| 38 | this.$emit("submit", { | 46 | this.$emit("submit", { |
| 39 | iobsKey: this.iobsKey | 47 | iobsKey: this.iobsKey |
| 40 | }); | 48 | }); |
| 49 | }, | ||
| 50 | selectImgs() { | ||
| 51 | let _this = this; | ||
| 52 | this.iobsKey = ""; | ||
| 53 | let file = this.$refs.file.files[0]; | ||
| 54 | let item = { | ||
| 55 | name: file.name, | ||
| 56 | size: file.size, | ||
| 57 | file: file | ||
| 58 | }; | ||
| 59 | // 转base64 | ||
| 60 | this.loading = true; | ||
| 61 | let myFormData = new FormData(); | ||
| 62 | myFormData.append("file", file); | ||
| 63 | formdata({ url: api.uploadFileIobs, myFormData: myFormData, sid: true }) | ||
| 64 | .then(res => { | ||
| 65 | this.loading = false; | ||
| 66 | this.fileName = file.name; | ||
| 67 | this.iobsKey = res; | ||
| 68 | console.log("res:",res); | ||
| 69 | }) | ||
| 70 | .catch(err => { | ||
| 71 | this.loading = false; | ||
| 72 | }); | ||
| 41 | } | 73 | } |
| 42 | }, | 74 | }, |
| 43 | mounted() {}, | 75 | mounted() {}, | ... | ... |
| ... | @@ -87,6 +87,7 @@ | ... | @@ -87,6 +87,7 @@ |
| 87 | display: flex; | 87 | display: flex; |
| 88 | justify-content: center; | 88 | justify-content: center; |
| 89 | .btn { | 89 | .btn { |
| 90 | position: relative; | ||
| 90 | @include btc4(144px, 42px, 16px); | 91 | @include btc4(144px, 42px, 16px); |
| 91 | margin: 20px 24px 0; | 92 | margin: 20px 24px 0; |
| 92 | @extend .pointer; | 93 | @extend .pointer; |
| ... | @@ -113,6 +114,16 @@ | ... | @@ -113,6 +114,16 @@ |
| 113 | } | 114 | } |
| 114 | } | 115 | } |
| 115 | 116 | ||
| 117 | input[type="file"] { | ||
| 118 | position: absolute; | ||
| 119 | left: 0; | ||
| 120 | top: 0; | ||
| 121 | width: 100%; | ||
| 122 | height: 100%; | ||
| 123 | opacity: 0; | ||
| 124 | cursor: pointer; | ||
| 125 | } | ||
| 126 | |||
| 116 | @media (max-width: 1150px) { | 127 | @media (max-width: 1150px) { |
| 117 | .close { | 128 | .close { |
| 118 | right: -15px; | 129 | right: -15px; | ... | ... |
| ... | @@ -15,10 +15,12 @@ | ... | @@ -15,10 +15,12 @@ |
| 15 | 15 | ||
| 16 | </div> | 16 | </div> |
| 17 | <div class="modal-form"> | 17 | <div class="modal-form"> |
| 18 | us-tax.excel | 18 | {{fileName}} |
| 19 | </div> | 19 | </div> |
| 20 | <div class="modal-btn-wrap"> | 20 | <div class="modal-btn-wrap"> |
| 21 | <div @click="onUploadHandler" class="btn">上载表格</div> | 21 | <div class="btn"> |
| 22 | <input type="file" @change="selectImgs" ref="file"> | ||
| 23 | <van-loading v-if="loading" />上载表格</div> | ||
| 22 | <div @click="onSubmitHandler" class="btn" :class="{'disable':iobsKey ==''}">提交</div> | 24 | <div @click="onSubmitHandler" class="btn" :class="{'disable':iobsKey ==''}">提交</div> |
| 23 | </div> | 25 | </div> |
| 24 | 26 | ... | ... |
-
Please register or sign in to post a comment