| | |
| | | </view> |
| | | <view class="form-row"> |
| | | <text class="form-label">单位</text> |
| | | <up-input v-model="form.unit" disabled placeholder="请选择产品后自动带出" /> |
| | | <up-radio-group v-model="form.unit" class="unit-radio-group"> |
| | | <up-radio |
| | | v-for="opt in unitOptions" |
| | | :key="opt.value" |
| | | :label="opt.label" |
| | | :name="opt.value" |
| | | ></up-radio> |
| | | </up-radio-group> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | <up-input v-model="form.licensePlateNo" placeholder="请输入车牌号" /> |
| | | </view> |
| | | <view class="form-row"> |
| | | <text class="form-label required">毛重(吨)</text> |
| | | <text class="form-label required">毛重</text> |
| | | <up-input |
| | | v-model="form.grossWeight" |
| | | type="digit" |
| | |
| | | /> |
| | | </view> |
| | | <view class="form-row"> |
| | | <text class="form-label required">皮重(吨)</text> |
| | | <text class="form-label required">皮重</text> |
| | | <up-input |
| | | v-model="form.tareWeight" |
| | | type="digit" |
| | |
| | | /> |
| | | </view> |
| | | <view class="form-row"> |
| | | <text class="form-label">净重(吨)</text> |
| | | <text class="form-label">净重</text> |
| | | <up-input |
| | | v-model="form.netWeight" |
| | | type="digit" |
| | |
| | | productModelId: undefined, |
| | | productName: '', |
| | | productModelName: '', |
| | | unit: '', |
| | | unit: '吨', |
| | | productType: undefined, |
| | | parentName: '', |
| | | licensePlateNo: '', |
| | |
| | | qualitity: '', |
| | | remark: '' |
| | | }) |
| | | |
| | | const unitOptions = [ |
| | | { label: '吨', value: '吨' }, |
| | | { label: '公斤', value: '公斤' } |
| | | ] |
| | | |
| | | const normalizeUnit = (u) => { |
| | | if (!u) return '' |
| | | const s = String(u).trim() |
| | | if (s === '吨' || s === 't' || s === 'ton' || s === 'tonne') return '吨' |
| | | if ( |
| | | s === '公斤' || |
| | | s === 'kg' || |
| | | s === 'kilogram' || |
| | | s === '千克' || |
| | | s === 'kilograms' |
| | | ) |
| | | return '公斤' |
| | | return s |
| | | } |
| | | |
| | | const type = ref('0') // 固定合格库存 |
| | | const isQualified = computed(() => true) |
| | |
| | | form.productModelId = item.id |
| | | form.productName = item.productName |
| | | form.productModelName = item.model |
| | | form.unit = item.unit |
| | | const normalizedUnit = normalizeUnit(item.unit) |
| | | form.unit = normalizedUnit === '吨' || normalizedUnit === '公斤' ? normalizedUnit : '吨' |
| | | form.productType = item.productType |
| | | form.parentName = parentName |
| | | |
| | |
| | | font-size: 24rpx; |
| | | color: #666; |
| | | } |
| | | .unit-radio-group { |
| | | display: flex; |
| | | gap: 24rpx; |
| | | align-items: center; |
| | | flex-wrap: wrap; |
| | | } |
| | | .no-data { |
| | | text-align: center; |
| | | padding: 40rpx 0; |