Files
SupplierSystem/miniprogram/components/picking-panel/index.wxss
T
雨天 01e9fb94cb
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s
feat(分拣): 标签打印改走蓝牙直连与浏览器打印
不再走 print_jobs → 安卓称重终端链路。小程序分拣面板每行恢复「打印」按钮,改为 BLE 热敏直连(复用 utils/printHistory,thermalPrint 新增 label 模式);Web 明细弹层每行加「打印标签」,走浏览器打印通道(复用 printHtmlViaHiddenIframe),打到 58/80mm 热敏或小票机。

标签字段沿用旧秤端:商品名/数量/单位/订单号/客户/日期/条码。旧链路与 PICKING_SCALE_TERMINAL_ENABLED 隐藏态不动;无后端改动、无迁移。
2026-10-13 18:29:36 +08:00

1005 lines
15 KiB
Plaintext

.pick-page {
position: relative;
box-sizing: border-box;
min-height: 100vh;
padding-bottom: calc(16rpx + env(safe-area-inset-bottom));
background: #fafafa;
overflow: hidden;
}
.page-atmosphere {
position: absolute;
left: 0;
right: 0;
top: 0;
height: 160rpx;
pointer-events: none;
z-index: 0;
background: linear-gradient(180deg, #d1fae5 0%, rgba(250, 250, 250, 0) 100%);
}
.kpi-card,
.list-sheet {
position: relative;
z-index: 1;
}
.date-axis {
display: flex;
flex-wrap: nowrap;
align-items: center;
gap: 12rpx;
padding: 0 0 16rpx;
}
.date-chip {
padding: 10rpx 20rpx;
border-radius: 999rpx;
font-size: 22rpx;
font-weight: 600;
color: #475569;
background: #f1f5f9;
flex-shrink: 0;
}
.date-axis .axis-pick {
background: #ecfdf5;
color: #047857;
}
.date-axis .date-pick {
padding: 10rpx 12rpx;
font-size: 22rpx;
}
.date-chip.on {
background: #059669;
color: #fff;
}
.kpi-card {
margin: 16rpx 24rpx 0;
background: #047857;
border-radius: 24rpx;
padding: 24rpx 16rpx;
display: flex;
align-items: center;
color: #fff;
}
.kpi-cell {
flex: 1;
text-align: center;
}
.kpi-num {
font-size: 40rpx;
font-weight: 700;
font-variant-numeric: tabular-nums;
line-height: 1.1;
}
.kpi-label {
margin-top: 6rpx;
font-size: 22rpx;
opacity: 0.9;
}
.kpi-divider {
width: 1px;
height: 48rpx;
background: rgba(255, 255, 255, 0.25);
}
.list-sheet {
margin: 16rpx 24rpx 0;
padding: 16rpx 16rpx 8rpx;
background: #fff;
border: 1px solid #e4e4e7;
border-radius: 24rpx 24rpx 0 0;
}
.panel-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12rpx;
margin-bottom: 8rpx;
}
.section-title {
font-size: 30rpx;
font-weight: 700;
color: #0a0a0b;
}
.refresh-btn {
flex-shrink: 0;
font-size: 24rpx;
font-weight: 600;
color: #047857;
}
.flow-tip {
margin-bottom: 8rpx;
font-size: 22rpx;
color: #047857;
line-height: 1.4;
}
.error-box {
margin-bottom: 8rpx;
padding: 10rpx 12rpx;
border-radius: 12rpx;
background: #fef2f2;
color: #ef4444;
font-size: 24rpx;
}
.state-box {
padding: 32rpx 16rpx;
display: flex;
justify-content: center;
}
.scope-wrap {
position: relative;
z-index: 8;
margin: 8rpx 0 12rpx;
}
.scope-select {
display: flex;
align-items: center;
gap: 12rpx;
padding: 16rpx 20rpx;
border-radius: 16rpx;
background: #f4f4f5;
border: 1px solid #e4e4e7;
}
.scope-select.is-open {
border-color: #059669;
background: #ecfdf5;
}
.scope-select-val {
flex: 1;
min-width: 0;
font-size: 30rpx;
font-weight: 700;
color: #0a0a0b;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.scope-select-arrow {
flex-shrink: 0;
font-size: 24rpx;
color: #71717a;
}
.scope-select.is-open .scope-select-arrow {
transform: rotate(180deg);
}
.scope-menu {
position: absolute;
left: 0;
right: 0;
top: calc(100% + 8rpx);
max-height: 480rpx;
overflow-y: auto;
background: #fff;
border: 1px solid #e4e4e7;
border-radius: 16rpx;
box-shadow: 0 12rpx 32rpx rgba(15, 23, 42, 0.12);
}
.scope-option {
padding: 22rpx 20rpx;
font-size: 28rpx;
font-weight: 600;
color: #0a0a0b;
border-bottom: 1rpx solid #f4f4f5;
}
.scope-option:last-child {
border-bottom: none;
}
.scope-option.is-active {
background: #ecfdf5;
color: #047857;
}
.sku-block {
margin-bottom: 8rpx;
}
.sku-block-title {
padding: 12rpx 4rpx 4rpx;
font-size: 30rpx;
font-weight: 700;
color: #0a0a0b;
}
.sku-block .line-name {
flex: 1.4;
}
.today-day-head {
margin: 8rpx 4rpx 0;
padding: 8rpx 4rpx 4rpx;
font-size: 22rpx;
font-weight: 700;
color: #047857;
}
.line-one {
display: flex;
align-items: center;
gap: 10rpx;
min-width: 0;
flex-wrap: wrap;
}
.line-product {
flex: 1;
min-width: 88rpx;
font-size: 28rpx;
font-weight: 700;
color: #0a0a0b;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.line-name {
flex: 1.2;
min-width: 0;
font-size: 24rpx;
font-weight: 600;
color: #52525b;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.task-tabs {
white-space: nowrap;
margin: 4rpx 0 8rpx;
}
.task-tab {
display: inline-flex;
align-items: center;
gap: 8rpx;
margin-right: 10rpx;
padding: 10rpx 16rpx;
border-radius: 8rpx;
background: #fafafa;
border: 1px solid #e4e4e7;
vertical-align: middle;
max-width: 520rpx;
}
.task-tab.active {
background: #ecfdf5;
border-color: #059669;
}
.tab-code {
font-size: 24rpx;
font-weight: 700;
color: #0a0a0b;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 360rpx;
}
.work-meta {
display: flex;
align-items: baseline;
gap: 12rpx;
margin: 0 0 10rpx;
min-width: 0;
}
.work-company {
font-size: 28rpx;
font-weight: 700;
color: #0a0a0b;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.work-orders {
flex-shrink: 0;
font-size: 22rpx;
color: #71717a;
}
.status-chip {
flex-shrink: 0;
padding: 2rpx 10rpx;
border-radius: 4rpx;
font-size: 20rpx;
font-weight: 600;
}
.status-chip--pending {
background: #fffbeb;
color: #b45309;
}
.status-chip--outbound {
background: #eff6ff;
color: #1d4ed8;
}
.status-chip--done {
background: #ecfdf5;
color: #047857;
}
.work-meta {
display: flex;
gap: 12rpx;
margin-bottom: 8rpx;
font-size: 22rpx;
color: #71717a;
}
.work-meta text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.progress-line {
display: flex;
align-items: center;
gap: 10rpx;
margin-bottom: 10rpx;
font-size: 22rpx;
color: #52525b;
font-weight: 600;
}
.progress-bar {
position: relative;
flex: 1;
min-width: 0;
height: 8rpx;
border-radius: 999rpx;
background: #e4e4e7;
overflow: hidden;
}
.progress-fill {
position: absolute;
left: 0;
top: 0;
height: 100%;
border-radius: 999rpx;
background: #059669;
}
.items-meta {
flex-shrink: 0;
font-size: 22rpx;
color: #a1a1aa;
font-weight: 500;
}
.mode-row {
display: flex;
align-items: center;
gap: 8rpx;
margin-bottom: 8rpx;
}
.mode-chip {
flex: 1;
box-sizing: border-box;
height: 56rpx;
line-height: 52rpx;
text-align: center;
border-radius: 8rpx;
font-size: 24rpx;
font-weight: 600;
color: #52525b;
background: #fff;
border: 2rpx solid #e4e4e7;
}
.mode-chip.active {
background: #059669;
color: #fff;
border-color: #059669;
}
.mode-chip.disabled {
opacity: 0.4;
}
.btn-scan {
flex-shrink: 0;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
height: 56rpx;
padding: 0 18rpx;
border-radius: 8rpx;
background: #059669;
color: #fff;
font-size: 24rpx;
font-weight: 600;
}
.scan-tip {
margin-bottom: 8rpx;
font-size: 22rpx;
color: #059669;
}
.ok-banner {
margin-bottom: 8rpx;
font-size: 22rpx;
color: #047857;
}
.detail-row {
padding: 12rpx 0;
border-bottom: 1rpx solid #f1f5f9;
}
.detail-row.is-done {
opacity: 0.72;
}
.card-r1,
.card-r2 {
display: flex;
align-items: center;
gap: 8rpx;
min-width: 0;
}
.card-r2 {
margin-top: 8rpx;
flex-wrap: nowrap;
}
.detail-main {
flex: 1;
min-width: 0;
display: flex;
align-items: center;
gap: 8rpx;
}
.detail-name {
font-size: 32rpx;
font-weight: 700;
color: #0a0a0b;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
min-width: 0;
}
.step-badge {
flex-shrink: 0;
padding: 2rpx 10rpx;
border-radius: 999rpx;
font-size: 20rpx;
font-weight: 600;
}
.step-pick {
background: #fffbeb;
color: #b45309;
}
.step-stage {
background: #eff6ff;
color: #1d4ed8;
}
.step-done {
background: #ecfdf5;
color: #047857;
}
.qty-meta {
flex-shrink: 0;
font-size: 26rpx;
color: #71717a;
white-space: nowrap;
}
.unit-picker-wrap {
flex-shrink: 0;
}
.unit-picker {
box-sizing: border-box;
height: 48rpx;
line-height: 48rpx;
padding: 0 12rpx;
border-radius: 10rpx;
background: #f4f4f5;
font-size: 28rpx;
font-weight: 600;
white-space: nowrap;
}
.qty-chip {
flex: 1;
min-width: 108rpx;
height: 48rpx;
border-radius: 10rpx;
background: #f4f4f5;
overflow: hidden;
display: flex;
align-items: center;
}
.qty-chip--extra {
flex: 0.9;
min-width: 96rpx;
}
.qty-chip-lab {
flex-shrink: 0;
padding-left: 8rpx;
font-size: 22rpx;
font-weight: 600;
color: #71717a;
}
.qty-input {
flex: 1;
min-width: 0;
height: 48rpx;
padding: 0 8rpx 0 4rpx;
box-sizing: border-box;
font-size: 30rpx;
font-weight: 600;
font-variant-numeric: tabular-nums;
text-align: center;
}
.qty-input--warn {
color: #0369a1;
}
.btn-pick,
.btn-stage {
flex-shrink: 0;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
height: 48rpx;
padding: 0 16rpx;
border-radius: 999rpx;
font-size: 22rpx;
font-weight: 600;
}
.btn-pick {
background: #059669;
color: #fff;
}
.btn-print-row {
flex-shrink: 0;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
height: 48rpx;
padding: 0 16rpx;
border-radius: 999rpx;
font-size: 22rpx;
font-weight: 600;
color: #047857;
background: #fff;
border: 2rpx solid #059669;
}
.print-canvas {
position: fixed;
left: 0;
top: 0;
width: 10px;
height: 10px;
opacity: 0;
pointer-events: none;
z-index: -1;
}
.btn-stage {
background: #fff;
color: #059669;
border: 2rpx solid #059669;
}
.is-disabled {
opacity: 0.45;
pointer-events: none;
}
.stage-tag {
flex-shrink: 0;
font-size: 20rpx;
color: #047857;
font-weight: 600;
}
.pick-page.is-embedded {
min-height: 0;
background: transparent;
overflow: visible;
}
.bottom-bar-slot {
height: calc(148rpx + env(safe-area-inset-bottom));
flex-shrink: 0;
}
.bottom-bar-slot--embedded {
height: 148rpx;
}
.bottom-bar-slot--stack {
height: calc(248rpx + env(safe-area-inset-bottom));
}
.bottom-bar-slot--stack.bottom-bar-slot--embedded {
height: 248rpx;
}
.bottom-bar {
position: fixed;
left: 0;
right: 0;
bottom: 0;
padding: 16rpx 24rpx calc(16rpx + env(safe-area-inset-bottom));
background: rgba(255, 255, 255, 0.96);
border-top: 1px solid #e7efea;
box-sizing: border-box;
z-index: 99;
}
.bottom-bar--embedded {
bottom: calc(120rpx + env(safe-area-inset-bottom));
z-index: 99;
padding-bottom: 20rpx;
}
.bottom-bar--row {
display: flex;
flex-direction: row;
align-items: center;
gap: 16rpx;
}
.bottom-bar--row .bottom-main {
flex: 1;
width: auto;
}
/* 次要按钮(「一键确认」):不吸满,白底绿框,与主按钮并排 */
.bottom-bar--row .bottom-sub {
flex: 0 0 auto;
width: auto;
padding: 0 32rpx !important;
color: #047857;
background: #fff;
border: 2rpx solid #059669;
}
.bottom-print {
flex-shrink: 0;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
height: 88rpx;
padding: 0 36rpx;
border-radius: 20rpx;
font-size: 28rpx;
font-weight: 700;
color: #047857;
background: #fff;
border: 2rpx solid #059669;
}
.bottom-print--wide {
width: 100%;
}
.bottom-main,
.bottom-sub {
margin: 0;
width: 100%;
height: 88rpx !important;
line-height: 88rpx !important;
padding: 0 !important;
border-radius: 20rpx !important;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
font-weight: 700;
font-size: 28rpx;
}
.bottom-main {
background: linear-gradient(135deg, #047857 0%, #059669 100%) !important;
}
.bottom-main::after,
.bottom-sub::after {
border: none;
}
.btn-disabled {
opacity: 0.45;
}
.zone-head {
margin: 12rpx 0 2rpx;
padding: 6rpx 4rpx;
font-size: 22rpx;
font-weight: 700;
color: #047857;
}
.batch-line {
display: flex;
align-items: center;
gap: 8rpx;
margin-top: 8rpx;
min-width: 0;
}
.batch-lab {
flex-shrink: 0;
padding: 2rpx 10rpx;
border-radius: 6rpx;
font-size: 20rpx;
font-weight: 600;
color: #047857;
background: #ecfdf5;
}
.batch-sum {
flex: 1;
min-width: 0;
font-size: 22rpx;
color: #52525b;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.batch-muted {
flex: 1;
min-width: 0;
font-size: 22rpx;
color: #a1a1aa;
}
.batch-warn {
flex-shrink: 0;
font-size: 22rpx;
font-weight: 600;
color: #dc2626;
}
.btn-batch {
flex-shrink: 0;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
height: 44rpx;
padding: 0 18rpx;
border-radius: 999rpx;
font-size: 22rpx;
font-weight: 600;
color: #047857;
background: #fff;
border: 2rpx solid #059669;
}
.batch-mask {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(15, 23, 42, 0.45);
z-index: 200;
}
.batch-sheet {
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 201;
box-sizing: border-box;
padding: 24rpx 24rpx calc(24rpx + env(safe-area-inset-bottom));
background: #fff;
border-radius: 24rpx 24rpx 0 0;
box-shadow: 0 -12rpx 32rpx rgba(15, 23, 42, 0.16);
}
.batch-sheet-head {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 12rpx;
margin-bottom: 12rpx;
}
.batch-sheet-title {
flex: 1;
min-width: 0;
font-size: 30rpx;
font-weight: 700;
color: #0a0a0b;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.batch-sheet-sub {
flex-shrink: 0;
font-size: 22rpx;
color: #71717a;
}
.batch-sheet-body {
max-height: 640rpx;
overflow-y: auto;
}
.batch-row {
display: flex;
align-items: center;
gap: 12rpx;
padding: 14rpx 0;
border-bottom: 1rpx solid #f1f5f9;
}
.batch-row-info {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 4rpx;
}
.batch-row-no {
font-size: 26rpx;
font-weight: 700;
color: #0a0a0b;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.batch-row-meta {
font-size: 20rpx;
color: #71717a;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.batch-input {
flex-shrink: 0;
box-sizing: border-box;
width: 150rpx;
height: 56rpx;
padding: 0 12rpx;
border-radius: 10rpx;
background: #f4f4f5;
font-size: 28rpx;
font-weight: 600;
font-variant-numeric: tabular-nums;
text-align: center;
}
.batch-sheet-total {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12rpx;
margin-top: 16rpx;
font-size: 24rpx;
font-weight: 600;
color: #52525b;
}
.batch-sheet-foot {
display: flex;
gap: 16rpx;
margin-top: 20rpx;
}
.batch-btn {
flex: 1;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
height: 84rpx;
border-radius: 20rpx;
font-size: 28rpx;
font-weight: 700;
}
.batch-btn.ghost {
color: #047857;
background: #fff;
border: 2rpx solid #059669;
}
.batch-btn.primary {
color: #fff;
background: linear-gradient(135deg, #047857 0%, #059669 100%);
}
/* 商品行出库拍照(可选):紧跟前「调整」按钮的「拍照」小按钮 */
.btn-batch-photo {
color: #0369a1;
border-color: #0ea5e9;
}
/* 该商品行已拍的出库照(本地预览,可删) */
.row-photo-line {
display: flex;
flex-wrap: wrap;
gap: 12rpx;
margin-top: 10rpx;
padding-left: 8rpx;
}
.row-photo-item {
position: relative;
width: 88rpx;
height: 88rpx;
}
.row-photo-img {
width: 88rpx;
height: 88rpx;
border-radius: 10rpx;
}
.row-photo-del {
position: absolute;
top: -10rpx;
right: -10rpx;
width: 32rpx;
height: 32rpx;
line-height: 32rpx;
text-align: center;
border-radius: 50%;
background: rgba(0, 0, 0, 0.6);
color: #fff;
font-size: 22rpx;
}