|
@@ -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 () {
|
|
|
|