建议书已选产品编辑功能路由传参修改

This commit is contained in:
liu.xiaofeng@ebiz-digits.com
2023-06-29 13:43:33 +08:00
parent bafc29a595
commit 4967324d87
3 changed files with 43 additions and 35 deletions

View File

@@ -27,29 +27,29 @@ function getSearchString (key) {
} }
return obj[key] return obj[key]
} }
let apiVersion = 'v2' let apiVersion = 'v1'
var ua = window.navigator.userAgent.toLowerCase() // var ua = window.navigator.userAgent.toLowerCase()
//通过正则表达式匹配ua中是否含有MicroMessenger字符串, 在微信 // //通过正则表达式匹配ua中是否含有MicroMessenger字符串, 在微信
if (localStorage.getItem('apiVersion')) { // if (localStorage.getItem('apiVersion')) {
apiVersion = localStorage.getItem('apiVersion') // apiVersion = localStorage.getItem('apiVersion')
} else { // } else {
if (ua.match(/MicroMessenger/i) == 'micromessenger') { // if (ua.match(/MicroMessenger/i) == 'micromessenger') {
//report/reportList数据报表页面在浏览器可以打开了但在微信或企业微信中打开不了,接口请求不需要token // //report/reportList数据报表页面在浏览器可以打开了但在微信或企业微信中打开不了,接口请求不需要token
if (window.location.href.indexOf('apiVersion') > 0) { // if (window.location.href.indexOf('apiVersion') > 0) {
apiVersion = getSearchString('apiVersion') == 'V3' ? 'v3' : 'v2';//url中apiVersion没有时为v2 // apiVersion = getSearchString('apiVersion') == 'V3' ? 'v3' : 'v2';//url中apiVersion没有时为v2
} else { // } else {
apiVersion = 'v3' // apiVersion = 'v3'
} // }
} else { // } else {
// 在app // // 在app
if (navigator.userAgent.indexOf('JZG_') > 0) { // if (navigator.userAgent.indexOf('JZG_') > 0) {
apiVersion = navigator.userAgent.split('JZG_')[1].split('/')[0].split('_')[1] == 'V3' ? 'v3' : 'v2' // apiVersion = navigator.userAgent.split('JZG_')[1].split('/')[0].split('_')[1] == 'V3' ? 'v3' : 'v2'
} // }
} // }
window.localStorage.setItem('apiVersion', apiVersion) // window.localStorage.setItem('apiVersion', apiVersion)
} // }
// 可以多个接口域名,按需添加 // // 可以多个接口域名,按需添加
console.log('环境:', process.env.VUE_APP_FLAG) // console.log('环境:', process.env.VUE_APP_FLAG)
switch (process.env.VUE_APP_FLAG) { switch (process.env.VUE_APP_FLAG) {
case 'dev': case 'dev':
apiDomain = 'https://iagentsales-test2.e-guofu.com:5200/api/' + apiVersion // 国富api ///api/v1 apiDomain = 'https://iagentsales-test2.e-guofu.com:5200/api/' + apiVersion // 国富api ///api/v1

View File

@@ -690,7 +690,7 @@ export default {
this.cvalidateFlag = this.activeType && this.isFrom != 'proposal' this.cvalidateFlag = this.activeType && this.isFrom != 'proposal'
//构建提交数据、渲染险种 //构建提交数据、渲染险种
if(this.$route.query.insuanceId && this.isFrom == 'proposal'){ if(this.$route.query.insuanceIdInfo && this.isFrom == 'proposal'){
// 获取试算记录详情 // 获取试算记录详情
let serialNo = '' let serialNo = ''
if (this.$route.query.orderNo) { if (this.$route.query.orderNo) {
@@ -699,9 +699,16 @@ export default {
if (this.$route.query.proposalOrderNo) { if (this.$route.query.proposalOrderNo) {
serialNo = this.$route.query.proposalOrderNo serialNo = this.$route.query.proposalOrderNo
} }
let thismyinsuanceIdInfo = JSON.parse(this.$route.query.insuanceIdInfo)
let insuanceId = ''
thismyinsuanceIdInfo.forEach(item=>{
if(item.isMainRisk == 0){
insuanceId = item.insuanceId
}
})
await getTrialRecordInfo({ await getTrialRecordInfo({
serialNo:serialNo, serialNo:serialNo,
mainRiskId:this.$route.query.insuanceId mainRiskId:insuanceId
}).then(res => { }).then(res => {
if (res.result == '0') { if (res.result == '0') {
this.chooseProducts = JSON.parse(res.content.trialJsonStr) this.chooseProducts = JSON.parse(res.content.trialJsonStr)
@@ -2702,16 +2709,17 @@ export default {
let [mainRiskCode, riskDTOLst] = ['', []] let [mainRiskCode, riskDTOLst] = ['', []]
let rollInResult = '' //校验预计转入保费结果 let rollInResult = '' //校验预计转入保费结果
this.chooseProducts.forEach((item, index) => { this.chooseProducts.forEach((item, index) => {
console.log(item)
if (localStorage.trialList != '') { if (localStorage.trialList != '') {
if (item.isMainRisk == 0) { if (item.isMainRisk == 0) {
mainRiskCode = item.productCode mainRiskCode = item.productCode
} }
// this.trialInfos.map(trial=>{ let thismyinsuanceIdInfo = JSON.parse(this.$route.query.insuanceIdInfo)
// trial.duty.map(dutylist=> { let insuanceId = ''
// dutylist.dutyname thismyinsuanceIdInfo.forEach(item01=>{
// }) if(item01.isMainRisk == item.productCode){
// }) insuanceId = item01.insuanceId
}
})
let riskItem = { let riskItem = {
isMainRisk: item.isMainRisk, isMainRisk: item.isMainRisk,
riskName: item.riskName, riskName: item.riskName,
@@ -2722,7 +2730,7 @@ export default {
standPrem: this.trialList[index] && this.trialList[index].standPrem, standPrem: this.trialList[index] && this.trialList[index].standPrem,
predictTransferPrem: item.predictTransferPrem, predictTransferPrem: item.predictTransferPrem,
thirdInsuraceNo: this.policyNo, thirdInsuraceNo: this.policyNo,
insuanceId:this.$route.query.insuanceId //编辑时添加主险id insuanceId:insuanceId //编辑时添加主险id
// mult: this.mult // mult: this.mult
} }
if (item.hasPredictTransferPrem && item.hasPredictTransferPrem === '0') { if (item.hasPredictTransferPrem && item.hasPredictTransferPrem === '0') {

View File

@@ -23,7 +23,7 @@
</div> </div>
<div class="text-right pv5"> <div class="text-right pv5">
<!-- <van-button v-if="isFrom == 'proposal'" size="small" round @click="editInsure(index,item)" class="mr5" type="danger">编辑</van-button>--> <van-button v-if="isFrom == 'proposal'" size="small" round @click="editInsure(index,item)" class="mr5" type="danger">编辑</van-button>
<van-button size="small" round @click="deteleInsure(index)" plain type="danger">删除</van-button> <van-button size="small" round @click="deteleInsure(index)" plain type="danger">删除</van-button>
</div> </div>
</div> </div>
@@ -437,9 +437,9 @@ export default {
let isProposal = localStorage.isFrom == 'proposal' ? true : false let isProposal = localStorage.isFrom == 'proposal' ? true : false
let thismyurl = '' let thismyurl = ''
if (this.$route.query.orderNo) { if (this.$route.query.orderNo) {
thismyurl = '/common/calculatePremium/?orderNo=' + this.$route.query.orderNo + '&insuanceId='+insuanceId thismyurl = '/common/calculatePremium/?orderNo=' + this.$route.query.orderNo + '&insuanceIdInfo='+JSON.stringify(insuanceIdInfo)
} else if (this.$route.query.proposalOrderNo) { } else if (this.$route.query.proposalOrderNo) {
thismyurl = '/common/calculatePremium?proposalOrderNo=' + this.$route.query.proposalOrderNo + '&insuanceId='+insuanceId thismyurl = '/common/calculatePremium?proposalOrderNo=' + this.$route.query.proposalOrderNo + '&insuanceIdInfo='+JSON.stringify(insuanceIdInfo)
} }
if (isProposal) { if (isProposal) {
this.$jump({ this.$jump({