|
@@ -116,7 +116,7 @@
|
116
|
116
|
|
117
|
117
|
<el-table-column label="剩余库存量" align="center">
|
118
|
118
|
<template slot-scope="scope">
|
119
|
|
- {{getWareInfo(scope.row.xt_warehouse_info) - getAutoCount(scope.row.id) - getOutCount(scope.row.id) + getCancelCount(scope.row.id) }}
|
|
119
|
+ <span v-if="getWareInfo(scope.row.xt_warehouse_info) > 0">{{getWareInfo(scope.row.xt_warehouse_info) - getAutoCount(scope.row.id) - getOutCount(scope.row.id) + getCancelCount(scope.row.id) }}</span>
|
120
|
120
|
<!-- <span v-if="getOverplus(scope.row.xt_warehouse_info)>0">{{getOverplus(scope.row.xt_warehouse_info)}}{{scope.row.packing_unit}}</span> -->
|
121
|
121
|
</template>
|
122
|
122
|
</el-table-column>
|
|
@@ -326,6 +326,7 @@ export default {
|
326
|
326
|
this.limit = val;
|
327
|
327
|
|
328
|
328
|
this.getlist()
|
|
329
|
+
|
329
|
330
|
},
|
330
|
331
|
handleCurrentChange(val) {
|
331
|
332
|
this.page = val;
|
|
@@ -343,6 +344,8 @@ export default {
|
343
|
344
|
} else {
|
344
|
345
|
this.start_time = val
|
345
|
346
|
this.getlist()
|
|
347
|
+ this.getStockDrugCount()
|
|
348
|
+
|
346
|
349
|
}
|
347
|
350
|
},
|
348
|
351
|
endTimeChange: function(val) {
|
|
@@ -353,6 +356,7 @@ export default {
|
353
|
356
|
} else {
|
354
|
357
|
this.end_time = val
|
355
|
358
|
this.getlist()
|
|
359
|
+ this.getStockDrugCount()
|
356
|
360
|
}
|
357
|
361
|
|
358
|
362
|
},
|
|
@@ -408,7 +412,12 @@ export default {
|
408
|
412
|
this.tableList[i].outCount = this.getAutoCount(this.tableList[i].id) + this.getOutCount(this.tableList[i].id)
|
409
|
413
|
// this.tableList[i].outCount = this.getWareInfo(this.tableList[i].xt_warehouse_info) - this.getOverplus(this.tableList[i].xt_warehouse_info) - this.getCancelInfo(this.tableList[i].cancel_stock_info)
|
410
|
414
|
// this.tableList[i].overplus = this.getOverplus(this.tableList[i].xt_warehouse_info)
|
411
|
|
- this.tableList[i].overplus = this.getWareInfo(this.tableList[i].xt_warehouse_info) - this.getAutoCount(this.tableList[i].id) - this.getOutCount(this.tableList[i].id) + this.getCancelCount(this.tableList[i].id)
|
|
415
|
+ if(this.getWareInfo(this.tableList[i].xt_warehouse_info) > 0){
|
|
416
|
+ this.tableList[i].overplus = this.getWareInfo(this.tableList[i].xt_warehouse_info) - this.getAutoCount(this.tableList[i].id) - this.getOutCount(this.tableList[i].id) + this.getCancelCount(this.tableList[i].id)
|
|
417
|
+ }else{
|
|
418
|
+ this.tableList[i].overplus = 0
|
|
419
|
+ }
|
|
420
|
+
|
412
|
421
|
}
|
413
|
422
|
console.log("table",this.tableList)
|
414
|
423
|
const data = this.formatJson(filterVal, this.tableList)
|
|
@@ -513,9 +522,9 @@ export default {
|
513
|
522
|
},
|
514
|
523
|
getStockDrugCount(){
|
515
|
524
|
var params ={
|
516
|
|
- keywords: this.$route.query.keywords,
|
517
|
|
- start_time:this.$route.query.start_time,
|
518
|
|
- end_time:this.$route.query.end_time,
|
|
525
|
+ keywords: this.$route.query.keywords,
|
|
526
|
+ start_time:this.start_time,
|
|
527
|
+ end_time:this.end_time,
|
519
|
528
|
}
|
520
|
529
|
getStockDrugCount(params).then(response=>{
|
521
|
530
|
if(response.data.state == 1){
|