yumeng há 1 ano atrás
pai
commit
17f0a458e3

+ 26 - 1
src/api/jiaoyang/report.js

@@ -134,13 +134,16 @@ export function profitData(query) {
     params: query
   })
 }
+
 export function getTopItem(query) {
   return request({
     url: '/jy/report/getTopItem',
     method: 'get',
     params: query
   })
-}export function getItemClipIds(query) {
+}
+
+export function getItemClipIds(query) {
   return request({
     url: '/jy/report/getTopItemUser',
     method: 'get',
@@ -148,5 +151,27 @@ export function getTopItem(query) {
   })
 }
 
+export function getHourGmv(query) {
+  return request({
+    url: '/jy/report/getHourGmv',
+    method: 'get',
+    params: query
+  })
+}
+
+export function getAuthItemList(query) {
+  return request({
+    url: '/jy/report/getAuthItemList',
+    method: 'get',
+    params: query
+  })
+}export function getAuthItem(query) {
+  return request({
+    url: '/jy/report/getAuthItem',
+    method: 'get',
+    params: query
+  })
+}
+
 
 

+ 266 - 239
src/views/bytedance/bytedanceGoods.vue

@@ -1,19 +1,22 @@
 <style scoped lang="scss">
-::v-deep a {
-  color: #409eff;
-  display: block;
-}
-.item-name-calss p {
-  margin: 0;
-  text-align: left;
-}
-.tableBox {
-  width: 100%;
-}
-::v-deep .el-table {
+  ::v-deep a {
+    color: #409eff;
+    display: block;
+  }
 
-  height: calc(100vh - 280px);
-}
+  .item-name-calss p {
+    margin: 0;
+    text-align: left;
+  }
+
+  .tableBox {
+    width: 100%;
+  }
+
+  ::v-deep .el-table {
+
+    height: calc(100vh - 280px);
+  }
 </style>
 <template>
   <div class="app-container" style="height: 100%">
@@ -55,7 +58,7 @@
                     ? 'backgroundColor:green'
                     : 'backgroundColor:red'
                 "
-                >{{ item.value }}</span
+              >{{ item.value }}</span
               ><span>{{ item.nickMame }}</span>
             </div>
           </el-option>
@@ -98,10 +101,12 @@
           icon="el-icon-search"
           size="mini"
           @click="handleQuery"
-          >搜索</el-button
+        >搜索
+        </el-button
         >
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
-          >重置</el-button
+        >重置
+        </el-button
         >
         <el-button
           type="warning"
@@ -110,7 +115,8 @@
           size="mini"
           @click="handleExport"
           :loading="downLoadLoading"
-          >导出</el-button
+        >导出
+        </el-button
         >
       </el-form-item>
     </el-form>
@@ -157,7 +163,7 @@
                 <p>
                   佣金率:
                   {{
-                    scope.row.itemCommissionRate
+                  scope.row.itemCommissionRate
                   }}
                 </p>
               </div>
@@ -186,14 +192,34 @@
         >
           <template slot-scope="scope">
             {{
-              scope.row.validRadio
+            scope.row.validRadio
             }}
           </template>
         </el-table-column>
+        <el-table-column
+          label="预估服务费"
+          align="center"
+          prop="regimentalPromotionAmount"
+          width="80"
+        >
+          <template slot-scope="scope">
+            {{scope.row.regimentalPromotionAmount }}
+          </template>
+        </el-table-column>
 
+        <el-table-column
+          label="二级团预估服务费"
+          align="center"
+          prop="regimentalPromotionAmount"
+          width="80"
+        >
+          <template slot-scope="scope">
+            {{scope.row.secondEstimatedCommission }}
+          </template>
+        </el-table-column>
         <el-table-column label="归属人" align="center" prop="userName">
         </el-table-column>
-        <el-table-column label="top3的达人" align="center" prop="topAnchors"  >
+        <el-table-column label="top3的达人" align="center" prop="topAnchors">
           <template slot-scope="scope">
             <el-popover
               placement="top"
@@ -209,7 +235,7 @@
                 style="text-align: left; display: block"
               >
                 {{ item.promoterNickName }}(Id:{{ item.promoterId }};订单数量:{{
-                  item.orderNum
+                item.orderNum
                 }})
               </asamplingList>
               <a slot="reference">查看</a>
@@ -230,219 +256,88 @@
 </template>
 
 <script>
-import {
-  listType,
-  getType,
-  delType,
-  addType,
-  updateType,
-  refreshCache,
-} from "@/api/system/dict/type";
-import {
-  getBytedanceItemList,
-  downFile,
-  getSupplyChainUserList,
-  getBytedanceTopPromoterByItemId
-} from "@/api/bytedance/bytedance";
-export default {
-  name: "Goods",
-  dicts: ["sys_normal_disable"],
-  data() {
-    return {
-      downLoadLoading: false,
-      dialogTableVisible: false,
-      logPage: {
-        pageNum: 1,
-        pageSize: 10,
-      },
-      logData: [],
-      logTotal: 0,
-      logLoading: false,
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // 字典表格数据
-      typeList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 分配销售
-      openAllocation: false,
-      // 选择的销售id
-      saleId: undefined,
-      // 获取用户id
-      userId: undefined,
-      // 销售列表
-      saleList: [],
-      // 分配销售确定loading
-      confirmLoadingSale: false,
-      // 日期范围
-      dateRange: [],
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
+  import {
+    listType,
+    getType,
+    delType,
+    addType,
+    updateType,
+    refreshCache,
+  } from "@/api/system/dict/type";
+  import {
+    getBytedanceItemList,
+    downFile,
+    getSupplyChainUserList,
+    getBytedanceTopPromoterByItemId
+  } from "@/api/bytedance/bytedance";
+
+  export default {
+    name: "Goods",
+    dicts: ["sys_normal_disable"],
+    data() {
+      return {
+        downLoadLoading: false,
+        dialogTableVisible: false,
+        logPage: {
+          pageNum: 1,
+          pageSize: 10,
+        },
+        logData: [],
+        logTotal: 0,
+        logLoading: false,
+        // 遮罩层
+        loading: true,
+        // 选中数组
+        ids: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        // 字典表格数据
+        typeList: [],
+        // 弹出层标题
+        title: "",
+        // 是否显示弹出层
+        open: false,
+        // 分配销售
+        openAllocation: false,
+        // 选择的销售id
+        saleId: undefined,
+        // 获取用户id
         userId: undefined,
-        itemId: undefined,
-        itemTitle: undefined,
-        orderStartDate: undefined,
-        orderEndDate: undefined,
-      },
-      uploadDate: [new Date(), new Date()],
-      //查询参数所用下拉数据
-      queryParamsList: {
-        personList: [],
-      },
-      videoTag: [],
-      videoVisibleChange: undefined,
-      prop: "orderNum",
-      sort: "desc",
-    };
-  },
-  created() {
-    this.userId = this.$store.getters.userId;
-    let date = new Date();
-    let y = date.getFullYear();
-    let MM = date.getMonth() + 1;
-    MM = MM < 10 ? "0" + MM : MM;
-    let dd = date.getDate();
-    dd = dd < 10 ? "0" + dd : dd;
-    this.uploadDate = [`${y}-${MM}-${dd}`, `${y}-${MM}-${dd}`];
-  },
-  mounted() {
-    this.$nextTick(() => {
-      this.getPersonList();
-      this.getList();
-    });
-  },
-  methods: {
-    showTitle(visible) {
-      console.log(visible);
-      if (this.videoVisibleChange != visible.itemId) {
-        this.videoVisibleChange = visible.itemId;
-        this.videoTag = [];
-        getBytedanceTopPromoterByItemId(
-          this.addDateRange(
-            { itemId: visible.itemId },
-            this.uploadDate,
-            "orderStartDate",
-            "orderEndDate"
-          )
-        ).then((res) => {
-          this.videoTag = res.rows;
-        });
-      } else {
-        return;
-      }
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.downLoadLoading = true;
-      downFile(
-        "/bytedance/order/exportBytedanceItemList",
-        this.addDateRange(
-          this.queryParams,
-          this.uploadDate,
-          "orderStartDate",
-          "orderEndDate"
-        )
-      ).then((res) => {
-        let blob = new Blob([res], {
-          type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
-        });
-        let downloadElement = document.createElement("a");
-        let href = window.URL.createObjectURL(blob); //创建下载的链接
-        downloadElement.href = href;
-        downloadElement.download = `商品列表_${this.uploadDate[0]}-${this.uploadDate[1]}.xlsx`; //下载后文件名
-        document.body.appendChild(downloadElement);
-        downloadElement.click(); //点击下载
-        document.body.removeChild(downloadElement); //下载完成移除元素
-        window.URL.revokeObjectURL(href); //释放掉blob对象
-        this.downLoadLoading = false;
-      });
-    },
-    toDetail(item) {
-      this.$router.replace({
-        path: "/supplyChain/kuaishou/indexDetails",
-        query: {
-          id: item.promoterId,
-          name: item.promoterNickName,
-          orderStartDate: this.uploadDate[0],
-          orderEndDate: this.uploadDate[1],
+        // 销售列表
+        saleList: [],
+        // 分配销售确定loading
+        confirmLoadingSale: false,
+        // 日期范围
+        dateRange: [],
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10,
+          userId: undefined,
+          itemId: undefined,
+          itemTitle: undefined,
+          orderStartDate: undefined,
+          orderEndDate: undefined,
         },
-      });
-    },
-    toIndexDetail(item) {
-      this.$router.replace({
-        path: "/supplyChain/bytedance/bytedanceGoodsDetails",
-        query: {
-          id: item.itemId,
-          name: item.itemTitle,
-          orderStartDate: this.uploadDate[0],
-          orderEndDate: this.uploadDate[1],
+        uploadDate: [new Date(), new Date()],
+        //查询参数所用下拉数据
+        queryParamsList: {
+          personList: [],
         },
-      });
-    },
-    sortChange(col, prop, order) {
-      this.prop = col.prop;
-      this.sort = !!col.order
-        ? col.order == "descending"
-          ? "desc"
-          : "asc"
-        : "desc";
-      this.handleQuery();
-    },
-    getPersonList() {
-      getSupplyChainUserList().then((response) => {
-        this.queryParamsList.personList = response.rows;
-      });
-    },
-    /** 查询字典类型列表 */
-    getList() {
-      this.loading = true;
-      getBytedanceItemList(
-        this.addDateRange(
-          { ...this.queryParams, fieId: this.prop, sort: this.sort },
-          this.uploadDate,
-          "orderStartDate",
-          "orderEndDate"
-        )
-      ).then((response) => {
-        this.typeList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.confirmLoading = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {};
-      this.dateFile = null;
-      this.resetForm("form");
+        videoTag: [],
+        videoVisibleChange: undefined,
+        prop: "orderNum",
+        sort: "desc",
+      };
     },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.dateRange = [];
+    created() {
+      this.userId = this.$store.getters.userId;
       let date = new Date();
       let y = date.getFullYear();
       let MM = date.getMonth() + 1;
@@ -450,14 +345,146 @@ export default {
       let dd = date.getDate();
       dd = dd < 10 ? "0" + dd : dd;
       this.uploadDate = [`${y}-${MM}-${dd}`, `${y}-${MM}-${dd}`];
-      this.resetForm("queryForm");
-      this.queryParams.pageNum = 1;
-      this.handleQuery();
     },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map((item) => item.id);
+    mounted() {
+      this.$nextTick(() => {
+        this.getPersonList();
+        this.getList();
+      });
+    },
+    methods: {
+      showTitle(visible) {
+        console.log(visible);
+        if (this.videoVisibleChange != visible.itemId) {
+          this.videoVisibleChange = visible.itemId;
+          this.videoTag = [];
+          getBytedanceTopPromoterByItemId(
+            this.addDateRange(
+              {itemId: visible.itemId},
+              this.uploadDate,
+              "orderStartDate",
+              "orderEndDate"
+            )
+          ).then((res) => {
+            this.videoTag = res.rows;
+          });
+        } else {
+          return;
+        }
+      },
+      /** 导出按钮操作 */
+      handleExport() {
+        this.downLoadLoading = true;
+        downFile(
+          "/bytedance/order/exportBytedanceItemList",
+          this.addDateRange(
+            this.queryParams,
+            this.uploadDate,
+            "orderStartDate",
+            "orderEndDate"
+          )
+        ).then((res) => {
+          let blob = new Blob([res], {
+            type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+          });
+          let downloadElement = document.createElement("a");
+          let href = window.URL.createObjectURL(blob); //创建下载的链接
+          downloadElement.href = href;
+          downloadElement.download = `商品列表_${this.uploadDate[0]}-${this.uploadDate[1]}.xlsx`; //下载后文件名
+          document.body.appendChild(downloadElement);
+          downloadElement.click(); //点击下载
+          document.body.removeChild(downloadElement); //下载完成移除元素
+          window.URL.revokeObjectURL(href); //释放掉blob对象
+          this.downLoadLoading = false;
+        });
+      },
+      toDetail(item) {
+        this.$router.replace({
+          path: "/supplyChain/kuaishou/indexDetails",
+          query: {
+            id: item.promoterId,
+            name: item.promoterNickName,
+            orderStartDate: this.uploadDate[0],
+            orderEndDate: this.uploadDate[1],
+          },
+        });
+      },
+      toIndexDetail(item) {
+        this.$router.replace({
+          path: "/supplyChain/bytedance/bytedanceGoodsDetails",
+          query: {
+            id: item.itemId,
+            name: item.itemTitle,
+            orderStartDate: this.uploadDate[0],
+            orderEndDate: this.uploadDate[1],
+          },
+        });
+      },
+      sortChange(col, prop, order) {
+        this.prop = col.prop;
+        this.sort = !!col.order
+          ? col.order == "descending"
+            ? "desc"
+            : "asc"
+          : "desc";
+        this.handleQuery();
+      },
+      getPersonList() {
+        getSupplyChainUserList().then((response) => {
+          this.queryParamsList.personList = response.rows;
+        });
+      },
+      /** 查询字典类型列表 */
+      getList() {
+        this.loading = true;
+        getBytedanceItemList(
+          this.addDateRange(
+            {...this.queryParams, fieId: this.prop, sort: this.sort},
+            this.uploadDate,
+            "orderStartDate",
+            "orderEndDate"
+          )
+        ).then((response) => {
+          this.typeList = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        });
+      },
+      // 取消按钮
+      cancel() {
+        this.open = false;
+        this.confirmLoading = false;
+        this.reset();
+      },
+      // 表单重置
+      reset() {
+        this.form = {};
+        this.dateFile = null;
+        this.resetForm("form");
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.dateRange = [];
+        let date = new Date();
+        let y = date.getFullYear();
+        let MM = date.getMonth() + 1;
+        MM = MM < 10 ? "0" + MM : MM;
+        let dd = date.getDate();
+        dd = dd < 10 ? "0" + dd : dd;
+        this.uploadDate = [`${y}-${MM}-${dd}`, `${y}-${MM}-${dd}`];
+        this.resetForm("queryForm");
+        this.queryParams.pageNum = 1;
+        this.handleQuery();
+      },
+      // 多选框选中数据
+      handleSelectionChange(selection) {
+        this.ids = selection.map((item) => item.id);
+      },
     },
-  },
-};
+  };
 </script>

+ 12 - 1
src/views/bytedance/bytedancePromoterList.vue

@@ -128,7 +128,7 @@
       </el-table-column>
 
       <el-table-column
-        label="服务费"
+        label="预估服务费"
         align="center"
         prop="regimentalPromotionAmount"
         width="80"
@@ -138,6 +138,17 @@
         </template>
       </el-table-column>
 
+      <el-table-column
+        label="二级团预估服务费"
+        align="center"
+        prop="regimentalPromotionAmount"
+        width="80"
+      >
+        <template slot-scope="scope">
+          {{scope.row.secondEstimatedCommission }}
+        </template>
+      </el-table-column>
+
       <el-table-column label="渠道" align="center" prop="userName" width="150">
         <template slot-scope="scope">
           {{

+ 1 - 1
src/views/goodsManagement/financialReview.vue

@@ -110,7 +110,7 @@
   } from "@/api/goodsManagement/goods";
 
   export default {
-    name: "Rule-Config",
+    name: "FinancialReview",
     components: {},
     data() {
       return {

+ 1 - 1
src/views/goodsManagement/settlement.vue

@@ -127,7 +127,7 @@
   } from "@/api/goodsManagement/goods";
 
   export default {
-    name: "Rule-Config",
+    name: "Settlement",
     dicts: ["sys_normal_disable"],
     components: {},
     data() {

+ 2 - 1
src/views/goodsManagement/settlementv2.vue

@@ -103,7 +103,8 @@
     addDetail,
   } from "@/api/goodsManagement/goods";
   export default {
-    name: "Rule-Config",
+    name: "Settlementv2",
+    dicts: ["sys_normal_disable"],
     components: {},
     data() {
       return {

+ 381 - 0
src/views/jiaoyang/jyAuthItemList.vue

@@ -0,0 +1,381 @@
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+    >
+      <el-form-item label="商品ID" prop="itemId">
+        <el-input
+          placeholder="请输入商品ID"
+          style="width: 240px"
+          v-model="queryParams.itemId"
+        >
+        </el-input>
+      </el-form-item>
+      <el-form-item label="商品名称" prop="itemName">
+        <el-input
+          placeholder="请输入商品名称"
+          style="width: 240px"
+          v-model="queryParams.itemName"
+        >
+        </el-input>
+      </el-form-item>
+
+      <el-form-item label="达人ID" prop="promoterId">
+        <el-input
+          placeholder="请输入达人ID"
+          style="width: 240px"
+          v-model="queryParams.promoterId"
+        >
+        </el-input>
+      </el-form-item>
+      <el-form-item label="达人名称" prop="promoterNick">
+        <el-input
+          placeholder="请输入达人名称"
+          style="width: 240px"
+          v-model="queryParams.promoterNick"
+        >
+        </el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
+        >搜索
+        </el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="renew" :loading="buttonLoading">更新</el-button>
+        <el-button
+          type="primary"
+          plain
+          size="mini"
+          @click="handleExport"
+          style="margin-bottom: 15px"
+        >导出
+        </el-button
+        >
+      </el-form-item>
+    </el-form>
+
+    <el-table v-loading="loading" :data="typeList" ref="multipleTable">
+      <el-table-column
+        label="商品信息"
+        align="center"
+        prop="itemTitle"
+        width="450"
+      >
+        <template slot-scope="scope">
+          <div style="display: flex; width: 100%">
+            <div style="width: 40%">
+              <img
+                :src="scope.row.itemImageUrl"
+                alt=""
+                style="width: 70px; height: auto"
+              />
+            </div>
+            <div style="width: 60%" class="item-name-calss">
+
+              <p>{{ scope.row.itemId }}</p>
+              <p>{{ scope.row.itemName }}</p>
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+
+
+      <el-table-column label="价格" align="center" prop="itemPriceView">
+        <template slot-scope="scope">
+          {{
+          scope.row.itemPriceView
+          }}
+        </template>
+      </el-table-column>
+
+      <el-table-column label="佣金率" align="center" prop="commissionRateView">
+        <template slot-scope="scope">
+          {{
+          scope.row.commissionRateView + "%"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="授权达人"
+        align="center"
+        prop="itemTitle"
+        width="350"
+      >
+        <template slot-scope="scope">
+          <div style="display: flex; width: 100%">
+            <div style="width: 40%">
+              <img
+                :src="scope.row.promoterPhoto"
+                alt=""
+                style="width: 70px; height: auto"
+              />
+            </div>
+            <div style="width: 60%" class="item-name-calss">
+              <p>达人Id: {{ scope.row.promoterId }}</p>
+              <p>达人名称: {{ scope.row.promoterNick }}</p>
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+
+
+    <!--  <el-table-column label="出让佣金比例" align="center" prop="commissionRateView">
+        <template slot-scope="scope">
+          {{
+          scope.row.mcnCommissionRateView + "%"
+          }}
+        </template>
+      </el-table-column>-->
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+      :pageSizes="[10, 20, 30, 50]"
+    />
+
+
+  </div>
+</template>
+
+<script>
+  import {refreshCache} from "@/api/system/dict/type";
+  import {getAuthItemList, downFile,getAuthItem} from "@/api/jiaoyang/report";
+
+  export default {
+    name: "JyAuthItemList",
+    components: {},
+    data() {
+      return {
+        // 遮罩层
+        loading: true,
+        buttonLoading: false,
+        // 选中数组
+        ids: null,
+        okIds: null,
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        // 字典表格数据
+        typeList: [],
+        //上传文件类型
+        fileType: [".doc", ".xls", ".xlsx", ".ppt", ".pdf", ".csv"],
+        // 弹出层标题
+        title: "",
+        // 是否显示弹出层
+        open: false,
+        openFp: false,
+        formFp: {},
+        // 是否可编辑
+        edit: false,
+        // 分配销售
+        openAllocation: false,
+        // 选择的销售id
+        saleId: undefined,
+        // 销售列表
+        saleList: [],
+        // 分配销售确定loading
+        confirmLoadingSale: false,
+        // 日期范围
+        dateRange: [],
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10,
+          promoterId: undefined,
+          promoterName: undefined,
+        },
+        uploadDate: new Date(),
+        //页面所有的下拉数据
+        queryParamsList: {},
+        // 表单参数
+        form: {},
+        formBroadcast: {
+          ruleDetails: [],
+        },
+        //上传报表下拉数据
+        formList: {},
+        fileList: [],
+        accept: "",
+        //获取销售线索文件流
+        dateFile: new FormData(),
+        //销售线索上传loading
+        confirmLoading: false,
+        // 表单校验
+        // 分配销售展示列表
+        ksInfo: null,
+        userId: null,
+      };
+    },
+    created() {
+      this.userId = this.$store.getters.userId;
+      let start = new Date();
+      start.setTime(start.getTime() - 3600 * 1000 * 24 * 1);
+      let date = new Date(start);
+      let y = date.getFullYear();
+      let MM = date.getMonth() + 1;
+      MM = MM < 10 ? "0" + MM : MM;
+      let dd = date.getDate();
+      dd = dd < 10 ? "0" + dd : dd;
+      this.uploadDate = `${y}-${MM}-${dd}`;
+
+      this.getList();
+    },
+    filters: {},
+    methods: {
+
+      /** 导出按钮操作 */
+      handleExport() {
+        this.downLoadLoading = true;
+        downFile("/jy/report/exportAuthItemList",
+          this.addDateRange(
+            {statDate: this.uploadDate},
+            this.queryParams
+          )
+        ).then((res) => {
+          let blob = new Blob([res], {
+            type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+          });
+          let downloadElement = document.createElement("a");
+          let href = window.URL.createObjectURL(blob); //创建下载的链接
+          downloadElement.href = href;
+          downloadElement.download = `授权商品_${this.uploadDate[0]}-${this.uploadDate[1]}.xlsx`; //下载后文件名
+          document.body.appendChild(downloadElement);
+          downloadElement.click(); //点击下载
+          document.body.removeChild(downloadElement); //下载完成移除元素
+          window.URL.revokeObjectURL(href); //释放掉blob对象
+          this.downLoadLoading = false;
+        });
+      },
+
+
+      renew() {
+        this.buttonLoading = true;
+        this.loading = true;
+        getAuthItem().then((response) => {
+            this.buttonLoading = false;
+            this.getList();
+          })
+          .catch((err) => {
+            console.log(err);
+          });
+      },
+
+      getList() {
+        this.loading = true;
+        this.typeList = [];
+        getAuthItemList({...this.queryParams})
+          .then((response) => {
+            this.loading = false;
+            this.typeList = response.rows;
+            this.total = response.total;
+          })
+          .catch((err) => {
+            console.log(err);
+          });
+      },
+      // 取消按钮
+      cancel() {
+        this.open = false;
+        this.confirmLoading = false;
+        this.reset();
+      },
+      // 表单重置
+      reset() {
+        this.form = {};
+        this.dateFile = null;
+        this.resetForm("formBroadcast");
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.dateRange = [];
+        let start = new Date();
+        start.setTime(start.getTime() - 3600 * 1000 * 24 * 1);
+        let date = new Date(start);
+        let y = date.getFullYear();
+        let MM = date.getMonth() + 1;
+        MM = MM < 10 ? "0" + MM : MM;
+        let dd = date.getDate();
+        dd = dd < 10 ? "0" + dd : dd;
+        this.uploadDate = `${y}-${MM}-${dd}`;
+        this.resetForm("queryForm");
+        this.handleQuery();
+      },
+
+      addNew() {
+        this.openAllocation = true;
+        this.edit = false;
+        this.ids = null;
+        this.confirmLoading = false;
+        this.formBroadcast = {};
+        setTimeout(() => {
+          this.$refs.formBroadcast.clearValidate();
+        }, 0);
+        this.$set(this.formBroadcast, "ruleDetails", []);
+      },
+      handleAddbroadcast(item) {
+        this.ids = item.id;
+        this.edit = true;
+        this.openAllocation = true;
+        this.$set(this.formBroadcast, "consignee", item.consignee);
+        this.$set(this.formBroadcast, "phone", item.phone);
+        this.$set(this.formBroadcast, "promoterAddress", item.promoterAddress);
+        this.$set(this.formBroadcast, "ruleName", item.ruleName);
+        this.$set(this.formBroadcast, "promoterId", item.promoterId);
+      },
+      /** 修改按钮操作 */
+      handleUpdate(row) {
+        this.reset();
+      },
+      /** 新增直播确定按钮 */
+
+    },
+  };
+</script>
+<style lang="scss" scoped>
+  .entire-line {
+    width: 100%;
+  }
+
+  ::v-deep .entire-line .el-form-item__content {
+    width: 60%;
+  }
+
+  ::v-deep .el-form-item__label {
+    white-space: nowrap;
+  }
+</style>
+<style scoped lang="scss">
+  ::v-deep a {
+    color: #409eff;
+    display: block;
+    text-align: left;
+  }
+
+  .item-name-calss p {
+    margin: 0;
+    text-align: left;
+  }
+
+  .tableBox {
+    width: 100%;
+  }
+</style>

+ 252 - 2
src/views/jiaoyang/jyHome.vue

@@ -170,12 +170,49 @@
         </el-card>
       </el-col>
     </el-row>
+    <el-row class="top-sum" :gutter="24" style="margin-top: 24px" v-if="this.$store.getters.roles[0] == 'jy_admnin' || this.$store.getters.roles[0] == 'admnin'">
+      <el-col :span="24">
+        <el-card
+          shadow="never"
+          class="card-show"
+          style="width: 100%; min-height: 300px"
+          v-loading="hourEchartsLoading"
+        >
+          <div slot="header" class="clearfix">
+              <span style="font-size: 16px; font-weight: bold; float: left"
+              >分时数据</span
+              >
+          </div>
+          <!-- <el-date-picker
+          v-model="uploadDateEcharts"
+          style="width: 240px; float: left"
+          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :picker-options="pickerOptions"
+          @change="getAllEchartsData"
+        ></el-date-picker> -->
+          <div
+            id="hourEchart"
+            ref="hourEchart"
+            style="height: 250px; width: 100%;"
+          ></div>
+        </el-card>
+      </el-col>
+    </el-row>
+
+
+
+
     <el-row class="top-sum" :gutter="24" style="margin-top: 24px">
       <el-col :span="24">
         <el-card
           shadow="never"
           class="card-show"
-          style="width: 100%; min-height: 700px"
+          style="width: 100%; min-height: 300px"
           v-loading="echartsLoading"
         >
           <div slot="header" class="clearfix">
@@ -211,12 +248,14 @@
           <div
             id="echart"
             ref="echart"
-            style="height: 500px; width: 100%; margin-top: 50px"
+            style="height: 250px; width: 100%;"
           ></div>
         </el-card>
       </el-col>
     </el-row>
 
+
+
     <el-row class="top-sum" :gutter="24" style="margin-top: 24px">
       <el-col :span="12">
         <el-card
@@ -378,6 +417,7 @@
     getIndexOrderRank, //获取商品排行
     getIndexStatistics, //echarts图表
     getTimeRatio, //时间段对比
+    getHourGmv, //分时数据
   } from "@/api/jiaoyang/report";
 
   var echarts = require("echarts");
@@ -385,6 +425,8 @@
     name: "Index",
     data() {
       return {
+        hourEchartsLoading:false,
+        chartList:[],
         // 遮罩层
         loading: true,
         // 选中数组
@@ -546,6 +588,7 @@
       this.getIndexOrderRank();
       this.getIndexStatistics();
       this.getTimeRatio();
+      this.getHourGmv();
     },
     methods: {
       getAllEchartsData(e) {
@@ -803,6 +846,23 @@
           };
         });
       },
+
+
+      getHourGmv() {
+        this.hourEchartsLoading = true
+        getHourGmv(
+          this.addDateRange({userId: this.userId})
+        ).then((res) => {
+          if (res.success) {
+            this.chartList = res.result.today
+            this.initEchart(
+              'hourEchart',
+              this.hourEchartOption(res.result.today, res.result.yesterday, [], [])
+            )
+          }
+          this.hourEchartsLoading = false
+        });
+      },
       getIndexOrderRank() {
         this.orderRankLoading = true;
         getIndexOrderRank(
@@ -895,6 +955,196 @@
           });
         }
       },
+
+      hourEchartOption(todayList, yesterdayList, timeData, lengthData) {
+        var that = this
+        if (!!yesterdayList) {
+          let option = {
+            tooltip: {
+              trigger: 'axis',
+              formatter: function (params) {
+                if (todayList[0].time == 0) {
+                  if (params.length > 1) {
+                    return `${params[0].marker}今天${params[0].name}时: ${params[0].value}<br/>
+                            ${params[1].marker}昨天${params[1].name}时: ${params[1].value}`
+                  } else {
+                    return `${params[0].marker}昨天${params[0].name}时: ${params[0].value}`
+                  }
+                } else {
+                  return `${params[0].marker}${params[0].name}: ${params[0].value}<br/>
+                            ${params[1].marker}${params[1].name}: ${params[1].value}`
+                }
+              },
+            },
+            grid: {
+              left: '3%',
+              right: '4%',
+              bottom: '3%',
+              containLabel: true,
+            },
+            xAxis: [
+              {
+                id: 0,
+                type: 'category',
+                boundaryGap: false,
+                data:
+                  todayList.length == yesterdayList.length
+                    ? todayList.map((item) => {
+                      return item.time
+                    })
+                    : yesterdayList.map((item) => {
+                      return item.time
+                    }),
+                position: 'bottom',
+              },
+              {
+                id: 1,
+                type: 'category',
+                boundaryGap: false,
+                data: yesterdayList.map((item) => {
+                  return item.time
+                }),
+                axisPointer: {
+                  type: 'none',
+                },
+                position: 'bottom',
+                offset: 30,
+              },
+            ],
+
+            yAxis: {
+              type: 'value',
+            },
+            series: [
+              {
+                name: '今天',
+                type: 'line',
+                smooth: true,
+                symbol: 'circle',
+                xAxisIndex: 0,
+                data:
+                  this.mediaDimension === 'a'
+                    ? todayList.map((item) => {
+                      return item.cost
+                    })
+                    : todayList.map((item) => {
+                      return item.charge
+                    }),
+
+                lineStyle: {
+                  color: '#00BFFF',
+                  width: 2,
+                },
+                itemStyle: {
+                  color: '#00BFFF',
+                  borderWidth: 2,
+                  borderColor: '#00BFFF',
+                },
+                id: 0,
+              },
+              {
+                id: 1,
+                name: '昨天',
+                type: 'line',
+                smooth: true,
+                symbol: 'circle',
+                xAxisIndex: 1,
+                data:
+                  this.mediaDimension === 'a'
+                    ? yesterdayList.map((item) => {
+                      return item.cost
+                    })
+                    : yesterdayList.map((item) => {
+                      return item.charge
+                    }),
+
+                lineStyle: {
+                  color: '#00FF7F',
+                  width: 2,
+                },
+                itemStyle: {
+                  color: '#00FF7F',
+                  borderWidth: 2,
+                  borderColor: '#00FF00',
+                },
+              },
+            ],
+          }
+          return option
+        } else {
+          let optionTwo = {
+            tooltip: {
+              trigger: 'axis',
+              formatter: function (params) {
+                // console.log(params)
+                if (
+                  that.dataType == 3 &&
+                  moment(that.dateValue[0]).format('YYYY-MM-DD') ==
+                  moment(that.dateValue[1]).format('YYYY-MM-DD')
+                ) {
+                  return `${params[0].marker}${params[0].name}时: ${params[0].value}`
+                } else {
+                  return `${params[0].marker}${params[0].name}: ${params[0].value}`
+                }
+              },
+            },
+            grid: {
+              left: '3%',
+              right: '4%',
+              bottom: '3%',
+              containLabel: true,
+            },
+            xAxis: [
+              {
+                id: 0,
+                type: 'category',
+                boundaryGap: false,
+                data: todayList.map((item) => {
+                  return item.time
+                }),
+                position: 'bottom',
+              },
+            ],
+
+            yAxis: {
+              type: 'value',
+            },
+            series: [
+              {
+                name: '今天',
+                type: 'line',
+                smooth: true,
+                symbol: 'circle',
+                xAxisIndex: 0,
+                data:
+                  this.dataType == 0
+                    ? this.mediaDimension === 'a'
+                    ? todayList.map((item) => {
+                      return item.cost
+                    })
+                    : todayList.map((item) => {
+                      return item.charge
+                    })
+                    : todayList.map((item) => {
+                      return item.count
+                    }),
+                lineStyle: {
+                  color: '#00BFFF',
+                  width: 2,
+                },
+                itemStyle: {
+                  color: '#00BFFF',
+                  borderWidth: 2,
+                  borderColor: '#00BFFF',
+                },
+                id: 0,
+              },
+            ],
+          }
+          return optionTwo
+        }
+      },
+
       /** 金额格式化 */
       priceFormat(num, n) {
         n = n || 2;

+ 1 - 1
src/views/jiaoyang/jyPromoterReport.vue

@@ -50,7 +50,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="选择日期">
+      <el-form-item label="选择日期" v-if="this.$store.getters.roles[0] == 'jy_admnin' || this.$store.getters.roles[0] == 'admnin'">
         <el-date-picker
           v-model="uploadDate"
           style="width: 240px"

+ 15 - 2
src/views/staging.vue

@@ -152,7 +152,7 @@
         </el-col>
         <el-col :span="5">
           <el-card shadow="never" class="card-show">
-            <p class="p-title">累计货款基数</p>
+            <p class="p-title">有效订单金额</p>
             <p class="p-main">
               {{
               orderData.baseAmount >= 0 ? priceFormat(orderData.baseAmount / 100) : 0
@@ -172,6 +172,20 @@
             </p>
           </el-card>
         </el-col>
+
+        <el-col :span="5" v-if="this.mediaId == 1">
+          <el-card shadow="never" class="card-show">
+            <p class="p-title">预估服务费支出</p>
+            <p class="p-main">
+              {{
+              orderData.secondEstimatedCommission >= 0
+              ? priceFormat(orderData.secondEstimatedCommission / 100)
+              : 0
+              }}
+            </p>
+          </el-card>
+        </el-col>
+
         <el-col :span="5">
           <el-card shadow="never" class="card-show">
             <p class="p-title">
@@ -182,7 +196,6 @@
             </p>
           </el-card>
         </el-col>
-        <el-col :span="5"></el-col>
       </el-row>
       <el-row class="top-sum" style="display: flex" v-if="!!orderData">
         <div style="display: flex; width: 100%">