From f1bf3ef09713182d434e22dfd8623ea73e02d6d3 Mon Sep 17 00:00:00 2001
From: yangpeixing <yangpeixing@hnkhzn.com>
Date: 星期三, 01 四月 2026 15:33:01 +0800
Subject: [PATCH] 1
---
吉安PDA/pages/stash/inboundorder.vue | 389 +++++++++++++++++++++++++++++--------------------------
1 files changed, 206 insertions(+), 183 deletions(-)
diff --git "a/\345\220\211\345\256\211PDA/pages/stash/inboundorder.vue" "b/\345\220\211\345\256\211PDA/pages/stash/inboundorder.vue"
index 465bef0..b77775d 100644
--- "a/\345\220\211\345\256\211PDA/pages/stash/inboundorder.vue"
+++ "b/\345\220\211\345\256\211PDA/pages/stash/inboundorder.vue"
@@ -1,193 +1,216 @@
<template>
- <view>
- <u-sticky>
- <view style="background-color: #ffffff;">
- <uni-search-bar @confirm="search" v-model="searchValue" @input="handleSearchInput"></uni-search-bar>
- </view>
- </u-sticky>
+ <view>
+ <u-sticky>
+ <view style="background-color: #ffffff;">
+ <uni-search-bar @confirm="search" v-model="searchValue"></uni-search-bar>
+ </view>
+ </u-sticky>
+ <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="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 :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 }}
- </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;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-list>
+ <uni-load-more :status="status" v-if="loadVisible"></uni-load-more>
- <!-- 绉婚櫎鍔犺浇鏇村缁勪欢锛屽洜涓轰笉鍒嗛〉浜� -->
- <!-- <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>
-
- <!-- 杩斿洖椤堕儴鎸夐挳锛堝彲閫夛級 -->
- <u-back-top :scroll-top="scrollTop" top="400"></u-back-top>
- </view>
+ <u-back-top :scroll-top="scrollTop" top="400"></u-back-top>
+ </view>
</template>
<script>
-import { InboundOrderStatus } from '../../common/config.js';
+ import { InboundOrderStatus } from '../../common/config.js'
+ export default {
+ data() {
+ return {
+ page: "/pages/stash/raworderboxing?",
+ loadVisible: false,
+ searchValue: "",
+ status: "more",
+ allReceivingOrders: [],
+ pageNo: 1,
+ scrollTop: 0,
+ warehouseId: "",
+ isLoaded:false
+ }
+ },
+ onLoad(res) {
+ this.warehouseId = res.warehouseId;
+ this.page = this.page + "warehouseId=" + this.warehouseId + "&orderNo=";
+ this.getData();
+ },
+ onReachBottom() {
+ this.pageNo += 1;
+ this.getData();
+ this.isLoaded=true;
+ },
+ onShow() {
+ if (this.isLoaded) {
+ // 浠庡叾浠栭〉闈㈣繑鍥炴椂鍒锋柊
+ this.getData();
+ }
+ },
+ onPageScroll(e) {
+ this.scrollTop = e.scrollTop;
+ },
+ methods: {
+ search(res) {
+ this.getData();
+ },
+ groupClick() {
-export default {
- data() {
- return {
- page: '/pages/stash/raworderboxing?',
- searchValue: '',
- allReceivingOrders: [], // 鏄剧ず鍦ㄥ墠绔殑鏁版嵁锛堝彲鑳借鎼滅储杩囨护锛�
- originalOrders: [], // 瀛樺偍鎵�鏈夊師濮嬫暟鎹�
- scrollTop: 0,
- warehouseId: '',
- isLoaded: false, // 鏄惁浠庤鎯呴〉杩斿洖
- isLoading: false, // 闃叉閲嶅璇锋眰
- };
- },
- onLoad(res) {
- this.warehouseId = res.warehouseId;
- this.page = this.page + 'warehouseId=' + this.warehouseId + '&orderNo=';
- // 鐩存帴鍔犺浇鍏ㄩ儴鏁版嵁锛堜笉鍒嗛〉锛�
- this.getAllData();
- },
- onShow() {
- // 浠庤鎯呴〉杩斿洖鏃讹紝濡傛灉鏁版嵁宸茶淇敼锛屽彲浠ラ噸鏂板姞杞�
- if (this.isLoaded) {
- this.getAllData();
- this.isLoaded = false;
- }
- },
- onPageScroll(e) {
- this.scrollTop = e.scrollTop;
- },
- methods: {
- // 鐗╂枡鏂欏彿鍘婚噸
- getUniqueMaterielCodes(details) {
- if (!details || !Array.isArray(details)) return [];
- return [...new Set(details.map(item => item.materielCode))];
- },
-
- // 鎼滅储杈撳叆澶勭悊锛堝墠绔瓫閫夛級
- handleSearchInput() {
- if (this.searchValue === '') {
- this.allReceivingOrders = [...this.originalOrders];
- return;
- }
- const searchText = this.searchValue.toLowerCase().trim();
- this.allReceivingOrders = this.originalOrders.filter(item => {
- if (item.orderNo && item.orderNo.toLowerCase().includes(searchText)) {
- return true;
- }
- 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;
- },
-
- // 涓�娆℃�ц幏鍙栨墍鏈夋暟鎹紙涓嶅垎椤碉級
- getAllData() {
- if (this.isLoading) return;
- this.isLoading = true;
-
- // 璁剧疆涓�涓冻澶熷ぇ鐨� pageSize 鏉ヨ幏鍙栨墍鏈夋暟鎹紙鏍规嵁鎺ュ彛鏈�澶ч檺鍒惰皟鏁达級
- const postData = {
- MainData: {
- warehouseId: this.warehouseId,
- orderNo: '',
- pageNo: 1,
- pageSize: 9999, // 鍋囪鎺ュ彛鏀寔杩欎箞澶х殑鍒嗛〉
- },
- };
-
- this.$u
- .post('/api/InboundOrder/GetInboundOrders', postData)
- .then(res => {
- this.isLoading = false;
- if (res.status) {
- console.log(res.data);
- 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 = newData; // 鐩存帴鏇挎崲锛屼笉鍒嗛〉杩藉姞
- // 鏍规嵁鎼滅储璇嶈繃婊ゆ樉绀�
- if (this.searchValue) {
- this.handleSearchInput();
- } else {
- this.allReceivingOrders = [...this.originalOrders];
- }
- } else {
- this.$u.toast('鏁版嵁鍔犺浇澶辫触锛岃閲嶈瘯');
- }
- })
- .catch(err => {
- this.isLoading = false;
- this.$u.toast('缃戠粶寮傚父锛岃妫�鏌ョ綉缁�');
- });
- },
- },
-};
+ },
+ getData() {
+ var postData = {
+ MainData: {
+ warehouseId: this.warehouseId,
+ orderNo: this.searchValue,
+ pageNo: this.pageNo
+ },
+ }
+ this.$u.post('/api/InboundOrder/GetInboundOrders', postData).then((res) => {
+ if (res.status) {
+ 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.status = 'noMore';
+ //this.allReceivingOrders = [];
+ this.loadVisible = true;
+ }
+ }
+ })
+ }
+ }
+ }
</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