123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812 |
- <!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 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>
- <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/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/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" style="width: 28%;">
- <!--人员信息-->
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12">
- <span class="block-title-important">仓库人员信息</span>
-
- <span class="block-title-important">{{userSum}}</span>
- </div>
- </div>
- <div class="row" style="height: 20%;min-height: 145px;height: 145px">
- <div class="person-div" v-for="user in userList" style="text-align: center;">
- <div style="width:110px;margin-right: 5px">
- <img height="140" width="110" v-bind:src="'/upPersonnel/warehouse/'+user.fileName" border="0" />
- </div>
- <div style="width: 110px; overflow:hidden; word-break:break-all;white-space:nowrap">
- {{user.fileRealName}}
- </div>
- <!-- <div>
- {{user.fileName}} {{user.fileName}}
- </div> -->
- </div>
- </div>
- <!--收料待检-->
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12">
- <span class="block-title-important">待入库</span>
-
- <span class="block-title-important">{{waitingcheckMaterialSum}}</span>
- </div>
- </div>
- <div class="row">
- <div style="width: 13%;" class="col-lg-2 col-md-2 center no-padding padding-line">供方名称</div>
- <div style="width: 12%;" 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" style="width: 19%;">物料名称</div>
- <!-- <div class="col-lg-2 col-md-2 center no-padding padding-line">规格</div> -->
- <div style="width: 9%;" class="col-lg-2 col-md-2 center no-padding padding-line">订单数</div>
- <div style="width: 8%;" class="col-lg-2 col-md-2 center no-padding padding-line">到货数</div>
- <div style="width: 9%;" 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: 15%;" class="col-lg-2 col-md-2 center no-padding padding-line">到货日期</div>
- </div>
- <div class="row" style="height: 30%;overflow:hidden;min-height:145px;height:145px">
- <div class="col-lg-12 col-md-12" >
- <div class="row" v-for="material in waitingcheckMaterialList">
- <div style="width: 13%;" class="col-lg-2 col-md-2 center no-padding">{{material.vendorName}}</div>
- <div style="width: 12%;" class="col-lg-2 col-md-2 center no-padding">{{material.materialCode}}</div>
- <div style="width: 19%;overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-2 col-md-2 left">{{material.materialName}}</div>
- <!-- <div class="col-lg-2 col-md-2 center no-padding">{{material.specs}}</div> -->
- <div style="width: 9%;" class="col-lg-2 col-md-2 center no-padding">{{material.iuantity}}</div>
- <div style="width: 8%;" class="col-lg-2 col-md-2 center no-padding">{{material.iarrQTY}}</div>
- <div style="width: 9%;" class="col-lg-2 col-md-2 center no-padding">{{material.freceivedqty}}</div>
- <div style="width: 15%;" class="col-lg-2 col-md-2 center no-padding">{{material.dPODate}}</div>
- <div style="width: 15%;" class="col-lg-2 col-md-2 center no-padding">{{material.arriveDate}}</div>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-12 progress no-padding">
- <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="60"
- aria-valuemin="0" aria-valuemax="100" :style="{width:checkedMaterialSumPercent}">
- 已完成:{{checkedMaterialSum}}
- </div>
- <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60"
- aria-valuemin="0" aria-valuemax="100" :style="{width:waitingcheckMaterialSumPercent}">
- 未完成:{{waitingcheckMaterialSum}}
- </div>
- </div>
- </div>
-
- <!--安全库存-->
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12 block-title-important">安全库存</div>
- </div>
- <div class="row">
- <div style="width: 20%;" class="col-lg-2 col-md-2 center no-padding">物料编码</div>
- <div style="width: 42%;" class="col-lg-4 col-md-4 center no-padding">物料名称</div>
- <div style="width: 25%;" class="col-lg-2 col-md-2 center no-padding">现存量</div>
- <div style="width: 13%;" class="col-lg-2 col-md-2 center no-padding">安全库存</div>
- <!-- <div class="col-lg-2 col-md-2 center no-padding">总数量</div> -->
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-12" style="height: 30%;min-height:140px;height:140px">
- <div class="row" v-for="material in materialStockList">
- <div style="width: 20%;" class="col-lg-2 col-md-2 center no-padding">{{material.materialCode}}</div>
- <div style="width: 42%;overflow:hidden; word-break:break-all;white-space:nowrap;padding-left: 40px;" class="col-lg-4 col-md-4 left no-padding">{{material.materialName}}</div>
- <div style="width: 25%;" class="col-lg-2 col-md-2 center no-padding"
- :class="getMaterialStockNotEnoughClass(material)">
- {{material.realStockSum}}</div>
- <div style="width: 13%;" class="col-lg-2 col-md-2 center no-padding">{{material.safeStockSum}}</div>
- <!-- <div class="col-lg-2 col-md-2 center no-padding">{{material.realStockSum+material.safeStockSum}}</div> -->
- </div>
- </div>
- </div>
- <!--待入库-->
- <!-- <div class="row block-padding">
- <div class="col-lg-12 ">
- <span class="block-title">待入库</span>
-
- <span class="block-title-important">{{waitinginMaterialSum}}</span>
- </div>
- </div>
- <div class="row">
- <div 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 class="col-lg-3 col-md-3 center no-padding padding-line">名称</div>
- <div class="col-lg-1 col-md-1 center no-padding">到货数量</div>
- <div 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" style="height: 160px;">
- <div class="row" v-for="material in waitinginMaterialList">
- <div class="col-lg-2 col-md-2 center no-padding">{{material.vendorName}}</div>
- <div class="col-lg-2 col-md-2 center no-padding">{{material.materialCode}}</div>
- <div class="col-lg-3 col-md-3 center no-padding">{{material.materialName}}</div>
- <div class="col-lg-1 col-md-1 center no-padding">{{material.arriveSum}}</div>
- <div class="col-lg-2 col-md-2 center no-padding">{{material.arriveDate}}</div>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-12 progress no-padding">
- <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="60"
- aria-valuemin="0" aria-valuemax="100" :style="{width:inMaterialSumPercent}">
- 已完成:{{inMaterialSum}}
- </div>
- <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60"
- aria-valuemin="0" aria-valuemax="100" :style="{width:waitinginMaterialSumPercent}">
- 未完成:{{waitinginMaterialSum}}
- </div>
- </div>
- </div> -->
- <!--发货通知-->
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12" style="margin-top:10px;">
- <span class="block-title-important">发货通知</span>
-
- <span class="block-title-important">{{waitingSendProductSum}}</span>
- </div>
- </div>
- <div class="row">
- <div style="width: 20%;" class="col-lg-2 col-md-2 center no-padding padding-line">项目编码</div>
- <div style="width: 25%;" 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 style="width: 15%;" class="col-lg-2 col-md-2 center no-padding padding-line">物料编码</div>
- <div style="width: 28%;" 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: 17%;" class="col-lg-1 col-md-1 center no-padding padding-line">发货数</div>
- <div style="width: 18%;" class="col-lg-2 col-md-2 center no-padding padding-line">发货日期</div>
- </div>
- <div class="row" style="min-height:150px;height:150px">
- <div class="col-lg-12 col-md-12">
- <div class="row" v-for="product in waitingSendProductList">
- <div style="width: 20%;" class="col-lg-2 col-md-2 center no-padding">{{product.cItemCode}}</div>
- <div style="width: 25%;overflow:hidden; word-break:break-all;white-space:nowrap;" class="col-lg-2 col-md-2 center no-padding">{{product.cItemName}}</div>
- <div style="width: 20%;" class="col-lg-2 col-md-2 center no-padding">{{product.warehouseName}}</div>
- <!-- <div style="width: 15%;" class="col-lg-2 col-md-2 center no-padding">{{product.materialCode}}</div>
- <div style="width: 28%;overflow:hidden; word-break:break-all;white-space:nowrap;" class="col-lg-3 col-md-3 left no-padding">{{product.materialName}}</div> -->
- <!-- <div class="col-lg-2 col-md-2 center no-padding">{{product.specs}}</div> -->
- <div style="width: 17%;" class="col-lg-1 col-md-1 center no-padding">{{product.sendSum}}</div>
- <div style="width: 18%;" class="col-lg-2 col-md-2 center no-padding">{{product.planSendDate}}</div>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-12 progress no-padding">
- <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="60"
- aria-valuemin="0" aria-valuemax="100" :style="{width:sendProductSumPercent}">
- 已完成:{{sendProductSum}}
- </div>
- <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60"
- aria-valuemin="0" aria-valuemax="100" :style="{width:waitingSendProductSumPercent}">
- 未完成:{{waitingSendProductSum}}
- </div>
- </div>
- </div>
- </div>
- <div class="col-lg-6" style="width: 40%;">
- <div class="row block-padding" style="height: 49%;width: 100%;margin-left: 2%;">
- <div class="row">
- <div class="row">
- <!-- <div class="col-lg-12 col-md-12 center block-title">月成品出货统计</div> -->
- <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:420px" id="charts_11"></div>
- </div>
- </div>
- <!-- <div class="col-lg-6">
- <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-12" style="height:440px" id="charts_12"></div>
- </div>
- </div> -->
- </div>
-
- <div class="row block-padding" style="height: 49%;width: 100%;;margin-left: 2%;">
-
- <!-- <div class="col-lg-6 col-md-6" style="padding-left:30px;">
-
- <div class="row ">
- <div class="col-lg-12 col-md-12 center block-title">安全库存</div>
- </div>
- <div class="row block-padding">
- <div class="col-lg-2 col-md-2 center no-padding">物料编码</div>
- <div class="col-lg-4 col-md-4 center no-padding">名称</div>
- <div class="col-lg-2 col-md-2 center no-padding">现存量</div>
- <div class="col-lg-2 col-md-2 center no-padding">安全库存</div>
- <div class="col-lg-2 col-md-2 center no-padding">总数量</div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-12" style="height: 300px;">
- <div class="row" v-for="material in materialStockList">
- <div class="col-lg-2 col-md-2 center no-padding">{{material.materialCode}}</div>
- <div class="col-lg-4 col-md-4 center no-padding">{{material.materialName}}</div>
- <div class="col-lg-2 col-md-2 center no-padding"
- :class="getMaterialStockNotEnoughClass(material)">
- {{material.realStockSum}}</div>
- <div class="col-lg-2 col-md-2 center no-padding">{{material.safeStockSum}}</div>
- <div class="col-lg-2 col-md-2 center no-padding">{{material.realStockSum+material.safeStockSum}}</div>
- </div>
- </div>
- </div>
- </div> -->
- <div class="row" style="height: 49%;">
- <div class="row">
- <div class="col-lg-12 col-md-12 center block-title-important">成品库存</div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-2" style="height:480px" id="charts_22"></div>
- </div>
- </div>
- </div>
- </div>
- <div class="col-lg-3" style="width: 32%;height: 100%;">
- <!--工单备料-->
- <!-- <div class="row block-padding">
- <div class="col-lg-12 col-md-12">
- <span class="block-title-important">工单</span>
-
- <span class="block-title-important">{{orderSheetMaterialNeedSum}}</span>
-
- </div>
- </div>
- <div class="row block-padding" >
- <div class="col-lg-2 col-md-2 center no-padding">工单号</div>
- <div class="col-lg-2 col-md-2 center no-padding">物料编码</div>
- <div class="col-lg-3 col-md-3 center no-padding">物料名称</div>
- <div class="col-lg-2 col-md-2 center no-padding">数量</div>
- <div class="col-lg-2 col-md-2 center no-padding">已备数</div>
- <div class="col-lg-1 col-md-1 center no-padding">缺料</div>
- </div>
- <div class="row" style="overflow:hidden;min-height:160px;height:160px">
- <div class="col-lg-12 col-md-12">
- <div class="row" v-for="material in orderSheetMaterialList">
- <div class="col-lg-2 col-md-2 center no-padding">{{material.orderSheetCode}}</div>
- <div class="col-lg-2 col-md-2 center no-padding">{{material.materialCode}}</div>
- <div style="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.needSum}}</div>
- <div class="col-lg-2 col-md-2 center no-padding">{{material.stockSum}}</div>
- <div class="col-lg-1 col-md-1 center no-padding error-font" :class="getshortageQuantity(material)">{{material.shortageQuantity}}</div>
- </div>
- </div>
- </div> -->
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12">
- <span class="block-title-important">生产工单配料</span>
-
- <span class="block-title-important">{{orderSheetMaterialNeedSum}}</span>
-
- </div>
- </div>
- <div class="row block-padding" style="padding-bottom: 4%;">
- <div class="col-lg-2 col-md-2 left no-padding">工单号</div>
- <div class="col-lg-3 col-md-3 center no-padding">产品编码</div>
- <div class="col-lg-4 col-md-4 left no-padding">产品名称</div>
- <div class="col-lg-2 col-md-2 center no-padding">产品数量</div>
- </div>
- <div class="row" style="overflow:hidden;min-height:30px;height:30px">
- <div class="col-lg-12 col-md-12">
- <div class="row" v-for="material in orderSheetMaterialNotEnoughList">
- <div v-if="material.free1=='1'" class="col-lg-2 col-md-2 left no-padding">{{material.mocode}}</div>
- <div v-if="material.free1=='1'" class="col-lg-3 col-md-3 center no-padding">{{material.invcode}}</div>
- <div v-if="material.free1=='1'" style="overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-4 col-md-4 left no-padding">{{material.cinvname}}</div>
- <div v-if="material.free1=='1'" class="col-lg-2 col-md-2 center no-padding">{{material.modQty}}</div>
- </div>
- </div>
- </div>
- <!--工单齐套-->
- <!-- <div class="row block-padding">
- <div class="col-lg-12 ">
- <span class="block-title-important">工单齐套通知</span>
-
- <span class="block-title-important">{{orderSheetMaterialEnoughSum}}</span>
- </div>
- </div>
- <div class="row block-padding">
- <div class="col-lg-2 col-md-2 center no-padding">工单号</div>
- <div class="col-lg-2 col-md-2 center no-padding">物料编码</div>
- <div class="col-lg-3 col-md-3 center no-padding">物料名称</div>
- <div class="col-lg-2 col-md-2 center no-padding">数量</div>
- <div class="col-lg-2 col-md-2 center no-padding">已备数</div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-12" style="height: 21%;overflow:hidden;min-height:160px;height:160px">
- <div class="row" v-for="material in orderSheetMaterialEnoughList">
- <div class="col-lg-2 col-md-2 center no-padding">{{material.orderSheetCode}}</div>
- <div class="col-lg-2 col-md-2 center no-padding">{{material.materialCode}}</div>
- <div style="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.needSum}}</div>
- <div class="col-lg-2 col-md-2 center no-padding">{{material.stockSum}}</div>
- </div>
- </div>
- </div> -->
- <!--工单缺料-->
- <div class="row"><hr></div>
- <div class="row block-padding">
- <!-- <div class="col-lg-2 col-md-2 center no-padding">工单号</div>
- <div class="col-lg-2 col-md-3 center no-padding">产品名称</div> -->
- <div class="col-lg-2 col-md-2 left no-padding">物料编码</div>
- <div class="col-lg-4 col-md-4 center no-padding">物料名称</div>
- <!-- <div class="col-lg-2 col-md-2 center no-padding">规格</div> -->
- <div class="col-lg-2 col-md-2 center no-padding">应发</div>
- <div class="col-lg-2 col-md-2 center no-padding">实发</div>
- <div class="col-lg-2 col-md-2 center no-padding">库存</div>
- <!-- <div class="col-lg-2 col-md-2 center no-padding">已备数</div> -->
- </div>
- <div class="row" style="height: 44%;overflow:hidden;min-height:160px;height:360px">
- <div class="col-lg-12 col-md-12">
- <div class="row" v-for="material in orderSheetMaterialNotEnoughList">
- <!-- <div class="col-lg-2 col-md-2 center no-padding">{{material.orderSheetCode}}</div>
- <div style="overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-2 col-md-2 left no-padding">{{material.cinvname}}</div> -->
- <div class="col-lg-2 col-md-2 left no-padding">{{material.minvCode}}</div>
- <div style="overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-4 col-md-4 left no-padding">{{material.mcinvname}}</div>
- <!-- <div class="col-lg-2 col-md-2 center no-padding">{{material.specs}}</div> -->
- <div class="col-lg-2 col-md-2 center no-padding">{{material.qtys}}</div>
- <div class="col-lg-2 col-md-2 center no-padding">{{material.issQty}}</div>
- <div class="col-lg-2 col-md-2 center no-padding">{{material.materialPreparationTotal}}</div>
- <!-- <div class="col-lg-2 col-md-2 center no-padding">{{material.stockSum}}</div> -->
- </div>
- </div>
- </div>
-
- <!--领料申请-->
- <div class="row block-padding">
- <div class="col-lg-12 col-md-12 ">
- <span class="block-title-important">领料申请通知</span>
-
- <span class="block-title-important">{{applyMaterialSum}}</span>
- </div>
- </div>
- <div class="row block-padding">
- <div class="col-lg-2 col-md-2 center no-padding">领料日期</div>
- <div class="col-lg-2 col-md-2 center no-padding">物料编码</div>
- <div class="col-lg-3 col-md-4 center no-padding">物料名称</div>
- <!-- <div class="col-lg-2 col-md-2 center no-padding">规格</div> -->
- <div class="col-lg-1 col-md-1 center no-padding">数量</div>
- <div class="col-lg-2 col-md-2 center no-padding">部门</div>
- <div class="col-lg-2 col-md-2 center no-padding">申请人</div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-12" style="height: 23%;overflow:hidden;min-height:290px;height:290px">
- <div class="row" v-for="material in applyMaterialList">
- <div class="col-lg-2 col-md-2 center no-padding">{{material.ddate}}</div>
- <div style="overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-2 col-md-2 center no-padding">{{material.materialCode}}</div>
- <div style="overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-3 col-md-4 left no-padding">{{material.materialName}}</div>
- <!-- <div class="col-lg-2 col-md-2 center no-padding">{{material.specs}}</div> -->
- <div class="col-lg-1 col-md-1 center no-padding">{{material.applysum}}</div>
- <div class="col-lg-2 col-md-2 center no-padding">{{material.cdepName}}</div>
- <div class="col-lg-2 col-md-2 center no-padding">{{material.applyPerson}}</div>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-12 progress no-padding">
- <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="60"
- aria-valuemin="0" aria-valuemax="100" :style="{width:applyCompleteSumPercent}">
- 已完成:{{applyCompleteSum}}
- </div>
- <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60"
- aria-valuemin="0" aria-valuemax="100" :style="{width:applyMaterialSumPercent}">
- 未完成:{{applyMaterialSum}}
- </div>
- </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">
- // 参数说明:beginFun("图表ID","list形式数据","翻页时间(毫秒)","本页面唯一id(不可重复)")
- const monthSend = ServiceProduct.getMonthSend();
- const stockDate = ServiceProduct.getStockList();
- setTimeout(beginFun("charts_11",monthSend,10000,"charts_11",ChartsService.getGridSpanSmall()),500);
- setTimeout(beginFunA("charts_22",stockDate,10000,"charts_22",ChartsService.getGridSpanSmall()),500);
- // var interval = setInterval(getMonthSendData,10000);//项目月发货统计
- // var interval1 = setInterval(getMonthSendData1,10000);//成品库存
- var initSize = 5;
- var pageSize = 5;
- var pageIndex = 0;
- var pageSizeA = 5;
- var pageIndexA = 0;
- // const monthSend = ServiceProduct.getMonthSend();
- // let monthSendList = [];
- // for(let key in monthSend) {
- // monthSendList.push([key, monthSend[key]]);
- // }
- // var pageSize1 = 5;
- // var pageIndex1 = 0;
- // // const stockDate = ServiceProduct.getStockList();
- // let stockList = [];
- // for(let key in stockDate) {
- // stockList.push([key, stockDate[key]]);
- // }
- // function getMonthSendData(){
- // if(monthSendList.length <= initSize){
- // clearInterval(interval);
- // }
- // if(pageIndex >= monthSendList.length){
- // pageSize = 5;
- // pageIndex = 0;
- // }
- // let lsit = monthSendList.slice(pageIndex, pageSize);
- // pageIndex = pageSize;
- // pageSize = pageSize + initSize;
- // let map = {}
- // for(let key in lsit) {
- // map[lsit[key][0]] = lsit[key][1];
- // }
- // ChartsService.initCommonBar("charts_11",map);
-
-
- // }
- // function getMonthSendData1(){
- // if(stockList.length <= initSize){
- // clearInterval(interval1);
- // }
- // if(pageIndex1 >= stockList.length){
- // pageSize1 = 8;
- // pageIndex1 = 0;
- // }
- // let lsit1 = stockList.slice(pageIndex1, pageSize1);
- // pageIndex1 = pageSize1;
- // pageSize1 = pageSize1 + initSize;
- // let map = {}
- // for(let key in lsit1) {
- // map[lsit1[key][0]] = lsit1[key][1];
- // }
- // ChartsService.initCommonBar("charts_22",map);
-
- // }
- var vm = new Vue({
- el: '#div-main',
- data: {
- userList: [],
- userSum: 0,
- waitinginMaterialList: [],
- waitinginMaterialSum: 0,
- inMaterialSum: 0,
- waitinginMaterialSumPercent: '0%',
- inMaterialSumPercent: '0%',
- waitingcheckMaterialList: [],
- waitingcheckMaterialSum: 0,
- checkedMaterialSum: 0,
- checkedMaterialSumPercent: '0%',
- waitingcheckMaterialSumPercent: '0%',
- waitingSendProductList: [],
- waitingSendProductSum: 0,
- sendProductSum: 0,
- waitingSendProductSumPercent: '0%',
- sendProductSumPercent: '0%',
- materialStockList: [],
- orderSheetMaterialList: [],
- orderSheetMaterialNeedSum: 0,
- orderSheetMaterialPercent: 0,
- orderSheetMaterialEnoughList: [],
- orderSheetMaterialEnoughSum: 0,
- orderSheetMaterialNotEnoughSum: 0,
- orderSheetMaterialNotEnoughList: [],
- applyMaterialList: [],
- applyCompleteSum: 0,
- applyMaterialSum: 0,
- applyCompleteSumPercent: '0%',
- applyMaterialSumPercent: '0%',
- cacheDataObject: {}, // 从服务器加载的全数据,界面只取某几条
- timer_long: '', // 定时取服务器数据
- timer_short: '' // 数据超长定时轮播
- },
- methods: {
- // 安全库存不足时class
- getMaterialStockNotEnoughClass: function (material) {
- if (material.realStockSum * 1 < material.safeStockSum * 1) {
- return "error-font";
- }
- return "";
- },
- getOrderSheetStockNotEnoughClass: function (material) {
- if (material.needSum * 1 > material.stockSum * 1) {
- return "error-font";
- }
- return "";
- },
- //缺料
- getshortageQuantity:function(material){
- if(material.shortageQuantity*1>0){
- return "error-font";
- }
- return "";
- },
- // 从服务器加载数据并显示
- refreshData: function () {
- // 关闭定时器
- clearInterval(this.timer_short);
- // 刷新报表
- // ChartsService.initCommonBar("charts_11", ServiceProduct.getMonthSend());
- // ChartsService.initLineWithShade("charts_12", ServiceProduct.getMonthSendByProject());
- // ChartsService.initCommonBar("charts_22", ServiceProduct.getStockList());
- this.loadData();
- // 开启定时器
- this.timer_short = setInterval(this.scrollData, 20000);
- },
- // 轮播数据
- 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.getWarehousePersonList();
- this.userSum = userList.length;
- this.cacheDataObject.userList = {
- data: userList,
- pagesize: 4,
- pageindex: 0
- }
- this.userList = userList.slice(0, this.cacheDataObject.userList.pagesize);
- // 待入库
- const waitinginMaterialList = ServiceMaterial.getWatingInList();
- $.each(waitinginMaterialList,function(index,item){
- if (item.specs!=undefined && item.specs!='undefined' && item.specs.length>6)
- item.specs = item.specs.substr(0,6);
- item.arriveDate = item.arriveDate.replace(/-/g,"");
- });
- this.waitinginMaterialSum = waitinginMaterialList.length;
- this.inMaterialSum = ServiceMaterial.getInSum();
- const waitinginMaterialSumPercent = (this.waitinginMaterialSum / (this
- .waitinginMaterialSum +
- this.inMaterialSum) * 100)
- .toFixed(0);
- this.inMaterialSumPercent = (100 - waitinginMaterialSumPercent) + '%';
- this.waitinginMaterialSumPercent = waitinginMaterialSumPercent + '%';
- this.cacheDataObject.waitinginMaterialList = {
- data: waitinginMaterialList,
- pagesize: 8,
- pageindex: 0
- }
- this.waitinginMaterialList = waitinginMaterialList.slice(0, this.cacheDataObject
- .waitinginMaterialList.pagesize);
- // 收料待检
- const waitingcheckMaterialList = ServiceMaterial.getWatingCheckList();
- $.each(waitingcheckMaterialList,function(index,item){
- // if (item.specs.length>6)
- // item.specs = item.specs.substr(0,6);
- // item.arriveDate = item.arriveDate.replace(/-/g,"");
- });
- this.waitingcheckMaterialSum = waitingcheckMaterialList.length;
- this.checkedMaterialSum = ServiceMaterial.getCheckSum();
-
- const checkedMaterialSumPercent = (this.checkedMaterialSum / (this.checkedMaterialSum +
- this.waitingcheckMaterialSum) * 100)
- .toFixed(2);
- this.waitingcheckMaterialSumPercent = (100 - checkedMaterialSumPercent) + '%';
-
- this.checkedMaterialSumPercent = checkedMaterialSumPercent + '%';
- this.cacheDataObject.waitingcheckMaterialList = {
- data: waitingcheckMaterialList,
- pagesize: 7,
- pageindex: 0
- }
- this.waitingcheckMaterialList = waitingcheckMaterialList.slice(0, this.cacheDataObject
- .waitingcheckMaterialList.pagesize);
- // 发货通知
- const waitingSendProductList = ServiceProduct.getWatingSendList();
- $.each(waitingSendProductList,function(index,item){
- if (item.specs != null && item.specs != undefined && item.specs.length>6)
- item.specs = item.specs.substr(0,6);
- item.planSendDate = item.planSendDate.replace(/-/g,"");
- });
- this.waitingSendProductSum = waitingSendProductList.length;
- this.sendProductSum = ServiceProduct.getSendSum();
- const waitingSendProductSumPercent = (this.waitingSendProductSum / (this
- .waitingSendProductSum +
- this.sendProductSum) * 100)
- .toFixed(0);
- this.sendProductSumPercent = (100 - waitingSendProductSumPercent) + '%';
- this.waitingSendProductSumPercent = waitingSendProductSumPercent + '%';
- this.cacheDataObject.waitingSendProductList = {
- data: waitingSendProductList,
- pagesize: 8,
- pageindex: 0
- }
- this.waitingSendProductList = waitingSendProductList.slice(0, this.cacheDataObject
- .waitingSendProductList.pagesize);
- // 库存
- const materialStockList = ServiceMaterial.getStockList();
- this.cacheDataObject.materialStockList = {
- data: materialStockList,
- pagesize: 8,
- pageindex: 0
- }
- this.materialStockList = materialStockList.slice(0, this.cacheDataObject
- .materialStockList.pagesize);
- /** 工单备料 **/
- // var orderSheetList=ServiceMaterial.getListByOrderSheet("1");
- // const orderSheetMaterialList = ServiceMaterial.getListByOrderSheet1(orderSheetList);
- // const orderSheetMaterialList = ServiceMaterial.getOrderDetailList();
- // var orderSheetMaterialNeedSum = 0;
- // var orderSheetMaterialStockSum = 0;
- // this.orderSheetMaterialNeedSum = orderSheetMaterialList.length;
- // orderSheetMaterialNeedSum = orderSheetMaterialList.length;
- // $.each(orderSheetMaterialList, function (index, item) {
- // if (item.needSum * 1 > item.stockSum * 1)
- // orderSheetMaterialStockSum++;
- // });
-
- // this.orderSheetMaterialPercent = ((orderSheetMaterialNeedSum -
- // orderSheetMaterialStockSum) /
- // orderSheetMaterialNeedSum * 100).toFixed("0");
-
- // this.cacheDataObject.orderSheetMaterialList = {
- // data: orderSheetMaterialList,
- // pagesize: 8,
- // pageindex: 0
- // }
- // this.orderSheetMaterialList = orderSheetMaterialList.slice(0, this.cacheDataObject
- // .orderSheetMaterialList.pagesize);
- /** 工单缺料 **/
- // const orderSheetMaterialNotEnoughList = ServiceMaterial.getListByOrderSheetNotEnough();
- // const orderSheetMaterialNotEnoughList = ServiceMaterial.getListByOrderSheet3(orderSheetList);
- const orderSheetMaterialNotEnoughList = ServiceMaterial.getMoallocateList();
- this.orderSheetMaterialNeedSum=ServiceMaterial.getMoallocateListGroupCount();
- if(orderSheetMaterialNotEnoughList){
- this.orderSheetMaterialNotEnoughSum = orderSheetMaterialNotEnoughList.length;
- }else{
- this.orderSheetMaterialNotEnoughSum=0;
- }
-
- this.cacheDataObject.orderSheetMaterialNotEnoughList = {
- data: orderSheetMaterialNotEnoughList,
- pagesize: 18,
- pageindex: 0
- }
- this.orderSheetMaterialNotEnoughList = orderSheetMaterialNotEnoughList.slice(0, this
- .cacheDataObject.orderSheetMaterialNotEnoughList.pagesize);
- /** 工单齐套 **/
- // const orderSheetMaterialEnoughList = ServiceMaterial.getListByOrderSheetEnough();
- // const orderSheetMaterialEnoughList = ServiceMaterial.getListByOrderSheet2(orderSheetList);
- // this.orderSheetMaterialEnoughSum = orderSheetMaterialEnoughList.length;
- // this.cacheDataObject.orderSheetMaterialEnoughList = {
- // data: orderSheetMaterialEnoughList,
- // pagesize: 8,
- // pageindex: 0
- // }
- // this.orderSheetMaterialEnoughList = orderSheetMaterialEnoughList.slice(0, this
- // .cacheDataObject.orderSheetMaterialEnoughList.pagesize);
- /** 领料申请 **/
- const applyMaterialList = ServiceMaterial.getApplyList();
- this.applyCompleteSum = ServiceMaterial.getApplyCompleteSum();
- this.applyMaterialSum = applyMaterialList.length;
- const applyCompleteSumPercent = (this.applyCompleteSum / (this.applyCompleteSum +
- this.applyMaterialSum) * 100).toFixed(0);
- this.applyMaterialSumPercent = (100 - applyCompleteSumPercent) + '%';
- this.applyCompleteSumPercent = applyCompleteSumPercent + '%';
- this.cacheDataObject.applyMaterialList = {
- data: applyMaterialList,
- pagesize: 13,
- pageindex: 0
- }
- this.applyMaterialList = applyMaterialList.slice(0, this.cacheDataObject
- .applyMaterialList.pagesize);
- }
- },
- mounted() {
- this.timer_long = setInterval(this.refreshData, 600000);
- this.refreshData();
- },
- beforeDestroy() {
- clearInterval(this.timer_long);
- clearInterval(this.timer_short);
- }
- });
- </script>
- </body>
- </html>
|