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