From 65a6fdce20b59a6a5209fb0553dda8f7eaac431c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=A8=E5=A4=A9?= Date: Fri, 16 Oct 2026 17:43:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=85=A5=E5=BA=93:=20?= =?UTF-8?q?=E5=8C=BA=E5=9F=9F/=E4=BA=A7=E6=9C=88=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=99=A8=E5=81=9A=E6=88=90=E3=80=8C=E9=80=89=E6=8B=A9=E6=A1=86?= =?UTF-8?q?=E3=80=8D=EF=BC=88=E5=8A=A0=E8=BE=B9=E6=A1=86=E4=B8=8E=20?= =?UTF-8?q?=E2=96=BE=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 开发者:「区域这块要做得像一个选择框,当前还以为是纯文字」。.rate-pick 此前无边框/背景(与旁边实收 .r2-field 的灰底框不一致)⇒ 补 边框+圆角+灰底+width:100%,并在 区域/产月 后加 ▾ 箭头。 --- miniprogram/components/inspection-panel/index.wxml | 4 ++-- miniprogram/components/inspection-panel/index.wxss | 9 ++++++++- src/utils/inspectionInboundFields.contract.test.ts | 9 +++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/miniprogram/components/inspection-panel/index.wxml b/miniprogram/components/inspection-panel/index.wxml index 8c41ebb..d2c2e59 100644 --- a/miniprogram/components/inspection-panel/index.wxml +++ b/miniprogram/components/inspection-panel/index.wxml @@ -64,7 +64,7 @@ data-id="{{item.id}}" bindchange="onProductionMonthChange" > - {{item.production_month || '产月'}} + {{item.production_month || '产月'}} ▾ - {{item.storage_zone || '区域'}} + {{item.storage_zone || '区域'}} ▾ diff --git a/miniprogram/components/inspection-panel/index.wxss b/miniprogram/components/inspection-panel/index.wxss index 0080252..94bc427 100644 --- a/miniprogram/components/inspection-panel/index.wxss +++ b/miniprogram/components/inspection-panel/index.wxss @@ -506,10 +506,17 @@ text-align: center; } +/* 选择框观感(2026-10-16:此前无边框,被误认成纯文字)*/ .rate-pick { + display: block; + box-sizing: border-box; + width: 100%; height: 56rpx; line-height: 56rpx; - padding: 0 12rpx; + padding: 0 16rpx; + border: 1rpx solid #e4e4e7; + border-radius: 12rpx; + background: #f4f4f5; text-align: center; font-size: 24rpx; font-weight: 600; diff --git a/src/utils/inspectionInboundFields.contract.test.ts b/src/utils/inspectionInboundFields.contract.test.ts index 3c580ac..dfd7784 100644 --- a/src/utils/inspectionInboundFields.contract.test.ts +++ b/src/utils/inspectionInboundFields.contract.test.ts @@ -11,6 +11,7 @@ import { describe, expect, it } from 'vitest'; const read = (rel: string) => readFileSync(new URL(rel, import.meta.url), 'utf8'); const wxml = read('../../miniprogram/components/inspection-panel/index.wxml'); +const wxss = read('../../miniprogram/components/inspection-panel/index.wxss'); const js = read('../../miniprogram/components/inspection-panel/index.js'); const svc = read('../../server/src/services/inspectionComplianceService.ts'); const route = read('../../server/src/routes/mobile/mobileWarehouseRoutes.ts'); @@ -86,3 +87,11 @@ describe('提交:保质期 + 档案回写(只写人工改过的)', () => { expect(route).toContain("COALESCE(s.spec, '') AS spec"); }); }); + +describe('可选控件呈「选择框」观感', () => { + it('区域/产月选择器有边框与 ▾(不再像纯文字)', () => { + expect(wxss).toMatch(/\.rate-pick\s*\{[^}]*border:\s*1rpx solid/); + expect(wxml).toContain("{{item.storage_zone || '区域'}} ▾"); + expect(wxml).toContain("{{item.production_month || '产月'}} ▾"); + }); +});