|
@@ -44,13 +44,19 @@
|
|
|
:value="item.providerPk"
|
|
:value="item.providerPk"
|
|
|
:key="index"/>
|
|
:key="index"/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ class="filter-input"
|
|
|
|
|
+ v-if="hasSiteType.indexOf(params.reportType) >= 0"
|
|
|
|
|
+ @click="showSiteSelection">
|
|
|
|
|
+ Select Site ({{siteSelection.list.length}})
|
|
|
|
|
+ </el-button>
|
|
|
<el-select
|
|
<el-select
|
|
|
clearable
|
|
clearable
|
|
|
collapse-tags
|
|
collapse-tags
|
|
|
reserve-keyword
|
|
reserve-keyword
|
|
|
filterable multiple
|
|
filterable multiple
|
|
|
:multiple-limit="500"
|
|
:multiple-limit="500"
|
|
|
- v-if="hasSiteType.indexOf(params.reportType) >= 0"
|
|
|
|
|
|
|
+ v-if="false"
|
|
|
v-model="params.sitePks"
|
|
v-model="params.sitePks"
|
|
|
class="filter-input"
|
|
class="filter-input"
|
|
|
placeholder="Sites"
|
|
placeholder="Sites"
|
|
@@ -144,6 +150,10 @@
|
|
|
:limit.sync="filter.pageSize"
|
|
:limit.sync="filter.pageSize"
|
|
|
@pagination="getReportsPages" />
|
|
@pagination="getReportsPages" />
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <DialogSiteSelection
|
|
|
|
|
+ :visible="siteSelection.visible"
|
|
|
|
|
+ :value="siteSelection.list"
|
|
|
|
|
+ @hide="hideSiteSelection"/>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -152,6 +162,7 @@ import site from '@/http/api/site'
|
|
|
import api from '@/api/apiReport'
|
|
import api from '@/api/apiReport'
|
|
|
import {getServiceProviderOptions} from '../../utils'
|
|
import {getServiceProviderOptions} from '../../utils'
|
|
|
import Pagination from '@/components/Pagination'
|
|
import Pagination from '@/components/Pagination'
|
|
|
|
|
+import DialogSiteSelection from './DialogSiteSelection.vue'
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -184,13 +195,17 @@ export default {
|
|
|
data: [],
|
|
data: [],
|
|
|
total: 0
|
|
total: 0
|
|
|
},
|
|
},
|
|
|
|
|
+ siteSelection: {
|
|
|
|
|
+ visible: false,
|
|
|
|
|
+ list: []
|
|
|
|
|
+ },
|
|
|
hasSPType: ["MNTHTRAN","MNTHSEPR","MNTHADHOC","MNTHSUMC"],
|
|
hasSPType: ["MNTHTRAN","MNTHSEPR","MNTHADHOC","MNTHSUMC"],
|
|
|
nonMonthType: ["APENDIXF"],
|
|
nonMonthType: ["APENDIXF"],
|
|
|
hasSiteType: ["MNTHSITE","MNTHEBS","MNTHECS","APENDIXF","APENDIXH", "APENDIXF1"],
|
|
hasSiteType: ["MNTHSITE","MNTHEBS","MNTHECS","APENDIXF","APENDIXH", "APENDIXF1"],
|
|
|
hasGroupType: ["MNTHFLET", "MNTHMEMB", "MNTHPART","MNTHGCU"]
|
|
hasGroupType: ["MNTHFLET", "MNTHMEMB", "MNTHPART","MNTHGCU"]
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
- components: { Pagination },
|
|
|
|
|
|
|
+ components: { Pagination, DialogSiteSelection },
|
|
|
created() {
|
|
created() {
|
|
|
this.getFilterOptions();
|
|
this.getFilterOptions();
|
|
|
},
|
|
},
|
|
@@ -206,7 +221,7 @@ export default {
|
|
|
this.loading.filter = true
|
|
this.loading.filter = true
|
|
|
Promise.all([
|
|
Promise.all([
|
|
|
this.getReportTypeOptions(),
|
|
this.getReportTypeOptions(),
|
|
|
- this.getSiteOptions(),
|
|
|
|
|
|
|
+ //this.getSiteOptions(),
|
|
|
this.getServiceProviderList()
|
|
this.getServiceProviderList()
|
|
|
]).then(() => {
|
|
]).then(() => {
|
|
|
this.loading.filter = false;
|
|
this.loading.filter = false;
|
|
@@ -266,6 +281,20 @@ export default {
|
|
|
this.params.yearMonthRange = [];
|
|
this.params.yearMonthRange = [];
|
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
|
},
|
|
},
|
|
|
|
|
+ getSelectIds() {
|
|
|
|
|
+ const ids = [];
|
|
|
|
|
+ this.siteSelection.list.forEach(item => {
|
|
|
|
|
+ ids.push(item.sitePk)
|
|
|
|
|
+ })
|
|
|
|
|
+ return ids;
|
|
|
|
|
+ },
|
|
|
|
|
+ showSiteSelection() {
|
|
|
|
|
+ this.siteSelection.visible = true;
|
|
|
|
|
+ },
|
|
|
|
|
+ hideSiteSelection(list) {
|
|
|
|
|
+ this.siteSelection.visible = false;
|
|
|
|
|
+ this.siteSelection.list = list;
|
|
|
|
|
+ },
|
|
|
getReportsPages() {
|
|
getReportsPages() {
|
|
|
this.loading.table = true;
|
|
this.loading.table = true;
|
|
|
this.filter.pageCriteria.reportType = this.params.reportType;
|
|
this.filter.pageCriteria.reportType = this.params.reportType;
|
|
@@ -290,6 +319,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
generateReport() {
|
|
generateReport() {
|
|
|
this.loading.generate = true;
|
|
this.loading.generate = true;
|
|
|
|
|
+ this.params.sitePks = this.getSelectIds();
|
|
|
api.generateReport(this.params).then(res => {
|
|
api.generateReport(this.params).then(res => {
|
|
|
this.loading.generate = false;
|
|
this.loading.generate = false;
|
|
|
this.$message({
|
|
this.$message({
|