From 228f757634d7427f4b7bea72053a81d7a4723e62 Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期五, 23 一月 2026 18:45:40 +0800
Subject: [PATCH] 1
---
项目代码/WIDESEA_WMSClient/src/views/system/Sys_User.vue | 4
项目代码/WIDESEA_WMSClient/src/views/stock/stockInfo.vue | 2
/dev/null | 0
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs | 54 +-
项目代码/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue | 2
项目代码/WMS无仓储版/WIDESEA_WMSServer/BigGreenService/BigGreenService.cs | 56 ++
项目代码/WIDESEA_WMSClient/src/views/Home.vue | 957 +++++++++++++++-----------------------------------
项目代码/WIDESEA_WMSClient/src/views/stock/stockInfoDetailByMaterielSum.vue | 2
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_StockService/StockDetailByMaterielService.cs | 8
项目代码/WIDESEA_WMSClient/src/views/system/Sys_Role.vue | 4
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoDetailService.cs | 51 ++
11 files changed, 425 insertions(+), 715 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/Home.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/Home.vue"
index d941502..9ad82a0 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/Home.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/Home.vue"
@@ -5,9 +5,7 @@
<el-col :span="4">
<div class="stats-card">
<div class="metric-icon">
- <el-icon :size="32">
- <Box />
- </el-icon>
+ <el-icon :size="32"><Box /></el-icon>
</div>
<div class="card-title">寰呭叆搴撹鍗�</div>
<div class="card-value">{{ bigscreendata.unInBoundOrderCount }}</div>
@@ -16,9 +14,7 @@
<el-col :span="4">
<div class="stats-card">
<div class="metric-icon">
- <el-icon :size="32">
- <Document />
- </el-icon>
+ <el-icon :size="32"><Document /></el-icon>
</div>
<div class="card-title">寰呭嚭搴撹鍗�</div>
<div class="card-value">{{ bigscreendata.unOutBoundOrderCount }}</div>
@@ -27,9 +23,7 @@
<el-col :span="4">
<div class="stats-card">
<div class="metric-icon">
- <el-icon :size="32">
- <Download />
- </el-icon>
+ <el-icon :size="32"><Download /></el-icon>
</div>
<div class="card-title">浠婃棩鍏ュ簱瀹屾垚绠辨暟</div>
<div class="card-value">{{ bigscreendata.inboundCount }}</div>
@@ -38,9 +32,7 @@
<el-col :span="4">
<div class="stats-card">
<div class="metric-icon">
- <el-icon :size="32">
- <Upload />
- </el-icon>
+ <el-icon :size="32"><Upload /></el-icon>
</div>
<div class="card-title">浠婃棩鍑哄簱瀹屾垚绠辨暟</div>
<div class="card-value">{{ bigscreendata.outboundCount }}</div>
@@ -49,9 +41,7 @@
<el-col :span="4">
<div class="stats-card">
<div class="metric-icon">
- <el-icon :size="32">
- <Box />
- </el-icon>
+ <el-icon :size="32"><Box /></el-icon>
</div>
<div class="card-title">鏈夎揣鏂欑</div>
<div class="card-value">{{ formatNumber(bigscreendata.inStockPallet) }}</div>
@@ -60,9 +50,7 @@
<el-col :span="4">
<div class="stats-card">
<div class="metric-icon">
- <el-icon :size="32">
- <Box />
- </el-icon>
+ <el-icon :size="32"><Box /></el-icon>
</div>
<div class="card-title">绌虹鏁伴噺</div>
<div class="card-value">{{ formatNumber(bigscreendata.freeStockPallet) }}</div>
@@ -114,32 +102,29 @@
</el-col>
<el-col :span="8">
<div class="chart-card">
- <div class="chart-title">杩�7鏃ュ嚭鍏ュ簱鍗曟嵁瓒嬪娍锛堝浘鍍忓寲璧板娍锛�</div>
+ <div class="chart-title">杩�7鏃ュ嚭鍏ュ簱鍗曟嵁瓒嬪娍</div>
<div ref="stockTrendRef" class="chart-container"></div>
</div>
</el-col>
</el-row>
- <!-- 鍥捐〃鍖哄煙锛堢浜岃锛� -->
- <el-row :gutter="20" class="chart-row">
- </el-row>
-
- <!-- 琛ㄦ牸鍖哄煙 - 瀹炴椂浣滀笟鐩戞帶 -->
+ <!-- 琛ㄦ牸鍖哄煙 - 瀹炴椂浣滀笟鐩戞帶锛堝尯鍒嗘甯�/澶辫触浣滀笟锛� -->
<el-row :gutter="20" class="table-row" width="100%">
- <el-col :span="24">
+ <!-- 宸︿晶锛氬綋澶╂甯镐綔涓氬崟鎹� -->
+ <el-col :span="12">
<div class="table-card">
- <div class="table-title">瀹炴椂浣滀笟鐩戞帶</div>
+ <div class="table-title">瀹炴椂浣滀笟鐩戞帶锛堟甯稿崟鎹級</div>
<el-table
- :data="showTaskList"
+ :data="normalShowTaskList"
border
style="width: 100%;"
- :empty-text="showTaskList.length === 0 ? '鏆傛棤浣滀笟鏁版嵁' : ''"
+ :empty-text="normalShowTaskList.length === 0 ? '鏆傛棤姝e父浣滀笟鏁版嵁' : ''"
>
<el-table-column prop="upperOrderNo" label="鍗曟嵁缂栧彿" />
<el-table-column label="鍗曟嵁鐘舵��" >
<template #default="{ row }">
<span class="task-status" :class="getStatusClass(row.taskStatus)">
- {{ getTaskStatusText(row.taskStatus) }}
+ {{ getTaskStatusText(row.taskStatus, row.taskType) }}
</span>
</template>
</el-table-column>
@@ -163,7 +148,62 @@
<el-table-column prop="modifyDate" label="淇敼鏃堕棿"/>
</el-table>
<div class="table-pagination">
- <el-pagination layout="prev, pager, next, jumper" :current-page="1" :total="mergedTaskList.length" />
+ <el-pagination
+ layout="prev, pager, next, jumper"
+ v-model:current-page="normalCurrentPage"
+ :page-size="5"
+ :total="normalTaskList.length"
+ @current-change="handleNormalPageChange"
+ />
+ </div>
+ </div>
+ </el-col>
+ <!-- 鍙充晶锛氳繎3澶╁洖浼犲け璐�/閮ㄥ垎澶辫触鍗曟嵁 -->
+ <el-col :span="12">
+ <div class="table-card">
+ <div class="table-title">瀹炴椂浣滀笟鐩戞帶锛堝洖浼犲け璐ワ級</div>
+ <el-table
+ :data="failShowTaskList"
+ border
+ style="width: 100%;"
+ :empty-text="failShowTaskList.length === 0 ? '鏆傛棤鍥炰紶澶辫触鏁版嵁' : ''"
+ >
+ <el-table-column prop="upperOrderNo" label="鍗曟嵁缂栧彿" />
+ <el-table-column label="鍗曟嵁鐘舵��" >
+ <template #default="{ row }">
+ <span class="task-status" :class="getStatusClass(row.taskStatus)">
+ {{ getTaskStatusText(row.taskStatus, row.taskType) }}
+ </span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鍗曟嵁绫诲瀷" >
+ <template #default="{ row }">
+ <span class="task-type" :class="getTypeClass(row.taskType)">
+ {{ getTaskTypeText(row) }}
+ </span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鍥炰紶MES鐘舵��" >
+ <template #default="{ row }">
+ <span class="task-status" :class="getMESStatusClass(row.returnToMESStatus)">
+ {{ getMESStatusText(row.returnToMESStatus) }}
+ </span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="remark" label="澶辫触鍘熷洜" show-overflow-tooltip />
+ <el-table-column prop="factoryArea" label="鍘傚尯" />
+ <el-table-column prop="modifier" label="淇敼浜�" />
+ <el-table-column prop="createDate" label="鍒涘缓鏃堕棿"/>
+ <el-table-column prop="modifyDate" label="淇敼鏃堕棿"/>
+ </el-table>
+ <div class="table-pagination">
+ <el-pagination
+ layout="prev, pager, next, jumper"
+ v-model:current-page="failCurrentPage"
+ :page-size="5"
+ :total="failTaskList.length"
+ @current-change="handleFailPageChange"
+ />
</div>
</div>
</el-col>
@@ -172,13 +212,13 @@
</template>
<script setup>
-import { ref, onMounted, onUnmounted, nextTick, computed } from 'vue';
+import { ref, onMounted, onUnmounted, nextTick, computed, watch } from 'vue';
import * as echarts from 'echarts';
import http from "@/api/http.js";
import { Box, Document, Download, Upload } from '@element-plus/icons-vue';
import { ElMessage } from 'element-plus';
-// 鍝嶅簲寮忔暟鎹� - 鏂板 completeTask 瀛楁
+// 鍝嶅簲寮忔暟鎹�
const bigscreendata = ref({
totalStockQuantity: 0,
unOutBoundOrderCount: 0,
@@ -189,7 +229,7 @@
inStockPallet: 0,
freeStockPallet: 0,
dailyInOutBoundList: [],
- completeTask: [], // 鏂板锛氬悗绔繑鍥炵殑宓屽浠诲姟鏁版嵁
+ completeTask: [], // 鍚庣杩斿洖鐨勪换鍔℃暟鎹紙褰撳ぉ姝e父+杩�3澶╁け璐ワ級
inboundCount: 0,
outboundCount: 0,
inventoryLocationDist: [],
@@ -202,30 +242,18 @@
const expirationList = bigscreendata.value.nearExpirationList || [];
const uniqueMap = new Map();
expirationList.forEach(item => {
- const uniqueKey = [
- item.materielCode,
- item.batchNo,
- item.palletCode,
- ].join('|');
- if (!uniqueMap.has(uniqueKey)) {
- uniqueMap.set(uniqueKey, item);
- }
+ const uniqueKey = [item.materielCode, item.batchNo, item.palletCode].join('|');
+ if (!uniqueMap.has(uniqueKey)) uniqueMap.set(uniqueKey, item);
});
const uniqueExpirationList = Array.from(uniqueMap.values());
return uniqueExpirationList.map(item => {
const daysToExpiration = item.daysToExpiration || 0;
let expireLevel = '';
- if (daysToExpiration < 0) {
- expireLevel = '宸茶繃鏈�';
- } else if (daysToExpiration <= 7) {
- expireLevel = '7澶╁唴涓存湡';
- } else if (daysToExpiration <= 15) {
- expireLevel = '15澶╁唴涓存湡';
- } else if (daysToExpiration <= 30) {
- expireLevel = '30澶╁唴涓存湡';
- } else {
- expireLevel = '30澶╀互涓�';
- }
+ if (daysToExpiration < 0) expireLevel = '宸茶繃鏈�';
+ else if (daysToExpiration <= 7) expireLevel = '7澶╁唴涓存湡';
+ else if (daysToExpiration <= 15) expireLevel = '15澶╁唴涓存湡';
+ else if (daysToExpiration <= 30) expireLevel = '30澶╁唴涓存湡';
+ else expireLevel = '30澶╀互涓�';
return {
materielCode: item.materielCode,
materielName: item.materielName,
@@ -241,13 +269,11 @@
});
});
-// 绌烘暟鎹彁绀烘枃鏈紙淇濇寔涓嶅彉锛�
const emptyText = computed(() => {
const expirationList = bigscreendata.value.nearExpirationList || [];
return expirationList.length === 0 ? '鏆傛棤涓存湡鐗╂枡鏁版嵁' : '';
});
-// 鑾峰彇涓存湡绛夌骇鏍峰紡绫伙紙淇濇寔涓嶅彉锛�
const getExpireLevelClass = (level) => {
switch(level) {
case '宸茶繃鏈�': return 'expire-level expired';
@@ -259,38 +285,22 @@
}
};
-// 鏍稿績锛氬叆搴�/鍑哄簱涓氬姟绫诲瀷鏋氫妇鏄犲皠
+// 涓氬姟绫诲瀷鏄犲皠
const inboundBusinessTypeMap = {
- 11: "閲囪喘鍏ュ簱",
- 12: "鏉傛敹鍗�",
- 13: "鐢熶骇閫�鏂欏崟",
- 14: "澶栧崗閫�鏂欏崟",
- 15: "閿�鍞��搴撳崟",
- 3: "璋冩嫧鍏ュ簱鍗�"
+ 11: "閲囪喘鍏ュ簱", 12: "鏉傛敹鍗�", 13: "鐢熶骇閫�鏂欏崟",
+ 14: "澶栧崗閫�鏂欏崟", 15: "閿�鍞��搴撳崟", 3: "璋冩嫧鍏ュ簱鍗�"
};
-
const outboundBusinessTypeMap = {
- 21: "宸ュ崟棰嗘枡鍑哄簱鍗�",
- 22: "鏉傚彂鍗�",
- 23: "閫�璐у崟",
- 24: "閿�鍞嚭搴撳崟",
- 25: "澶栧崗棰嗘枡鐢宠鍗�",
- 2: "璋冩嫧鍑哄簱鍗�",
+ 21: "宸ュ崟棰嗘枡鍑哄簱鍗�", 22: "鏉傚彂鍗�", 23: "閫�璐у崟",
+ 24: "閿�鍞嚭搴撳崟", 25: "澶栧崗棰嗘枡鐢宠鍗�", 2: "璋冩嫧鍑哄簱鍗�"
};
-// 鏍稿績淇敼锛氫粠 completeTask 涓彁鍙栬鍗曟暟鎹�
-const mergedTaskList = computed(() => {
- // 1. 鑾峰彇 completeTask 鏁扮粍锛屽鐞嗙┖鍊�
- const completeTaskList = bigscreendata.value.completeTask || [];
- // 2. 鍙栫涓�涓厓绱狅紙鍚庣杩斿洖鏁扮粍闀垮害涓�1锛�
- const taskData = completeTaskList[0] || {};
- // 3. 鎻愬彇鍏ュ簱/鍑哄簱璁㈠崟锛屽鐞嗙┖鍊�
+// 鎷嗗垎锛氬綋澶╂甯镐綔涓氬崟鎹�
+const normalTaskList = computed(() => {
+ const taskData = (bigscreendata.value.completeTask[0] || {});
const inboundOrders = taskData.inboundOrders || [];
const outboundOrders = taskData.outboundOrders || [];
-
- console.log('浠巆ompleteTask鎻愬彇鐨勫叆搴撹鍗曪細', inboundOrders);
- console.log('浠巆ompleteTask鎻愬彇鐨勫嚭搴撹鍗曪細', outboundOrders);
-
+
// 鏍煎紡鍖栧叆搴撹鍗�
const formattedInbound = inboundOrders.map(item => ({
upperOrderNo: item.upperOrderNo || item.inboundOrderNo,
@@ -298,12 +308,13 @@
taskType: 'inbound',
businessType: item.businessType || '',
returnToMESStatus: item.returnToMESStatus || 0,
- factoryArea: item.factoryArea,
- modifier: item.modifier,
- createDate: item.createDate,
- modifyDate: item.modifyDate
+ factoryArea: item.factoryArea || '',
+ modifier: item.modifier || '',
+ createDate: item.createDate || '',
+ modifyDate: item.modifyDate || '',
+ remark: item.remark || ''
}));
-
+
// 鏍煎紡鍖栧嚭搴撹鍗�
const formattedOutbound = outboundOrders.map(item => ({
upperOrderNo: item.upperOrderNo || item.orderNo,
@@ -311,106 +322,106 @@
taskType: 'outbound',
businessType: item.businessType || '',
returnToMESStatus: item.returnToMESStatus || 0,
- factoryArea: item.factoryArea,
- modifier: item.modifier,
- createDate: item.createDate,
- modifyDate: item.modifyDate
+ factoryArea: item.factoryArea || '',
+ modifier: item.modifier || '',
+ createDate: item.createDate || '',
+ modifyDate: item.modifyDate || '',
+ remark: item.remark || ''
}));
-
- const merged = [...formattedInbound, ...formattedOutbound];
- console.log('鏈�缁堝悎骞剁殑浣滀笟鍒楄〃锛�', merged);
- return merged;
+
+ return [...formattedInbound, ...formattedOutbound];
});
-// 璁㈠崟鐘舵�佹槧灏�
-const orderStatusMap = {
- 0: "鏈紑濮�",
-};
+// 鎷嗗垎锛氳繎3澶╁洖浼犲け璐�/閮ㄥ垎澶辫触鍗曟嵁
+const failTaskList = computed(() => {
+ const taskData = (bigscreendata.value.completeTask[0] || {});
+ const inboundFailOrders = taskData.inboundReturnFailOrders || [];
+ const outboundFailOrders = taskData.outboundReturnFailOrders || [];
+
+ const formattedInboundFail = inboundFailOrders.map(item => ({
+ upperOrderNo: item.upperOrderNo || item.inboundOrderNo,
+ taskStatus: item.orderStatus || 0,
+ taskType: 'inbound',
+ businessType: item.businessType || '',
+ returnToMESStatus: item.returnToMESStatus || 0,
+ factoryArea: item.factoryArea || '',
+ modifier: item.modifier || '',
+ createDate: item.createDate || '',
+ modifyDate: item.modifyDate || '',
+ remark: item.remark || ''
+ }));
+
+ const formattedOutboundFail = outboundFailOrders.map(item => ({
+ upperOrderNo: item.upperOrderNo || item.orderNo,
+ taskStatus: item.orderStatus || 0,
+ taskType: 'outbound',
+ businessType: item.businessType || '',
+ returnToMESStatus: item.returnToMESStatus || 0,
+ factoryArea: item.factoryArea || '',
+ modifier: item.modifier || '',
+ createDate: item.createDate || '',
+ modifyDate: item.modifyDate || '',
+ remark: item.remark || ''
+ }));
+
+ return [...formattedInboundFail, ...formattedOutboundFail];
+});
-// 鑾峰彇璁㈠崟鐘舵�佹枃鏈�
-const getTaskStatusText = (statusNum) => {
- if (statusNum === 1) {
- if (statusNum.taskType === 'inbound') {
- return "鍏ュ簱涓�";
- } else if (statusNum.taskType === 'outbound') {
- return "鍑哄簱涓�";
- } else {
- return "澶勭悊涓�";
- }
- }
- return orderStatusMap[statusNum];
+// 鍒嗛〉&杞挱鐩稿叧鍝嶅簲寮忓彉閲�
+const normalCurrentPage = ref(1);
+const failCurrentPage = ref(1);
+const normalShowTaskList = ref([]);
+const failShowTaskList = ref([]);
+let normalCarouselTimer = null;
+let failCarouselTimer = null;
+
+// 淇锛氬崟鎹姸鎬佹枃鏈紙鏂板taskType鍙傛暟锛�
+const getTaskStatusText = (statusNum, taskType) => {
+ const statusMap = {
+ 0: "鏈紑濮�",
+ 1: taskType === 'inbound' ? "鍏ュ簱涓�" : (taskType === 'outbound' ? "鍑哄簱涓�" : "澶勭悊涓�"),
+ 2: "澶勭悊涓�",
+ 3: "宸插畬鎴�",
+ 4: "宸插彇娑�",
+ 5: "寮傚父"
+ };
+ return statusMap[statusNum] ;
};
// MES鍥炰紶鐘舵�佹槧灏�
const mesStatusMap = {
- 0: "鏈洖浼�",
- 1: "鍥炰紶鎴愬姛",
- 2: "鍥炰紶澶辫触",
- 3: "閮ㄥ垎鍥炰紶鎴愬姛",
- 4: "閮ㄥ垎鍥炰紶澶辫触",
+ 0: "鏈洖浼�", 1: "鍥炰紶鎴愬姛", 2: "鍥炰紶澶辫触",
+ 3: "閮ㄥ垎鍥炰紶鎴愬姛", 4: "閮ㄥ垎鍥炰紶澶辫触"
};
-
-// 鑾峰彇MES鍥炰紶鐘舵�佹枃鏈�
const getMESStatusText = (statusNum) => {
- if (statusNum === undefined || statusNum === null || isNaN(statusNum)) {
- return "鏈煡鐘舵��";
- }
+ if (statusNum === undefined || statusNum === null || isNaN(statusNum)) return "鏈煡鐘舵��";
return mesStatusMap[statusNum] || `鏈煡鐘舵��(${statusNum})`;
};
-
-// 鑾峰彇MES鍥炰紶鐘舵�佹牱寮忕被
const getMESStatusClass = (statusNum) => {
- if (statusNum === undefined || statusNum === null || isNaN(statusNum)) {
- return "status-unknown";
- }
- if (statusNum === 0) return "status-pending";
- if (statusNum === 1) return "status-completed";
- if (statusNum === 2) return "status-error";
- if (statusNum === 3) return "status-processing";
- if (statusNum === 4) return "status-error";
- return "status-unknown";
+ if (statusNum === undefined || statusNum === null || isNaN(statusNum)) return "status-unknown";
+ const classMap = { 0: "status-pending", 1: "status-completed", 2: "status-error", 3: "status-processing", 4: "status-error" };
+ return classMap[statusNum] || "status-unknown";
};
-// 鑾峰彇鍗曟嵁绫诲瀷鏂囨湰
+// 鍗曟嵁绫诲瀷鏂囨湰/鏍峰紡
const getTaskTypeText = (row) => {
const businessType = Number(row.businessType) || 0;
-
if (row.taskType === 'inbound') {
- const typeName = inboundBusinessTypeMap[businessType] || `鏈煡绫诲瀷(${businessType})`;
- return `${typeName}`;
+ return inboundBusinessTypeMap[businessType] || `鏈煡绫诲瀷(${businessType})`;
} else if (row.taskType === 'outbound') {
- const typeName = outboundBusinessTypeMap[businessType] || `鏈煡绫诲瀷(${businessType})`;
- return `${typeName}`;
- } else {
- return "鍏朵粬浣滀笟";
+ return outboundBusinessTypeMap[businessType] || `鏈煡绫诲瀷(${businessType})`;
}
+ return "鍏朵粬浣滀笟";
};
-
-// 鑾峰彇浠诲姟鐘舵�佹牱寮忕被
const getStatusClass = (statusNum) => {
- if (statusNum === undefined || statusNum === null || isNaN(statusNum)) {
- return "status-unknown";
- }
- if (statusNum === 3) return "status-completed";
- if (statusNum === 2) return "status-processing";
- if (statusNum === 0) return "status-pending";
- if (statusNum === 4) return "status-canceled";
- if (statusNum === 5) return "status-error";
- if (statusNum === 1) return "status-completed";
- return "status-unknown";
+ if (statusNum === undefined || statusNum === null || isNaN(statusNum)) return "status-unknown";
+ const classMap = { 0: "status-pending", 1: "status-processing", 2: "status-processing", 3: "status-completed", 4: "status-canceled", 5: "status-error" };
+ return classMap[statusNum] || "status-unknown";
};
-
-// 鑾峰彇浠诲姟绫诲瀷鏍峰紡绫�
const getTypeClass = (taskType) => {
- if (taskType === 'inbound') return "type-inbound";
- if (taskType === 'outbound') return "type-outbound";
- return "type-other";
+ const classMap = { 'inbound': "type-inbound", 'outbound': "type-outbound" };
+ return classMap[taskType] || "type-other";
};
-
-// 琛ㄦ牸鏄剧ず鐨勪换鍔″垪琛紙杞挱鐢級
-const showTaskList = ref([]);
-const currentTaskIndex = ref(0);
-let taskCarouselTimer = null;
// 鏁板瓧鏍煎紡鍖�
const formatNumber = (num) => {
@@ -418,41 +429,71 @@
return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
};
-// 杞挱閫昏緫
-const startTaskCarousel = () => {
- if (taskCarouselTimer) clearInterval(taskCarouselTimer);
+// 鍒濆鍖栬〃鏍兼暟鎹紙鍒嗛〉+杞挱锛�
+const initTableData = () => {
+ // 鍋滄鏃у畾鏃跺櫒
+ clearInterval(normalCarouselTimer);
+ clearInterval(failCarouselTimer);
- const totalTask = mergedTaskList.value.length;
- console.log('浣滀笟鍒楄〃鎬绘暟锛�', totalTask);
+ // 姝e父鍗曟嵁鍒嗛〉/杞挱
+ const loadNormalData = (page) => {
+ const start = (page - 1) * 5;
+ const end = start + 5;
+ normalShowTaskList.value = normalTaskList.value.slice(start, end);
+ };
+ loadNormalData(normalCurrentPage.value);
- if (totalTask <= 5) {
- showTaskList.value = [...mergedTaskList.value];
- } else {
- showTaskList.value = mergedTaskList.value.slice(0, 5);
- currentTaskIndex.value = 5;
+ // 澶辫触鍗曟嵁鍒嗛〉/杞挱
+ const loadFailData = (page) => {
+ const start = (page - 1) * 5;
+ const end = start + 5;
+ failShowTaskList.value = failTaskList.value.slice(start, end);
+ };
+ loadFailData(failCurrentPage.value);
+
+ // 杞挱閫昏緫锛堜粎鏁版嵁瓒呰繃5鏉℃椂寮�鍚級
+ if (normalTaskList.value.length > 5) {
+ normalCarouselTimer = setInterval(() => {
+ normalCurrentPage.value = normalCurrentPage.value >= Math.ceil(normalTaskList.value.length / 5) ? 1 : normalCurrentPage.value + 1;
+ loadNormalData(normalCurrentPage.value);
+ }, 5000);
}
-
- if (totalTask > 5) {
- taskCarouselTimer = setInterval(() => {
- showTaskList.value.shift();
- showTaskList.value.push(mergedTaskList.value[currentTaskIndex.value]);
- currentTaskIndex.value++;
- if (currentTaskIndex.value >= totalTask) {
- currentTaskIndex.value = 0;
- }
+ if (failTaskList.value.length > 5) {
+ failCarouselTimer = setInterval(() => {
+ failCurrentPage.value = failCurrentPage.value >= Math.ceil(failTaskList.value.length / 5) ? 1 : failCurrentPage.value + 1;
+ loadFailData(failCurrentPage.value);
}, 5000);
}
};
+
+// 鍒嗛〉鍒囨崲浜嬩欢
+const handleNormalPageChange = (page) => {
+ clearInterval(normalCarouselTimer); // 鎵嬪姩鍒囨崲鍒嗛〉鏃跺仠姝㈣疆鎾�
+ normalCurrentPage.value = page;
+ const start = (page - 1) * 5;
+ const end = start + 5;
+ normalShowTaskList.value = normalTaskList.value.slice(start, end);
+};
+const handleFailPageChange = (page) => {
+ clearInterval(failCarouselTimer);
+ failCurrentPage.value = page;
+ const start = (page - 1) * 5;
+ const end = start + 5;
+ failShowTaskList.value = failTaskList.value.slice(start, end);
+};
+
+// 鐩戝惉鏁版嵁鍙樺寲锛岄噸鏂板垵濮嬪寲琛ㄦ牸
+watch([normalTaskList, failTaskList], () => {
+ initTableData();
+}, { deep: true });
// 鑾峰彇鍚庣鏁版嵁
const fetchBigGreenData = async () => {
try {
const res = await http.get('/api/BigScreen/GetBigGreenData');
- console.log('鍚庣鍘熷鏁版嵁锛�', res.data);
-
bigscreendata.value = res.data || res;
nextTick(() => {
- startTaskCarousel();
+ initTableData();
refreshCharts();
});
} catch (error) {
@@ -461,141 +502,29 @@
}
};
-// 澶囩敤妯℃嫙鏁版嵁
-const operationList = ref([
- { opNo: 'JW251224001', opType: '鍏ュ簱', operator: '寮犱笁', startTime: '15:30:22', status: '澶勭悊涓�' },
- { opNo: 'CK251224002', opType: '鍑哄簱', operator: '鏉庡洓', startTime: '15:25:10', status: '宸插畬鎴�' },
- { opNo: 'PD251224003', opType: '鐩樼偣', operator: '鐜嬩簲', startTime: '15:20:05', status: '寰呯‘璁�' },
- { opNo: 'SC251224005', opType: '涓婃灦', operator: '瀛欎竷', startTime: '15:10:18', status: '寮傚父' }
-]);
-
-// 鍥捐〃鐩稿叧鏂规硶锛堜繚鎸佷笉鍙橈級
-const inventoryPieRef = ref(null);
+// 鍥捐〃鐩稿叧锛堢簿绠�鍐椾綑閫昏緫锛�
const stockTrendRef = ref(null);
const locationRateRef = ref(null);
-const exceptionTrendRef = ref(null);
-
-let inventoryPieChart = null;
let stockTrendChart = null;
let locationRateChart = null;
-let exceptionTrendChart = null;
-
-const initInventoryPie= () => {
- if (!inventoryPieRef.value) return;
- if (inventoryPieChart) {
- inventoryPieChart.dispose();
- }
- inventoryPieChart = echarts.init(inventoryPieRef.value);
- const locationData = bigscreendata.value.inventoryLocationDist.length
- ? bigscreendata.value.inventoryLocationDist
- : [
- { value: 48.7, name: '甯告俯鍖篈鍖�', itemStyle: { color: '#5470c6' } },
- { value: 29.2, name: '鍐疯棌鍖築鍖�', itemStyle: { color: '#91cc75' } },
- { value: 21.9, name: '淇濈◣鍖篊鍖�', itemStyle: { color: '#fac858' } },
- { value: 2.2, name: '娈嬫鍝佸尯D鍖�', itemStyle: { color: '#ee6666' } }
- ];
- const option = {
- tooltip: {
- trigger: 'item',
- formatter: '{a} <br/>{b}: {c}%'
- },
- legend: {
- bottom: 0,
- left: 'center',
- data: locationData.map(item => item.name)
- },
- series: [{
- name: '搴撳瓨搴撲綅鍒嗗竷',
- type: 'pie',
- radius: ['40%', '70%'],
- center: ['50%', '40%'],
- avoidLabelOverlap: false,
- itemStyle: {
- borderRadius: 10,
- borderColor: '#fff',
- borderWidth: 2
- },
- label: {
- show: false,
- position: 'center'
- },
- emphasis: {
- label: {
- show: true,
- fontSize: 20,
- fontWeight: 'bold'
- }
- },
- labelLine: {
- show: false
- },
- data: locationData
- }]
- };
- inventoryPieChart.setOption(option);
- return inventoryPieChart;
-};
const initStockTrend = () => {
if (!stockTrendRef.value) return;
- if (stockTrendChart) {
- stockTrendChart.dispose();
- }
+ if (stockTrendChart) stockTrendChart.dispose();
stockTrendChart = echarts.init(stockTrendRef.value);
const trendData = bigscreendata.value.dailyInOutBoundList;
const maxInbound = trendData.length ? Math.max(...trendData.map(item => item.dailyInboundQuantity || 0)) : 0;
const maxOutbound = trendData.length ? Math.max(...trendData.map(item => item.dailyOutboundQuantity || 0)) : 0;
const maxValue = Math.max(maxInbound, maxOutbound);
const option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross'
- }
- },
- legend: {
- data: ['鍏ュ簱閲�', '鍑哄簱閲�'],
- top: 10
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- top: '15%',
- containLabel: true
- },
- xAxis: {
- type: 'category',
- boundaryGap: true,
- data: trendData.map(item => item.date)
- },
- yAxis: {
- type: 'value',
- name: '鏁伴噺',
- min: 0,
- max: maxValue > 0 ? Math.ceil(maxValue * 1.2) : 10
- },
+ tooltip: { trigger: 'axis', axisPointer: { type: 'cross' } },
+ legend: { data: ['鍏ュ簱閲�', '鍑哄簱閲�'], top: 10 },
+ grid: { left: '3%', right: '4%', bottom: '3%', top: '15%', containLabel: true },
+ xAxis: { type: 'category', boundaryGap: true, data: trendData.map(item => item.date) },
+ yAxis: { type: 'value', name: '鏁伴噺', min: 0, max: maxValue > 0 ? Math.ceil(maxValue * 1.2) : 10 },
series: [
- {
- name: '鍏ュ簱閲�',
- type: 'bar',
- barWidth: '30%',
- data: trendData.map(item => item.dailyInboundQuantity),
- itemStyle: {
- color: '#52c41a',
- borderRadius: [4, 4, 0, 0]
- }
- },
- {
- name: '鍑哄簱閲�',
- type: 'bar',
- barWidth: '30%',
- data: trendData.map(item => item.dailyOutboundQuantity),
- itemStyle: {
- color: '#1890ff',
- borderRadius: [4, 4, 0, 0]
- }
- }
+ { name: '鍏ュ簱閲�', type: 'bar', barWidth: '30%', data: trendData.map(item => item.dailyInboundQuantity), itemStyle: { color: '#52c41a', borderRadius: [4, 4, 0, 0] } },
+ { name: '鍑哄簱閲�', type: 'bar', barWidth: '30%', data: trendData.map(item => item.dailyOutboundQuantity), itemStyle: { color: '#1890ff', borderRadius: [4, 4, 0, 0] } }
]
};
stockTrendChart.setOption(option);
@@ -604,206 +533,67 @@
const initLocationRate = () => {
if (!locationRateRef.value) return;
- if (locationRateChart) {
- locationRateChart.dispose();
- }
+ if (locationRateChart) locationRateChart.dispose();
locationRateChart = echarts.init(locationRateRef.value);
const utilizationRate = bigscreendata.value.locationUtilizationRate || 0;
const freeRate = 100 - utilizationRate;
const option = {
- tooltip: {
- trigger: 'item',
- formatter: '{b}: {c}%'
- },
- legend: {
- bottom: 0,
- left: 'center',
- data: ['宸插崰鐢ㄥ簱浣�', '绌洪棽搴撲綅'],
- textStyle: { fontSize: 12, color: '#666' }
- },
+ tooltip: { trigger: 'item', formatter: '{b}: {c}%' },
+ legend: { bottom: 0, left: 'center', data: ['宸插崰鐢ㄥ簱浣�', '绌洪棽搴撲綅'], textStyle: { fontSize: 12, color: '#666' } },
graphic: [
- {
- type: 'text',
- left: 'right',
- top: '10%',
- style: {
- text: `${utilizationRate}%`,
- fontSize: 24,
- fontWeight: 'bold',
- fill: '#333'
- }
- },
- {
- type: 'text',
- left: 'right',
- top: '25%',
- style: {
- text: '搴撲綅鍒╃敤鐜�',
- fontSize: 14,
- fill: '#666'
- }
- }
+ { type: 'text', left: 'right', top: '10%', style: { text: `${utilizationRate}%`, fontSize: 24, fontWeight: 'bold', fill: '#333' } },
+ { type: 'text', left: 'right', top: '25%', style: { text: '搴撲綅鍒╃敤鐜�', fontSize: 14, fill: '#666' } }
],
- series: [
- {
- type: 'pie',
- radius: ['50%', '70%'],
- center: ['40%', '50%'],
- avoidLabelOverlap: false,
- label: { show: false },
- labelLine: { show: false },
- data: [
- { value: utilizationRate, name: '宸插崰鐢ㄥ簱浣�', itemStyle: { color: '#1890ff' } },
- { value: freeRate, name: '绌洪棽搴撲綅', itemStyle: { color: '#e5e9f2' } }
- ]
- }
- ]
+ series: [{
+ type: 'pie', radius: ['50%', '70%'], center: ['40%', '50%'],
+ avoidLabelOverlap: false, label: { show: false }, labelLine: { show: false },
+ data: [
+ { value: utilizationRate, name: '宸插崰鐢ㄥ簱浣�', itemStyle: { color: '#1890ff' } },
+ { value: freeRate, name: '绌洪棽搴撲綅', itemStyle: { color: '#e5e9f2' } }
+ ]
+ }]
};
locationRateChart.setOption(option);
return locationRateChart;
};
-const initExceptionTrend = () => {
- if (!exceptionTrendRef.value) return;
- if (exceptionTrendChart) {
- exceptionTrendChart.dispose();
- }
- exceptionTrendChart = echarts.init(exceptionTrendRef.value);
- const exceptionData = bigscreendata.value.exceptionTypeTrend.length
- ? bigscreendata.value.exceptionTypeTrend
- : {
- dates: ['12-18', '12-19', '12-20', '12-21', '12-22', '12-23', '12-24'],
- stockShort: [10, 11, 9, 12, 10, 13, 12],
- orderTimeout: [8, 9, 7, 8, 7, 9, 8],
- locationException: [4, 5, 2, 4, 3, 5, 4],
- checkDiff: [2, 3, 1, 2, 1, 3, 2]
- };
- const option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross'
- }
- },
- legend: {
- data: ['搴撳瓨涓嶈冻', '璁㈠崟瓒呮椂', '搴撲綅寮傚父', '鐩樼偣宸紓'],
- top: 10
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- top: '15%',
- containLabel: true
- },
- xAxis: {
- type: 'category',
- boundaryGap: false,
- data: exceptionData.dates
- },
- yAxis: {
- type: 'value',
- name: '寮傚父鏁伴噺'
- },
- series: [
- {
- name: '搴撳瓨涓嶈冻',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 8,
- data: exceptionData.stockShort,
- itemStyle: { color: '#ff4d4f' },
- lineStyle: { width: 3 }
- },
- {
- name: '璁㈠崟瓒呮椂',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 8,
- data: exceptionData.orderTimeout,
- itemStyle: { color: '#faad14' },
- lineStyle: { width: 3 }
- },
- {
- name: '搴撲綅寮傚父',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 8,
- data: exceptionData.locationException,
- itemStyle: { color: '#722ed1' },
- lineStyle: { width: 3 }
- },
- {
- name: '鐩樼偣宸紓',
- type: 'line',
- smooth: true,
- symbol: 'circle',
- symbolSize: 8,
- data: exceptionData.checkDiff,
- itemStyle: { color: '#13c2c2' },
- lineStyle: { width: 3 }
- }
- ]
- };
- exceptionTrendChart.setOption(option);
- return exceptionTrendChart;
-};
-
const refreshCharts = () => {
- const charts = [
- initStockTrend,
- initLocationRate
- ];
- charts.forEach(initFunc => {
+ [initStockTrend, initLocationRate].forEach(initFunc => {
const chart = initFunc();
- if (chart) {
- chart.resize();
- }
+ if (chart) chart.resize();
});
};
+// 闃叉姈澶勭悊resize浜嬩欢
+let resizeTimer = null;
const handleResize = () => {
- const charts = [
- inventoryPieChart,
- stockTrendChart,
- locationRateChart,
- exceptionTrendChart
- ];
- charts.forEach(chart => {
- if (chart) {
- chart.resize();
- }
- });
+ clearTimeout(resizeTimer);
+ resizeTimer = setTimeout(() => {
+ [stockTrendChart, locationRateChart].forEach(chart => {
+ if (chart) chart.resize();
+ });
+ }, 200);
};
-// 缁勪欢鐢熷懡鍛ㄦ湡
+// 鐢熷懡鍛ㄦ湡
onMounted(() => {
fetchBigGreenData();
nextTick(() => {
- initInventoryPie();
initStockTrend();
initLocationRate();
- initExceptionTrend();
window.addEventListener('resize', handleResize);
});
});
onUnmounted(() => {
- const charts = [
- inventoryPieChart,
- stockTrendChart,
- locationRateChart,
- exceptionTrendChart
- ];
- charts.forEach(chart => {
- if (chart) {
- chart.dispose();
- }
+ // 閿�姣佸浘琛ㄥ拰瀹氭椂鍣�
+ [stockTrendChart, locationRateChart].forEach(chart => {
+ if (chart) chart.dispose();
});
- clearInterval(taskCarouselTimer);
+ [normalCarouselTimer, failCarouselTimer, resizeTimer].forEach(timer => {
+ clearInterval(timer);
+ clearTimeout(timer);
+ });
window.removeEventListener('resize', handleResize);
});
</script>
@@ -817,20 +607,7 @@
font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
-.header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 20px;
- background: white;
- padding: 15px 20px;
- border-radius: 8px;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
-}
-
-.stats-card-row,
-.chart-row,
-.table-row {
+.stats-card-row, .chart-row, .table-row {
margin-bottom: 20px;
}
@@ -896,10 +673,6 @@
background-clip: text;
}
-.card-change {
- margin-top: 3px;
-}
-
.chart-card {
height: 400px;
padding: 24px;
@@ -945,44 +718,16 @@
font-size: 12px;
font-weight: 500;
}
-.expire-level.expired {
- background-color: #fff2f0;
- color: #ff4d4f;
- border: 1px solid #ffccc7;
-}
-.expire-level.urgent {
- background-color: #fff7e6;
- color: #fa8c16;
- border: 1px solid #ffd591;
-}
-.expire-level.warning {
- background-color: #f6ffed;
- color: #52c41a;
- border: 1px solid #b7eb8f;
-}
-.expire-level.normal {
- background-color: #e6f7ff;
- color: #1890ff;
- border: 1px solid #91d5ff;
-}
-.expire-level.low {
- background-color: #f0f2f5;
- color: #666666;
- border: 1px solid #d9d9d9;
-}
-.expire-level.default {
- background-color: #fafafa;
- color: #8c8c8c;
- border: 1px solid #e8e8e8;
-}
+.expire-level.expired { background-color: #fff2f0; color: #ff4d4f; border: 1px solid #ffccc7; }
+.expire-level.urgent { background-color: #fff7e6; color: #fa8c16; border: 1px solid #ffd591; }
+.expire-level.warning { background-color: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
+.expire-level.normal { background-color: #e6f7ff; color: #1890ff; border: 1px solid #91d5ff; }
+.expire-level.low { background-color: #f0f2f5; color: #666666; border: 1px solid #d9d9d9; }
+.expire-level.default { background-color: #fafafa; color: #8c8c8c; border: 1px solid #e8e8e8; }
-.text-red {
- color: #ff4d4f;
- font-weight: 500;
-}
+.text-red { color: #ff4d4f; font-weight: 500; }
-.chart-title,
-.table-title {
+.chart-title, .table-title {
display: flex;
justify-content: space-between;
align-items: center;
@@ -994,10 +739,6 @@
border-left: 4px solid #409eff;
position: relative;
letter-spacing: 0.5px;
-}
-
-.view-btn {
- font-size: 12px;
}
.table-card {
@@ -1029,67 +770,26 @@
overflow: hidden;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
+:deep(.el-table th) { background-color: #f5f7fa; color: #606266; font-weight: 600; padding: 12px 0; }
+:deep(.el-table td) { padding: 12px 0; }
+:deep(.el-table--border) { border-radius: 6px; }
+:deep(.el-table--border::after), :deep(.el-table--group::after), :deep(.el-table::before), :deep(.el-table__fixed-right::before), :deep(.el-table__fixed::before) { display: none; }
-:deep(.el-table th) {
- background-color: #f5f7fa;
- color: #606266;
- font-weight: 600;
- padding: 12px 0;
-}
-
-:deep(.el-table td) {
- padding: 12px 0;
-}
-
-:deep(.el-table--border) {
- border-radius: 6px;
-}
-
-:deep(.el-table--border::after) {
- display: none;
-}
-
-:deep(.el-table--group::after) {
- display: none;
-}
-
-:deep(.el-table::before) {
- display: none;
-}
-
-:deep(.el-table__fixed-right::before) {
- display: none;
-}
-
-:deep(.el-table__fixed::before) {
- display: none;
-}
-
-:deep(.el-pagination) {
- margin-top: 10px;
-}
-
-:deep(.el-pagination .btn-prev),
-:deep(.el-pagination .btn-next),
-:deep(.el-pagination .el-pager li) {
+:deep(.el-pagination .btn-prev), :deep(.el-pagination .btn-next), :deep(.el-pagination .el-pager li) {
border-radius: 4px;
margin: 0 2px;
transition: all 0.3s;
}
-
-:deep(.el-pagination .btn-prev:hover),
-:deep(.el-pagination .btn-next:hover),
-:deep(.el-pagination .el-pager li:hover) {
+:deep(.el-pagination .btn-prev:hover), :deep(.el-pagination .btn-next:hover), :deep(.el-pagination .el-pager li:hover) {
transform: translateY(-2px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
-
:deep(.el-pagination .el-pager li.active) {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: #fff;
}
-.task-status {
+.task-status, .task-type {
display: inline-block;
padding: 6px 12px;
border-radius: 20px;
@@ -1102,94 +802,17 @@
letter-spacing: 0.5px;
}
-.status-pending {
- background-color: rgba(64, 158, 255, 0.1);
- color: #409eff;
- border: 1px solid rgba(64, 158, 255, 0.2);
-}
+.status-pending { background-color: rgba(64, 158, 255, 0.1); color: #409eff; border: 1px solid rgba(64, 158, 255, 0.2); }
+.status-processing { background-color: rgba(103, 194, 58, 0.1); color: #67c23a; border: 1px solid rgba(103, 194, 58, 0.2); }
+.status-completed { background-color: rgba(103, 194, 58, 0.1); color: #67c23a; border: 1px solid rgba(103, 194, 58, 0.2); }
+.status-suspended { background-color: rgba(230, 162, 60, 0.1); color: #e6a23c; border: 1px solid rgba(230, 162, 60, 0.2); }
+.status-canceled { background-color: rgba(144, 147, 153, 0.1); color: #909399; border: 1px solid rgba(144, 147, 153, 0.2); }
+.status-error { background-color: rgba(245, 108, 108, 0.1); color: #f56c6c; border: 1px solid rgba(245, 108, 108, 0.2); }
+.status-unknown { background-color: rgba(144, 147, 153, 0.1); color: #909399; border: 1px solid rgba(144, 147, 153, 0.2); }
-.status-processing {
- background-color: rgba(103, 194, 58, 0.1);
- color: #67c23a;
- border: 1px solid rgba(103, 194, 58, 0.2);
-}
-
-.status-completed {
- background-color: rgba(103, 194, 58, 0.1);
- color: #67c23a;
- border: 1px solid rgba(103, 194, 58, 0.2);
-}
-
-.status-suspended {
- background-color: rgba(230, 162, 60, 0.1);
- color: #e6a23c;
- border: 1px solid rgba(230, 162, 60, 0.2);
-}
-
-.status-canceled {
- background-color: rgba(144, 147, 153, 0.1);
- color: #909399;
- border: 1px solid rgba(144, 147, 153, 0.2);
-}
-
-.status-error {
- background-color: rgba(245, 108, 108, 0.1);
- color: #f56c6c;
- border: 1px solid rgba(245, 108, 108, 0.2);
-}
-
-.status-unknown {
- background-color: rgba(144, 147, 153, 0.1);
- color: #909399;
- border: 1px solid rgba(144, 147, 153, 0.2);
-}
-
-.task-type {
- display: inline-block;
- padding: 6px 12px;
- border-radius: 20px;
- font-size: 13px;
- font-weight: 500;
- text-align: center;
- min-width: 80px;
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
- transition: all 0.2s ease;
- letter-spacing: 0.5px;
-}
-
-
-
-.type-inbound {
- background-color: rgba(64, 158, 255, 0.1);
- color: #409eff;
- border: 1px solid rgba(64, 158, 255, 0.2);
-}
-
-.type-outbound {
- background-color: rgba(103, 194, 58, 0.1);
- color: #67c23a;
- border: 1px solid rgba(103, 194, 58, 0.2);
-}
-
-.type-transfer {
- background-color: rgba(230, 162, 60, 0.1);
- color: #e6a23c;
- border: 1px solid rgba(230, 162, 60, 0.2);
-}
-
-.type-other {
- background-color: rgba(144, 147, 153, 0.1);
- color: #909399;
- border: 1px solid rgba(144, 147, 153, 0.2);
-}
-
-.type-unknown {
- background-color: rgba(144, 147, 153, 0.1);
- color: #909399;
- border: 1px solid rgba(144, 147, 153, 0.2);
-}
-
-.btn-group {
- margin-left: 10px;
-}
+.type-inbound { background-color: rgba(64, 158, 255, 0.1); color: #409eff; border: 1px solid rgba(64, 158, 255, 0.2); }
+.type-outbound { background-color: rgba(103, 194, 58, 0.1); color: #67c23a; border: 1px solid rgba(103, 194, 58, 0.2); }
+.type-transfer { background-color: rgba(230, 162, 60, 0.1); color: #e6a23c; border: 1px solid rgba(230, 162, 60, 0.2); }
+.type-other { background-color: rgba(144, 147, 153, 0.1); color: #909399; border: 1px solid rgba(144, 147, 153, 0.2); }
+.type-unknown { background-color: rgba(144, 147, 153, 0.1); color: #909399; border: 1px solid rgba(144, 147, 153, 0.2); }
</style>
\ No newline at end of file
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfo.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfo.vue"
index 288ffb0..ba23a85 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfo.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfo.vue"
@@ -41,7 +41,7 @@
const searchFormOptions = ref([
[
{ title: "鎵樼洏缂栧彿", field: "palletCode", type: 'like' },
- { title: "璐т綅缂栧彿", field: "locationCode", type: "like" },
+ { title: "璐т綅缂栧彿", field: "locationCode", type: 'like' },
{ title: "鎵樼洏绫诲瀷", field: "palletType", type: "select", dataKey: "palletType", data: [] },
],
]);
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue"
index d0d612f..8af5dc1 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue"
@@ -75,7 +75,7 @@
],
[
{ title: "搴撳瓨鐘舵��", field: "status", type: 'select', dataKey: "stockStatusEmun", data: [] },
- { title: "浠撳簱", field: "warehouseCode", type: 'select', dataKey: "wareHouse", data: [] },
+ { title: "浠撳簱", field: "warehouseCode", type: 'select', dataKey: "warehouse", data: [] },
],
]);
const columns = ref([
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfoDetailByMaterielSum.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfoDetailByMaterielSum.vue"
index dfab069..81dd365 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfoDetailByMaterielSum.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/stock/stockInfoDetailByMaterielSum.vue"
@@ -71,7 +71,7 @@
{ title: "渚涘簲鍟嗙紪鍙�", field: "supplyCode", type: 'like' },
],
[
- { title: "浠撳簱", field: "warehouseCode", type: 'select', dataKey: "wareHouse", data: [] },
+ { title: "浠撳簱", field: "warehouseCode", type: 'select', dataKey: "warehouse", data: [] },
]
]);
const columns = ref([
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/system/Sys_Role.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/system/Sys_Role.vue"
index 7da98d2..d45ff2b 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/system/Sys_Role.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/system/Sys_Role.vue"
@@ -80,8 +80,8 @@
});
const searchFormOptions = ref([
[
- { title: "瑙掕壊鍚嶇О", field: "roleName", type: "text" },
- { title: "閮ㄩ棬ID", field: "deptId", type: "text" },
+ { title: "瑙掕壊鍚嶇О", field: "roleName", type: "like" },
+ { title: "閮ㄩ棬ID", field: "deptId", type: "like" },
{
dataKey: "enable",
data: [],
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/system/Sys_User.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/system/Sys_User.vue"
index b53cf53..a5db8c3 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/system/Sys_User.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/system/Sys_User.vue"
@@ -101,8 +101,8 @@
});
const searchFormOptions = ref([
[
- { title: "甯愬彿", field: "userName" },
- { title: "濮撳悕", field: "userTrueName" },
+ { title: "甯愬彿", field: "userName", type:'like' },
+ { title: "濮撳悕", field: "userTrueName", type:'like' },
{
dataKey: "gender",
data: [],
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db"
deleted file mode 100644
index 2a93723..0000000
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db"
+++ /dev/null
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db"
deleted file mode 100644
index 7ca1092..0000000
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db"
+++ /dev/null
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/BigGreenService/BigGreenService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/BigGreenService/BigGreenService.cs"
index c796e21..dfb1776 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/BigGreenService/BigGreenService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/BigGreenService/BigGreenService.cs"
@@ -164,22 +164,46 @@
public List<SimpleStatisticsDTO> SimpleStatistics()
{
- var targetStatuses = new List<int>
- {
- (int)InOrderStatusEnum.鍏ュ簱涓�,
- (int)InOrderStatusEnum.鏈紑濮�,
- (int)OutOrderStatusEnum.鏈紑濮�,
- (int)OutOrderStatusEnum.鍑哄簱涓�
- };
- var inboundList = _inboundRepository.QueryData(x => x.CreateDate.ToString("MM-dd") == DateTime.Now.ToString("MM-dd") && targetStatuses.Contains(x.OrderStatus)).ToList();
- var outboundList = _outBoundOrderRepository.QueryData(x => x.CreateDate.ToString("MM-dd") == DateTime.Now.ToString("MM-dd") && targetStatuses.Contains(x.OrderStatus)).ToList();
+ var today = DateTime.Now.Date;
+ var threeDaysAgo = today.AddDays(-3);
- var stats = new List<SimpleStatisticsDTO> { new SimpleStatisticsDTO
- {
- inboundOrders =inboundList,
- outboundOrders = outboundList
- } };
- return stats;
+ var targetStatuses = new List<int> { (int)InOrderStatusEnum.鍏ュ簱涓�, (int)InOrderStatusEnum.鏈紑濮�,
+ (int)OutOrderStatusEnum.鏈紑濮�, (int)OutOrderStatusEnum.鍑哄簱涓� };
+ var failReturnStatuses = new List<int> {4,2};
+
+ var inboundToday = QueryInboundOrders(today, today, targetStatuses);
+ var outboundToday = QueryOutboundOrders(today, today, targetStatuses);
+ var inboundFail3Days = QueryInboundOrders(threeDaysAgo, today, failReturnStatuses, isReturnStatus: true);
+ var outboundFail3Days = QueryOutboundOrders(threeDaysAgo, today, failReturnStatuses, isReturnStatus: true);
+
+
+ return new List<SimpleStatisticsDTO> { new()
+ {
+ inboundOrders = inboundToday,
+ outboundOrders = outboundToday,
+ inboundReturnFailOrders = inboundFail3Days,
+ outboundReturnFailOrders = outboundFail3Days
+ }};
+ }
+
+
+ private List<Dt_InboundOrder> QueryInboundOrders(DateTime startDate, DateTime endDate,
+ List<int> statusList, bool isReturnStatus = false)
+ {
+ return _inboundRepository.QueryData(x =>
+ x.CreateDate.Date >= startDate &&
+ x.CreateDate.Date <= endDate &&
+ (isReturnStatus ? statusList.Contains(x.ReturnToMESStatus) : statusList.Contains(x.OrderStatus))).ToList();
+ }
+
+
+ private List<Dt_OutboundOrder> QueryOutboundOrders(DateTime startDate, DateTime endDate,
+ List<int> statusList, bool isReturnStatus = false)
+ {
+ return _outBoundOrderRepository.QueryData(x =>
+ x.CreateDate.Date >= startDate &&
+ x.CreateDate.Date <= endDate &&
+ (isReturnStatus ? statusList.Contains(x.ReturnToMESStatus) : statusList.Contains(x.OrderStatus))).ToList();
}
/// <summary>
@@ -277,6 +301,8 @@
{
public List<Dt_InboundOrder> inboundOrders { get; set; }
public List<Dt_OutboundOrder> outboundOrders { get; set; }
+ public List<Dt_InboundOrder> inboundReturnFailOrders { get; set; }
+ public List<Dt_OutboundOrder> outboundReturnFailOrders { get; set; }
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_StockService/StockDetailByMaterielService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_StockService/StockDetailByMaterielService.cs"
index 3f1ee11..7ca9282 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_StockService/StockDetailByMaterielService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_StockService/StockDetailByMaterielService.cs"
@@ -58,15 +58,14 @@
searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_StockInfoDetail.MaterielName).FirstLetterToLower());
if (searchParameters != null)
{
-
- sugarQueryable1 = sugarQueryable1.LeftJoin(sugarQueryable3, (d, m) => d.MaterielCode == m.MaterielCode)
- .Where((d, m) => m.MaterielName.Equals(searchParameters.Value));
+
+ sugarQueryable1 = sugarQueryable1.Where(x => x.MaterielName.Contains(searchParameters.Value));
}
searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_StockInfoDetail.BatchNo).FirstLetterToLower());
if (searchParameters != null)
{
- sugarQueryable1 = sugarQueryable1.Where(x => x.BatchNo.Equals(searchParameters.Value));
+ sugarQueryable1 = sugarQueryable1.Where(x => x.BatchNo.Contains(searchParameters.Value));
}
searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_StockInfoDetail.SupplyCode).FirstLetterToLower());
@@ -74,6 +73,7 @@
{
sugarQueryable1 = sugarQueryable1.Where(x => x.SupplyCode.Contains(searchParameters.Value));
}
+
}
}
catch (Exception ex)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoDetailService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoDetailService.cs"
index 37acfdf..001a4fc 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoDetailService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoDetailService.cs"
@@ -37,8 +37,6 @@
public PageGridData<StockInfoDetailWithPalletDto> GetPageData2(PageDataOptions options)
{
- string wheres = ValidatePageOptions(options);
-
var sugarQueryable = Db.Queryable<Dt_StockInfoDetail>().InnerJoin<Dt_StockInfo>((detail, item) => detail.StockId == item.Id)
.Where((detail, item) => item.StockStatus == StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt());
@@ -84,6 +82,54 @@
{
sugarQueryable = sugarQueryable.Where((detail, item) => item.PalletCode.Contains(param.Value));
}
+ if (param.Name.Equals(nameof(Dt_StockInfoDetail.MaterielCode).FirstLetterToLower(), StringComparison.OrdinalIgnoreCase)
+ && !string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ string queryValue = param.Value.ToString().Trim();
+ sugarQueryable = sugarQueryable.Where((detail, item) => detail.MaterielCode.Contains(queryValue));
+ }
+ if (param.Name.Equals(nameof(Dt_StockInfoDetail.MaterielName).FirstLetterToLower(), StringComparison.OrdinalIgnoreCase)
+ && !string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ string queryValue = param.Value.ToString().Trim();
+ sugarQueryable = sugarQueryable.Where((detail, item) => detail.MaterielName.Contains(queryValue));
+ }
+ if (param.Name.Equals(nameof(Dt_StockInfoDetail.OrderNo).FirstLetterToLower(), StringComparison.OrdinalIgnoreCase)
+ && !string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ string queryValue = param.Value.ToString().Trim();
+ sugarQueryable = sugarQueryable.Where((detail, item) => detail.OrderNo.Contains(queryValue));
+ }
+ if (param.Name.Equals(nameof(Dt_StockInfoDetail.BatchNo).FirstLetterToLower(), StringComparison.OrdinalIgnoreCase)
+ && !string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ string queryValue = param.Value.ToString().Trim();
+ sugarQueryable = sugarQueryable.Where((detail, item) => detail.BatchNo.Contains(queryValue));
+ }
+ if (param.Name.Equals(nameof(Dt_StockInfoDetail.Barcode).FirstLetterToLower(), StringComparison.OrdinalIgnoreCase)
+ && !string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ string queryValue = param.Value.ToString().Trim();
+ sugarQueryable = sugarQueryable.Where((detail, item) => detail.Barcode.Contains(queryValue));
+ }
+ if (param.Name.Equals(nameof(Dt_StockInfoDetail.MaterielCode).FirstLetterToLower(), StringComparison.OrdinalIgnoreCase)
+ && !string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ string queryValue = param.Value.ToString().Trim();
+ sugarQueryable = sugarQueryable.Where((detail, item) => detail.MaterielCode.Contains(queryValue));
+ }
+ if (param.Name.Equals(nameof(Dt_StockInfoDetail.Status).FirstLetterToLower(), StringComparison.OrdinalIgnoreCase)
+ && !string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ string queryValue = param.Value.ToString().Trim();
+ sugarQueryable = sugarQueryable.Where((detail, item) => detail.Status.Equals(queryValue));
+ }
+ if (param.Name.Equals(nameof(Dt_StockInfoDetail.WarehouseCode).FirstLetterToLower(), StringComparison.OrdinalIgnoreCase)
+ && !string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ string queryValue = param.Value.ToString().Trim();
+ sugarQueryable = sugarQueryable.Where((detail, item) => detail.WarehouseCode.Equals(queryValue));
+ }
}
}
}
@@ -92,7 +138,6 @@
}
}
var data = sugarQueryable
- .WhereIF(!wheres.IsNullOrEmpty(), wheres)
.OrderBy(orderByModels)
.Select((detail, item) => new StockInfoDetailWithPalletDto
{
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs"
index 0c4dcb3..5b2b67e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs"
@@ -552,31 +552,47 @@
public override PageGridData<Dt_StockInfo> GetPageData(PageDataOptions options)
{
- string wheres = ValidatePageOptions(options);
- //鑾峰彇鎺掑簭瀛楁
- Dictionary<string, SqlSugar.OrderByType> orderbyDic = GetPageDataSort(options, TProperties);
+ ISugarQueryable<Dt_StockInfo> sugarQueryable = Db.Queryable<Dt_StockInfo>();
+
+ ValidatePageOptions(options, ref sugarQueryable);
+
List<OrderByModel> orderByModels = new List<OrderByModel>();
- foreach (var item in orderbyDic)
+
+ if (OrderByParameters != null)
{
- OrderByModel orderByModel = new()
+ foreach (var item in OrderByParameters)
{
- FieldName = item.Key,
- OrderByType = item.Value
- };
- orderByModels.Add(orderByModel);
+ OrderByModel orderByModel = new OrderByModel()
+ {
+ FieldName = item.Key,
+ OrderByType = item.Value
+ };
+ orderByModels.Add(orderByModel);
+ }
}
- ISugarQueryable<Dt_StockInfo> sugarQueryable1 = BaseDal.Db.Queryable<Dt_StockInfo>();
+ if (EnableWebOrderBy)
+ {
+ //鑾峰彇鎺掑簭瀛楁
+ Dictionary<string, SqlSugar.OrderByType> orderbyDic = GetPageDataSort(options, TProperties);
- int totalCount = 0;
- List<SearchParameters> searchParametersList = new List<SearchParameters>();
-
- var data = sugarQueryable1
- .WhereIF(!wheres.IsNullOrEmpty(), wheres)
- .Where(x => !string.IsNullOrEmpty(x.LocationCode))
- .OrderBy(orderByModels)
- .ToPageList(options.Page, options.Rows, ref totalCount);
+ foreach (var item in orderbyDic)
+ {
+ OrderByModel orderByModel = new OrderByModel()
+ {
+ FieldName = item.Key,
+ OrderByType = item.Value
+ };
+ orderByModels.Add(orderByModel);
+ }
+ }
- return new PageGridData<Dt_StockInfo>(totalCount, data);
+ int total = 0;
+ PageGridData<Dt_StockInfo> pageGridData = new PageGridData<Dt_StockInfo>();
+ sugarQueryable = sugarQueryable.OrderBy(orderByModels);
+ pageGridData.Rows = sugarQueryable.ToPageList(options.Page, options.Rows, ref total);
+ pageGridData.Total = total;
+
+ return pageGridData;
}
}
}
--
Gitblit v1.9.3