Quellcode durchsuchen

更新首页订单状态的回显

Huanyi vor 1 Woche
Ursprung
Commit
76c950520f
6 geänderte Dateien mit 38 neuen und 15 gelöschten Zeilen
  1. 1 1
      .env.production
  2. BIN
      dist.zip
  3. 4 4
      src/api/erp/client/types.ts
  4. 15 0
      src/api/system/customer/types.ts
  5. 2 2
      src/views/customer/index.vue
  6. 16 8
      src/views/index.vue

+ 1 - 1
.env.production

@@ -15,7 +15,7 @@ VITE_APP_MONITOR_ADMIN = '/admin/applications'
 VITE_APP_SNAILJOB_ADMIN = '/snail-job'
 
 # 生产环境
-VITE_APP_BASE_API = 'https://domain.com/api'
+VITE_APP_BASE_API = 'http://192.168.1.78/api'
 
 # 是否在打包时开启压缩,支持 gzip 和 brotli
 VITE_BUILD_COMPRESS = gzip

BIN
dist.zip


+ 4 - 4
src/api/erp/client/types.ts

@@ -6,17 +6,17 @@ export interface ErpClientVO {
   /**
    * 序号(主键)
    */
-  frowId: string;
+  rowId: string;
 
   /**
    * 代码
    */
-  fnum: string;
+  num: string;
 
   /**
    * 名称
    */
-  fname: string;
+  name: string;
 
   /**
    * 客户简称
@@ -26,7 +26,7 @@ export interface ErpClientVO {
   /**
    * 分类(国内,国外)
    */
-  fclass: string;
+  clientClass: string;
 
   /**
    * 销售部门

+ 15 - 0
src/api/system/customer/types.ts

@@ -29,6 +29,21 @@ export interface CustomerVO {
    */
   authClientFRowID: string;
 
+  /**
+   * 授权客户名称
+   */
+  authClientName?: string;
+
+  /**
+   * 授权客户类型
+   */
+  authClientClass?: string;
+
+  /**
+   * 授权加入时间
+   */
+  authClientEnterDate?: string;
+
   /**
    * 头像地址
    */

+ 2 - 2
src/views/customer/index.vue

@@ -71,8 +71,8 @@
                     :formatter="(row: ErpClientVO) => row.num || '-'" />
                 <el-table-column label="名称" align="left" prop="name" min-width="180" :show-overflow-tooltip="true"
                     :formatter="(row: ErpClientVO) => row.name || '-'" />
-                <el-table-column label="客户类型" align="center" prop="class" width="100"
-                    :formatter="(row: ErpClientVO) => row.class || '-'" />
+                <el-table-column label="客户类型" align="center" prop="clientClass" width="100"
+                    :formatter="(row: ErpClientVO) => row.clientClass || '-'" />
                 <el-table-column label="加入名称" align="center" prop="enterName" width="100"
                     :formatter="(row: ErpClientVO) => row.enterName || '-'" />
                 <el-table-column label="加入时间" align="center" prop="enterDate" width="170"

+ 16 - 8
src/views/index.vue

@@ -62,14 +62,14 @@
           <div class="chart-subtitle">各状态订单数量占比</div>
         </div>
         <div class="chart-legend">
-          <div v-for="stat in statistics" :key="stat.label" class="legend-item">
+          <div v-for="stat in statistics.slice(1)" :key="stat.label" class="legend-item">
             <span class="legend-dot" :style="{ background: stat.color }"></span>
             <span class="legend-label">{{ stat.label }}</span>
           </div>
         </div>
       </div>
       <div class="chart-body">
-        <div v-for="(stat, idx) in statistics" :key="stat.label" class="chart-row">
+        <div v-for="(stat, idx) in statistics.slice(1)" :key="stat.label" class="chart-row">
           <div class="chart-row-label">
             <span class="chart-row-dot" :style="{ background: stat.color }"></span>
             {{ stat.label }}
@@ -106,10 +106,14 @@ const router = useRouter();
 const loading = ref(false);
 
 const statistics = ref([
-  { label: '全部订单', count: 0, color: '#4F6EF7', bgColor: '#EEF1FE', icon: 'order' },
-  { label: '待审核', count: 0, color: '#F7A83E', bgColor: '#FEF6E6', icon: 'wait' },
-  { label: '生产中', count: 0, color: '#5FDBA7', bgColor: '#E8FBF2', icon: 'success' },
-  { label: '已完成', count: 0, color: '#409EFF', bgColor: '#ECF5FF', icon: 'finish' }
+  { label: '全部订单', count: 0, color: '#4F6EF7', bgColor: '#EEF1FE', icon: 'star' },
+  { label: '待确认', count: 0, color: '#FF9900', bgColor: '#FFF7E6', icon: 'time' },
+  { label: '已确认', count: 0, color: '#1890FF', bgColor: '#E6F7FF', icon: 'checkbox' },
+  { label: '已审核', count: 0, color: '#52C41A', bgColor: '#F6FFED', icon: 'log' },
+  { label: '已签批', count: 0, color: '#722ED1', bgColor: '#F9F0FF', icon: 'edit' },
+  { label: '挤压完成', count: 0, color: '#13C2C2', bgColor: '#E6FFFB', icon: 'component' },
+  { label: '生产完成', count: 0, color: '#2F54EB', bgColor: '#F0F5FF', icon: 'finish' },
+  { label: '已取消', count: 0, color: '#F5222D', bgColor: '#FFF1F0', icon: 'money' }
 ]);
 
 const currentDate = computed(() => {
@@ -146,8 +150,12 @@ function loadStatistics() {
     const total = Object.values(data).reduce((sum: number, v: any) => sum + (Number(v) || 0), 0);
     statistics.value[0].count = total;
     statistics.value[1].count = data[0] || 0;
-    statistics.value[2].count = data[3] || 0;
-    statistics.value[3].count = data[4] || 0;
+    statistics.value[2].count = data[1] || 0;
+    statistics.value[3].count = data[2] || 0;
+    statistics.value[4].count = data[3] || 0;
+    statistics.value[5].count = data[4] || 0;
+    statistics.value[6].count = data[5] || 0;
+    statistics.value[7].count = data[6] || 0;
   }).finally(() => {
     loading.value = false;
   });