|
|
@@ -15,6 +15,23 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <!-- 状态标签 -->
|
|
|
+ <view class="status-tabs">
|
|
|
+ <view
|
|
|
+ class="status-tab"
|
|
|
+ :class="{ 'active': currentStatus === '' }"
|
|
|
+ @tap="handleStatusChange('')"
|
|
|
+ >
|
|
|
+ <text class="status-tab-text" :class="{ 'active-text': currentStatus === '' }">全部</text>
|
|
|
+ </view>
|
|
|
+ <view
|
|
|
+ class="status-tab"
|
|
|
+ :class="{ 'active': currentStatus === 'PENDING' }"
|
|
|
+ @tap="handleStatusChange('PENDING')"
|
|
|
+ >
|
|
|
+ <text class="status-tab-text" :class="{ 'active-text': currentStatus === 'PENDING' }">待签收</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 列表内容 -->
|
|
|
@@ -87,6 +104,7 @@
|
|
|
// 列表数据
|
|
|
const dataList = ref<any[]>([])
|
|
|
const keyword = ref<string>("")
|
|
|
+ const currentStatus = ref<string>("")
|
|
|
const page = ref<number>(1)
|
|
|
const pageSize: number = 10
|
|
|
const hasMore = ref<boolean>(true)
|
|
|
@@ -185,7 +203,8 @@
|
|
|
page.value = 1
|
|
|
}
|
|
|
|
|
|
- const result = await getProductSalseList(page.value, pageSize, keyword.value, currentUserId)
|
|
|
+ const signStatus = currentStatus.value === 'PENDING' ? 'PENDING' : ''
|
|
|
+ const result = await getProductSalseList(page.value, pageSize, keyword.value, currentUserId, signStatus)
|
|
|
const resultObj = result as UTSJSONObject
|
|
|
const rows = resultObj['rows']
|
|
|
const total = resultObj['total'] as number
|
|
|
@@ -229,6 +248,13 @@
|
|
|
keyword.value = ''
|
|
|
loadData(true)
|
|
|
}
|
|
|
+
|
|
|
+ // 切换状态标签
|
|
|
+ const handleStatusChange = (status: string): void => {
|
|
|
+ currentStatus.value = status
|
|
|
+ page.value = 1
|
|
|
+ loadData(true)
|
|
|
+ }
|
|
|
|
|
|
// 下拉刷新
|
|
|
const handleRefresh = (): void => {
|
|
|
@@ -367,6 +393,42 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .status-tabs {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ padding: 0rpx 30rpx 20rpx;
|
|
|
+ background-color: #ffffff;
|
|
|
+ }
|
|
|
+
|
|
|
+ .status-tab {
|
|
|
+ flex: 1;
|
|
|
+ padding: 16rpx 0;
|
|
|
+ text-align: center;
|
|
|
+ margin-right: 16rpx;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ background-color: #f5f5f5;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ &:last-child {
|
|
|
+ margin-right: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ &.active {
|
|
|
+ background-color: #007aff;
|
|
|
+ }
|
|
|
+
|
|
|
+ .status-tab-text {
|
|
|
+ font-size: 26rpx;
|
|
|
+ color: #666666;
|
|
|
+
|
|
|
+ &.active-text {
|
|
|
+ color: #ffffff;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.list-item {
|
|
|
margin: 8rpx 10rpx;
|
|
|
background-color: #ffffff;
|