From f9cfb2169361c046a00f4fa14ea342bd5710f8b4 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期三, 04 三月 2026 16:24:17 +0800
Subject: [PATCH] #
---
pages/outbound/orderOut/orderList.vue | 707 ++++++++++++++++++++++++++++++++--------------------------
1 files changed, 388 insertions(+), 319 deletions(-)
diff --git a/pages/outbound/orderOut/orderList.vue b/pages/outbound/orderOut/orderList.vue
index 60aa96b..9b67786 100644
--- a/pages/outbound/orderOut/orderList.vue
+++ b/pages/outbound/orderOut/orderList.vue
@@ -2,29 +2,47 @@
<view class="page-container">
<!-- 鎼滅储妗� -->
<view class="search-bar">
- <uni-search-bar v-model="condition" placeholder=" 鎵爜 / 杈撳叆" bgColor="#F5F5F5" @confirm="search" @cancel="onCancelSearch" />
+ <uni-search-bar
+ v-model="condition"
+ placeholder=" 鎵爜 / 杈撳叆"
+ bgColor="#F5F5F5"
+ @confirm="search"
+ @cancel="onCancelSearch"
+ />
</view>
-
+
<!-- 璁㈠崟鍒楄〃 -->
<view class="order-list">
- <view class="order-card" v-for="(item,i) in matList" :key="i" @click="toPrint(item)">
+ <view
+ class="order-card"
+ v-for="(item, i) in matList"
+ :key="i"
+ @click="toPrint(item)"
+ >
<!-- 鍗$墖澶撮儴 -->
<view class="card-header">
- <view class="order-badge" :class="getSettleClass(item.exceStatus)">
- <text class="badge-text">{{item.exceStatus$ || '鏈煡'}}</text>
+ <view
+ class="order-badge"
+ :class="getSettleClass(item.exceStatus)"
+ >
+ <text class="badge-text">
+ {{ item.exceStatus$ || '鏈煡' }}
+ </text>
</view>
<view class="order-no">
<text class="order-no-label">鍗曟嵁鍙�</text>
- <text class="order-no-value">{{item.code}}</text>
+ <text class="order-no-value">{{ item.code }}</text>
</view>
</view>
-
+
<!-- 鍗$墖鍐呭 -->
<view class="card-body">
<view class="info-row">
<view class="info-item">
<text class="info-label">鍗曟嵁绫诲瀷</text>
- <text class="info-value">{{item.wkType$ || '-'}}</text>
+ <text class="info-value">
+ {{ item.wkType$ || '-' }}
+ </text>
</view>
<!-- <view class="info-item">
<text class="info-label">搴斿嚭鏁伴噺</text>
@@ -34,355 +52,406 @@
<view class="info-row">
<view class="info-item">
<text class="info-label">搴斿嚭鏁伴噺</text>
- <text class="info-value">{{item.anfme || '-'}}</text>
+ <text class="info-value">
+ {{ item.anfme || '-' }}
+ </text>
</view>
<view class="info-item">
<text class="info-label">瀹屾垚鏁伴噺</text>
- <text class="info-value">{{item.qty || '-'}}</text>
+ <text class="info-value">
+ {{ item.qty || '-' }}
+ </text>
</view>
</view>
</view>
-
-
+
<!-- 鍗$墖搴曢儴 -->
<view class="card-footer">
<text class="view-detail">鏌ョ湅璇︽儏</text>
- <uni-icons type="right" size="14" color="#999"></uni-icons>
+ <uni-icons
+ type="right"
+ size="14"
+ color="#999"
+ ></uni-icons>
</view>
</view>
</view>
-
+
<!-- 绌虹姸鎬� -->
- <view class="empty-state" v-if="matList.length === 0 && !loading">
- <uni-icons type="search" size="60" color="#CCCCCC"></uni-icons>
+ <view
+ class="empty-state"
+ v-if="matList.length === 0 && !loading"
+ >
+ <uni-icons
+ type="search"
+ size="60"
+ color="#CCCCCC"
+ ></uni-icons>
<text class="empty-text">鏆傛棤璁㈠崟鏁版嵁</text>
<text class="empty-hint">涓嬫媺鍒锋柊璇曡瘯</text>
</view>
-
+
<!-- 鍔犺浇鏇村 -->
- <uni-load-more v-show="matList.length !== 0" :status="status" :icon-size="16" :content-text="contentText" />
+ <uni-load-more
+ v-show="matList.length !== 0"
+ :status="status"
+ :icon-size="16"
+ :content-text="contentText"
+ />
</view>
</template>
<script>
- import { request } from '@/common/request.js'
- export default {
- data() {
- return {
- tagList: [],
- matList: [],
- condition: '',
- loading: false,
- curr: 1,
- limit:5,
- status: 'more',
- contentText: {
- contentdown: '涓婃媺鍔犺浇鏇村',
- contentrefresh: '鍔犺浇涓�',
- contentnomore: '娌℃湁鏇村'
- },
- // 褰撳墠tagId
- tagIdNow: 1,
- orderTypeId:''
- }
- },
- // 涓嬫媺鍒锋柊
- onPullDownRefresh() {
- this.refreshData();
- },
- // 涓婃媺鍔犺浇鏇村
- onReachBottom() {
- if (this.status !== 'noMore') {
- this.status = 'loading';
- this.loadMoreData();
- }
- },
- onLoad() {
- let that = this
- const eventChannel = this.getOpenerEventChannel();
- if (eventChannel) {
- eventChannel.on('orderTypeId', function(data) {
- that.orderTypeId = data.orderTypeId
- console.log(data)
- })
- }
- },
- onShow() {
- // 姣忔杩涘叆椤甸潰閲嶆柊鍔犺浇
- this.refreshData();
- },
- methods: {
- // 鍒锋柊鏁版嵁
- refreshData() {
- this.curr = 1;
- this.matList = [];
- this.status = 'more';
- this.loading = true;
- this.fetchOrderList(true);
+import { request } from '@/common/request.js'
+export default {
+ data() {
+ return {
+ tagList: [],
+ matList: [],
+ condition: '',
+ loading: false,
+ curr: 1,
+ limit: 5,
+ status: 'more',
+ contentText: {
+ contentdown: '涓婃媺鍔犺浇鏇村',
+ contentrefresh: '鍔犺浇涓�',
+ contentnomore: '娌℃湁鏇村'
},
- // 鍔犺浇鏇村鏁版嵁
- loadMoreData() {
- this.fetchOrderList(false);
- },
- // 鑾峰彇璁㈠崟鍒楄〃
- async fetchOrderList(isRefresh) {
- try {
- const res = await request('/orderOut/list', {
+ // 褰撳墠tagId
+ tagIdNow: 1,
+ orderTypeId: ''
+ }
+ },
+ // 涓嬫媺鍒锋柊
+ onPullDownRefresh() {
+ if (this.loading) {
+ uni.stopPullDownRefresh()
+ return
+ }
+ this.refreshData()
+ },
+ // 涓婃媺鍔犺浇鏇村
+ onReachBottom() {
+ if (this.status !== 'noMore' && !this.loading) {
+ this.status = 'loading'
+ this.loadMoreData()
+ }
+ },
+ onLoad() {
+ let that = this
+ const eventChannel = this.getOpenerEventChannel()
+ if (eventChannel) {
+ eventChannel.on('orderTypeId', function (data) {
+ that.orderTypeId = data.orderTypeId
+ console.log(data)
+ })
+ }
+ },
+ onShow() {
+ // 姣忔杩涘叆椤甸潰閲嶆柊鍔犺浇
+ this.refreshData()
+ },
+ methods: {
+ refreshData() {
+ if (this.loading) return
+ this.curr = 1
+ this.matList = []
+ this.status = 'more'
+ this.loading = true
+ this.fetchOrderList(true)
+ },
+ // 鍔犺浇鏇村鏁版嵁
+ loadMoreData() {
+ if (this.loading) return
+ this.loading = true
+ this.fetchOrderList(false)
+ },
+ // 鑾峰彇璁㈠崟鍒楄〃
+ async fetchOrderList(isRefresh) {
+ try {
+ const res = await request(
+ '/orderOut/list',
+ {
curr: this.curr,
limit: this.limit,
orderNo: this.condition,
orderType: this.orderTypeId
- }, 'GET', true);
-
- if (res.code === 200) {
- let records = res.data.records || [];
- if (records.length > 0) {
- if (isRefresh) {
- this.matList = records;
- } else {
- this.matList = this.matList.concat(records);
- }
- this.curr = this.curr + 1;
- this.status = 'more';
+ },
+ 'GET',
+ true
+ )
+
+ if (res.code === 200) {
+ let records = res.data.records || []
+ if (records.length > 0) {
+ if (isRefresh) {
+ this.matList = records
} else {
- this.status = 'noMore';
+ this.matList = this.matList.concat(records)
}
- } else if (res.code === 403) {
- uni.showToast({ title: res.msg, icon: "none", position: 'top' });
- setTimeout(() => {
- uni.reLaunch({ url: '../login/login' });
- }, 1000);
+ this.curr = this.curr + 1
+ this.status = 'more'
} else {
- uni.showToast({ title: res.msg, icon: "none", position: 'top' });
+ this.status = 'noMore'
}
- } catch (err) {
- // request.js 宸茬粡澶勭悊浜嗛敊璇彁绀�
- } finally {
- this.loading = false;
- uni.stopPullDownRefresh();
+ } else if (res.code === 403) {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ position: 'top'
+ })
+ setTimeout(() => {
+ uni.reLaunch({ url: '../login/login' })
+ }, 1000)
+ } else {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ position: 'top'
+ })
}
- },
- // 鎼滅储
- async search() {
- if (!this.condition.trim()) {
- this.refreshData();
- return;
- }
- this.loading = true;
- try {
- const res = await request('/orderOut/list', {
+ } catch (err) {
+ // request.js 宸茬粡澶勭悊浜嗛敊璇彁绀�
+ } finally {
+ this.loading = false
+ uni.stopPullDownRefresh()
+ }
+ },
+ // 鎼滅储
+ async search() {
+ if (!this.condition.trim()) {
+ this.refreshData()
+ return
+ }
+ this.loading = true
+ try {
+ const res = await request(
+ '/orderOut/list',
+ {
curr: this.curr,
limit: this.limit,
orderNo: this.condition
- }, 'GET', true);
-
- if (res.code === 200) {
- this.matList = res.data || [];
- this.status = 'noMore';
- } else if (res.code === 403) {
- uni.showToast({ title: res.msg, icon: "none", position: 'top' });
- setTimeout(() => {
- uni.reLaunch({ url: '../login/login' });
- }, 1000);
- } else {
- uni.showToast({ title: res.msg, icon: "none", position: 'top' });
- }
- } catch (err) {
- // request.js 宸茬粡澶勭悊浜嗛敊璇彁绀�
- } finally {
- this.loading = false;
+ },
+ 'GET',
+ true
+ )
+
+ if (res.code === 200) {
+ this.matList = res.data || []
+ this.status = 'noMore'
+ } else if (res.code === 403) {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ position: 'top'
+ })
+ setTimeout(() => {
+ uni.reLaunch({ url: '../login/login' })
+ }, 1000)
+ } else {
+ uni.showToast({
+ title: res.msg,
+ icon: 'none',
+ position: 'top'
+ })
}
- },
- // 鍙栨秷鎼滅储
- onCancelSearch() {
- this.condition = '';
- this.refreshData();
- },
- // 鏍规嵁鐘舵�佽繑鍥炴牱寮忕被鍚�
- getSettleClass(settle) {
- // settle: 1-寰呭鐞�, 2-澶勭悊涓�, 3-宸插畬鎴�, 4-宸插彇娑� (鏍规嵁瀹為檯鎯呭喌璋冩暣)
- const classMap = {
- 1: 'badge-pending',
- 2: 'badge-processing',
- 3: 'badge-completed',
- 4: 'badge-cancelled'
- };
- return classMap[settle] || 'badge-default';
- },
- // 璺宠浆鍒拌鍗曡鎯�
- toPrint(item) {
- let that = this;
- uni.navigateTo({
- url: "./orderDetlList",
- success: function(res) {
- res.eventChannel.emit('data', {
- data: item
- });
- },
- events: {
- acceptDataFromOpenedPage: function(data) {
- that.matnr = data.data;
- that.findMat(that.matnr);
- },
- },
- });
+ } catch (err) {
+ // request.js 宸茬粡澶勭悊浜嗛敊璇彁绀�
+ } finally {
+ this.loading = false
}
+ },
+ // 鍙栨秷鎼滅储
+ onCancelSearch() {
+ this.condition = ''
+ this.refreshData()
+ },
+ // 鏍规嵁鐘舵�佽繑鍥炴牱寮忕被鍚�
+ getSettleClass(settle) {
+ // settle: 1-寰呭鐞�, 2-澶勭悊涓�, 3-宸插畬鎴�, 4-宸插彇娑� (鏍规嵁瀹為檯鎯呭喌璋冩暣)
+ const classMap = {
+ 1: 'badge-pending',
+ 2: 'badge-processing',
+ 3: 'badge-completed',
+ 4: 'badge-cancelled'
+ }
+ return classMap[settle] || 'badge-default'
+ },
+ // 璺宠浆鍒拌鍗曡鎯�
+ toPrint(item) {
+ let that = this
+ uni.navigateTo({
+ url: './orderDetlList',
+ success: function (res) {
+ res.eventChannel.emit('data', {
+ data: item
+ })
+ },
+ events: {
+ acceptDataFromOpenedPage: function (data) {
+ that.matnr = data.data
+ that.findMat(that.matnr)
+ }
+ }
+ })
}
}
+}
</script>
<style>
- @import url('@/static/css/wms.css/wms.css');
-
- .page-container {
- min-height: 100vh;
- background: #f5f7fa;
- padding-bottom: 20rpx;
- }
-
- .search-bar {
- padding: 0rpx 8rpx;
- background: #ffffff;
- box-shadow: 0 2rpx 12rpx rgba(0, 129, 255, 0.08);
- }
-
- .order-list {
- padding: 0 24rpx;
- }
-
- .order-card {
- background: #ffffff;
- border-radius: 16rpx;
- margin-top: 20rpx;
- box-shadow: 0 4rpx 20rpx rgba(0, 129, 255, 0.1);
- overflow: hidden;
- transition: transform 0.2s ease, box-shadow 0.2s ease;
- border: 1rpx solid #e4e7ed;
- }
-
- .order-card:active {
- transform: scale(0.98);
- box-shadow: 0 2rpx 10rpx rgba(0, 129, 255, 0.15);
- }
-
- .card-header {
- display: flex;
- align-items: center;
- padding: 24rpx 28rpx;
- background: linear-gradient(135deg, #0081ff 0%, #1890ff 100%);
- }
-
- .order-badge {
- padding: 6rpx 16rpx;
- border-radius: 20rpx;
- margin-right: 20rpx;
- }
-
- .badge-text {
- font-size: 22rpx;
- font-weight: 500;
- color: #ffffff;
- }
-
- /* 鐘舵�佸窘绔犻鑹� */
- .badge-pending {
- background: rgba(255, 255, 255, 0.3);
- }
-
- .badge-processing {
- background: #ffc107;
- }
-
- .badge-completed {
- background: #28a745;
- }
-
- .badge-cancelled {
- background: #dc3545;
- }
-
- .badge-default {
- background: rgba(255, 255, 255, 0.25);
- }
-
- .order-no {
- flex: 1;
- }
-
- .order-no-label {
- font-size: 22rpx;
- color: rgba(255, 255, 255, 0.7);
- display: block;
- }
-
- .order-no-value {
- font-size: 28rpx;
- color: #ffffff;
- font-weight: 600;
- display: block;
- margin-top: 4rpx;
- }
-
- .card-body {
- padding: 24rpx 28rpx;
- }
-
- .info-row {
- display: flex;
- flex-wrap: wrap;
- }
-
- .info-item {
- width: 50%;
- margin-bottom: 16rpx;
- }
-
- .info-label {
- font-size: 24rpx;
- color: #909399;
- display: block;
- }
-
- .info-value {
- font-size: 28rpx;
- color: #303133;
- font-weight: 500;
- display: block;
- margin-top: 6rpx;
- }
-
- .card-footer {
- display: flex;
- align-items: center;
- justify-content: flex-end;
- padding: 20rpx 28rpx;
- border-top: 1rpx solid #f0f0f0;
- }
-
- .view-detail {
- font-size: 26rpx;
- color: #909399;
- margin-right: 8rpx;
- }
-
- /* 绌虹姸鎬� */
- .empty-state {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding: 120rpx 0;
- }
-
- .empty-text {
- font-size: 30rpx;
- color: #909399;
- margin-top: 30rpx;
- }
-
- .empty-hint {
- font-size: 24rpx;
- color: #c0c4cc;
- margin-top: 12rpx;
- }
-</style>
\ No newline at end of file
+@import url('@/static/css/wms.css/wms.css');
+
+.page-container {
+ min-height: 100vh;
+ background: #f5f7fa;
+ padding-bottom: 20rpx;
+}
+
+.search-bar {
+ padding: 0rpx 8rpx;
+ background: #ffffff;
+ box-shadow: 0 2rpx 12rpx rgba(0, 129, 255, 0.08);
+}
+
+.order-list {
+ padding: 0 24rpx;
+}
+
+.order-card {
+ background: #ffffff;
+ border-radius: 16rpx;
+ margin-top: 20rpx;
+ box-shadow: 0 4rpx 20rpx rgba(0, 129, 255, 0.1);
+ overflow: hidden;
+ transition: transform 0.2s ease, box-shadow 0.2s ease;
+ border: 1rpx solid #e4e7ed;
+}
+
+.order-card:active {
+ transform: scale(0.98);
+ box-shadow: 0 2rpx 10rpx rgba(0, 129, 255, 0.15);
+}
+
+.card-header {
+ display: flex;
+ align-items: center;
+ padding: 24rpx 28rpx;
+ background: linear-gradient(135deg, #0081ff 0%, #1890ff 100%);
+}
+
+.order-badge {
+ padding: 6rpx 16rpx;
+ border-radius: 20rpx;
+ margin-right: 20rpx;
+}
+
+.badge-text {
+ font-size: 22rpx;
+ font-weight: 500;
+ color: #ffffff;
+}
+
+/* 鐘舵�佸窘绔犻鑹� */
+.badge-pending {
+ background: rgba(255, 255, 255, 0.3);
+}
+
+.badge-processing {
+ background: #ffc107;
+}
+
+.badge-completed {
+ background: #28a745;
+}
+
+.badge-cancelled {
+ background: #dc3545;
+}
+
+.badge-default {
+ background: rgba(255, 255, 255, 0.25);
+}
+
+.order-no {
+ flex: 1;
+}
+
+.order-no-label {
+ font-size: 22rpx;
+ color: rgba(255, 255, 255, 0.7);
+ display: block;
+}
+
+.order-no-value {
+ font-size: 28rpx;
+ color: #ffffff;
+ font-weight: 600;
+ display: block;
+ margin-top: 4rpx;
+}
+
+.card-body {
+ padding: 24rpx 28rpx;
+}
+
+.info-row {
+ display: flex;
+ flex-wrap: wrap;
+}
+
+.info-item {
+ width: 50%;
+ margin-bottom: 16rpx;
+}
+
+.info-label {
+ font-size: 24rpx;
+ color: #909399;
+ display: block;
+}
+
+.info-value {
+ font-size: 28rpx;
+ color: #303133;
+ font-weight: 500;
+ display: block;
+ margin-top: 6rpx;
+}
+
+.card-footer {
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ padding: 20rpx 28rpx;
+ border-top: 1rpx solid #f0f0f0;
+}
+
+.view-detail {
+ font-size: 26rpx;
+ color: #909399;
+ margin-right: 8rpx;
+}
+
+/* 绌虹姸鎬� */
+.empty-state {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ padding: 120rpx 0;
+}
+
+.empty-text {
+ font-size: 30rpx;
+ color: #909399;
+ margin-top: 30rpx;
+}
+
+.empty-hint {
+ font-size: 24rpx;
+ color: #c0c4cc;
+ margin-top: 12rpx;
+}
+</style>
--
Gitblit v1.9.1