From f06e50bede1a9ae1f7a779195971d048348b3866 Mon Sep 17 00:00:00 2001 From: zhousq Date: Mon, 29 Apr 2024 09:35:40 +0800 Subject: [PATCH 1/6] =?UTF-8?q?2024-04-29=20=E4=BF=AE=E5=A4=8D=E5=B7=A5?= =?UTF-8?q?=E5=BA=8F=E6=9F=A5=E8=AF=A2=E7=9A=84searchtable=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/reportpStore/index.ts | 56 ++++ .../mes/orderDay/components/schedule.vue | 23 +- .../processroute/components/configDialog.vue | 2 +- src/views/mes/reportpStore/index.vue | 244 ++++++++++++++++++ .../mes/reportpStore/reportpStore.data.ts | 111 ++++++++ 5 files changed, 424 insertions(+), 12 deletions(-) create mode 100644 src/api/mes/reportpStore/index.ts create mode 100644 src/views/mes/reportpStore/index.vue create mode 100644 src/views/mes/reportpStore/reportpStore.data.ts diff --git a/src/api/mes/reportpStore/index.ts b/src/api/mes/reportpStore/index.ts new file mode 100644 index 000000000..adb29ea36 --- /dev/null +++ b/src/api/mes/reportpStore/index.ts @@ -0,0 +1,56 @@ +import request from '@/config/axios' + +export interface ReportpStoreVO { + status: string + remark: string + planDayCode: string + workBillNo: string + batchCode: string + reportUuid: string + itemBasicCode: string + itemCounts: number + itemUom: string + workstationCode: string + productCode: string +} + +// 查询工序报工物料明细列表 +export const getReportpStorePage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/reportp-store/senior', data }) + } else { + return await request.get({ url: `/mes/reportp-store/page`, params }) + } +} + +// 查询工序报工物料明细详情 +export const getReportpStore = async (id: number) => { + return await request.get({ url: `/mes/reportp-store/get?id=` + id }) +} + +// 新增工序报工物料明细 +export const createReportpStore = async (data: ReportpStoreVO) => { + return await request.post({ url: `/mes/reportp-store/create`, data }) +} + +// 修改工序报工物料明细 +export const updateReportpStore = async (data: ReportpStoreVO) => { + return await request.put({ url: `/mes/reportp-store/update`, data }) +} + +// 删除工序报工物料明细 +export const deleteReportpStore = async (id: number) => { + return await request.delete({ url: `/mes/reportp-store/delete?id=` + id }) +} + +// 导出工序报工物料明细 Excel +export const exportReportpStore = async (params) => { + return await request.download({ url: `/mes/reportp-store/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/mes/reportp-store/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/mes/orderDay/components/schedule.vue b/src/views/mes/orderDay/components/schedule.vue index cc2d11429..88127320a 100644 --- a/src/views/mes/orderDay/components/schedule.vue +++ b/src/views/mes/orderDay/components/schedule.vue @@ -25,12 +25,12 @@ @@ -40,11 +40,11 @@ - From 73b12ba6d1d931582a1f32f56a7e95b6c5d7dfa1 Mon Sep 17 00:00:00 2001 From: zhousq Date: Mon, 29 Apr 2024 11:34:57 +0800 Subject: [PATCH 6/6] =?UTF-8?q?2024-04-29=20=E4=BF=AE=E5=A4=8D=E5=B7=A5?= =?UTF-8?q?=E8=89=BA=E8=B7=AF=E7=BA=BF=E9=85=8D=E7=BD=AE=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E5=B7=A5=E5=BA=8FBOM=E5=85=B3=E8=81=94=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/processroute/index.ts | 6 ++-- .../processroute/components/configDialog.vue | 33 ++++++++++++------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/src/api/mes/processroute/index.ts b/src/api/mes/processroute/index.ts index b18879dc3..c889e2dff 100644 --- a/src/api/mes/processroute/index.ts +++ b/src/api/mes/processroute/index.ts @@ -82,9 +82,9 @@ export const getPatternPage = async (code:String) => { return await request.get({ url: `/mes/mes-process-pattern/pagePatternByProcessCode?pageSize=25&processCode=`+code }) } -// 查询物料列表 -export const getItembasicPage = async (code:String) => { - return await request.get({ url: `/mes/mes-process-itembasic/pageByProcessCode?pageSize=25&processCode=`+code}) +// 查询产品物料列表 +export const getProcessBomList = async (params) => { + return await request.get({ url: `/mes/common/getBomListByProductAndProcess`,params}) } export const getWorkstationPage = async (code:String) => { diff --git a/src/views/mes/processroute/components/configDialog.vue b/src/views/mes/processroute/components/configDialog.vue index 2193afb2d..c10f2af27 100644 --- a/src/views/mes/processroute/components/configDialog.vue +++ b/src/views/mes/processroute/components/configDialog.vue @@ -96,10 +96,11 @@ - - = - - + + + + + @@ -210,6 +211,7 @@ const deleteNode=(row)=>{ processData.value.splice(processData.value.indexOf(row),1) graph.value.removeNode(row.code) } +const productCode=ref() //初始化图形组件 const graph = ref() const rowData = ref() @@ -219,6 +221,7 @@ const openDetail = (row: any) => { titleNameRef.value = rowData.value.processrouteCode titleValueRef.value = rowData.value.processName processRouteId.value = rowData.value.id + productCode.value=rowData.value.productCode routeVersion.value=rowData.value.routeVersion remarksData.data = { tableId: rowData.value.id, @@ -261,11 +264,17 @@ const getProcessInfo = async (id: any) => { /** 获取产品信息 */ const getItembasicInfo = async (code: String) => { const res = await ProcessrouteApi.getProductInfo(code) + console.log('productData',res) productData.value = res } /** 获取物料列表 */ -const getItembasicPage = async (code) => { - return await ProcessrouteApi.getItembasicPage(code); +const getProcessBomList = async (pcode,processCode) => { + let params={ + code:pcode ,//"产品编码" + //version:version,//bom版本" + processCode:processCode + } + return await ProcessrouteApi.getProcessBomList(params); } /** 查询模具基本信息列表 */ const getPatternPage = async (code) => { @@ -290,7 +299,7 @@ const getWorkstationPage = async (code) => { // } /**获取工艺路线定义的工序列表 */ const getProcessList = async (code) => { - console.log('code',code) + //console.log('code',code) const res = await ProcessrouteApi.getProcessrouteNodeList(code) processData.value = res //return res @@ -299,15 +308,15 @@ const getProcessList = async (code) => { const nodeClick = (e, x, y, node, view) => { Promise.all([ getProcessInfo(node.id), - getItembasicPage(node.id), + getProcessBomList(productCode.value,node.id), getPatternPage(node.id), getWorkstationPage(node.id) - ]).then(([processIndoList,itembasicPage, patternPage,workstationInfoList]) => { + ]).then(([processIndoList,basicBom, patternPage,workstationInfoList]) => { // 在这里处理所有异步操作的结果 - message.info(JSON.stringify(processIndoList)) - console.log(processIndoList) + //message.info(JSON.stringify(processIndoList)) + console.log('basicBom',basicBom) //获取绑定的物料信息 - materialData.value = itembasicPage.list + materialData.value = basicBom //获取绑定的模具信息 mouldData.value = patternPage.list //获取绑定的工位信息