統計報表,批次報名
This commit is contained in:
@@ -161,7 +161,18 @@
|
||||
<span class="badge bg-secondary">會計</span>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a @click="statistic_query()" class="list-group-item list-group-item-action">
|
||||
<div class="d-flex justify-content-between align-items-start">
|
||||
<div class="d-flex">
|
||||
<i class="bi bi-file-spreadsheet text-secondary me-3 function-icon"></i>
|
||||
<div>
|
||||
<div>統計報表</div>
|
||||
<small class="text-muted"></small>
|
||||
</div>
|
||||
</div>
|
||||
<span class="badge bg-secondary">會計</span>
|
||||
</div>
|
||||
</a>
|
||||
<%-- <a @click="balance_query()" class="list-group-item list-group-item-action">
|
||||
<div class="d-flex justify-content-between align-items-start">
|
||||
<div class="d-flex">
|
||||
@@ -235,10 +246,15 @@
|
||||
'personal-component': httpVueLoader('./personal_reconcile.vue'),
|
||||
'balance-component': httpVueLoader('./balance_reconcile.vue'),
|
||||
'verify_query-component': httpVueLoader('./verify_order_record_query.vue'),
|
||||
'balance_query-component': httpVueLoader('./balance_reconcile_query.vue')
|
||||
'balance_query-component': httpVueLoader('./balance_reconcile_query.vue'),
|
||||
'statistic_query-component': httpVueLoader('./statistic.vue'),
|
||||
},
|
||||
|
||||
methods: {
|
||||
async statistic_query(){
|
||||
this.modify_dialog.show = true
|
||||
this.currentView = 'statistic_query-component'
|
||||
},
|
||||
async balance_query() {
|
||||
this.modify_dialog.show = true
|
||||
this.currentView = 'balance_query-component'
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
<template>
|
||||
<div class="container-fluid">
|
||||
<v-card>
|
||||
<v-card-title class="bg-success white--text text-center">
|
||||
<h5 class="mb-0">統計報表</h5>
|
||||
<v-spacer></v-spacer>
|
||||
<!--<v-btn color="primary" @click="submitData">確認送出</v-btn>-->
|
||||
<v-btn color="primary" class="ml-2" @click="closeWindow">關閉</v-btn>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col cols="2" md="2">
|
||||
<v-select :items="category"
|
||||
label="統計分類"
|
||||
item-text="name"
|
||||
item-value="id" v-model="category_id">
|
||||
</v-select>
|
||||
</v-col>
|
||||
<v-col cols="2" md="2">
|
||||
<v-text-field label="法會時間(起)" v-model="query.s_date"></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="2" md="2">
|
||||
<v-text-field label="法會時間(迄)" v-model="query.e_date"></v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="2" md="2">
|
||||
<v-btn @click.prevent="getRpt()" :disabled="isdisabled">
|
||||
匯出
|
||||
</v-btn>
|
||||
<img src="/admin/images/loading.gif" v-show="isloading"/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
<v-dialog v-model="message_dialog.show" class="dialog_width">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
{{ message_dialog.message }}
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<v-btn @click.prevent="message_dialog.show=false" v-if="!message_dialog.show_confirm">關閉</v-btn>
|
||||
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
message_dialog: { show: false, show_confirm: false, message: "" },
|
||||
category: [
|
||||
{ id: "01", name: "依法會+功德項目", selected: "" },
|
||||
{ id: "02", name: "依信眾", selected: "" },
|
||||
{ id: "03", name: "依法會+信眾", selected: "" },
|
||||
],
|
||||
category_id: "",
|
||||
isdisabled: false,
|
||||
isloading: false,
|
||||
query: {s_date:"",e_date:""}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
closeWindow() {
|
||||
this.$emit('close-dialog');
|
||||
},
|
||||
getRpt() {
|
||||
if (this.category_id == "") {
|
||||
this.message_dialog.message = "請選擇統計類型";
|
||||
this.message_dialog.show = true;
|
||||
return false;
|
||||
}
|
||||
const params = { statistic_mode: this.category_id }
|
||||
const search = {
|
||||
num: 0, kind: 0, kindName: "", order_no: "", u_name: "", pay_type: "", subject: "", amount: 0, price: 0, pay_mode: "", status: "",
|
||||
acc_num: 0, f_num: 0, acc_kind: 0, check_amount: 0, remain_amount: 0, check_status: "", actItem_num: 0, draft: "", d_nnum: 0
|
||||
}
|
||||
this.isdisabled = true;
|
||||
this.isloading = true;
|
||||
axios
|
||||
.post(HTTP_HOST + 'api/statistics/GetStatistic', search, { params: params })
|
||||
.then(response => {
|
||||
if (response.data.result == "N") {
|
||||
this.message_dialog.message = response.data.message;
|
||||
this.message_dialog.show = true;
|
||||
} else if (response.data.result == "Y") {
|
||||
const link = document.createElement('a');
|
||||
link.href = HTTP_HOST + "/" + response.data.filename;
|
||||
link.target = "_blank";
|
||||
|
||||
// 5. Specify the filename for the download
|
||||
//link.setAttribute('download', 'my-downloaded-file.pdf');
|
||||
|
||||
// 6. Append link to the body, click it, and remove it immediately
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
|
||||
// 7. Free up memory by revoking the object URL
|
||||
//window.URL.revokeObjectURL(blobUrl);
|
||||
//window.open(HTTP_HOST +"/" +response.data.filename, "_blank");
|
||||
}
|
||||
this.isdisabled = false;
|
||||
this.isloading = false;
|
||||
|
||||
})
|
||||
.catch(error => console.log(error))
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.v-dialog {
|
||||
width: 80% !important;
|
||||
}
|
||||
</style>
|
||||
@@ -162,7 +162,7 @@
|
||||
</v-card>
|
||||
</template>
|
||||
</v-dialog>
|
||||
</v-container>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<v-card>
|
||||
<v-card-title class="bg-primary white--text text-center">
|
||||
<h4>批次報名</h4>
|
||||
<div class="ms-auto">
|
||||
<v-btn @click.prevent="batchSave()">儲存</v-btn>
|
||||
<v-btn @click.prevent="back01()">返回</v-btn>
|
||||
</div>
|
||||
</v-card-title>
|
||||
</v-card>
|
||||
</template>
|
||||
<script>
|
||||
module.exports = {
|
||||
props: {
|
||||
num: {
|
||||
type: Number
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
batchSave() {
|
||||
|
||||
},
|
||||
back01() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user