| | |
| | | <div class="search_form"> |
| | | <el-form :model="searchForm" |
| | | :inline="true"> |
| | | <el-form-item label="规格名称:"> |
| | | <el-input v-model="searchForm.model" |
| | | placeholder="请输入" |
| | | clearable |
| | | prefix-icon="Search" |
| | | style="width: 200px;" |
| | | @change="handleQuery" /> |
| | | <el-form-item label="产品类型:"> |
| | | <el-select v-model="searchForm.dictCode" |
| | | style="width: 200px;" |
| | | placeholder="请选择产品类型" |
| | | clearable |
| | | @change="handleQuery"> |
| | | <el-option v-for="option in productTypeOptions" |
| | | :key="option.dictCode" |
| | | :label="option.dictLabel" |
| | | :value="option.dictCode" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" |
| | |
| | | } from "@/api/productionManagement/processRoute.js"; |
| | | import { useRouter } from "vue-router"; |
| | | import { ElMessageBox, ElMessage } from "element-plus"; |
| | | import { getDicts } from "@/api/system/dict/data"; |
| | | |
| | | const router = useRouter(); |
| | | const data = reactive({ |
| | | searchForm: { |
| | | model: "", |
| | | dictCode: "", |
| | | }, |
| | | }); |
| | | const { searchForm } = toRefs(data); |
| | |
| | | const isShowEditModal = ref(false); |
| | | const isShowItemModal = ref(false); |
| | | const record = ref({}); |
| | | const productTypeOptions = ref([]); |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 100, |
| | |
| | | }); |
| | | }; |
| | | |
| | | // 获取产品类型字典 |
| | | const getProductTypeOptions = () => { |
| | | getDicts("product_type") |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | productTypeOptions.value = res.data; |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | console.error("获取产品类型字典失败:", err); |
| | | }); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | getProductTypeOptions(); |
| | | getList(); |
| | | }); |
| | | </script> |