|
@@ -322,17 +322,17 @@ export default {
|
322
|
322
|
this.cancelStockDate = [];
|
323
|
323
|
getStockDetail(Params).then(response => {
|
324
|
324
|
if (response.data.state == 0) {
|
325
|
|
-
|
|
325
|
+
|
326
|
326
|
this.$message.error(response.data.msg);
|
327
|
327
|
return false;
|
328
|
328
|
} else {
|
329
|
|
-
|
|
329
|
+
|
330
|
330
|
this.total = response.data.data.total;
|
331
|
331
|
for (let i = 0; i < response.data.data.list.length; i++) {
|
332
|
332
|
var obj = response.data.data.list[i];
|
333
|
333
|
obj["is_total"] = 0;
|
334
|
334
|
this.cancelStockDate.push(obj);
|
335
|
|
-
|
|
335
|
+
|
336
|
336
|
}
|
337
|
337
|
this.cancelStockDate.push({
|
338
|
338
|
warehouse_out_order_number: "合计",
|
|
@@ -369,14 +369,14 @@ export default {
|
369
|
369
|
this.$message.error(response.data.msg);
|
370
|
370
|
return false;
|
371
|
371
|
} else {
|
372
|
|
-
|
|
372
|
+
|
373
|
373
|
this.total = response.data.data.total;
|
374
|
|
-
|
|
374
|
+
|
375
|
375
|
for (let i = 0; i < response.data.data.list.length; i++) {
|
376
|
376
|
var obj = response.data.data.list[i];
|
377
|
377
|
obj["is_total"] = 0;
|
378
|
378
|
this.cancelStockDate.push(obj);
|
379
|
|
-
|
|
379
|
+
|
380
|
380
|
}
|
381
|
381
|
this.cancelStockDate.push({
|
382
|
382
|
warehouse_out_order_number: "合计",
|
|
@@ -386,7 +386,7 @@ export default {
|
386
|
386
|
warehouse_out_time: 0
|
387
|
387
|
}
|
388
|
388
|
});
|
389
|
|
-
|
|
389
|
+
|
390
|
390
|
}
|
391
|
391
|
});
|
392
|
392
|
},
|
|
@@ -644,7 +644,7 @@ export default {
|
644
|
644
|
this.tableList.push(list[i])
|
645
|
645
|
}
|
646
|
646
|
}
|
647
|
|
- console.log("表哥",this.tableList)
|
|
647
|
+ // console.log("表哥",this.tableList)
|
648
|
648
|
}
|
649
|
649
|
})
|
650
|
650
|
},
|
|
@@ -663,10 +663,10 @@ export default {
|
663
|
663
|
array = stock.query_warehousing_info
|
664
|
664
|
let total_price = 0.0
|
665
|
665
|
for (let i = 0; i < array.length; i++) {
|
666
|
|
- total_price = total_price + array[i].warehousing_count * array[i].price
|
|
666
|
+ total_price = total_price + array[i].warehousing_count * array[i].price
|
667
|
667
|
}
|
668
|
668
|
return Math.floor(total_price * 100) / 100
|
669
|
|
- },
|
|
669
|
+ },
|
670
|
670
|
calTotalPrice() {
|
671
|
671
|
var amountPrice = 0
|
672
|
672
|
for (let i = 0; i < this.tableList.length; i++) {
|
|
@@ -675,15 +675,15 @@ export default {
|
675
|
675
|
len = obj.query_warehouseout_info.length
|
676
|
676
|
let total_price = 0.0
|
677
|
677
|
for (let a = 0; a < len; a++) {
|
678
|
|
- total_price = total_price + obj.query_warehouseout_info[a].total_price
|
|
678
|
+ total_price = total_price + obj.query_warehouseout_info[a].total_price
|
679
|
679
|
}
|
680
|
680
|
|
681
|
681
|
amountPrice = amountPrice + Math.floor(total_price* 100) / 100
|
682
|
682
|
}
|
683
|
683
|
return Math.floor(amountPrice* 100) / 100
|
684
|
|
- },
|
|
684
|
+ },
|
685
|
685
|
getStockCount(id){
|
686
|
|
-
|
|
686
|
+
|
687
|
687
|
var count = ""
|
688
|
688
|
for(let i=0;i<this.stockTotal.length;i++){
|
689
|
689
|
if(id == this.stockTotal[i].good_id){
|
|
@@ -709,10 +709,10 @@ export default {
|
709
|
709
|
r2 = Number(total.toString().replace('.', ''))
|
710
|
710
|
return r1 * r2 / Math.pow(10, m)
|
711
|
711
|
},
|
712
|
|
-
|
|
712
|
+
|
713
|
713
|
|
714
|
714
|
exportList(){
|
715
|
|
-
|
|
715
|
+
|
716
|
716
|
var obj = {index:"合计",total:0}
|
717
|
717
|
obj.total = this.calTotalPrice()
|
718
|
718
|
for(let i=0;i<this.tableList.length;i++){
|
|
@@ -727,13 +727,13 @@ export default {
|
727
|
727
|
import('@/vendor/Export2Excel').then(excel => {
|
728
|
728
|
const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
|
729
|
729
|
const filterVal = ['index','good_name', 'specification_name', 'min_unit','count','price','total','remark']
|
730
|
|
-
|
731
|
730
|
|
732
|
|
-
|
|
731
|
+
|
|
732
|
+
|
733
|
733
|
|
734
|
734
|
const data = this.formatJson(filterVal, this.tableList)
|
735
|
735
|
console.log("data",data)
|
736
|
|
-
|
|
736
|
+
|
737
|
737
|
excel.export_json_to_excel({
|
738
|
738
|
header: tHeader,
|
739
|
739
|
data,
|