订单入库: 区域/产月选择器做成「选择框」(加边框与 ▾)
开发者:「区域这块要做得像一个选择框,当前还以为是纯文字」。.rate-pick 此前无边框/背景(与旁边实收 .r2-field 的灰底框不一致)⇒ 补 边框+圆角+灰底+width:100%,并在 区域/产月 后加 ▾ 箭头。
This commit is contained in:
@@ -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 || '产月'}} ▾");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user