guoyujia 3 ay önce
ebeveyn
işleme
ab06c9907b

+ 8 - 1
api/dict/dict.js

@@ -6,7 +6,14 @@ import req from '../../utils/request.js'
  */
 export function getDictInfoByType(data) {
 	return req.request({
-		url:'/system/dict/data/type/' + data,
+		url: '/system/dict/data/type/' + data,
 		method: 'GET',
 	})
 }
+export function getDictInfoByTypes(data) {
+	return req.request({
+		url: '/system/dict/data/dictTypes',
+		method: 'POST',
+		data: data
+	})
+}

+ 39 - 11
components/dialog-end-work/dialog-end-work.vue

@@ -27,6 +27,11 @@
 				<switch class="switch" @change="switchChange" color="rgba(103, 195, 55, 1.0)" />
 				<text>是</text>
 			</view>
+			<view class="list-title uni-row" v-if="workInfo.status == 3">
+				<text class="label">废品损失率</text>
+				<view class="uni-row" style="justify-content: flex-end;"><text class="label">{{rejectRatio}}</text>
+				</view>
+			</view>
 			<view v-if="showCarrierList && !store.isPreProcess" class="confirmCarrier">
 				<text class="label">确认载具</text>
 				<view class="vehicleList uni-row">
@@ -70,12 +75,12 @@
 		timestampToTime,
 		toHHmmss
 	} from '@/utils/common.js'
-	import {
-		getDictInfoByType
-	} from '@/api/dict/dict.js'
 	import {
 		getSpecialDeptProcessList
 	} from '@/api/business/deptProcess.js'
+	import {
+		getDictInfoByType
+	} from '@/api/dict/dict.js'
 	import {
 		debounce
 	} from '@/utils/common.js'
@@ -89,6 +94,8 @@
 	const workInfo = ref({})
 	const wasteInfo = ref([])
 	const reasonList = ref([])
+	const qualifiedNumRatio = ref(1)
+	const rejectRatio = ref(0)
 	const emit = defineEmits(['resflushItem'])
 	const showCarrierList = ref(false) // 工序是否完成显示载具列表
 	const bindList = ref([])
@@ -112,6 +119,8 @@
 			...data,
 		};
 		console.log("数据data", workInfo);
+		//获取报工数量限制
+		getReportLimit()
 		//查看是否为首序
 		getIsFirst(store.dayworkInfo.id);
 		workInfo.value.qualifiedNum = 0;
@@ -156,6 +165,17 @@
 		baseDialog.value.close()
 	}
 
+	function getReportLimit() {
+		getDictInfoByType("report_up_limit").then(res => {
+			if (res.data && res.data.length > 0) {
+				qualifiedNumRatio.value = parseInt(res.data[0].dictValue)
+			}
+		}).catch(err => {
+			console.log(err)
+			console.log('369 err')
+		})
+	}
+
 	function getIsFirst(dayworkId) {
 		getIsFirstOrder(dayworkId).then(res => {
 			if (res.code == 200) {
@@ -220,6 +240,16 @@
 
 	function handleInputQualifiedNum() {
 		workInfo.value.qualifiedNum = workInfo.value.qualifiedNum.replace(/^-+|[^\d]/g, '');
+		let temQualifiedNum = workInfo.value.qualifiedNum
+		if (workInfo.value.qualifiedNum === null || workInfo.value.qualifiedNum === '') {
+			temQualifiedNum = 0
+		}
+		//计算损失率
+		let sunm = parseInt(temQualifiedNum) + lotPreSumQualifiedNum.value; //计算总合格数
+		rejectRatio.value = (((parseInt(workInfo.value.prodNum) - sunm) / parseInt(workInfo.value.prodNum)) *
+			100).toFixed(2) + '%';
+		console.log(((parseInt(temQualifiedNum) - sunm) / parseInt(temQualifiedNum)) *
+			100)
 	}
 
 	function handleInputRejectNum(item) {
@@ -356,9 +386,7 @@
 			.processQualifiedNum;
 		workInfo.value.prodNum = number
 
-		let max = parseInt(number * 1.03);
-		// max = parseInt(String(max).split("."));
-		console.log("maxawdjkkaljdalkw", max);
+		let max = parseInt(number * (qualifiedNumRatio.value / 100));
 		let sunm = parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value; //计算总合格数
 		let percent = (sunm / number) * 100; //合格率
 
@@ -366,7 +394,7 @@
 		console.log("合格量", percent)
 		// let percent = (((parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value) / number) * 100).toFixed(2);
 
-		let num = 103;
+		let num = qualifiedNumRatio.value;
 		// 填入数大于剩余量情况
 		if (parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value - number > 0) {
 			// 判断当前是否为首序
@@ -414,12 +442,12 @@
 		let number = workInfo.value.prodNum;
 		let percent = (((parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value) / number) * 100).toFixed(
 			2);
-		let num = 103;
+		let num = qualifiedNumRatio.value;
 		//lotPreSumQualifiedNum当前序的所有合格数
 		if (parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value - number > 0) {
 			if (isFirstOrder.value) {
-				if (percent == 103) {
-					percent = 103.1
+				if (percent == qualifiedNumRatio.value) {
+					percent = qualifiedNumRatio.value
 				}
 				uni.showModal({
 					title: '提示',
@@ -445,7 +473,7 @@
 				})
 			} else {
 				if (percent == num) {
-					percent = 103.01
+					percent = qualifiedNumRatio.value
 				}
 				if (percent > num) {
 					uni.showToast({

+ 1 - 1
components/dialog-lot/dialog-lot.vue

@@ -25,7 +25,7 @@
 					<text class="label value">{{item['daywork'].temporaryProcessQualifiedNum}}</text>
 				</view>
 				<view class="list-container-item uni-row" style="border-radius: 0 0 8rpx 8rpx;">
-					<text class="label">已完成工序</text>
+					<text class="label">当前工序</text>
 					<text class="label value">{{item['process'].processAlias}}</text>
 				</view>
 			</view>

+ 1 - 1
components/dialog-lotInfo/dialog-lotInfo.vue

@@ -143,7 +143,7 @@
 		let place = item.dayworkItemList[0].place == "" ? item.dayworkItemList[0].turnoverArea == "" ?
 			'-' : item.dayworkItemList[0].turnoverArea : item.dayworkItemList[0].place
 		let deptName = item.dayworkItemList[0].deptName
-		return place == "-" ? deptName + "-" : deptName + "-" + place
+		return place == "-" ? deptName == "" ? "-" : deptName : deptName + "-" + place
 	}
 
 	function close() {

+ 1 - 1
components/dialog-outsourceLot/dialog-outsourceLot.vue

@@ -25,7 +25,7 @@
 					<text class="label value">{{item['daywork'].temporaryProcessQualifiedNum}}</text>
 				</view>
 				<view class="list-container-item uni-row" style="border-radius: 0 0 8rpx 8rpx;">
-					<text class="label">已完成工序</text>
+					<text class="label">当前工序</text>
 					<text class="label value">{{item['process'].processAlias}}</text>
 				</view>
 			</view>

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "(测试)德迈仕数字生产管理平台",
     "appid" : "__UNI__54D8B02",
     "description" : "",
-    "versionName" : "1.0.36",
-    "versionCode" : 136,
+    "versionName" : "1.0.41",
+    "versionCode" : 141,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 1 - 1
pages/assistDaywork/index.vue

@@ -273,7 +273,7 @@
 		let place = item.dayworkItemList[0].place == "" ? item.dayworkItemList[0].turnoverArea == "" ?
 			'-' : item.dayworkItemList[0].turnoverArea : item.dayworkItemList[0].place
 		let deptName = item.dayworkItemList[0].deptName
-		return place == "-" ? deptName + "-" : deptName + "-" + place
+		return place == "-" ? deptName == "" ? "-" : deptName : deptName + "-" + place
 	}
 	//扫码
 	function handleScan() {

+ 1 - 3
pages/batchReporting/index.vue

@@ -276,13 +276,11 @@
 		let place = item.dayworkItemList[0].place == "" ? item.dayworkItemList[0].turnoverArea == "" ?
 			'-' : item.dayworkItemList[0].turnoverArea : item.dayworkItemList[0].place
 		let deptName = item.dayworkItemList[0].deptName
-		return place == "-" ? deptName + "-" : deptName + "-" + place
+		return place == "-" ? deptName == "" ? "-" : deptName : deptName + "-" + place
 	}
 
 	onShow(() => {
 		reflush();
-
-
 	})
 
 	;

+ 1 - 1
pages/batchReportingOutsource/index.vue

@@ -260,7 +260,7 @@
 		let place = item.dayworkItemList[0].place == "" ? item.dayworkItemList[0].turnoverArea == "" ?
 			'-' : item.dayworkItemList[0].turnoverArea : item.dayworkItemList[0].place
 		let deptName = item.dayworkItemList[0].deptName
-		return place == "-" ? deptName + "-" : deptName + "-" + place
+		return place == "-" ? deptName == "" ? "-" : deptName : deptName + "-" + place
 	}
 
 	// 页面下拉刷新操作

+ 51 - 2
pages/notification/index.vue

@@ -2,7 +2,15 @@
 	<view class="informantion_mask">
 		<view class="informantion_content" @tap.stop.prevent>
 			<view class="informantion-title">
-				<p class="informantion-title-p">公告</p>
+				<view>
+					<view @click="showCloseempty" style="height: 10%;">
+						<p class="informantion-title-p">公告</p>
+					</view>
+					<view v-if="showClose >2" class="close-btn uni-column">
+						<uni-icons class="icon-gear" type="closeempty" size="30" style="z-index: 5;"
+							@click="close"></uni-icons>
+					</view>
+				</view>
 				<div v-html="message" class="informantion-title-span"></div>
 				<!-- {{message}} -->
 			</view>
@@ -24,13 +32,15 @@
 		onReady,
 		onUnload,
 		onShow,
-		onReachBottom
+		onReachBottom,
+		onBackPress
 	} from '@dcloudio/uni-app'
 
 	import {
 		store
 	} from '@/store/index.js'
 	const message = ref('')
+	const showClose = ref(0)
 	onMounted(() => {
 		uni.hideLoading();
 		const instance = getCurrentInstance().proxy
@@ -44,6 +54,24 @@
 		})
 
 	})
+	onMounted((options) => {
+		console.log('from:' + options.from)
+	})
+
+
+	function showCloseempty() {
+		showClose.value += 1
+	}
+
+	function close() {
+		store.isNotification = true
+		let pages = getCurrentPages();
+
+		uni.navigateBack({
+			delta: pages.length - 2
+		});
+		console.log(pages)
+	}
 </script>
 
 <style lang="scss">
@@ -65,6 +93,7 @@
 	.informantion_content {
 		width: 600rpx;
 		height: 820rpx;
+		// height: 70%;
 		overflow: hidden;
 		border-radius: 10rpx;
 		background-color: white;
@@ -74,6 +103,12 @@
 		padding-bottom: 20rpx;
 	}
 
+	.informantion-title-span {
+		height: 82%;
+		overflow: auto;
+		margin-bottom: -20px;
+	}
+
 	.mask-header {
 		height: 400rpx;
 		position: relative;
@@ -90,7 +125,21 @@
 		}
 	}
 
+	.close-btn {
+		position: absolute;
+		right: 24rpx;
+		top: 24rpx;
+		width: 40rpx;
+		height: 40rpx;
+		z-index: 1003;
+
+		.close-btn-icon {
+			width: 40rpx;
+		}
+	}
+
 	.informantion-title {
+		overflow: auto;
 		text-align: center;
 		padding: 0 40rpx;
 

+ 1 - 1
pages/queryLotInfo/index.vue

@@ -592,7 +592,7 @@
 			'-' : item.dayworkItemList[item.dayworkItemList.length - 1].turnoverArea : item.dayworkItemList[item
 				.dayworkItemList.length - 1].place
 		let deptName = item.dayworkItemList[item.dayworkItemList.length - 1].deptName
-		return place == "-" ? deptName + "-" : deptName + "-" + place
+		return place == "-" ? deptName == "" ? "-" : deptName : deptName + "-" + place
 	}
 	const showStatusColor = (item) => {
 		// console.log(status)

+ 9 - 3
pages/sortBatchInnerReporting/index.vue

@@ -67,11 +67,11 @@
 						class="label right">{{item.prevProcess == null ?  item['productionQuantity']  : item['processQualifiedNum']}}</text>
 				</view>
 				<view class="item-info uni-row">
-					<text class="label">上道工序</text>
+					<text class="label">已完成工序</text>
 					<text class="label right">{{ item.prevProcess ? item['prevProcess'].processAlias : '-'}}</text>
 				</view>
 				<view class="item-info uni-row">
-					<text class="label">当前工序</text>
+					<text class="label">待加工工序</text>
 					<!-- <text
 						class="label right">{{ item.currentProcess ? item.prevProcess && item['currentProcess'].processAlias == item['prevProcess'].processAlias ? '-' : item['currentProcess'].processAlias : '-'}}</text> -->
 					<text class="label right">{{ item.currentProcess ?item['currentProcess'].processAlias : '-'}}</text>
@@ -90,7 +90,7 @@
 				</view> -->
 				<view v-if="notPreProcess" class="item-info uni-row">
 					<text class="label">所在区域</text>
-					<text class="label right">{{ item['place'] ? item['place'] : '-' }}</text>
+					<text class="label right">{{ getPlaceText(item) }}</text>
 				</view>
 				<view class="status-btn uni-row">
 					<view v-if="item.dayworkItemList[0].status < 3" class=" uni-row">
@@ -245,6 +245,12 @@
 		console.log(wasteRecyclingList.value.length)
 	})
 
+	function getPlaceText(item) {
+		let place = item.dayworkItemList[0].place == "" ? item.dayworkItemList[0].turnoverArea == "" ?
+			'-' : item.dayworkItemList[0].turnoverArea : item.dayworkItemList[0].place
+		let deptName = item.dayworkItemList[0].deptName
+		return place == "-" ? deptName == "" ? "-" : deptName : deptName + "-" + place
+	}
 
 	/**	
 	 * 监听下拉刷新

+ 9 - 4
pages/sortBatchReporting/index.vue

@@ -66,11 +66,11 @@
 						class="label right">{{item.prevProcess == null ?  item['productionQuantity']  : item['processQualifiedNum']}}</text>
 				</view>
 				<view class="item-info uni-row">
-					<text class="label">上道工序</text>
+					<text class="label">已完成工序</text>
 					<text class="label right">{{ item.prevProcess ? item['prevProcess'].processAlias : '-'}}</text>
 				</view>
 				<view class="item-info uni-row">
-					<text class="label">当前工序</text>
+					<text class="label">待加工工序</text>
 					<!-- <text
 						class="label right">{{ item.currentProcess ? item.prevProcess && item['currentProcess'].processAlias == item['prevProcess'].processAlias ? '-' : item['currentProcess'].processAlias : '-'}}</text> -->
 					<text class="label right">{{ item.currentProcess ?item['currentProcess'].processAlias : '-'}}</text>
@@ -88,7 +88,7 @@
 				</view> -->
 				<view v-if="notPreProcess" class="item-info uni-row">
 					<text class="label">所在区域</text>
-					<text class="label right">{{ item['place'] ? item['place'] : '-' }}</text>
+					<text class="label right">{{ getPlaceText(item) }}</text>
 				</view>
 				<view class="status-btn uni-row">
 					<view v-if="item.dayworkItemList[0].status < 3" class=" uni-row">
@@ -248,7 +248,12 @@
 		console.log(wasteRecyclingList.value.length)
 	})
 
-
+	function getPlaceText(item) {
+		let place = item.dayworkItemList[0].place == "" ? item.dayworkItemList[0].turnoverArea == "" ?
+			'-' : item.dayworkItemList[0].turnoverArea : item.dayworkItemList[0].place
+		let deptName = item.dayworkItemList[0].deptName
+		return place == "-" ? deptName == "" ? "-" : deptName : deptName + "-" + place
+	}
 	/**	
 	 * 监听下拉刷新
 	 */

+ 150 - 33
pages/sorting/form.vue

@@ -178,7 +178,8 @@
 		getTakeStockPeriod
 	} from '@/api/business/taksStackLot.js'
 	import {
-		getDictInfoByType
+		getDictInfoByType,
+		getDictInfoByTypes
 	} from '@/api/dict/dict.js'
 	import {
 		onLoad,
@@ -207,7 +208,8 @@
 	const storageNum = ref(null)
 	const type = ref(null)
 	const storageInfo = ref(null)
-	const qualifiedNumRatio = ref(0)
+	const qualifiedNumUpRatio = ref(0)
+	const qualifiedNumDownRatio = ref(0)
 	const isFinish = ref(false)
 	const column1 = [{
 			name: 'lotCode',
@@ -281,26 +283,44 @@
 
 	/***************************** 定义了一些方法 *****************************/
 	const init = (data) => {
+		let dics = ['sort_report_up_limit', 'sort_report_down_limit', 'select_type']
 		//获取当前跟选报工合格数最大值
-		// getDictInfoByType("sort_report_limit").then(res => {
-		// 	console.log(res.data && res.data.length >0)
-		// 	if(res.data && res.data.length >0) {
-		// 		qualifiedNumRatio.value =parseInt(res.data[0].dictValue) 
-		// 	}
-		// }).catch(err => {
-		// 	console.log(err)
-		// 	console.log('369 err')
-		// })
-		//获取选别类型
-		getDictInfoByType("select_type").then(res => {
-			console.log(res.data && res.data.length > 0)
-			selectTypeList.value = res.data.map(v => {
-				return {
-					value: v.dictValue,
-					text: v.dictLabel
-				};
-			});
-		})
+		getDictInfoByTypes(dics).then(res => {
+			console.log(res.data);
+
+			if (res.data) {
+				// 遍历返回的 Map 对象
+				Object.entries(res.data).forEach(([key, list]) => {
+					if (list && list.length > 0) {
+						// 根据 key 的名称,将 value 存储到对应的数组中
+						list.forEach(item => {
+							switch (key) {
+								case 'sort_report_up_limit':
+									qualifiedNumUpRatio.value = item.dictValue;
+									break;
+								case 'sort_report_down_limit':
+									qualifiedNumDownRatio.value = item.dictValue;
+									break;
+								case 'select_type':
+									selectTypeList.value.push({
+										value: item.dictValue,
+										text: item.dictLabel
+									})
+
+									break;
+							}
+						});
+					}
+				});
+
+				console.log('sortReportUpLimitValues:', qualifiedNumUpRatio.value);
+				console.log('sortReportDownLimitValues:', qualifiedNumDownRatio.value);
+				console.log('selectTypeValues:', selectTypeList.value);
+			}
+		}).catch(err => {
+			console.log(err);
+			console.log('369 err');
+		});
 		console.log("dayworkInfo", dayworkInfo.value);
 		// 获取当前报工信息
 		getSortingDayworkItem(data).then(res => {
@@ -618,8 +638,79 @@
 		dayworkItem.value.qualifiedNum = dayworkItem.value.prodNum - sumReject
 		console.log(dayworkItem.value)
 	}
+	const promiseDownModal = () => new Promise((resolve) => {
+		uni.showModal({
+			title: '提示',
+			content: `合格数过低,最低应为投产量的${qualifiedNumDownRatio.value}%, 是否确定保存`,
+			showCancel: true,
+			cancelText: '取消',
+			confirmText: '确定',
+			confirmColor: '#ff0000',
+			cancelColor: '#55aa00',
+			complete: (res) => { // 使用 complete 回调
+				console.log("Modal complete callback triggered:", res);
+				if (res.confirm) {
+					resolve(true);
+				} else {
+					resolve(false);
+				}
+			}
+		});
+	});
+	const promiseUpModal = () => new Promise((resolve) => {
+		uni.showModal({
+			title: '提示',
+			content: `合格数过高,最高应为投产量的${qualifiedNumUpRatio.value}%, 是否确定保存`,
+			showCancel: true,
+			cancelText: '取消',
+			confirmText: '确定',
+			confirmColor: '#ff0000',
+			cancelColor: '#55aa00',
+			complete: (res) => { // 使用 complete 回调
+				console.log("Modal complete callback triggered:", res);
+				if (res.confirm) {
+					resolve(true);
+				} else {
+					resolve(false);
+				}
+			}
+		});
+	});
+
+	const validDownNum = async () => {
+		// 只在结束报工的时候判断
+		if (isFinish.value && dayworkItem.value.qualifiedNum < (dayworkItem.value.prodNum * (qualifiedNumDownRatio
+				.value / 100))) {
+			try {
+				const promiseDown = await promiseDownModal(); // 等待用户确认或取消
+				console.log(promiseDown);
+				return promiseDown; // 返回用户的选择
+			} catch (error) {
+				console.log("用户取消操作", error);
+				return false; // 用户取消,返回 false
+			}
+		} else {
+			return true; // 合格数正常,直接返回 true
+		}
+	};
+	const validUpNum = async () => {
+		// 只在结束报工的时候判断
+		if (isFinish.value && dayworkItem.value.qualifiedNum > (dayworkItem.value.prodNum * (qualifiedNumUpRatio
+				.value / 100))) {
+			try {
+				const promiseUp = await promiseUpModal(); // 等待用户确认或取消
+				console.log(promiseUp);
+				return promiseUp; // 返回用户的选择
+			} catch (error) {
+				console.log("用户取消操作", error);
+				return false; // 用户取消,返回 false
+			}
+		} else {
+			return true; // 合格数正常,直接返回 true
+		}
+	};
 
-	const validHandle = () => {
+	const validHandle = async () => {
 		console.log(storageNum.value == "")
 		if (storageNum.value != null && storageNum.value != "" && storageNum.value <= 0) {
 			uni.showToast({
@@ -629,7 +720,8 @@
 			})
 			return false;
 		}
-		if (storageNum.value != null && storageNum.value != "" && storageNum.value > 0 && storageNum.value > 0 && type
+		if (storageNum.value != null && storageNum.value != "" && storageNum.value > 0 && storageNum.value > 0 &&
+			type
 			.value == null) {
 			uni.showToast({
 				icon: 'none',
@@ -673,15 +765,33 @@
 			})
 			return false;
 		}
-		//只在结束报工的时候判断
-		// if(isFinish.value &&dayworkItem.value.qualifiedNum > (dayworkItem.value.prodNum * (qualifiedNumRatio.value/100))){
-		// 	uni.showToast({
-		// 		icon: 'none',
-		// 		title: "合格数不能超过投产量的"+qualifiedNumRatio.value+"%",
-		// 		duration: 2000
-		// 	})
-		// 	return false;
-		// }
+		if (isFinish.value && dayworkItem.value.qualifiedNum > (dayworkItem.value.prodNum * (qualifiedNumUpRatio
+				.value / 100))) {
+			// let flag = await validUpNum()
+			// if (!flag) {
+			// 	return false
+			// }
+			uni.showToast({
+				icon: 'none',
+				title: `合格数过高,最高应为投产量的${qualifiedNumUpRatio.value}%`,
+				duration: 2000
+			})
+			return false;
+		}
+		if (isFinish.value && dayworkItem.value.qualifiedNum < (dayworkItem.value.prodNum * (qualifiedNumDownRatio
+				.value / 100))) {
+			console.log("666")
+			let flag = await validDownNum()
+			if (!flag) {
+				return false
+			}
+			// uni.showToast({
+			// 	icon: 'none',
+			// 	title: `合格数过低,最低应为投产量的${qualifiedNumDownRatio.value}%`,
+			// 	duration: 2000
+			// })
+			// return false;
+		}
 		return true
 		// unfitInfos.value.forEach((e, i) => {
 		// 	if (e.name)
@@ -721,9 +831,14 @@
 
 	async function handleFinishDaywork() {
 		isFinish.value = true
-		if (!validHandle()) {
+		// const downNum = await validDownNum()
+		// console.log(downNum)
+		// console.log(!validHandle(), !validUpNum(), !validDownNum())
+		const res = await validHandle()
+		if (!res) {
 			return
 		}
+		console.log("999")
 		//判断当前批次是否在盘点,如果盘点未结束,则不能结束报工
 		let checkStockResult = await handleCheckStock();
 		console.log(checkStockResult)
@@ -789,6 +904,8 @@
 		}
 		lastRequestTimestamp.value = currentTime;
 		console.log(saveData)
+		// console.log(!validNum())
+
 		finish(saveData).then(res => {
 			if (res.code === 200) {
 				uni.navigateBack()

+ 3 - 2
store/index.js

@@ -15,8 +15,9 @@ export const store = reactive({
 	normalStatus: true,
 	processInspection: null,
 	outsourcedCode: null,
-	takeStockDetails:null,
-	isReviewer:false,
+	takeStockDetails: null,
+	isReviewer: false,
+	isNotification: false,
 
 	itemStatus: {
 		/**

+ 1 - 1
utils/request.js

@@ -90,7 +90,7 @@ function preRequest() {
 			method: 'GET',
 			success: (res) => {
 				console.log(res)
-				if (res.data.code == 200) {
+				if (res.data.code == 200 && !store.isNotification) {
 					uni.navigateTo({
 						url: "/pages/notification/index",
 						success: (resqust) => {