This commit is contained in:
砂糖
2025-07-25 15:09:08 +08:00
parent 4a567e6fb9
commit 3f455b773a
10 changed files with 1278 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
<template>
<el-select
v-model="selected"
multiple
filterable
placeholder="请选择检查项"
@change="handleChange"
style="width: 100%;"
>
<el-option
v-for="item in checkItems"
:key="item.itemId"
:label="item.itemName"
:value="item.itemId"
/>
</el-select>
</template>
<script>
import { listCheckItem } from '@/api/mes/qc/checkItem'
export default {
name: 'CheckItemSelect',
props: {
modelValue: {
type: Array,
default: () => []
}
},
emits: ['update:modelValue'],
data() {
return {
checkItems: [],
selected: this.modelValue.slice()
}
},
watch: {
modelValue(val) {
this.selected = val.slice()
}
},
methods: {
handleChange(val) {
this.$emit('input', val)
},
async fetchCheckItems() {
try {
const res = await listCheckItem({ pageSize: 1000 })
this.checkItems = res.rows
} catch (e) {
this.checkItems = []
}
}
},
mounted() {
this.fetchCheckItems()
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,7 @@
export { default as CategorySelect } from './CategorySelect/index.vue';
export { default as CheckItemSelect } from './CheckItemSelect/index.vue';
export { default as ProductSelect } from './ProductSelect/index.vue';
export { default as RawMaterialSelect } from './RawMaterialSelect/index.vue';
export { default as CategoryRenderer } from './Renderer/CategoryRenderer.vue';
export { default as UserSelect } from './UserSelect/index.vue';
export { default as WarehouseSelect } from './WarehouseSelect/index.vue';