|
|
|
|
@ -52,7 +52,7 @@
|
|
|
|
|
:placeholder="t('QualityManagement.ZjItem.placeholderLowerVal')"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item :label="t('QualityManagement.ZjItem.unit')" prop="unitId">
|
|
|
|
|
<el-form-item :label="t('QualityManagement.ZjItem.unit')" prop="unit">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="formData.unit"
|
|
|
|
|
clearable
|
|
|
|
|
@ -63,7 +63,7 @@
|
|
|
|
|
v-for="unit in unitList"
|
|
|
|
|
:key="unit.id"
|
|
|
|
|
:label="unit.name"
|
|
|
|
|
:value="unit.id"
|
|
|
|
|
:value="String(unit.id)"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
@ -86,7 +86,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { ZjItemApi, ZjItemVO } from '@/api/mes/zjitem'
|
|
|
|
|
import {ZjTypeApi, ZjTypeVO} from "@/api/mes/zjtype";
|
|
|
|
|
import { ZjTypeApi, ZjTypeVO } from '@/api/mes/zjtype'
|
|
|
|
|
import { ProductUnitApi, ProductUnitVO } from '@/api/erp/product/unit'
|
|
|
|
|
|
|
|
|
|
/** 质量管理-检验项目 表单 */
|
|
|
|
|
@ -125,17 +125,18 @@ const open = async (type: string, id?: number) => {
|
|
|
|
|
formType.value = type
|
|
|
|
|
resetForm()
|
|
|
|
|
typeList.value = await ZjTypeApi.getZjTypeList()
|
|
|
|
|
unitList.value = await ProductUnitApi.getProductUnitSimpleList()
|
|
|
|
|
// 修改时,设置数据
|
|
|
|
|
if (id) {
|
|
|
|
|
formLoading.value = true
|
|
|
|
|
try {
|
|
|
|
|
formData.value = await ZjItemApi.getZjItem(id)
|
|
|
|
|
formData.value.unit = formData.value.unit == null ? undefined : String(formData.value.unit)
|
|
|
|
|
} finally {
|
|
|
|
|
formLoading.value = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 产品单位
|
|
|
|
|
unitList.value = await ProductUnitApi.getProductUnitSimpleList()
|
|
|
|
|
}
|
|
|
|
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
|
|
|
|
|
|
|
|
|
|