| | |
| | | <el-input v-model="formState.productModelName" disabled /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | label="单位" |
| | | prop="unit" |
| | | > |
| | | <el-input v-model="formState.unit" disabled /> |
| | | </el-form-item> |
| | | |
| | | |
| | | <!-- 半成品:允许手动填写数量入库 --> |
| | | <el-form-item |
| | |
| | | > |
| | | <el-input v-model="formState.licensePlateNo" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | label="单位" |
| | | prop="unit" |
| | | > |
| | | <el-select |
| | | v-model="formState.unit" |
| | | placeholder="请选择单位" |
| | | style="width: 100%" |
| | | clearable |
| | | :disabled="!canEditUnit" |
| | | > |
| | | <el-option |
| | | v-for="item in editableUnitOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-if="type === 'qualified' && formState.productType === 0" |
| | | label="毛重(吨)" |
| | | label="毛重" |
| | | prop="grossWeight" |
| | | :rules="[{ required: true, message: '请输入毛重', trigger: ['blur','change'] }]" |
| | | > |
| | |
| | | |
| | | <el-form-item |
| | | v-if="type === 'qualified' && formState.productType === 0" |
| | | label="皮重(吨)" |
| | | label="皮重" |
| | | prop="tareWeight" |
| | | :rules="[{ required: true, message: '请输入皮重', trigger: ['blur','change'] }]" |
| | | > |
| | |
| | | |
| | | <el-form-item |
| | | v-if="type === 'qualified' && formState.productType === 0" |
| | | label="净重(吨)" |
| | | label="净重" |
| | | prop="netWeight" |
| | | :rules="[{ required: true, message: '请先输入毛重和皮重自动计算净重', trigger: ['blur','change'] }]" |
| | | > |
| | |
| | | }); |
| | | |
| | | const showProductSelectDialog = ref(false); |
| | | const unitEditableValues = ['吨', '公斤']; |
| | | |
| | | const canEditUnit = computed(() => unitEditableValues.includes(formState.value?.unit)); |
| | | |
| | | const editableUnitOptions = computed(() => { |
| | | const options = [ |
| | | {label: '吨', value: '吨'}, |
| | | {label: '公斤', value: '公斤'}, |
| | | ]; |
| | | const currentUnit = formState.value?.unit; |
| | | if (currentUnit && !unitEditableValues.includes(currentUnit)) { |
| | | return [{label: currentUnit, value: currentUnit}]; |
| | | } |
| | | return options; |
| | | }); |
| | | |
| | | let { proxy } = getCurrentInstance() |
| | | |