| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="规格型号:" prop="model"> |
| | | <el-select v-model="form.model" placeholder="请选择" clearable :disabled="operationType === 'edit'" |
| | | filterable readonly @change="handleChangeModel"> |
| | | <el-option v-for="item in modelOptions" :key="item.id" :label="item.model" :value="item.id" /> |
| | | </el-select> |
| | | <el-select v-model="form.productModelId" placeholder="请选择" clearable :disabled="operationType === 'edit'" |
| | | filterable readonly @change="handleChangeModel"> |
| | | <el-option v-for="item in modelOptions" :key="item.id" :label="item.model" :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | productId: "", |
| | | model: "", |
| | | unit: "", |
| | | quantity: "", |
| | | quantity: undefined, |
| | | checkCompany: "", |
| | | checkResult: "", |
| | | inspectType: '', |
| | |
| | | dealResult: '', |
| | | dealName: '', |
| | | dealTime: '', |
| | | productModelId: undefined, |
| | | }, |
| | | rules: { |
| | | checkTime: [{ required: false, message: "请输入", trigger: "blur" },], |
| | |
| | | productId: '', |
| | | model: '', |
| | | unit: '', |
| | | quantity: '', |
| | | quantity: undefined, |
| | | productName: '', |
| | | productModelId: undefined, |
| | | }; |
| | | } else { |
| | | form.value = {}; |
| | |
| | | modelList({ id: value }).then((res) => { |
| | | modelOptions.value = res; |
| | | }) |
| | | }; |
| | | const handleChangeModel = (value) => { |
| | | const selectedModel = modelOptions.value.find(item => item.id === value); |
| | | if (selectedModel) { |
| | | form.value.model = selectedModel.model; |
| | | } |
| | | }; |
| | | const findNodeById = (nodes, productId) => { |
| | | for (let i = 0; i < nodes.length; i++) { |
| | |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | | </style> |