From 8cda4ce13ae3c263dbcc9255116cdfda9b63710e Mon Sep 17 00:00:00 2001 From: kkk-ops <1050738955@qq.com> Date: Mon, 19 Jan 2026 18:30:34 +0800 Subject: [PATCH] bug --- src/locales/en.ts | 10 ++++++- src/locales/zh-CN.ts | 10 ++++++- src/views/erp/product/category/index.vue | 2 +- src/views/erp/product/product/index.vue | 22 +++++++++++++--- .../mes/organization/OrganizationForm.vue | 4 +-- src/views/mes/organization/index.vue | 2 +- src/views/mes/plan/PlanForm.vue | 26 ++++++++++++++++--- src/views/mes/task/TaskForm.vue | 4 +-- .../mes/task/components/TaskDetailForm.vue | 1 + .../mes/task/components/TaskDetailList.vue | 2 ++ src/views/mes/task/index.vue | 6 ++--- .../tasksummary/components/TaskDetailList.vue | 1 + src/views/mes/tasksummary/index.vue | 1 + 13 files changed, 73 insertions(+), 18 deletions(-) diff --git a/src/locales/en.ts b/src/locales/en.ts index 6562c9b7..301439dc 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -453,5 +453,13 @@ export default { btn_zoom_in: 'Zoom in', btn_zoom_out: 'Zoom out', preview: 'Preivew' - } + }, + basedata: { + product: { + category:{ +name:'name', + } + }, + + }, } diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 3bc473da..04c10df3 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -449,5 +449,13 @@ export default { btn_zoom_out: '缩小', preview: '预览' }, - 'OAuth 2.0': 'OAuth 2.0' // 避免菜单名是 OAuth 2.0 时,一直 warn 报错 + 'OAuth 2.0': 'OAuth 2.0',// 避免菜单名是 OAuth 2.0 时,一直 warn 报错 + basedata: { + product: { + category:{ +name:'分类名称', + } + }, + + }, } diff --git a/src/views/erp/product/category/index.vue b/src/views/erp/product/category/index.vue index 524010a5..b88f664e 100644 --- a/src/views/erp/product/category/index.vue +++ b/src/views/erp/product/category/index.vue @@ -10,7 +10,7 @@ :inline="true" label-width="68px" > - + - + + + @@ -126,7 +133,6 @@ import { ProductCategoryApi, ProductCategoryVO } from '@/api/erp/product/categor import ProductForm from './ProductForm.vue' import { DICT_TYPE } from '@/utils/dict' import { defaultProps, handleTree } from '@/utils/tree' -import { erpPriceTableColumnFormatter } from '@/utils' import BomForm from "@/views/mes/bom/BomForm.vue"; /** ERP 产品列表 */ @@ -147,6 +153,7 @@ const queryParams = reactive({ const queryFormRef = ref() // 搜索的表单 const exportLoading = ref(false) // 导出的加载中 const categoryList = ref([]) // 产品分类列表 +const parentList = ref([]) /** 查询列表 */ const getList = async () => { @@ -213,6 +220,15 @@ onMounted(async () => { // 产品分类 const categoryData = await ProductCategoryApi.getProductCategorySimpleList() categoryList.value = handleTree(categoryData, 'id', 'parentId') + // 获取顶层分类 + for (let i = 0; i < categoryData.length; i++) { + if (categoryData[i].parentId === 0) { + parentList.value.push(categoryData[i]); + } + } + // 排序 + parentList.value.sort((a, b) => a.sort - b.sort); + console.log(parentList.value) }) /** tab 切换 */ diff --git a/src/views/mes/organization/OrganizationForm.vue b/src/views/mes/organization/OrganizationForm.vue index 1b2be623..7b07fd32 100644 --- a/src/views/mes/organization/OrganizationForm.vue +++ b/src/views/mes/organization/OrganizationForm.vue @@ -203,7 +203,7 @@ const resetForm = () => { code: undefined, name: undefined, parentId: undefined, - sort: undefined, + sort: 0, workerUserId: undefined, machineId: undefined, phone: undefined, @@ -220,7 +220,7 @@ const resetForm = () => { const getOrganizationTree = async () => { organizationTree.value = [] const data = await OrganizationApi.getOrganizationList() - const root: Tree = { id: 0, name: '顶级产线工位', children: [] } + const root: Tree = { id: 0, name: '顶级组织', children: [] } root.children = handleTree(data, 'id', 'parentId') organizationTree.value.push(root) } diff --git a/src/views/mes/organization/index.vue b/src/views/mes/organization/index.vue index e8db64ca..c3c2f364 100644 --- a/src/views/mes/organization/index.vue +++ b/src/views/mes/organization/index.vue @@ -293,7 +293,7 @@ onMounted(async () => { /** 获得产线工位树 */ organizationTree.value = [] const data = await OrganizationApi.getOrganizationList() - const root: Tree = { id: 0, name: '顶级产线工位', children: [] } + const root: Tree = { id: 0, name: '顶级组织', children: [] } root.children = handleTree(data, 'id', 'parentId') organizationTree.value.push(root) }) diff --git a/src/views/mes/plan/PlanForm.vue b/src/views/mes/plan/PlanForm.vue index f5fbdfa0..f3ee65cf 100644 --- a/src/views/mes/plan/PlanForm.vue +++ b/src/views/mes/plan/PlanForm.vue @@ -41,9 +41,25 @@ /> - - - + + +
+ + +
+
{ groupType: undefined, isEnable: undefined, isPreProduction: 0, + isCode: true } formRef.value?.resetFields() } diff --git a/src/views/mes/task/TaskForm.vue b/src/views/mes/task/TaskForm.vue index bb7d8c44..d0b79c66 100644 --- a/src/views/mes/task/TaskForm.vue +++ b/src/views/mes/task/TaskForm.vue @@ -18,12 +18,12 @@
- +
diff --git a/src/views/mes/task/components/TaskDetailForm.vue b/src/views/mes/task/components/TaskDetailForm.vue index ea5b69e6..edc102c1 100644 --- a/src/views/mes/task/components/TaskDetailForm.vue +++ b/src/views/mes/task/components/TaskDetailForm.vue @@ -228,6 +228,7 @@ const onChangeProduct = (productId) => { const product = productList.value.find((item) => item.id === productId) if (product) { formData.value.unitName = product.unitName + formData.value.unitId = product.unitId } } diff --git a/src/views/mes/task/components/TaskDetailList.vue b/src/views/mes/task/components/TaskDetailList.vue index 414c1af0..25043ab4 100644 --- a/src/views/mes/task/components/TaskDetailList.vue +++ b/src/views/mes/task/components/TaskDetailList.vue @@ -121,6 +121,8 @@ watch( () => props.taskId, (val: number) => { if (!val) { + list.value = [] + total.value = 0 return } queryParams.taskId = val diff --git a/src/views/mes/task/index.vue b/src/views/mes/task/index.vue index 18680fcd..e6b5b33b 100644 --- a/src/views/mes/task/index.vue +++ b/src/views/mes/task/index.vue @@ -288,9 +288,11 @@ const openItemNeed = (taskCode:string, taskId: number) => { } /** tab 切换 */ -let activeName = 'taskDetail' +let activeName = '' const handleTabClick = (tab: TabsPaneContext) => { queryParams.status = tab.paneName + currentRow.value = {} + console.log(currentRow.value) handleQuery() } /** 送审/审核 */ @@ -308,7 +310,5 @@ const changeStatus = async (type:string, status: number, id: number) => { /** tab 切换 */ let activeListName = 'taskDetail' -const handleListTabClick = (tab: TabsPaneContext) => { -} diff --git a/src/views/mes/tasksummary/components/TaskDetailList.vue b/src/views/mes/tasksummary/components/TaskDetailList.vue index fa520c7d..55b4b1cf 100644 --- a/src/views/mes/tasksummary/components/TaskDetailList.vue +++ b/src/views/mes/tasksummary/components/TaskDetailList.vue @@ -77,6 +77,7 @@ watch( () => props.taskId, (val: number) => { if (!val) { + list.value = [] return } queryParams.taskId = val diff --git a/src/views/mes/tasksummary/index.vue b/src/views/mes/tasksummary/index.vue index 5a4e31ce..5471a647 100644 --- a/src/views/mes/tasksummary/index.vue +++ b/src/views/mes/tasksummary/index.vue @@ -248,6 +248,7 @@ const openTaskPlanForm = (taskId: number, taskCode:string) => { let activeName = '' const handleTabClick = (tab: TabsPaneContext) => { queryParams.status = tab.paneName + currentRow.value = {} handleQuery() }