123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408 |
- <!DOCTYPE html>
- <html lang="zh">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=0.5">
- <title>品质管理看板</title>
- <link href="/lib/bootstrap/bootstrap.min.css" rel="stylesheet" />
- <link href="/css/dashboard.css" rel="stylesheet" />
- <script src="/lib/layui/layui.all.js" charset="utf-8"></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>
- <script type="text/javascript" src="/js/service/method-get-service.js"></script>
- <script type="text/javascript" src="/lib/jquery-3.4.1.js"></script>
- <script type="text/javascript" src="/lib/jquery-3.4.1.min.js"></script>
- </head>
- <script>
-
- // $(function () {
- // ServiceLoginOperation.Login();
- // })
- </script>
- <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/line.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" style="font-size:18px;">
- <div class="col-lg-4 col-md-4" style="width: 34%;">
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12 center block-title-important">未来3天的到货计划</div>
- </div>
- <div class="row block-padding">
- <div style="width: 6%;" class="col-lg-1 col-md-1 center no-padding padding-line">序号</div>
- <div style="width: 16%;" class="col-lg-2 col-md-2 center no-padding padding-line">计划<br/>到货日期</div>
- <div style="width: 16%;" class="col-lg-2 col-md-2 center no-padding padding-line">供应商</div>
- <div style="width: 18%;" class="col-lg-1 col-md-1 center no-padding padding-line">物料号</div>
- <div style="width: 16%;" class="col-lg-2 col-md-2 center no-padding padding-line">名称</div>
- <!-- <div class="col-lg-2 col-md-2 center no-padding padding-line">型号规格</div> -->
- <div style="width: 10%;" class="col-lg-1 col-md-1 center no-padding padding-line">到货<br />数量</div>
- <div style="width: 14%;" class="col-lg-2 col-md-2 center no-padding padding-line">备注</div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-12" >
- <div class="row" v-for="product in willArriveMeterialList" style="overflow:hidden;word-wrap: break-word;">
- <div style="width: 6%;" class="col-lg-1 col-md-1 center no-padding">{{product.index}}</div>
- <div style="width: 16%;" class="col-lg-2 col-md-2 center no-padding">{{product.arriveDate}}</div>
- <div style="width: 16%;" class="col-lg-2 col-md-2 center no-padding">{{product.cvenCode}}</div>
- <div style="overflow:hidden; word-break:break-all;white-space:nowrap;width: 18%;" class="col-lg-1 col-md-1 left no-padding">{{product.materialCode}}</div>
- <div style="overflow:hidden; word-break:break-all;white-space:nowrap;width: 16%;" class="col-lg-2 col-md-1 left no-padding">{{product.materialName}}</div>
- <!-- <div class="col-lg-2 col-md-2 center no-padding">{{product.specs}}</div> -->
- <div style="width: 10%;" class="col-lg-1 col-md-1 center no-padding">{{product.arriveSum}}</div>
- <div style="width: 14%;overflow:hidden; word-break:break-all;white-space:nowrap;text-align: left;" class="col-lg-2 col-md-3 center no-padding">{{product.citemname}}</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">
- <div class="col-lg-12 col-md-12" style="height:300px" id="charts_11"></div>
- </div> -->
- </div>
- <div class="col-lg-4 col-md-4" style="width: 30%;margin-left: 15px;" >
- <div class="row" style="padding-top:50px;padding-bottom: 50px;" style="height:200px">
- <div class="col-lg-6 col-md-6">
- <div class="quality-block-1 center">当天到货批数</div>
- <div class="quality-block-2 center">{{todayArriveSum}}</div>
- </div>
- <div class="col-lg-6 col-md-6 quality-block">
- <div class="quality-block-1 center">未来3天的到货总批数</div>
- <div class="quality-block-2 center">{{willArriveSum}}</div>
- </div>
- <div class="col-lg-6 col-md-6 quality-block" style="padding-top:20px;">
- <div class="quality-block-1 center">当月到货总批数</div>
- <div class="quality-block-2 center">{{thisMonthArriveSum}}</div>
- </div>
- <div class="col-lg-6 col-md-6 quality-block" style="padding-top:20px;">
- <div class="quality-block-1 center">未入库批数</div>
- <div class="quality-block-2 center">{{notInSum}}</div>
- </div>
- </div>
- <div class="row" style="margin-top: 10px;">
- <div class="col-lg-12 col-md-12 center block-title-important">当月供应商检验质量合格率</div>
- </div>
- <div class="row" style="width: 150%;">
- <div class="col-lg-12 col-md-12" style="height:380px;margin-left: -20%;" id="charts_21"></div>
- </div>
- </div>
- <div class="col-lg-4 col-md-4" style="width: 35%;" >
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12 center block-title-important">当前已到货未入库情况</div>
- </div>
- <div class="row block-padding" >
- <div style="width: 5%;" class="col-lg-1 col-md-1 center no-padding padding-line">序号</div>
- <div style="width: 15%;" class="col-lg-2 col-md-2 center no-padding padding-line">到货日期</div>
- <div style="width: 15%;" class="col-lg-2 col-md-2 center no-padding padding-line">供应商</div>
- <div style="width: 17%;" class="col-lg-2 col-md-2 center no-padding padding-line">物料号</div>
- <div style="width: 20%;" class="col-lg-2 col-md-2 center no-padding padding-line">名称</div>
- <!-- <div class="col-lg-2 col-md-2 center no-padding padding-line">型号规格</div> -->
- <div style="width: 10%;" class="col-lg-1 col-md-1 center no-padding padding-line">未入库<br />数量</div>
- <div style="width: 13%;" class="col-lg-1 col-md-1 center no-padding padding-line">项目名</div>
- </div>
- <div class="row" >
- <div class="col-lg-12 col-md-12" style="height:100px">
- <div class="row" v-for="product in waitingInList">
- <div style="width: 5%;" class="col-lg-1 col-md-1 center no-padding">{{product.index}}</div>
- <div style="width: 15%;" class="col-lg-2 col-md-2 center no-padding">{{product.arriveDate}}</div>
- <div style="width: 15%;" class="col-lg-2 col-md-2 center no-padding">{{product.cVenCode}}</div>
- <div style="width: 17%;overflow:hidden; word-break:break-all;white-space:nowrap;" class="col-lg-2 col-md-2 left no-padding">{{product.materialCode}}</div>
- <div style="width: 20%;overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-2 col-md-2 left no-padding">{{product.materialName}}</div>
- <!-- <div class="col-lg-2 col-md-2 center no-padding">{{product.specs}}</div> -->
- <div style="width: 10%;" class="col-lg-1 col-md-1 center no-padding">{{product.arriveSum}}</div>
- <div style="width: 13%;overflow:hidden; word-break:break-all;white-space:nowrap;text-align: left;" class="col-lg-1 col-md-1 center no-padding">{{product.cItemName}}</div>
- </div>
- </div>
- </div>
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12 center block-title-important">年度质量合格率</div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-12" style="height:380px" 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-12" style="height:300px" id="charts_31"></div>
- </div> -->
- </div>
- </div>
- <div class="row block-padding" style="font-size:18px;">
- <!-- <div class="col-md-1 col-lg-1 center block-title" style="padding-top: 80px">
- 质<br />量<br />异<br />常<br />信<br />息
- </div> -->
- <d class="col-md-6 col-lg-6" style="margin-top:-40px ;">
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12 center block-title-important">质量异常信息</div>
- </div>
- <div class="row">
- <div style="width:5%" class="col-lg-1 col-md-1 center no-padding padding-line">序号</div>
- <div style="width:15%" class="col-lg-2 col-md-2 center no-padding padding-line">检验日期</div>
- <div style="width:10%" class="col-lg-1 col-md-2 center no-padding padding-line">供应商</div>
- <div style="width:13%" class="col-lg-2 col-md-2 center no-padding padding-line">物料号</div>
- <div style="width:25%" class="col-lg-3 col-md-3 center no-padding padding-line">物料名称</div>
- <!-- <div class="col-lg-2 col-md-2 center no-padding padding-line">型号规格</div> -->
- <div style="width:30%;margin-left: 7px;" class="col-lg-3 col-md-3 center no-padding">
- <div class="row">
- <div class="col-lg-3 col-md-3 center no-padding">到货<br />数量</div>
- <div class="col-lg-3 col-md-3 center no-padding">抽检<br />数量</div>
- <div class="col-lg-3 col-md-3 center no-padding">不良<br />数量</div>
- <div class="col-lg-3 col-md-3 center no-padding">抽检<br />合格率</div>
- </div>
- </div>
- </div>
- <div class="row" v-for="material in unpassList" :class="material.bg">
- <div style="width:5%" class="col-lg-1 col-md-1 center no-padding">{{material.index}}</div>
- <div style="width:15%" class="col-lg-2 col-md-2 center no-padding">{{material.checkDate}}</div>
- <div style="width:10%" class="col-lg-1 col-md-2 center no-padding">{{material.vendorName}} </div>
- <div style="width:13%;overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-2 col-md-2 center no-padding">{{material.materialCode}}</div>
- <div style="width:25%;overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-3 col-md-3 left no-padding">{{material.materialName}}</div>
- <!-- <div class="col-lg-2 col-md-2 center no-padding">{{material.specs}}</div> -->
- <div style="width:30%;margin-left: 7px;" class="col-lg-3 col-md-3 center no-padding">
- <div class="row">
- <div class="col-lg-3 col-md-3 center no-padding">{{material.arriveSum}}</div>
- <div class="col-lg-3 col-md-3 center no-padding">{{material.checkSum}}</div>
- <div class="col-lg-3 col-md-3 center no-padding">{{material.unpassSum}}</div>
- <div class="col-lg-3 col-md-3 center no-padding">{{material.passRate}}</div>
- </div>
- </div>
- </div>
- </d>
- <div class="col-md-5 col-lg-5 center" style="margin-left: 50px;">
- <div class="row">
- <div class="col-md-6 col-lg-6 center " style="padding-bottom: 5px;margin-top:-10px;"
- v-for="showimage in showImageList">
- <!-- {{showimage }} -->
- <img :src="'/upAnomalous/'+showimage" border="0" style="width:350px;height:290px;"/>
- </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/content/mycharts.js?_v=2"></script>
- <script type="text/javascript">
- var initSize = 7;
- var pageSize = 7;
- var pageIndex = 0;
- const checkRateByBatchnoList = ServiceMaterial.getCheckRateByBatchno();
- setTimeout(beginFun3("charts_21",checkRateByBatchnoList,10000,"charts_21"),500);
-
- //年度合格率
- const monthGoodList = ServiceMaterial.getLastSixMonthQualityTargetCompare()
- setTimeout(beA,500);
- var pageSizeMonthGood = 6;
- var pageIndexMonthGood = 0;
- function beA(){
- var lsitMonth = monthGoodList.slice(pageIndexMonthGood,pageSizeMonthGood);
- pageIndexMonthGood = pageSizeMonthGood;
- pageSizeMonthGood = pageSizeMonthGood + 6;
- ChartsService.initBarAndLine2("charts_11", lsitMonth,
- ChartsService.getGridSpanSmall());
- if(monthGoodList.length <= pageIndexMonthGood){
- return;
- }
- setInterval(beginScrollA,10000);
- }
- function beginScrollA(){
- var lsitMonth = monthGoodList.slice(pageIndexMonthGood,pageSizeMonthGood);
- pageIndexMonthGood = pageSizeMonthGood;
- pageSizeMonthGood = pageSizeMonthGood + 6;
- if(monthGoodList.length <= pageIndexMonthGood){
- pageIndexMonthGood = 0;
- pageSizeMonthGood = 6;
- }
- ChartsService.initBarAndLine2("charts_11", lsitMonth,
- ChartsService.getGridSpanSmall());
- }
-
- var vm = new Vue({
- el: '#div-main',
- data: {
- willArriveMeterialList: [],
- waitingInList: [],
- todayArriveSum: 0,
- willArriveSum: 0,
- thisMonthArriveSum: 0,
- notInSum: 0,
- unpassList: [],
- showImageList: [],
- timer_quality: '',
- cacheDataObject: {}, // 从服务器加载的全数据,界面只取某几条
- timer_long: '', // 定时取服务器数据
- timer_short: '' // 数据超长定时轮播
- },
- methods: {
- // 质量异常滚动
- scrollQuality: function () {
- var i = 0
- for (; i < this.unpassList.length; i++) {
- if (this.unpassList[i].bg == "selectrow")
- break;
- }
- // 未找到,找第一条
- if (i >= this.unpassList.length) {
- i = 0;
- } else {
- this.unpassList[i].bg = "";
- if (i == this.unpassList.length - 1)
- i = 0;
- else
- i++;
- }
- this.unpassList[i].bg = "selectrow";
- this.showImageList = this.unpassList[i].images;
- },
- // 从服务器加载数据并显示
- refreshData: function () {
- // 关闭定时器
- clearInterval(this.timer_short);
- // 关闭质量异常定时器
- clearInterval(this.timer_quality);
- // 刷新报表
- // ChartsService.initBarAndLine("charts_11", ServiceMaterial
- // .getLastSixMonthQualityTargetCompare(), ChartsService.getGridSpanSmall());
- // ChartsService.initBarWithShade("charts_31", ServiceMaterial.getPassRateByVendor(),
- // ChartsService.getGridSpanSmall());
- // ChartsService.initBarWithShade("charts_21", ServiceMaterial.getCheckRateByBatchno(),
- // ChartsService.getGridSpanSmall());
- this.loadData();
- // 开启定时器
- this.timer_short = setInterval(this.scrollData, 6000);
- this.scrollQuality();
- this.timer_quality = setInterval(this.scrollQuality, 4000);
- },
- // 轮播数据
- 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 = {};
- // 未来3天到货
- const willArriveMeterialList = ServiceMaterial.getWillArriveList(3);
- this.cacheDataObject.willArriveMeterialList = {
- data: willArriveMeterialList,
- pagesize: 20,
- pageindex: 0
- }
- this.willArriveMeterialList = willArriveMeterialList.slice(0, this.cacheDataObject
- .willArriveMeterialList.pagesize);
- // 未入库
- const waitingInList = ServiceMaterial.getWatingInList();
- this.cacheDataObject.waitingInList = {
- data: waitingInList,
- pagesize: 4,
- pageindex: 0
- }
- this.waitingInList = waitingInList.slice(0, this.cacheDataObject
- .waitingInList.pagesize);
- //
-
- // 当天到货批数
- this.todayArriveSum = ServiceMaterial.getTodayArriveSum();
- // 未来3天到货
- this.willArriveSum = ServiceMaterial.getWillArriveSum(3);
- // 当月到货批数
- this.thisMonthArriveSum = ServiceMaterial.getThisMonthArriveSum();
- // 为入库总批数
- this.notInSum = ServiceMaterial.getNotInSum();
- // 质量异常
- const unpassList = ServiceMaterial.getQualityUnpassList();
- this.cacheDataObject.unpassList = {
- data: unpassList,
- pagesize: 9,
- pageindex: 0
- }
- this.unpassList = unpassList.slice(0, this.cacheDataObject
- .unpassList.pagesize);
- }
- },
- mounted() {
- this.timer_long = setInterval(this.refreshData, 600000);
- this.refreshData();
- },
- beforeDestroy() {
- clearInterval(this.timer_quality);
- clearInterval(this.timer_long);
- clearInterval(this.timer_short);
- }
- });
- </script>
- </body>
- </html>
|