|
|
|
@ -58,10 +58,10 @@ v-model="queryParams.createTime" @change="handleQuery" value-format="YYYY-MM-DD
|
|
|
|
<el-tabs v-model="activeName" @tab-click="handleTabClick">
|
|
|
|
<el-tabs v-model="activeName" @tab-click="handleTabClick">
|
|
|
|
<el-tab-pane :label="t('ProductionPlan.TaskSummary.tabAllLabel')" name="" />
|
|
|
|
<el-tab-pane :label="t('ProductionPlan.TaskSummary.tabAllLabel')" name="" />
|
|
|
|
<el-tab-pane :label="t('ProductionPlan.TaskSummary.tabIssuedLabel')" name="2" />
|
|
|
|
<el-tab-pane :label="t('ProductionPlan.TaskSummary.tabIssuedLabel')" name="2" />
|
|
|
|
<el-tab-pane label="部分排产" name="7" />
|
|
|
|
<el-tab-pane :label="t('ProductionPlan.TaskSummary.tabPartialSchedulingLabel')" name="7" />
|
|
|
|
<el-tab-pane label="待生产" name="8" />
|
|
|
|
<el-tab-pane :label="t('ProductionPlan.TaskSummary.tabPendingProductionLabel')" name="8" />
|
|
|
|
<el-tab-pane label="生产中" name="9" />
|
|
|
|
<el-tab-pane :label="t('ProductionPlan.TaskSummary.tabInProductionLabel')" name="9" />
|
|
|
|
<el-tab-pane label="已完成" name="10" />
|
|
|
|
<el-tab-pane :label="t('ProductionPlan.TaskSummary.tabCompletedLabel')" name="10" />
|
|
|
|
</el-tabs>
|
|
|
|
</el-tabs>
|
|
|
|
<el-table
|
|
|
|
<el-table
|
|
|
|
v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" highlight-current-row
|
|
|
|
v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" highlight-current-row
|
|
|
|
@ -85,6 +85,19 @@ v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" hi
|
|
|
|
<el-tag :type="scope.row.isScheduled ? 'success' : 'info'">{{ scope.row.isScheduled ? '是' : '否' }}</el-tag>
|
|
|
|
<el-tag :type="scope.row.isScheduled ? 'success' : 'info'">{{ scope.row.isScheduled ? '是' : '否' }}</el-tag>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column :label="t('ProductionPlan.TaskSummary.tableProductionProgressColumn')" align="center" min-width="180px">
|
|
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
|
|
<div class="production-progress-cell">
|
|
|
|
|
|
|
|
<el-progress
|
|
|
|
|
|
|
|
:percentage="getProductionProgressPercent(scope.row)"
|
|
|
|
|
|
|
|
:show-text="false"
|
|
|
|
|
|
|
|
:stroke-width="12"
|
|
|
|
|
|
|
|
class="production-progress-bar"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<span class="production-progress-text">{{ getProductionProgressText(scope.row) }}</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column :label="t('ProductionPlan.TaskSummary.tableRemarkColumn')" align="center" prop="remark" />
|
|
|
|
<el-table-column :label="t('ProductionPlan.TaskSummary.tableRemarkColumn')" align="center" prop="remark" />
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column :label="t('ProductionPlan.TaskSummary.tableOperateColumn')" align="center" min-width="200px">
|
|
|
|
<el-table-column :label="t('ProductionPlan.TaskSummary.tableOperateColumn')" align="center" min-width="200px">
|
|
|
|
@ -162,6 +175,19 @@ const deliveryDateFormatter = (_row: any, _column: any, value: any) => {
|
|
|
|
if (value) return dateFormatter2(_row, _column, value)
|
|
|
|
if (value) return dateFormatter2(_row, _column, value)
|
|
|
|
return dateFormatter2(_row, _column, _row?.finishDate)
|
|
|
|
return dateFormatter2(_row, _column, _row?.finishDate)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const getProductionProgressPercent = (row: any) => {
|
|
|
|
|
|
|
|
const storedPlanNumber = Number(row?.storedPlanNumber ?? 0)
|
|
|
|
|
|
|
|
const totalNumber = Number(row?.totalNumber ?? row?.number ?? 0)
|
|
|
|
|
|
|
|
if (!Number.isFinite(storedPlanNumber) || !Number.isFinite(totalNumber) || totalNumber <= 0) return 0
|
|
|
|
|
|
|
|
const rawPercent = (storedPlanNumber / totalNumber) * 100
|
|
|
|
|
|
|
|
return Math.max(0, Math.min(100, Number(rawPercent.toFixed(2))))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const getProductionProgressText = (row: any) => {
|
|
|
|
|
|
|
|
const storedPlanNumber = Number(row?.storedPlanNumber ?? 0)
|
|
|
|
|
|
|
|
const totalNumber = Number(row?.totalNumber ?? row?.number ?? 0)
|
|
|
|
|
|
|
|
if (!Number.isFinite(storedPlanNumber) || !Number.isFinite(totalNumber) || totalNumber <= 0) return '0/0'
|
|
|
|
|
|
|
|
return `${storedPlanNumber}/${totalNumber}`
|
|
|
|
|
|
|
|
}
|
|
|
|
/** 查询列表 */
|
|
|
|
/** 查询列表 */
|
|
|
|
const getList = async () => {
|
|
|
|
const getList = async () => {
|
|
|
|
loading.value = true
|
|
|
|
loading.value = true
|
|
|
|
@ -241,3 +267,23 @@ const handleTabClick = (tab: TabsPaneContext) => {
|
|
|
|
handleQuery()
|
|
|
|
handleQuery()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
|
|
.production-progress-cell {
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.production-progress-bar {
|
|
|
|
|
|
|
|
width: 180px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.production-progress-text {
|
|
|
|
|
|
|
|
min-width: 92px;
|
|
|
|
|
|
|
|
text-align: left;
|
|
|
|
|
|
|
|
font-variant-numeric: tabular-nums;
|
|
|
|
|
|
|
|
color: var(--el-text-color-regular);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|