yumeng 1 gadu atpakaļ
vecāks
revīzija
562086f80f

+ 173 - 0
src/api/bytedance/bytedance.js

@@ -0,0 +1,173 @@
+import request from '@/utils/request'
+
+/**
+ * 下载文件 用于excel导出
+ * @param url
+ * @param parameter
+ * @returns {*}
+ */
+export function downFilePost(url, parameter) {
+  return request({
+    url: url,
+    data: parameter,
+    method: 'post',
+    responseType: 'blob',
+    timeout: 12000000, // 请求超时时间
+  })
+}
+
+export function downFile(url, parameter) {
+  return request({
+    url: url,
+    params: parameter,
+    method: 'get',
+    responseType: 'blob',
+    timeout: 12000000, // 请求超时时间
+  })
+}
+
+// 达人订单管理
+export function getOrderList(query) {
+  return request({
+    url: '/bytedance/order/bytedanceOrderList',
+    method: 'get',
+    params: query
+  })
+}
+
+export function submitPromotersCount(query) {
+  return request({
+    url: '/kuaishou/promoter/addPromotersCount',
+    method: 'get',
+    params: query
+  })
+}
+
+
+export function getBytedanceBdReportList(query) {
+  return request({
+    url: '/bytedance/order/bytedanceBDReportList',
+    method: 'get',
+    params: query
+  })
+}
+
+//供应链列表-渠道&社群(人员列表)
+export function getSupplyChainUserList(query) {
+  return request({
+    url: '/isv/supply_chain/getSupplyChainUserList',
+    method: 'get',
+    params: query
+  })
+
+
+}
+
+//商品列表
+export function getBytedanceItemList(query) {
+  return request({
+    url: '/bytedance/order/bytedanceItemList',
+    method: 'get',
+    params: query
+  })
+}
+
+//top3
+export function getBytedanceTopPromoterByItemId(query) {
+  return request({
+    url: '/bytedance/order/getBytedanceTopPromoterByItemId',
+    method: 'get',
+    params: query
+  })
+}
+
+// 招商管理
+export function adminBytedanceReportList(query) {
+  return request({
+    url: '/bytedance/order/adminBytedanceReportList',
+    method: 'get',
+    params: query
+  })
+}
+//供应链列表-招商
+export function getSupplyChainCourtshipList(query) {
+  return request({
+    url: '/isv/supply_chain/getSupplyChainCourtshipUserList',
+    method: 'get',
+    params: query
+  })
+}
+
+
+export function getOrderDetail(query) {
+  return request({
+    url: '/bytedance/order/anchorBytedanceOrderDetail',
+    method: 'get',
+    params: query
+  })
+}
+
+
+
+export function getOrderStatistics(query) {
+  return request({
+    url: '/bytedance/order/bytedanceOrderStatistics',
+    method: 'get',
+    params: query
+  })
+}
+
+//达人带货详情-领样申请校验
+export function samplesCheck(query) {
+  return request({
+    url: '/itemCollectSamples/samplesCheck',
+    method: 'get',
+    params: query
+  })
+}
+
+
+export function getItemDetail(query) {
+  return request({
+    url: '/bytedance/order/bytedanceItemDetail',
+    method: 'get',
+    params: query
+  })
+}
+
+export function getBdDetailList(query) {
+  return request({
+    url: '/bytedance/order/bytedanceBDDetailList',
+    method: 'get',
+    params: query
+  })
+}
+
+export function getBdTotal(query) {
+  return request({
+    url: '/bytedance/order/bytedanceBDTotal',
+    method: 'get',
+    params: query
+  })
+}
+
+export function getUserItemDetail(query) {
+  return request({
+    url: '/bytedance/order/bytedanceUserItemDetail',
+    method: 'get',
+    params: query
+  })
+}
+export function getUserItemTotal(query) {
+  return request({
+    url: '/bytedance/order/bytedanceUserItemTotal',
+    method: 'get',
+    params: query
+  })
+}
+
+
+
+
+
+

+ 524 - 0
src/views/bytedance/bytedanceChannelDetails.vue

@@ -0,0 +1,524 @@
+<style scoped lang="scss">
+::v-deep a {
+  color: #409eff;
+  display: block;
+}
+p {
+  text-align: left;
+  margin: 0;
+}
+</style>
+<template>
+  <div class="app-container">
+    <div></div>
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
+      <!-- <el-form-item label="商品名称" prop="itemTitle">
+        <el-input
+          v-model="queryParams.itemTitle"
+          placeholder="请输入商品名称"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="商品Id" prop="itemId">
+        <el-input
+          v-model.number="queryParams.itemId"
+          placeholder="请输入商品Id"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item> -->
+      <el-form-item label="选择日期">
+        <el-date-picker
+          v-model="uploadDate"
+          style="width: 240px"
+          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        ></el-date-picker>
+      </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
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          :loading="downLoadLoading"
+          >导出</el-button
+        >
+      </el-form-item>
+    </el-form>
+    <el-table
+      v-loading="loading"
+      :data="typeList"
+      @selection-change="handleSelectionChange"
+      @sort-change="sortChange"
+      ref="multipleTable"
+      :span-method="arraySpanMethod"
+      border
+    >
+      <!-- :summary-method="getSummaries" -->
+      <!-- show-summary -->
+      <el-table-column label="达人名称" align="center" prop="itemTitle" width="300">
+        <template slot-scope="scope">
+          <div style="display: flex; width: 100%" v-if="scope.row.promoterName != '总计'">
+            <div style="width: 40%">
+              <img
+                :src="scope.row.promoterUrl"
+                alt=""
+                style="width: 70px; height: auto"
+              />
+            </div>
+            <div style="width: 60%">
+              <a
+                style="
+                  text-overflow: ellipsis;
+                  white-space: nowrap;
+                  overflow: hidden;
+                  width: 100%;
+                  text-align: left;
+                "
+                :title="scope.row.promoterName"
+              >
+                {{ scope.row.promoterName }}
+              </a>
+              <p>达人Id: {{ scope.row.promoterId }}</p>
+            </div>
+          </div>
+          <div v-else style="font-size: 20px">
+            {{ scope.row.promoterName }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="领样数" align="center" prop="sampleCount" sortable="custom">
+      </el-table-column>
+      <el-table-column label="订单数" align="center" prop="orderNum" sortable="custom">
+      </el-table-column>
+      <el-table-column
+        label="有效订单数"
+        align="center"
+        prop="validOrderNum"
+        sortable="custom"
+      >
+      </el-table-column>
+
+      <el-table-column
+        label="有效订单率"
+        align="center"
+        prop="validOrderRate"
+        sortable="custom"
+      >
+        <template slot-scope="scope">
+          {{ scope.row.validOrderRate }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="订单金额"
+        align="center"
+        prop="orderAmount"
+        sortable="custom"
+      >
+        <template slot-scope="scope">
+          {{ scope.row.orderAmount  }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="预估服务费收入"
+        align="center"
+        prop="regimentalPromotionAmount"
+        sortable="custom"
+      >
+        <template slot-scope="scope">
+          {{
+            scope.row.regimentalPromotionAmount
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="结算服务费收入"
+        align="center"
+        prop="totalRegimentalSettleAmount"
+        sortable="custom"
+      >
+        <template slot-scope="scope">
+          {{
+            scope.row.totalRegimentalSettleAmoun
+          }}
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getUserItemDetail"
+    />
+  </div>
+</template>
+
+<script>
+import {
+  listType,
+  getType,
+  delType,
+  addType,
+  updateType,
+  refreshCache,
+} from "@/api/system/dict/type";
+import {
+  getBdDetailList,
+  getOrderList,
+  downFile,
+  getBdTotal,
+} from "@/api/bytedance/bytedance";
+var echarts = require("echarts");
+export default {
+  name: "ClaimOk",
+  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,
+        itemId: undefined,
+        itemTitle: undefined,
+        orderStartDate: undefined,
+        orderEndDate: undefined,
+      },
+      uploadDate: [new Date(), new Date()],
+      //查询参数所用下拉数据
+      queryParamsList: {},
+      prop: "orderNum",
+      sort: "desc",
+      itemSummary: [],
+      loadingTotal: false,
+    };
+  },
+  created() {
+    if (
+      this.$route &&
+      this.$route.query.id &&
+      this.$route.query.orderStartDate &&
+      this.$route.query.orderEndDate
+    ) {
+      this.uploadDate = [
+        this.$route.query.orderStartDate,
+        this.$route.query.orderEndDate,
+      ];
+      this.getUserItemTotal();
+      this.getUserItemDetail();
+    } else {
+      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.getUserItemTotal();
+      this.getUserItemDetail();
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {});
+  },
+  methods: {
+    /** 导出按钮操作 */
+    handleExport() {
+      this.downLoadLoading = true;
+      downFile(
+        "/bytedance/order/exportBdDetail",
+        this.addDateRange(
+          {
+            ...this.queryParams,
+            collectSampleId: !!this.$route.query.id
+              ? this.$route.query.id
+              : this.$store.getters.remark == "管理员"
+              ? null
+              : this.$store.getters.userId,
+          },
+          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;
+      });
+    },
+    arraySpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (rowIndex === 0) {
+        if (columnIndex === 0) {
+          return [1, 1];
+        }
+      }
+    },
+    getUserItemTotal() {
+      this.loadingTotal = true;
+      getBdTotal(
+        this.addDateRange(
+          {
+            collectSampleId: !!this.$route.query.id
+              ? this.$route.query.id
+              : this.$store.getters.remark == "管理员"
+              ? null
+              : this.$store.getters.userId,
+          },
+          this.uploadDate,
+          "orderStartDate",
+          "orderEndDate"
+        )
+      ).then((res) => {
+        this.loadingTotal = false;
+        this.itemSummary = res.rows.map((item) => {
+          return {
+            ...item,
+            promoterName: "总计",
+          };
+        });
+      });
+    },
+    sortChange(col, prop, order) {
+      this.prop = col.prop;
+      this.sort = !!col.order ? (col.order == "descending" ? "desc" : "asc") : "desc";
+      this.handleQuery();
+    },
+    toDetail(id) {},
+    toIndexDetail(item) {
+      this.$router.replace({
+        path: "/supplyChain/bytedance/bytedancePromoterDetail",
+        query: {
+          id: item.promoterId,
+          name: item.promoterNickName,
+          orderStartDate: this.$route.query.orderStartDate,
+          orderEndDate: this.$route.query.orderEndDate,
+        },
+      });
+    },
+    getUserItemDetail() {
+      this.loading = true;
+      getBdDetailList(
+        this.addDateRange(
+          {
+            ...this.queryParams,
+            fieId: this.prop,
+            sort: this.sort,
+            collectSampleId: !!this.$route.query.id
+              ? this.$route.query.id
+              : this.$store.getters.remark == "管理员"
+              ? null
+              : this.$store.getters.userId,
+          },
+          this.uploadDate,
+          "orderStartDate",
+          "orderEndDate"
+        )
+      ).then((response) => {
+        this.typeList = this.itemSummary.concat(response.rows);
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    getSummaries(param) {
+      console.log(param);
+      const { columns, data } = param;
+      const sums = [];
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = "总计";
+          return;
+        } else if (index == 1) {
+          sums[index] = "N/A";
+          return;
+        } else if (index == 9) {
+          sums[index] = "-";
+          return;
+        } else if (index == 2) {
+          sums[index] = "-";
+          return;
+        }
+
+        for (const key in this.itemSummary[0]) {
+          if (key == column.property) {
+            if (key == "validRadio" || key == "deliveryRadio") {
+              sums[index] = this.itemSummary[0][key]
+                ? (this.itemSummary[0][key] * 100).toFixed(2) + "%"
+                : "-";
+            } else if (
+              key == "payAmount" ||
+              key == "regimentalPromotionAmount" ||
+              key == "totalRegimentalSettleAmount"
+            ) {
+              sums[index] = this.itemSummary[0][key]
+                ? this.itemSummary[0][key] / 100
+                : "-";
+            } else {
+              sums[index] = this.itemSummary[0][key];
+            }
+          }
+        }
+
+        // const values = data.map((item) => Number(item[column.property]));
+        // console.log(values)
+        // if (!values.every((value) => isNaN(value))) {
+        //   sums[index] = values.reduce((prev, curr) => {
+        //     const value = Number(curr);
+        //     if (!isNaN(value)) {
+        //       return prev + curr;
+        //     } else {
+        //       return prev;
+        //     }
+        //   }, 0);
+        //   // sums[index] += " 元";
+        // } else {
+        //   sums[index] = "N/A";
+        // }
+      });
+
+      return sums;
+    },
+    /** 查询字典类型列表 */
+    getList() {
+      this.loading = true;
+      getOrderList(
+        this.addDateRange(
+          this.queryParams,
+          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.getUserItemTotal();
+      this.getUserItemDetail();
+    },
+    /** 重置按钮操作 */
+    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;
+      if (
+        this.$route &&
+        this.$route.query.id &&
+        this.$route.query.orderStartDate &&
+        this.$route.query.orderEndDate
+      ) {
+        this.uploadDate = [
+          this.$route.query.orderStartDate,
+          this.$route.query.orderEndDate,
+        ];
+        this.getUserItemDetail();
+      } else {
+        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.getUserItemDetail();
+      }
+      this.resetForm("queryForm");
+      this.queryParams.pageNum = 1;
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id);
+    },
+  },
+};
+</script>

+ 517 - 0
src/views/bytedance/bytedanceChannelList.vue

@@ -0,0 +1,517 @@
+<style scoped lang="scss">
+  ::v-deep a {
+    color: #409eff;
+    display: block;
+  }
+</style>
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
+      <el-form-item label="渠道" prop="collectSampleId" v-if="$store.getters.roles[0] != 'bd'">
+        <el-select
+          filterable
+          v-model="queryParams.collectSampleId"
+          placeholder="渠道名称"
+          clearable
+          style="width: 240px"
+        >
+          <el-option
+            v-for="item in queryParamsList.personList"
+            :key="item.userId"
+            :label="item.nickMame"
+            :value="item.userId"
+          >
+            <div style="display: flex">
+              <span
+                style="
+                  width: 10px;
+                  height: 10px;
+                  border-radius: 50%;
+                  background-color: green;
+                  position: relative;
+                  top: 12px;
+                  margin-right: 5px;
+                "
+                :style="
+                  item.status == '0' ? 'backgroundColor:green' : 'backgroundColor:red'
+                "
+              >{{ item.value }}</span
+              ><span>{{ item.nickMame }}</span>
+            </div>
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="选择日期">
+        <el-date-picker
+          v-model="uploadDate"
+          style="width: 240px"
+          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        ></el-date-picker>
+      </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
+          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"
+      @selection-change="handleSelectionChange"
+      ref="multipleTable"
+    >
+      <!-- <el-table-column type="selection" width="55" align="center" /> -->
+      <el-table-column label="渠道" align="center" prop="collectSampleName" width="150px">
+        <template slot-scope="scope">
+          <a @click="toIndexDetail(scope.row)">
+            {{ scope.row.collectSampleName }}({{ scope.row.collectSampleId }})
+          </a>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="(总)达人数"
+        align="center"
+        prop="promoterCount"
+        width="100px"
+      />
+      <el-table-column
+        label="可绑达人数"
+        align="center"
+        prop="promotersCount"
+        width="100px"
+      >
+        <template slot-scope="scope">
+          {{ scope.row.promotersCount }}
+          <el-button
+            v-if="$store.getters.roles[0] == 'admin' ||$store.getters.roles[0] == 'bdManager' || $store.getters.roles[0] == 'supplyChainAdmin' "
+            size="mini" type="text" @click="editCount(scope.row)">编辑
+          </el-button>
+        </template>
+      </el-table-column>
+
+
+      <el-table-column
+        label="(总)领样达人数"
+        align="center"
+        prop="sampleCount"
+        width="200px"
+      />
+      <el-table-column label="(总)领样率" align="center" prop="sampleRate" width="100px">
+        <template slot-scope="scope">
+          {{ scope.row.sampleRate ? scope.row.sampleRate + "%" : "-" }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="(总)未领样数"
+        align="center"
+        prop="notSampleCount"
+        width="100px"
+      >
+      </el-table-column>
+      <el-table-column label="发样数" align="center" prop="sendTotalCount" width="100px">
+      </el-table-column>
+      <el-table-column
+        label="发样达人数"
+        align="center"
+        prop="sendPromoterCount"
+        width="100px"
+      >
+      </el-table-column>
+      <el-table-column
+        label="发样商品数"
+        align="center"
+        prop="sendItemCount"
+        width="100px"
+      >
+      </el-table-column>
+
+      <el-table-column label="订单数" align="center" prop="orderNum" width="100px">
+      </el-table-column>
+      <el-table-column
+        label="(凭)订单数"
+        align="center"
+        prop="voucherOrderNum"
+        width="100px"
+      >
+      </el-table-column>
+      <el-table-column
+        label="有效订单数"
+        align="center"
+        prop="validOrderNum"
+        width="100px"
+      >
+      </el-table-column>
+      <el-table-column
+        label="(凭)有效订单数"
+        align="center"
+        prop="voucherValidOrderNum"
+        width="150px"
+      >
+      </el-table-column>
+      <el-table-column
+        label="有效订单率"
+        align="center"
+        prop="validOrderRate"
+        width="100px"
+      >
+        <template slot-scope="scope">
+          {{ scope.row.validOrderRate ? scope.row.validOrderRate + "%" : "-" }}
+        </template>
+      </el-table-column>
+      <el-table-column label="实付金额" align="center" prop="orderAmount" width="150px">
+        <template slot-scope="scope">
+          {{ scope.row.orderAmount ? allMoney(scope.row.orderAmount / 100) : "-" }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="(凭)实付金额"
+        align="center"
+        prop="voucherOrderAmount"
+        width="150px"
+      >
+        <template slot-scope="scope">
+          {{
+          scope.row.voucherOrderAmount
+          ? allMoney(scope.row.voucherOrderAmount / 100)
+          : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="预估服务费"
+        align="center"
+        prop="regimentalPromotionAmount"
+        width="150px"
+      >
+        <template slot-scope="scope">
+          {{
+          scope.row.regimentalPromotionAmount
+          ? allMoney(scope.row.regimentalPromotionAmount / 100)
+          : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="(凭)预估服务费"
+        align="center"
+        prop="voucherRegimentalPromotionAmount"
+        width="150px"
+      >
+        <template slot-scope="scope">
+          {{
+          scope.row.voucherRegimentalPromotionAmount
+          ? allMoney(scope.row.voucherRegimentalPromotionAmount / 100)
+          : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="结算服务费"
+        align="center"
+        prop="totalRegimentalSettleAmount"
+        width="150px"
+      >
+        <template slot-scope="scope">
+          {{
+          scope.row.totalRegimentalSettleAmount
+          ? allMoney(scope.row.totalRegimentalSettleAmount / 100)
+          : "-"
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="(凭)结算服务费"
+        align="center"
+        prop="voucherTotalRegimentalSettleAmount"
+        width="150px"
+      >
+        <template slot-scope="scope">
+          {{
+          scope.row.voucherTotalRegimentalSettleAmount
+          ? allMoney(scope.row.voucherTotalRegimentalSettleAmount / 100)
+          : "-"
+          }}
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+
+    <el-dialog
+      title="编辑数量"
+      :visible.sync="editCountVisible"
+      width="500px"
+      :close-on-click-modal="false"
+    >
+      <el-input placeholder="请输入数量" style="width: 100%" v-model="promotersCount">
+      </el-input>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitPromotersCount" :loading="promotersCountLoading"
+        >确 定
+        </el-button>
+        <el-button
+          @click="
+            promotersCountLoading = false;
+            editCountVisible = false;
+            promotersCount = null;
+            submitUserId = null;
+          "
+        >取 消
+        </el-button>
+      </div>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+  import {
+    getSupplyChainUserList,
+    getBytedanceBdReportList,
+    downFile,
+    submitPromotersCount,
+  } from "@/api/bytedance/bytedance";
+
+  export default {
+    name: "Investment",
+    dicts: ["sys_normal_disable"],
+    data() {
+      return {
+        submitUserId: null,
+        promotersCountLoading: false,
+        promotersCount: null,
+        editCountVisible: false,
+        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,
+        roleId: undefined,
+        // 销售列表
+        saleList: [],
+        // 分配销售确定loading
+        confirmLoadingSale: false,
+        // 日期范围
+        dateRange: [],
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10,
+          collectSampleId: undefined,
+          orderStartDate: undefined,
+          orderEndDate: undefined,
+        },
+        uploadDate: [new Date(), new Date()],
+        //查询参数所用下拉数据
+        queryParamsList: {
+          personList: [],
+        },
+      };
+    },
+    created() {
+      this.userId = this.$store.getters.userId;
+      this.roleId = this.$store.getters.roles[0];
+      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: {
+
+      submitPromotersCount() {
+        if (!!this.promotersCount) {
+          this.promotersCountLoading = true;
+          submitPromotersCount({
+            userId: this.submitUserId,
+            promotersCount: this.promotersCount,
+            mediaId: 1,
+          })
+            .then((res) => {
+              this.promotersCountLoading = false;
+              this.editCountVisible = false;
+              this.submitUserId = null;
+              this.promotersCount = null;
+              this.getList();
+              this.$message.success("添加成功");
+            })
+            .catch(() => {
+              this.promotersCountLoading = false;
+            });
+        } else {
+          this.$message.error("请填写数量");
+        }
+      },
+
+      editCount(item) {
+        this.editCountVisible = true;
+        this.submitUserId = item.collectSampleId;
+      },
+
+      /** 导出按钮操作 */
+      handleExport() {
+        this.downLoadLoading = true;
+        downFile(
+          "/bytedance/order/exportBytedanceBDReportList",
+          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 = `渠道管理.xlsx`; //下载后文件名
+          document.body.appendChild(downloadElement);
+          downloadElement.click(); //点击下载
+          document.body.removeChild(downloadElement); //下载完成移除元素
+          window.URL.revokeObjectURL(href); //释放掉blob对象
+          this.downLoadLoading = false;
+        });
+      },
+      toIndexDetail(item) {
+        this.$router.replace({
+          path: "/supplyChain/bytedance/bytedanceChannelDetails",
+          query: {
+            id: item.collectSampleId,
+            orderStartDate: this.uploadDate[0],
+            orderEndDate: this.uploadDate[1],
+          },
+        });
+      },
+      getPersonList() {
+        getSupplyChainUserList().then((response) => {
+          this.queryParamsList.personList = response.rows;
+        });
+      },
+      /** 查询字典类型列表 */
+      getList() {
+        this.loading = true;
+        if (this.roleId == 'bd') {
+          this.queryParams.collectSampleId = this.userId
+        }
+        getBytedanceBdReportList(
+          this.addDateRange(
+            this.queryParams,
+            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>

+ 463 - 0
src/views/bytedance/bytedanceGoods.vue

@@ -0,0 +1,463 @@
+<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 {
+
+  height: calc(100vh - 280px);
+}
+</style>
+<template>
+  <div class="app-container" style="height: 100%">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
+      <el-form-item label="人员名称" prop="userId">
+        <el-select
+          filterable
+          v-model="queryParams.userId"
+          placeholder="人员名称"
+          clearable
+          style="width: 240px"
+        >
+          <el-option
+            v-for="item in queryParamsList.personList"
+            :key="item.userId"
+            :label="item.nickMame"
+            :value="item.userId"
+          >
+            <div style="display: flex">
+              <span
+                style="
+                  width: 10px;
+                  height: 10px;
+                  border-radius: 50%;
+                  background-color: green;
+                  position: relative;
+                  top: 12px;
+                  margin-right: 5px;
+                "
+                :style="
+                  item.status == '0'
+                    ? 'backgroundColor:green'
+                    : 'backgroundColor:red'
+                "
+                >{{ item.value }}</span
+              ><span>{{ item.nickMame }}</span>
+            </div>
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="商品名称" prop="itemTitle">
+        <el-input
+          v-model="queryParams.itemTitle"
+          placeholder="请输入商品名称"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="商品Id" prop="itemId">
+        <el-input
+          v-model="queryParams.itemId"
+          placeholder="请输入商品Id"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="选择日期">
+        <el-date-picker
+          v-model="uploadDate"
+          style="width: 240px"
+          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        ></el-date-picker>
+      </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
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          :loading="downLoadLoading"
+          >导出</el-button
+        >
+      </el-form-item>
+    </el-form>
+
+    <div class="tableBox">
+      <el-table
+        v-loading="loading"
+        :data="typeList"
+        @selection-change="handleSelectionChange"
+        ref="multipleTable"
+        @sort-change="sortChange"
+        height="calc(100vh - 100px);"
+      >
+        <el-table-column
+          label="商品名称"
+          align="center"
+          prop="itemTitle"
+          width="400"
+        >
+          <template slot-scope="scope">
+            <div style="display: flex; width: 100%">
+              <div style="width: 40%">
+                <img
+                  :src="scope.row.imageUrl"
+                  alt=""
+                  style="width: 70px; height: auto"
+                />
+              </div>
+              <div style="width: 60%" class="item-name-calss">
+                <a
+                  @click="toIndexDetail(scope.row)"
+                  style="
+                    text-overflow: ellipsis;
+                    white-space: nowrap;
+                    overflow: hidden;
+                    width: 100%;
+                  "
+                  :title="scope.row.itemTitle"
+                >
+                  {{ scope.row.itemTitle }}
+                </a>
+                <p>商品Id: {{ scope.row.itemId }}</p>
+                <p>商品单价: {{ scope.row.reservePrice}}元</p>
+                <p>
+                  佣金率:
+                  {{
+                    scope.row.itemCommissionRate
+                  }}
+                </p>
+              </div>
+            </div>
+          </template>
+        </el-table-column>
+
+        <el-table-column
+          label="订单数"
+          align="center"
+          prop="orderNum"
+          sortable="custom"
+        >
+        </el-table-column>
+        <el-table-column
+          label="有效订单数"
+          align="center"
+          prop="validOrderNUm"
+          sortable="custom"
+        />
+        <el-table-column
+          label="有效率"
+          align="center"
+          prop="validRadio"
+          sortable="custom"
+        >
+          <template slot-scope="scope">
+            {{
+              scope.row.validRadio
+            }}
+          </template>
+        </el-table-column>
+
+        <el-table-column label="归属人" align="center" prop="userName">
+        </el-table-column>
+        <el-table-column label="top3的达人" align="center" prop="topAnchors"  >
+          <template slot-scope="scope">
+            <el-popover
+              placement="top"
+              title="top3"
+              width="600"
+              trigger="hover"
+              @show="showTitle(scope.row)"
+            >
+              <asamplingList
+                v-for="(item, index) in videoTag"
+                :key="index"
+                @click="toDetail(item)"
+                style="text-align: left; display: block"
+              >
+                {{ item.promoterNickName }}(Id:{{ item.promoterId }};订单数量:{{
+                  item.orderNum
+                }})
+              </asamplingList>
+              <a slot="reference">查看</a>
+            </el-popover>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </div>
+  </div>
+</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,
+        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],
+        },
+      });
+    },
+    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>

+ 293 - 0
src/views/bytedance/bytedanceGoodsDetails.vue

@@ -0,0 +1,293 @@
+<style scoped lang="scss">
+::v-deep a {
+  color: #409eff;
+  display: block;
+}
+</style>
+<template>
+  <div class="app-container">
+    <div></div>
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
+      <el-form-item label="商品名称" prop="itemTitle">
+        {{ $route.query ? $route.query.name : "-" }}
+      </el-form-item>
+      <el-form-item label="商品Id" prop="itemId">
+        {{ $route.query ? $route.query.id : "-" }}
+      </el-form-item>
+      <br />
+      <el-form-item label="达人名称" prop="promoterNickName">
+        <el-input
+          v-model="queryParams.promoterNickName"
+          placeholder="请输入达人名称"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="达人Id" prop="promoterId">
+        <el-input
+          v-model.number="queryParams.promoterId"
+          placeholder="请输入达人Id"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </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
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          :loading="downLoadLoading"
+          >导出</el-button
+        >
+      </el-form-item>
+    </el-form>
+
+    <el-table
+      v-loading="loading"
+      :data="typeList"
+      @selection-change="handleSelectionChange"
+      ref="multipleTable"
+    >
+      <!-- <el-table-column type="selection" width="55" align="center" /> -->
+
+      <el-table-column label="达人名称" align="center" prop="promoterNickName">
+        <template slot-scope="scope">
+          <a @click="toIndexDetail(scope.row)">
+            {{ scope.row.promoterNickName }}
+          </a>
+        </template>
+      </el-table-column>
+      <el-table-column label="达人Id" align="center" prop="promoterId" />
+      <el-table-column label="订单数" align="center" prop="orderNum"> </el-table-column>
+      <el-table-column label="有效订单数" align="center" prop="validOrderNUm" />
+      <el-table-column label="有效率" align="center" prop="validRadio">
+        <template slot-scope="scope">
+          {{ scope.row.validRadio  }}
+        </template>
+      </el-table-column>
+      <el-table-column label="付款金额" align="center" prop="payAmount">
+        <template slot-scope="scope">
+          {{ allMoney(scope.row.payAmount / 100) }}
+        </template>
+      </el-table-column>
+      <el-table-column label="服务费率" align="center" prop="regimentalPromotionRate">
+        <template slot-scope="scope">
+          {{ scope.row.regimentalPromotionRate }}
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getItemDetail"
+    />
+  </div>
+</template>
+
+<script>
+import {
+  listType,
+  getType,
+  delType,
+  addType,
+  updateType,
+  refreshCache,
+} from "@/api/system/dict/type";
+import { getOrderList, getItemDetail, downFile } from "@/api/bytedance/bytedance";
+var echarts = require("echarts");
+export default {
+  name: "sale",
+  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,
+        promoterId: undefined,
+        promoterNickName: undefined,
+        orderStartDate: undefined,
+        orderEndDate: undefined,
+      },
+      uploadDate: [new Date(), new Date()],
+      //查询参数所用下拉数据
+      queryParamsList: {},
+    };
+  },
+  created() {
+    if (
+      this.$route &&
+      this.$route.query.id &&
+      this.$route.query.orderStartDate &&
+      this.$route.query.orderEndDate
+    ) {
+      this.getItemDetail();
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      //   this.getList();
+      //   this.initEchart('echart', this.handlerEchartOption(res.result, 'cost'))
+    });
+  },
+  methods: {
+    /** 导出按钮操作 */
+    handleExport() {
+      this.downLoadLoading = true;
+      downFile("/bytedance/order/exportBytedanceItemDetail", {
+        ...this.queryParams,
+        orderStartDate: this.$route.query.orderStartDate,
+        orderEndDate: this.$route.query.orderEndDate,
+        itemId: this.$route.query.id,
+      }).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.$route.query.name}${this.$route.query.orderStartDate}-${this.$route.query.orderEndDate}详情.xlsx`; //下载后文件名
+        document.body.appendChild(downloadElement);
+        downloadElement.click(); //点击下载
+        document.body.removeChild(downloadElement); //下载完成移除元素
+        window.URL.revokeObjectURL(href); //释放掉blob对象
+        this.downLoadLoading = false;
+      });
+    },
+    toDetail(id) {},
+    toIndexDetail(item) {
+      this.$router.replace({
+        path: "/supplyChain/bytedance/bytedancePromoterDetail",
+        query: {
+          id: item.promoterId,
+          name: item.promoterNickName,
+          orderStartDate: this.$route.query.orderStartDate,
+          orderEndDate: this.$route.query.orderEndDate,
+        },
+      });
+    },
+    getItemDetail() {
+      this.loading = true;
+      getItemDetail({
+        ...this.queryParams,
+        orderStartDate: this.$route.query.orderStartDate,
+        orderEndDate: this.$route.query.orderEndDate,
+        itemId: this.$route.query.id,
+      }).then((response) => {
+        this.typeList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    /** 查询字典类型列表 */
+    getList() {
+      this.loading = true;
+      getOrderList(
+        this.addDateRange(
+          this.queryParams,
+          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.getItemDetail();
+    },
+    /** 重置按钮操作 */
+    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>

+ 373 - 0
src/views/bytedance/bytedanceInvestment.vue

@@ -0,0 +1,373 @@
+<style scoped lang="scss">
+::v-deep a {
+  color: #409eff;
+  display: block;
+}
+</style>
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
+      <el-form-item label="人员名称" prop="userId">
+        <el-select
+          filterable
+          v-model="queryParams.userId"
+          placeholder="人员名称"
+          clearable
+          style="width: 240px"
+        >
+          <el-option
+            v-for="item in queryParamsList.personList"
+            :key="item.userId"
+            :label="item.nickMame"
+            :value="item.userId"
+          >
+            <div style="display: flex">
+              <span
+                style="
+                  width: 10px;
+                  height: 10px;
+                  border-radius: 50%;
+                  background-color: green;
+                  position: relative;
+                  top: 12px;
+                  margin-right: 5px;
+                "
+                :style="
+                  item.status == '0' ? 'backgroundColor:green' : 'backgroundColor:red'
+                "
+                >{{ item.value }}</span
+              ><span>{{ item.nickMame }}</span>
+            </div>
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="出单日期">
+        <el-date-picker
+          v-model="uploadDate"
+          style="width: 240px"
+          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          @change="cleanBindDate()"
+        ></el-date-picker>
+      </el-form-item>
+
+
+      <el-form-item label="绑定日期">
+        <el-date-picker
+          v-model="bindDate"
+          style="width: 240px"
+          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          @change="cleanUploadDate()"
+        ></el-date-picker>
+      </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
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          :loading="downLoadLoading"
+        >导出</el-button
+        >
+      </el-form-item>
+    </el-form>
+
+    <el-table
+      v-loading="loading"
+      :data="typeList"
+      @selection-change="handleSelectionChange"
+      ref="multipleTable"
+    >
+      <!-- <el-table-column type="selection" width="55" align="center" /> -->
+      <el-table-column label="供应链人员" align="center" prop="userName">
+        <template slot-scope="scope">
+          <a @click="toIndexDetail(scope.row)">
+            {{ scope.row.userName }}({{ scope.row.userId }})
+          </a>
+        </template>
+      </el-table-column>
+      <el-table-column label="商品数" align="center" prop="itemCount" />
+      <el-table-column label="发样数" align="center" prop="sendSampleCount" />
+      <el-table-column label="订单数" align="center" prop="orderNum"> </el-table-column>
+      <el-table-column label="有效订单数" align="center" prop="validOrderNUm" />
+      <el-table-column label="有效率" align="center" prop="validRadio">
+        <template slot-scope="scope">
+          {{ scope.row.validRadio }}
+        </template>
+      </el-table-column>
+
+      <el-table-column label="实付金额" align="center" prop="payAmount">
+        <template slot-scope="scope">
+          {{ scope.row.payAmount }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="预估服务费收入"
+        align="center"
+        prop="regimentalPromotionAmount"
+      >
+        <template slot-scope="scope">
+          {{
+            scope.row.regimentalPromotionAmount
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="结算服务费收入"
+        align="center"
+        prop="totalRegimentalSettleAmount"
+      >
+        <template slot-scope="scope">
+          {{
+            scope.row.totalRegimentalSettleAmount
+          }}
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+</template>
+
+<script>
+import {
+  listType,
+  getType,
+  delType,
+  addType,
+  updateType,
+  refreshCache,
+} from "@/api/system/dict/type";
+import {
+  getSupplyChainCourtshipList,
+  adminBytedanceReportList,
+  downFile,
+} from "@/api/bytedance/bytedance";
+export default {
+  name: "Investment",
+  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,
+        userId: undefined,
+        orderStartDate: undefined,
+        orderEndDate: undefined,
+      },
+      uploadDate: [new Date(), new Date()],
+      bindDate: [],
+      //查询参数所用下拉数据
+      queryParamsList: {
+        personList: [],
+      },
+    };
+  },
+  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: {
+    cleanBindDate(){
+      this.bindDate = [];
+    },
+
+    cleanUploadDate(){
+      this.uploadDate = [];
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.downLoadLoading = true;
+      if(!!this.bindDate){
+        this.queryParams.bindStartDate = this.bindDate[0],
+          this.queryParams.bindEndDate = this.bindDate[1]
+      }
+      downFile(
+        "/bytedance/order/exportAdminBytedanceReportList",
+        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/bytedance/bytedanceGoodsDetails",
+        query: {
+          id: item.itemId,
+          name: item.itemTitle,
+          orderStartDate: this.uploadDate[0],
+          orderEndDate: this.uploadDate[1],
+        },
+      });
+    },
+    toIndexDetail(item) {
+      this.$router.replace({
+        path: "/supplyChain/bytedance/bytedanceInvestmentDetails",
+        query: {
+          id: item.userId,
+          orderStartDate: this.uploadDate[0],
+          orderEndDate: this.uploadDate[1],
+        },
+      });
+    },
+    getPersonList() {
+      getSupplyChainCourtshipList().then((response) => {
+        this.queryParamsList.personList = response.rows;
+      });
+    },
+    /** 查询字典类型列表 */
+    getList() {
+      this.loading = true;
+      if(!!this.bindDate){
+        this.queryParams.bindStartDate = this.bindDate[0],
+        this.queryParams.bindEndDate = this.bindDate[1]
+      }
+
+      adminBytedanceReportList(
+        this.addDateRange(
+          this.queryParams,
+          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.bindDate = [];
+      this.resetForm("queryForm");
+      this.queryParams.pageNum = 1;
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id);
+    },
+  },
+};
+</script>

+ 540 - 0
src/views/bytedance/bytedanceInvestmentDetails.vue

@@ -0,0 +1,540 @@
+<style scoped lang="scss">
+::v-deep a {
+  color: #409eff;
+  display: block;
+}
+p {
+  text-align: left;
+  margin: 0;
+}
+</style>
+<template>
+  <div class="app-container">
+    <div></div>
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
+      <el-form-item label="商品名称" prop="itemTitle">
+        <el-input
+          v-model="queryParams.itemTitle"
+          placeholder="请输入商品名称"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="商品Id" prop="itemId">
+        <el-input
+          v-model.number="queryParams.itemId"
+          placeholder="请输入商品Id"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="选择日期">
+        <el-date-picker
+          v-model="uploadDate"
+          style="width: 240px"
+          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        ></el-date-picker>
+      </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
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          :loading="downLoadLoading"
+          >导出</el-button
+        >
+      </el-form-item>
+    </el-form>
+    <el-table
+      v-loading="loading"
+      :data="typeList"
+      @selection-change="handleSelectionChange"
+      @sort-change="sortChange"
+      ref="multipleTable"
+      :span-method="arraySpanMethod"
+      border
+    >
+      <el-table-column label="商品名称" align="center" prop="itemTitle" width="300">
+        <template slot-scope="scope">
+          <div style="display: flex; width: 100%">
+            <div style="width: 40%">
+              <img :src="scope.row.imageUrl" alt="" style="width: 70px; height: auto" />
+            </div>
+            <div style="width: 60%">
+              <a
+                style="
+                  text-overflow: ellipsis;
+                  white-space: nowrap;
+                  overflow: hidden;
+                  width: 100%;
+                "
+                :title="scope.row.itemTitle"
+              >
+                {{ scope.row.itemTitle }}
+              </a>
+              <p>商品Id: {{ scope.row.itemId }}</p>
+              <p>
+                佣金率:
+                {{
+                  scope.row.itemCommissionRate
+                }}
+              </p>
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="认领人" align="center" prop="userName"> </el-table-column>
+      <el-table-column label="商品单价" align="center" prop="reservePrice">
+        <template slot-scope="scope">
+          <p
+            v-if="scope.row.reservePrice == '总计'"
+            style="font-size: 16px; text-align: center; font-weight: bold"
+          >
+            {{ scope.row.reservePrice }}
+          </p>
+          <span v-else> {{ scope.row.reservePrice }}元 </span>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="订单数" align="center" prop="orderNum" sortable="custom">
+      </el-table-column>
+      <el-table-column
+        label="有效订单数"
+        align="center"
+        prop="validOrderNUm"
+        sortable="custom"
+      />
+      <el-table-column
+        label="有效率"
+        align="center"
+        prop="validRadio"
+        width="100"
+        sortable="custom"
+      >
+        <template slot-scope="scope">
+          {{ scope.row.validRadio  }}
+        </template>
+      </el-table-column>
+      <el-table-column label="服务费率" align="center" prop="regimentalPromotionRate">
+        <template slot-scope="scope">
+          {{
+            scope.row.regimentalPromotionRate
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column label="实付金额" align="center" prop="payAmount">
+        <template slot-scope="scope">
+          {{ scope.row.payAmount }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="预估服务费收入"
+        align="center"
+        prop="regimentalPromotionAmount"
+      >
+        <template slot-scope="scope">
+          {{
+            scope.row.regimentalPromotionAmount
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="结算服务费收入"
+        align="center"
+        prop="totalRegimentalSettleAmount"
+      >
+        <template slot-scope="scope">
+          {{
+            scope.row.totalRegimentalSettleAmount
+          }}
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getUserItemDetail"
+    />
+  </div>
+</template>
+
+<script>
+import {
+  listType,
+  getType,
+  delType,
+  addType,
+  updateType,
+  refreshCache,
+} from "@/api/system/dict/type";
+import {
+  getOrderList,
+  getItemDetail,
+  downFile,
+  getUserItemDetail,
+  getUserItemTotal,
+} from "@/api/bytedance/bytedance";
+var echarts = require("echarts");
+export default {
+  name: "ClaimOk",
+  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,
+        itemId: undefined,
+        itemTitle: undefined,
+        orderStartDate: undefined,
+        orderEndDate: undefined,
+      },
+      uploadDate: [new Date(), new Date()],
+      //查询参数所用下拉数据
+      queryParamsList: {},
+      prop: "orderNum",
+      sort: "desc",
+      itemSummary: [],
+      loadingTotal: false,
+    };
+  },
+  created() {
+    if (
+      this.$route &&
+      this.$route.query.id &&
+      this.$route.query.orderStartDate &&
+      this.$route.query.orderEndDate
+    ) {
+      this.uploadDate = [
+        this.$route.query.orderStartDate,
+        this.$route.query.orderEndDate,
+      ];
+      this.getUserItemTotal();
+      this.getUserItemDetail();
+    } else {
+      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.getUserItemTotal();
+      this.getUserItemDetail();
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {});
+  },
+  methods: {
+    /** 导出按钮操作 */
+    handleExport() {
+      this.downLoadLoading = true;
+      downFile(
+        "/bytedance/order/exportBytedanceUserItemDetail",
+        this.addDateRange(
+          {
+            ...this.queryParams,
+            userId: !!this.$route.query.id
+              ? this.$route.query.id
+              : this.$store.getters.roles[0] == "admin" ||
+                this.$store.getters.roles[0] == "supplyChainAdmin"
+              ? null
+              : this.$store.getters.userId,
+          },
+          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;
+      });
+    },
+    arraySpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (rowIndex === 0) {
+        if (columnIndex === 0) {
+          return [0, 0];
+        } else if (columnIndex === 1) {
+          return [0, 0];
+        } else if (columnIndex === 2) {
+          return [1, 3];
+        }
+      }
+    },
+    getUserItemTotal() {
+      this.loadingTotal = true;
+      getUserItemTotal(
+        this.addDateRange(
+          {
+            userId: !!this.$route.query.id
+              ? this.$route.query.id
+              : this.$store.getters.roles[0] == "admin" ||
+                this.$store.getters.roles[0] == "supplyChainAdmin"
+              ? null
+              : this.$store.getters.userId,
+          },
+          this.uploadDate,
+          "orderStartDate",
+          "orderEndDate"
+        )
+      ).then((res) => {
+        this.loadingTotal = false;
+        this.itemSummary = [res].map((item) => {
+          return {
+            ...item,
+            itemTitle: "总计",
+            userName: "总计",
+            reservePrice: "总计",
+          };
+        });
+      });
+    },
+    sortChange(col, prop, order) {
+      this.prop = col.prop;
+      this.sort = !!col.order ? (col.order == "descending" ? "desc" : "asc") : "desc";
+      this.handleQuery();
+    },
+    toDetail(id) {},
+    toIndexDetail(item) {
+      this.$router.replace({
+        path: "/supplyChain/bytedance/bytedanceProtomerDetails",
+        query: {
+          id: item.promoterId,
+          name: item.promoterNickName,
+          orderStartDate: this.$route.query.orderStartDate,
+          orderEndDate: this.$route.query.orderEndDate,
+        },
+      });
+    },
+    getUserItemDetail() {
+      this.loading = true;
+      getUserItemDetail(
+        this.addDateRange(
+          {
+            ...this.queryParams,
+            fieId: this.prop,
+            sort: this.sort,
+            userId: !!this.$route.query.id
+              ? this.$route.query.id
+              : this.$store.getters.roles[0] == "admin" ||
+                this.$store.getters.roles[0] == "supplyChainAdmin"
+              ? null
+              : this.$store.getters.userId,
+          },
+          this.uploadDate,
+          "orderStartDate",
+          "orderEndDate"
+        )
+      ).then((response) => {
+        this.typeList = this.itemSummary.concat(response.rows);
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    getSummaries(param) {
+      console.log(param);
+      const { columns, data } = param;
+      const sums = [];
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = "总计";
+          return;
+        } else if (index == 1) {
+          sums[index] = "N/A";
+          return;
+        } else if (index == 9) {
+          sums[index] = "-";
+          return;
+        } else if (index == 2) {
+          sums[index] = "-";
+          return;
+        }
+
+        for (const key in this.itemSummary[0]) {
+          if (key == column.property) {
+            if (key == "validRadio" || key == "deliveryRadio") {
+              sums[index] = this.itemSummary[0][key]
+                ? (this.itemSummary[0][key] * 100).toFixed(2) + "%"
+                : "-";
+            } else if (
+              key == "payAmount" ||
+              key == "regimentalPromotionAmount" ||
+              key == "totalRegimentalSettleAmount"
+            ) {
+              sums[index] = this.itemSummary[0][key]
+                ? this.itemSummary[0][key] / 100
+                : "-";
+            } else {
+              sums[index] = this.itemSummary[0][key];
+            }
+          }
+        }
+
+        // const values = data.map((item) => Number(item[column.property]));
+        // console.log(values)
+        // if (!values.every((value) => isNaN(value))) {
+        //   sums[index] = values.reduce((prev, curr) => {
+        //     const value = Number(curr);
+        //     if (!isNaN(value)) {
+        //       return prev + curr;
+        //     } else {
+        //       return prev;
+        //     }
+        //   }, 0);
+        //   // sums[index] += " 元";
+        // } else {
+        //   sums[index] = "N/A";
+        // }
+      });
+
+      return sums;
+    },
+    /** 查询字典类型列表 */
+    getList() {
+      this.loading = true;
+      getOrderList(
+        this.addDateRange(
+          this.queryParams,
+          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.getUserItemTotal();
+      this.getUserItemDetail();
+    },
+    /** 重置按钮操作 */
+    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;
+      if (
+        this.$route &&
+        this.$route.query.id &&
+        this.$route.query.orderStartDate &&
+        this.$route.query.orderEndDate
+      ) {
+        this.uploadDate = [
+          this.$route.query.orderStartDate,
+          this.$route.query.orderEndDate,
+        ];
+        this.getUserItemDetail();
+      } else {
+        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.getUserItemDetail();
+      }
+      this.resetForm("queryForm");
+      this.queryParams.pageNum = 1;
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id);
+    },
+  },
+};
+</script>

+ 592 - 0
src/views/bytedance/bytedancePromoterDetail.vue

@@ -0,0 +1,592 @@
+<style scoped lang="scss">
+::v-deep a {
+  color: #409eff;
+  display: block;
+}
+</style>
+<template>
+  <div class="app-container">
+    <div></div>
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
+      <el-form-item label="达人名称" prop="promoterName">
+        {{ $route.query ? $route.query.name : "-" }}
+      </el-form-item>
+      <el-form-item label="达人Id" prop="promoterId">
+        {{ $route.query ? $route.query.id : "-" }}
+      </el-form-item>
+      <br />
+      <el-form-item label="商品名称" prop="itemTitle">
+        <el-input
+          v-model="queryParams.itemTitle"
+          placeholder="请输入商品名称"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="商品Id" prop="itemId">
+        <el-input
+          v-model.number="queryParams.itemId"
+          placeholder="请输入商品Id"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </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
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          :loading="downLoadLoading"
+          >导出</el-button
+        >
+        <el-button size="mini" @click="toSamplingList">领样状态</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-table
+      v-loading="loading"
+      :data="typeList"
+      @selection-change="handleSelectionChange"
+      ref="multipleTable"
+    >
+      <!-- <el-table-column type="selection" width="55" align="center" /> -->
+
+      <el-table-column label="商品图片" align="center" prop="imageUrl">
+        <template slot-scope="scope">
+          <img :src="scope.row.imageUrl" alt="" style="width: 100px; height: auto" />
+        </template>
+      </el-table-column>
+      <el-table-column label="商品名称" align="center" prop="itemTitle">
+        <template slot-scope="scope">
+          <a @click="toIndexDetail(scope.row)">
+            {{ scope.row.itemTitle }}
+          </a>
+        </template>
+      </el-table-column>
+      <el-table-column label="商品Id" align="center" prop="itemId" />
+
+      <el-table-column label="商品单价" align="center" prop="reservePrice">
+        <template slot-scope="scope"> {{ scope.row.reservePrice }}元 </template>
+      </el-table-column>
+
+      <el-table-column label="订单数" align="center" prop="orderNum"> </el-table-column>
+      <el-table-column label="有效订单数" align="center" prop="validOrderNUm" />
+      <el-table-column label="有效率" align="center" prop="validRadio" width="100">
+        <template slot-scope="scope">
+          {{ scope.row.validRadio }}
+        </template>
+      </el-table-column>
+      <el-table-column label="付款金额" align="center" prop="payAmount">
+        <template slot-scope="scope">
+          {{ allMoney(scope.row.payAmount / 100) }}
+        </template>
+      </el-table-column>
+      <el-table-column label="服务费率" align="center" prop="regimentalPromotionRate">
+        <template slot-scope="scope">
+          {{ scope.row.regimentalPromotionRate }}
+        </template>
+      </el-table-column>
+      <el-table-column label="领样状态" align="center" prop="status" width="150">
+        <template slot-scope="scope">
+          <div v-if="scope.row.status">
+            {{ scope.row.status | statusName }}
+          </div>
+          <div v-else>-</div>
+        </template>
+      </el-table-column>
+      <el-table-column label="商品状态" align="center" prop="activityItemStatus" width="150"/>
+
+      <el-table-column label="操作" align="center" prop="action" width="150">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            @click="checkStatus(scope.row)"
+            :disabled="!!scope.row.status"
+            >领样申请</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getOrderDetail"
+    />
+
+    <div class="echart">
+      <div class="echartBody">
+        <h3 style="font-weight: bold">订单统计</h3>
+        <el-date-picker
+          v-model="uploadDate"
+          style="width: 240px"
+          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="echart" ref="echart" style="height: 500px; width: 100%"></div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import {
+  listType,
+  getType,
+  delType,
+  addType,
+  updateType,
+  refreshCache,
+} from "@/api/system/dict/type";
+import {
+  getOrderList,
+  getOrderDetail,
+  getOrderStatistics,
+  downFile,
+  samplesCheck,
+} from "@/api/bytedance/bytedance";
+var echarts = require("echarts");
+export default {
+  name: "sale",
+  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,
+        itemId: undefined,
+        itemTitle: undefined,
+        orderStartDate: undefined,
+        orderEndDate: undefined,
+      },
+      uploadDate: [new Date(), new Date()],
+      //查询参数所用下拉数据
+      queryParamsList: {},
+      pickerOptions: {
+        shortcuts: [
+          {
+            text: "今天",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "昨天",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 1);
+              end.setTime(end.getTime() - 3600 * 1000 * 24 * 1);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近三天",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 3);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近一周",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近一个月",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近三个月",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+        ],
+      },
+    };
+  },
+  filters: {
+    statusName(status) {
+      let name = {
+        1: "待审核",
+        2: "领样申请审核拒绝",
+        3: "待录入订单号",
+        4: "已发货",
+        5: "已签收待上传作业",
+        6: "待招商审核",
+        7: "审核通过",
+      };
+      return name[status];
+    },
+  },
+  created() {
+    let start = new Date();
+    let end = new Date();
+
+    let y = end.getFullYear();
+    let MM = end.getMonth() + 1;
+    MM = MM < 10 ? "0" + MM : MM;
+    let dd = end.getDate();
+    dd = dd < 10 ? "0" + dd : dd;
+
+    start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+    let sy = start.getFullYear();
+    let sMM = start.getMonth() + 1;
+    sMM = sMM < 10 ? "0" + sMM : sMM;
+    let sdd = start.getDate();
+    sdd = sdd < 10 ? "0" + sdd : sdd;
+    this.uploadDate = [`${sy}-${sMM}-${sdd}`, `${y}-${MM}-${dd}`];
+    if (
+      this.$route &&
+      this.$route.query.id &&
+      this.$route.query.orderStartDate &&
+      this.$route.query.orderEndDate
+    ) {
+      this.getOrderDetail();
+      this.getOrderStatistics();
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      //   this.getList();
+      //   this.initEchart('echart', this.handlerEchartOption(res.result, 'cost'))
+    });
+  },
+  methods: {
+    checkStatus(item) {
+      samplesCheck({
+        promoterId: this.$route.query.id,
+        itemId: item.itemId,
+        userId: this.$store.getters.userId,
+      }).then((res) => {
+        this.$router.replace({
+          path: "/goodsManagement/set",
+          query: {
+            promoterIds: JSON.stringify([+res.id]),
+            itemIds: JSON.stringify([+item.itemId]),
+          },
+        });
+      });
+    },
+    toSamplingList() {
+      this.$router.replace({
+        path: "/goodsManagement/samplingList",
+        query: {
+          promoterId: this.$route.query.id,
+        },
+      });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.downLoadLoading = true;
+      downFile("/bytedance/order/exportBytedancePromoter", {
+        ...this.queryParams,
+        orderStartDate: this.$route.query.orderStartDate,
+        orderEndDate: this.$route.query.orderEndDate,
+        promoterId: this.$route.query.id,
+      }).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.$route.query.name}${this.$route.query.orderStartDate}-${this.$route.query.orderEndDate}带货详情.xlsx`; //下载后文件名
+        document.body.appendChild(downloadElement);
+        downloadElement.click(); //点击下载
+        document.body.removeChild(downloadElement); //下载完成移除元素
+        window.URL.revokeObjectURL(href); //释放掉blob对象
+        this.downLoadLoading = false;
+      });
+    },
+    toDetail(id) {},
+    toIndexDetail(item) {
+      this.$router.replace({
+        path: "/supplyChain/bytedance/bytedanceGoodsDetails",
+        query: {
+          id: item.itemId,
+          name: item.itemTitle,
+          orderStartDate: this.$route.query.orderStartDate,
+          orderEndDate: this.$route.query.orderEndDate,
+        },
+      });
+    },
+    getOrderDetail() {
+      this.loading = true;
+      getOrderDetail({
+        ...this.queryParams,
+        orderStartDate: this.$route.query.orderStartDate,
+        orderEndDate: this.$route.query.orderEndDate,
+        promoterId: this.$route.query.id,
+      }).then((response) => {
+        this.typeList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    getAllEchartsData(e) {
+      console.log(e);
+      if (e.length == 2) {
+        this.getOrderStatistics();
+      }
+    },
+    getOrderStatistics() {
+      getOrderStatistics({
+        promoterId: this.$route.query.id,
+        orderStartDate: this.uploadDate[0],
+        orderEndDate: this.uploadDate[1],
+      }).then((response) => {
+        this.initEchart("echart", this.handlerEchartOption(response.data));
+      });
+    },
+    /** 获取echart的值 */
+    initEchart(idName, optionName) {
+      let that = this;
+      const chart = this.$refs[idName];
+      if (chart) {
+        const myChart = echarts.init(document.getElementById(idName));
+        myChart.setOption(optionName);
+        window.addEventListener("resize", function () {
+          that.clientWidth = document.documentElement.clientWidth - 224;
+          myChart.resize();
+        });
+      }
+    },
+    /** echarts数据展示 订单统计*/
+    handlerEchartOption(data, typeShow) {
+      let option = {
+        noDataLoadingOption: {
+          text: "暂无数据",
+          effect: "bubble",
+          effectOption: {
+            effect: {
+              n: 0,
+            },
+          },
+        },
+        tooltip: {
+          trigger: "axis",
+          // formatter: function(params) {
+          // 	if(typeShow == 'play_duration_3s'){
+          // 		return `${params[0].marker}${params[0].name}<br/>${params[0].seriesName}:${params[0].value}%`
+          // 	}else{
+          // 		return `${params[0].marker}${params[0].name}<br/>${params[0].seriesName}:${params[0].value}`
+          // 	}
+
+          // },
+        },
+        grid: {
+          left: "3%",
+          right: "4%",
+          bottom: "3%",
+          containLabel: true,
+        },
+        legend: {
+          icon: "circle",
+          top: "5%",
+          right: "5%",
+          itemWidth: 6,
+          itemGap: 20,
+          textStyle: {
+            color: "#556677",
+          },
+        },
+        xAxis: {
+          type: "category",
+          data: data.map((item) => {
+            return item.date;
+          }),
+          boundaryGap: false,
+          // 坐标轴线
+          axisLine: {
+            show: false,
+            lineStyle: {
+              color: "#999",
+            },
+          },
+          // 分割线
+          splitLine: {
+            show: true,
+            lineStyle: {
+              type: "dashed",
+              color: "#e5e5e5",
+            },
+          },
+        },
+        yAxis: {
+          type: "value",
+          axisLine: {
+            show: false,
+            lineStyle: {
+              color: "#999",
+            },
+          },
+          splitLine: {
+            lineStyle: {
+              type: "dashed",
+              color: "#e5e5e5",
+            },
+          },
+        },
+        series: [
+          {
+            smooth: true,
+            name: "订单统计",
+
+            type: "line",
+            stack: "总量",
+            data: data.map((item) => {
+              return item.orderNum;
+            }),
+            symbol: "circle",
+            symbolSize: 6,
+            lineStyle: {
+              normal: {
+                width: 2,
+              },
+            },
+            itemStyle: {
+              borderColor: "#ffffff",
+              borderWidth: 0,
+            },
+          },
+        ],
+      };
+      return option;
+    },
+    /** 查询字典类型列表 */
+    getList() {
+      this.loading = true;
+      getOrderList(
+        this.addDateRange(
+          this.queryParams,
+          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.getOrderDetail();
+    },
+    /** 重置按钮操作 */
+    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>

+ 365 - 0
src/views/bytedance/bytedancePromoterList.vue

@@ -0,0 +1,365 @@
+<style scoped lang="scss">
+  ::v-deep a {
+    color: #409eff;
+    display: block;
+  }
+</style>
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="100px"
+    >
+      <el-form-item label="达人名称" prop="promoterNickName">
+        <el-input
+          v-model="queryParams.promoterNickName"
+          placeholder="请输入达人名称"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="达人Id" prop="promoterId">
+        <el-input
+          v-model.number="queryParams.promoterId"
+          placeholder="请输入达人Id"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="选择日期">
+        <el-date-picker
+          v-model="uploadDate"
+          style="width: 240px"
+          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="-"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+        ></el-date-picker>
+      </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
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          :loading="downLoadLoading"
+        >导出
+        </el-button
+        >
+      </el-form-item>
+    </el-form>
+
+    <el-table
+      v-loading="loading"
+      :data="typeList"
+      @selection-change="handleSelectionChange"
+      ref="multipleTable"
+    >
+      <!-- <el-table-column type="selection" width="55" align="center" /> -->
+      <el-table-column
+        label="达人名称"
+        align="center"
+        prop="promoterNickName"
+        width="180"
+      >
+        <template slot-scope="scope">
+          <a @click="toIndexDetail(scope.row)">
+            {{ scope.row.promoterNickName }}({{ scope.row.promoterId }})
+          </a>
+        </template>
+      </el-table-column>
+
+      <el-table-column
+        label="单数"
+        align="center"
+        prop="orderNum"
+        width="80"
+      >
+      </el-table-column>
+      <el-table-column
+        label="有效单数"
+        align="center"
+        prop="validOrderNUm"
+        width="100"
+      />
+      <el-table-column
+        label="有效率"
+        align="center"
+        prop="validRadio"
+        width="100"
+      >
+        <template slot-scope="scope">
+          {{scope.row.validRadio }}
+        </template>
+      </el-table-column>
+
+      <el-table-column label="GMV" align="center" prop="payAmount" width="80">
+        <template slot-scope="scope">
+          {{scope.row.payAmount }}
+        </template>
+      </el-table-column>
+
+      <el-table-column label="GMV(有效)" align="center" prop="validPayAmount" width="100">
+        <template slot-scope="scope">
+          {{          scope.row.validPayAmount }}
+        </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="userName" width="150">
+        <template slot-scope="scope">
+          {{
+          scope.row.userName
+          ? scope.row.userName
+          : "-"
+          }}
+        </template>
+      </el-table-column>
+
+      <el-table-column label="订单top3(订单数)" align="center" prop="topOrders">
+        <template slot-scope="scope">
+          <a
+            v-for="(item, index) in scope.row.topOrders"
+            :key="index"
+            @click="toDetail(item)"
+            style="text-align: left"
+          >
+            <img
+              :src="item.imageUrl"
+              alt=""
+              style="width: 50px; height: auto"
+            />
+            {{ item.itemTitle }}
+          </a>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+</template>
+
+<script>
+  import {
+    listType,
+    getType,
+    delType,
+    addType,
+    updateType,
+    refreshCache,
+  } from "@/api/system/dict/type";
+  import {getOrderList, downFile} from "@/api/bytedance/bytedance";
+
+  export default {
+    name: "Index",
+    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,
+          promoterId: undefined,
+          promoterNickName: undefined,
+          orderStartDate: undefined,
+          orderEndDate: undefined,
+        },
+        uploadDate: [new Date(), new Date()],
+        //查询参数所用下拉数据
+        queryParamsList: {},
+      };
+    },
+    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.getList();
+      });
+    },
+    methods: {
+      /** 导出按钮操作 */
+      handleExport() {
+        this.downLoadLoading = true;
+        downFile("/bytedance/order/exportBytedanceOrderList",
+          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/bytedance/bytedanceGoodsDetails",
+          query: {
+            id: item.itemId,
+            name: item.itemTitle,
+            orderStartDate: this.uploadDate[0],
+            orderEndDate: this.uploadDate[1],
+          },
+        });
+      },
+      toIndexDetail(item) {
+        this.$router.replace({
+          path: "/supplyChain/bytedance/bytedancePromoterDetail",
+          query: {
+            id: item.promoterId,
+            name: item.promoterNickName,
+            orderStartDate: this.uploadDate[0],
+            orderEndDate: this.uploadDate[1],
+          },
+        });
+      },
+      /** 查询字典类型列表 */
+      getList() {
+        this.loading = true;
+        getOrderList(
+          this.addDateRange(
+            this.queryParams,
+            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>

+ 2 - 2
src/views/goodsManagement/goodsDetail.vue

@@ -19,8 +19,8 @@
     >
     <el-card shadow="never" class="card-show" v-if="itemJson" style="margin-bottom: 24px">
       <div>
-        <h3 style="font-weight: blod">
-          {{ itemJson.itemTitle }}({{ itemJson.itemId }})
+        <h3 style="font-weight: blod" >
+          {{ itemJson.itemTitle }}( {{ itemJson.itemId }})
           <el-button
             type="primary"
             icon="el-icon-document-add"

+ 2 - 21
src/views/goodsManagement/goodslist.vue

@@ -108,7 +108,7 @@
             label="商品名称"
             align="center"
             prop="itemTitle"
-            width="300"
+            width="350"
             fixed="left"
           >
             <template slot-scope="scope">
@@ -132,7 +132,7 @@
                   >
                     {{ scope.row.itemTitle }}
                   </a>
-                  <p>商品Id: {{ scope.row.itemId }}</p>
+                  <p >商品Id: {{ scope.row.itemId }}</p>
                   <p>商品单价: {{ scope.row.itemPrice / 100 }}元</p>
 
                   <p>
@@ -528,17 +528,6 @@
             v-model="formBroadcast.noPostArea"
           >
           </el-input>
-          <!-- <selectTree
-            style="width: 240px"
-            v-model="formBroadcast.noPostArea"
-            filterable
-            :multiple="true"
-            :data="superiorList"
-            :props="{
-              value: 'id',
-              label: 'name',
-            }"
-          /> -->
         </el-form-item>
         <el-form-item label="佣金比例" prop="commissionRate" v-if="edit">
           <el-input-number
@@ -603,14 +592,6 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <!-- <el-form-item label="商品链接" prop="detailUrl">
-          <el-input
-            placeholder="请输入商品链接"
-            style="width: 240px"
-            v-model="formBroadcast.detailUrl"
-          >
-          </el-input>
-        </el-form-item> -->
         <el-form-item label="发货时效" prop="deliveryRate" v-if="edit">
           <el-input
             placeholder="请输入发货时效"

+ 1 - 1
src/views/supplyChain/channelDetails.vue

@@ -362,7 +362,7 @@ export default {
     toDetail(id) {},
     toIndexDetail(item) {
       this.$router.replace({
-        path: "/supplyChain/indexDetails",
+        path: "/supplyChain/kuaishou/indexDetails",
         query: {
           id: item.promoterId,
           name: item.promoterNickName,

+ 2 - 2
src/views/supplyChain/channelList.vue

@@ -384,13 +384,13 @@
       });
     },
     methods: {
-
       submitPromotersCount() {
         if (!!this.promotersCount) {
           this.promotersCountLoading = true;
           submitPromotersCount({
             userId : this.submitUserId,
-            promotersCount:this.promotersCount
+            promotersCount:this.promotersCount,
+            mediaId: 1,
           })
             .then((res) => {
               this.promotersCountLoading = false;