Browse Source

0412 新看板

master
ruanqi 3 years ago
parent
commit
2eaa189d12
  1. BIN
      src/assets/img/factory.jpg
  2. 2
      src/router/index.js
  3. 141
      src/views/modules/board/sopBoard.vue
  4. 86
      src/views/modules/pad/padPartAttribute.vue
  5. 28
      src/views/modules/production/soscheduleRouting.vue

BIN
src/assets/img/factory.jpg

After

Width: 3000  |  Height: 1500  |  Size: 377 KiB

2
src/router/index.js

@ -43,7 +43,7 @@ const globalRoutes = [
{ path: '/SeqNoForLiuHua', component: _import('modules/board/SeqNoForLiuHua'), name: 'SeqNoForLiuHua', meta: { title: '生产派工单看板' } }, { path: '/SeqNoForLiuHua', component: _import('modules/board/SeqNoForLiuHua'), name: 'SeqNoForLiuHua', meta: { title: '生产派工单看板' } },
{ path: '/SORoutingBoardForShuiZhu', component: _import('modules/board/SORoutingBoardForShuiZhu'), name: 'SORoutingBoardForShuiZhu', meta: { title: '水煮烘烤工序看板' } }, { path: '/SORoutingBoardForShuiZhu', component: _import('modules/board/SORoutingBoardForShuiZhu'), name: 'SORoutingBoardForShuiZhu', meta: { title: '水煮烘烤工序看板' } },
{ path: '/inspectBoard', component: _import('modules/board/inspectBoard'), name: 'inspectBoard', meta: { title: '实验室检验看板' } }, { path: '/inspectBoard', component: _import('modules/board/inspectBoard'), name: 'inspectBoard', meta: { title: '实验室检验看板' } },
{ path: '/sopBoard', component: _import('modules/board/sopBoard'), name: 'sopBoard', meta: { title: '实验室检验看板' } },
] ]
// 主入口路由(需嵌套上左右整体布局) // 主入口路由(需嵌套上左右整体布局)

141
src/views/modules/board/sopBoard.vue

@ -0,0 +1,141 @@
<template>
<div class="mod-config container">
<div style="text-align: center">
<h1 style="color: white">SOP查看</h1>
</div>
<div class="board2" style="height: 90%;width: 50%;float: left;background: #00a0e9;margin-top: 1%">
</div>
<div class="board2" style="height: 90%;width: 50%;float: left;background: #2D64B3;margin-top: 1%">
</div>
</div>
</template>
<script>
let rollstop = ''
let rolltimer = ''//
let refresher = '' //
import {
transFerBoard,
} from '@/api/board.js'
export default {
name: 'transFerBoard',
data () {
return {
pageIndex: 1,
totalPage: 1,
height: 200,
tableData: [],
//
// refreshTime: 5,
// rollTime: 5,
// rollPx: 1,
}
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight - 80
})
// this.autoRoll()
},
methods: {
tableRowClassName ({row, rowIndex}) {
if (row.type == '产成品') {
return 'green'
}
},
search () {
let inData= {number:this.pageIndex};
transFerBoard(inData).then(({data}) => {
this.tableData = data.rows;
this.totalPage= data.maxPage;
if(this.pageIndex+1>data.maxPage){
this.pageIndex=1
}else {
this.pageIndex=this.pageIndex+1
}
})
},
//
// mouseEnter (time) {
// //
// this.autoRoll(true)
// },
//
// mouseLeave () {
// //
// this.autoRoll()
// },
//
// autoRoll (stop) {
// if (stop) {
// clearInterval(rolltimer)
// return
// }
// // DOM
// const table = this.$refs.wt_table
// // div
// const divData = table.bodyWrapper
// //
// rolltimer = setInterval(() => {
// //
// divData.scrollTop = this.decimalUtil.add(Number(divData.scrollTop), Number(this.rollPx))
// // (+=)
// if (divData.clientHeight + divData.scrollTop +1>= divData.scrollHeight) {
// // table
// divData.scrollTop = 0
// }
// }, this.rollTime * 10)
// },
refreshTable () {
refresher = setInterval(() => {
this.search()
}, 30000)
}
},
created () {
// this.search()
// this.refreshTable()
}
}
</script>
<style >
.board2 .el-table .cell {
line-height: 13px;
font-size: 12px;
height: 13px;
padding: 0px;
}
.board2 .el-table .green {
background: #8cee8c;
}
.board2 .el-table .success-row {
background: #1bb61b;
}
.board2 .el-table .false-row {
/*background: #cbcb14;*/
background: #db1212;
}
.board2 .el-table .yellow-row{
background: #ffff00;
}
.container {
height: 109%;
position: fixed;
top: 0;
left: 0;
z-index: -1;
width: 100%;
height: 100%;
content: "";
background-image: url(~@/assets/img/factory.jpg);
background-size: cover;
}
</style>

86
src/views/modules/pad/padPartAttribute.vue

@ -86,6 +86,9 @@
<el-form-item :label="''"> <el-form-item :label="''">
<el-button @click="nextBom()" style="margin-top: 10px;margin-left: 24px;height: 35px;width: 90px" type="primary">下一版本</el-button> <el-button @click="nextBom()" style="margin-top: 10px;margin-left: 24px;height: 35px;width: 90px" type="primary">下一版本</el-button>
</el-form-item> </el-form-item>
<el-form-item :label="''">
<el-button @click="jumpLastPart()" style="margin-top: 10px;margin-left: 24px;height: 35px;width: 90px" type="primary">回退</el-button>
</el-form-item>
</el-form> </el-form>
<el-table <el-table
:height="height" :height="height"
@ -98,7 +101,11 @@
align="left" align="left"
min-width="40" min-width="40"
label="零部件编码"> label="零部件编码">
<template slot-scope="scope">
<a @click="jumpPart(scope.row.componentPartNo)">{{scope.row.componentPartNo}}</a>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="revNo" prop="revNo"
header-align="center" header-align="center"
@ -227,6 +234,7 @@
getPartSubPropertiesValueHeaderData, getPartSubPropertiesValueHeaderData,
getBomDetailData, getBomDetailData,
getRoutingDetailData, getRoutingDetailData,
getPartData,
} from '@/api/pad.js' } from '@/api/pad.js'
export default { export default {
name: 'padPartAttribute', name: 'padPartAttribute',
@ -252,6 +260,7 @@
routingRevNo:'', routingRevNo:'',
bomTable:[], bomTable:[],
routingTable:[], routingTable:[],
lastPart:[],
} }
}, },
@ -262,6 +271,7 @@
}, },
methods: { methods: {
getData(){ getData(){
this.lastPart=[];
this.currentData = JSON.parse(localStorage.getItem("partData")) this.currentData = JSON.parse(localStorage.getItem("partData"))
this.searchData.partNo = this.currentData.partNo this.searchData.partNo = this.currentData.partNo
this.num=1; this.num=1;
@ -288,10 +298,78 @@
}) })
},
jumpPart(partNo){
let lastPartNo=JSON.parse(JSON.stringify(this.searchData.partNo));
let inData={
site:this.currentData.site,
partNo:partNo,
}
getPartData(inData).then(({data}) => {
this.lastPart.push({site:this.searchData.site,partNo:lastPartNo})
this.searchData.partNo = data.rows[0].partNo
this.num=1;
this.bomNum=1;
this.routingNum=1;
this.remark=data.rows[0].remark;
this.searchData.site= data.rows[0].site;
this.partDescription= data.rows[0].partDescription+'/'+data.rows[0].spec;
getPartSubPropertiesValueHeaderData(this.searchData).then(({data}) => {
this.list = data.rows;
this.bomList = data.rows2;
this.routingList = data.rows3;
// if(data.rows.length==0){
// this.$alert('', '', {
// confirmButtonText: ''
// })
// return false;
// }
this.search();
this.searchBom();
this.searchRouting()
this.subCodeDesc=this.list[this.num-1].subCodeDesc;
})
})
},
jumpLastPart(){
if(this.lastPart.length==0){
return false;
}
getPartData(this.lastPart[this.lastPart.length-1]).then(({data}) => {
this.searchData.partNo = data.rows[0].partNo
this.num=1;
this.bomNum=1;
this.routingNum=1;
this.remark=data.rows[0].remark;
this.searchData.site= data.rows[0].site;
this.partDescription= data.rows[0].partDescription+'/'+data.rows[0].spec;
this.lastPart.pop();
getPartSubPropertiesValueHeaderData(this.searchData).then(({data}) => {
this.list = data.rows;
this.bomList = data.rows2;
this.routingList = data.rows3;
// if(data.rows.length==0){
// this.$alert('', '', {
// confirmButtonText: ''
// })
// return false;
// }
this.search();
this.searchBom();
this.searchRouting()
if(this.list.length>0) {
this.subCodeDesc = this.list[this.num - 1].subCodeDesc;
}else {
this.subCodeDesc ='';
}
})
})
}, },
search(){ search(){
if( this.list.length==0){ if( this.list.length==0){
this.tableData =[];
return false; return false;
} }
let postData={ let postData={
@ -305,7 +383,8 @@
}, },
searchBom(){ searchBom(){
if( this.bomList.length==0){ if( this.bomList.length==0){
this.bomTable =[];
this.bomRevNo="";
return false; return false;
} }
this.bomRevNo=this.bomList[this.bomNum-1].revNo this.bomRevNo=this.bomList[this.bomNum-1].revNo
@ -320,7 +399,8 @@
}, },
searchRouting(){ searchRouting(){
if( this.routingList.length==0){ if( this.routingList.length==0){
this.routingTable =[];
this.routingRevNo='';
return false; return false;
} }
this.routingRevNo=this.routingList[this.routingNum-1].revNo this.routingRevNo=this.routingList[this.routingNum-1].revNo

28
src/views/modules/production/soscheduleRouting.vue

@ -180,6 +180,34 @@
min-width="160" min-width="160"
label="工序名称"> label="工序名称">
</el-table-column> </el-table-column>
<el-table-column
prop="qtyRequired"
header-align="center"
align="right"
min-width="80"
label="派工数量">
</el-table-column>
<el-table-column
prop="weight"
header-align="center"
align="right"
min-width="80"
label="参考重量">
</el-table-column>
<el-table-column
prop="qtyReported"
header-align="center"
align="right"
min-width="80"
label="报工数量">
</el-table-column>
<el-table-column
prop="qtyApprove"
header-align="center"
align="right"
min-width="80"
label="合格数量">
</el-table-column>
<el-table-column <el-table-column
prop="closedFlag" prop="closedFlag"
header-align="center" header-align="center"

Loading…
Cancel
Save