Browse Source

0505更新

master
ruanqi 4 years ago
parent
commit
425fd0ec8d
  1. 2
      config/index.js
  2. 17
      src/views/modules/board/delNotifyBoard.vue
  3. 268
      src/views/modules/board/newScheduledBoard.vue
  4. 40
      src/views/modules/production/close_schedule.vue
  5. 8
      src/views/newTime.vue

2
config/index.js

@ -23,7 +23,7 @@ module.exports = {
}, },
// Various Dev Server settings // Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST
host: '192.168.1.130', // can be overwritten by process.env.HOST
port: 8001, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined port: 8001, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true, autoOpenBrowser: true,
errorOverlay: true, errorOverlay: true,

17
src/views/modules/board/delNotifyBoard.vue

@ -120,13 +120,12 @@
// } // }
}, },
tableRowClassName ({row, rowIndex}) { tableRowClassName ({row, rowIndex}) {
// if (row.finishedFlag == '2') {
// return 'success-row'
// }
// if (row.finishedFlag == '3') {
// return 'false-row'
// }
// return ''
let date =new Date(this.dayjs().format('YYYY-MM-DD').replace('-', '/'));
let notifyDate = new Date(row.notifyDate.replace('-', '/'))
if (date>notifyDate) {
return 'yellow-row'
}
}, },
search () { search () {
let inData= {number:this.pageIndex}; let inData= {number:this.pageIndex};
@ -196,8 +195,8 @@
} }
.tableBoard .el-table .success-row {
background: #1bb61b;
.tableBoard .el-table .yellow-row {
background: #cbc60e;
} }
.tableBoard .el-table .false-row { .tableBoard .el-table .false-row {
background: #db1212; background: #db1212;

268
src/views/modules/board/newScheduledBoard.vue

@ -1,80 +1,132 @@
<template> <template>
<div class="container" > <div class="container" >
<div style="width:100%;height: 20%;text-align:center;">
<div style="width:100%;height: 19%;text-align:center;">
<div style="float: left;width: 25%;height: 100%;text-align:left; ">
<div style="height: 60%;width: 100%;text-align: left;margin-top: 1%">
<label style="font-size: 40px;color: #9c0202;margin-left: 2%">Liftech</label>
</div>
</div>
<TimeC></TimeC> <TimeC></TimeC>
<!-- <div style="font-size: 26px;float: right;color: #ffffff;height: 100%" v-html="clock"></div>--> <!-- <div style="font-size: 26px;float: right;color: #ffffff;height: 100%" v-html="clock"></div>-->
<div style="float: left;width: 25%;height: 100%;text-align:center;margin-left: 37% ">
<div style="height: 40%;width: 100%;text-align: center;margin-top: 3%;">
<label style="font-size: 30px;color: #ffffff">生产情况看板</label>
</div>
<div style="height: 40%;width: 100%;text-align: center;margin-top: 0%;">
<label id="resourceIdName" style="font-size: 24px;color: #fff300"></label>
<div style="float: left;width: 35%;height: 100%;text-align:center;margin-left: 7% ">
<div style="height: 45%;width: 100%;text-align: center;margin-top: 3%;">
<label style="font-size: 30px;color: #ffffff">生产情况看板<br>Production Board</label>
</div> </div>
</div> </div>
</div> </div>
<div style="width:100%;height: 79%;"> <div style="width:100%;height: 79%;">
<div style="float: left;height: 100%;width: 35%; ">
<div style="height: 12%;width: 100%;margin-top: 1%">
<div
style="width: 12%;height: 40%;float: left;margin-left: 18%;border-radius: 10px; background-color: #ec6566;"></div>
<div style="width: 25%;height: 50%;float: left;margin-left: 3%;">
<label style="font-size: 16px;color:#ffffff; ">未完成</label>
</div>
<div
style="width: 12%;height: 40%;float: left;margin-left: 1%;border-radius: 10px; background-color: #90ca75;"></div>
<div style="width: 25%;height: 50%;float: left;margin-left: 3%;">
<label style="font-size: 16px;color:#ffffff; ">已完成</label>
</div>
<!-- <div style="float: left;height: 100%;width: 35%; ">-->
<!-- <div style="height: 12%;width: 100%;margin-top: 1%">-->
<!-- <div-->
<!-- style="width: 12%;height: 40%;float: left;margin-left: 18%;border-radius: 10px; background-color: #ec6566;"></div>-->
<!-- <div style="width: 25%;height: 50%;float: left;margin-left: 3%;">-->
<!-- <label style="font-size: 16px;color:#ffffff; ">未完成</label>-->
<!-- </div>-->
<!-- <div-->
<!-- style="width: 12%;height: 40%;float: left;margin-left: 1%;border-radius: 10px; background-color: #90ca75;"></div>-->
<!-- <div style="width: 25%;height: 50%;float: left;margin-left: 3%;">-->
<!-- <label style="font-size: 16px;color:#ffffff; ">已完成</label>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div style="height: 88%;width: 100%;">-->
<!-- <div id="pie" style="float:left;margin-left: 0px; margin-top: 0%; width: 100%; height:80%;"></div>-->
<!-- </div>-->
<!-- </div>-->
<div style="float: left;height: 100%;width: 38%; ">
<div style="height: 28%;width: 100%;margin-top: 0.5%" class="board2">
<el-table
height="150"
:data="tableList2"
:cell-style="board2Function"
style="width: 100%">
<el-table-column
prop="qty1"
header-align="center"
align="center"
min-width="40"
label="排产数/PlanQty"
:render-header="renderHeader"
>
</el-table-column>
<el-table-column
prop="qty2"
header-align="center"
align="center"
min-width="63"
label="已入库/WarehouseQty"
:render-header="renderHeader">
</el-table-column>
<el-table-column
prop="qty3"
header-align="center"
align="center"
min-width="60"
label="未入库已生产/InProgressQty"
:render-header="renderHeader">
</el-table-column>
<el-table-column
prop="qty4"
header-align="center"
align="center"
min-width="62"
label="未生产/UnapproveQty"
:render-header="renderHeader">
</el-table-column>
</el-table>
</div> </div>
<div style="height: 88%;width: 100%;">
<div id="pie" style="float:left;margin-left: 0px; margin-top: 0%; width: 100%; height:80%;"></div>
<div style="height: 72%;width: 100%;">
<div id="pie" style="float:left;margin-left: 0px; margin-top: -3%; width: 100%; height:100%;"></div>
</div> </div>
</div> </div>
<div style="float: left;height: 45%;width: 58%;margin-left:3% " class="board">
<table class="table table-bordered" style="width:100%;font-size:16px;color: #ffffff" id="table">
</table>
<div style="float: left;height: 53%;width: 53%;margin-left:3% " class="board">
<el-table <el-table
:height="height"
height="250"
:data="tableList" :data="tableList"
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
prop="resourceDesc"
prop="resourceId"
header-align="center" header-align="center"
align="center" align="center"
min-width="100"
label="机台名称">
min-width="72"
label="机台名称/Machine"
:render-header="renderHeader"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="qtyRequired" prop="qtyRequired"
header-align="center" header-align="center"
align="center" align="center"
min-width="100"
label="排产数量">
min-width="75"
label="排产数量/PlanQty"
:render-header="renderHeader">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="qtyApprove" prop="qtyApprove"
header-align="center" header-align="center"
align="center" align="center"
min-width="100"
label="完成数量">
min-width="90"
label="完成数量/ApproveQty"
:render-header="renderHeader">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="qtyReported" prop="qtyReported"
header-align="center" header-align="center"
align="center" align="center"
min-width="100"
label="已入库数量">
min-width="108"
label="已入库数量/WarehouseQty"
:render-header="renderHeader">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="qtyUnReported" prop="qtyUnReported"
header-align="center" header-align="center"
align="center" align="center"
min-width="100"
label="未入库数量">
min-width="125"
label="未入库数量/UnwarehouseQty"
:render-header="renderHeader">>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div style="float: left;height: 49%;width: 65%; ">
<div style="float: left;height: 47%;width: 62%; ">
<div id="main" style="width: 100%;height: 100%;margin-top: 0px"></div> <div id="main" style="width: 100%;height: 100%;margin-top: 0px"></div>
</div> </div>
</div> </div>
@ -104,6 +156,7 @@
height:200, height:200,
// ip:'', // ip:'',
refreshTime:5, refreshTime:5,
tableList2:[],
} }
}, },
components: { components: {
@ -115,6 +168,15 @@
getScheduledData().then(({data}) => { getScheduledData().then(({data}) => {
this.pieData=data.pieData; this.pieData=data.pieData;
this.barList=data.barList; this.barList=data.barList;
this.tableList2=[],
this.tableList2.push(this.pieData);
let pieData2={
qty1: '-',
qty2: this.pieData.per2 +'%',
qty3: this.pieData.per3 +'%',
qty4: this.pieData.per4 +'%',
}
this.tableList2.push(pieData2)
console.log(data.pieData) console.log(data.pieData)
console.log(data.barList) console.log(data.barList)
this.number2=0; this.number2=0;
@ -143,40 +205,47 @@
if (this.myChart!=null) { if (this.myChart!=null) {
this.myChart.clear() this.myChart.clear()
} }
// $("#resourceIdName").html("");
this.option = ({ this.option = ({
title: [{ title: [{
text: '总完成情况' ,
text: '总生产情况\nProduction State' ,
// text: '' + data_temp[i + x].itemNo, // text: '' + data_temp[i + x].itemNo,
// x 'center' ¦ 'left' ¦ 'right' ¦ {number}xpx // x 'center' ¦ 'left' ¦ 'right' ¦ {number}xpx
x: 'center', x: 'center',
// y 'top' ¦ 'bottom' ¦ 'center' ¦ {number}ypx // y 'top' ¦ 'bottom' ¦ 'center' ¦ {number}ypx
y: 'bottom',
y: '264px',
// itemGappx10 // itemGappx10
backgroundColor: '#EEE', backgroundColor: '#EEE',
// //
textStyle: { textStyle: {
fontSize: 20,
fontSize: 18,
fontWeight: 'bolder', fontWeight: 'bolder',
color: '#fff300' color: '#fff300'
} }
}, },
{
text: this.pieData.qtyPercent + '%',
// text: data_temp[i + x].percentage + '%',
// x 'center' ¦ 'left' ¦ 'right' ¦ {number}xpx
x: 'center',
// y 'top' ¦ 'bottom' ¦ 'center' ¦ {number}ypx
y: 'center',
// itemGappx10
backgroundColor: 'rgba(0,0,0,0)',
//
textStyle: {
fontSize: 20,
fontWeight: 'bolder',
color: color
},
}],
// {
// text: this.pieData.qtyPercent + '%',
// // text: data_temp[i + x].percentage + '%',
// // x 'center' ¦ 'left' ¦ 'right' ¦ {number}xpx
// x: 'center',
// // y 'top' ¦ 'bottom' ¦ 'center' ¦ {number}ypx
// y: 'center',
// // itemGappx10
// backgroundColor: 'rgba(0,0,0,0)',
// //
// textStyle: {
// fontSize: 20,
// fontWeight: 'bolder',
// color: color
// },
// }
],
// legend: {
// orient: 'vertical',
// left: 10,
// data: ['访', ''],
// color: ['#90ca75', '#ec6566'],
// },
series: [ series: [
{ {
name: '入库数量统计', name: '入库数量统计',
@ -185,10 +254,11 @@
data: [ // name value data: [ // name value
// {value: data_temp[i + x].approveQty, name: ''}, // {value: data_temp[i + x].approveQty, name: ''},
// {value: data_temp[i + x].unapproveQty, name: ''} // {value: data_temp[i + x].unapproveQty, name: ''}
{value: this.pieData.qtyApprove, name: ''},
{value: this.pieData.qtyUnApprove, name: ''}
{value: this.pieData.qty2, name: ''},
{value: this.pieData.qty3, name: ''},
{value: this.pieData.qty4, name: ''}
], ],
color: ['#90ca75', '#ec6566'],
color: ['#90ca75','#dbd81a', '#ec6566'],
labelLine: { labelLine: {
normal: { normal: {
show: false show: false
@ -196,13 +266,17 @@
}, },
label: { label: {
normal: { normal: {
position: 'outer', // 'outer' ¦ 'inner'
position: 'inner', // 'outer' ¦ 'inner'
// formatter: '{a} {b} : {c} ({d}%)' {b} // formatter: '{a} {b} : {c} ({d}%)' {b}
// {a}series.name {b}series.dataname // {a}series.name {b}series.dataname
// {c}series.datavalue {d}% // {c}series.datavalue {d}%
formatter: '{b}'
// formatter: '{d}'+'%',
formatter:function(data){
return data.percent.toFixed(1)+"%";
} }
} }
},
} }
] ]
}); });
@ -228,7 +302,7 @@
let valueApproveData=[]; let valueApproveData=[];
for (let a = 0; a <this.barList.length ; a++) { for (let a = 0; a <this.barList.length ; a++) {
let resourceData={ let resourceData={
value: this.barList[a].resourceDesc,
value: this.barList[a].resourceId,
textStyle: { textStyle: {
color: '#EEE' color: '#EEE'
} }
@ -424,6 +498,24 @@
} }
}) })
}, },
renderHeader(h, { column, $index }) {
return h("span", {}, [
h("span", {}, column.label.split("/")[0]),
h("br"),
h("span", {}, column.label.split("/")[1])
]);
},
board2Function({row, column, rowIndex, columnIndex}){
if(columnIndex==1){
return 'background-color: #90ca75;'
}
if(columnIndex==2){
return 'background-color: #dbd81a;'
}
if(columnIndex==3){
return 'background-color: #ec6566;'
}
}
}, },
created(){ created(){
@ -440,7 +532,7 @@
} }
</script> </script>
<<style >
<style >
.container { .container {
height: 109%; height: 109%;
position: fixed; position: fixed;
@ -481,4 +573,52 @@
.board .el-table, .el-table__expanded-cell { .board .el-table, .el-table__expanded-cell {
background-color: transparent; background-color: transparent;
} }
.el-table thead {
background-color: transparent;
}
.board .el-table th .cell {
line-height: 20px;
font-size: 15px;
height: 40px;
padding: 0px;
color: yellow;
}
.board2 .el-table .cell {
line-height: 18px;
font-size: 18px;
height: 18px;
padding: 0px;
color: white;
}
/* 表格内背景颜色 */
.board2 .el-table th, .el-table tr,.el-table td{
border: 0;
background-color: transparent;
}
/* 使表格背景透明 */
.board2 .el-table th, .el-table tr {
background-color: transparent;
}
/* 删除表格下横线 */
.board2 .el-table::before {
left: 0;
bottom: 0;
width: 100%;
height: 0px;
}
/* 表格表头字体颜色 */
.board2 .el-table, .el-table__expanded-cell {
background-color: transparent;
}
.board2 .el-table th .cell {
line-height: 18px;
font-size: 13px;
height: 36px;
padding: 0px;
color: white;
}
</style> </style>

40
src/views/modules/production/close_schedule.vue

@ -78,12 +78,13 @@
prop="" prop=""
header-align="center" header-align="center"
align="center" align="center"
width="70"
width="100"
label="操作"> label="操作">
<template slot-scope="scope" class="foo_container"> <template slot-scope="scope" class="foo_container">
<a v-if="scope.row.closedFlag==='N'&&scope.row.printFlag==='N'" type="text" size="small" @click="circulation(scope.row)">流转</a> <a v-if="scope.row.closedFlag==='N'&&scope.row.printFlag==='N'" type="text" size="small" @click="circulation(scope.row)">流转</a>
<!-- <a v-if="scope.row.closedFlag==='Y'&&scope.row.qtyRequired>scope.row.qtyReported" type="text" size="small" @click="openSchedule(scope.row)">开启</a>-->
<!-- <a v-if="scope.row.closedFlag==='N'&&scope.row.qtyRequired>scope.row.qtyReported" type="text" size="small" @click="closeSchedule(scope.row)">关闭</a>-->
<a v-if="scope.row.closedFlag==='Y'&&scope.row.qtyRequired>scope.row.qtyReported" type="text" size="small" @click="openSchedule(scope.row)">开启</a>
<a v-if="scope.row.closedFlag==='N'&&scope.row.qtyRequired>scope.row.qtyReported" type="text" size="small" @click="closeSchedule(scope.row)">关闭</a>
<a v-if="scope.row.qtyApprove==0" type="text" size="small" @click="cancelSchedule(scope.row)">取消</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -192,6 +193,7 @@
getPartCheckData, getPartCheckData,
circulationPlan, circulationPlan,
getSORoutingAvailableResourceList, getSORoutingAvailableResourceList,
cancelScheduleData,
} from '@/api/production/dailyPlan.js' } from '@/api/production/dailyPlan.js'
import { import {
printSerialNo, printSerialNo,
@ -1023,6 +1025,38 @@
}) })
}, },
//--------------end--------------- //--------------end---------------
cancelSchedule (row) {
this.$confirm(`是否取消排产此条记录?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let inData = {
site: row.site,
orderNo: row.orderNo,
itemNo: row.itemNo,
seqNo: row.seqNo,
workCenterNo: row.workCenterNo,
resourceID: row.resourceId,
scheduledQty: row.qtyRequired,
scheduleDate: row.scheduledDate,
shiftNo: row.shiftNo,
}
cancelScheduleData(inData).then(({data}) => {
if (data.code === 0) {
for (let i = 0; i <this.dataList.length ; i++) {
if(this.dataList[i].seqNo==row.seqNo){
this.dataList.splice(i ,1)
}
}
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
})
},
}, },
created() { created() {
this.getTableUserColumn() this.getTableUserColumn()

8
src/views/newTime.vue

@ -36,14 +36,14 @@ export default {
var c = this.currentDate; var c = this.currentDate;
var year = c.getFullYear(); var year = c.getFullYear();
var month = c.getMonth() + 1;
var date = c.getDate();
var days = new Array("日", "一", "二", "三", "四", "五", "六");
var month = (c.getMonth() + 1 < 10) ? ("0" + (c.getMonth() + 1)) : c.getMonth() + 1;
var date = (c.getDate() < 10) ? ("0" + c.getDate()) : c.getDate();
var days = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
var day = c.getDay(); var day = c.getDay();
var hour = (c.getHours() < 10) ? ("0" + c.getHours()) : c.getHours(); var hour = (c.getHours() < 10) ? ("0" + c.getHours()) : c.getHours();
var min = (c.getMinutes() < 10) ? ("0" + c.getMinutes()) : c.getMinutes(); var min = (c.getMinutes() < 10) ? ("0" + c.getMinutes()) : c.getMinutes();
var sec = (c.getSeconds() < 10) ? ("0" + c.getSeconds()) : c.getSeconds(); var sec = (c.getSeconds() < 10) ? ("0" + c.getSeconds()) : c.getSeconds();
var now = year + "" + month + "" + date + "<br>星期" + days[day] + "<br>" + hour + ":" + min + ":" + sec;
var now = year + "-" + month + "-" + date + "<br>" + days[day] + "<br>" + hour + ":" + min + ":" + sec;
// if (hour>=10 && hour<12 && this.status==1){ // if (hour>=10 && hour<12 && this.status==1){
if (localStorage.getItem("status")==null){ if (localStorage.getItem("status")==null){

Loading…
Cancel
Save