✨ feat(mes): 添加状态过滤功能,默认只查询启用项

pull/871/MERGE
YunaiV 2026-04-06 16:27:08 +08:00
parent 9b686628be
commit 018a6975ec
4 changed files with 19 additions and 6 deletions

View File

@ -116,6 +116,7 @@
<script setup lang="ts">
import { DICT_TYPE } from '@/utils/dict'
import { CommonStatusEnum } from '@/utils/constants'
import { MdClientApi, MdClientVO } from '@/api/mes/md/client'
defineOptions({ name: 'MdClientSelectDialog' })
@ -184,7 +185,8 @@ const queryParams = reactive({
pageSize: 10, // 每页条数
code: undefined as string | undefined, // 客户编码
name: undefined as string | undefined, // 客户名称
nickname: undefined as string | undefined // 客户简称
nickname: undefined as string | undefined, // 客户简称
status: CommonStatusEnum.ENABLE as number | undefined // 状态:默认只查启用
})
/** 查询客户列表 */
@ -236,6 +238,7 @@ const resetQuery = () => {
queryParams.code = undefined
queryParams.name = undefined
queryParams.nickname = undefined
queryParams.status = CommonStatusEnum.ENABLE
handleQuery()
}
@ -266,6 +269,7 @@ const open = async (selectedIds?: number[]) => {
queryParams.code = undefined
queryParams.name = undefined
queryParams.nickname = undefined
queryParams.status = CommonStatusEnum.ENABLE
queryParams.pageNo = 1
// 清空上一次的选中状态
selectedRows.value = []

View File

@ -121,6 +121,7 @@
<script setup lang="ts">
import { DICT_TYPE } from '@/utils/dict'
import { CommonStatusEnum } from '@/utils/constants'
import { dateFormatter } from '@/utils/formatTime'
import { MdItemApi, MdItemVO } from '@/api/mes/md/item'
import { MdItemTypeVO } from '@/api/mes/md/item/type'
@ -201,7 +202,8 @@ const queryParams = reactive({
pageSize: 10, // 每页条数
code: undefined as string | undefined, // 物料编码
name: undefined as string | undefined, // 物料名称
itemTypeId: undefined as number | undefined // 物料分类编号
itemTypeId: undefined as number | undefined, // 物料分类编号
status: CommonStatusEnum.ENABLE as number | undefined // 状态:默认只查启用
})
/** 查询物料列表 */
@ -253,6 +255,7 @@ const resetQuery = () => {
queryParams.code = undefined
queryParams.name = undefined
queryParams.itemTypeId = undefined
queryParams.status = CommonStatusEnum.ENABLE
typeTreeRef.value?.reset()
handleQuery()
}
@ -284,6 +287,7 @@ const open = async (selectedIds?: number[]) => {
queryParams.code = undefined
queryParams.name = undefined
queryParams.itemTypeId = undefined
queryParams.status = 0
queryParams.pageNo = 1
// 重置分类树(清高亮 + 清搜索词)
typeTreeRef.value?.reset()

View File

@ -140,6 +140,7 @@
<script setup lang="ts">
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { CommonStatusEnum } from '@/utils/constants'
import { MdVendorApi, MdVendorVO } from '@/api/mes/md/vendor'
defineOptions({ name: 'MdVendorSelectDialog' })
@ -210,7 +211,7 @@ const queryParams = reactive({
name: undefined as string | undefined, // 供应商名称
nickname: undefined as string | undefined, // 供应商简称
englishName: undefined as string | undefined, // 英文名称
status: undefined as number | undefined // 状态
status: CommonStatusEnum.ENABLE as number | undefined // 状态:默认只查启用
})
/** 查询供应商列表 */
@ -263,7 +264,7 @@ const resetQuery = () => {
queryParams.name = undefined
queryParams.nickname = undefined
queryParams.englishName = undefined
queryParams.status = undefined
queryParams.status = CommonStatusEnum.ENABLE
handleQuery()
}
@ -295,7 +296,7 @@ const open = async (selectedIds?: number[]) => {
queryParams.name = undefined
queryParams.nickname = undefined
queryParams.englishName = undefined
queryParams.status = undefined
queryParams.status = 0
queryParams.pageNo = 1
// 清空上一次的选中状态
selectedRows.value = []

View File

@ -101,6 +101,7 @@
<script setup lang="ts">
import { MdWorkstationApi, MdWorkstationVO } from '@/api/mes/md/workstation'
import { CommonStatusEnum } from '@/utils/constants'
import ProProcessSelect from '@/views/mes/pro/process/components/ProProcessSelect.vue'
import MdWorkshopSelect from '@/views/mes/md/workstation/components/MdWorkshopSelect.vue'
@ -170,7 +171,8 @@ const queryParams = reactive({
pageSize: 10, // 每页条数
code: undefined as string | undefined, // 工作站编码
processId: undefined as number | undefined, // 工序编号
workshopId: undefined as number | undefined // 车间编号
workshopId: undefined as number | undefined, // 车间编号
status: CommonStatusEnum.ENABLE as number | undefined // 状态:默认只查启用
})
/** 查询工作站列表 */
@ -222,6 +224,7 @@ const resetQuery = () => {
queryParams.code = undefined
queryParams.processId = undefined
queryParams.workshopId = undefined
queryParams.status = CommonStatusEnum.ENABLE
handleQuery()
}
@ -252,6 +255,7 @@ const open = async (selectedIds?: number[]) => {
queryParams.code = undefined
queryParams.processId = undefined
queryParams.workshopId = undefined
queryParams.status = CommonStatusEnum.ENABLE
queryParams.pageNo = 1
// 清空上一次的选中状态
selectedRows.value = []