抓取生产工单,抓取发料异常
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
<el-select v-model="searchParams.issue_status" placeholder="发料情况" style="width: 150px" clearable @change="handleSearch">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option label="发料正常" value="发料正常"></el-option>
|
||||
<el-option label="发料异常" value="发料异常"></el-option>
|
||||
<el-option label="未发料" value="未发料"></el-option>
|
||||
</el-select>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">搜索</el-button>
|
||||
@@ -123,7 +124,10 @@
|
||||
|
||||
<el-table-column prop="issue_status" label="发料情况" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.issue_status === '超领发料' ? 'danger' : (scope.row.issue_status === '未发料' ? 'info' : 'warning')" size="small" v-text="scope.row.issue_status">
|
||||
<el-tag
|
||||
:type="scope.row.issue_status === '发料异常' ? 'danger' : (scope.row.issue_status === '未发料' ? 'info' : (scope.row.issue_status === '发料正常' ? 'success' : 'warning'))"
|
||||
size="small"
|
||||
v-text="scope.row.issue_status">
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -171,6 +171,7 @@
|
||||
<div class="header">
|
||||
<h2>📊 BOM 成本期间对比分析表</h2>
|
||||
<div>
|
||||
<el-button type="info" plain icon="el-icon-back" @click="goBack" size="small">返回主控台</el-button>
|
||||
<el-button type="text" @click="goToBomTree">返回雷达图</el-button>
|
||||
<el-button type="text" @click="goToReceipts">返回收货明细</el-button>
|
||||
</div>
|
||||
@@ -435,7 +436,8 @@
|
||||
this.searchParents();
|
||||
},
|
||||
methods: {
|
||||
goToReceipts() { window.location.href = '/'; },
|
||||
goBack() { window.location.href = '/'; },
|
||||
goToReceipts() { window.location.href = '/receipts'; },
|
||||
goToBomTree() { window.location.href = '/bom'; },
|
||||
|
||||
getStatusText(status) {
|
||||
|
||||
@@ -122,7 +122,8 @@
|
||||
<div class="header">
|
||||
<h2>🕸️ ERP 动态 BOM 成本核算雷达图</h2>
|
||||
<div>
|
||||
<el-button type="primary" @click="goToCompare" plain>切换至 BOM 期间成本对比</el-button>
|
||||
<el-button type="info" plain icon="el-icon-back" @click="goBack" size="small">返回主控台</el-button>
|
||||
<el-button type="primary" @click="goToCompare" plain size="small">切换至 BOM 期间成本对比</el-button>
|
||||
<el-button type="text" @click="goToReceipts">返回收货明细</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -233,9 +234,12 @@
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
goToReceipts() {
|
||||
goBack() {
|
||||
window.location.href = '/';
|
||||
},
|
||||
goToReceipts() {
|
||||
window.location.href = '/receipts';
|
||||
},
|
||||
goToCompare() {
|
||||
window.location.href = '/compare';
|
||||
},
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
<div v-if="logs.length === 0" style="color: #666; text-align: center; margin-top: 150px;">
|
||||
暂无后台任务输出...
|
||||
</div>
|
||||
<div v-for="(log, index) in logs" :key="index" style="margin-bottom: 2px;">
|
||||
{{ log }}
|
||||
<div v-for="(log, index) in logs" :key="index" style="margin-bottom: 2px;" :style="getLogStyle(log)" v-text="log">
|
||||
</div>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@@ -62,6 +61,17 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getLogStyle(log) {
|
||||
if (!log) return '';
|
||||
if (log.includes('✅') || log.includes('大功告成')) return 'color: #67C23A; font-weight: bold;'; // 绿色
|
||||
if (log.includes('❌') || log.includes('ERR') || log.includes('失败') || log.includes('异常')) return 'color: #F56C6C; font-weight: bold;'; // 红色
|
||||
if (log.includes('⏭️') || log.includes('断点续传') || log.includes('中断记录')) return 'color: #E040FB; font-weight: bold;'; // 紫色
|
||||
if (log.includes('正在收集并解析') || log.includes('准备抓取下一页') || log.includes('等待重试') || log.includes('警告')) return 'color: #E6A23C;'; // 橙黄色
|
||||
if (log.includes('===================================')) return 'color: #409EFF; font-weight: bold;'; // 蓝色
|
||||
if (log.includes('命中目标 URL') || log.includes('POST 请求')) return 'color: #909399; font-style: italic;'; // 灰色斜体
|
||||
if (log.includes('开始') || log.includes('完成')) return 'color: #FFF; font-weight: bold;'; // 白色高亮
|
||||
return 'color: #a9b7c6;'; // 默认灰白色
|
||||
},
|
||||
fetchLogs() {
|
||||
// 如果弹窗没打开,也可以不刷新日志以节省性能,或者一直拉取保持最新
|
||||
if (!this.logDialogVisible) return;
|
||||
|
||||
@@ -171,8 +171,8 @@
|
||||
<!-- 卡片 1: 收货明细表 -->
|
||||
<div class="nav-card card-receipt" onclick="window.location.href='/receipts'">
|
||||
<i class="el-icon-document"></i>
|
||||
<h3>收货明细报表</h3>
|
||||
<p>查看、搜索所有历史收货记录及详细价格数据。</p>
|
||||
<h3>财务收货明细报表</h3>
|
||||
<p>查看、搜索所有历史财务收货记录及详细价格数据。</p>
|
||||
</div>
|
||||
|
||||
<!-- 卡片 2: BOM 雷达图 -->
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 2px solid #ebeef5;
|
||||
@@ -46,8 +49,11 @@
|
||||
<body>
|
||||
<div id="app">
|
||||
<div class="header">
|
||||
<h2>📦 ERP 数据展示看板 - 收货明细报表</h2>
|
||||
<el-button type="primary" @click="goToBomTree" icon="el-icon-data-analysis">切换至 BOM 成本雷达图</el-button>
|
||||
<h2>📦 ERP 数据展示看板 - 财务收货明细报表</h2>
|
||||
<div>
|
||||
<el-button type="info" plain icon="el-icon-back" @click="goBack" size="small">返回主控台</el-button>
|
||||
<el-button type="primary" size="small" @click="goToBomTree" icon="el-icon-data-analysis">切换至 BOM 成本雷达图</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
@@ -132,6 +138,9 @@
|
||||
this.fetchData();
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
window.location.href = '/';
|
||||
},
|
||||
goToBomTree() {
|
||||
window.location.href = '/bom';
|
||||
},
|
||||
|
||||
@@ -244,6 +244,16 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// 默认初始化为当月的第一天和最后一天
|
||||
const now = new Date();
|
||||
const y = now.getFullYear();
|
||||
const m = now.getMonth() + 1;
|
||||
const pad = (n) => n.toString().padStart(2, '0');
|
||||
const lastDayDate = new Date(y, m, 0);
|
||||
const firstDay = `${y}-${pad(m)}-01`;
|
||||
const lastDay = `${y}-${pad(m)}-${pad(lastDayDate.getDate())}`;
|
||||
this.dateRangeSelect = [firstDay, lastDay];
|
||||
|
||||
// 初始化加载数据
|
||||
this.loadSummary();
|
||||
this.loadUnmatchedData();
|
||||
|
||||
Reference in New Issue
Block a user