warehouse.html 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793
  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=0.5">
  6. <title>仓库管理看板</title>
  7. <link href="/lib/bootstrap/bootstrap.min.css" rel="stylesheet" />
  8. <link href="/css/dashboard.css" rel="stylesheet" />
  9. <script type="text/javascript" src="/js/service.js"></script>
  10. <script type="text/javascript" src="/js/session.js"></script>
  11. <script type="text/javascript" src="/js/getService.js"></script>
  12. <script type="text/javascript" src="/js/service/method-get-service.js"></script>
  13. <script type="text/javascript" src="/lib/jquery-3.4.1.js"></script>
  14. <script type="text/javascript" src="/lib/jquery-3.4.1.min.js"></script>
  15. </head>
  16. <body id="container" class="container-fluid">
  17. <div class="row no-padding head-bar" style="height:81px">
  18. <div class="col-lg-1 col-md-1">
  19. </div>
  20. <div class="col-lg-4 col-md-4 page-title">
  21. 仓库管理看板
  22. </div>
  23. <div class="col-lg-4 col-md-4 block-padding">
  24. <button type="button" class="btn btn-warning"
  25. onclick="window.location.replace('/pages/dashboard/produce.html');">制造看板</button>
  26. <button type="button" class="btn btn-warning"
  27. onclick="window.location.replace('/pages/dashboard/line.html');">产线看板</button>
  28. <button type="button" class="btn btn-warning"
  29. onclick="window.location.replace('/pages/dashboard/quality.html');">品质看板</button>
  30. <button type="button" class="btn btn-warning"
  31. onclick="window.location.replace('/pages/dashboard/esop.html');">E-SOP</button>
  32. <button type="button" class="btn btn-warning"
  33. onclick="window.location.replace('/pages/dashboard/video1.html');">云看板</button>
  34. </div>
  35. <div class="col-lg-4 col-md-4">
  36. </div>
  37. </div>
  38. <div class="my-container" id="div-main">
  39. <div class="row">
  40. <div class="col-lg-3 col-md-3" style="width: 28%;">
  41. <!--人员信息-->
  42. <div class="row block-padding">
  43. <div class="col-lg-12 col-md-12">
  44. <span class="block-title-important">仓库人员信息</span>
  45. &nbsp;&nbsp;
  46. <span class="block-title-important">{{userSum}}</span>
  47. </div>
  48. </div>
  49. <div class="row" style="height: 20%;min-height: 145px;height: 145px">
  50. <div class="person-div" v-for="user in userList" style="text-align: center;">
  51. <div style="width:110px;margin-right: 5px">
  52. <img height="140" width="110" v-bind:src="'/upPersonnel/warehouse/'+user.fileName" border="0" />
  53. </div>
  54. <div style="width: 110px; overflow:hidden; word-break:break-all;white-space:nowrap">
  55. {{user.fileRealName}}
  56. </div>
  57. <!-- <div>
  58. {{user.fileName}}&nbsp;&nbsp;{{user.fileName}}
  59. </div> -->
  60. </div>
  61. </div>
  62. <!--收料待检-->
  63. <div class="row block-padding">
  64. <div class="col-lg-12 col-md-12">
  65. <span class="block-title-important">待入库</span>
  66. &nbsp;&nbsp;
  67. <span class="block-title-important">{{waitingcheckMaterialSum}}</span>
  68. </div>
  69. </div>
  70. <div class="row">
  71. <div style="width: 13%;" class="col-lg-2 col-md-2 center no-padding padding-line">供方名称</div>
  72. <div style="width: 12%;" class="col-lg-2 col-md-2 center no-padding padding-line">物料编码</div>
  73. <div class="col-lg-2 col-md-2 center no-padding padding-line" style="width: 19%;">物料名称</div>
  74. <!-- <div class="col-lg-2 col-md-2 center no-padding padding-line">规格</div> -->
  75. <div style="width: 9%;" class="col-lg-2 col-md-2 center no-padding padding-line">订单数</div>
  76. <div style="width: 8%;" class="col-lg-2 col-md-2 center no-padding padding-line">到货数</div>
  77. <div style="width: 9%;" class="col-lg-2 col-md-2 center no-padding padding-line">入库数</div>
  78. <div style="width: 15%;" class="col-lg-2 col-md-2 center no-padding padding-line">订单日期</div>
  79. <div style="width: 15%;" class="col-lg-2 col-md-2 center no-padding padding-line">到货日期</div>
  80. </div>
  81. <div class="row" style="height: 30%;overflow:hidden;min-height:145px;height:145px">
  82. <div class="col-lg-12 col-md-12" >
  83. <div class="row" v-for="material in waitingcheckMaterialList">
  84. <div style="width: 13%;" class="col-lg-2 col-md-2 center no-padding">{{material.vendorName}}</div>
  85. <div style="width: 12%;" class="col-lg-2 col-md-2 center no-padding">{{material.materialCode}}</div>
  86. <div style="width: 19%;overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-2 col-md-2 left">{{material.materialName}}</div>
  87. <!-- <div class="col-lg-2 col-md-2 center no-padding">{{material.specs}}</div> -->
  88. <div style="width: 9%;" class="col-lg-2 col-md-2 center no-padding">{{material.iuantity}}</div>
  89. <div style="width: 8%;" class="col-lg-2 col-md-2 center no-padding">{{material.iarrQTY}}</div>
  90. <div style="width: 9%;" class="col-lg-2 col-md-2 center no-padding">{{material.freceivedqty}}</div>
  91. <div style="width: 15%;" class="col-lg-2 col-md-2 center no-padding">{{material.dPODate}}</div>
  92. <div style="width: 15%;" class="col-lg-2 col-md-2 center no-padding">{{material.arriveDate}}</div>
  93. </div>
  94. </div>
  95. </div>
  96. <div class="row">
  97. <div class="col-lg-12 col-md-12 progress no-padding">
  98. <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="60"
  99. aria-valuemin="0" aria-valuemax="100" :style="{width:checkedMaterialSumPercent}">
  100. 已完成:{{checkedMaterialSum}}
  101. </div>
  102. <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60"
  103. aria-valuemin="0" aria-valuemax="100" :style="{width:waitingcheckMaterialSumPercent}">
  104. 未完成:{{waitingcheckMaterialSum}}
  105. </div>
  106. </div>
  107. </div>
  108. <!--安全库存-->
  109. <div class="row block-padding">
  110. <div class="col-lg-12 col-md-12 block-title-important">安全库存</div>
  111. </div>
  112. <div class="row">
  113. <div style="width: 20%;" class="col-lg-2 col-md-2 center no-padding">物料编码</div>
  114. <div style="width: 42%;" class="col-lg-4 col-md-4 center no-padding">物料名称</div>
  115. <div style="width: 25%;" class="col-lg-2 col-md-2 center no-padding">现存量</div>
  116. <div style="width: 13%;" class="col-lg-2 col-md-2 center no-padding">安全库存</div>
  117. <!-- <div class="col-lg-2 col-md-2 center no-padding">总数量</div> -->
  118. </div>
  119. <div class="row">
  120. <div class="col-lg-12 col-md-12" style="height: 30%;min-height:140px;height:140px">
  121. <div class="row" v-for="material in materialStockList">
  122. <div style="width: 20%;" class="col-lg-2 col-md-2 center no-padding">{{material.materialCode}}</div>
  123. <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>
  124. <div style="width: 25%;" class="col-lg-2 col-md-2 center no-padding"
  125. :class="getMaterialStockNotEnoughClass(material)">
  126. {{material.realStockSum}}</div>
  127. <div style="width: 13%;" class="col-lg-2 col-md-2 center no-padding">{{material.safeStockSum}}</div>
  128. <!-- <div class="col-lg-2 col-md-2 center no-padding">{{material.realStockSum+material.safeStockSum}}</div> -->
  129. </div>
  130. </div>
  131. </div>
  132. <!--待入库-->
  133. <!-- <div class="row block-padding">
  134. <div class="col-lg-12 ">
  135. <span class="block-title">待入库</span>
  136. &nbsp;&nbsp;
  137. <span class="block-title-important">{{waitinginMaterialSum}}</span>
  138. </div>
  139. </div>
  140. <div class="row">
  141. <div class="col-lg-2 col-md-2 center no-padding padding-line">供方名称</div>
  142. <div class="col-lg-2 col-md-2 center no-padding padding-line">物料编码</div>
  143. <div class="col-lg-3 col-md-3 center no-padding padding-line">名称</div>
  144. <div class="col-lg-1 col-md-1 center no-padding">到货数量</div>
  145. <div class="col-lg-2 col-md-2 center no-padding padding-line">到货日期</div>
  146. </div>
  147. <div class="row">
  148. <div class="col-lg-12 col-md-12" style="height: 160px;">
  149. <div class="row" v-for="material in waitinginMaterialList">
  150. <div class="col-lg-2 col-md-2 center no-padding">{{material.vendorName}}</div>
  151. <div class="col-lg-2 col-md-2 center no-padding">{{material.materialCode}}</div>
  152. <div class="col-lg-3 col-md-3 center no-padding">{{material.materialName}}</div>
  153. <div class="col-lg-1 col-md-1 center no-padding">{{material.arriveSum}}</div>
  154. <div class="col-lg-2 col-md-2 center no-padding">{{material.arriveDate}}</div>
  155. </div>
  156. </div>
  157. </div>
  158. <div class="row">
  159. <div class="col-lg-12 col-md-12 progress no-padding">
  160. <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="60"
  161. aria-valuemin="0" aria-valuemax="100" :style="{width:inMaterialSumPercent}">
  162. 已完成:{{inMaterialSum}}
  163. </div>
  164. <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60"
  165. aria-valuemin="0" aria-valuemax="100" :style="{width:waitinginMaterialSumPercent}">
  166. 未完成:{{waitinginMaterialSum}}
  167. </div>
  168. </div>
  169. </div> -->
  170. <!--发货通知-->
  171. <div class="row block-padding">
  172. <div class="col-lg-12 col-md-12" style="margin-top:10px;">
  173. <span class="block-title-important">发货通知</span>
  174. &nbsp;&nbsp;
  175. <span class="block-title-important">{{waitingSendProductSum}}</span>
  176. </div>
  177. </div>
  178. <div class="row">
  179. <div style="width: 20%;" class="col-lg-2 col-md-2 center no-padding padding-line">项目编码</div>
  180. <div style="width: 25%;" class="col-lg-2 col-md-2 center no-padding padding-line">项目名称</div>
  181. <div style="width: 20%;" class="col-lg-2 col-md-2 center no-padding padding-line">仓库</div>
  182. <!-- <div style="width: 15%;" class="col-lg-2 col-md-2 center no-padding padding-line">物料编码</div>
  183. <div style="width: 28%;" class="col-lg-3 col-md-3 center no-padding padding-line">物料名称</div> -->
  184. <!-- <div class="col-lg-2 col-md-2 center no-padding padding-line">规格</div> -->
  185. <div style="width: 17%;" class="col-lg-1 col-md-1 center no-padding padding-line">发货数</div>
  186. <div style="width: 18%;" class="col-lg-2 col-md-2 center no-padding padding-line">发货日期</div>
  187. </div>
  188. <div class="row" style="min-height:150px;height:150px">
  189. <div class="col-lg-12 col-md-12">
  190. <div class="row" v-for="product in waitingSendProductList">
  191. <div style="width: 20%;" class="col-lg-2 col-md-2 center no-padding">{{product.cItemCode}}</div>
  192. <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>
  193. <div style="width: 20%;" class="col-lg-2 col-md-2 center no-padding">{{product.warehouseName}}</div>
  194. <!-- <div style="width: 15%;" class="col-lg-2 col-md-2 center no-padding">{{product.materialCode}}</div>
  195. <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> -->
  196. <!-- <div class="col-lg-2 col-md-2 center no-padding">{{product.specs}}</div> -->
  197. <div style="width: 17%;" class="col-lg-1 col-md-1 center no-padding">{{product.sendSum}}</div>
  198. <div style="width: 18%;" class="col-lg-2 col-md-2 center no-padding">{{product.planSendDate}}</div>
  199. </div>
  200. </div>
  201. </div>
  202. <div class="row">
  203. <div class="col-lg-12 col-md-12 progress no-padding">
  204. <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="60"
  205. aria-valuemin="0" aria-valuemax="100" :style="{width:sendProductSumPercent}">
  206. 已完成:{{sendProductSum}}
  207. </div>
  208. <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60"
  209. aria-valuemin="0" aria-valuemax="100" :style="{width:waitingSendProductSumPercent}">
  210. 未完成:{{waitingSendProductSum}}
  211. </div>
  212. </div>
  213. </div>
  214. </div>
  215. <div class="col-lg-6" style="width: 40%;">
  216. <div class="row block-padding" style="height: 49%;width: 100%;margin-left: 2%;">
  217. <div class="row">
  218. <div class="row">
  219. <!-- <div class="col-lg-12 col-md-12 center block-title">月成品出货统计</div> -->
  220. <div class="col-lg-12 col-md-12 center block-title-important">项目月发货统计</div>
  221. </div>
  222. <div class="row">
  223. <div class="col-lg-12 col-md-12" style="height:420px" id="charts_11"></div>
  224. </div>
  225. </div>
  226. <!-- <div class="col-lg-6">
  227. <div class="row">
  228. <div class="col-lg-12 col-md-12 center block-title">项目月发货统计</div>
  229. </div>
  230. <div class="row">
  231. <div class="col-lg-12 col-md-12" style="height:440px" id="charts_12"></div>
  232. </div>
  233. </div> -->
  234. </div>
  235. <div class="row block-padding" style="height: 49%;width: 100%;;margin-left: 2%;">
  236. <!-- <div class="col-lg-6 col-md-6" style="padding-left:30px;">
  237. <div class="row ">
  238. <div class="col-lg-12 col-md-12 center block-title">安全库存</div>
  239. </div>
  240. <div class="row block-padding">
  241. <div class="col-lg-2 col-md-2 center no-padding">物料编码</div>
  242. <div class="col-lg-4 col-md-4 center no-padding">名称</div>
  243. <div class="col-lg-2 col-md-2 center no-padding">现存量</div>
  244. <div class="col-lg-2 col-md-2 center no-padding">安全库存</div>
  245. <div class="col-lg-2 col-md-2 center no-padding">总数量</div>
  246. </div>
  247. <div class="row">
  248. <div class="col-lg-12 col-md-12" style="height: 300px;">
  249. <div class="row" v-for="material in materialStockList">
  250. <div class="col-lg-2 col-md-2 center no-padding">{{material.materialCode}}</div>
  251. <div class="col-lg-4 col-md-4 center no-padding">{{material.materialName}}</div>
  252. <div class="col-lg-2 col-md-2 center no-padding"
  253. :class="getMaterialStockNotEnoughClass(material)">
  254. {{material.realStockSum}}</div>
  255. <div class="col-lg-2 col-md-2 center no-padding">{{material.safeStockSum}}</div>
  256. <div class="col-lg-2 col-md-2 center no-padding">{{material.realStockSum+material.safeStockSum}}</div>
  257. </div>
  258. </div>
  259. </div>
  260. </div> -->
  261. <div class="row" style="height: 49%;">
  262. <div class="row">
  263. <div class="col-lg-12 col-md-12 center block-title-important">成品库存</div>
  264. </div>
  265. <div class="row">
  266. <div class="col-lg-12 col-md-2" style="height:480px" id="charts_22"></div>
  267. </div>
  268. </div>
  269. </div>
  270. </div>
  271. <div class="col-lg-3" style="width: 32%;height: 100%;">
  272. <!--工单备料-->
  273. <div class="row block-padding">
  274. <div class="col-lg-12 col-md-12">
  275. <span class="block-title-important">工单备料</span>
  276. &nbsp;&nbsp;
  277. <span class="block-title-important">{{orderSheetMaterialNeedSum}}</span>
  278. &nbsp;&nbsp;
  279. <!-- <span class="block-title-important">{{orderSheetMaterialPercent}}%</span> -->
  280. </div>
  281. </div>
  282. <div class="row block-padding" >
  283. <div class="col-lg-2 col-md-2 center no-padding">工单号</div>
  284. <div class="col-lg-2 col-md-2 center no-padding">物料编码</div>
  285. <div class="col-lg-3 col-md-3 center no-padding">物料名称</div>
  286. <!-- <div class="col-lg-2 col-md-2 center no-padding">规格</div> -->
  287. <div class="col-lg-2 col-md-2 center no-padding">数量</div>
  288. <div class="col-lg-2 col-md-2 center no-padding">已备数</div>
  289. <div class="col-lg-1 col-md-1 center no-padding">缺料</div>
  290. </div>
  291. <div class="row" style="overflow:hidden;min-height:160px;height:160px">
  292. <div class="col-lg-12 col-md-12">
  293. <div class="row" v-for="material in orderSheetMaterialList">
  294. <div class="col-lg-2 col-md-2 center no-padding">{{material.orderSheetCode}}</div>
  295. <div class="col-lg-2 col-md-2 center no-padding">{{material.materialCode}}</div>
  296. <div style="overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-3 col-md-3 left no-padding">{{material.materialName}}</div>
  297. <!-- <div class="col-lg-2 col-md-2 center no-padding">{{material.specs}}</div> -->
  298. <!-- <div class="col-lg-2 col-md-2 center no-padding"
  299. :class="getOrderSheetStockNotEnoughClass(material)"
  300. > -->
  301. <div class="col-lg-2 col-md-2 center no-padding"
  302. >
  303. {{material.needSum}}</div>
  304. <div class="col-lg-2 col-md-2 center no-padding">{{material.stockSum}}</div>
  305. <div class="col-lg-1 col-md-1 center no-padding error-font" :class="getshortageQuantity(material)">{{material.shortageQuantity}}</div>
  306. </div>
  307. </div>
  308. </div>
  309. <!--工单齐套-->
  310. <div class="row block-padding">
  311. <div class="col-lg-12 ">
  312. <span class="block-title-important">工单齐套通知</span>
  313. &nbsp;&nbsp;
  314. <span class="block-title-important">{{orderSheetMaterialEnoughSum}}</span>
  315. </div>
  316. </div>
  317. <div class="row block-padding">
  318. <div class="col-lg-2 col-md-2 center no-padding">工单号</div>
  319. <div class="col-lg-2 col-md-2 center no-padding">物料编码</div>
  320. <div class="col-lg-3 col-md-3 center no-padding">物料名称</div>
  321. <!-- <div class="col-lg-2 col-md-2 center no-padding">规格</div> -->
  322. <div class="col-lg-2 col-md-2 center no-padding">数量</div>
  323. <div class="col-lg-2 col-md-2 center no-padding">已备数</div>
  324. </div>
  325. <div class="row">
  326. <div class="col-lg-12 col-md-12" style="height: 21%;overflow:hidden;min-height:160px;height:160px">
  327. <div class="row" v-for="material in orderSheetMaterialEnoughList">
  328. <div class="col-lg-2 col-md-2 center no-padding">{{material.orderSheetCode}}</div>
  329. <div class="col-lg-2 col-md-2 center no-padding">{{material.materialCode}}</div>
  330. <div style="overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-3 col-md-3 left no-padding">{{material.materialName}}</div>
  331. <!-- <div class="col-lg-2 col-md-2 center no-padding">{{material.specs}}</div> -->
  332. <div class="col-lg-2 col-md-2 center no-padding">{{material.needSum}}</div>
  333. <div class="col-lg-2 col-md-2 center no-padding">{{material.stockSum}}</div>
  334. </div>
  335. </div>
  336. </div>
  337. <!--工单缺料-->
  338. <div class="row block-padding">
  339. <div class="col-lg-12 col-md-12">
  340. <span class="block-title-important">工单缺料明细</span>
  341. &nbsp;&nbsp;
  342. <span class="block-title-important">{{orderSheetMaterialNotEnoughSum}}</span>
  343. </div>
  344. </div>
  345. <div class="row block-padding">
  346. <div class="col-lg-2 col-md-2 center no-padding">工单号</div>
  347. <div class="col-lg-3 col-md-3 center no-padding">产品名称</div>
  348. <div class="col-lg-2 col-md-2 center no-padding">物料编码</div>
  349. <div class="col-lg-3 col-md-3 center no-padding">物料名称</div>
  350. <!-- <div class="col-lg-2 col-md-2 center no-padding">规格</div> -->
  351. <div class="col-lg-2 col-md-2 center no-padding">数量</div>
  352. <!-- <div class="col-lg-2 col-md-2 center no-padding">已备数</div> -->
  353. </div>
  354. <div class="row" style="height: 23%;overflow:hidden;min-height:160px;height:160px">
  355. <div class="col-lg-12 col-md-12">
  356. <div class="row" v-for="material in orderSheetMaterialNotEnoughList">
  357. <div class="col-lg-2 col-md-2 center no-padding">{{material.orderSheetCode}}</div>
  358. <div style="overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-3 col-md-3 left no-padding">{{material.cinvname}}</div>
  359. <div class="col-lg-2 col-md-2 center no-padding">{{material.materialCode}}</div>
  360. <div style="overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-3 col-md-3 left no-padding">{{material.materialName}}</div>
  361. <!-- <div class="col-lg-2 col-md-2 center no-padding">{{material.specs}}</div> -->
  362. <div class="col-lg-2 col-md-2 center no-padding">{{material.needSum}}</div>
  363. <!-- <div class="col-lg-2 col-md-2 center no-padding">{{material.stockSum}}</div> -->
  364. </div>
  365. </div>
  366. </div>
  367. <!--领料申请-->
  368. <div class="row block-padding">
  369. <div class="col-lg-12 col-md-12 ">
  370. <span class="block-title-important">领料申请通知</span>
  371. &nbsp;&nbsp;
  372. <span class="block-title-important">{{applyMaterialSum}}</span>
  373. </div>
  374. </div>
  375. <div class="row block-padding">
  376. <div class="col-lg-2 col-md-2 center no-padding">领料日期</div>
  377. <div class="col-lg-2 col-md-2 center no-padding">物料编码</div>
  378. <div class="col-lg-3 col-md-4 center no-padding">物料名称</div>
  379. <!-- <div class="col-lg-2 col-md-2 center no-padding">规格</div> -->
  380. <div class="col-lg-1 col-md-1 center no-padding">数量</div>
  381. <div class="col-lg-2 col-md-2 center no-padding">部门</div>
  382. <div class="col-lg-2 col-md-2 center no-padding">申请人</div>
  383. </div>
  384. <div class="row">
  385. <div class="col-lg-12 col-md-12" style="height: 23%;overflow:hidden;min-height:160px;height:160px">
  386. <div class="row" v-for="material in applyMaterialList">
  387. <div class="col-lg-2 col-md-2 center no-padding">{{material.ddate}}</div>
  388. <div style="overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-2 col-md-2 center no-padding">{{material.materialCode}}</div>
  389. <div style="overflow:hidden; word-break:break-all;white-space:nowrap" class="col-lg-3 col-md-4 left no-padding">{{material.materialName}}</div>
  390. <!-- <div class="col-lg-2 col-md-2 center no-padding">{{material.specs}}</div> -->
  391. <div class="col-lg-1 col-md-1 center no-padding">{{material.applysum}}</div>
  392. <div class="col-lg-2 col-md-2 center no-padding">{{material.cdepName}}</div>
  393. <div class="col-lg-2 col-md-2 center no-padding">{{material.applyPerson}}</div>
  394. </div>
  395. </div>
  396. </div>
  397. <div class="row">
  398. <div class="col-lg-12 col-md-12 progress no-padding">
  399. <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="60"
  400. aria-valuemin="0" aria-valuemax="100" :style="{width:applyCompleteSumPercent}">
  401. 已完成:{{applyCompleteSum}}
  402. </div>
  403. <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60"
  404. aria-valuemin="0" aria-valuemax="100" :style="{width:applyMaterialSumPercent}">
  405. 未完成:{{applyMaterialSum}}
  406. </div>
  407. </div>
  408. </div>
  409. </div>
  410. </div>
  411. </div>
  412. <!-- jQuery -->
  413. <script src="/lib/jquery.min.js"></script>
  414. <script src="/lib/vue.min.js"></script>
  415. <script src="/lib/echarts/echarts.min.js"></script>
  416. <script src="/lib/echarts/theme/macarons.js"></script>
  417. <script src="/js/service/person.js?_v=2"></script>
  418. <script src="/js/service/material.js?_v=2"></script>
  419. <script src="/js/service/product.js?_v=2"></script>
  420. <script src="/js/content/mycharts.js?_v=2"></script>
  421. <script type="text/javascript">
  422. // 参数说明:beginFun("图表ID","list形式数据","翻页时间(毫秒)","本页面唯一id(不可重复)")
  423. const monthSend = ServiceProduct.getMonthSend();
  424. const stockDate = ServiceProduct.getStockList();
  425. setTimeout(beginFun("charts_11",monthSend,10000,"charts_11",ChartsService.getGridSpanSmall()),500);
  426. setTimeout(beginFunA("charts_22",stockDate,10000,"charts_22",ChartsService.getGridSpanSmall()),500);
  427. // var interval = setInterval(getMonthSendData,10000);//项目月发货统计
  428. // var interval1 = setInterval(getMonthSendData1,10000);//成品库存
  429. var initSize = 5;
  430. var pageSize = 5;
  431. var pageIndex = 0;
  432. var pageSizeA = 5;
  433. var pageIndexA = 0;
  434. // const monthSend = ServiceProduct.getMonthSend();
  435. // let monthSendList = [];
  436. // for(let key in monthSend) {
  437. // monthSendList.push([key, monthSend[key]]);
  438. // }
  439. // var pageSize1 = 5;
  440. // var pageIndex1 = 0;
  441. // // const stockDate = ServiceProduct.getStockList();
  442. // let stockList = [];
  443. // for(let key in stockDate) {
  444. // stockList.push([key, stockDate[key]]);
  445. // }
  446. // function getMonthSendData(){
  447. // if(monthSendList.length <= initSize){
  448. // clearInterval(interval);
  449. // }
  450. // if(pageIndex >= monthSendList.length){
  451. // pageSize = 5;
  452. // pageIndex = 0;
  453. // }
  454. // let lsit = monthSendList.slice(pageIndex, pageSize);
  455. // pageIndex = pageSize;
  456. // pageSize = pageSize + initSize;
  457. // let map = {}
  458. // for(let key in lsit) {
  459. // map[lsit[key][0]] = lsit[key][1];
  460. // }
  461. // ChartsService.initCommonBar("charts_11",map);
  462. // }
  463. // function getMonthSendData1(){
  464. // if(stockList.length <= initSize){
  465. // clearInterval(interval1);
  466. // }
  467. // if(pageIndex1 >= stockList.length){
  468. // pageSize1 = 8;
  469. // pageIndex1 = 0;
  470. // }
  471. // let lsit1 = stockList.slice(pageIndex1, pageSize1);
  472. // pageIndex1 = pageSize1;
  473. // pageSize1 = pageSize1 + initSize;
  474. // let map = {}
  475. // for(let key in lsit1) {
  476. // map[lsit1[key][0]] = lsit1[key][1];
  477. // }
  478. // ChartsService.initCommonBar("charts_22",map);
  479. // }
  480. var vm = new Vue({
  481. el: '#div-main',
  482. data: {
  483. userList: [],
  484. userSum: 0,
  485. waitinginMaterialList: [],
  486. waitinginMaterialSum: 0,
  487. inMaterialSum: 0,
  488. waitinginMaterialSumPercent: '0%',
  489. inMaterialSumPercent: '0%',
  490. waitingcheckMaterialList: [],
  491. waitingcheckMaterialSum: 0,
  492. checkedMaterialSum: 0,
  493. checkedMaterialSumPercent: '0%',
  494. waitingcheckMaterialSumPercent: '0%',
  495. waitingSendProductList: [],
  496. waitingSendProductSum: 0,
  497. sendProductSum: 0,
  498. waitingSendProductSumPercent: '0%',
  499. sendProductSumPercent: '0%',
  500. materialStockList: [],
  501. orderSheetMaterialList: [],
  502. orderSheetMaterialNeedSum: 0,
  503. orderSheetMaterialPercent: 0,
  504. orderSheetMaterialEnoughList: [],
  505. orderSheetMaterialEnoughSum: 0,
  506. orderSheetMaterialNotEnoughSum: 0,
  507. orderSheetMaterialNotEnoughList: [],
  508. applyMaterialList: [],
  509. applyCompleteSum: 0,
  510. applyMaterialSum: 0,
  511. applyCompleteSumPercent: '0%',
  512. applyMaterialSumPercent: '0%',
  513. cacheDataObject: {}, // 从服务器加载的全数据,界面只取某几条
  514. timer_long: '', // 定时取服务器数据
  515. timer_short: '' // 数据超长定时轮播
  516. },
  517. methods: {
  518. // 安全库存不足时class
  519. getMaterialStockNotEnoughClass: function (material) {
  520. if (material.realStockSum * 1 < material.safeStockSum * 1) {
  521. return "error-font";
  522. }
  523. return "";
  524. },
  525. getOrderSheetStockNotEnoughClass: function (material) {
  526. if (material.needSum * 1 > material.stockSum * 1) {
  527. return "error-font";
  528. }
  529. return "";
  530. },
  531. //缺料
  532. getshortageQuantity:function(material){
  533. if(material.shortageQuantity*1>0){
  534. return "error-font";
  535. }
  536. return "";
  537. },
  538. // 从服务器加载数据并显示
  539. refreshData: function () {
  540. // 关闭定时器
  541. clearInterval(this.timer_short);
  542. // 刷新报表
  543. // ChartsService.initCommonBar("charts_11", ServiceProduct.getMonthSend());
  544. // ChartsService.initLineWithShade("charts_12", ServiceProduct.getMonthSendByProject());
  545. // ChartsService.initCommonBar("charts_22", ServiceProduct.getStockList());
  546. this.loadData();
  547. // 开启定时器
  548. this.timer_short = setInterval(this.scrollData, 20000);
  549. },
  550. // 轮播数据
  551. scrollData: function () {
  552. for (var key in this.cacheDataObject) {
  553. const dataList = this.cacheDataObject[key].data;
  554. const pagesize = this.cacheDataObject[key].pagesize;
  555. var pageindex = this.cacheDataObject[key].pageindex + 1;
  556. if (dataList.length > pagesize) {
  557. const pagesum = (dataList.length / pagesize).toFixed(0) * 1 + (dataList.length %
  558. pagesize > 0 ? 1 : 0);
  559. if (pageindex >= pagesum)
  560. pageindex = 0;
  561. this.cacheDataObject[key].pageindex = pageindex;
  562. const startIndex = pageindex * pagesize;
  563. const remainSum = dataList.length - startIndex;
  564. const recordSum = remainSum >= pagesize ? pagesize : remainSum;
  565. const keyPar = dataList.slice(startIndex, startIndex + pagesize);
  566. if(keyPar.length < 1){
  567. continue;
  568. }
  569. this[key] = dataList.slice(startIndex, startIndex + pagesize);
  570. }
  571. }
  572. },
  573. // 从服务器加载数据
  574. loadData: function () {
  575. this.cacheDataObject = {};
  576. // 人员信息
  577. const userList = ServicePerson.getWarehousePersonList();
  578. this.userSum = userList.length;
  579. this.cacheDataObject.userList = {
  580. data: userList,
  581. pagesize: 4,
  582. pageindex: 0
  583. }
  584. this.userList = userList.slice(0, this.cacheDataObject.userList.pagesize);
  585. // 待入库
  586. const waitinginMaterialList = ServiceMaterial.getWatingInList();
  587. $.each(waitinginMaterialList,function(index,item){
  588. if (item.specs!=undefined && item.specs!='undefined' && item.specs.length>6)
  589. item.specs = item.specs.substr(0,6);
  590. item.arriveDate = item.arriveDate.replace(/-/g,"");
  591. });
  592. this.waitinginMaterialSum = waitinginMaterialList.length;
  593. this.inMaterialSum = ServiceMaterial.getInSum();
  594. const waitinginMaterialSumPercent = (this.waitinginMaterialSum / (this
  595. .waitinginMaterialSum +
  596. this.inMaterialSum) * 100)
  597. .toFixed(0);
  598. this.inMaterialSumPercent = (100 - waitinginMaterialSumPercent) + '%';
  599. this.waitinginMaterialSumPercent = waitinginMaterialSumPercent + '%';
  600. this.cacheDataObject.waitinginMaterialList = {
  601. data: waitinginMaterialList,
  602. pagesize: 8,
  603. pageindex: 0
  604. }
  605. this.waitinginMaterialList = waitinginMaterialList.slice(0, this.cacheDataObject
  606. .waitinginMaterialList.pagesize);
  607. // 收料待检
  608. const waitingcheckMaterialList = ServiceMaterial.getWatingCheckList();
  609. $.each(waitingcheckMaterialList,function(index,item){
  610. // if (item.specs.length>6)
  611. // item.specs = item.specs.substr(0,6);
  612. // item.arriveDate = item.arriveDate.replace(/-/g,"");
  613. });
  614. this.waitingcheckMaterialSum = waitingcheckMaterialList.length;
  615. this.checkedMaterialSum = ServiceMaterial.getCheckSum();
  616. const checkedMaterialSumPercent = (this.checkedMaterialSum / (this.checkedMaterialSum +
  617. this.waitingcheckMaterialSum) * 100)
  618. .toFixed(2);
  619. this.waitingcheckMaterialSumPercent = (100 - checkedMaterialSumPercent) + '%';
  620. this.checkedMaterialSumPercent = checkedMaterialSumPercent + '%';
  621. this.cacheDataObject.waitingcheckMaterialList = {
  622. data: waitingcheckMaterialList,
  623. pagesize: 7,
  624. pageindex: 0
  625. }
  626. this.waitingcheckMaterialList = waitingcheckMaterialList.slice(0, this.cacheDataObject
  627. .waitingcheckMaterialList.pagesize);
  628. // 发货通知
  629. const waitingSendProductList = ServiceProduct.getWatingSendList();
  630. $.each(waitingSendProductList,function(index,item){
  631. if (item.specs != null && item.specs != undefined && item.specs.length>6)
  632. item.specs = item.specs.substr(0,6);
  633. item.planSendDate = item.planSendDate.replace(/-/g,"");
  634. });
  635. this.waitingSendProductSum = waitingSendProductList.length;
  636. this.sendProductSum = ServiceProduct.getSendSum();
  637. const waitingSendProductSumPercent = (this.waitingSendProductSum / (this
  638. .waitingSendProductSum +
  639. this.sendProductSum) * 100)
  640. .toFixed(0);
  641. this.sendProductSumPercent = (100 - waitingSendProductSumPercent) + '%';
  642. this.waitingSendProductSumPercent = waitingSendProductSumPercent + '%';
  643. this.cacheDataObject.waitingSendProductList = {
  644. data: waitingSendProductList,
  645. pagesize: 8,
  646. pageindex: 0
  647. }
  648. this.waitingSendProductList = waitingSendProductList.slice(0, this.cacheDataObject
  649. .waitingSendProductList.pagesize);
  650. // 库存
  651. const materialStockList = ServiceMaterial.getStockList();
  652. this.cacheDataObject.materialStockList = {
  653. data: materialStockList,
  654. pagesize: 8,
  655. pageindex: 0
  656. }
  657. this.materialStockList = materialStockList.slice(0, this.cacheDataObject
  658. .materialStockList.pagesize);
  659. /** 工单备料 **/
  660. var orderSheetList=ServiceMaterial.getListByOrderSheet("1");
  661. const orderSheetMaterialList = ServiceMaterial.getListByOrderSheet1(orderSheetList);
  662. var orderSheetMaterialNeedSum = 0;
  663. var orderSheetMaterialStockSum = 0;
  664. this.orderSheetMaterialNeedSum = orderSheetMaterialList.length;
  665. orderSheetMaterialNeedSum = orderSheetMaterialList.length;
  666. $.each(orderSheetMaterialList, function (index, item) {
  667. if (item.needSum * 1 > item.stockSum * 1)
  668. orderSheetMaterialStockSum++;
  669. });
  670. this.orderSheetMaterialPercent = ((orderSheetMaterialNeedSum -
  671. orderSheetMaterialStockSum) /
  672. orderSheetMaterialNeedSum * 100).toFixed("0");
  673. this.cacheDataObject.orderSheetMaterialList = {
  674. data: orderSheetMaterialList,
  675. pagesize: 8,
  676. pageindex: 0
  677. }
  678. this.orderSheetMaterialList = orderSheetMaterialList.slice(0, this.cacheDataObject
  679. .orderSheetMaterialList.pagesize);
  680. /** 工单缺料 **/
  681. // const orderSheetMaterialNotEnoughList = ServiceMaterial.getListByOrderSheetNotEnough();
  682. const orderSheetMaterialNotEnoughList = ServiceMaterial.getListByOrderSheet3(orderSheetList);
  683. if(orderSheetMaterialNotEnoughList){
  684. this.orderSheetMaterialNotEnoughSum = orderSheetMaterialNotEnoughList.length;
  685. }else{
  686. this.orderSheetMaterialNotEnoughSum=0;
  687. }
  688. this.cacheDataObject.orderSheetMaterialNotEnoughList = {
  689. data: orderSheetMaterialNotEnoughList,
  690. pagesize: 8,
  691. pageindex: 0
  692. }
  693. this.orderSheetMaterialNotEnoughList = orderSheetMaterialNotEnoughList.slice(0, this
  694. .cacheDataObject.orderSheetMaterialNotEnoughList.pagesize);
  695. /** 工单齐套 **/
  696. // const orderSheetMaterialEnoughList = ServiceMaterial.getListByOrderSheetEnough();
  697. const orderSheetMaterialEnoughList = ServiceMaterial.getListByOrderSheet2(orderSheetList);
  698. this.orderSheetMaterialEnoughSum = orderSheetMaterialEnoughList.length;
  699. this.cacheDataObject.orderSheetMaterialEnoughList = {
  700. data: orderSheetMaterialEnoughList,
  701. pagesize: 8,
  702. pageindex: 0
  703. }
  704. this.orderSheetMaterialEnoughList = orderSheetMaterialEnoughList.slice(0, this
  705. .cacheDataObject.orderSheetMaterialEnoughList.pagesize);
  706. /** 领料申请 **/
  707. const applyMaterialList = ServiceMaterial.getApplyList();
  708. this.applyCompleteSum = ServiceMaterial.getApplyCompleteSum();
  709. this.applyMaterialSum = applyMaterialList.length;
  710. const applyCompleteSumPercent = (this.applyCompleteSum / (this.applyCompleteSum +
  711. this.applyMaterialSum) * 100).toFixed(0);
  712. this.applyMaterialSumPercent = (100 - applyCompleteSumPercent) + '%';
  713. this.applyCompleteSumPercent = applyCompleteSumPercent + '%';
  714. this.cacheDataObject.applyMaterialList = {
  715. data: applyMaterialList,
  716. pagesize: 8,
  717. pageindex: 0
  718. }
  719. this.applyMaterialList = applyMaterialList.slice(0, this.cacheDataObject
  720. .applyMaterialList.pagesize);
  721. }
  722. },
  723. mounted() {
  724. this.timer_long = setInterval(this.refreshData, 60000);
  725. this.refreshData();
  726. },
  727. beforeDestroy() {
  728. clearInterval(this.timer_long);
  729. clearInterval(this.timer_short);
  730. }
  731. });
  732. </script>
  733. </body>
  734. </html>