From a34797cdcf80833f5f171578cb696b4018e2b1ca Mon Sep 17 00:00:00 2001 From: gaojs <757918719@qq.com> Date: Wed, 8 May 2024 11:38:13 +0800 Subject: [PATCH] =?UTF-8?q?MES=E2=80=94=E2=80=94>=20=E5=8F=AB=E6=96=99?= =?UTF-8?q?=E8=A1=A5=E6=96=99=20=E4=B8=BB=E5=AD=90=E6=98=8E=E7=BB=86?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/itemRequestDetail/index.ts | 56 ++++++ src/views/mes/components/Detail.vue | 9 +- src/views/mes/itemRequestMain/index.vue | 29 ++- .../itemRequestMain/itemRequestMain.data.ts | 181 +++++++++++++++--- src/views/mes/qualityform/index.vue | 2 +- 5 files changed, 239 insertions(+), 38 deletions(-) create mode 100644 src/api/mes/itemRequestDetail/index.ts diff --git a/src/api/mes/itemRequestDetail/index.ts b/src/api/mes/itemRequestDetail/index.ts new file mode 100644 index 000000000..dd253bc78 --- /dev/null +++ b/src/api/mes/itemRequestDetail/index.ts @@ -0,0 +1,56 @@ +import request from '@/config/axios' + +export interface ItemRequestDetailVO { + deleteTime: Date + id: number + status: string + concurrencyStamp: number + remark: string + deleter: string + requestBillNo: string + itemBasicCode: string + itemCounts: number + itemUom: string + siteId: number +} + +// 查询叫料申请明细列表 +export const getItemRequestDetailPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/mes/item-request-detail/senior', data }) + } else { + return await request.get({ url: `/mes/item-request-detail/page`, params }) + } +} + +// 查询叫料申请明细详情 +export const getItemRequestDetail = async (id: number) => { + return await request.get({ url: `/mes/item-request-detail/get?id=` + id }) +} + +// 新增叫料申请明细 +export const createItemRequestDetail = async (data: ItemRequestDetailVO) => { + return await request.post({ url: `/mes/item-request-detail/create`, data }) +} + +// 修改叫料申请明细 +export const updateItemRequestDetail = async (data: ItemRequestDetailVO) => { + return await request.put({ url: `/mes/item-request-detail/update`, data }) +} + +// 删除叫料申请明细 +export const deleteItemRequestDetail = async (id: number) => { + return await request.delete({ url: `/mes/item-request-detail/delete?id=` + id }) +} + +// 导出叫料申请明细 Excel +export const exportItemRequestDetail = async (params) => { + return await request.download({ url: `/mes/item-request-detail/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/mes/item-request-detail/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/mes/components/Detail.vue b/src/views/mes/components/Detail.vue index a5072d7e9..9e3ef06ea 100644 --- a/src/views/mes/components/Detail.vue +++ b/src/views/mes/components/Detail.vue @@ -533,7 +533,8 @@ const change = (item, index) => { const masterParmas = ref({ masterId: '', //主表id number: '', //主表单据号 - status: '' //主表状态 用于控制子表新增编辑按钮显示情况 + status: '', //主表状态 用于控制子表新增编辑按钮显示情况 + requestBillNo:'' //自定义 }) // 列表头部按钮 @@ -578,13 +579,15 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: } count.value++ // 加载明细列表 - if (!props.isBasic) { + if (!props.isBasic && !props.isBasicMes) { // 设置主表id masterParmas.value.masterId = row.masterId||row.id masterParmas.value.number = row.number masterParmas.value.status = row.status + masterParmas.value.requestBillNo = row.requestBillNo tableObjectRef.value.params = { - masterId: row.masterId||row.id + masterId: row.masterId||row.id, + requestBillNo:row.requestBillNo } await getList() } diff --git a/src/views/mes/itemRequestMain/index.vue b/src/views/mes/itemRequestMain/index.vue index 6db2e2d19..ec23d1d99 100644 --- a/src/views/mes/itemRequestMain/index.vue +++ b/src/views/mes/itemRequestMain/index.vue @@ -27,9 +27,9 @@ v-model:currentPage="tableObject.currentPage" v-model:sort="tableObject.sort" > -