From 0fc1deae43590aea12edb1d65bbfd0dc039d2c74 Mon Sep 17 00:00:00 2001 From: zhousq Date: Tue, 14 May 2024 14:08:00 +0800 Subject: [PATCH] =?UTF-8?q?2024-05-14=E5=B7=A5=E5=BA=8F=E6=8A=A5=E5=B7=A5?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E4=BF=AE=E6=94=B9=E8=AF=A5=EF=BC=8C=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=BC=98=E5=8C=96=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/workScheduling/index.ts | 6 +- src/api/mes/workSchedulingDetail/index.ts | 4 + .../mes/workScheduling/components/Detail.vue | 68 +++---- .../mes/workScheduling/components/report.vue | 166 +++++----------- .../workScheduling/components/reportAll.vue | 185 ++++++++++++++++++ src/views/mes/workScheduling/index.vue | 25 +-- 6 files changed, 288 insertions(+), 166 deletions(-) create mode 100644 src/views/mes/workScheduling/components/reportAll.vue diff --git a/src/api/mes/workScheduling/index.ts b/src/api/mes/workScheduling/index.ts index 7df13e502..d8cbe4a9e 100644 --- a/src/api/mes/workScheduling/index.ts +++ b/src/api/mes/workScheduling/index.ts @@ -52,10 +52,14 @@ export const importTemplate = () => { export const completeHandle = async (data) => { return await request.post({ url: `/mes/workScheduling/completeHandle`, data }) } -//报工 +//工序报工 export const reportWorkByProcess = async (data) => { return await request.post({ url: `/mes/work-scheduling-detail/reportWorkByProcess`, data }) } +//批量报工 +export const reportWorkByTask = async (data) => { + return await request.post({ url: `/mes/workScheduling/reportForAll`, data }) +} //检查当前节点是否可以完工 export const getNodePosition = async (params) => { return await request.get({ url: `/mes/workScheduling/getNodePosition`, params }) diff --git a/src/api/mes/workSchedulingDetail/index.ts b/src/api/mes/workSchedulingDetail/index.ts index f39e63513..122291bcc 100644 --- a/src/api/mes/workSchedulingDetail/index.ts +++ b/src/api/mes/workSchedulingDetail/index.ts @@ -63,3 +63,7 @@ export const exportWorkSchedulingDetail = async (params) => { export const importTemplate = () => { return request.download({ url: '/mes/work-scheduling-detail/get-import-template' }) } +//工序报工 +export const reportWorkByProcess = async (data) => { + return await request.post({ url: `/mes/work-scheduling-detail/reportWorkByProcess`, data }) +} \ No newline at end of file diff --git a/src/views/mes/workScheduling/components/Detail.vue b/src/views/mes/workScheduling/components/Detail.vue index dc9f96206..e3929c93c 100644 --- a/src/views/mes/workScheduling/components/Detail.vue +++ b/src/views/mes/workScheduling/components/Detail.vue @@ -72,7 +72,7 @@ --> - +
- - + -->
+ 0) { tabsList.value.unshift({ @@ -554,7 +548,9 @@ const masterParmas = ref({ // 列表头部按钮 const HeadButttondata = ref() // 列表-操作按钮 -const buttondata = ref() +const buttondata = ref( + +) /** 表格弹窗 */ const initModel = (schema: FormSchema[], formModel: Recordable) => { const model: Recordable = { ...formModel } @@ -585,10 +581,13 @@ const searchTableFormType = ref('') // 表单的类型:create - 新增;updat const formRef = ref() const titleNameRef = ref() const titleValueRef = ref() +const planDayCode=ref() const count = ref(0) const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => { titleNameRef.value = titleName titleValueRef.value = titleValue + + planDayCode.value=row.planMasterCode remarksData.data = { tableId: row.id, tableName: tableName @@ -658,12 +657,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: }) ] } - - if(row.status == '1'){ - props.buttondataTable[0].hide = false - }else{ - props.buttondataTable[0].hide = true - } + //console.log("props.buttondataTable-663",props.buttondataTable); buttondata.value = [...detailButtonEdit, ...detailButtonDelete, ...props.buttondataTable] } finally { detailLoading.value = false @@ -671,7 +665,6 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: } } defineExpose({ openDetail, formRef }) // 提供 open 方法,用于打开弹窗 - // 获取备注列表 const getRemarkList = async () => { detailLoading.value = true @@ -833,14 +826,23 @@ const buttonTableClick = async (val, row) => { } else if (val == 'delete') { // 删除 handleDelete(row.id) - } else if (val == 'pfinished') { - - WorkSchedulingDetailApi.processFinished(row.id) - getList() - }else { + } else { emit('tableFormButton', val, row) } } +const buttonClick=(type,row)=>{ + if (type == 'pfinished') { + WorkSchedulingDetailApi.processFinished(row.id) + getList() + }else if (type == 'reprotProcess') { + refreport.value.openDetail(row,"工序报工", planDayCode.value) + + // +}else if (type == 'checkProcess') { + //WorkSchedulingDetailApi.processFinished(row.id) +} +getList() +} /** 添加/修改操作 */ const openForm = async (type: string, row?: number) => { formRef.value.open(type, row, masterParmas.value) diff --git a/src/views/mes/workScheduling/components/report.vue b/src/views/mes/workScheduling/components/report.vue index 2adaf1dbe..0ac97305d 100644 --- a/src/views/mes/workScheduling/components/report.vue +++ b/src/views/mes/workScheduling/components/report.vue @@ -4,71 +4,20 @@ v-model="dialogVisible" :close-on-click-modal="true" :vLoading="formLoading" - width="fit-content" + width="600px" > - 添加 - - - - - - - - - - - - - - - - - - - - - - - - - - - - +