Ver Fonte

客户分析

cz há 2 anos atrás
pai
commit
1ad8bc438c

BIN
src/assets/images/portrait/iconm_kehd.png


BIN
src/assets/images/portrait/iconm_zixun.png


+ 8 - 0
src/views/connect/E-mail/mail/com/left.vue

@@ -64,6 +64,7 @@
 
 <script setup>
 import useMailStore from "@/store/modules/mail";
+import useUserStore from "@/store/modules/user";
 const mailStore = useMailStore();
 const { proxy } = getCurrentInstance();
 let selectMail = ref({});
@@ -74,11 +75,18 @@ const getMialList = () => {
   proxy.get("/mailService/getUserEmailList").then((res) => {
     mailList.value = res.data;
     if (mailList.value.length) {
+      // 默认赋值第一邮箱
       selectMail.value = mailList.value[0];
       mailStore.selectMail = mailList.value[0];
+      // 默认打开第一邮箱文件夹
       if (selectMail.value.mailFolderInfoList.length > 0) {
         handleOpenMenu(selectMail.value.mailFolderInfoList[0]);
       }
+      proxy
+        .post("/mailInfo/getUserEmailList", { id: useUserStore().user.userId })
+        .then((res) => {
+          console.log(res, "aa");
+        });
     }
   });
 };

+ 9 - 0
src/views/connect/E-mail/mail/com/right.vue

@@ -0,0 +1,9 @@
+<template>
+  <div>aa</div>
+</template>
+
+<script setup>
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 106 - 5
src/views/connect/E-mail/mail/index.vue

@@ -1,10 +1,21 @@
 <template>
-  <div class="box">
-    <div class="left">
-      <mailLeft></mailLeft>
+  <div>
+    <div class="box">
+      <div class="left">
+        <mailLeft></mailLeft>
+      </div>
+      <div class="right">
+        <mailMain></mailMain>
+      </div>
     </div>
-    <div class="right">
-      <mailMain></mailMain>
+    <div>
+      <!-- 右边弹窗 -->
+      <div :class="mailCon">
+        <div :class="iconCon">
+          <i :class="iconClose" @click="handleClose(iconClose)"></i>
+        </div>
+        <mailRight v-show="showRight" />
+      </div>
     </div>
   </div>
 </template>
@@ -12,13 +23,41 @@
 <script setup>
 import mailLeft from "./com/left.vue";
 import mailMain from "./com/main.vue";
+import mailRight from "./com/right.vue";
+const mailCon = ref("mail-right-con");
+const iconCon = ref("icon-con");
+const iconClose = ref("iconfont icon-iconm_yewtx");
+const showRight = ref(false);
+const handleClose = (icon) => {
+  let iconConArr = "";
+  let iconArr = "";
+  let conArr = "";
+  if (icon.split(" ").indexOf("icon-closed") !== -1) {
+    iconConArr = "icon-con";
+    iconArr = "iconfont icon-iconm_yewtx";
+    conArr = "mail-right-con";
+    showRight.value = true;
+  } else {
+    iconConArr = "icon-con icon-con-closed";
+    iconArr = "iconfont icon-iconm_yewtx icon-closed";
+    conArr = "mail-right-con move-to-close";
+    showRight.value = false;
+  }
+  mailCon.value = conArr;
+  iconClose.value = iconArr;
+  iconCon.value = iconConArr;
+};
 </script>
 
 <style lang="scss" scoped>
 .box {
+  width: calc(100vw - 20px);
   height: calc(100vh - 50px - 50px);
   padding: 10px;
   display: flex;
+  position: relative;
+  // box-sizing: border-box;
+
   .left,
   .right {
     background: #fff;
@@ -26,9 +65,71 @@ import mailMain from "./com/main.vue";
   .left {
     width: 300px;
     margin-right: 10px;
+    box-sizing: border-box;
   }
   .right {
     flex: 1;
   }
+  .mail-right {
+    position: absolute;
+    right: 10px;
+  }
+}
+
+.mail-right-con {
+  // border-radius: 5px;
+  border-top-left-radius: 5px;
+  border-bottom-left-radius: 5px;
+  z-index: 9999;
+  position: fixed;
+  margin-top: 100px;
+  top: 0;
+  width: 400px;
+  transition: all cubic-bezier(0.05, 0.91, 0.22, 1.03) 0.5s;
+  padding: 0px 10px;
+  height: calc(100vh - 50px - 50px - 10px);
+  background: white;
+  left: 100%;
+  margin-left: -428px;
+  box-shadow: var(--devui-shadow-fullscreen-overlay, 0 10px 20px 0)
+    var(--devui-shadow, rgba(0, 0, 0, 0.08));
+  i {
+    cursor: pointer;
+    transition: all cubic-bezier(0, 0.88, 0, 1.29) 1s;
+    font-size: 15px;
+    position: relative;
+    &:hover {
+      color: #169bd5;
+      transform: rotate(360deg);
+    }
+  }
+}
+
+.move-to-close {
+  transform: translateX(400px);
+  .mail-right {
+    transition: all linear 0.3s;
+    padding-left: 20px;
+  }
+}
+.icon-closed {
+  transform: rotate(-180deg);
+  &:hover {
+    transform: rotate(180deg) !important;
+  }
+}
+.icon-con {
+  width: 30px;
+  height: 30px;
+  text-align: center;
+  line-height: 30px;
+  left: 100%;
+  // top: 13px;
+  margin-left: -17px;
+  position: relative;
+}
+.icon-con-closed {
+  left: 0;
+  margin-left: -10px;
 }
 </style>

+ 329 - 0
src/views/customer/analysis/index.vue

@@ -0,0 +1,329 @@
+<template>
+  <div class="box">
+    <div class="query bck">
+      <el-form :inline="true" :model="queryForm">
+        <el-form-item label="国家">
+          <el-select
+            v-model="queryForm.countryId"
+            placeholder="请选择"
+            @change="onQuery"
+          >
+            <el-option
+              v-for="item in countryData"
+              :label="item.chineseName"
+              :value="item.id"
+              :key="item.id"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="日期">
+          <el-date-picker
+            v-model="queryForm.arr"
+            type="daterange"
+            unlink-panels
+            range-separator="-"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            value-format="YYYY-MM-DD"
+          />
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="onQuery">搜索</el-button>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="one bck">
+      <TitleInfo :content="titleList[0]"></TitleInfo>
+      <div class="statistics">
+        <div class="item">
+          <div class="top">
+            <div class="_title">
+              <div class="icon icon_one">
+                <img
+                  src="@/assets/images/portrait/iconm_kehd.png"
+                  alt=""
+                  class="img"
+                />
+              </div>
+              <div class="name">总计</div>
+            </div>
+          </div>
+          <div class="bottom">
+            <div class="_box" style="margin-right: 20px">
+              <span class="t"> 新增 </span>
+              <span class="val"> 20 </span>
+            </div>
+            <div class="_box">
+              <span class="t"> 存量 </span>
+              <span class="val"> 20 </span>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="two bck">
+      <TitleInfo :content="titleList[1]"></TitleInfo>
+      <div class="statistics">
+        <div class="item">
+          <div class="top">
+            <div class="_title">
+              <div class="icon icon_two">
+                <img
+                  src="@/assets/images/portrait/iconm_zixun.png"
+                  alt=""
+                  class="img"
+                />
+              </div>
+              <div class="name">总计</div>
+            </div>
+          </div>
+          <div class="bottom">
+            <div class="_box" style="margin-right: 20px">
+              <span class="t"> 询盘(单) </span>
+              <span class="val"> 20 </span>
+            </div>
+            <div class="_box">
+              <span class="t"> 成交(单) </span>
+              <span class="val"> 20 </span>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="three bck">
+      <TitleInfo :content="titleList[2]"></TitleInfo>
+      <div ref="echartDom" style="min-height: 400px"></div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import * as echarts from "echarts";
+
+import TitleInfo from "@/components/TitleInfo/index.vue";
+const titleList = ["客户来源统计", "类型统计", "趋势分析"];
+const { proxy } = getCurrentInstance();
+const loading = ref(false);
+const queryForm = reactive({});
+const countryData = ref([]);
+//图表
+const echartDom = ref(null);
+let myChart = null;
+const option = reactive({
+  data: {
+    tooltip: {
+      trigger: "axis",
+    },
+    grid: {
+      left: "0%",
+      right: "2%",
+      bottom: "15%",
+      top: "30px",
+      containLabel: true,
+    },
+    legend: {
+      bottom: 0,
+      icon: "rect", //显示为矩形
+      itemWidth: 12,
+      itemHeight: 12,
+      itemGap: 30, //item项的边距
+      data: ["月新增客户数", "月存量客户数", "月询盘单数", "月成交单数"],
+    },
+    xAxis: {
+      type: "category",
+      boundaryGap: false,
+      data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
+      // splitLine: {
+      //   lineStyle: {
+      //     type: "dashed",
+      //     // 设置背景横线
+      //     color: "#ccc",
+      //   },
+      // },
+    },
+    yAxis: {
+      type: "value",
+      splitLine: {
+        lineStyle: {
+          type: "dashed",
+          // 设置背景横线
+          color: "#ccc",
+        },
+      },
+    },
+    series: [
+      {
+        data: [100, 202, 500, 934, 1290, 1330, 1320],
+        type: "line",
+        smooth: true,
+        symbolSize: 10,
+        name: "月存量客户数",
+        emphasis: {
+          focus: "series",
+        },
+        itemStyle: {
+          normal: {
+            color: "#7566F0", //改变折线点的颜色
+            lineStyle: {
+              color: "#7566F0", //改变折线颜色
+            },
+          },
+        },
+      },
+      {
+        data: [100, 202, 500, 934, 500, 900, 10],
+        type: "line",
+        smooth: true,
+        symbolSize: 10,
+        name: "月询盘单数",
+        emphasis: {
+          focus: "series",
+        },
+        itemStyle: {
+          normal: {
+            color: "#FF655B", //改变折线点的颜色
+            lineStyle: {
+              color: "#FF655B", //改变折线颜色
+            },
+          },
+        },
+      },
+      {
+        data: [820, 932, 901, 934, 1290, 1330, 1320],
+        type: "line",
+        smooth: true,
+        symbolSize: 10,
+        name: "月成交单数",
+        emphasis: {
+          focus: "series",
+        },
+        itemStyle: {
+          normal: {
+            color: "#FF9315", //改变折线点的颜色
+            lineStyle: {
+              color: "#FF9315", //改变折线颜色
+            },
+          },
+        },
+      },
+      {
+        data: [210, 885, 644, 934, 1290, 1330, 1320],
+        type: "line",
+        smooth: true, //是否圆润线条
+        symbolSize: 10, //设置拐点大小
+        name: "月新增客户数",
+
+        // 背景颜色
+        // areaStyle: {
+        //   color: "#D9EDFF",
+        //   opacity: 0.4,
+        // },
+        emphasis: {
+          focus: "series",
+        },
+        itemStyle: {
+          normal: {
+            color: "#0084FF", //改变折线点的颜色
+            lineStyle: {
+              color: "#0084FF", //改变折线颜色
+            },
+          },
+        },
+      },
+    ],
+  },
+});
+const onQuery = () => {
+  console.log(queryForm, "ad");
+};
+
+const getCountryData = () => {
+  proxy.post("/areaInfo/list", { parentId: "0" }).then((res) => {
+    countryData.value = res;
+    queryForm.countryId = "China";
+  });
+};
+getCountryData();
+onMounted(() => {
+  myChart = echarts.init(echartDom.value);
+  myChart.setOption(option.data);
+  window.addEventListener("resize", () => {
+    myChart.resize();
+  });
+});
+</script>
+
+<style lang="scss" scoped>
+:deep(.el-form-item) {
+  margin-bottom: 0px;
+}
+.box {
+  display: flex;
+  flex-direction: column;
+  padding: 10px;
+  font-size: 12px;
+  .one,
+  .two,
+  .three {
+    margin-top: 10px;
+  }
+  .three {
+    flex: 1;
+    // min-height: 190px;
+  }
+  .statistics {
+    display: flex;
+    margin-top: 10px;
+    .item {
+      // min-width: 250px;
+      display: flex;
+      flex-direction: column;
+      justify-content: space-around;
+      background-color: #f1f1f1;
+      border-radius: 5px;
+      padding: 15px;
+      .top {
+        ._title {
+          display: flex;
+          align-items: center;
+          .icon {
+            border-radius: 5px;
+            padding: 5px;
+            margin-right: 10px;
+            .img {
+              width: 20px;
+              height: 20px;
+              vertical-align: middle;
+            }
+          }
+          .icon_one {
+            background: #0084ff;
+          }
+          .icon_two {
+            background: #ff9315;
+          }
+        }
+      }
+      .bottom {
+        margin-top: 15px;
+        display: flex;
+        // justify-content: space-around;
+        .t {
+          color: #999999;
+          margin-right: 8px;
+        }
+        .val {
+          color: #333333;
+          font-size: 16px;
+          font-weight: bold;
+        }
+      }
+    }
+  }
+}
+.bck {
+  background-color: #fff;
+  padding: 15px;
+}
+</style>

+ 9 - 2
src/views/salesMange/shipmentMange/packing/index.vue

@@ -102,6 +102,7 @@
           <el-table
             :data="formData.data.contractProductData"
             @select="handleSelectProduct"
+            @select-all="handleSelectProduct"
           >
             <el-table-column type="selection" label="" width="50" />
             <el-table-column prop="contractCode" label="合同编码" />
@@ -344,7 +345,7 @@
         </el-form-item>
       </el-form>
       <template #footer>
-        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+        <el-button @click="handleClose" size="large">取 消</el-button>
         <el-button
           type="primary"
           @click="submitForm()"
@@ -853,6 +854,7 @@ const handleChangeContract = (val) => {
       formData.data.contractProductData = res.data.map((x) => ({
         ...x,
         waitQuantity: Number(x.cpQuantity) - Number(x.sumPackQuantity),
+        quantity: undefined,
       }));
     });
 };
@@ -874,6 +876,11 @@ const getData = (data, type) => {
   }
   return [];
 };
+
+const handleClose = () => {
+  dialogVisible = false;
+  selectProductData.value = [];
+};
 getSelectData();
 getList();
 </script>
@@ -911,7 +918,7 @@ getList();
     width: 100%;
     height: 1px;
     background: #7fb5e3;
-    margin: 10px 0;
+    margin: 20px 0;
   }
   .bottom-arrow {
     text-align: center;