chenc 4 years ago
parent
commit
9a79022798

+ 3 - 0
.vscode/settings.json

@@ -0,0 +1,3 @@
+{
+    "liveServer.settings.port": 5501
+}

+ 95 - 84
js/service/material.js

@@ -313,8 +313,8 @@ var ServiceMaterial={
             element.materialCode=element.cinvcode
             element.materialName=""//element.cinvname
             element.specs=""//element.cinvstd
-            element.needSum=element.materialPreparationTotal
-            element.stockSum=element.materialPreparationNumber
+            element.needSum=element.qtys
+            element.stockSum=element.issQty
         });
         
         return materialList;
@@ -370,8 +370,8 @@ var ServiceMaterial={
             element.materialCode=element.cinvcode
             element.materialName=""//element.cinvname
             element.specs=""//element.cinvstd
-            element.needSum=element.materialPreparationTotal
-            element.stockSum=element.materialPreparationNumber
+            element.needSum=element.qtys
+            element.stockSum=element.shortageQuantity
         });
         
         return materialList;
@@ -379,86 +379,97 @@ var ServiceMaterial={
     },
     // 工单齐套
     getListByOrderSheetEnough:function(){
-        const materialList = [];
-        materialList.push({
-            orderSheetCode:"G10001",
-            materialCode:"10001",
-            materialName:"物料A",
-            specs:"3*4",
-            needSum:"10",
-            stockSum:"20"
-        });
-        materialList.push({
-            orderSheetCode:"G10001",
-            materialCode:"10002",
-            materialName:"物料B",
-            specs:"3*4",
-            needSum:"15",
-            stockSum:"30"
-        });
-        materialList.push({
-            orderSheetCode:"G10002",
-            materialCode:"10003",
-            materialName:"物料C",
-            specs:"3*4",
-            needSum:"20",
-            stockSum:"20"
-        });
-        materialList.push({
-            orderSheetCode:"G10003",
-            materialCode:"10004",
-            materialName:"物料D",
-            specs:"3*4",
-            needSum:"30",
-            stockSum:"30"
-        });
-        materialList.push({
-            orderSheetCode:"G10003",
-            materialCode:"10004",
-            materialName:"物料D",
-            specs:"3*4",
-            needSum:"30",
-            stockSum:"30"
-        });
-        materialList.push({
-            orderSheetCode:"G10003",
-            materialCode:"10004",
-            materialName:"物料D",
-            specs:"3*4",
-            needSum:"30",
-            stockSum:"30"
-        });
-        materialList.push({
-            orderSheetCode:"G10003",
-            materialCode:"10004",
-            materialName:"物料D",
-            specs:"3*4",
-            needSum:"30",
-            stockSum:"30"
-        });
-        materialList.push({
-            orderSheetCode:"G10003",
-            materialCode:"10004",
-            materialName:"物料D",
-            specs:"3*4",
-            needSum:"30",
-            stockSum:"30"
-        });
-        materialList.push({
-            orderSheetCode:"G10003",
-            materialCode:"10004",
-            materialName:"物料D",
-            specs:"3*4",
-            needSum:"30",
-            stockSum:"30"
-        });
-        materialList.push({
-            orderSheetCode:"G10004",
-            materialCode:"10005",
-            materialName:"物料E",
-            specs:"3*4",
-            needSum:"15",
-            stockSum:"20"
+        // const materialList = [];
+        // materialList.push({
+        //     orderSheetCode:"G10001",
+        //     materialCode:"10001",
+        //     materialName:"物料A",
+        //     specs:"3*4",
+        //     needSum:"10",
+        //     stockSum:"20"
+        // });
+        // materialList.push({
+        //     orderSheetCode:"G10001",
+        //     materialCode:"10002",
+        //     materialName:"物料B",
+        //     specs:"3*4",
+        //     needSum:"15",
+        //     stockSum:"30"
+        // });
+        // materialList.push({
+        //     orderSheetCode:"G10002",
+        //     materialCode:"10003",
+        //     materialName:"物料C",
+        //     specs:"3*4",
+        //     needSum:"20",
+        //     stockSum:"20"
+        // });
+        // materialList.push({
+        //     orderSheetCode:"G10003",
+        //     materialCode:"10004",
+        //     materialName:"物料D",
+        //     specs:"3*4",
+        //     needSum:"30",
+        //     stockSum:"30"
+        // });
+        // materialList.push({
+        //     orderSheetCode:"G10003",
+        //     materialCode:"10004",
+        //     materialName:"物料D",
+        //     specs:"3*4",
+        //     needSum:"30",
+        //     stockSum:"30"
+        // });
+        // materialList.push({
+        //     orderSheetCode:"G10003",
+        //     materialCode:"10004",
+        //     materialName:"物料D",
+        //     specs:"3*4",
+        //     needSum:"30",
+        //     stockSum:"30"
+        // });
+        // materialList.push({
+        //     orderSheetCode:"G10003",
+        //     materialCode:"10004",
+        //     materialName:"物料D",
+        //     specs:"3*4",
+        //     needSum:"30",
+        //     stockSum:"30"
+        // });
+        // materialList.push({
+        //     orderSheetCode:"G10003",
+        //     materialCode:"10004",
+        //     materialName:"物料D",
+        //     specs:"3*4",
+        //     needSum:"30",
+        //     stockSum:"30"
+        // });
+        // materialList.push({
+        //     orderSheetCode:"G10003",
+        //     materialCode:"10004",
+        //     materialName:"物料D",
+        //     specs:"3*4",
+        //     needSum:"30",
+        //     stockSum:"30"
+        // });
+        // materialList.push({
+        //     orderSheetCode:"G10004",
+        //     materialCode:"10005",
+        //     materialName:"物料E",
+        //     specs:"3*4",
+        //     needSum:"15",
+        //     stockSum:"20"
+        // });
+
+        var materialList=MethodGetService.methodGet("/fbsMomOrder/fbsMomOrderdetail/getListByOrderSheet?type=1");
+
+        materialList.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;
 

+ 48 - 48
js/service/person.js

@@ -7,55 +7,55 @@ var ServicePerson={
     // 仓库人员
     getWarehousePersonList:function(){
 
-        return getService.methodPost("/fbsPerson/fbsPerson/getWarehousePersonList");
+        // return getService.methodPost("/fbsPerson/fbsPerson/getWarehousePersonList");
 
-        // const personList = [];
-        // personList.push({
-        //     realName:"李白",
-        //     inTime:"09:11",
-        //     warehouseId:"0001",
-        //     warehouseName:"A仓库",
-        //     classId:"0001",
-        //     className:"A班",
-        //     avatar:"/images/avatar/avata_1.jpg"
-        // });
-        // personList.push({
-        //     realName:"杜普",
-        //     inTime:"09:12",
-        //     warehouseId:"0001",
-        //     warehouseName:"A仓库",
-        //     classId:"0001",
-        //     className:"A班",
-        //     avatar:"/images/avatar/avata_2.jpg"
-        // });
-        // personList.push({
-        //     realName:"李牧",
-        //     inTime:"09:10",
-        //     warehouseId:"0001",
-        //     warehouseName:"A仓库",
-        //     classId:"0001",
-        //     className:"A班",
-        //     avatar:"/images/avatar/avata_3.jpg"
-        // });
-        // personList.push({
-        //     realName:"范仲淹",
-        //     inTime:"09:15",
-        //     warehouseId:"0001",
-        //     warehouseName:"A仓库",
-        //     classId:"0001",
-        //     className:"A班",
-        //     avatar:"/images/avatar/avata_4.jpg"
-        // });
-        // personList.push({
-        //     realName:"里斯",
-        //     inTime:"09:14",
-        //     warehouseId:"0001",
-        //     warehouseName:"A仓库",
-        //     classId:"0001",
-        //     className:"A班",
-        //     avatar:"/images/avatar/avata_5.jpg"
-        // });
-        // return personList;
+        const personList = [];
+        personList.push({
+            realName:"李白",
+            inTime:"09:11",
+            warehouseId:"0001",
+            warehouseName:"A仓库",
+            classId:"0001",
+            className:"A班",
+            avatar:"/images/avatar/avata_1.jpg"
+        });
+        personList.push({
+            realName:"杜普",
+            inTime:"09:12",
+            warehouseId:"0001",
+            warehouseName:"A仓库",
+            classId:"0001",
+            className:"A班",
+            avatar:"/images/avatar/avata_2.jpg"
+        });
+        personList.push({
+            realName:"李牧",
+            inTime:"09:10",
+            warehouseId:"0001",
+            warehouseName:"A仓库",
+            classId:"0001",
+            className:"A班",
+            avatar:"/images/avatar/avata_3.jpg"
+        });
+        personList.push({
+            realName:"范仲淹",
+            inTime:"09:15",
+            warehouseId:"0001",
+            warehouseName:"A仓库",
+            classId:"0001",
+            className:"A班",
+            avatar:"/images/avatar/avata_4.jpg"
+        });
+        personList.push({
+            realName:"里斯",
+            inTime:"09:14",
+            warehouseId:"0001",
+            warehouseName:"A仓库",
+            classId:"0001",
+            className:"A班",
+            avatar:"/images/avatar/avata_5.jpg"
+        });
+        return personList;
     },
     // 人员月出勤率,考勤人数,总人数
     getMonthAttendance:function(){

+ 37 - 14
js/service/produce-task.js

@@ -322,16 +322,17 @@ var ServiceProduceTask = {
         //     completeSum: 60
         // });
 
-        var taskList=MethodGetService.methodGet("/fbsMomOrder/fbsMomOrderdetail/getDayList");
+        // var taskList=MethodGetService.methodGet("/fbsMomOrder/fbsMomOrderdetail/getDayList");
+        var taskList=MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getListNotStarted");
         taskList.forEach(element=>{
-            element.projectName= "项目1",
-            element.orderSheetCode= element.mocode,
-            element.materialCode=element.cinvcode,
-            element.materialName=element.cinvname,
-            element.specs=element.cinvstd,
-            element.planSum=element.qty,
-            element.workHour= 50,
-            element.completeSum=element.qualifiedinqty
+            element.projectName= element.projectName
+            element.orderSheetCode= element.productionOrderNumberName
+            element.materialCode=element.productId
+            element.materialName=element.product
+            // element.specs=element.cinvstd,
+            element.planSum=element.numberOfTasks
+            element.workHour= element.standardWorkingHours
+            // element.completeSum=element.qualifiedinqty
         })
 
         $.each(taskList, function (index, item) {
@@ -401,10 +402,26 @@ var ServiceProduceTask = {
         //     orderCode:"",
         //     planCompleteDate:"2020-10-20"
         // });
+        Date.prototype.Format = function (fmt) { //author: meizz 
+            var o = {
+                "M+": this.getMonth() + 1, //月份 
+                "d+": this.getDate(), //日 
+                "h+": this.getHours(), //小时 
+                "m+": this.getMinutes(), //分 
+                "s+": this.getSeconds(), //秒 
+                "q+": Math.floor((this.getMonth() + 3) / 3), //季度 
+                "S": this.getMilliseconds() //毫秒 
+            };
+            if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
+            for (var k in o)
+            if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
+            return fmt;
+        }
 
         let taskList=MethodGetService.methodGet("/fbsWorkshopDispatchList/fbsWorkshopDispatchList/getDoingListByOrder");
         taskList.forEach(element => {
             element.materialName=element.product;
+            element.productId=element.productId;
             if(element.cinvstd){
                 element.specs=element.cinvstd;
             }else{
@@ -419,12 +436,15 @@ var ServiceProduceTask = {
             element.projectName=element.productionOrderNumberName;
             element.orderCode=element.productionOrderNumberName;
             if(element.endDate){
-                element.planCompleteDate=element.endDate;
+                var s = new Date(element.plannedStartTime);//计划开工时间
+                var e = new Date(element.plannedEndTime);//计划完成时间
+                element.planCompleteDate=s.Format("yyyy-MM-dd")+"~"+e.Format("yyyy-MM-dd");
             }else{
                 element.planCompleteDate="";
             }
            
         });
+        
         console.log(JSON.parse(JSON.stringify(taskList)) );
         $.each(taskList, function (index, item) {
             item.incompleteSum = item.planSum - item.completeSum;
@@ -434,15 +454,18 @@ var ServiceProduceTask = {
             item.incompletePercent = (100 - item.completePercent) + "%";
             item.completePercent = item.completePercent + "%";
             const dateNow = DateOperation.formatDate(new Date(), "YYYY-mm-dd");
-            if(item.planCompleteDate){
-                item.bgcss = DateOperation.subtraction(item.planCompleteDate, dateNow, "s")>0?"task-block-timeout":"task-block-normal";
-            }else{
+            // if(item.planCompleteDate){
+            //     item.bgcss = DateOperation.subtraction(item.planCompleteDate, dateNow, "s")>0?"task-block-timeout":"task-block-normal";
+            // }else{
                 item.bgcss="task-block-timeout";
-            }
+            // }
             item.displayName = item.projectName == "" ? item.orderCode : item.projectName;
         });
         return taskList;
     },
+
+    
+
     // 日生产计划
     getEsopTaskList: function () {
 

+ 19 - 17
pages/dashboard/line.html

@@ -79,7 +79,7 @@
             </div>
             <div class="col-lg-6">
                 <div class="row block-padding">
-                    <div class="col-lg-4 col-md-4 padding-around" v-for="task in doingTaskList">
+                    <div style="height: 200px;"  class="col-lg-4 col-md-4 padding-around" v-for="task in doingTaskList">
                         <div class="task-block" :class="task.bgcss">
                             <div class="row ">
                                 <div class="col-lg-12 col-md-12 center task-block-title">{{task.displayName}}</div>
@@ -94,8 +94,10 @@
                                 <div class="col-lg-8 col-md-8" style="padding-left: 4px;padding-top: 10px;">
                                     <!-- <div class="task-block-text">预计开工日期:{{task.planStartDate}}</div> -->
                                     <div class="task-block-text">完工日期:{{task.planCompleteDate}}</div>
+                                    <div class="task-block-text">料号:{{task.productId}}</div>
                                     <div class="task-block-text">存货:{{task.materialName}}</div>
-                                    <div class="task-block-text">规格:{{task.specs}}</div>
+                                    <!-- <div class="task-block-text">规格:{{task.specs}}</div> -->
+                                    <!-- <div class="task-block-text">规格:{{task.specs}}</div> -->
                                     <div class="task-block-text">
                                         <div style="float:left">完成进度:</div>
                                         <div style="float:left;width:120px;padding-top:2px;">
@@ -124,24 +126,24 @@
                     <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>
-                    <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 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 class="col-lg-2 col-md-2 center no-padding">名称</div>
-                    <div class="col-lg-2 col-md-1 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 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" v-for="product in dayProduceTaskList">
-                    <div class="col-lg-1 col-md-1 center no-padding">{{product.projectCode}}</div>
-                    <div class="col-lg-1 col-md-1 center no-padding">{{product.orderSheetCode}}</div>
-                    <div class="col-lg-1 col-md-1 center no-padding">{{product.materialCode}}</div>
-                    <div class="col-lg-2 col-md-2 center no-padding">{{product.specs}}</div>
+                    <div class="col-lg-2 col-md-2 center no-padding">{{product.projectCode}}</div>
+                    <div class="col-lg-2 col-md-2 center no-padding">{{product.orderSheetCode}}</div>
+                    <div class="col-lg-2 col-md-2 center no-padding">{{product.materialCode}}</div>
+                    <!-- <div class="col-lg-2 col-md-2 center no-padding">{{product.specs}}</div> -->
                     <div class="col-lg-2 col-md-2 center no-padding">{{product.materialName}}</div>
-                    <div class="col-lg-2 col-md-1 center no-padding">{{product.planSum}}</div>
-                    <div class="col-lg-1 col-md-1 center no-padding">{{product.workHour}}</div>
-                    <div class="col-lg-2 col-md-2 center no-padding progress">
+                    <div class="col-lg-2 col-md-2 center no-padding">{{product.planSum}}</div>
+                    <div class="col-lg-2 col-md-2 center no-padding">{{product.workHour}}</div>
+                    <!-- <div class="col-lg-2 col-md-2 center no-padding progress">
                         <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="60"
                             aria-valuemin="0" aria-valuemax="100" :style="{width:product.completePercent}">
                             {{product.completeSum}}
@@ -150,7 +152,7 @@
                             aria-valuemin="0" aria-valuemax="100" :style="{width:product.incompletePercent}">
                             {{product.incompleteSum}}
                         </div>
-                    </div>
+                    </div> -->
                 </div>
             </div>
             <div class="col-lg-3">

+ 1 - 1
pages/dashboard/produce.html

@@ -56,7 +56,7 @@
                 </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:290px" id="charts_13"></div>

+ 1 - 1
pages/dashboard/quality.html

@@ -300,7 +300,7 @@
                     const willArriveMeterialList = ServiceMaterial.getWillArriveList(3);
                     this.cacheDataObject.willArriveMeterialList = {
                         data: willArriveMeterialList,
-                        pagesize: 10,
+                        pagesize: 3,
                         pageindex: 0
                     }
                     this.willArriveMeterialList = willArriveMeterialList.slice(0, this.cacheDataObject