mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-16 06:26:44 +08:00
style(product): 格式化代码并优化逻辑结构
- 统一空格和缩进格式,提升代码可读性 - 注释掉未使用的缓存工具函数调用- 简化条件判断逻辑,移除冗余注释 - 修复字符串引号风格一致性问题 - 移除无用的 TODO 注释 - 调整 class 属性绑定顺序和条件表达式写法 - 清理重复且不必要的代码分支- 优化 localStorage 判断条件中的引号使用- 规范对象解构和变量命名方式 - 删除不再需要的状态标志位 nextStepFlag
This commit is contained in:
@@ -71,7 +71,7 @@
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="ml30 black">
|
||||
{{item.calFactorLst[riskFactorIndex].displayAmount}}
|
||||
{{ item.calFactorLst[riskFactorIndex].displayAmount }}
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
@@ -227,20 +227,20 @@
|
||||
class="ml30"
|
||||
input-width="100"
|
||||
@change="
|
||||
stepperChange(
|
||||
item.productTrialYearDTOS[payEndYearColumnsIndex].displayAmount,
|
||||
index,
|
||||
riskFactorIndex,
|
||||
item.productTrialYearDTOS[payEndYearColumnsIndex].minAmt || item.productTrialYearDTOS[payEndYearColumnsIndex].minPrem,
|
||||
item.productTrialYearDTOS[payEndYearColumnsIndex].maxAmt || item.productTrialYearDTOS[payEndYearColumnsIndex].maxPrem,
|
||||
item.productTrialYearDTOS[payEndYearColumnsIndex]
|
||||
)
|
||||
"
|
||||
stepperChange(
|
||||
item.productTrialYearDTOS[payEndYearColumnsIndex].displayAmount,
|
||||
index,
|
||||
riskFactorIndex,
|
||||
item.productTrialYearDTOS[payEndYearColumnsIndex].minAmt || item.productTrialYearDTOS[payEndYearColumnsIndex].minPrem,
|
||||
item.productTrialYearDTOS[payEndYearColumnsIndex].maxAmt || item.productTrialYearDTOS[payEndYearColumnsIndex].maxPrem,
|
||||
item.productTrialYearDTOS[payEndYearColumnsIndex]
|
||||
)
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="ml30 black">
|
||||
{{item.productTrialYearDTOS[payEndYearColumnsIndex].displayAmount}}
|
||||
{{ item.productTrialYearDTOS[payEndYearColumnsIndex].displayAmount }}
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
@@ -253,9 +253,9 @@
|
||||
<van-field
|
||||
v-model="riskFactor.showContent"
|
||||
:label="riskFactor.name"
|
||||
:right-icon="refer === 'detail' ? 'arrow' : ''"
|
||||
placeholder="请选择"
|
||||
readonly
|
||||
:right-icon="refer === 'detail'?'arrow' : ''"
|
||||
@click="toSelect(index, riskFactorIndex, riskFactor.columns)"
|
||||
/>
|
||||
</div>
|
||||
@@ -387,7 +387,8 @@
|
||||
item.productCode != 'GFRS_M0085' &&
|
||||
trialList[index]
|
||||
"
|
||||
class="flex pv10 border-bottom prem" :class="refer==='detail' ? 'justify-content-s':'' "
|
||||
:class="refer === 'detail' ? 'justify-content-s' : ''"
|
||||
class="flex pv10 border-bottom prem"
|
||||
>
|
||||
<!-- trialType 0-保额算保费,1-保费算保额 -->
|
||||
<!-- isTrial是否需存在特殊配置(规则) 0-是 1-否-->
|
||||
@@ -563,7 +564,6 @@ export default {
|
||||
trialInfos: [],
|
||||
influenceAddRiskCodes: [],
|
||||
influences: [],
|
||||
// todo: 可以到时候改成计算属性,防止出现状态异常的问题
|
||||
nextStepFlag: false,
|
||||
isRelated: localStorage.isRelated === '0', //关联保单号
|
||||
policyNo: '', // 保单号
|
||||
@@ -681,25 +681,26 @@ export default {
|
||||
/** 初始化用户详情信息 */
|
||||
initPersonInfo() {
|
||||
if (this.personMessageInfo) return
|
||||
const { getLocItem, setLocItem } = cacheUtils
|
||||
const saleInsuredInfo = getLocItem('saleInsuredInfo')
|
||||
const saleInsuredPersonInfo = getLocItem('saleInsuredPersonInfo')
|
||||
// const { getLocItem, setLocItem } = cacheUtils
|
||||
// const saleInsuredInfo = getLocItem('saleInsuredInfo')
|
||||
// const saleInsuredPersonInfo = getLocItem('saleInsuredPersonInfo')
|
||||
// 如果本地存在之前编辑过的数据, 优先采用这个,如果没有数据,就从网络获取
|
||||
if (!(saleInsuredInfo && saleInsuredPersonInfo)) {
|
||||
this.saleInsuredInfo = JSON.parse(saleInsuredInfo)
|
||||
this.saleInsuredPersonInfo = JSON.parse(saleInsuredPersonInfo)
|
||||
} else {
|
||||
const orderNo = this.$route.query.orderNo
|
||||
// if (!(saleInsuredInfo && saleInsuredPersonInfo)) {
|
||||
// if (false){
|
||||
// this.saleInsuredInfo = JSON.parse(saleInsuredInfo)
|
||||
// this.saleInsuredPersonInfo = JSON.parse(saleInsuredPersonInfo)
|
||||
// } else {
|
||||
const orderNo = this.$route.query.orderNo
|
||||
|
||||
getOrderDetail({ orderNo }).then(({ orderDTO }) => {
|
||||
const { appntDTO, insuredDTOs } = orderDTO
|
||||
const [insuredPersonInfo] = insuredDTOs
|
||||
this.saleInsuredInfo = { ...this.saleInsuredInfo, ...appntDTO }
|
||||
setLocItem('saleInsuredInfo', JSON.stringify(appntDTO))
|
||||
this.saleInsuredPersonInfo = { ...this.saleInsuredPersonInfo, ...insuredPersonInfo }
|
||||
setLocItem('saleInsuredPersonInfo', JSON.stringify(insuredPersonInfo))
|
||||
})
|
||||
}
|
||||
getOrderDetail({ orderNo }).then(({ orderDTO }) => {
|
||||
const { appntDTO, insuredDTOs } = orderDTO
|
||||
const [insuredPersonInfo] = insuredDTOs
|
||||
this.saleInsuredInfo = { ...this.saleInsuredInfo, ...appntDTO }
|
||||
// setLocItem('saleInsuredInfo', JSON.stringify(appntDTO))
|
||||
this.saleInsuredPersonInfo = { ...this.saleInsuredPersonInfo, ...insuredPersonInfo }
|
||||
// setLocItem('saleInsuredPersonInfo', JSON.stringify(insuredPersonInfo))
|
||||
})
|
||||
// }
|
||||
},
|
||||
appCallBack(data) {
|
||||
if (data.trigger === 'right_button_click' && localStorage.isFrom === 'proposal') {
|
||||
@@ -979,7 +980,7 @@ export default {
|
||||
//构建险种数组
|
||||
let productsData
|
||||
/**在不添加 this.refer !== "flow" 之前, 会意外的出现显示两个主险。此只针对当处于流程录入的时候 ,不处理额外信息*/
|
||||
if (localStorage.chooseProducts && this.refer !== "flow") {
|
||||
if (localStorage.chooseProducts && this.refer !== 'flow') {
|
||||
productsData = JSON.parse(localStorage.chooseProducts)
|
||||
productsData.push(currentProductInfo)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user