From 3c1c84a3a765d26fc3792ad3c28dfacdd2b02169 Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Wed, 5 Jun 2024 15:01:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E8=A3=85=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/eam/toolAccounts/index.ts | 21 +- src/api/eam/toolEquipmentIn/index.ts | 64 +++ src/api/eam/toolEquipmentOut/index.ts | 64 +++ src/api/wms/process/index.ts | 5 + src/api/wms/productionline/index.ts | 6 + src/api/wms/workstation/index.ts | 6 + src/components/Detail/src/DetailLedger.vue | 111 +++-- src/utils/dict.ts | 5 +- .../equipmentAccounts.data.ts | 248 ++++++++++- src/views/eam/equipmentAccounts/index.vue | 54 ++- .../equipmentShutdown.data.ts | 173 +++++++- .../equipmentSigning/equipmentSigning.data.ts | 129 ++++-- src/views/eam/equipmentSigning/index.vue | 270 ++++++++++++ .../equipmentTransferRecord.data.ts | 351 ++++++++++++--- .../eam/equipmentTransferRecord/index.vue | 32 +- src/views/eam/toolAccounts/index.vue | 231 +++++++++- .../eam/toolAccounts/toolAccounts.data.ts | 405 +++++++++++++++++- src/views/eam/toolEquipmentIn/index.vue | 290 +++++++++++++ .../toolEquipmentIn/toolEquipmentIn.data.ts | 350 +++++++++++++++ src/views/eam/toolEquipmentOut/index.vue | 253 +++++++++++ .../toolEquipmentOut/toolEquipmentOut.data.ts | 230 ++++++++++ 21 files changed, 3133 insertions(+), 165 deletions(-) create mode 100644 src/api/eam/toolEquipmentIn/index.ts create mode 100644 src/api/eam/toolEquipmentOut/index.ts create mode 100644 src/views/eam/equipmentSigning/index.vue create mode 100644 src/views/eam/toolEquipmentIn/index.vue create mode 100644 src/views/eam/toolEquipmentIn/toolEquipmentIn.data.ts create mode 100644 src/views/eam/toolEquipmentOut/index.vue create mode 100644 src/views/eam/toolEquipmentOut/toolEquipmentOut.data.ts diff --git a/src/api/eam/toolAccounts/index.ts b/src/api/eam/toolAccounts/index.ts index 0f5ebd032..bf938205e 100644 --- a/src/api/eam/toolAccounts/index.ts +++ b/src/api/eam/toolAccounts/index.ts @@ -42,38 +42,43 @@ export const getToolAccountsPage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/eam/tool-accounts/senior', data }) + return await request.post({ url: '/eam/tool/tool-accounts/senior', data }) } else { - return await request.get({ url: `/eam/tool-accounts/page`, params }) + return await request.get({ url: `/eam/tool/tool-accounts/page`, params }) } } // 查询工装台账详情 export const getToolAccounts = async (id: number) => { - return await request.get({ url: `/eam/tool-accounts/get?id=` + id }) + return await request.get({ url: `/eam/tool/tool-accounts/get?id=` + id }) } // 新增工装台账 export const createToolAccounts = async (data: ToolAccountsVO) => { - return await request.post({ url: `/eam/tool-accounts/create`, data }) + return await request.post({ url: `/eam/tool/tool-accounts/create`, data }) } // 修改工装台账 export const updateToolAccounts = async (data: ToolAccountsVO) => { - return await request.put({ url: `/eam/tool-accounts/update`, data }) + return await request.put({ url: `/eam/tool/tool-accounts/update`, data }) } // 删除工装台账 export const deleteToolAccounts = async (id: number) => { - return await request.delete({ url: `/eam/tool-accounts/delete?id=` + id }) + return await request.delete({ url: `/eam/tool/tool-accounts/delete?id=` + id }) } // 导出工装台账 Excel export const exportToolAccounts = async (params) => { - return await request.download({ url: `/eam/tool-accounts/export-excel`, params }) + return await request.download({ url: `/eam/tool/tool-accounts/export-excel`, params }) } // 下载用户导入模板 export const importTemplate = () => { - return request.download({ url: '/eam/tool-accounts/get-import-template' }) + return request.download({ url: '/eam/tool/tool-accounts/get-import-template' }) +} + +// 查询工装台账列表 +export const getToolAccountsNoPage = async (params) => { + return await request.get({ url: `/eam/tool/tool-accounts/noPage`, params }) } \ No newline at end of file diff --git a/src/api/eam/toolEquipmentIn/index.ts b/src/api/eam/toolEquipmentIn/index.ts new file mode 100644 index 000000000..d175f6dd2 --- /dev/null +++ b/src/api/eam/toolEquipmentIn/index.ts @@ -0,0 +1,64 @@ +import request from '@/config/axios' + +export interface ToolEquipmentInVO { + id: number + describing: string + toolCode: string + status: string + approver: number + approveContent: string + approveTime: Date + factoryAreaCode: string + workshopCode: string + lineCode: string + processCode: string + workstationCode: string + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询工装入库记录列表 +export const getToolEquipmentInPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/tool/tool-equipment-in/senior', data }) + } else { + return await request.get({ url: `/eam/tool/tool-equipment-in/page`, params }) + } +} + +// 查询工装入库记录详情 +export const getToolEquipmentIn = async (id: number) => { + return await request.get({ url: `/eam/tool/tool-equipment-in/get?id=` + id }) +} + +// 新增工装入库记录 +export const createToolEquipmentIn = async (data: ToolEquipmentInVO) => { + return await request.post({ url: `/eam/tool/tool-equipment-in/create`, data }) +} + +// 修改工装入库记录 +export const updateToolEquipmentIn = async (data: ToolEquipmentInVO) => { + return await request.put({ url: `/eam/tool/tool-equipment-in/update`, data }) +} + +// 删除工装入库记录 +export const deleteToolEquipmentIn = async (id: number) => { + return await request.delete({ url: `/eam/tool/tool-equipment-in/delete?id=` + id }) +} + +// 导出工装入库记录 Excel +export const exportToolEquipmentIn = async (params) => { + return await request.download({ url: `/eam/tool/tool-equipment-in/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/tool/tool-equipment-in/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/eam/toolEquipmentOut/index.ts b/src/api/eam/toolEquipmentOut/index.ts new file mode 100644 index 000000000..7ffda68c9 --- /dev/null +++ b/src/api/eam/toolEquipmentOut/index.ts @@ -0,0 +1,64 @@ +import request from '@/config/axios' + +export interface ToolEquipmentOutVO { + id: number + theme: string + toolCode: string + type: string + qty: number + status: string + applyer: string + approver: number + approveContent: string + approveTime: Date + autoExamine: string + autoAgree: string + departmentCode: string + remark: string + siteId: string + available: string + deletionTime: Date + deleterId: byte[] + concurrencyStamp: number +} + +// 查询工装出库记录列表 +export const getToolEquipmentOutPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/eam/tool/tool-equipment-out/senior', data }) + } else { + return await request.get({ url: `/eam/tool/tool-equipment-out/page`, params }) + } +} + +// 查询工装出库记录详情 +export const getToolEquipmentOut = async (id: number) => { + return await request.get({ url: `/eam/tool/tool-equipment-out/get?id=` + id }) +} + +// 新增工装出库记录 +export const createToolEquipmentOut = async (data: ToolEquipmentOutVO) => { + return await request.post({ url: `/eam/tool/tool-equipment-out/create`, data }) +} + +// 修改工装出库记录 +export const updateToolEquipmentOut = async (data: ToolEquipmentOutVO) => { + return await request.put({ url: `/eam/tool/tool-equipment-out/update`, data }) +} + +// 删除工装出库记录 +export const deleteToolEquipmentOut = async (id: number) => { + return await request.delete({ url: `/eam/tool/tool-equipment-out/delete?id=` + id }) +} + +// 导出工装出库记录 Excel +export const exportToolEquipmentOut = async (params) => { + return await request.download({ url: `/eam/tool/tool-equipment-out/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/eam/tool/tool-equipment-out/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/wms/process/index.ts b/src/api/wms/process/index.ts index c89f7e192..c9e5d1d5f 100644 --- a/src/api/wms/process/index.ts +++ b/src/api/wms/process/index.ts @@ -57,4 +57,9 @@ export const exportProcess = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/process/get-import-template' }) +} + +// 查询工序列表 +export const getProcessNoPage = async (params) => { + return await request.get({ url: `/wms/process/noPage`, params }) } \ No newline at end of file diff --git a/src/api/wms/productionline/index.ts b/src/api/wms/productionline/index.ts index 050c8a0fb..85e5fce07 100644 --- a/src/api/wms/productionline/index.ts +++ b/src/api/wms/productionline/index.ts @@ -58,4 +58,10 @@ export const exportProductionline = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/productionline/get-import-template' }) +} + + +// 查询生产线列表 +export const getProductionlineNoPage = async (params) => { + return await request.get({ url: `/wms/productionline/noPage`, params }) } \ No newline at end of file diff --git a/src/api/wms/workstation/index.ts b/src/api/wms/workstation/index.ts index 5eef9a588..780baf167 100644 --- a/src/api/wms/workstation/index.ts +++ b/src/api/wms/workstation/index.ts @@ -70,4 +70,10 @@ export const selectAreaTypeToLocation = async (params) => { } else { return await request.get({ url: `/wms/workstation/pageAreaToLocation`, params }) } +} + + +// 查询工位列表 +export const getWorkstationNoPage = async (params) => { + return await request.get({ url: `/wms/workstation/noPage`, params }) } \ No newline at end of file diff --git a/src/components/Detail/src/DetailLedger.vue b/src/components/Detail/src/DetailLedger.vue index b0f221ab0..5e0964f3e 100644 --- a/src/components/Detail/src/DetailLedger.vue +++ b/src/components/Detail/src/DetailLedger.vue @@ -91,28 +91,16 @@ - - - - - - - - + + + + {{ value }} + + @@ -447,6 +435,11 @@ const props = defineProps({ required: false, default: null }, + dynamicInfoFields: { + type: Object, + required: false, + default: null + } // 附件 备注 变更记录 别名 }) const isShowDrawer = ref(false) @@ -457,6 +450,8 @@ const fileParmas = ref({ funcCode: props.funcCode, fileBusiType: '' }) +const dynamicInfo = ref() +const dynamicInfoName = ref("") const operationRecordType = ref() const operationRecordList = ref(props.operationRecordList) if (props.isBasic == true) { @@ -480,14 +475,15 @@ if (props.isBasic == true) { const otherList = [...props.annexTable, { + label: '动态信息', + prop: 'DynamicInfo' + },{ label: '拓展属性', prop: 'ExpandProps' - }, - { + },{ label: '操作记录', prop: 'OperationRecord' - }, - { + },{ label:props.annexAlias.label, prop:'Annex' },{ @@ -521,6 +517,8 @@ const initialData = ref([]) const codeLabelPrefix = ref('属性编号') const valueLabelPrefix = ref('属性值') const expandPropsFormRef = ref(); +const operate = ref(false) +const operationTabParam = ref({}) //附件 备注 变更记录 高度计算 const remarkHeight = computed(() => { const tab = unref(tabRef) @@ -646,9 +644,13 @@ const change = (item, index) => { getExtendedPropsList() }else if(item.prop == 'OperationRecord'){ if(props.operationRecordList){ + operate.value = true operationRecordType.value = props.operationRecordList[0]?.value } } + if(item.prop != 'OperationRecord'){ + operate.value = false + } } //主表所需的参数 @@ -693,6 +695,9 @@ const titleValueRef = ref() const count =ref(0) const deviceNumber = ref('') const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => { + //动态信息获取 + getDynamicInfo(row) + titleNameRef.value = titleName titleValueRef.value = titleValue deviceNumber.value = row.number?row.number:row.code @@ -771,6 +776,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: detailLoading.value = false } } + } defineExpose({ openDetail, formRef }) // 提供 open 方法,用于打开弹窗 @@ -1125,6 +1131,28 @@ const getExtendedPropsList = async () => { } const handleOperationTabsChange = async (val) => { + if(val == 'report'){ + operationTabParam.value = { + 'equipmentCode' : deviceNumber.value, + } + }else if(val == 'repair'){ + operationTabParam.value = { + 'equipmentCode' : deviceNumber.value, + } + }else if(val == 'maintenance'){ + operationTabParam.value = { + 'equipmentCode' : deviceNumber.value, + } + }else if(val == 'inspection'){ + operationTabParam.value = { + 'equipmentCode' : deviceNumber.value, + } + }else if(val == 'spot_check'){ + operationTabParam.value = { + 'equipmentCode' : deviceNumber.value, + } + } + tableObjectRef.value.loading = false emit("handleOperationTabsChange",val) } @@ -1140,7 +1168,6 @@ const dialogUploadNumber = ref() const dialogUploadBusiCode = ref() const dialogFormKey = ref(0) const openDialog = async(row: any, titleName: any, titleValue: any) => { - debugger const { tableObject, tableMethods } = useTable({ getListApi: props.dialogApiPage, // 分页接口 defaultParams: getDialogParams(row) @@ -1172,7 +1199,8 @@ watch( () => props.apiPage, () => { const { tableObject, tableMethods } = useTable({ - getListApi: props.apiPage // 分页接口 + getListApi: props.apiPage, // 分页接口 + defaultParams: getSubTabParams() }) tableObject.params.masterId = masterParmas.value.masterId detailAllSchemasRef.value = props.detailAllSchemas @@ -1187,6 +1215,32 @@ watch( getList() } ) +const getSubTabParams = () => { + if(operate.value){ + return operationTabParam.value + } +} + +const getDynamicInfo = (row) => { + dynamicInfoName.value = row.name?row.name:"" + // 使用 reduce 方法筛选出符合条件的键值对 + dynamicInfo.value = Object.keys(row).reduce((acc, key) => { + let name = ""; + let value = row[key]; + if (props.dynamicInfoFields?.includes(key)) { + props.allSchemas?.tableColumns?.find((item) => { + if (item.field == key) { + name = item.label; + } + }); + } + if (name) { + acc[name] = value!=undefined&&value!=null&&value!=""?value:'undefined'; // 使用 item.label 作为键,row[key] 作为值 + } + return acc; + }, {}); +} + diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 05d390269..d4a6c4d1b 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -354,5 +354,8 @@ export enum DICT_TYPE { REPAIR_LEVEL = 'repair_level', //维修级别 IS_COMPLETED = 'is_completed', //是否完成 MAINTENANCE_CYCLE ='maintenance_cycle', // 保养周期 - EAM_ORDER_STATUS = 'eam_order_status' + EAM_ORDER_STATUS = 'eam_order_status',// 工单状态 + TOOL_CLASS = 'tool_class', //工装类型 + TOOL_OUT_TYPE = 'tool_out_type', //工装出库类型 + } diff --git a/src/views/eam/equipmentAccounts/equipmentAccounts.data.ts b/src/views/eam/equipmentAccounts/equipmentAccounts.data.ts index f3bbe38b9..e8e9609dd 100644 --- a/src/views/eam/equipmentAccounts/equipmentAccounts.data.ts +++ b/src/views/eam/equipmentAccounts/equipmentAccounts.data.ts @@ -9,10 +9,19 @@ import * as EquipmentSupplierApi from '@/api/eam/equipmentSupplier' import { EquipmentManufacturer } from '@/views/eam/equipmentManufacturer/equipmentManufacturer.data' import * as EquipmentManufacturerApi from '@/api/eam/equipmentManufacturer' import * as ConfigApi from '@/api/infra/config' +import * as ProductionlineApi from '@/api/wms/productionline' +import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' +import * as ProcessApi from '@/api/wms/process' +import { Process } from '@/views/wms/basicDataManage/factoryModeling/process/process.data' +import * as WorkStationApi from '@/api/wms/workstation' +import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data' + const workshopNoPage = await WorkshopApi.getWorkshopNoPage({}) const equipmentManufacturerNoPage = await EquipmentManufacturerApi.getEquipmentManufacturerNoPage({}) const equipmentSupplierNoPage = await EquipmentSupplierApi.getEquipmentSupplierNoPage({}) +const productionlineNoPage = await ProductionlineApi.getProductionlineNoPage({}); const autoCodeSwitch = await ConfigApi.getConfigKey('deviceCodeAutoSwitch') +// ProductionlineApi.getProductionlinePage const autoSwitch = ref(false) if (autoCodeSwitch == 'TRUE') { autoSwitch.value = true @@ -29,6 +38,7 @@ export const EquipmentAccountsRules = reactive({ power: [ { validator:validateNum, message: '输入功率格式不正确', trigger: 'blur'} ], + workshopName: [required] }) export const EquipmentAccounts = useCrudSchemas(reactive([ @@ -164,7 +174,7 @@ export const EquipmentAccounts = useCrudSchemas(reactive([ filterable: true, } }, - formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + formatter: (_: Recordable, __: TableColumn, cellValue: string) => { return equipmentSupplierNoPage.find((item) => item.number == cellValue)?.name }, }, @@ -173,6 +183,7 @@ export const EquipmentAccounts = useCrudSchemas(reactive([ field: 'supplierName', sort: 'custom', isSearch: false, + isTable: false, form: { // labelMessage: '信息提示说明!!!', componentProps: { @@ -265,7 +276,7 @@ export const EquipmentAccounts = useCrudSchemas(reactive([ } } }, - formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + formatter: (_: Recordable, __: TableColumn, cellValue: string) => { return equipmentManufacturerNoPage.find((item) => item.number == cellValue)?.name }, }, @@ -274,6 +285,7 @@ export const EquipmentAccounts = useCrudSchemas(reactive([ field: 'manufactureName', sort: 'custom', isSearch: false, + isTable: false, form: { componentProps: { isSearchList: true, // 开启查询弹窗 @@ -371,17 +383,243 @@ export const EquipmentAccounts = useCrudSchemas(reactive([ }, }, { - label: '工段编号', - field: 'workshopSectionCode', + label: '产线编号', + field: 'lineCode', sort: 'custom', - isSearch: false + isSearch: true, + isDetail: false, + isForm: false, + isTable: true, + isTableForm: false, + search: { + component: 'Select', + componentProps: { + options: productionlineNoPage, + optionsAlias: { + labelField: 'name', + valueField: 'code' + }, + filterable: true, + } + }, + formatter: (_: Recordable, __: TableColumn, cellValue: string) => { + return productionlineNoPage.find((item) => item.code == cellValue)?.name + }, + }, + { + label: '产线编号', + field: 'lineName', + sort: 'custom', + isSearch: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + multiple:true, + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '生产线信息', // 查询弹窗标题 + searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 + searchCondition: [{ + key:'workshopCode', + value:'workshopCode', + message: '请填写车间代码!', + isMainValue: true + },{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } }, + // { + // label: '工序编号', + // field: 'processCode', + // sort: 'custom', + // isSearch: true, + // form:{ + // componentProps: { + // isSearchList: true, + // searchListPlaceholder: '请选择工序代码', + // searchField: 'code', + // searchTitle: '工序信息', + // searchAllSchemas: Process.allSchemas, + // searchPage: ProcessApi.getProcessPage, + // searchCondition: [{ + // key:'productionLineCode', + // value:'lineCode', + // message: '请填写生产线代码!', + // isMainValue: true + // },{ + // key:'workshopCode', + // value:'workshopCode', + // message: '请填写车间代码!', + // isMainValue: true + // },{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }] + // } + // }, + // }, + // { + // label: '工位编号', + // field: 'workstationCode', + // sort: 'custom', + // isSearch: true, + // form:{ + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择工位', // 输入框占位文本 + // searchField: 'code', // 查询弹窗赋值字段 + // searchTitle: '工位信息', // 查询弹窗标题 + // searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 + // searchPage: WorkStationApi.getWorkstationPage, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key:'productionLineCode', + // value:'lineCode', + // message: '请填写生产线代码!', + // isMainValue: true + // },{ + // key:'workshopCode', + // value:'workshopCode', + // message: '请填写车间代码!', + // isMainValue: true + // },{ + // key:'available', + // value:'TRUE', + // isMainValue: false + // }] + // } + // }, + // }, { label: '备注', field: 'remark', sort: 'custom', isSearch: true }, + { + label: '平均故障间隔时间', + field: 'purchaseInterval', + sort: 'custom', + isSearch: false, + isDetail: false, + isTable: true, + isForm: false, + isTableForm: false, + }, + { + label: '总运行时长', + field: 'totalRunningTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + isDetail: false, + isTable: true, + isForm: false, + isTableForm: false, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + } + }, + { + label: '保养运行时长', + field: 'maintenanceRunningTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + isDetail: false, + isTable: true, + isForm: false, + isTableForm: false, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + } + }, + { + label: '使用次数', + field: 'usageTimes', + sort: 'custom', + isSearch: false, + isDetail: false, + isTable: true, + isForm: false, + isTableForm: false, + }, + { + label: '上一次检验日期', + field: 'lastInspectionDate', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + isDetail: false, + isTable: true, + isForm: false, + isTableForm: false, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + } + }, + { + label: '设备停机率', + field: 'outageRate', + sort: 'custom', + isSearch: false, + isDetail: false, + isTable: true, + isForm: false, + isTableForm: false, + }, + { + label: '平均故障恢复时间', + field: 'breakdownRecover', + sort: 'custom', + isSearch: false, + isDetail: false, + isTable: true, + isForm: false, + isTableForm: false, + }, { label: '操作', field: 'action', diff --git a/src/views/eam/equipmentAccounts/index.vue b/src/views/eam/equipmentAccounts/index.vue index 3cea5f4bd..08cac0893 100644 --- a/src/views/eam/equipmentAccounts/index.vue +++ b/src/views/eam/equipmentAccounts/index.vue @@ -62,14 +62,15 @@ :apiPage="apiPage" :dialogApiPage="dialogApiPage" :dialogAllSchemas="dialogAllSchemas" - funcCode="device_mould_picture" + :dynamicInfoFields="dynamicInfoFields" + funcCode="device_mould_file" /> - + + diff --git a/src/views/eam/equipmentTransferRecord/equipmentTransferRecord.data.ts b/src/views/eam/equipmentTransferRecord/equipmentTransferRecord.data.ts index d0f0950b9..74eaf6585 100644 --- a/src/views/eam/equipmentTransferRecord/equipmentTransferRecord.data.ts +++ b/src/views/eam/equipmentTransferRecord/equipmentTransferRecord.data.ts @@ -1,6 +1,24 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' +import * as UserApi from '@/api/system/user' +import { EquipmentAccounts,EquipmentAccountsRules } from '../equipmentAccounts/equipmentAccounts.data' +import * as EquipmentAccountsApi from '@/api/eam/equipmentAccounts' +import * as ProductionlineApi from '@/api/wms/productionline' +import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' +import * as WorkshopApi from '@/api/wms/workshop' +import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data' +import * as ProcessApi from '@/api/wms/process' +import { Process } from '@/views/wms/basicDataManage/factoryModeling/process/process.data' +import * as WorkStationApi from '@/api/wms/workstation' +import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data' +export interface User { + id: number, + nickname: string +} + +const userList = ref([]) +userList.value = await UserApi.getSimpleUserList() // 表单校验 export const EquipmentTransferRecordRules = reactive({ equipmentCode: [required], @@ -12,48 +30,51 @@ export const EquipmentTransferRecord = useCrudSchemas(reactive([ label: '设备编码', field: 'equipmentCode', sort: 'custom', - isSearch: true - }, - { - label: '设备类型枚举', - field: 'type', - sort: 'custom', - dictType: DICT_TYPE.DEVICE_TYPE, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - isSearch: false, + isSearch: true, form: { - component: 'Select' - } - }, - { - label: '操作日期', - field: 'operationDate', - sort: 'custom', - formatter: dateFormatter, - isSearch: false, - search: { - component: 'DatePicker', + colProps: { + span: 24 + }, + // labelMessage: '信息提示说明!!!', componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择设备', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '设备信息', // 查询弹窗标题 + searchAllSchemas: EquipmentAccounts.allSchemas, // 查询弹窗所需类 + searchPage: EquipmentAccountsApi.getEquipmentAccountsPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] } }, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - valueFormat: 'x' - } - } - }, - { - label: '操作人', - field: 'operationer', - sort: 'custom', - isSearch: false }, // { + // label: '操作人', + // field: 'operationer', + // sort: 'custom', + // isSearch: true, + // formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + // return userList.value.find((item) => item.id == cellValue)?.nickname + // }, + // form: { + // component: 'Select', + // componentProps: { // 假设deptList是部门数据列表 + // options: userList.value, + // optionsAlias: { + // valueField: 'id', + // labelField: 'nickname' + // }, + // disabled: false, + // placeholder: "请选择操作人", + // filterable: true, + // multiple: false, + // } + // } + // }, + // { // label: '原所属厂区编号', // field: 'beforeFactoryAreaCode', // sort: 'custom', @@ -66,42 +87,260 @@ export const EquipmentTransferRecord = useCrudSchemas(reactive([ isSearch: true }, { - label: '原车间编号', - field: 'beforeWorkshopCode', + label: '新地点', + field: 'nowLocation', sort: 'custom', isSearch: true }, { - label: '原工段编号', - field: 'beforeWorkshopSectionCode', + label: '原车间编号', + field: 'beforeWorkshopCode', sort: 'custom', - isSearch: false + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择车间代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '车间信息', // 查询弹窗标题 + searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类 + searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, }, { - label: '现地点', - field: 'nowLocation', + label: '新车间编号', + field: 'workshopCode', sort: 'custom', - isSearch: true + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择车间代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '车间信息', // 查询弹窗标题 + searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类 + searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, }, - // { - // label: '所属厂区编号', - // field: 'factoryAreaCode', - // sort: 'custom', - // isSearch: true - // }, { - label: '车间编号', - field: 'workshopCode', + label: '原产线编号', + field: 'beforeLineCode', sort: 'custom', - isSearch: true + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + multiple:true, + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '生产线信息', // 查询弹窗标题 + searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 + searchCondition: [{ + key:'workshopCode', + value:'beforeWorkshopCode', + message: '请填写车间代码!', + isMainValue: true + },{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } }, { - label: '工段编号', - field: 'workshopSectionCode', + label: '新产线编号', + field: 'lineCode', sort: 'custom', - isSearch: false + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + multiple:true, + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '生产线信息', // 查询弹窗标题 + searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 + searchCondition: [{ + key:'workshopCode', + value:'workshopCode', + message: '请填写车间代码!', + isMainValue: true + },{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } }, // { + // label: '操作日期', + // field: 'operationDate', + // sort: 'custom', + // formatter: dateFormatter, + // isSearch: false, + // search: { + // component: 'DatePicker', + // componentProps: { + // valueFormat: 'YYYY-MM-DD HH:mm:ss', + // type: 'daterange', + // defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + // } + // }, + // form: { + // component: 'DatePicker', + // componentProps: { + // type: 'datetime', + // valueFormat: 'x' + // } + // } + // }, + // { + // label: '原工序编号', + // field: 'beforeProcessCode', + // sort: 'custom', + // isSearch: true, + // form:{ + // componentProps: { + // isSearchList: true, + // searchListPlaceholder: '请选择工序代码', + // searchField: 'code', + // searchTitle: '工序信息', + // searchAllSchemas: Process.allSchemas, + // searchPage: ProcessApi.getProcessPage, + // searchCondition: [{ + // key:'productionLineCode', + // value:'lineCode', + // message: '请填写生产线代码!', + // isMainValue: true + // },{ + // key:'workshopCode', + // value:'workshopCode', + // message: '请填写车间代码!', + // isMainValue: true + // },{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }] + // } + // }, + // }, + // { + // label: '新工序编号', + // field: 'processCode', + // sort: 'custom', + // isSearch: true, + // form:{ + // componentProps: { + // isSearchList: true, + // searchListPlaceholder: '请选择工序代码', + // searchField: 'code', + // searchTitle: '工序信息', + // searchAllSchemas: Process.allSchemas, + // searchPage: ProcessApi.getProcessPage, + // searchCondition: [{ + // key:'productionLineCode', + // value:'lineCode', + // message: '请填写生产线代码!', + // isMainValue: true + // },{ + // key:'workshopCode', + // value:'workshopCode', + // message: '请填写车间代码!', + // isMainValue: true + // },{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }] + // } + // }, + // }, + // { + // label: '原工位编号', + // field: 'beforeWorkstationCode', + // sort: 'custom', + // isSearch: true, + // form:{ + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择工位', // 输入框占位文本 + // searchField: 'code', // 查询弹窗赋值字段 + // searchTitle: '工位信息', // 查询弹窗标题 + // searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 + // searchPage: WorkStationApi.getWorkstationPage, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key:'productionLineCode', + // value:'lineCode', + // message: '请填写生产线代码!', + // isMainValue: true + // },{ + // key:'workshopCode', + // value:'workshopCode', + // message: '请填写车间代码!', + // isMainValue: true + // },{ + // key:'available', + // value:'TRUE', + // isMainValue: false + // }] + // } + // }, + // }, + + + // { + // label: '新工位编号', + // field: 'workstationCode', + // sort: 'custom', + // isSearch: true, + // form:{ + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择工位', // 输入框占位文本 + // searchField: 'code', // 查询弹窗赋值字段 + // searchTitle: '工位信息', // 查询弹窗标题 + // searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 + // searchPage: WorkStationApi.getWorkstationPage, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key:'productionLineCode', + // value:'lineCode', + // message: '请填写生产线代码!', + // isMainValue: true + // },{ + // key:'workshopCode', + // value:'workshopCode', + // message: '请填写车间代码!', + // isMainValue: true + // },{ + // key:'available', + // value:'TRUE', + // isMainValue: false + // }] + // } + // }, + // }, + // { // label: '是否可用', // field: 'available', // sort: 'custom', diff --git a/src/views/eam/equipmentTransferRecord/index.vue b/src/views/eam/equipmentTransferRecord/index.vue index dcab8a1ec..1a44b6f4c 100644 --- a/src/views/eam/equipmentTransferRecord/index.vue +++ b/src/views/eam/equipmentTransferRecord/index.vue @@ -48,6 +48,7 @@ :apiCreate="EquipmentTransferRecordApi.createEquipmentTransferRecord" @searchTableSuccess="searchTableSuccess" :isBusiness="false" + @onEnter="onEnter" /> @@ -59,19 +60,25 @@ diff --git a/src/views/eam/toolEquipmentIn/toolEquipmentIn.data.ts b/src/views/eam/toolEquipmentIn/toolEquipmentIn.data.ts new file mode 100644 index 000000000..6178bec25 --- /dev/null +++ b/src/views/eam/toolEquipmentIn/toolEquipmentIn.data.ts @@ -0,0 +1,350 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import * as WorkshopApi from '@/api/wms/workshop' +import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data' +import * as ProductionlineApi from '@/api/wms/productionline' +import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' +import { ToolAccounts} from '../toolAccounts/toolAccounts.data' +import * as ToolAccountsApi from '@/api/eam/toolAccounts' + +const workshopNoPage = await WorkshopApi.getWorkshopNoPage({}) +const productionlineNoPage = await ProductionlineApi.getProductionlineNoPage({}); +const toolAccountsListNoPage = await ToolAccountsApi.getToolAccountsNoPage({}); + +// 表单校验 +export const ToolEquipmentInRules = reactive({ + toolCode: [required], + status: [required] +}) + +export const ToolEquipmentIn = useCrudSchemas(reactive([ + { + label: '工装', + field: 'toolCode', + sort: 'custom', + isSearch: true, + isDetail: false, + isForm: false, + isTable: true, + isTableForm: false, + search: { + component: 'Select', + componentProps: { + options: toolAccountsListNoPage, + optionsAlias: { + labelField: 'name', + valueField: 'code' + }, + filterable: true, + } + }, + formatter: (_: Recordable, __: TableColumn, cellValue: string) => { + return toolAccountsListNoPage.find((item) => item.code == cellValue)?.name + }, + }, + { + label: '工装', + field: 'toolName', + sort: 'custom', + isSearch: false, + isDetail: false, + isForm: true, + isTable: false, + isTableForm: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择工装', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '工装信息', // 查询弹窗标题 + searchAllSchemas: ToolAccounts.allSchemas, // 查询弹窗所需类 + searchPage: ToolAccountsApi.getToolAccountsPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, + }, + { + label: '入库信息描述', + field: 'describing', + sort: 'custom', + isSearch: true, + form: { + component: 'Input', + componentProps: { + type: 'textarea', + } + } + }, + { + label: '入库审核状态', + field: 'status', + sort: 'custom', + dictType: DICT_TYPE.JOB_STATUS, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isSearch: true, + form: { + component: 'Select' + } + }, + { + label: '审核人', + field: 'approver', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + } + }, + { + label: '审核内容', + field: 'approveContent', + sort: 'custom', + isSearch: false, + form: { + component: 'Input', + componentProps: { + type: 'textarea', + } + } + }, + { + label: '审核时间', + field: 'approveTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + } + }, + // { + // label: '所属厂区编号', + // field: 'factoryAreaCode', + // sort: 'custom', + // isSearch: true + // }, + { + label: '车间编号', + field: 'workshopCode', + sort: 'custom', + isSearch: true, + isDetail: false, + isForm: false, + isTable: true, + isTableForm: false, + search: { + component: 'Select', + componentProps: { + options: workshopNoPage, + optionsAlias: { + labelField: 'name', + valueField: 'code' + }, + filterable: true, + } + }, + formatter: (_: Recordable, __: TableColumn, cellValue: string) => { + return workshopNoPage.find((item) => item.code == cellValue)?.name + }, + }, + { + label: '车间编号', + field: 'workshopName', + sort: 'custom', + isSearch: false, + isDetail: false, + isForm: true, + isTable: false, + isTableForm: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择车间代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '车间信息', // 查询弹窗标题 + searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类 + searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法 + disable:true, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, + }, + { + label: '产线编号', + field: 'lineCode', + sort: 'custom', + isSearch: true, + isDetail: false, + isForm: false, + isTable: true, + isTableForm: false, + search: { + component: 'Select', + componentProps: { + options: productionlineNoPage, + optionsAlias: { + labelField: 'name', + valueField: 'code' + }, + filterable: true, + } + }, + formatter: (_: Recordable, __: TableColumn, cellValue: string) => { + return productionlineNoPage.find((item) => item.code == cellValue)?.name + }, + }, + { + label: '产线编号', + field: 'lineName', + sort: 'custom', + isSearch: false, + isDetail: false, + isForm: true, + isTable: false, + isTableForm: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + multiple:true, + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '生产线信息', // 查询弹窗标题 + searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 + searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法 + searchCondition: [{ + key:'workshopCode', + value:'workshopCode', + message: '请填写车间代码!', + isMainValue: true + },{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, + // { + // label: '工序编号', + // field: 'processCode', + // sort: 'custom', + // isSearch: true, + // form:{ + // componentProps: { + // isSearchList: true, + // searchListPlaceholder: '请选择工序代码', + // searchField: 'code', + // searchTitle: '工序信息', + // searchAllSchemas: Process.allSchemas, + // searchPage: ProcessApi.getProcessPage, + // searchCondition: [{ + // key:'productionLineCode', + // value:'lineCode', + // message: '请填写生产线代码!', + // isMainValue: true + // },{ + // key:'workshopCode', + // value:'workshopCode', + // message: '请填写车间代码!', + // isMainValue: true + // },{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }] + // } + // }, + // }, + // { + // label: '工位编号', + // field: 'workstationCode', + // sort: 'custom', + // isSearch: true, + // form:{ + // componentProps: { + // isSearchList: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择工位', // 输入框占位文本 + // searchField: 'code', // 查询弹窗赋值字段 + // searchTitle: '工位信息', // 查询弹窗标题 + // searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类 + // searchPage: WorkStationApi.getWorkstationPage, // 查询弹窗所需分页方法 + // searchCondition: [{ + // key:'productionLineCode', + // value:'lineCode', + // message: '请填写生产线代码!', + // isMainValue: true + // },{ + // key:'workshopCode', + // value:'workshopCode', + // message: '请填写车间代码!', + // isMainValue: true + // },{ + // key:'available', + // value:'TRUE', + // isMainValue: false + // }] + // } + // }, + // }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: false, + form: { + component: 'Input', + componentProps: { + type: 'textarea', + } + } + }, + // { + // label: '是否可用', + // field: 'available', + // sort: 'custom', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + // isSearch: false, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // } + // }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/eam/toolEquipmentOut/index.vue b/src/views/eam/toolEquipmentOut/index.vue new file mode 100644 index 000000000..e8238edef --- /dev/null +++ b/src/views/eam/toolEquipmentOut/index.vue @@ -0,0 +1,253 @@ + + + diff --git a/src/views/eam/toolEquipmentOut/toolEquipmentOut.data.ts b/src/views/eam/toolEquipmentOut/toolEquipmentOut.data.ts new file mode 100644 index 000000000..ceb0b8f5d --- /dev/null +++ b/src/views/eam/toolEquipmentOut/toolEquipmentOut.data.ts @@ -0,0 +1,230 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import { ToolAccounts} from '../toolAccounts/toolAccounts.data' +import * as ToolAccountsApi from '@/api/eam/toolAccounts' +import * as UserApi from '@/api/system/user' +const toolAccountsListNoPage = await ToolAccountsApi.getToolAccountsNoPage({}); +const userListNoPage = await UserApi.getSimpleUserList(); + +// 表单校验 +export const ToolEquipmentOutRules = reactive({ + theme: [required], + toolCode: [required], + type: [required], + qty: [required], + status: [required], + applyer: [required], + concurrencyStamp: [required] +}) + +export const ToolEquipmentOut = useCrudSchemas(reactive([ + { + label: '工装', + field: 'toolCode', + sort: 'custom', + isSearch: true, + isDetail: false, + isForm: false, + isTable: true, + isTableForm: false, + search: { + component: 'Select', + componentProps: { + options: toolAccountsListNoPage, + optionsAlias: { + labelField: 'name', + valueField: 'code' + }, + filterable: true, + } + }, + formatter: (_: Recordable, __: TableColumn, cellValue: string) => { + return toolAccountsListNoPage.find((item) => item.code == cellValue)?.name + }, + }, + { + label: '工装', + field: 'toolName', + sort: 'custom', + isSearch: false, + isDetail: false, + isForm: true, + isTable: false, + isTableForm: false, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择工装', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '工装信息', // 查询弹窗标题 + searchAllSchemas: ToolAccounts.allSchemas, // 查询弹窗所需类 + searchPage: ToolAccountsApi.getToolAccountsPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, + }, + { + label: '出库主题', + field: 'theme', + sort: 'custom', + isSearch: true + }, + { + label: '出库类型', + field: 'type', + sort: 'custom', + dictType: DICT_TYPE.TOOL_OUT_TYPE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isSearch: true, + form: { + component: 'Select' + } + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + isSearch: false, + form: { + component: 'InputNumber', + value: 0 + } + }, + { + label: '流程状态', + field: 'status', + sort: 'custom', + isSearch: true, + dictType: DICT_TYPE.JOB_STATUS, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + form: { + component: 'Select', + } + }, + { + label: '出库申请人', + field: 'applyer', + sort: 'custom', + isSearch: true, + form: { + component: 'Select', + componentProps: { + options: userListNoPage, + optionsAlias: { + labelField: 'nickname', + valueField: 'id' + } + } + }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userListNoPage.find((item) => item.id == cellValue)?.nickname + }, + }, + { + label: '审核人', + field: 'approver', + sort: 'custom', + isSearch: true, + form: { + component: 'Select', + componentProps: { + options: userListNoPage, + optionsAlias: { + labelField: 'nickname', + valueField: 'id' + } + } + }, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userListNoPage.find((item) => item.id == cellValue)?.nickname + }, + }, + { + label: '审核内容', + field: 'approveContent', + sort: 'custom', + isSearch: false, + form: { + component: 'Input', + componentProps: { + type: 'textarea', + } + } + }, + { + label: '审核时间', + field: 'approveTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } + } + }, + { + label: '自动审核', + field: 'autoExamine', + sort: 'custom', + isForm: false, + }, + { + label: '自动通过', + field: 'autoAgree', + sort: 'custom', + isForm: false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: false, + form: { + component: 'Input', + componentProps: { + type: 'textarea', + } + } + }, + // { + // label: '是否可用', + // field: 'available', + // sort: 'custom', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + // isSearch: false, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // } + // }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +]))