diff --git a/src/views/mes/workstation/index.vue b/src/views/mes/workstation/index.vue index 8514b3808..6c408efca 100644 --- a/src/views/mes/workstation/index.vue +++ b/src/views/mes/workstation/index.vue @@ -67,45 +67,8 @@ /> - - - @@ -120,7 +83,7 @@ import { TabsList, Team, Workstation, - WorkstationRules + WorkstationRules, popCheckList } from './workstation.data' import * as WorkstationApi from '@/api/mes/workstation' import * as defaultButtons from '@/utils/disposition/defaultButtons' @@ -328,54 +291,8 @@ const changeTabs = (data) =>{ tabsDeleteApi = WorkstationApi.deleteOperstepsRelation } } -const teamListRef = ref() -const { tableObject: selectTeamListTableData, tableMethods: selectTeamListTableMethods } = useTable({ - getListApi: WorkstationApi.checkTeamPageList -}) -const { getList:selectTeamList } = selectTeamListTableMethods - -const equipmentListRef = ref() -const { tableObject: selectEquipmentListTableData, tableMethods: selectEquipmentListTableMethods } = useTable({ - getListApi: WorkstationApi.checkEquipmentPageList -}) -const { getList:selectEquipmentList } = selectEquipmentListTableMethods - -const processListRef = ref() -const { tableObject: selectProcessListTableData, tableMethods: processListTableMethods } = useTable({ - getListApi: WorkstationApi.checkProcessPageList -}) -const { getList:selectProcessListList } = processListTableMethods - -const operstepsListRef = ref() -const { tableObject: selectOperstepsListTableData, tableMethods: OperstepsListTableMethods } = useTable({ - getListApi: WorkstationApi.checkOperstepsPageList -}) -const { getList:selectOperstepsList } = OperstepsListTableMethods +const popCheckListRef = ref() const detailOpenForm = async (type, params) => { - if (tableKey.value == 'Team') { - selectTeamListTableData.params = { - workstationCode: params.code - } - await selectTeamList() - teamListRef.value.open('viewDetail', params, null, 'viewDetail')//查看明细数据 - } else if (tableKey.value == 'Equipment') { - selectEquipmentListTableData.params = { - workstationCode: params.code - } - await selectEquipmentList() - equipmentListRef.value.open('viewDetail', params.code, null, 'viewDetail')//查看明细数据 - } else if (tableKey.value == 'Process') { - selectProcessListTableData.params = { - workstationCode: params.code - } - await selectProcessListList() - processListRef.value.open('viewDetail', params.code, null, 'viewDetail')//查看明细数据 - } else if (tableKey.value == 'Production') { - selectOperstepsListTableData.params = { - workstationCode: params.code - } - await selectOperstepsList() - operstepsListRef.value.open('viewDetail', params.code, null, 'viewDetail')//查看明细数据 - } + popCheckListRef.value.open('create', params.code, null, 'viewDetail') } diff --git a/src/views/mes/workstation/workstation.data.ts b/src/views/mes/workstation/workstation.data.ts index 9813e222b..535bf7dbc 100644 --- a/src/views/mes/workstation/workstation.data.ts +++ b/src/views/mes/workstation/workstation.data.ts @@ -1,5 +1,7 @@ import type {CrudSchema} from '@/hooks/web/useCrudSchemas' import {dateFormatter} from '@/utils/formatTime' +import {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data"; +import * as WarehouseApi from "@/api/wms/warehouse"; // 表单校验 export const WorkstationRules = reactive({ @@ -213,3 +215,28 @@ export const Opersteps = useCrudSchemas(reactive([ isTableForm:true, } ])) +export const popCheckList = useCrudSchemas(reactive([ + { + label: '多选列表', + field: 'popCheckList', + sort: 'custom', + isSearch: true, + isForm: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择仓库代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '仓库信息', // 查询弹窗标题 + searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类 + searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + } +]))