From 14afad7cd4cdd5d2ae89a3d1eac3671d1b6986fe Mon Sep 17 00:00:00 2001
From: chenshuichuan <1154693969@qq.com>
Date: Sat, 6 Jul 2024 00:55:21 +0800
Subject: [PATCH] fix work report
---
src/api/mes/orgworker/index.ts | 5 +-
src/api/mes/workreportplan/index.ts | 2 +-
src/views/mes/organization/WorkerIndex.vue | 83 +++----
.../organization/components/WorkerRight.vue | 68 ++++--
src/views/mes/plan/index.vue | 226 +++++++++---------
src/views/mes/planprogress/ProgressList.vue | 48 +++-
src/views/mes/planprogress/index.vue | 216 +++++++++--------
.../producereport/ProduceReportDetailForm.vue | 93 +++----
.../ProduceReportDetailIndex.vue | 50 ++--
.../components/ProduceReportDetailForm.vue | 180 --------------
.../components/ProduceReportDetailList.vue | 147 ------------
.../producereport/components/ReplaceForm.vue | 149 +++++++-----
.../components/RepresentForm.vue | 184 --------------
13 files changed, 502 insertions(+), 949 deletions(-)
delete mode 100644 src/views/mes/producereport/components/ProduceReportDetailForm.vue
delete mode 100644 src/views/mes/producereport/components/ProduceReportDetailList.vue
delete mode 100644 src/views/mes/producereport/components/RepresentForm.vue
diff --git a/src/api/mes/orgworker/index.ts b/src/api/mes/orgworker/index.ts
index 14de545b..0427dba8 100644
--- a/src/api/mes/orgworker/index.ts
+++ b/src/api/mes/orgworker/index.ts
@@ -57,10 +57,7 @@ export const OrgWorkerApi = {
getOrgWorkerList2: async (params: any) => {
return await request.get({ url: `/mes/org-worker/getOtherOrgWorkerRespVO` , params })
},
- // 获得当前用户列表
- getPersonalUser: async () => {
- return await request.get({ url: `/mes/org-worker/getPersonalUser` })
- },
+
// 获得当前用户管理的用户列表
getOtherPersonalUser: async (params: any) => {
return await request.get({ url: `/mes/org-worker/getOtherPersonalUser`, params })
diff --git a/src/api/mes/workreportplan/index.ts b/src/api/mes/workreportplan/index.ts
index 1dc8b837..c69515bc 100644
--- a/src/api/mes/workreportplan/index.ts
+++ b/src/api/mes/workreportplan/index.ts
@@ -77,6 +77,6 @@ export const WorkReportPlanApi = {
},
// 查询计划进度
getReportPlanProgress: async (id: number) => {
- return await request.get({ url: `/mes/work-report-plan-view/getPlanProgress?id=`, id })
+ return await request.get({ url: `/mes/work-report-plan-view/getPlanProgress?id=`+id })
},
}
diff --git a/src/views/mes/organization/WorkerIndex.vue b/src/views/mes/organization/WorkerIndex.vue
index c8e81391..91c3ecf7 100644
--- a/src/views/mes/organization/WorkerIndex.vue
+++ b/src/views/mes/organization/WorkerIndex.vue
@@ -9,7 +9,7 @@
label-width="68px"
>
-
+
-
+
-
+
-
-
-
-
+
+
+ 搜索
+ 重置
+
+ 导出
+
+
+ 展开/折叠
+
+
-
-
- 搜索
- 重置
-
- 导出
-
-
- 展开/折叠
-
-
@@ -123,13 +112,11 @@
-
-
-
-
-
-
-
+
+
+
+
+
-
+
@@ -242,26 +229,10 @@ const toggleExpandAll = async () => {
await nextTick()
refreshTable.value = true
}
-const organizationTree = ref() // 树形结构
-const getCurrentDate = () =>{
- let now = new Date();
- let year = now.getFullYear();
- let month = now.getMonth() + 1;
- if(month<10){month = '0'+month}
- let day = now.getDate();
- if(day<10)day = '0'+day;
- return year + "-" + month + "-" + day +" 00:00:00";
-}
+
/** 初始化 **/
onMounted(async () => {
- queryParams.workDate = getCurrentDate()
await getList()
- /** 获得产线工位树 */
- organizationTree.value = []
- const data = await OrganizationApi.getOrganizationList()
- const root: Tree = { id: 0, name: '顶级产线工位', children: [] }
- root.children = handleTree(data, 'id', 'parentId')
- organizationTree.value.push(root)
})
/** tab 切换 */
let activeName = ''
diff --git a/src/views/mes/organization/components/WorkerRight.vue b/src/views/mes/organization/components/WorkerRight.vue
index a264d34e..e30e3d36 100644
--- a/src/views/mes/organization/components/WorkerRight.vue
+++ b/src/views/mes/organization/components/WorkerRight.vue
@@ -1,6 +1,36 @@
+
+
+
+
+
+
+
+
+ 搜索
+
+ 导出
+
+
+
+
@@ -59,7 +89,6 @@ const { t } = useI18n() // 国际化
const props = defineProps<{
orgId?: number // org ID(主表的关联字段)
orgType?: string
- workDate?:undefined
}>()
const loading = ref(true) // 列表的加载中
@@ -69,7 +98,7 @@ const queryParams = reactive({
pageNo: 1,
pageSize: 10,
orgId: undefined,
- workDate: undefined,
+ workDate: [],
groupType: undefined,
orgType: undefined,
workerId: undefined,
@@ -123,9 +152,18 @@ const handleExport = async () => {
exportLoading.value = false
}
}
-
+const getCurrentDate = () =>{
+ let now = new Date();
+ let year = now.getFullYear();
+ let month = now.getMonth() + 1;
+ if(month<10){month = '0'+month}
+ let day = now.getDate();
+ if(day<10)day = '0'+day;
+ return year + "-" + month + "-" + day +" 00:00:00";
+}
/** 初始化 **/
onMounted(() => {
+ queryParams.workDate = [getCurrentDate(), getCurrentDate()]
getList()
})
/** tab 切换 */
@@ -153,16 +191,16 @@ watch(
},
{ immediate: true, deep: true }
)
-watch(
- () => props.workDate,
- (val: string) => {
- console.log("workDate:"+val)
- if (!val) {
- return
- }
- queryParams.workDate = [val,val]
- handleQuery()
- },
- { immediate: true, deep: true }
-)
+// watch(
+// () => props.workDate,
+// (val: string) => {
+// console.log("workDate:"+val)
+// if (!val) {
+// return
+// }
+//
+// handleQuery()
+// },
+// { immediate: true, deep: true }
+// )
diff --git a/src/views/mes/plan/index.vue b/src/views/mes/plan/index.vue
index d31115d7..120c64f2 100644
--- a/src/views/mes/plan/index.vue
+++ b/src/views/mes/plan/index.vue
@@ -8,117 +8,121 @@
:inline="true"
label-width="68px"
>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
- 新增
-
-
- 导出
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+ 新增
+
+
+ 导出
+
+
+
+
diff --git a/src/views/mes/planprogress/ProgressList.vue b/src/views/mes/planprogress/ProgressList.vue
index 67c1969f..0dabb64c 100644
--- a/src/views/mes/planprogress/ProgressList.vue
+++ b/src/views/mes/planprogress/ProgressList.vue
@@ -2,36 +2,61 @@
-
-
-
+
-
+
-
+
+
+
+
+
+
+
-
-
- {{ percentage }}%
-
-
+
+
+ {{erpNumberFormatter((scope.row.totalWasteNumber/(scope.row.totalQualityNumber+scope.row.totalWasteNumber))*100 ,2) }}%
+
+
+
+