dbbb4b36 by joe

部分修正

1 parent e3b9bce4
......@@ -9,7 +9,8 @@ module.exports = {
en: 'English'
},
glbalTips: {
sessionLost: "为了更好的体验,需要您登录后再进行此操作"
sessionLost: "Your session has expired. For your account safety, please re-enter and submit again.",
sysError : "An error occurred, please try again later. "
},
form: {
datePicker: {
......@@ -860,7 +861,9 @@ module.exports = {
tip2: " confirm the receipt of the above policy on ",
tip3: ".",
tip4: "",
tip5: "Contact Customer Service Hotline"
tip5: "Contact Customer Service Hotline",
tip6 : "The policy acknowledgement has been done, to inquire about the policy information or download ePolicy, please click ",
tip7 : "Policy Enquiry"
},
clarms: {
title: "File a claim",
......
......@@ -9,7 +9,8 @@ module.exports = {
en: 'English'
},
glbalTips: {
sessionLost: "為了更好的體驗,需要您登入後再進行此操作"
sessionLost: "操作超時,為了您的賬戶安全,請重新輸入並提交",
sysError : "系統出錯,請稍後再試 "
},
form: {
datePicker: {
......@@ -832,6 +833,8 @@ module.exports = {
tip3: "收托上述保單。",
tip4: "我想",
tip5: "聯絡客服",
tip6 : "保單已簽收,如需查詢保單資訊或下載電子保單可點擊",
tip7 : "保單查詢"
},
clarms: {
title:"索償申請",
......
......@@ -9,7 +9,8 @@ module.exports = {
en: '英文'
},
glbalTips: {
sessionLost: "为了更好的体验,需要您登入后再进行此操作"
sessionLost: "操作超时,为了您的账户安全,请重新输入并提交",
sysError : "系统异常,请稍后再试"
},
form: {
datePicker: {
......@@ -854,7 +855,9 @@ module.exports = {
tip2: "现确认于",
tip3: "受托上述保单。",
tip4: "我想",
tip5: "联络客服"
tip5: "联络客服",
tip6 : "保单已签收,如需查询保单信息或下载电子保单可点击",
tip7 : "保单查询"
},
clarms: {
title: "索偿申请",
......
......@@ -139,8 +139,48 @@ export default {
},
methods: {
initData() {
let typeSelectedStr = sessionStorage.getItem("clarmTypeSelect");
sessionStorage.removeItem("clarmTypeSelect");
let clarmDataFormStr = sessionStorage.getItem("clarmDataForm");
sessionStorage.removeItem("clarmDataForm");
if (typeSelectedStr) {
try {
this.typeSelected = JSON.parse(typeSelectedStr);
} catch (e) {
}
}
if (clarmDataFormStr) {
try {
this.data = JSON.parse(clarmDataFormStr);
} catch (e) {
}
}
// console.log("this.insuredList = ", this.insuredList);
},
cacheData() {
sessionStorage.setItem("clarmTypeSelect", JSON.stringify(this.typeSelected));
sessionStorage.setItem("clarmDataForm", JSON.stringify(this.data));
this.$refs['HT41'].cacheData();
this.$refs['HT26'].cacheData();
this.$refs['HT06'].cacheData();
this.$refs['HT34'].cacheData();
this.$refs['HT03'].cacheData();
},
clearCache(){
sessionStorage.removeItem("clarmTypeSelect");
sessionStorage.removeItem("clarmDataForm");
this.$refs['HT41'].clearCache();
this.$refs['HT26'].clearCache();
this.$refs['HT06'].clearCache();
this.$refs['HT34'].clearCache();
this.$refs['HT03'].clearCache();
},
typeClickHandle(t) {
let index = this.typeSelected.indexOf(t);
if (index > -1) {
......@@ -212,6 +252,7 @@ export default {
this.contactDateError = data.disable;
},
toContact() {
this.cacheData();
this.$router.push({
path: "/custom/service?q=m1"
});
......@@ -341,9 +382,9 @@ export default {
this.$root.eventBus.$on("_evt_to_account_information", () => {
this.$nextTick(() => {
// console.log("ccccc:", document.getElementById("sc"));
let sc = document.getElementById("sc");
let sc = document.getElementById("HT34");
if (sc) {
document.getElementById("sc").scrollIntoView();
document.getElementById("HT34").scrollIntoView();
}
})
});
......
......@@ -118,8 +118,8 @@
</div>
</div>
<div class="value">
<clarms-upload :icon="require('@/assets/images/clarms/icon1.png')" :options="{name:$t('clarms.step2.label11'),imageTypeID:'HT41',imageMainTypeID:'HT11',toast:$t('clarms.step2.toast1')}" @success="uploadSuccess" @beforeUpload="beforeUpload"></clarms-upload>
<clarms-upload class="mt24" :icon="require('@/assets/images/clarms/icon2.png')" :options="{name:$t('clarms.step2.label12'),imageTypeID:'HT26',imageMainTypeID:'HT06',toast:$t('clarms.step2.toast2')}" @success="uploadSuccess" @beforeUpload="beforeUpload"></clarms-upload>
<clarms-upload ref="HT41" :icon="require('@/assets/images/clarms/icon1.png')" :options="{name:$t('clarms.step2.label11'),imageTypeID:'HT41',imageMainTypeID:'HT11',toast:$t('clarms.step2.toast1')}" @success="uploadSuccess" @beforeUpload="beforeUpload"></clarms-upload>
<clarms-upload ref="HT26" class="mt24" :icon="require('@/assets/images/clarms/icon2.png')" :options="{name:$t('clarms.step2.label12'),imageTypeID:'HT26',imageMainTypeID:'HT06',toast:$t('clarms.step2.toast2')}" @success="uploadSuccess" @beforeUpload="beforeUpload"></clarms-upload>
</div>
</div>
......@@ -130,9 +130,9 @@
</div>
</div>
<div class="value">
<clarms-upload :icon="require('@/assets/images/clarms/icon3.png')" :options="{name:$t('clarms.step2.label14'),imageTypeID:'HT29',imageMainTypeID:'HT06',toast:$t('clarms.step2.toast3')}" @success="uploadSuccess" @beforeUpload="beforeUpload"></clarms-upload>
<clarms-upload id="sc" ref="sc" class="mt24" :icon="require('@/assets/images/clarms/icon4.png')" :options="{name:$t('clarms.step2.label15'),imageTypeID:'HT34',imageMainTypeID:'HT08',toast:$t('clarms.step2.toast4')}" @success="uploadSuccess" @beforeUpload="beforeUpload"></clarms-upload>
<clarms-upload class="mt24" :icon="require('@/assets/images/clarms/icon5.png')" :options="{name:$t('clarms.step2.label16'),imageTypeID:'HT16',imageMainTypeID:'HT03',toast:$t('clarms.step2.toast5')}" @success="uploadSuccess" @beforeUpload="beforeUpload"></clarms-upload>
<clarms-upload ref="HT06" :icon="require('@/assets/images/clarms/icon3.png')" :options="{name:$t('clarms.step2.label14'),imageTypeID:'HT29',imageMainTypeID:'HT06',toast:$t('clarms.step2.toast3')}" @success="uploadSuccess" @beforeUpload="beforeUpload"></clarms-upload>
<clarms-upload ref="HT34" id="HT34" class="mt24" :icon="require('@/assets/images/clarms/icon4.png')" :options="{name:$t('clarms.step2.label15'),imageTypeID:'HT34',imageMainTypeID:'HT08',toast:$t('clarms.step2.toast4')}" @success="uploadSuccess" @beforeUpload="beforeUpload"></clarms-upload>
<clarms-upload ref="HT03" class="mt24" :icon="require('@/assets/images/clarms/icon5.png')" :options="{name:$t('clarms.step2.label16'),imageTypeID:'HT16',imageMainTypeID:'HT03',toast:$t('clarms.step2.toast5')}" @success="uploadSuccess" @beforeUpload="beforeUpload"></clarms-upload>
</div>
</div>
</template>
......
......@@ -17,7 +17,7 @@ export default {
// 是否显示组件
options: {
type: Object,
default () {
default() {
return {
// 名称
name: "",
......@@ -68,7 +68,42 @@ export default {
},
methods: {
initData() {
for (let index = 0; index < sessionStorage.length; index++) {
let key = sessionStorage.key(index);
if (key.indexOf("clarmImage." + this.options.imageTypeID) == 0) {
let str = sessionStorage.getItem(key);
sessionStorage.removeItem(key);
try {
let d = JSON.parse(str);
this.images.push(d);
} catch (e) {
console.error(e);
}
}
}
},
cacheData() {
for (let index = 0; index < this.images.length; index++) {
let tmp = this.images[index];
if (tmp.showMask || !tmp.cacheKey) { continue; }
let key = "clarmImage." + this.options.imageTypeID + "." + index;
sessionStorage.setItem(key, JSON.stringify({
fileName: tmp.fileName,
data: tmp.data,
cacheKey: tmp.cacheKey
}));
}
},
clearCache() {
for (let index = 0; index < sessionStorage.length; index++) {
let key = sessionStorage.key(index);
if (key.indexOf("clarmImage." + this.options.imageTypeID) == 0) {
sessionStorage.removeItem(key);
}
}
this.uploadFiles = 0 ;
this.images = [];
},
selectMutilFile() {
if (this.uploading) {
......@@ -83,7 +118,7 @@ export default {
input.setAttribute("type", "file");
input.setAttribute("multiple", "multiple");
// input.setAttribute("accept", "image/*");
input.setAttribute("accept", "image/jpeg");
input.setAttribute("accept", "image/png,image/jpeg");
input.onchange = function (val) {
let position = _this.images.length;
for (let index = 0; index < input.files.length; index++) {
......@@ -98,10 +133,11 @@ export default {
let _this = this;
var reader = new FileReader();
reader.onload = function (e) {
_this.compressImage(reader.result, function (data) {
let d = {
fileName: "",
file: file,
data: reader.result,
data: data,
cacheKey: "",
showMask: false,
key: _this.randomAesKey(),
......@@ -111,6 +147,7 @@ export default {
};
_this.$set(_this.images, index, d);
_this.handleFileUpload(d, index);
});
}
reader.readAsDataURL(file);
},
......@@ -225,6 +262,36 @@ export default {
},
onShowTipsOutHandler(event) {
this.tipsVisible = false;
},
compressImage(src, callback) {
var img = new Image();
img.src = src;
img.onload = function () {
var that = this;
// 默认按比例压缩
var w = img.width,
h = img.height,
scale = w / h;
w = w < 50 ? w : 50;
h = (w / scale);
var quality = 0.7; // 默认图片质量为0.7
//生成canvas
var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d');
// 创建属性节点
var anw = document.createAttribute("width");
anw.nodeValue = w;
var anh = document.createAttribute("height");
anh.nodeValue = h;
canvas.setAttributeNode(anw);
canvas.setAttributeNode(anh);
ctx.drawImage(that, 0, 0, w, h);
// quality值越小,所绘制出的图像越模糊
var base64 = canvas.toDataURL('image/*', quality);
console.log(base64.length);
// 回调函数返回base64的值
callback(base64);
}
}
},
watch: {
......@@ -233,5 +300,5 @@ export default {
mounted() {
this.initData();
},
created() {}
created() { }
}
......
......@@ -25,6 +25,11 @@ export default {
overlay: {
type: Function,
default: null
},
// 模板地址
target: {
type: String,
default: "",
}
},
data() {
......@@ -51,8 +56,13 @@ export default {
this.overlay();
}
},
initData() {}
toTarget() {
if (this.target) {
this.$emit("targetCallbak", this.target1);
}
},
initData() { }
},
mounted() {},
created() {}
mounted() { },
created() { }
}
......
......@@ -11,6 +11,7 @@
</div>
<div class="message" :class="{'lsp':locale != 'en'}">
{{content}}
<span v-if="target" @click="toTarget">{{target}}</span>
</div>
</div>
</div>
......
......@@ -8,6 +8,9 @@ import {
requestDomain
} from '@/api/fetch-api.js'
import Modal2Comp from '@/components/modal2-comp/modal2-comp.vue';
import { getPolicyName } from "@/utils/biz.js";
export default {
data() {
return {
......@@ -16,10 +19,14 @@ export default {
hadLoadPolicy: false,
ignorePolicyCodes: [],
// 显示
policyDetail: null
policyDetail: null,
showSuccessTip : false,
showDownloadError:false
}
},
components: {},
components: {
Modal2Comp
},
computed: {
...mapState({
userInfo: state => state.userInfo,
......@@ -28,6 +35,9 @@ export default {
locale() {
return this.$i18n.locale || 'tc';
},
i18n() {
return this.$i18n.messages && this.$i18n.locale ? this.$i18n.messages[this.$i18n.locale] : {};
},
},
methods: {
initData() {
......@@ -138,6 +148,7 @@ export default {
let policyCode = this.policyDetail.policyCode;
this.ignorePolicyCodes.push(policyCode);
sessionStorage.setItem("ignorePolicyCodes", JSON.stringify(this.ignorePolicyCodes));
this.showSuccessTip = true;
this.checkIfShowPolicy();
let params = {
......@@ -149,7 +160,6 @@ export default {
sid: true,
data: params
}).then(res => {
}).catch(e => {
});
......@@ -176,6 +186,8 @@ export default {
if (res) {
let url = requestDomain() + api.downloadPolicy + "/" + res;
window.open(url);
} else {
this.showDownloadError = true;
}
});
}
......@@ -191,6 +203,16 @@ export default {
path: "/custom/service?q=m1"
});
},
toTarget(){
this.showPolicy = false;
sessionStorage.setItem("hidePolicy", "true");
this.$router.push({
path : "/custom/service?q=m3"
})
},
formatPolicyName(c, n) {
return getPolicyName(this.$i18n.locale, c, n);
},
loginAction() {
this.showPolicy = true;
this.initData();
......
<template>
<div class="comp" v-if="policyDetail && showPolicy">
<modal2-comp :visible="showSuccessTip" :close="()=>{showSuccessTip = false}" :content="$t('vhis.tip6')" :target="$t('vhis.tip7')" @targetCallbak="toTarget"></modal2-comp>
<modal2-comp :visible="showDownloadError" :close="()=>{showDownloadError = false}" :content="$t('glbalTips.sysError')"></modal2-comp>
<div @click="handleIgnorePolicy" class="overlay"></div>
<div class="border">
<div class="close" @click="onOverLayHandler()"><img src="@/assets/images/vhis/close.png"></div>
......@@ -25,7 +27,7 @@
<div class="form-item">
<div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label2')}}</div>
<div class="value orange">
<span>{{policyDetail.productName}}</span>
<span>{{formatPolicyName(policyDetail.productCode,policyDetail.productName)}}</span>
</div>
</div>
<div class="form-item">
......@@ -42,13 +44,23 @@
<div class="form-item">
<div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label4')}}</div>
<div class="value orange">
<span>{{policyDetail.clientNameCn}}</span>
<template v-if="locale == 'en'">
<span>{{policyDetail.clientNameEn ? policyDetail.clientNameEn : policyDetail.clientNameCn}}</span>
</template>
<template v-else>
<span>{{policyDetail.clientNameCn ? policyDetail.clientNameCn : policyDetail.clientNameEn}}</span>
</template>
</div>
</div>
<div class="form-item">
<div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label5')}}:</div>
<div class="value orange">
<span>{{policyDetail.insuredNameCn}}</span>
<template v-if="locale == 'en'">
<span>{{policyDetail.insuredNameEn ? policyDetail.insuredNameEn : policyDetail.insuredNameCn}}</span>
</template>
<template v-else>
<span>{{policyDetail.insuredNameCn ? policyDetail.insuredNameCn : policyDetail.insuredNameEn}}</span>
</template>
</div>
</div>
......@@ -65,7 +77,14 @@
<div class="bottom-wrap ">
<div class="notice" :class="{'ltz':locale == 'en'}">
<span>{{$t('vhis.tip1')}}</span>
<span class="orange">{{policyDetail.clientNameCn}}</span>
<span class="orange">
<template v-if="locale == 'en'">
{{policyDetail.clientNameEn ? policyDetail.clientNameEn : policyDetail.clientNameCn}}
</template>
<template v-else>
{{policyDetail.clientNameCn ? policyDetail.clientNameCn : policyDetail.clientNameEn}}
</template>
</span>
<span>{{$t('vhis.tip2')}}</span>
<span class="orange">{{policyDetail.nowYmd1}}</span>
<span>{{$t('vhis.ymd1')}}</span>
......
......@@ -153,6 +153,11 @@ export default {
this.hadQueryCustomerList = false;
this.customerList = [];
this.step = 1;
let m = this.refs["material"];
if (m) {
m.clearCache();
}
},
loginAction() {
this.sid = false;
......@@ -173,5 +178,5 @@ export default {
this.initData();
},
created() {}
created() { }
}
......
......@@ -27,7 +27,7 @@
</template>
<template v-if="step == 2">
<clarms-material :insuredList="customerList" :cid="cid" @showModal="handleShowModal"></clarms-material>
<clarms-material ref="material" :insuredList="customerList" :cid="cid" @showModal="handleShowModal"></clarms-material>
</template>
</div>
</div>
......
......@@ -162,6 +162,6 @@ export default {
},
components: {
Auth,
PolicyHeadList
PolicyHeadList,
},
}
......
......@@ -219,7 +219,8 @@
<div class="data-line">
<!-- <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">{{formatPayType(item.payTypeValue)}}</div> -->
<div class="td w2">{{formatPayMode(dataForm.payMode)}}</div>
<div class="td w2">{{item.receiptDate?item.receiptDate.split(" ")[0]:""}}</div>
<div class="td w2">{{dataForm.moneyMark}} {{formatMoney(item.totalPremium)}}</div>
</div>
......
......@@ -8,6 +8,7 @@ import {
mapState
} from 'vuex';
import { formatMoney, getInsuredPeriod, getPolicyName } from "@/utils/biz.js";
import Modal2Comp from '@/components/modal2-comp/modal2-comp.vue';
export default {
props: {
......@@ -28,7 +29,8 @@ export default {
maxShow: 2,
selectPolicyCode: "",
selectPolicyCodes: {},
hide: false
hide: false,
showDownloadError : false
}
},
computed: {
......@@ -201,7 +203,7 @@ export default {
return getInsuredPeriod(this.$i18n.locale, t, v);
},
formatPolicyName(c, n) {
return getPolicyName(this.$i18n.locale, c, c);
return getPolicyName(this.$i18n.locale, c, n);
},
downloadPolicy(policy) {
if (policy) {
......@@ -209,12 +211,15 @@ export default {
if (res) {
let url = requestDomain() + api.downloadPolicy + "/" + res;
window.open(url);
} else {
this.showDownloadError = true;
}
});
}
}
},
components: {
Modal2Comp
},
mounted() {
this.queryList();
......
<template>
<div class="list-container">
<modal2-comp :visible="showDownloadError" :close="()=>{showDownloadError = false}" :content="$t('glbalTips.sysError')"></modal2-comp>
<div class="cell-group">
<div class="table-contaner">
<div class="table-header orange">
......
......@@ -856,6 +856,7 @@ let payModeList = [
{ "v": "0", "n": "其他" },
{ "v": "1", "n": "现金" },
{ "v": "2", "n": "支票" },
{ "v": "3", "n": "借记卡" },
{ "v": "84", "n": "易办事" },
{ "v": "93", "n": "银行本票" },
{ "v": "61", "n": "银行汇票" },
......@@ -866,6 +867,7 @@ let payModeEnList = [
{ "v": "0", "n": "Others" },
{ "v": "1", "n": "Cash" },
{ "v": "2", "n": "Cheque" },
{ "v": "3", "n": "Direct Debit" },
{ "v": "84", "n": "EPS" },
{ "v": "93", "n": "Cashier’s Order" },
{ "v": "61", "n": "Bank Draft" },
......@@ -876,6 +878,7 @@ let payModeTcList = [
{ "v": "0", "n": "其他" },
{ "v": "1", "n": "現金" },
{ "v": "2", "n": "支票" },
{ "v": "3", "n": "借記卡" },
{ "v": "84", "n": "易辦事" },
{ "v": "93", "n": "銀行本票" },
{ "v": "61", "n": "銀行匯票" },
......