From eff43fd0ea0d3051d56c2aa9827cc3081e46d865 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期五, 16 一月 2026 08:50:10 +0800
Subject: [PATCH] #
---
pages/outbound/orderOut/orderList.vue | 170 +++++++++++++++++++++++++++-----------------------------
1 files changed, 81 insertions(+), 89 deletions(-)
diff --git a/pages/outbound/orderOut/orderList.vue b/pages/outbound/orderOut/orderList.vue
index 2742bd6..c69b5ee 100644
--- a/pages/outbound/orderOut/orderList.vue
+++ b/pages/outbound/orderOut/orderList.vue
@@ -10,12 +10,12 @@
<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.settle)">
- <text class="badge-text">{{item.settle$ || '鏈煡'}}</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.orderNo}}</text>
+ <text class="order-no-value">{{item.code}}</text>
</view>
</view>
@@ -24,14 +24,25 @@
<view class="info-row">
<view class="info-item">
<text class="info-label">鍗曟嵁绫诲瀷</text>
- <text class="info-value">{{item.docType$ || '-'}}</text>
+ <text class="info-value">{{item.wkType$ || '-'}}</text>
+ </view>
+ <!-- <view class="info-item">
+ <text class="info-label">搴斿嚭鏁伴噺</text>
+ <text class="info-value">{{item.anfme || '-'}}</text>
+ </view> -->
+ </view>
+ <view class="info-row">
+ <view class="info-item">
+ <text class="info-label">搴斿嚭鏁伴噺</text>
+ <text class="info-value">{{item.anfme || '-'}}</text>
</view>
<view class="info-item">
- <text class="info-label">浠撳簱</text>
- <text class="info-value">{{item.itemName || '-'}}</text>
+ <text class="info-label">瀹屾垚鏁伴噺</text>
+ <text class="info-value">{{item.qty || '-'}}</text>
</view>
</view>
</view>
+
<!-- 鍗$墖搴曢儴 -->
<view class="card-footer">
@@ -54,6 +65,7 @@
</template>
<script>
+ import { request } from '@/common/request.js'
export default {
data() {
return {
@@ -62,8 +74,7 @@
condition: '',
loading: false,
curr: 1,
- baseUrl: '',
- token: '',
+ limit:5,
status: 'more',
contentText: {
contentdown: '涓婃媺鍔犺浇鏇村',
@@ -96,8 +107,6 @@
}
},
onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl');
- this.token = uni.getStorageSync('token');
// 姣忔杩涘叆椤甸潰閲嶆柊鍔犺浇
this.refreshData();
},
@@ -115,90 +124,72 @@
this.fetchOrderList(false);
},
// 鑾峰彇璁㈠崟鍒楄〃
- fetchOrderList(isRefresh) {
- let that = this;
- uni.request({
- url: that.baseUrl + '/order/pakin/order/list/pda/page/auth',
- data: {
- curr: that.curr,
- limit: 20,
- tagId: that.tagIdNow
- },
- method: "GET",
- header: {
- 'token': uni.getStorageSync('token'),
- },
- success(result) {
- var res = result.data;
- if (res.code === 200) {
- let records = res.data.records || [];
- if (records.length > 0) {
- if (isRefresh) {
- that.matList = records;
- } else {
- that.matList = that.matList.concat(records);
- }
- that.curr = that.curr + 1;
- that.status = 'more';
+ async fetchOrderList(isRefresh) {
+ try {
+ const res = await request('/orderOut/list', {
+ curr: this.curr,
+ limit: this.limit,
+ orderNo: this.condition
+ }, 'GET', true);
+
+ if (res.code === 200) {
+ let records = res.data.records || [];
+ if (records.length > 0) {
+ if (isRefresh) {
+ this.matList = records;
} else {
- that.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';
}
- },
- fail(err) {
- uni.showToast({ title: '缃戠粶璇锋眰澶辫触', icon: "none", position: 'top' });
- },
- complete() {
- that.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' });
}
- });
+ } catch (err) {
+ // request.js 宸茬粡澶勭悊浜嗛敊璇彁绀�
+ } finally {
+ this.loading = false;
+ uni.stopPullDownRefresh();
+ }
},
// 鎼滅储
- search() {
+ async search() {
if (!this.condition.trim()) {
this.refreshData();
return;
}
- let that = this;
- that.loading = true;
- uni.request({
- url: that.baseUrl + '/order/search/pda/auth',
- data: {
- condition: that.condition
- },
- method: "GET",
- header: {
- 'token': uni.getStorageSync('token'),
- },
- success(result) {
- var res = result.data;
- if (res.code === 200) {
- that.matList = res.data || [];
- that.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' });
- }
- },
- fail() {
- uni.showToast({ title: '鎼滅储璇锋眰澶辫触', icon: "none", position: 'top' });
- },
- complete() {
- that.loading = false;
+ 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;
+ }
},
// 鍙栨秷鎼滅储
onCancelSearch() {
@@ -220,7 +211,7 @@
toPrint(item) {
let that = this;
uni.navigateTo({
- url: "../order/orderDetlList",
+ url: "./orderDetlList",
success: function(res) {
res.eventChannel.emit('data', {
data: item
@@ -243,14 +234,14 @@
.page-container {
min-height: 100vh;
- background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
+ background: #f5f7fa;
padding-bottom: 20rpx;
}
.search-bar {
- padding: 0rpx 14rpx;
+ padding: 0rpx 8rpx;
background: #ffffff;
- box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08);
+ box-shadow: 0 2rpx 12rpx rgba(0, 129, 255, 0.08);
}
.order-list {
@@ -261,21 +252,22 @@
background: #ffffff;
border-radius: 16rpx;
margin-top: 20rpx;
- box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08);
+ 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, 0, 0, 0.12);
+ 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, #667eea 0%, #764ba2 100%);
+ background: linear-gradient(135deg, #0081ff 0%, #1890ff 100%);
}
.order-badge {
--
Gitblit v1.9.1