diff --git a/src/api/mes/orderDay/index.ts b/src/api/mes/orderDay/index.ts new file mode 100644 index 000000000..c4c95d3a0 --- /dev/null +++ b/src/api/mes/orderDay/index.ts @@ -0,0 +1,74 @@ +import request from '@/config/axios' + +export interface OrderDayVO { + status: string + remark: string + planNoMonth: string + planNoDay: string + productCode: string + workroomCode: string + lineCode: string + planCount: number + processrouteCode: string + tempProcessroute: string + standardBom: string + tempBom: string + workMode: string + planDate: Date + startTime: Date + endTime: Date + taskMode: string +} + +// 查询生产日计划列表 +export const getOrderDayPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/orderday/senior', data }) + } else { + return await request.get({ url: `/mes/orderday/page`, params }) + } +} + +// 查询生产日计划详情 +export const getOrderDay = async (id: number) => { + return await request.get({ url: `/mes/orderday/get?id=` + id }) +} + +// 新增生产日计划 +export const createOrderDay = async (data: OrderDayVO) => { + return await request.post({ url: `/mes/orderday/create`, data }) +} + +// 修改生产日计划 +export const updateOrderDay = async (data: OrderDayVO) => { + return await request.put({ url: `/mes/orderday/update`, data }) +} + +// 删除生产日计划 +export const deleteOrderDay = async (id: number) => { + return await request.delete({ url: `/mes/orderday/delete?id=` + id }) +} + +// 导出生产日计划 Excel +export const exportOrderDay = async (params) => { + return await request.download({ url: `/mes/orderday/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/mes/orderday/get-import-template' }) +} +// 根据产品编码获取Bom +export const getBoms = async (code: String) => { + return request.get({ url: '/mes/common/geBomByProductCode?code='+code }) +} +// 根据产品编码获取工艺路线 +export const getProcessroutes = async (code: String) => { + return request.get({ url: '/mes/common/getProcessRouteByProductCode?code='+code }) +} +// 根据车间编码获取产线列表 +export const getProductlines = async (code: String) => { + return request.get({ url: '/mes/common/getLinesByWorkRoomCode?code='+code }) +} diff --git a/src/components/SearchTable/src/SearchTable.vue b/src/components/SearchTable/src/SearchTable.vue index 299c1070b..aaaabe0ad 100644 --- a/src/components/SearchTable/src/SearchTable.vue +++ b/src/components/SearchTable/src/SearchTable.vue @@ -48,11 +48,18 @@ routeName.value = route.name const searchDialogVisible = ref(false) // 弹窗的是否展示 const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 - +const filterButtonOptions=ref({ + label: '筛选', + name: 'filtrate', + hide: false, + type: 'info', + icon: 'ep:operation', + color: '', + float:'right', + hasPermi: '' + }) // 列表头部按钮 -const HeadButttondata = [ - defaultButtons.defaultFilterBtn(null), // 筛选 -] +const HeadButttondata = ref() /** 打开弹窗 */ const getListRef = ref() @@ -67,8 +74,12 @@ const typeRef = ref() const rowRef = ref() const allSchemasRef = ref() const multipleBol = ref(false) + const searchConditionRef = ref() -const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, searchField: any,multiple: any, type: any, row: any, searchCondition:any , isCountRequestRe:any ) => { +const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, searchField: any,multiple: any, type: any, row: any, searchCondition:any , isCountRequestRe:any,isSearchFilterButtonHide:any ) => { + filterButtonOptions.value.hide=isSearchFilterButtonHide?isSearchFilterButtonHide:false + HeadButttondata.value=[ defaultButtons.defaultFilterBtn(filterButtonOptions.value)], // 筛选] + //console.log(filterButtonOptions.value) searchDialogVisible.value = true formFieldRef.value = formField searchFieldRef.value = searchField @@ -87,13 +98,14 @@ const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, s tableObjectRef.value = tableObject searchConditionRef.value = searchCondition if (searchCondition) tableObjectRef.value.params = searchCondition; - + // 获得表格的各种操作 const { getList } = tableMethods // setSearchParamsRef.value = setSearchParams setSearchParamsRef.value = tableObject.params getListRef.value = getList getList() + } // 筛选提交 diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 4dc76cd96..97d17d36b 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -276,4 +276,9 @@ export enum DICT_TYPE { PACK_UNIT_TYPE = 'pack_unit_type', // 包装规格类型 TRANSFER_REASON = 'transfer_reason', // 调拨出入库原因 PURCHASERECEIPT_SOURCE_TYPE="purchasereceipt_source_type",//采购收货数据来源 +// ========== 业务 - mes ========== + MESDO_STATUS= 'mes_do_status', // 工单执行状态 + MES_WORKBILL_MODEL='mes_workbill_model',// 工单模式 单工单(根据产品数量生成多个工单)、批量工单(一个产品一个工单) + MES_TASK_MODE='mes_task_mode', //生产模式 派工方式、领工方式 + MES_PLANDO_STATUS='mes_plando_status' //计划执行状态 } diff --git a/src/views/mes/orderDay/components/BasicFormV2.vue b/src/views/mes/orderDay/components/BasicFormV2.vue new file mode 100644 index 000000000..4a242098b --- /dev/null +++ b/src/views/mes/orderDay/components/BasicFormV2.vue @@ -0,0 +1,559 @@ + + + diff --git a/src/views/mes/orderDay/components/Detail.vue b/src/views/mes/orderDay/components/Detail.vue new file mode 100644 index 000000000..4b25bc3ee --- /dev/null +++ b/src/views/mes/orderDay/components/Detail.vue @@ -0,0 +1,597 @@ + + + + + diff --git a/src/views/mes/orderDay/index.vue b/src/views/mes/orderDay/index.vue new file mode 100644 index 000000000..4ed4babe6 --- /dev/null +++ b/src/views/mes/orderDay/index.vue @@ -0,0 +1,323 @@ + + + diff --git a/src/views/mes/orderDay/orderDay.data.ts b/src/views/mes/orderDay/orderDay.data.ts new file mode 100644 index 000000000..ddaf2c82a --- /dev/null +++ b/src/views/mes/orderDay/orderDay.data.ts @@ -0,0 +1,327 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import * as ItembasicApi from '@/api/wms/itembasic' +import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' +import * as WorkshopApi from '@/api/wms/workshop' +import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data' +import { on } from '@/utils/domUtils' + +// 表单校验 +export const OrderDayRules = reactive({ + planNoDay: [ + { required: true, message: '请输入一个日计划编号', trigger: 'blur' } + ], + planNoMonth: [ + { required: true, message: '请输入一个月计划编号', trigger: 'blur' } + ], + productCode: [ + { required: true, message: '请选择一个产品', trigger: 'blur' } + ], + workroomCode: [ + { required: true, message: '请选择一个车间', trigger: 'blur' } + ], + lineCode: [ + { required: true, message: '请选择一个产线', trigger: 'blur' } + ], + workMode: [ + { required: true, message: '请选择工单生成方式', trigger: 'blur' } + ], + startTime: [ + { required: true, message: '请输入计划生产开始时间', trigger: 'blur' } + ], + endTime: [ + { required: true, message: '请输入计划生产完成时间', trigger: 'blur' } + ], + planDate: [ + { required: true, message: '请输入计划日期', trigger: 'blur' } + ], + taskMode: [ + { required: true, message: '请选择一个生产方式', trigger: 'blur' } + ], +}) + +export const OrderDay = useCrudSchemas(reactive([ + { + label: '主键', + field: 'id', + sort: 'custom', + isForm: false, + width: '60px', + }, + { + label: '日计划单号', + field: 'planNoDay', + sort: 'custom', + isSearch: true, + required: true, + }, + { + label: '月计划单号', + field: 'planNoMonth', + sort: 'custom', + isSearch: true, + required: false, + }, + { + label: '状态', + field: 'status', + sort: 'custom', + isForm: false, + isTable: true, + isDetail:true, + isSearch: false, + width: '80px', + dictType: DICT_TYPE.MES_PLANDO_STATUS, + dictClass: 'string', + form: { + component: 'Select', + }, + }, + { + label: '产品编号', + field: 'productCode', + sort: 'custom', + isSearch: true, + required: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '产品编码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '产品信息', // 查询弹窗标题 + searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类 + searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法 + isHideFilterButton:true, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'type', + action: 'in', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + value: 'FG,SEMI',//,SEMI] + isMainValue: false + }, + + ] + } + } + }, + { + label: '车间编码', + field: 'workroomCode', + sort: 'custom', + isSearch: true, + required: 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: 'lineCode', + sort: 'custom', + isSearch: true, + required: true, + form:{ + component:'Select', + componentProps:{ + options:[{lablel:'1',value:'1'}] + } + } + }, + { + label: '计划数量', + field: 'planCount', + sort: 'custom', + required: true, + form: { + component: 'InputNumber', + value: 1 + }, + }, + { + label: '工艺路线编码', + field: 'processrouteCode', + sort: 'custom', + form: { + component:'Select', + componentProps: { + options: [] + } + } + }, + { + label: '临时工艺', + field: 'tempProcessroute', + sort: 'custom', + width: '80px', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + }, + }, + { + label: 'BOM编码', + field: 'standardBom', + sort: 'custom', + form: { + component:'Select', + componentProps: { + options: [{lablel:'bom',value:'bom'}] + } + } + }, + { + label: '替代BOM', + field: 'tempBom', + sort: 'custom', + width: '80px', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + } + } + }, + { + label: '工单模式', + field: 'workMode', + width: '80px', + sort: 'custom', + dictType: DICT_TYPE.MES_WORKBILL_MODEL, + dictClass: 'string', + form: { + component: 'Select', + value: 'BATCH', + }, + }, + { + label: '计划日期', + field: 'planDate', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + type: 'date', + valueFormat: 'YYYY-MM-DD', + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'date', + valueFormat: 'x' + } + }, + }, + { + label: '开始时间', + field: 'startTime', + sort: 'custom', + formatter: dateFormatter, + required: true, + form: { + component: 'TimePicker', + componentProps: { + type: 'time', + dateFormat: 'HH:mm', + //valueFormat: 'x', + } + }, + }, + { + label: '结束时间', + field: 'endTime', + sort: 'custom', + formatter: dateFormatter, + isReadonly:true, + form: { + component: 'TimePicker', + componentProps: { + type: 'time', + dateFormat: 'HH:mm', + } + }, + }, + { + label: '生产模式', + field: 'taskMode', + width : '80px', + sort: 'custom', + dictType: DICT_TYPE.MES_TASK_MODE, + dictClass: 'string', + form: { + component: 'Select', + value:'ASSIGN' + }, + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'datetime', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false, + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: true, + isForm: false, + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: false, + isTable:false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 200, + fixed: 'right' + } + } +])) diff --git a/src/views/mes/processroute/components/configDialog.vue b/src/views/mes/processroute/components/configDialog.vue index 3f041b99b..5e1be6f27 100644 --- a/src/views/mes/processroute/components/configDialog.vue +++ b/src/views/mes/processroute/components/configDialog.vue @@ -43,7 +43,27 @@ -
+
+ + + + + + + + + + + @@ -65,7 +85,10 @@ 设备信息 -

{{ item.name }}

+ + + +
人员信息 -

{{ item.name }}

+ + + + +
工位信息 -

工位编码:{{ workStationData.name }}

-

工位名称:{{ workStationData.code }}

+ + + + +
@@ -94,6 +124,11 @@