chore: update project files
This commit is contained in:
@@ -0,0 +1,489 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="height: 850px">
|
||||
<div style="margin-top: 7px; margin-bottom: 7px">
|
||||
<span class="show-text">生产订单:</span>
|
||||
<el-input
|
||||
v-model="orderNo"
|
||||
placeholder="请输入生产订单"
|
||||
clearable
|
||||
style="width: 150px; margin-right: 10px"
|
||||
@change="searchTable()"
|
||||
/>
|
||||
<span class="show-text">计划号:</span>
|
||||
<el-input
|
||||
v-model="plannum"
|
||||
placeholder="请输入生产订单"
|
||||
clearable
|
||||
style="width: 150px; margin-right: 10px"
|
||||
/>
|
||||
<span class="show-text">物料编码:</span>
|
||||
<el-input
|
||||
v-model="productCode"
|
||||
placeholder="请输入物料编码"
|
||||
clearable
|
||||
style="width: 150px; margin-right: 10px"
|
||||
/>
|
||||
<span class="show-text">物料名称:</span>
|
||||
<el-input
|
||||
v-model="itemName"
|
||||
placeholder="请输入物料名称"
|
||||
clearable
|
||||
style="width: 150px; margin-right: 10px"
|
||||
/>
|
||||
<span class="show-text">工序名称:</span>
|
||||
<el-input
|
||||
v-model="processName"
|
||||
placeholder="请输入工序名称"
|
||||
clearable
|
||||
style="width: 150px; margin-right: 10px"
|
||||
/>
|
||||
<span class="show-text">执行状态:</span>
|
||||
<el-select v-model="dostate" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in dostateoptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button
|
||||
icon="el-icon-search"
|
||||
plain
|
||||
type="primary"
|
||||
@click="searchTable()"
|
||||
>查询</el-button
|
||||
>
|
||||
|
||||
</div>
|
||||
<el-table
|
||||
:data="mergedTableData"
|
||||
highlight-current-row
|
||||
border
|
||||
size="small"
|
||||
style="margin-top: 10px"
|
||||
height="75vh"
|
||||
@selection-change="handleSelectionChange"
|
||||
@row-click="handleRowClick">
|
||||
<el-table-column type="selection" width="50"></el-table-column>
|
||||
<el-table-column label="序号" type="index" align="center" width="50"/>
|
||||
<el-table-column label="生产订单" align="center" prop="订单号" width="80" />
|
||||
<el-table-column label="计划号" align="center" prop="计划号" width="80" />
|
||||
<el-table-column label="工序名称" align="center" prop="工序名称" width="120"/>
|
||||
<el-table-column label="物料名称" align="center" prop="产品名称" width="200"/>
|
||||
<el-table-column label="同步状态" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.派工状态 === 1 ? '已同步':'未同步'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="上序合格数" align="center" prop="上序合格数" width="100"/>
|
||||
<el-table-column label="指派数量" align="center" prop="指派数量" width="80"/>
|
||||
<el-table-column label="打印数量" align="center" prop="打印数量" width="80"/>
|
||||
<el-table-column label="发料数量" align="center" prop="收料数量" width="80"/>
|
||||
<el-table-column label="收货数量" align="center" prop="完成数量" width="80"/>
|
||||
<el-table-column label="备注" align="center" prop="外协备注" width="200"/>
|
||||
<el-table-column label="单重" align="center" prop="单重" width="80"/>
|
||||
<el-table-column label="物料编码" align="center" prop="产品编码" width="200"/>
|
||||
|
||||
<el-table-column label="打印次数" align="center" prop="外协打印次数" width="120"/>
|
||||
<el-table-column label="计划开始时间" align="center" prop="计划开始时间" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{formatDate(scope.row.计划开始时间)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划完成时间" align="center" prop="计划完成时间" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{formatDate(scope.row.计划完成时间)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { postB1 } from '@/api/b1s';
|
||||
import $ from 'jquery'
|
||||
import QRCode from 'qrcode'
|
||||
import { set } from 'nprogress';
|
||||
import { MESDownFile } from '@/utils/request'
|
||||
import { seepdf, initPDFKeyboardShortcuts, setZoom } from '@/utils/pdf';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
downPDF:MESDownFile,
|
||||
seeVisible:false,
|
||||
qrCodeDataUrl:'',
|
||||
printDataList2:[],
|
||||
historyVisible:false,
|
||||
printdata2:[],
|
||||
historydata:[],
|
||||
dialogFormVisible1: false,
|
||||
tableData: [], // 原始数据
|
||||
mergedTableData: [], // 合并后的数据
|
||||
selectedRow:'',
|
||||
selectedRow2:'',
|
||||
productCode:'',
|
||||
orderNo:'',
|
||||
plannum:'',
|
||||
processName:'',
|
||||
itemName:'',
|
||||
sessionId:'',
|
||||
currentTime:'',
|
||||
receiveVisible:false,
|
||||
receiveData: {},
|
||||
receiveNum: 0,
|
||||
doVisible:false,
|
||||
doData: {},
|
||||
doNum: 0,
|
||||
// 新增:存储合并数据的原始信息
|
||||
mergedDataMap: new Map(), // 用于存储合并数据对应的原始数据组
|
||||
workstate:0,
|
||||
orderstate:0,
|
||||
dostate:1,
|
||||
workstateoptions:[{
|
||||
value: 0,
|
||||
label: '未同步'
|
||||
}, {
|
||||
value: 1,
|
||||
label: '已同步',
|
||||
disabled: true
|
||||
}],
|
||||
stateoptions:[{
|
||||
value: 0,
|
||||
label: '未完成',
|
||||
disabled: true
|
||||
}, {
|
||||
value: 1,
|
||||
label: '已完成',
|
||||
|
||||
}],
|
||||
dostateoptions:[{
|
||||
value: 0,
|
||||
label: '全部',
|
||||
disabled: true
|
||||
}, {
|
||||
value: 1,
|
||||
label: '可执行',
|
||||
|
||||
},{
|
||||
value: 2,
|
||||
label: '不可执行',
|
||||
|
||||
}],
|
||||
multipleSelection: [],
|
||||
printDataList: [] ,// 新增:存储多个打印数据
|
||||
numname:'',
|
||||
textweight:'',
|
||||
textsum:'',
|
||||
textcontent:'',
|
||||
textData:{},
|
||||
textVisible:false,
|
||||
qrCodeCache: new Map(),
|
||||
qrCodeUrl: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'id',
|
||||
'token'
|
||||
]),
|
||||
},
|
||||
created() {
|
||||
this.searchTable()
|
||||
setInterval(this.getCurrentTime, 1000);
|
||||
},
|
||||
methods: {
|
||||
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
getCurrentTime() {
|
||||
const now = new Date();
|
||||
const year = now.getFullYear();
|
||||
const month = String(now.getMonth() + 1).padStart(2, "0");
|
||||
const day = String(now.getDate()).padStart(2, "0");
|
||||
const hours = String(now.getHours()).padStart(2, "0");
|
||||
const minutes = String(now.getMinutes()).padStart(2, "0");
|
||||
const seconds = String(now.getSeconds()).padStart(2, "0");
|
||||
this.currentTime = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||
},
|
||||
handleRowClick(row) {
|
||||
this.selectedRow = row
|
||||
},
|
||||
handleRowClick2(row) {
|
||||
this.selectedRow2 = row
|
||||
},
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
var param = []
|
||||
param.push(["订单号",this.orderNo])
|
||||
param.push(["产品编码",this.productCode])
|
||||
param.push(["产品名称",this.itemName])
|
||||
param.push(["工序名称",this.processName])
|
||||
param.push(["计划号",this.plannum])
|
||||
var Data = this.CreateData('11', '异常提醒_外协及时开工_查询',param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.tableData = response.data
|
||||
this.mergeTableData() // 处理数据合并
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 合并表格数据的方法
|
||||
mergeTableData() {
|
||||
if (!this.tableData || this.tableData.length === 0) {
|
||||
this.mergedTableData = [];
|
||||
this.mergedDataMap.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
const groupedByOrder = {};
|
||||
this.tableData.forEach(item => {
|
||||
const groupKey = `${item.订单号}_${item.拆分内码}`;
|
||||
|
||||
if (!groupedByOrder[groupKey]) {
|
||||
groupedByOrder[groupKey] = [];
|
||||
}
|
||||
groupedByOrder[groupKey].push(item);
|
||||
});
|
||||
|
||||
const mergedData = [];
|
||||
this.mergedDataMap.clear();
|
||||
|
||||
Object.keys(groupedByOrder).forEach(orderNo => {
|
||||
const orderItems = groupedByOrder[orderNo];
|
||||
orderItems.sort((a, b) => a.订单行号 - b.订单行号);
|
||||
|
||||
let currentGroup = [orderItems[0]];
|
||||
|
||||
for (let i = 1; i < orderItems.length; i++) {
|
||||
const currentItem = orderItems[i];
|
||||
const lastItem = orderItems[i - 1];
|
||||
|
||||
if (currentItem.订单行号 === lastItem.订单行号 + 1 && currentItem.外协分组 === lastItem.外协分组 && currentItem.拆分内码 === lastItem.拆分内码) {
|
||||
currentGroup.push(currentItem);
|
||||
} else {
|
||||
// 检查组内最小计划开始时间是否小于今天
|
||||
if (this.checkGroupPlanStartValid(currentGroup)) {
|
||||
if (this.checkGroupAllZero(currentGroup)) {
|
||||
const mergedItem = this.mergeGroup(currentGroup);
|
||||
if (this.shouldIncludeByExecutionStatus(mergedItem)) {
|
||||
mergedData.push(mergedItem);
|
||||
this.mergedDataMap.set(mergedItem.uniqueKey, currentGroup);
|
||||
}
|
||||
}
|
||||
}
|
||||
currentGroup = [currentItem];
|
||||
}
|
||||
}
|
||||
|
||||
// 处理最后一组
|
||||
if (currentGroup.length > 0) {
|
||||
if (this.checkGroupPlanStartValid(currentGroup)) {
|
||||
if (this.checkGroupAllZero(currentGroup)) {
|
||||
const mergedItem = this.mergeGroup(currentGroup);
|
||||
if (this.shouldIncludeByExecutionStatus(mergedItem)) {
|
||||
mergedData.push(mergedItem);
|
||||
this.mergedDataMap.set(mergedItem.uniqueKey, currentGroup);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.mergedTableData = mergedData;
|
||||
},
|
||||
|
||||
// 新增:检查组内最小计划开始时间是否小于今天
|
||||
checkGroupPlanStartValid(group) {
|
||||
const today = new Date();
|
||||
today.setHours(0, 0, 0, 0);
|
||||
|
||||
// 获取组内最小的计划开始时间
|
||||
const minPlanStart = group.reduce((min, item) => {
|
||||
if (!item.计划开始时间) return min;
|
||||
const planDate = new Date(item.计划开始时间);
|
||||
planDate.setHours(0, 0, 0, 0);
|
||||
return planDate < min ? planDate : min;
|
||||
}, new Date('2099-12-31'));
|
||||
|
||||
return minPlanStart < today;
|
||||
},
|
||||
// 新增:检查组内所有数据的收料数量是否都为0
|
||||
checkGroupAllZero(group) {
|
||||
// 只有组内所有数据的收料数量都等于0,才返回true
|
||||
return group.every(item => {
|
||||
const 收料数量 = Number(item.收料数量) || 0;
|
||||
return 收料数量 === 0;
|
||||
});
|
||||
},
|
||||
// 新增:根据执行状态筛选数据(纯前端筛选)
|
||||
shouldIncludeByExecutionStatus(mergedItem) {
|
||||
const 执行状态 = this.dostate; // 0=全部, 1=可执行, 2=不可执行
|
||||
|
||||
if (执行状态 === 0) {
|
||||
return true; // 全部,不筛选
|
||||
}
|
||||
|
||||
const itemExecutionStatus = mergedItem.执行状态 || 1; // 默认可执行
|
||||
|
||||
if (执行状态 === 1) {
|
||||
return itemExecutionStatus === 1; // 只显示可执行
|
||||
} else if (执行状态 === 2) {
|
||||
return itemExecutionStatus === 2; // 只显示不可执行
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
// 合并单个组的数据
|
||||
mergeGroup(group) {
|
||||
if (group.length === 1) {
|
||||
const item = group[0];
|
||||
item.uniqueKey = `${item.订单号}_${item.订单行号}_${item.TaskAID}`;
|
||||
// 确保TaskAID是字符串类型
|
||||
item.TaskAID = String(item.TaskAID);
|
||||
|
||||
// 计算单条记录的执行状态
|
||||
const 上序合格数 = item.上序合格数 || 0;
|
||||
const 订单行号 = item.订单行号;
|
||||
item.执行状态 = (订单行号 === 1 || 上序合格数 > 0) ? 1 : 2;
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
const mergedItem = { ...group[0] };
|
||||
|
||||
// 生成唯一标识key
|
||||
mergedItem.uniqueKey = group.map(item => `${item.订单号}_${item.订单行号}_${item.TaskAID}`).join('|');
|
||||
|
||||
// 拼接工序名称(逗号间隔)
|
||||
const processNames = group.map(item => item.工序名称);
|
||||
mergedItem.工序名称 = processNames.join(',');
|
||||
|
||||
// 拼接TaskAID(逗号间隔)
|
||||
const taskAIDs = [...new Set(group.map(item => String(item.TaskAID)))];
|
||||
mergedItem.TaskAID = taskAIDs.join(',');
|
||||
|
||||
// 取计划开始时间的最小值
|
||||
const startTimes = group.map(item => new Date(item.计划开始时间));
|
||||
mergedItem.计划开始时间 = new Date(Math.min(...startTimes)).toISOString().slice(0, 19).replace('T', ' ');
|
||||
|
||||
// 取计划完成时间的最大值
|
||||
const endTimes = group.map(item => new Date(item.计划完成时间));
|
||||
mergedItem.计划完成时间 = new Date(Math.max(...endTimes)).toISOString().slice(0, 19).replace('T', ' ');
|
||||
|
||||
// 取最大值
|
||||
const wcnum = group.map(item => item.完成数量);
|
||||
mergedItem.完成数量 = Math.max(...wcnum);
|
||||
|
||||
const printnum = group.map(item => item.外协打印次数);
|
||||
mergedItem.外协打印次数 = Math.max(...printnum);
|
||||
|
||||
const slnum = group.map(item => item.收料数量);
|
||||
mergedItem.收料数量 = Math.max(...slnum);
|
||||
|
||||
// 计算上序合格数(取组内最大值)
|
||||
const shxnum = group.map(item => item.上序合格数 || 0);
|
||||
mergedItem.上序合格数 = Math.max(...shxnum);
|
||||
|
||||
// 计算执行状态:只要一组内包含订单行号=1 或者包含上序合格数>0,都属于可执行
|
||||
const hasFirstProcess = group.some(item => item.订单行号 === 1);
|
||||
const hasPreviousQualified = group.some(item => (item.上序合格数 || 0) > 0);
|
||||
mergedItem.执行状态 = (hasFirstProcess || hasPreviousQualified) ? 1 : 2;
|
||||
|
||||
// 存储原始组数据引用
|
||||
mergedItem.originalGroup = group;
|
||||
|
||||
return mergedItem;
|
||||
},
|
||||
|
||||
// 获取订单行号最大的TaskAID
|
||||
getMaxOrderLineTaskAID(row) {
|
||||
// 如果是单条数据,直接返回TaskAID
|
||||
if (typeof row.TaskAID === 'number' || !row.TaskAID.includes(',')) {
|
||||
return String(row.TaskAID);
|
||||
}
|
||||
|
||||
// 如果是合并数据,从原始数据组中找订单行号最大的TaskAID
|
||||
if (row.originalGroup) {
|
||||
const maxOrderLineItem = row.originalGroup.reduce((max, item) => {
|
||||
return item.订单行号 > max.订单行号 ? item : max;
|
||||
}, row.originalGroup[0]);
|
||||
return String(maxOrderLineItem.TaskAID);
|
||||
}
|
||||
|
||||
// 如果没有原始组数据,从TaskAID字符串中取最后一个
|
||||
const taskAIDs = row.TaskAID.split(',');
|
||||
return taskAIDs[taskAIDs.length - 1];
|
||||
},
|
||||
// 获取订单行号最小的TaskAID
|
||||
getMinOrderLineTaskAID(row) {
|
||||
// 如果是单条数据,直接返回TaskAID
|
||||
if (typeof row.TaskAID === 'number' || !row.TaskAID.includes(',')) {
|
||||
return String(row.TaskAID);
|
||||
}
|
||||
// 如果是合并数据,从原始数据组中找订单行号最大的TaskAID
|
||||
console.log(row)
|
||||
if (row.originalGroup) {
|
||||
const minOrderLineItem = row.originalGroup.reduce((min, item) => {
|
||||
return item.订单行号 < min.订单行号 ? item : min;
|
||||
}, row.originalGroup[0]);
|
||||
|
||||
return String(minOrderLineItem.TaskAID);
|
||||
}
|
||||
// 如果没有原始组数据,从TaskAID字符串中取最后一个
|
||||
const taskAIDs = row.TaskAID.split(',');
|
||||
return taskAIDs[taskAIDs.length - 1];
|
||||
},
|
||||
formatDate(date) {
|
||||
if (!date) return ''
|
||||
return date.split(' ').length > 1 ? date.split(' ')[0] : date
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.field-container {
|
||||
border: 1px solid #000;
|
||||
border-bottom:0px
|
||||
}
|
||||
.field-row {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #000;
|
||||
}
|
||||
.field-group {
|
||||
display: flex;
|
||||
width: 25%;
|
||||
align-items: stretch;
|
||||
border-right: 1px solid #000;
|
||||
}
|
||||
.field-group:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
.field-label {
|
||||
width: 40%;
|
||||
color: #000;
|
||||
text-align: right;
|
||||
padding: 12px 5px;
|
||||
border-right: 1px solid #000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.field-value {
|
||||
width: 60%;
|
||||
color: #303133;
|
||||
word-break: break-word;
|
||||
overflow-wrap: break-word;
|
||||
padding: 12px 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
@@ -64,6 +64,14 @@
|
||||
<el-option label="已开工" value="2" />
|
||||
<el-option label="已完成" value="4" />
|
||||
</el-select>
|
||||
<el-switch
|
||||
v-model="stationFilterMode"
|
||||
active-text="工位正选"
|
||||
inactive-text="工位反选"
|
||||
active-value="include"
|
||||
inactive-value="exclude"
|
||||
style="margin-left: 20px;"
|
||||
/>
|
||||
<el-button
|
||||
:disabled="loading"
|
||||
icon="el-icon-search"
|
||||
@@ -76,6 +84,7 @@
|
||||
<el-checkbox v-for="item in Doingoptions" :key="item.工位号" :label="item.指南工位号" :value="item.工位号"> </el-checkbox>
|
||||
</el-checkbox-group>
|
||||
|
||||
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
@@ -320,6 +329,7 @@ export default {
|
||||
],
|
||||
Doing: [],
|
||||
Doingoptions: [],
|
||||
stationFilterMode: 'include',
|
||||
// DoingData: {
|
||||
// 订单编号: "",
|
||||
// 合同号: "",
|
||||
@@ -549,6 +559,7 @@ export default {
|
||||
|
||||
param.push(["生产状态", this.productionStatus2]||-1);
|
||||
param.push(["工位名称", this.Doing]);
|
||||
param.push(["工位筛选模式", this.stationFilterMode]);
|
||||
param.push(["用户ID" , this.$store.state.user.id])
|
||||
param.push(["计划号" , this.plannum])
|
||||
param.push(["销售订单" , this.salenum])
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
/>
|
||||
|
||||
<span class="show-text">设备:</span>
|
||||
<el-select v-model="equipmentType" placeholder="请选择设备" filterable size="small" style="width:200px" @change="searchTable" >
|
||||
<el-select v-model="equipmentType" placeholder="请选择设备" filterable size="small" style="width:100px" @change="searchTable" >
|
||||
<el-option
|
||||
v-for="item in basedatalx"
|
||||
:key="item.id"
|
||||
@@ -43,7 +43,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="参数值" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.参数值 }}
|
||||
{{ scope.row.参数值 }}{{ scope.row.参数单位 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100px">
|
||||
@@ -53,7 +53,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div style="width: 600px;margin-left: 5px">
|
||||
<div style="width: 800px;margin-left: 5px">
|
||||
<el-table v-if="dataType === 1" :data="tableData1" v-loading="loading" border size="small" stripe highlight-current-row height="740px" >
|
||||
<el-table-column label="开始时间" prop="Zone" align="center" width="150px" >
|
||||
<template slot-scope="scope">
|
||||
@@ -70,29 +70,130 @@
|
||||
{{ scope.row.状态名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="时长(m)" align="center">
|
||||
<el-table-column label="时长(min)" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.累计分钟数 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table v-if="dataType === 2" :data="tableData1" border size="small" stripe highlight-current-row height="740px" >
|
||||
<el-table-column label="订单编号" prop="Zone" align="center" width="150px" >
|
||||
<div v-if="dataType === 2">
|
||||
<span class="show-text">订单编号:</span>
|
||||
<el-input
|
||||
v-model="orderNo"
|
||||
placeholder="请输入订单编号"
|
||||
clearable
|
||||
style="width: 150px; margin-right: 10px"
|
||||
/>
|
||||
<el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 20px" plain @click="handleSearch(currentRow)">查询</el-button>
|
||||
<el-table :data="tableData1" border size="small" stripe highlight-current-row height="700px" style="margin-top: 5px" >
|
||||
<el-table-column label="订单编号" prop="Zone" align="center" width="100px" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.订单编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="加工时长(min)" prop="TagName" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.循环时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="换件时长(min)" prop="TagName" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.换件时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采集时间" align="center" width="150px" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采集时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[20, 40, 50, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
:small="true"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
@size-change="handleSizeChanges"
|
||||
@current-change="handleCurrentChanges"/>
|
||||
</div>
|
||||
</div>
|
||||
<el-table v-if="dataType === 3" :data="tableData1" border size="small" stripe highlight-current-row height="740px" >
|
||||
<el-table-column label="订单编号" prop="Zone" align="center" width="100px" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.订单编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="加工时长" prop="TagName" align="center">
|
||||
<el-table-column label="程序时长(min)" prop="Zone" align="center" width="120px" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.循环时间 }}
|
||||
<span style="color: #0ba9e3">{{ scope.row.程序时长 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采集时间" align="center" width="150px" >
|
||||
<el-table-column label="最小时长(min)" prop="Zone" align="center" width="120px" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采集时间 }}
|
||||
{{ scope.row.最小时长 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最大时长(min)" prop="Zone" align="center" width="120px" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.最大时长 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="频次/总数" prop="Zone" align="center" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.频次 }} / {{ scope.row.总记录数 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="产品编码" prop="Zone" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.产品编码 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品名称" prop="Zone" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.产品名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table v-if="dataType === 4" :data="tableData1" border size="small" stripe highlight-current-row height="740px" >
|
||||
<el-table-column label="订单编号" prop="Zone" align="center" width="100px" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.订单编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="换件时长(min)" prop="Zone" align="center" width="120px" >
|
||||
<template slot-scope="scope">
|
||||
<span style="color: #0ba9e3">{{ scope.row.换件时长 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最小时长(min)" prop="Zone" align="center" width="120px" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.最小时长 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最大时长(min)" prop="Zone" align="center" width="120px" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.最大时长 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="频次/总数" prop="Zone" align="center" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.频次 }} / {{ scope.row.总记录数 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="产品编码" prop="Zone" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.产品编码 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品名称" prop="Zone" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.产品名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -120,6 +221,7 @@ export default {
|
||||
completionTime: [],
|
||||
routineCheckType: [],
|
||||
dataType: 0,
|
||||
orderNo: '',
|
||||
loading: false,
|
||||
dialogFormVisible: false,
|
||||
title: '',
|
||||
@@ -146,6 +248,7 @@ export default {
|
||||
设备类型: [{ required: true, message: '请选择' }]
|
||||
},
|
||||
original: '',
|
||||
currentRow: null,
|
||||
total: 0, // 分页总数
|
||||
tableData: [], // 设备信息表
|
||||
tableData1: [], // 设备信息表
|
||||
@@ -274,16 +377,31 @@ export default {
|
||||
this.loading = true
|
||||
this.tableData1 = []
|
||||
this.dataType = row.数据类型
|
||||
this.currentRow = row
|
||||
var param = []
|
||||
param.push(['PageCurrent', this.pageCurrent])
|
||||
param.push(['PageSize', this.pageSize])
|
||||
param.push(['PageCount', '1111', 'int', '1'])
|
||||
param.push(['ItemCount', '1111', 'int', '1'])
|
||||
param.push(['开始时间', this.completionTime[0]])
|
||||
param.push(['结束时间', this.completionTime[1]])
|
||||
param.push(['设备名称', this.equipmentType])
|
||||
param.push(['参数名称', row.参数名称])
|
||||
param.push(['数据类型', row.数据类型])
|
||||
param.push(['订单编号', this.orderNo])
|
||||
var Data = this.CreateData('11', '设备管理_设备数据_统计数据查询_通过类型', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.loading = false
|
||||
this.tableData1 = row.数据类型 === 1 ? this.mergeContinuousStatus(response.data) : response.data
|
||||
console.log(response.data)
|
||||
if (row.数据类型 === 1) {
|
||||
this.tableData1 = this.mergeContinuousStatus(response.data.result)
|
||||
} else if (row.数据类型 === 2) {
|
||||
this.tableData1 = response.data.result
|
||||
this.total = parseInt(response.data.output[0].ItemCount)
|
||||
} else {
|
||||
this.tableData1 = response.data.result
|
||||
}
|
||||
|
||||
// this.tableData = response.data.result
|
||||
// this.total = parseInt(response.data.output[0].ItemCount)
|
||||
}).catch(() => {
|
||||
@@ -293,11 +411,11 @@ export default {
|
||||
handleSizeChanges(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.searchTable()
|
||||
this.handleSearch(this.currentRow)
|
||||
},
|
||||
handleCurrentChanges(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
this.handleSearch(this.currentRow)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
<el-input v-model="doneprocessName" placeholder="请输入工序名称" clearable style="width: 150px;margin-right: 10px" />
|
||||
<br>
|
||||
<br>
|
||||
<span class="show-text">排产状态:</span>
|
||||
<!-- <span class="show-text">排产状态:</span>
|
||||
<el-select v-model="doneproductionStatus" clearable placeholder="请选择状态" style="width: 150px;margin-right: 10px">
|
||||
<el-option label="全部" value="全部" />
|
||||
<el-option label="已完成" value="已完成" />
|
||||
<el-option label="未完成" value="未完成" />
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
<span class="show-text">要求完工日期:</span>
|
||||
<el-date-picker
|
||||
v-model="completionTime"
|
||||
@@ -37,25 +37,20 @@
|
||||
<el-date-picker
|
||||
v-model="planStartTime"
|
||||
:clearable="false"
|
||||
end-placeholder="结束时间"
|
||||
format="yyyy-MM-dd"
|
||||
popper-class="virtual-cell-time-picker"
|
||||
range-separator="-"
|
||||
start-placeholder="开始时间"
|
||||
style="width: 280px;vertical-align: top"
|
||||
type="datetimerange"
|
||||
|
||||
placeholder="计划开始时间"
|
||||
style="width: 150px;
|
||||
vertical-align: top"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd" />
|
||||
<span class="show-text">计划完成:</span>
|
||||
<el-date-picker
|
||||
v-model="planendTime"
|
||||
:clearable="false"
|
||||
end-placeholder="结束时间"
|
||||
format="yyyy-MM-dd"
|
||||
popper-class="virtual-cell-time-picker"
|
||||
range-separator="-"
|
||||
start-placeholder="开始时间"
|
||||
style="width: 280px;vertical-align: top"
|
||||
type="datetimerange"
|
||||
placeholder="计划完成时间"
|
||||
style="width: 150px;
|
||||
vertical-align: top"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd" />
|
||||
<el-button :disabled="loading" icon="el-icon-search" plain type="primary" @click="donesearchTable()">查询</el-button>
|
||||
</div>
|
||||
@@ -375,8 +370,8 @@ export default {
|
||||
station:'全部',
|
||||
completids:[],
|
||||
completionTime: [],
|
||||
planStartTime: [],
|
||||
planendTime: [],
|
||||
planStartTime: '',
|
||||
planendTime: '',
|
||||
loading: false,
|
||||
tableData: [],
|
||||
donetableData: [],
|
||||
@@ -770,13 +765,11 @@ export default {
|
||||
// param.push(['性质', this.nature])
|
||||
param.push(['要求完工日期1', this.completionTime[0]])
|
||||
param.push(['要求完工日期2', this.completionTime[1]])
|
||||
param.push(['计划开始1', this.planStartTime[0]])
|
||||
param.push(['计划开始2', this.planStartTime[1]])
|
||||
param.push(['计划完成1', this.planendTime[0]])
|
||||
param.push(['计划完成2', this.planendTime[1]])
|
||||
param.push(['计划开始', this.planStartTime])
|
||||
param.push(['计划完成', this.planendTime])
|
||||
param.push(['排产状态', this.productionStatus])
|
||||
param.push(['指派对象', this.station])
|
||||
var Data = this.CreateData('11', 'MES_OrderPlanned_Query', param,this.pageSize, this.pageCurrent)
|
||||
var Data = this.CreateData('11', '机加已排产_获取任务列表', param,this.pageSize, this.pageCurrent)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
|
||||
this.loading = false
|
||||
@@ -825,16 +818,13 @@ export default {
|
||||
param.push(['产品编码', this.doneproductCode])
|
||||
param.push(['产品名称', this.doneproductName])
|
||||
param.push(['工序名称', this.doneprocessName])
|
||||
// param.push(['性质', this.donenature])
|
||||
param.push(['要求完工日期1', this.completionTime[0]])
|
||||
param.push(['要求完工日期2', this.completionTime[1]])
|
||||
param.push(['计划开始1', this.planStartTime[0]])
|
||||
param.push(['计划开始2', this.planStartTime[1]])
|
||||
param.push(['计划完成1', this.planendTime[0]])
|
||||
param.push(['计划完成2', this.planendTime[1]])
|
||||
param.push(['计划开始', this.planStartTime])
|
||||
param.push(['计划完成', this.planendTime])
|
||||
param.push(['排产状态', this.doneproductionStatus])
|
||||
param.push(['指派对象', this.station])
|
||||
var Data = this.CreateData('11', 'MES_OrderPlanned_Query', param,this.pageSize, this.pageCurrent)
|
||||
var Data = this.CreateData('11', '机加已排产_获取任务列表', param,this.pageSize, this.pageCurrent)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
|
||||
this.loading = false
|
||||
|
||||
1010
MES_Manage_View_V20/src/views/ProductionManagement/AGVtask/index.vue
Normal file
1010
MES_Manage_View_V20/src/views/ProductionManagement/AGVtask/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -259,6 +259,14 @@
|
||||
prop="工序名称"
|
||||
label="工序名称"
|
||||
width="80"
|
||||
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="上序合格数"
|
||||
label="上序合格数"
|
||||
width="80"
|
||||
|
||||
/>
|
||||
<!-- <el-table-column align="center" label="开工时间" width="100">
|
||||
<template slot-scope="scope">{{formatDate(scope.row.开工时间)}}</template>
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
@row-click="handleRowClick">
|
||||
<el-table-column type="selection" width="50"></el-table-column>
|
||||
<el-table-column label="序号" type="index" align="center" width="50"/>
|
||||
<el-table-column label="状态" align="center" prop="单据状态" width="80" />
|
||||
<el-table-column label="生产订单" align="center" prop="订单号" width="80" />
|
||||
<el-table-column label="计划号" align="center" prop="计划号" width="80" />
|
||||
<el-table-column label="工序名称" align="center" prop="工序名称" width="120"/>
|
||||
|
||||
@@ -32,6 +32,12 @@
|
||||
<el-option label="加急" value="加急" />
|
||||
<el-option label="正常" value="正常" />
|
||||
</el-select>
|
||||
<span class="show-text">单据状态:</span>
|
||||
<el-select v-model="orderStatus" clearable placeholder="请选择单据状态" style="width: 150px;margin-right: 10px">
|
||||
<el-option label="全部" value="全部" />
|
||||
<el-option label="关闭" value="关闭" />
|
||||
<el-option label="正常" value="正常" />
|
||||
</el-select>
|
||||
|
||||
<!-- 其他搜索条件保持不变 -->
|
||||
<el-button :disabled="loading" icon="el-icon-search" plain type="primary" @click="searchTable()">查询</el-button>
|
||||
@@ -86,7 +92,7 @@
|
||||
<!-- 主表列定义 -->
|
||||
<el-table-column align="center" label="序号" type="index" width="50" />
|
||||
<el-table-column align="center" prop="合同号" label="销售订单" width="120" />
|
||||
<el-table-column align="center" prop="计划号" label="计划号" width="120" />
|
||||
|
||||
<el-table-column align="center" prop="订单号" label="生产订单" width="100" />
|
||||
<el-table-column align="center" prop="产品编码" label="产品编码" width="220" />
|
||||
<el-table-column align="center" prop="产品名称" label="产品名称" width="190" />
|
||||
@@ -143,6 +149,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="当前序" label="当前序" width="80" />
|
||||
<el-table-column align="center" prop="工艺路线" label="工艺路线" width="180" />
|
||||
<el-table-column align="center" prop="计划号" label="计划号" width="120" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-dialog
|
||||
@@ -214,6 +221,7 @@ export default {
|
||||
// 新增过滤字段
|
||||
outsourceStatus: '全部', // 外协状态
|
||||
urgentStatus: '全部', // 加急状态
|
||||
orderStatus:'正常',
|
||||
completionTime: [],
|
||||
loading: false,
|
||||
tableData: [],
|
||||
@@ -477,6 +485,7 @@ export default {
|
||||
param.push(['指派对象', '全部'])
|
||||
param.push(['计划号', this.plannum])
|
||||
param.push(['加急状态', this.urgentStatus])
|
||||
param.push(['单据状态', this.orderStatus])
|
||||
// // 添加外协状态过滤条件
|
||||
// if (this.outsourceStatus !== '全部') {
|
||||
// param.push(['是否外协', this.outsourceStatus === '是' ? 1 : 0])
|
||||
|
||||
@@ -97,6 +97,7 @@
|
||||
@row-click="handleRowClick">
|
||||
<el-table-column type="selection" width="50"></el-table-column>
|
||||
<!-- <el-table-column label="序号" type="index" align="center" width="50"/> -->
|
||||
<el-table-column label="单据状态" align="center" prop="单据状态" width="80" />
|
||||
<el-table-column label="生产订单" align="center" prop="订单号" width="80" />
|
||||
<!-- <el-table-column label="计划号" align="center" prop="计划号" width="80" /> -->
|
||||
<el-table-column label="物料名称" align="center" prop="产品名称" width="120"/>
|
||||
|
||||
@@ -221,6 +221,18 @@
|
||||
width="80"
|
||||
prop="工位名称"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="供应商"
|
||||
width="80"
|
||||
prop="供应商"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="采购收货单"
|
||||
width="80"
|
||||
prop="采购收货单"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="加急数量"
|
||||
|
||||
Reference in New Issue
Block a user