|
@@ -61,11 +61,19 @@
|
61
|
61
|
<el-button v-if="$store.getters.xt_user.org_id != 10318" size="small" type="primary"
|
62
|
62
|
@click="auth">认证
|
63
|
63
|
</el-button>
|
|
64
|
+
|
|
65
|
+ <el-button v-if="$store.getters.xt_user.org_id == 10318 || $store.getters.xt_user.org_id == 0" size="small" type="primary"
|
|
66
|
+ @click="batchOpen">批量开票
|
|
67
|
+ </el-button>
|
64
|
68
|
</div>
|
65
|
69
|
|
66
|
70
|
<el-table
|
67
|
71
|
:data="tableData"
|
68
|
72
|
border
|
|
73
|
+ v-loading="isbatchloading"
|
|
74
|
+ @select="selectCostInfo"
|
|
75
|
+ @selection-change="changeCostInfoTableData"
|
|
76
|
+ @select-all="changeAllCostInfoTableData"
|
69
|
77
|
style="width: 100%"
|
70
|
78
|
:row-style="{ color: '#303133' }"
|
71
|
79
|
:header-cell-style="{
|
|
@@ -74,6 +82,8 @@
|
74
|
82
|
}"
|
75
|
83
|
highlight-current-row
|
76
|
84
|
>
|
|
85
|
+ <el-table-column align="center" type="selection" width="55"></el-table-column>
|
|
86
|
+
|
77
|
87
|
<el-table-column
|
78
|
88
|
prop="date"
|
79
|
89
|
label="序号"
|
|
@@ -374,6 +384,7 @@ export default {
|
374
|
384
|
{ path: false, name: '项目消费明细汇总' }
|
375
|
385
|
],
|
376
|
386
|
tableData: [],
|
|
387
|
+ isbatchloading:false,
|
377
|
388
|
tableData2:[],
|
378
|
389
|
selecting_schs: [],
|
379
|
390
|
dialogfapiaoVisible:false,
|
|
@@ -418,6 +429,7 @@ export default {
|
418
|
429
|
verify:[{ required: true, message: '请输入活动名称', trigger: 'blur' },]
|
419
|
430
|
},
|
420
|
431
|
time:null,
|
|
432
|
+ selection:[],
|
421
|
433
|
countdown: 0,
|
422
|
434
|
|
423
|
435
|
}
|
|
@@ -432,6 +444,14 @@ export default {
|
432
|
444
|
},
|
433
|
445
|
|
434
|
446
|
methods: {
|
|
447
|
+ selectCostInfo(selection, row) {
|
|
448
|
+ this.selection = selection
|
|
449
|
+ },
|
|
450
|
+ changeCostInfoTableData(val) {
|
|
451
|
+ this.selection = val
|
|
452
|
+ }, changeAllCostInfoTableData(selection) {
|
|
453
|
+ this.selection = selection
|
|
454
|
+ },
|
435
|
455
|
searchAction(){
|
436
|
456
|
|
437
|
457
|
this.getHisOrderList()
|
|
@@ -822,7 +842,7 @@ export default {
|
822
|
842
|
}
|
823
|
843
|
|
824
|
844
|
var that = this;
|
825
|
|
- axios.get('http://127.0.0.1:9532/api/bwfapiao/red',{params:params}).then(function(response) {
|
|
845
|
+ axios.get('http://127.0.0.1:9531/api/bwfapiao/red',{params:params}).then(function(response) {
|
826
|
846
|
if (response.data.state == 0) {
|
827
|
847
|
that.red_loading = false
|
828
|
848
|
|
|
@@ -996,8 +1016,59 @@ export default {
|
996
|
1016
|
});
|
997
|
1017
|
|
998
|
1018
|
|
999
|
|
- },
|
|
1019
|
+ },batchOpen(){
|
|
1020
|
+ let ids = ""
|
|
1021
|
+ for (var i = 0; i < this.selection.length; i++){
|
|
1022
|
+ if (ids.length == 0){
|
|
1023
|
+ ids = this.selection[i].id
|
|
1024
|
+ }else{
|
|
1025
|
+ ids = ids + "," + this.selection[i].id
|
|
1026
|
+ }
|
|
1027
|
+ }
|
|
1028
|
+ if(ids.length == 0 ){
|
|
1029
|
+ this.$message.error("请勾选需要开票的数据");
|
|
1030
|
+ return
|
|
1031
|
+ }
|
|
1032
|
+ let params = {
|
|
1033
|
+ id: ids,
|
|
1034
|
+ admin_user_id: this.$store.getters.xt_user.user.id,
|
|
1035
|
+ };
|
|
1036
|
+ var that = this;
|
|
1037
|
+ that.isbatchloading = true
|
|
1038
|
+
|
|
1039
|
+ axios.get('http://127.0.0.1:9531/api/bwfapiao/batchopen',{params:params}).then(function(response) {
|
|
1040
|
+ if (response.data.state == 0) {
|
|
1041
|
+ this.isbatchloading = false
|
|
1042
|
+
|
|
1043
|
+ that.$message.error(response.data.data.msg);
|
|
1044
|
+ return false
|
|
1045
|
+ } else {
|
|
1046
|
+ that.isbatchloading = false
|
|
1047
|
+ if(response.data.data.failed_code == -10){
|
|
1048
|
+ that.$confirm(response.data.data.msg, '错误信息', {
|
|
1049
|
+ confirmButtonText: '确 定',
|
|
1050
|
+ type: 'warning'
|
|
1051
|
+ }).then(() => {
|
|
1052
|
+
|
|
1053
|
+ }).catch(() => {
|
|
1054
|
+ })
|
|
1055
|
+ }else{
|
|
1056
|
+ that.$confirm(response.data.data.msg, '上传信息', {
|
|
1057
|
+ confirmButtonText: '确 定',
|
|
1058
|
+ type: 'warning'
|
|
1059
|
+ }).then(() => {
|
|
1060
|
+ // that.$message.success( response.data.data.msg)
|
|
1061
|
+ that.getHisOrderList()
|
|
1062
|
+ }).catch(() => {
|
|
1063
|
+ that.getHisOrderList()
|
|
1064
|
+ })
|
|
1065
|
+ }
|
|
1066
|
+ }
|
|
1067
|
+ }).catch(function(error) {
|
|
1068
|
+ that.isbatchloading = false
|
1000
|
1069
|
|
|
1070
|
+ })
|
|
1071
|
+ },
|
1001
|
1072
|
handleSelectionChange(val) {
|
1002
|
1073
|
this.selecting_schs = val
|
1003
|
1074
|
},
|