|
@@ -21,6 +21,11 @@
|
|
|
:value="item.promotion_id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="商户名称" prop="puser_id" v-if="rolesIdentify.includes('administrator')">
|
|
|
+ <el-select v-model="query.puser_id" filterable clearable placeholder="选择商户名称">
|
|
|
+ <el-option v-for="item in companyUserList" :key="item.id" :label="item.username" :value="item.id" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
</template>
|
|
|
<template v-slot:extra_button>
|
|
|
<exportExcel api="statistic/roi/list" sheet_name="投入产出" :title_obj="titleObj.title"
|
|
@@ -239,7 +244,7 @@ import { shortcuts } from '@/utils/shortcuts';
|
|
|
import { useRouter, useRoute } from 'vue-router';
|
|
|
import { InfoFilled } from '@element-plus/icons-vue';
|
|
|
import { useGetList } from '@/hook/curd/useGetList';
|
|
|
-import { statisticRoiListTotal, statisticRoiUpdateCostmoney } from '@/api/dataStatistics/roiStatistical/index';
|
|
|
+import { statisticRoiListTotal, statisticRoiUpdateCostmoney, channelCompanyUserList } from '@/api/dataStatistics/roiStatistical/index';
|
|
|
import { useExcelTitle } from "./excelTitle";
|
|
|
const titleObj = useExcelTitle()
|
|
|
console.log(titleObj, 'titleObjtitleObjtitleObj');
|
|
@@ -259,6 +264,7 @@ const { data, query, search, reset, loading } = useGetList(api);
|
|
|
const rolesIdentify = inject('rolesIdentify')
|
|
|
const channelMiniprogram = ref([])
|
|
|
const channelPromotions = ref([])
|
|
|
+const companyUserList = ref([])
|
|
|
|
|
|
|
|
|
const remoteMethod = (query: string, type: string,) => {
|
|
@@ -313,6 +319,13 @@ const initRemoteOption = (type: string, params?: object) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+const initCompanyUserList = () => {
|
|
|
+ channelCompanyUserList().then(res => {
|
|
|
+ companyUserList.value = res.data;
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
const timeChange = (e: object) => {
|
|
|
console.log(e, 'timeChangetimeChangetimeChange');
|
|
|
if (query.value.time) {
|
|
@@ -342,6 +355,7 @@ const moreReset = () => {
|
|
|
const tableData = computed(() => data.value?.data);
|
|
|
|
|
|
onMounted(() => {
|
|
|
+ initCompanyUserList()
|
|
|
initRemoteOption('channelMiniprogram')
|
|
|
initRemoteOption('channelPromotions')
|
|
|
query.value.time = [start_date, end_date];
|