Browse Source

Merge branch 'refs/heads/xinyan' into test

xinyan 11 months ago
parent
commit
74e6073a00

+ 4 - 0
src/views/reportManage/TaskManage/index.vue

@@ -69,6 +69,10 @@ const gridOptions = reactive<VxeGridProps<RowVO>>({
   loading: false,
   round: true,
   toolbarConfig: {
+    zoom: {
+      iconIn: 'vxe-icon-fullscreen',
+      iconOut: 'vxe-icon-minimize'
+    },
     slots: {
       buttons: 'toolbar_buttons',
     },

+ 13 - 4
src/views/reportManage/dataCenter/api.ts

@@ -62,7 +62,7 @@ export function getLineData(query) {
 // 日数据列表展示
 export function getDayData(query) {
   return request({
-    url: `/api/report_manage/data-day/`,
+    url: `/api/report_manage/data-day/list/`,
     method: 'GET',
     params: query,
   });
@@ -70,7 +70,7 @@ export function getDayData(query) {
 
 export function getWeekData(query) {
   return request({
-    url: `/api/report_manage/data-week/`,
+    url: `/api/report_manage/data-week/list/`,
     method: 'GET',
     params: query,
   });
@@ -78,7 +78,7 @@ export function getWeekData(query) {
 
 export function getMonthData(query) {
   return request({
-    url: `/api/report_manage/data-month/`,
+    url: `/api/report_manage/data-month/list/`,
     method: 'GET',
     params: query,
   });
@@ -110,7 +110,7 @@ export function postCreateMonthData(body) {
   });
 }
 
-// 日数据更新页面的数据展示
+// 数据录入页面展示
 export function getDayTaskData(query) {
   return request({
     url: '/api/report_manage/summary-tasks/data/day/',
@@ -177,3 +177,12 @@ export function getMonthlyData(query) {
   });
 }
 
+//导出
+export function exportData(query) {
+  return request({
+    url: '/api/report_manage/data-all/download/',
+    method: 'GET',
+    params: query,
+    responseType: 'blob'
+  });
+}

+ 95 - 15
src/views/reportManage/dataCenter/combinedDisplay/components/tableData/mainData.vue

@@ -1,12 +1,12 @@
-<script setup lang="ts">
+<script lang="ts" setup>
 import { onMounted, reactive, ref, watch, defineProps, inject, Ref } from 'vue';
-import { getMainData } from '/@/views/reportManage/dataCenter/api';
+import { exportData, getMainData } from '/@/views/reportManage/dataCenter/api';
 import dayjs from 'dayjs';
 
 const props = defineProps({
-  dayDate:Object,
-  weekDate:Object,
-  monthDate:Object,
+  dayDate: Object,
+  weekDate: Object,
+  monthDate: Object,
   taskIds: Object,
 });
 // const dateType = inject<Ref>('dateDimension');
@@ -37,7 +37,14 @@ const gridOptions = reactive({
     pageSizes: [10, 20, 30],
   },
   toolbarConfig: {
-    custom: true
+    custom: true,
+    zoom: {
+      iconIn: 'vxe-icon-fullscreen',
+      iconOut: 'vxe-icon-minimize'
+    },
+    slots: {
+      tools: 'toolbar_buttons',
+    },
   },
   columns: tableColumns.value,
   data: []
@@ -45,7 +52,7 @@ const gridOptions = reactive({
 
 // 分页
 const gridEvents = {
-  pageChange({ currentPage, pageSize }) {
+  pageChange({currentPage, pageSize}) {
     if (gridOptions.pagerConfig) {
       gridOptions.pagerConfig.currentPage = currentPage;
       gridOptions.pagerConfig.pageSize = pageSize;
@@ -92,7 +99,7 @@ watch(() => props.taskIds, (newTaskIds) => {
 watch(() => props.dayDate, (newDayDate) => {
   if (newDayDate) {
     // console.log('newDayDate',newDayDate);
-    const {dailyStartDate, dailyTime}= newDayDate;
+    const {dailyStartDate, dailyTime} = newDayDate;
     dayStartDate.value = dailyStartDate;
     dayEndDate.value = dailyTime;
     // loadData();
@@ -103,7 +110,7 @@ watch(() => props.weekDate, (newWeekDate) => {
   if (newWeekDate) {
     // console.log('newWeekDate',newWeekDate);
     const {weekStartDate} = newWeekDate;
-    weekDate.value= weekStartDate;
+    weekDate.value = weekStartDate;
     loadData();
   }
 });
@@ -117,30 +124,91 @@ watch(() => props.monthDate, (newMonthDate) => {
 });
 
 // 获取列名数据
-async function fetchColumnNames(data) {
+//async function fetchColumnNames(data) {
+//  const firstItem = data[0];
+//  if (firstItem) {
+//    const excludedColumns = ['任务ID', '可录人数', '_X_ROW_KEY'];
+//    tableColumns.value = Object.keys(firstItem)
+//        .filter(key => !excludedColumns.includes(key))
+//        .map((key, index) => ({
+//          field: key,
+//          title: key, // 使用字段名作为列标题
+//          width: key.includes('~') ? 120 : (index < 5 ? 90 : 87),
+//          fixed: index < 5 ? 'left' : undefined // 前五列固定
+//        }));
+//  }
+//}
+
+const fetchColumnNames = (data) => {
   const firstItem = data[0];
   if (firstItem) {
-    const excludedColumns = ['任务ID', '可录人数','_X_ROW_KEY'];
+    const excludedColumns = ['任务ID', '可录人数', '_X_ROW_KEY'];
     tableColumns.value = Object.keys(firstItem)
         .filter(key => !excludedColumns.includes(key))
         .map((key, index) => ({
           field: key,
           title: key, // 使用字段名作为列标题
           width: key.includes('~') ? 120 : (index < 5 ? 90 : 87),
-          fixed: index < 5 ? 'left' : undefined // 前五列固定
+          fixed: index < 6 ? 'left' : undefined // 前五列固定
         }));
   }
-}
+};
+
+const cellStyleHandler = ({ column }) => {
+  const columnName = column.field;
+  const dayFormat = /\d{2}-\d{2}/;
+  const dayDetailedFormat = /\d{4}-\d{2}-\d{2}/;
+  const monthFormat = /\d{4}-\d{2}/;
+  if (columnName.includes('~') || columnName.includes('截止') || columnName.includes('近90天平台退货率')) {
+    return { backgroundColor: '#b3ced7' };
+  }
+  if (monthFormat.test(columnName) && !dayDetailedFormat.test(columnName)) {
+    return { backgroundColor: '#8cbacc' };
+  }
+  if (dayFormat.test(columnName)) {
+    return { backgroundColor: '#d0dadf' };
+  }
+  return {};
+};
 
 // 加载数据
 async function loadData() {
   const data = await fetchMainData(props.taskIds);
-  await fetchColumnNames(data);
+  fetchColumnNames(data);
   tableData.value = data;
   gridOptions.columns = tableColumns.value;
   gridOptions.data = tableData.value;
 }
 
+async function handleExport() {
+  try {
+    const params = {
+      page: gridOptions.pagerConfig.currentPage,
+      limit: gridOptions.pagerConfig.pageSize,
+      task_ids: props.taskIds,
+      day_start_date: dayStartDate.value,
+      day_end_date: dayEndDate.value,
+      week_start_date: weekDate.value,
+      month_start_date: monthStartDate.value,
+    };
+    // 调用后端导出数据接口
+    const response = await exportData(params);
+    console.log(12, response);
+    // 创建Blob对象表示二进制数据
+    const url = window.URL.createObjectURL(new Blob([response.data]));
+    // 创建隐藏的可下载链接
+    const link = document.createElement('a');
+    link.href = url;
+    // 设置下载的文件名
+    link.setAttribute('download', 'data_export.xlsx');
+    document.body.appendChild(link);
+    // 触发点击下载
+    link.click();
+  } catch (error) {
+    console.error('导出数据失败:', error);
+  }
+}
+
 // 初始化日期值
 // function initializeDateValues() {
 //   if (props.dayDate) {
@@ -165,9 +233,21 @@ onMounted(async () => {
 </script>
 
 <template>
-  <vxe-grid v-bind="gridOptions" v-on="gridEvents">
+  <vxe-grid :header-cell-style="cellStyleHandler" v-bind="gridOptions"
+            v-on="gridEvents">
+    <template #toolbar_buttons>
+      <vxe-button circle icon="vxe-icon-refresh" @click="fetchMainData"></vxe-button>
+      <div class="mx-3.5">
+        <vxe-button circle icon="vxe-icon-download" @click="handleExport"></vxe-button>
+      </div>
+    </template>
   </vxe-grid>
 </template>
 
 <style scoped>
+.toolbar-container {
+  display: flex;
+  gap: 10px; /* Adjust the gap value as needed */
+  align-items: center;
+}
 </style>

+ 5 - 1
src/views/reportManage/dataCenter/combinedDisplay/components/tableData/monthlyComparativeData.vue

@@ -32,7 +32,11 @@ const gridOptions = reactive({
     pageSizes: [10, 20, 30],
   },
   toolbarConfig: {
-    custom: true
+    custom: true,
+    zoom: {
+      iconIn: 'vxe-icon-fullscreen',
+      iconOut: 'vxe-icon-minimize'
+    },
   },
   columns: tableColumns,
   data: tableData,

+ 2 - 2
src/views/reportManage/dataCenter/normalDisplay/components/DatePicker/index.vue

@@ -18,7 +18,7 @@ const {dateRange} = storeToRefs(publicData);
 
 const startWeek = ref(null);
 const endWeek = ref(null);
-const weekStartDate = ref<string | null>(dayjs().locale('en').subtract(1, 'week').startOf('week').format('YYYY-MM-DD'));
+const weekStartDate = ref<string | null>(dayjs().locale('en').subtract(2, 'week').startOf('week').format('YYYY-MM-DD'));
 const weekEndDate = ref<string | null>(dayjs().locale('en').endOf('week').format('YYYY-MM-DD'));
 
 const currentYear = new Date().getFullYear();
@@ -140,7 +140,7 @@ function setDefaultDate() {
       // console.log(dateRange.value);
       break;
     case 'week':
-      startWeek.value = dayjs().locale('en').subtract(1, 'week').startOf('week').format('YYYY-MM-DD');
+      startWeek.value = dayjs().locale('en').subtract(2, 'week').startOf('week').format('YYYY-MM-DD');
       endWeek.value = dayjs().locale('en').endOf('week').format('YYYY-MM-DD');
       dateChange();
       break;

+ 2 - 2
src/views/reportManage/dataCenter/normalDisplay/components/Selector/index.vue

@@ -100,8 +100,8 @@ defineExpose({fetchFilteredData, filteredData, updateData});
 
 <template>
   <div class="flex gap-2">
-    <el-input v-model="platformNumberList" @keyup.enter="emitChange" placeholder="平台编号" style="width: 160px"></el-input>
-    <el-input v-model="platformNameList" @keyup.enter="emitChange" placeholder="平台名称" style="width: 160px"></el-input>
+    <el-input v-model="platformNumberList" @change="emitChange" placeholder="平台编号" style="width: 160px"></el-input>
+    <el-input v-model="platformNameList" @change="emitChange" placeholder="平台名称" style="width: 160px"></el-input>
     <el-select v-model="operationList" multiple collapse-tags collapse-tags-tooltip placeholder="运营" style="width: 160px">
       <el-option v-for="item in operationOptions" :key="item.value" :label="item.label" :value="item.value" />
     </el-select>

+ 132 - 33
src/views/reportManage/dataCenter/normalDisplay/components/TableDataDisplay.vue

@@ -12,6 +12,12 @@ const props = defineProps({
   taskIds: Object,
 });
 
+const dayStartDate = ref(null);
+const dayEndDate = ref(null);
+const weekStartDate = ref(null);
+const weekEndDate = ref(null);
+const monthStartDate = ref(null);
+const monthEndDate = ref(null);
 
 //表格
 const dayData = [];
@@ -24,8 +30,8 @@ const gridOptions = reactive({
   align: null,
   round: true,
   loading: false,
-  showHeaderOverflow: true,
-  showOverflow: true,
+  //showHeaderOverflow: true,
+  //showOverflow: true,
   columnConfig: {
     resizable: true,
   },
@@ -62,7 +68,8 @@ const currentGridOptions = computed(() => {
   const selectedGridOptions = gridOptions[dateType.value];
   return {
     ...gridOptions,
-    ...selectedGridOptions
+    ...selectedGridOptions,
+    columns: dateType.value === 'day' ? dayDataColumns.value : selectedGridOptions.columns
   };
 });
 // 分页
@@ -76,37 +83,57 @@ const gridEvents = {
   }
 };
 
-let dailyTime, weekEndDate, endDate, data_datetime_exact;
 watch(currentDate,(newValue)=>{
   if (dateType.value === 'day') {
-    dailyTime = dayjs(newValue.dailyTime).format("YYYY-MM-DD");
+    dayStartDate.value = dayjs(newValue.dailyStartDate).format("YYYY-MM-DD");
+    dayEndDate.value = dayjs(newValue.dailyTime).format("YYYY-MM-DD");
   }else if (dateType.value === 'week') {
-    weekEndDate = dayjs(newValue.weekEndDate).format("YYYY-MM-DD");
+    weekStartDate.value = dayjs(newValue.weekStartDate).format("YYYY-MM-DD");
+    weekEndDate.value = dayjs(newValue.weekEndDate).format("YYYY-MM-DD");
   }else if(dateType.value === 'month'){
-    endDate = dayjs(newValue.endDate).format("YYYY-MM-DD");
+    monthStartDate.value = dayjs(newValue.startDate).format("YYYY-MM-DD");
+    monthEndDate.value = dayjs(newValue.endDate).format("YYYY-MM-DD");
   }
-  fetchCurrentData(props.taskIds);
+   fetchCurrentData(props.taskIds);
 })
 
-async function fetchData(apiFunction, taskIds) {
+async function fetchDayData(taskIds) {
   try {
     gridOptions.loading = true;
-    const resp = await apiFunction({
+    const resp = await getDayData({
       page: gridOptions.pagerConfig.currentPage,
       limit: gridOptions.pagerConfig.pageSize,
-      data_datetime_exact: data_datetime_exact,
+      day_start_date: dayStartDate.value,
+      day_end_date: dayEndDate.value,
       task_ids: taskIds,
     });
     gridOptions[dateType.value].data = resp.data;
     gridOptions.pagerConfig.total = resp.total;
-    // const firstRow = resp.data[0];
-    // const dynamicColumns = [];
-    // for (const key in firstRow) {
-    //   if (key.includes('的销售额')) { // 匹配以日期开头的键名
-    //     dynamicColumns.push({ field: key, title: key });
-    //     console.log('dynamicColumns',dynamicColumns);
-    //   }
-    // }
+    if (resp.data.length > 0) {
+      const firstRow = resp.data[0];
+      const dynamicColumns = [];
+      dayDataColumns.value = dayDataColumns.value.filter(column => !/\d{2}-\d{2}的/.test(column.field));
+      for (const key in firstRow) {
+        if (/\d{2}-\d{2}/.test(key)) { // 匹配以日期开头的键名
+          dynamicColumns.push({
+            field: key,
+            title: key ,
+            width:/\d{4}-\d{2}-\d{2}/.test(key)?124:90,
+            align: 'center'
+          });
+        }
+      }
+      if (dateType.value === 'day') {
+        dayDataColumns.value = [
+          ...dayDataColumns.value, // 原始的列
+          ...dynamicColumns       // 动态生成的列
+        ];
+      }
+      else {
+        dayDataColumns.value = [];
+        gridOptions.pagerConfig.total = 0;
+      }
+    }
   } catch (error) {
     console.error('Error fetching task data:', error);
   } finally {
@@ -114,28 +141,100 @@ async function fetchData(apiFunction, taskIds) {
   }
 }
 
-async function fetchDayData(taskIds) {
-  await fetchData(getDayData, taskIds);
-}
-
-async function fetchWeekData(taskIds) {
-  // await fetchData(getWeekData, taskIds);
+async function fetchWeekData(taskIds)  {
+  try {
+    gridOptions.loading = true;
+    const resp = await getWeekData({
+      page: gridOptions.pagerConfig.currentPage,
+      limit: gridOptions.pagerConfig.pageSize,
+      week_start_date: weekStartDate.value,
+      week_end_date: weekEndDate.value,
+      task_ids: taskIds,
+    });
+    gridOptions[dateType.value].data = resp.data;
+    gridOptions.pagerConfig.total = resp.total;
+    if (resp.data.length > 0) {
+      const firstRow = resp.data[0];
+      const dynamicColumns = [];
+      weekDataColumns.value = weekDataColumns.value.filter(column => !/\d{2}-\d{2}的/.test(column.field));
+      for (const key in firstRow) {
+        if (/\d{2}-\d{2}/.test(key)) { // 匹配以日期开头的键名
+          dynamicColumns.push({
+            field: key,
+            title: key ,
+            width:key.includes('~') ? 120 :113,
+            align: 'center'
+          });
+        }
+      }
+      if (dateType.value === 'week') {
+        weekDataColumns.value = [
+          ...weekDataColumns.value, // 原始的列
+          ...dynamicColumns       // 动态生成的列
+        ];
+      }
+      else {
+        weekDataColumns.value = [];
+        gridOptions.pagerConfig.total = 0;
+      }
+    }
+  } catch (error) {
+    console.error('Error fetching task data:', error);
+  } finally {
+    gridOptions.loading = false;
+  }
 }
 
 async function fetchMonthData(taskIds) {
-  // await fetchData(getMonthData, taskIds);
+  try {
+    gridOptions.loading = true;
+    const resp = await getMonthData({
+      page: gridOptions.pagerConfig.currentPage,
+      limit: gridOptions.pagerConfig.pageSize,
+      week_start_date: monthStartDate.value,
+      week_end_date: monthEndDate.value,
+      task_ids: taskIds,
+    });
+    gridOptions[dateType.value].data = resp.data;
+    gridOptions.pagerConfig.total = resp.total;
+    if (resp.data.length > 0) {
+      const firstRow = resp.data[0];
+      const dynamicColumns = [];
+      monthDataColumns.value = monthDataColumns.value.filter(column => !/\d{2}-\d{2}的/.test(column.field));
+      for (const key in firstRow) {
+        if (/\d{2}-\d{2}/.test(key)) { // 匹配以日期开头的键名
+          dynamicColumns.push({
+            field: key,
+            title: key ,
+            width:/\d{4}-\d{2}-\d{2}/.test(key)?124:90,
+            align: 'center'
+          });
+        }
+      }
+      if (dateType.value === 'month') {
+        monthDataColumns.value = [
+          ...monthDataColumns.value, // 原始的列
+          ...dynamicColumns       // 动态生成的列
+        ];
+      }
+      else {
+        monthDataColumns.value = [];
+        gridOptions.pagerConfig.total = 0;
+      }
+    }
+  } catch (error) {
+    console.error('Error fetching task data:', error);
+  } finally {
+    gridOptions.loading = false;
+  }
 }
 
 function fetchCurrentData(taskIds) {
   if (dateType.value === 'day') {
-    data_datetime_exact = dailyTime;
     fetchDayData(taskIds);
   } else if (dateType.value === 'week') {
-    data_datetime_exact = weekEndDate;
-    console.log('week');
     fetchWeekData(taskIds);
   } else if (dateType.value === 'month') {
-    data_datetime_exact = endDate;
     fetchMonthData(taskIds);
   }
 }
@@ -163,9 +262,9 @@ onMounted(() => {
     <vxe-grid v-bind="currentGridOptions" v-on="gridEvents">
       <template #toolbar_buttons>
         <vxe-button status="primary" icon="vxe-icon-add" @click="handleImport" >数据录入</vxe-button>
-        <span v-if="dateType === 'day'" class="text-right">{{dailyTime}}日数据</span>
-        <span v-else-if="dateType === 'week'" class="text-right">{{weekEndDate}}周数据</span>
-        <span v-else-if="dateType === 'month'" class="text-right">{{endDate}}月数据</span>
+        <!--<span v-if="dateType === 'day'" class="text-right">{{dayStartDate}}日数据</span>-->
+        <!--<span v-else-if="dateType === 'week'" class="text-right">{{weekEndDate}}周数据</span>-->
+        <!--<span v-else-if="dateType === 'month'" class="text-right">{{endDate}}月数据</span>-->
       </template>
       <!--<template #platformNumber_default="{ row }">-->
       <!--  <div>{{ row.task_info.platformNumber }}</div>-->

+ 213 - 107
src/views/reportManage/dataCenter/utils/columns.ts

@@ -1,127 +1,233 @@
+import { ref } from 'vue';
+//数据录入
 export const dayColumns = ref([
-  { field: 'platformNumber', title: '平台编号' },
-  { field: 'platformName', title: '平台名称' },
-  { field: 'country', title: '国家' },
-  { field: 'brandName', title: '品牌' },
-  { field: 'user_name', title: '运营' },
+  {field: 'platformNumber', title: '平台编号'},
+  {field: 'platformName', title: '平台名称'},
+  {field: 'country', title: '国家'},
+  {field: 'brandName', title: '品牌'},
+  {field: 'user_name', title: '运营'},
 
-  { field: 'sales', title: '销售额', editRender: {}, slots: { edit: 'sales_edit' } },
-  { field: 'ad_sales', title: '广告销售额', editRender: {}, slots: { edit: 'ad_sales_edit' } },
-  { field: 'ad_cost', title: '广告花费', editRender: {}, slots: { edit: 'ad_cost_edit' } },
-  { title: '操作', width: 300, slots: { default: 'operate' } },
+  {field: 'sales', title: '销售额'},
+  {field: 'ad_sales', title: '广告销售额'},
+  {field: 'ad_cost', title: '广告花费'},
+  {field: 'sales_original', title: '销售额(本币)', editRender: {}, slots: {edit: 'sales_original_edit'}, width: 157,},
+  {
+    field: 'ad_sales_original',
+    title: '广告销售额(本币)',
+    editRender: {},
+    slots: {edit: 'ad_sales_original_edit'},
+    width: 180,
+  },
+  {
+    field: 'ad_cost_original',
+    title: '广告花费(本币)',
+    editRender: {},
+    slots: {edit: 'ad_cost_original_edit'},
+    width: 180,
+  },
+  {title: '操作', width: 220, slots: {default: 'operate'}},
 ]);
 
 export const weekColumns = ref([
-  {field: 'platformNumber', title: '平台编号',fixed:"left",width: 90},
-  {field: 'platformName', title: '平台名称',fixed:"left",width: 90},
-  {field: 'country', title: '国家',fixed:"left",width: 90},
-  {field: 'brandName', title: '品牌',fixed:"left",width: 90},
-  {field: 'user_name', title: '运营',fixed:"left",width: 90},
+  {field: 'platformNumber', title: '平台编号', fixed: 'left', width: 90},
+  {field: 'platformName', title: '平台名称', fixed: 'left', width: 90},
+  {field: 'country', title: '国家', fixed: 'left', width: 90},
+  {field: 'brandName', title: '品牌', fixed: 'left', width: 90},
+  {field: 'user_name', title: '运营', fixed: 'left', width: 90},
 
-  {field: 'sales', title: '销售额',editRender: {}, slots: {edit: 'sales_edit'},width: 120},
-  {field: 'total_sales_current_monthly', title: '当月累计销售额',editRender: {}, slots: {edit: 'total_sales_current_monthly_edit'},width: 120},
-  {field: 'ad_sales', title: '广告销售额',editRender: {},slots: {edit: 'ad_sales_edit'},width: 120},
-  { field: 'ad_cost', title: '广告花费', editRender: {}, slots: { edit: 'ad_cost_edit' } ,width: 120},
-  { field: 'impression', title: '广告曝光', editRender: {}, slots: { edit: 'impression_edit' } ,width: 120},
-  { field: 'ad_click', title: '广告点击', editRender: {}, slots: { edit: 'ad_click_edit' } ,width: 120},
-  { field: 'ad_order', title: '广告订单', editRender: {}, slots: { edit: 'ad_order_edit' } ,width: 120},
-  { field: 'money_by_amazon', title: 'Amazon回款金额', editRender: {}, slots: { edit: 'money_by_amazon_edit' } ,width: 120},
-  { field: 'money_by_other', title: 'Other回款金额', editRender: {}, slots: { edit: 'money_by_other_edit' } ,width: 120},
-  { field: 'session', title: '流量', editRender: {}, slots: { edit: 'session_edit' } ,width: 120},
-  { field: 'order', title: '转化', editRender: {}, slots: { edit: 'order_edit' } ,width: 120},
-  { field: 'availableSalesDay', title: '当前存货可售天', editRender: {}, slots: { edit: 'availableSalesDay_edit' } ,width: 120},
-  { field: 'intransitInventory', title: '当前在途库存', editRender: {}, slots: { edit: 'intransitInventory_edit' } ,width: 120},
-  { field: 'overseasStorage', title: '当前海外仓库存', editRender: {}, slots: { edit: 'overseasStorage_edit' } ,width: 120},
-  { field: 'refundRate', title: '最近90天平台退货率', editRender: {}, slots: { edit: 'refundRate_edit' } ,width: 120},
-  {title: '操作', width: 120, slots: {default: 'operate'},fixed:"right"},
+  {field: 'sales', title: '销售额', width: 120},
+  {field: 'ad_sales', title: '广告销售额', width: 120},
+  {field: 'ad_cost', title: '广告花费', width: 120},
+  {
+    field: 'total_sales_current_monthly',
+    title: '当月累计销售额',
+    editRender: {},
+    slots: {edit: 'total_sales_current_monthly_edit'},
+    width: 120
+  },
+  {field: 'sales_original', title: '销售额(本币)', editRender: {}, slots: {edit: 'sales_original_edit'}, width: 157,},
+  {
+    field: 'ad_sales_original',
+    title: '广告销售额(本币)',
+    editRender: {},
+    slots: {edit: 'ad_sales_original_edit'},
+    width: 180,
+  },
+  {
+    field: 'ad_cost_original',
+    title: '广告花费(本币)',
+    editRender: {},
+    slots: {edit: 'ad_cost_original_edit'},
+    width: 180,
+  },
+  {field: 'impression', title: '广告曝光', editRender: {}, slots: {edit: 'impression_edit'}, width: 120},
+  {field: 'ad_click', title: '广告点击', editRender: {}, slots: {edit: 'ad_click_edit'}, width: 120},
+  {field: 'ad_order', title: '广告订单', editRender: {}, slots: {edit: 'ad_order_edit'}, width: 120},
+  {field: 'money_by_amazon', title: 'Amazon回款金额', width: 120},
+  {field: 'money_by_other', title: 'Other回款金额', width: 120},
+  {
+    field: 'money_by_amazon_original',
+    title: 'Amazon回款金额(本币)',
+    editRender: {},
+    slots: {edit: 'money_by_amazon_edit'},
+    width: 120
+  },
+  {
+    field: 'money_by_other_original',
+    title: 'Other回款金额(本币)',
+    editRender: {},
+    slots: {edit: 'money_by_other_edit'},
+    width: 120
+  },
+  {field: 'session', title: '流量', editRender: {}, slots: {edit: 'session_edit'}, width: 120},
+  {field: 'order', title: '订单', editRender: {}, slots: {edit: 'order_edit'}, width: 120},
+  {
+    field: 'availableSalesDay',
+    title: '当前存货可售天',
+    editRender: {},
+    slots: {edit: 'availableSalesDay_edit'},
+    width: 120
+  },
+  {
+    field: 'intransitInventory',
+    title: '当前在途库存',
+    editRender: {},
+    slots: {edit: 'intransitInventory_edit'},
+    width: 120
+  },
+  {
+    field: 'overseasStorage',
+    title: '当前海外仓库存',
+    editRender: {},
+    slots: {edit: 'overseasStorage_edit'},
+    width: 120
+  },
+  {field: 'refundRate', title: '最近90天平台退货率', editRender: {}, slots: {edit: 'refundRate_edit'}, width: 120},
+  {title: '操作', width: 120, slots: {default: 'operate'}, fixed: 'right'},
 ]);
 
 export const monthColumns = ref([
-  {field: 'platformNumber', title: '平台编号' },
+  {field: 'platformNumber', title: '平台编号'},
   {field: 'platformName', title: '平台名称'},
   {field: 'country', title: '国家'},
   {field: 'brandName', title: '品牌'},
-  { field: 'user_name', title: '运营' },
-
-  {field: 'sales', title: '销售额',editRender: {}, slots: {edit: 'sales_edit'}},
-  {field: 'ad_sales', title: '广告销售额',editRender: {},slots: {edit: 'ad_sales_edit'}},
-  { field: 'ad_cost', title: '广告花费', editRender: {}, slots: { edit: 'ad_cost_edit' } },
-  { field: 'impression', title: '广告曝光', editRender: {}, slots: { edit: 'impression_edit' } },
-  { field: 'ad_click', title: '广告点击', editRender: {}, slots: { edit: 'ad_click_edit' } },
-  { field: 'ad_order', title: '广告订单', editRender: {}, slots: { edit: 'ad_order_edit' } },
-  {title: '操作', width: 300, slots: {default: 'operate'}},
-]);
-
-export const dayDataColumns = [
-  {field: 'platformNumber', title: '平台编号', slots: {default: 'platformNumber_default'}},
-  {field: 'platformName', title: '平台名称', slots: {default: 'platformName_default'}},
-  {field: 'user_name', title: '运营', slots: {default: 'user_name_default'}},
-  {field: 'country', title: '国家', slots: {default: 'country_default'}},
-  {field: 'brandName', title: '品牌', slots: {default: 'brandName_default'}},
-  {field: 'currencyCode', title: '汇款币种', slots: {default: 'currencyCode_default'}},
+  {field: 'user_name', title: '运营'},
 
   {field: 'sales', title: '销售额'},
-  {field: 'sales_year_on_year', title: '期末同比变化'},
-  {field: 'sales_monthly_year_on_year', title: '期末环比变化'},
-  {field: 'ad_cost', title: '广告花费'},
   {field: 'ad_sales', title: '广告销售额'},
-  {field: 'roi', title: '广告ROI'},
-  {field: 'acos', title: '广告ACOS'},
-  {field: 'roas', title: '广告ROAS'},
-];
-export const weekDataColumns = [
-  {field: 'platformNumber', title: '平台编号', slots: {default: 'platformNumber_default'}, fixed: 'left', width: 90},
-  {field: 'platformName', title: '平台名称', slots: {default: 'platformName_default'}, fixed: 'left', width: 90},
-  {field: 'user_name', title: '运营', slots: {default: 'user_name_default'}, fixed: 'left', width: 90},
-  {field: 'country', title: '国家', slots: {default: 'country_default'}, fixed: 'left', width: 90},
-  {field: 'brandName', title: '品牌', slots: {default: 'brandName_default'}, fixed: 'left', width: 90},
-  {field: 'currencyCode', title: '汇款币种', slots: {default: 'currencyCode_default'}, fixed: 'left', width: 90},
+  {field: 'ad_cost', title: '广告花费'},
+  {field: 'sales_original', title: '销售额(本币)', editRender: {}, slots: {edit: 'sales_original_edit'}, width: 157,},
+  {
+    field: 'ad_sales_original',
+    title: '广告销售额(本币)',
+    editRender: {},
+    slots: {edit: 'ad_sales_original_edit'},
+    width: 180,
+  },
+  {
+    field: 'ad_cost_original',
+    title: '广告花费(本币)',
+    editRender: {},
+    slots: {edit: 'ad_cost_original_edit'},
+    width: 180,
+  },
+  {field: 'impression', title: '广告曝光', editRender: {}, slots: {edit: 'impression_edit'}},
+  {field: 'ad_click', title: '广告点击', editRender: {}, slots: {edit: 'ad_click_edit'}},
+  {field: 'ad_order', title: '广告订单', editRender: {}, slots: {edit: 'ad_order_edit'}},
+  {title: '操作', width: 300, slots: {default: 'operate'}},
+]);
 
-  {field: 'sales', title: '销售额', width: 120},
-  {field: 'ad_cost', title: '广告花费', width: 120},
-  {field: 'ad_sales', title: '广告销售额', width: 120},
-  {field: 'roi', title: '广告ROI', width: 120},
-  {field: 'acos', title: '广告ACOS', width: 120},
-  {field: 'roas', title: '广告ROAS', width: 120},
-  {field: 'impression', title: '广告曝光', width: 120},
-  {field: 'ad_click', title: '广告点击', width: 120},
-  {field: 'ad_order', title: '广告订单', width: 120},
-  {field: 'ad_conversion_rate', title: '广告转化率', width: 120},
-  {field: 'money_by_amazon', title: 'Amazon回款金额', width: 120},
-  {field: 'money_by_other', title: 'Ebay及其他平台可用余额', width: 120},
-  {field: 'currencyCode', title: '回款/余额币种', width: 120},
-  {field: 'total_sales_current_monthly', title: '销售额完成情况', width: 120},
-  {field: 'sales_weekly_year_on_year', title: '环比上周增长率', width: 120},
-  {field: 'sales_monthly_year_on_year', title: '环比上月周增长率', width: 120},
-  {field: 'sales_year_on_year', title: '环比上年周增长率', width: 120},
-  {field: 'session', title: '流量', width: 120},
-  {field: 'ad_order', title: '订单', width: 120},
-  {field: 'order', title: '转化', width: 120},
-  {field: 'availableSalesDay', title: '当前存货可售天', width: 120},
-  {field: 'intransitInventory', title: '当前在途库存', width: 120},
-  {field: 'overseasStorage', title: '当前海外仓库存', width: 120},
-  {field: 'refundRate', title: '最近90天平台退货率', width: 120},
-];
-export const monthDataColumns = [
-  {field: 'platformNumber', title: '平台编号', slots: {default: 'platformNumber_default'}},
-  {field: 'platformName', title: '平台名称', slots: {default: 'platformName_default'}},
-  {field: 'user_name', title: '运营', slots: {default: 'user_name_default'}},
-  {field: 'country', title: '国家', slots: {default: 'country_default'}},
-  {field: 'brandName', title: '品牌', slots: {default: 'brandName_default'}},
-  {field: 'currencyCode', title: '汇款币种', slots: {default: 'currencyCode_default'}},
+// 表格展示
+export const dayDataColumns = ref([
+  // {field: 'platformNumber', title: '平台编号', slots: {default: 'platformNumber_default'}},
+  // {field: 'platformName', title: '平台名称', slots: {default: 'platformName_default'}},
+  // {field: 'user_name', title: '运营', slots: {default: 'user_name_default'}},
+  // {field: 'country', title: '国家', slots: {default: 'country_default'}},
+  // {field: 'brandName', title: '品牌', slots: {default: 'brandName_default'}},
+  // {field: 'currencyCode', title: '汇款币种', slots: {default: 'currencyCode_default'}},
+  {field: '平台编号', title: '平台编号', fixed: 'left', width: 90},
+  {field: '平台名称', title: '平台名称', fixed: 'left', width: 90},
+  {field: '运营', title: '运营', fixed: 'left', width: 90},
+  {field: '国家', title: '国家', fixed: 'left', width: 90},
+  {field: '品牌名称', title: '品牌', fixed: 'left', width: 90},
+  {field: '货币名称', title: '汇款币种', fixed: 'left',width: 90},
+  //{field: 'sales_original', title: '销售额(本币)', width: 104,},
+  //{field: 'ad_sales_original', title: '广告销售额(本币)', width: 132,},
+  //{field: 'ad_cost_original', title: '广告花费(本币)', width: 116,},
+  // {field: 'sales', title: '销售额'},
+  // {field: 'sales_year_on_year', title: '期末同比变化'},
+  // {field: 'sales_monthly_year_on_year', title: '期末环比变化'},
+  // {field: 'ad_cost', title: '广告花费'},
+  // {field: 'ad_sales', title: '广告销售额'},
+  // {field: 'roi', title: '广告ROI'},
+  // {field: 'acos', title: '广告ACOS'},
+  // {field: 'roas', title: '广告ROAS'},
+]);
+export const weekDataColumns = ref([
+  {field: 'platformNumber', title: '平台编号', fixed: 'left', width: 90},
+  {field: 'platformName', title: '平台名称',  fixed: 'left', width: 90},
+  {field: 'user_name', title: '运营',  fixed: 'left', width: 90},
+  {field: 'country', title: '国家',  fixed: 'left', width: 90},
+  {field: 'brandName', title: '品牌',  fixed: 'left', width: 90},
+  {field: 'currencyCode', title: '汇款币种',  fixed: 'left', width: 90},
+  //{field: 'sales_original', title: '销售额(本币)', width: 104,},
+  //{field: 'ad_sales_original', title: '广告销售额(本币)', width: 132,},
+  //{field: 'ad_cost_original', title: '广告花费(本币)', width: 116,},
+  //{
+  //  field: 'money_by_amazon_original',
+  //  title: 'Amazon回款金额(本币)',
+  //  width: 120
+  //},
+  //{
+  //  field: 'money_by_other_original',
+  //  title: 'Other回款金额(本币)',
+  //  width: 120
+  //},
+  //{field: 'sales', title: '销售额', width: 120},
+  //{field: 'ad_cost', title: '广告花费', width: 120},
+  //{field: 'ad_sales', title: '广告销售额', width: 120},
+  //{field: 'roi', title: '广告ROI', width: 120},
+  //{field: 'acos', title: '广告ACOS', width: 120},
+  //{field: 'roas', title: '广告ROAS', width: 120},
+  //{field: 'impression', title: '广告曝光', width: 120},
+  //{field: 'ad_click', title: '广告点击', width: 120},
+  //{field: 'ad_order', title: '广告订单', width: 120},
+  //{field: 'ad_conversion_rate', title: '广告转化率', width: 120},
+  //{field: 'money_by_amazon', title: 'Amazon回款金额', width: 120},
+  //{field: 'money_by_other', title: 'Ebay及其他平台可用余额', width: 120},
+  //{field: 'currencyCode', title: '回款/余额币种', width: 120},
+  //{field: 'total_sales_current_monthly', title: '销售额完成情况', width: 120},
+  //{field: 'sales_weekly_year_on_year', title: '环比上周增长率', width: 120},
+  //{field: 'sales_monthly_year_on_year', title: '环比上月周增长率', width: 120},
+  //{field: 'sales_year_on_year', title: '环比上年周增长率', width: 120},
+  //{field: 'session', title: '流量', width: 120},
+  //{field: 'ad_order', title: '广告订单', width: 120},
+  //{field: 'order', title: '订单', width: 120},
+  //{field: 'availableSalesDay', title: '当前存货可售天', width: 120},
+  //{field: 'intransitInventory', title: '当前在途库存', width: 120},
+  //{field: 'overseasStorage', title: '当前海外仓库存', width: 120},
+  //{field: 'refundRate', title: '最近90天平台退货率', width: 120},
+]);
+export const monthDataColumns = ref([
+  {field: 'platformNumber', title: '平台编号', fixed: 'left', width: 90},
+  {field: 'platformName', title: '平台名称',  fixed: 'left', width: 90},
+  {field: 'user_name', title: '运营',  fixed: 'left', width: 90},
+  {field: 'country', title: '国家',  fixed: 'left', width: 90},
+  {field: 'brandName', title: '品牌',  fixed: 'left', width: 90},
+  {field: 'currencyCode', title: '汇款币种',  fixed: 'left', width: 90},
 
-  {field: 'sales', title: '销售额'},
-  {field: 'ad_cost', title: '广告花费'},
-  {field: 'ad_sales', title: '广告销售额'},
-  {field: 'roi', title: '广告ROI'},
-  {field: 'acos', title: '广告ACOS'},
-  {field: 'roas', title: '广告ROAS'},
-  {field: 'impression', title: '广告曝光',},
-  {field: 'ad_click', title: '广告点击',},
-  {field: 'ad_order', title: '广告订单',},
-  {field: 'ad_conversion_rate', title: '广告转化率',},
-  {field: 'total_sales_current_monthly', title: '销售额完成情况',},
-];
+  //{field: 'sales', title: '销售额'},
+  //{field: 'ad_cost', title: '广告花费'},
+  //{field: 'ad_sales', title: '广告销售额'},
+  //{field: 'roi', title: '广告ROI'},
+  //{field: 'acos', title: '广告ACOS'},
+  //{field: 'roas', title: '广告ROAS'},
+  //{field: 'impression', title: '广告曝光',},
+  //{field: 'ad_click', title: '广告点击',},
+  //{field: 'ad_order', title: '广告订单',},
+  //{field: 'ad_conversion_rate', title: '广告转化率',},
+  //{field: 'total_sales_current_monthly', title: '销售额完成情况',},
+]);
 
 // export const mainColumns = ref([
 //   {field: 'platformNumber', title: '平台编号',fixed:"left",width: 90},