style: 统一页面顶部与弹窗风格、修复打印台绑定误绑与软键盘问题
- 拆单页(splitOrder) · 打印台绑定弹窗统一圆角/标题/关闭按钮布局,字号、标签颜色统一 · 输入框内容字号 36rpx,打印台行去掉分隔线,弹窗高度调整为 450rpx · 修复回车确认误绑首个模糊匹配项(改为精确匹配优先) - 分拣缺货补货页(replenishShorts) · 选择货主弹窗标题样式统一(居中标题,去掉底部分隔线) - 称重页(weighing) · 顶部与空态参考绑定包材页,内容字号对齐 · 连秤/蓝牙秤面板/设置重量等按钮字号统一 · 连接蓝牙秤弹窗去掉按名称连接,改为搜索框按关键字筛选(统一 SearchBar) · 设置重量成功后不再自动激活软键盘 · 称重重量输入框字号恢复 56rpx - 订单复核页(order-review) · 顶部改为自定义标题栏(参考绑定包材),按钮改实心风格 · 拦截信息升级为横幅(位于搜索框下方) · 连接蓝牙秤弹窗参考称重页 - 面单补打页(labelReprint) · 顶部样式参考拆单页,搜索框置顶 · 去掉打印台本地存储 · 打印台绑定弹窗样式参考拆单页,修复回车误绑 · 模式切换按钮改蓝色主题、字号 38rpx · 日志面板白底黑字、时间去掉 GMT、统一字体
This commit is contained in:
parent
dc554f9a9e
commit
bbfd474028
@ -125,17 +125,85 @@ class VoiceBroadcastManager {
|
|||||||
return this.initPromise;
|
return this.initPromise;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 从语音接口响应中提取音频地址,兼容 JSON / XML / 纯文本 URL 等多种返回格式
|
||||||
|
_extractAudioUrl(data) {
|
||||||
|
if (!data) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
// 1. 字符串:可能是 JSON 文本、XML 或纯 URL
|
||||||
|
if (typeof data === 'string') {
|
||||||
|
const trimmed = data.trim();
|
||||||
|
if (trimmed.startsWith('{')) {
|
||||||
|
try {
|
||||||
|
data = JSON.parse(trimmed);
|
||||||
|
} catch (e) {
|
||||||
|
// 不是合法 JSON,按纯文本继续处理
|
||||||
|
data = trimmed;
|
||||||
|
}
|
||||||
|
} else if (trimmed.startsWith('<')) {
|
||||||
|
// XML:提取 <audio>/<url>/<path>/<src>/<file> 标签内容,兼容 CDATA
|
||||||
|
const match = trimmed.match(/<(?:audio|url|path|src|file)[^>]*>\s*(?:<!\[CDATA\[)?([^<\]\[]*)/i);
|
||||||
|
return match ? match[1].trim() : '';
|
||||||
|
} else if (/^https?:\/\//i.test(trimmed)) {
|
||||||
|
return trimmed;
|
||||||
|
} else {
|
||||||
|
// 其他纯文本,直接当作路径使用
|
||||||
|
return trimmed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 对象:尝试常见字段
|
||||||
|
if (data && typeof data === 'object') {
|
||||||
|
const keys = ['audio', 'url', 'path', 'src', 'file', 'data', 'result'];
|
||||||
|
for (const key of keys) {
|
||||||
|
const value = data[key];
|
||||||
|
if (typeof value === 'string' && value.trim()) {
|
||||||
|
return value.trim();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// data 可能是嵌套对象,再探测一层
|
||||||
|
for (const key of keys) {
|
||||||
|
const value = data[key];
|
||||||
|
if (value && typeof value === 'object') {
|
||||||
|
for (const innerKey of keys) {
|
||||||
|
const innerValue = value[innerKey];
|
||||||
|
if (typeof innerValue === 'string' && innerValue.trim()) {
|
||||||
|
return innerValue.trim();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
playByHttp(msg) {
|
playByHttp(msg) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
uni.request({
|
uni.request({
|
||||||
url: VOICE_API_URL + msg,
|
url: VOICE_API_URL + msg,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
timeout: 3000,
|
timeout: 3000,
|
||||||
|
dataType: 'text',
|
||||||
header: {
|
header: {
|
||||||
'content-type': 'text/xml; charset=utf-8'
|
'content-type': 'text/xml; charset=utf-8'
|
||||||
},
|
},
|
||||||
success: res => {
|
success: res => {
|
||||||
const _src = VOICE_API_PATH + res.data.audio;
|
// uni.request 的 success 对非 2xx 也会回调(如 502),需先判断状态码
|
||||||
|
const statusCode = res && res.statusCode;
|
||||||
|
if (statusCode && (statusCode < 200 || statusCode >= 300)) {
|
||||||
|
console.warn('[VoiceHTTP] 语音服务返回异常状态码:', statusCode, '原始响应:', res && res.data);
|
||||||
|
resolve(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const audioPath = this._extractAudioUrl(res && res.data);
|
||||||
|
if (!audioPath) {
|
||||||
|
console.warn('[VoiceHTTP] 未解析到音频地址, 原始响应:', res && res.data);
|
||||||
|
resolve(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const _src = /^https?:\/\//i.test(audioPath) ? audioPath : (VOICE_API_PATH + audioPath);
|
||||||
console.log('[VoiceHTTP] audio src:', _src);
|
console.log('[VoiceHTTP] audio src:', _src);
|
||||||
// 每次重新创建 audio 实例,避免复用导致播放卡死
|
// 每次重新创建 audio 实例,避免复用导致播放卡死
|
||||||
if (this.audio) {
|
if (this.audio) {
|
||||||
|
|||||||
@ -1,26 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="reprint-page">
|
<view class="reprint-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>
|
||||||
@ -33,25 +29,23 @@
|
|||||||
|
|
||||||
<!-- 有权限:中部操作区 + 底部消息区 -->
|
<!-- 有权限:中部操作区 + 底部消息区 -->
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<view class="content-box">
|
<!-- 扫码输入区(参考拆单,白底顶栏) -->
|
||||||
<!-- 手动输入输入框(默认隐藏) -->
|
<view class="scan-bar-wrap" v-if="manualInputOpen">
|
||||||
<view class="broadcast-input-area">
|
<SearchBar
|
||||||
<view v-if="manualInputOpen" class="scan-section">
|
v-model="scanKeyword"
|
||||||
<SearchBar
|
:placeholder="printerId ? '扫描/输入快递单号' : '扫描/输入打印台编码'"
|
||||||
v-model="scanKeyword"
|
:show-search="true"
|
||||||
:placeholder="printerId ? '扫描/输入快递单号' : '扫描/输入打印台编码'"
|
:show-scan="!isBroadcastMode"
|
||||||
:show-search="true"
|
scan-icon="scan"
|
||||||
:show-scan="!isBroadcastMode"
|
:focus="inputFocus"
|
||||||
scan-icon="scan"
|
:input-font-size="'34rpx'"
|
||||||
:focus="inputFocus"
|
:search-text-font-size="'34rpx'"
|
||||||
:input-font-size="'34rpx'"
|
@search="handleScanConfirm"
|
||||||
:search-text-font-size="'34rpx'"
|
@scan="handleCameraScan"
|
||||||
@search="handleScanConfirm"
|
></SearchBar>
|
||||||
@scan="handleCameraScan"
|
</view>
|
||||||
></SearchBar>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
<view class="content-box">
|
||||||
<!-- 模式切换条 -->
|
<!-- 模式切换条 -->
|
||||||
<view class="mode-switch-bar">
|
<view class="mode-switch-bar">
|
||||||
<view
|
<view
|
||||||
@ -89,10 +83,12 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 打印台设置弹窗 -->
|
<!-- 打印台设置弹窗 -->
|
||||||
<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" round="20" :z-index="10090" @close="showPopup = false" style="flex: none">
|
||||||
<view class="print-popup">
|
<view class="print-popup">
|
||||||
|
<view class="print-popup-header">
|
||||||
|
<text class="print-popup-title">打印台绑定</text>
|
||||||
|
</view>
|
||||||
<scroll-view scroll-y class="print-popup-scroll">
|
<scroll-view scroll-y class="print-popup-scroll">
|
||||||
<view class="print-popup-title">打印台绑定</view>
|
|
||||||
<view class="print-row print-row--station">
|
<view class="print-row print-row--station">
|
||||||
<text class="print-label">打印台</text>
|
<text class="print-label">打印台</text>
|
||||||
<view class="print-station-input-wrap">
|
<view class="print-station-input-wrap">
|
||||||
@ -100,7 +96,8 @@
|
|||||||
v-model="printStationInputKeyword"
|
v-model="printStationInputKeyword"
|
||||||
placeholder="请输入或扫描打印台编号"
|
placeholder="请输入或扫描打印台编号"
|
||||||
:clearable="true"
|
:clearable="true"
|
||||||
:customStyle="{ fontSize: '28rpx', height: '80rpx', lineHeight: '80rpx', padding: '0 20rpx', background: '#fafafa', borderRadius: '10rpx' }"
|
font-size="36rpx"
|
||||||
|
:customStyle="{ height: '80rpx', lineHeight: '80rpx', padding: '0 20rpx', background: '#fafafa', borderRadius: '10rpx' }"
|
||||||
@input="handlePrintStationInput"
|
@input="handlePrintStationInput"
|
||||||
@focus="handlePrintStationInputFocus"
|
@focus="handlePrintStationInputFocus"
|
||||||
@blur="handlePrintStationInputBlur"
|
@blur="handlePrintStationInputBlur"
|
||||||
@ -174,7 +171,6 @@ import voice from '@/core/utils/voice';
|
|||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.isBroadcastMode = options?.broadcast === 'true' || options?.broadcast === true;
|
this.isBroadcastMode = options?.broadcast === 'true' || options?.broadcast === true;
|
||||||
this.checkPermission();
|
this.checkPermission();
|
||||||
this.loadPrinterBinding();
|
|
||||||
this.loadPrintStations(1, false);
|
this.loadPrintStations(1, false);
|
||||||
this.safeDispatchBroadcast('setCallbacks', {
|
this.safeDispatchBroadcast('setCallbacks', {
|
||||||
onResult: this.handleBroadcastResult
|
onResult: this.handleBroadcastResult
|
||||||
@ -280,27 +276,6 @@ import voice from '@/core/utils/voice';
|
|||||||
console.warn('[labelReprint] 加载打印台列表失败:', error);
|
console.warn('[labelReprint] 加载打印台列表失败:', error);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
savePrinterBinding() {
|
|
||||||
try {
|
|
||||||
uni.setStorageSync('labelReprint_printer', {
|
|
||||||
printerId: this.printerId,
|
|
||||||
printerName: this.printerName
|
|
||||||
});
|
|
||||||
} catch (e) {
|
|
||||||
console.warn('[labelReprint] 保存打印台绑定失败:', e);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
loadPrinterBinding() {
|
|
||||||
try {
|
|
||||||
const stored = uni.getStorageSync('labelReprint_printer');
|
|
||||||
if (stored) {
|
|
||||||
this.printerId = String(stored.printerId || '');
|
|
||||||
this.printerName = String(stored.printerName || '');
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
// 忽略
|
|
||||||
}
|
|
||||||
},
|
|
||||||
matchPrintStation(text) {
|
matchPrintStation(text) {
|
||||||
if (!text || !Array.isArray(this.printStationList) || !this.printStationList.length) {
|
if (!text || !Array.isArray(this.printStationList) || !this.printStationList.length) {
|
||||||
uni.showToast({ title: '暂无可用打印台', icon: 'none' });
|
uni.showToast({ title: '暂无可用打印台', icon: 'none' });
|
||||||
@ -317,7 +292,6 @@ import voice from '@/core/utils/voice';
|
|||||||
if (matched) {
|
if (matched) {
|
||||||
this.printerId = String(matched.id);
|
this.printerId = String(matched.id);
|
||||||
this.printerName = String(matched.name || '');
|
this.printerName = String(matched.name || '');
|
||||||
this.savePrinterBinding();
|
|
||||||
uni.showToast({ title: `已绑定打印台:${matched.name}`, icon: 'success' });
|
uni.showToast({ title: `已绑定打印台:${matched.name}`, icon: 'success' });
|
||||||
this.speakVoice('已绑定打印台');
|
this.speakVoice('已绑定打印台');
|
||||||
this.addPrintMsg(`打印台绑定成功:${matched.name}(${matched.customBarcode || matched.id})`);
|
this.addPrintMsg(`打印台绑定成功:${matched.name}(${matched.customBarcode || matched.id})`);
|
||||||
@ -350,7 +324,6 @@ import voice from '@/core/utils/voice';
|
|||||||
handlePrintStationSelect(station) {
|
handlePrintStationSelect(station) {
|
||||||
this.printerId = String(station?.id || '');
|
this.printerId = String(station?.id || '');
|
||||||
this.printerName = String(station?.name || '');
|
this.printerName = String(station?.name || '');
|
||||||
this.savePrinterBinding();
|
|
||||||
this.showPrintStationDropdown = false;
|
this.showPrintStationDropdown = false;
|
||||||
this.showPopup = false;
|
this.showPopup = false;
|
||||||
uni.showToast({ title: `已绑定打印台:${station.name}`, icon: 'success' });
|
uni.showToast({ title: `已绑定打印台:${station.name}`, icon: 'success' });
|
||||||
@ -360,9 +333,23 @@ import voice from '@/core/utils/voice';
|
|||||||
handlePrintStationInputConfirm() {
|
handlePrintStationInputConfirm() {
|
||||||
const keyword = this.normalizeKeyword(this.printStationInputKeyword);
|
const keyword = this.normalizeKeyword(this.printStationInputKeyword);
|
||||||
if (!keyword) return;
|
if (!keyword) return;
|
||||||
if (this.printStationFilteredList.length > 0) {
|
const kw = keyword.toLowerCase();
|
||||||
this.handlePrintStationSelect(this.printStationFilteredList[0]);
|
// 仅精确匹配才直接绑定,避免输入部分关键字回车误绑到首个模糊匹配项
|
||||||
|
const exactMatch = this.printStationFilteredList.find(station => {
|
||||||
|
return String(station.name).toLowerCase() === kw
|
||||||
|
|| String(station.id).toLowerCase() === kw
|
||||||
|
|| String(station.customBarcode || '').toLowerCase() === kw;
|
||||||
|
});
|
||||||
|
if (exactMatch) {
|
||||||
|
this.handlePrintStationSelect(exactMatch);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
if (this.printStationFilteredList.length === 1) {
|
||||||
|
this.handlePrintStationSelect(this.printStationFilteredList[0]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
uni.showToast({ title: '未匹配到打印台', icon: 'none' });
|
||||||
|
this.speakVoice('未绑定打印台');
|
||||||
},
|
},
|
||||||
handlePrintStationInputFocus() {
|
handlePrintStationInputFocus() {
|
||||||
this.showPrintStationDropdown = false;
|
this.showPrintStationDropdown = false;
|
||||||
@ -568,7 +555,9 @@ import voice from '@/core/utils/voice';
|
|||||||
return `PRINT_${timePart}_${randomPart}`;
|
return `PRINT_${timePart}_${randomPart}`;
|
||||||
},
|
},
|
||||||
addPrintMsg(msg) {
|
addPrintMsg(msg) {
|
||||||
const timestamp = new Date().toLocaleTimeString();
|
const now = new Date();
|
||||||
|
const pad = n => String(n).padStart(2, '0');
|
||||||
|
const timestamp = `${pad(now.getHours())}:${pad(now.getMinutes())}:${pad(now.getSeconds())}`;
|
||||||
this.printMsgList.push(`[${timestamp}] ${msg}`);
|
this.printMsgList.push(`[${timestamp}] ${msg}`);
|
||||||
if (this.printMsgList.length > 200) {
|
if (this.printMsgList.length > 200) {
|
||||||
this.printMsgList = this.printMsgList.slice(-100);
|
this.printMsgList = this.printMsgList.slice(-100);
|
||||||
@ -587,49 +576,67 @@ import voice from '@/core/utils/voice';
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===== 顶部栏 ===== */
|
/* ===== 顶部标题栏(参考拆单) ===== */
|
||||||
.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;
|
||||||
@ -638,22 +645,17 @@ import voice from '@/core/utils/voice';
|
|||||||
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;
|
border-radius: 8rpx;
|
||||||
|
line-height: 1;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-printer-text--bound {
|
.header-printer-btn--bound {
|
||||||
color: #07c160;
|
color: #07c160;
|
||||||
border-color: #07c160;
|
border-color: #07c160;
|
||||||
}
|
}
|
||||||
@ -673,36 +675,20 @@ import voice from '@/core/utils/voice';
|
|||||||
color: #909399;
|
color: #909399;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===== 手动输入开关按钮(头部) ===== */
|
|
||||||
.manual-toggle-btn {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
width: 175rpx;
|
|
||||||
height: 52rpx;
|
|
||||||
background: #2979ff;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.manual-toggle-btn--active {
|
|
||||||
background: #fa8c16;
|
|
||||||
}
|
|
||||||
|
|
||||||
.manual-toggle-btn__text {
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #ffffff;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ===== 中部操作区 ===== */
|
/* ===== 中部操作区 ===== */
|
||||||
.content-box {
|
.content-box {
|
||||||
padding: 20rpx 24rpx;
|
padding: 20rpx 24rpx;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 扫码输入区 */
|
/* 扫码输入区(参考拆单) */
|
||||||
.scan-section {
|
.scan-bar-wrap {
|
||||||
margin-bottom: 20rpx;
|
position: relative;
|
||||||
|
z-index: 10;
|
||||||
|
padding: 20rpx;
|
||||||
|
background: #ffffff;
|
||||||
|
border-bottom: 1rpx solid #f2f2f2;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 模式切换条 */
|
/* 模式切换条 */
|
||||||
@ -711,7 +697,7 @@ import voice from '@/core/utils/voice';
|
|||||||
gap: 0;
|
gap: 0;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border: 2rpx solid #e74c3c;
|
border: 2rpx solid #2979ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mode-switch-item {
|
.mode-switch-item {
|
||||||
@ -723,11 +709,11 @@ import voice from '@/core/utils/voice';
|
|||||||
}
|
}
|
||||||
|
|
||||||
.mode-switch-item--active {
|
.mode-switch-item--active {
|
||||||
background: #e74c3c;
|
background: #2979ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mode-switch-item__text {
|
.mode-switch-item__text {
|
||||||
font-size: 32rpx;
|
font-size: 38rpx;
|
||||||
color: #303133;
|
color: #303133;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
@ -741,7 +727,7 @@ import voice from '@/core/utils/voice';
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
margin: 0 24rpx 24rpx;
|
margin: 0 24rpx 24rpx;
|
||||||
background: #1a1a1a;
|
background: #ffffff;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -760,9 +746,8 @@ import voice from '@/core/utils/voice';
|
|||||||
}
|
}
|
||||||
|
|
||||||
.message-item__text {
|
.message-item__text {
|
||||||
font-size: 32rpx;
|
font-size: 34rpx;
|
||||||
color: #ffffff;
|
color: #000000;
|
||||||
font-family: 'Courier New', monospace;
|
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
@ -775,54 +760,60 @@ import voice from '@/core/utils/voice';
|
|||||||
}
|
}
|
||||||
|
|
||||||
.message-empty__text {
|
.message-empty__text {
|
||||||
font-size: 28rpx;
|
font-size: 34rpx;
|
||||||
color: #666666;
|
color: #909399;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===== 打印台设置弹窗 ===== */
|
/* ===== 打印台设置弹窗 ===== */
|
||||||
.print-popup {
|
.print-popup {
|
||||||
height: 70vh;
|
height: 450rpx;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border-top-left-radius: 20rpx;
|
/* 顶部圆角与 u-popup 的 round="20"(20px)保持一致,并裁切内部白底 */
|
||||||
border-top-right-radius: 20rpx;
|
border-radius: 20px 20px 0 0;
|
||||||
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.print-popup-scroll {
|
/* 居中标题 + 细分隔线(与拆单弹窗保持一致) */
|
||||||
flex: 1;
|
.print-popup-header {
|
||||||
padding: 48rpx 32rpx calc(40rpx + env(safe-area-inset-bottom));
|
display: flex;
|
||||||
box-sizing: border-box;
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
padding: 32rpx 30rpx 24rpx;
|
||||||
|
border-bottom: 1rpx solid #f0f0f0;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.print-popup-title {
|
.print-popup-title {
|
||||||
font-size: 42rpx;
|
font-size: 38rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #303133;
|
color: #333;
|
||||||
margin-bottom: 36rpx;
|
}
|
||||||
|
|
||||||
|
.print-popup-scroll {
|
||||||
|
flex: 1;
|
||||||
|
padding: 32rpx 32rpx calc(40rpx + env(safe-area-inset-bottom));
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.print-row {
|
.print-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
padding: 28rpx 0;
|
padding: 28rpx 0;
|
||||||
border-bottom: 1rpx solid #f2f3f5;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.print-row--station {
|
.print-row--station {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
align-items: center;
|
||||||
|
|
||||||
.print-row--station .print-label {
|
|
||||||
padding-top: 10rpx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.print-label {
|
.print-label {
|
||||||
min-width: 130rpx;
|
min-width: 130rpx;
|
||||||
width: 130rpx;
|
width: 130rpx;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
line-height: 40rpx;
|
line-height: 36rpx;
|
||||||
color: #909399;
|
color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.print-station-input-wrap {
|
.print-station-input-wrap {
|
||||||
|
|||||||
@ -136,10 +136,12 @@
|
|||||||
</u-popup>
|
</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" round="20" :z-index="10090" @close="showPopup = false" style="flex: none">
|
||||||
<view class="print-popup">
|
<view class="print-popup">
|
||||||
|
<view class="print-popup-header">
|
||||||
|
<text class="print-popup-title">打印台绑定</text>
|
||||||
|
</view>
|
||||||
<scroll-view scroll-y class="print-popup-scroll">
|
<scroll-view scroll-y class="print-popup-scroll">
|
||||||
<view class="print-popup-title">打印台绑定</view>
|
|
||||||
<view class="print-row print-row--station">
|
<view class="print-row print-row--station">
|
||||||
<text class="print-label">打印台</text>
|
<text class="print-label">打印台</text>
|
||||||
<view class="print-station-input-wrap">
|
<view class="print-station-input-wrap">
|
||||||
@ -147,7 +149,8 @@
|
|||||||
v-model="printStationInputKeyword"
|
v-model="printStationInputKeyword"
|
||||||
placeholder="请输入或扫描打印台编号"
|
placeholder="请输入或扫描打印台编号"
|
||||||
:clearable="true"
|
:clearable="true"
|
||||||
:customStyle="{ fontSize: '28rpx', height: '80rpx', lineHeight: '80rpx', padding: '0 20rpx', background: '#fafafa', borderRadius: '10rpx' }"
|
font-size="36rpx"
|
||||||
|
:customStyle="{ height: '80rpx', lineHeight: '80rpx', padding: '0 20rpx', background: '#fafafa', borderRadius: '10rpx' }"
|
||||||
@input="handlePrintStationInput"
|
@input="handlePrintStationInput"
|
||||||
@focus="handlePrintStationInputFocus"
|
@focus="handlePrintStationInputFocus"
|
||||||
@blur="handlePrintStationInputBlur"
|
@blur="handlePrintStationInputBlur"
|
||||||
@ -706,9 +709,23 @@ export default {
|
|||||||
handlePrintStationInputConfirm() {
|
handlePrintStationInputConfirm() {
|
||||||
const keyword = this.normalizeKeyword(this.printStationInputKeyword);
|
const keyword = this.normalizeKeyword(this.printStationInputKeyword);
|
||||||
if (!keyword) return;
|
if (!keyword) return;
|
||||||
if (this.printStationFilteredList.length > 0) {
|
const kw = keyword.toLowerCase();
|
||||||
this.handlePrintStationSelect(this.printStationFilteredList[0]);
|
// 仅精确匹配才直接绑定,避免输入部分关键字回车误绑到首个模糊匹配项
|
||||||
|
const exactMatch = this.printStationFilteredList.find(station => {
|
||||||
|
return String(station.name).toLowerCase() === kw
|
||||||
|
|| String(station.id).toLowerCase() === kw
|
||||||
|
|| String(station.customBarcode || '').toLowerCase() === kw;
|
||||||
|
});
|
||||||
|
if (exactMatch) {
|
||||||
|
this.handlePrintStationSelect(exactMatch);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
if (this.printStationFilteredList.length === 1) {
|
||||||
|
this.handlePrintStationSelect(this.printStationFilteredList[0]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
uni.showToast({ title: '未匹配到打印台', icon: 'none' });
|
||||||
|
this.speakVoice('未绑定打印台');
|
||||||
},
|
},
|
||||||
handlePrintStationInputFocus() {
|
handlePrintStationInputFocus() {
|
||||||
this.showPrintStationDropdown = false;
|
this.showPrintStationDropdown = false;
|
||||||
@ -1148,48 +1165,54 @@ export default {
|
|||||||
|
|
||||||
/* ===== 打印台设置弹窗 ===== */
|
/* ===== 打印台设置弹窗 ===== */
|
||||||
.print-popup {
|
.print-popup {
|
||||||
height: 70vh;
|
height: 450rpx;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border-top-left-radius: 20rpx;
|
/* 顶部圆角与 u-popup 的 round="20"(20px)保持一致,并裁切内部白底 */
|
||||||
border-top-right-radius: 20rpx;
|
border-radius: 20px 20px 0 0;
|
||||||
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.print-popup-scroll {
|
/* 居中标题 + 细分隔线(与仓库切换等弹窗保持一致) */
|
||||||
flex: 1;
|
.print-popup-header {
|
||||||
padding: 48rpx 32rpx calc(40rpx + env(safe-area-inset-bottom));
|
display: flex;
|
||||||
box-sizing: border-box;
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
padding: 32rpx 30rpx 24rpx;
|
||||||
|
border-bottom: 1rpx solid #f0f0f0;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.print-popup-title {
|
.print-popup-title {
|
||||||
font-size: 42rpx;
|
font-size: 38rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #303133;
|
color: #333;
|
||||||
margin-bottom: 36rpx;
|
}
|
||||||
|
|
||||||
|
.print-popup-scroll {
|
||||||
|
flex: 1;
|
||||||
|
padding: 32rpx 32rpx calc(40rpx + env(safe-area-inset-bottom));
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.print-row {
|
.print-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
padding: 28rpx 0;
|
padding: 28rpx 0;
|
||||||
border-bottom: 1rpx solid #f2f3f5;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.print-row--station {
|
.print-row--station {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
align-items: center;
|
||||||
|
|
||||||
.print-row--station .print-label {
|
|
||||||
padding-top: 10rpx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.print-label {
|
.print-label {
|
||||||
min-width: 130rpx;
|
min-width: 130rpx;
|
||||||
width: 130rpx;
|
width: 130rpx;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
line-height: 40rpx;
|
line-height: 36rpx;
|
||||||
color: #909399;
|
color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.print-station-input-wrap {
|
.print-station-input-wrap {
|
||||||
|
|||||||
@ -919,15 +919,19 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.store-drawer__header {
|
.store-drawer__header {
|
||||||
height: 88rpx;
|
position: relative;
|
||||||
padding: 0 32rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
padding: 32rpx 30rpx 24rpx;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.store-drawer__close {
|
.store-drawer__close {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
right: 24rpx;
|
||||||
|
transform: translateY(-50%);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@ -935,9 +939,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.store-drawer__title {
|
.store-drawer__title {
|
||||||
font-size: 36rpx;
|
font-size: 38rpx;
|
||||||
font-weight: bold;
|
font-weight: 600;
|
||||||
color: #303133;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.store-drawer__loading {
|
.store-drawer__loading {
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="scatter-picking-detail-page">
|
<view class="scatter-picking-detail-page">
|
||||||
<view class="normar_container">
|
<view class="normar_container">
|
||||||
<page-nav :title="showDetailView ? '订单复核详情' : title">
|
<view class="status-bar"></view>
|
||||||
<template #left>
|
<view class="page-header">
|
||||||
<view v-if="showDetailView && isIntercepted" class="nav-intercept-btn" @click="handleShowInterceptInfo">
|
<view class="back-btn" @click="handleBack">
|
||||||
<text class="nav-intercept-btn__text">拦截信息</text>
|
<u-icon name="arrow-left" size="18" color="#333"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
<text class="header-title">{{ showDetailView ? '订单复核详情' : title }}</text>
|
||||||
<template #right>
|
<view class="header-side header-side--right">
|
||||||
<view
|
<view
|
||||||
class="nav-scale-btn"
|
class="nav-scale-btn"
|
||||||
:class="{ 'nav-scale-btn--connected': isScaleConnected }"
|
:class="{ 'nav-scale-btn--connected': isScaleConnected }"
|
||||||
@ -18,8 +18,8 @@
|
|||||||
<view class="nav-settings-btn" @click="showSettingsPopup = true">
|
<view class="nav-settings-btn" @click="showSettingsPopup = true">
|
||||||
<text class="nav-settings-btn__text">设置</text>
|
<text class="nav-settings-btn__text">设置</text>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</view>
|
||||||
</page-nav>
|
</view>
|
||||||
|
|
||||||
<view class="search-filter">
|
<view class="search-filter">
|
||||||
<view class="search-row">
|
<view class="search-row">
|
||||||
@ -44,6 +44,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 拦截信息横幅 -->
|
||||||
|
<view v-if="showDetailView && isIntercepted" class="intercept-banner" @click="handleShowInterceptInfo">
|
||||||
|
<text class="intercept-banner__text">该订单已被拦截,请勿复核发货</text>
|
||||||
|
<text class="intercept-banner__more">查看</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 复核明细区域:占满剩余空间 -->
|
<!-- 复核明细区域:占满剩余空间 -->
|
||||||
<view class="detail-area" :class="{ 'detail-area--empty': !showDetailView }">
|
<view class="detail-area" :class="{ 'detail-area--empty': !showDetailView }">
|
||||||
<ReviewDetail
|
<ReviewDetail
|
||||||
@ -253,26 +259,19 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="scale-popup-input">
|
<view class="scale-popup-input">
|
||||||
<u-input
|
<SearchBar
|
||||||
v-model="scaleFilterName"
|
v-model="scaleFilterName"
|
||||||
placeholder="电子秤蓝牙名称(完整名称)"
|
placeholder="搜索设备名称/ID"
|
||||||
border="surround"
|
:show-scan="false"
|
||||||
fontSize="32rpx"
|
:input-font-size="'34rpx'"
|
||||||
></u-input>
|
:search-text-font-size="'34rpx'"
|
||||||
<u-button
|
></SearchBar>
|
||||||
type="primary"
|
|
||||||
size="mini"
|
|
||||||
:disabled="!scaleFilterName"
|
|
||||||
:loading="scaleConnectionStatus === 'connecting'"
|
|
||||||
:customStyle="{ width: '200rpx', height: '72rpx', padding: '0', fontSize: '32rpx', flexShrink: '0' }"
|
|
||||||
@click="handleScaleConnectByName"
|
|
||||||
>按名称连接</u-button>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<scroll-view scroll-y class="scale-popup-list" v-if="scaleDevices.length">
|
<scroll-view scroll-y class="scale-popup-list" v-if="filteredScaleDevices.length">
|
||||||
<view class="scale-popup-list-inner">
|
<view class="scale-popup-list-inner">
|
||||||
<view
|
<view
|
||||||
v-for="d in scaleDevices"
|
v-for="d in filteredScaleDevices"
|
||||||
:key="d.deviceId"
|
:key="d.deviceId"
|
||||||
class="scale-device-item"
|
class="scale-device-item"
|
||||||
:class="{ 'scale-device-item--active': isScaleCurrentDevice(d) }"
|
:class="{ 'scale-device-item--active': isScaleCurrentDevice(d) }"
|
||||||
@ -286,7 +285,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<u-empty v-else class="scale-popup-list" mode="list" text="暂无设备,点击扫描"></u-empty>
|
<u-empty v-else class="scale-popup-list" mode="list" :text="scaleDevices.length ? '未匹配到设备' : '暂无设备,点击扫描'" text-size="32rpx"></u-empty>
|
||||||
|
|
||||||
<view class="scale-popup-actions">
|
<view class="scale-popup-actions">
|
||||||
<view class="scale-popup-close-btn" @click="closeScalePopup">关闭</view>
|
<view class="scale-popup-close-btn" @click="closeScalePopup">关闭</view>
|
||||||
@ -756,6 +755,16 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
|
|||||||
scaleDevices() {
|
scaleDevices() {
|
||||||
return this.$store.state.bluetoothScale.devices;
|
return this.$store.state.bluetoothScale.devices;
|
||||||
},
|
},
|
||||||
|
filteredScaleDevices() {
|
||||||
|
const keyword = String(this.scaleFilterName || '').trim().toLowerCase();
|
||||||
|
const list = Array.isArray(this.scaleDevices) ? this.scaleDevices : [];
|
||||||
|
if (!keyword) return list;
|
||||||
|
return list.filter(d => {
|
||||||
|
const name = String(d.name || '').toLowerCase();
|
||||||
|
const id = String(d.deviceId || '').toLowerCase();
|
||||||
|
return name.includes(keyword) || id.includes(keyword);
|
||||||
|
});
|
||||||
|
},
|
||||||
scaleDiscovering() {
|
scaleDiscovering() {
|
||||||
return this.$store.state.bluetoothScale.discovering;
|
return this.$store.state.bluetoothScale.discovering;
|
||||||
},
|
},
|
||||||
@ -893,6 +902,32 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleBack() {
|
||||||
|
const pages = getCurrentPages();
|
||||||
|
if (pages.length > 1) {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1,
|
||||||
|
fail: () => {
|
||||||
|
this.toHome();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.toHome();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toHome() {
|
||||||
|
const pages = getCurrentPages();
|
||||||
|
const currentRoute = pages.length ? `/${pages[pages.length - 1].route || ''}` : '';
|
||||||
|
if (currentRoute === '/pages/index/index') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/index/index',
|
||||||
|
fail: () => {
|
||||||
|
uni.reLaunch({ url: '/pages/index/index' });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
initKeyboardHeightListener() {
|
initKeyboardHeightListener() {
|
||||||
// H5 端:监听 visualViewport 高度变化,差值即键盘高度(仅垫高弹窗内容,不整页上推)
|
// H5 端:监听 visualViewport 高度变化,差值即键盘高度(仅垫高弹窗内容,不整页上推)
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
@ -3368,20 +3403,6 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
|
|||||||
uni.showToast({ title: (e && e.message) || '扫描失败', icon: 'none' });
|
uni.showToast({ title: (e && e.message) || '扫描失败', icon: 'none' });
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async handleScaleConnectByName() {
|
|
||||||
if (!this.scaleFilterName) {
|
|
||||||
uni.showToast({ title: '请输入电子秤蓝牙名称', icon: 'none' });
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
await this.$store.dispatch('bluetoothScale/connectDeviceByName', this.scaleFilterName);
|
|
||||||
uni.showToast({ title: '连接成功', icon: 'success' });
|
|
||||||
this.showScalePopup = false;
|
|
||||||
this.speakVoice('蓝牙秤连接成功');
|
|
||||||
} catch (e) {
|
|
||||||
uni.showToast({ title: (e && e.message) || '连接失败', icon: 'none' });
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async handleScaleConnectDevice(device) {
|
async handleScaleConnectDevice(device) {
|
||||||
try {
|
try {
|
||||||
await this.$store.dispatch('bluetoothScale/connectDevice', device);
|
await this.$store.dispatch('bluetoothScale/connectDevice', device);
|
||||||
@ -4331,13 +4352,58 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
|
|||||||
z-index: 10090 !important;
|
z-index: 10090 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .nav-title .right {
|
/* ===== 顶部标题栏(参考绑定包材) ===== */
|
||||||
width: auto;
|
.status-bar {
|
||||||
min-width: 136rpx;
|
height: var(--status-bar-height);
|
||||||
|
background: #ffffff;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-header {
|
||||||
|
position: relative;
|
||||||
|
height: 88rpx;
|
||||||
|
padding: 0 24rpx;
|
||||||
display: flex;
|
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-side {
|
||||||
|
flex-shrink: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-side--right {
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.header-side .nav-scale-btn + .nav-settings-btn {
|
||||||
|
margin-left: 16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-title {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #333;
|
||||||
|
text-align: center;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
.detail-area {
|
.detail-area {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
@ -4445,27 +4511,21 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
|
|||||||
}
|
}
|
||||||
|
|
||||||
.nav-scale-btn {
|
.nav-scale-btn {
|
||||||
padding: 8rpx 18rpx;
|
padding: 12rpx 24rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
border: 1rpx solid #2979ff;
|
background: #2979ff;
|
||||||
border-radius: 6rpx;
|
border-radius: 8rpx;
|
||||||
margin-right: 12rpx;
|
|
||||||
|
|
||||||
&--connected {
|
&--connected {
|
||||||
border-color: #07c160;
|
background: #07c160;
|
||||||
background: #f0f9eb;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-scale-btn__text {
|
.nav-scale-btn__text {
|
||||||
font-size: 30rpx;
|
font-size: 36rpx;
|
||||||
color: #2979ff;
|
color: #ffffff;
|
||||||
line-height: 1.4;
|
line-height: 1;
|
||||||
}
|
|
||||||
|
|
||||||
&--connected .nav-scale-btn__text {
|
|
||||||
color: #07c160;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4474,12 +4534,12 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
|
|||||||
}
|
}
|
||||||
|
|
||||||
.nav-settings-btn {
|
.nav-settings-btn {
|
||||||
padding: 8rpx 18rpx;
|
padding: 12rpx 24rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
border: 1rpx solid #2979ff;
|
background: #2979ff;
|
||||||
border-radius: 6rpx;
|
border-radius: 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-settings-btn:active {
|
.nav-settings-btn:active {
|
||||||
@ -4487,29 +4547,35 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
|
|||||||
}
|
}
|
||||||
|
|
||||||
.nav-settings-btn__text {
|
.nav-settings-btn__text {
|
||||||
font-size: 30rpx;
|
font-size: 36rpx;
|
||||||
color: #2979ff;
|
color: #ffffff;
|
||||||
line-height: 1.4;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-intercept-btn {
|
/* ===== 拦截信息横幅 ===== */
|
||||||
padding: 4rpx 16rpx;
|
.intercept-banner {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: space-between;
|
||||||
border: 1rpx solid #fa3534;
|
padding: 20rpx 24rpx;
|
||||||
border-radius: 6rpx;
|
background: #fa3534;
|
||||||
background: #fef0f0;
|
flex-shrink: 0;
|
||||||
}
|
|
||||||
|
|
||||||
.nav-intercept-btn:active {
|
&__text {
|
||||||
opacity: 0.7;
|
flex: 1;
|
||||||
}
|
min-width: 0;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
.nav-intercept-btn__text {
|
&__more {
|
||||||
font-size: 26rpx;
|
flex-shrink: 0;
|
||||||
color: #fa3534;
|
margin-left: 16rpx;
|
||||||
line-height: 1.6;
|
font-size: 30rpx;
|
||||||
|
color: #ffffff;
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-intercept-popup {
|
.order-intercept-popup {
|
||||||
@ -4994,37 +5060,23 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
|
|||||||
|
|
||||||
.scale-popup-header {
|
.scale-popup-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
padding: 32rpx 30rpx 24rpx;
|
||||||
padding: 48rpx 32rpx 0;
|
flex-shrink: 0;
|
||||||
|
|
||||||
.scale-popup-title {
|
.scale-popup-title {
|
||||||
font-size: 38rpx;
|
font-size: 38rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #303133;
|
color: #333;
|
||||||
text-align: center;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.scale-popup-input {
|
.scale-popup-input {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 32rpx 32rpx 0;
|
padding: 32rpx 32rpx 24rpx;
|
||||||
|
border-bottom: 1rpx solid #f0f0f0;
|
||||||
::v-deep .u-input {
|
|
||||||
flex: 1;
|
|
||||||
min-width: 0;
|
|
||||||
height: 72rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding-top: 0 !important;
|
|
||||||
padding-bottom: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep .u-button {
|
|
||||||
margin-left: 16rpx;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.scale-popup-list {
|
.scale-popup-list {
|
||||||
@ -5070,7 +5122,7 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
|
|||||||
}
|
}
|
||||||
|
|
||||||
.scale-device-id {
|
.scale-device-id {
|
||||||
font-size: 24rpx;
|
font-size: 32rpx;
|
||||||
color: #999;
|
color: #999;
|
||||||
margin-top: 6rpx;
|
margin-top: 6rpx;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@ -5110,7 +5162,7 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 34rpx;
|
font-size: 36rpx;
|
||||||
color: #909399;
|
color: #909399;
|
||||||
border: 2rpx solid #dcdfe6;
|
border: 2rpx solid #dcdfe6;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
@ -5127,7 +5179,7 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 34rpx;
|
font-size: 36rpx;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
background: #2979ff;
|
background: #2979ff;
|
||||||
border: 2rpx solid #2979ff;
|
border: 2rpx solid #2979ff;
|
||||||
|
|||||||
@ -1,25 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="weighing-page">
|
<view class="weighing-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">
|
||||||
<SearchBar
|
<SearchBar
|
||||||
v-model="scanInput"
|
v-model="scanInput"
|
||||||
placeholder="扫描/输入快递单号"
|
placeholder="扫描/输入快递单号"
|
||||||
@ -33,6 +35,13 @@
|
|||||||
></SearchBar>
|
></SearchBar>
|
||||||
</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 class="info-list" :class="{ 'info-list--no-scan': !showScanInput }" v-show="showOrderInfo">
|
<view class="info-list" :class="{ 'info-list--no-scan': !showScanInput }" v-show="showOrderInfo">
|
||||||
<view class="info-row">
|
<view class="info-row">
|
||||||
@ -127,26 +136,19 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="scale-popup-input">
|
<view class="scale-popup-input">
|
||||||
<u-input
|
<SearchBar
|
||||||
v-model="scaleFilterName"
|
v-model="scaleFilterName"
|
||||||
placeholder="电子秤蓝牙名称(完整名称)"
|
placeholder="搜索设备名称/ID"
|
||||||
border="surround"
|
:show-scan="false"
|
||||||
fontSize="32rpx"
|
:input-font-size="'34rpx'"
|
||||||
></u-input>
|
:search-text-font-size="'34rpx'"
|
||||||
<u-button
|
></SearchBar>
|
||||||
type="primary"
|
|
||||||
size="mini"
|
|
||||||
:disabled="!scaleFilterName"
|
|
||||||
:loading="scaleConnectionStatus === 'connecting'"
|
|
||||||
:customStyle="{ width: '200rpx', height: '72rpx', padding: '0', fontSize: '32rpx', flexShrink: '0' }"
|
|
||||||
@click="handleScaleConnectByName"
|
|
||||||
>按名称连接</u-button>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<scroll-view scroll-y class="scale-popup-list" v-if="scaleDevices.length">
|
<scroll-view scroll-y class="scale-popup-list" v-if="filteredScaleDevices.length">
|
||||||
<view class="scale-popup-list-inner">
|
<view class="scale-popup-list-inner">
|
||||||
<view
|
<view
|
||||||
v-for="d in scaleDevices"
|
v-for="d in filteredScaleDevices"
|
||||||
:key="d.deviceId"
|
:key="d.deviceId"
|
||||||
class="scale-device-item"
|
class="scale-device-item"
|
||||||
:class="{ 'scale-device-item--active': isScaleCurrentDevice(d) }"
|
:class="{ 'scale-device-item--active': isScaleCurrentDevice(d) }"
|
||||||
@ -160,7 +162,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<u-empty v-else class="scale-popup-list" mode="list" text="暂无设备,点击扫描"></u-empty>
|
<u-empty v-else class="scale-popup-list" mode="list" :text="scaleDevices.length ? '未匹配到设备' : '暂无设备,点击扫描'" text-size="32rpx"></u-empty>
|
||||||
|
|
||||||
<view class="scale-popup-actions">
|
<view class="scale-popup-actions">
|
||||||
<view class="scale-popup-close-btn" @click="closeScalePopup">关闭</view>
|
<view class="scale-popup-close-btn" @click="closeScalePopup">关闭</view>
|
||||||
@ -262,6 +264,16 @@ import voice from '@/core/utils/voice';
|
|||||||
scaleDevices() {
|
scaleDevices() {
|
||||||
return this.$store.state.bluetoothScale.devices;
|
return this.$store.state.bluetoothScale.devices;
|
||||||
},
|
},
|
||||||
|
filteredScaleDevices() {
|
||||||
|
const keyword = String(this.scaleFilterName || '').trim().toLowerCase();
|
||||||
|
const list = Array.isArray(this.scaleDevices) ? this.scaleDevices : [];
|
||||||
|
if (!keyword) return list;
|
||||||
|
return list.filter(d => {
|
||||||
|
const name = String(d.name || '').toLowerCase();
|
||||||
|
const id = String(d.deviceId || '').toLowerCase();
|
||||||
|
return name.includes(keyword) || id.includes(keyword);
|
||||||
|
});
|
||||||
|
},
|
||||||
scaleDiscovering() {
|
scaleDiscovering() {
|
||||||
return this.$store.state.bluetoothScale.discovering;
|
return this.$store.state.bluetoothScale.discovering;
|
||||||
},
|
},
|
||||||
@ -508,7 +520,7 @@ import voice from '@/core/utils/voice';
|
|||||||
this.isGroupOrder = false;
|
this.isGroupOrder = false;
|
||||||
this.lastAutoWeight = '';
|
this.lastAutoWeight = '';
|
||||||
this.weightEditing = false;
|
this.weightEditing = false;
|
||||||
this.scanFocused = true;
|
this.scanFocused = false;
|
||||||
},
|
},
|
||||||
scaleWeightInGrams() {
|
scaleWeightInGrams() {
|
||||||
const raw = this.scaleWeight;
|
const raw = this.scaleWeight;
|
||||||
@ -533,20 +545,6 @@ import voice from '@/core/utils/voice';
|
|||||||
uni.showToast({ title: (e && e.message) || '扫描失败', icon: 'none' });
|
uni.showToast({ title: (e && e.message) || '扫描失败', icon: 'none' });
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async handleScaleConnectByName() {
|
|
||||||
if (!this.scaleFilterName) {
|
|
||||||
uni.showToast({ title: '请输入电子秤蓝牙名称', icon: 'none' });
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
await this.$store.dispatch('bluetoothScale/connectDeviceByName', this.scaleFilterName);
|
|
||||||
uni.showToast({ title: '连接成功', icon: 'success' });
|
|
||||||
this.showScalePopup = false;
|
|
||||||
this.speakVoice('蓝牙秤连接成功');
|
|
||||||
} catch (e) {
|
|
||||||
uni.showToast({ title: (e && e.message) || '连接失败', icon: 'none' });
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async handleScaleConnectDevice(device) {
|
async handleScaleConnectDevice(device) {
|
||||||
try {
|
try {
|
||||||
await this.$store.dispatch('bluetoothScale/connectDevice', device);
|
await this.$store.dispatch('bluetoothScale/connectDevice', device);
|
||||||
@ -616,66 +614,130 @@ import voice from '@/core/utils/voice';
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.weighing-page {
|
.weighing-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 .right {
|
.page-header {
|
||||||
width: auto;
|
position: relative;
|
||||||
min-width: 80rpx;
|
height: 88rpx;
|
||||||
|
padding: 0 24rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
background: #ffffff;
|
||||||
|
box-sizing: border-box;
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-manual-input {
|
.back-btn {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 56rpx;
|
||||||
|
height: 56rpx;
|
||||||
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;
|
}
|
||||||
|
|
||||||
|
.header-side--right {
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-title {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #333;
|
||||||
|
text-align: center;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ===== 空态提示(参考绑定包材) ===== */
|
||||||
|
.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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===== 信息展示列表 ===== */
|
/* ===== 信息展示列表 ===== */
|
||||||
.info-list {
|
.info-list {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
margin: 0 24rpx 16rpx;
|
margin: 20rpx 24rpx 16rpx;
|
||||||
|
|
||||||
&--no-scan {
|
&--no-scan {
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
@ -699,7 +761,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;
|
||||||
@ -707,7 +769,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;
|
||||||
@ -724,7 +786,7 @@ import voice from '@/core/utils/voice';
|
|||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.info-unit {
|
.info-unit {
|
||||||
font-size: 32rpx;
|
font-size: 40rpx;
|
||||||
color: #000;
|
color: #000;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
margin-left: 8rpx;
|
margin-left: 8rpx;
|
||||||
@ -757,7 +819,7 @@ import voice from '@/core/utils/voice';
|
|||||||
}
|
}
|
||||||
|
|
||||||
.scale-read-btn-text {
|
.scale-read-btn-text {
|
||||||
font-size: 30rpx;
|
font-size: 36rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
@ -782,7 +844,7 @@ import voice from '@/core/utils/voice';
|
|||||||
}
|
}
|
||||||
|
|
||||||
.scale-status-label {
|
.scale-status-label {
|
||||||
font-size: 32rpx;
|
font-size: 36rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -791,7 +853,7 @@ import voice from '@/core/utils/voice';
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.scale-status-value {
|
.scale-status-value {
|
||||||
font-size: 32rpx;
|
font-size: 36rpx;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
|
||||||
&.scale-status-connected {
|
&.scale-status-connected {
|
||||||
@ -809,7 +871,7 @@ import voice from '@/core/utils/voice';
|
|||||||
}
|
}
|
||||||
|
|
||||||
.scale-device-name {
|
.scale-device-name {
|
||||||
font-size: 34rpx;
|
font-size: 36rpx;
|
||||||
color: #999;
|
color: #999;
|
||||||
margin-left: 12rpx;
|
margin-left: 12rpx;
|
||||||
}
|
}
|
||||||
@ -845,11 +907,11 @@ import voice from '@/core/utils/voice';
|
|||||||
min-height: 72rpx;
|
min-height: 72rpx;
|
||||||
padding: 0 32rpx;
|
padding: 0 32rpx;
|
||||||
border-radius: 8rpx;
|
border-radius: 8rpx;
|
||||||
font-size: 32rpx !important;
|
font-size: 36rpx !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .u-button__text {
|
::v-deep .u-button__text {
|
||||||
font-size: 32rpx !important;
|
font-size: 36rpx !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .u-button + .u-button {
|
::v-deep .u-button + .u-button {
|
||||||
@ -867,37 +929,23 @@ import voice from '@/core/utils/voice';
|
|||||||
|
|
||||||
.scale-popup-header {
|
.scale-popup-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
padding: 32rpx 30rpx 24rpx;
|
||||||
padding: 48rpx 32rpx 0;
|
flex-shrink: 0;
|
||||||
|
|
||||||
.scale-popup-title {
|
.scale-popup-title {
|
||||||
font-size: 38rpx;
|
font-size: 38rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #303133;
|
color: #333;
|
||||||
text-align: center;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.scale-popup-input {
|
.scale-popup-input {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 32rpx 32rpx 0;
|
padding: 32rpx 32rpx 24rpx;
|
||||||
|
border-bottom: 1rpx solid #f0f0f0;
|
||||||
::v-deep .u-input {
|
|
||||||
flex: 1;
|
|
||||||
min-width: 0;
|
|
||||||
height: 72rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding-top: 0 !important;
|
|
||||||
padding-bottom: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep .u-button {
|
|
||||||
margin-left: 16rpx;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.scale-popup-list {
|
.scale-popup-list {
|
||||||
@ -943,7 +991,7 @@ import voice from '@/core/utils/voice';
|
|||||||
}
|
}
|
||||||
|
|
||||||
.scale-device-id {
|
.scale-device-id {
|
||||||
font-size: 24rpx;
|
font-size: 32rpx;
|
||||||
color: #999;
|
color: #999;
|
||||||
margin-top: 6rpx;
|
margin-top: 6rpx;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@ -983,7 +1031,7 @@ import voice from '@/core/utils/voice';
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 34rpx;
|
font-size: 36rpx;
|
||||||
color: #909399;
|
color: #909399;
|
||||||
border: 2rpx solid #dcdfe6;
|
border: 2rpx solid #dcdfe6;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
@ -1000,7 +1048,7 @@ import voice from '@/core/utils/voice';
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 34rpx;
|
font-size: 36rpx;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
background: #2979ff;
|
background: #2979ff;
|
||||||
border: 2rpx solid #2979ff;
|
border: 2rpx solid #2979ff;
|
||||||
@ -1021,6 +1069,10 @@ import voice from '@/core/utils/voice';
|
|||||||
/* ===== 提交按钮 ===== */
|
/* ===== 提交按钮 ===== */
|
||||||
.submit-section {
|
.submit-section {
|
||||||
padding: 40rpx 24rpx;
|
padding: 40rpx 24rpx;
|
||||||
|
|
||||||
|
::v-deep .u-button__text {
|
||||||
|
font-size: 36rpx !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===== 断开蓝牙秤二次确认弹窗 ===== */
|
/* ===== 断开蓝牙秤二次确认弹窗 ===== */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user