|
@@ -185,14 +185,25 @@
|
185
|
185
|
{{scope.row.price}}
|
186
|
186
|
</template>
|
187
|
187
|
</el-table-column>
|
188
|
|
- <el-table-column label="厂商">
|
|
188
|
+ <el-table-column label="厂商" align="center">
|
189
|
189
|
<template slot-scope="scope">
|
190
|
190
|
{{getManufacture(scope.row.manufacturer)}}
|
191
|
191
|
</template>
|
192
|
192
|
</el-table-column>
|
193
|
|
- <el-table-column label="剩余库存量">
|
|
193
|
+ <el-table-column label="入库数量" align="center">
|
194
|
194
|
<template slot-scope="scope">
|
195
|
|
- <span v-if="scope.row.stock_count!=0">{{scope.row.stock_count}}</span>
|
|
195
|
+ <span>{{getInCount(scope.row.good_id)}}</span>
|
|
196
|
+ </template>
|
|
197
|
+ </el-table-column>
|
|
198
|
+ <el-table-column label="出库数量" align="center">
|
|
199
|
+ <template slot-scope="scope">
|
|
200
|
+ <span>{{getOutCount(scope.row.good_id)+getAutoCount(scope.row.good_id)}}</span>
|
|
201
|
+
|
|
202
|
+ </template>
|
|
203
|
+ </el-table-column>
|
|
204
|
+ <el-table-column label="剩余库存量" align="center">
|
|
205
|
+ <template slot-scope="scope">
|
|
206
|
+ {{getInCount(scope.row.good_id)- getOutCount(scope.row.good_id) - getAutoCount(scope.row.good_id)}}
|
196
|
207
|
</template>
|
197
|
208
|
</el-table-column>
|
198
|
209
|
<el-table-column label="操作" align="center" width="260px">
|
|
@@ -252,7 +263,8 @@ import {
|
252
|
263
|
GetAllGoodInfo,
|
253
|
264
|
GetAllGoodType,
|
254
|
265
|
getAllStockQueryList,
|
255
|
|
- getAllStockList
|
|
266
|
+ getAllStockList,
|
|
267
|
+ getStockDrugCount
|
256
|
268
|
} from "@/api/stock";
|
257
|
269
|
|
258
|
270
|
export default {
|
|
@@ -262,6 +274,7 @@ export default {
|
262
|
274
|
this.GetAllGoodInfo();
|
263
|
275
|
this.GetAllGoodType();
|
264
|
276
|
this.getlist()
|
|
277
|
+ this.getStockDrugCount()
|
265
|
278
|
},
|
266
|
279
|
components: {
|
267
|
280
|
BreadCrumb
|
|
@@ -291,7 +304,10 @@ export default {
|
291
|
304
|
type_name:0,
|
292
|
305
|
types:[],
|
293
|
306
|
tableList:[],
|
294
|
|
- manufacturerList:[]
|
|
307
|
+ manufacturerList:[],
|
|
308
|
+ countList:[],
|
|
309
|
+ outCountList:[],
|
|
310
|
+ autoCountList:[],
|
295
|
311
|
};
|
296
|
312
|
},
|
297
|
313
|
methods: {
|
|
@@ -548,7 +564,54 @@ export default {
|
548
|
564
|
},
|
549
|
565
|
toClickOne(val){
|
550
|
566
|
this.$router.push({path:"/stock/in/stockbatchnumber?id="+val.good_id+"&good_name="+val.good_name})
|
551
|
|
- }
|
|
567
|
+ },
|
|
568
|
+ getStockDrugCount(){
|
|
569
|
+ var params ={
|
|
570
|
+ keywords: this.keywords,
|
|
571
|
+ start_time:this.start_time,
|
|
572
|
+ end_time:this.end_time,
|
|
573
|
+ }
|
|
574
|
+ getStockDrugCount(params).then(response=>{
|
|
575
|
+ if(response.data.state == 1){
|
|
576
|
+ var count = response.data.data.count
|
|
577
|
+ console.log("入库统计",count)
|
|
578
|
+ this.countList = count
|
|
579
|
+ var outlist = response.data.data.outList
|
|
580
|
+ console.log("出库数量",outlist)
|
|
581
|
+ this.outCountList = outlist
|
|
582
|
+ var autoCount = response.data.data.autoCount
|
|
583
|
+ console.log("autoCount",autoCount)
|
|
584
|
+ this.autoCountList = autoCount
|
|
585
|
+ }
|
|
586
|
+ })
|
|
587
|
+ },
|
|
588
|
+ getInCount(id){
|
|
589
|
+ var count= ""
|
|
590
|
+ for(let i=0;i<this.countList.length;i++){
|
|
591
|
+ if(id == this.countList[i].good_id){
|
|
592
|
+ count = this.countList[i].count
|
|
593
|
+ }
|
|
594
|
+ }
|
|
595
|
+ return count
|
|
596
|
+ },
|
|
597
|
+ getOutCount(id){
|
|
598
|
+ var count = ""
|
|
599
|
+ for(let i=0;i<this.outCountList.length;i++){
|
|
600
|
+ if(id == this.outCountList[i].good_id){
|
|
601
|
+ count = this.outCountList[i].count
|
|
602
|
+ }
|
|
603
|
+ }
|
|
604
|
+ return count
|
|
605
|
+ },
|
|
606
|
+ getAutoCount(id){
|
|
607
|
+ var count= ""
|
|
608
|
+ for(let i=0;i<this.autoCountList.length;i++){
|
|
609
|
+ if(id == this.autoCountList[i].good_id){
|
|
610
|
+ count = this.outCountList[i].count
|
|
611
|
+ }
|
|
612
|
+ }
|
|
613
|
+ return count
|
|
614
|
+ }
|
552
|
615
|
}
|
553
|
616
|
};
|
554
|
617
|
</script>
|