|
@@ -81,12 +81,16 @@
|
81
|
81
|
<el-form-item label="" style="margin-top: -15px">
|
82
|
82
|
<el-button type="primary" size="small" @click="resetButton" :disabled="backAble">重置</el-button>
|
83
|
83
|
</el-form-item>
|
|
84
|
+ <el-form-item label="" style="margin-top: -15px">
|
|
85
|
+ <el-button type="danger" size="small" @click="deleteRecord" :disabled="backAble">删除记录</el-button>
|
|
86
|
+ </el-form-item>
|
84
|
87
|
</el-row>
|
85
|
88
|
</el-form>
|
86
|
89
|
<total-block ref="totalBlock" style="margin-left: -25px;font-size: 13px;margin-left: 5px" v-bind:childParam="childParam" v-bind:childUrl = 'childUrl'></total-block>
|
87
|
90
|
</div>
|
88
|
91
|
<div class="tabledata-grid">
|
89
|
|
- <el-table v-loading="loading" :data="tableData" height="100%" stripe border style="width: 97%;font-size: 13px;margin-top: -50px;margin-left: 25px" :header-cell-style="{'text-align':'center'}">
|
|
92
|
+ <el-table v-loading="loading" :data="tableData" height="100%" stripe border style="width: 97%;font-size: 13px;margin-top: -50px;margin-left: 25px" @select="handleTableSelect" :header-cell-style="{'text-align':'center'}">
|
|
93
|
+ <el-table-column type="selection" width="40" header-align="center" align="center"></el-table-column>
|
90
|
94
|
<el-table-column prop="id" label="编号" min-width="10%" v-if="false">
|
91
|
95
|
</el-table-column>
|
92
|
96
|
<el-table-column prop="wareName" label="仓库名称" width="150px" show-overflow-tooltip header-align="center">
|
|
@@ -175,6 +179,7 @@
|
175
|
179
|
fkComponyName:'',
|
176
|
180
|
remark1:''
|
177
|
181
|
},
|
|
182
|
+ selectRows: [],
|
178
|
183
|
loading: false,
|
179
|
184
|
tableData: [],
|
180
|
185
|
optionsWare: [],
|
|
@@ -195,7 +200,8 @@
|
195
|
200
|
materialName: '',
|
196
|
201
|
standard: '',
|
197
|
202
|
customerName: '',
|
198
|
|
- plateNo: ''
|
|
203
|
+ plateNo: '',
|
|
204
|
+ ord_no:''
|
199
|
205
|
},
|
200
|
206
|
childUrl:'WareInRecord/queryTotal.do',
|
201
|
207
|
tallyPeopleOption:[],
|
|
@@ -245,6 +251,11 @@
|
245
|
251
|
break;
|
246
|
252
|
}
|
247
|
253
|
},
|
|
254
|
+ handleTableSelect(selection, row) { //第一个参数是目前所有选中的数据
|
|
255
|
+ console.log(JSON.stringify(row))
|
|
256
|
+ this.selectRows = selection
|
|
257
|
+ this.setLayerColor()
|
|
258
|
+ },
|
248
|
259
|
showMaterial() {
|
249
|
260
|
this.$refs.PopupMaterial.show()
|
250
|
261
|
},
|
|
@@ -334,7 +345,8 @@
|
334
|
345
|
ordNo: this.query.ordNo == 0 ? '' : this.query.ordNo.join(','),
|
335
|
346
|
carNo : this.query.carNo,
|
336
|
347
|
tallyPeople:this.query.tallyPeople,
|
337
|
|
- fkComponyName:this.query.fkComponyName
|
|
348
|
+ fkComponyName:this.query.fkComponyName,
|
|
349
|
+ remark1:this.query.remark1
|
338
|
350
|
}
|
339
|
351
|
|
340
|
352
|
this.childParam = param;
|
|
@@ -382,7 +394,8 @@
|
382
|
394
|
ordNo: this.query.ordNo == 0 ? '' : this.query.ordNo.join(','),
|
383
|
395
|
carNo : this.query.carNo,
|
384
|
396
|
tallyPeople:this.query.tallyPeople,
|
385
|
|
- fkComponyName:this.query.fkComponyName
|
|
397
|
+ fkComponyName:this.query.fkComponyName,
|
|
398
|
+ remark1:this.query.remark1
|
386
|
399
|
}
|
387
|
400
|
|
388
|
401
|
|
|
@@ -480,6 +493,36 @@
|
480
|
493
|
return v[j]
|
481
|
494
|
}))
|
482
|
495
|
},
|
|
496
|
+ handleTableSelectionChange(val) {
|
|
497
|
+ this.selectRows = val
|
|
498
|
+ this.setLayerColor()
|
|
499
|
+ },
|
|
500
|
+ deleteRecord(){
|
|
501
|
+ if (this.selectRows.length < 1) {
|
|
502
|
+ this.$message({
|
|
503
|
+ type: 'error',
|
|
504
|
+ message: '至少选择一条数据!',
|
|
505
|
+ });
|
|
506
|
+ return
|
|
507
|
+ }else{
|
|
508
|
+ var url = 'WareInRecord/deleterecord.do'
|
|
509
|
+ var param = {
|
|
510
|
+ json: JSON.stringify(this.selectRows),
|
|
511
|
+ }
|
|
512
|
+ axios.post(url, param).then(response => {
|
|
513
|
+ if (response.data.code == 0) {
|
|
514
|
+ this.getTableData()
|
|
515
|
+ this.stackDialogVisible = false
|
|
516
|
+ } else {
|
|
517
|
+ this.$message({
|
|
518
|
+ type: 'error',
|
|
519
|
+ message: '操作失败;' + response.data.msg,
|
|
520
|
+ });
|
|
521
|
+ }
|
|
522
|
+ });
|
|
523
|
+ }
|
|
524
|
+
|
|
525
|
+ }
|
483
|
526
|
|
484
|
527
|
},
|
485
|
528
|
}
|