Kaynağa Gözat

c仓库 制造看板

chenc 4 yıl önce
ebeveyn
işleme
ddcb1b0eb4

+ 44 - 5
js/service/material.js

@@ -249,7 +249,7 @@ var ServiceMaterial={
 
     },
     // 工单备料
-    getListByOrderSheet:function(){
+    getListByOrderSheet:function(type){
         // const materialList = [];
         // materialList.push({
         //     orderSheetCode:"G10001",
@@ -310,7 +310,23 @@ var ServiceMaterial={
 
         // var materialList=MethodGetService.methodGet("/fbsMomOrder/fbsMomOrderdetail/getListByOrderSheet?type=3");
         var materialList=MethodGetService.methodGet("/fbsMomOrder/fbsMomOrderdetail/getListByOrderSheetNow?type=1");
-        materialList.forEach(element => {
+        // materialList.forEach(element => {
+        //     element.orderSheetCode=element.mocode
+        //     element.materialCode=element.cinvcode
+        //     element.materialName=element.cinvname//element.cinvname
+        //     element.specs=""//element.cinvstd
+        //     element.needSum=element.qtys
+        //     element.stockSum=element.issQty
+        //     element.shortageQuantity=element.shortageQuantity
+        // });
+        
+        return materialList;
+
+     
+
+    },
+    getListByOrderSheet1:function(materialList){
+        materialList["1"].forEach(element => {
             element.orderSheetCode=element.mocode
             element.materialCode=element.cinvcode
             element.materialName=element.cinvname//element.cinvname
@@ -319,9 +335,32 @@ var ServiceMaterial={
             element.stockSum=element.issQty
             element.shortageQuantity=element.shortageQuantity
         });
-        
-        return materialList;
-
+        return materialList["1"];
+    },
+    getListByOrderSheet2:function(materialList){
+        materialList["2"].forEach(element => {
+            element.orderSheetCode=element.mocode
+            element.materialCode=element.cinvcode
+            element.materialName=element.cinvname
+            element.specs=""//element.cinvstd
+            element.needSum=element.qtys
+            element.stockSum=element.issQty
+        });
+        return materialList["2"];
+    },
+    getListByOrderSheet3:function(materialList){
+        if(materialList["3"]){
+            materialList["3"].forEach(element => {
+                element.orderSheetCode=element.mocode
+                element.materialCode=element.mcinvcode
+                element.materialName=element.mcinvname
+                element.specs=""//element.cinvstd
+                // element.needSum=element.qtys
+                element.needSum=element.shortageQuantity
+                element.stockSum=element.issQty
+            });
+        }
+        return materialList["3"];
     },
     // 工单缺料
     getListByOrderSheetNotEnough:function(){

+ 1 - 1
js/service/product.js

@@ -278,7 +278,7 @@ var ServiceProduct = {
     getProduceRate: function () {
         // const rate = 95;
         // rate=MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getProductionEfficiency");
-        var listOfData=MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getSumDispatchReport");
+        var listOfData=MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getSumDispatchReport?def1=1");
         var productivityTotal=0
         listOfData.forEach(element => {
             let standardWorkingHoursActualTotal=element.standardWorkingHoursActualTotal;//实际标准工时

+ 7 - 3
pages/dashboard/warehouse.html

@@ -707,7 +707,9 @@
                     this.materialStockList = materialStockList.slice(0, this.cacheDataObject
                         .materialStockList.pagesize);
                     /** 工单备料 **/
-                    const orderSheetMaterialList = ServiceMaterial.getListByOrderSheet();
+                    var orderSheetList=ServiceMaterial.getListByOrderSheet("1");
+                    const orderSheetMaterialList = ServiceMaterial.getListByOrderSheet1(orderSheetList);
+
                     var orderSheetMaterialNeedSum = 0;
                     var orderSheetMaterialStockSum = 0;
 
@@ -730,7 +732,8 @@
                     this.orderSheetMaterialList = orderSheetMaterialList.slice(0, this.cacheDataObject
                         .orderSheetMaterialList.pagesize);
                     /** 工单缺料 **/
-                    const orderSheetMaterialNotEnoughList = ServiceMaterial.getListByOrderSheetNotEnough();
+                    // const orderSheetMaterialNotEnoughList = ServiceMaterial.getListByOrderSheetNotEnough();
+                    const orderSheetMaterialNotEnoughList = ServiceMaterial.getListByOrderSheet3(orderSheetList);
                     if(orderSheetMaterialNotEnoughList){
                         this.orderSheetMaterialNotEnoughSum = orderSheetMaterialNotEnoughList.length;
                     }else{
@@ -745,7 +748,8 @@
                     this.orderSheetMaterialNotEnoughList = orderSheetMaterialNotEnoughList.slice(0, this
                         .cacheDataObject.orderSheetMaterialNotEnoughList.pagesize);
                     /** 工单齐套 **/
-                    const orderSheetMaterialEnoughList = ServiceMaterial.getListByOrderSheetEnough();
+                    // const orderSheetMaterialEnoughList = ServiceMaterial.getListByOrderSheetEnough();
+                    const orderSheetMaterialEnoughList = ServiceMaterial.getListByOrderSheet2(orderSheetList);
                     this.orderSheetMaterialEnoughSum = orderSheetMaterialEnoughList.length;
                     this.cacheDataObject.orderSheetMaterialEnoughList = {
                         data: orderSheetMaterialEnoughList,