فهرست منبع

阶段功能完成

朱鑫波 2 سال پیش
والد
کامیت
7dcc4e7d16

+ 9 - 0
src/api/accountManagement/accountManagement.js

@@ -211,6 +211,15 @@ export function deleteClaimAccount(query) {
     })
 }
 
+// 同步账户
+export function syncAccounts(query) {
+    return request({
+        url: '/agent/account/syncAccounts',
+        method: 'get',
+        params: query
+    })
+}
+
 
 
 

+ 64 - 0
src/api/label.js

@@ -0,0 +1,64 @@
+import request from '@/utils/request'
+
+
+
+
+// 新增标签
+export function addLabel(query) {
+    return request({
+        url: '/kuaishou/label/add',
+        method: 'post',
+        data: query
+    })
+}
+
+// 删除标签
+export function deleteLabelById(query) {
+    return request({
+        url: '/kuaishou/label/deleteById',
+        method: 'get',
+        params: query
+    })
+}
+
+// 查询标签列表
+export function getLabelList(query) {
+    return request({
+        url: '/kuaishou/label/list',
+        method: 'get',
+        params: query
+    })
+}
+
+// 修改快手达人标签
+export function updatePromoterLabel(query) {
+    return request({
+        url: '/kuaishou/promoter/updatePromoterLabel',
+        method: 'post',
+        data: query
+    })
+}
+
+// 新增跟进记录
+export function addFollowUpRecords(query) {
+    return request({
+        url: '/kuaishou/promoter/addFollowUpRecords',
+        method: 'post',
+        data: query
+    })
+}
+
+// 修改跟进记录
+export function updateFollowUpRecords(query) {
+    return request({
+        url: '/kuaishou/promoter/updateFollowUpRecords',
+        method: 'post',
+        data: query
+    })
+}
+
+
+
+
+
+

+ 2 - 2
src/api/operation/operation.js

@@ -83,8 +83,8 @@ export function nodeAccountCost(query) {
 export function getAccountDataReport(query) {
     return request({
         url: '/report/account/getAccountDataReport',
-        method: 'post',
-        data: query
+        method: 'get',
+        params: query
     })
 }
 

+ 8 - 0
src/api/promoter/promoter.js

@@ -26,6 +26,14 @@ export function getPromoterDetail(query) {
         params: query
     })
 }
+// 更新指定达人数据
+export function getGongHaiVideoSales(query) {
+    return request({
+        url: '/kuaishou/promoter/getGongHaiVideoSales',
+        method: 'get',
+        params: query
+    })
+}
 
 // 新增达人
 

+ 9 - 0
src/api/supplyChain/supplyChain.js

@@ -211,6 +211,15 @@ export function exportBdDetail(query) {
   })
 }
 
+//达人带货详情-领样申请校验
+export function samplesCheck(query) {
+  return request({
+    url: '/itemCollectSamples/samplesCheck',
+    method: 'get',
+    params: query
+  })
+}
+
 
 
 

+ 30 - 31
src/components/Pagination/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div :class="{'hidden':hidden}" class="pagination-container">
+  <div :class="{ hidden: hidden }" class="pagination-container">
     <el-pagination
       :background="background"
       :current-page.sync="currentPage"
@@ -16,91 +16,90 @@
 </template>
 
 <script>
-import { scrollTo } from '@/utils/scroll-to'
+import { scrollTo } from "@/utils/scroll-to";
 
 export default {
-  name: 'Pagination',
+  name: "Pagination",
   props: {
     total: {
       required: true,
-      type: Number
+      type: Number,
     },
     page: {
       type: Number,
-      default: 1
+      default: 1,
     },
     limit: {
       type: Number,
-      default: 20
+      default: 20,
     },
     pageSizes: {
       type: Array,
       default() {
-        return [10, 20, 30, 50]
-      }
+        return [10, 20, 30, 50, 200];
+      },
     },
     // 移动端页码按钮的数量端默认值5
     pagerCount: {
       type: Number,
-      default: document.body.clientWidth < 992 ? 5 : 7
+      default: document.body.clientWidth < 992 ? 5 : 7,
     },
     layout: {
       type: String,
-      default: 'total, sizes, prev, pager, next, jumper'
+      default: "total, sizes, prev, pager, next, jumper",
     },
     background: {
       type: Boolean,
-      default: true
+      default: true,
     },
     autoScroll: {
       type: Boolean,
-      default: true
+      default: true,
     },
     hidden: {
       type: Boolean,
-      default: false
-    }
+      default: false,
+    },
   },
   data() {
-    return {
-    };
+    return {};
   },
   computed: {
     currentPage: {
       get() {
-        return this.page
+        return this.page;
       },
       set(val) {
-        this.$emit('update:page', val)
-      }
+        this.$emit("update:page", val);
+      },
     },
     pageSize: {
       get() {
-        return this.limit
+        return this.limit;
       },
       set(val) {
-        this.$emit('update:limit', val)
-      }
-    }
+        this.$emit("update:limit", val);
+      },
+    },
   },
   methods: {
     handleSizeChange(val) {
       if (this.currentPage * val > this.total) {
-        this.currentPage = 1
+        this.currentPage = 1;
       }
-      this.$emit('pagination', { page: this.currentPage, limit: val })
+      this.$emit("pagination", { page: this.currentPage, limit: val });
       if (this.autoScroll) {
-        scrollTo(0, 800)
+        scrollTo(0, 800);
       }
     },
     handleCurrentChange(val) {
-      this.$emit('pagination', { page: val, limit: this.pageSize })
+      this.$emit("pagination", { page: val, limit: this.pageSize });
       if (this.autoScroll) {
-        scrollTo(0, 800)
+        scrollTo(0, 800);
       }
-    }
-  }
-}
+    },
+  },
+};
 </script>
 
 <style scoped>

+ 7 - 7
src/utils/request.js

@@ -18,7 +18,7 @@ const service = axios.create({
   // http://ruixuan.api.tjyourong.com.cn 线上
   // http://192.168.0.195:9003 测试
   // http://192.168.1.143:9003 西安
-  // http://192.168.1.148:9003 蒙蒙
+  // http://192.168.1.22:9003 蒙蒙
   baseURL: 'http://ruixuan.api.tjyourong.com.cn',
   // 超时
   timeout: 300000
@@ -97,15 +97,15 @@ service.interceptors.response.use(res => {
       });
     }
     return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
-  } 
-  else if (code === 500) {
+  }
+  else if (code === 500 || code === -1) {
     Message({
-      message: res.data.message,
+      message: res.data.message || res.data.msg,
       type: 'error'
     })
-    return Promise.reject(new Error(res.data.message))
-  } 
-  else if (code !== 200 && code !== 1) {
+    return Promise.reject(new Error(res.data.message || res.data.msg))
+  }
+  else if (code !== 200) {
     Notification.error({
       title: res.message
     })

+ 28 - 3
src/views/accountManagement/accountClaim.vue

@@ -54,6 +54,13 @@
           >搜索</el-button
         >
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button
+          icon="el-icon-refresh"
+          size="mini"
+          :loading="syncAccountsLoading"
+          @click="syncAccounts"
+          >同步账户</el-button
+        >
       </el-form-item>
     </el-form>
 
@@ -105,7 +112,11 @@
         fixed="right"
       >
         <template slot-scope="scope">
-          <el-button size="mini" type="text" @click="getAccount(scope.row)"
+          <el-button
+            size="mini"
+            type="text"
+            :disabled="scope.row.operatorName != '-'"
+            @click="getAccount(scope.row)"
             >认领</el-button
           >
           <el-button
@@ -141,7 +152,7 @@
         <el-form-item label="账户类型" prop="accountType">
           <el-radio-group v-model="form.accountType">
             <el-radio-button :label="1">自运营</el-radio-button>
-            <el-radio-button :label="2">运营</el-radio-button>
+            <el-radio-button :label="2">客户运营</el-radio-button>
           </el-radio-group>
         </el-form-item>
 
@@ -181,6 +192,7 @@ import {
   claimAccount,
   deleteClaimAccount,
   getAccountByProjectId,
+  syncAccounts,
 } from "@/api/accountManagement/accountManagement";
 import { listUser } from "@/api/system/user";
 import { ifError } from "assert";
@@ -189,6 +201,7 @@ export default {
   data() {
     return {
       dialogTableVisible: false,
+      syncAccountsLoading: false,
       logPage: {
         pageNum: 1,
         pageSize: 10,
@@ -290,6 +303,18 @@ export default {
     });
   },
   methods: {
+    syncAccounts() {
+      this.syncAccountsLoading = true;
+      syncAccounts()
+        .then((res) => {
+          this.syncAccountsLoading = false;
+          this.$message.success("同步成功");
+          this.resetQuery();
+        })
+        .catch(() => {
+          this.syncAccountsLoading = false;
+        });
+    },
     listUser() {
       listUser({ pageNum: 1, pageSize: 10000 }).then((res) => {
         this.formList.personList = res.rows;
@@ -392,7 +417,7 @@ export default {
           claimAccount({ ...params }).then((res) => {
             this.open = false;
             this.confirmLoading = false;
-            this.resetQuery();
+            this.handleQuery();
           });
         }
       });

+ 9 - 1
src/views/accountManagement/advertiserList.vue

@@ -26,7 +26,15 @@
       </el-form-item>
     </el-form>
 
-    <el-row :gutter="10" class="mb8">
+    <el-row
+      :gutter="10"
+      class="mb8"
+      v-if="
+        $store.getters.roles[0] == 'operationsManager' ||
+        $store.getters.roles[0] == 'directorOperations' ||
+        $store.getters.roles[0] == 'admin'
+      "
+    >
       <el-col :span="1.5">
         <el-button
           type="primary"

+ 1 - 2
src/views/accountManagement/projectList.vue

@@ -331,7 +331,6 @@ export default {
       rules: {
         projectName: [{ required: true, message: "项目名称必填", trigger: "blur" }],
         saleId: [{ required: true, message: "请选择销售", trigger: "change" }],
-        operatorId: [{ required: true, message: "请选择运营", trigger: "change" }],
         advertiserId: [{ required: true, message: "请选择广告主", trigger: "change" }],
         ocpxActionType: [
           { required: true, message: "请选择转化目标", trigger: "change" },
@@ -497,7 +496,7 @@ export default {
     /** 删除按钮 */
     handleDelete(item) {
       this.$modal
-        .confirm(`请确认是否删除此项目?`)
+        .confirm(`请确认是否删除此项目?删除会同时删除项目下账户`)
         .then(() => {
           var params = {};
           params.id = item.id;

+ 1 - 0
src/views/goodsManagement/collectSample.vue

@@ -310,6 +310,7 @@
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
+      :pageSizes="[10, 20, 30, 50]"
     />
 
     <!-- 添加直播 -->

+ 1 - 0
src/views/goodsManagement/promoterSelect.vue

@@ -142,6 +142,7 @@
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
+      :pageSizes="[10, 20, 30, 50]"
     />
 
     <!-- 添加直播 -->

+ 87 - 11
src/views/goodsManagement/samplingList.vue

@@ -353,6 +353,7 @@
                       width: 100%;
                     "
                     :title="scope.row.promoterNickName"
+                    @click="toIndexDetails(scope.row)"
                   >
                     {{ scope.row.promoterNickName }}
                   </a>
@@ -367,6 +368,21 @@
             prop="collectSampleName"
             width="150"
           >
+            <template slot-scope="scope">
+              <div v-if="!!scope.row.collectSampleName">
+                {{ scope.row.collectSampleName }}
+                <a
+                  v-if="scope.row.sampleVoucherStatus == 2"
+                  style="text-align: center"
+                  @click="
+                    lookImageVisible = true;
+                    lookImage = scope.row.sampleVoucher;
+                  "
+                  >查看凭证</a
+                >
+              </div>
+              <div v-else>-</div>
+            </template>
           </el-table-column>
           <el-table-column
             label="商品创建人"
@@ -636,7 +652,11 @@
                   ids = scope.row.id;
                   showWork = scope.row.taskFileUrl;
                 "
-                v-if="queryParams.collectSampleStatus == '6'"
+                :disabled="!scope.row.taskFileUrl"
+                v-if="
+                  queryParams.collectSampleStatus == '6' ||
+                  queryParams.collectSampleStatus == '5'
+                "
                 >查看作业</el-button
               >
 
@@ -913,10 +933,11 @@
         slot="footer"
         class="dialog-footer"
         v-if="
-          $store.getters.roles[0] == 'admin' ||
-          $store.getters.roles[0] == 'supplyChainAdmin' ||
-          $store.getters.roles[0] == 'courtship' ||
-          $store.getters.roles[0] == 'courtshipManager'
+          ($store.getters.roles[0] == 'admin' ||
+            $store.getters.roles[0] == 'supplyChainAdmin' ||
+            $store.getters.roles[0] == 'courtship' ||
+            $store.getters.roles[0] == 'courtshipManager') &&
+          queryParams.collectSampleStatus == '6'
         "
       >
         <el-button type="primary" @click="workLookUpload" :loading="workLookLoading"
@@ -931,6 +952,21 @@
         >
       </div>
     </el-dialog>
+
+    <!-- 查看凭证 -->
+    <el-dialog
+      title="查看凭证"
+      :visible.sync="lookImageVisible"
+      width="500px"
+      append-to-body
+      :close-on-click-modal="false"
+      @before-close="
+        lookImageVisible = false;
+        lookImage = undefined;
+      "
+    >
+      <img :src="lookImage" style="width: 100%; height: auto" alt="" />
+    </el-dialog>
   </div>
 </template>
 
@@ -979,6 +1015,8 @@ export default {
       }
     };
     return {
+      lookImageVisible: false,
+      lookImage: undefined,
       noticeContent: "",
       workVisible: false,
       workLookVisible: false,
@@ -1092,9 +1130,18 @@ export default {
   },
   activated() {
     this.$nextTick(() => {
+      if (this.$route && this.$route.query.promoterId) {
+        this.$set(this.queryParams, "promoterId", this.$route.query.promoterId);
+      } else {
+        this.$set(this.queryParams, "promoterId", undefined);
+      }
       this.getPersonList();
       if (localStorage.getItem("samplingType")) {
-        this.queryParams.collectSampleStatus = localStorage.getItem("samplingType");
+        this.$set(
+          this.queryParams,
+          "collectSampleStatus",
+          localStorage.getItem("samplingType")
+        );
       } else {
         // this.queryParams.collectSampleStatus = "1";
       }
@@ -1104,9 +1151,18 @@ export default {
   created() {
     this.userId = this.$store.getters.userId;
     this.getPersonList();
+    if (this.$route && this.$route.query.promoterId) {
+      this.$set(this.queryParams, "promoterId", this.$route.query.promoterId);
+    } else {
+      this.$set(this.queryParams, "promoterId", undefined);
+    }
     this.$nextTick(() => {
       if (localStorage.getItem("samplingType")) {
-        this.queryParams.collectSampleStatus = localStorage.getItem("samplingType");
+        this.$set(
+          this.queryParams,
+          "collectSampleStatus",
+          localStorage.getItem("samplingType")
+        );
       } else {
         // this.queryParams.collectSampleStatus = "1";
       }
@@ -1138,6 +1194,24 @@ export default {
     },
   },
   methods: {
+    toIndexDetails(item) {
+      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;
+      this.$router.replace({
+        path: "/supplyChain/indexDetails",
+        query: {
+          id: item.promoterId,
+          name: item.promoterNickName,
+          orderStartDate: `${y}-${MM}-${dd}`,
+          orderEndDate: `${y}-${MM}-${dd}`,
+        },
+      });
+    },
     getRowKeys(row) {
       return row.id;
     },
@@ -1168,13 +1242,15 @@ export default {
     copyInfomation(item) {
       copyInfo({ promoterId: item.promoterId }).then((res) => {
         if (navigator.clipboard && window.isSecureContext) {
+          //           粉丝量: ${res.data.fansNumber}
+          // 总销售额: ${res.data.totalSale}
           navigator.clipboard
             .writeText(
               `
+商品标题: ${item.itemTitle}
+领样备注: ${item.sampleRequirement}
 快手ID: ${item.promoterId}
 快手昵称: ${item.promoterNickName}
-粉丝量: ${res.data.fansNumber}
-总销售额: ${res.data.totalSale}
 收件人: ${item.consignee}
 手机号: ${item.promoterPhone}
 地址: ${item.promoterAddress}
@@ -1190,10 +1266,10 @@ export default {
           // 创建text area
           const textArea = document.createElement("textarea");
           textArea.value = `
+商品标题: ${item.itemTitle}
+领样备注: ${item.sampleRequirement}
 快手ID: ${item.promoterId}
 快手昵称: ${item.promoterNickName}
-粉丝量: ${res.data.fansNumber}
-总销售额: ${res.data.totalSale}
 收件人: ${item.consignee}
 手机号: ${item.promoterPhone}
 地址: ${item.promoterAddress}

+ 67 - 29
src/views/goodsManagement/setSampleCollection.vue

@@ -85,7 +85,7 @@
       <el-table-column label="达人信息" align="center" prop="consignee" width="350px">
         <template slot-scope="scope">
           <div style="width: 100%" class="item-name-calss">
-            <p style="margin-bottom:5px">
+            <p style="margin-bottom: 5px">
               收货人:
 
               <span v-if="!scope.row.consigneeEdit">{{ scope.row.consignee }}</span>
@@ -102,7 +102,7 @@
               ></a>
             </p>
 
-            <p style="margin-bottom:5px">
+            <p style="margin-bottom: 5px">
               手机号:
 
               <span v-if="!scope.row.promoterPhoneEdit">{{
@@ -120,7 +120,7 @@
                 style="color: deepskyblue; margin-left: 10px; display: inline"
               ></a>
             </p>
-            <p style="margin-bottom:5px">
+            <p style="margin-bottom: 5px">
               地址:
 
               <span v-if="!scope.row.promoterAddressEdit">{{
@@ -214,6 +214,16 @@
           <el-button size="mini" type="text" @click="copyInfomation(scope.row)"
             >一键同步</el-button
           >
+          <el-button
+            size="mini"
+            type="text"
+            @click="
+              workVisible = true;
+              noticeContent = '';
+              ids = `${scope.row.itemId + '-' + scope.row.promoterId}`;
+            "
+            >上传凭证</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
@@ -407,6 +417,36 @@
         >
       </div>
     </el-dialog>
+
+    <!-- 上传作业 -->
+    <el-dialog
+      title="上传"
+      :visible.sync="workVisible"
+      width="500px"
+      append-to-body
+      :close-on-click-modal="false"
+    >
+      <!-- <uploadEditor
+        v-model="noticeContent"
+        style="min-height: 100px"
+        v-if="workVisible"
+      /> -->
+
+      <uploadCvImageVue ref="fileUpload" :multiple="false" />
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="workUpload" :loading="workLoading"
+          >确 定</el-button
+        >
+        <el-button
+          @click="
+            workLoading = false;
+            workVisible = false;
+            noticeContent = '';
+          "
+          >取 消</el-button
+        >
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -422,10 +462,14 @@ import {
   addPreview,
 } from "@/api/goodsManagement/goods";
 import selectTree from "./selectTree.vue";
+import uploadEditor from "./uploadEditor.vue";
+import uploadCvImageVue from "./uploadCvImage.vue";
 export default {
   name: "account-list",
   components: {
+    uploadEditor,
     selectTree,
+    uploadCvImageVue,
   },
   data() {
     const equalToPassword = (rule, value, callback) => {
@@ -442,6 +486,15 @@ export default {
       }
     };
     return {
+      api: "",
+      limit: 2,
+      fileList: [],
+      dialogImageUrl: "",
+      dialogVisible: false,
+
+      workVisible: false,
+      workLoading: false,
+      noticeContent: undefined,
       // 遮罩层
       loading: true,
       loadingAdd: false,
@@ -597,6 +650,16 @@ export default {
     },
   },
   methods: {
+    workUpload() {
+      var index = this.typeList.findIndex((item) => {
+        return this.ids == item.itemId + "-" + item.promoterId;
+      });
+      this.typeList[index].sampleVoucher = this.$refs.fileUpload.fileList[0].url
+      // console.log(index);
+      // console.log(this.$refs.fileUpload.fileList)
+      // console.log(this.typeList)
+      this.workVisible = false
+    },
     handleSelectionChange(selection) {
       this.okIds = selection.map((item) => item.itemId + "-" + item.promoterId);
     },
@@ -722,6 +785,7 @@ export default {
               consigneeEdit: false,
               promoterPhoneEdit: false,
               promoterAddressEdit: false,
+              sampleVoucher:undefined,
             };
           });
           this.sampleReceivedCount = response.preview.sampleReceivedCount;
@@ -802,32 +866,6 @@ export default {
       //     this.$refs.formBroadcast.clearValidate();
       //   }, 0);
     },
-    /** 编辑地址 新增达人*/
-    handleAddbroadcast(item) {
-      this.getAreaList();
-      this.$nextTick(() => {
-        this.ids = item.itemId;
-        this.edit = true;
-        this.openAllocation = true;
-        this.$set(this.formBroadcast, "activityId", item.activityId);
-        this.$set(this.formBroadcast, "itemId", item.itemId);
-        this.$set(this.formBroadcast, "postArea", item.postArea);
-        this.$set(this.formBroadcast, "noPostArea", item.noPostArea);
-        this.$set(this.formBroadcast, "commissionRate", item.commissionRate);
-
-        this.$set(this.formBroadcast, "regimentalPromotion", item.regimentalPromotion);
-        this.$set(
-          this.formBroadcast,
-          "regimentalPromotionRate",
-          item.regimentalPromotionRate
-        );
-        this.$set(this.formBroadcast, "sampleRequirement", item.sampleRequirement);
-        this.$set(this.formBroadcast, "sampleCount", item.sampleCount);
-        this.$set(this.formBroadcast, "detailUrl", item.detailUrl);
-        this.$set(this.formBroadcast, "deliveryRate", item.deliveryRate);
-        this.$set(this.formBroadcast, "partnerRecommendText", item.partnerRecommendText);
-      });
-    },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();

+ 353 - 0
src/views/goodsManagement/uploadCvImage.vue

@@ -0,0 +1,353 @@
+<template>
+  <div class="upload-file">
+    <div v-if="uploadType == 'image'">
+      <el-upload
+        action="#"
+        :list-type="listType"
+        :auto-upload="true"
+        :accept="accept"
+        :before-upload="beforeUpload"
+        :multiple="multiple"
+        :file-list="fileList"
+        :on-remove="handleRemove"
+        ref="uploadMutiple"
+      >
+        <i slot="default" class="el-icon-plus"></i>
+        <div slot="file" slot-scope="{ file }">
+          <img class="el-upload-list__item-thumbnail" :src="file.url" alt="" />
+          <span class="el-upload-list__item-actions">
+            <span
+              class="el-upload-list__item-preview"
+              @click="handlePictureCardPreview(file)"
+            >
+              <i class="el-icon-zoom-in"></i>
+            </span>
+            <span class="el-upload-list__item-delete" @click="handleRemove(file)">
+              <i class="el-icon-delete"></i>
+            </span>
+          </span>
+        </div>
+        <div class="el-upload__tip" slot="tip">只能上传jpg/jpeg/png文件</div>
+      </el-upload>
+      <div id="preview" @paste="handlePaste" style="margin-top:15px;cursor:pointer">
+        <span
+          ><i class="el-icon-s-opportunity" style="color: #fb894c"></i>点击此处
+          将图片按Ctrl+V 粘贴至此处</span
+        >
+      </div>
+    </div>
+    <div v-else-if="uploadType == 'all'">
+      <el-upload
+        action="#"
+        :list-type="listType"
+        :auto-upload="true"
+        :accept="accept"
+        :before-upload="beforeUpload"
+        :multiple="multiple"
+        :file-list="fileList"
+        :on-remove="handleRemove"
+      >
+        <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
+        <div class="el-upload__tip" slot="tip">
+          只能上传.doc, .xls, .xlsx, .ppt, .pdf, .csv文件
+        </div>
+      </el-upload>
+    </div>
+
+    <el-dialog :visible.sync="dialogVisible">
+      <img width="100%" :src="dialogImageUrl" alt="" />
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+var COS = require("cos-js-sdk-v5");
+var cos = new COS({
+  SecretId: "AKIDE6IpMi8fJQRCg1iuWzFajjRs43kbbets",
+  SecretKey: "tXzuwMfplTTK3c9GFUyETilasvQfePu9",
+});
+var i = 0;
+const oneKB = 1024;
+
+function getBase64(file) {
+  return new Promise((resolve, reject) => {
+    const reader = new FileReader();
+    reader.readAsDataURL(file);
+    reader.onload = () => resolve(reader.result);
+    reader.onerror = (error) => reject(error);
+  });
+}
+export default {
+  name: "upload-file",
+  components: {},
+  props: {
+    uploadType: {
+      //上传类型  值为  image/video,同时目录名称也是这样
+      type: String,
+      default() {
+        return "image";
+      },
+    },
+    listType: {
+      //上传类型  值为  image/video,同时目录名称也是这样
+      type: String,
+      default() {
+        return "picture-card";
+      },
+    },
+
+    multiple: {
+      // true 可以批量上传  false 不可以
+      type: Boolean,
+      default() {
+        return true;
+      },
+    },
+    fileCount: {
+      //最大上传数量
+      type: Number,
+      default() {
+        return 10;
+      },
+    },
+    checkFile: {
+      //返回promise方法,判读文件是否上传过,进行上传拦截
+      type: Function,
+      default() {
+        return Promise.resolve();
+      },
+    },
+    // 文件类型, 例如['png', 'jpg', 'jpeg']
+    fileType: {
+      type: Array,
+      default: () => [
+        ".jpg",
+        ".jpeg",
+        ".png",
+        // ".doc",
+        // ".xls",
+        // ".xlsx",
+        // ".ppt",
+        // ".txt",
+        // ".pdf",
+        // ".csv",
+      ],
+    },
+    size: {
+      type: Number,
+      default() {
+        if (this.sizeCheck) {
+          if (this.uploadType == "image") {
+            return 2048;
+          } else {
+            return 102400;
+          }
+        }
+      },
+    },
+    sizeCheck: {
+      type: Boolean,
+      default() {
+        return true;
+      },
+    },
+    onOversize: {
+      type: Function,
+      default() {
+        alert(`请选择${this.size}KB内的文件!`);
+      },
+    },
+  },
+  data() {
+    return {
+      dialogImageUrl: "",
+      dialogVisible: false,
+      disabled: false,
+      fileList: [],
+      accept: "",
+    };
+  },
+  filters: {},
+  computed: {},
+  mounted() {
+    this.fileType.forEach((el) => {
+      this.accept += el;
+      this.accept += ",";
+    });
+  },
+  methods: {
+    handlePaste(event) {
+      const items = (event.clipboardData || window.clipboardData).items;
+      let file = null;
+      if (!items || items.length === 0) {
+        this.$message.error("当前浏览器不支持本地");
+        return;
+      }
+      // 搜索剪切板items
+      for (let i = 0; i < items.length; i++) {
+        if (items[i].type.indexOf("image") !== -1) {
+          file = items[i].getAsFile();
+          break;
+        }
+      }
+      if (!file) {
+        this.$message.error("粘贴内容非图片");
+        return;
+      }
+      if (this.fileList.length >= this.limit) {
+        this.$message.error(`上传文件数量不能超过 ${this.limit} 个!`); // 图片数量超出
+        return;
+      }
+      this.$refs.uploadMutiple.handleStart(file); // 将粘贴过来的图片加入预上传队列
+      this.$refs.uploadMutiple.submit(); // 提交图片上传队列
+    },
+
+    handleRemove(file, fileList) {
+      console.log(file, fileList);
+    },
+
+    handlePictureCardPreview(file) {
+      this.dialogImageUrl = file.url;
+      this.dialogVisible = true;
+    },
+
+    handleRemove(file) {
+      var index = this.fileList.findIndex((v) => v.url === file.url);
+      if (index > -1) {
+        this.fileList.splice(index, 1);
+      }
+    },
+    handlePictureCardPreview(file) {
+      this.dialogImageUrl = file.url;
+
+      this.dialogVisible = true;
+    },
+    handleDownload(file) {
+      console.log(file);
+    },
+    handleCancel() {
+      closeAllVideoFun();
+      this.previewVisible = false;
+    },
+    handleChange(info) {
+      if (info.file.status === "uploading") {
+        this.loading = true;
+        return;
+      }
+      if (info.file.status === "done") {
+        // Get this url from response in real world.
+        getBase64(info.file.originFileObj, (imageUrl) => {
+          this.imageUrl = imageUrl;
+          this.loading = false;
+        });
+      }
+    },
+    async handlePreview(file) {
+      if (!file.url && !file.preview) {
+        file.preview = await getBase64(file.originFileObj);
+      }
+      this.previewImage = file.url || file.preview;
+      this.previewVisible = true;
+    },
+    beforeUpload(file) {
+      console.log(file);
+      if (!this.multiple && this.fileList.length == 1) {
+        this.$message.error("请删除之后再上传");
+        return;
+      }
+      this.cosUpload(file);
+      return false;
+    },
+    clearAll() {
+      this.fileList = [];
+    },
+    cosUpload(file) {
+      var that = this;
+      let date = new Date();
+      let y = date.getFullYear();
+      let MM = date.getMonth() + 1;
+      MM = MM < 10 ? "0" + MM : MM;
+      let d = date.getDate();
+      d = d < 10 ? "0" + d : d;
+      var timeElse = new Date().getTime();
+      var arr = file.name.split(".");
+
+      var str = "";
+      for (let i = 0; i < arr.length; i++) {
+        if (i == arr.length - 1) {
+        } else {
+          if (i == arr.length - 2) {
+            str += arr[i];
+          } else {
+            str += arr[i] + ".";
+          }
+        }
+      }
+      // console.log(str + '-' + timeElse + '.' + arr[arr.length - 1])
+      cos.putObject(
+        {
+          Bucket: "live-1301855440",
+          /* 必须 */
+          Region: "ap-chongqing",
+          /* 存储桶所在地域,必须字段 */
+          Key:
+            "CaoPanShou" +
+            "/" +
+            y +
+            MM +
+            d +
+            "/" +
+            str +
+            "-" +
+            timeElse +
+            "." +
+            arr[arr.length - 1],
+          /* 必须 */
+          StorageClass: "STANDARD",
+          Body: file, // 上传文件对象
+          onProgress: function (progressData) {
+            //进度条方法
+
+            that.percent = progressData.percent * 100;
+          },
+          onTaskReady: function (tid) {
+            // console.log('onTaskReady', tid);
+          },
+          onTaskStart: function (info) {
+            //开始上传
+            // console.log('onTaskStart', info);
+          },
+        },
+        function (err, data) {
+          if (err) {
+            that.loadingElse = false;
+            that.$message.error("上传失败!!!" + err);
+            return;
+          }
+          // alert('成功')
+          that.loadingElse = false;
+          if (that.multiple) {
+            that.fileList.push({
+              uid: file.name,
+              name: file.name,
+              status: "done",
+              url: "//" + data.Location,
+            });
+          } else {
+            that.fileList = [
+              {
+                uid: file.name,
+                name: file.name,
+                status: "done",
+                url: "//" + data.Location,
+              },
+            ];
+          }
+
+          console.log(that.fileList);
+        }
+      );
+    },
+  },
+};
+</script>

+ 13 - 5
src/views/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <div v-if="showOld">
+    <div v-if="showOld == 1">
       <div style="margin-bottom: 15px">
         <el-date-picker
           v-model="uploadDate"
@@ -362,7 +362,8 @@
       </el-row>
     </div>
 
-    <staging v-else />
+    <staging v-else-if="showOld == 2" />
+    <operationHome v-else-if="showOld == 3" />
   </div>
 </template>
 
@@ -377,15 +378,17 @@ import {
   getTimeRatio, //时间段对比
 } from "@/api/index";
 import staging from "./staging.vue";
+import operationHome from "./report/operationHome.vue";
 var echarts = require("echarts");
 export default {
   name: "Index",
   components: {
     staging,
+    operationHome,
   },
   data() {
     return {
-      showOld: false,
+      showOld: 1,
       // 遮罩层
       loading: true,
       // 选中数组
@@ -548,8 +551,13 @@ export default {
       this.$store.getters.roles[0] == "association" ||
       this.$store.getters.roles[0] == "associationManager" ||
       this.$store.getters.roles[0] == "supplyChainAdmin"
-        ? false
-        : true;
+        ? 2
+        : this.$store.getters.roles[0] == "operations" ||
+          this.$store.getters.roles[0] == "operationsManager" ||
+          this.$store.getters.roles[0] == "directorOperations" ||
+          this.$store.getters.roles[0] == "operator"
+        ? 3
+        : 1;
   },
   mounted() {
     if (this.showOld) {

+ 2 - 2
src/views/policy/index.vue

@@ -266,7 +266,7 @@
       >
         <template slot-scope="scope">
           <div>
-            {{ scope.row.promotionType == "0" ? "自运营" : "运营" }}
+            {{ scope.row.promotionType == "0" ? "自运营" : "客户运营" }}
           </div>
         </template>
       </el-table-column>
@@ -448,7 +448,7 @@
             >
               <el-radio-group v-model="form.promotionType">
                 <el-radio-button label="0">自运营</el-radio-button>
-                <el-radio-button label="1">运营</el-radio-button>
+                <el-radio-button label="1">客户运营</el-radio-button>
               </el-radio-group>
             </el-form-item>
           </div>

+ 259 - 101
src/views/promoter/promoterDetail.vue

@@ -35,15 +35,11 @@
 }
 </style>
 <template>
-  <div class="app-container" id="loading" v-loading="loading" style="min-height:600px">
+  <div class="app-container" id="loading" v-loading="loading" style="min-height: 600px">
     <el-card v-if="detailData">
       <div style="display: flex; width: 500px; margin-bottom: 30px">
         <div style="margin-right: 30px">
-          <img
-            :src="detailData.promoterUrl"
-            alt=""
-            style="width: 100px; height: auto"
-          />
+          <img :src="detailData.promoterUrl" alt="" style="width: 100px; height: auto" />
         </div>
         <div style="width: 60%" class="item-name-calss">
           <a
@@ -78,18 +74,9 @@
           <el-card shadow="never" class="card-show">
             <h4><span class="prefix"></span>热销类目</h4>
             <el-table :data="dataList.hotSaleChannelInfo">
-              <el-table-column
-                label="类目"
-                align="center"
-                prop="hotSaleChannelName"
-              >
+              <el-table-column label="类目" align="center" prop="hotSaleChannelName">
               </el-table-column>
-              <el-table-column
-                label="均价"
-                align="center"
-                prop="avgPrice"
-                width="55"
-              >
+              <el-table-column label="均价" align="center" prop="avgPrice" width="55">
               </el-table-column>
               <el-table-column label="销售额" align="center" prop="avgGmv">
               </el-table-column>
@@ -106,11 +93,7 @@
           <el-card shadow="never" class="card-show">
             <h4><span class="prefix"></span>热销品牌</h4>
             <el-table :data="dataList.hotSaleBrandInfo">
-              <el-table-column
-                label="品牌"
-                align="center"
-                prop="hotSaleBrandTitle"
-              >
+              <el-table-column label="品牌" align="center" prop="hotSaleBrandTitle">
               </el-table-column>
               <el-table-column label="均价" align="center" prop="avgPrice">
               </el-table-column>
@@ -143,73 +126,49 @@
         <div style="width: 49%">
           <el-row class="top-sum" :gutter="15">
             <el-col :span="6">
-              <div
-                style="width: 100%; height: 100px"
-                class="item-name-calss dh-data"
-              >
+              <div style="width: 100%; height: 100px" class="item-name-calss dh-data">
                 <p>直播次数</p>
                 <p>{{ dataList.promoteLiveCount }}</p>
               </div>
             </el-col>
             <el-col :span="6">
-              <div
-                style="width: 100%; height: 100px"
-                class="item-name-calss dh-data"
-              >
+              <div style="width: 100%; height: 100px" class="item-name-calss dh-data">
                 <p>场均销售额</p>
                 <p>{{ dataList.liveStreamGMV }}</p>
               </div>
             </el-col>
             <el-col :span="6">
-              <div
-                style="width: 100%; height: 100px"
-                class="item-name-calss dh-data"
-              >
+              <div style="width: 100%; height: 100px" class="item-name-calss dh-data">
                 <p>进入直播间人数</p>
                 <p>{{ dataList.liveStreamVisitorCount }}</p>
               </div>
             </el-col>
             <el-col :span="6">
-              <div
-                style="width: 100%; height: 100px"
-                class="item-name-calss dh-data"
-              >
+              <div style="width: 100%; height: 100px" class="item-name-calss dh-data">
                 <p>直播GPM</p>
                 <p>{{ dataList.liveStreamGPM }}</p>
               </div>
             </el-col>
             <el-col :span="6">
-              <div
-                style="width: 100%; height: 100px"
-                class="item-name-calss dh-data"
-              >
+              <div style="width: 100%; height: 100px" class="item-name-calss dh-data">
                 <p>平均在线人数</p>
                 <p>{{ dataList.avgVisitorOnlineCount }}</p>
               </div>
             </el-col>
             <el-col :span="6">
-              <div
-                style="width: 100%; height: 100px"
-                class="item-name-calss dh-data"
-              >
+              <div style="width: 100%; height: 100px" class="item-name-calss dh-data">
                 <p>在线人数峰值</p>
                 <p>{{ dataList.maxSameTimeVisitorCount }}</p>
               </div></el-col
             >
             <el-col :span="6">
-              <div
-                style="width: 100%; height: 100px"
-                class="item-name-calss dh-data"
-              >
+              <div style="width: 100%; height: 100px" class="item-name-calss dh-data">
                 <p>人均观看时长</p>
                 <p>{{ dataList.avgViewTime }}</p>
               </div></el-col
             >
             <el-col :span="6">
-              <div
-                style="width: 100%; height: 100px"
-                class="item-name-calss dh-data"
-              >
+              <div style="width: 100%; height: 100px" class="item-name-calss dh-data">
                 <p>互动率</p>
                 <p>{{ dataList.interactionRate }}</p>
               </div>
@@ -217,11 +176,7 @@
           </el-row>
         </div>
         <div style="width: 49%">
-          <div
-            id="echart"
-            ref="echart"
-            style="height: 250px; width: 100%"
-          ></div>
+          <div id="echart" ref="echart" style="height: 250px; width: 100%"></div>
         </div>
       </div>
     </el-card>
@@ -245,55 +200,37 @@
         <div style="width: 49%">
           <el-row class="top-sum" :gutter="15">
             <el-col :span="6">
-              <div
-                style="width: 100%; height: 100px"
-                class="item-name-calss dh-data"
-              >
+              <div style="width: 100%; height: 100px" class="item-name-calss dh-data">
                 <p>视频数量</p>
                 <p>{{ dataList.videoCount }}</p>
               </div>
             </el-col>
             <el-col :span="6">
-              <div
-                style="width: 100%; height: 100px"
-                class="item-name-calss dh-data"
-              >
+              <div style="width: 100%; height: 100px" class="item-name-calss dh-data">
                 <p>视频播放量</p>
                 <p>{{ dataList.videoWatchCount }}</p>
               </div>
             </el-col>
             <el-col :span="6">
-              <div
-                style="width: 100%; height: 100px"
-                class="item-name-calss dh-data"
-              >
+              <div style="width: 100%; height: 100px" class="item-name-calss dh-data">
                 <p>带货视频销售额</p>
                 <p>{{ dataList.totalSale }}</p>
               </div>
             </el-col>
             <el-col :span="6">
-              <div
-                style="width: 100%; height: 100px"
-                class="item-name-calss dh-data"
-              >
+              <div style="width: 100%; height: 100px" class="item-name-calss dh-data">
                 <p>视频GPM</p>
                 <p>{{ dataList.videoGPM }}</p>
               </div>
             </el-col>
             <el-col :span="6">
-              <div
-                style="width: 100%; height: 100px"
-                class="item-name-calss dh-data"
-              >
+              <div style="width: 100%; height: 100px" class="item-name-calss dh-data">
                 <p>单视频平均销售额</p>
                 <p>{{ dataList.avgVideoSales }}</p>
               </div>
             </el-col>
             <el-col :span="6">
-              <div
-                style="width: 100%; height: 100px"
-                class="item-name-calss dh-data"
-              >
+              <div style="width: 100%; height: 100px" class="item-name-calss dh-data">
                 <p>单视频平均观看人数</p>
                 <p>{{ dataList.avgVideoViewers }}</p>
               </div></el-col
@@ -303,11 +240,7 @@
           </el-row>
         </div>
         <div style="width: 49%">
-          <div
-            id="echartDsp"
-            ref="echartDsp"
-            style="height: 250px; width: 100%"
-          ></div>
+          <div id="echartDsp" ref="echartDsp" style="height: 250px; width: 100%"></div>
         </div>
       </div>
     </el-card>
@@ -321,11 +254,134 @@
         >{{ item.name }}/{{ item.roi }}</el-tag
       >
     </el-card>
+    <el-card v-if="promoterLabelList" style="margin-top: 20px">
+      <h4>
+        <span class="prefix"></span>达人标签
+
+        <a
+          v-if="$store.getters.userId == detailData.userId"
+          style="display: inline-block; margin-left: 15px"
+          @click="getLabelList"
+          >编辑</a
+        >
+      </h4>
+
+      <el-tag
+        v-for="(item, index) in promoterLabelList"
+        :key="index"
+        style="margin: 10px; color: black"
+        :color="'#' + item.labelColour"
+        >{{ item.labelName }}</el-tag
+      >
+    </el-card>
+    <el-card style="margin-top: 20px">
+      <h4>
+        <span class="prefix"></span>跟进记录
+
+        <a
+          v-if="$store.getters.userId == detailData.userId&&followUpRecord"
+          :class="!editDesc ? 'el-icon-edit' : 'el-icon-check'"
+          @click="updateFollowUpRecords"
+          style="color: deepskyblue; margin-left: 10px; display: inline"
+        ></a>
+      </h4>
+      <div
+        style="width: 100%; margin-bottom: 15px"
+        class="item-name-calss dh-data"
+        v-if="followUpRecord"
+      >
+        <!-- {{ itemInfo.partnerRecommendText }} -->
+        <p v-if="!editDesc" v-html="followUpRecord.txt"></p>
+        <el-input
+          v-else
+          type="textarea"
+          :rows="2"
+          v-model="followUpRecord.txt"
+          placeholder="请输入内容"
+          style="width: 100%"
+          minlength="5"
+        ></el-input>
+      </div>
+
+      <el-timeline :reverse="false" v-if="historyFollowUpRecord">
+        <el-timeline-item
+          v-for="(activity, index) in historyFollowUpRecord"
+          :key="index"
+          :timestamp="activity.updateTime.split('T').join(' ') + ' ' + activity.userName"
+        >
+          {{ activity.txt }}
+        </el-timeline-item>
+      </el-timeline>
+    </el-card>
+
+    <el-dialog
+      title="添加标签"
+      :visible.sync="openAllocation"
+      width="800px"
+      append-to-body
+      :close-on-click-modal="false"
+    >
+      <el-form
+        ref="formBroadcast"
+        :model="formBroadcast"
+        label-width="100px"
+        :inline="true"
+      >
+        <el-form-item label="标签" prop="labelId" style="width: 100%" class="entire-line">
+          <el-select
+            v-model="formBroadcast.labelId"
+            filterable
+            allow-create
+            default-first-option
+            placeholder="请选择标签"
+            @change="selectLabel"
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value + '@' + item.label + '@' + item.labelColour"
+            >
+            </el-option> </el-select
+          ><br />
+          <el-tag
+            v-for="(item, index) in tagList"
+            :color="'#' + item.color"
+            :key="index"
+            style="margin: 10px 10px 10px 0; color: black"
+            size="medium"
+            closable
+            @close="handleClose(item)"
+            >{{ item.label }}</el-tag
+          >
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFormBroadcast" :loading="confirmLoading"
+          >确 定</el-button
+        >
+        <el-button
+          @click="
+            confirmLoading = false;
+            openAllocation = false;
+            formBroadcast = {};
+          "
+          >取 消</el-button
+        >
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
 import { getPromoterDetail } from "@/api/promoter/promoter";
+import {
+  addLabel,
+  getLabelList,
+  deleteLabelById,
+  updatePromoterLabel,
+  updateFollowUpRecords,
+} from "@/api/label";
 import { Loading } from "element-ui";
 var echarts = require("echarts");
 export default {
@@ -333,6 +389,10 @@ export default {
   dicts: ["sys_normal_disable"],
   data() {
     return {
+      options: [],
+      tagList: [],
+      formBroadcast: {},
+      editDesc: false,
       downLoadLoading: false,
       dialogTableVisible: false,
       logPage: {
@@ -369,7 +429,7 @@ export default {
       // 销售列表
       saleList: [],
       // 分配销售确定loading
-      confirmLoadingSale: false,
+      confirmLoading: false,
       // 日期范围
       dateRange: [],
       // 查询参数
@@ -388,6 +448,9 @@ export default {
       dataList: null,
       zbType: "liveVisitorCount",
       dspType: "videoWatchCount",
+      promoterLabelList: [],
+      followUpRecord: undefined,
+      historyFollowUpRecord: [],
     };
   },
   created() {
@@ -403,13 +466,22 @@ export default {
   },
   methods: {
     getItemDetail() {
-      this.loading = true
+      this.loading = true;
       getPromoterDetail({
         id: this.$route.query.id,
       }).then((response) => {
-        this.loading = false
+        this.loading = false;
         this.detailData = response.data.promoterInfo;
         this.dataList = response.data.result;
+        this.promoterLabelList = response.data.promoterLabelList
+          ? response.data.promoterLabelList
+          : [];
+        this.followUpRecord = response.data.followUpRecord
+          ? response.data.followUpRecord
+          : undefined;
+        this.historyFollowUpRecord = response.data.historyFollowUpRecord
+          ? response.data.historyFollowUpRecord
+          : [];
         this.$nextTick(() => {
           this.initEchart(
             "echart",
@@ -417,11 +489,7 @@ export default {
           );
           this.initEchart(
             "echartDsp",
-            this.handlerEchartOption(
-              this.dataList.shortVideosInfo,
-              this.dspType,
-              "dsp"
-            )
+            this.handlerEchartOption(this.dataList.shortVideosInfo, this.dspType, "dsp")
           );
         });
       });
@@ -445,11 +513,7 @@ export default {
       if (!!e) {
         this.initEchart(
           "echartDsp",
-          this.handlerEchartOption(
-            this.dataList.shortVideosInfo,
-            this.dspType,
-            "dsp"
-          )
+          this.handlerEchartOption(this.dataList.shortVideosInfo, this.dspType, "dsp")
         );
       } else {
         this.$message({
@@ -648,6 +712,100 @@ export default {
     handleSelectionChange(selection) {
       this.ids = selection.map((item) => item.id);
     },
+    handleClose(item) {
+      var index = this.tagList.findIndex((v) => v.value == item.value);
+      this.tagList.splice(index, 1);
+    },
+    getLabelList() {
+      this.openAllocation = true;
+      getLabelList({ pageNum: 1, pageSize: 1000 }).then((res) => {
+        this.options = res.rows.map((item) => {
+          return {
+            ...item,
+            value: item.id,
+            label: item.labelName,
+          };
+        });
+        this.tagList = this.promoterLabelList.map((item) => {
+          return {
+            value: item.labelId,
+            label: item.labelName,
+            color: item.labelColour,
+          };
+        });
+      });
+    },
+    selectLabel(value) {
+      if (value.split("@").length > 1) {
+        var index = this.tagList.findIndex((item) => item.value == value.split("@")[0]);
+        if (index > -1) {
+        } else {
+          this.tagList.push({
+            value: value.split("@")[0],
+            label: value.split("@")[1],
+            color: value.split("@")[2],
+          });
+        }
+
+        this.$set(this.formBroadcast, "labelId", undefined);
+      } else {
+        addLabel({
+          labelLevel: "1",
+          labelName: value,
+          labelType: "1",
+        }).then((res) => {
+          this.tagList.push({
+            value: res.result.id,
+            label: res.result.labelName,
+            color: res.result.labelColour,
+          });
+          getLabelList({ pageNum: 1, pageSize: 1000 }).then((res) => {
+            this.options = res.rows.map((item) => {
+              return {
+                ...item,
+                value: item.id,
+                label: item.labelName,
+              };
+            });
+          });
+          this.$set(this.formBroadcast, "labelId", undefined);
+        });
+      }
+    },
+    submitFormBroadcast: function () {
+      this.$refs["formBroadcast"].validate((valid) => {
+        if (valid) {
+          this.confirmLoading = true;
+
+          updatePromoterLabel({
+            promoterId: this.detailData.promoterId,
+            userId: this.detailData.userId,
+            ids: this.tagList.map((item) => {
+              return item.value;
+            }),
+          }).then((res) => {
+            this.getItemDetail();
+            this.confirmLoading = false;
+            this.openAllocation = false;
+          });
+        }
+      });
+    },
+    updateFollowUpRecords() {
+      if (!this.editDesc) {
+        this.editDesc = true;
+      } else {
+        updateFollowUpRecords({
+          promoterId: this.detailData.promoterId,
+          userId: this.detailData.userId,
+          txt: this.followUpRecord.txt,
+          id: this.followUpRecord.id,
+        }).then((res) => {
+          this.editDesc = false;
+          this.$message.success("修改成功");
+        });
+      }
+    },
   },
 };
 </script>

+ 130 - 55
src/views/promoter/promoterList.vue

@@ -88,13 +88,15 @@
           </div>
         </template>
       </el-table-column>
-      <el-table-column label="粉丝数" align="center" prop="fansNumber"> </el-table-column>
+      <el-table-column label="粉丝数" align="center" prop="fansNumber" width="100px">
+      </el-table-column>
 
       <el-table-column
         label="单视频销售额"
         align="center"
         prop="avgVideoSales"
         sortable="custom"
+        width="150px"
       >
         <template slot-scope="scope">
           <div v-if="!!scope.row.avgVideoSales">
@@ -108,6 +110,7 @@
         align="center"
         prop="videoSales"
         sortable="custom"
+        width="150px"
       >
         <template slot-scope="scope">
           <div v-if="!!scope.row.videoSales">
@@ -121,6 +124,7 @@
         align="center"
         prop="monthDayGmv"
         sortable="custom"
+        width="150px"
       >
         <template slot-scope="scope">
           <div v-if="!!scope.row.monthDayGmv">
@@ -134,6 +138,7 @@
         align="center"
         prop="monthDayOrderNum"
         sortable="custom"
+        width="150px"
       >
         <template slot-scope="scope">
           <div v-if="!!scope.row.monthDayOrderNum">
@@ -143,7 +148,13 @@
         </template>
       </el-table-column>
 
-      <el-table-column label="总销售额" align="center" prop="totalSale">
+      <el-table-column
+        label="总销售额"
+        align="center"
+        prop="totalSale"
+        width="150px"
+        sortable="custom"
+      >
         <template slot-scope="scope">
           <div v-if="!!scope.row.totalSale">
             {{ scope.row.totalSale }}
@@ -151,7 +162,7 @@
           <div v-else>-</div>
         </template>
       </el-table-column>
-      <el-table-column label="所属渠道" align="center" prop="userName">
+      <el-table-column label="所属渠道" align="center" prop="userName" width="150px">
         <template slot-scope="scope">
           <div v-if="!!scope.row.userName">
             {{ scope.row.userName }}
@@ -159,7 +170,12 @@
           <div v-else>-</div>
         </template>
       </el-table-column>
-      <el-table-column label="佣金要求" align="center" prop="commissionRequirement">
+      <el-table-column
+        label="佣金要求"
+        align="center"
+        prop="commissionRequirement"
+        width="150px"
+      >
         <template slot-scope="scope">
           <div v-if="!!scope.row.commissionRequirement">
             {{ scope.row.commissionRequirement }}
@@ -167,11 +183,53 @@
           <div v-else>-</div>
         </template>
       </el-table-column>
+      <el-table-column label="标签" align="center" prop="labels" width="200px">
+        <template slot-scope="scope">
+          <div v-if="!!scope.row.labels && scope.row.labels.length > 0">
+            <!-- {{
+              scope.row.labels
+                .map((item) => {
+                  return item.labelName;
+                })
+                .join()
+            }} -->
+            <el-tag
+              v-for="(item, index) in scope.row.labels"
+              :key="index"
+              style="margin: 5px; color: black"
+              :color="'#' + item.labelColour"
+              >{{ item.labelName }}</el-tag
+            >
+          </div>
+          <div v-else>-</div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="跟进记录"
+        align="center"
+        prop="followUpRecord"
+        width="200px"
+      >
+        <template slot-scope="scope">
+          <div
+            v-if="!!scope.row.followUpRecord"
+            style="
+              text-overflow: ellipsis;
+              white-space: nowrap;
+              overflow: hidden;
+              width: 100%;
+            "
+          >
+            {{ scope.row.followUpRecord }}
+          </div>
+          <div v-else>-</div>
+        </template>
+      </el-table-column>
       <el-table-column
         label="操作"
         align="center"
         class-name="small-padding fixed-width"
-        width="200px"
+        width="250px"
       >
         <template slot-scope="scope">
           <el-button
@@ -198,6 +256,13 @@
           <el-button size="mini" type="text" @click="copyInfomation(scope.row)"
             >复制</el-button
           >
+          <el-button
+            size="mini"
+            type="text"
+            :disabled="userId != scope.row.userId"
+            @click="whiteLog(scope.row)"
+            >跟进记录</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
@@ -371,6 +436,22 @@
         >
       </div>
     </el-dialog>
+
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-input type="textarea" :rows="3" placeholder="请输入内容" v-model="text">
+      </el-input>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm" :loading="loading">确 定</el-button>
+        <el-button
+          @click="
+            loading = false;
+            open = false;
+            text = undefined;
+          "
+          >取 消</el-button
+        >
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -382,6 +463,8 @@ import {
   editPromoter,
   deleteById,
 } from "@/api/promoter/promoter";
+import { addFollowUpRecords } from "@/api/label";
+import { join } from "path";
 export default {
   name: "account-list",
   components: {},
@@ -400,10 +483,14 @@ export default {
       callback();
     };
     return {
+      options: [],
+      tagList: [],
       // 遮罩层
-      loading: true,
+      loading: false,
+      text: undefined,
       // 选中数组
       ids: null,
+      userData:{},
       // 非单个禁用
       single: true,
       // 非多个禁用
@@ -492,6 +579,7 @@ export default {
       userId: null,
       prop: "",
       sort: "DESC",
+      promoterId: undefined,
     };
   },
   created() {
@@ -518,6 +606,8 @@ export default {
           ? "30day_gmv"
           : col.prop == "monthDayOrderNum"
           ? "30day_order_num"
+          : col.prop == "totalSale"
+          ? "total_sale"
           : "";
       this.sort = !!col.order ? (col.order == "descending" ? "DESC" : "ASC") : "DESC";
       this.handleQuery();
@@ -592,6 +682,8 @@ export default {
     /** 编辑地址 新增达人*/
     handleAddbroadcast(item) {
       this.ids = item.id;
+      this.userData.userId = item.userId
+      this.userData.userName = item.userName
       this.edit = true;
       this.openAllocation = true;
       this.$set(this.formBroadcast, "consignee", item.consignee);
@@ -600,6 +692,12 @@ export default {
       this.$set(this.formBroadcast, "promoterNickName", item.promoterNickName);
       this.$set(this.formBroadcast, "promoterId", item.promoterId);
     },
+    whiteLog(item) {
+      this.promoterId = item.promoterId;
+      this.ids = item.id;
+      this.open = true;
+      this.title = "跟进记录";
+    },
     copyInfomation(item) {
       if (navigator.clipboard && window.isSecureContext) {
         navigator.clipboard
@@ -640,6 +738,7 @@ export default {
         );
       }
     },
+
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
@@ -650,12 +749,13 @@ export default {
         if (valid) {
           this.confirmLoading = true;
           let formData = {
-            userId: this.userId,
-            userName: this.$store.getters.name,
+           
             ...this.formBroadcast,
           };
 
           if (!this.ids) {
+            formData.userId = this.userId
+            formData.userName = this.$store.getters.name
             addPromoter(formData)
               .then((res) => {
                 this.confirmLoading = false;
@@ -670,6 +770,8 @@ export default {
               });
           } else {
             formData.id = this.ids;
+            formData.userId = this.userData.userId;
+            formData.userName = this.userData.userName;
             editPromoter(formData)
               .then((res) => {
                 this.confirmLoading = false;
@@ -688,53 +790,26 @@ export default {
     },
     /** 提交按钮 */
     submitForm: function () {
-      this.$refs["form"].validate((valid) => {
-        if (valid) {
-          var fileList = this.$refs.fileUploadDialog.fileList;
-          var dapanUrls = this.$refs.fileUpload.fileList;
-          var portraitUrls = this.$refs.fileUploadFx.fileList;
-          if (fileList.length == 0 && dapanUrls.length == 0 && portraitUrls.length == 0) {
-            this.$message.error("直播数据,数据大盘,画像分析必须最少上传一项");
-            return;
-          } else {
-            this.confirmLoading = true;
-            let formData = new FormData();
-            this.ids;
-            formData.append("id", this.ids);
-            formData.append("actualGmv", this.delcommafy(this.form.actualGmv));
-            formData.append(
-              "dapanUrls",
-              JSON.stringify(
-                dapanUrls.map((item) => {
-                  return item.url;
-                })
-              )
-            );
-            formData.append(
-              "portraitUrls",
-              JSON.stringify(
-                portraitUrls.map((item) => {
-                  return item.url;
-                })
-              )
-            );
-            fileList.forEach((file) => formData.append("files", file.raw));
-            dataUpload(formData)
-              .then((res) => {
-                this.confirmLoading = false;
-                this.$message.success("上传成功");
-                this.open = false;
-                this.ids = null;
-                this.cancel();
-                this.handleQuery();
-              })
-              .catch((err) => {
-                this.confirmLoading = false;
-              });
-          }
-          console.log(fileList, dapanUrls, portraitUrls);
-        }
-      });
+      if (!!this.text) {
+        this.loading = true;
+        addFollowUpRecords({
+          promoterId: this.promoterId,
+          userId: this.userId,
+          txt: this.text,
+        }).then((res) => {
+          this.open = false;
+          this.loading = false;
+          this.$message.success("添加成功");
+          this.ids = null;
+          this.text = undefined;
+          this.promoterId = undefined;
+          this.cancel();
+          this.handleQuery();
+        });
+      } else {
+        this.open = false;
+        this.loading = false;
+      }
     },
   },
 };

+ 30 - 25
src/views/promoter/promoterSeas.vue

@@ -24,10 +24,10 @@
         >
         </el-input>
       </el-form-item>
-      <!-- <el-form-item label="认领状态" prop="status">
+      <el-form-item label="认领状态" prop="status">
         <el-select
           v-model="queryParams.status"
-          placeholder="选择账户类型"
+          placeholder="选择认领状态"
           clearable
           style="width: 240px"
         >
@@ -38,7 +38,7 @@
             :value="item.value"
           />
         </el-select>
-      </el-form-item> -->
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
           >搜索</el-button
@@ -69,7 +69,6 @@
             </div>
             <div style="width: 60%" class="item-name-calss">
               <a
-                @click="toIndexDetail(scope.row)"
                 style="
                   text-overflow: ellipsis;
                   white-space: nowrap;
@@ -114,7 +113,7 @@
         </template>
       </el-table-column>
       <el-table-column
-        label="睿选gmv"
+        label="睿选近30天GMV"
         align="center"
         prop="monthDayGmv"
         sortable="custom"
@@ -127,7 +126,7 @@
         </template>
       </el-table-column>
       <el-table-column
-        label="睿选出单量"
+        label="睿选近30天出单量"
         align="center"
         prop="monthDayOrderNum"
         sortable="custom"
@@ -140,22 +139,27 @@
         </template>
       </el-table-column>
 
-      <el-table-column label="总销售额" align="center" prop="totalSale">
+      <el-table-column
+        label="睿选总销售额"
+        align="center"
+        prop="validAmount"
+        sortable="custom"
+      >
         <template slot-scope="scope">
-          <div v-if="!!scope.row.totalSale">
-            {{ scope.row.totalSale }}
+          <div v-if="!!scope.row.validAmount">
+            {{ allMoney(scope.row.validAmount / 100) }}
           </div>
           <div v-else>-</div>
         </template>
       </el-table-column>
-      <el-table-column label="所属渠道" align="center" prop="userName">
+      <!-- <el-table-column label="所属渠道" align="center" prop="userName">
         <template slot-scope="scope">
           <div v-if="!!scope.row.userName">
             {{ scope.row.userName }}
           </div>
           <div v-else>-</div>
         </template>
-      </el-table-column>
+      </el-table-column> -->
       <el-table-column label="佣金要求" align="center" prop="commissionRequirement">
         <template slot-scope="scope">
           <div v-if="!!scope.row.commissionRequirement">
@@ -164,8 +168,8 @@
           <div v-else>-</div>
         </template>
       </el-table-column>
-      <!-- <el-table-column label="认领记录" align="center" prop="userName"> </el-table-column> -->
-      <!-- <el-table-column label="操作" align="center" prop="action">
+      <el-table-column label="认领记录" align="center" prop="userName"> </el-table-column>
+      <el-table-column label="操作" align="center" prop="action">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -174,8 +178,11 @@
             @click="handleAddbroadcast(scope.row)"
             >认领</el-button
           >
+          <el-button size="mini" type="text" @click="updateOneData(scope.row)"
+            >更新</el-button
+          >
         </template>
-      </el-table-column> -->
+      </el-table-column>
     </el-table>
 
     <pagination
@@ -360,6 +367,7 @@ import {
   addPromoter,
   editPromoter,
   deleteById,
+  getGongHaiVideoSales,
 } from "@/api/promoter/promoter";
 export default {
   name: "account-list",
@@ -489,16 +497,8 @@ export default {
       });
     },
     sortChange(col, prop, order) {
-      this.prop =
-        col.prop == "avgVideoSales"
-          ? "avg_video_sales"
-          : col.prop == "videoSales"
-          ? "video_sales"
-          : col.prop == "monthDayGmv"
-          ? "30day_gmv"
-          : col.prop == "monthDayOrderNum"
-          ? "30day_order_num"
-          : "";
+      this.prop = col.prop;
+
       this.sort = !!col.order ? (col.order == "descending" ? "DESC" : "ASC") : "DESC";
       this.handleQuery();
     },
@@ -563,12 +563,17 @@ export default {
               this.handleQuery();
             })
             .catch(() => {
-              this.$message.error("失败");
               this.loading = false;
             });
         })
         .catch(() => {});
     },
+    updateOneData(item) {
+      getGongHaiVideoSales({ promoterId: item.promoterId }).then((res) => {
+        this.$modal.msgSuccess("更新成功");
+        this.getList();
+      });
+    },
     /** 编辑地址 新增达人*/
     handleAddbroadcast(item) {
       this.ids = item.id;

+ 20 - 12
src/views/report/operationHome.vue

@@ -4,7 +4,9 @@
       <el-col :span="6">
         <el-card shadow="never" class="card-show">
           <p class="p-title">今日消耗</p>
-          <p class="p-main">{{ allMoney(topInfo.costTotal) }}</p>
+          <p class="p-main">
+            {{ topInfo.costTotal ? allMoney(topInfo.costTotal / 10) : "-" }}
+          </p>
           <p class="p-main-data">
             日环比:<i :style="topInfo.costTotalRoi > 0 ? 'color:red' : 'color:green'"
               >{{ topInfo.costTotalRoi + "%" }}
@@ -33,7 +35,13 @@
       <el-col :span="6">
         <el-card shadow="never" class="card-show">
           <p class="p-title">自运营消耗</p>
-          <p class="p-main">{{ allMoney(topInfo.selfOperationCostTotal) }}</p>
+          <p class="p-main">
+            {{
+              topInfo.selfOperationCostTotal
+                ? allMoney(topInfo.selfOperationCostTotal / 10)
+                : "-"
+            }}
+          </p>
           <p class="p-main-data">
             日环比:<i
               :style="topInfo.selfOperationCostTotalRoi > 0 ? 'color:red' : 'color:green'"
@@ -72,12 +80,12 @@
         </el-table-column>
         <el-table-column label="消耗" align="center" prop="costTotal">
           <template slot-scope="scope">
-            {{ scope.row.costTotal ? allMoney(scope.row.costTotal) : "-" }}
+            {{ scope.row.costTotal ? allMoney(scope.row.costTotal / 10) : "-" }}
           </template>
         </el-table-column>
         <el-table-column label="ROI" align="center" prop="roi">
           <template slot-scope="scope">
-            {{ scope.row.roi ? scope.row.roi + "%" : "-" }}
+            {{ scope.row.roi ? scope.row.roi  : "-" }}
           </template>
         </el-table-column>
         <el-table-column label="ROI昨日对比" align="center" prop="rRoi">
@@ -119,17 +127,17 @@
         </el-table-column>
         <el-table-column label="消耗" align="center" prop="costTotal">
           <template slot-scope="scope">
-            {{ scope.row.costTotal ? allMoney(scope.row.costTotal) : "-" }}
+            {{ scope.row.costTotal ? allMoney(scope.row.costTotal / 10) : "-" }}
           </template>
         </el-table-column>
         <el-table-column label="人均消耗" align="center" prop="perCost">
           <template slot-scope="scope">
-            {{ scope.row.perCost ? allMoney(scope.row.perCost) : "-" }}
+            {{ scope.row.perCost ? allMoney(scope.row.perCost / 10) : "-" }}
           </template>
         </el-table-column>
         <el-table-column label="昨日消耗" align="center" prop="yesCostTotal">
           <template slot-scope="scope">
-            {{ scope.row.yesCostTotal ? allMoney(scope.row.yesCostTotal) : "-" }}
+            {{ scope.row.yesCostTotal ? allMoney(scope.row.yesCostTotal / 10) : "-" }}
           </template>
         </el-table-column>
 
@@ -166,13 +174,13 @@
         </el-table-column>
         <el-table-column label="消耗" align="center" prop="costTotal">
           <template slot-scope="scope">
-            {{ scope.row.costTotal ? allMoney(scope.row.costTotal) : "-" }}
+            {{ scope.row.costTotal ? allMoney(scope.row.costTotal / 10) : "-" }}
           </template>
         </el-table-column>
 
         <el-table-column label="平均账户消耗" align="center" prop="accountCost">
           <template slot-scope="scope">
-            {{ scope.row.accountCost ? allMoney(scope.row.accountCost) : "-" }}
+            {{ scope.row.accountCost ? allMoney(scope.row.accountCost / 10) : "-" }}
           </template>
         </el-table-column>
 
@@ -599,10 +607,10 @@ export default {
             symbol: "circle",
             data: data.todayInfo
               ? data.todayInfo.map((item) => {
-                  return item.costTotal;
+                  return (item.costTotal / 10).toFixed(2);
                 })
               : data.info.map((item) => {
-                  return item.costTotal;
+                  return (item.costTotal / 10).toFixed(2);
                 }),
             lineStyle: {
               color: "#00BFFF",
@@ -621,7 +629,7 @@ export default {
             symbol: "circle",
             data: data.yesterdayInfo
               ? data.yesterdayInfo.map((item) => {
-                  return item.costTotal;
+                  return (item.costTotal / 10).toFixed(2);
                 })
               : [],
             lineStyle: {

+ 16 - 14
src/views/report/statistics.vue

@@ -57,7 +57,7 @@
       <el-col :span="4">
         <el-card shadow="never" class="card-show">
           <p class="p-title">总消耗</p>
-          <p class="p-main">{{ allMoney(topInfo.costTotal) }}</p>
+          <p class="p-main">{{ allMoney(topInfo.costTotal / 10) }}</p>
           <p class="p-main-data">
             环比:<i :style="topInfo.costTotalRoi > 0 ? 'color:red' : 'color:green'"
               >{{ topInfo.costTotalRoi + "%" }}
@@ -68,7 +68,7 @@
       <el-col :span="4">
         <el-card shadow="never" class="card-show">
           <p class="p-title">当日累计GMV</p>
-          <p class="p-main">{{ topInfo.t0Gmv }}</p>
+          <p class="p-main">{{ allMoney(topInfo.t0Gmv / 10) }}</p>
           <p class="p-main-data">
             环比:<i :style="topInfo.t0GmvRoi > 0 ? 'color:red' : 'color:green'"
               >{{ topInfo.t0GmvRoi + "%" }}
@@ -90,7 +90,7 @@
       <el-col :span="4">
         <el-card shadow="never" class="card-show">
           <p class="p-title">场观成本</p>
-          <p class="p-main">{{ allMoney(topInfo.viewCost) }}</p>
+          <p class="p-main">{{ allMoney(topInfo.viewCost / 10) }}</p>
           <p class="p-main-data">
             环比:<i
               :style="topInfo.viewCostRoi > 0 ? 'color:red' : 'color:green'"
@@ -116,7 +116,7 @@
       <el-col :span="4">
         <el-card shadow="never" class="card-show">
           <p class="p-title">当日累计订单成本</p>
-          <p class="p-main">{{ allMoney(topInfo.orderCost) }}</p>
+          <p class="p-main">{{ allMoney(topInfo.orderCost / 10) }}</p>
           <p class="p-main-data">
             环比:<i
               :style="topInfo.orderCostRoi > 0 ? 'color:red' : 'color:green'"
@@ -172,7 +172,7 @@
                 item.name.indexOf('GMV') != -1
               "
             >
-              {{ scope.row[item.code] ? allMoney(scope.row[item.code]) : "-" }}
+              {{ scope.row[item.code] ? allMoney(scope.row[item.code] / 10) : "-" }}
             </span>
             <span v-else> {{ scope.row[item.code] ? scope.row[item.code] : "-" }}</span>
           </template>
@@ -450,7 +450,7 @@ export default {
         this.addDateRange(
           {
             userId: this.userId,
-            accountList: this.queryParams.accountId
+            accountIdList: this.queryParams.accountId
               ? this.queryParams.accountId.split(",")
               : [],
           },
@@ -471,9 +471,9 @@ export default {
               pageNum: this.queryParams.pageNum,
               pageSize: this.queryParams.pageSize,
               userId: this.userId,
-              accountList: this.queryParams.accountId
-                ? this.queryParams.accountId.split(",")
-                : [],
+              accountIdList: this.queryParams.accountId
+                ? JSON.stringify(this.queryParams.accountId.split(","))
+                : "[]",
             },
             this.uploadDate,
             "startDate",
@@ -494,7 +494,7 @@ export default {
         this.addDateRange(
           {
             userId: this.userId,
-            accountList: this.queryParams.accountId
+            accountIdList: this.queryParams.accountId
               ? this.queryParams.accountId.split(",")
               : [],
           },
@@ -598,12 +598,14 @@ export default {
         tooltip: {
           trigger: "axis",
           triggerOn: "click",
+          confine: true,
+          appendToBody: true,
           formatter: function (params, ticket, callback) {
             console.log(params);
             var data = params[0].name.split("-").length > 1 ? true : false;
             var paramsData = {
               //   userId: that.userId,
-              accountList: that.queryParams.accountId
+              accountIdList: that.queryParams.accountId
                 ? that.queryParams.accountId.split(",")
                 : [],
             };
@@ -621,7 +623,7 @@ export default {
                   dataShowAll +=
                     res.result[i].accountName +
                     " : " +
-                    that.allMoney(res.result[i].costTotal) +
+                    that.allMoney(res.result[i].costTotal / 10) +
                     "<br/>";
                 }
 
@@ -680,7 +682,7 @@ export default {
             smooth: true,
             symbol: "circle",
             data: data.map((item) => {
-              return item.costTotal;
+              return item.costTotal/10;
             }),
             lineStyle: {
               color: "#00BFFF",
@@ -745,7 +747,7 @@ export default {
         this.addDateRange(
           {
             userId: this.userId,
-            accountList: this.queryParams.accountId
+            accountIdList: this.queryParams.accountId
               ? this.queryParams.accountId.split(",")
               : [],
             columns: this.showAllFields.map((item) => {

+ 89 - 10
src/views/supplyChain/channelList.vue

@@ -66,6 +66,14 @@
           >搜索</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>
 
@@ -116,24 +124,68 @@
         width="100px"
       >
       </el-table-column>
-      <el-table-column label="发样商品数" align="center" prop="sendItemCount" width="100px">
+      <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="validOrderNum" width="100px">
+      <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="validOrderRate" width="100px">
+      <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="100px">
+      <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="预估服务费收入"
+        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"
@@ -147,7 +199,21 @@
         </template>
       </el-table-column>
       <el-table-column
-        label="结算服务费收入"
+        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"
@@ -160,6 +226,20 @@
           }}
         </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
@@ -173,7 +253,6 @@
 </template>
 
 <script>
-
 import {
   getSupplyChainUserList,
   getBdReportList,
@@ -259,7 +338,7 @@ export default {
     handleExport() {
       this.downLoadLoading = true;
       downFilePost(
-        "/isv/supply_chain/exportPromoterTotal",
+        "/isv/supply_chain/exportBdReportList",
         this.addDateRange(
           this.queryParams,
           this.uploadDate,
@@ -273,7 +352,7 @@ export default {
         let downloadElement = document.createElement("a");
         let href = window.URL.createObjectURL(blob); //创建下载的链接
         downloadElement.href = href;
-        downloadElement.download = `达人订单列表_${this.uploadDate[0]}-${this.uploadDate[1]}.xlsx`; //下载后文件名
+        downloadElement.download = `渠道管理.xlsx`; //下载后文件名
         document.body.appendChild(downloadElement);
         downloadElement.click(); //点击下载
         document.body.removeChild(downloadElement); //下载完成移除元素

+ 63 - 0
src/views/supplyChain/indexDetails.vue

@@ -55,6 +55,11 @@
           :loading="downLoadLoading"
           >导出</el-button
         >
+        <el-button
+          size="mini"
+          @click="toSamplingList"
+          >领样状态</el-button
+        >
       </el-form-item>
     </el-form>
 
@@ -79,6 +84,7 @@
         </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 / 100 }}元 </template>
       </el-table-column>
@@ -113,6 +119,25 @@
           {{ scope.row.regimentalPromotionRate / 10 + "%" }}
         </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="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
@@ -158,6 +183,7 @@ import {
   getOrderDetail,
   getOrderStatistics,
   downFilePost,
+  samplesCheck,
 } from "@/api/supplyChain/supplyChain";
 var echarts = require("echarts");
 export default {
@@ -276,6 +302,20 @@ export default {
       },
     };
   },
+  filters: {
+    statusName(status) {
+      let name = {
+        1: "待审核",
+        2: "领样申请审核拒绝",
+        3: "待录入订单号",
+        4: "已发货",
+        5: "已签收待上传作业",
+        6: "待招商审核",
+        7: "审核通过",
+      };
+      return name[status];
+    },
+  },
   created() {
     let start = new Date();
     let end = new Date();
@@ -310,6 +350,29 @@ export default {
     });
   },
   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;