diff --git a/src/router/ebiz/sale.js b/src/router/ebiz/sale.js index d9ad98f04..5c76e9283 100644 --- a/src/router/ebiz/sale.js +++ b/src/router/ebiz/sale.js @@ -12,6 +12,7 @@ const signatureConfirmation = () => import('@/views/ebiz/sale/SignatureConfirmat const notifyingMessage = () => import('@/views/ebiz/sale/NotifyingMessage') const accountInformation = () => import('@/views/ebiz/sale/AccountInformation') const insuranceInformation = () => import('@/views/ebiz/sale/InsuranceInformation') +const insuranceClauses = () => import('@/views/ebiz/sale/insuranceClauses') const insuranceTip = () => import('@/views/ebiz/sale/InsuranceTip') const InsuranceRiskReminder = () => import('@/views/ebiz/sale/InsuranceRiskReminder') const signatureOfElectronic = () => import('@/views/ebiz/sale/SignatureOfElectronic') @@ -134,6 +135,14 @@ export default [ title: '投保须知' } }, + { + path: '/sale/insuranceClauses', + name: 'insuranceClauses', + component: insuranceClauses, + meta: { + title: '保险条款' + } + }, { path: '/sale/insuranceTip', name: 'insuranceTip', diff --git a/src/views/ebiz/sale/InsuranceInformation.vue b/src/views/ebiz/sale/InsuranceInformation.vue index 9856c0017..cf2fb10f6 100644 --- a/src/views/ebiz/sale/InsuranceInformation.vue +++ b/src/views/ebiz/sale/InsuranceInformation.vue @@ -253,6 +253,133 @@ export default { }, // 下一步 goNext() { + this.$toast.loading({ + duration: 0, // 持续展示 toast + forbidClick: true, // 禁用背景点击 + loadingType: 'spinner', + message: '加载中……' + }) + let that = this + if (that.signVal == '0' || that.signVal == '2') { + // 查看保险条款是否有,如果没有的话走原有逻辑 + let isHasClauses = this.appntSign.some(item => { + return item.documentCode == '13' && (item.documentStatus == '0' || item.documentStatus == '2') + }) + if(isHasClauses) { + that.appntSign.map(item => { + if (item.documentCode == '1') { + that.appntSign.signId = item.signId + that.appntSign.documentCode = item.documentCode + that.appntSign.documentType = item.documentType + } + }) + + let data = { + orderType: 'SIGN_ORDER', + orderDTO: { + orderInfoDTO: { + orderNo: window.localStorage.getItem('orderNo') + }, + ebizSignDTOS: [ + { + signOrRead: 'read', + signId: that.appntSign.signId, + orderNo: window.localStorage.getItem('orderNo'), + documentCode: that.appntSign.documentCode, + documentStatus: '1', + documentType: that.appntSign.documentType, + signType: that.signVal + } + ] + } + } + saveInformation(data).then(res => { + // console.log(res) + if (res.result == '0') { + this.$toast.clear() + window.localStorage.setItem('detailJump', '') + //GFRS_M0003为万能型产品需要投保人签署产品说明书 + let url = 'insuranceClauses' + this.$jump({ + flag: 'h5', + extra: { + url: location.origin + '/#/sale/' + url + }, + routerInfo: { + path: '/sale/' + url + } + }) + } else { + that.$toast(res.resultMessage) + } + }) + } else { + that.goNextBefore() + } + } else { + this.$toast.loading({ + duration: 0, // 持续展示 toast + forbidClick: true, // 禁用背景点击 + loadingType: 'spinner', + message: '加载中……' + }) + // 查看保险条款是否有,如果没有的话走原有逻辑 + let isHasClauses = this.appntSign.some(item => { + return item.documentCode == '13' && (item.documentStatus == '0' || item.documentStatus == '2') + }) + if(isHasClauses) { + that.insuredSign.map(item => { + if (item.documentCode == '1') { + that.insuredSign.signId = item.signId + that.insuredSign.documentCode = item.documentCode + that.insuredSign.documentType = item.documentType + } + }) + let data = { + orderType: 'SIGN_ORDER', + orderDTO: { + orderInfoDTO: { + orderNo: window.localStorage.getItem('orderNo') + }, + ebizSignDTOS: [ + { + signOrRead: 'read', + signId: that.insuredSign.signId, + orderNo: window.localStorage.getItem('orderNo'), + documentCode: that.insuredSign.documentCode, + documentStatus: '1', + documentType: that.insuredSign.documentType, + signType: that.signVal + } + ] + } + } + saveInformation(data).then(res => { + if (res.result == '0') { + this.$toast.clear() + window.localStorage.setItem('detailJump', '') + console.log('保存了结果:' + localStorage.getItem('insurance-policyUrl')) + let url = 'insuranceClauses' + this.$jump({ + flag: 'h5', + extra: { + url: location.origin + '/#/sale/' + url + }, + routerInfo: { + path: '/sale/' + url + } + }) + } else { + that.$toast(res.resultMessage) + } + }) + } else { + that.goNextBefore() + } + } + }, + // 下一步,原有逻辑 + goNextBefore() { if (this.isWeixin) { console.log('````````````````````') console.log('进入微信') @@ -266,7 +393,6 @@ export default { message: '加载中……' }) let that = this - if (that.signVal == '0' || that.signVal == '2') { if (!that.changeCard) { that.appntSign.map(item => { diff --git a/src/views/ebiz/sale/SignatureConfirmation.vue b/src/views/ebiz/sale/SignatureConfirmation.vue index dda77c64c..9c53bcafd 100644 --- a/src/views/ebiz/sale/SignatureConfirmation.vue +++ b/src/views/ebiz/sale/SignatureConfirmation.vue @@ -37,11 +37,11 @@
-

{{ item.documentCode == '1' || item.documentCode == '8' || item.documentCode == '9' || item.documentCode == '12' ? '需阅读' : '需签署' }}

+

{{ item.documentCode == '1' || item.documentCode == '8' || item.documentCode == '9' || item.documentCode == '12' || item.documentCode == '13' ? '需阅读' : '需签署' }}

{{ item.documentName }} - - + +

@@ -79,11 +79,11 @@
-

{{ item.documentCode == '1' || item.documentCode == '8' || item.documentCode == '9' || item.documentCode == '12' ? '需阅读' : '需签署' }}

+

{{ item.documentCode == '1' || item.documentCode == '8' || item.documentCode == '9' || item.documentCode == '12' || item.documentCode == '13' ? '需阅读' : '需签署' }}

{{ item.documentName }} - - + +

@@ -124,11 +124,11 @@

以下内容需要您按照顺序阅读并签字确认:

-

{{ item.documentCode == '1' || item.documentCode == '8' || item.documentCode == '12' ? '需阅读' : '需签署' }}

+

{{ item.documentCode == '1' || item.documentCode == '8' || item.documentCode == '12' || item.documentCode == '13' ? '需阅读' : '需签署' }}

{{ item.documentName }} - - + +

点击【开始】或【分享】,进行相关操作

@@ -172,11 +172,11 @@
-

{{ item.documentCode == '1' || item.documentCode == '8' || item.documentCode == '9' || item.documentCode == '12'? '需阅读' : '需签署' }}

+

{{ item.documentCode == '1' || item.documentCode == '8' || item.documentCode == '9' || item.documentCode == '12' || item.documentCode == '13'? '需阅读' : '需签署' }}

{{ item.documentName }} - - + +

@@ -206,11 +206,11 @@

以下内容需要您按照顺序阅读并签字确认:

-

{{ item.documentCode == '1' || item.documentCode == '8' || item.documentCode == '12' ? '需阅读' : '需签署' }}

+

{{ item.documentCode == '1' || item.documentCode == '8' || item.documentCode == '12' || item.documentCode == '13' ? '需阅读' : '需签署' }}

{{ item.documentName }} - - + +

点击【开始】或【分享】,进行相关操作

@@ -993,7 +993,7 @@ export default { } else { console.log('that.appntSign.length ==', that.appntSign.length, typeof that.appntSign.length) for (let i = 0; i < that.appntSign.length; i++) { - if ((that.appntSign[i].documentCode == '1' || that.appntSign[i].documentCode == '8' || that.appntSign[i].documentCode == '9' || that.appntSign[i].documentCode == '12') && that.appntSign[i].documentStatus == 0) { + if ((that.appntSign[i].documentCode == '1' || that.appntSign[i].documentCode == '8' || that.appntSign[i].documentCode == '9' || that.appntSign[i].documentCode == '12' || that.appntSign[i].documentCode == '13') && that.appntSign[i].documentStatus == 0) { //1投保须知 未读 path = that.appntSign[i].routePath break @@ -1045,7 +1045,7 @@ export default { } else { console.log('that.appntSign.length ==', that.appntSign.length, typeof that.appntSign.length) for (let i = 0; i < that.appntSign.length; i++) { - if ((that.appntSign[i].documentCode == '1' || that.appntSign[i].documentCode == '8' || that.appntSign[i].documentCode == '9' || that.appntSign[i].documentCode == '12') && that.appntSign[i].documentStatus == 0) { + if ((that.appntSign[i].documentCode == '1' || that.appntSign[i].documentCode == '8' || that.appntSign[i].documentCode == '9' || that.appntSign[i].documentCode == '12'|| that.appntSign[i].documentCode == '13') && that.appntSign[i].documentStatus == 0) { //1投保须知 未读 path = that.appntSign[i].routePath break @@ -1626,6 +1626,9 @@ export default { } else if (item.documentCode == '12') { item.key = 10 item.routePath = 'PersonalInformation' + } else if (item.documentCode == '13') { + item.key = 2 + item.routePath = 'insuranceClauses' } }, getSignInvalid() { diff --git a/src/views/ebiz/sale/insuranceClauses.vue b/src/views/ebiz/sale/insuranceClauses.vue new file mode 100644 index 000000000..2f78a3b1b --- /dev/null +++ b/src/views/ebiz/sale/insuranceClauses.vue @@ -0,0 +1,551 @@ + + + diff --git a/vue.config.js b/vue.config.js index 9ca8273e3..3cdacdb7e 100644 --- a/vue.config.js +++ b/vue.config.js @@ -34,6 +34,6 @@ module.exports = { // }) }, devServer: { - port: 8082, + port: 8082 } }