|
@@ -126,7 +126,8 @@
|
126
|
126
|
</el-table-column>
|
127
|
127
|
<el-table-column label="出货价" align="center">
|
128
|
128
|
<template slot-scope="scope">
|
129
|
|
- {{ scope.row.price }}
|
|
129
|
+ <span v-if="scope.row.is_total == 0 && (orgId == 9919 || orgId == 9671)">{{scope.row.GoodInfo.buy_price}}</span>
|
|
130
|
+ <span v-else> {{ scope.row.price }} </span>
|
130
|
131
|
</template>
|
131
|
132
|
</el-table-column>
|
132
|
133
|
<el-table-column label="数量" align="center">
|
|
@@ -199,13 +200,14 @@ export default {
|
199
|
200
|
}
|
200
|
201
|
window.sessionStorage.removeItem('start')
|
201
|
202
|
window.sessionStorage.removeItem('end')
|
|
203
|
+ this.getGoodDetailPrintList()
|
202
|
204
|
this.GetCancelStock();
|
203
|
205
|
this.GetConfigInfo();
|
204
|
206
|
this.fetchAllAdminUsers();
|
205
|
207
|
this.goodUnit = this.$store.getters.good_unit
|
206
|
208
|
var org_id = this.$store.getters.xt_user.org.id
|
207
|
209
|
this.orgId = org_id
|
208
|
|
- this.getGoodDetailPrintList()
|
|
210
|
+
|
209
|
211
|
|
210
|
212
|
},
|
211
|
213
|
data() {
|
|
@@ -366,9 +368,10 @@ export default {
|
366
|
368
|
total += response.data.data.list[i].price * response.data.data.list[i].count
|
367
|
369
|
obj["is_total"] = 0;
|
368
|
370
|
this.cancelStockDate.push(obj);
|
369
|
|
-
|
370
|
371
|
}
|
|
372
|
+
|
371
|
373
|
this.tableDataList = response.data.data.list
|
|
374
|
+ console.log("耗材出库数据323323323232232323232",this.tableDataList)
|
372
|
375
|
this.cancelStockDate.push({
|
373
|
376
|
warehouse_out_order_number: "合计",
|
374
|
377
|
is_total: 1,
|
|
@@ -624,27 +627,27 @@ export default {
|
624
|
627
|
}
|
625
|
628
|
});
|
626
|
629
|
},
|
627
|
|
- getPrintStockGood(){
|
628
|
|
- const params = {
|
629
|
|
- start_time:this.start_time,
|
630
|
|
- end_time:this.end_time,
|
631
|
|
- type:3,
|
632
|
|
- }
|
633
|
|
- getPrintStockGood(params).then(response=>{
|
634
|
|
- if(response.data.state == 1){
|
635
|
|
- var stockTotal = response.data.data.stockTotal
|
|
630
|
+ // getPrintStockGood(){
|
|
631
|
+ // const params = {
|
|
632
|
+ // start_time:this.start_time,
|
|
633
|
+ // end_time:this.end_time,
|
|
634
|
+ // type:3,
|
|
635
|
+ // }
|
|
636
|
+ // getPrintStockGood(params).then(response=>{
|
|
637
|
+ // if(response.data.state == 1){
|
|
638
|
+ // var stockTotal = response.data.data.stockTotal
|
636
|
639
|
|
637
|
|
- this.stockTotal = stockTotal
|
638
|
|
- var list = response.data.data.list
|
639
|
|
- this.tableList = []
|
640
|
|
- for(let i=0;i<list.length;i++){
|
641
|
|
- if (list[i].query_warehouseout_info.length > 0) {
|
642
|
|
- this.tableList.push(list[i])
|
643
|
|
- }
|
644
|
|
- }
|
645
|
|
- }
|
646
|
|
- })
|
647
|
|
- },
|
|
640
|
+ // this.stockTotal = stockTotal
|
|
641
|
+ // var list = response.data.data.list
|
|
642
|
+ // this.tableList = []
|
|
643
|
+ // for(let i=0;i<list.length;i++){
|
|
644
|
+ // if (list[i].query_warehouseout_info.length > 0) {
|
|
645
|
+ // this.tableList.push(list[i])
|
|
646
|
+ // }
|
|
647
|
+ // }
|
|
648
|
+ // }
|
|
649
|
+ // })
|
|
650
|
+ // },
|
648
|
651
|
calCount(stock) {
|
649
|
652
|
let total = 0
|
650
|
653
|
var array = []
|
|
@@ -679,15 +682,6 @@ export default {
|
679
|
682
|
}
|
680
|
683
|
return Math.floor(amountPrice* 100) / 100
|
681
|
684
|
},
|
682
|
|
- getStockCount(id){
|
683
|
|
- var count = ""
|
684
|
|
- for(let i=0;i<this.stockTotal.length;i++){
|
685
|
|
- if(id == this.stockTotal[i].good_id){
|
686
|
|
- count = this.stockTotal[i].count
|
687
|
|
- }
|
688
|
|
- }
|
689
|
|
- return count
|
690
|
|
- },
|
691
|
685
|
getTotal: function(price, total) {
|
692
|
686
|
var m = 0, r1, r2
|
693
|
687
|
var s1 = price.toString()
|
|
@@ -741,15 +735,23 @@ export default {
|
741
|
735
|
this.tableOut[i].good_name = this.tableOut[i].good_name
|
742
|
736
|
this.tableOut[i].specification_name = this.tableOut[i].specification_name
|
743
|
737
|
this.tableOut[i].packing_unit = this.tableOut[i].packing_unit
|
744
|
|
- this.tableOut[i].total_price = (this.tableOut[i].count * this.tableOut[i].packing_price).toFixed(2)
|
|
738
|
+ if(this.orgId == 9919 || this.orgId == 9671){
|
|
739
|
+ this.tableOut[i].total_price = (this.tableOut[i].count * this.tableOut[i].buy_price).toFixed(2)
|
|
740
|
+ this.tableOut[i].packing_price = this.tableOut[i].buy_price
|
|
741
|
+ }else{
|
|
742
|
+ this.tableOut[i].total_price = (this.tableOut[i].count * this.tableOut[i].packing_price).toFixed(2)
|
|
743
|
+ }
|
|
744
|
+
|
745
|
745
|
this.tableOut[i].out_count = this.getStockCount(this.tableOut[i].good_id)
|
746
|
746
|
}
|
747
|
747
|
import('@/vendor/Export2Excel').then(excel => {
|
748
|
748
|
const tHeader = ['序号','耗材名称', '规格型号', '单位','数量','出货价','总价','备注']
|
|
749
|
+
|
749
|
750
|
const filterVal = ['index','good_name', 'specification_name', 'packing_unit','out_count','packing_price','total_price','remark']
|
750
|
751
|
|
751
|
752
|
const data = this.formatJson(filterVal, this.tableOut)
|
752
|
|
-
|
|
753
|
+ console.log("date2332323232",data)
|
|
754
|
+ return
|
753
|
755
|
excel.export_json_to_excel({
|
754
|
756
|
header: tHeader,
|
755
|
757
|
data,
|
|
@@ -770,8 +772,15 @@ export default {
|
770
|
772
|
this.tableDataList[i].time = this.getTime(this.tableDataList[i].WarehouseOut.warehouse_out_time)
|
771
|
773
|
this.tableDataList[i].user_name = this.getXuserName(this.tableDataList[i].WarehouseOut.creater)
|
772
|
774
|
this.tableDataList[i].out_count = this.tableDataList[i].count
|
773
|
|
- this.tableDataList[i].total_price = (this.tableDataList[i].count * this.tableDataList[i].price).toFixed(2)
|
774
|
|
- total += this.tableDataList[i].count * this.tableDataList[i].price
|
|
775
|
+ if(this.orgId == 9919 || this.orgId == 9671){
|
|
776
|
+ this.tableDataList[i].total_price = (this.tableDataList[i].count * this.tableDataList[i].GoodInfo.buy_price).toFixed(2)
|
|
777
|
+ total += this.tableDataList[i].count * this.tableDataList[i].buy_price
|
|
778
|
+ }else{
|
|
779
|
+ this.tableDataList[i].total_price = (this.tableDataList[i].count * this.tableDataList[i].price).toFixed(2)
|
|
780
|
+ total += this.tableDataList[i].count * this.tableDataList[i].price
|
|
781
|
+ }
|
|
782
|
+
|
|
783
|
+
|
775
|
784
|
}
|
776
|
785
|
obj.total_price = total.toFixed(2)
|
777
|
786
|
this.tableDataList.push(obj)
|
|
@@ -820,12 +829,24 @@ export default {
|
820
|
829
|
getGoodDetailPrintList(params).then(response=>{
|
821
|
830
|
if(response.data.state == 1){
|
822
|
831
|
var list = response.data.data.list
|
|
832
|
+
|
823
|
833
|
this.tableOut = list
|
824
|
834
|
var stockTotal = response.data.data.stockTotal
|
|
835
|
+ console.log("list88888888888888888888",stockTotal)
|
825
|
836
|
this.stockTotal = stockTotal
|
826
|
837
|
}
|
827
|
838
|
})
|
828
|
|
- }
|
|
839
|
+ },
|
|
840
|
+ getStockCount(id){
|
|
841
|
+
|
|
842
|
+ var count = ""
|
|
843
|
+ for(let i=0;i<this.stockTotal.length;i++){
|
|
844
|
+ if(id == this.stockTotal[i].good_id){
|
|
845
|
+ count = this.stockTotal[i].count
|
|
846
|
+ }
|
|
847
|
+ }
|
|
848
|
+ return count
|
|
849
|
+ },
|
829
|
850
|
}
|
830
|
851
|
};
|
831
|
852
|
</script>
|