|
@@ -204,6 +204,13 @@
|
|
|
<template #toolbar>
|
|
<template #toolbar>
|
|
|
<div class="flex justify-end">
|
|
<div class="flex justify-end">
|
|
|
<q-btn color="primary"
|
|
<q-btn color="primary"
|
|
|
|
|
+ outline
|
|
|
|
|
+ :loading="exportReportLoading"
|
|
|
|
|
+ @click="getSubscriptionsListExcel">
|
|
|
|
|
+ خروجی اکسل
|
|
|
|
|
+ </q-btn>
|
|
|
|
|
+ <q-btn class="q-ml-sm"
|
|
|
|
|
+ color="primary"
|
|
|
label="ارسال پیام"
|
|
label="ارسال پیام"
|
|
|
@click="showAlertDialog = true" />
|
|
@click="showAlertDialog = true" />
|
|
|
</div>
|
|
</div>
|
|
@@ -290,6 +297,7 @@ import PostRequisites from 'src/components/Control/PostRequisites.vue'
|
|
|
import FormBuilderInputEditor from 'src/components/FormBuilderCustumComponents/FormBuilderInputEditor.vue'
|
|
import FormBuilderInputEditor from 'src/components/FormBuilderCustumComponents/FormBuilderInputEditor.vue'
|
|
|
import { FormBuilderAssist } from 'quasar-form-builder'
|
|
import { FormBuilderAssist } from 'quasar-form-builder'
|
|
|
import BtnControl from 'src/components/Control/btn.vue'
|
|
import BtnControl from 'src/components/Control/btn.vue'
|
|
|
|
|
+import Assist from 'assets/js/Assist'
|
|
|
|
|
|
|
|
const PostRequisitesComp = shallowRef(PostRequisites)
|
|
const PostRequisitesComp = shallowRef(PostRequisites)
|
|
|
const FormBuilderInputEditorComp = shallowRef(FormBuilderInputEditor)
|
|
const FormBuilderInputEditorComp = shallowRef(FormBuilderInputEditor)
|
|
@@ -307,6 +315,7 @@ export default {
|
|
|
return {
|
|
return {
|
|
|
tab: 'UnitInfo',
|
|
tab: 'UnitInfo',
|
|
|
mounted: false,
|
|
mounted: false,
|
|
|
|
|
+ exportReportLoading: false,
|
|
|
showAlertDialog: false,
|
|
showAlertDialog: false,
|
|
|
alertMessageText: '',
|
|
alertMessageText: '',
|
|
|
sendingAlertConfirmation: false,
|
|
sendingAlertConfirmation: false,
|
|
@@ -586,6 +595,23 @@ export default {
|
|
|
this.mounted = true
|
|
this.mounted = true
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ getSubscriptionsListExcel () {
|
|
|
|
|
+ this.exportReportLoading = true
|
|
|
|
|
+ const status = null
|
|
|
|
|
+ APIGateway.subscription.exportSubscriptionsListReport({
|
|
|
|
|
+ source_type: 'UNIT',
|
|
|
|
|
+ source_id: this.$route.params.id,
|
|
|
|
|
+ report_type: 'subscriptions_list',
|
|
|
|
|
+ status
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((xlsxData) => {
|
|
|
|
|
+ Assist.saveXlsx(xlsxData, this.$route.params.id)
|
|
|
|
|
+ this.exportReportLoading = false
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((e) => {
|
|
|
|
|
+ this.exportReportLoading = false
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
sendAlertMessage() {
|
|
sendAlertMessage() {
|
|
|
if (!this.alertMessageText.trim()) {
|
|
if (!this.alertMessageText.trim()) {
|
|
|
this.$q.notify({
|
|
this.$q.notify({
|