|
|
|
|
@ -78,8 +78,16 @@
|
|
|
|
|
min-width="150px" sortable />
|
|
|
|
|
<el-table-column :label="t('ProductionPlan.Plan.tableProductColumn')" align="center" prop="productName"
|
|
|
|
|
min-width="200px" sortable />
|
|
|
|
|
<el-table-column :label="t('ProductionPlan.Plan.tableDeviceNameColumn')" align="center" prop="deviceName"
|
|
|
|
|
sortable min-width="100px"/>
|
|
|
|
|
<el-table-column :label="t('ProductionPlan.Plan.dialogProcessRouteLabel')" align="center"
|
|
|
|
|
sortable min-width="180px">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<div class="process-device-cell">
|
|
|
|
|
<div v-for="(item, index) in getProcessDeviceLines(scope.row)" :key="index">
|
|
|
|
|
{{ item }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column :label="t('ProductionPlan.Plan.tablePlanNumberColumn')" align="center" prop="planNumber"
|
|
|
|
|
sortable min-width="100px"/>
|
|
|
|
|
<el-table-column :label="t('ProductionPlan.Plan.tableFinishNumberColumn')" align="center" prop="passNumber"
|
|
|
|
|
@ -388,6 +396,28 @@ const exportLoading = ref(false) // 导出的加载中
|
|
|
|
|
const showAllFilters = ref(false) // 是否显示所有筛选框
|
|
|
|
|
const filterCount = 4 // 筛选框数量
|
|
|
|
|
|
|
|
|
|
const chineseNumberText = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十']
|
|
|
|
|
|
|
|
|
|
const formatChineseNumber = (value: number) => {
|
|
|
|
|
if (value <= 10) return chineseNumberText[value] || String(value)
|
|
|
|
|
if (value < 20) return `十${chineseNumberText[value - 10]}`
|
|
|
|
|
if (value < 100) {
|
|
|
|
|
const ten = Math.floor(value / 10)
|
|
|
|
|
const one = value % 10
|
|
|
|
|
return `${chineseNumberText[ten]}十${one ? chineseNumberText[one] : ''}`
|
|
|
|
|
}
|
|
|
|
|
return String(value)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const getProcessDeviceLines = (row: PlanVO) => {
|
|
|
|
|
const items = Array.isArray(row.processRouteItems) ? row.processRouteItems : []
|
|
|
|
|
if (!items.length) return [row.deviceName || '-']
|
|
|
|
|
return items.map((item, index) => {
|
|
|
|
|
const processName = item.processParameterName || '-'
|
|
|
|
|
const deviceName = item.deviceName || '-'
|
|
|
|
|
return `工序${formatChineseNumber(index + 1)}(${processName}):${deviceName}`
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
/** 切换筛选框展开/折叠 */
|
|
|
|
|
const toggleFilters = () => {
|
|
|
|
|
showAllFilters.value = !showAllFilters.value
|
|
|
|
|
|