| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="规格型号" prop="deviceModel"> |
| | | <el-input v-model="form.deviceModel" :disabled="form.deviceModel != null ? true : false" placeholder="请输入规格型号" /> |
| | | <el-input v-model="form.deviceModel" :disabled="(form.deviceModel != null && operationType === 'edit')" placeholder="请输入规格型号" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | name: "设备台账表单", |
| | | }); |
| | | const formRef = ref(null); |
| | | const operationType = ref(''); |
| | | const formRules = { |
| | | deviceName: [{ required: true, trigger: "blur", message: "请输入" }], |
| | | deviceModel: [{ required: true, trigger: "blur", message: "请输入" }], |
| | |
| | | }); |
| | | |
| | | const loadForm = async (id) => { |
| | | if (id) { |
| | | operationType.value = 'edit' |
| | | } |
| | | const { code, data } = await getLedgerById(id); |
| | | if (code == 200) { |
| | | form.deviceName = data.deviceName; |