mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-23 23:42:52 +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 {
|
export default {
|
||||||
name: 'saleList',
|
name: 'saleList',
|
||||||
computed: {
|
computed: {
|
||||||
|
ORDER_STATUS() {
|
||||||
|
return ORDER_STATUS
|
||||||
|
},
|
||||||
LIST_TYPE() {
|
LIST_TYPE() {
|
||||||
return LIST_TYPE
|
return LIST_TYPE
|
||||||
}
|
}
|
||||||
@@ -40,6 +43,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/**
|
||||||
|
* 初始化列表数据
|
||||||
|
* @returns {Promise<void>}
|
||||||
|
*/
|
||||||
async fetchListData() {
|
async fetchListData() {
|
||||||
const params = {
|
const params = {
|
||||||
pageNum: this.currentPage,
|
pageNum: this.currentPage,
|
||||||
@@ -76,9 +83,11 @@ export default {
|
|||||||
async goDetail() {},
|
async goDetail() {},
|
||||||
|
|
||||||
//新增
|
//新增
|
||||||
navigateDataCollection() {
|
navigateDataCollection(orderStatus) {
|
||||||
|
const pathName = orderStatus === ORDER_STATUS.referred.value ? 'UnderwritingSupplementaryInformation' : 'UnderwritingDataCollection'
|
||||||
navigateRouter({
|
navigateRouter({
|
||||||
name: 'UnderwritingDataCollection'
|
name: pathName,
|
||||||
|
params: { orderStatus }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -104,10 +113,15 @@ export default {
|
|||||||
error-text="请求失败,点击重新加载"
|
error-text="请求失败,点击重新加载"
|
||||||
@load="loadMore"
|
@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>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<script>
|
<script>
|
||||||
import UnderwritingCollectionMedias from '@/views/ebiz/underwriting/components/UnderwritingCollection/UnderwritingCollectionMedias.vue'
|
import UnderwritingDataCollection from '@/views/ebiz/underwriting/UnderwritingDataCollection.vue'
|
||||||
import { Button } from 'vant'
|
import { Button, Sticky } from 'vant'
|
||||||
export default {
|
export default {
|
||||||
name: '',
|
name: 'supplementaryInformation',
|
||||||
components: { UnderwritingCollectionMedias, Button },
|
components: { UnderwritingDataCollection, Button, Sticky },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
@@ -17,23 +17,33 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="supplementary-document-container mt10 mh20">
|
<div class="supplementary-document-container ph20">
|
||||||
<div aria-live="polite" class="alert alert-warning" role="alert">
|
<Sticky>
|
||||||
请您补充关于处方明细的影像资料
|
<div aria-live="polite" class="alert alert-warning" role="alert">
|
||||||
</div>
|
请您补充关于处方明细的影像资料
|
||||||
<UnderwritingCollectionMedias :files="mediaDTOS" :isSupplementary="true" class="mt20 medias" />
|
</div>
|
||||||
|
</Sticky>
|
||||||
|
<UnderwritingDataCollection class="supplementary-document-content" />
|
||||||
<Button block class="submit-btn bottom-btn mt20" color="#E9322E">提交</Button>
|
<Button block class="submit-btn bottom-btn mt20" color="#E9322E">提交</Button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.supplementary-document-container {
|
.supplementary-document-container {
|
||||||
|
background-color: #fff;
|
||||||
|
height: 100vh;
|
||||||
.alert {
|
.alert {
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
margin: -10px -20px;
|
margin: 0 -20px;
|
||||||
}
|
}
|
||||||
.alert-warning {
|
.alert-warning {
|
||||||
background-color: #fef2d3;
|
background-color: #fef2d3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.supplementary-document-content {
|
||||||
|
height: unset !important;
|
||||||
|
width: unset !important;
|
||||||
|
padding: unset !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -13,7 +13,8 @@
|
|||||||
import filter from '@/filters'
|
import filter from '@/filters'
|
||||||
import { getRelatedData } from '@/views/ebiz/agentEenter/js/methods'
|
import { getRelatedData } from '@/views/ebiz/agentEenter/js/methods'
|
||||||
import FieldSelect from '@/views/ebiz/underwriting/components/FieldSelect.vue'
|
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 GField from './components/GField.vue'
|
||||||
import { Button } from 'vant'
|
import { Button } from 'vant'
|
||||||
import SexRadio from '@/views/ebiz/underwriting/components/SexRadio.vue'
|
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'
|
import UnderwritingCollectionMedias from '@/views/ebiz/underwriting/components/UnderwritingCollection/UnderwritingCollectionMedias.vue'
|
||||||
export default {
|
export default {
|
||||||
name: 'CollectionUnderwritingData',
|
name: 'CollectionUnderwritingData',
|
||||||
methods: { getRelatedData },
|
|
||||||
components: { FieldSelect, GField, SexRadio, FieldPicker, UnderwritingCollectionMedias, Button },
|
components: { FieldSelect, GField, SexRadio, FieldPicker, UnderwritingCollectionMedias, Button },
|
||||||
computed: {
|
computed: {
|
||||||
FIELD_SELECT_TYPE: () => FIELD_SELECT_TYPE,
|
FIELD_SELECT_TYPE: () => FIELD_SELECT_TYPE,
|
||||||
@@ -32,6 +32,33 @@ export default {
|
|||||||
this.idNo = void 0
|
this.idNo = void 0
|
||||||
this.data.user.idType = val
|
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() {
|
data() {
|
||||||
@@ -53,6 +80,17 @@ export default {
|
|||||||
*/
|
*/
|
||||||
mediaDTOS: []
|
mediaDTOS: []
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getRelatedData,
|
||||||
|
handleDataSubmit() {
|
||||||
|
this.navigateToList()
|
||||||
|
},
|
||||||
|
navigateToList() {
|
||||||
|
navigateRouter({
|
||||||
|
name: 'UnderwritingOrderList'
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -110,7 +148,7 @@ export default {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<UnderwritingCollectionMedias :files="mediaDTOS" class="medias" />
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,13 @@ export const FIELD_SELECT_TYPE = Object.freeze({
|
|||||||
})
|
})
|
||||||
|
|
||||||
export const ORDER_STATUS = Object.freeze({
|
export const ORDER_STATUS = Object.freeze({
|
||||||
|
/**
|
||||||
|
* 待核保
|
||||||
|
*/
|
||||||
|
pending: {
|
||||||
|
value: 'pending',
|
||||||
|
label: '待核保'
|
||||||
|
},
|
||||||
/* 标准体 */
|
/* 标准体 */
|
||||||
standard: {
|
standard: {
|
||||||
value: 'standard',
|
value: 'standard',
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export function navigateRouter({ path = '', name = '', title = '', params = {} }
|
|||||||
title: route.meta && route.meta.title ? route.meta.title : '',
|
title: route.meta && route.meta.title ? route.meta.title : '',
|
||||||
url: location.origin + '/#' + path + '?' + processJson(params)
|
url: location.origin + '/#' + path + '?' + processJson(params)
|
||||||
}
|
}
|
||||||
options.routerInfo = { path }
|
options.routerInfo = { ...options.routerInfo, path }
|
||||||
} else if (name) {
|
} else if (name) {
|
||||||
const route = routes.find(item => {
|
const route = routes.find(item => {
|
||||||
if (item.children) {
|
if (item.children) {
|
||||||
@@ -59,7 +59,7 @@ export function navigateRouter({ path = '', name = '', title = '', params = {} }
|
|||||||
url: location.origin + '/#' + route.path + '?' + processJson(params)
|
url: location.origin + '/#' + route.path + '?' + processJson(params)
|
||||||
}
|
}
|
||||||
|
|
||||||
options.routerInfo = { name }
|
options.routerInfo = { ...options.routerInfo, name }
|
||||||
}
|
}
|
||||||
|
|
||||||
jump(options)
|
jump(options)
|
||||||
|
|||||||
Reference in New Issue
Block a user