订单入库: 区域/产月选择器做成「选择框」(加边框与 ▾)
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

开发者:「区域这块要做得像一个选择框,当前还以为是纯文字」。.rate-pick 此前无边框/背景(与旁边实收 .r2-field 的灰底框不一致)⇒ 补 边框+圆角+灰底+width:100%,并在 区域/产月 后加 ▾ 箭头。
This commit is contained in:
雨天
2026-10-16 17:43:12 +08:00
parent de9be9e398
commit 65a6fdce20
3 changed files with 19 additions and 3 deletions
@@ -64,7 +64,7 @@
data-id="{{item.id}}"
bindchange="onProductionMonthChange"
>
<view class="rate-pick">{{item.production_month || '产月'}}</view>
<view class="rate-pick">{{item.production_month || '产月'}} ▾</view>
</picker>
<picker
class="r2-picker"
@@ -74,7 +74,7 @@
data-id="{{item.id}}"
bindchange="onZoneChange"
>
<view class="rate-pick {{item.storage_zone ? '' : 'is-empty'}}">{{item.storage_zone || '区域'}}</view>
<view class="rate-pick {{item.storage_zone ? '' : 'is-empty'}}">{{item.storage_zone || '区域'}} ▾</view>
</picker>
</view>
<view class="card-r3">
@@ -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;
@@ -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 || '产月'}} ▾");
});
});