mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-23 17:55:49 +08:00
feat(underwriting): 新增待核保状态并优化路由跳转逻辑
- 在 ORDER_STATUS 常量中新增 pending(待核保)状态 - 修复 navigateRouter 中 routerInfo 被覆盖的问题,使用对象展开保留原有属性 - 在 OrderList 组件中引入 ORDER_STATUS 并优化 navigateDataCollection 方法支持传递订单状态 - 更新 SupplementaryInformation 页面结构,引入 Sticky 组件优化提示信息展示 - 在 UnderwritingDataCollection 页面根据订单状态动态显示不同操作按钮及文案 - 调整页面样式确保组件布局适配新功能需求
This commit is contained in:
@@ -8,6 +8,9 @@ import { Search, Tabs, Tab, List, Sticky, Button } from 'vant'
|
||||
export default {
|
||||
name: 'saleList',
|
||||
computed: {
|
||||
ORDER_STATUS() {
|
||||
return ORDER_STATUS
|
||||
},
|
||||
LIST_TYPE() {
|
||||
return LIST_TYPE
|
||||
}
|
||||
@@ -40,6 +43,10 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 初始化列表数据
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async fetchListData() {
|
||||
const params = {
|
||||
pageNum: this.currentPage,
|
||||
@@ -76,9 +83,11 @@ export default {
|
||||
async goDetail() {},
|
||||
|
||||
//新增
|
||||
navigateDataCollection() {
|
||||
navigateDataCollection(orderStatus) {
|
||||
const pathName = orderStatus === ORDER_STATUS.referred.value ? 'UnderwritingSupplementaryInformation' : 'UnderwritingDataCollection'
|
||||
navigateRouter({
|
||||
name: 'UnderwritingDataCollection'
|
||||
name: pathName,
|
||||
params: { orderStatus }
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -104,10 +113,15 @@ export default {
|
||||
error-text="请求失败,点击重新加载"
|
||||
@load="loadMore"
|
||||
>
|
||||
<OrderListCard v-for="(_, index) in 10" :key="index" :type="types[index % types.length]"></OrderListCard>
|
||||
<OrderListCard
|
||||
v-for="(_, index) in 10"
|
||||
:key="index"
|
||||
:type="type === LIST_TYPE.unreviewed ? ORDER_STATUS.pending.value : types[index % types.length]"
|
||||
@click.native="navigateDataCollection(type === LIST_TYPE.unreviewed ? ORDER_STATUS.pending.value : types[index % types.length])"
|
||||
></OrderListCard>
|
||||
</van-list>
|
||||
|
||||
<Button v-no-more-click="1000" class="submit-btn bottom-btn mt20" type="danger" @click="navigateDataCollection">点我新增</Button>
|
||||
<Button v-no-more-click="1000" class="submit-btn bottom-btn mt20" type="danger" @click="navigateDataCollection()">点我新增</Button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script>
|
||||
import UnderwritingCollectionMedias from '@/views/ebiz/underwriting/components/UnderwritingCollection/UnderwritingCollectionMedias.vue'
|
||||
import { Button } from 'vant'
|
||||
import UnderwritingDataCollection from '@/views/ebiz/underwriting/UnderwritingDataCollection.vue'
|
||||
import { Button, Sticky } from 'vant'
|
||||
export default {
|
||||
name: '',
|
||||
components: { UnderwritingCollectionMedias, Button },
|
||||
name: 'supplementaryInformation',
|
||||
components: { UnderwritingDataCollection, Button, Sticky },
|
||||
data() {
|
||||
return {
|
||||
/**
|
||||
@@ -17,23 +17,33 @@ export default {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="supplementary-document-container mt10 mh20">
|
||||
<div aria-live="polite" class="alert alert-warning" role="alert">
|
||||
请您补充关于处方明细的影像资料
|
||||
</div>
|
||||
<UnderwritingCollectionMedias :files="mediaDTOS" :isSupplementary="true" class="mt20 medias" />
|
||||
<div class="supplementary-document-container ph20">
|
||||
<Sticky>
|
||||
<div aria-live="polite" class="alert alert-warning" role="alert">
|
||||
请您补充关于处方明细的影像资料
|
||||
</div>
|
||||
</Sticky>
|
||||
<UnderwritingDataCollection class="supplementary-document-content" />
|
||||
<Button block class="submit-btn bottom-btn mt20" color="#E9322E">提交</Button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.supplementary-document-container {
|
||||
background-color: #fff;
|
||||
height: 100vh;
|
||||
.alert {
|
||||
padding: 10px 20px;
|
||||
margin: -10px -20px;
|
||||
margin: 0 -20px;
|
||||
}
|
||||
.alert-warning {
|
||||
background-color: #fef2d3;
|
||||
}
|
||||
|
||||
.supplementary-document-content {
|
||||
height: unset !important;
|
||||
width: unset !important;
|
||||
padding: unset !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
import filter from '@/filters'
|
||||
import { getRelatedData } from '@/views/ebiz/agentEenter/js/methods'
|
||||
import FieldSelect from '@/views/ebiz/underwriting/components/FieldSelect.vue'
|
||||
import { FIELD_SELECT_TYPE, SEX } from '@/views/ebiz/underwriting/js/const'
|
||||
import { FIELD_SELECT_TYPE, ORDER_STATUS, SEX } from '@/views/ebiz/underwriting/js/const'
|
||||
import { navigateRouter } from '@/views/ebiz/underwriting/js/navigate'
|
||||
import GField from './components/GField.vue'
|
||||
import { Button } from 'vant'
|
||||
import SexRadio from '@/views/ebiz/underwriting/components/SexRadio.vue'
|
||||
@@ -21,7 +22,6 @@ import FieldPicker from '@/views/ebiz/underwriting/components/FieldPicker.vue'
|
||||
import UnderwritingCollectionMedias from '@/views/ebiz/underwriting/components/UnderwritingCollection/UnderwritingCollectionMedias.vue'
|
||||
export default {
|
||||
name: 'CollectionUnderwritingData',
|
||||
methods: { getRelatedData },
|
||||
components: { FieldSelect, GField, SexRadio, FieldPicker, UnderwritingCollectionMedias, Button },
|
||||
computed: {
|
||||
FIELD_SELECT_TYPE: () => FIELD_SELECT_TYPE,
|
||||
@@ -32,6 +32,33 @@ export default {
|
||||
this.idNo = void 0
|
||||
this.data.user.idType = val
|
||||
}
|
||||
},
|
||||
executeBtn() {
|
||||
const orderStatus = this.$route.query.orderStatus
|
||||
|
||||
const isShow = orderStatus !== ORDER_STATUS.pending.value
|
||||
|
||||
switch (orderStatus) {
|
||||
case ORDER_STATUS.standard.value:
|
||||
return {
|
||||
label: '去投保',
|
||||
fn: () => console.log('去投保'),
|
||||
isShow
|
||||
}
|
||||
case ORDER_STATUS.declined.value:
|
||||
case ORDER_STATUS.postponed.value: {
|
||||
return {
|
||||
label: '查看结果',
|
||||
fn: () => console.log('查看结果'),
|
||||
isShow
|
||||
}
|
||||
}
|
||||
}
|
||||
return {
|
||||
label: '提交预核保',
|
||||
fn: this.handleDataSubmit,
|
||||
isShow
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -53,6 +80,17 @@ export default {
|
||||
*/
|
||||
mediaDTOS: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getRelatedData,
|
||||
handleDataSubmit() {
|
||||
this.navigateToList()
|
||||
},
|
||||
navigateToList() {
|
||||
navigateRouter({
|
||||
name: 'UnderwritingOrderList'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -110,7 +148,7 @@ export default {
|
||||
/>
|
||||
</div>
|
||||
<UnderwritingCollectionMedias :files="mediaDTOS" class="medias" />
|
||||
<Button block class="bottom-btn submit-btn mt20" color="#E9322E">提交预核保</Button>
|
||||
<Button v-if="executeBtn.isShow" block class="bottom-btn submit-btn mt20" color="#E9322E" @click="executeBtn.fn">{{ executeBtn.label }}</Button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -13,6 +13,13 @@ export const FIELD_SELECT_TYPE = Object.freeze({
|
||||
})
|
||||
|
||||
export const ORDER_STATUS = Object.freeze({
|
||||
/**
|
||||
* 待核保
|
||||
*/
|
||||
pending: {
|
||||
value: 'pending',
|
||||
label: '待核保'
|
||||
},
|
||||
/* 标准体 */
|
||||
standard: {
|
||||
value: 'standard',
|
||||
|
||||
@@ -36,7 +36,7 @@ export function navigateRouter({ path = '', name = '', title = '', params = {} }
|
||||
title: route.meta && route.meta.title ? route.meta.title : '',
|
||||
url: location.origin + '/#' + path + '?' + processJson(params)
|
||||
}
|
||||
options.routerInfo = { path }
|
||||
options.routerInfo = { ...options.routerInfo, path }
|
||||
} else if (name) {
|
||||
const route = routes.find(item => {
|
||||
if (item.children) {
|
||||
@@ -59,7 +59,7 @@ export function navigateRouter({ path = '', name = '', title = '', params = {} }
|
||||
url: location.origin + '/#' + route.path + '?' + processJson(params)
|
||||
}
|
||||
|
||||
options.routerInfo = { name }
|
||||
options.routerInfo = { ...options.routerInfo, name }
|
||||
}
|
||||
|
||||
jump(options)
|
||||
|
||||
Reference in New Issue
Block a user