From de398f47dd12b3890c9ee545422da78e82b60fa9 Mon Sep 17 00:00:00 2001
From: yanjinhui <3306209981@qq.com>
Date: 星期一, 08 十二月 2025 09:22:06 +0800
Subject: [PATCH] 修改PDA出入库中出现undefined问题,修改job中因为上游调用频率过快导致job死掉,修改前端报警信息使用不同颜色
---
新建文件夹/PDA/pages/stash/CheckoutorderDetail.vue | 165 +++++++++++++++++++++++++++++-------------------------
1 files changed, 88 insertions(+), 77 deletions(-)
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/CheckoutorderDetail.vue" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/CheckoutorderDetail.vue"
index 993fad8..53f556f 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/CheckoutorderDetail.vue"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/PDA/pages/stash/CheckoutorderDetail.vue"
@@ -53,7 +53,9 @@
pageNo: 1,
scrollTop: 0,
checkTask: false,
- warehouseId: ""
+ warehouseId: "",
+ hasDataLoaded: false, // 鏁版嵁鏄惁宸插姞杞借繃
+ shouldRefreshFromC: false, // 浠嶤椤甸潰杩斿洖鏃堕渶瑕佸埛鏂扮殑鏍囧織
}
},
// 娣诲姞杩欎釜鐢熷懡鍛ㄦ湡
@@ -64,7 +66,9 @@
onLoad(res) {
this.warehouseId = res.warehouseId;
this.orderNo = res.orderNo;
- this.allReceivingOrders = res.detail;
+ if(res.detail&&res.detail.length>0){
+ this.allReceivingOrders = res.detail;
+ }
this.page = this.page + "orderNo=" + this.orderNo + "&warehouseId=" + this.warehouseId + "&locationCode=";
// this.getData();
},
@@ -76,26 +80,35 @@
}
},
onShow() {
- // this.checkTask = uni.getStorageSync('checkTask');
- // if (this.checkTask) {
- // uni.removeStorageSync('checkTask');
- this.pageNo = 1;
- this.allReceivingOrders = [];
- // 浠庡叾浠栭〉闈㈣繑鍥炴椂鍒锋柊
- this.getData();
- // }
+ // 妫�鏌ユ槸鍚﹂渶瑕佸埛鏂�
+ const needRefresh = uni.getStorageSync('needRefreshCheck');
+ if (needRefresh) {
+ uni.removeStorageSync('needRefreshCheck');
+ this.pageNo = 1;
+ this.allReceivingOrders = [];
+ this.getData();
+ return;
+ }
+
+ // 濡傛灉杩樻病鏈夊姞杞借繃鏁版嵁锛屽姞杞芥暟鎹�
+ if (!this.hasDataLoaded) {
+ this.pageNo = 1;
+ this.allReceivingOrders = [];
+ this.getData();
+ this.hasDataLoaded = true;
+ }
},
onPageScroll(e) {
this.scrollTop = e.scrollTop;
},
methods: {
- // 娣诲姞鍒锋柊鏂规硶渚涘叾浠栭〉闈㈣皟鐢�
- refreshData() {
- console.log('鏀跺埌鐩樼偣鍒锋柊璇锋眰');
- this.pageNo = 1;
- this.allReceivingOrders = [];
- this.getData();
- },
+ // // 娣诲姞鍒锋柊鏂规硶渚涘叾浠栭〉闈㈣皟鐢�
+ // refreshData() {
+ // console.log('鏀跺埌鐩樼偣鍒锋柊璇锋眰');
+ // this.pageNo = 1;
+ // this.allReceivingOrders = [];
+ // this.getData();
+ // },
search(res) {
this.pageNo = 1;
this.getData();
@@ -103,66 +116,64 @@
groupClick() {
},
-
-
- getData() {
- var postData = {
- MainData: {
- warehouseId: this.warehouseId,
- locationCode: this.searchValue,
- orderNo: this.orderNo,
- pageNo: this.pageNo,
- isCheck: true,
- },
- }
-
- // 濡傛灉鏄涓�椤垫垨鎼滅储锛屾竻绌烘暟鎹�
- if (this.pageNo === 1 || this.searchValue !== '') {
- this.allReceivingOrders = [];
- this.status = "more";
- }
-
- this.$u.post('/api/DeliveryOrder/CheckOutTasks', postData).then((res) => {
- if (res.status) {
- if (res.data && res.data.length > 0) {
- // 杩藉姞鏁版嵁鑰屼笉鏄浛鎹�
- this.allReceivingOrders = [...this.allReceivingOrders, ...res.data];
-
- // 濡傛灉杩斿洖鐨勬暟鎹皯浜�5鏉★紝璇存槑娌℃湁鏇村鏁版嵁浜�
- if (res.data.length < 5) {
- this.status = 'noMore';
- } else {
- this.status = 'more';
- }
-
- // 鎺у埗鍔犺浇鎻愮ず鏄剧ず
- this.loadVisible = this.allReceivingOrders.length > 0;
-
- } else {
- // 娌℃湁鏁版嵁
- this.status = 'noMore';
- this.loadVisible = this.allReceivingOrders.length > 0;
-
- // 濡傛灉鏄涓�椤典笖娌℃湁鏁版嵁锛屾樉绀虹┖鐘舵��
- if (this.pageNo === 1) {
- this.allReceivingOrders = [];
- }
-
- // 鐩樼偣瀹屾垚鎻愮ず閫昏緫
- if (this.allReceivingOrders.length < 1) {
- setTimeout(() => {
- uni.navigateBack({
- delta: 1
- });
- }, 300);
- }
- }
- }
- }).catch(err => {
- console.error('璇锋眰澶辫触:', err);
- this.status = 'noMore';
- })
-}
+ getData() {
+ var postData = {
+ MainData: {
+ warehouseId: this.warehouseId,
+ locationCode: this.searchValue,
+ orderNo: this.orderNo,
+ pageNo: this.pageNo,
+ isCheck: true,
+ },
+ }
+
+ // 濡傛灉鏄涓�椤垫垨鎼滅储锛屾竻绌烘暟鎹�
+ if (this.pageNo === 1 || this.searchValue !== '') {
+ this.allReceivingOrders = [];
+ this.status = "more";
+ }
+
+ this.$u.post('/api/DeliveryOrder/CheckOutTasks', postData).then((res) => {
+ if (res.status) {
+ if (res.data && res.data.length > 0) {
+ // 杩藉姞鏁版嵁鑰屼笉鏄浛鎹�
+ this.allReceivingOrders = [...this.allReceivingOrders, ...res.data];
+
+ // 濡傛灉杩斿洖鐨勬暟鎹皯浜�5鏉★紝璇存槑娌℃湁鏇村鏁版嵁浜�
+ if (res.data.length < 5) {
+ this.status = 'noMore';
+ } else {
+ this.status = 'more';
+ }
+
+ // 鎺у埗鍔犺浇鎻愮ず鏄剧ず
+ this.loadVisible = this.allReceivingOrders.length > 0;
+
+ } else {
+ // 娌℃湁鏁版嵁
+ this.status = 'noMore';
+ this.loadVisible = this.allReceivingOrders.length > 0;
+
+ // 濡傛灉鏄涓�椤典笖娌℃湁鏁版嵁锛屾樉绀虹┖鐘舵��
+ if (this.pageNo === 1) {
+ this.allReceivingOrders = [];
+ }
+
+ // 鐩存帴杩斿洖A椤甸潰锛屼笉闇�瑕佹彁绀�
+ if (this.allReceivingOrders.length === 0 && this.pageNo === 1) {
+ setTimeout(() => {
+ uni.navigateBack({
+ delta: 1 // 杩斿洖A椤甸潰
+ });
+ }, 300);
+ }
+ }
+ }
+ }).catch(err => {
+ console.error('璇锋眰澶辫触:', err);
+ this.status = 'noMore';
+ })
+ }
}
}
</script>
--
Gitblit v1.9.3