123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429 |
- <!DOCTYPE html>
- <html lang="zh">
- <style>
-
- .marker { font-size: 12px;
-
- }
-
- </style>
- <head>
-
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=0.5">
- <!-- 一个小时刷新一下当前页 -->
- <!-- <meta http-equiv="refresh" content="3600"> -->
- <title>产线管理看板</title>
- <link href="/lib/bootstrap/bootstrap.min.css" rel="stylesheet" />
- <link href="/css/dashboard.css" rel="stylesheet" />
- <script type="text/javascript" src="/js/service/method-get-service.js"></script>
- <script type="text/javascript" src="/js/service.js"></script>
- <script type="text/javascript" src="/js/session.js"></script>
- <script type="text/javascript" src="/js/getService.js"></script>
- </head>
- <body id="container" class="container-fluid">
- <div class="row no-padding head-bar" style="height:81px">
- <div class="col-lg-1 col-md-1">
- </div>
- <div class="col-lg-4 col-md-4 page-title">
- 产线管理看板
- </div>
- <div class="col-lg-4 col-md-4 block-padding">
- <button type="button" class="btn btn-warning"
- onclick="window.location.replace('/pages/dashboard/warehouse.html');">仓库看板</button>
- <button type="button" class="btn btn-warning"
- onclick="window.location.replace('/pages/dashboard/produce.html');">制造看板</button>
- <button type="button" class="btn btn-warning"
- onclick="window.location.replace('/pages/dashboard/quality.html');">品质看板</button>
- <button type="button" class="btn btn-warning"
- onclick="window.location.replace('/pages/dashboard/esop.html');">E-SOP</button>
- <button type="button" class="btn btn-warning"
- onclick="window.location.replace('/pages/dashboard/video1.html');">云看板</button>
- </div>
- <div class="col-lg-4 col-md-4">
- </div>
- </div>
- <div class="my-container" id="div-main">
- <div class="row">
- <div class="col-lg-3 col-md-3">
- <!--人员信息-->
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12 center block-title">产线人员信息</div>
- </div>
- <div class="row" style="height: 160px;">
- <div class="person-div" v-for="user in userList" style="text-align: center;">
- <div style="margin-left:5px">
- <img height="140" width="100" v-bind:src="'/upPersonnel/Mechanice/'+user.fileName" border="0" />
- </div>
- <div style="width: 90px; overflow:hidden; word-break:break-all;white-space:nowrap">
- {{user.fileRealName}}
- </div>
- <!-- <div class="center">
- {{user.realName}} {{user.inTime}}
- </div> -->
- </div>
- </div>
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12 center block-title">标准工时与实际工时对比</div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-12" style="height:240px" id="charts_11"></div>
- </div>
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12 center block-title">产品良率</div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-2" style="height:240px" id="charts_12"></div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-12 center block-title">生产异常分类</div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-2" style="height:240px" id="charts_13"></div>
- </div>
- </div>
- <div class="col-lg-7" >
- <div class="row block-padding" style="height: 350px;">
- <div style="height: 200px;padding-left: 0px;" class="col-lg-4 col-md-4 " v-for="task in doingTaskList">
- <div class="task-block" :class="task.bgcss" style="height: 190px;width: 350px;">
- <div class="row ">
- <div class="col-lg-12 col-md-12 center task-block-title">{{task.displayName}}</div>
- </div>
- <div class="row">
- <div class="col-lg-3 col-md-3" style="text-align: center;padding: 19px 0px 0px 34px;margin-right: 7px;">
- <div class="task-block-title-small center">任务数量</div>
- <div class="task-block-title-big center">{{task.planSum}}</div>
- <div class="task-block-title-small center" style="padding-top:17px;">完工总数</div>
- <div class="task-block-title-big center">{{task.completeSum}}</div>
- </div>
- <div class="col-lg-8 col-md-8" style="padding-left: 4px;padding-top: 10px;">
- <!-- <div class="task-block-text">预计开工日期:{{task.planStartDate}}</div> -->
- <div class="task-block-text">完工日期:{{task.planCompleteDate}}</div>
- <div class="task-block-text">物料编码:{{task.productId}}</div>
- <div class="task-block-text" style="overflow:hidden; word-break:break-all;white-space:nowrap">物料名称:{{task.materialName}}</div>
- <!-- <div class="task-block-text">规格:{{task.specs}}</div> -->
- <!-- <div class="task-block-text">规格:{{task.specs}}</div> -->
- <div class="task-block-text">
- <div style="float:left">完成进度:</div>
- <div style="float:left;width:120px;padding-top:2px;">
- <div class="progress">
- <div class="progress-bar progress-bar-info" role="progressbar"
- aria-valuenow="60" aria-valuemin="0" aria-valuemax="100"
- :style="{width:task.completePercent}">
- {{task.completePercent}}
- </div>
- <div class="progress-bar progress-bar-warning" role="progressbar"
- aria-valuenow="60" aria-valuemin="0" aria-valuemax="100"
- :style="{width:task.incompletePercent}">
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="row" style="padding-top: 8px;" >
- <div class="col-lg-3 col-md-3" style="text-align: center;padding: 4px 0px 0px 34px;margin-right: 7px;">
- <div class="task-block-title-small center">工艺流程</div>
- </div>
- <div class="col-lg-8 col-md-8" style="padding-left: 4px;padding-top: 3px;">
- <span style="color: aliceblue;" v-for="(t,index) in task.fbsTechnologicalProcessItemList" >
- <!-- <span v-if="index==0&&t.isTechnological=='1'" style="font-size:15px;border-top-left-radius: 3px;border-bottom-left-radius: 3px;padding: 2px;background-color:#1ABDE6;"></span>
- <span v-if="index==0&&t.isTechnological=='2'" style="font-size:15px;border-top-left-radius: 3px;border-bottom-left-radius: 3px;padding: 2px;background-color:orange;"></span> -->
- <span v-if="t.isTechnological=='1'" style="border-radius:5px;background-color:#1ABDE6;padding: 2px;" >{{t.name}}</span>
- <span v-if="t.isTechnological=='2'" style="border-radius:5px;background-color:orange;padding: 2px;">{{t.name}}</span>
- <!-- <span v-if="index==(task.fbsTechnologicalProcessItemList.length-1)&&t.isTechnological=='1'" style="font-size:15px;border-top-right-radius: 3px;border-bottom-right-radius: 3px;padding: 2px;background-color:#1ABDE6;"></span>
- <span v-if="index==(task.fbsTechnologicalProcessItemList.length-1)&&t.isTechnological=='2'" style="font-size:15px;border-top-right-radius: 3px;border-bottom-right-radius: 3px;padding: 2px;background-color:orange;"></span> -->
- </span>
- </div>
- <!-- <div class="col-lg-12 col-md-12 " style="padding-left: 40px;overflow:hidden; word-break:break-all;white-space:nowrap">
- <span class="task-block-text" ><span class="task-block-title-small center" style="margin-right: 10%;">工艺流程</span>
- <span style="color: aliceblue;" v-for="(t,index) in task.fbsTechnologicalProcessItemList" >
-
- <span v-if="t.isTechnological=='1'" style="border-radius:5px;background-color:#1ABDE6;padding: 2px;" >{{t.name}}</span>
- <span v-if="t.isTechnological=='2'" style="border-radius:5px;background-color:orange;padding: 2px;">{{t.name}}</span>
-
- </span>
-
- </span>
- </div> -->
- </div>
- </div>
- </div>
- </div>
- <!--月生产计划-->
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12 center block-title">生产派工单</div>
- </div>
- <div class="row block-padding">
- <!-- <div class="col-lg-1 col-md-1 center no-padding">项目名称</div> -->
- <div class="col-lg-1 col-md-1 center no-padding" style="width: 8%;">工单号</div>
- <div class="col-lg-1 col-md-1 center no-padding" style="width: 9%;">物料编码</div>
- <!-- <div class="col-lg-2 col-md-2 center no-padding">型号规格</div> -->
- <div class="col-lg-1 col-md-1 center no-padding" style="width: 14%;">物料名称</div>
- <div class="col-lg-1 col-md-1 center no-padding" style="width: 7%;">计划数量</div>
- <div class="col-lg-1 col-md-1 center no-padding" style="width: 7%;">派工数量</div>
- <!-- <div class="col-lg-1 col-md-1 center no-padding" style="width: 7%;">标准工时</div> -->
- <div class="col-lg-1 col-md-1 center no-padding" style="width: 7%;">完成数量</div>
- <!-- <div class="col-lg-1 col-md-1 center no-padding" style="width: 7%;">完成工时</div> -->
- <div class="col-lg-1 col-md-1 center no-padding" style="width: 8%;">作业人员</div>
- <div class="col-lg-1 col-md-1 center no-padding" style="width: 6%;">达成率</div>
- <div class="col-lg-1 col-md-1 center no-padding" style="width: 6%;">生产效率</div>
- <div class="col-lg-1 col-md-1 center no-padding" style="width: 21%;">工艺流程</div>
- <div class="col-lg-1 col-md-1 center no-padding" style="width: 7%;text-align: left;">状态</div>
- <!-- <div class="col-lg-2 col-md-2 center no-padding">完成进度(已/未)</div> -->
- </div>
- <div class="row" v-for="product in dayProduceTaskList" style="margin-top: 5px;">
- <!-- <div style="overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-1 col-md-1 center no-padding">{{product.projectName}}</div> -->
- <div style="width: 8%;" class="col-lg-1 col-md-1 center no-padding">{{product.orderSheetCode}}</div>
- <div style="width: 9%;overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-1 col-md-1 center no-padding">{{product.materialCode}}</div>
- <!-- <div class="col-lg-2 col-md-2 center no-padding">{{product.specs}}</div> -->
- <div style="width: 14%;overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-1 col-md-1 left no-padding">{{product.materialName}}</div>
- <div style="width: 7%;" class="col-lg-1 col-md-1 center no-padding">{{product.planSum}}</div>
- <div style="width: 7%;" class="col-lg-1 col-md-1 center no-padding">{{product.numberOfTasks}}</div>
- <!-- <div style="width: 7%;" class="col-lg-1 col-md-1 center no-padding">{{product.workHour}}</div> -->
- <div style="width: 7%;" class="col-lg-1 col-md-1 center no-padding">{{product.latestCompletedQuantity}}</div>
- <!-- <div style="width: 7%;" class="col-lg-1 col-md-1 center no-padding">{{product.manHoursCompleted}}</div> -->
- <div style="width: 8%;overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-1 col-md-1 center no-padding">{{product.name}}</div>
- <div style="width: 6%;" class="col-lg-1 col-md-1 center no-padding">{{product.achievementRate}}%</div>
- <div style="width: 6%;" class="col-lg-1 col-md-1 center no-padding">{{product.productionEfficiency}}%</div>
- <div style="width: 21%;overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-1 col-md-1 center no-padding" >
- <!-- <span style="font-size: 10px;"> -->
- <span style="color: aliceblue;" v-for="(t,index) in product.fbsTechnologicalProcessItemList">
- <!-- <span v-if="index==0&&t.isTechnological=='1'" style="font-size:15px;border-top-left-radius: 3px;border-bottom-left-radius: 3px;padding: 2px;background-color:#1ABDE6;"></span>
- <span v-if="index==0&&t.isTechnological=='2'" style="font-size:15px;border-top-left-radius: 3px;border-bottom-left-radius: 3px;padding: 2px;background-color:orange;"></span> -->
- <span v-if="t.isTechnological=='1'" style="border-radius:5px;background-color:#1ABDE6;padding: 2px;" >{{t.name}}</span>
- <span v-if="t.isTechnological=='2'" style="border-radius:5px;background-color:orange;padding: 2px;">{{t.name}}</span>
- <!-- <span v-if="index==(task.fbsTechnologicalProcessItemList.length-1)&&t.isTechnological=='1'" style="font-size:15px;border-top-right-radius: 3px;border-bottom-right-radius: 3px;padding: 2px;background-color:#1ABDE6;"></span>
- <span v-if="index==(task.fbsTechnologicalProcessItemList.length-1)&&t.isTechnological=='2'" style="font-size:15px;border-top-right-radius: 3px;border-bottom-right-radius: 3px;padding: 2px;background-color:orange;"></span> -->
- </span>
- <!-- </span> -->
- </div>
- <div style="width: 7%;text-align: left;" class="col-lg-1 col-md-1 center no-padding" >
- <strong style="font-size:10px;" :style="{color:product.color}">●</strong>{{product.stateName}}
- </div>
- <!-- <div class="col-lg-2 col-md-2 center no-padding progress">
- <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="60"
- aria-valuemin="0" aria-valuemax="100" :style="{width:product.completePercent}">
- {{product.completeSum}}
- </div>
- <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60"
- aria-valuemin="0" aria-valuemax="100" :style="{width:product.incompletePercent}">
- {{product.incompleteSum}}
- </div>
- </div> -->
- </div>
- </div>
- <div class="col-lg-2">
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12 center block-title">生产效率</div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-12" style="height:190px" id="charts_21"></div>
- </div>
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12 center block-title">工时分布</div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-12" style="height:210px" id="charts_22"></div>
- </div>
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12 center block-title">计划达成率</div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-12" style="height:210px" id="charts_23"></div>
- </div>
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12 center block-title">人员出勤情况</div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-12" style="height:210px" id="charts_24"></div>
- </div>
- </div>
- </div>
- </div>
- <!-- jQuery -->
-
- <script src="/lib/jquery.min.js"></script>
- <script src="/lib/vue.min.js"></script>
- <script src="/lib/echarts/echarts.min.js"></script>
- <script src="/lib/echarts/theme/macarons.js"></script>
- <script src="/js/service/person.js?_v=2"></script>
- <script src="/js/service/material.js?_v=2"></script>
- <script src="/js/service/product.js?_v=2"></script>
- <script src="/js/service/workhour.js?_v=2"></script>
- <script src="/js/service/produce-task.js?_v=2"></script>
- <script src="/js/content/mycharts.js?_v=2"></script>
- <script type="text/javascript">
- //当日标准工时与实际工时对比
- const monthGoodList = ServiceProduct.getDayGood();
- setTimeout(beA,500);
- var initSize = 3;
- var pageSizeMonthGood = 3;
- var pageIndexMonthGood = 0;
- function beA(){
- var lsitMonth = monthGoodList.slice(pageIndexMonthGood,pageSizeMonthGood);
- pageIndexMonthGood = pageSizeMonthGood;
- pageSizeMonthGood = pageSizeMonthGood + initSize;
- ChartsService.initBarWithTwoNumberRate("charts_12", lsitMonth,
- ChartsService.getGridSpanSmall());
- if(monthGoodList.length <= pageIndexMonthGood){
- return;
- }
- setInterval(beginScrollA,10000);
- }
- function beginScrollA(){
- var lsitMonth = monthGoodList.slice(pageIndexMonthGood,pageSizeMonthGood);
- pageIndexMonthGood = pageSizeMonthGood;
- pageSizeMonthGood = pageSizeMonthGood + initSize;
- if(monthGoodList.length <= pageIndexMonthGood){
- pageIndexMonthGood = 0;
- pageSizeMonthGood = initSize;
- }
- ChartsService.initBarWithTwoNumberRate("charts_12", lsitMonth,
- ChartsService.getGridSpanSmall());
- }
- //当日良率
- const dayStandAndRealList = ServiceWorkhour.getDayStandAndRealByMaterial();
- setTimeout(beB,600);
- var pageSizeB = 3;
- var pageIndexB = 0;
- function beB(){
- var lsitDay = dayStandAndRealList.slice(pageIndexB,pageSizeB);
- pageIndexB = pageSizeB;
- pageSizeB = pageSizeB + initSize;
- ChartsService.initBarAndLine("charts_11", lsitDay,
- ChartsService.getGridSpanSmall());
- if(dayStandAndRealList.length <= pageIndexB){
- return;
- }
- setInterval(beginScrollA,10000);
- }
- function beginScrollA(){
- var lsitDay = dayStandAndRealList.slice(pageIndexB,pageSizeB);
- pageIndexB = pageSizeB;
- pageSizeB = pageSizeB + initSize;
- if(dayStandAndRealList.length <= pageIndexB){
- pageIndexB = 0;
- pageSizeB = initSize;
- }
- ChartsService.initBarAndLine("charts_11", lsitDay, ChartsService.getGridSpanSmall());
- }
- var vm = new Vue({
- el: '#div-main',
- data: {
- userList: [],
- dayProduceTaskList: [],
- doingTaskList: [],
- cacheDataObject: {}, // 从服务器加载的全数据,界面只取某几条
- timer_long: '', // 定时取服务器数据
- timer_short: '' // 数据超长定时轮播
- },
- methods: {
- // 从服务器加载数据并显示
- refreshData: function () {
- // 关闭定时器
- clearInterval(this.timer_short);
- // 刷新报表
- // ChartsService.initBarAndLine("charts_11", ServiceWorkhour
- // .getDayStandAndRealByMaterial(), ChartsService.getGridSpanSmall());
- // ChartsService.initBarWithTwoNumberRate("charts_12", ServiceProduct.getDayGood(), ChartsService.getGridSpanSmall());
- ChartsService.initBarWithShade("charts_13", ServiceProduct.getDayExceptionByCategory(), ChartsService.getGridSpanSmall());
- ChartsService.initCommonPanel("charts_21", ServiceProduct.getDayProduceRate());
- ChartsService.initCommonPie("charts_22", ServiceWorkhour.getDayByMaterial());
- ChartsService.initCommonPie("charts_23", ServiceProduceTask.getDayCompleteInfo(), [ '#ff9f7f', '#37a2da']);
- ChartsService.initCommonPie("charts_24", ServicePerson.getDayAttendance(), [ '#37a2da','#ff9f7f']);
- this.loadData();
- // 开启定时器
- this.timer_short = setInterval(this.scrollData, 30000);
- },
- // 轮播数据
- scrollData: function () {
- for (var key in this.cacheDataObject) {
- const dataList = this.cacheDataObject[key].data;
- const pagesize = this.cacheDataObject[key].pagesize;
- var pageindex = this.cacheDataObject[key].pageindex + 1;
- if (dataList.length > pagesize) {
- const pagesum = (dataList.length / pagesize).toFixed(0) * 1 + (dataList.length %
- pagesize > 0 ? 1 : 0);
- if (pageindex >= pagesum)
- pageindex = 0;
- this.cacheDataObject[key].pageindex = pageindex;
- const startIndex = pageindex * pagesize;
- const remainSum = dataList.length - startIndex;
- const recordSum = remainSum >= pagesize ? pagesize : remainSum;
- const keyPar = dataList.slice(startIndex, startIndex + pagesize);
- if(keyPar.length < 1){
- continue;
- }
- this[key] = dataList.slice(startIndex, startIndex + pagesize);
- }
- }
- },
- // 从服务器加载数据
- loadData: function () {
- this.cacheDataObject = {};
- const userList = ServicePerson.getWorkPersonList();
- this.cacheDataObject.userList = {
- data: userList,
- pagesize: 4,
- pageindex: 0
- }
- this.userList = userList.slice(0, this.cacheDataObject.userList.pagesize);
- // 生产计划
- const dayProduceTaskList = ServiceProduceTask.getDayList();
- this.cacheDataObject.dayProduceTaskList = {
- data: dayProduceTaskList,
- pagesize: 18,
- pageindex: 0
- }
- this.dayProduceTaskList = dayProduceTaskList.slice(0, this.cacheDataObject
- .dayProduceTaskList.pagesize);
- // 在生产图片
- const doingTaskList = ServiceProduceTask.getDoingListByOrder();
- this.cacheDataObject.doingTaskList = {
- data: doingTaskList,
- pagesize: 6,
- pageindex: 0
- }
- this.doingTaskList = doingTaskList.slice(0, this.cacheDataObject.doingTaskList
- .pagesize);
- }
- },
- mounted() {
- this.timer_long = setInterval(this.refreshData, 120000);
- this.refreshData();
- },
- beforeDestroy() {
- clearInterval(this.timer_long);
- clearInterval(this.timer_short);
- }
- });
- </script>
- </body>
- </html>
|