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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
| <!--
| * @Date: 2025-06-17 11:44:52
| * @LastEditors: gaoshp
| * @LastEditTime: 2025-06-17 16:16:28
| * @FilePath: /mdmweb/src/views/basesetting/produceplan.vue
| -->
| <template>
| <basic-container>
| <avue-crud :option="option" :table-loading="loading" :data="data" v-model:page="page" v-model="form" ref="crud"
| @search-change="searchChange" @search-reset="searchReset" @current-change="currentChange"
| @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
| <template #menu-left>
| <el-button type="primary" plain @click="importAction">导入
| </el-button>
| </template>
| <template #menu="scope">
| <el-button type="primary" text size="default" v-if="permission.flow_model_update"
| @click.stop="handleAction(scope.row, scope.index)">审批
| </el-button>
| </template>
| </avue-crud>
| </basic-container>
| </template>
|
| <script>
| import { getList } from '@/api/basesetting/produceplan';
| import { mapGetters } from 'vuex';
| export default {
| name: 'ProducePlan',
| data() {
| return {
| // Define your data properties here
| option: {
| // Define your Avue CRUD options here
| addBtn: true,
| editBtn: true,
| delBtn: true,
| columnBtn: false,
| tip: false,
| // simplePage: true,
| searchShow: true,
| searchMenuSpan: 6,
| dialogWidth: '60%',
| // tree: true,
| border: true,
| index: true,
| // selection: true,
| // viewBtn: true,
| menuWidth: 320,
| dialogClickModal: false,
| column: [
| {
| label: '程序名称',
| prop: 'name',
| type: 'input',
| search: true,
| searchRange: true,
| searchSpan: 8,
| hide: true,
| },
| {
| label: '人员名称',
| prop: 'name',
| type: 'input',
| search: true,
| searchRange: true,
| searchSpan: 8,
| hide: true,
| },
| // {
| // label: '序号',
| // prop: 'index',
| // type: 'index',
| // },
| {
| label: '零组件代码',
| prop: 'id',
| type: '',
| },
| {
| label: '专业组长',
| prop: 'teamLeaderName',
| type: '',
| },
| {
| label: '编制(工艺员)',
| prop: 'teamLeaderName',
| type: '',
| },
| {
| label: '校对(工艺员)',
| prop: 'checkerName',
| type: '',
| },
| {
| label: '审核(高师)',
| prop: 'seniorName',
| type: '',
| },
|
| // Add more columns as needed
| ],
| },
| loading: false,
| data: [], // This will hold the data for the tables
| page: {
| pageSize: 10,
| currentPage: 1,
| total: 0,
| },
| form: {}, // This will hold the form data
| query: {}, // This will hold the search query
| };
| },
| methods: {
| // Define your methods here
| searchChange(params, done) {
| this.query = params;
| this.page.currentPage = 1;
| console.log('searchChange', params);
| console.log(params);
| this.onLoad(this.page, params);
| done();
| },
| searchReset() {
| this.query = {};
| this.onLoad(this.page);
| },
| currentChange() {
| this.page.currentPage = currentPage;
| },
| sizeChange() {
| this.page.pageSize = pageSize;
| },
| refreshChange() {
| this.onLoad(this.page, this.query);
| },
| onLoad(page, params = {}) {
| const query = {
| ...this.query,
| // category: params.category ? flowCategory(params.category) : null,
| mode: this.mode,
| };
| this.loading = true;
| getList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
| const data = res.data.data;
| this.page.total = data.total;
| this.data = data.records;
| this.loading = false;
| });
| },
| importAction() {
| // Logic for importing data
| this.$message.success('导入功能尚未实现');
| },
| },
| mounted() {
| // Code to run when the component is mounted
| },
| }
| </script>
|
| <style lang="scss" scoped></style>
|
|