车间组件完成情况
This commit is contained in:
@@ -26,7 +26,7 @@ export const downloadFileMachine = `http://192.168.1.231:8411/submit/downloadFil
|
||||
export const MESUploadFile = `http://192.168.1.231:8411/submit/MESUploadFile.ashx`
|
||||
export const MESDownloadFile = `http://192.168.1.231:8411/submit/MESDownloadFile.ashx`
|
||||
const service = axios.create({
|
||||
baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`,
|
||||
baseURL: `http://192.168.0.110:8002/submit/MESCommonBase.ashx`,
|
||||
timeout: 1500000 // 请求超时时间
|
||||
})
|
||||
export default service
|
||||
|
||||
@@ -23,15 +23,14 @@
|
||||
<el-col style="width: 450px">
|
||||
<el-card>
|
||||
<el-table :data="tableData1" style="height: 670px" highlight-current-row border>
|
||||
<el-table-column type="index" label="序号" width="50"/>
|
||||
<el-table-column align="center" label="工序名" width="150">
|
||||
<el-table-column align="center" label="工序名" width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作者" width="120">
|
||||
<el-table-column align="center" label="操作者" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.员工姓名 }}
|
||||
{{ scope.row.员工姓名 === '超级管理员' && scope.row.工序状态 !== 4 ? '' : scope.row.员工姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="数量" show-overflow-tooltip min-width="90">
|
||||
@@ -39,17 +38,22 @@
|
||||
{{ scope.row.投产数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="工序状态" show-overflow-tooltip min-width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工序状态 === 4 ? '已完成' : '未完成' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col style="width:600px">
|
||||
<el-col style="width:1000px">
|
||||
<el-card>
|
||||
<span>机床图号:{{ 机床图号 }} 机床名称:{{ 机床名称 }}</span>
|
||||
<div style="margin: 10px 0 0 50px;height: 300px;overflow: auto">
|
||||
<div style="margin: 10px 0 0 20px;height: 650px;overflow: auto">
|
||||
<el-tree
|
||||
:data="departmentData"
|
||||
:props="defaultProps"
|
||||
:indent="80"
|
||||
:indent="50"
|
||||
:expand-on-click-node="false"
|
||||
:render-content="renderContent"
|
||||
node-key="机床流水号"
|
||||
@@ -58,7 +62,7 @@
|
||||
@node-click="onClick"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card style="height: 350px">
|
||||
<el-card v-if="false" style="height: 350px">
|
||||
<el-table :data="tableData2" height="300" highlight-current-row border @row-click="searchTable1">
|
||||
<el-table-column type="index" label="序号" width="50"/>
|
||||
<el-table-column align="center" label="图号及规格" width="220">
|
||||
@@ -159,8 +163,11 @@ export default {
|
||||
firstLevel.children = []
|
||||
for (let j = 0; j < response.data.length; j++) {
|
||||
firstLevel.children.push({
|
||||
label: (response.data[j].零件图号 ? response.data[j].零件图号 : '无零件图号') + '\xa0\xa0\xa0\xa0\xa0\xa0' + (response.data[j].规格 ? response.data[j].规格 : '') + '\xa0\xa0\xa0\xa0\xa0\xa0' + (response.data[j].投产总数量 ? response.data[j].投产总数量 : '') + '..........' + (response.data[j].零件名称 ? response.data[j].零件名称 : '无零件名称'),
|
||||
label: (response.data[j].零件图号 ? response.data[j].零件图号 : '无零件图号') + '\xa0\xa0\xa0\xa0\xa0\xa0' + (response.data[j].规格 ? response.data[j].规格 : '') + '\xa0\xa0\xa0\xa0\xa0\xa0' + (response.data[j].投产总数量 ? response.data[j].投产总数量 : '') + '..........' + (response.data[j].零件名称 ? response.data[j].零件名称 : '无零件名称') + (response.data[j].零件类型 === 1 ? '' : '\xa0\xa0\xa0\xa0\xa0\xa0外购'),
|
||||
value: response.data[j].工艺计划流水号,
|
||||
考核状态: response.data[j].考核状态,
|
||||
采购状态: response.data[j].采购状态,
|
||||
零件类型: response.data[j].零件类型,
|
||||
father: false
|
||||
})
|
||||
}
|
||||
@@ -173,18 +180,41 @@ export default {
|
||||
onClick(num) {
|
||||
this.tableData1 = []
|
||||
this.tableData2 = []
|
||||
if (num.father === true) {
|
||||
selectParts(1, num.value, 0, 0).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
} else {
|
||||
selectParts(0, 0, 1, num.value).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
if (num.father === false) {
|
||||
if (num.零件类型 === 1) {
|
||||
selectProcedure(num.value).then(response => {
|
||||
this.tableData1 = response.data
|
||||
})
|
||||
}
|
||||
}
|
||||
// if (num.father === true) {
|
||||
// selectParts(1, num.value, 0, 0).then(response => {
|
||||
// this.tableData2 = response.data
|
||||
// })
|
||||
// } else {
|
||||
// selectParts(0, 0, 1, num.value).then(response => {
|
||||
// this.tableData2 = response.data
|
||||
// })
|
||||
// }
|
||||
},
|
||||
renderContent(h, { node, data, store }) {
|
||||
return (<span class='treeNotes'>{node.label}</span>)
|
||||
if (node.data.father === false) {
|
||||
if (node.data.零件类型 === 1) { // 自制
|
||||
if (parseInt(node.data.考核状态) > 6) {
|
||||
return (<span class='treeNotesComplate'>{node.label}</span>)
|
||||
} else {
|
||||
return (<span class='treeNotesUnComplate'>{node.label}</span>)
|
||||
}
|
||||
} else { // 外购
|
||||
if (node.data.采购状态 === '已完成') {
|
||||
return (<span class='treeNotesComplate'>{node.label}</span>)
|
||||
} else {
|
||||
return (<span class='treeNotesUnComplate'>{node.label}</span>)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return (<span>{node.label}</span>)
|
||||
}
|
||||
},
|
||||
searchTable1(row) {
|
||||
this.tableData1 = []
|
||||
@@ -205,7 +235,11 @@ export default {
|
||||
background-color: #ccc !important;
|
||||
}
|
||||
}
|
||||
.treeNotes {
|
||||
background-color: green;
|
||||
.treeNotesComplate {
|
||||
color: black;
|
||||
background-color: #67C23A;
|
||||
}
|
||||
.treeNotesUnComplate {
|
||||
color: black;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user