refactor: 搜索框组件化统一重构,新增拆单页面功能

一、新增共享搜索组件 SearchBar
- 新增 src/components/SearchBar/SearchBar.vue
- 将各页面内联的「搜索输入 + 扫码按钮 + 搜索按钮」统一封装
- 支持 input-font-size / search-text-font-size / show-scan /
  show-search / focus / disabled / scan-icon 等属性
- 统一输入框与搜索文字字号为 34rpx

二、各页面搜索框接入 SearchBar 组件(删除重复样式代码)
- 首页快捷操作、工作台配置
- 商品查询、库位查询、库内转移、随机上架、收货及子组件
- 盘点相关组件(工具栏、搜索面板、明细选择、记录新增、实盘数量)
- 订单复核、复核列表、称重、包材绑定、拦截登记
- 散单/团单拣货详情、退单记录、发货标签、打印补打、缺货补货

三、通用样式调整
- page-nav 页面标题字号 32rpx -> 36rpx

四、拆单页面(src/pages/packing/splitOrder.vue)功能完善
- 未绑定按钮字号与输入框按钮统一为 36rpx
- 未查询时显示空态提示(参考绑定包材页面),并固定定位避免跳动
- 修复空态遮挡导致搜索输入框无法聚焦的问题
- 快递号面板样式参考拦截登记页面,子单号标签白底黑字并对齐
- 面板与操作按钮分隔,左右留白统一 24rpx
- 子单号列表支持滚动查看(最大高度 400rpx)
- 拆单按钮改为蓝色、36rpx、不加粗
- 拆单数量弹窗参考完成盘点弹窗(640rpx、20rpx 圆角、88rpx 按钮),
  新增右上角关闭图标,点击遮罩不关闭
- 拆单失败时从 order.detail 日志提取「子单号分配」失败 message,
  使用自定义 u-popup 弹窗完整展示失败信息
This commit is contained in:
zm2000 2026-11-10 18:20:38 +08:00
parent b95ac35d39
commit dc554f9a9e
31 changed files with 933 additions and 1710 deletions

View File

@ -0,0 +1,204 @@
<template>
<view class="search-bar" :class="barClass">
<u-search
:value="value"
:placeholder="placeholder"
:bg-color="bgColor"
:disabled="disabled"
:focus="focus"
:input-style="inputStyleObj"
shape="round"
:show-action="false"
@input="handleInput"
@search="emitSearch"
@clear="emitClear"
></u-search>
<view class="search-actions">
<view v-if="showScan" class="scan-btn" :class="{ 'scan-btn--disabled': disabled }" @click="handleScanClick">
<u-icon :name="scanIcon" size="38rpx" :color="disabled ? '#c0c4cc' : '#2979ff'"></u-icon>
</view>
<view v-if="showScan && showSearch" class="search-divider"></view>
<view v-if="showSearch" class="search-btn" @click="emitSearch">
<text class="search-btn__text" :style="{ fontSize: searchTextFontSize }">{{ searchText }}</text>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'SearchBar',
props: {
value: {
type: String,
default: ''
},
placeholder: {
type: String,
default: '请输入关键字'
},
showScan: {
type: Boolean,
default: true
},
showSearch: {
type: Boolean,
default: true
},
inputFontSize: {
type: String,
default: ''
},
searchTextFontSize: {
type: String,
default: '30rpx'
},
searchText: {
type: String,
default: '搜索'
},
scanIcon: {
type: String,
default: 'scan'
},
disabled: {
type: Boolean,
default: false
},
bgColor: {
type: String,
default: '#f5f5f5'
},
focus: {
type: Boolean,
default: false
}
},
computed: {
inputStyleObj() {
return this.inputFontSize ? { fontSize: this.inputFontSize } : {};
},
barClass() {
const cls = [];
if (this.showScan && this.showSearch) {
// 默认:扫码 + 搜索
} else if (!this.showScan && this.showSearch) {
cls.push('search-bar--no-scan');
} else if (this.showScan && !this.showSearch) {
cls.push('search-bar--scan-only');
} else {
cls.push('search-bar--no-actions');
}
return cls;
}
},
methods: {
handleInput(val) {
this.$emit('input', val);
},
handleScanClick() {
if (this.disabled) {
return;
}
this.$emit('scan');
},
emitSearch() {
this.$emit('search');
},
emitClear() {
this.$emit('clear');
}
}
};
</script>
<style lang="scss" scoped>
.search-bar {
position: relative;
flex: 1;
min-width: 0;
::v-deep .u-search {
width: 100%;
}
::v-deep .u-search__content {
padding-right: 200rpx;
}
::v-deep .u-search__content__close {
margin-right: 12rpx;
}
&--no-scan {
::v-deep .u-search__content {
padding-right: 110rpx;
}
}
&--scan-only {
::v-deep .u-search__content {
padding-right: 80rpx;
}
}
&--no-actions {
::v-deep .u-search__content {
padding-right: 20rpx;
}
}
.search-actions {
position: absolute;
right: 24rpx;
top: 50%;
transform: translateY(-50%);
height: 68rpx;
display: flex;
align-items: center;
}
.scan-btn {
height: 68rpx;
padding: 0 8rpx 0 4rpx;
display: flex;
align-items: center;
justify-content: center;
&:active {
opacity: 0.88;
}
&--disabled {
opacity: 0.7;
}
}
.search-divider {
width: 1rpx;
height: 28rpx;
background: #dcdfe6;
margin: 0 16rpx 0 10rpx;
}
.search-btn {
height: 68rpx;
padding: 0 8rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
&__text {
font-size: 30rpx;
font-weight: 500;
color: #2979ff;
line-height: 1;
}
&:active {
opacity: 0.88;
}
}
}
</style>

View File

@ -148,7 +148,7 @@
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
white-space: nowrap; white-space: nowrap;
font-size: 32rpx; font-size: 36rpx;
font-weight: bold; font-weight: bold;
color: #333; color: #333;
} }

View File

@ -10,8 +10,16 @@
<!-- 搜索框 --> <!-- 搜索框 -->
<view class="search-box" v-if="showSearch"> <view class="search-box" v-if="showSearch">
<u-search v-model="searchKeyword" placeholder="搜索货位编码、自定义名称" bg-color="#f5f5f5" shape="round" <SearchBar
:show-action="false" @search="handleSearch" @clear="handleSearch"></u-search> v-model="searchKeyword"
placeholder="搜索货位编码、自定义名称"
:show-scan="false"
:show-search="false"
:input-font-size="'34rpx'"
:search-text-font-size="'34rpx'"
@search="handleSearch"
@clear="handleSearch"
></SearchBar>
</view> </view>
<!-- 货位列表 --> <!-- 货位列表 -->

View File

@ -15,19 +15,17 @@
<!-- 波次/面单号 手动输入区 --> <!-- 波次/面单号 手动输入区 -->
<view class="scan-section" v-show="showScanInput"> <view class="scan-section" v-show="showScanInput">
<view class="scan-input-wrap"> <SearchBar
<u-input v-model="scanInput"
v-model="scanInput" placeholder="扫描/输入快递单号"
placeholder="扫描/输入快递单号" :show-search="true"
border="surround" scan-icon="scan"
:customStyle="{ flex: 1 }" :focus="scanFocused"
:focus="scanFocused" :input-font-size="'34rpx'"
@confirm="handleScanConfirm" :search-text-font-size="'34rpx'"
></u-input> @search="handleScanConfirm"
<view class="scan-camera-btn" @click="handleCameraScan"> @scan="handleCameraScan"
<u-icon name="camera" size="22" color="#2979ff"></u-icon> ></SearchBar>
</view>
</view>
</view> </view>
<!-- 已打印但未领料的波次数量(固定) --> <!-- 已打印但未领料的波次数量(固定) -->
@ -405,23 +403,6 @@
padding: 20rpx 24rpx; padding: 20rpx 24rpx;
background: #fff; background: #fff;
margin-bottom: 16rpx; margin-bottom: 16rpx;
.scan-input-wrap {
display: flex;
align-items: center;
gap: 16rpx;
.scan-camera-btn {
width: 72rpx;
height: 72rpx;
display: flex;
align-items: center;
justify-content: center;
background: #f0f7ff;
border-radius: 8rpx;
flex-shrink: 0;
}
}
} }
/* ===== 底部操作栏 ===== */ /* ===== 底部操作栏 ===== */

View File

@ -7,15 +7,16 @@
<!-- 搜索与筛选 --> <!-- 搜索与筛选 -->
<view class="search-filter"> <view class="search-filter">
<view class="search-row"> <view class="search-row">
<u-search <SearchBar
v-model="searchKeyword" v-model="searchKeyword"
placeholder="输入工作台名称搜索..." placeholder="输入工作台名称搜索..."
shape="round" :show-scan="false"
:show-action="false" :show-search="false"
:clearabled="true" :input-font-size="'34rpx'"
:search-text-font-size="'34rpx'"
@search="handleSearch" @search="handleSearch"
@clear="handleClearSearch" @clear="handleClearSearch"
></u-search> ></SearchBar>
</view> </view>
<!-- 状态筛选(等值:1 启用 / 0 禁用) --> <!-- 状态筛选(等值:1 启用 / 0 禁用) -->
<view class="status-filter"> <view class="status-filter">
@ -461,11 +462,6 @@
gap: 10rpx; gap: 10rpx;
} }
.search-row ::v-deep .u-search {
flex: 1;
min-width: 0;
}
.status-filter { .status-filter {
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -12,22 +12,15 @@
</view> </view>
<view class="search-panel"> <view class="search-panel">
<view class="search-input-wrap"> <SearchBar
<u-search v-model="searchKeyword"
v-model="searchKeyword" placeholder="输入关键字搜索功能"
placeholder="输入关键字搜索功能" :show-scan="false"
bg-color="#f5f5f5" :input-font-size="'34rpx'"
shape="round" :search-text-font-size="'34rpx'"
:show-action="false" @search="handleSearchAction"
@search="handleSearchAction" @clear="handleSearchAction"
@clear="handleSearchAction" ></SearchBar>
></u-search>
<view class="search-actions">
<view class="search-btn" @click="handleSearchAction">
<text class="search-btn__text">搜索</text>
</view>
</view>
</view>
</view> </view>
<view class="content-area"> <view class="content-area">
@ -622,56 +615,6 @@
z-index: 1; z-index: 1;
} }
.search-input-wrap {
position: relative;
::v-deep .u-search {
width: 100%;
}
::v-deep .u-search__content {
padding-right: 110rpx;
}
::v-deep .u-search__content__input {
font-size: 34rpx;
}
::v-deep .u-search__content__close {
margin-right: 12rpx;
}
}
.search-actions {
position: absolute;
right: 24rpx;
top: 50%;
transform: translateY(-50%);
height: 68rpx;
display: flex;
align-items: center;
}
.search-btn {
height: 68rpx;
padding: 0 8rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
&__text {
font-size: 34rpx;
font-weight: 500;
color: #2979ff;
line-height: 1;
}
&:active {
opacity: 0.88;
}
}
.group-list { .group-list {
padding: 0 52rpx 20rpx 20rpx; padding: 0 52rpx 20rpx 20rpx;

View File

@ -37,19 +37,18 @@
<!-- 手动输入输入框(默认隐藏) --> <!-- 手动输入输入框(默认隐藏) -->
<view class="broadcast-input-area"> <view class="broadcast-input-area">
<view v-if="manualInputOpen" class="scan-section"> <view v-if="manualInputOpen" class="scan-section">
<view class="scan-row"> <SearchBar
<input v-model="scanKeyword"
class="scan-input" :placeholder="printerId ? '扫描/输入快递单号' : '扫描/输入打印台编码'"
v-model="scanKeyword" :show-search="true"
:focus="inputFocus" :show-scan="!isBroadcastMode"
:placeholder="printerId ? '扫描/输入快递单号' : '扫描/输入打印台编码'" scan-icon="scan"
placeholder-style="color:#c0c4cc;font-size:32rpx" :focus="inputFocus"
@confirm="handleScanConfirm" :input-font-size="'34rpx'"
/> :search-text-font-size="'34rpx'"
<view v-if="!isBroadcastMode" class="scan-camera-btn" @click="handleCameraScan"> @search="handleScanConfirm"
<u-icon name="scan" size="34rpx" color="#2979ff"></u-icon> @scan="handleCameraScan"
</view> ></SearchBar>
</view>
</view> </view>
</view> </view>
@ -706,39 +705,6 @@ import voice from '@/core/utils/voice';
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.scan-row {
display: flex;
align-items: center;
gap: 12rpx;
}
.scan-input {
flex: 1;
height: 80rpx;
background: #f5f5f5;
border: 2rpx solid #dcdfe6;
border-radius: 12rpx;
padding: 0 20rpx;
font-size: 32rpx;
color: #303133;
}
.scan-camera-btn {
flex-shrink: 0;
width: 72rpx;
height: 72rpx;
display: flex;
align-items: center;
justify-content: center;
background: #f0f7ff;
border: 2rpx solid #2979ff;
border-radius: 12rpx;
}
.scan-camera-btn:active {
opacity: 0.7;
}
/* 模式切换条 */ /* 模式切换条 */
.mode-switch-bar { .mode-switch-bar {
display: flex; display: flex;

View File

@ -1,26 +1,22 @@
<template> <template>
<view class="split-order-page"> <view class="split-order-page">
<!-- 顶部栏 --> <!-- 顶部标题栏(参考拦截登记) -->
<view class="top-bar"> <view class="status-bar"></view>
<view class="status-bar"></view> <view class="page-header">
<view class="header"> <view class="back-btn" @click="handleBack">
<view class="header-left"> <u-icon name="arrow-left" size="18" color="#333"></u-icon>
<view class="header-left__back" @click="handleBack"> </view>
<u-icon name="arrow-left" size="36rpx" color="#303133"></u-icon> <text class="header-title">拆单</text>
</view> <view class="header-side header-side--right">
<view class="header-left__divider"></view> <view
<view class="manual-toggle-btn" class="header-side__btn"
:class="{ 'manual-toggle-btn--active': manualInputOpen }" :class="{ 'header-side__btn--active': manualInputOpen }"
@click="toggleManualInput" @click="toggleManualInput"
> >
<text class="manual-toggle-btn__text">{{ manualInputOpen ? '关闭手动输入' : '手动输入' }}</text> <text class="header-side__btn-text">输入框</text>
</view>
</view> </view>
<text class="header-title">拆单</text> <view class="header-printer-btn" :class="{ 'header-printer-btn--bound': !!printerName }" @click="handlePrinterSettings">
<view class="header-right" @click="handlePrinterSettings"> <text class="header-printer-btn__text">{{ printerName || '未绑定' }}</text>
<text class="header-printer-text" :class="{ 'header-printer-text--bound': !!printerName }">
{{ printerName || '未绑定' }}
</text>
</view> </view>
</view> </view>
</view> </view>
@ -32,27 +28,31 @@
</view> </view>
<template v-else> <template v-else>
<!-- 搜索/输入区 --> <!-- 搜索框(包含在顶部) -->
<view class="search-area"> <view class="scan-bar-wrap" v-if="manualInputOpen">
<view v-if="manualInputOpen" class="scan-section"> <SearchBar
<view class="scan-row"> v-model="scanKeyword"
<input placeholder="扫描/输入快递单号"
class="scan-input" :show-search="true"
v-model="scanKeyword" :show-scan="!isBroadcastMode"
:focus="inputFocus" scan-icon="scan"
placeholder="扫描/输入快递单号" :focus="inputFocus"
placeholder-style="color:#c0c4cc;font-size:32rpx" :input-font-size="'34rpx'"
@confirm="handleScanConfirm" :search-text-font-size="'34rpx'"
/> @search="handleScanConfirm"
<view v-if="!isBroadcastMode" class="scan-camera-btn" @click="handleCameraScan"> @scan="handleCameraScan"
<u-icon name="scan" size="34rpx" color="#2979ff"></u-icon> ></SearchBar>
</view> </view>
</view>
</view> <!-- 空态 -->
<view class="empty-state" v-show="!currentWaybill">
<u-icon name="scan" size="100" color="#c0c4cc"></u-icon>
<text class="empty-state__title">暂无订单信息</text>
<text class="empty-state__hint">请扫描或输入快递单号查询订单信息</text>
</view> </view>
<!-- 订单信息卡 --> <!-- 订单信息卡 -->
<view class="order-card"> <view class="order-card" v-show="!!currentWaybill">
<!-- 快递号行 --> <!-- 快递号行 -->
<view class="order-card__line"> <view class="order-card__line">
<text class="order-card__label order-card__label--waybill">快递号</text> <text class="order-card__label order-card__label--waybill">快递号</text>
@ -63,42 +63,43 @@
<!-- 子单号区 --> <!-- 子单号区 -->
<view class="order-card__sub-section"> <view class="order-card__sub-section">
<text class="order-card__label order-card__label--sub">子单号</text> <text class="order-card__label order-card__label--sub">子单号</text>
<view class="order-card__sub-list"> <scroll-view scroll-y class="order-card__sub-list">
<view <view class="order-card__sub-list-inner">
v-for="(sub, index) in subOrderList" <view
:key="sub.id || index" v-for="(sub, index) in subOrderList"
class="sub-tag" :key="sub.id || index"
@click="handlePrintSingle(sub)" class="sub-tag"
> @click="handlePrintSingle(sub)"
<text class="sub-tag__text">{{ sub.waybillCode }}</text> >
<text class="sub-tag__text">{{ sub.waybillCode }}</text>
</view>
<text v-if="subOrderList.length === 0" class="order-card__sub-empty"></text>
</view> </view>
<text v-if="subOrderList.length === 0" class="order-card__sub-empty"></text> </scroll-view>
</view>
</view> </view>
<view class="order-card__divider"></view> </view>
<!-- 操作按钮 --> <!-- 操作按钮(与信息面板分隔) -->
<view class="order-card__actions"> <view class="order-card__actions" v-show="!!currentWaybill">
<view v-show="!!currentWaybill" class="action-btn action-btn--split" @click="handleSplitOrder"> <view class="action-btn action-btn--split" @click="handleSplitOrder">
<text class="action-btn__text">拆单</text> <text class="action-btn__text">拆单</text>
</view> </view>
<view <view
v-show="subOrderList.length > 0" v-show="subOrderList.length > 0"
class="action-btn action-btn--print" class="action-btn action-btn--print"
@click="handlePrintAll" @click="handlePrintAll"
> >
<text class="action-btn__text">一键打印所有子面单</text> <text class="action-btn__text">一键打印所有子面单</text>
</view>
</view> </view>
</view> </view>
<!-- 弹性填充,吸收卡片高度变化,防止页面抖动 --> <!-- 弹性填充,吸收卡片高度变化,防止页面抖动 -->
<view class="flex-filler"></view> <view class="flex-filler" v-show="!!currentWaybill"></view>
</template> </template>
<!-- 拆单数量弹窗 --> <!-- 拆单数量弹窗 -->
<u-popup :show="showSplitPopup" mode="center" :closeable="false" border-radius="20" :z-index="10090" style="flex: none"> <u-popup :show="showSplitPopup" mode="center" :closeable="true" :closeOnClickOverlay="false" round="20" :z-index="10090" style="flex: none" @close="showSplitPopup = false">
<view class="split-popup"> <view class="split-popup">
<view class="split-popup__title">拆单数量</view> <view class="split-popup__title">拆单数量</view>
<view class="split-popup__input-wrap"> <view class="split-popup__input-wrap">
@ -121,6 +122,19 @@
</view> </view>
</u-popup> </u-popup>
<!-- 拆单失败提示弹窗(参考完成盘点弹窗) -->
<u-popup :show="showSplitFailPopup" mode="center" :closeable="true" :closeOnClickOverlay="false" round="20" :z-index="10090" style="flex: none" @close="showSplitFailPopup = false">
<view class="split-fail-popup">
<view class="split-fail-popup__title">拆单失败</view>
<view class="split-fail-popup__body">
<text class="split-fail-popup__text">{{ splitFailMessage || '拆单失败' }}</text>
</view>
<view class="split-fail-popup__actions">
<view class="split-fail-popup__btn split-fail-popup__btn--confirm" @click="showSplitFailPopup = false">知道了</view>
</view>
</view>
</u-popup>
<!-- 打印台设置弹窗 --> <!-- 打印台设置弹窗 -->
<u-popup :show="showPopup" mode="bottom" :closeable="true" border-radius="20" :z-index="10090" @close="showPopup = false" style="flex: none"> <u-popup :show="showPopup" mode="bottom" :closeable="true" border-radius="20" :z-index="10090" @close="showPopup = false" style="flex: none">
<view class="print-popup"> <view class="print-popup">
@ -188,7 +202,10 @@ export default {
showPopup: false, showPopup: false,
// 拆单弹窗 // 拆单弹窗
showSplitPopup: false, showSplitPopup: false,
splitQuantity: '' splitQuantity: '',
// 拆单失败提示弹窗
showSplitFailPopup: false,
splitFailMessage: ''
}; };
}, },
computed: { computed: {
@ -404,6 +421,15 @@ export default {
waybillCode: exp?.waybill_code || '' waybillCode: exp?.waybill_code || ''
})); }));
}, },
extractSplitFailMessage(data) {
const logs = Array.isArray(data?.logs) ? data.logs : [];
const allocLog = logs.find(log => String(log?.operation_code) === '子单号分配');
if (allocLog) {
const message = String(allocLog.message || '').trim();
if (message) return message;
}
return '';
},
/* ===== 拆单操作 ===== */ /* ===== 拆单操作 ===== */
handleSplitOrder() { handleSplitOrder() {
if (!this.orderInfo) { if (!this.orderInfo) {
@ -440,13 +466,13 @@ export default {
} }
const taskMessage = response?.data?.message || response?.message || '拆单成功'; const taskMessage = response?.data?.message || response?.message || '拆单成功';
this.speakVoice('拆单成功');
// 分配子单号为异步任务,轮询等待子单号生成 // 分配子单号为异步任务,轮询等待子单号生成
if (this.orderId) { if (this.orderId) {
let retryCount = 0; let retryCount = 0;
const maxRetries = 10; const maxRetries = 10;
let subOrders = []; let subOrders = [];
this.splitFailMessage = '';
while (retryCount < maxRetries) { while (retryCount < maxRetries) {
await new Promise(resolve => setTimeout(resolve, 1500)); await new Promise(resolve => setTimeout(resolve, 1500));
@ -461,6 +487,7 @@ export default {
}); });
const data = detailResponse?.data || detailResponse?.result || {}; const data = detailResponse?.data || detailResponse?.result || {};
subOrders = this.normalizeSubOrders(data); subOrders = this.normalizeSubOrders(data);
this.splitFailMessage = this.extractSplitFailMessage(data) || this.splitFailMessage;
if (subOrders.length > 0) { if (subOrders.length > 0) {
this.orderInfo = this.normalizeOrderInfo(data); this.orderInfo = this.normalizeOrderInfo(data);
this.subOrderList = subOrders; this.subOrderList = subOrders;
@ -482,11 +509,19 @@ export default {
const data = detailResponse?.data || detailResponse?.result || {}; const data = detailResponse?.data || detailResponse?.result || {};
this.orderInfo = this.normalizeOrderInfo(data); this.orderInfo = this.normalizeOrderInfo(data);
this.subOrderList = this.normalizeSubOrders(data); this.subOrderList = this.normalizeSubOrders(data);
this.splitFailMessage = this.extractSplitFailMessage(data) || this.splitFailMessage;
} catch (e) { } catch (e) {
console.warn('[splitOrder] 刷新子单列表失败:', e); console.warn('[splitOrder] 刷新子单列表失败:', e);
} }
} }
if (subOrders.length === 0) {
this.showSplitFailPopup = true;
this.speakVoice('拆单失败');
return;
}
this.speakVoice('拆单成功');
uni.showToast({ title: taskMessage, icon: 'success' }); uni.showToast({ title: taskMessage, icon: 'success' });
} else { } else {
uni.showToast({ title: taskMessage, icon: 'success' }); uni.showToast({ title: taskMessage, icon: 'success' });
@ -694,51 +729,70 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow: hidden; overflow: hidden;
position: relative;
} }
/* ===== 顶部栏 ===== */ /* ===== 顶部标题栏(参考拦截登记) ===== */
.top-bar { .status-bar {
height: var(--status-bar-height);
background: #ffffff; background: #ffffff;
}
.page-header {
position: relative;
height: 88rpx;
padding: 0 24rpx;
display: flex;
align-items: center;
background: #ffffff;
box-sizing: border-box;
flex-shrink: 0; flex-shrink: 0;
} }
.status-bar { .back-btn {
height: var(--status-bar-height, 44rpx); flex-shrink: 0;
} width: 56rpx;
height: 56rpx;
.header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 24rpx;
border-bottom: 1rpx solid #f0f0f0;
}
.header-left {
display: flex;
align-items: center;
gap: 12rpx;
min-width: 100rpx;
}
.header-left__back {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 56rpx;
height: 56rpx;
} }
.header-left__divider { .header-side {
width: 1rpx; flex-shrink: 0;
height: 32rpx; display: flex;
background: #dcdfe6; align-items: center;
}
.header-side .header-side__btn + .header-printer-btn {
margin-left: 16rpx;
}
.header-side__btn {
display: flex;
align-items: center;
padding: 12rpx 28rpx;
border-radius: 8rpx;
background: #2979ff;
}
.header-side__btn--active {
background: #fa8c16;
}
.header-side__btn-text {
font-size: 36rpx;
color: #ffffff;
line-height: 1;
}
.header-side--right {
justify-content: flex-end;
} }
.header-title { .header-title {
flex: 1; flex: 1;
padding: 0 16rpx; font-size: 36rpx;
font-size: 32rpx;
font-weight: bold; font-weight: bold;
color: #333; color: #333;
text-align: center; text-align: center;
@ -747,45 +801,19 @@ export default {
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.header-right { .header-printer-btn {
min-width: 100rpx; padding: 12rpx 20rpx;
display: flex; font-size: 36rpx;
justify-content: flex-end;
}
.header-printer-text {
font-size: 28rpx;
color: #909399; color: #909399;
padding: 4rpx 12rpx;
border: 1rpx solid #dcdfe6; border: 1rpx solid #dcdfe6;
border-radius: 6rpx;
white-space: nowrap;
}
.header-printer-text--bound {
color: #07c160;
border-color: #07c160;
}
/* ===== 手动输入开关按钮 ===== */
.manual-toggle-btn {
display: flex;
align-items: center;
justify-content: center;
width: 210rpx;
height: 52rpx;
background: #2979ff;
border-radius: 8rpx; border-radius: 8rpx;
} line-height: 1;
.manual-toggle-btn--active {
background: #fa8c16;
}
.manual-toggle-btn__text {
font-size: 28rprx;
color: #ffffff;
white-space: nowrap; white-space: nowrap;
&--bound {
color: #07c160;
border-color: #07c160;
}
} }
/* ===== 无权限 ===== */ /* ===== 无权限 ===== */
@ -803,52 +831,19 @@ export default {
color: #909399; color: #909399;
} }
/* ===== 搜索区 ===== */ /* ===== 搜索框(包含在顶部) ===== */
.search-area { .scan-bar-wrap {
padding: 20rpx 24rpx; position: relative;
z-index: 1;
padding: 20rpx;
background: #ffffff;
border-bottom: 1rpx solid #f2f2f2;
flex-shrink: 0; flex-shrink: 0;
} }
.scan-section {
margin-bottom: 0;
}
.scan-row {
display: flex;
align-items: center;
gap: 12rpx;
}
.scan-input {
flex: 1;
height: 80rpx;
background: #f5f5f5;
border: 2rpx solid #dcdfe6;
border-radius: 12rpx;
padding: 0 20rpx;
font-size: 32rpx;
color: #303133;
}
.scan-camera-btn {
flex-shrink: 0;
width: 72rpx;
height: 72rpx;
display: flex;
align-items: center;
justify-content: center;
background: #f0f7ff;
border: 2rpx solid #2979ff;
border-radius: 12rpx;
}
.scan-camera-btn:active {
opacity: 0.7;
}
/* ===== 订单信息卡 ===== */ /* ===== 订单信息卡 ===== */
.order-card { .order-card {
margin: 0 12rpx; margin: 16rpx 24rpx 0;
background: #ffffff; background: #ffffff;
border-radius: 12rpx; border-radius: 12rpx;
flex-shrink: 0; flex-shrink: 0;
@ -859,8 +854,9 @@ export default {
.order-card__line { .order-card__line {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 0 12rpx; justify-content: space-between;
height: 88rpx; padding: 24rpx;
background-color: #ffedd5;
} }
.order-card__label { .order-card__label {
@ -873,20 +869,30 @@ export default {
} }
.order-card__label--waybill { .order-card__label--waybill {
background: #2979ff; width: 160rpx;
color: #ffffff; padding: 0;
background: transparent;
color: #000;
font-size: 36rpx;
text-align: center;
flex-shrink: 0;
} }
.order-card__label--sub { .order-card__label--sub {
background: #2979ff; width: 160rpx;
color: #ffffff; padding: 0;
background: #ffffff;
color: #000;
font-size: 36rpx;
text-align: center;
flex-shrink: 0;
} }
.order-card__text { .order-card__text {
flex: 1; flex: 1;
text-align: center; text-align: center;
font-size: 36rpx; font-size: 40rpx;
color: #303133; color: #000;
word-break: break-all; word-break: break-all;
} }
@ -898,7 +904,7 @@ export default {
/* ===== 子单号区 ===== */ /* ===== 子单号区 ===== */
.order-card__sub-section { .order-card__sub-section {
padding: 12rpx 12rpx; padding: 24rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 12rpx; gap: 12rpx;
@ -906,6 +912,12 @@ export default {
} }
.order-card__sub-list { .order-card__sub-list {
width: 100%;
max-height: 400rpx;
box-sizing: border-box;
}
.order-card__sub-list-inner {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 12rpx; gap: 12rpx;
@ -919,7 +931,7 @@ export default {
.sub-tag { .sub-tag {
width: 100%; width: 100%;
background: #f5f7fa; background: #ffffff;
border: 1rpx solid #dcdfe6; border: 1rpx solid #dcdfe6;
border-radius: 8rpx; border-radius: 8rpx;
padding: 20rpx 36rpx; padding: 20rpx 36rpx;
@ -932,7 +944,7 @@ export default {
.sub-tag__text { .sub-tag__text {
font-size: 36rpx; font-size: 36rpx;
color: #2979ff; color: #000;
font-weight: 500; font-weight: 500;
} }
@ -941,7 +953,8 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 16rpx; gap: 16rpx;
padding: 12rpx 12rpx 12rpx; margin: 40rpx 24rpx 0;
flex-shrink: 0;
} }
.action-btn { .action-btn {
@ -955,7 +968,7 @@ export default {
} }
.action-btn--split { .action-btn--split {
background: #e74c3c; background: #2979ff;
} }
.action-btn--print { .action-btn--print {
@ -967,9 +980,9 @@ export default {
} }
.action-btn__text { .action-btn__text {
font-size: 32rpx; font-size: 36rpx;
color: #ffffff; color: #ffffff;
font-weight: 600; font-weight: 400;
} }
/* ===== 弹性填充 ===== */ /* ===== 弹性填充 ===== */
@ -980,40 +993,51 @@ export default {
/* ===== 空态 ===== */ /* ===== 空态 ===== */
.empty-state { .empty-state {
flex: 1; position: absolute;
top: calc(var(--status-bar-height) + 88rpx);
left: 0;
right: 0;
bottom: 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
gap: 20rpx; padding: 80rpx 40rpx;
&__title {
margin-top: 32rpx;
font-size: 38rpx;
color: #909399;
}
&__hint {
margin-top: 16rpx;
font-size: 36rpx;
color: #c0c4cc;
text-align: center;
}
} }
.empty-state__text { /* ===== 拆单数量弹窗(参考完成盘点弹窗) ===== */
font-size: 30rpx;
color: #909399;
}
/* ===== 拆单数量弹窗 ===== */
.split-popup { .split-popup {
width: 560rpx; width: 640rpx;
padding: 40rpx 32rpx 32rpx;
background: #ffffff; background: #ffffff;
border-radius: 20rpx; border-radius: 20rpx;
padding: 40rpx 32rpx; box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
} }
.split-popup__title { .split-popup__title {
font-size: 36rpx; font-size: 42rpx;
font-weight: 600; font-weight: bold;
color: #303133; color: #303133;
text-align: center;
margin-bottom: 32rpx; margin-bottom: 32rpx;
} }
.split-popup__input-wrap { .split-popup__input-wrap {
width: 100%; width: 100%;
margin-bottom: 32rpx; margin-bottom: 36rpx;
} }
.split-popup__input-wrap ::v-deep .u-input__content__field-wrapper__field { .split-popup__input-wrap ::v-deep .u-input__content__field-wrapper__field {
@ -1024,14 +1048,22 @@ export default {
.split-popup__actions { .split-popup__actions {
width: 100%; width: 100%;
display: flex; display: flex;
gap: 20rpx; align-items: center;
} }
.split-popup__btn { .split-popup__btn {
flex: 1; flex: 1;
text-align: center; height: 88rpx;
padding: 22rpx 0;
border-radius: 12rpx; border-radius: 12rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 36rpx;
font-weight: 500;
}
.split-popup__btn + .split-popup__btn {
margin-left: 20rpx;
} }
.split-popup__btn:active { .split-popup__btn:active {
@ -1039,16 +1071,18 @@ export default {
} }
.split-popup__btn--cancel { .split-popup__btn--cancel {
background: #f5f5f5; background: #f5f7fa;
color: #606266;
border: 1rpx solid #dcdfe6; border: 1rpx solid #dcdfe6;
} }
.split-popup__btn--confirm { .split-popup__btn--confirm {
background: #2979ff; background: #2979ff;
color: #ffffff;
} }
.split-popup__btn-text { .split-popup__btn-text {
font-size: 32rpx; font-size: 36rpx;
font-weight: 500; font-weight: 500;
} }
@ -1060,6 +1094,58 @@ export default {
color: #ffffff; color: #ffffff;
} }
/* ===== 拆单失败提示弹窗(参考完成盘点弹窗) ===== */
.split-fail-popup {
width: 640rpx;
padding: 40rpx 32rpx 32rpx;
background: #ffffff;
border-radius: 20rpx;
box-sizing: border-box;
}
.split-fail-popup__title {
font-size: 42rpx;
font-weight: bold;
color: #303133;
text-align: center;
margin-bottom: 32rpx;
}
.split-fail-popup__body {
margin-bottom: 36rpx;
padding: 24rpx;
background: #f5f7fa;
border-radius: 12rpx;
}
.split-fail-popup__text {
font-size: 36rpx;
color: #303133;
line-height: 1.6;
word-break: break-all;
}
.split-fail-popup__actions {
display: flex;
align-items: center;
}
.split-fail-popup__btn {
flex: 1;
height: 88rpx;
border-radius: 12rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 36rpx;
font-weight: 500;
}
.split-fail-popup__btn--confirm {
background: #2979ff;
color: #ffffff;
}
/* ===== 打印台设置弹窗 ===== */ /* ===== 打印台设置弹窗 ===== */
.print-popup { .print-popup {
height: 70vh; height: 70vh;

View File

@ -36,23 +36,16 @@
</view> </view>
<!-- 搜索框 --> <!-- 搜索框 -->
<view class="search-bar"> <view class="scan-bar-wrap">
<view class="search-bar__input-wrap"> <SearchBar
<u-search v-model="searchKeyword"
v-model="searchKeyword" placeholder="输入商品名称/条码搜索"
placeholder="输入商品名称/条码搜索" :show-scan="false"
bg-color="#f5f5f5" :input-font-size="'34rpx'"
shape="round" :search-text-font-size="'34rpx'"
:show-action="false" @search="handleSearchAction"
@search="handleSearchAction" @clear="handleSearchAction"
@clear="handleSearchAction" ></SearchBar>
></u-search>
<view class="search-bar__actions">
<view class="search-bar__btn" @click="handleSearchAction">
<text class="search-bar__btn__text">搜索</text>
</view>
</view>
</view>
</view> </view>
<view class="page-body"> <view class="page-body">
@ -186,22 +179,15 @@
<!-- 搜索框 --> <!-- 搜索框 -->
<view class="store-drawer__search"> <view class="store-drawer__search">
<view class="store-drawer__search-wrap"> <SearchBar
<u-search v-model="storeSearchText"
v-model="storeSearchText" placeholder="输入货主名称搜索"
placeholder="输入货主名称搜索" :show-scan="false"
bg-color="#f5f5f5" :input-font-size="'34rpx'"
shape="round" :search-text-font-size="'34rpx'"
:show-action="false" @search="handleSearchAction"
@search="handleSearchAction" @clear="handleSearchAction"
@clear="handleSearchAction" ></SearchBar>
></u-search>
<view class="store-drawer__search-actions">
<view class="store-drawer__search-btn" @click="handleSearchAction">
<text class="store-drawer__search-btn__text">搜索</text>
</view>
</view>
</view>
</view> </view>
<view v-if="storeLoading" class="store-drawer__loading"> <view v-if="storeLoading" class="store-drawer__loading">
@ -673,63 +659,13 @@
} }
/* ===== 搜索框 ===== */ /* ===== 搜索框 ===== */
.search-bar { .scan-bar-wrap {
padding: 20rpx; padding: 20rpx;
background: #ffffff; background: #ffffff;
border-bottom: 1rpx solid #f2f2f2; border-bottom: 1rpx solid #f2f2f2;
flex-shrink: 0; flex-shrink: 0;
} }
.search-bar__input-wrap {
position: relative;
::v-deep .u-search {
width: 100%;
}
::v-deep .u-search__content {
padding-right: 110rpx;
}
::v-deep .u-search__content__input {
font-size: 34rpx;
}
::v-deep .u-search__content__close {
margin-right: 12rpx;
}
}
.search-bar__actions {
position: absolute;
right: 24rpx;
top: 50%;
transform: translateY(-50%);
height: 68rpx;
display: flex;
align-items: center;
}
.search-bar__btn {
height: 68rpx;
padding: 0 8rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
&__text {
font-size: 34rpx;
font-weight: 500;
color: #2979ff;
line-height: 1;
}
&:active {
opacity: 0.88;
}
}
/* ===== 页面主体 ===== */ /* ===== 页面主体 ===== */
.page-body { .page-body {
flex: 1; flex: 1;
@ -1031,56 +967,6 @@
flex-shrink: 0; flex-shrink: 0;
} }
.store-drawer__search-wrap {
position: relative;
::v-deep .u-search {
width: 100%;
}
::v-deep .u-search__content {
padding-right: 110rpx;
}
::v-deep .u-search__content__input {
font-size: 36rpx;
}
::v-deep .u-search__content__close {
margin-right: 12rpx;
}
}
.store-drawer__search-actions {
position: absolute;
right: 24rpx;
top: 50%;
transform: translateY(-50%);
height: 68rpx;
display: flex;
align-items: center;
}
.store-drawer__search-btn {
height: 68rpx;
padding: 0 8rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
&__text {
font-size: 36rpx;
font-weight: 500;
color: #2979ff;
line-height: 1;
}
&:active {
opacity: 0.88;
}
}
.store-drawer__item { .store-drawer__item {
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -8,15 +8,16 @@
<!-- 搜索/扫码 --> <!-- 搜索/扫码 -->
<view class="picker__search"> <view class="picker__search">
<u-search <SearchBar
v-model="keyword" v-model="keyword"
:placeholder="placeholder" :placeholder="placeholder"
bg-color="#f5f5f5" :show-scan="false"
shape="round" :show-search="false"
:show-action="false" :input-font-size="'34rpx'"
:search-text-font-size="'34rpx'"
@search="handleSearch" @search="handleSearch"
@clear="handleSearch" @clear="handleSearch"
></u-search> ></SearchBar>
</view> </view>
<!-- type=location 库位任务:一键全仓 --> <!-- type=location 库位任务:一键全仓 -->

View File

@ -1,26 +1,15 @@
<template> <template>
<view class="search-panel"> <view class="search-panel">
<view class="search-input-wrap"> <SearchBar
<u-search :value="keyword"
:value="keyword" :placeholder="placeholder"
:placeholder="placeholder" :input-font-size="'34rpx'"
:bg-color="'#f5f5f5'" :search-text-font-size="'34rpx'"
shape="round" @input="$emit('input', $event)"
:show-action="false" @search="$emit('search')"
@input="$emit('input', $event)" @clear="$emit('clear')"
@search="$emit('search')" @scan="$emit('scan')"
@clear="$emit('clear')" ></SearchBar>
></u-search>
<view class="search-actions">
<view class="scan-btn" @click="$emit('scan')">
<u-icon name="scan" size="38rpx" color="#2979ff"></u-icon>
</view>
<view class="search-divider"></view>
<view class="search-btn" @click="$emit('search')">
<text class="search-btn__text">搜索</text>
</view>
</view>
</view>
<view class="filter-row"> <view class="filter-row">
<view class="filter-group"> <view class="filter-group">
<view <view
@ -88,75 +77,6 @@ export default {
box-sizing: border-box; box-sizing: border-box;
} }
.search-input-wrap {
position: relative;
::v-deep .u-search {
width: 100%;
}
::v-deep .u-search__content {
padding-right: 200rpx;
}
::v-deep .u-search__content__input {
font-size: 34rpx;
}
::v-deep .u-search__content__close {
margin-right: 12rpx;
}
}
.search-actions {
position: absolute;
right: 24rpx;
top: 50%;
transform: translateY(-50%);
height: 68rpx;
display: flex;
align-items: center;
}
.scan-btn {
height: 68rpx;
padding: 0 8rpx 0 4rpx;
display: flex;
align-items: center;
justify-content: center;
&:active {
opacity: 0.88;
}
}
.search-divider {
width: 1rpx;
height: 28rpx;
background: #dcdfe6;
margin: 0 16rpx 0 10rpx;
}
.search-btn {
height: 68rpx;
padding: 0 8rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
&__text {
font-size: 34rpx;
font-weight: 500;
color: #2979ff;
line-height: 1;
}
&:active {
opacity: 0.88;
}
}
/* 状态筛选行(等宽分布,铺满整行) */ /* 状态筛选行(等宽分布,铺满整行) */
.filter-row { .filter-row {
margin-top: 16rpx; margin-top: 16rpx;

View File

@ -7,23 +7,15 @@
</view> </view>
<view class="record-add__search"> <view class="record-add__search">
<view class="record-add__search-box"> <SearchBar
<u-search v-model="keyword"
v-model="keyword" placeholder="扫描/输入商品条码或名称"
placeholder="扫描/输入商品条码或名称" :show-scan="false"
bg-color="#f5f5f5" :input-font-size="'34rpx'"
shape="round" :search-text-font-size="'34rpx'"
:show-action="false" @search="handleSearch"
@search="handleSearch" @clear="handleClear"
@clear="handleClear" ></SearchBar>
></u-search>
<view class="record-add__search-actions">
<view class="record-add__search-divider"></view>
<view class="record-add__search-btn" @click="handleSearch">
<text class="record-add__search-btn-text">搜索</text>
</view>
</view>
</view>
</view> </view>
<scroll-view class="record-add__scroll" scroll-y> <scroll-view class="record-add__scroll" scroll-y>
@ -392,59 +384,6 @@ export default {
margin-top: 24rpx; margin-top: 24rpx;
} }
.record-add__search-box {
position: relative;
::v-deep .u-search {
width: 100%;
}
::v-deep .u-search__content {
padding-right: 140rpx;
}
::v-deep .u-search__content__input {
font-size: 34rpx;
}
}
.record-add__search-actions {
position: absolute;
right: 24rpx;
top: 50%;
transform: translateY(-50%);
height: 68rpx;
display: flex;
align-items: center;
}
.record-add__search-divider {
width: 1rpx;
height: 28rpx;
background: #dcdfe6;
margin: 0 16rpx 0 10rpx;
}
.record-add__search-btn {
height: 68rpx;
padding: 0 8rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
&:active {
opacity: 0.88;
}
}
.record-add__search-btn-text {
font-size: 34rpx;
font-weight: 500;
color: #2979ff;
line-height: 1;
}
.record-add__scroll { .record-add__scroll {
flex: 1; flex: 1;
min-height: 240rpx; min-height: 240rpx;

View File

@ -1,26 +1,16 @@
<template> <template>
<view class="search-panel"> <view class="search-panel">
<view class="search-input-wrap"> <SearchBar
<u-search :value="value"
:value="value" :placeholder="placeholder"
:placeholder="placeholder" :search-text="actionText"
:bg-color="'#f5f5f5'" :input-font-size="'34rpx'"
shape="round" :search-text-font-size="'34rpx'"
:show-action="false" @input="$emit('input', $event)"
@input="$emit('input', $event)" @search="$emit('search')"
@search="$emit('search')" @clear="$emit('clear')"
@clear="$emit('clear')" @scan="$emit('scan')"
></u-search> ></SearchBar>
<view class="search-actions">
<view class="scan-btn" @click="$emit('scan')">
<u-icon name="scan" size="38rpx" color="#2979ff"></u-icon>
</view>
<view class="search-divider"></view>
<view class="search-btn" @click="$emit('search')">
<text class="search-btn__text">{{ actionText }}</text>
</view>
</view>
</view>
</view> </view>
</template> </template>
@ -52,69 +42,4 @@ export default {
padding: 16rpx; padding: 16rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.search-input-wrap {
position: relative;
::v-deep .u-search {
width: 100%;
}
::v-deep .u-search__content {
padding-right: 200rpx;
}
::v-deep .u-search__content__input {
font-size: 34rpx;
}
}
.search-actions {
position: absolute;
right: 24rpx;
top: 50%;
transform: translateY(-50%);
height: 68rpx;
display: flex;
align-items: center;
}
.scan-btn {
height: 68rpx;
padding: 0 8rpx 0 4rpx;
display: flex;
align-items: center;
justify-content: center;
&:active {
opacity: 0.88;
}
}
.search-divider {
width: 1rpx;
height: 28rpx;
background: #dcdfe6;
margin: 0 16rpx 0 10rpx;
}
.search-btn {
height: 68rpx;
padding: 0 8rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
&__text {
font-size: 34rpx;
font-weight: 500;
color: #2979ff;
line-height: 1;
}
&:active {
opacity: 0.88;
}
}
</style> </style>

View File

@ -8,23 +8,15 @@
<!-- 扫描/输入库位码 → 查询库位 --> <!-- 扫描/输入库位码 → 查询库位 -->
<view class="space-entry__search"> <view class="space-entry__search">
<view class="space-entry__search-box"> <SearchBar
<u-search v-model="keyword"
v-model="keyword" placeholder="扫描/输入库位编码、自定义名称"
placeholder="扫描/输入库位编码、自定义名称" :show-scan="false"
bg-color="#f5f5f5" :input-font-size="'34rpx'"
shape="round" :search-text-font-size="'34rpx'"
:show-action="false" @search="handleSearch"
@search="handleSearch" @clear="handleSearch"
@clear="handleSearch" ></SearchBar>
></u-search>
<view class="space-entry__search-actions">
<view class="space-entry__search-divider"></view>
<view class="space-entry__search-btn" @click="handleSearch">
<text class="space-entry__search-btn-text">搜索</text>
</view>
</view>
</view>
</view> </view>
<scroll-view class="space-entry__scroll" scroll-y> <scroll-view class="space-entry__scroll" scroll-y>
@ -333,59 +325,6 @@ export default {
margin-top: 24rpx; margin-top: 24rpx;
} }
.space-entry__search-box {
position: relative;
::v-deep .u-search {
width: 100%;
}
::v-deep .u-search__content {
padding-right: 140rpx;
}
::v-deep .u-search__content__input {
font-size: 34rpx;
}
}
.space-entry__search-actions {
position: absolute;
right: 24rpx;
top: 50%;
transform: translateY(-50%);
height: 68rpx;
display: flex;
align-items: center;
}
.space-entry__search-divider {
width: 1rpx;
height: 28rpx;
background: #dcdfe6;
margin: 0 16rpx 0 10rpx;
}
.space-entry__search-btn {
height: 68rpx;
padding: 0 8rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
&:active {
opacity: 0.88;
}
}
.space-entry__search-btn-text {
font-size: 34rpx;
font-weight: 500;
color: #2979ff;
line-height: 1;
}
.space-entry__scroll { .space-entry__scroll {
flex: 1; flex: 1;
min-height: 200rpx; min-height: 200rpx;

View File

@ -529,11 +529,6 @@ export default {
overflow: hidden; overflow: hidden;
} }
/* 顶部标题栏字号 */
::v-deep .nav-title .title {
font-size: 36rpx;
}
.inv-loc-scroll { .inv-loc-scroll {
flex: 1; flex: 1;
min-height: 0; min-height: 0;

View File

@ -5,26 +5,15 @@
<!-- 搜索区 --> <!-- 搜索区 -->
<view class="search-panel"> <view class="search-panel">
<view class="search-input-wrap"> <SearchBar
<u-search v-model="keyword"
v-model="keyword" :placeholder="searchPlaceholder"
:placeholder="searchPlaceholder" :input-font-size="'34rpx'"
:bg-color="'#f5f5f5'" :search-text-font-size="'34rpx'"
shape="round" @search="handleSearch"
:show-action="false" @clear="handleClear"
@search="handleSearch" @scan="handleCameraScan"
@clear="handleClear" ></SearchBar>
></u-search>
<view class="search-actions">
<view class="scan-btn" @click="handleCameraScan">
<u-icon name="scan" size="38rpx" color="#2979ff"></u-icon>
</view>
<view class="search-divider"></view>
<view class="search-btn" @click="handleSearch">
<text class="search-btn__text">搜索</text>
</view>
</view>
</view>
<view class="filter-row"> <view class="filter-row">
<view class="filter-group"> <view class="filter-group">
<view <view
@ -534,71 +523,6 @@ export default {
flex-shrink: 0; flex-shrink: 0;
} }
.search-input-wrap {
position: relative;
::v-deep .u-search {
width: 100%;
}
::v-deep .u-search__content {
padding-right: 200rpx;
}
::v-deep .u-search__content__close {
margin-right: 12rpx;
}
}
.search-actions {
position: absolute;
right: 24rpx;
top: 50%;
transform: translateY(-50%);
height: 68rpx;
display: flex;
align-items: center;
}
.scan-btn {
height: 68rpx;
padding: 0 8rpx 0 4rpx;
display: flex;
align-items: center;
justify-content: center;
&:active {
opacity: 0.88;
}
}
.search-divider {
width: 1rpx;
height: 28rpx;
background: #dcdfe6;
margin: 0 16rpx 0 10rpx;
}
.search-btn {
height: 68rpx;
padding: 0 8rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
&__text {
font-size: 34rpx;
font-weight: 500;
color: #2979ff;
line-height: 1;
}
&:active {
opacity: 0.88;
}
}
/* 筛选条件行(商品/操作人 | 移入/移出) */ /* 筛选条件行(商品/操作人 | 移入/移出) */
.filter-row { .filter-row {
margin-top: 16rpx; margin-top: 16rpx;

View File

@ -16,26 +16,15 @@
<view class="content_box"> <view class="content_box">
<!-- 库位编码/条码搜索区 --> <!-- 库位编码/条码搜索区 -->
<view class="search-panel"> <view class="search-panel">
<view class="search-input-wrap"> <SearchBar
<u-search v-model="keyword"
v-model="keyword" placeholder="请输入或者扫描库位编码/条码"
placeholder="请输入或者扫描库位编码/条码" :input-font-size="'34rpx'"
:bg-color="'#f5f5f5'" :search-text-font-size="'34rpx'"
shape="round" @search="handleQuery"
:show-action="false" @clear="handleClear"
@search="handleQuery" @scan="handleCameraScan"
@clear="handleClear" ></SearchBar>
></u-search>
<view class="search-actions">
<view class="scan-btn" @click="handleCameraScan">
<u-icon name="scan" size="38rpx" color="#2979ff"></u-icon>
</view>
<view class="search-divider"></view>
<view class="search-btn" @click="handleQuery">
<text class="search-btn__text">搜索</text>
</view>
</view>
</view>
</view> </view>
<!-- 库位名称显示 --> <!-- 库位名称显示 -->
@ -617,75 +606,6 @@ export default {
z-index: 1; z-index: 1;
} }
.search-input-wrap {
position: relative;
::v-deep .u-search {
width: 100%;
}
::v-deep .u-search__content {
padding-right: 200rpx;
}
::v-deep .u-search__content__input {
font-size: 34rpx;
}
::v-deep .u-search__content__close {
margin-right: 12rpx;
}
}
.search-actions {
position: absolute;
right: 24rpx;
top: 50%;
transform: translateY(-50%);
height: 68rpx;
display: flex;
align-items: center;
}
.scan-btn {
height: 68rpx;
padding: 0 8rpx 0 4rpx;
display: flex;
align-items: center;
justify-content: center;
&:active {
opacity: 0.88;
}
}
.search-divider {
width: 1rpx;
height: 28rpx;
background: #dcdfe6;
margin: 0 16rpx 0 10rpx;
}
.search-btn {
height: 68rpx;
padding: 0 8rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
&__text {
font-size: 34rpx;
font-weight: 500;
color: #2979ff;
line-height: 1;
}
&:active {
opacity: 0.88;
}
}
/* 通用行 */ /* 通用行 */
.line { .line {
display: flex; display: flex;

View File

@ -1,38 +1,45 @@
<template> <template>
<view class="package-binding-page"> <view class="package-binding-page">
<view class="normar_container"> <view class="normar_container">
<page-nav title="绑定包材"> <!-- 顶部标题栏(参考拦截登记) -->
<template #left> <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">绑定包材</text>
<view class="header-side header-side--right">
<view <view
class="nav-manual-input" class="header-side__btn"
:class="{ 'nav-manual-input--inactive': !showScanInput }" :class="{ 'header-side__btn--active': showScanInput }"
@click="toggleScanInput" @click="toggleScanInput"
> >
<text class="nav-manual-input-text">{{ showScanInput ? '关闭手动输入' : '手动输入' }}</text> <text class="header-side__btn-text">输入框</text>
</view> </view>
</template> <view class="header-btn-reset" @click="handleReset">重置</view>
<template #right> </view>
<view class="nav-reset" @click="handleReset"> </view>
<text class="nav-reset-text">重置</text>
</view>
</template>
</page-nav>
<!-- 运单扫码输入区 --> <!-- 运单扫码输入区 -->
<view class="scan-section" v-show="showScanInput"> <view class="scan-bar-wrap" v-show="showScanInput">
<view class="scan-input-wrap"> <SearchBar
<u-input v-model="scanInput"
v-model="scanInput" placeholder="扫描/输入快递单号"
placeholder="扫描/输入快递单号" :show-search="true"
border="surround" scan-icon="scan"
:customStyle="{ flex: 1 }" :focus="scanFocused"
:focus="scanFocused" :input-font-size="'34rpx'"
@confirm="handleScanConfirm" :search-text-font-size="'34rpx'"
></u-input> @search="handleScanConfirm"
<view class="scan-camera-btn" @click="handleCameraScan"> @scan="handleCameraScan"
<u-icon name="camera" size="22" color="#2979ff"></u-icon> ></SearchBar>
</view> </view>
</view>
<!-- 空态提示 -->
<view class="empty-state" v-show="!showOrderInfo">
<u-icon name="scan" size="100" color="#c0c4cc"></u-icon>
<text class="empty-state__title">暂无订单信息</text>
<text class="empty-state__hint">请扫描或输入快递单号查询订单信息</text>
</view> </view>
<!-- 订单信息展示 --> <!-- 订单信息展示 -->
@ -55,7 +62,7 @@
@confirm="handlePackageCodeSearch" @confirm="handlePackageCodeSearch"
></u-input> ></u-input>
<view class="scan-camera-btn-sm" @click="handlePackageCameraScan"> <view class="scan-camera-btn-sm" @click="handlePackageCameraScan">
<u-icon name="camera" size="22" color="#2979ff"></u-icon> <u-icon name="camera" size="30" color="#2979ff"></u-icon>
</view> </view>
</view> </view>
</view> </view>
@ -141,6 +148,9 @@ import voice from '@/core/utils/voice';
this.fetchOrderInfo(scanText); this.fetchOrderInfo(scanText);
} }
}, },
handleBack() {
uni.navigateBack();
},
toggleScanInput() { toggleScanInput() {
this.showScanInput = !this.showScanInput; this.showScanInput = !this.showScanInput;
}, },
@ -307,8 +317,9 @@ import voice from '@/core/utils/voice';
this.speakVoice('包材更改为' + (matched.material_name || '')); this.speakVoice('包材更改为' + (matched.material_name || ''));
} else { } else {
uni.hideLoading(); uni.hideLoading();
uni.showToast({ title: (res && res.msg) || '绑定失败', icon: 'none' }); const failMsg = (res && (res.message || res.msg)) || '绑定失败';
this.speakVoice('绑定失败'); uni.showToast({ title: failMsg, icon: 'none' });
this.speakVoice(failMsg);
} }
} catch (error) { } catch (error) {
uni.hideLoading(); uni.hideLoading();
@ -337,90 +348,106 @@ import voice from '@/core/utils/voice';
<style lang="scss" scoped> <style lang="scss" scoped>
.package-binding-page { .package-binding-page {
.normar_container { .normar_container {
position: relative;
min-height: 100vh; min-height: 100vh;
background-color: #f5f5f5; background-color: #f5f5f5;
} }
/* ===== 左侧手动输入按钮 ===== */ /* ===== 顶部标题栏(参考拦截登记) ===== */
::v-deep .nav-title .left { .status-bar {
min-width: auto; height: var(--status-bar-height);
gap: 0; background: #ffffff;
} }
::v-deep .nav-title .title { .page-header {
padding-left: 40rpx; position: relative;
height: 88rpx;
padding: 0 24rpx;
display: flex;
align-items: center;
background: #ffffff;
box-sizing: border-box;
flex-shrink: 0;
} }
::v-deep .nav-title .right { .back-btn {
width: auto; flex-shrink: 0;
min-width: 80rpx; width: 56rpx;
} height: 56rpx;
.nav-manual-input {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 210rpx; }
height: 52rpx;
background: #fa8c16; .header-side {
flex-shrink: 0;
display: flex;
align-items: center;
}
.header-side .header-side__btn + .header-btn-reset {
margin-left: 16rpx;
}
.header-side__btn {
display: flex;
align-items: center;
padding: 12rpx 28rpx;
border-radius: 8rpx; border-radius: 8rpx;
background: #2979ff;
&--inactive {
background: #2979ff;
}
.nav-manual-input-text {
font-size: 32rpx;
color: #ffffff;
white-space: nowrap;
}
} }
/* ===== 重置按钮 ===== */ .header-side__btn--active {
.nav-reset { background: #fa8c16;
padding: 8rpx 0;
.nav-reset-text {
font-size: 32rpx;
color: #fff;
background-color: #2979ff;
padding: 8rpx 24rpx;
border-radius: 8rpx;
white-space: nowrap;
}
} }
/* ===== 扫码输入区 ===== */ .header-side__btn-text {
.scan-section { font-size: 36rpx;
padding: 20rpx 24rpx; color: #ffffff;
background: #fff; line-height: 1;
margin-bottom: 16rpx; }
.scan-input-wrap { .header-side--right {
display: flex; justify-content: flex-end;
align-items: center; }
gap: 16rpx;
.scan-camera-btn { .header-title {
width: 72rpx; flex: 1;
height: 72rpx; font-size: 36rpx;
display: flex; font-weight: bold;
align-items: center; color: #333;
justify-content: center; text-align: center;
background: #f0f7ff; white-space: nowrap;
border-radius: 8rpx; overflow: hidden;
flex-shrink: 0; text-overflow: ellipsis;
} }
}
.header-btn-reset {
padding: 14rpx 28rpx;
background: #2979ff;
color: #ffffff;
font-size: 36rpx;
border-radius: 8rpx;
line-height: 1;
}
/* ===== 搜索框(参考拦截登记) ===== */
.scan-bar-wrap {
position: relative;
z-index: 10;
padding: 20rpx;
background: #ffffff;
border-bottom: 1rpx solid #f2f2f2;
flex-shrink: 0;
} }
/* ===== 信息展示列表 ===== */ /* ===== 信息展示列表 ===== */
.info-list { .info-list {
background: #fff; background: #fff;
margin: 0 24rpx 16rpx; margin: 60rpx 24rpx 16rpx;
&--no-scan { &--no-scan {
margin-top: 20rpx; margin-top: 60rpx;
} }
border-radius: 12rpx; border-radius: 12rpx;
overflow: hidden; overflow: hidden;
@ -441,7 +468,7 @@ import voice from '@/core/utils/voice';
} }
.info-label { .info-label {
font-size: 32rpx; font-size: 36rpx;
color: #000; color: #000;
width: 160rpx; width: 160rpx;
flex-shrink: 0; flex-shrink: 0;
@ -449,7 +476,7 @@ import voice from '@/core/utils/voice';
} }
.info-value { .info-value {
font-size: 32rpx; font-size: 40rpx;
color: #000; color: #000;
flex: 1; flex: 1;
text-align: center; text-align: center;
@ -465,7 +492,6 @@ import voice from '@/core/utils/voice';
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
display: flex; display: flex;
gap: 8rpx;
::v-deep .u-input__content__field-wrapper__field { ::v-deep .u-input__content__field-wrapper__field {
text-align: center !important; text-align: center !important;
@ -485,6 +511,7 @@ import voice from '@/core/utils/voice';
background: #f0f7ff; background: #f0f7ff;
border-radius: 8rpx; border-radius: 8rpx;
flex-shrink: 0; flex-shrink: 0;
margin-left: 12rpx;
} }
} }
} }
@ -504,11 +531,38 @@ import voice from '@/core/utils/voice';
border: 1rpx solid #b3d8ff; border: 1rpx solid #b3d8ff;
.auto-bind-tip-text { .auto-bind-tip-text {
font-size: 28rpx; font-size: 36rpx;
color: #2979ff; color: #2979ff;
text-align: center; text-align: center;
} }
} }
} }
/* ===== 空态提示 ===== */
.empty-state {
position: absolute;
top: calc(var(--status-bar-height) + 88rpx);
left: 0;
right: 0;
bottom: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 80rpx 40rpx;
&__title {
margin-top: 32rpx;
font-size: 38rpx;
color: #909399;
}
&__hint {
margin-top: 16rpx;
font-size: 36rpx;
color: #c0c4cc;
text-align: center;
}
}
} }
</style> </style>

View File

@ -9,22 +9,15 @@
<view class="search-filter"> <view class="search-filter">
<view class="search-box"> <view class="search-box">
<view class="search-box-inner"> <SearchBar
<u-search v-model="keyword"
v-model="keyword" placeholder="请输入波次号"
placeholder="请输入波次号" :show-scan="false"
:bg-color="'#f5f5f5'" :input-font-size="'34rpx'"
shape="round" :search-text-font-size="'34rpx'"
:show-action="false" @search="handleSearch"
@search="handleSearch" @clear="clearSearch"
@clear="clearSearch" ></SearchBar>
></u-search>
<view class="search-actions">
<view class="search-btn" @click="handleSearch">
<text class="search-btn__text">搜索</text>
</view>
</view>
</view>
</view> </view>
</view> </view>
@ -1105,52 +1098,6 @@
position: relative; position: relative;
} }
.search-box-inner {
position: relative;
}
::v-deep .search-box-inner .u-search {
width: 100%;
}
::v-deep .search-box-inner .u-search__content {
padding-right: 200rpx;
}
::v-deep .search-box-inner .u-search__content__close {
margin-right: 12rpx;
}
.search-actions {
position: absolute;
right: 24rpx;
top: 50%;
transform: translateY(-50%);
height: 68rpx;
display: flex;
align-items: center;
}
.search-btn {
height: 68rpx;
padding: 0 8rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
&:active {
opacity: 0.88;
}
}
.search-btn__text {
font-size: 30rpx;
color: #2979ff;
font-weight: 500;
line-height: 1;
}
.detail-scroll { .detail-scroll {
flex: 1; flex: 1;
min-height: 0; min-height: 0;

View File

@ -21,23 +21,23 @@
</view> </view>
<!-- 搜索框(参考分拣缺货补货) --> <!-- 搜索框(参考分拣缺货补货) -->
<view class="search-bar" v-show="showScanInput"> <view class="scan-bar-wrap" v-show="showScanInput">
<view class="search-bar__input-wrap"> <SearchBar
<u-search v-model="scanInput"
v-model="scanInput" placeholder="扫描/输入快递单号"
placeholder="扫描/输入快递单号" :input-font-size="'34rpx'"
bg-color="#f5f5f5" :search-text-font-size="'34rpx'"
shape="round" @search="handleSearchAction"
:show-action="false" @clear="handleSearchAction"
@search="handleSearchAction" @scan="handleCameraScan"
@clear="handleSearchAction" ></SearchBar>
></u-search> </view>
<view class="search-bar__actions">
<view class="search-bar__btn" @click="handleSearchAction"> <!-- 空态提示 -->
<text class="search-bar__btn__text">搜索</text> <view class="empty-state" v-show="!showOrderInfo">
</view> <u-icon name="scan" size="100" color="#c0c4cc"></u-icon>
</view> <text class="empty-state__title">暂无拦截信息</text>
</view> <text class="empty-state__hint">请扫描或输入快递单号查询拦截信息</text>
</view> </view>
<!-- 信息展示 --> <!-- 信息展示 -->
@ -199,6 +199,7 @@ import voice from '@/core/utils/voice';
overflow: hidden; overflow: hidden;
.normar_container { .normar_container {
position: relative;
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -285,63 +286,15 @@ import voice from '@/core/utils/voice';
} }
/* ===== 搜索框(参考分拣缺货补货) ===== */ /* ===== 搜索框(参考分拣缺货补货) ===== */
.search-bar { .scan-bar-wrap {
position: relative;
z-index: 10;
padding: 20rpx; padding: 20rpx;
background: #ffffff; background: #ffffff;
border-bottom: 1rpx solid #f2f2f2; border-bottom: 1rpx solid #f2f2f2;
flex-shrink: 0; flex-shrink: 0;
} }
.search-bar__input-wrap {
position: relative;
::v-deep .u-search {
width: 100%;
}
::v-deep .u-search__content {
padding-right: 110rpx;
}
::v-deep .u-search__content__input {
font-size: 34rpx;
}
::v-deep .u-search__content__close {
margin-right: 12rpx;
}
}
.search-bar__actions {
position: absolute;
right: 24rpx;
top: 50%;
transform: translateY(-50%);
height: 68rpx;
display: flex;
align-items: center;
}
.search-bar__btn {
height: 68rpx;
padding: 0 8rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
&__text {
font-size: 34rpx;
font-weight: 500;
color: #2979ff;
line-height: 1;
}
&:active {
opacity: 0.88;
}
}
/* ===== 信息展示列表 ===== */ /* ===== 信息展示列表 ===== */
.info-list { .info-list {
background: #fff; background: #fff;
@ -388,5 +341,32 @@ import voice from '@/core/utils/voice';
} }
} }
} }
/* ===== 空态提示 ===== */
.empty-state {
position: absolute;
top: calc(var(--status-bar-height) + 88rpx);
left: 0;
right: 0;
bottom: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 80rpx 40rpx;
&__title {
margin-top: 32rpx;
font-size: 38rpx;
color: #909399;
}
&__hint {
margin-top: 16rpx;
font-size: 36rpx;
color: #c0c4cc;
text-align: center;
}
}
} }
</style> </style>

View File

@ -23,20 +23,18 @@
<view class="search-filter"> <view class="search-filter">
<view class="search-row"> <view class="search-row">
<u-search <SearchBar
v-model="keyword" v-model="keyword"
:placeholder="isDetailReadOnly ? '已复核,仅可查看' : (showDetailView ? '扫描/输入条码' : (printStationId || printMode === 'noPrint' ? '搜索快递单号/波次号' : '扫描/输入打印台编号'))" :placeholder="isDetailReadOnly ? '已复核,仅可查看' : (showDetailView ? '扫描/输入条码' : (printStationId || printMode === 'noPrint' ? '搜索快递单号/波次号' : '扫描/输入打印台编号'))"
:bg-color="isDetailReadOnly ? '#f0f0f0' : '#f5f5f5'" :show-search="false"
shape="round"
:show-action="false"
:clearabled="true"
:disabled="isDetailReadOnly" :disabled="isDetailReadOnly"
:bg-color="isDetailReadOnly ? '#f0f0f0' : '#f5f5f5'"
:input-font-size="'34rpx'"
:search-text-font-size="'34rpx'"
@search="handleSearch" @search="handleSearch"
@clear="clearSearch" @clear="clearSearch"
></u-search> @scan="handleCameraScan"
<view class="search-scan-btn" :class="{ 'search-scan-btn--disabled': isDetailReadOnly }" @click="!isDetailReadOnly && handleCameraScan()"> ></SearchBar>
<u-icon name="scan" size="34rpx" :color="isDetailReadOnly ? '#c0c4cc' : '#2979ff'"></u-icon>
</view>
<view class="unbound-print-btn" @click="handleOpenPrintSettings"> <view class="unbound-print-btn" @click="handleOpenPrintSettings">
<text class="unbound-print-btn__text" :class="{ 'unbound-print-btn__text--bound': !!printStationId }">{{ printStationId ? printStationName : '未绑定' }}</text> <text class="unbound-print-btn__text" :class="{ 'unbound-print-btn__text--bound': !!printStationId }">{{ printStationId ? printStationName : '未绑定' }}</text>
</view> </view>
@ -5474,30 +5472,6 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
gap: 10rpx; gap: 10rpx;
} }
.search-row ::v-deep .u-search {
flex: 1;
min-width: 0;
}
.search-scan-btn {
flex-shrink: 0;
width: 56rpx;
height: 56rpx;
display: flex;
align-items: center;
justify-content: center;
background: #f5f5f5;
border-radius: 50%;
}
.search-scan-btn:active {
opacity: 0.7;
}
.search-scan-btn--disabled {
background: #f0f0f0;
}
.search-row .unbound-print-btn { .search-row .unbound-print-btn {
flex-shrink: 0; flex-shrink: 0;
padding: 0 12rpx; padding: 0 12rpx;

View File

@ -24,19 +24,17 @@
<!-- 扫码输入区 --> <!-- 扫码输入区 -->
<view v-if="scanInputOpen" class="scan-section"> <view v-if="scanInputOpen" class="scan-section">
<view class="scan-row"> <SearchBar
<input v-model="scanKeyword"
class="scan-input" placeholder="扫描/输入快递单号"
v-model="scanKeyword" :show-search="true"
:focus="inputFocus" scan-icon="scan"
placeholder="扫描/输入快递单号" :focus="inputFocus"
placeholder-style="color:#c0c4cc;font-size:32rpx" :input-font-size="'34rpx'"
@confirm="handleScanConfirm" :search-text-font-size="'34rpx'"
/> @search="handleScanConfirm"
<view class="scan-camera-btn" @click="handleCameraScan"> @scan="handleCameraScan"
<u-icon name="scan" size="34rpx" color="#2979ff"></u-icon> ></SearchBar>
</view>
</view>
</view> </view>
<!-- 模式切换条 --> <!-- 模式切换条 -->
@ -623,39 +621,6 @@ export default {
flex-shrink: 0; flex-shrink: 0;
} }
.scan-row {
display: flex;
align-items: center;
gap: 12rpx;
}
.scan-input {
flex: 1;
height: 80rpx;
background: #f5f5f5;
border: 2rpx solid #dcdfe6;
border-radius: 12rpx;
padding: 0 20rpx;
font-size: 32rpx;
color: #303133;
}
.scan-camera-btn {
flex-shrink: 0;
width: 72rpx;
height: 72rpx;
display: flex;
align-items: center;
justify-content: center;
background: #f0f7ff;
border: 2rpx solid #2979ff;
border-radius: 12rpx;
}
.scan-camera-btn:active {
opacity: 0.7;
}
/* ===== 模式切换条 ===== */ /* ===== 模式切换条 ===== */
.content-box { .content-box {
padding: 20rpx 24rpx 0; padding: 20rpx 24rpx 0;

View File

@ -12,17 +12,14 @@
<!-- 搜索 + 范围切换 --> <!-- 搜索 + 范围切换 -->
<view class="task-toolbar"> <view class="task-toolbar">
<view class="task-toolbar__search"> <view class="task-toolbar__search">
<u-search <SearchBar
v-model="keyword" v-model="keyword"
placeholder="搜索标题/批次号/创建人" placeholder="搜索标题/批次号/创建人"
:bg-color="'#f5f5f5'" :show-scan="false"
shape="round" :input-font-size="'34rpx'"
:show-action="false" :search-text-font-size="'34rpx'"
@search="handleSearch" @search="handleSearch"
></u-search> ></SearchBar>
<view class="task-toolbar__search-btn" @click="handleSearch">
<text class="task-toolbar__search-text">搜索</text>
</view>
</view> </view>
<view class="task-scope"> <view class="task-scope">
<view <view
@ -410,45 +407,6 @@ export default {
.task-toolbar__search { .task-toolbar__search {
position: relative; position: relative;
::v-deep .u-search {
width: 100%;
}
::v-deep .u-search__content {
padding-right: 120rpx;
}
.task-toolbar__search-btn {
position: absolute;
right: 24rpx;
top: 50%;
transform: translateY(-50%);
height: 68rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
&::before {
content: '';
width: 1rpx;
height: 28rpx;
background: #dcdfe6;
margin-right: 16rpx;
}
&:active {
opacity: 0.88;
}
}
.task-toolbar__search-text {
font-size: 34rpx;
font-weight: 500;
color: #2979ff;
line-height: 1;
}
} }
.task-scope { .task-scope {

View File

@ -9,22 +9,15 @@
<view class="search-filter"> <view class="search-filter">
<view class="search-box"> <view class="search-box">
<view class="search-box-inner"> <SearchBar
<u-search v-model="keyword"
v-model="keyword" placeholder="请输入波次号"
placeholder="请输入波次号" :show-scan="false"
:bg-color="'#f5f5f5'" :input-font-size="'34rpx'"
shape="round" :search-text-font-size="'34rpx'"
:show-action="false" @search="handleSearch"
@search="handleSearch" @clear="clearSearch"
@clear="clearSearch" ></SearchBar>
></u-search>
<view class="search-actions">
<view class="search-btn" @click="handleSearch">
<text class="search-btn__text">搜索</text>
</view>
</view>
</view>
</view> </view>
</view> </view>
@ -1150,52 +1143,6 @@
position: relative; position: relative;
} }
.search-box-inner {
position: relative;
}
::v-deep .search-box-inner .u-search {
width: 100%;
}
::v-deep .search-box-inner .u-search__content {
padding-right: 200rpx;
}
::v-deep .search-box-inner .u-search__content__close {
margin-right: 12rpx;
}
.search-actions {
position: absolute;
right: 24rpx;
top: 50%;
transform: translateY(-50%);
height: 68rpx;
display: flex;
align-items: center;
}
.search-btn {
height: 68rpx;
padding: 0 8rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
&:active {
opacity: 0.88;
}
}
.search-btn__text {
font-size: 30rpx;
color: #2979ff;
font-weight: 500;
line-height: 1;
}
.record-list { .record-list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;

View File

@ -20,19 +20,17 @@
<!-- 扫码输入区 --> <!-- 扫码输入区 -->
<view class="scan-section" v-show="showScanInput"> <view class="scan-section" v-show="showScanInput">
<view class="scan-input-wrap"> <SearchBar
<u-input v-model="scanInput"
v-model="scanInput" placeholder="扫描/输入快递单号"
placeholder="扫描/输入快递单号" :show-search="true"
border="surround" scan-icon="scan"
:customStyle="{ flex: 1 }" :focus="scanFocused"
:focus="scanFocused" :input-font-size="'34rpx'"
@confirm="handleScanConfirm" :search-text-font-size="'34rpx'"
></u-input> @search="handleScanConfirm"
<view class="scan-camera-btn" @click="handleCameraScan"> @scan="handleCameraScan"
<u-icon name="camera" size="22" color="#2979ff"></u-icon> ></SearchBar>
</view>
</view>
</view> </view>
<!-- 信息展示 --> <!-- 信息展示 -->
@ -672,23 +670,6 @@ import voice from '@/core/utils/voice';
padding: 20rpx 24rpx; padding: 20rpx 24rpx;
background: #fff; background: #fff;
margin-bottom: 16rpx; margin-bottom: 16rpx;
.scan-input-wrap {
display: flex;
align-items: center;
gap: 16rpx;
.scan-camera-btn {
width: 72rpx;
height: 72rpx;
display: flex;
align-items: center;
justify-content: center;
background: #f0f7ff;
border-radius: 8rpx;
flex-shrink: 0;
}
}
} }
/* ===== 信息展示列表 ===== */ /* ===== 信息展示列表 ===== */

View File

@ -43,26 +43,15 @@
</page-nav> </page-nav>
<view class="search-panel"> <view class="search-panel">
<view class="search-input-wrap"> <SearchBar
<u-search v-model="keyword"
v-model="keyword" placeholder="请输入商品条码或名称"
placeholder="请输入商品条码或名称" :input-font-size="'34rpx'"
:bg-color="'#f5f5f5'" :search-text-font-size="'34rpx'"
shape="round" @search="handleSearch"
:show-action="false" @clear="handleSearch"
@search="handleSearch" @scan="handleCameraScan"
@clear="handleSearch" ></SearchBar>
></u-search>
<view class="search-actions">
<view class="scan-btn" @click="handleCameraScan">
<u-icon name="scan" size="38rpx" color="#2979ff"></u-icon>
</view>
<view class="search-divider"></view>
<view class="search-btn" @click="handleSearch">
<text class="search-btn__text">搜索</text>
</view>
</view>
</view>
</view> </view>
</view> </view>
@ -2859,71 +2848,6 @@
} }
} }
.search-input-wrap {
position: relative;
::v-deep .u-search {
width: 100%;
}
::v-deep .u-search__content {
padding-right: 200rpx;
}
::v-deep .u-search__content__close {
margin-right: 12rpx;
}
}
.search-actions {
position: absolute;
right: 24rpx;
top: 50%;
transform: translateY(-50%);
height: 68rpx;
display: flex;
align-items: center;
}
.scan-btn {
height: 68rpx;
padding: 0 8rpx 0 4rpx;
display: flex;
align-items: center;
justify-content: center;
&:active {
opacity: 0.88;
}
}
.search-divider {
width: 1rpx;
height: 28rpx;
background: #dcdfe6;
margin: 0 16rpx 0 10rpx;
}
.search-btn {
height: 68rpx;
padding: 0 8rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
&__text {
font-size: 30rpx;
font-weight: 500;
color: #2979ff;
line-height: 1;
}
&:active {
opacity: 0.88;
}
}
.list-content-wrap { .list-content-wrap {
flex: 1; flex: 1;
min-height: 0; min-height: 0;

View File

@ -12,18 +12,16 @@
<view v-if="!hasInboundOrder" class="empty-wrap"> <view v-if="!hasInboundOrder" class="empty-wrap">
<view class="search-filter"> <view class="search-filter">
<view class="search-row"> <view class="search-row">
<u-search <SearchBar
v-model="searchKeyword" v-model="searchKeyword"
placeholder="扫描/输入入库单号" placeholder="扫描/输入入库单号"
shape="round" :show-search="false"
:show-action="false" :input-font-size="'34rpx'"
:clearabled="true" :search-text-font-size="'34rpx'"
@search="handleSearchInboundOrder" @search="handleSearchInboundOrder"
@clear="searchKeyword = ''" @clear="searchKeyword = ''"
></u-search> @scan="handleScanInboundOrder"
<view class="search-scan-btn" @click="handleScanInboundOrder"> ></SearchBar>
<u-icon name="scan" size="34rpx" color="#2979ff"></u-icon>
</view>
</view> </view>
</view> </view>
<view class="empty-card"> <view class="empty-card">
@ -46,18 +44,16 @@
</view> </view>
<view class="detail-scan-panel"> <view class="detail-scan-panel">
<view class="detail-scan-panel__row"> <view class="detail-scan-panel__row">
<u-search <SearchBar
v-model="detailScanKeyword" v-model="detailScanKeyword"
placeholder="扫描/输入商品条码、箱唛、托盘唛" placeholder="扫描/输入商品条码、箱唛、托盘唛"
shape="round" :show-search="false"
:show-action="false" :input-font-size="'34rpx'"
:clearabled="true" :search-text-font-size="'34rpx'"
@search="handleScanDetailQuery" @search="handleScanDetailQuery"
@clear="detailScanKeyword = ''" @clear="detailScanKeyword = ''"
></u-search> @scan="handleScanDetailWithCamera"
<view class="detail-scan-panel__scan-btn" @click="handleScanDetailWithCamera"> ></SearchBar>
<u-icon name="scan" size="34rpx" color="#2979ff"></u-icon>
</view>
</view> </view>
</view> </view>
<scroll-view class="content-top" scroll-y> <scroll-view class="content-top" scroll-y>
@ -1352,8 +1348,7 @@ export default {
box-sizing: border-box; box-sizing: border-box;
} }
.nav-back-btn, .nav-back-btn {
.search-scan-btn {
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
display: flex; display: flex;
@ -1473,20 +1468,6 @@ export default {
gap: 10rpx; gap: 10rpx;
} }
.search-row ::v-deep .u-search {
flex: 1;
min-width: 0;
}
.search-scan-btn {
flex-shrink: 0;
width: 56rpx;
height: 56rpx;
background: #f5f5f5;
border-radius: 50%;
}
.search-scan-btn:active,
.nav-back-btn:active, .nav-back-btn:active,
.nav-cancel-btn:active, .nav-cancel-btn:active,
.nav-done-btn:active, .nav-done-btn:active,
@ -1570,22 +1551,6 @@ export default {
gap: 10rpx; gap: 10rpx;
} }
.detail-scan-panel__row ::v-deep .u-search {
flex: 1;
min-width: 0;
}
.detail-scan-panel__scan-btn {
flex-shrink: 0;
width: 56rpx;
height: 56rpx;
display: flex;
align-items: center;
justify-content: center;
background: #f5f5f5;
border-radius: 50%;
}
/* ===== 详情抽屉 ===== */ /* ===== 详情抽屉 ===== */
.detail-drawer { .detail-drawer {
width: 100%; width: 100%;

View File

@ -5,18 +5,16 @@
<view class="search-filter"> <view class="search-filter">
<view class="search-row"> <view class="search-row">
<u-search <SearchBar
v-model="searchKeyword" v-model="searchKeyword"
placeholder="扫描/输入入库单号、采购单号、供应商..." placeholder="扫描/输入入库单号、采购单号、供应商..."
shape="round" :show-search="false"
:show-action="false" :input-font-size="'34rpx'"
:clearabled="true" :search-text-font-size="'34rpx'"
@search="handleSearch" @search="handleSearch"
@clear="handleClearSearch" @clear="handleClearSearch"
></u-search> @scan="handleScan"
<view class="search-scan-btn" @click="handleScan"> ></SearchBar>
<u-icon name="scan" size="34rpx" color="#2979ff"></u-icon>
</view>
</view> </view>
<view class="search-hint"> <view class="search-hint">
<text class="search-hint__text">默认仅显示待审核入库单(PENDING)</text> <text class="search-hint__text">默认仅显示待审核入库单(PENDING)</text>
@ -409,26 +407,6 @@ export default {
gap: 10rpx; gap: 10rpx;
} }
.search-row ::v-deep .u-search {
flex: 1;
min-width: 0;
}
.search-scan-btn {
flex-shrink: 0;
width: 56rpx;
height: 56rpx;
display: flex;
align-items: center;
justify-content: center;
background: #f5f5f5;
border-radius: 50%;
}
.search-scan-btn:active {
opacity: 0.7;
}
.search-hint { .search-hint {
margin-top: 12rpx; margin-top: 12rpx;
} }

View File

@ -4,13 +4,17 @@
<view class="detail-display" v-if="selectedDetail"> <view class="detail-display" v-if="selectedDetail">
<view class="detail-header"> <view class="detail-header">
<view class="search-box"> <view class="search-box">
<view class="search-box-inner"> <SearchBar
<u-search v-model="searchKeyword" placeholder="搜索运单号、货主、商品条码、车牌" bg-color="#f5f5f5" shape="round" v-model="searchKeyword"
:show-action="false" @search="handleSearch" @clear="handleSearch"></u-search> placeholder="搜索运单号、货主、商品条码、车牌"
<view class="scan-camera-btn" @click="handleManualScan"> :show-search="false"
<u-icon name="camera" size="34rpx" color="#2979ff"></u-icon> scan-icon="camera"
</view> :input-font-size="'34rpx'"
</view> :search-text-font-size="'34rpx'"
@search="handleSearch"
@clear="handleSearch"
@scan="handleManualScan"
></SearchBar>
</view> </view>
<view class="detail-actions"> <view class="detail-actions">
@ -408,32 +412,6 @@
.search-box { .search-box {
flex: 1; flex: 1;
margin-right: 20rpx; margin-right: 20rpx;
.search-box-inner {
display: flex;
align-items: center;
gap: 16rpx;
::v-deep .u-search {
flex: 1;
}
.scan-camera-btn {
width: 76rpx;
height: 76rpx;
border-radius: 38rpx;
background: #eef4ff;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
box-shadow: 0 4rpx 12rpx rgba(41, 121, 255, 0.12);
&:active {
opacity: 0.85;
}
}
}
} }
.detail-actions { .detail-actions {

View File

@ -10,8 +10,16 @@
<!-- 搜索框 --> <!-- 搜索框 -->
<view class="search-box" v-if="showSearch"> <view class="search-box" v-if="showSearch">
<u-search v-model="searchKeyword" placeholder="搜索运单号、货主、商品条码、车牌" bg-color="#f5f5f5" shape="round" <SearchBar
:show-action="false" @search="handleSearch" @clear="handleSearch"></u-search> v-model="searchKeyword"
placeholder="搜索运单号、货主、商品条码、车牌"
:show-scan="false"
:show-search="false"
:input-font-size="'34rpx'"
:search-text-font-size="'34rpx'"
@search="handleSearch"
@clear="handleSearch"
></SearchBar>
</view> </view>
<!-- 库存列表 --> <!-- 库存列表 -->

View File

@ -6,19 +6,15 @@
<view class="search-filter"> <view class="search-filter">
<!-- 搜索框 --> <!-- 搜索框 -->
<view class="search-box"> <view class="search-box">
<view class="search-box-inner"> <SearchBar
<u-search v-model="searchKeyword" placeholder="搜索运单号、货主、商品条码、车牌" bg-color="#f5f5f5" shape="round" v-model="searchKeyword"
:show-action="false" @search="handleSearch" @clear="handleSearch"></u-search> placeholder="搜索运单号、货主、商品条码、车牌"
<view class="search-actions"> :input-font-size="'34rpx'"
<view class="scan-btn" @click="handleManualScan"> :search-text-font-size="'34rpx'"
<u-icon name="scan" size="38rpx" color="#2979ff"></u-icon> @search="handleSearch"
</view> @clear="handleSearch"
<view class="search-divider"></view> @scan="handleManualScan"
<view class="search-btn" @click="handleSearch"> ></SearchBar>
<text class="search-btn__text">搜索</text>
</view>
</view>
</view>
</view> </view>
@ -916,71 +912,6 @@
.search-box { .search-box {
margin-bottom: 20rpx; margin-bottom: 20rpx;
.search-box-inner {
position: relative;
::v-deep .u-search {
width: 100%;
}
::v-deep .u-search__content {
padding-right: 200rpx;
}
::v-deep .u-search__content__close {
margin-right: 12rpx;
}
.search-actions {
position: absolute;
right: 24rpx;
top: 50%;
transform: translateY(-50%);
height: 68rpx;
display: flex;
align-items: center;
}
.scan-btn {
height: 68rpx;
padding: 0 8rpx 0 4rpx;
display: flex;
align-items: center;
justify-content: center;
&:active {
opacity: 0.88;
}
}
.search-divider {
width: 1rpx;
height: 28rpx;
background: #dcdfe6;
margin: 0 16rpx 0 10rpx;
}
.search-btn {
height: 68rpx;
padding: 0 8rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
&__text {
font-size: 30rpx;
font-weight: 500;
color: #2979ff;
line-height: 1;
}
&:active {
opacity: 0.88;
}
}
}
} }
.filter-actions { .filter-actions {