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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
| <!-- 选择关联完工入库零件任务 -->
| <template>
| <div class="chooseRelevanceFinishedPart height overflow">
| <div class="width overflow height92">
| <div class="chose-height">
| <div class="flex margintopbot justify-between">
| <div class="width50 flex align-center">
| <label class="width40 textalign">零件编号:</label>
| <el-input size="mini"
| disabled
| clearable
| v-model="iqnuer.itemName"
| class="width60"> </el-input>
| </div>
| <div class="width50 flex align-center">
| <label class="width40 textalign">零件名称:</label>
| <el-input size="mini"
| clearable
| disabled
| v-model="iqnuer.itemDes"
| class="width60"> </el-input>
| </div>
| <el-button type="primary"
| size="mini"
| @click="itemSearch">查询</el-button>
| </div>
| <div class="flex width justify-between"></div>
| </div>
| <div class="width chose-tebleheight margin-top2 overflow">
| <table-container height="91%"
| :wipelist="wipelist"
| :tableHead="tableHead"
| :tableData="tableData"
| :operation="false"
| :currentPage="page"
| :pageSize="pageSize"
| :totle="totle"
| :setshow="false"
| :delShow="true"
| :selectionShow="true"
| @del="del"
| @handleSelectionChange="handleSelectionChange"
| @CurrentChange="CurrentChange" />
| </div>
| </div>
| <div class="chooseRelevanceFinishedPart-button text-right margin-right15 margin-top2">
| <el-button type="primary"
| size="mini"
| class="form-buttom"
| @click="submitForm">确认选择</el-button>
| <el-button type="primary"
| size="mini"
| class="form-buttom"
| @click="$emit('cancel')">取消</el-button>
| </div>
| </div>
| </template>
|
| <script>
| import { TableContainer, Modal } from '@/components/index';
| import { ItemDelete } from '@/api/enterchoose';
| import { ContainerVsItemSearch } from '@/api/enter';
| //const { edterchoose } = require('@/components/tableContainer/tableHead');
| //显示表头
| const chooseRelevanceFinishedPartHeader = [{
| columnDescription: '零件编号',
| columnName: 'itemName',
| sortable: true,
| wipe: true,
| width: 120
| },
| {
| columnDescription: '零件名称',
| columnName: 'itemDes',
| sortable: true,
| wipe: true,
| width: 120
| },
| {
| columnDescription: '零件数',
| columnName: 'itemNum',
| sortable: true,
| wipe: true,
| width: 90
| },
| {
| columnDescription: '零件重量',
| columnName: 'itemWeight',
| sortable: true,
| wipe: true,
| width: 100
| },
| {
| columnDescription: '零件类型',
| columnName: 'itemType',
| sortable: true,
| wipe: true,
| width: 100
| },
| {
| columnDescription: '零件公差',
| columnName: 'itemWeightDifference',
| sortable: true,
| wipe: true,
| width: 100
| },
| {
| columnDescription: '器具编号',
| columnName: 'containerName',
| sortable: true,
| wipe: true,
| width: 120
| },
| {
| columnDescription: '器具类型',
| columnName: 'containerType',
| sortable: true,
| wipe: true,
| width: 100
| },
| // {
| // columnDescription: '托盘状态',
| // columnName: 'containerStatus',
| // sortable: true,
| // wipe:true,
| // },
| {
| columnDescription: '器具重量',
| columnName: 'containerWeight',
| sortable: true,
| wipe: true,
| width: 100
| },
| {
| columnDescription: '器具公差',
| columnName: 'containerWeightDifference',
| sortable: true,
| wipe: true,
| width: 100
| },
| // {
| // columnDescription: '入库计划',
| // columnName: 'inOrderCode',
| // sortable: true,
| // wipe: true,
| // width: 130
| // },
| {
| columnDescription: '出库计划',
| columnName: 'outOrderCode',
| sortable: true,
| wipe: true,
| width: 130
| },
| {
| columnDescription: '更新时间',
| columnName: 'updateTime',
| sortable: true,
| wipe: true,
| width: 150
| },
| {
| columnDescription: '需返修',
| columnName: 'isBad',
| sortable: true,
| wipe: true,
| width: 90
| },
| {
| columnDescription: '返修车间',
| columnName: 'badByFactory',
| sortable: true,
| wipe: true,
| width: 100
| },
| {
| columnDescription: '生产班线',
| columnName: 'createLine',
| sortable: true,
| wipe: true,
| width: 100
| },
| {
| columnDescription: '创建人',
| columnName: 'createUser',
| sortable: true,
| wipe: true
| }
| // {
| // columnDescription: '启用',
| // columnName: 'enable',
| // sortable: true,
| // wipe:true,
| // },
| ];
| export default {
| data () {
| return {
| iqnuer: {
| isSearchNoRelevanceInOrder: true, //表示是查询未关联冲压生产计划的任务
| itemName: this.pItemName,
| itemDes: this.pItemDes
| },
| inOrderCodelist: [
| {
| label: '无',
| value: ''
| }
| ],
| tableData: [],
| handlelist: [], //勾选数据
| totle: 0,
| page: 1,
| pageSize: 20
| };
| },
| props: {
| wipelist: {
| type: Array,
| default: () => []
| },
| inOrderCodeShow: {
| type: Boolean,
| default: true
| },
| choice: {
| type: Boolean,
| default: true
| },
| pItemName: {
| type: String
| },
| pItemDes: {
| type: String
| }
| },
| components: { TableContainer },
| computed: {
| tableHead () {
| return chooseRelevanceFinishedPartHeader;
| }
| },
| mounted () {
| this.itemSearch();
| },
| methods: {
| //查询-已经完工入库的任务
| itemSearch () {
| ContainerVsItemSearch(this.page + '&onePageNum=' + this.pageSize, this.iqnuer).then(res => {
| if (res.code == 0) {
| let data = res.data;
| data.forEach(item => {
| item.image = process.env.IMAGE_URL + item.image;
| });
| this.tableData = data;
| this.totle = res.num;
| }
| });
| },
| CurrentChange (e) {
| this.page = e;
| this.itemSearch();
| },
| //勾选
| handleSelectionChange (e) {
| console.log(e);
| this.handlelist = e;
| },
| submitForm () {
| if (this.choice) {
| if (this.handlelist.length > 0) {
| this.$emit('submitForm', this.handlelist, this.iqnuer.inOrderCode);
| } else if (this.handlelist.length == 0) {
| this.$message({
| type: 'warning',
| message: '请勾选至少一条数据'
| });
| }
| // else if (this.handlelist.length > 1) {
| // this.$message({
| // type: 'warning',
| // message: '只能勾选一条数据'
| // });
| // }
| } else {
| this.$emit('submitForm', this.handlelist, this.iqnuer.inOrderCode);
| }
| },
| //删除
| del (row) {
| this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
| confirmButtonText: '确定',
| cancelButtonText: '取消',
| type: 'warning'
| })
| .then(() => {
| const { itemName } = { ...row };
| ItemDelete({ itemName }).then(res => {
| if (res.code == 0) {
| this.$message({
| type: 'success',
| message: '删除成功'
| });
| this.itemSearch();
| } else {
| this.$message({
| type: 'warning',
| message: '删除失败'
| });
| }
| });
| })
| .catch(() => {
| this.$message({
| type: 'info',
| message: '已取消删除'
| });
| });
| }
| },
| watch: {}
| };
| </script>
|
| <style lang="scss" scoped>
| .chooseRelevanceFinishedPart {
| width: 98%;
| padding: 1%;
| .chose-height {
| height: 40px;
| }
| .chose-tebleheight {
| height: calc(100% - 60px);
| }
| .show-pwd {
| position: absolute;
| right: 10px;
| top: 3px;
| font-size: 16px;
| color: #889aa4;
| cursor: pointer;
| user-select: none;
| }
| .centent-form {
| height: 92%;
| width: 100%;
| margin: auto;
| }
| .chooseRelevanceFinishedPart-button {
| }
| ::v-deep .el-form-item__content {
| width: 60%;
| }
| ::v-deep .el-select {
| // width: 100%;
| }
| }
| </style>
|
|