组件状态查询
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-card>
|
||||
<div style="background-color: rgb(126,172,237);color: white;margin-top: 5px">{{ 机床图号 }} {{ 机床名称 }}</div>
|
||||
<div :style="{background:MachineColor}" style="color: white;margin-top: 5px">{{ 机床图号 }} {{ 机床名称 }}</div>
|
||||
<div style="margin: 10px 0 0 20px;height: 650px;overflow: auto">
|
||||
<el-tree
|
||||
:data="departmentData"
|
||||
@@ -59,7 +59,6 @@
|
||||
:render-content="renderContent"
|
||||
node-key="机床流水号"
|
||||
class="selectTree"
|
||||
default-expand-all
|
||||
@node-click="onClick"/>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -89,11 +88,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getMachines, getGroups, selectParts, selectProcedure } from '@/api/ManufacturingCenter/CompletionOfWorkshopComponents'
|
||||
import { getMachines, getMachinesStatue, getGroups, selectParts, selectProcedure } from '@/api/ManufacturingCenter/CompletionOfWorkshopComponents'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
MachineColor: '',
|
||||
MachineValue: '', // 机床号
|
||||
Machine: [],
|
||||
option: [], // 组号
|
||||
@@ -133,6 +133,13 @@ export default {
|
||||
}
|
||||
}).then(() => {
|
||||
this.MachineValue = this.Machine[0].value
|
||||
getMachinesStatue(this.MachineValue).then(res => {
|
||||
if (res.data[0].是否发货 === 0) {
|
||||
this.MachineColor = 'rgb(126,172,237)'
|
||||
} else {
|
||||
this.MachineColor = 'green'
|
||||
}
|
||||
})
|
||||
this.getTreeData()
|
||||
})
|
||||
},
|
||||
@@ -153,6 +160,7 @@ export default {
|
||||
isLeaf: false,
|
||||
label: response.data[i].组号 + '\xa0\xa0\xa0' + (response.data[i].组件名称 ? response.data[i].组件名称 : ''),
|
||||
value: response.data[i].组件流水号,
|
||||
组件完成状态: response.data[i].组件完成状态,
|
||||
father: true,
|
||||
children: []
|
||||
})
|
||||
@@ -214,7 +222,11 @@ export default {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return (<span>{node.label}</span>)
|
||||
if (node.data.组件完成状态 === '已完成') {
|
||||
return (<span class='treeNotesComplate'>{node.label}</span>)
|
||||
} else {
|
||||
return (<span class='treeNotesUnComplate'>{node.label}</span>)
|
||||
}
|
||||
}
|
||||
},
|
||||
searchTable1(row) {
|
||||
|
||||
Reference in New Issue
Block a user