|
|
@@ -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));
|
|
|
|