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