update: 消息类型跳转相关
This commit is contained in:
parent
9110ec39c1
commit
28230fe3af
|
@ -10,7 +10,7 @@
|
|||
:height="0"
|
||||
:isLoading="pageList.isLoading"
|
||||
>
|
||||
<view class="msg-box">
|
||||
<view class="msg-box" v-if="pageList.list.length > 0">
|
||||
<view class="u-page">
|
||||
<u-list>
|
||||
<u-list-item v-for="(item, index) in pageList.list" :key="index">
|
||||
|
@ -37,6 +37,7 @@
|
|||
<script setup lang="ts">
|
||||
import PageView from "@/components/PageView/index.vue";
|
||||
import { MessageApi } from "@/services";
|
||||
import { MsgType } from "@/utils/enum";
|
||||
const pageList: PageResult<any> = reactive({
|
||||
isLoading: false,
|
||||
noMoreData: false,
|
||||
|
@ -83,14 +84,31 @@ const getList = (v?: boolean) => {
|
|||
|
||||
const handleItem = (item: any) => {
|
||||
if (item.status === 0) {
|
||||
MessageApi.readNotice({ids: [item.id]}).then(res => {
|
||||
MessageApi.readNotice({ ids: [item.id] }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
resetPageList();
|
||||
getList();
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
if (MsgType.ToBePriced === item.msgType) {
|
||||
uni.navigateTo({
|
||||
url: "/pagesReceive/pricing?scaleStatus=0", // 要跳转到的页面路径
|
||||
});
|
||||
} else if (MsgType.ToBeReview === item.msgType) {
|
||||
uni.navigateTo({
|
||||
url: "/pagesReceive/payReview?scaleStatus=2", // 要跳转到的页面路径
|
||||
});
|
||||
} else if (MsgType.ToBeShipment === item.msgType) {
|
||||
uni.navigateTo({
|
||||
url: "/pagesShipment/shipmenting?scaleStatus=0", // 要跳转到的页面路径
|
||||
});
|
||||
} else if (MsgType.ToBeShipmentReview === item.msgType) {
|
||||
uni.navigateTo({
|
||||
url: "/pagesShipment/shipmentSettlement?scaleStatus=2", // 要跳转到的页面路径
|
||||
});
|
||||
}
|
||||
};
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
@ -99,7 +117,6 @@ onMounted(() => {
|
|||
.msg-box {
|
||||
background: #f8f8f8;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.title {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN;
|
||||
|
|
|
@ -95,7 +95,7 @@ const handleModal = (v: boolean, id: number) => {
|
|||
deleteId.value = id;
|
||||
};
|
||||
const handleScenePhoto = (imagesId: number) => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: `/pagesScenePhoto/index?orderType=1&id=${imagesId}&imagesType=1`, // 要跳转到的页面路径
|
||||
});
|
||||
};
|
||||
|
|
|
@ -95,3 +95,11 @@ export enum TimeRange {
|
|||
Year = 4,
|
||||
Custom = 5
|
||||
}
|
||||
|
||||
// 消息跳转类型 0=收货待定价1=收货待审核2=待出库3=出库审核
|
||||
export enum MsgType {
|
||||
ToBePriced = 0,
|
||||
ToBeReview = 1,
|
||||
ToBeShipment = 2,
|
||||
ToBeShipmentReview = 3
|
||||
}
|
Loading…
Reference in New Issue