AllocationConfirmation.vue
2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<script setup lang="ts">
import { ref } from "vue";
import { VButton, VTable } from "@vui/vue";
const tableColumns = [
{
key: "index",
label: "序号",
},
{
key: "column2",
label: "商品名称",
},
{
key: "column3",
label: "规格",
},
{
key: "column4",
label: "调拨数量",
},
{
key: "column5",
label: "调出仓",
},
{
key: "column6",
label: "调入仓",
},
{
key: "actions",
label: "Actions",
width: 220,
},
];
const rows = ref([
{
index: "1",
column2: "商品名称商品名称 商品名称",
column3: "A/B",
column4: "20",
column5: "杭州仓",
column6: "上海仓",
},
]);
function handleToolbarAction(actionId: string) {
console.log("toolbar-action", actionId);
}
function handleRowAction(actionId: string, row: Record<string, unknown>) {
console.log("row-action", actionId, row);
}
</script>
<template>
<div class="generated-page AllocationConfirmation">
<header class="page-header">
<h1>调拨确认单</h1>
<p>Generated from page schema pilot.</p>
</header>
<section class="page-section">
<div class="section-header">
<h2>调拨明细表</h2>
<VButton @click="handleToolbarAction('default-action')">
Create
</VButton>
</div>
<VTable :columns="tableColumns" :data="rows">
<template #actions="{ row }">
<VButton @click="handleRowAction('default-action', row)">
View
</VButton>
</template>
</VTable>
</section>
</div>
</template>
<style scoped>
.generated-page {
display: grid;
gap: 16px;
padding: 16px;
}
.page-header {
display: grid;
gap: 8px;
}
.page-section {
padding: 16px;
background: #fff;
border: 1px solid #e5e7eb;
border-radius: 12px;
}
.filter-row,
.section-header,
.action-row,
.field-switch {
display: flex;
gap: 12px;
align-items: center;
justify-content: space-between;
}
</style>