Browse Source

仓库 、制造看板

chenc 4 years ago
parent
commit
6823a76f3c
3 changed files with 62 additions and 30 deletions
  1. 29 0
      js/service/material.js
  2. 7 7
      pages/dashboard/produce.html
  3. 26 23
      pages/dashboard/warehouse.html

+ 29 - 0
js/service/material.js

@@ -248,6 +248,35 @@ var ServiceMaterial={
         // return materialList;
 
     },
+    getOrderDetailList:function(){
+        var orderDetailList=MethodGetService.methodGet("/fbsMomOrder/fbsMomOrderdetail/getOrderDetailList");
+        orderDetailList.forEach(element => {
+            element.orderSheetCode=element.mocode
+            element.materialCode=element.invcode
+            element.materialName=element.cinvname//element.cinvname
+            element.specs=""//element.cinvstd
+            element.needSum=element.qtys
+            element.stockSum=element.issQty
+            // element.shortageQuantity=element.shortageQuantity
+        });
+        return orderDetailList;
+    },
+    getMoallocateList:function(){
+        var moallocateList=MethodGetService.methodGet("/fbsMomOrder/fbsMomOrderdetail/getMoallocateList");
+        if(moallocateList){
+            moallocateList.forEach(element => {
+                element.orderSheetCode=element.mocode
+                element.materialCode=element.minvCode
+                element.materialName=element.mcinvname
+                element.specs=""//element.cinvstd
+                // element.needSum=element.qtys
+                element.needSum=element.qtys
+                element.stockSum=element.issQty
+                element.materialPreparationTotal=element.materialPreparationTotal
+            });
+        }
+        return moallocateList;
+    },
     // 工单备料
     getListByOrderSheet:function(type){
         // const materialList = [];

+ 7 - 7
pages/dashboard/produce.html

@@ -53,14 +53,14 @@
                 </div>
                 <!--月工时分布情况-->
                 <div class="row block-padding">
-                    <div class="col-lg-12 col-md-12 center block-title">工时分布情况</div>
+                    <div class="col-lg-12 col-md-12 center block-title">工时分布情况</div>
                 </div>
                 <div class="row block-padding">
                     <div class="col-lg-12 col-md-12" style="height:295px" id="charts_12"></div>
                 </div>
                 <!--月质量异常分类 -->
                 <div class="row block-padding">
-                    <div class="col-lg-12 col-md-12 center block-title">生产异常分类</div>
+                    <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:260px" id="charts_13"></div>
@@ -69,7 +69,7 @@
             <div class="col-lg-6 col-md-6">
                 <!--月生产计划-->
                 <div class="row block-padding">
-                    <div class="col-lg-12 col-md-12 center block-title">生产计划</div>
+                    <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>
@@ -118,7 +118,7 @@
                             <div class="col-lg-12 col-md-2" style="height:250px" id="charts_21"></div>
                         </div>
                         <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">产品良率</div>
                         </div>
                         <div class="row">
                             <div class="col-lg-12 col-md-2" style="height:260px" id="charts_22"></div>
@@ -126,7 +126,7 @@
                     </div>
                     <div class="col-lg-6 col-md-6">
                         <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">制程质量不良</div>
                         </div>
                         <div class="row">
                             <div class="col-lg-12 col-md-2" style="height:250px" id="charts_23"></div>
@@ -142,7 +142,7 @@
             </div>
             <div class="col-lg-3" >
                 <div class="row block-padding"  >
-                    <div class="col-lg-12 col-md-12 center block-title" >当月生产效率</div>
+                    <div class="col-lg-12 col-md-12 center block-title" >生产效率</div>
                 </div>
                 <div class="row block-padding">
                     <div class="col-lg-12 col-md-12" style="height:290px" id="charts_31"></div>
@@ -183,7 +183,7 @@
                     </div>
                 </div>
                 <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">项目发货统计</div>
                 </div>
                 <div class="row " >
                     <div class="col-lg-12 col-md-12" style="height:260px" id="charts_33"></div>

+ 26 - 23
pages/dashboard/warehouse.html

@@ -232,7 +232,7 @@
                     <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 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>
@@ -308,7 +308,7 @@
                     <!-- <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-1 col-md-1 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">
@@ -324,12 +324,12 @@
                                 >
                                 {{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 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="row block-padding">
 
                     <div class="col-lg-12 ">
                         <span class="block-title-important">工单齐套通知</span>
@@ -341,7 +341,6 @@
                     <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-2 col-md-2 center no-padding">已备数</div>
                 </div>
@@ -351,12 +350,12 @@
                             <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.specs}}</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> -->
                 <!--工单缺料-->
                 <div class="row block-padding">
 
@@ -368,22 +367,24 @@
                 </div>
                 <div class="row block-padding">
                     <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-3 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 class="col-lg-2 col-md-2 center no-padding">已备数</div> -->
                 </div>
-                <div class="row"  style="height: 23%;overflow:hidden;min-height:160px;height:160px">
+                <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-3 col-md-3 left no-padding">{{material.cinvname}}</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 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.specs}}</div> -->
                             <div class="col-lg-2 col-md-2 center no-padding">{{material.needSum}}</div>
+                            <div class="col-lg-1 col-md-1 center no-padding">{{material.materialPreparationTotal}}</div>
                             <!-- <div class="col-lg-2 col-md-2 center no-padding">{{material.stockSum}}</div> -->
                         </div>
                     </div>
@@ -707,8 +708,9 @@
                     this.materialStockList = materialStockList.slice(0, this.cacheDataObject
                         .materialStockList.pagesize);
                     /** 工单备料 **/
-                    var orderSheetList=ServiceMaterial.getListByOrderSheet("1");
-                    const orderSheetMaterialList = ServiceMaterial.getListByOrderSheet1(orderSheetList);
+                    // var orderSheetList=ServiceMaterial.getListByOrderSheet("1");
+                    // const orderSheetMaterialList = ServiceMaterial.getListByOrderSheet1(orderSheetList);
+                    const orderSheetMaterialList = ServiceMaterial.getOrderDetailList();
 
                     var orderSheetMaterialNeedSum = 0;
                     var orderSheetMaterialStockSum = 0;
@@ -733,7 +735,8 @@
                         .orderSheetMaterialList.pagesize);
                     /** 工单缺料 **/
                     // const orderSheetMaterialNotEnoughList = ServiceMaterial.getListByOrderSheetNotEnough();
-                    const orderSheetMaterialNotEnoughList = ServiceMaterial.getListByOrderSheet3(orderSheetList);
+                    // const orderSheetMaterialNotEnoughList = ServiceMaterial.getListByOrderSheet3(orderSheetList);
+                    const orderSheetMaterialNotEnoughList = ServiceMaterial.getMoallocateList();
                     if(orderSheetMaterialNotEnoughList){
                         this.orderSheetMaterialNotEnoughSum = orderSheetMaterialNotEnoughList.length;
                     }else{
@@ -742,22 +745,22 @@
                     
                     this.cacheDataObject.orderSheetMaterialNotEnoughList = {
                         data: orderSheetMaterialNotEnoughList,
-                        pagesize: 8,
+                        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 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();