Commit f0efef33 authored by 上官's avatar 上官

调整同步

parent 49c805ce
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -323,6 +323,7 @@ ...@@ -323,6 +323,7 @@
return 'disabled'; return 'disabled';
} }
}, },
display_:function(){ display_:function(){
if(this.displayModel ==1 ){ if(this.displayModel ==1 ){
return "display: none " return "display: none "
...@@ -393,6 +394,9 @@ ...@@ -393,6 +394,9 @@
} }
}, function(b, bb, bbb) {
mui.toast(JSON.stringify(bbb.message))
}); });
}, },
getDataDetail1: function() { getDataDetail1: function() {
...@@ -400,13 +404,20 @@ ...@@ -400,13 +404,20 @@
var para = { var para = {
IndexID: this.IndexID, IndexID: this.IndexID,
}; };
if(this.IndexID == 0){
return;
}
Api.post('/api/vMES/ProductionReport/ProductIndexNoDetail', para, function(e) { Api.post('/api/vMES/ProductionReport/ProductIndexNoDetail', para, function(e) {
if(e.success){
that.itemsDetail = e.data;
that.itemsDetail1 = e.data.ReportDetail;
that.itemsSize = e.data.SizeName;
}
}, function(b, bb, bbb) {
mui.toast(JSON.stringify(bbb.message))
that.itemsDetail = e.data;
that.itemsDetail1 = e.data.ReportDetail;
that.itemsSize = e.data.SizeName;
// that.size = e.data.SizeName[0];
}); });
}, },
getDataDetail2: function(n) { getDataDetail2: function(n) {
...@@ -423,9 +434,15 @@ ...@@ -423,9 +434,15 @@
// console.log(JSON.stringify(para)) // console.log(JSON.stringify(para))
if( n ==1 ){ if( n ==1 ){
Api.post('/api/vMES/ProductionReport/Report', para, function(e) { Api.post('/api/vMES/ProductionReport/Report', para, function(e) {
if(e.success){
that.itemsLeft = e.items; that.itemsLeft = e.items;
});
}
}, function(b, bb, bbb) {
mui.toast(JSON.stringify(bbb.message))
});
} }
else if( n ==2){ else if( n ==2){
if( this.IndexID == 0) if( this.IndexID == 0)
...@@ -434,9 +451,14 @@ ...@@ -434,9 +451,14 @@
} }
else{ else{
Api.post('/api/vMES/ProductionReport/Report', para, function(e) { Api.post('/api/vMES/ProductionReport/Report', para, function(e) {
if(e.success){
that.itemsLeft2 = e.items;
}
that.itemsLeft2 = e.items; }, function(b, bb, bbb) {
}); mui.toast(JSON.stringify(bbb.message))
});
} }
} }
...@@ -451,7 +473,10 @@ ...@@ -451,7 +473,10 @@
Date: this.dateTime + " 00:00:00", Date: this.dateTime + " 00:00:00",
}; };
Api.post('/api/vMES/ProductionReport/TotalQty', para, function(e) { Api.post('/api/vMES/ProductionReport/TotalQty', para, function(e) {
that.number = e.data; if(e.success){
that.number = e.data;
}
}); });
}, },
//完成进度 //完成进度
...@@ -462,7 +487,9 @@ ...@@ -462,7 +487,9 @@
}; };
// console.log(JSON.stringify(para)) // console.log(JSON.stringify(para))
if(n == 0){
return;
}
Api.post('/api/vMES/ProductionReport/IndexNoCompleteRatio', para, function(e) { Api.post('/api/vMES/ProductionReport/IndexNoCompleteRatio', para, function(e) {
that.CompleteRatio = e.data; that.CompleteRatio = e.data;
// console.log(JSON.stringify(e)) // console.log(JSON.stringify(e))
...@@ -472,6 +499,9 @@ ...@@ -472,6 +499,9 @@
// console.log(that.CompleteRatio); // console.log(that.CompleteRatio);
} }
} }
}, function(b, bb, bbb) {
mui.toast(JSON.stringify(bbb.message))
}); });
}, },
...@@ -496,13 +526,18 @@ ...@@ -496,13 +526,18 @@
that.getDataDetail2(1); //获取左边列表明细 that.getDataDetail2(1); //获取左边列表明细
that.getDataDetail2(2); that.getDataDetail2(2);
that.Model = 0; that.Model = 0;
var Index = document.getElementById("Index_" + that.IndexID) if(that.IndexID != 0){
Index.style.background = "#02C1ED" ; var Index = document.getElementById("Index_" + that.IndexID)
Index.style.background = "#02C1ED" ;
}
mui.toast("撤回成功") mui.toast("撤回成功")
} else { } else {
mui.toast("撤回失败" + e.message) mui.toast("撤回失败" + e.message)
} }
}, function(b, bb, bbb) {
mui.toast(JSON.stringify(bbb.message))
}); });
}, },
...@@ -529,6 +564,9 @@ ...@@ -529,6 +564,9 @@
} else { } else {
mui.toast("获取明细失败:" + e.message) mui.toast("获取明细失败:" + e.message)
} }
}, function(b, bb, bbb) {
mui.toast(JSON.stringify(bbb.message))
}); });
}, },
getLink:function(){ getLink:function(){
...@@ -541,7 +579,7 @@ ...@@ -541,7 +579,7 @@
// console.log( JSON.stringify(para)) // console.log( JSON.stringify(para))
Api.post('/api/vMES/Sop/StyleSop', para, function(e) { Api.post('/api/vMES/Sop/StyleSop', para, function(e) {
if(e.success){ if(e.success){
// console.log( JSON.stringify(e)) // console.log( JSON.stringify(e))
that.link = e.data.Url ; that.link = e.data.Url ;
var url_ = "sop.html"; var url_ = "sop.html";
...@@ -552,7 +590,8 @@ ...@@ -552,7 +590,8 @@
extras: { extras: {
style:that.itemsDetail.StyleCode, style:that.itemsDetail.StyleCode,
ReportType:that.ReportType, ReportType:that.ReportType,
link :that.link link :that.link,
parentPage: "Needlecarreport_new.html"
}, },
}); });
......
...@@ -46,7 +46,8 @@ ...@@ -46,7 +46,8 @@
item:1, item:1,
style:"", style:"",
ReportType:0, ReportType:0,
link:"" link:"",
parentPage:"",
}, },
computed:{ computed:{
// link:function(){ // link:function(){
...@@ -59,17 +60,17 @@ ...@@ -59,17 +60,17 @@
this.style = mui.currentWebview.style this.style = mui.currentWebview.style
this.ReportType = mui.currentWebview.ReportType this.ReportType = mui.currentWebview.ReportType
this.link = mui.currentWebview.link this.link = mui.currentWebview.link
this.parentPage = mui.currentWebview.parentPage
console.log("this.style::" + this.style) console.log("this.parent::" + this.parentPage)
console.log("this.link::" + this.link)
}, },
backaction:function(){ backaction:function(){
console.log('ddddd'); console.log('ddddd');
mui.openWindow({ mui.openWindow({
url: 'Needlecarreport_new.html', url: this.parentPage,
id: 'Needlecarreport_new.html', id: this.parentPage,
}); });
}, },
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment