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/components/SearchTable/src/SearchTable.vue b/src/components/SearchTable/src/SearchTable.vue index 92fc2ef02..39e93b2ce 100644 --- a/src/components/SearchTable/src/SearchTable.vue +++ b/src/components/SearchTable/src/SearchTable.vue @@ -1,7 +1,9 @@ --> - +
- - + -->
+ 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..c0729c427 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" > - 添加 - - - - - - - - - - - - - - - - - - - - - - - - - - - - +