Selaa lähdekoodia

利润预算表折线图

cz 1 vuosi sitten
vanhempi
commit
6610f70105

BIN
src/assets/images/tubiao-zhexiantu.png


+ 4 - 4
src/components/headerBar/header-bar.vue

@@ -240,7 +240,7 @@
               </el-badge>
               <div>待采购</div>
             </div>
-            <div class="job-item" style="margin-right:5px" v-if="userInfo.roles.includes(' purchasingOfficer') " @click=" handlePushRouter(5)">
+            <div class="job-item" style="margin-right:5px" v-if="userInfo.roles.includes('purchasingOfficer') " @click=" handlePushRouter(5)">
               <el-badge :value=" jobData.sampleHandoverCount" :max="99" style="margin-right:20px;margin-top:10px">
                 <div style="margin-top:-10px">
                   <el-icon size="20" color="#fff">
@@ -250,7 +250,7 @@
               </el-badge>
               <div>样品交接单</div>
             </div>
-            <div class="job-item" v-if="userInfo.roles.includes(' purchasingOfficer') " @click=" handlePushRouter(6)">
+            <div class="job-item" v-if="userInfo.roles.includes('purchasingOfficer') " @click=" handlePushRouter(6)">
               <el-badge :value=" jobData.contractHandoverCount" :max="99" style="margin-right:20px;margin-top:10px">
                 <div style="margin-top:-10px">
                   <el-icon size="20" color="#fff">
@@ -260,7 +260,7 @@
               </el-badge>
               <div>合同交接单</div>
             </div>
-            <div class="job-item" style="margin-right:5px" v-if="userInfo.roles.includes(' cashier') " @click=" handlePushRouter(7)">
+            <div class="job-item" style="margin-right:5px" v-if="userInfo.roles.includes('cashier') " @click=" handlePushRouter(7)">
               <el-badge :value=" jobData.waitAccountPayCount" :max="99" style="margin-right:20px;margin-top:10px">
                 <div style="margin-top:-10px">
                   <el-icon size="20" color="#fff">
@@ -542,7 +542,7 @@ const handlePushRouter = (type) => {
 .job-box {
   position: absolute;
   bottom: 20px;
-  height: 270px;
+  // height: 270px;
   .job-list {
     display: flex;
     flex-wrap: wrap;

+ 113 - 4
src/views/EHSD/procurement/profitBudgetEHSD/index.vue

@@ -11,7 +11,7 @@
     </byTable>
     <div style="padding: 0 20px 0px 20px; background-color: white" v-if="rateStatus">
       <el-table :data="sourceList.data" v-loading="loading" :height="tableHeight">
-        <el-table-column label="合同编号" prop="code" width="130" fixed />
+        <el-table-column label="合同编号" prop="code" width="140" fixed />
         <el-table-column label="合同金额" width="140" fixed>
           <template #default="{ row }">
             <div>{{ row.currency }} {{ moneyFormat( row.amount,2) }}</div>
@@ -42,10 +42,25 @@
             <div> {{ moneyFormat(row.expenditureAmount,2) }}</div>
           </template>
         </el-table-column>
+        <el-table-column label="毛利" prop="gross" width="130" fixed>
+          <template #default="{ row,$index }">
+            <div style="display:flex">
+              <el-popover placement="top-start" :width="400" trigger="hover" @show="showEcharts(row,$index)">
+                <template #default>
+                  <div>
+                    <div :ref="row.contractId+$index" style="height:180px">
+                    </div>
+                  </div>
+                </template>
+                <template #reference>
+                  <div style="margin-right:8px;cursor:pointer;position:relative;top:-3px">
+                    <img src="@/assets/images/tubiao-zhexiantu.png" alt="" class="pic">
+                  </div>
+                </template>
+              </el-popover>
 
-        <el-table-column label="毛利" prop="gross" width="100" fixed>
-          <template #default="{ row }">
-            <div>{{ moneyFormat(row.gross ,2)}}</div>
+              <div>{{ moneyFormat(row.gross ,2)}}</div>
+            </div>
           </template>
         </el-table-column>
         <el-table-column label="毛利率" width="80" fixed>
@@ -283,6 +298,7 @@ import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
 import useUserStore from "@/store/modules/user";
 import { ElMessage } from "element-plus";
+import * as echarts from "echarts";
 
 const tableHeight = ref(0);
 const getTableHeight = () => {
@@ -880,6 +896,92 @@ const moreSearchReset = () => {
   };
   moreSearchQuery();
 };
+
+const optionTwo = reactive({
+  data: {
+    tooltip: {
+      trigger: "axis",
+    },
+    // legend: {
+    //   data: ["价格"],
+    // },
+    grid: {
+      left: "3%",
+      right: "4%",
+      top: "10%",
+      bottom: "3%",
+      containLabel: true,
+    },
+    tooltip: {
+      show: true,
+      trigger: "axis",
+      // 格式化函数
+      // valueFormatter: (val) => {
+      //   return val + "aaa";
+      // },
+      formatter: (params, ticket, callback) => {
+        return `
+        ${params[0].axisValue}
+        <br/> 
+        ${params[0].seriesName}:${params[0].data} 
+        <br/> 销售合同金额:${
+          showRowData.value.grossProfitInfoList[params[0].dataIndex + 1]
+            .contractAmount
+        }
+        <br/> 采购合同金额:${
+          showRowData.value.grossProfitInfoList[params[0].dataIndex + 1]
+            .purchaseAmount
+        }`;
+      },
+    },
+    // toolbox: {
+    //   feature: {
+    //     saveAsImage: {},
+    //   },
+    // },
+    xAxis: {
+      type: "category",
+      boundaryGap: false,
+      data: [],
+    },
+    yAxis: {
+      type: "value",
+    },
+    series: [
+      {
+        name: "毛利",
+        type: "line",
+        data: [],
+      },
+    ],
+  },
+});
+const showRowData = ref({});
+const showEcharts = (row, index) => {
+  showRowData.value = row;
+  let myChart = null;
+  myChart = echarts.init(proxy.$refs[row.contractId + index]);
+  window.addEventListener("resize", () => {
+    myChart.resize();
+  });
+  if (row.grossProfitInfoList && row.grossProfitInfoList.length > 1) {
+    // 删除数组第一个元素
+    // const arr = proxy.deepClone(row.grossProfitInfoList);
+    // arr.shift();
+    let arr = row.grossProfitInfoList.slice(1, row.grossProfitInfoList.length);
+    optionTwo.data.xAxis.data = arr.map((item) => {
+      return item.createTime.slice(0, 10);
+    });
+    optionTwo.data.series[0].data = arr.map((item) => {
+      return item.gross;
+    });
+  } else {
+    optionTwo.data.xAxis.data = [];
+    optionTwo.data.series[0].data = [];
+  }
+  myChart.setOption(optionTwo.data);
+  myChart.resize();
+};
 </script>
 
 <style lang="scss" scoped>
@@ -894,4 +996,11 @@ const moreSearchReset = () => {
   color: #fff;
   border-radius: 4px;
 }
+.pic {
+  object-fit: contain;
+  width: 20px;
+  height: 20px;
+  cursor: pointer;
+  vertical-align: middle;
+}
 </style>

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

@@ -667,6 +667,9 @@ const getMialList = () => {
 };
 
 const handleClickMail = (item, flag = true) => {
+  if (selectMail.value && selectMail.value.id == item.id) {
+    return;
+  }
   mailStore.mailMenuList = [];
   selectMail.value = item;
   mailStore.selectMail = item;

+ 0 - 1
src/views/connect/E-mail/mail/com/mailDetail.vue

@@ -132,7 +132,6 @@
             <div style="margin-top:5px">
               主题: {{item.subject}}
             </div>
-
           </div>
         </div>
       </div>

+ 12 - 11
src/views/connect/E-mail/mail/com/mailList.vue

@@ -611,6 +611,7 @@ const editTile = ref("添加标签");
 const editDialog = ref(false);
 const readData = ref({});
 const handleRead = (row) => {
+  row.flags = "6";
   // 标记未读已读数据
   const uidList = [row.uid];
   readData.value = {
@@ -621,17 +622,17 @@ const handleRead = (row) => {
   };
   proxy.post("/mailService/setSeen", readData.value).then(
     (res) => {
-      ElMessage({
-        message: `操作成功!`,
-        type: "success",
-      });
-      getList();
+      // ElMessage({
+      //   message: `操作成功!`,
+      //   type: "success",
+      // });
+      // getList();
     },
     (err) => {}
   );
 };
 const handleUnRead = (row) => {
-  loading.value = true;
+  row.flags = "";
   // 标记未读已读数据
   const uidList = [row.uid];
   readData.value = {
@@ -642,11 +643,11 @@ const handleUnRead = (row) => {
   };
   proxy.post("/mailService/cancelSeen", readData.value).then(
     (res) => {
-      ElMessage({
-        message: `操作成功!`,
-        type: "success",
-      });
-      getList();
+      // ElMessage({
+      //   message: `操作成功!`,
+      //   type: "success",
+      // });
+      // getList();
     },
     (err) => {}
   );

+ 37 - 69
src/views/connect/E-mail/mail/com/mailWrite.vue

@@ -8,24 +8,10 @@
         <el-form-item label="收件人" prop="to">
           <div style="width: 100%">
             <div style="display: flex; width: 100%">
-              <!-- <el-autocomplete
-                v-model="formData.data.to"
-                clearable
-                placeholder="请输入"
-                style="width: 100%"
-                @select="handlePerson"
-                :fetch-suggestions="querySearchPerson"
-                @keyup.enter.native="handleAdd(10)"
-              >
-              </el-autocomplete> -->
-              <el-input v-model="formData.data.to" placeholder="请输入" @keyup.enter.native="handleAdd(10)" />
-              <!-- <el-button
-                type="primary"
-                @click="handleAdd(10)"
-                style="margin-left: 10px"
-                :disabled="!formData.data.to"
-                >添加</el-button
-              > -->
+              <el-autocomplete v-model="formData.data.to" clearable placeholder="请输入" style="width: 100%" @select="handlePerson"
+                               :fetch-suggestions="querySearchPerson" @keyup.enter.native="handleAdd(10)">
+              </el-autocomplete>
+              <!-- <el-input v-model="formData.data.to" placeholder="请输入" @keyup.enter.native="handleAdd(10)" /> -->
             </div>
             <div style="margin-top: 15px" v-if="to && to.length > 0">
               <el-tag style="margin-right: 10px" class="ml-2" type="info" v-for="(item, index) in to" :key="index" closable
@@ -43,24 +29,10 @@
         <el-form-item label="抄送人" prop="cc" v-if="showcc">
           <div style="width: 100%">
             <div style="display: flex; width: 100%">
-              <!-- <el-autocomplete
-                v-model="formData.data.cc"
-                clearable
-                class="inline-input w-50"
-                placeholder="请输入"
-                @select="handlePerson"
-                :fetch-suggestions="querySearchPerson"
-                @keyup.enter.native="handleAdd(20)"
-              >
-              </el-autocomplete> -->
-              <el-input v-model="formData.data.cc" placeholder="请输入" @keyup.enter.native="handleAdd(20)" />
-              <!-- <el-button
-                type="primary"
-                @click="handleAdd(20)"
-                style="margin-left: 10px"
-                :disabled="!formData.data.cc"
-                >添加</el-button
-              > -->
+              <el-autocomplete v-model="formData.data.cc" clearable placeholder="请输入" style="width: 100%" @select="handlePerson"
+                               :fetch-suggestions="querySearchPerson" @keyup.enter.native="handleAdd(20)">
+              </el-autocomplete>
+              <!-- <el-input v-model="formData.data.cc" placeholder="请输入" @keyup.enter.native="handleAdd(20)" /> -->
             </div>
             <div style="margin-top: 15px" v-if="cc && cc.length > 0">
               <el-tag style="margin-right: 10px" class="ml-2" type="info" v-for="(item, index) in cc" :key="index" closable
@@ -71,23 +43,10 @@
         <el-form-item label="密送人" prop="bcc" v-if="showbcc">
           <div style="width: 100%">
             <div style="display: flex; width: 100%">
-              <!-- <el-autocomplete
-                v-model="formData.data.bcc"
-                clearable
-                placeholder="请输入"
-                @select="handlePerson"
-                :fetch-suggestions="querySearchPerson"
-                @keyup.enter.native="handleAdd(30)"
-              >
-              </el-autocomplete> -->
-              <el-input v-model="formData.data.bcc" placeholder="请输入" @keyup.enter.native="handleAdd(30)" />
-              <!-- <el-button
-                type="primary"
-                @click="handleAdd(30)"
-                style="margin-left: 10px"
-                :disabled="!formData.data.bcc"
-                >添加</el-button
-              > -->
+              <el-autocomplete v-model="formData.data.bcc" clearable placeholder="请输入" style="width: 100%" @select="handlePerson"
+                               :fetch-suggestions="querySearchPerson" @keyup.enter.native="handleAdd(30)">
+              </el-autocomplete>
+              <!-- <el-input v-model="formData.data.bcc" placeholder="请输入" @keyup.enter.native="handleAdd(30)" /> -->
             </div>
             <div style="margin-top: 15px" v-if="bcc && bcc.length > 0">
               <el-tag style="margin-right: 10px" class="ml-2" type="info" v-for="(item, index) in bcc" :key="index" closable
@@ -409,21 +368,30 @@ const handleAdd = (val) => {
   }
 };
 
-const handlePerson = () => {};
-const createFilter = (queryString) => {
-  return (restaurant) => {
-    return (
-      restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
-    );
-  };
+const handlePerson = (val) => {
+  console.log(val, "ss");
 };
 
-const distributionCenterData = ref([]);
 const querySearchPerson = (queryString, callback) => {
-  const results = queryString
-    ? distributionCenterData.value.filter(createFilter(queryString))
-    : distributionCenterData.value;
-  callback(results);
+  proxy
+    .post("/customerUser/page", {
+      pageNum: 1,
+      pageSize: 15,
+      keyword: queryString,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        res.rows = res.rows.map((item) => {
+          return {
+            ...item,
+            value: item.email,
+          };
+        });
+        callback(res.rows);
+      } else {
+        callback([]);
+      }
+    });
 };
 
 const pushTo = () => {
@@ -506,10 +474,10 @@ const handleReplyInit = (allData, pageType) => {
       <p><br></p>
        <p><br></p>
     <div style="background:#eee;padding:10px;font-size:12px">
-      <div><span style="color:#000;font-weight:700">发件人:</span><span>${data.fromEmail}</span></div>
-      <div><span style="color:#000;font-weight:700;margin-top:5px">发送时间:</span><span>${data.fromEmail}</span></div>
-      <div><span style="color:#000;font-weight:700;margin-top:5px">收件人:</span><span>${data.fromEmail}</span></div>
-      <div><span style="color:#000;font-weight:700;margin-top:5px">主题:</span><span>${data.subject}</span></div>
+       <div><span style="color:#000;font-weight:700">FROM:</span><span>${data.fromEmail}</span></div>
+      <div><span style="color:#000;font-weight:700;margin-top:5px">DATE:</span><span>${data.sendDate}</span></div>
+      <div><span style="color:#000;font-weight:700;margin-top:5px">TO:</span><span>${mailStore.selectMail.mailUser}</span></div>
+      <div><span style="color:#000;font-weight:700;margin-top:5px">SUBJECT:</span><span>${data.subject}</span></div>
     </div>
     ${data.content}`);
     // <p><br></p><p><br></p>