From aa4aa67abfdf69e30d5076451716e5aba11d5ec0 Mon Sep 17 00:00:00 2001
From: yangpeixing <yangpeixing@hnkhzn.com>
Date: 星期二, 14 四月 2026 16:12:40 +0800
Subject: [PATCH] 1
---
吉安PDA/pages/stash/FLinboundorder.vue | 354 ++++++++++++++++++++++++++--------------------------------
1 files changed, 158 insertions(+), 196 deletions(-)
diff --git "a/\345\220\211\345\256\211PDA/pages/stash/FLinboundorder.vue" "b/\345\220\211\345\256\211PDA/pages/stash/FLinboundorder.vue"
index 432210c..c23c7c7 100644
--- "a/\345\220\211\345\256\211PDA/pages/stash/FLinboundorder.vue"
+++ "b/\345\220\211\345\256\211PDA/pages/stash/FLinboundorder.vue"
@@ -2,66 +2,43 @@
<view>
<u-sticky>
<view style="background-color: #ffffff;">
- <uni-search-bar @confirm="search" v-model="searchValue" @input="handleSearchInput"></uni-search-bar>
+ <uni-search-bar @confirm="search" v-model="searchValue"></uni-search-bar>
</view>
</u-sticky>
-
- <!-- 浼樺寲锛氭粴鍔ㄥ鍣ㄩ珮搴﹁绠楁洿绮惧噯锛屾坊鍔爎ef鐢ㄤ簬婊氬姩鎺у埗 -->
- <view ref="scrollContainer" style="height: calc(100vh - 50px); overflow-y: auto; padding-bottom: 20rpx;">
- <uni-list :border="true">
- <uni-list-item
- direction="column"
- v-for="item in allReceivingOrders"
- :key="item.orderNo"
- clickable
- @click="groupClick(item.orderNo)"
- link
- :to="page+item.orderNo"
- >
- <template v-slot:body>
- <uni-group margin-top="20">
- <view style="line-height: 17px;color: #596671;font-size: 14px;text-align: center;display: flex;justify-content: space-between;">
- 鍏ュ簱鍗曞彿锛� {{item.orderNo}}
+ <uni-list :border="true">
+ <uni-list-item direction="column" clickable @click="groupClick(item.orderNo)" link
+ :to="page+item.orderNo" v-for="item in allReceivingOrders" :key="item.orderNo">
+ <template v-slot:body>
+ <uni-group margin-top="20">
+ <view style="line-height: 17px;color: #596671;font-size: 14px;text-align: center;display: flex;justify-content: space-between;">
+ 鍏ュ簱鍗曞彿 {{item.orderNo}}
+ </view>
+ <view style="margin-top: 10rpx;line-height: 17px;color: #596671;font-size: 14px;text-align: center;display: flex;justify-content: space-between;">
+ 鍒涘缓浜哄憳 {{item.creater}}
+ </view>
+ <view style="margin-top: 10rpx;line-height: 17px;color: #596671;font-size: 14px;text-align: center;display: flex;justify-content: space-between;">
+ 鍒涘缓鏃ユ湡 {{item.createDate}}
+ </view>
+ <view
+ style="margin-top: 10rpx;display: flex;align-items: center; ">
+ <view style="text-align: center;line-height: 40rpx;border-radius: 8rpx; width: 238rpx;height: 40rpx;font-size: 22rpx;background-color:rgba(22,127,247,0.18);color: #1F63FF;">
+ 璁㈠崟鐘舵�� {{item.InboundOrderStatus}}
</view>
- <view style="margin-top: 10rpx;line-height: 17px;color: #596671;font-size: 14px;text-align: center;display: flex;justify-content: space-between;">
- 鍒涘缓浜哄憳锛� {{item.creater}}
+ <view style="text-align: center;line-height: 40rpx;border-radius: 8rpx; width: 158rpx;height: 40rpx;font-size: 22rpx;color: #F56C6C;">
+ 鎬婚噺 {{item.SumQty}}
</view>
- <view style="margin-top: 10rpx;line-height: 17px;color: #596671;font-size: 14px;text-align: center;display: flex;justify-content: space-between;">
- 鍒涘缓鏃ユ湡锛� {{item.createDate}}
+ <view style="text-align: center;line-height: 40rpx;border-radius: 8rpx; width: 158rpx;height: 40rpx;font-size: 22rpx;color: #F56C6C;">
+ 宸插叆 {{item.OverQty}}
</view>
- <view style="margin-top: 10rpx;line-height: 17px;color: #596671;font-size: 14px;text-align: center;display: flex;justify-content: left;">
- 鐗╂枡鏂欏彿锛�
- <view class="container">
- <view v-for="(materielCode, index) in getUniqueMaterielCodes(item.details)" :key="index">
- {{materielCode}}
- <u-line color="blue" v-if="index < getUniqueMaterielCodes(item.details).length - 1" />
- </view>
- </view>
- </view>
- <view style="margin-top: 10rpx;display: flex;align-items: center; ">
- <view style="text-align: center;line-height: 40rpx;border-radius: 8rpx; width: 238rpx;height: 40rpx;font-size: 22rpx;background-color:rgba(22,127,247,0.18);color: #1F63FF;">
- 璁㈠崟鐘舵�侊細 {{item.InboundOrderStatus}}
- </view>
- <view style="text-align: center;line-height: 40rpx;border-radius: 8rpx; width: 158rpx;height: 40rpx;font-size: 22rpx;color: #F56C6C;">
- 鎬婚噺锛� {{item.SumQty}}
- </view>
- <view style="text-align: center;line-height: 40rpx;border-radius: 8rpx; width: 158rpx;height: 40rpx;font-size: 22rpx;color: #F56C6C;">
- 宸插叆锛� {{item.OverQty}}
- </view>
- </view>
- </uni-group>
- </template>
- </uni-list-item>
- </uni-list>
- <!-- 浼樺寲锛氫粎褰撴湁鏁版嵁涓旈渶瑕佸姞杞芥洿澶氭椂鏄剧ず鍔犺浇缁勪欢 -->
- <uni-load-more :status="status" v-if="loadVisible && allReceivingOrders.length > 0"></uni-load-more>
- <!-- 绌烘暟鎹彁绀� -->
- <view v-if="allReceivingOrders.length === 0 && !isLoading" style="text-align: center; padding: 100rpx 0; color: #999;">
- 鏆傛棤鍏ュ簱璁㈠崟鏁版嵁
- </view>
+ </view>
+ </uni-group>
+ </template>
+ </uni-list-item>
- <u-back-top :scroll-top="scrollTop" top="400"></u-back-top>
- </view>
+ </uni-list>
+ <uni-load-more :status="status" v-if="loadVisible"></uni-load-more>
+
+ <u-back-top :scroll-top="scrollTop" top="400"></u-back-top>
</view>
</template>
@@ -73,182 +50,167 @@
page: "/pages/stash/FLraworderboxing?",
loadVisible: false,
searchValue: "",
- status: "more", // more:鍔犺浇鏇村, noMore:娌℃湁鏇村, loading:鍔犺浇涓�
- allReceivingOrders: [], // 鎵�鏈夋暟鎹紙鍏ㄩ儴鍔犺浇鐢ㄤ簬鍓嶇绛涢�夛級
- originalOrders: [], // 瀛樺偍鍘熷鏁版嵁
- pageNo: 1, // 褰撳墠椤电爜
- pageSize: 100, // 澧炲ぇ姣忛〉鏉℃暟锛屼竴娆℃�у姞杞芥洿澶氭暟鎹敤浜庡墠绔瓫閫�
+ status: "more",
+ allReceivingOrders: [],
+ pageNo: 1,
scrollTop: 0,
warehouseId: "",
- isLoaded: false, // 鏄惁浠庤鎯呴〉杩斿洖
- isLoading: false, // 闃叉閲嶅璇锋眰
- hasMore: true, // 鏄惁杩樻湁鏇村鏁版嵁
+ isLoaded:false
}
},
onLoad(res) {
this.warehouseId = res.warehouseId;
this.page = this.page + "warehouseId=" + this.warehouseId + "&orderNo=";
- // 鍒濆鍖栧姞杞芥暟鎹�
- this.resetPageData();
this.getData();
},
- // 浼樺寲锛氫笂鎷夊姞杞戒笅涓�椤碉紙浠呭綋鏈夋洿澶氭暟鎹笖鏈姞杞戒腑鏃惰Е鍙戯級
onReachBottom() {
- if (this.hasMore && !this.isLoading && !this.searchValue) {
- this.pageNo += 1;
- this.getData();
- }
+ this.pageNo += 1;
+ this.getData();
+ this.isLoaded=true;
},
- // 浼樺寲锛氳繑鍥為〉闈㈡椂浠呭埛鏂版暟鎹紝涓嶉噸缃垎椤碉紙淇濈暀婊氬姩浣嶇疆锛�
onShow() {
if (this.isLoaded) {
- // 鍒锋柊褰撳墠椤垫暟鎹紝淇濈暀鍒嗛〉鍜屾粴鍔ㄤ綅缃�
- this.refreshCurrentPage();
- this.isLoaded = false; // 閲嶇疆鐘舵��
+ // 浠庡叾浠栭〉闈㈣繑鍥炴椂鍒锋柊
+ this.getData();
}
},
onPageScroll(e) {
this.scrollTop = e.scrollTop;
},
methods: {
- // 鐗╂枡鏂欏彿鍘婚噸锛堜繚鐣欏師鏈夊姛鑳斤級
- getUniqueMaterielCodes(details) {
- if (!details || !Array.isArray(details)) return [];
- const uniqueCodes = [...new Set(details.map(item => item.materielCode))];
- return uniqueCodes;
- },
-
- // 鎼滅储杈撳叆澶勭悊
- handleSearchInput() {
- // 濡傛灉鎼滅储鍊间负绌猴紝鏄剧ず鎵�鏈夋暟鎹�
- if (this.searchValue === "") {
- this.allReceivingOrders = [...this.originalOrders];
- return;
- }
-
- // 妯$硦鏌ヨ
- const searchText = this.searchValue.toLowerCase().trim();
-
- // 鍚屾椂鍖归厤鍏ュ簱鍗曞彿鍜岀墿鏂欐枡鍙�
- this.allReceivingOrders = this.originalOrders.filter(item => {
- // 1. 鍖归厤鍏ュ簱鍗曞彿
- if (item.orderNo && item.orderNo.toLowerCase().includes(searchText)) {
- return true;
- }
-
- // 2. 鍖归厤鐗╂枡鏂欏彿
- if (item.details && item.details.length > 0) {
- return item.details.some(detail =>
- detail.materielCode && detail.materielCode.toLowerCase().includes(searchText)
- );
- }
-
- return false;
- });
- },
-
- // 鎼滅储鏂规硶锛堝墠绔瓫閫夛級
- search() {
- this.handleSearchInput();
- },
-
- // 鐐瑰嚮鍒楄〃椤癸紙鏍囪涓哄凡鍔犺浇锛岃繑鍥炴椂鍒锋柊锛�
- groupClick() {
- this.isLoaded = true;
- },
-
- // 閲嶇疆鍒嗛〉鏁版嵁锛堟悳绱�/鍒濆鍖栨椂璋冪敤锛�
- resetPageData() {
- this.pageNo = 1;
- this.allReceivingOrders = [];
- this.originalOrders = [];
- this.hasMore = true;
- this.status = "more";
- this.loadVisible = false;
- },
-
- // 鍒锋柊褰撳墠椤垫暟鎹紙杩斿洖璇︽儏椤垫椂璋冪敤锛屼繚鐣欐粴鍔ㄤ綅缃級
- refreshCurrentPage() {
- const currentPage = this.pageNo;
- this.resetPageData();
- this.pageNo = currentPage;
+ search(res) {
this.getData();
},
-
- // 鏍稿績锛氳幏鍙栨暟鎹紙鍓嶇绛涢�夋柟妗堬級
+ groupClick() {
+
+ },
getData() {
- // 闃叉閲嶅璇锋眰
- if (this.isLoading) return;
- this.isLoading = true;
- this.status = "loading"; // 鏄剧ず鍔犺浇涓�
-
var postData = {
MainData: {
warehouseId: this.warehouseId,
- orderNo: "", // 鎼滅储鏃剁暀绌猴紝鍏ㄩ儴鍔犺浇
- pageNo: this.pageNo,
- pageSize: this.pageSize // 澧炲ぇ姣忛〉鏉℃暟
+ orderNo: this.searchValue,
+ pageNo: this.pageNo
},
}
-
this.$u.post('/api/InboundOrder/GetInboundOrders', postData).then((res) => {
- this.isLoading = false; // 閲嶇疆鍔犺浇鐘舵��
-
if (res.status) {
- const newData = res.data.map(i => ({
- ...i,
- InboundOrderStatus: InboundOrderStatus.find(item => item.value == i.orderStatus)?.label || "鏈煡鐘舵��",
- SumQty: i.details?.map(item => item.orderQuantity).reduce((prev, next) => prev + next, 0) || 0,
- OverQty: i.details?.map(item => item.overInQuantity).reduce((prev, next) => prev + next, 0) || 0
- }));
-
- // 瀛樺偍鍒板師濮嬫暟鎹�
- this.originalOrders = [...this.originalOrders, ...newData];
-
- // 濡傛灉鏈夋悳绱㈠�硷紝搴旂敤绛涢��
- if (this.searchValue) {
- this.handleSearchInput();
+ if (res.data.length > 0) {
+ if (this.searchValue == '') {
+ this.allReceivingOrders = res.data.map(i => ({
+ ...i,
+ InboundOrderStatus: InboundOrderStatus.find(item => item.value == i
+ .orderStatus).label,
+ SumQty: i.details.map(item => item.orderQuantity).reduce((prev, next) => prev + next, 0),
+ OverQty: i.details.map(item => item.overInQuantity).reduce((prev, next) => prev + next, 0)
+ }));
+ // this.allReceivingOrders = res.data;
+ if (this.allReceivingOrders.length > 3) {
+ this.loadVisible = true;
+ } else {
+ this.loadVisible = false;
+ }
+ } else {
+ this.allReceivingOrders = res.data.map(i => ({
+ ...i,
+ InboundOrderStatus: InboundOrderStatus.find(item => item.value == i
+ .orderStatus).label,
+ SumQty: i.details.map(item => item.orderQuantity).reduce((prev, next) => prev + next, 0),
+ OverQty: i.details.map(item => item.overInQuantity).reduce((prev, next) => prev + next, 0)
+ }));
+ if (this.allReceivingOrders.length > 3) {
+ this.loadVisible = true;
+ } else {
+ this.loadVisible = false;
+ }
+ }
} else {
- // 娌℃湁鎼滅储鍊兼椂鏄剧ず鎵�鏈夋暟鎹�
- this.allReceivingOrders = [...this.originalOrders];
+ this.status = 'noMore';
+ //this.allReceivingOrders = [];
+ this.loadVisible = true;
}
-
- // 鍒ゆ柇鏄惁杩樻湁鏇村鏁版嵁
- if (newData.length < this.pageSize) {
- this.hasMore = false;
- this.status = "noMore"; // 鏄剧ず"娌℃湁鏇村"
- } else {
- this.hasMore = true;
- this.status = "more"; // 鏄剧ず"鍔犺浇鏇村"
- }
-
- // 鎺у埗鍔犺浇缁勪欢鏄剧ず锛堟悳绱㈡椂涓嶆樉绀哄姞杞芥洿澶氾級
- this.loadVisible = this.originalOrders.length > 0 && this.hasMore && !this.searchValue;
- } else {
- // 鎺ュ彛璇锋眰澶辫触
- this.status = "noMore";
- this.loadVisible = false;
- this.$u.toast("鏁版嵁鍔犺浇澶辫触锛岃閲嶈瘯");
}
- }).catch((err) => {
- this.isLoading = false;
- this.status = "noMore";
- this.loadVisible = false;
- this.$u.toast("缃戠粶寮傚父锛岃妫�鏌ョ綉缁�");
})
- },
- },
+ }
+ }
}
</script>
-<style scoped>
-/* 浼樺寲锛氱墿鏂欐枡鍙锋崲琛屾樉绀猴紝闃叉妯悜婧㈠嚭 */
-.container {
- display: flex;
- flex-wrap: wrap;
- gap: 10rpx;
-}
-.container view {
- white-space: nowrap;
-}
+<style lang="scss">
+ @import '@/common/uni-ui.scss';
+
+ page {
+ display: flex;
+ flex-direction: column;
+ box-sizing: border-box;
+ background-color: #efeff4;
+ min-height: 100%;
+ height: auto;
+ }
+
+ .tips {
+ color: #67c23a;
+ font-size: 14px;
+ line-height: 40px;
+ text-align: center;
+ background-color: #f0f9eb;
+ height: 0;
+ opacity: 0;
+ transform: translateY(-100%);
+ transition: all 0.3s;
+ }
+
+ .tips-ani {
+ transform: translateY(0);
+ height: 40px;
+ opacity: 1;
+ }
+
+ .content {
+ width: 100%;
+ display: flex;
+ }
+
+ .list-picture {
+ width: 100%;
+ height: 145px;
+ }
+
+ .thumb-image {
+ width: 100%;
+ height: 100%;
+ }
+
+ .ellipsis {
+ display: flex;
+ overflow: hidden;
+ }
+
+ .uni-ellipsis-1 {
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ }
+
+ .uni-ellipsis-2 {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+ }
+
+ .customcss {
+ display: flex;
+ position: fixed;
+ width: 100%;
+ top: 10px;
+ text-align: center;
+ z-index: 999;
+ left: 30px;
+ height: 20%;
+ }
+
+ .footer {
+ padding-top: 50%;
+ }
</style>
\ No newline at end of file
--
Gitblit v1.9.3