95 lines
4.0 KiB
Plaintext
95 lines
4.0 KiB
Plaintext
<scroll-view class="page safe-bottom" scroll-y type="list">
|
|
<view class="header">
|
|
<text class="title">清洗报工</text>
|
|
<text class="subtitle">添加本次清洗产品,只填写清洗数量,不计算工时</text>
|
|
</view>
|
|
|
|
<view class="card">
|
|
<view class="row">
|
|
<view class="row-left">
|
|
<text class="label">已添加清洗产品</text>
|
|
<text class="value">{{items.length}} 项</text>
|
|
<text wx:if="{{attendancePointName}}" class="subtitle">考勤点 {{attendancePointName}}</text>
|
|
</view>
|
|
<text class="pill primary">清洗</text>
|
|
</view>
|
|
</view>
|
|
|
|
<view wx:if="{{!items.length}}" class="list-empty">暂无清洗产品</view>
|
|
<view wx:for="{{items}}" wx:key="displayName" wx:for-index="index" class="card cleaning-card">
|
|
<view class="row">
|
|
<view class="row-left">
|
|
<text class="value">{{item.displayName || item.moldName}}</text>
|
|
<text wx:if="{{item.attendancePointName}}" class="subtitle">考勤点 {{item.attendancePointName}}</text>
|
|
<text class="subtitle">工序 {{item.processName}} · 冲压方式 {{item.stampingMethod || '-'}}</text>
|
|
</view>
|
|
<text class="pill success">已添加</text>
|
|
</view>
|
|
<view wx:if="{{filling}}" class="form-item">
|
|
<text class="label">清洗设备号</text>
|
|
<view
|
|
wx:if="{{equipmentOptions.length}}"
|
|
class="picker multi-device-picker {{item.deviceNo ? '' : 'field-error'}}"
|
|
data-index="{{index}}"
|
|
bindtap="openDeviceSelector"
|
|
>
|
|
{{item.deviceNo || '请选择清洗设备号(可多选)'}}
|
|
</view>
|
|
<view wx:else class="readonly">暂无清洗设备,请先在设备管理中维护</view>
|
|
</view>
|
|
<view wx:if="{{filling}}" class="form-item">
|
|
<text class="label">清洗数量</text>
|
|
<input
|
|
class="input number-input"
|
|
type="digit"
|
|
value="{{item.quantity}}"
|
|
placeholder="请输入清洗数量"
|
|
data-index="{{index}}"
|
|
bindinput="onQuantityInput"
|
|
/>
|
|
</view>
|
|
</view>
|
|
|
|
<view wx:if="{{!filling}}" class="cleaning-actions">
|
|
<button class="btn primary full" bindtap="startFill">开始报工</button>
|
|
<button class="btn secondary full" bindtap="continueAdd">继续添加清洗产品</button>
|
|
<button class="btn danger full" bindtap="abandon">放弃报工</button>
|
|
</view>
|
|
|
|
<view wx:else class="cleaning-actions">
|
|
<button class="btn secondary full" bindtap="continueAdd">继续添加清洗产品</button>
|
|
<button class="btn primary full" disabled="{{submitting}}" bindtap="submit">{{submitting ? '提交中' : '提交清洗报工'}}</button>
|
|
<button class="btn danger full" bindtap="abandon">放弃报工</button>
|
|
</view>
|
|
|
|
<view wx:if="{{deviceModalVisible}}" class="modal-mask" catchtap="closeDeviceSelector">
|
|
<view class="modal-panel device-modal-panel" catchtap="noop">
|
|
<view class="device-modal-head">
|
|
<view>
|
|
<text class="device-modal-title">选择清洗设备</text>
|
|
<text class="subtitle">已选择 {{pendingDeviceNos.length}} 台</text>
|
|
</view>
|
|
</view>
|
|
<checkbox-group bindchange="onDeviceSelectionChange">
|
|
<scroll-view class="device-option-list" scroll-y>
|
|
<label
|
|
wx:for="{{deviceSelectOptions}}"
|
|
wx:key="deviceNo"
|
|
class="device-option {{item.checked ? 'checked' : ''}}"
|
|
>
|
|
<checkbox value="{{item.deviceNo}}" checked="{{item.checked}}" />
|
|
<view class="device-option-text">
|
|
<text class="device-option-title">{{item.deviceNo}}</text>
|
|
<text wx:if="{{item.remark}}" class="device-option-subtitle">{{item.remark}}</text>
|
|
</view>
|
|
</label>
|
|
</scroll-view>
|
|
</checkbox-group>
|
|
<view class="device-modal-actions">
|
|
<button class="btn secondary full" bindtap="closeDeviceSelector">取消</button>
|
|
<button class="btn primary full" bindtap="confirmDeviceSelection">确定</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|