feat(receiving): 收货管理模块界面优化,统一字号与状态色

- 收货详情/收货单信息(info-container)
  * 表单标签、输入框、单选、文本域、状态标签字号统一为 36rpx
  * 状态色统一:收货中-橙、已完成-绿、已取消-红
  * 备注框由 u-input 改为 u-textarea 长文本
  * 打印按钮字号 36rpx,并增加与收货单号框的间隔
  * 物流单号相机按钮调大
  * 货主选择框样式对齐新建页,单选选项增加间隔
- 新建收货任务(receivingCreate)
  * 表单字号统一 36rpx
  * 货主选择改为底部弹窗,来货照片与装卸信息优化
- 收货列表(receiving)
  * 新增状态/货主/日期筛选弹窗与创建收货任务入口
  * 状态标签按状态着色
  * 界面字号统一
- 收货明细/清单(detail-container、receivingList)
  * 空状态提示字号 34rpx
  * 明细状态色统一,标题字号调整
- random-storage
  * 样式微调:增加底部间距与分隔线
This commit is contained in:
zm2000 2026-11-17 18:11:53 +08:00
parent 1469179ff2
commit 7c90d2f498
7 changed files with 986 additions and 174 deletions

View File

@ -453,6 +453,8 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding-bottom: 15rpx;
border-bottom: 1rpx solid #f0f0f0;
::v-deep .u-tag__text { ::v-deep .u-tag__text {
font-size: 36rpx; font-size: 36rpx;

View File

@ -32,7 +32,7 @@
</view> </view>
<!-- 空状态 --> <!-- 空状态 -->
<view class="empty-detail" v-else> <view class="empty-detail" v-else>
<u-empty mode="list" text="请选择商品明细"></u-empty> <u-empty mode="list" text="请选择商品明细" text-size="34rpx"></u-empty>
</view> </view>
<!-- 商品列表分页显示区 --> <!-- 商品列表分页显示区 -->
@ -277,7 +277,7 @@
getDetailStatusType(status) { getDetailStatusType(status) {
const map = { const map = {
'pending': 'warning', 'pending': 'warning',
'receiving': 'primary', 'receiving': 'warning',
'completed': 'success', 'completed': 'success',
'cancelled': 'error' 'cancelled': 'error'
}; };
@ -432,7 +432,7 @@
} }
.section-title { .section-title {
font-size: 32rpx; font-size: 34rpx;
font-weight: bold; font-weight: bold;
color: #333; color: #333;
margin-bottom: 20rpx; margin-bottom: 20rpx;

View File

@ -1,12 +1,12 @@
<template> <template>
<scroll-view class="scroll-container" scroll-y v-if="receivingInfo"> <scroll-view class="scroll-container" scroll-y v-if="receivingInfo">
<u-form :model="receivingInfo" :rules="rules" ref="infoFormRef" label-width="180rpx"> <u-form class="form_box" :model="receivingInfo" :rules="rules" ref="infoFormRef" label-width="180rpx">
<view class="section"> <view class="section">
<view class="section-title">基础信息</view> <view class="section-title">基础信息</view>
<u-form-item label="收货单号"> <u-form-item label="收货单号">
<u-input v-model="receivingInfo.receiving_number" disabled /> <u-input v-model="receivingInfo.receiving_number" disabled />
<u-button style="width: 150rpx;" type="primary" @click="print">打印</u-button> <u-button class="print-btn" style="width: 150rpx;" type="primary" @click="print">打印</u-button>
</u-form-item> </u-form-item>
<u-form-item label="货主" prop="store_id"> <u-form-item label="货主" prop="store_id">
@ -21,13 +21,13 @@
<u-icon name="arrow-right" size="24rpx" color="#2979ff"></u-icon> <u-icon name="arrow-right" size="24rpx" color="#2979ff"></u-icon>
</view> </view>
</view> </view>
<view v-else>{{ receivingInfo.store ? receivingInfo.store.store_remask : '未设置' }}</view> <view v-else class="store-value-text">{{ receivingInfo.store ? receivingInfo.store.store_remask : '未设置' }}</view>
</u-form-item> </u-form-item>
<u-form-item label="来货方式" prop="delivery_method"> <u-form-item label="来货方式" prop="delivery_method">
<u-radio-group v-model="receivingInfo.delivery_method" disabled> <u-radio-group v-model="receivingInfo.delivery_method" disabled>
<u-radio v-for="item in deliveryMethods" :key="item.value" :name="item.value" <u-radio v-for="item in deliveryMethods" :key="item.value" :name="item.value"
:label="item.label"></u-radio> label-size="36rpx" :label="item.label"></u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
@ -39,7 +39,7 @@
<view class="tracking-input-wrap"> <view class="tracking-input-wrap">
<u-input v-model="receivingInfo.tracking_number" placeholder="请输入物流单号" /> <u-input v-model="receivingInfo.tracking_number" placeholder="请输入物流单号" />
<view class="scan-camera-btn" @click="handleTrackingScan"> <view class="scan-camera-btn" @click="handleTrackingScan">
<u-icon name="camera" size="34rpx" color="#2979ff"></u-icon> <u-icon name="camera" size="48rpx" color="#2979ff"></u-icon>
</view> </view>
</view> </view>
</u-form-item> </u-form-item>
@ -55,7 +55,7 @@
<u-form-item label="装卸方式" prop="loading_method"> <u-form-item label="装卸方式" prop="loading_method">
<u-radio-group v-model="receivingInfo.loading_method" disabled> <u-radio-group v-model="receivingInfo.loading_method" disabled>
<u-radio v-for="item in loadingMethods" :key="item.value" :name="item.value" <u-radio v-for="item in loadingMethods" :key="item.value" :name="item.value"
:label="item.label"></u-radio> label-size="36rpx" :label="item.label"></u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
@ -91,7 +91,7 @@
<view class="section"> <view class="section">
<view class="section-title">备注信息</view> <view class="section-title">备注信息</view>
<u-form-item label="备注"> <u-form-item label="备注">
<u-input v-model="receivingInfo.remark" type="textarea" placeholder="请输入备注" height="120" /> <u-textarea v-model="receivingInfo.remark" placeholder="请输入备注" height="120" />
</u-form-item> </u-form-item>
</view> </view>
<view class="section"> <view class="section">
@ -395,7 +395,7 @@
}, },
getStatusType(status) { getStatusType(status) {
const map = { const map = {
'receiving': 'primary', 'receiving': 'warning',
'completed': 'success', 'completed': 'success',
'cancelled': 'error' 'cancelled': 'error'
}; };
@ -411,26 +411,63 @@
}; };
</script> </script>
<style scoped> <style lang="scss" scoped>
.scroll-container { .scroll-container {
height: 100%; height: 100%;
} }
.form_box {
/* 表单标签、输入框字号统一为 36rpx */
::v-deep .u-form-item__body__left__content__label {
font-size: 36rpx;
white-space: nowrap;
}
::v-deep .u-input__content__field-wrapper__field {
font-size: 36rpx !important;
}
::v-deep .input-placeholder {
font-size: 36rpx;
}
::v-deep .u-textarea__field {
font-size: 36rpx;
color: #303133;
}
/* 单选项之间间隔 */
::v-deep .u-radio-group .u-radio + .u-radio {
margin-left: 24rpx;
}
/* 标签文字字号 36rpx */
::v-deep .u-tag__text {
font-size: 36rpx;
}
/* 表单校验错误提示字号 34rpx */
::v-deep .u-form-item__body__right__message {
font-size: 34rpx;
line-height: 1.4;
}
}
.tracking-input-wrap { .tracking-input-wrap {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
gap: 16rpx; gap: 16rpx;
}
.tracking-input-wrap :deep(.u-input) { ::v-deep .u-input {
flex: 1; flex: 1;
}
} }
.scan-camera-btn { .scan-camera-btn {
width: 76rpx; width: 88rpx;
height: 76rpx; height: 88rpx;
border-radius: 38rpx; border-radius: 44rpx;
background: #eef4ff; background: #eef4ff;
display: flex; display: flex;
align-items: center; align-items: center;
@ -443,6 +480,12 @@
opacity: 0.85; opacity: 0.85;
} }
.print-btn {
margin-left: 20rpx;
flex-shrink: 0;
font-size: 36rpx !important;
}
.store-bind-trigger { .store-bind-trigger {
width: 100%; width: 100%;
min-height: 72rpx; min-height: 72rpx;
@ -450,12 +493,24 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
gap: 16rpx; gap: 16rpx;
padding: 14rpx 20rpx;
background: #ecf5ff;
border: 1rpx solid #d9ecff;
border-radius: 10rpx;
box-sizing: border-box;
} }
.store-bind-text { .store-bind-text {
flex: 1; flex: 1;
font-size: 28rpx; font-size: 36rpx;
color: #303133; color: #303133;
line-height: 1.4;
}
.store-value-text {
font-size: 36rpx;
color: #303133;
line-height: 1.4;
} }
.store-bind-action { .store-bind-action {
@ -478,7 +533,7 @@
} }
.section-title { .section-title {
font-size: 32rpx; font-size: 34rpx;
font-weight: bold; font-weight: bold;
color: #333; color: #333;
margin-bottom: 20rpx; margin-bottom: 20rpx;

View File

@ -1,7 +1,23 @@
<template> <template>
<view class="receiving-list"> <view class="receiving-list">
<view class="normar_container"> <view class="normar_container">
<page-nav :title="title"></page-nav> <!-- 顶部状态栏 -->
<view class="status-bar"></view>
<!-- 自定义页头:返回 + 标题 + 右上角操作 -->
<view class="page-header">
<view class="back-btn" @click="handleBack">
<u-icon name="arrow-left" size="18" color="#333"></u-icon>
</view>
<text class="header-title">{{ title }}</text>
<view class="header-side header-side--right">
<view class="header-side__btn" @click="showFilterPopup">
<text class="header-side__btn-text">筛选</text>
</view>
<view class="header-btn-refresh" @click="createReceiving">
<text class="header-btn-refresh__text">新建收货</text>
</view>
</view>
</view>
<!-- 搜索和筛选区域 --> <!-- 搜索和筛选区域 -->
<view class="search-filter"> <view class="search-filter">
<!-- 搜索框 --> <!-- 搜索框 -->
@ -18,24 +34,10 @@
</view> </view>
<!-- 筛选按钮 -->
<view class="filter-actions">
<view class="filter-buttons">
<u-button size="mini" type="primary" plain @click="showFilterPopup">
筛选
</u-button>
<u-button size="mini" type="success" @click="createReceiving">
<u-icon name="plus" size="16"></u-icon>
新建收货
</u-button>
</view>
</view>
<!-- 状态标签 --> <!-- 状态标签 -->
<view class="status-tags"> <view class="status-tags">
<view class="status-tag" v-for="status in statusList" :key="status.value" <view class="status-tag" v-for="status in statusList" :key="status.value"
:class="{ active: activeStatus === status.value }" @click="changeStatus(status.value)"> :class="statusTagClass(status)" @click="changeStatus(status.value)">
<text class="tag-name">{{ status.label }}</text> <text class="tag-name">{{ status.label }}</text>
<u-badge :value="status.count" size="mini"></u-badge> <u-badge :value="status.count" size="mini"></u-badge>
</view> </view>
@ -65,24 +67,20 @@
<!-- 基本信息 --> <!-- 基本信息 -->
<view class="item-info"> <view class="item-info">
<view class="info-row"> <view class="info-row">
<u-icon name="home" size="16" color="#999"></u-icon>
<text class="info-label">货主:</text> <text class="info-label">货主:</text>
<text class="info-value">{{ item['store.store_remask'] || '--' }}</text> <text class="info-value">{{ item['store.store_remask'] || '--' }}</text>
</view> </view>
<view class="info-row"> <view class="info-row">
<u-icon name="car" size="16" color="#999"></u-icon>
<text class="info-label">车牌/运单:</text> <text class="info-label">车牌/运单:</text>
<text class="info-value">{{ item.license_plate || item.tracking_number || '--' }}</text> <text class="info-value">{{ item.license_plate || item.tracking_number || '--' }}</text>
</view> </view>
<view class="info-row"> <view class="info-row">
<u-icon name="account" size="16" color="#999"></u-icon>
<text class="info-label">创建人:</text> <text class="info-label">创建人:</text>
<text class="info-value">{{ item['creator.real_name'] || '--' }}</text> <text class="info-value">{{ item['creator.real_name'] || '--' }}</text>
</view> </view>
<view class="info-row" v-if="item.images && item.images.length>0"> <view class="info-row" v-if="item.images && item.images.length>0">
<u-icon name="photo" size="16" color="#999"></u-icon>
<text class="info-label">照片:</text> <text class="info-label">照片:</text>
<span class="info-value" @click.stop="showImgs(item.images)"> <span class="info-value" @click.stop="showImgs(item.images)">
<image class="miniImg" v-for="(url, index) in item.images" :key="index" :src="url"></image> <image class="miniImg" v-for="(url, index) in item.images" :key="index" :src="url"></image>
@ -102,29 +100,38 @@
<!-- 底部安全区域 --> <!-- 底部安全区域 -->
<view class="safe-area-bottom"></view> <view class="safe-area-bottom"></view>
</scroll-view> </scroll-view>
<pagination :pageNum.sync="currentPage" :pageSize="pageSize" :total="totalItems" :showTotal="true" <view class="pagination-wrap">
:prevText="'上一页'" :nextText="'下一页'" :showFirstLast="true" :firstText="'首页'" :lastText="'末页'" <pagination :pageNum.sync="currentPage" :pageSize="pageSize" :total="totalItems" :showTotal="true"
@change="handlePageChange" /> :prevText="'上一页'" :nextText="'下一页'" :showFirstLast="true" :firstText="'首页'" :lastText="'末页'"
@change="handlePageChange" />
</view>
</view> </view>
<!-- 筛选弹出层 --> <!-- 筛选弹出层 -->
<u-popup :show="filterVisible" mode="bottom" :closeable="true" border-radius="20" @close="filterVisible = false"> <u-popup :show="filterVisible" mode="bottom" :closeable="false" round="20" @close="filterVisible = false">
<view class="filter-popup"> <view class="filter-popup">
<view class="popup-header"> <view class="popup-header">
<text class="popup-title">筛选条件</text> <text class="popup-title">筛选条件</text>
<view class="popup-close" @click="filterVisible = false">
<u-icon name="close" color="#909399" size="18"></u-icon>
</view>
</view> </view>
<u--form class="filter-content" labelWidth="auto" labelPosition="left" :model="where" ref="uForm"> <u--form class="filter-content" labelWidth="auto" labelPosition="left" :model="where" ref="uForm">
<u-form-item label="货主" prop="store" borderBottom @click="handleShowStore"> <u-form-item class="store-form-item" label="货主:" prop="store" @click="handleShowStore">
<view>{{storeName}}</view> <view class="store-value">
</u-form-item> <text>{{storeName}}</text>
<u-icon name="arrow-right" color="#2979ff" size="16"></u-icon>
<u-form-item label="创建时间" borderBottom>
<view class="date-range" @click="openDateFilter">
<text>{{where.startDate}} - {{where.endDate}}</text>
</view> </view>
</u-form-item> </u-form-item>
<u-form-item label="" borderBottom> <u-form-item class="date-form-item" label="创建时间:">
<view class="date-range" @click="openDateFilter">
<text>{{where.startDate}} - {{where.endDate}}</text>
<u-icon name="arrow-right" color="#2979ff" size="16"></u-icon>
</view>
</u-form-item>
<u-form-item label="">
<view class="quick-date-buttons"> <view class="quick-date-buttons">
<view class="quick-date-buttons__item" :class="{ 'is-active': dateModel === 'today' }"> <view class="quick-date-buttons__item" :class="{ 'is-active': dateModel === 'today' }">
<u-button size="mini" :type="dateModel === 'today' ? 'primary' : 'default'" @click="setDateRange('today')">今日</u-button> <u-button size="mini" :type="dateModel === 'today' ? 'primary' : 'default'" @click="setDateRange('today')">今日</u-button>
@ -148,23 +155,83 @@
</u-form-item> </u-form-item>
</u--form> </u--form>
<view class="popup-actions"> <view class="popup-actions">
<u-button type="default" shape="circle" @click="resetFilter"> <u-button type="info" shape="square" @click="resetFilter">
重置 重置
</u-button> </u-button>
<u-button type="primary" shape="circle" @click="applyFilter"> <u-button color="#2979ff" shape="square" @click="applyFilter">
确定 确定
</u-button> </u-button>
</view> </view>
</view> </view>
</u-popup> </u-popup>
<!-- 货主选择组件 --> <!-- 货主选择弹窗 -->
<inputAndSelect title="选择货主" :list="stores" :show="showStore" :value="storeId" <u-popup :show="showStore" mode="bottom" round="20" :closeable="false" :safe-area-inset-bottom="true" :close-on-click-overlay="true" @close="handleStoreDrawerClose">
searchBorder="none" @change="handleStoreChange" @close="showStore=false"></inputAndSelect> <view class="store-drawer">
<view class="store-drawer__header">
<text class="store-drawer__title">选择货主</text>
<view class="store-drawer__close" @click="handleStoreDrawerClose">
<u-icon name="close" color="#909399" size="18"></u-icon>
</view>
</view>
<view class="store-drawer__search">
<SearchBar
v-model="storeSearchText"
placeholder="输入货主名称搜索"
:show-scan="false"
:input-font-size="'34rpx'"
:search-text-font-size="'34rpx'"
@search="handleStoreSearchAction"
@clear="handleStoreSearchAction"
></SearchBar>
</view>
<scroll-view class="store-drawer__list" scroll-y :scroll-into-view="storeListScrollInto">
<view
id="store-all-item"
class="store-drawer__item"
:class="{ 'store-drawer__item--active': allStoresSelected }"
@click="selectAllStores"
>
<text class="store-drawer__item-name">全部</text>
<u-icon
:name="allStoresSelected ? 'checkmark-circle-fill' : 'checkmark-circle'"
:color="allStoresSelected ? '#07c160' : '#c8c9cc'"
size="22"
></u-icon>
</view>
<view
v-for="store in filteredStores"
:key="getStoreId(store)"
class="store-drawer__item"
:class="{ 'store-drawer__item--active': isStoreSelected(store) }"
@click="selectStore(store)"
>
<text class="store-drawer__item-name">{{ getStoreName(store) }}</text>
<u-icon
:name="isStoreSelected(store) ? 'checkmark-circle-fill' : 'checkmark-circle'"
:color="isStoreSelected(store) ? '#07c160' : '#c8c9cc'"
size="22"
></u-icon>
</view>
<u-empty v-if="filteredStores.length === 0" mode="data" text="暂无货主"></u-empty>
</scroll-view>
<view class="store-drawer__footer">
<view class="store-drawer__footer-btns">
<view class="store-drawer__footer-btn store-drawer__footer-btn--reset" @click="resetStoreSelection">重置</view>
<view class="store-drawer__footer-btn store-drawer__footer-btn--confirm" @click="applyStoreSelection">确定</view>
</view>
</view>
</view>
</u-popup>
<!-- 时间选择器 --> <!-- 时间选择器 -->
<u-calendar :show="showSelectDate" mode="range" @confirm="handleDateConfirm" @close="showSelectDate=false" :minDate="minDate" :maxDate="maxDate" :monthNum="calendarMonthNum"></u-calendar> <u-calendar ref="calendar" :show="showSelectDate" mode="range" title="选择日期" round="20" @confirm="handleDateConfirm" @close="showSelectDate=false" :minDate="minDate" :maxDate="maxDate" :monthNum="calendarMonthNum">
<view slot="footer" class="calendar-footer">
<view class="calendar-footer__btn calendar-footer__btn--close" @click="closeCalendar">关闭</view>
<view class="calendar-footer__btn calendar-footer__btn--confirm" @click="confirmCalendar">确定</view>
</view>
</u-calendar>
<!-- 加载遮罩 --> <!-- 加载遮罩 -->
<u-loading-page :loading="loading" bg-color="rgba(255,255,255,0.9)"></u-loading-page> <u-loading-page :loading="loading" bg-color="rgba(255,255,255,0.9)"></u-loading-page>
@ -239,6 +306,10 @@
// 货主列表 // 货主列表
stores: [], stores: [],
// 货主弹窗搜索与临时选择
storeSearchText: '',
pendingStoreId: null,
storeListScrollInto: '',
} }
}, },
computed: { computed: {
@ -246,6 +317,19 @@
const min = new Date(this.minDate); const min = new Date(this.minDate);
const max = new Date(this.maxDate); const max = new Date(this.maxDate);
return (max.getFullYear() - min.getFullYear()) * 12 + (max.getMonth() - min.getMonth()) + 1; return (max.getFullYear() - min.getFullYear()) * 12 + (max.getMonth() - min.getMonth()) + 1;
},
// 是否选中「全部」
allStoresSelected() {
return this.pendingStoreId === null || this.pendingStoreId === undefined;
},
// 货主列表按关键字过滤
filteredStores() {
const keyword = String(this.storeSearchText || '').trim().toLowerCase();
if (!keyword) return this.stores;
return this.stores.filter(store => {
const name = String(this.getStoreName(store) || '').toLowerCase();
return name.includes(keyword);
});
} }
}, },
onLoad() { onLoad() {
@ -443,6 +527,18 @@
this.dateModel = 'custom'; this.dateModel = 'custom';
this.showSelectDate = false; this.showSelectDate = false;
}, },
// 关闭日历弹窗
closeCalendar() {
if (this.$refs.calendar) {
this.$refs.calendar.close();
}
},
// 确定选择的日期
confirmCalendar() {
if (this.$refs.calendar) {
this.$refs.calendar.confirm();
}
},
parseCalendarRange(data) { parseCalendarRange(data) {
let startDate = ''; let startDate = '';
let endDate = ''; let endDate = '';
@ -550,16 +646,44 @@
}, },
// 货主选择 // 货主选择
handleStoreChange(option) { getStoreId(store) {
if(!option){ return store?.value ?? store?.id ?? store?.store_id ?? store?.storeId;
this.storeName = "全部"; },
this.storeId = null; getStoreName(store) {
}else{ return store?.label || store?.name || store?.store_name || '-';
this.storeName = option.label; },
this.storeId = option.value; isStoreSelected(store) {
} const id = this.getStoreId(store);
if (id === undefined || id === null) return false;
return String(this.pendingStoreId) === String(id);
},
selectStore(store) {
this.pendingStoreId = this.getStoreId(store);
},
selectAllStores() {
this.pendingStoreId = null;
},
resetStoreSelection() {
this.pendingStoreId = null;
this.storeListScrollInto = '';
this.$nextTick(() => {
this.storeListScrollInto = 'store-all-item';
});
},
applyStoreSelection() {
this.storeId = this.pendingStoreId;
const matched = this.stores.find(store => String(this.getStoreId(store)) === String(this.pendingStoreId));
this.storeName = matched ? this.getStoreName(matched) : '全部';
this.showStore = false; this.showStore = false;
}, },
handleStoreDrawerClose() {
this.showStore = false;
},
handleStoreSearchAction() {
if (typeof uni !== 'undefined' && uni.hideKeyboard) {
uni.hideKeyboard();
}
},
async scan(data) { async scan(data) {
console.log("扫描数据:", data.data); console.log("扫描数据:", data.data);
@ -756,15 +880,19 @@
// 获取状态类型 // 获取状态类型
getStatusType(status) { getStatusType(status) {
const typeMap = { const typeMap = {
'cancelled': 'warning', 'cancelled': 'error',
'receiving': 'primary', 'receiving': 'warning',
'completed': 'success', 'completed': 'success',
}; };
return typeMap[status] || 'info'; return typeMap[status] || 'info';
}, },
handleShowStore(){ handleShowStore(){
this.pendingStoreId = this.storeId;
this.storeSearchText = '';
this.showStore = true; this.showStore = true;
console.log("显示选择货主") if (this.stores.length === 0) {
this.loadStore();
}
}, },
// 搜索处理 // 搜索处理
handleSearch() { handleSearch() {
@ -790,6 +918,22 @@
silentVoice: false silentVoice: false
}); });
}, },
// 状态按钮样式:选中时按状态色调高亮,参考库存盘点页
statusTagClass(status) {
const toneMap = {
all: 'strong',
receiving: 'warning',
completed: 'success',
cancelled: 'muted'
};
const isActive = this.activeStatus === status.value;
const tone = toneMap[status.value] || '';
return {
active: isActive,
[`status-tag--tone-${tone}`]: isActive && !!tone
};
},
// 下拉刷新 // 下拉刷新
onRefresh() { onRefresh() {
@ -804,6 +948,10 @@
}); });
}, },
// 返回上一页
handleBack() {
uni.navigateBack({ delta: 1 });
},
// 显示筛选弹窗 // 显示筛选弹窗
showFilterPopup() { showFilterPopup() {
this.filterVisible = true; this.filterVisible = true;
@ -904,6 +1052,84 @@
min-height: 100vh; min-height: 100vh;
background-color: #f8f8f8; background-color: #f8f8f8;
// 顶部状态栏
.status-bar {
height: var(--status-bar-height);
background: #ffffff;
flex-shrink: 0;
}
// 自定义页头
.page-header {
position: relative;
height: 88rpx;
padding: 0 24rpx;
display: flex;
align-items: center;
background: #ffffff;
box-sizing: border-box;
flex-shrink: 0;
}
.back-btn {
flex-shrink: 0;
width: 56rpx;
height: 56rpx;
display: flex;
align-items: center;
justify-content: center;
}
.header-title {
flex: 1;
font-size: 36rpx;
font-weight: bold;
color: #333;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.header-side {
flex-shrink: 0;
display: flex;
align-items: center;
}
.header-side .header-side__btn + .header-btn-refresh {
margin-left: 16rpx;
}
.header-side__btn {
display: flex;
align-items: center;
padding: 12rpx 16rpx;
border-radius: 8rpx;
background: #2979ff;
}
.header-side__btn-text {
font-size: 36rpx;
color: #ffffff;
line-height: 1;
}
.header-btn-refresh {
display: flex;
align-items: center;
padding: 12rpx 24rpx;
background: #2979ff;
color: #ffffff;
font-size: 36rpx;
border-radius: 8rpx;
line-height: 1;
}
.header-btn-refresh__text {
line-height: 1;
}
// 搜索和筛选区域 // 搜索和筛选区域
.search-filter { .search-filter {
background: white; background: white;
@ -914,31 +1140,20 @@
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.filter-actions {
margin-bottom: 20rpx;
.filter-buttons {
display: flex;
gap: 20rpx;
::v-deep .u-btn {
flex: 1;
}
}
}
.status-tags { .status-tags {
display: flex; display: flex;
align-items: center; align-items: center;
.status-tag { .status-tag {
flex: 1; flex: 1;
height: 56rpx;
padding: 0 12rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 10rpx 12rpx; background: #f5f7fa;
background: #f5f5f5; border: 1rpx solid #ebeef5;
border-radius: 30rpx; border-radius: 28rpx;
position: relative; position: relative;
& + .status-tag { & + .status-tag {
@ -946,16 +1161,37 @@
} }
&.active { &.active {
background: #007aff; background: #2979ff;
border-color: #2979ff;
box-shadow: 0 4rpx 12rpx rgba(41, 121, 255, 0.28);
.tag-name { .tag-name {
color: white; color: #ffffff;
font-weight: bold;
} }
} }
&.active.status-tag--tone-warning {
background: #ff9800;
border-color: #ff9800;
box-shadow: 0 4rpx 12rpx rgba(255, 152, 0, 0.28);
}
&.active.status-tag--tone-success {
background: #18a058;
border-color: #18a058;
box-shadow: 0 4rpx 12rpx rgba(24, 160, 88, 0.28);
}
&.active.status-tag--tone-muted {
background: #909399;
border-color: #909399;
box-shadow: 0 4rpx 12rpx rgba(144, 147, 153, 0.28);
}
.tag-name { .tag-name {
font-size: 30rpx; font-size: 34rpx;
color: #666; color: #606266;
margin-right: 8rpx; margin-right: 8rpx;
} }
} }
@ -990,54 +1226,74 @@
} }
.receiving-items { .receiving-items {
padding: 20rpx; display: flex;
flex-direction: column;
padding: 20rpx 24rpx 24rpx;
.receiving-item + .receiving-item {
margin-top: 20rpx;
}
.receiving-item { .receiving-item {
background: white; background: #ffffff;
border-radius: 16rpx; border-radius: 18rpx;
padding: 30rpx; padding: 22rpx;
margin-bottom: 20rpx; box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05);
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
&:active {
opacity: 0.92;
}
.item-header { .item-header {
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
margin-bottom: 25rpx; justify-content: space-between;
padding-bottom: 15rpx; padding-bottom: 15rpx;
border-bottom: 1rpx solid #f0f0f0; border-bottom: 1rpx solid #f0f0f0;
.order-no { .order-no {
font-size: 42rpx; font-size: 40rpx;
font-weight: 600; font-weight: bold;
color: #333; color: #303133;
flex: 1;
min-width: 0;
word-break: break-all;
}
::v-deep .u-tag__text {
font-size: 36rpx;
line-height: 36rpx;
} }
} }
.item-info { .item-info {
margin-bottom: 25rpx; margin-top: 18rpx;
.info-row { .info-row {
display: flex; display: flex;
align-items: center; align-items: flex-start;
margin-bottom: 15rpx; font-size: 36rpx;
line-height: 1.5;
&:last-child { & + .info-row {
margin-bottom: 0; margin-top: 12rpx;
} }
.info-label { .info-label {
font-size: 32rpx; font-size: 36rpx;
color: #666; color: #909399;
margin-left: 10rpx; margin-right: 12rpx;
margin-right: 15rpx;
min-width: 180rpx; min-width: 180rpx;
flex-shrink: 0;
white-space: nowrap;
} }
.info-value { .info-value {
font-size: 30rpx; font-size: 36rpx;
color: #333; color: #303133;
flex: 1; flex: 1;
min-width: 0;
word-break: break-all;
display: flex; display: flex;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
@ -1054,15 +1310,14 @@
} }
.item-actions { .item-actions {
margin-top: 18rpx;
display: flex; display: flex;
justify-content: space-between; flex-direction: column;
align-items: center;
padding-top: 20rpx;
border-top: 1rpx solid #f0f0f0;
.create-time { .create-time {
font-size: 32rpx; font-size: 36rpx;
color: #999; line-height: 1.5;
color: #909399;
} }
.action-right { .action-right {
@ -1088,24 +1343,74 @@
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);
.popup-header { .popup-header {
padding: 40rpx 30rpx 20rpx; position: relative;
display: flex;
flex-direction: column;
align-items: center;
padding: 32rpx 30rpx 24rpx;
flex-shrink: 0;
border-bottom: 1rpx solid #f0f0f0; border-bottom: 1rpx solid #f0f0f0;
}
.popup-title { .popup-close {
font-size: 36rpx; position: absolute;
font-weight: 600; top: 50%;
color: #333; right: 24rpx;
} transform: translateY(-50%);
display: flex;
align-items: center;
justify-content: center;
padding: 8rpx;
}
.popup-title {
font-size: 38rpx;
font-weight: bold;
color: #333;
} }
.filter-content { .filter-content {
max-height: 800rpx; max-height: 800rpx;
padding: 30rpx; padding: 20rpx 30rpx;
// 统一表单项上下间距
::v-deep .u-form-item__body {
padding: 20rpx 0;
}
.store-value,
.date-range {
flex: 1;
min-width: 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 14rpx 20rpx;
background: #ecf5ff;
border: 1rpx solid #d9ecff;
border-radius: 10rpx;
box-sizing: border-box;
color: #303133;
}
.store-value {
font-size: 38rpx;
}
.date-range { .date-range {
font-size: 28rpx; font-size: 36rpx;
color: #333; }
padding: 10rpx 0;
.store-form-item {
::v-deep .u-form-item__body__left__content__label {
font-size: 38rpx;
}
}
.date-form-item {
::v-deep .u-form-item__body__left__content__label {
font-size: 36rpx;
}
} }
.quick-date-buttons { .quick-date-buttons {
@ -1113,7 +1418,7 @@
grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 24rpx 12rpx; gap: 24rpx 12rpx;
width: 100%; width: 100%;
padding: 0 12rpx; padding: 0;
box-sizing: border-box; box-sizing: border-box;
align-items: stretch; align-items: stretch;
justify-content: center; justify-content: center;
@ -1136,6 +1441,19 @@
color: #666 !important; color: #666 !important;
} }
} }
&.is-active {
::v-deep .u-btn,
::v-deep .u-button {
background: #2979ff !important;
border-color: #2979ff !important;
}
::v-deep .u-btn-text,
::v-deep .u-button__text {
color: #ffffff !important;
}
}
} }
::v-deep .u-btn { ::v-deep .u-btn {
@ -1145,11 +1463,11 @@
padding: 0 12rpx; padding: 0 12rpx;
margin: 0; margin: 0;
box-sizing: border-box; box-sizing: border-box;
font-size: 32rpx; font-size: 36rpx;
} }
::v-deep .u-btn-text { ::v-deep .u-btn-text {
font-size: 32rpx !important; font-size: 36rpx !important;
font-weight: 500; font-weight: 500;
} }
@ -1160,29 +1478,194 @@
padding: 0 12rpx; padding: 0 12rpx;
margin: 0; margin: 0;
box-sizing: border-box; box-sizing: border-box;
font-size: 32rpx; font-size: 36rpx;
} }
::v-deep .u-button__text { ::v-deep .u-button__text {
font-size: 32rpx !important; font-size: 36rpx !important;
font-weight: 500; font-weight: 500;
} }
} }
} }
.popup-actions { .popup-actions {
padding: 30rpx; padding: 20rpx 30rpx;
border-top: 1rpx solid #f0f0f0; border-top: 1rpx solid #f0f0f0;
display: flex; display: flex;
gap: 20rpx;
::v-deep .u-btn { ::v-deep .u-btn,
::v-deep .u-button {
flex: 1; flex: 1;
height: 90rpx; height: 90rpx;
font-size: 32rpx; font-size: 36rpx;
}
::v-deep .u-btn-text,
::v-deep .u-button__text {
font-size: 36rpx !important;
}
// 真机兼容:用兄弟选择器留出间隔
::v-deep .u-btn + .u-btn,
::v-deep .u-button + .u-button {
margin-left: 20rpx;
} }
} }
} }
// 货主选择弹窗
.store-drawer {
display: flex;
flex-direction: column;
height: 70vh;
background: #ffffff;
border-radius: 20px 20px 0 0;
overflow: hidden;
.store-drawer__header {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
padding: 32rpx 30rpx 24rpx;
flex-shrink: 0;
}
.store-drawer__close {
position: absolute;
top: 50%;
right: 24rpx;
transform: translateY(-50%);
display: flex;
align-items: center;
justify-content: center;
padding: 8rpx;
}
.store-drawer__title {
font-size: 38rpx;
font-weight: bold;
color: #333;
}
.store-drawer__search {
padding: 16rpx 24rpx;
border-bottom: 1rpx solid #f0f2f5;
flex-shrink: 0;
}
.store-drawer__list {
flex: 1;
min-height: 0;
padding: 16rpx 24rpx;
box-sizing: border-box;
}
.store-drawer__item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 26rpx 28rpx;
margin-bottom: 16rpx;
background: #f6f8fb;
border-radius: 12rpx;
}
.store-drawer__item--active {
background: #f0f9f0;
}
.store-drawer__item-name {
flex: 1;
min-width: 0;
margin-right: 16rpx;
font-size: 36rpx;
color: #303133;
line-height: 1.4;
word-break: break-all;
}
.store-drawer__footer {
flex-shrink: 0;
padding: 20rpx 24rpx;
border-top: 1rpx solid #ebeef5;
background: #ffffff;
}
.store-drawer__footer-btns {
display: flex;
}
.store-drawer__footer-btn + .store-drawer__footer-btn {
margin-left: 16rpx;
}
.store-drawer__footer-btn {
flex: 1;
height: 88rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8rpx;
font-size: 36rpx;
line-height: 1;
}
.store-drawer__footer-btn--reset {
background: #f5f7fa;
color: #606266;
}
.store-drawer__footer-btn--confirm {
background: #2979ff;
color: #ffffff;
}
}
// 日期选择弹窗标题样式
::v-deep .u-calendar-header__title {
font-size: 38rpx;
font-weight: bold;
color: #333;
}
// 日期选择弹窗底部按钮
.calendar-footer {
display: flex;
align-items: center;
padding: 20rpx 24rpx;
border-top: 1rpx solid #f0f0f0;
}
.calendar-footer__btn {
flex: 1;
height: 88rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8rpx;
font-size: 36rpx;
line-height: 1;
}
.calendar-footer__btn--close {
background: #f5f7fa;
color: #606266;
margin-right: 20rpx;
}
.calendar-footer__btn--confirm {
background: #2979ff;
color: #ffffff;
}
// 底部分页
.pagination-wrap {
flex-shrink: 0;
padding: 12rpx 12rpx 0;
background: #ffffff;
border-top: 1rpx solid #f2f2f2;
}
} }
.u-form-item__body__left { .u-form-item__body__left {

View File

@ -3,7 +3,7 @@
<view class="normar_container"> <view class="normar_container">
<page-nav title="新建收货任务"></page-nav> <page-nav title="新建收货任务"></page-nav>
<scroll-view class="container" scroll-y> <scroll-view class="container" scroll-y>
<u-form class="form_box" :model="formData" :rules="rules" ref="formRef" label-width="150rpx"> <u-form class="form_box" :model="formData" :rules="rules" ref="formRef" label-width="170rpx">
<!-- 基础信息 --> <!-- 基础信息 -->
<view class="section"> <view class="section">
<view class="section-title">基础信息</view> <view class="section-title">基础信息</view>
@ -12,7 +12,7 @@
<u-form-item label="货主" @click="openStorePicker"> <u-form-item label="货主" @click="openStorePicker">
<view class="store-select-display"> <view class="store-select-display">
<text :class="['store-select-text', !formData.store_id ? 'store-select-placeholder' : '']">{{ storeName || '请选择货主' }}</text> <text :class="['store-select-text', !formData.store_id ? 'store-select-placeholder' : '']">{{ storeName || '请选择货主' }}</text>
<u-icon name="arrow-right" size="24rpx" color="#c0c4cc"></u-icon> <u-icon name="arrow-right" size="16" color="#2979ff"></u-icon>
</view> </view>
</u-form-item> </u-form-item>
@ -20,7 +20,7 @@
<u-form-item label="来货方式" prop="delivery_method" required> <u-form-item label="来货方式" prop="delivery_method" required>
<u-radio-group v-model="formData.delivery_method"> <u-radio-group v-model="formData.delivery_method">
<u-radio v-for="item in deliveryMethods" :key="item.value" :name="item.value" <u-radio v-for="item in deliveryMethods" :key="item.value" :name="item.value"
:label="item.label"></u-radio> label-size="36rpx" :label="item.label"></u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
@ -29,7 +29,7 @@
<view class="tracking-input-wrap"> <view class="tracking-input-wrap">
<u-input v-model="formData.license_plate" placeholder="请输入车牌号" maxlength="20" /> <u-input v-model="formData.license_plate" placeholder="请输入车牌号" maxlength="20" />
<view class="scan-camera-btn" @click="handleLicensePlateCapture"> <view class="scan-camera-btn" @click="handleLicensePlateCapture">
<u-icon name="camera" size="34rpx" color="#2979ff"></u-icon> <u-icon name="camera" size="48rpx" color="#2979ff"></u-icon>
</view> </view>
</view> </view>
</u-form-item> </u-form-item>
@ -40,7 +40,7 @@
<view class="tracking-input-wrap"> <view class="tracking-input-wrap">
<u-input v-model="formData.tracking_number" placeholder="请输入快递/物流单号" maxlength="100" /> <u-input v-model="formData.tracking_number" placeholder="请输入快递/物流单号" maxlength="100" />
<view class="scan-camera-btn" @click="handleTrackingScan"> <view class="scan-camera-btn" @click="handleTrackingScan">
<u-icon name="camera" size="34rpx" color="#2979ff"></u-icon> <u-icon name="camera" size="48rpx" color="#2979ff"></u-icon>
</view> </view>
</view> </view>
</u-form-item> </u-form-item>
@ -50,7 +50,9 @@
<view class="section-title">来货照片</view> <view class="section-title">来货照片</view>
<view class="incoming-toolbar"> <view class="incoming-toolbar">
<view class="incoming-picker-trigger" @click="handleChooseIncomingImages"> <view class="incoming-picker-trigger" @click="handleChooseIncomingImages">
<view class="incoming-picker-icon">+</view> <view class="incoming-picker-icon">
<u-icon name="plus" size="20" color="#ffffff"></u-icon>
</view>
<view class="incoming-picker-texts"> <view class="incoming-picker-texts">
<text class="incoming-picker-title">选择来货照片</text> <text class="incoming-picker-title">选择来货照片</text>
<text class="incoming-picker-desc">创建成功后自动上传并关联</text> <text class="incoming-picker-desc">创建成功后自动上传并关联</text>
@ -79,17 +81,17 @@
<u-form-item label="装卸方式" prop="loading_method" required> <u-form-item label="装卸方式" prop="loading_method" required>
<u-radio-group v-model="formData.loading_method"> <u-radio-group v-model="formData.loading_method">
<u-radio v-for="item in loadingMethods" :key="item.value" :name="item.value" <u-radio v-for="item in loadingMethods" :key="item.value" :name="item.value"
:label="item.label"></u-radio> label-size="36rpx" :label="item.label"></u-radio>
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<!-- 总箱数 --> <!-- 总箱数 -->
<u-form-item label="总箱数" prop="total_boxes"> <u-form-item class="num-form-item" label="总箱数" prop="total_boxes">
<u-input v-model="formData.total_boxes" type="number" placeholder="请输入总箱数" /> <u-input v-model="formData.total_boxes" type="number" placeholder="请输入总箱数" />
</u-form-item> </u-form-item>
<!-- 总托盘数 --> <!-- 总托盘数 -->
<u-form-item label="总托盘数" prop="total_pallets"> <u-form-item class="num-form-item" label="总托盘数" prop="total_pallets">
<u-input v-model="formData.total_pallets" type="number" placeholder="请输入总托盘数" /> <u-input v-model="formData.total_pallets" type="number" placeholder="请输入总托盘数" />
</u-form-item> </u-form-item>
@ -103,7 +105,7 @@
<view class="section"> <view class="section">
<view class="section-title">备注信息</view> <view class="section-title">备注信息</view>
<u-form-item label="备注"> <u-form-item label="备注">
<u-input v-model="formData.remark" type="textarea" placeholder="请输入备注信息" height="120" /> <u-textarea v-model="formData.remark" placeholder="请输入备注信息" height="120" />
</u-form-item> </u-form-item>
</view> </view>
@ -117,18 +119,73 @@
</u-form> </u-form>
</scroll-view> </scroll-view>
<view class="submit-area"> <view class="submit-area">
<u-button type="primary" @click="handleSubmit" :loading="submitting">
创建收货任务
</u-button>
<u-button @click="handleReset"> <u-button @click="handleReset">
重置 重置
</u-button> </u-button>
<u-button color="#2979ff" @click="handleSubmit" :loading="submitting">
创建收货任务
</u-button>
</view> </view>
</view> </view>
<!-- 货主选择器 --> <!-- 货主选择弹窗 -->
<inputAndSelect title="选择货主" :list="storeList" :show="showStorePicker" :value="formData.store_id" <u-popup :show="showStorePicker" mode="bottom" round="20" :closeable="false" :safe-area-inset-bottom="true" :close-on-click-overlay="true" @close="handleStoreDrawerClose">
searchBorder="none" @change="handleStoreChange" @close="showStorePicker=false"></inputAndSelect> <view class="store-drawer">
<view class="store-drawer__header">
<text class="store-drawer__title">选择货主</text>
<view class="store-drawer__close" @click="handleStoreDrawerClose">
<u-icon name="close" color="#909399" size="18"></u-icon>
</view>
</view>
<view class="store-drawer__search">
<SearchBar
v-model="storeSearchText"
placeholder="输入货主名称搜索"
:show-scan="false"
:input-font-size="'34rpx'"
:search-text-font-size="'34rpx'"
@search="handleStoreSearchAction"
@clear="handleStoreSearchAction"
></SearchBar>
</view>
<scroll-view class="store-drawer__list" scroll-y :scroll-into-view="storeListScrollInto">
<view
id="store-all-item"
class="store-drawer__item"
:class="{ 'store-drawer__item--active': allStoresSelected }"
@click="selectAllStores"
>
<text class="store-drawer__item-name">不设置</text>
<u-icon
:name="allStoresSelected ? 'checkmark-circle-fill' : 'checkmark-circle'"
:color="allStoresSelected ? '#07c160' : '#c8c9cc'"
size="22"
></u-icon>
</view>
<view
v-for="store in filteredStores"
:key="getStoreId(store)"
class="store-drawer__item"
:class="{ 'store-drawer__item--active': isStoreSelected(store) }"
@click="selectStore(store)"
>
<text class="store-drawer__item-name">{{ getStoreName(store) }}</text>
<u-icon
:name="isStoreSelected(store) ? 'checkmark-circle-fill' : 'checkmark-circle'"
:color="isStoreSelected(store) ? '#07c160' : '#c8c9cc'"
size="22"
></u-icon>
</view>
<u-empty v-if="filteredStores.length === 0" mode="data" text="暂无货主"></u-empty>
</scroll-view>
<view class="store-drawer__footer">
<view class="store-drawer__footer-btns">
<view class="store-drawer__footer-btn store-drawer__footer-btn--reset" @click="resetStoreSelection">重置</view>
<view class="store-drawer__footer-btn store-drawer__footer-btn--confirm" @click="applyStoreSelection">确定</view>
</view>
</view>
</view>
</u-popup>
</view> </view>
</template> </template>
@ -180,6 +237,9 @@
], ],
storeList: [], storeList: [],
storeSearchText: '',
pendingStoreId: null,
storeListScrollInto: '',
rules: { rules: {
'delivery_method': [{ 'delivery_method': [{
@ -229,6 +289,22 @@
}; };
}, },
computed: {
// 是否选中「不设置」
allStoresSelected() {
return this.pendingStoreId === null || this.pendingStoreId === undefined;
},
// 货主列表按关键字过滤
filteredStores() {
const keyword = String(this.storeSearchText || '').trim().toLowerCase();
if (!keyword) return this.storeList;
return this.storeList.filter(store => {
const name = String(this.getStoreName(store) || '').toLowerCase();
return name.includes(keyword);
});
}
},
methods: { methods: {
normalizeSpeechText(message) { normalizeSpeechText(message) {
const rawText = String(message || '').trim(); const rawText = String(message || '').trim();
@ -781,19 +857,52 @@
}, },
openStorePicker() { openStorePicker() {
this.pendingStoreId = this.formData.store_id;
this.storeSearchText = '';
this.showStorePicker = true; this.showStorePicker = true;
if (this.storeList.length === 0) {
this.loadStore();
}
}, },
handleStoreChange(option) { getStoreId(store) {
if (!option) { return store?.value ?? store?.id ?? store?.store_id ?? store?.storeId;
this.storeName = "不设置"; },
this.formData.store_id = null; getStoreName(store) {
} else { return store?.label || store?.name || store?.store_name || '-';
this.storeName = option.label; },
this.formData.store_id = option.value; isStoreSelected(store) {
} const id = this.getStoreId(store);
if (id === undefined || id === null) return false;
return String(this.pendingStoreId) === String(id);
},
selectStore(store) {
this.pendingStoreId = this.getStoreId(store);
},
selectAllStores() {
this.pendingStoreId = null;
},
resetStoreSelection() {
this.pendingStoreId = null;
this.storeListScrollInto = '';
this.$nextTick(() => {
this.storeListScrollInto = 'store-all-item';
});
},
applyStoreSelection() {
this.formData.store_id = this.pendingStoreId;
const matched = this.storeList.find(store => String(this.getStoreId(store)) === String(this.pendingStoreId));
this.storeName = matched ? this.getStoreName(matched) : '不设置';
this.showStorePicker = false; this.showStorePicker = false;
}, },
handleStoreDrawerClose() {
this.showStorePicker = false;
},
handleStoreSearchAction() {
if (typeof uni !== 'undefined' && uni.hideKeyboard) {
uni.hideKeyboard();
}
},
}, },
onLoad() { onLoad() {
@ -824,6 +933,41 @@
.form_box { .form_box {
padding: 20rpx; padding: 20rpx;
// 表单标签、输入框、单选字号统一为 36rpx
::v-deep .u-form-item__body__left__content__label {
font-size: 36rpx;
white-space: nowrap;
}
::v-deep .u-input__content__field-wrapper__field {
font-size: 36rpx !important;
}
::v-deep .input-placeholder {
font-size: 36rpx;
}
::v-deep .u-textarea__field {
font-size: 36rpx;
color: #303133;
}
// 总箱数、总托盘数值字号 38rpx
::v-deep .num-form-item .u-input__content__field-wrapper__field {
font-size: 38rpx !important;
}
// 表单校验错误提示字号 34rpx
::v-deep .u-form-item__body__right__message {
font-size: 34rpx;
line-height: 1.4;
}
// 单选项之间间隔
::v-deep .u-radio-group .u-radio + .u-radio {
margin-left: 24rpx;
}
} }
} }
@ -834,7 +978,7 @@
margin-bottom: 30rpx; margin-bottom: 30rpx;
.section-title { .section-title {
font-size: 32rpx; font-size: 34rpx;
font-weight: bold; font-weight: bold;
color: #333; color: #333;
margin-bottom: 30rpx; margin-bottom: 30rpx;
@ -874,29 +1018,45 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
padding: 20rpx; padding: 20rpx;
gap: 20rpx; border-top: 1rpx solid #f0f0f0;
border-top: 1px solid rgba(0, 0, 0, .3);
background-color: #FFF; background-color: #FFF;
::v-deep .u-button {
flex: 1;
font-size: 36rpx;
}
::v-deep .u-button__text {
font-size: 36rpx !important;
}
// 真机兼容:用兄弟选择器留出间隔
::v-deep .u-button + .u-button {
margin-left: 20rpx;
}
} }
.store-select-display { .store-select-display {
width: 100%; width: 100%;
min-height: 72rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
gap: 16rpx; padding: 14rpx 20rpx;
background: #ecf5ff;
border: 1rpx solid #d9ecff;
border-radius: 10rpx;
box-sizing: border-box;
} }
.store-select-text { .store-select-text {
flex: 1; flex: 1;
font-size: 28rpx; font-size: 36rpx;
color: #303133; color: #303133;
line-height: 1.4; line-height: 1.4;
} }
.store-select-placeholder { .store-select-placeholder {
color: #c0c4cc; color: #909399;
} }
.incoming-toolbar { .incoming-toolbar {
@ -922,10 +1082,9 @@
height: 52rpx; height: 52rpx;
border-radius: 26rpx; border-radius: 26rpx;
background: #2979ff; background: #2979ff;
color: #ffffff; display: flex;
font-size: 36rpx; align-items: center;
line-height: 52rpx; justify-content: center;
text-align: center;
flex-shrink: 0; flex-shrink: 0;
box-shadow: 0 8rpx 20rpx rgba(41, 121, 255, 0.16); box-shadow: 0 8rpx 20rpx rgba(41, 121, 255, 0.16);
} }
@ -938,14 +1097,14 @@
} }
.incoming-picker-title { .incoming-picker-title {
font-size: 28rpx; font-size: 36rpx;
font-weight: 600; font-weight: 600;
color: #303133; color: #303133;
line-height: 1.4; line-height: 1.4;
} }
.incoming-picker-desc { .incoming-picker-desc {
font-size: 24rpx; font-size: 34rpx;
color: #909399; color: #909399;
line-height: 1.4; line-height: 1.4;
} }
@ -985,4 +1144,113 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
// 货主选择弹窗
.store-drawer {
display: flex;
flex-direction: column;
height: 70vh;
background: #ffffff;
border-radius: 20px 20px 0 0;
overflow: hidden;
.store-drawer__header {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
padding: 32rpx 30rpx 24rpx;
flex-shrink: 0;
}
.store-drawer__close {
position: absolute;
top: 50%;
right: 24rpx;
transform: translateY(-50%);
display: flex;
align-items: center;
justify-content: center;
padding: 8rpx;
}
.store-drawer__title {
font-size: 38rpx;
font-weight: bold;
color: #333;
}
.store-drawer__search {
padding: 16rpx 24rpx;
border-bottom: 1rpx solid #f0f2f5;
flex-shrink: 0;
}
.store-drawer__list {
flex: 1;
min-height: 0;
padding: 16rpx 24rpx;
box-sizing: border-box;
}
.store-drawer__item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 26rpx 28rpx;
margin-bottom: 16rpx;
background: #f6f8fb;
border-radius: 12rpx;
}
.store-drawer__item--active {
background: #f0f9f0;
}
.store-drawer__item-name {
flex: 1;
min-width: 0;
margin-right: 16rpx;
font-size: 36rpx;
color: #303133;
line-height: 1.4;
word-break: break-all;
}
.store-drawer__footer {
flex-shrink: 0;
padding: 20rpx 24rpx;
border-top: 1rpx solid #ebeef5;
background: #ffffff;
}
.store-drawer__footer-btns {
display: flex;
}
.store-drawer__footer-btn + .store-drawer__footer-btn {
margin-left: 16rpx;
}
.store-drawer__footer-btn {
flex: 1;
height: 88rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8rpx;
font-size: 36rpx;
line-height: 1;
}
.store-drawer__footer-btn--reset {
background: #f5f7fa;
color: #606266;
}
.store-drawer__footer-btn--confirm {
background: #2979ff;
color: #ffffff;
}
}
</style> </style>

View File

@ -1088,6 +1088,10 @@
background: #fff; background: #fff;
border-radius: 16rpx; border-radius: 16rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
::v-deep .u-tabs__wrapper__nav__item__text {
font-size: 34rpx;
}
} }
.nav-right { .nav-right {

View File

@ -161,7 +161,7 @@
<slot name="bottom"></slot> <slot name="bottom"></slot>
<!-- 空状态 --> <!-- 空状态 -->
<u-empty v-if="details.length === 0" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" <u-empty v-if="details.length === 0" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"
text="暂无商品明细"></u-empty> text="暂无商品明细" text-size="34rpx"></u-empty>
</scroll-view> </scroll-view>
</template> </template>