|
@@ -2,6 +2,24 @@
|
|
|
<view class="container">
|
|
|
<!-- 固定在顶部的筛选区域 -->
|
|
|
<view class="filter-header">
|
|
|
+ <view class="input-group">
|
|
|
+ <u--input
|
|
|
+ class="input-item"
|
|
|
+ v-model="customerName"
|
|
|
+ placeholder="请输入客户名称"
|
|
|
+ border="surround"
|
|
|
+ clearable
|
|
|
+ ></u--input>
|
|
|
+ <u--input
|
|
|
+ class="input-item"
|
|
|
+ v-model="quantity"
|
|
|
+ placeholder="请输入订单数量"
|
|
|
+ type="number"
|
|
|
+ border="surround"
|
|
|
+ clearable
|
|
|
+ ></u--input>
|
|
|
+ </view>
|
|
|
+
|
|
|
<view class="filter-controls">
|
|
|
<view class="date-picker">
|
|
|
<picker mode="date" @change="bindStartDateChange">
|
|
@@ -31,8 +49,8 @@
|
|
|
</view>
|
|
|
</picker>
|
|
|
</view>
|
|
|
- <button class="filter-btn" @click="handleSearch">查询</button>
|
|
|
</view>
|
|
|
+ <button class="filter-btn" @click="handleSearch">查询</button>
|
|
|
</view>
|
|
|
|
|
|
|
|
@@ -58,7 +76,7 @@
|
|
|
>
|
|
|
<!-- 原有订单内容 -->
|
|
|
<view class="item-header">
|
|
|
- <text class="order-id">订单号:{{ item.id }}</text>
|
|
|
+ <text class="order-id">订单号:{{ item.customerName }}</text>
|
|
|
<view :class="['status-badge', getStatusClass(item.status)]">
|
|
|
{{ getStatusText(item.status) }}
|
|
|
</view>
|
|
@@ -114,6 +132,8 @@ export default {
|
|
|
moveIndex: -1,
|
|
|
startDate: '',
|
|
|
endDate: '',
|
|
|
+ customerName: '',
|
|
|
+ quantity: '',
|
|
|
orderList: [],
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
@@ -126,6 +146,9 @@ export default {
|
|
|
created() {
|
|
|
this.fetchOrderList()
|
|
|
},
|
|
|
+ onShow() {
|
|
|
+ this.handleSearch()
|
|
|
+ },
|
|
|
methods: {
|
|
|
handleMove(index) {
|
|
|
console.info('index-----', index)
|
|
@@ -156,12 +179,10 @@ export default {
|
|
|
},
|
|
|
clearStartDate() {
|
|
|
this.startDate = '';
|
|
|
- // 如果需要触发change事件可以手动调用
|
|
|
this.bindStartDateChange({detail: {value: ''}});
|
|
|
},
|
|
|
clearEndDate() {
|
|
|
this.endDate = '';
|
|
|
- // 如果需要触发change事件可以手动调用
|
|
|
this.bindEndDateChange({detail: {value: ''}});
|
|
|
},
|
|
|
bindStartDateChange(e) {
|
|
@@ -188,6 +209,8 @@ export default {
|
|
|
let params = {
|
|
|
current: this.pageNum,
|
|
|
size: this.pageSize,
|
|
|
+ customerName: this.customerName,
|
|
|
+ quantity: this.quantity,
|
|
|
startDate: this.startDate,
|
|
|
endDate: this.endDate
|
|
|
}
|
|
@@ -252,8 +275,9 @@ export default {
|
|
|
top: 0;
|
|
|
z-index: 100;
|
|
|
background: #fff;
|
|
|
- padding: 15rpx 20rpx;
|
|
|
+ padding: 20rpx;
|
|
|
border-bottom: 1rpx solid #f0f0f0;
|
|
|
+ box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -425,4 +449,44 @@ export default {
|
|
|
border-radius: 12rpx; /* 与列表项圆角一致 */
|
|
|
overflow: hidden; /* 防止按钮溢出 */
|
|
|
}
|
|
|
+
|
|
|
+.input-group {
|
|
|
+ display: flex;
|
|
|
+ gap: 20rpx;
|
|
|
+ margin-bottom: 20rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.input-item {
|
|
|
+ flex: 1;
|
|
|
+
|
|
|
+ .u--input {
|
|
|
+ background: #f8f8f8;
|
|
|
+ border-radius: 10rpx;
|
|
|
+ padding: 16rpx 20rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #333;
|
|
|
+ border: 1rpx solid #e0e0e0;
|
|
|
+ transition: all 0.3s ease;
|
|
|
+
|
|
|
+ &__content {
|
|
|
+ height: 80rpx;
|
|
|
+ line-height: 80rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ &__field-wrapper {
|
|
|
+ border: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ &__placeholder {
|
|
|
+ color: #999;
|
|
|
+ font-size: 26rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ &:focus {
|
|
|
+ border-color: #2979ff;
|
|
|
+ box-shadow: 0 0 0 2rpx rgba(41, 121, 255, 0.2);
|
|
|
+ background: #fff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|