Bläddra i källkod

feat(s0): 标准工艺路线列表字段补齐与菜单改名(RoutingList 25业务字段+紧凑宽表+公司工厂兜底;SysMenu Title 工艺路线→标准工艺路线列表)

YY968XX 3 veckor sedan
förälder
incheckning
e408a1e796

+ 49 - 11
Web/src/views/aidop/s0/manufacturing/RoutingList.vue

@@ -27,19 +27,45 @@
 			</el-form-item>
 		</el-form>
 
-		<el-table :data="rows" v-loading="loading" border stripe max-height="calc(100vh - 260px)">
-			<el-table-column prop="routeCode" label="路线编码" width="120" show-overflow-tooltip />
-			<el-table-column prop="routeName" label="路线名称" min-width="120" show-overflow-tooltip />
-			<el-table-column prop="materialCode" label="物料编码" width="120" show-overflow-tooltip />
-			<el-table-column prop="operationCode" label="工序" width="100" show-overflow-tooltip />
-			<el-table-column prop="workCenterCode" label="工作中心" width="110" show-overflow-tooltip />
-			<el-table-column prop="sortNo" label="排序" width="70" align="center" />
-			<el-table-column label="启用" width="80" align="center">
+		<el-table :data="rows" v-loading="loading" border stripe size="small" max-height="calc(100vh - 260px)">
+			<el-table-column label="公司" width="110" show-overflow-tooltip>
+				<template #default="{ row }">{{ companyName(row.companyRefId) }}</template>
+			</el-table-column>
+			<el-table-column label="工厂" width="90" show-overflow-tooltip>
+				<template #default="{ row }">{{ factoryName(row.factoryRefId) }}</template>
+			</el-table-column>
+			<el-table-column prop="routeCode" label="工艺路线编码" width="110" show-overflow-tooltip />
+			<el-table-column prop="routeName" label="工艺路线名称" width="140" show-overflow-tooltip />
+			<el-table-column prop="materialCode" label="物料编码" width="110" show-overflow-tooltip />
+			<el-table-column prop="operationCode" label="工序编码" width="90" show-overflow-tooltip />
+			<el-table-column prop="operationDescription" label="工序描述" width="120" show-overflow-tooltip />
+			<el-table-column prop="workCenterCode" label="工作中心" width="100" show-overflow-tooltip />
+			<el-table-column prop="milestoneOperation" label="报工工序" width="90" show-overflow-tooltip />
+			<el-table-column prop="ufld2" label="活动一" width="100" show-overflow-tooltip />
+			<el-table-column prop="uDeci1" label="数量一" width="80" align="right" />
+			<el-table-column prop="ufld3" label="单位一" width="70" align="center" />
+			<el-table-column prop="ufld5" label="活动二" width="100" show-overflow-tooltip />
+			<el-table-column prop="uDeci2" label="数量二" width="80" align="right" />
+			<el-table-column prop="ufld6" label="单位二" width="70" align="center" />
+			<el-table-column prop="ufld8" label="活动三" width="100" show-overflow-tooltip />
+			<el-table-column prop="uDeci3" label="数量三" width="80" align="right" />
+			<el-table-column prop="ufld9" label="单位三" width="70" align="center" />
+			<el-table-column prop="uDeci4" label="基本批量" width="80" align="right" />
+			<el-table-column prop="uDeci5" label="工序委外" width="80" align="right" />
+			<el-table-column prop="supplierCode" label="供应商代码" width="100" show-overflow-tooltip />
+			<el-table-column prop="outsourcedLeadTime" label="委外提前期" width="90" align="right" />
+			<el-table-column prop="sortNo" label="排序" width="60" align="center" />
+			<el-table-column label="启用" width="70" align="center">
 				<template #default="{ row }">
 					<el-tag :type="row.isEnabled ? 'success' : 'info'" size="small">{{ row.isEnabled ? '是' : '否' }}</el-tag>
 				</template>
 			</el-table-column>
-			<el-table-column label="操作" width="240" fixed="right" align="center">
+			<el-table-column label="是否确认" width="80" align="center">
+				<template #default="{ row }">
+					<el-tag :type="row.isConfirm ? 'success' : 'info'" size="small">{{ row.isConfirm ? '是' : '否' }}</el-tag>
+				</template>
+			</el-table-column>
+			<el-table-column label="操作" width="220" fixed="right" align="center">
 				<template #default="{ row }">
 					<el-button link type="primary" @click="openEdit(row)">编辑</el-button>
 					<el-button link :type="row.isEnabled ? 'warning' : 'success'" @click="toggleEnabled(row)">
@@ -173,10 +199,22 @@ import { useS0MfgOrgScope } from '../composables/useS0MfgOrgScope';
 import { s0MfgRoutingOpDetailsApi, type S0MfgRoutingOpDetailRow, type S0MfgRoutingOpDetailUpsert } from '../api/s0ManufacturingApi';
 
 const route = useRoute();
-const pageTitle = computed(() => (route.meta?.title as string) || '工艺路线');
+const pageTitle = computed(() => (route.meta?.title as string) || '标准工艺路线列表');
 type Row = Record<string, any>;
 
-const { companyOptions, loadOrgs, factoriesForCompany } = useS0MfgOrgScope();
+const { companyOptions, factoryOptions, loadOrgs, factoriesForCompany } = useS0MfgOrgScope();
+
+function companyName(refId?: string | number | null): string {
+	if (refId == null || refId === '') return '';
+	const hit = companyOptions.value.find((o) => o.id === String(refId));
+	return hit ? (hit.name || hit.code || String(hit.id)) : `未关联组织(历史值:${refId})`;
+}
+
+function factoryName(refId?: string | number | null): string {
+	if (refId == null || refId === '') return '';
+	const hit = factoryOptions.value.find((o) => o.id === String(refId));
+	return hit ? (hit.name || hit.code || String(hit.id)) : `未关联组织(历史值:${refId})`;
+}
 const queryFactories = computed(() => factoriesForCompany(query.companyRefId));
 const formFactories = computed(() => factoriesForCompany(form.companyRefId));
 

+ 1 - 1
server/Plugins/Admin.NET.Plugin.AiDOP/SeedData/SysMenuSeedData.cs

@@ -660,7 +660,7 @@ public class SysMenuSeedData : ISqlSugarEntitySeedData<SysMenu>
             (1, "/aidop/s0/manufacturing/standard-bom", "aidopS0MfgStandardBom", "标准 BOM", "/aidop/s0/manufacturing/StandardBomManagement", 10),
             (2, "/aidop/s0/manufacturing/standard-operation", "aidopS0MfgStandardOperation", "标准工序", "/aidop/s0/manufacturing/StandardProcessList", 20),
             (3, "/aidop/s0/manufacturing/production-line", "aidopS0MfgProductionLine", "生产线编码清单", "/aidop/s0/manufacturing/ProductionLineList", 30),
-            (4, "/aidop/s0/manufacturing/routing", "aidopS0MfgRouting", "工艺路线", "/aidop/s0/manufacturing/RoutingList", 40),
+            (4, "/aidop/s0/manufacturing/routing", "aidopS0MfgRouting", "标准工艺路线列表", "/aidop/s0/manufacturing/RoutingList", 40),
             (5, "/aidop/s0/manufacturing/material-substitution", "aidopS0MfgMaterialSubstitution", "物料替代", "/aidop/s0/manufacturing/MaterialSubstitutionList", 50),
             (6, "/aidop/s0/manufacturing/work-order-control", "aidopS0MfgWorkOrderControl", "工单控制参数", "/aidop/s0/manufacturing/WorkOrderControlParams", 60),
             (7, "/aidop/s0/manufacturing/person-skill", "aidopS0MfgPersonSkill", "人员技能", "/aidop/s0/manufacturing/PersonnelSkillList", 70),