|
@@ -12,6 +12,10 @@
|
12
|
12
|
<el-form-item label="垛位名称" style="margin-left: -35px">
|
13
|
13
|
<el-input v-model="query.stackName" size="small" style="width:120px;margin-left: -8px"></el-input>
|
14
|
14
|
</el-form-item>
|
|
15
|
+ <el-form-item label="钢板号" style="margin-left: -15px">
|
|
16
|
+ <el-input v-model="query.plateNo" size="small" style="width:120px;margin-left: -8px" @input="getPltList">
|
|
17
|
+ </el-input>
|
|
18
|
+ </el-form-item>
|
15
|
19
|
<el-form-item label="物料名称" style="margin-left: -35px">
|
16
|
20
|
<el-input v-model="query.materialName" size="small" style="width:120px;margin-left: -8px">
|
17
|
21
|
<el-button slot="append" icon="el-icon-search" @click="showMaterial"></el-button>
|
|
@@ -23,18 +27,46 @@
|
23
|
27
|
</el-input>
|
24
|
28
|
</el-form-item>
|
25
|
29
|
<el-form-item label="客户名称" style="margin-left: -35px">
|
26
|
|
- <el-input v-model="query.customerName" size="small" style="width:170px;margin-left: -8px">
|
27
|
|
- <el-button slot="append" icon="el-icon-search" @click="showCustomer"></el-button>
|
28
|
|
- </el-input>
|
|
30
|
+ <el-select v-model="query.fkcustmerName" filterable placeholder="请选择客户名称" clearable size="small" style="margin-left: 5px; width: 170px">
|
|
31
|
+ <el-option v-for="item in optionsCust" :key="item.name" :label="item.name" :value="item.name" >
|
|
32
|
+ </el-option>
|
|
33
|
+ </el-select>
|
29
|
34
|
</el-form-item>
|
30
|
|
- <el-form-item label="规格型号" style="margin-left: -15px;margin-top: -3px">
|
|
35
|
+ <el-form-item label="订单客户" style="margin-left: -35px">
|
|
36
|
+ <el-select v-model="query.customerName" filterable placeholder="请选择订单客户" clearable size="small" style="margin-left: 5px; width: 170px">
|
|
37
|
+ <el-option v-for="item in optionsCust" :key="item.name" :label="item.name" :value="item.name" >
|
|
38
|
+ </el-option>
|
|
39
|
+ </el-select>
|
|
40
|
+ </el-form-item>
|
|
41
|
+ <el-form-item label="规格型号" style="margin-left: -15px">
|
31
|
42
|
<el-input v-model="query.model" size="small" style="width:120px;margin-left: -8px">
|
32
|
43
|
</el-input>
|
33
|
44
|
</el-form-item>
|
|
45
|
+
|
|
46
|
+ <el-form-item label="订单号" style="margin-left: -15px">
|
|
47
|
+ <el-input v-model="query.ordNo" size="small" style="width:120px;margin-left: -8px" @input="getOrdList">
|
|
48
|
+ </el-input>
|
|
49
|
+ </el-form-item>
|
|
50
|
+
|
34
|
51
|
<el-form-item label="" style="margin-top: 0px;margin-left: 10px">
|
35
|
52
|
<el-button @click="handleSearch" size="small" type="primary">查询</el-button>
|
36
|
53
|
<el-button @click="showChangeCustomer" size="small" type="primary">货权转移</el-button>
|
37
|
54
|
<el-button type="primary" size="small" @click="showDistribution">配货</el-button>
|
|
55
|
+ <el-button type="primary" size="small" @click="showOut">出库</el-button>
|
|
56
|
+
|
|
57
|
+ <el-button type="primary" size="small" @click="resetButton" >重置</el-button>
|
|
58
|
+ <el-button type="success" size="small" @click="handleExport" >导出记录</el-button>
|
|
59
|
+
|
|
60
|
+ </el-form-item>
|
|
61
|
+ <el-form-item label="" style="margin-top: 0px;margin-left: 10px">
|
|
62
|
+ <el-dropdown placement="bottom" trigger="click" @command="batchOperate">
|
|
63
|
+ <el-button type="danger" size="small"> 其他操作<i class="el-icon-arrow-down el-icon--right"></i></el-button>
|
|
64
|
+ <el-dropdown-menu slot="dropdown">
|
|
65
|
+ <el-dropdown-item command="handleInBack" style="background-color: #f5f5f5;">取消入库</el-dropdown-item>
|
|
66
|
+ <el-dropdown-item command="handleChangeCustomer" style="background-color: #f5f5f5;">修改客户</el-dropdown-item>
|
|
67
|
+ </el-dropdown-menu>
|
|
68
|
+ </el-dropdown>
|
|
69
|
+
|
38
|
70
|
</el-form-item>
|
39
|
71
|
</el-row>
|
40
|
72
|
|
|
@@ -89,7 +121,7 @@
|
89
|
121
|
</el-table-column>
|
90
|
122
|
<el-table-column prop="wgtDcnMtcCd" label="计量方式" width="100" show-overflow-tooltip header-align="center">
|
91
|
123
|
</el-table-column>
|
92
|
|
- <el-table-column prop="" label="月付方式" width="100" show-overflow-tooltip header-align="center">
|
|
124
|
+ <el-table-column prop="payWay" label="月付方式" width="100" show-overflow-tooltip header-align="center">
|
93
|
125
|
</el-table-column>
|
94
|
126
|
<el-table-column prop="inwareDay" label="存储天数" width="100" show-overflow-tooltip header-align="center">
|
95
|
127
|
</el-table-column>
|
|
@@ -101,6 +133,7 @@
|
101
|
133
|
|
102
|
134
|
<popup-material ref="PopupMaterial" @receviceFromChild="receviceFromMaterial"></popup-material>
|
103
|
135
|
<popup-customer ref="PopupCustomer" @receviceFromChild="receviceFromCustomer"></popup-customer>
|
|
136
|
+ <popup-customer ref="PopupFKcustmer" @receviceFromChild="receviceFKcustmerr"></popup-customer>
|
104
|
137
|
<popup-customer ref="PopupNewCustomer" @receviceFromChild="receviceFromNewCustomer"></popup-customer>
|
105
|
138
|
<popup-address ref="PopupAddress" @receviceFromChild="receviceFromAddress"></popup-address>
|
106
|
139
|
<popup-distribution ref="PopupDistribution" @receviceFromChild="receviceFromDistreibution" :selectRows="selectRows"></popup-distribution>
|
|
@@ -108,11 +141,16 @@
|
108
|
141
|
<popup-in ref="PopupIn" @receviceFromChild="receviceFromIn" :wares="options" :wareId="query.wareId" :stack="moveFromStack"></popup-in>
|
109
|
142
|
<el-dialog title="货权转移" :visible.sync="customerDialogVisible" width="500px">
|
110
|
143
|
<el-form>
|
111
|
|
- <el-form-item label="货权转移">
|
112
|
|
- <el-input v-model="newCustomer.name">
|
113
|
|
- <el-button slot="append" icon="el-icon-search" @click="showNewCustomer"></el-button>
|
|
144
|
+ <el-form-item label="旧货主">
|
|
145
|
+ <el-input v-model="oldCustomer">
|
114
|
146
|
</el-input>
|
115
|
147
|
</el-form-item>
|
|
148
|
+ <el-form-item label="新货主">
|
|
149
|
+ <el-select v-model="newCustomer.name" filterable placeholder="请选择订单客户" clearable>
|
|
150
|
+ <el-option v-for="item in optionsCust" :key="item.id" :label="item.name" :value="item.id" >
|
|
151
|
+ </el-option>
|
|
152
|
+ </el-select>
|
|
153
|
+ </el-form-item>
|
116
|
154
|
<el-form-item label="修改地址">
|
117
|
155
|
<el-input v-model="newAddress">
|
118
|
156
|
<el-button slot="append" icon="el-icon-search" @click="showAddress"></el-button>
|
|
@@ -124,6 +162,55 @@
|
124
|
162
|
</el-form-item>
|
125
|
163
|
</el-form>
|
126
|
164
|
</el-dialog>
|
|
165
|
+
|
|
166
|
+ <el-dialog title="垛位备注" :visible.sync="stackDialogVisible" width="500px">
|
|
167
|
+ <el-form>
|
|
168
|
+ <el-form-item label="库房名称" style="margin-left: -15px">
|
|
169
|
+ <el-select v-model="newWare" clearable size="small" style="width:120px;margin-left: -8px">
|
|
170
|
+ <el-option v-for="item in optionsWare" :key="item.id" :label="item.name" :value="item.name">
|
|
171
|
+ </el-option>
|
|
172
|
+ </el-select>
|
|
173
|
+ </el-form-item>
|
|
174
|
+ <el-form-item label="新垛位">
|
|
175
|
+ <el-input v-model="newStack">
|
|
176
|
+ </el-input>
|
|
177
|
+ </el-form-item>
|
|
178
|
+ <el-form-item label="新垛位备注">
|
|
179
|
+ <el-input v-model="newRemark1">
|
|
180
|
+ </el-input>
|
|
181
|
+ </el-form-item>
|
|
182
|
+ <el-form-item label="新备注信息">
|
|
183
|
+ <el-input v-model="newRemark">
|
|
184
|
+ </el-input>
|
|
185
|
+ </el-form-item>
|
|
186
|
+ <el-form-item label=" ">
|
|
187
|
+ <el-button type="success" @click="handleStackSave">保存</el-button>
|
|
188
|
+ <el-button type="danger" @click="handleStackCancelSave">取消</el-button>
|
|
189
|
+ </el-form-item>
|
|
190
|
+ </el-form>
|
|
191
|
+ </el-dialog>
|
|
192
|
+
|
|
193
|
+ <el-dialog title="修改客户信息" :visible.sync="changeCUSTDialogVisible" width="500px">
|
|
194
|
+ <el-form>
|
|
195
|
+ <el-form-item label="新订单客户" >
|
|
196
|
+ <el-select v-model="newCustomername" filterable placeholder="请选择客户名称" clearable size="small" >
|
|
197
|
+ <el-option v-for="item in optionsCust" :key="item.name" :label="item.name" :value="item.name" >
|
|
198
|
+ </el-option>
|
|
199
|
+ </el-select>
|
|
200
|
+ </el-form-item>
|
|
201
|
+ <el-form-item label="新客户名称" >
|
|
202
|
+ <el-select v-model="newFKCustomername" filterable placeholder="请选择客户名称" clearable size="small" >
|
|
203
|
+ <el-option v-for="item in optionsCust" :key="item.name" :label="item.name" :value="item.name" >
|
|
204
|
+ </el-option>
|
|
205
|
+ </el-select>
|
|
206
|
+ </el-form-item>
|
|
207
|
+
|
|
208
|
+ <el-form-item label=" ">
|
|
209
|
+ <el-button type="success" @click="handleChangeCUSTSave">保存</el-button>
|
|
210
|
+ <el-button type="danger" @click="handleChangeCUSTCancelSave">取消</el-button>
|
|
211
|
+ </el-form-item>
|
|
212
|
+ </el-form>
|
|
213
|
+ </el-dialog>
|
127
|
214
|
<el-dialog title="库房明细" :visible.sync="importDialogVisible" width="1000px">
|
128
|
215
|
|
129
|
216
|
<el-upload class="upload-demo" action="" :on-change="handleChange" :on-exceed="handleExceed" :on-remove="handleRemove"
|
|
@@ -160,6 +247,7 @@
|
160
|
247
|
</el-table>
|
161
|
248
|
|
162
|
249
|
</el-dialog>
|
|
250
|
+
|
163
|
251
|
</div>
|
164
|
252
|
</template>
|
165
|
253
|
|
|
@@ -172,6 +260,7 @@
|
172
|
260
|
import PopupDistribution from '@/components/PopupDistribution.vue'
|
173
|
261
|
import PopupOut from '@/components/PopupOut.vue'
|
174
|
262
|
import PopupIn from '@/components/PopupIn.vue'
|
|
263
|
+ import Export2Excel from '../../excel/Export2Excel.js'
|
175
|
264
|
import {
|
176
|
265
|
mapState
|
177
|
266
|
} from 'vuex'
|
|
@@ -186,8 +275,20 @@
|
186
|
275
|
PopupIn,
|
187
|
276
|
},
|
188
|
277
|
computed: {
|
|
278
|
+ // splitCount: function() {
|
|
279
|
+ // let result = Number(this.split.originalCount) - Number(this.split.count)
|
|
280
|
+ // return result
|
|
281
|
+ // },
|
|
282
|
+ // splitWeight: function() {
|
|
283
|
+ // let result = Number(this.split.originalWeight) - Number(this.split.weight)
|
|
284
|
+ // return result
|
|
285
|
+ // },
|
189
|
286
|
...mapState({
|
190
|
287
|
serverName: state => state.app.serverName,
|
|
288
|
+ // wareBackgroundColor: state => state.color.wareBackgroundColor,
|
|
289
|
+ // stackColor: state => state.color.stackColor,
|
|
290
|
+ // stackSelectedColor: state => state.color.stackSelectedColor,
|
|
291
|
+ // lockColor: state => state.color.lockColor,
|
191
|
292
|
})
|
192
|
293
|
},
|
193
|
294
|
data() {
|
|
@@ -201,14 +302,17 @@
|
201
|
302
|
materialName: '',
|
202
|
303
|
standard: '',
|
203
|
304
|
customerName: '',
|
204
|
|
- plateNo: '',
|
|
305
|
+ plateNo: [],
|
205
|
306
|
wareId:'',
|
|
307
|
+ ordNo:[],
|
|
308
|
+ fkcustmerName:'',
|
|
309
|
+ remark1:''
|
206
|
310
|
},
|
207
|
311
|
multipleSelection: [],
|
208
|
312
|
tableData: [],
|
209
|
313
|
optionsWare: [],
|
210
|
314
|
|
211
|
|
-
|
|
315
|
+ oldCustomer:'',
|
212
|
316
|
newCustomer: {
|
213
|
317
|
id: '',
|
214
|
318
|
name: ''
|
|
@@ -217,8 +321,8 @@
|
217
|
321
|
|
218
|
322
|
currentPage: 1,
|
219
|
323
|
totalRows: 0,
|
220
|
|
- pageSizes: [50, 100, 200],
|
221
|
|
- pageSize: 50,
|
|
324
|
+ pageSizes: [50, 100, 200,1000],
|
|
325
|
+ pageSize: 1000,
|
222
|
326
|
HideAndShow: 0,
|
223
|
327
|
|
224
|
328
|
|
|
@@ -230,10 +334,23 @@
|
230
|
334
|
fileTemp: [],
|
231
|
335
|
imTableData: [],
|
232
|
336
|
moveStore: {},
|
|
337
|
+ optionsCust: [],
|
|
338
|
+ sumCount:'',
|
|
339
|
+ sumWeight:'',
|
|
340
|
+
|
|
341
|
+ stackDialogVisible: false,
|
|
342
|
+ newWare:'',
|
|
343
|
+ newStack:'',
|
|
344
|
+ newRemark1:'',
|
|
345
|
+ newRemark:'',
|
|
346
|
+ changeCUSTDialogVisible: false,
|
|
347
|
+ newCustomername:'',
|
|
348
|
+ newFKCustomername:''
|
233
|
349
|
};
|
234
|
350
|
},
|
235
|
351
|
mounted() {
|
236
|
352
|
this.getWare()
|
|
353
|
+ this.getAllCustomer()
|
237
|
354
|
//this.getTableData()
|
238
|
355
|
},
|
239
|
356
|
methods: {
|
|
@@ -244,6 +361,16 @@
|
244
|
361
|
this.query.materialName = material.name
|
245
|
362
|
this.query.standard = material.standard
|
246
|
363
|
},
|
|
364
|
+ batchOperate(command) {
|
|
365
|
+ switch (command) {
|
|
366
|
+ case "handleInBack":
|
|
367
|
+ this.handleInBack();
|
|
368
|
+ break;
|
|
369
|
+ case "handleChangeCustomer":
|
|
370
|
+ this.handleChangeCustomer();
|
|
371
|
+ break;
|
|
372
|
+ }
|
|
373
|
+ },
|
247
|
374
|
|
248
|
375
|
showCustomer() {
|
249
|
376
|
this.$refs.PopupCustomer.show()
|
|
@@ -252,6 +379,14 @@
|
252
|
379
|
this.query.customerName = customer.name
|
253
|
380
|
},
|
254
|
381
|
|
|
382
|
+
|
|
383
|
+ showFKcustmer() {
|
|
384
|
+ this.$refs.PopupFKcustmer.show()
|
|
385
|
+ },
|
|
386
|
+ receviceFKcustmerr(customer) {
|
|
387
|
+ this.query.fkcustmerName = customer.name
|
|
388
|
+ },
|
|
389
|
+
|
255
|
390
|
showNewCustomer() {
|
256
|
391
|
this.$refs.PopupNewCustomer.show()
|
257
|
392
|
},
|
|
@@ -278,31 +413,64 @@
|
278
|
413
|
'/import.xls')
|
279
|
414
|
},
|
280
|
415
|
showIn() {
|
|
416
|
+ // if (this.query.wareId == '') {
|
|
417
|
+ // this.$message({
|
|
418
|
+ // type: 'error',
|
|
419
|
+ // message: '请选择入库库房'
|
|
420
|
+ // });
|
|
421
|
+ // return
|
|
422
|
+ // }
|
|
423
|
+ // if (this.query.stackId == '') {
|
|
424
|
+ // this.$message({
|
|
425
|
+ // type: 'error',
|
|
426
|
+ // message: '请选择入库垛位'
|
|
427
|
+ // });
|
|
428
|
+ // return
|
|
429
|
+ // }
|
281
|
430
|
this.$refs.PopupIn.show()
|
282
|
431
|
},
|
283
|
432
|
handleInBack() {
|
284
|
|
- if (this.selectRows.length < 1) {
|
285
|
|
- this.$message({
|
|
433
|
+ this.$confirm("确认删除吗?", "提示", {
|
|
434
|
+ confirmButtonText:'确认',
|
|
435
|
+ cancelButtonText:'取消',
|
|
436
|
+ type: "warning"
|
|
437
|
+ }).then(() => {
|
|
438
|
+ if (this.selectRows.length < 1) {
|
|
439
|
+ this.$message({
|
286
|
440
|
type: 'error',
|
287
|
441
|
message: '至少选择一条数据!',
|
288
|
|
- });
|
289
|
|
- return
|
290
|
|
- } else {
|
291
|
|
- var url = 'WareIn/back.do'
|
292
|
|
- var param = {
|
293
|
|
- json: JSON.stringify(this.selectRows),
|
294
|
|
- }
|
295
|
|
- axios.post(url, param).then(response => {
|
296
|
|
- if (response.data.code == 0) {
|
297
|
|
- this.getStoreByStackId(response.data.data)
|
298
|
|
- } else {
|
299
|
|
- this.$message({
|
300
|
|
- type: 'error',
|
301
|
|
- message: '操作失败;' + response.data.msg,
|
302
|
|
- });
|
|
442
|
+ });
|
|
443
|
+ return
|
|
444
|
+ } else {
|
|
445
|
+ var url = 'WareIn/back.do'
|
|
446
|
+ var param = {
|
|
447
|
+ json: JSON.stringify(this.selectRows),
|
303
|
448
|
}
|
304
|
|
- });
|
305
|
|
- }
|
|
449
|
+ axios.post(url, param).then(response => {
|
|
450
|
+ if (response.data.code == 0) {
|
|
451
|
+ this.getStoreByStackId(response.data.data)
|
|
452
|
+ } else {
|
|
453
|
+ this.$message({
|
|
454
|
+ type: 'error',
|
|
455
|
+ message: '操作失败;' + response.data.msg,
|
|
456
|
+ });
|
|
457
|
+ }
|
|
458
|
+ });
|
|
459
|
+ }
|
|
460
|
+ }).catch(() => {});
|
|
461
|
+
|
|
462
|
+ },
|
|
463
|
+ resetButton(){ //查询条件重置
|
|
464
|
+ this.query.wareName = '',
|
|
465
|
+ this.query.stackName = '',
|
|
466
|
+ this.query.model = '',
|
|
467
|
+ this.query.materialName = '',
|
|
468
|
+ this.query.standard = '',
|
|
469
|
+ this.query.customerName = '',
|
|
470
|
+ this.query.plateNo = '',
|
|
471
|
+ this.query.wareId = '',
|
|
472
|
+ this.query.ordNo = '',
|
|
473
|
+ this.query.fkcustmerName = ''
|
306
|
474
|
},
|
307
|
475
|
showDistribution() {
|
308
|
476
|
//console.log(this.selectRows.length)
|
|
@@ -315,6 +483,11 @@
|
315
|
483
|
this.$refs.PopupDistribution.show()
|
316
|
484
|
|
317
|
485
|
},
|
|
486
|
+ handleChangeCustomer(){
|
|
487
|
+ this.newCustomername = '',
|
|
488
|
+ this.newFKCustomername='',
|
|
489
|
+ this.changeCUSTDialogVisible= true
|
|
490
|
+ },
|
318
|
491
|
showOut() {
|
319
|
492
|
this.$refs.PopupOut.show()
|
320
|
493
|
},
|
|
@@ -329,6 +502,13 @@
|
329
|
502
|
}
|
330
|
503
|
});
|
331
|
504
|
},
|
|
505
|
+ getAllCustomer() {
|
|
506
|
+ var url = 'MaintCustomer/queryByUserId.do'
|
|
507
|
+ var param = {}
|
|
508
|
+ axios.get(url, param).then(response => {
|
|
509
|
+ this.optionsCust = response.data.data
|
|
510
|
+ });
|
|
511
|
+ },
|
332
|
512
|
handleSizeChange(val) {
|
333
|
513
|
this.pageSize = val
|
334
|
514
|
this.getTableData()
|
|
@@ -355,10 +535,16 @@
|
355
|
535
|
model: this.query.model,
|
356
|
536
|
materialName: this.query.materialName,
|
357
|
537
|
standard: this.query.standard,
|
358
|
|
- customerName: this.query.customerName
|
|
538
|
+ customerName: this.query.customerName,
|
|
539
|
+ fkcustmerName: this.query.fkcustmerName,
|
|
540
|
+ plateNo: this.query.plateNo.length == 0 ? '' : this.query.plateNo.join(','),
|
|
541
|
+ ordNo: this.query.ordNo == 0 ? '' : this.query.ordNo.join(','),
|
|
542
|
+ remark1: this.query.remark1
|
359
|
543
|
}
|
|
544
|
+ //console.log(param);
|
360
|
545
|
axios.get(url, param).then(response => {
|
361
|
546
|
if (response.data.code == 0) {
|
|
547
|
+ //console.log(response.data.data.list);
|
362
|
548
|
this.tableData = response.data.data.list
|
363
|
549
|
this.totalRows = response.data.data.total
|
364
|
550
|
} else {
|
|
@@ -372,6 +558,13 @@
|
372
|
558
|
},
|
373
|
559
|
handleSelectionChange(val) {
|
374
|
560
|
this.multipleSelection = val;
|
|
561
|
+ this.sumCount =0;
|
|
562
|
+ this.sumWeight=0;
|
|
563
|
+ for (var i = 0; i < this.multipleSelection.length; i++){
|
|
564
|
+ this.sumCount = parseInt(this.multipleSelection[i].count)+parseInt(this.sumCount);
|
|
565
|
+ this.sumWeight = parseFloat(this.multipleSelection[i].weight)+parseFloat(this.sumWeight);
|
|
566
|
+ }
|
|
567
|
+ this.sumWeight = this.sumWeight.toFixed(3);
|
375
|
568
|
},
|
376
|
569
|
showChangeCustomer() {
|
377
|
570
|
if (this.multipleSelection.length < 1) {
|
|
@@ -392,9 +585,12 @@
|
392
|
585
|
}
|
393
|
586
|
}
|
394
|
587
|
if (boolean) {
|
395
|
|
- this.newCustomer = this.multipleSelection[0].customer
|
396
|
|
- this.newAddress = this.multipleSelection[0].receiveAddress
|
|
588
|
+ this.oldCustomer = this.multipleSelection[0].customer.name
|
|
589
|
+ //this.newAddress = this.multipleSelection[0].receiveAddress
|
|
590
|
+ this.newCustomer.name = "",
|
|
591
|
+ this.newCustomer.id = "",
|
397
|
592
|
this.customerDialogVisible = true
|
|
593
|
+
|
398
|
594
|
} else {
|
399
|
595
|
this.$message({
|
400
|
596
|
type: 'error',
|
|
@@ -404,8 +600,10 @@
|
404
|
600
|
},
|
405
|
601
|
|
406
|
602
|
handleCustomerSave() {
|
|
603
|
+ this.newCustomer.id = this.newCustomer.name;
|
407
|
604
|
var url = 'WareChange/changeCustomer.do'
|
408
|
605
|
var param = {
|
|
606
|
+
|
409
|
607
|
json: JSON.stringify(this.multipleSelection),
|
410
|
608
|
customer: JSON.stringify(this.newCustomer),
|
411
|
609
|
address: this.newAddress
|
|
@@ -425,6 +623,59 @@
|
425
|
623
|
handleCustomerCancelSave() {
|
426
|
624
|
this.customerDialogVisible = false
|
427
|
625
|
},
|
|
626
|
+ handleRemark1(){
|
|
627
|
+ this.stackDialogVisible= true;
|
|
628
|
+ this.newStack='';
|
|
629
|
+ this.newRemark1='';
|
|
630
|
+ this.newRemark = '';
|
|
631
|
+ },
|
|
632
|
+ handleChangeCUSTSave(){
|
|
633
|
+ var url = 'WareStore/changeCustName.do'
|
|
634
|
+ var param = {
|
|
635
|
+ json: JSON.stringify(this.multipleSelection),
|
|
636
|
+ newCustomername: this.newCustomername,
|
|
637
|
+ newFKCustomername: this.newFKCustomername,
|
|
638
|
+ }
|
|
639
|
+ axios.post(url, param).then(response => {
|
|
640
|
+ if (response.data.code == 0) {
|
|
641
|
+ this.getTableData()
|
|
642
|
+ this.changeCUSTDialogVisible = false
|
|
643
|
+ } else {
|
|
644
|
+ this.$message({
|
|
645
|
+ type: 'error',
|
|
646
|
+ message: '操作失败;' + response.data.msg,
|
|
647
|
+ });
|
|
648
|
+ }
|
|
649
|
+ });
|
|
650
|
+ },
|
|
651
|
+ handleChangeCUSTCancelSave(){
|
|
652
|
+ this.changeCUSTDialogVisible = false
|
|
653
|
+ },
|
|
654
|
+ handleStackSave(){
|
|
655
|
+ var url = 'WareStore/changeStack.do'
|
|
656
|
+ var param = {
|
|
657
|
+
|
|
658
|
+ json: JSON.stringify(this.multipleSelection),
|
|
659
|
+ newWare: this.newWare,
|
|
660
|
+ newStack: this.newStack,
|
|
661
|
+ newRemark1: this.newRemark1,
|
|
662
|
+ newRemark: this.newRemark
|
|
663
|
+ }
|
|
664
|
+ axios.post(url, param).then(response => {
|
|
665
|
+ if (response.data.code == 0) {
|
|
666
|
+ this.getTableData()
|
|
667
|
+ this.stackDialogVisible = false
|
|
668
|
+ } else {
|
|
669
|
+ this.$message({
|
|
670
|
+ type: 'error',
|
|
671
|
+ message: '操作失败;' + response.data.msg,
|
|
672
|
+ });
|
|
673
|
+ }
|
|
674
|
+ });
|
|
675
|
+ },
|
|
676
|
+ handleStackCancelSave(){
|
|
677
|
+ this.stackDialogVisible = false
|
|
678
|
+ },
|
428
|
679
|
inImport() {
|
429
|
680
|
var url = 'WareIn/inImport.do'
|
430
|
681
|
var json = JSON.stringify(this.imTableData)
|
|
@@ -575,9 +826,17 @@
|
575
|
826
|
handleTableSelect(selection, row) { //第一个参数是目前所有选中的数据
|
576
|
827
|
console.log(JSON.stringify(row))
|
577
|
828
|
if (row.lockFlag == '1') {
|
|
829
|
+ // this.$message({
|
|
830
|
+ // type: 'error',
|
|
831
|
+ // message: '该行已被配货锁定',
|
|
832
|
+ // });
|
578
|
833
|
alert("该行已被配货锁定")
|
579
|
834
|
this.toggleSelection([row], false)
|
580
|
|
-
|
|
835
|
+ // for(let i = 0;i<selection.length;i++){
|
|
836
|
+ // if(selection[i]==row){
|
|
837
|
+ // selection.splice(i,1)
|
|
838
|
+ // }
|
|
839
|
+ // }
|
581
|
840
|
} else {
|
582
|
841
|
this.selectRows = selection
|
583
|
842
|
this.setLayerColor()
|
|
@@ -585,7 +844,132 @@
|
585
|
844
|
},
|
586
|
845
|
selectAll(selection){
|
587
|
846
|
this.selectRows = selection;
|
588
|
|
- }
|
|
847
|
+ },
|
|
848
|
+ getlist(){
|
|
849
|
+ const replaceResult = this.query.plateNo.replace(/[;,,;\s\r\n]+/g, ",").split(",");
|
|
850
|
+ this.query.plateNo = replaceResult;
|
|
851
|
+ },
|
|
852
|
+ getPltList(){
|
|
853
|
+ const replaceResult = this.query.plateNo.replace(/[;,,;\s\r\n]+/g, ",").split(",");
|
|
854
|
+ this.query.plateNo = replaceResult;
|
|
855
|
+ },
|
|
856
|
+ getOrdList(){
|
|
857
|
+ const replaceResult = this.query.ordNo.replace(/[;,,;\s\r\n]+/g, ",").split(",");
|
|
858
|
+ this.query.ordNo = replaceResult;
|
|
859
|
+ },
|
|
860
|
+
|
|
861
|
+ handleExport() {
|
|
862
|
+ var imptData = [];
|
|
863
|
+ var url = 'WareStore/queryStore.do'
|
|
864
|
+ var param = {
|
|
865
|
+ page: -1,
|
|
866
|
+ rows: -1,
|
|
867
|
+ wareName: this.query.wareName,
|
|
868
|
+ stackName: this.query.stackName,
|
|
869
|
+ model: this.query.model,
|
|
870
|
+ materialName: this.query.materialName,
|
|
871
|
+ standard: this.query.standard,
|
|
872
|
+ customerName: this.query.customerName,
|
|
873
|
+ fkcustmerName: this.query.fkcustmerName,
|
|
874
|
+ plateNo: this.query.plateNo.length == 0 ? '' : this.query.plateNo.join(','),
|
|
875
|
+ ordNo: this.query.ordNo == 0 ? '' : this.query.ordNo.join(','),
|
|
876
|
+ remark1: this.query.remark1
|
|
877
|
+ }
|
|
878
|
+
|
|
879
|
+
|
|
880
|
+ axios.get(url, param).then(response => {
|
|
881
|
+
|
|
882
|
+ if (response.data.code == 0) {
|
|
883
|
+ console.log(response);
|
|
884
|
+ var imptData = response.data.data;
|
|
885
|
+ if (imptData.length == 0) {
|
|
886
|
+ this.$alert('无法导出,没有库存', '提示', {
|
|
887
|
+ confirmButtonText: '确定',
|
|
888
|
+ callback: action => {}
|
|
889
|
+ });
|
|
890
|
+ } else {
|
|
891
|
+
|
|
892
|
+ this.exportExcel(imptData)
|
|
893
|
+ }
|
|
894
|
+ } else {
|
|
895
|
+ this.$message({
|
|
896
|
+ type: 'error',
|
|
897
|
+ message: '操作失败;' + response.data.msg,
|
|
898
|
+ });
|
|
899
|
+ }
|
|
900
|
+
|
|
901
|
+ });
|
|
902
|
+
|
|
903
|
+ },
|
|
904
|
+ exportExcel(imptData) {
|
|
905
|
+ // alert(JSON.stringify(imptData))
|
|
906
|
+ const header = ["层数"
|
|
907
|
+ ,"垛位"
|
|
908
|
+ ,"货物品名"
|
|
909
|
+ ,"材质"
|
|
910
|
+ ,"钢板号"
|
|
911
|
+ ,"规格型号"
|
|
912
|
+ ,"数量"
|
|
913
|
+ ,"重量"
|
|
914
|
+ ,"订单号"
|
|
915
|
+ ,"合约号"
|
|
916
|
+ ,"订单客户"
|
|
917
|
+ ,"客户名称"
|
|
918
|
+ ,"收货地址"
|
|
919
|
+ ,"产地"
|
|
920
|
+ ,"备注"
|
|
921
|
+ ,"垛位备注"
|
|
922
|
+ ,"入库时间"
|
|
923
|
+ ,"入库车号"
|
|
924
|
+
|
|
925
|
+ ] // 导出的表头名
|
|
926
|
+ const filterVal = ["layer"
|
|
927
|
+ ,"stackName"
|
|
928
|
+ ,"materialName"
|
|
929
|
+ ,"materialStandard"
|
|
930
|
+ ,"plateNo"
|
|
931
|
+ ,"model"
|
|
932
|
+ ,"count"
|
|
933
|
+ ,"weight"
|
|
934
|
+ ,"ordNo"
|
|
935
|
+ ,"contractNo"
|
|
936
|
+ ,"customerName"
|
|
937
|
+ ,"customerName"
|
|
938
|
+ ,"receiveAddress"
|
|
939
|
+ ,"productionPlace"
|
|
940
|
+ ,"remark"
|
|
941
|
+ ,"remark1"
|
|
942
|
+ ,"addTime"
|
|
943
|
+ ,"carNo"
|
|
944
|
+ ]
|
|
945
|
+ for(var i=0;i<imptData.length;i++){
|
|
946
|
+ imptData[i]["stackName"] = imptData[i].stack.name;
|
|
947
|
+ imptData[i]["materialName"] = imptData[i].material.name;
|
|
948
|
+ imptData[i]["materialStandard"] = imptData[i].material.standard;
|
|
949
|
+ imptData[i]["customerName"] = imptData[i].customer.name;
|
|
950
|
+ }
|
|
951
|
+ const list = imptData
|
|
952
|
+ const data = this.formatJson(filterVal, list)
|
|
953
|
+
|
|
954
|
+ const filename = '库存信息' + (new Date()).toLocaleDateString();
|
|
955
|
+ Export2Excel.export_json_to_excel({
|
|
956
|
+ header,
|
|
957
|
+ data,
|
|
958
|
+ filename
|
|
959
|
+ })
|
|
960
|
+ },
|
|
961
|
+ formatJson(filterVal, jsonData) {
|
|
962
|
+ return jsonData.map(v => filterVal.map(j => {
|
|
963
|
+ return v[j]
|
|
964
|
+ }))
|
|
965
|
+ },
|
|
966
|
+
|
|
967
|
+ //showChangeAddress() {},
|
|
968
|
+ // handleAddressSave() {
|
|
969
|
+ // },
|
|
970
|
+ // handleAddressCancelSave() {
|
|
971
|
+ // this.addressDialogVisible = false
|
|
972
|
+ // },
|
589
|
973
|
},
|
590
|
974
|
}
|
591
|
975
|
</script>
|