潘超林 4 月之前
父节点
当前提交
c7298f128e
共有 5 个文件被更改,包括 64 次插入38 次删除
  1. 1 1
      src/utils/request.js
  2. 2 3
      src/views/index.vue
  3. 8 8
      src/views/manage/afterSaleOrder.vue
  4. 6 6
      src/views/manage/order.vue
  5. 47 20
      src/views/manage/sales.vue

+ 1 - 1
src/utils/request.js

@@ -27,7 +27,7 @@ service.interceptors.request.use(config => {
   // 是否需要防止数据重复提交
   const isRepeatSubmit = (config.headers || {}).repeatSubmit === false
   if (getToken() && !isToken) {
-    config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
+    // config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
     config.headers['Auth'] = 'Bearer ' + getToken()
   }
   // get请求映射params参数

+ 2 - 3
src/views/index.vue

@@ -34,7 +34,7 @@
           <el-card shadow="always">
             <div class="item">
               <div style="padding: 10px">
-                <span>访问量</span>
+                <span>访问量(人)</span>
               </div>
               <div class="count">
                 {{ statistics.totalSeeCount ? statistics.totalSeeCount : 0 }}
@@ -61,7 +61,7 @@
           <el-card shadow="always">
             <div class="item">
               <div style="padding: 10px">
-                <span>总订单数</span>
+                <span>总订单数(单 )</span>
               </div>
               <div class="count">
                 {{ statistics.totalOrderCount ? statistics.totalOrderCount : 0 }}
@@ -272,7 +272,6 @@ export default {
   },
 
   methods: {
-
     pickerChange(val) {
       console.log(val);
       if (this.params.queryType == 0) {

+ 8 - 8
src/views/manage/afterSaleOrder.vue

@@ -191,7 +191,7 @@
       </el-table-column>
       <el-table-column label="规格名称" align="center" prop="specsName" />
       <el-table-column label="规格值" align="center" prop="specsValue" />
-      <el-table-column label="实付金额" align="center" prop="goodsAmount">
+      <el-table-column label="实付金额(元)" align="center" prop="goodsAmount">
         <template slot-scope="scope"> {{ scope.row.goodsAmount }}元 </template>
       </el-table-column>
       <el-table-column label="订单编号" align="center" prop="userOrderSn" width="220" />
@@ -347,13 +347,13 @@
         <el-descriptions-item label="问题描述">{{
           detailInfo.dxAfterSaleVO ? detailInfo.dxAfterSaleVO.problemDesc : ""
         }}</el-descriptions-item>
-        <el-descriptions-item label="实际退款金额">{{
+        <el-descriptions-item label="实际退款金额(元)">{{
           detailInfo.dxAfterSaleVO ? detailInfo.dxAfterSaleVO.actualRefundAmount : ""
         }}</el-descriptions-item>
         <el-descriptions-item label="退款时间">{{
           detailInfo.dxAfterSaleVO ? detailInfo.dxAfterSaleVO.refundAuditTime : ""
         }}</el-descriptions-item>
-        </el-descriptions>
+      </el-descriptions>
 
       <el-descriptions title="订单详情" column="3">
         <el-descriptions-item label="订单编号">{{
@@ -426,13 +426,13 @@
         <el-descriptions-item label="付款时间">
           {{ detailInfo ? detailInfo.paymentTime : "" }}</el-descriptions-item
         >
-        <el-descriptions-item label="担保服务费">
+        <el-descriptions-item label="担保服务费(元)">
           {{ detailInfo ? detailInfo.serviceFee : "" }}
         </el-descriptions-item>
-        <el-descriptions-item label="运费">
+        <el-descriptions-item label="运费(元)">
           {{ detailInfo ? detailInfo.freightFee : "" }}</el-descriptions-item
         >
-        <el-descriptions-item label="实付款">
+        <el-descriptions-item label="实付款(元)">
           {{ detailInfo ? detailInfo.totalPrice : "" }}
         </el-descriptions-item>
       </el-descriptions>
@@ -494,7 +494,7 @@
         </el-table-column>
         <el-table-column prop="price" label="商品单价"> </el-table-column>
         <el-table-column prop="quantity" label="下单数量"> </el-table-column>
-        <el-table-column prop="totalPrice" label="总金额"> </el-table-column>
+        <el-table-column prop="totalPrice" label="总金额(元)"> </el-table-column>
       </el-table>
     </el-dialog>
 
@@ -578,7 +578,7 @@ export default {
         { header: "包装方式", key: "packageType", width: 20 },
         { header: "规格名称", key: "specsName", width: 20 },
         { header: "规格值", key: "specsValue", width: 20 },
-        { header: "实付金额", key: "goodsAmount", width: 20 },
+        { header: "实付金额(元)", key: "goodsAmount", width: 20 },
         { header: "运费", key: "freightFee", width: 20 },
         { header: "订单状态", key: "orderStatus", width: 20 },
         { header: "售后状态", key: "afterSaleStatus", width: 20 },

+ 6 - 6
src/views/manage/order.vue

@@ -278,7 +278,7 @@
       </el-table-column>
       <el-table-column label="规格名称" align="center" prop="specsName" />
       <el-table-column label="规格值" align="center" prop="specsValue" />
-      <el-table-column label="实付金额" align="center" prop="goodsAmount">
+      <el-table-column label="实付金额(元)" align="center" prop="goodsAmount">
         <template slot-scope="scope"> {{ scope.row.goodsAmount }}元 </template>
       </el-table-column>
       <el-table-column label="订单编号" align="center" prop="userOrderSn" width="220" />
@@ -461,10 +461,10 @@
         <el-descriptions-item label="担保服务费">
           {{ detailInfo ? detailInfo.serviceFee : "" }}
         </el-descriptions-item>
-        <el-descriptions-item label="运费">
+        <el-descriptions-item label="运费(元)">
           {{ detailInfo ? detailInfo.freightFee : "" }}</el-descriptions-item
         >
-        <el-descriptions-item label="实付款">
+        <el-descriptions-item label="实付款(元)">
           {{ detailInfo ? detailInfo.totalPrice : "" }}
         </el-descriptions-item>
       </el-descriptions>
@@ -524,9 +524,9 @@
             </el-image>
           </template>
         </el-table-column>
-        <el-table-column prop="price" label="商品单价"> </el-table-column>
+        <el-table-column prop="price" label="商品单价(元)"> </el-table-column>
         <el-table-column prop="quantity" label="下单数量"> </el-table-column>
-        <el-table-column prop="totalPrice" label="总金额"> </el-table-column>
+        <el-table-column prop="totalPrice" label="总金额(元)"> </el-table-column>
       </el-table>
     </el-dialog>
 
@@ -613,7 +613,7 @@ export default {
         { header: "包装方式", key: "packageType", width: 20 },
         { header: "规格名称", key: "specsName", width: 20 },
         { header: "规格值", key: "specsValue", width: 20 },
-        { header: "实付金额", key: "goodsAmount", width: 20 },
+        { header: "实付金额(元)", key: "goodsAmount", width: 20 },
         { header: "运费", key: "freightFee", width: 20 },
         { header: "订单状态", key: "orderStatus", width: 20 },
         { header: "售后状态", key: "afterSaleStatus", width: 20 },

+ 47 - 20
src/views/manage/sales.vue

@@ -6,7 +6,7 @@
           <el-card shadow="always">
             <div class="item">
               <div style="padding: 10px">
-                <span>全部上架商品</span>
+                <span>全部上架商品(个)</span>
               </div>
               <div class="count">
                 {{ Statistics ? Statistics.totalPutOnGoodsCount : 0 }}
@@ -18,9 +18,16 @@
           <el-card shadow="always">
             <div class="item">
               <div style="padding: 10px">
-                <span>单日销量</span>
-                <el-popover placement="top-start" width="300" trigger="click">
+                <span>单日销量(元)</span>
+
+                <el-popover
+                  placement="top-start"
+                  width="300"
+                  trigger="click"
+                  v-model="popover"
+                >
                   <el-date-picker
+                    @change="pickerChange"
                     v-model="timeDate"
                     type="date"
                     placeholder="选择日期"
@@ -32,8 +39,8 @@
                     slot="reference"
                     :style="
                       timeDate
-                        ? 'position: relative; left: 50px'
-                        : 'position: relative; left: 130px'
+                        ? 'position: relative; left: 30px'
+                        : 'position: relative; left: 100px'
                     "
                   >
                     {{ timeDate }}
@@ -51,7 +58,7 @@
           <el-card shadow="always">
             <div class="item">
               <div style="padding: 10px">
-                <span>退款总金额</span>
+                <span>退款总金额(元)</span>
               </div>
               <div class="count">
                 ¥{{ Statistics ? Statistics.totalRefundPrice : 0 }}
@@ -63,7 +70,7 @@
           <el-card shadow="always">
             <div class="item">
               <div style="padding: 10px">
-                <span>销量统计</span>
+                <span>销量统计(元)</span>
               </div>
               <div class="count">{{ Statistics ? Statistics.totalSalePrice : 0 }}</div>
             </div>
@@ -121,11 +128,7 @@
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
-    <el-table
-      v-loading="loading"
-      :data="configList"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="configList">
       <!-- <el-table-column type="selection" width="55" align="center" /> -->
       <el-table-column label="商品图片" align="center" prop="configId">
         <template slot-scope="scope">
@@ -140,10 +143,10 @@
       </el-table-column>
       <el-table-column label="商品名称" align="center" prop="spuName" />
       <el-table-column label="分类" align="center" prop="categoryName" />
-      <el-table-column label="价格" align="center" prop="price" />
+      <el-table-column label="价格(元)" align="center" prop="price" />
       <el-table-column label="库存" align="center" prop="stock"> </el-table-column>
       <el-table-column label="销量" align="center" prop="saleCount" />
-      <el-table-column label="销售额" align="center" prop="salePrice" />
+      <el-table-column label="销售额(元)" align="center" prop="salePrice" />
       <el-table-column label="状态" align="center" prop="spuStatus">
         <template slot-scope="scope">
           {{
@@ -200,13 +203,15 @@
         <el-descriptions-item label="商品分类">
           {{ form.categoryName }}</el-descriptions-item
         >
-        <el-descriptions-item label="商品价格"> {{ form.price }} </el-descriptions-item>
+        <el-descriptions-item label="商品价格(元)">
+          {{ form.price }}
+        </el-descriptions-item>
         <el-descriptions-item label="商品库存"> {{ form.stock }}</el-descriptions-item>
 
         <el-descriptions-item label="商品销量">
           {{ form.saleCount }}</el-descriptions-item
         >
-        <el-descriptions-item label="商品销售额">
+        <el-descriptions- item label="商品销售额(元)">
           {{ form.salePrice }}</el-descriptions-item
         >
         <el-descriptions-item label="商品状态">
@@ -265,6 +270,7 @@ export default {
         startTime: "",
         endTime: "",
       },
+      popover: false,
       // 表单参数
       form: {},
       Statistics: {},
@@ -281,6 +287,14 @@ export default {
     this.getStatistics();
   },
   methods: {
+    pickerChange() {
+      console.log(this.timeDate);
+      let params = {
+        startTime: this.timeDate,
+      };
+      this.getStatistics(params);
+      this.popover = false;
+    },
     /** 查询参数列表 */
     getList() {
       this.loading = true;
@@ -290,13 +304,16 @@ export default {
         this.loading = false;
       });
     },
-    getStatistics() {
-      getSalesStatistics().then((response) => {
+    getStatistics(params) {
+      let query = {};
+      if (params) {
+        query = params;
+      }
+      getSalesStatistics(query).then((response) => {
         this.Statistics = response.data;
       });
     },
     cascaderChange(val) {
-      console.log(val);
       if (val.length == 1) {
         this.queryParams.categoryId = val[0];
       } else if (val.length == 2) {
@@ -307,6 +324,8 @@ export default {
       // this.getList();
     },
     categoryLazyLoad(node, resolve) {
+      console.log("123123123");
+
       let that = this;
       let level = node.level;
       console.log(node);
@@ -339,11 +358,13 @@ export default {
             value: item.id,
             label: `${item.className}`,
             leaf: level >= 1,
-            // level: 2,
+            level: 1,
           }));
           // 通过调用resolve将子节点数据返回,通知组件数据加载完成
           resolve(nodes);
         });
+      } else {
+        resolve({});
       }
     },
 
@@ -369,6 +390,12 @@ export default {
   },
 };
 </script>
+<style>
+/* .el-input__inner {
+  border: none;
+  padding: 0px;
+} */
+</style>
 <style scoped lang="scss">
 .header {
   margin-bottom: 30px;