Kaynağa Gözat

达人管理提测

朱鑫波 2 yıl önce
ebeveyn
işleme
92583e5ae8

+ 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
+    })
+}
+
+
+
+
+
+

+ 7 - 7
src/utils/request.js

@@ -19,7 +19,7 @@ const service = axios.create({
   // http://192.168.0.195:9003 测试
   // http://192.168.1.143:9003 西安
   // http://192.168.1.148:9003 蒙蒙
-  baseURL: 'http://192.168.1.143:9003',
+  baseURL: 'http://192.168.0.195:9003',
   // 超时
   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
     })

+ 1 - 1
src/views/accountManagement/accountClaim.vue

@@ -105,7 +105,7 @@
         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

+ 247 - 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,130 @@
         >{{ 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 v-if="followUpRecord" style="margin-top: 20px">
+      <h4>
+        <span class="prefix"></span>跟进记录
+
+        <a
+          v-if="$store.getters.userId == detailData.userId"
+          :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">
+        <!-- {{ 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">
+        <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 +385,10 @@ export default {
   dicts: ["sys_normal_disable"],
   data() {
     return {
+      options: [],
+      tagList: [],
+      formBroadcast: {},
+      editDesc: false,
       downLoadLoading: false,
       dialogTableVisible: false,
       logPage: {
@@ -369,7 +425,7 @@ export default {
       // 销售列表
       saleList: [],
       // 分配销售确定loading
-      confirmLoadingSale: false,
+      confirmLoading: false,
       // 日期范围
       dateRange: [],
       // 查询参数
@@ -388,6 +444,9 @@ export default {
       dataList: null,
       zbType: "liveVisitorCount",
       dspType: "videoWatchCount",
+      promoterLabelList: [],
+      followUpRecord: undefined,
+      historyFollowUpRecord: [],
     };
   },
   created() {
@@ -403,13 +462,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 +485,7 @@ export default {
           );
           this.initEchart(
             "echartDsp",
-            this.handlerEchartOption(
-              this.dataList.shortVideosInfo,
-              this.dspType,
-              "dsp"
-            )
+            this.handlerEchartOption(this.dataList.shortVideosInfo, this.dspType, "dsp")
           );
         });
       });
@@ -445,11 +509,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 +708,92 @@ 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,
+          });
+          this.getLabelList();
+          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>

+ 115 - 53
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,46 @@
           <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()
+            }}
+          </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 +249,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 +429,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 +456,8 @@ import {
   editPromoter,
   deleteById,
 } from "@/api/promoter/promoter";
+import { addFollowUpRecords } from "@/api/label";
+import { join } from "path";
 export default {
   name: "account-list",
   components: {},
@@ -400,8 +476,11 @@ export default {
       callback();
     };
     return {
+      options: [],
+      tagList: [],
       // 遮罩层
-      loading: true,
+      loading: false,
+      text: undefined,
       // 选中数组
       ids: null,
       // 非单个禁用
@@ -492,6 +571,7 @@ export default {
       userId: null,
       prop: "",
       sort: "DESC",
+      promoterId: undefined,
     };
   },
   created() {
@@ -518,6 +598,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();
@@ -600,6 +682,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 +728,7 @@ export default {
         );
       }
     },
+
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
@@ -688,53 +777,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;
+      }
     },
   },
 };

+ 9 - 20
src/views/promoter/promoterSeas.vue

@@ -87,11 +87,10 @@
       </el-table-column>
       <el-table-column label="粉丝数" align="center" prop="fansNumber"> </el-table-column>
 
-      <el-table-column
+      <!-- <el-table-column
         label="单视频销售额"
         align="center"
         prop="avgVideoSales"
-        sortable="custom"
       >
         <template slot-scope="scope">
           <div v-if="!!scope.row.avgVideoSales">
@@ -104,7 +103,6 @@
         label="短视频销售额"
         align="center"
         prop="videoSales"
-        sortable="custom"
       >
         <template slot-scope="scope">
           <div v-if="!!scope.row.videoSales">
@@ -112,9 +110,9 @@
           </div>
           <div v-else>-</div>
         </template>
-      </el-table-column>
+      </el-table-column> -->
       <el-table-column
-        label="睿选gmv"
+        label="睿选近30天GMV"
         align="center"
         prop="monthDayGmv"
         sortable="custom"
@@ -127,7 +125,7 @@
         </template>
       </el-table-column>
       <el-table-column
-        label="睿选出单量"
+        label="睿选近30天出单量"
         align="center"
         prop="monthDayOrderNum"
         sortable="custom"
@@ -140,10 +138,10 @@
         </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) }}
           </div>
           <div v-else>-</div>
         </template>
@@ -489,16 +487,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,7 +553,6 @@ export default {
               this.handleQuery();
             })
             .catch(() => {
-              this.$message.error("失败");
               this.loading = false;
             });
         })