feat(收件任务/退件登记/复核): 优化页面样式交互,修复真机下拉刷新转圈

收件任务页 src/pages/work/order/returnRecord.vue
- 右上角「新建」按钮:字号 36rpx、自适应宽度、绝对定位右对齐垂直居中、圆角 8rpx
- 「我的任务/全部任务」筛选改为等宽胶囊按钮(参考库存盘点页),激活态实心蓝底白字加粗
- 任务卡片:批次号过长换行、加粗统一 bold、字号调整(登记数/标题 36rpx、创建人时间 30rpx)
- 任务卡片留白与退件登记面板统一(16rpx),修正卡片连成一片问题
- 删除任务确认弹窗改为自定义弹窗(参考完成盘点弹窗:居中+标题+灰底内容区+取消/删除)
- 修复真机下拉刷新一直转圈

退件登记页 src/pages/work/order/returnRecord-comps/ReturnScanPanel.vue
- 右上角「…」更多按钮替换为「输入框」按钮,直接切换手动输入
- 扫码输入区替换为统一 SearchBar 组件
- 扫描记录面板优化:标题加蓝色竖条、列表改灰底白卡、间距对齐统一
- 记录行:备注独立一行可换行、备注字号 36rpx 黑色、运单号取消加粗、备注与姓名时间互换位置
- 加粗统一 bold(替换 600)
- 空态提示字号 32rpx;整体左右留白统一 16rpx
- 修复真机下拉刷新一直转圈

全部功能页 src/pages/home/edit-quick-actions.vue
- 编辑按钮样式改为参考分拣缺货补货页刷新按钮(padding 14rpx 28rpx、圆角 8rpx、字号 36rpx)

复核页 src/pages/work/order/order-review.vue
- 拦截横幅:组单模式显示「该波次有拦截订单」,移除「查看」入口
- 多处 u-popup 的 border-radius 属性修正为 round
- 打印设置弹窗重构:参考面单补打页样式(固定高度、顶部圆角裁切、居中标题、输入框字号 36rpx)
- 打印台回车匹配:仅精确匹配才绑定,过滤后仅剩一个才自动选中,否则提示「未匹配到打印台」
- 样式微调:拦截横幅文字 32→36rpx、设置弹窗圆角 16→20rpx、gap 改 margin 兼容旧真机
This commit is contained in:
zm2000 2026-11-12 17:59:29 +08:00
parent bbfd474028
commit b8da08bdbb
4 changed files with 323 additions and 263 deletions

View File

@ -476,18 +476,16 @@
.edit-common-btn {
position: absolute;
right: 20rpx;
height: 60rpx;
display: flex;
align-items: center;
justify-content: center;
padding: 0 32rpx;
padding: 14rpx 28rpx;
background: #2979ff;
border-radius: 12rpx;
border-radius: 8rpx;
transition: all 0.2s ease;
.edit-common-text {
font-size: 34rpx;
font-weight: 500;
font-size: 36rpx;
color: #fff;
line-height: 1;
}

View File

@ -46,8 +46,7 @@
<!-- 拦截信息横幅 -->
<view v-if="showDetailView && isIntercepted" class="intercept-banner" @click="handleShowInterceptInfo">
<text class="intercept-banner__text">该订单已被拦截,请勿复核发货</text>
<text class="intercept-banner__more">查看</text>
<text class="intercept-banner__text">{{ listType === 'group' ? '该波次有拦截订单' : '该订单已被拦截,请勿复核发货' }}</text>
</view>
<!-- 复核明细区域:占满剩余空间 -->
@ -99,7 +98,7 @@
</view>
<!-- 订单列表抽屉 -->
<u-popup :show="showListDrawer" mode="bottom" border-radius="20" :z-index="10080" @close="showListDrawer = false">
<u-popup :show="showListDrawer" mode="bottom" round="20" :z-index="10080" @close="showListDrawer = false">
<view class="list-drawer">
<view class="list-drawer-header">
<text class="list-drawer-title">订单列表</text>
@ -120,7 +119,7 @@
</u-popup>
<!-- 设置数量弹窗 -->
<u-popup :show="showScanQtyPopup" mode="center" :closeable="true" border-radius="16" :z-index="10080" @close="showScanQtyPopup = false">
<u-popup :show="showScanQtyPopup" mode="center" :closeable="true" round="16" :z-index="10080" @close="showScanQtyPopup = false">
<view class="scan-qty-popup">
<view class="scan-qty-popup-title">设置扫描数量</view>
<view class="scan-qty-popup-body">
@ -144,7 +143,7 @@
</u-popup>
<!-- 拦截订单弹窗(散单模式扫码命中被拦截订单时,仅显示当前一个订单) -->
<u-popup :show="showOrderInterceptPopup" mode="bottom" :closeable="false" :closeOnClickOverlay="false" border-radius="20" :z-index="10080" @close="showOrderInterceptPopup = false">
<u-popup :show="showOrderInterceptPopup" mode="bottom" :closeable="false" :closeOnClickOverlay="false" round="20" :z-index="10080" @close="showOrderInterceptPopup = false">
<view class="order-intercept-popup">
<view class="order-intercept-popup__header">
<text class="order-intercept-popup__title">拦截信息</text>
@ -163,7 +162,7 @@
</u-popup>
<!-- 称重弹窗 -->
<u-popup :show="showWeighPopup" mode="bottom" :closeable="true" :closeOnClickOverlay="false" border-radius="20" :z-index="10080" @close="handleWeighCancel">
<u-popup :show="showWeighPopup" mode="bottom" :closeable="true" :closeOnClickOverlay="false" round="20" :z-index="10080" @close="handleWeighCancel">
<view class="weigh-popup" :style="{ paddingBottom: keyboardHeight ? keyboardHeight + 'px' : '' }">
<view class="weigh-popup-title weigh-popup-title--sm">称重</view>
<view class="weigh-popup-body">
@ -301,7 +300,7 @@
</u-popup>
<!-- 断开蓝牙秤二次确认弹窗 -->
<u-popup :show="showDisconnectConfirm" mode="center" :closeable="true" :closeOnClickOverlay="false" border-radius="20" :z-index="10110" @close="cancelScaleDisconnect">
<u-popup :show="showDisconnectConfirm" mode="center" :closeable="true" :closeOnClickOverlay="false" round="20" :z-index="10110" @close="cancelScaleDisconnect">
<view class="weigh-disconnect-popup">
<view class="weigh-disconnect-popup__title">断开蓝牙秤</view>
<view class="weigh-disconnect-popup__body">
@ -315,7 +314,7 @@
</u-popup>
<!-- 包材绑定弹窗 -->
<u-popup :show="showPackageBindingPopup" mode="bottom" :closeable="true" :closeOnClickOverlay="false" border-radius="20" :z-index="10080" @close="handlePackageBindingSkip">
<u-popup :show="showPackageBindingPopup" mode="bottom" :closeable="true" :closeOnClickOverlay="false" round="20" :z-index="10080" @close="handlePackageBindingSkip">
<view class="package-popup" :style="{ paddingBottom: keyboardHeight ? keyboardHeight + 'px' : '' }">
<view class="package-popup-title">包材绑定</view>
<view class="package-popup-body">
@ -346,7 +345,7 @@
</u-popup>
<!-- 设置弹窗 -->
<u-popup :show="showSettingsPopup" mode="center" :closeable="true" :closeOnClickOverlay="false" border-radius="16" :z-index="10080" @close="showSettingsPopup = false">
<u-popup :show="showSettingsPopup" mode="center" :closeable="true" :closeOnClickOverlay="false" round="20" :z-index="10080" @close="showSettingsPopup = false">
<view class="settings-popup">
<view class="settings-popup-title">复核设置</view>
<view class="settings-row">
@ -436,10 +435,12 @@
</view>
</u-popup>
<u-popup v-if="showPrintPopup" :show="showPrintPopup" mode="bottom" :closeable="true" border-radius="20" :z-index="10090" @close="showPrintPopup = false">
<view class="print-popup">
<u-popup v-if="showPrintPopup" :show="showPrintPopup" mode="bottom" :closeable="true" round="20" :z-index="10090" @close="showPrintPopup = false" style="flex: none">
<view class="print-popup print-popup--settings">
<view class="print-popup-header">
<text class="print-popup-title">打印设置</text>
</view>
<scroll-view scroll-y class="print-popup-scroll">
<view class="print-popup-title">打印设置</view>
<view class="print-row print-row--station">
<text class="print-label">打印台</text>
<view class="print-station-input-wrap">
@ -447,7 +448,8 @@
v-model="printStationInputKeyword"
placeholder="请输入或扫描打印台编号"
: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"
@focus="handlePrintStationInputFocus"
@blur="handlePrintStationInputBlur"
@ -482,7 +484,7 @@
mode="center"
:closeable="false"
:closeOnClickOverlay="false"
border-radius="16"
round="16"
:z-index="10095"
@close="showPrintFailPopup = false"
>
@ -501,7 +503,7 @@
</view>
</u-popup>
<u-popup :show="showStationListPopup" mode="bottom" :closeable="true" border-radius="20" :z-index="10090" @close="showStationListPopup = false; selectedStationId = ''">
<u-popup :show="showStationListPopup" mode="bottom" :closeable="true" round="20" :z-index="10090" @close="showStationListPopup = false; selectedStationId = ''">
<view class="print-popup">
<view class="print-popup-title">打印台列表</view>
<scroll-view class="station-list-scroll" scroll-y>
@ -1590,11 +1592,24 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
if (!keyword) {
return;
}
// 按回车时,如果有精确匹配则选中,否则选中过滤列表第一个
if (this.printStationFilteredList.length > 0) {
const station = this.printStationFilteredList[0];
this.handlePrintStationSelect(station);
const kw = keyword.toLowerCase();
// 仅精确匹配才直接绑定,避免输入部分关键字回车误绑到首个模糊匹配项
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('未绑定打印台');
},
safeDispatchBroadcast(action, payload) {
try {
@ -4564,7 +4579,7 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
&__text {
flex: 1;
min-width: 0;
font-size: 32rpx;
font-size: 36rpx;
color: #ffffff;
line-height: 1.4;
}
@ -4750,7 +4765,7 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
width: 560rpx;
padding: 36rpx;
background: #ffffff;
border-radius: 16rpx;
border-radius: 20rpx;
}
.settings-popup-title {
@ -4774,7 +4789,6 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
.settings-options {
display: flex;
gap: 16rpx;
}
.settings-option {
@ -4788,6 +4802,10 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
background: #fafafa;
}
.settings-option + .settings-option {
margin-left: 16rpx;
}
.settings-option--active {
color: #2979ff;
border-color: #2979ff;
@ -5521,11 +5539,11 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
.search-row {
display: flex;
align-items: center;
gap: 10rpx;
}
.search-row .unbound-print-btn {
flex-shrink: 0;
margin-left: 10rpx;
padding: 0 12rpx;
height: 56rpx;
font-size: 24rpx;
@ -5538,6 +5556,7 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
.search-row .scan-qty-btn {
flex-shrink: 0;
margin-left: 10rpx;
padding: 0 12rpx;
height: 56rpx;
font-size: 24rpx;
@ -5593,9 +5612,32 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
flex-direction: column;
}
/* 打印设置弹窗:参考面单补打页样式(紧凑高度 + 顶部圆角裁切 + 居中标题) */
.print-popup--settings {
height: 450rpx;
border-radius: 20px 20px 0 0;
overflow: hidden;
}
.print-popup-header {
display: flex;
flex-direction: column;
align-items: center;
padding: 32rpx 30rpx 24rpx;
border-bottom: 1rpx solid #f0f0f0;
flex-shrink: 0;
}
.print-popup-header .print-popup-title {
font-size: 38rpx;
font-weight: 600;
color: #333;
margin-bottom: 0;
}
.print-popup-scroll {
flex: 1;
padding: 48rpx 32rpx calc(40rpx + env(safe-area-inset-bottom));
padding: 32rpx 32rpx calc(40rpx + env(safe-area-inset-bottom));
box-sizing: border-box;
}
@ -5610,23 +5652,19 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue';
display: flex;
align-items: flex-start;
padding: 28rpx 0;
border-bottom: 1rpx solid #f2f3f5;
}
.print-row--station {
position: relative;
}
.print-row--station .print-label {
padding-top: 10rpx;
align-items: center;
}
.print-label {
min-width: 130rpx;
width: 130rpx;
font-size: 36rpx;
line-height: 40rpx;
color: #909399;
line-height: 36rpx;
color: #000000;
}
.print-value {

View File

@ -2,8 +2,12 @@
<view class="return-scan-panel">
<page-nav :title="navTitle">
<template #right>
<view class="nav-more-btn" @click="showMorePopup = true">
<u-icon name="more-dot-fill" size="40rpx" color="#303133"></u-icon>
<view
class="nav-input-btn"
:class="{ 'nav-input-btn--active': showScanInput }"
@click="toggleScanInput"
>
<text class="nav-input-btn__text">输入框</text>
</view>
</template>
</page-nav>
@ -35,19 +39,17 @@
<!-- 运单扫码输入区 -->
<view class="scan-section" v-show="showScanInput">
<view class="scan-input-wrap">
<u-input
v-model="scanInput"
placeholder="扫描/输入快递单号"
border="surround"
:customStyle="{ flex: 1 }"
:focus="scanFocused"
@confirm="handleScanConfirm"
></u-input>
<view class="scan-camera-btn" @click="handleCameraScan">
<u-icon name="camera" size="22" color="#2979ff"></u-icon>
</view>
</view>
<SearchBar
v-model="scanInput"
placeholder="扫描/输入快递单号"
:show-search="true"
scan-icon="scan"
:focus="scanFocused"
:input-font-size="'34rpx'"
:search-text-font-size="'34rpx'"
@search="handleScanConfirm"
@scan="handleCameraScan"
></SearchBar>
</view>
<!-- 登记结果展示 -->
@ -82,17 +84,20 @@
<view class="record-section">
<view class="record-section__head">
<view class="record-section__head-left">
<view class="record-section__title-bar"></view>
<text class="record-section__title">扫描记录</text>
<text class="record-section__count">共 {{ recordTotal }} 条</text>
</view>
<text v-if="recordFilterHint" class="record-section__hint">接口未按任务过滤,已前端筛选</text>
<view class="record-section__btn" @click="handleExport">
<text class="record-section__btn-text">导出</text>
</view>
<view class="record-section__btn record-section__btn--refresh" @click="handleRefreshRecords">
<text class="record-section__btn-text">刷新</text>
<view class="record-section__head-actions">
<view class="record-section__btn" @click="handleExport">
<text class="record-section__btn-text">导出</text>
</view>
<view class="record-section__btn record-section__btn--refresh" @click="handleRefreshRecords">
<text class="record-section__btn-text">刷新</text>
</view>
</view>
</view>
<text v-if="recordFilterHint" class="record-section__hint">接口未按任务过滤,已前端筛选</text>
<scroll-view
class="record-scroll"
scroll-y
@ -117,11 +122,9 @@
:class="item.isOriginal ? 'record-item__tag--origin' : 'record-item__tag--other'"
>{{ item.tagText }}</text>
</view>
<view v-if="item.remark" class="record-item__remark">备注:{{ item.remark }}</view>
<view class="record-item__meta">
<view class="record-item__meta-left">
<text class="record-item__meta-item">{{ item.scannerName || '--' }}</text>
<text v-if="item.remark" class="record-item__remark">备注:{{ item.remark }}</text>
</view>
<text class="record-item__meta-item">{{ item.scannerName || '--' }}</text>
<text class="record-item__meta-item record-item__meta-item--time">{{ item.createdAt || '--' }}</text>
</view>
</view>
@ -133,31 +136,6 @@
</scroll-view>
</view>
<!-- 更多操作(style 中和 uView u-popup 根节点自带的 flex:1,否则会与记录列表平分高度) -->
<u-popup
:show="showMorePopup"
mode="bottom"
round="20"
:closeable="true"
:safeAreaInsetBottom="true"
style="flex: none"
@close="showMorePopup = false"
>
<view class="more-popup">
<view class="more-popup__header">
<text class="more-popup__title">更多操作</text>
</view>
<view class="more-popup__actions">
<view class="more-popup__btn" @click="handleMoreManualInput">
<text class="more-popup__btn-text">{{ showScanInput ? '关闭手动输入' : '打开手动输入' }}</text>
</view>
<view class="more-popup__btn" @click="handleMoreRefresh">
<text class="more-popup__btn-text">刷新扫描记录</text>
</view>
</view>
</view>
</u-popup>
<!-- 常用备注(localStorage 维护) -->
<u-popup
:show="showRemarkPopup"
@ -526,8 +504,6 @@ export default {
recordsRefreshing: false,
// 接口未按任务过滤(返回了其它任务的行)时为 true,仅用于提示
recordFilterHint: false,
// ===== 更多操作弹窗 =====
showMorePopup: false,
// ===== 常用备注(localStorage) =====
showRemarkPopup: false,
remarkDraft: '',
@ -693,7 +669,6 @@ export default {
});
} finally {
this.recordsLoading = false;
this.recordsRefreshing = false;
}
},
async handleLoadMore() {
@ -703,8 +678,13 @@ export default {
async handleRefreshRecords() {
if (this.recordsRefreshing) return;
this.recordsRefreshing = true;
// 真机原生 refresher 需先收到 true 再收到 false 才会收回,先让 true 刷新到原生
await this.$nextTick();
await this.loadRecords(1, false);
this.recordsRefreshing = false;
// 延迟关闭,避免 true/false 连续赋值被渲染层合并导致一直转圈
setTimeout(() => {
this.recordsRefreshing = false;
}, 300);
},
// ===== 常用备注(localStorage 维护) =====
/** 读取本地常用备注 */
@ -966,15 +946,6 @@ export default {
handleExportPopupClose() {
this.closeExportPopup();
},
// ===== 更多操作 =====
handleMoreManualInput() {
this.showMorePopup = false;
this.toggleScanInput();
},
handleMoreRefresh() {
this.showMorePopup = false;
this.handleRefreshRecords();
},
handleScanConfirm(value) {
const code = value || this.scanInput;
if (!code) return;
@ -1269,19 +1240,30 @@ export default {
flex-shrink: 0;
}
/* ===== 导航栏(标题居中,右侧更多按钮自适应宽度) ===== */
/* ===== 导航栏(标题居中,右侧输入框按钮自适应宽度) ===== */
::v-deep .nav-title .right {
width: auto;
min-width: 80rpx;
}
/* ===== 右上角更多 ===== */
.nav-more-btn {
/* ===== 右上角输入框 ===== */
.nav-input-btn {
display: flex;
align-items: center;
justify-content: center;
width: 72rpx;
height: 72rpx;
padding: 12rpx 28rpx;
border-radius: 8rpx;
background: #2979ff;
&--active {
background: #fa8c16;
}
.nav-input-btn__text {
font-size: 36rpx;
color: #ffffff;
line-height: 1;
}
}
/* ===== 常用备注抽屉 ===== */
@ -1298,7 +1280,7 @@ export default {
.remark-popup__title {
font-size: 38rpx;
font-weight: 600;
font-weight: bold;
color: #303133;
}
}
@ -1412,52 +1394,6 @@ export default {
}
}
/* ===== 更多操作弹窗 ===== */
.more-popup {
padding: 32rpx 32rpx 40rpx;
.more-popup__header {
display: flex;
align-items: center;
justify-content: center;
.more-popup__title {
font-size: 38rpx;
font-weight: 600;
color: #303133;
}
}
.more-popup__actions {
margin-top: 32rpx;
display: flex;
flex-direction: column;
.more-popup__btn {
height: 96rpx;
display: flex;
align-items: center;
justify-content: center;
background: #f0f7ff;
border: 1rpx solid #b3d8ff;
border-radius: 16rpx;
&:active {
opacity: 0.85;
}
& + .more-popup__btn {
margin-top: 20rpx;
}
.more-popup__btn-text {
font-size: 32rpx;
color: #2979ff;
}
}
}
}
/* ===== 导出弹窗 ===== */
.export-popup {
display: flex;
@ -1473,7 +1409,7 @@ export default {
.export-popup__title {
font-size: 38rpx;
font-weight: 600;
font-weight: bold;
color: #303133;
}
}
@ -1493,7 +1429,7 @@ export default {
.export-popup__percent {
font-size: 36rpx;
font-weight: 600;
font-weight: bold;
color: #2979ff;
}
}
@ -1598,7 +1534,7 @@ export default {
/* ===== 当前收件任务 ===== */
.task-banner {
margin: 16rpx 24rpx 0;
margin: 16rpx 16rpx 0;
padding: 16rpx 24rpx;
background: #fff7e6;
border: 1rpx solid #ffd591;
@ -1616,7 +1552,7 @@ export default {
.task-banner__label {
width: 140rpx;
flex-shrink: 0;
font-size: 28rpx;
font-size: 32rpx;
color: #ad6800;
}
@ -1625,7 +1561,7 @@ export default {
min-width: 0;
font-size: 36rpx;
color: #000;
font-weight: 600;
font-weight: bold;
/* 编号/任务名过长时完整显示,可换行 */
word-break: break-all;
overflow-wrap: break-word;
@ -1678,30 +1614,13 @@ export default {
.scan-section {
padding: 20rpx 24rpx;
background: #fff;
margin: 16rpx 0;
.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;
}
}
margin: 16rpx 16rpx;
}
/* ===== 信息展示列表 ===== */
.info-list {
background: #fff;
margin: 0 24rpx 16rpx;
margin: 0 16rpx 16rpx;
border-radius: 12rpx;
overflow: hidden;
@ -1775,7 +1694,7 @@ export default {
/* ===== 加急提示 ===== */
.urgent-tip {
margin: 0 24rpx 16rpx;
margin: 0 16rpx 16rpx;
padding: 24rpx 24rpx;
display: flex;
align-items: center;
@ -1794,7 +1713,7 @@ export default {
/* ===== 30日幂等提示 ===== */
.duplicated-tip {
margin: 0 24rpx 16rpx;
margin: 0 16rpx 16rpx;
padding: 20rpx 24rpx;
display: flex;
align-items: center;
@ -1816,7 +1735,7 @@ export default {
min-height: 0;
display: flex;
flex-direction: column;
margin: 16rpx 24rpx 12rpx;
margin: 16rpx 16rpx 12rpx;
background: #ffffff;
border-radius: 12rpx;
overflow: hidden;
@ -1825,18 +1744,26 @@ export default {
flex-shrink: 0;
display: flex;
align-items: center;
padding: 16rpx 20rpx;
padding: 16rpx 24rpx;
border-bottom: 1rpx solid #f0f0f0;
.record-section__head-left {
flex-shrink: 0;
display: flex;
align-items: baseline;
align-items: center;
.record-section__title-bar {
width: 8rpx;
height: 32rpx;
margin-right: 12rpx;
background: #2979ff;
border-radius: 4rpx;
}
}
.record-section__title {
font-size: 36rpx;
font-weight: 600;
font-weight: bold;
color: #303133;
}
@ -1846,14 +1773,11 @@ export default {
color: #909399;
}
.record-section__hint {
flex: 1;
min-width: 0;
margin-left: 12rpx;
font-size: 28rpx;
color: #fa8c16;
word-break: break-all;
overflow-wrap: break-word;
.record-section__head-actions {
margin-left: auto;
flex-shrink: 0;
display: flex;
align-items: center;
}
.record-section__btn {
@ -1861,10 +1785,8 @@ export default {
display: flex;
align-items: center;
justify-content: center;
margin-left: auto;
width: 130rpx;
height: 60rpx;
padding: 0;
padding: 0 28rpx;
background: #2979ff;
border-radius: 8rpx;
@ -1873,16 +1795,26 @@ export default {
}
.record-section__btn-text {
font-size: 32rpx;
font-size: 36rpx;
color: #ffffff;
white-space: nowrap;
}
}
}
.record-section__hint {
display: block;
padding: 10rpx 24rpx 0;
font-size: 28rpx;
color: #fa8c16;
word-break: break-all;
overflow-wrap: break-word;
}
.record-scroll {
flex: 1;
min-height: 0;
background: #f5f7fa;
}
.record-empty {
@ -1892,25 +1824,23 @@ export default {
justify-content: center;
.record-empty__text {
font-size: 28rpx;
font-size: 32rpx;
color: #c0c4cc;
}
}
.record-list {
padding: 0;
padding: 12rpx 0;
.record-item {
padding: 16rpx 20rpx;
border-bottom: 1rpx solid #f5f6f8;
/* 斑马纹:偶数行浅灰背景 */
&:nth-child(even) {
background: #f5f7fa;
}
padding: 20rpx 24rpx;
margin-bottom: 12rpx;
background: #ffffff;
border: 1rpx solid #ebeef5;
border-radius: 12rpx;
&:last-child {
border-bottom: none;
margin-bottom: 0;
}
.record-item__head {
@ -1921,7 +1851,6 @@ export default {
flex: 1;
min-width: 0;
font-size: 36rpx;
font-weight: 600;
color: #000;
/* 单号完整显示,可换行 */
word-break: break-all;
@ -1954,19 +1883,11 @@ export default {
}
.record-item__meta {
margin-top: 6rpx;
margin-top: 8rpx;
display: flex;
align-items: flex-start;
align-items: center;
justify-content: space-between;
/* 左:姓名 + 备注(备注完整显示,可换行) 右:时间 */
.record-item__meta-left {
flex: 1;
min-width: 0;
display: flex;
align-items: flex-start;
}
.record-item__meta-item {
flex-shrink: 0;
font-size: 28rpx;
@ -1976,17 +1897,16 @@ export default {
.record-item__meta-item--time {
margin-left: 12rpx;
}
}
.record-item__remark {
flex: 1;
min-width: 0;
margin-left: 12rpx;
font-size: 32rpx;
color: #606266;
/* 备注完整显示,可换行 */
word-break: break-all;
overflow-wrap: break-word;
}
.record-item__remark {
display: block;
margin-top: 8rpx;
font-size: 36rpx;
color: #000000;
/* 备注完整显示,可换行 */
word-break: break-all;
overflow-wrap: break-word;
}
}
}

View File

@ -134,6 +134,27 @@
</view>
</view>
</u-popup>
<!-- 删除收件任务确认弹窗(参考完成盘点弹窗样式) -->
<u-popup
:show="showDeletePopup"
mode="center"
:closeable="true"
:closeOnClickOverlay="false"
round="20"
@close="closeDeletePopup"
>
<view class="delete-confirm-popup">
<view class="delete-confirm-popup__title">删除收件任务</view>
<view class="delete-confirm-popup__body">
<text class="delete-confirm-popup__text">确认删除「{{ (deletingTask && (deletingTask.title || deletingTask.batchNo || deletingTask.id)) || '--' }}」?删除后不可恢复</text>
</view>
<view class="delete-confirm-popup__actions">
<view class="delete-confirm-popup__btn delete-confirm-popup__btn--cancel" @click="closeDeletePopup">取消</view>
<view class="delete-confirm-popup__btn delete-confirm-popup__btn--confirm" @click="confirmDeleteTask">删除</view>
</view>
</view>
</u-popup>
</view>
</template>
@ -172,7 +193,10 @@ export default {
// 新建任务
showCreatePopup: false,
createTitle: '',
creating: false
creating: false,
// 删除任务
showDeletePopup: false,
deletingTask: null
};
},
computed: {
@ -249,7 +273,6 @@ export default {
uni.showToast({ title: '查询收件任务失败', icon: 'none' });
} finally {
this.loading = false;
this.refreshing = false;
}
},
handleSearch() {
@ -266,8 +289,13 @@ export default {
async handleRefresh() {
if (this.refreshing) return;
this.refreshing = true;
// 真机原生 refresher 需先收到 true 再收到 false 才会收回,先让 true 刷新到原生
await this.$nextTick();
await this.loadTaskList(this.currentPage);
this.refreshing = false;
// 延迟关闭,避免 true/false 连续赋值被渲染层合并导致一直转圈
setTimeout(() => {
this.refreshing = false;
}, 300);
},
// ===== 进入扫码登记 =====
handleTaskOpen(item) {
@ -293,15 +321,19 @@ export default {
}
return;
}
uni.showModal({
title: '删除收件任务',
content: `确认删除「${item.title || item.batchNo || item.id}」?删除后不可恢复`,
success: (modalRes) => {
if (modalRes.confirm) {
this.removeTask(item);
}
}
});
this.deletingTask = item;
this.showDeletePopup = true;
},
closeDeletePopup() {
this.showDeletePopup = false;
this.deletingTask = null;
},
confirmDeleteTask() {
const item = this.deletingTask;
this.closeDeletePopup();
if (item) {
this.removeTask(item);
}
},
async removeTask(item) {
uni.showLoading({ title: '删除中...', mask: true });
@ -383,17 +415,21 @@ export default {
}
.nav-create {
position: absolute;
top: 50%;
right: 20rpx;
transform: translateY(-50%);
display: flex;
align-items: center;
justify-content: center;
width: 130rpx;
height: 60rpx;
padding: 14rpx 28rpx;
background: #2979ff;
border-radius: 8rpx;
.nav-create-text {
font-size: 32rpx;
font-size: 36rpx;
color: #ffffff;
line-height: 1;
white-space: nowrap;
}
}
@ -415,35 +451,45 @@ export default {
align-items: center;
.task-scope__item {
flex: 1;
height: 56rpx;
padding: 0 12rpx;
display: flex;
align-items: center;
justify-content: center;
padding: 8rpx 32rpx;
margin-right: 16rpx;
background: #f5f7fa;
border: 1rpx solid #e6e8eb;
border-radius: 30rpx;
border: 1rpx solid #ebeef5;
border-radius: 28rpx;
& + .task-scope__item {
margin-left: 16rpx;
}
&--active {
background: #e6f0ff;
background: #2979ff;
border-color: #2979ff;
box-shadow: 0 4rpx 12rpx rgba(41, 121, 255, 0.28);
}
.task-scope__text {
font-size: 28rpx;
font-size: 34rpx;
color: #606266;
white-space: nowrap;
}
&--active .task-scope__text {
color: #2979ff;
font-weight: 600;
color: #ffffff;
font-weight: bold;
}
}
.task-scope__hint {
flex: 1;
text-align: right;
font-size: 24rpx;
flex: 2;
display: flex;
align-items: center;
justify-content: flex-end;
margin-left: 16rpx;
font-size: 30rpx;
color: #c0c4cc;
}
}
@ -479,17 +525,15 @@ export default {
}
.task-list {
padding: 0 12rpx;
padding: 0 16rpx;
box-sizing: border-box;
/* 左滑时内容被容器裁剪到卡片左边缘(文字贴死左边):给滑动容器留一点左间距 */
::v-deep .u-swipe-action-item {
margin-left: 12rpx;
margin-bottom: 12rpx;
}
}
.task-card {
margin-bottom: 12rpx;
padding: 20rpx 24rpx;
background: #ffffff;
border: 2rpx solid #ebedf2;
@ -505,17 +549,15 @@ export default {
min-width: 0;
margin-right: 16rpx;
font-size: 38rpx;
font-weight: 600;
font-weight: bold;
color: #000;
/* 编号过长时单行省略,避免挤掉右侧登记数 */
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
/* 编号过长时换行显示,避免挤掉右侧登记数 */
word-break: break-all;
}
.task-card__count {
flex-shrink: 0;
font-size: 34rpx;
font-size: 36rpx;
color: #ffffff;
background: #52c41a;
border-radius: 24rpx;
@ -535,7 +577,7 @@ export default {
.task-card__title {
flex: 1;
font-size: 32rpx;
font-size: 36rpx;
color: #303133;
overflow: hidden;
text-overflow: ellipsis;
@ -561,7 +603,7 @@ export default {
justify-content: space-between;
.task-card__meta-item {
font-size: 26rpx;
font-size: 30rpx;
color: #909399;
}
}
@ -590,7 +632,7 @@ export default {
.create-popup__title {
font-size: 38rpx;
font-weight: 600;
font-weight: bold;
color: #303133;
}
}
@ -650,5 +692,67 @@ export default {
}
}
}
/* ===== 删除任务确认弹窗(参考完成盘点弹窗样式) ===== */
.delete-confirm-popup {
width: 640rpx;
padding: 40rpx 32rpx 32rpx;
background: #ffffff;
border-radius: 20rpx;
box-sizing: border-box;
}
.delete-confirm-popup__title {
font-size: 42rpx;
font-weight: bold;
color: #303133;
text-align: center;
margin-bottom: 32rpx;
}
.delete-confirm-popup__body {
margin-bottom: 36rpx;
padding: 24rpx;
background: #f5f7fa;
border-radius: 12rpx;
}
.delete-confirm-popup__text {
font-size: 36rpx;
color: #303133;
line-height: 1.6;
word-break: break-all;
}
.delete-confirm-popup__actions {
display: flex;
align-items: center;
}
.delete-confirm-popup__btn {
flex: 1;
height: 88rpx;
border-radius: 12rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 36rpx;
font-weight: bold;
}
.delete-confirm-popup__btn + .delete-confirm-popup__btn {
margin-left: 20rpx;
}
.delete-confirm-popup__btn--cancel {
background: #f5f7fa;
color: #606266;
border: 1rpx solid #dcdfe6;
}
.delete-confirm-popup__btn--confirm {
background: #f56c6c;
color: #ffffff;
}
}
</style>