Merge remote-tracking branch 'origin/master'

master
suixy 3 days ago
commit c2b6937132

@ -1,17 +1,5 @@
<template>
<div class="legacy-page">
<div v-if="config.toolbarActions.length" class="legacy-toolbar">
<el-button
v-for="btn in config.toolbarActions"
:key="btn.label"
:type="btn.type || 'default'"
size="small"
class="toolbar-btn"
@click="handleMockAction(btn.label)"
>
{{ btn.label }}
</el-button>
</div>
<el-form v-if="config.filters.length" :model="queryModel" inline class="query-form" label-width="96px">
<el-form-item v-for="item in config.filters" :key="item.key" :label="item.label">
@ -125,7 +113,6 @@
<script setup lang="ts">
import { computed, onMounted, ref } from 'vue';
import { ElMessage } from 'element-plus';
import { getPageConfig } from '../data/pageConfigs';
import type { DemoColumn } from '../types';
@ -191,12 +178,6 @@ const handleReset = () => {
loadData(false);
};
const handleMockAction = (name: string) => {
if (name.includes('导出')) ElMessage.success(`已模拟执行:${name}`);
else if (name.includes('打印')) ElMessage.success('已模拟打印预览');
else ElMessage.info(`已触发:${name}`);
};
const formatCell = (row: Record<string, any>, column: DemoColumn) => {
const val = column.prop ? row[column.prop] : '';
if (val === undefined || val === null || val === '') return '';

@ -131,9 +131,9 @@ const configMap: Record<string, DemoPageConfig> = {
tables: [{ key: 'main', showIndex: true, columns: [{ label: '日期', prop: 'prodDate', minWidth: 100 }, { label: '胶料类型', prop: 'category', minWidth: 100 }, { label: '物料名称', prop: 'materialName', minWidth: 130 }, groupedCarsWeight('上期结存', 'prev'), groupedCarsWeight('生产', 'produce'), groupedCarsWeight('消耗', 'consume'), groupedCarsWeight('结存', 'balance')], rows: baseRows.slice(0, 42).map(item => ({ ...item, prevCars: item.cars + 4, prevWeight: n(item.produceWeight + 800, 1), produceCars: item.cars, consumeCars: item.consumeCars, balanceCars: Math.max(0, item.cars - item.consumeCars + 2), balanceWeight: n(item.produceWeight - item.consumeWeight + 500, 1) })) }]
},
'workshop-compound-check': {
key: 'workshop-compound-check', title: '车间胶料盘点', statusText: '最新盘点日期2018-07-24', loadingMs: 670, toolbarActions: defaultToolbar,
filters: [{ key: 'checkDate', label: '盘点日期', type: 'date', defaultValue: '2018-06-24', targets: ['checkDate'] }, { key: 'shift', label: '班次', type: 'select', options: selectOptions(shiftPool), targets: ['shift'] }],
tables: [{ key: 'main', showIndex: true, columns: [{ label: '胶料名称', prop: 'materialName', minWidth: 130 }, { label: '账面结存(车)', prop: 'bookCars', minWidth: 110, align: 'right' }, { label: '盘点数量(车)', prop: 'checkCars', minWidth: 110, align: 'right' }, { label: '差异(车)', prop: 'diffCars', minWidth: 90, align: 'right' }, { label: '盘点日期', prop: 'checkDate', minWidth: 110 }], rows: baseRows.slice(0, 40).map(item => ({ ...item, bookCars: item.cars, checkCars: Math.max(0, item.cars + (item.seq % 3) - 1), diffCars: (item.seq % 3) - 1, checkDate: '2018-06-24' })) }]
key: 'workshop-compound-check', title: '车间胶料盘点', statusText: '最新盘点日期2026-01-01', loadingMs: 670, toolbarActions: defaultToolbar,
filters: [{ key: 'checkDate', label: '盘点日期', type: 'date', defaultValue: '2026-01-01', targets: ['checkDate'] }, { key: 'shift', label: '班次', type: 'select', options: selectOptions(shiftPool), targets: ['shift'] }],
tables: [{ key: 'main', showIndex: true, columns: [{ label: '胶料名称', prop: 'materialName', minWidth: 130 }, { label: '账面结存(车)', prop: 'bookCars', minWidth: 110, align: 'right' }, { label: '盘点数量(车)', prop: 'checkCars', minWidth: 110, align: 'right' }, { label: '差异(车)', prop: 'diffCars', minWidth: 90, align: 'right' }, { label: '盘点日期', prop: 'checkDate', minWidth: 110 }], rows: baseRows.slice(0, 40).map(item => ({ ...item, bookCars: item.cars, checkCars: Math.max(0, item.cars + (item.seq % 3) - 1), diffCars: (item.seq % 3) - 1, checkDate: '2026-01-01' })) }]
},
'workshop-stock-adjust': {
key: 'workshop-stock-adjust', title: '车间胶料盘存修正', loadingMs: 630, toolbarActions: [{ label: '查询', type: 'primary' }, { label: '导出' }],

Loading…
Cancel
Save