From da218cfd0e2bb8b3353c18ffbb25a3a49c114f3d Mon Sep 17 00:00:00 2001 From: zhousq Date: Wed, 27 Mar 2024 16:43:40 +0800 Subject: [PATCH 1/8] =?UTF-8?q?2024-3-27=20=E6=96=B0=E5=A2=9E=E6=97=A5?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=BF=AE=E6=94=B9?= =?UTF-8?q?SearchTable=E5=8F=AF=E8=AE=BE=E7=BD=AE=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E7=9A=84=E9=9A=90=E8=97=8F=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/orderDay/index.ts | 74 +++ .../SearchTable/src/SearchTable.vue | 24 +- src/utils/dict.ts | 5 + .../mes/orderDay/components/BasicFormV2.vue | 559 ++++++++++++++++ src/views/mes/orderDay/components/Detail.vue | 597 ++++++++++++++++++ src/views/mes/orderDay/index.vue | 323 ++++++++++ src/views/mes/orderDay/orderDay.data.ts | 327 ++++++++++ .../processroute/components/configDialog.vue | 108 +++- .../mes/processroute/processroute.data.ts | 2 +- 9 files changed, 2006 insertions(+), 13 deletions(-) create mode 100644 src/api/mes/orderDay/index.ts create mode 100644 src/views/mes/orderDay/components/BasicFormV2.vue create mode 100644 src/views/mes/orderDay/components/Detail.vue create mode 100644 src/views/mes/orderDay/index.vue create mode 100644 src/views/mes/orderDay/orderDay.data.ts 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 @@ + diff --git a/src/views/mes/orderDay/index.vue b/src/views/mes/orderDay/index.vue index 4ed4babe6..f22c2a46c 100644 --- a/src/views/mes/orderDay/index.vue +++ b/src/views/mes/orderDay/index.vue @@ -92,7 +92,7 @@ const tableColumns = ref(OrderDay.allSchemas.tableColumns) const lineOptions=ref([]) const processRouteOptions=ref([]) const bomOptions=ref([]) -//**获取 工序信息 */ +//**获取 产品工艺路由列表 */ const getProcessroutes = async (code: String) => { processRouteOptions.value = await OrderDayApi.getProcessroutes(code) OrderDay.allSchemas.formSchema.forEach(item => { @@ -102,6 +102,7 @@ const getProcessroutes = async (code: String) => { } }) } +//**获取 车间产线列表 */ const getProductlines = async (code: String) => { lineOptions.value = await OrderDayApi.getProductlines(code) OrderDay.allSchemas.formSchema.forEach(item => { diff --git a/src/views/mes/orderDay/orderDay.data.ts b/src/views/mes/orderDay/orderDay.data.ts index ddaf2c82a..1f9cd3889 100644 --- a/src/views/mes/orderDay/orderDay.data.ts +++ b/src/views/mes/orderDay/orderDay.data.ts @@ -305,7 +305,7 @@ export const OrderDay = useCrudSchemas(reactive([ label: '创建者', field: 'creator', sort: 'custom', - isSearch: true, + isSearch: false, isForm: false, }, { From 58294a63c3ae0570d9511781d04544c272194d1f Mon Sep 17 00:00:00 2001 From: zhousq Date: Thu, 28 Mar 2024 08:22:56 +0800 Subject: [PATCH 3/8] =?UTF-8?q?2024-3-28=20=E5=A2=9E=E5=8A=A0searchtable?= =?UTF-8?q?=E7=9A=84open=E5=8F=82=E6=95=B0=EF=BC=8C=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E7=AD=9B=E9=80=89=E6=8C=89=E9=92=AE=E7=9A=84=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SearchTable/src/SearchTable.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SearchTable/src/SearchTable.vue b/src/components/SearchTable/src/SearchTable.vue index aaaabe0ad..d3f963134 100644 --- a/src/components/SearchTable/src/SearchTable.vue +++ b/src/components/SearchTable/src/SearchTable.vue @@ -74,7 +74,7 @@ const typeRef = ref() const rowRef = ref() const allSchemasRef = ref() const multipleBol = ref(false) - +//isSearchFilterButtonHide 增加筛选按钮显示隐藏 控制 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,isSearchFilterButtonHide:any ) => { filterButtonOptions.value.hide=isSearchFilterButtonHide?isSearchFilterButtonHide:false From e841037f5e6bd0af239eee1b54be7b6cd7627a86 Mon Sep 17 00:00:00 2001 From: zhousq Date: Thu, 28 Mar 2024 08:36:00 +0800 Subject: [PATCH 4/8] =?UTF-8?q?2024-3-28=20=E5=B0=91=E9=80=97=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/dict.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 237ab67ab..67ad62537 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -280,7 +280,7 @@ export enum DICT_TYPE { MESDO_STATUS= 'mes_do_status', // 工单执行状态 MES_WORKBILL_MODEL='mes_workbill_model',// 工单模式 单工单(根据产品数量生成多个工单)、批量工单(一个产品一个工单) MES_TASK_MODE='mes_task_mode', //生产模式 派工方式、领工方式 - MES_PLANDO_STATUS='mes_plando_status' //计划执行状态 + MES_PLANDO_STATUS='mes_plando_status', //计划执行状态 PLAN_PRODUCTION_TYPE = "plan_production_type", // 生产计划类型 DELIVER_TYPE="deliver_type",//发货类型 BILL_TYPE="bill_type", // 发票类型 From 1b7db2150a50c1920d4d4483caf73e24f4e47cd9 Mon Sep 17 00:00:00 2001 From: bjang03 Date: Thu, 28 Mar 2024 08:49:39 +0800 Subject: [PATCH 5/8] =?UTF-8?q?1=E3=80=81=E5=B7=A5=E4=BD=8D=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E9=A1=B5=E9=9D=A2=E5=85=B3=E8=81=94=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/workstation/index.ts | 156 +++++++++++++- src/utils/dict.ts | 2 +- src/views/mes/workstation/index.vue | 190 +++++++++++++++--- src/views/mes/workstation/workstation.data.ts | 163 ++++++++++++++- 4 files changed, 478 insertions(+), 33 deletions(-) diff --git a/src/api/mes/workstation/index.ts b/src/api/mes/workstation/index.ts index 1e8e44a8f..37694b15d 100644 --- a/src/api/mes/workstation/index.ts +++ b/src/api/mes/workstation/index.ts @@ -6,7 +6,9 @@ export interface WorkstationVO { expireTime: Date name: string } - +export const goalParams = { + workstationCode:null +} // 查询工位列表 export const getWorkstationPage = async (params) => { if (params.isSearch) { @@ -46,4 +48,154 @@ export const exportWorkstation = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/mes/workstation/get-import-template' }) -} \ No newline at end of file +}// 查询班组列表 +export const getTeamPage = async (params) => { + console.log(goalParams.workstationCode) + params.workstationCode = goalParams.workstationCode + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/team/senior', data }) + } else { + return await request.get({ url: `/mes/team/pageListByWorkstationCode`, params }) + } +} +// 查询选择班组列表 +export const checkTeamPageList = async (params) => { + console.log(goalParams.workstationCode) + params.workstationCode = goalParams.workstationCode + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/team/senior', data }) + } else { + return await request.get({ url: `/mes/team/pageCheckListByWorkstationCode`, params }) + } +} +// 添加班组关联 +export const createTeamRelation = async (workstationCode,teamCodes:string[]) => { + const data = { + workstationCode : workstationCode, + teamCodes : teamCodes + } + return await request.post({ url: `/mes/team/createRelation`, data }) +} + +// 删除班组关联 +export const deleteTeamRelation = async (workstationCode,teamCodes:string[]) => { + const data = { + workstationCode : workstationCode, + teamCodes : teamCodes + } + return await request.post({ url: `/mes/team/deleteRelation`, data }) +} +export const getEquipmentPage = async (params) => { + console.log(goalParams.workstationCode) + params.workstationCode = goalParams.workstationCode + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/equipment/senior', data }) + } else { + return await request.get({ url: `/mes/equipment/pageListByWorkstationCode`, params }) + } +} +// 查询选择设备列表 +export const checkEquipmentPageList = async (params) => { + console.log(goalParams.workstationCode) + params.workstationCode = goalParams.workstationCode + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/equipment/senior', data }) + } else { + return await request.get({ url: `/mes/equipment/pageCheckListByWorkstationCode`, params }) + } +} +// 添加设备关联 +export const createEquipmentRelation = async (workstationCode,equipmentCodes:string[]) => { + const data = { + workstationCode : workstationCode, + equipmentCodes : equipmentCodes + } + return await request.post({ url: `/mes/team/createRelation`, data }) +} + +// 删除设备关联 +export const deleteEquipmentRelation = async (workstationCode,equipmentCodes:string[]) => { + const data = { + workstationCode : workstationCode, + equipmentCodes : equipmentCodes + } + return await request.post({ url: `/mes/team/deleteRelation`, data }) +} +export const getProcessPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/production-process/senior', data }) + } else { + return await request.get({ url: `/mes/production-process/pageListByWorkstationCode`, params }) + } +} +export const checkProcessPageList = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/production-process/senior', data }) + } else { + return await request.get({ url: `/mes/production-process/pageCheckListByWorkstationCode`, params }) + } +} +// 添加工序关联 +export const createProcessRelation = async (workstationCode,processCodes:string[]) => { + const data = { + workstationCode : workstationCode, + processCodes : processCodes + } + return await request.post({ url: `/mes/production-process/createRelation`, data }) +} + +// 删除工序关联 +export const deleteProcessRelation = async (workstationCode,processCodes:string[]) => { + const data = { + workstationCode : workstationCode, + processCodes : processCodes + } + return await request.post({ url: `/mes/production-process/deleteRelation`, data }) +} +export const getProductionPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/production-process/senior', data }) + } else { + return await request.get({ url: `/mes/production-process/pageListByWorkstationCode`, params }) + } +} +export const checkProductionPageList = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/production-process/senior', data }) + } else { + return await request.get({ url: `/mes/production-process/pageCheckListByWorkstationCode`, params }) + } +} +// 添加产品关联 +export const createProductionRelation = async (workstationCode,productionCodes:string[]) => { + const data = { + workstationCode : workstationCode, + productionCodes : productionCodes + } + return await request.post({ url: `/mes/production-process/createRelation`, data }) +} + +// 删除产品关联 +export const deleteProductionRelation = async (workstationCode,productionCodes:string[]) => { + const data = { + workstationCode : workstationCode, + productionCodes : productionCodes + } + return await request.post({ url: `/mes/production-process/deleteRelation`, data }) +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 237ab67ab..67ad62537 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -280,7 +280,7 @@ export enum DICT_TYPE { MESDO_STATUS= 'mes_do_status', // 工单执行状态 MES_WORKBILL_MODEL='mes_workbill_model',// 工单模式 单工单(根据产品数量生成多个工单)、批量工单(一个产品一个工单) MES_TASK_MODE='mes_task_mode', //生产模式 派工方式、领工方式 - MES_PLANDO_STATUS='mes_plando_status' //计划执行状态 + MES_PLANDO_STATUS='mes_plando_status', //计划执行状态 PLAN_PRODUCTION_TYPE = "plan_production_type", // 生产计划类型 DELIVER_TYPE="deliver_type",//发货类型 BILL_TYPE="bill_type", // 发票类型 diff --git a/src/views/mes/workstation/index.vue b/src/views/mes/workstation/index.vue index 35f6f2dd1..fe96e49f1 100644 --- a/src/views/mes/workstation/index.vue +++ b/src/views/mes/workstation/index.vue @@ -4,15 +4,15 @@ - - + + @@ -51,26 +51,90 @@ /> - - + + + + + + diff --git a/src/views/mes/workstation/workstation.data.ts b/src/views/mes/workstation/workstation.data.ts index 611194817..21d49d7d0 100644 --- a/src/views/mes/workstation/workstation.data.ts +++ b/src/views/mes/workstation/workstation.data.ts @@ -1,11 +1,28 @@ -import type { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { dateFormatter } from '@/utils/formatTime' +import type {CrudSchema} from '@/hooks/web/useCrudSchemas' +import {dateFormatter} from '@/utils/formatTime' // 表单校验 export const WorkstationRules = reactive({ code: [required] }) +export const TabsList = [{ + label: "班组", + prop: 'Team', +}, + { + label: "设备", + prop: 'Equipment', + }, + { + label: "工序", + prop: 'Process', + }, + { + label: "产品", + prop: 'Production', + } +] export const Workstation = useCrudSchemas(reactive([ { @@ -46,26 +63,36 @@ export const Workstation = useCrudSchemas(reactive([ field: 'activeTime', sort: 'custom', formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, form: { component: 'DatePicker', componentProps: { + style: {width: '100%'}, type: 'datetime', - valueFormat: 'x' + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } - } + }, }, { label: '失效时间', field: 'expireTime', sort: 'custom', formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, form: { component: 'DatePicker', componentProps: { + style: {width: '100%'}, type: 'datetime', - valueFormat: 'x' + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', } - } + }, }, { label: '操作', @@ -77,3 +104,127 @@ export const Workstation = useCrudSchemas(reactive([ } } ])) +export const Team = useCrudSchemas(reactive([ + { + label: '代码', + field: 'code', + sort: 'custom', + isSearch: true, + isForm: false + }, + { + label: '名称', + field: 'name', + sort: 'custom', + isSearch: true, + isForm: false + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + }, + isTableForm:true, + } +])) +export const TeamSelect = useCrudSchemas(reactive([ + { + label: '代码', + field: 'code', + sort: 'custom', + isSearch: true, + isForm: false + }, + { + label: '名称', + field: 'name', + sort: 'custom', + isSearch: true, + isForm: false + } +])) +export const Equipment = useCrudSchemas(reactive([ + { + label: '代码', + field: 'code', + sort: 'custom', + isSearch: true, + isForm: false + }, + { + label: '名称', + field: 'name', + sort: 'custom', + isSearch: true, + isForm: false + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + }, + isTableForm:true, + } +])) +export const Process = useCrudSchemas(reactive([ + { + label: '代码', + field: 'code', + sort: 'custom', + isSearch: true, + isForm: false + }, + { + label: '名称', + field: 'name', + sort: 'custom', + isSearch: true, + isForm: false + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + }, + isTableForm:true, + } +])) +export const Production = useCrudSchemas(reactive([ + { + label: '代码', + field: 'code', + sort: 'custom', + isSearch: true, + isForm: false + }, + { + label: '名称', + field: 'name', + sort: 'custom', + isSearch: true, + isForm: false + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false , + table: { + width: 150, + fixed: 'right' + }, + isTableForm:true, + } +])) From 7cd0aa00f46b75267194f784aa8609e60e27290d Mon Sep 17 00:00:00 2001 From: chenfang Date: Thu, 28 Mar 2024 10:02:55 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E7=89=A9=E6=96=99=E5=BA=93=E5=8C=BA?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=8C=85=E8=A3=85=E8=A7=84=E6=A0=BC=E6=94=B9?= =?UTF-8?q?=EF=BC=9A=E7=89=A9=E6=96=99=E5=8C=85=E8=A3=85=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=EF=BC=8C=E5=8C=85=E8=A3=85=E8=A7=84=E6=A0=BC=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E7=88=B6=E5=8C=85=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../itemManage/itemarea/itemarea.data.ts | 36 ++++---- .../packageunit/packageunit.data.ts | 86 +++++++++---------- 2 files changed, 64 insertions(+), 58 deletions(-) diff --git a/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts b/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts index 43e97c5fd..58b11628f 100644 --- a/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts +++ b/src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts @@ -7,14 +7,12 @@ import { Itembasic } from '../itembasic/itembasic.data' import * as AreaApi from '@/api/wms/areabasic' import { Area } from '../../factoryModeling/areabasic/areabasic.data' -import * as LocationgroupApi from '@/api/wms/locationgroup' -import { Locationgroup } from '../../factoryModeling/locationgroup/locationgroup.data' - import * as LocationApi from '@/api/wms/location' import { Location } from '../../factoryModeling/location/location.data' -import * as PackageunitApi from '@/api/wms/packageunit' -import { Packageunit } from '../packageunit/packageunit.data' +import * as ItempackageApi from '@/api/wms/itempackage' +import { Itempackaging } from '../itempackage/itempackage.data' +import { t } from '@/hooks/web/useI18n' export const Itemarea = useCrudSchemas(reactive([ { @@ -97,15 +95,19 @@ export const Itemarea = useCrudSchemas(reactive([ // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择包装规格代码', // 输入框占位文本 + searchListPlaceholder: '请选择物料包装代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '包装规格基础信息', // 查询弹窗标题 - searchAllSchemas: Packageunit.allSchemas, // 查询弹窗所需类 - searchPage: PackageunitApi.getPackageunitPage, // 查询弹窗所需分页方法 + searchTitle: '物料包装信息', // 查询弹窗标题 + searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类 + searchPage: ItempackageApi.getItempackagingPage, // 查询弹窗所需分页方法 searchCondition: [{ key: 'available', value: 'TRUE', - isMainValue: false + },{ + key: 'itemCode', + value: 'itemCode', + message: "请选择物料代码", + isMainValue: true }] } } @@ -122,15 +124,19 @@ export const Itemarea = useCrudSchemas(reactive([ // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择包装规格代码', // 输入框占位文本 + searchListPlaceholder: '请选择物料包装代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '包装规格基础信息', // 查询弹窗标题 - searchAllSchemas: Packageunit.allSchemas, // 查询弹窗所需类 - searchPage: PackageunitApi.getPackageunitPage, // 查询弹窗所需分页方法 + searchTitle: '物料包装信息', // 查询弹窗标题 + searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类 + searchPage: ItempackageApi.getItempackagingPage, // 查询弹窗所需分页方法 searchCondition: [{ key: 'available', value: 'TRUE', - isMainValue: false + },{ + key: 'itemCode', + value: 'itemCode', + message: "请选择物料代码", + isMainValue: true }] } } diff --git a/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts b/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts index 6e3fd6394..25079eb5d 100644 --- a/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts +++ b/src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts @@ -3,7 +3,7 @@ import { dateFormatter } from '@/utils/formatTime' import { fa } from 'element-plus/es/locale' import * as PackageunitApi from '@/api/wms/packageunit' -export const PackageunitCopy = useCrudSchemas(reactive([ +export const Packageunit = useCrudSchemas(reactive([ { label: '包装代码', field: 'code', @@ -13,14 +13,29 @@ export const PackageunitCopy = useCrudSchemas(reactive([ width: 150 }, }, - { - label: '父包装代码', - field: 'parentCode', - sort: 'custom', - table: { - width: 150 - } - }, + // { + // label: '父包装代码', + // field: 'parentCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // componentProps: { + // isSearchList: true, + // searchListPlaceholder: '请选择父包装代码', + // searchField: 'code', + // searchTitle: '包装规格信息', + // searchAllSchemas: PackageunitCopy.allSchemas, + // searchPage: PackageunitApi.getPackageunitPage, + // searchCondition: [{ + // key: 'available', + // value: 'TRUE', + // isMainValue: false + // }] + // } + // } + // }, { label: '包装名称', field: 'name', @@ -270,7 +285,25 @@ export const PackageunitCopy = useCrudSchemas(reactive([ } ])) -export const Packageunit = useCrudSchemas(reactive([ +// 表单校验 +export const PackageunitRules = reactive({ + code: [ + { required: true, message: '请输入包装代码', trigger: 'change' } + ], + name: [ + { required: true, message: '请输入包装名称', trigger: 'change' } + ], + type: [ + { required: true, message: '请选择包装类型', trigger: 'change' } + ], + desc: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' }, + { required: true, message: '请输入包装描述', trigger: 'change' } + ], +}) + +//已取消 保留只是为了预防日后使用 +export const PackageunitCopy = useCrudSchemas(reactive([ { label: '包装代码', field: 'code', @@ -286,21 +319,6 @@ export const Packageunit = useCrudSchemas(reactive([ sort: 'custom', table: { width: 150 - }, - form: { - componentProps: { - isSearchList: true, - searchListPlaceholder: '请选择父包装代码', - searchField: 'code', - searchTitle: '包装规格信息', - searchAllSchemas: PackageunitCopy.allSchemas, - searchPage: PackageunitApi.getPackageunitPage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] - } } }, { @@ -551,21 +569,3 @@ export const Packageunit = useCrudSchemas(reactive([ } } ])) - -// 表单校验 -export const PackageunitRules = reactive({ - code: [ - { required: true, message: '请输入包装代码', trigger: 'change' } - ], - name: [ - { required: true, message: '请输入包装名称', trigger: 'change' } - ], - type: [ - { required: true, message: '请选择包装类型', trigger: 'change' } - ], - desc: [ - { max: 50, message: '不得超过50个字符', trigger: 'blur' }, - { required: true, message: '请输入包装描述', trigger: 'change' } - ], -}) - From 55e6be62ae46feac8164b9955b9cd5800b087112 Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Thu, 28 Mar 2024 10:15:07 +0800 Subject: [PATCH 7/8] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E6=94=B9=E5=A4=87?= =?UTF-8?q?=E6=B3=A8=EF=BC=8C=E9=99=84=E4=BB=B6=EF=BC=8C=E5=8F=98=E6=9B=B4?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E4=BD=8D=E7=BD=AE=202=E3=80=81=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=A1=86=E7=A7=BB=E5=8A=A8=E8=8F=9C=E5=8D=95=E6=A0=8F?= =?UTF-8?q?=EF=BC=88=E9=9A=90=E8=97=8F=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Annex/src/Annex.vue | 13 ++++----- .../ChangeRecord/src/ChangeRecord.vue | 9 ++++--- .../Descriptions/src/Descriptions.vue | 14 +++++----- src/components/Detail/src/Detail.vue | 27 ++++++++++++++----- src/components/Remarks/src/Remarks.vue | 22 +++++++-------- src/layout/components/useRenderLayout.tsx | 17 +++++++++++- 6 files changed, 66 insertions(+), 36 deletions(-) diff --git a/src/components/Annex/src/Annex.vue b/src/components/Annex/src/Annex.vue index 4cae5c2e1..b61fd7ea5 100644 --- a/src/components/Annex/src/Annex.vue +++ b/src/components/Annex/src/Annex.vue @@ -2,14 +2,15 @@