3f03b9c8 by simon

Merge branch 'master' of 120.27.44.69:dev/pingan-life-index-pro

# Conflicts:
#	src/components/vhis-modal/vhis-modal.js
2 parents 05a2d40e 7135f7ab
......@@ -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: "索偿申请",
......
......@@ -39,6 +39,7 @@ export default {
},
data() {
return {
dataInit: false,
showTips: false,
// 候选人所购买的保单可选择的类型
/**
......@@ -53,7 +54,6 @@ export default {
typeCandidates: ['1', '2', '5', '6', '7'],
// 已经选择的类型,
typeSelected: [],
images: [],
agress: false,
data: {
insuredIndex: "",
......@@ -74,6 +74,8 @@ export default {
HT34Uploading: false,
HT16Uploading: false,
policyDateLegal: false,
},
loading: false,
contactDateError: false,
......@@ -135,14 +137,55 @@ export default {
return true;
}
return false;
}
},
},
methods: {
initData() {
let typeSelectedStr = sessionStorage.getItem("clarmTypeSelect");
sessionStorage.removeItem("clarmTypeSelect");
let clarmDataFormStr = sessionStorage.getItem("clarmDataForm");
sessionStorage.removeItem("clarmDataForm");
if (clarmDataFormStr) {
try {
this.data = JSON.parse(clarmDataFormStr);
} catch (e) {
}
}
if (typeSelectedStr) {
try {
let typeSelected = JSON.parse(typeSelectedStr);
// console.log("typeSelected:", typeSelected);
this.$set(this, "typeSelected", typeSelected)
} catch (e) {
}
}
this.dataInit = true;
// console.log("this.insuredList = ", this.insuredList);
},
datePickCompleteHandler(){
console.log("datePickCompleteHandler");
cacheData() {
sessionStorage.setItem("clarmTypeSelect", JSON.stringify(this.typeSelected));
sessionStorage.setItem("clarmDataForm", JSON.stringify(this.data));
this.$refs['HT41'] && this.$refs['HT41'].cacheData();
this.$refs['HT26'] && this.$refs['HT26'].cacheData();
this.$refs['HT06'] && this.$refs['HT06'].cacheData();
this.$refs['HT34'] && this.$refs['HT34'].cacheData();
this.$refs['HT03'] && this.$refs['HT03'].cacheData();
},
clearCache() {
sessionStorage.removeItem("clarmTypeSelect");
sessionStorage.removeItem("clarmDataForm");
this.$refs['HT41'] && this.$refs['HT41'].clearCache();
this.$refs['HT26'] && this.$refs['HT26'].clearCache();
this.$refs['HT06'] && this.$refs['HT06'].clearCache();
this.$refs['HT34'] && this.$refs['HT34'].clearCache();
this.$refs['HT03'] && this.$refs['HT03'].clearCache();
},
typeClickHandle(t) {
let index = this.typeSelected.indexOf(t);
......@@ -162,7 +205,7 @@ export default {
}
},
uploadSuccess(data) {
// console.log(data);
console.log("uploadSuccess === ", data);
switch (data.type) {
case "HT41":
this.data.HT41Uploading = false;
......@@ -215,6 +258,7 @@ export default {
this.contactDateError = data.disable;
},
toContact() {
this.cacheData();
this.$router.push({
path: "/custom/service?q=m1"
});
......@@ -291,12 +335,46 @@ export default {
// 2标记为时间
this.$emit("showModal", { action: 1, type: 2 });
return false;
}
},
watch: {
"data.insuredIndex": function (v, ov) {
},
checkPolicyDateLegal() {
// 校验日期是否合法
if (this.contactDateError) {
return false;
}
if (!this.data.contactDate || !this.data.insuredIndex) {
return false;
}
let insured = this.insuredList[this.data.insuredIndex - 1];
if (!insured.policyInfoList || insured.policyInfoList.length <= 0) {
return false;
}
var time = new Date(ddMMyyyy2yyyyMMdd(this.data.contactDate).replace(/\-/g, "/") + " 00:00:00").getTime();
for (let index = 0; index < insured.policyInfoList.length; index++) {
let policy = insured.policyInfoList[index];
// 有效期为生效日至满期日+60天
if (policy.activeDate <= time && policy.expireDate + 60 * 24 * 60 * 60 * 1000 >= time) {
return true;
}
}
// 2标记为时间
return false;
},
pluginActivityHandler(data) {
if (data.type == "close") {
// this.data.policyDateLegal = ;
this.$set(this.data, 'policyDateLegal', this.checkPolicyDateLegal());
if (this.data.policyDateLegal) {
this.policyIllegal = false;
} else {
this.policyIllegal = true;
if (this.data.contactDate) {
this.$emit("showModal", { action: 1, type: 2 });
}
}
}
},
insuredChange() {
this.typeSelected = [];
let d = {
insuredIndex: this.data.insuredIndex,
amount: null,
......@@ -317,19 +395,16 @@ export default {
HT16Uploading: false,
};
this.$set(this, "data", d);
if (this.checkPolicy()) {
this.policyIllegal = false;
} else {
this.policyIllegal = true;
}
},
"data.contactDate": function () {
if (this.checkPolicy()) {
this.policyIllegal = false;
} else {
this.policyIllegal = true;
}
},
}
},
watch: {
// "data.contactDate": function () {
// if (this.checkPolicy()) {
// this.policyIllegal = false;
// } else {
// this.policyIllegal = true;
// }
// },
'agree': function () {
this.showTips = false;
}
......@@ -344,9 +419,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();
}
})
});
......
......@@ -20,7 +20,7 @@
<div class="tt t1">{{$t('clarms.step2.label1')}}</div>
<div class="tt clarms-border">
<div class="down-arrow"></div>
<el-select style="text-align: center;" class="clarms-select" v-model="data.insuredIndex" :placeholder="''">
<el-select style="text-align: center;" class="clarms-select" v-model="data.insuredIndex" :placeholder="''" @change="insuredChange">
<template v-if="lan == 'en'">
<el-option v-for="(item,index) in insuredList" :key="index" :label="item.insuredNameEn?item.insuredNameEn:insuredNameCn" :value="index + 1">
</el-option>
......@@ -103,14 +103,14 @@
<div class="down-arrow"></div>
<div class="cont">
<div class="ipt-date">
<date-picker v-model="data.contactDate" :datePickComplete="datePickCompleteHandler" :formatter="'dd-MM-yyyy'" :filtModel="['future']" :check="checkDate" :readonly="true" :cusStyle="{border:'none !important','background-color':'transparent !important','height':'58px', 'color':'#ff6839','font-weight':'bold','text-align': 'center'}"></date-picker>
<date-picker v-model="data.contactDate" :pluginActivity="pluginActivityHandler" :formatter="'dd-MM-yyyy'" :filtModel="['future','today']" :check="checkDate" :readonly="true" :cusStyle="{border:'none !important','background-color':'transparent !important','height':'58px', 'color':'#ff6839','font-weight':'bold','text-align': 'center'}"></date-picker>
</div>
</div>
</div>
</div>
</div>
<template v-if="data.contactDate">
<template v-if="data.contactDate && data.policyDateLegal">
<div class="pure-u-1 form-item-2 form-item-3 mt20">
<div class="label">
<div class="main-label">
......@@ -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,14 +130,14 @@
</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>
</div>
<template v-if="data.contactDate">
<template v-if="data.contactDate && data.policyDateLegal">
<!-- <template v-if="1>0"> -->
<hr class="hr2" v-if="data.amount > 0">
<div class="bottom-tip orange mt20">{{$t('clarms.step2.label17')}}</div>
......
......@@ -6,8 +6,8 @@ export default {
// 是否显示组件
// 1、顯示事故類型;2、顯示時間
type: {
type: String,
default: "2"
type: Number,
default: 2
},
},
data() {
......@@ -29,6 +29,7 @@ export default {
this.$emit("close");
},
toContact() {
this.$emit("toContact");
this.$router.push({
path: "/custom/service?q=m1"
});
......
......@@ -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,19 +133,21 @@ export default {
let _this = this;
var reader = new FileReader();
reader.onload = function (e) {
let d = {
fileName: "",
file: file,
data: reader.result,
cacheKey: "",
showMask: false,
key: _this.randomAesKey(),
intervial: false,
tips: "",
err: ""
};
_this.$set(_this.images, index, d);
_this.handleFileUpload(d, index);
_this.compressImage(reader.result, function (data) {
let d = {
fileName: "",
file: file,
data: data,
cacheKey: "",
showMask: false,
key: _this.randomAesKey(),
intervial: false,
tips: "",
err: ""
};
_this.$set(_this.images, index, d);
_this.handleFileUpload(d, index);
});
}
reader.readAsDataURL(file);
},
......@@ -189,7 +226,11 @@ export default {
},
emitResult() {
if (this.images.length == 0) {
this.$emit("success", []);
let result = {
type: this.options.imageTypeID,
list: []
};
this.$emit("success", result);
return;
}
if (this.uploading) {
......@@ -225,6 +266,39 @@ 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);
}
},
datePickCompleteHandler() {
}
},
watch: {
......@@ -233,5 +307,5 @@ export default {
mounted() {
this.initData();
},
created() {}
created() { }
}
......
......@@ -32,16 +32,17 @@ export default {
// future : 未来不可选择
// weekend : 周末不可选择
// today : 当日不可选择
// holiday : 节假日不可选择
filtModel: {
type: Array,
default () {
default() {
return ["history", "weekend", "today"]
}
},
// 需要过滤的日期列表 格式 ["yyyy-MM-dd","yyyy-MM-dd"]
filterDates: {
type: Array,
default () {
default() {
return [] // ["2019-11-26", "2019-11-28"]
}
},
......@@ -70,7 +71,7 @@ export default {
},
cusStyle: {
type: Object,
default () {
default() {
return {};
}
},
......@@ -79,6 +80,11 @@ export default {
type: Function,
default: null
},
// 打开或关闭插件
pluginActivity: {
type: Function,
default: null
}
},
data() {
return {
......@@ -176,7 +182,11 @@ export default {
let date = index + 1;
let buildDate = Date.parse(`${year}.${month}.${date}`);
if (buildDate) {
let nowDate = new Date();
let now = new Date();
let y = now.getFullYear();
let m = now.getMonth() + 1;
let d = now.getDate();
let nowDate = Date.parse(`${y}.${m}.${d}`);
let day = buildDate.getDay();
let isWeekend = day == 0 || day == 6;
let disable = false; // 判断是否不可选
......@@ -184,18 +194,17 @@ export default {
disable = isWeekend;
}
if (!disable && this.filtModel.indexOf("future") >= 0) {
buildDate.setHours(23, 59, 59, 999);
// buildDate.setHours(23, 59, 59, 999);
disable = buildDate.getTime() > nowDate.getTime()
}
if (!disable && this.filtModel.indexOf("history") >= 0) {
buildDate.setHours(0, 0, 0, 0);
disable = buildDate.getTime() < nowDate.getTime()
}
if (!disable && this.filtModel.indexOf("today") >= 0) {
buildDate.setHours(0, 0, 0, 0);
nowDate.setHours(0, 0, 0, 0);
disable = buildDate.getTime() == nowDate.getTime();
}
if (!disable && this.filtModel.indexOf("history") >= 0) {
buildDate.setHours(23, 59, 59, 999);
disable = buildDate.getTime() < nowDate.getTime()
}
// disable = isWeekend && !this.weekend; // 判断周末不可选
let filterDates = this.filterDates;
filterDates.forEach(element => {
......@@ -277,7 +286,7 @@ export default {
// this.dateValue = `${year}-${month}-${date}`;
this.formatDateValue(year, month, date);
this.showCalendar();
if(this.datePickComplete){
if (this.datePickComplete) {
this.datePickComplete();
}
},
......@@ -336,6 +345,14 @@ export default {
let yearPage = Math.floor(year / 10);
this.yearPage = yearPage;
this.refreshYearList();
if (this.pluginActivity) {
let _this = this;
let type = boo ? "show" : "close";
setTimeout(function () {
_this.pluginActivity({ type: type });
}, 100);
}
},
getMonthByIndex(index) {
let monthList = this.getMonthList;
......@@ -460,7 +477,7 @@ export default {
this.month = curDate.getMonth() + 1;
this.date = curDate.getDate();
isInit = true;
} catch (error) {}
} catch (error) { }
}
if (!isInit) {
let today = Date.today();
......@@ -495,7 +512,7 @@ export default {
}
},
mounted() {},
mounted() { },
created() {
this.initData();
},
......
......@@ -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: {}
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>
......
......@@ -148,11 +148,23 @@ export default {
}
});
},
cacheData(){
let m = this.$refs["material"];
// console.log("cacheData");
if (m) {
m.cacheData();
}
},
logoutAction() {
this.sid = false;
this.hadQueryCustomerList = false;
this.customerList = [];
this.step = 1;
let m = this.$refs["material"];
if (m) {
m.clearCache();
}
},
loginAction() {
this.sid = false;
......@@ -173,5 +185,5 @@ export default {
this.initData();
},
created() {}
created() { }
}
......
......@@ -18,7 +18,7 @@
</div>
<div class="content clarms" v-else>
<div class="clarms-cont">
<clarms-modal-one v-if="showModal1" @close="showModal1 = false" :type="modelType"></clarms-modal-one>
<clarms-modal-one v-if="showModal1" @close="showModal1 = false" :type="modelType" @toContact="cacheData"></clarms-modal-one>
<clarms-modal-two v-if="showModal2" @close="showModal2 = false"></clarms-modal-two>
<div class="mobile-margin">
......@@ -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">
......
......@@ -84,7 +84,7 @@
</div>
<div class="ipt-wrap" :class="{err:errorTips.e7.length>0}">
<!-- <input class="ipt" type="date" v-model="data.contactDate" :class="{err : errorTips.e7.length > 0}"> -->
<date-picker v-model="data.contactDate" :check="checkDate"></date-picker>
<date-picker v-model="data.contactDate" :check="checkDate" :filtModel="['history']"></date-picker>
</div>
<div class="validator" v-if="errorTips.e7.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e7}}
......
......@@ -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": "銀行匯票" },
......