Selaa lähdekoodia

首页图表调整

逆水行舟 1 viikko sitten
vanhempi
säilyke
c7a68e31c7

+ 1 - 1
src/benyun/utils/auth.ts

@@ -6,7 +6,7 @@ const ExpiresInKey = "AdminOMS-Expires-In";
 
 export function getToken() {
   if (process.env.NODE_ENV === "development") {
-    return "eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6IjM5YjViMzM1LTA1NzktNDYzMC04YzQ5LWNlNTFjMDE4YzMxOSIsInVzZXJuYW1lIjoiYWRtaW4ifQ.kHWoIl1fchZ3pzO5fHnuR-vb6r6q-o3HwVnU8W6MuEjURmj-IThkRpYZUnsWmWrJutATu4maSP9JsMIfqUA7DQ";
+    return "eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6IjYyMDZlNDQ3LTJmODktNDdlZS04NmEyLTU2YWNjYTg3MTVlYyIsInVzZXJuYW1lIjoiYWRtaW4ifQ.B3dAuBun-KXKKkE8VF705mkm98uTWKpMmIBB87XHC60qCP_jNTsgU_sCV0hivxsreyqw0fk6kXMrEiEgHJJRLA";
   } else {
     return Cookies.get(TokenKey);
   }

+ 39 - 6
src/views/audit/store/components/liveView.vue

@@ -81,16 +81,49 @@ export default class LiveView extends Vue {
             this.liveData = res.data;
             (this.$refs.table2 as any).setValue(this.liveData.warehousingList);
             // (this.$refs.table3 as any).setValue(this.liveData.logisticsList);
-            (this.$refs.table1 as any).setValue([
-                { matter: '创建商品', source: 'OMS', operator: '管理员', time: '2025-07-06 10:01:22' },
-                { matter: '录入商品编号', source: 'OMS', operator: '管理员', time: '2025-07-06 10:05:43' },
-                { matter: '设置商品类别', source: 'OMS', operator: '管理员', time: '2025-07-06 10:10:32' },
-                { matter: '登记供应商', source: 'OMS', operator: '管理员', time: '2025-07-06 10:11:16' },
-            ]);
+            (this.$refs.table1 as any).setValue(this.adjustNode(this.liveData));
         } else {
             this.$message.error(res.msg)
         }
     }
+    //调整节点返回值
+    adjustNode(data: any) {
+        let node: any = [];
+        if (data.logisticsList) {
+            let row = { matter: '物流', source: 'OMS', operator: data.logisticsList.createBy, time: data.logisticsList.createTime };
+            node.push(row);
+        }
+        if (data.warehousingList) {
+            let row = { matter: '仓库', source: 'OMS', operator: data.warehousingList.createBy, time: data.warehousingList.createTime };
+            node.push(row);
+        }
+        if (data.materialSku) {
+            let row = { matter: '物料SKU', source: 'OMS', operator: data.materialSku.createBy, time: data.materialSku.createTime };
+            node.push(row);
+        }
+        if (data.material) {
+            let row = { matter: '物料', source: 'OMS', operator: data.material.createBy, time: data.material.createTime };
+            node.push(row);
+        }
+        if (data.materialCategory) {
+            let row = { matter: '物料分类', source: 'OMS', operator: data.materialCategory.createBy, time: data.materialCategory.createTime };
+            node.push(row);
+        }
+        if (data.organization) {
+            let row = { matter: '机构档案', source: 'OMS', operator: data.organization.createBy, time: data.organization.createTime };
+            node.push(row);
+        }
+
+        //按time升序排序node
+        node.sort((a: any, b: any) => {
+            return new Date(a.time).getTime() - new Date(b.time).getTime();
+        });
+        return node;
+    }
+
+
+
+
     close() {
         if (this.isSuccess) {
             this.$emit('handleSuccess');

+ 1 - 0
src/views/components/businessSale.vue

@@ -47,6 +47,7 @@ export default class Pie01 extends Vue {
         let option: EChartsOption;
         let _data: Array<any> = []
         for (const item of data) {
+            if (item.area === undefined) continue;
             _data.push({
                 name: item.area,
                 value: item.total

+ 1 - 0
src/views/components/orderChannel.vue

@@ -90,6 +90,7 @@ export default class Pie02 extends Vue {
         let option: EChartsOption;
         let _data: Array<any> = []
         for (const item of data) {
+            if (item.shopSite === undefined) continue;
             _data.push({
                 name: item.shopSite,
                 value: item.total

+ 1 - 0
src/views/components/shippingChannel.vue

@@ -98,6 +98,7 @@ export default class Pie02 extends Vue {
         let option: EChartsOption;
         let _data: Array<any> = []
         for (const item of data.consumerShippingChannelList) {
+            if (item.logisticsCompany === undefined) continue;
             _data.push({
                 name: item.logisticsCompany,
                 value: item.total

+ 9 - 9
src/views/components/shopSale.vue

@@ -4,33 +4,33 @@
             <span>平台店铺销售排行</span>
         </div>
         <el-row :gutter="20" style="background-color: #eee;padding:10px;">
-            <el-col :span="6">
+            <el-col :span="4">
                 <span style="font-weight: bold;">排名</span>
             </el-col>
-            <el-col :span="6">
-                <span style="font-weight: bold;">平台店铺</span>
+            <el-col :span="14">
+                <span style="font-weight: bold;">店铺/分销商</span>
             </el-col>
             <el-col :span="6">
                 <span style="font-weight: bold;">销售单数</span>
             </el-col>
-            <el-col :span="6">
+            <!-- <el-col :span="6">
                 <span style="font-weight: bold;">销售件数</span>
-            </el-col>
+            </el-col> -->
         </el-row>
         <el-row v-for="(item, index) in dataList" :key="index" :gutter="20" style="padding:3px">
-            <el-col :span="6">
+            <el-col :span="4">
                 {{ index + 1 }}
             </el-col>
-            <el-col :span="6">
+            <el-col :span="14">
                 <span v-if="item.shopSite === undefined">&nbsp;</span>
                 <span v-else>{{ item.shopSite }}</span>
             </el-col>
             <el-col :span="6">
                 {{ item.total }}
             </el-col>
-            <el-col :span="6">
+            <!-- <el-col :span="8">
                 {{ item.sales }}
-            </el-col>
+            </el-col> -->
         </el-row>
     </div>
 </template>

+ 1 - 1
src/views/distributor/distributor/index.vue

@@ -11,7 +11,7 @@
 
 <script lang="ts">
 import { Component, Prop, Vue, Watch } from "vue-property-decorator";
-import { IResponeData, getDistributorOrder, syncDistributorOrder } from "@/api/omsOrder";
+import { IResponeData, getDistributorOrder } from "@/api/omsOrder";
 @Component({ components: {} })
 export default class Distributor extends Vue {
     timer: any = null

+ 37 - 17
src/views/index.vue

@@ -1,23 +1,19 @@
 <template>
   <div class="index-box">
     <total />
-    <div class="index-row">
-      <div class="top-box">
-        <pie01 />
-      </div>
-      <div class="top-box">
-        <!-- <rose /> -->
-        <OrderChannel />
-      </div>
-      <div class="top-box">
-        <!-- <pie02 /> -->
-        <BusinessSale />
-      </div>
-      <div class="top-box">
-        <!-- <pie02 /> -->
-        <ShippingChannel />
-      </div>
-    </div>
+    <el-row>
+      <el-col :span="12">
+        <div style="height: 500px;">
+          <pie01 />
+        </div>
+      </el-col>
+      <el-col :span="12">
+        <div style="height: 500px;">
+          <ShippingChannel />
+        </div>
+      </el-col>
+    </el-row>
+
     <div class="index-row">
       <div class="bottom-box">
         <ShopSale />
@@ -31,6 +27,30 @@
         <!-- <line01 /> -->
       </div>
     </div>
+
+    <el-row>
+      <el-col :span="12">
+        <div style="height: 500px;">
+          <OrderChannel />
+        </div>
+      </el-col>
+      <el-col :span="12">
+        <div style="height: 500px;">
+          <BusinessSale />
+        </div>
+      </el-col>
+    </el-row>
+    <!-- <div class="index-row">
+      <div class="top-box"></div>
+      <div class="top-box">
+        <OrderChannel />
+      </div>
+      <div class="top-box">
+
+        <BusinessSale />
+      </div>
+      <div class="top-box"></div>
+    </div> -->
   </div>
 </template>
 

+ 8 - 2
src/views/oms/B2COrder/components/syncDistributor.vue

@@ -3,7 +3,7 @@
         title="同步订单(分销商)">
         <el-form ref="form" :model="form" label-width="100px">
             <el-form-item label="分销商" prop="shopId">
-                <el-select v-model="form.channelCompanyId" placeholder="请选择分销商">
+                <el-select v-model="form.channelCompanyId" placeholder="请选择分销商" @change="handleChangeItem">
                     <el-option v-for="(item, index) in shopList" :label="item.companyName"
                         :value="item.channelCompanyId"></el-option>
                 </el-select>
@@ -35,12 +35,17 @@ export default class AddConfig extends Vue {
     load = false;
     shopList: { channelCompanyId: number, companyName: string }[] = [];
     form = {
+        distributorName: '',
         channelCompanyId: null as number | null,
         modifiedBegin: '',
         modifiedEnd: ''
     }
     hide() {
 
+    }
+    handleChangeItem(item) {
+        //按channelCompanyId查询分销商名称
+        this.form.distributorName = this.shopList.find(i => i.channelCompanyId == item)?.companyName || '';
     }
     async loadShop() {
         this.load = true;
@@ -50,7 +55,7 @@ export default class AddConfig extends Vue {
             return;
         }
         this.shopList = res.rows
-        console.info(this.shopList)
+        //console.info(this.shopList)
     }
     setShow(v: boolean) {
         this.loadShop();
@@ -101,6 +106,7 @@ export default class AddConfig extends Vue {
             }).finally(() => {
                 this.load = false;
                 this.form = {
+                    distributorName: '',
                     channelCompanyId: null as number | null,
                     modifiedBegin: '',
                     modifiedEnd: ''

+ 6 - 1
src/views/oms/B2COrder/index.vue

@@ -8,7 +8,7 @@
               基本信息<i class="header-icon el-icon-info" title="精确搜索"></i>
             </template>
             <input-select :options="myOptions" @input="parameChange" ref="searchCom01" />
-            <input-select :options="jstOption" @input="parameChange" ref="searchCom01_1" />
+            <input-select :options="jstOption" @input="parameChangeJST" ref="searchCom01_1" />
             <input-select :options="outLineOptions" @input="parameChangeBase($event, 'idType', 'idValue')"
               ref="searchCom02" />
             <input-select :options="buyerOptions" @input="parameChangeInfo($event, 'receiverInfo', 'receiverValue')"
@@ -1070,6 +1070,11 @@ export default class Order extends Vue {
   onChange(v: any, code: string) {
     this.value[code] = v;
   }
+  parameChangeJST(parames: any) {
+    //获得parames的key
+    let key = Object.keys(parames)[0];
+    this.value[key] = parames[key];
+  }
   parameChange(parames: any) {
     for (const key in parames) {
       if (parames[key]) {