Commit 7b03ff0c authored by 王文琼's avatar 王文琼

裁断实报,针车实报V2,成型时报V2 优化调整

针车交接,成型交接等优化调整,
parent 3011faa4
......@@ -124,6 +124,7 @@ body {
border-bottom: 1px solid #dadada;
box-sizing: border-box;
overflow: hidden;
position: relative;
}
.complet-detail li {
......@@ -173,11 +174,11 @@ body {
overflow: hidden;
}
.complet-detail li:nth-of-type(3) p {
width: 100%;
.complet-detail li:nth-of-type(3) p:nth-of-type(1) {
width: 50%;
}
.complet-detail li:nth-of-type(3) span:nth-of-type(2) {
.complet-detail li:nth-of-type(3) p:nth-of-type(2) {
width: 100px;
white-space: nowrap;
......@@ -208,7 +209,15 @@ body {
line-height: 40px;
}
.meached{
position: absolute;
top: 18px;
right: 0;
width: 70px;
}
.meached img{
width: 80%;
}
.btn_bottom #n1,
.btn_bottom #n2 {
display: block;
......
*{
* {
list-style: none;
padding: 0;
margin: 0;
border: 0;
}
html,body,#app{
html,
body,
#app {
width: 100%;
height: 100%;
overflow: hidden;
}
[v-cloak] {
display: none !important;
display: none !important;
}
.redColor{
.redColor {
color: red !important;
display: inline-block;
}
.blueColor{
.blueColor {
color: royalblue !important;
display: inline-block;
}
.need-left{
.need-left {
width: 40%;
float: left;
height: 100%;
}
#left-1{
background-color: #007AFF; height: 30px;width: 100%; margin-bottom: 1px;line-height: 30px;
#left-1 {
background-color: #007AFF;
height: 30px;
width: 100%;
margin-bottom: 1px;
line-height: 30px;
}
#left-2{
#left-2 {
position: relative;
width: 100%;
height:482px;
height: 482px;
margin-top: -15px;
border: 1px solid rgb(218, 230, 239);
background: #FFF;
}
.active{
.active {
background: #efeff4;
}
.marginTop{
.marginTop {
margin-top: 0 !important;
height:515px !important;
}
.mui-scroll{
height: 515px !important;
}
#pullrefresh {
width: 100%;
height: 100%;
padding-bottom: 15px;
box-sizing: border-box;
}
.leftList{
border: solid #DAE6EF 1px ;height: 100%; background: white;
width: 100%;
overflow-y: scroll;
}
.mui-search #search{
overflow-y: scroll;
}
.mui-search #search {
border-radius: 0;
}
#item1 div{
/* padding-bottom: 10px; */
}
.needLeftList{
.needLeftList {
padding: 5px 10px;
height: 93px;
border-bottom: 1px solid #dadada;
box-sizing: border-box;
overflow: hidden;
position: relative;
}
.needLeftList li{
width: 100%;
}
.needLeftList li {
width: 100%;
font-size: 12px;
line-height:20px;
line-height: 20px;
height: 20px;
}
.needLeftList li p{
.needLeftList li p {
width: 50%;
float: left;
color: #000000;
margin: 0;
margin: 0;
}
.needLeftList li span{
.needLeftList li span {
padding-left: 3px;
box-sizing: border-box;
display: block;
font-size: 12px;
float: left;
white-space:nowrap;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.needLeftList li span:nth-of-type(2){
.needLeftList li span:nth-of-type(2) {
padding-left: 1px !important;
}
.needLeftList li:nth-of-type(1) span:nth-of-type(2){
width:100px;
white-space:nowrap;
.needLeftList li:nth-of-type(1) span:nth-of-type(2) {
width: 100px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.needLeftList li:nth-of-type(2) span:nth-of-type(2){
width:100px;
white-space:nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.needLeftList li:nth-of-type(3) p{
width: 100%;
}
.needLeftList li:nth-of-type(3) span:nth-of-type(2){
width:100px;
white-space:nowrap;
}
.needLeftList li:nth-of-type(2) span:nth-of-type(2) {
width: 100px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.needLeftList li:nth-of-type(3) p:nth-of-type(1) {
width: 50%;
}
.needLeftList li:nth-of-type(3) p:nth-of-type(2) {
width: 100px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
#item2{
}
#item2 {
/* top: 32px; */
}
#item2 ul{
#item2 ul {
height: 93px;
border-bottom: 1px solid #dadada;
box-sizing: border-box;
}
#item2 ul li{
margin: 0
#item2 ul li {
margin: 0
}
#item2 ul li p{
#item2 ul li p {
text-align: left;
}
.leftState{
position: fixed;bottom: 1px;left: 1px;z-index: 10;width: 40%;background: #fff;
}
#pullrefresh{
width: 100%;
height: 100%;
}
.meached{
.leftState {
position: fixed;
bottom: 1px;
left: 1px;
z-index: 10;
width: 40%;
background: #fff;
}
.meached {
position: absolute;
top: 2px;
right: 5px;
width: 70px;
}
.meached img {
width: 90%;
}
.confirm {
position: absolute;
top: 18px;
top: 38px;
right: 10px;
width: 70px;
}
.meached img{
.confirm img {
width: 90%;
}
/************/
.need-right{
/************/
.need-right {
width: 60%;
float: right;
}
#right {
width: 100%;
}
#right-2{
position: fixed; bottom: 1px; right: 1px;
}
#right-2 button{
width: 200px; height: 70px;"
}
#right-1 ul li p{
float: left;color: #060606;
white-space:nowrap;text-overflow: ellipsis;overflow: hidden;
}
#right-1 .mui-table-view-cell p:nth-of-type(1){
width: 100%;
}
#right-2 {
position: fixed;
bottom: 1px;
right: 1px;
}
#right-2 button {
width: 180px;
height: 70px;
}
#right-1 ul li p {
float: left;
color: #060606;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
#right-1 .mui-table-view-cell p:nth-of-type(1) {
width: 16%;
}
#right-1 .mui-table-view-cell p:nth-of-type(2){
#right-1 .mui-table-view-cell p:nth-of-type(2) {
width: 40%;
}
#right-1 .mui-table-view-cell p:nth-of-type(3){
#right-1 .mui-table-view-cell p:nth-of-type(3) {
width: 12%;
}
#right-1 .mui-table-view-cell p:nth-of-type(4){
#right-1 .mui-table-view-cell p:nth-of-type(4) {
width: 32%;
}
\ No newline at end of file
......@@ -53,6 +53,7 @@ var minepage_style = {
var checkUrl="http://11wangjp.oss-cn-shanghai.aliyuncs.com/ftt_mes/version.txt";
// 下载wgt文件
var wgtUrl="http://11wangjp.oss-cn-shanghai.aliyuncs.com/ftt_mes/ftt_mes_hot.wgt";
console.log("检测更新地址:"+wgtUrl);
function downWgtHot(){
plus.nativeUI.showWaiting("下载补丁文件...");
plus.downloader.createDownload( wgtUrl, {filename:"_doc/update/"}, function(d,status){
......@@ -101,6 +102,8 @@ var minepage_style = {
plus.nativeUI.closeWaiting();
if(xhr.status==200){
console.log("检测更新成功:"+xhr.responseText);
var newVer=xhr.responseText;
if(compareVersion(wgtVer,newVer)){
......
......@@ -19,7 +19,7 @@ var app = new Vue({
today: "",
link: "",
itemsDetail: [], //订单明细
itemsDetail1: [], //
itemsDetail1: [], //
itemsDetail2: [], //
paramUnDo: {
pageIndex: 2,
......@@ -29,14 +29,24 @@ var app = new Vue({
paramDone: {
pageIndex: 2,
pageSize: 10,
ReportType:2
ReportType: 2
},
paramUnDoSeach: {
pageIndex: 2,
pageSize: 10,
ReportType: 2
},
paramDoneSeach: {
pageIndex: 2,
pageSize: 10,
ReportType: 2
},
itemsHead: [], //未完成和搜索左侧数组
itemsLeft: [],
itemsLeft2: [], //已完成左侧数组
itemsSize: [],
SizeQty: [],
ReportType: 0,
ReportType: 2,
IndexID: 0,
rightInfor: [], //右侧详情
cur: 0, //点击选中当前状态
......@@ -69,7 +79,6 @@ var app = new Vue({
return 'disabled';
}
},
display_: function() {
if (this.displayModel == 1) {
return "display: none "
......@@ -83,6 +92,14 @@ var app = new Vue({
}
},
},
// mounted:function(){
// this.$nextTick(function(){
// mui('#progress .mui-text-center').each(function() {
// console.log(this.getAttribute("data-progress"));
// mui(this).progressbar({progress:this.getAttribute("data-progress")}).show()
// })
// })
// },
methods: {
init: function() { //初始化
mui.init({
......@@ -96,23 +113,30 @@ var app = new Vue({
var reUnfinished = document.getElementById("theOne").getAttribute("state");
var reFinished = document.getElementById("theTow").getAttribute("state");
var UnfinishedUrl = '/api/vMES/ProductionReportV2/ToDo';
var FinishedUrl = '/api/api/vMES/ProductionReportV2/Done';
var searchUrl = '/api/vMES/api/vMES/ProductionReportV2/Search';
var FinishedUrl = '/api/vMES/ProductionReportV2/Done';
var searchUrl = '/api/vMES/ProductionReportV2/Search';
var searchDoneUrl = '/api/vMES/ProductionReportV2/SearchDone';
//console.log("未完成" + reUnfinished)
//console.log("已完成" + reFinished)
var UnfinishedData = app.itemsHead;
var FinishedUrlData = app.itemsLeft2;
if (reUnfinished) {
if (reUnfinished) { //未完成
if (app.searchText != "") {
searchPull(searchUrl, UnfinishedData, app.paramUnDo);
searchPull(searchUrl, UnfinishedData, app.paramUnDoSeach);
} else {
pullupRefresh(UnfinishedUrl, UnfinishedData, app.paramUnDo);
}
pullupRefresh(UnfinishedUrl, UnfinishedData, app.paramUnDo);
} else if (reFinished) {
pullupRefresh(FinishedUrl, FinishedUrlData, app.paramDone);
}
} else if (reFinished) { //已完成
if (app.searchText != "") {
searchPull(searchDoneUrl, FinishedUrlData, app.paramDoneSeach);
} else {
pullupRefresh(FinishedUrl, FinishedUrlData, app.paramDone);
}
}
}
},
}
......@@ -123,7 +147,9 @@ var app = new Vue({
setTimeout(function() {
var para = {
PageSize: params.pageSize,
PageIndex: params.pageIndex
PageIndex: params.pageIndex,
ReportType: params.ReportType,
};
//console.log("canshu:" + JSON.stringify(para));
//console.log("之前的数据:" + arr);
......@@ -136,7 +162,8 @@ var app = new Vue({
}
for (var i = 0; i < data.length; i++) {
arr.push(data[i]);
}
//console.log("changdu2222222:" + arr.length);
}
}
}, function(b, bb, bbb) {
......@@ -155,9 +182,10 @@ var app = new Vue({
var para = {
searchText: app.searchText,
PageSize: params.pageSize,
PageIndex: params.pageIndex
PageIndex: params.pageIndex,
ReportType: params.ReportType,
};
//console.log("canshu:" + JSON.stringify(para));
Api.post(url, para, function(e) {
if (e.success) {
//console.log("111:" + JSON.stringify(e.items));
......@@ -184,12 +212,13 @@ var app = new Vue({
app.getData();
app.ChangeState(1);
});
mui(".mui-icon-clear")[0].addEventListener('tap', function() {
document.activeElement.blur(); //收起虚拟键盘
app.searchText = '';
app.getData();
//console.log('1111');
app.completeState ? app.ChangeState(1) : app.ChangeState(2);
//console.log('1111');
});
setTimeout(function() {
plus.nativeUI.closeWaiting();
......@@ -201,36 +230,37 @@ var app = new Vue({
indicators: true, //是否显示滚动条
});
this.dateTime = moment().format().substring(0, 10)
this.today = this.dateTime;
this.getData();
// this.today = this.dateTime;
// this.getData();
},
getData: function() {
var that = this;
this.createZhezhao(-1)
var para = {
ReportType:2,
ReportType: that.ReportType,
PageSize: that.datalen,
PageIndex: that.unPagenum
};
//console.log("lalla" + JSON.stringify(para));
that.cur = 0;
Api.post('/api/vMES/ProductionReportV2/ToDo', para, function(e) {
//console.log("one :::;" +JSON.stringify(e.items.length))
//console.log("右侧详情" + JSON.stringify(e.items))
console.log("one :::;" + JSON.stringify(e.items.length))
console.log("getData:" + JSON.stringify(e.items[0]))
//console.log("点击之前"+JSON.stringify(that.rightInfor))
if (e.items.length > 0) {
that.itemsHead = e.items;
that.rightInfor = e.items[0];
that.itemsDetail = e.items[0];
that.IndexID = e.items[0].IndexID;
//that.ChangeState(1);
that.getTatolNum();
that.qty = 0;
that.disable_reportDelete = 'disabled';
that.sizeArr();
} else {
that.itemsHead = [];
that.rightInfor = [];
//that.itemsDetail = [];
that.itemsDetail = [];
that.IndexID = 0;
that.itemsDetail1 = [];
that.itemsSize = [];
......@@ -251,31 +281,47 @@ var app = new Vue({
this.IndexID = idInfor;
var that = this;
that.cur = index;
that.searchText = '';
//that.searchText = '';
var para = {
"IndexID": idInfor,
ReportType:2
ReportType: that.ReportType
};
that.ReportID = idInfor;
Api.post('/api/vMES/ProductionReportV2/Detail', para, function(e) {
if (e.success) {
that.rightInfor = e.data;
//console.log("点击之后"+JSON.stringify(that.rightInfor))
console.log("点击之后" + JSON.stringify(that.rightInfor))
that.itemsDetail = e.data;
that.sizeArr();
}
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
});
},
sizeArr:function(){
var that= this ;
that.itemsSize=[];
that.itemsDetail.ReportDetail.forEach(function(item,index){
that.itemsSize.push(item.SizeName);
})
console.log("size::"+JSON.stringify(that.itemsSize));
},
selectDisplay: function(n) {
//console.log("selectDisplay:" + n)
this.ChangeState(n); //n=1 未完成 ,2已完成
n == 1 ? this.completeState = true : this.completeState = false;
},
ChangeState: function(n) { //改变状态,切换已完成和未完成
//n= 1 未完成 n=2 已完成
var that = this;
// console.log(JSON.stringify(para))
if (n == 1) {
var para = {
PageSize: that.datalen,
PageIndex: that.unPagenum,
ReportType:2
ReportType: that.ReportType
};
that.searchText = '';
that.disable_reportDelete = "disabled";
......@@ -284,10 +330,14 @@ var app = new Vue({
if (e.items.length > 0) {
that.itemsHead = e.items;
that.rightInfor = e.items[0];
that.itemsDetail = e.items[0];
console.log("weiwancheng111" + JSON.stringify(that.itemsHead));
that.IndexID = that.itemsHead[0].IndexID;
that.sizeArr();
} else {
that.itemsHead = [];
that.rightInfor = [];
that.itemsDetail = [];
}
}, function(xhr, type, res) {
......@@ -297,21 +347,26 @@ var app = new Vue({
var para = {
PageSize: that.datalen,
PageIndex: that.pagenum,
ReportType:2
ReportType: that.ReportType
};
//console.log("do para " + JSON.stringify(para))
that.disable_reportDelete = null;
that.searchText = '';
Api.post('/api/vMES/ProductionReportV2/Done', para, function(e) {
//console.log("已完成" + JSON.stringify(e.items))
console.log("已完成" + JSON.stringify(para))
var data = e.items.length;
if (data > 0) {
that.itemsLeft2 = e.items;
that.rightInfor = e.items[0];
that.cur = 0;
that.itemsDetail = e.items[0];
that.IndexID = that.itemsLeft2[0].IndexID;
that.sizeArr();
} else {
that.rightInfor = [];
that.itemsLeft2 = [];
that.itemsDetail = [];
that.cur = 0;
}
}, function(xhr, type, res) {
......@@ -320,39 +375,64 @@ var app = new Vue({
}
},
goSearch: function(event) {
var that = this;
var para = {
SearchText: that.searchText,
PageSize: 200,
PageSize: 20,
PageIndex: that.pagenum,
ReportType:2
ReportType: that.ReportType
};
if (event.keyCode == "13") {
document.activeElement.blur(); //收起虚拟键盘
if (that.searchText == '') return;
Api.post('/api/vMES/ProductionReportV2/Search', para, function(e) {
var data = e.items.length;
if (data > 0) {
that.itemsHead = e.items;
that.rightInfor = e.items[0];
that.cur = 0;
} else {
that.itemsHead = [];
that.rightInfor = [];
that.cur = 0;
}
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
});
console.log(this.completeState);
if (this.completeState) { //true 是未完成的搜索 false是已完成的搜索
Api.post('/api/vMES/ProductionReportV2/Search', para, function(e) {
console.log("现在是未完成的搜索!");
var data = e.items.length;
if (data > 0) {
that.itemsHead = e.items;
console.log("未完成的搜索111");
that.rightInfor = e.items[0];
that.itemsDetail = e.items[0];
that.cur = 0;
} else {
that.itemsHead = [];
that.rightInfor = [];
that.itemsDetail = [];
that.cur = 0;
}
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
});
} else {
Api.post('/api/vMES/ProductionReportV2/SearchDone', para, function(e) {
console.log("现在是以111111完成的搜索!");
var data = e.items.length;
if (data > 0) {
that.itemsLeft2 = e.items;
that.rightInfor = e.items[0];
that.itemsDetail = e.items[0];
that.cur = 0;
} else {
that.itemsLeft2 = [];
that.rightInfor = [];
that.itemsDetail = [];
that.cur = 0;
}
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
});
}
event.preventDefault(); // 阻止默认事件---阻止页面刷新
//that.searchText = '';
}
},
getTatolNum: function() { //今日产量
var that = this;
var para = {
ReportType: this.ReportType,
ReportType: that.ReportType,
Date: this.dateTime + " 00:00:00",
};
Api.post('/api/vMES/ProductionReport/TotalQty', para, function(e) {
......@@ -388,17 +468,16 @@ var app = new Vue({
mui.toast(JSON.stringify(res.message))
});
},
reportDelete: function() {
reportDelete: function() { //
var that = this;
var para = {
ReportID: this.IndexID,
};
console.log(JSON.stringify(para)); //如果列表为空,弹出提示没有可以撤回的时报
Api.post('/api/vMES/ProductionReport/Delete', para, function(e) {
if (e.success) {
//console.log(JSON.stringify(e));
that.createZhezhao(-1)
that.size = 0;
that.qty = 0;
//that.getCompleteRatio(that.Report_IndexID); //订单进度
......@@ -406,46 +485,47 @@ var app = new Vue({
that.getTatolNum(); //获取今日完成数量
that.Model = 0;
mui.toast("撤回成功");
playVoice("cg.mp3");
console.log("删除的id:" + JSON.stringify(para));
var doneIndexArr = that.itemsLeft2;
var delIndexNoIndx = -1;
for (var i = 0; i < doneIndexArr.length; i++) {
console.log("比对的id:" + doneIndexArr[i].IndexID);
//console.log("比对的id:" + doneIndexArr[i].IndexID);
if (doneIndexArr[i].IndexID == para.ReportID) {
delIndexNoIndx = i;
break;
}
}
doneIndexArr.splice(delIndexNoIndx, 1);
if (doneIndexArr.length > 0) {
if (doneIndexArr.length - 1 >= delIndexNoIndx) {
if (doneIndexArr.length - 1 > delIndexNoIndx) {
that.cur = delIndexNoIndx;
that.rightInfor = doneIndexArr[delIndexNoIndx];
that.itemsDetail = doneIndexArr[delIndexNoIndx];
that.IndexID = doneIndexArr[delIndexNoIndx].IndexID;
} else {
that.cur = doneIndexArr.length;
that.cur = doneIndexArr.length-1;
that.rightInfor = doneIndexArr[delIndexNoIndx - 1];
that.IndexID = doneIndexArr[doneIndexArr.length].IndexID;
that.itemsDetail = doneIndexArr[delIndexNoIndx - 1];
that.IndexID = doneIndexArr[doneIndexArr.length-1].IndexID;
}
that.getDetailInfor(that.IndexID,that.cur);
}
} else {
mui.toast("撤回失败" + e.message)
}
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
playVoice("sb.mp3");
});
},
getLink: function() {
var that = this;
var para = {
ReportType: this.ReportType,
StyleCode: this.itemsDetail.StyleCode
}
// console.log( JSON.stringify(para))
console.log(JSON.stringify(para))
Api.post('/api/vMES/Sop/StyleSop', para, function(e) {
if (e.success) {
// console.log( JSON.stringify(e))
......@@ -541,15 +621,18 @@ var app = new Vue({
}
todoIndexArr.splice(delIndexNoIndx, 1);
if (todoIndexArr.length > 0) {
if (todoIndexArr.length - 1 >= delIndexNoIndx) {
if (todoIndexArr.length - 1 > delIndexNoIndx) {
that.cur = delIndexNoIndx;
that.rightInfor = todoIndexArr[delIndexNoIndx];
that.itemsDetail = todoIndexArr[delIndexNoIndx]
that.IndexID = todoIndexArr[delIndexNoIndx].IndexID;
} else {
that.cur = todoIndexArr.length;
that.cur = todoIndexArr.length-1;
that.rightInfor = todoIndexArr[delIndexNoIndx - 1];
that.IndexID = todoIndexArr[todoIndexArr.length].IndexID;
that.itemsDetail = todoIndexArr[delIndexNoIndx - 1];
that.IndexID = todoIndexArr[todoIndexArr.length-1].IndexID;
}
that.getDetailInfor(that.IndexID,that.cur);
}
} else {
......@@ -568,12 +651,9 @@ var app = new Vue({
},
submitZD: function() {
this.isAlert = true;
},
selectIndex: function(idx) {
this.createZhezhao(-1) //关闭遮罩
var indxx = document.getElementsByClassName("Index");
......@@ -629,30 +709,6 @@ var app = new Vue({
}
},
selectDisplay: function(n) {
//console.log("selectDisplay:" + n)
var n1 = document.getElementById("n1")
var n2 = document.getElementById("n2")
if (n == 1) {
this.completeState = true;
this.ChangeState(1);
n1.style.background = "royalblue"
n1.style.color = "white"
n2.style.background = "white"
n2.style.color = "royalblue"
} else if (n == 2) {
this.completeState = false;
this.ChangeState(2);
n1.style.background = "white"
n1.style.color = "royalblue"
n2.style.background = "royalblue"
n2.style.color = "white"
//opt.style.display = "none";
// opt2.style.display = "inline-block"
}
},
changeValue: function() {
if (isNaN(parseInt(this.qty))) {
this.qty = 0;
......@@ -744,6 +800,16 @@ var app = new Vue({
var id_;
url_ = "CuttingQuality.html";
id_ = "CuttingQuality.html";
var detail = {
IndexID: this.IndexID,
dateTime: this.dateTime,
itemsDetail: this.itemsDetail,
itemsSize: this.itemsSize, //
type: n, // n =2 点击不合格进去 ,
parentSize: k,
sizeNum: this.rightInfor.ReportDetail //尺码和数量
}
console.log("品质问题:" + JSON.stringify(detail));
mui.openWindow({
url: url_,
id: id_,
......@@ -754,7 +820,8 @@ var app = new Vue({
itemsSize: this.itemsSize,
type: n, // n =2 点击不合格进去 ,
parentSize: k,
sizeNum: this.itemsDetail1 //尺码和数量
sizeNum: this.itemsDetail1, //尺码和数量
ReportType:this.ReportType
},
});
......
......@@ -35,11 +35,22 @@ var app = new Vue({
State: 1, //已交接
pageSize: 10
},
paramUnDoSeach: { //未交接
ReportType: 1, //针车
pageIndex: 2,
State: 0, //未交接
pageSize: 10
},
paramDoneSeach: { //已交接
ReportType: 1, //针车
pageIndex: 2,
State: 1, //已交接
pageSize: 10
},
ReportType: 1,
cur: '0',
currentObj: -1,
//btnCheck: "disabled",
// btnMatch:'disabled',
listType: 0
listType: 0, // 0 未交接 1已交接
},
computed: {
display_: function() {
......@@ -50,24 +61,25 @@ var app = new Vue({
},
btnMatch: function() {
return (this.listType && "disabled") || this.currentObj == -1 ? "disabled" : this.itemsLeft && this.itemsLeft.length >
0 ? this.itemsLeft[this.currentObj]
0 ? this.itemsLeft[this.cur]
.IsMatch : "disabled";
},
btnCheck: function() {
btnConfirm: function() {
return (this.listType && "disabled") || this.currentObj == -1 ? "disabled" : this.itemsLeft && this.itemsLeft.length >
0 ? this.itemsLeft[this.cur]
.IsConfirm : "disabled";
if (this.listType) {
if (this.currentObj == -1) {
return "disabled";
} else {
return null;
}
},
btnCheck: function() {
if (this.listType == 1 && this.itemsLeft2.length > 0) {
return null;
} else {
return this.currentObj == -1 ? "disabled" : this.itemsLeft && this.itemsLeft.length > 0 &&
this.itemsLeft[this.cur].IsMatch && this.itemsLeft[this.cur].IsConfirm ? null : "disabled";
}
return this.currentObj == -1 ? "disabled" : this.itemsLeft && this.itemsLeft.length > 0 &&
this.itemsLeft[this.currentObj].IsMatch ? null : "disabled";
},
},
},
methods: {
init: function() {
......@@ -85,20 +97,27 @@ var app = new Vue({
//console.log("已交接" + reFinished);
var needUrl = '/api/vMES/Handover/List';
var searchUrl = '/api/vMES/Handover/Search';
var searchUrlDone = '/api/vMES/Handover/SearchDone';
var UnneedData = app.itemsLeft;
var needData = app.itemsLeft2;
if (reUnfinished) {
if (app.searchText != "") {
searchPull(searchUrl, UnneedData, app.paramUnDo);
searchPull(searchUrl, UnneedData, app.paramUnDoSeach);
console.log("未交接搜索:" + JSON.stringify(app.paramUnDoSeach));
} else {
console.log("未交接22:" + JSON.stringify(app.paramUnDo));
pullupRefresh(needUrl, UnneedData, app.paramUnDo);
}
pullupRefresh(needUrl, UnneedData, app.paramUnDo);
} else if (reFinished) {
pullupRefresh(needUrl, needData, app.paramDone);
if (app.searchText != "") {
searchPull(searchUrlDone, needData, app.paramDoneSeach);
console.log("getData:已交接搜索:" + JSON.stringify(app.paramDoneSeach));
} else {
pullupRefresh(needUrl, needData, app.paramDone);
console.log("getData:已交接22:" + JSON.stringify(app.paramDone));
}
}
}
},
}
......@@ -182,7 +201,7 @@ var app = new Vue({
getData: function(n) {
var that = this;
var para = {
ReportType: 1,
ReportType: this.ReportType,
State: n,
PageSize: 20,
PageIndex: 1
......@@ -190,12 +209,13 @@ var app = new Vue({
// console.log(JSON.stringify(para));
that.searchText = '';
Api.post('/api/vMES/Handover/List', para, function(e) {
//console.log("TTTTTTTTTTTTTTTTTT List::" + JSON.stringify(e))
//console.log("TTTTTTTTTTTTTTTTTT List::" + JSON.stringify(para))
if (n == 0) {
if (e.items.length > 0) {
that.itemsLeft = e.items;
that.itemsDetail = e.items[0];
that.IndexID = e.items[0].IndexID ;
that.IndexID = e.items[0].IndexID;
console.log("getData:未交接:" + JSON.stringify(that.itemsLeft));
} else {
that.itemsLeft = []
that.itemsDetail = [];
......@@ -206,61 +226,53 @@ var app = new Vue({
if (e.items.length > 0) {
that.itemsLeft2 = e.items;
that.itemsDetail = e.items[0];
that.IndexID = e.items[0].IndexID ;
that.IndexID = e.items[0].IndexID;
console.log("getData:已交接:" + JSON.stringify(that.itemsLeft2));
} else {
that.itemsLeft2 = [];
that.itemsDetail = [];
}
}
if (para.PageIndex == 1) that.currentObj = e.items && e.items.length > 0 ? 0 : -1;
console.log("that.btnMatch::" + that.btnMatch);
//console.log("items::" + JSON.stringify(e.items[0]));
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
})
},
selectPerson: function() {
var that = this;
mui.openWindow({
url: 'NeedlecarPBB.html',
id: 'NeedlecarPBB.html',
extras: {
nextDetail: that.nextDetail
}
});
},
// selectPerson: function() {
// var that = this;
// mui.openWindow({
// url: 'NeedlecarPBB.html',
// id: 'NeedlecarPBB.html',
// extras: {
// nextDetail: that.nextDetail
// }
// });
// },
selectLeft: function(obj, n) {
this.IndexID = obj.IndexID;
this.nextDetail = obj;
//this.nextDetail = obj;
this.cur = n;
var that = this;
that.currentObj = n;
var para = {
ReportType: 1,
ReportType: this.ReportType,
IndexID: this.IndexID,
}
Api.post('/api/vMES/Handover/Index', para, function(e) {
console.log("Indexddddd111::" + JSON.stringify(e.data) )
console.log("Indexddddd111::" + JSON.stringify(e.data) + "当前索引:" + that.cur + ":" + that.currentObj)
if (e.success) {
that.itemsDetail = e.data;
}
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
});
},
goSearch: function(event) {
var that = this;
var para = {
ReportType: 1,
ReportType: this.ReportType,
SearchText: that.searchText,
PageSize: 10,
PageIndex: 1
......@@ -269,26 +281,47 @@ var app = new Vue({
if (event.keyCode == "13") {
document.activeElement.blur(); //收起虚拟键盘
if (that.searchText == '') return;
Api.post('/api/vMES/Handover/Search', para, function(e) {
//console.log("eee::" + JSON.stringify(e))
if (e.success) {
var data = e.items.length;
//console.log("搜索到的内容::" + e.items.length)
if (data > 0) {
that.itemsLeft = e.items;
that.itemsDetail = e.items[0];
that.cur = 0;
} else {
that.itemsLeft = [];
that.itemsDetail = [];
that.cur = 0;
}
}
if (that.completeState) {
Api.post('/api/vMES/Handover/Search', para, function(e) {
//console.log("eee::" + JSON.stringify(e))
if (e.success) {
var data = e.items.length;
console.log("搜索未完成::" + e.items.length)
if (data > 0) {
that.itemsLeft = e.items;
that.itemsDetail = e.items[0];
that.cur = 0;
} else {
that.itemsLeft = [];
that.itemsDetail = [];
that.cur = 0;
}
}
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
});
} else {
Api.post('/api/vMES/Handover/SearchDone', para, function(e) {
//console.log("eee::" + JSON.stringify(e))
if (e.success) {
var data = e.items.length;
console.log("搜索已完成::" + e.items.length)
if (data > 0) {
that.itemsLeft2 = e.items;
that.itemsDetail = e.items[0];
that.cur = 0;
} else {
that.itemsLeft2 = [];
that.itemsDetail = [];
that.cur = 0;
}
}
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
});
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
});
}
event.preventDefault(); // 阻止默认事件---阻止页面刷新
//that.searchText = '';
}
......@@ -307,8 +340,8 @@ var app = new Vue({
n1.style.color = n ? "royalblue" : "white";
n2.style.background = n ? "royalblue" : "white";
n2.style.color = n ? "white" : "royalblue";
opt.style.display = n ? "none" : "inline-block";
opt2.style.display = n ? "inline-block" : "none";
opt.style.display = n ? "none" : "block";
opt2.style.display = n ? "block" : "none";
this.submitModel = n ? 1 : 0;
this.submitText = n ? "撤回接收" : "确认接收";
this.getData(n);
......@@ -319,15 +352,18 @@ var app = new Vue({
var para = {
IndexID: this.IndexID
}
console.log("111111111:"+ this.IndexID);
console.log("111111111:" + this.IndexID);
Api.post('/api/vMES/Handover/Match', para, function(e) {
if (e.success) {
mui.toast("配套成功! ");
//that.getData(0);
console.log(JSON.stringify(e.data))
playVoice("cg.mp3");
console.log("suoyin11111111:" + that.currentObj);
that.itemsLeft[that.currentObj].IsMatch = true;
console.log("suoyin22:" + that.btnMatch + " : " + that.currentObj);
console.log("配套suoyi:" + that.cur);
that.itemsDetail.MatchUserName = e.data.MatchUserName;
that.itemsDetail.MatchDate = e.data.MatchDate;
that.itemsLeft[that.cur].IsMatch = true;
console.log("suoyin22:" + that.btnMatch + " : " + that.cur);
} else {
mui.toast("配套失败: " + e.message);
playVoice("sb.mp3");
......@@ -336,6 +372,32 @@ var app = new Vue({
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
})
},
cutConfirm: function() {
var that = this;
var para = {
IndexID: this.IndexID
}
console.log("2222:" + this.IndexID);
Api.post('/api/vMES/Handover/Confirm', para, function(e) {
if (e.success) {
mui.toast("确认成功! ");
//that.getData(0);
playVoice("cg.mp3");
console.log("裁断确认索引:" + that.cur);
console.log(JSON.stringify(e.data.ConfirmDate));
that.itemsDetail.ConfirmUserName = e.data.ConfirmUserName;
that.itemsDetail.ConfirmDate = e.data.ConfirmDate;
that.itemsLeft[that.cur].IsConfirm = true;
console.log("suoyin22:" + that.itemsLeft.length + "::" + that.itemsLeft[that.cur].IsConfirm + " : " + that.cur);
} else {
mui.toast("确认失败: " + e.message);
playVoice("sb.mp3");
console.log(e.message);
}
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
})
},
submit: function() {
......@@ -343,7 +405,7 @@ var app = new Vue({
var para = {
IndexID: this.IndexID,
}
//console.log(JSON.stringify(para))
console.log(JSON.stringify(para))
var html = '';
if (this.submitModel == 1) {
html = '/api/vMES/Handover/UnCheck';
......@@ -355,47 +417,50 @@ var app = new Vue({
Api.post(html, para, function(e) {
if (e.success) {
playVoice("cg.mp3");
mui.toast("操作成功");
//that.selectLeftBack(0);
//that.IndexID = 0;
that.nextDetail = {};
that.itemsDetail = [];
//that.nextDetail = {};
//that.itemsDetail = [];
if (html == '/api/vMES/Handover/Check') {
var ReceiveArr = that.itemsLeft;
console.log("长度111111111:" + JSON.stringify(ReceiveArr[ReceiveArr.length - 1]) + ":::" + ReceiveArr[
ReceiveArr.length - 1].IsConfirm + that.cur + ":::" + that.currentObj);
refresh(ReceiveArr);
} else {
var UnReceiveArr = that.itemsLeft2;
refresh(UnReceiveArr);
console.log("长度22222222:" + JSON.stringify(UnReceiveArr[UnReceiveArr.length - 1]));
}
function refresh(leftArr) {
var delIndexNoIndx = -1;
for (var i = 0; i < leftArr.length; i++) {
if (leftArr[i].IndexID == para.IndexID)
{
if (leftArr[i].IndexID == para.IndexID) {
delIndexNoIndx = i;
}
}
leftArr.splice(delIndexNoIndx, 1);
console.log("删除后的数据:"+JSON.stringify(leftArr) );
if(leftArr.length>0){
if (leftArr.length - 1 >= delIndexNoIndx) {
}
}
leftArr.splice(delIndexNoIndx, 1);
//console.log("删除后的数据:" + JSON.stringify(leftArr));
if (leftArr.length > 0) {
if (leftArr.length - 1 > delIndexNoIndx) {
that.cur = delIndexNoIndx;
that.itemsDetail = leftArr[delIndexNoIndx];
that.IndexID = leftArr[delIndexNoIndx].IndexID;
console.log("ssss之后:" + that.IndexID);
that.itemsDetail = leftArr[delIndexNoIndx];
that.IndexID = leftArr[delIndexNoIndx].IndexID ;
console.log("ssss之后:"+that.IndexID);
} else {
that.cur = leftArr.length;
that.itemsDetail = leftArr[delIndexNoIndx - 1];
that.IndexID = leftArr[leftArr.length].IndexID ;
} else {
that.cur = leftArr.length - 1;
that.itemsDetail = leftArr[leftArr.length - 1];
that.IndexID = leftArr[leftArr.length - 1].IndexID;
}
}
that.selectLeft(that.itemsDetail,that.cur);
}
}
playVoice("cg.mp3");
mui.toast("操作成功");
} else {
playVoice("sb.mp3");
......
......@@ -19,24 +19,34 @@ var app = new Vue({
today: "",
link: "",
itemsDetail: [], //订单明细
itemsDetail1: [], //
itemsDetail1: [], //
itemsDetail2: [], //
paramUnDo: {
pageIndex: 2,
pageSize: 10,
ReportType:1
ReportType: 1
},
paramDone: {
pageIndex: 2,
pageSize: 10,
ReportType:1
ReportType: 1
},
paramUnDoSeach: {
pageIndex: 2,
pageSize: 10,
ReportType: 1
},
paramDoneSeach: {
pageIndex: 2,
pageSize: 10,
ReportType: 1
},
itemsHead: [], //未完成和搜索左侧数组
itemsLeft: [],
itemsLeft2: [], //已完成左侧数组
itemsSize: [],
SizeQty: [],
ReportType: 0,
ReportType: 1,
IndexID: 0,
rightInfor: [], //右侧详情
cur: 0, //点击选中当前状态
......@@ -69,7 +79,6 @@ var app = new Vue({
return 'disabled';
}
},
display_: function() {
if (this.displayModel == 1) {
return "display: none "
......@@ -83,6 +92,14 @@ var app = new Vue({
}
},
},
// mounted:function(){
// this.$nextTick(function(){
// mui('#progress .mui-text-center').each(function() {
// console.log(this.getAttribute("data-progress"));
// mui(this).progressbar({progress:this.getAttribute("data-progress")}).show()
// })
// })
// },
methods: {
init: function() { //初始化
mui.init({
......@@ -96,23 +113,30 @@ var app = new Vue({
var reUnfinished = document.getElementById("theOne").getAttribute("state");
var reFinished = document.getElementById("theTow").getAttribute("state");
var UnfinishedUrl = '/api/vMES/ProductionReportV2/ToDo';
var FinishedUrl = '/api/api/vMES/ProductionReportV2/Done';
var searchUrl = '/api/vMES/api/vMES/ProductionReportV2/Search';
var FinishedUrl = '/api/vMES/ProductionReportV2/Done';
var searchUrl = '/api/vMES/ProductionReportV2/Search';
var searchDoneUrl = '/api/vMES/ProductionReportV2/SearchDone';
//console.log("未完成" + reUnfinished)
//console.log("已完成" + reFinished)
var UnfinishedData = app.itemsHead;
var FinishedUrlData = app.itemsLeft2;
if (reUnfinished) {
if (reUnfinished) { //未完成
if (app.searchText != "") {
searchPull(searchUrl, UnfinishedData, app.paramUnDo);
searchPull(searchUrl, UnfinishedData, app.paramUnDoSeach);
} else {
pullupRefresh(UnfinishedUrl, UnfinishedData, app.paramUnDo);
}
pullupRefresh(UnfinishedUrl, UnfinishedData, app.paramUnDo);
} else if (reFinished) {
pullupRefresh(FinishedUrl, FinishedUrlData, app.paramDone);
}
} else if (reFinished) { //已完成
if (app.searchText != "") {
searchPull(searchDoneUrl, FinishedUrlData, app.paramDoneSeach);
} else {
pullupRefresh(FinishedUrl, FinishedUrlData, app.paramDone);
}
}
}
},
}
......@@ -123,7 +147,8 @@ var app = new Vue({
setTimeout(function() {
var para = {
PageSize: params.pageSize,
PageIndex: params.pageIndex
PageIndex: params.pageIndex,
ReportType: params.ReportType,
};
//console.log("canshu:" + JSON.stringify(para));
//console.log("之前的数据:" + arr);
......@@ -136,7 +161,8 @@ var app = new Vue({
}
for (var i = 0; i < data.length; i++) {
arr.push(data[i]);
}
console.log("changdu2222222:" + arr.length);
}
}
}, function(b, bb, bbb) {
......@@ -155,9 +181,10 @@ var app = new Vue({
var para = {
searchText: app.searchText,
PageSize: params.pageSize,
PageIndex: params.pageIndex
PageIndex: params.pageIndex,
ReportType: params.ReportType,
};
//console.log("canshu:" + JSON.stringify(para));
Api.post(url, para, function(e) {
if (e.success) {
//console.log("111:" + JSON.stringify(e.items));
......@@ -181,15 +208,16 @@ var app = new Vue({
}
window.addEventListener('back', function(e) {
var that = this;
app.getData();
app.ChangeState(1);
// app.getData();
// app.ChangeState(1);
});
mui(".mui-icon-clear")[0].addEventListener('tap', function() {
document.activeElement.blur(); //收起虚拟键盘
app.searchText = '';
app.getData();
//console.log('1111');
app.completeState ? app.ChangeState(1) : app.ChangeState(2);
//console.log('1111');
});
setTimeout(function() {
plus.nativeUI.closeWaiting();
......@@ -204,33 +232,34 @@ var app = new Vue({
this.today = this.dateTime;
this.getData();
},
getData: function() {
var that = this;
this.createZhezhao(-1)
var para = {
ReportType:1,
ReportType: that.ReportType,
PageSize: that.datalen,
PageIndex: that.unPagenum
};
//console.log("lalla" + JSON.stringify(para));
that.cur = 0;
Api.post('/api/vMES/ProductionReportV2/ToDo', para, function(e) {
//console.log("one :::;" +JSON.stringify(e.items.length))
//console.log("右侧详情" + JSON.stringify(e.items))
console.log("one :::;" + JSON.stringify(e.items.length))
console.log("getData:" + JSON.stringify(e.items[0]))
//console.log("点击之前"+JSON.stringify(that.rightInfor))
if (e.items.length > 0) {
that.itemsHead = e.items;
that.rightInfor = e.items[0];
that.itemsDetail = e.items[0];
that.IndexID = e.items[0].IndexID;
//that.ChangeState(1);
that.getTatolNum();
that.qty = 0;
that.disable_reportDelete = 'disabled';
that.sizeArr();
} else {
that.itemsHead = [];
that.rightInfor = [];
//that.itemsDetail = [];
that.itemsDetail = [];
that.IndexID = 0;
that.itemsDetail1 = [];
that.itemsSize = [];
......@@ -251,31 +280,47 @@ var app = new Vue({
this.IndexID = idInfor;
var that = this;
that.cur = index;
that.searchText = '';
//that.searchText = '';
var para = {
"IndexID": idInfor,
ReportType:1
ReportType: that.ReportType
};
that.ReportID = idInfor;
Api.post('/api/vMES/ProductionReportV2/Detail', para, function(e) {
if (e.success) {
that.rightInfor = e.data;
//console.log("点击之后"+JSON.stringify(that.rightInfor))
console.log("点击之后" + JSON.stringify(that.rightInfor))
that.itemsDetail = e.data;
that.sizeArr();
}
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
});
},
sizeArr:function(){
var that= this ;
that.itemsSize=[];
that.itemsDetail.ReportDetail.forEach(function(item,index){
that.itemsSize.push(item.SizeName);
})
console.log("size::"+JSON.stringify(that.itemsSize));
},
selectDisplay: function(n) {
//console.log("selectDisplay:" + n)
this.ChangeState(n); //n=1 未完成 ,2已完成
n == 1 ? this.completeState = true : this.completeState = false;
},
ChangeState: function(n) { //改变状态,切换已完成和未完成
//n= 1 未完成 n=2 已完成
var that = this;
// console.log(JSON.stringify(para))
if (n == 1) {
var para = {
PageSize: that.datalen,
PageIndex: that.unPagenum,
ReportType:1
ReportType: that.ReportType
};
that.searchText = '';
that.disable_reportDelete = "disabled";
......@@ -284,10 +329,14 @@ var app = new Vue({
if (e.items.length > 0) {
that.itemsHead = e.items;
that.rightInfor = e.items[0];
that.itemsDetail = e.items[0];
console.log("weiwancheng111" + JSON.stringify(that.itemsHead));
that.IndexID = that.itemsHead[0].IndexID;
that.sizeArr();
} else {
that.itemsHead = [];
that.rightInfor = [];
that.itemsDetail = [];
}
}, function(xhr, type, res) {
......@@ -297,21 +346,26 @@ var app = new Vue({
var para = {
PageSize: that.datalen,
PageIndex: that.pagenum,
ReportType:1
ReportType: that.ReportType
};
//console.log("do para " + JSON.stringify(para))
that.disable_reportDelete = null;
that.searchText = '';
Api.post('/api/vMES/ProductionReportV2/Done', para, function(e) {
//console.log("已完成" + JSON.stringify(e.items))
console.log("已完成" + JSON.stringify(para))
var data = e.items.length;
if (data > 0) {
that.itemsLeft2 = e.items;
that.rightInfor = e.items[0];
that.cur = 0;
that.itemsDetail = e.items[0];
that.IndexID = that.itemsLeft2[0].IndexID;
that.sizeArr();
} else {
that.rightInfor = [];
that.itemsLeft2 = [];
that.itemsDetail = [];
that.cur = 0;
}
}, function(xhr, type, res) {
......@@ -320,39 +374,64 @@ var app = new Vue({
}
},
goSearch: function(event) {
var that = this;
var para = {
SearchText: that.searchText,
PageSize: 200,
PageSize: 20,
PageIndex: that.pagenum,
ReportType:1
ReportType: that.ReportType
};
if (event.keyCode == "13") {
document.activeElement.blur(); //收起虚拟键盘
if (that.searchText == '') return;
Api.post('/api/vMES/ProductionReportV2/Search', para, function(e) {
var data = e.items.length;
if (data > 0) {
that.itemsHead = e.items;
that.rightInfor = e.items[0];
that.cur = 0;
} else {
that.itemsHead = [];
that.rightInfor = [];
that.cur = 0;
}
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
});
console.log(this.completeState);
if (this.completeState) { //true 是未完成的搜索 false是已完成的搜索
Api.post('/api/vMES/ProductionReportV2/Search', para, function(e) {
console.log("现在是未完成的搜索!");
var data = e.items.length;
if (data > 0) {
that.itemsHead = e.items;
console.log("未完成的搜索111");
that.rightInfor = e.items[0];
that.itemsDetail = e.items[0];
that.cur = 0;
} else {
that.itemsHead = [];
that.rightInfor = [];
that.itemsDetail = [];
that.cur = 0;
}
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
});
} else {
Api.post('/api/vMES/ProductionReportV2/SearchDone', para, function(e) {
console.log("现在是以111111完成的搜索!");
var data = e.items.length;
if (data > 0) {
that.itemsLeft2 = e.items;
that.rightInfor = e.items[0];
that.itemsDetail = e.items[0];
that.cur = 0;
} else {
that.itemsLeft2 = [];
that.rightInfor = [];
that.itemsDetail = [];
that.cur = 0;
}
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
});
}
event.preventDefault(); // 阻止默认事件---阻止页面刷新
//that.searchText = '';
}
},
getTatolNum: function() { //今日产量
var that = this;
var para = {
ReportType: this.ReportType,
ReportType: that.ReportType,
Date: this.dateTime + " 00:00:00",
};
Api.post('/api/vMES/ProductionReport/TotalQty', para, function(e) {
......@@ -388,17 +467,16 @@ var app = new Vue({
mui.toast(JSON.stringify(res.message))
});
},
reportDelete: function() {
reportDelete: function() { //
var that = this;
var para = {
ReportID: this.IndexID,
};
console.log(JSON.stringify(para)); //如果列表为空,弹出提示没有可以撤回的时报
Api.post('/api/vMES/ProductionReport/Delete', para, function(e) {
if (e.success) {
//console.log(JSON.stringify(e));
that.createZhezhao(-1)
that.size = 0;
that.qty = 0;
//that.getCompleteRatio(that.Report_IndexID); //订单进度
......@@ -406,46 +484,47 @@ var app = new Vue({
that.getTatolNum(); //获取今日完成数量
that.Model = 0;
mui.toast("撤回成功");
playVoice("cg.mp3");
console.log("删除的id:" + JSON.stringify(para));
var doneIndexArr = that.itemsLeft2;
var delIndexNoIndx = -1;
for (var i = 0; i < doneIndexArr.length; i++) {
console.log("比对的id:" + doneIndexArr[i].IndexID);
//console.log("比对的id:" + doneIndexArr[i].IndexID);
if (doneIndexArr[i].IndexID == para.ReportID) {
delIndexNoIndx = i;
break;
}
}
doneIndexArr.splice(delIndexNoIndx, 1);
if (doneIndexArr.length > 0) {
if (doneIndexArr.length - 1 >= delIndexNoIndx) {
if (doneIndexArr.length - 1 > delIndexNoIndx) {
that.cur = delIndexNoIndx;
that.rightInfor = doneIndexArr[delIndexNoIndx];
that.itemsDetail = doneIndexArr[delIndexNoIndx];
that.IndexID = doneIndexArr[delIndexNoIndx].IndexID;
} else {
that.cur = doneIndexArr.length;
that.cur = doneIndexArr.length-1;
that.rightInfor = doneIndexArr[delIndexNoIndx - 1];
that.IndexID = doneIndexArr[doneIndexArr.length].IndexID;
that.itemsDetail = doneIndexArr[delIndexNoIndx - 1];
that.IndexID = doneIndexArr[doneIndexArr.length-1].IndexID;
}
that.getDetailInfor(that.IndexID,that.cur);
}
} else {
mui.toast("撤回失败" + e.message)
}
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
playVoice("sb.mp3");
});
},
getLink: function() {
var that = this;
var para = {
ReportType: this.ReportType,
StyleCode: this.itemsDetail.StyleCode
}
// console.log( JSON.stringify(para))
console.log(JSON.stringify(para))
Api.post('/api/vMES/Sop/StyleSop', para, function(e) {
if (e.success) {
// console.log( JSON.stringify(e))
......@@ -541,15 +620,18 @@ var app = new Vue({
}
todoIndexArr.splice(delIndexNoIndx, 1);
if (todoIndexArr.length > 0) {
if (todoIndexArr.length - 1 >= delIndexNoIndx) {
if (todoIndexArr.length - 1 > delIndexNoIndx) {
that.cur = delIndexNoIndx;
that.rightInfor = todoIndexArr[delIndexNoIndx];
that.itemsDetail = todoIndexArr[delIndexNoIndx]
that.IndexID = todoIndexArr[delIndexNoIndx].IndexID;
} else {
that.cur = todoIndexArr.length;
that.cur = todoIndexArr.length-1;
that.rightInfor = todoIndexArr[delIndexNoIndx - 1];
that.IndexID = todoIndexArr[todoIndexArr.length].IndexID;
that.itemsDetail = todoIndexArr[delIndexNoIndx - 1];
that.IndexID = todoIndexArr[todoIndexArr.length-1].IndexID;
}
that.getDetailInfor(that.IndexID,that.cur);
}
} else {
......@@ -568,12 +650,9 @@ var app = new Vue({
},
submitZD: function() {
this.isAlert = true;
},
selectIndex: function(idx) {
this.createZhezhao(-1) //关闭遮罩
var indxx = document.getElementsByClassName("Index");
......@@ -629,30 +708,6 @@ var app = new Vue({
}
},
selectDisplay: function(n) {
//console.log("selectDisplay:" + n)
var n1 = document.getElementById("n1")
var n2 = document.getElementById("n2")
if (n == 1) {
this.completeState = true;
this.ChangeState(1);
n1.style.background = "royalblue"
n1.style.color = "white"
n2.style.background = "white"
n2.style.color = "royalblue"
} else if (n == 2) {
this.completeState = false;
this.ChangeState(2);
n1.style.background = "white"
n1.style.color = "royalblue"
n2.style.background = "royalblue"
n2.style.color = "white"
//opt.style.display = "none";
// opt2.style.display = "inline-block"
}
},
changeValue: function() {
if (isNaN(parseInt(this.qty))) {
this.qty = 0;
......@@ -744,6 +799,16 @@ var app = new Vue({
var id_;
url_ = "CuttingQuality.html";
id_ = "CuttingQuality.html";
var detail = {
IndexID: this.IndexID,
dateTime: this.dateTime,
itemsDetail: this.itemsDetail,
itemsSize: this.itemsSize, //
type: n, // n =2 点击不合格进去 ,
parentSize: k,
sizeNum: this.rightInfor.ReportDetail //尺码和数量
}
console.log("品质问题:" + JSON.stringify(detail));
mui.openWindow({
url: url_,
id: id_,
......@@ -754,14 +819,14 @@ var app = new Vue({
itemsSize: this.itemsSize,
type: n, // n =2 点击不合格进去 ,
parentSize: k,
sizeNum: this.itemsDetail1 //尺码和数量
sizeNum: this.itemsDetail1, //尺码和数量
ReportType:this.ReportType,
},
});
},
sop: function() {
this.getLink();
},
selecttime: function() {
var that = this;
......
......@@ -19,7 +19,7 @@ var app = new Vue({
today: "",
link: "",
itemsDetail: [], //订单明细
itemsDetail1: [], //
itemsDetail1: [], //
itemsDetail2: [], //
paramUnDo: {
pageIndex: 2,
......@@ -29,6 +29,14 @@ var app = new Vue({
pageIndex: 2,
pageSize: 10
},
paramUnDoSeach: {
pageIndex: 2,
pageSize: 10
},
paramDoneSeach: {
pageIndex: 2,
pageSize: 10
},
itemsHead: [], //未完成和搜索左侧数组
itemsLeft: [],
itemsLeft2: [], //已完成左侧数组
......@@ -80,14 +88,14 @@ var app = new Vue({
}
},
},
// mounted:function(){
// this.$nextTick(function(){
// mui('#progress .mui-text-center').each(function() {
// console.log(this.getAttribute("data-progress"));
// mui(this).progressbar({progress:this.getAttribute("data-progress")}).show()
// })
// })
// },
// mounted:function(){
// this.$nextTick(function(){
// mui('#progress .mui-text-center').each(function() {
// console.log(this.getAttribute("data-progress"));
// mui(this).progressbar({progress:this.getAttribute("data-progress")}).show()
// })
// })
// },
methods: {
init: function() { //初始化
mui.init({
......@@ -103,21 +111,28 @@ var app = new Vue({
var UnfinishedUrl = '/api/vMES/CutOffProductionReport/ToDo';
var FinishedUrl = '/api/vMES/CutOffProductionReport/Done';
var searchUrl = '/api/vMES/CutOffProductionReport/Search';
var searchDoneUrl = '/api/vMES/CutOffProductionReport/SearchDone';
//console.log("未完成" + reUnfinished)
//console.log("已完成" + reFinished)
var UnfinishedData = app.itemsHead;
var FinishedUrlData = app.itemsLeft2;
if (reUnfinished) {
if (reUnfinished) {//未完成
if (app.searchText != "") {
searchPull(searchUrl, UnfinishedData, app.paramUnDo);
searchPull(searchUrl, UnfinishedData, app.paramUnDoSeach);
}else{
pullupRefresh(UnfinishedUrl, UnfinishedData, app.paramUnDo);
}
pullupRefresh(UnfinishedUrl, UnfinishedData, app.paramUnDo);
} else if (reFinished) {
pullupRefresh(FinishedUrl, FinishedUrlData, app.paramDone);
} else if (reFinished) {//已完成
if (app.searchText != "") {
searchPull(searchDoneUrl, FinishedUrlData, app.paramDoneSeach);
}else{
pullupRefresh(FinishedUrl, FinishedUrlData, app.paramDone);
}
}
}
},
}
......@@ -141,12 +156,9 @@ var app = new Vue({
}
for (var i = 0; i < data.length; i++) {
arr.push(data[i]);
//console.log("changdu2222222:"+arr.length);
}
//console.log("data"+data);
//console.log("之后的arr"+arr);
//console.log("页数:"+params.pageIndex);
//console.log("canshuqq:" + JSON.stringify(para));
}
}, function(b, bb, bbb) {
......@@ -167,7 +179,7 @@ var app = new Vue({
PageSize: params.pageSize,
PageIndex: params.pageIndex
};
//console.log("canshu:" + JSON.stringify(para));
Api.post(url, para, function(e) {
if (e.success) {
//console.log("111:" + JSON.stringify(e.items));
......@@ -191,18 +203,15 @@ var app = new Vue({
}
window.addEventListener('back', function(e) {
var that = this;
app.getData();
app.ChangeState(1);
//app.getData();
//app.ChangeState(1);
});
mui('#progress .mui-text-center').each(function() {
//console.log(this.getAttribute("data-progress"));
mui(this).progressbar({progress:this.getAttribute("data-progress")}).show();
})
mui(".mui-icon-clear")[0].addEventListener('tap', function() {
document.activeElement.blur(); //收起虚拟键盘
app.searchText = '';
app.getData();
app.completeState ? app.ChangeState(1) :app.ChangeState(2);
//console.log('1111');
});
setTimeout(function() {
......@@ -228,21 +237,23 @@ var app = new Vue({
//console.log("lalla" + JSON.stringify(para));
that.cur = 0;
Api.post('/api/vMES/CutOffProductionReport/ToDo', para, function(e) {
//console.log("one :::;" +JSON.stringify(e.items.length))
console.log("getData:" + JSON.stringify(e.items))
console.log("one :::;" +JSON.stringify(e.items.length))
console.log("getData:" + JSON.stringify(e.items[0]))
//console.log("点击之前"+JSON.stringify(that.rightInfor))
if (e.items.length > 0) {
that.itemsHead = e.items;
that.rightInfor = e.items[0];
that.itemsDetail = e.items[0];
that.IndexID = e.items[0].IndexID;
//that.ChangeState(1);
that.getTatolNum();
that.qty = 0;
that.disable_reportDelete = 'disabled';
that.sizeArr();
} else {
that.itemsHead = [];
that.rightInfor = [];
//that.itemsDetail = [];
that.itemsDetail = [];
that.IndexID = 0;
that.itemsDetail1 = [];
that.itemsSize = [];
......@@ -263,23 +274,41 @@ var app = new Vue({
this.IndexID = idInfor;
var that = this;
that.cur = index;
that.searchText = '';
//that.searchText = '';
var para = {
"IndexID": idInfor
};
that.ReportID = idInfor;
Api.post('/api/vMES/CutOffProductionReport/Detail', para, function(e) {
if (e.success) {
that.rightInfor = e.data;
//console.log("点击之后"+JSON.stringify(that.rightInfor))
console.log("点击之后" + JSON.stringify(that.rightInfor))
that.itemsDetail = e.data;
that.sizeArr();
}
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
});
},
sizeArr:function(){
var that= this ;
that.itemsSize=[];
that.itemsDetail.ReportDetail.forEach(function(item,index){
that.itemsSize.push(item.SizeName);
})
console.log("size::"+JSON.stringify(that.itemsSize));
},
selectDisplay: function(n) {
//console.log("selectDisplay:" + n)
this.ChangeState(n); //n=1 未完成 ,2已完成
n == 1 ? this.completeState = true : this.completeState = false;
},
ChangeState: function(n) { //改变状态,切换已完成和未完成
//n= 1 未完成 n=2 已完成
var that = this;
// console.log(JSON.stringify(para))
if (n == 1) {
var para = {
......@@ -293,10 +322,14 @@ var app = new Vue({
if (e.items.length > 0) {
that.itemsHead = e.items;
that.rightInfor = e.items[0];
that.itemsDetail = e.items[0];
console.log("weiwancheng111"+JSON.stringify(that.itemsHead));
that.IndexID = that.itemsHead[0].IndexID;
that.sizeArr();
} else {
that.itemsHead = [];
that.rightInfor = [];
that.itemsDetail = [];
}
}, function(xhr, type, res) {
......@@ -309,6 +342,7 @@ var app = new Vue({
};
//console.log("do para " + JSON.stringify(para))
that.disable_reportDelete = null;
that.searchText = '';
Api.post('/api/vMES/CutOffProductionReport/Done', para, function(e) {
console.log("已完成" + JSON.stringify(para))
var data = e.items.length;
......@@ -316,10 +350,14 @@ var app = new Vue({
that.itemsLeft2 = e.items;
that.rightInfor = e.items[0];
that.cur = 0;
that.itemsDetail = e.items[0];
that.IndexID = that.itemsLeft2[0].IndexID;
that.sizeArr();
} else {
that.rightInfor = [];
that.itemsLeft2 = [];
that.itemsDetail = [];
that.cur = 0;
}
}, function(xhr, type, res) {
......@@ -328,34 +366,58 @@ var app = new Vue({
}
},
goSearch: function(event) {
var that = this;
var para = {
SearchText: that.searchText,
PageSize: 200,
PageSize: 20,
PageIndex: that.pagenum,
};
if (event.keyCode == "13") {
document.activeElement.blur(); //收起虚拟键盘
if (that.searchText == '') return;
Api.post('/api/vMES/CutOffProductionReport/Search', para, function(e) {
if(this.completeState){//true 是未完成的搜索 false是已完成的搜索
Api.post('/api/vMES/CutOffProductionReport/Search', para, function(e) {
console.log("现在是未完成的搜索!");
var data = e.items.length;
if (data > 0) {
that.itemsHead = e.items;
console.log("未完成的搜索111"+JSON.stringify(that.itemsHead));
that.rightInfor = e.items[0];
that.itemsDetail = e.items[0];
that.cur = 0;
} else {
that.itemsHead = [];
that.rightInfor = [];
that.itemsDetail = [];
that.cur = 0;
}
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
});
}else{
Api.post('/api/vMES/CutOffProductionReport/SearchDone', para, function(e) {
console.log("现在是以111111完成的搜索!");
var data = e.items.length;
if (data > 0) {
that.itemsLeft2 = e.items;
that.rightInfor = e.items[0];
that.itemsDetail = e.items[0];
that.cur = 0;
} else {
that.itemsLeft2 = [];
that.rightInfor = [];
that.itemsDetail = [];
that.cur = 0;
}
}, function(xhr, type, res) {
mui.toast(JSON.stringify(res.message))
});
}
event.preventDefault(); // 阻止默认事件---阻止页面刷新
//that.searchText = '';
}
},
getTatolNum: function() { //今日产量
var that = this;
var para = {
......@@ -395,12 +457,12 @@ var app = new Vue({
mui.toast(JSON.stringify(res.message))
});
},
reportDelete: function() {
reportDelete: function() { //
var that = this;
var para = {
ReportID: this.IndexID,
};
console.log(JSON.stringify(para)); //如果列表为空,弹出提示没有可以撤回的时报
Api.post('/api/vMES/ProductionReport/Delete', para, function(e) {
if (e.success) {
//console.log(JSON.stringify(e));
......@@ -412,7 +474,8 @@ var app = new Vue({
that.getTatolNum(); //获取今日完成数量
that.Model = 0;
mui.toast("撤回成功");
console.log("删除的id:" + JSON.stringify(para));
playVoice("cg.mp3");
console.log("删除的id11111111111:" + JSON.stringify(para));
var doneIndexArr = that.itemsLeft2;
var delIndexNoIndx = -1;
for (var i = 0; i < doneIndexArr.length; i++) {
......@@ -421,37 +484,39 @@ var app = new Vue({
delIndexNoIndx = i;
break;
}
}
doneIndexArr.splice(delIndexNoIndx, 1);
if (doneIndexArr.length > 0) {
if (doneIndexArr.length - 1 >= delIndexNoIndx) {
that.cur = delIndexNoIndx;
that.rightInfor = doneIndexArr[delIndexNoIndx];
that.itemsDetail = doneIndexArr[delIndexNoIndx];
that.IndexID = doneIndexArr[delIndexNoIndx].IndexID;
} else {
that.cur = doneIndexArr.length;
that.cur = doneIndexArr.length-1;
that.rightInfor = doneIndexArr[delIndexNoIndx - 1];
that.IndexID = doneIndexArr[doneIndexArr.length].IndexID;
that.itemsDetail = doneIndexArr[delIndexNoIndx - 1];
that.IndexID = doneIndexArr[doneIndexArr.length-1].IndexID;
}
that.getDetailInfor(that.IndexID,that.cur);
}
} else {
mui.toast("撤回失败" + e.message)
mui.toast("撤回失败" + e.message);
}
}, function(xhr, type, res) {
playVoice("sb.mp3");
mui.toast(JSON.stringify(res.message))
});
},
getLink: function() {
var that = this;
var para = {
ReportType: this.ReportType,
StyleCode: this.itemsDetail.StyleCode
}
// console.log( JSON.stringify(para))
console.log(JSON.stringify(para))
Api.post('/api/vMES/Sop/StyleSop', para, function(e) {
if (e.success) {
// console.log( JSON.stringify(e))
......@@ -508,6 +573,7 @@ var app = new Vue({
that.getCompleteRatio(that.IndexID) //订单进度
playVoice("cg.mp3");
that.getDetailInfor(that.IndexID, that.cur)
//console.log("mmmmmmmmmmmmmmmmmmmmmmmm")
mui.toast("提交成功");
} else {
mui.toast("提交失败: " + e.message);
......@@ -547,15 +613,18 @@ var app = new Vue({
}
todoIndexArr.splice(delIndexNoIndx, 1);
if (todoIndexArr.length > 0) {
if (todoIndexArr.length - 1 >= delIndexNoIndx) {
if (todoIndexArr.length - 1 > delIndexNoIndx) {
that.cur = delIndexNoIndx;
that.rightInfor = todoIndexArr[delIndexNoIndx];
that.itemsDetail = todoIndexArr[delIndexNoIndx]
that.IndexID = todoIndexArr[delIndexNoIndx].IndexID;
} else {
that.cur = todoIndexArr.length;
that.cur = todoIndexArr.length-1;
that.rightInfor = todoIndexArr[delIndexNoIndx - 1];
that.IndexID = todoIndexArr[todoIndexArr.length].IndexID;
that.itemsDetail = todoIndexArr[delIndexNoIndx - 1];
that.IndexID = todoIndexArr[todoIndexArr.length-1].IndexID;
}
that.getDetailInfor(that.IndexID,that.cur);
}
} else {
......@@ -574,12 +643,9 @@ var app = new Vue({
},
submitZD: function() {
this.isAlert = true;
},
selectIndex: function(idx) {
this.createZhezhao(-1) //关闭遮罩
var indxx = document.getElementsByClassName("Index");
......@@ -635,30 +701,6 @@ var app = new Vue({
}
},
selectDisplay: function(n) {
//console.log("selectDisplay:" + n)
var n1 = document.getElementById("n1")
var n2 = document.getElementById("n2")
if (n == 1) {
this.completeState = true;
this.ChangeState(1);
n1.style.background = "royalblue"
n1.style.color = "white"
n2.style.background = "white"
n2.style.color = "royalblue"
} else if (n == 2) {
this.completeState = false;
this.ChangeState(2);
n1.style.background = "white"
n1.style.color = "royalblue"
n2.style.background = "royalblue"
n2.style.color = "white"
//opt.style.display = "none";
// opt2.style.display = "inline-block"
}
},
changeValue: function() {
if (isNaN(parseInt(this.qty))) {
this.qty = 0;
......@@ -738,7 +780,6 @@ var app = new Vue({
mui('.scroll4').scroll().scrollTo(0, 0, 100);
},
stylebg: function(n) {
if (n == 0) {
return {
"background": "#02C1ED"
......@@ -750,6 +791,16 @@ var app = new Vue({
var id_;
url_ = "CuttingQuality.html";
id_ = "CuttingQuality.html";
var detail ={
IndexID: this.IndexID,
dateTime: this.dateTime,
itemsDetail: this.itemsDetail,
itemsSize: this.itemsSize,//
type: n, // n =2 点击不合格进去 ,
parentSize: k,
sizeNum: this.rightInfor.ReportDetail //尺码和数量
}
console.log("品质问题:"+ JSON.stringify(detail));
mui.openWindow({
url: url_,
id: id_,
......@@ -760,7 +811,8 @@ var app = new Vue({
itemsSize: this.itemsSize,
type: n, // n =2 点击不合格进去 ,
parentSize: k,
sizeNum: this.itemsDetail1 //尺码和数量
sizeNum: this.itemsDetail1 ,//尺码和数量
ReportType:this.ReportType
},
});
......
......@@ -20,22 +20,21 @@
<label>今日产量:{{number}} </label>
</div>
<div id="left-2" class="left-2">
<div class="mui-input-row mui-search" v-show="completeState">
<input id="search" class="mui-input-clear search" placeholder="搜索:指令号,货号" v-model="searchText" type="search"
pattern="\d*" @keyup.enter="goSearch($event)" :disabled="!completeState" @focus.prevent="changePosition()"
<div class="mui-input-row mui-search">
<input id="search" class="mui-input-clear search" placeholder="搜索:指令号,货号,订单号" v-model="searchText" type="search"
pattern="\d*" @keyup.enter="goSearch($event)" @focus.prevent="changePosition()"
@blur.prevent="changePosition1()">
</div>
<div class="Text" :class="{ maeginTop:!completeState}">
<div class="Text">
<div class="left" id="pullrefresh" class="mui-content mui-scroll-wrapper">
<div class="mui-scroll">
<div id="theOne" :state="completeState" v-show="completeState">
<div class="mui-table-view mui-table-view-chevron">
<ul class="complet-detail" :class="{active:cur==index}" v-for="(list,index) in itemsHead" :key="list.IndexID"
@click="getDetailInfor(list.IndexID,index)">
<li>
<p><span>指令号:</span><span>{{list.IndexNo}}</span></p>
<p><span>小组:</span><span>{{list.WorkTeam}}</span></p>
<p><span>订单号:</span><span>{{list.CustomPO}}</span></p>
</li>
<li>
<p><span>货号:</span><span class="blueColor">{{list.StyleCode}}</span></p>
......@@ -43,6 +42,7 @@
</li>
<li>
<p><span>计划时间:</span><span>{{list.PlanDate}}</span></p>
<p><span>小组:</span><span>{{list.WorkTeam}}</span></p>
</li>
<li>
<p><span>预计交期:</span><span>{{list.OrderDeliveryTime}}</span></p>
......@@ -61,7 +61,7 @@
<ul class="complet-detail" v-for="(list,index) in itemsLeft2" :class="{active:cur==index}" @click="getDetailInfor(list.IndexID,index)">
<li>
<p><span>指令号:</span><span>{{list.IndexNo}}</span></p>
<p><span>小组:</span><span>{{list.WorkTeam}}</span></p>
<p><span>订单号:</span><span>{{list.CustomPO}}</span></p>
</li>
<li>
<p><span>货号:</span><span class="blueColor">{{list.StyleCode}}</span></p>
......@@ -69,11 +69,13 @@
</li>
<li>
<p><span>计划时间:</span><span>{{list.PlanDate}}</span></p>
<p><span>小组:</span><span>{{list.WorkTeam}}</span></p>
</li>
<li>
<p><span>预计交期:</span><span>{{list.OrderDeliveryTime}}</span></p>
<p><span>计划人:</span><span>{{list.PlanMan}}</span></p>
</li>
<a class="meached"> <img src="../dest/img/application/haveFinish.png" /></a>
</ul>
</div>
</div>
......@@ -94,8 +96,8 @@
<li class="mui-table-view-cell">
<p> 指令号: </p>
<p>&nbsp;{{rightInfor.IndexNo}} </p>
<p>日期: </p>
<p>{{rightInfor.OrderDeliveryTime}} </p>
<p>订单号: </p>
<p>{{rightInfor.CustomPO}}</p>
</li>
<li class="mui-table-view-cell">
<p> 货号: </p>
......@@ -113,7 +115,7 @@
</div>
<div class="left-submit">
<button type="button" class="mui-btn mui-btn-blue mui-btn-block" :disabled="disable_reportDelete" @click="reportDelete()">撤回实报</button>
<button type="button" class="mui-btn mui-btn-blue mui-btn-block" @click="nextPage(1,0)">品质问题</button>
<button type="button" class="mui-btn mui-btn-blue mui-btn-block" :disabled="disable_reportDelete" @click="nextPage(1,0)">品质问题</button>
</div>
</div>
<div id="right-4">
......
......@@ -270,7 +270,6 @@
if (this.displayModel == 1) {
return "display: none "
}
}
},
methods: {
......@@ -288,7 +287,6 @@
bounce: false,
indicators: true, //是否显示滚动条
});
this.dateTime = moment().format().substring(0,10)
this.IndexID = mui.currentWebview.IndexID;
......@@ -296,6 +294,8 @@
this.itemsSize = mui.currentWebview.itemsSize;
this.type = mui.currentWebview.type;
this.parentSize = mui.currentWebview.parentSize;
this.ReportType = mui.currentWebview.ReportType;
console.log("类型:::"+this.ReportType);
// this.sizeNum = mui.currentWebview.sizeNum;
var that = this;
setTimeout(function(e){
......
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title></title>
<title>原来的成型交接页面成型交接</title>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<link href="../dest/css/mui.min.css" rel="stylesheet" />
</head>
......@@ -12,7 +12,7 @@
<div id="app">
<div id="left-1" style="background-color: #007AFF; width: 40%; height: 30px; margin-bottom: 1px;">
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color: white; width: 60px;" @click="back"></a>
<label style=" text-align: center; margin-left: 70px; color: white;">成型交接 </label>
<label style=" text-align: center; margin-left: 70px; color: white;">原来的成型交接页面 </label>
</div>
<div id="left-2" style="width: 40%">
<div class="mui-segmented-control" style="">
......
......@@ -8,7 +8,6 @@
<link href="../dest/css/mui.min.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="../dest/css/mui.picker.min.css" />
<link rel="stylesheet" type="text/css" href="../dest/css/Cutting.css" />
</head>
<body>
<div id="app" style=" display:block" v-cloak>
......@@ -21,22 +20,21 @@
<label>今日产量:{{number}} </label>
</div>
<div id="left-2" class="left-2">
<div class="mui-input-row mui-search" v-show="completeState">
<input id="search" class="mui-input-clear search" placeholder="搜索:指令号,货号" v-model="searchText" type="search"
pattern="\d*" @keyup.enter="goSearch($event)" :disabled="!completeState" @focus.prevent="changePosition()"
<div class="mui-input-row mui-search">
<input id="search" class="mui-input-clear search" placeholder="搜索:指令号,货号,订单号" v-model="searchText" type="search"
pattern="\d*" @keyup.enter="goSearch($event)" @focus.prevent="changePosition()"
@blur.prevent="changePosition1()">
</div>
<div class="Text" :class="{ maeginTop:!completeState}">
<div class="Text">
<div class="left" id="pullrefresh" class="mui-content mui-scroll-wrapper">
<div class="mui-scroll">
<div id="theOne" :state="completeState" v-show="completeState">
<div class="mui-table-view mui-table-view-chevron">
<ul class="complet-detail" :class="{active:cur==index}" v-for="(list,index) in itemsHead" :key="list.IndexID"
@click="getDetailInfor(list.IndexID,index)">
<li>
<p><span>指令号:</span><span>{{list.IndexNo}}</span></p>
<p><span>小组:</span><span>{{list.WorkTeam}}</span></p>
<p><span>订单号:</span><span>{{list.CustomPO}}</span></p>
</li>
<li>
<p><span>货号:</span><span class="blueColor">{{list.StyleCode}}</span></p>
......@@ -44,11 +42,17 @@
</li>
<li>
<p><span>计划时间:</span><span>{{list.PlanDate}}</span></p>
<p><span>小组:</span><span>{{list.WorkTeam}}</span></p>
</li>
<li>
<p><span>预计交期:</span><span>{{list.OrderDeliveryTime}}</span></p>
<p><span>计划人:</span><span>{{list.PlanMan}}</span></p>
</li>
<!-- <a id="progress">
<div class="mui-text-center" :data-progress="list.CompleteRatio">
<p class="mui-progressbar mui-progressbar-in"><span></span></p>
</div>
</a> -->
</ul>
</div>
</div>
......@@ -57,7 +61,7 @@
<ul class="complet-detail" v-for="(list,index) in itemsLeft2" :class="{active:cur==index}" @click="getDetailInfor(list.IndexID,index)">
<li>
<p><span>指令号:</span><span>{{list.IndexNo}}</span></p>
<p><span>小组:</span><span>{{list.WorkTeam}}</span></p>
<p><span>订单号:</span><span>{{list.CustomPO}}</span></p>
</li>
<li>
<p><span>货号:</span><span class="blueColor">{{list.StyleCode}}</span></p>
......@@ -65,17 +69,17 @@
</li>
<li>
<p><span>计划时间:</span><span>{{list.PlanDate}}</span></p>
<p><span>小组:</span><span>{{list.WorkTeam}}</span></p>
</li>
<li>
<p><span>预计交期:</span><span>{{list.OrderDeliveryTime}}</span></p>
<p><span>计划人:</span><span>{{list.PlanMan}}</span></p>
</li>
<a class="meached"> <img src="../dest/img/application/haveFinish.png" /></a>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
......@@ -83,7 +87,6 @@
<div id="changePosition" class="mui-segmented-control btn_bottom">
<a id="n1" class="mui-control-item mui-active" @click="selectDisplay(1)">未完成</a>
<a id="n2" class="mui-control-item " @click="selectDisplay(2)">已完成</a>
</div>
</div>
<div id="right" class="right">
......@@ -93,8 +96,8 @@
<li class="mui-table-view-cell">
<p> 指令号: </p>
<p>&nbsp;{{rightInfor.IndexNo}} </p>
<p>日期: </p>
<p>{{rightInfor.OrderDeliveryTime}} </p>
<p>订单号: </p>
<p>{{rightInfor.CustomPO}}</p>
</li>
<li class="mui-table-view-cell">
<p> 货号: </p>
......@@ -191,7 +194,7 @@
<script src="../js/mui.pullToRefresh.js"></script>
<script src="../dest/js/mes/playVoice.js"></script>
<script src="../dest/js/mes/FormingV2.js"></script>
</body>
</html>
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>针车交接</title>
<title>裁断配套确认</title>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<link href="../dest/css/mui.min.css" rel="stylesheet" />
<link href="../dest/css/needlecarHand/needlecarHandover.css" rel="stylesheet" />
......@@ -14,24 +14,24 @@
<div class="need-left">
<div id="left-1">
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color: white; width: 60px;" @click="back"></a>
<label style=" text-align: center; margin-left: 70px; color: white;">针车交接 </label>
<label style=" text-align: center; margin-left: 70px; color: white;">裁断配套确认</label>
</div>
<div class="mui-input-row mui-search" v-show="completeState">
<input id="search" class="mui-input-clear search" placeholder="搜索:指令号,货号" v-model="searchText" type="search"
pattern="\d*" @keyup.enter="goSearch($event)" :disabled="!completeState" @focus.prevent="changePosition()"
<div class="mui-input-row mui-search">
<input id="search" class="mui-input-clear search" placeholder="搜索:指令号,货号,订单号" v-model="searchText" type="search"
pattern="\d*" @keyup.enter="goSearch($event)" @focus.prevent="changePosition()"
@blur.prevent="changePosition1()">
</div>
<div id="left-2" :class="{ marginTop:!completeState}">
<div id="left-2">
<div id="pullrefresh">
<div class="mui-scroll">
<div id="item1" :state="completeState" class="scroll1 leftList maeginTop">
<div class="mui-table-view mui-table-view-chevron">
<ul :id="items.IndexID" :class="{active:cur==n}" class="mui-table-view bg needLeftList" v-for=" items,n in itemsLeft"
<ul :id="items.IndexID" :class="{active:cur==n}" class="mui-table-view bg needLeftList" v-for=" (items,n) in itemsLeft"
@click="selectLeft(items,n)">
<li>
<p><span>指令号:</span><span>{{items.IndexNo}}</span></p>
<p><span>班组:</span><span>{{items.WorkTeam}}</span></p>
<p><span>订单号:</span><span>{{items.CustomPO}}</span></p>
</li>
<li>
<p><span>货号:</span><span class="blueColor">{{items.StyleCode}}</span></p>
......@@ -39,23 +39,26 @@
</li>
<li>
<p><span>计划时间:</span><span>{{items.PlanDate}}</span></p>
<p><span>班组:</span><span>{{items.ToWorkTeam}}</span></p>
</li>
<li>
<p><span>实报时间:</span><span>{{items.ReportDate}}</span></p>
<p><span>实报人:</span><span>{{items.ReportUser}}</span></p>
<p><span>计划配送:</span><span>{{items.PlanDistribution}}</span></p>
</li>
<a class="meached" v-show = "items.IsMatch"> <img src="../dest/img/application/meached.png" /></a>
<a class="confirm" v-show = "items.IsConfirm"> <img src="../dest/img/application/haveSure.png" /></a>
</ul>
</div>
</div>
<div id="item2" :state="!completeState" class="scroll2 leftList " :style="display_">
<div class="mui-table-view mui-table-view-chevron">
<div class="mui-table-view mui-table-view-chevron">
<ul :id="items.IndexID" :class="{active:cur==n}" class="mui-table-view bg needLeftList" v-for=" items,n in itemsLeft2"
@click="selectLeft(items,n )">
<li>
<p><span>指令号:</span><span>{{items.IndexNo}}</span></p>
<p><span>班组:</span><span>{{items.WorkTeam}}</span></p>
<p><span>订单号:</span><span>{{items.CustomPO}}</span></p>
</li>
<li>
<p><span>货号:</span><span class="blueColor">{{items.StyleCode}}</span></p>
......@@ -63,12 +66,13 @@
</li>
<li>
<p><span>计划时间:</span><span>{{items.PlanDate}}</span></p>
<p><span>班组:</span><span>{{items.ToWorkTeam}}</span></p>
</li>
<li>
<p><span>实报时间:</span><span>{{items.ReportDate}}</span></p>
<p><span>实报人:</span><span>{{items.ReportUser}}</span></p>
<p><span>计划配送:</span><span>{{items.PlanDistribution}}</span></p>
</li>
<a class="meached" v-show = "items.IsMatch"> <img src="../dest/img/application/haveHandover.png" /></a>
</ul>
</div>
</div>
......@@ -94,7 +98,6 @@
<p class="blueColor">&nbsp;{{itemsDetail.StyleCode}}</p>
<p>颜色: </p>
<p>{{itemsDetail.ColorName}} </p>
</li>
<li class="mui-table-view-cell">
<p> 数量: </p>
......@@ -122,6 +125,12 @@
<p> 实报人: </p>
<p>&nbsp;{{itemsDetail.ReportUser}} </p>
</li>
<li class="mui-table-view-cell">
<p> 确认人: </p>
<p>&nbsp;{{itemsDetail.ConfirmUserName}} </p>
<p>确认时间: </p>
<p>{{itemsDetail.ConfirmDate}} </p>
</li>
<li class="mui-table-view-cell">
<p> 配套人: </p>
<p>&nbsp;{{itemsDetail.MatchUserName}} </p>
......@@ -134,13 +143,15 @@
<p>交接时间: </p>
<p>{{itemsDetail.CheckDate}} </p>
</li>
</ul>
</div>
</div>
<div id="right-2">
<button type="button" class="mui-btn mui-btn-blue " :disabled="btnConfirm" @click="cutConfirm" >裁断确认</button>
<button type="button" class="mui-btn mui-btn-blue " :disabled="btnMatch" @click="matched" >针车配套</button>
<!-- <button type="button" class="mui-btn mui-btn-blue " :disabled="sty1" @click="selectPerson">人员排班</button> -->
<button type="button" class="mui-btn mui-btn-blue " :disabled="btnCheck" @click="submit">{{submitText}}</button>
<button type="button" class="mui-btn mui-btn-blue " :disabled="btnCheck" @click="submit">{{submitText}}</button>
</div>
</div>
......
......@@ -21,22 +21,20 @@
<label>今日产量:{{number}} </label>
</div>
<div id="left-2" class="left-2">
<div class="mui-input-row mui-search" v-show="completeState">
<input id="search" class="mui-input-clear search" placeholder="搜索:指令号,货号" v-model="searchText" type="search"
pattern="\d*" @keyup.enter="goSearch($event)" :disabled="!completeState" @focus.prevent="changePosition()"
@blur.prevent="changePosition1()">
<div class="mui-input-row mui-search">
<input id="search" class="mui-input-clear search" placeholder="搜索:指令号,货号,订单号" v-model="searchText" type="search"
pattern="\d*" @keyup.enter="goSearch($event)" @focus.prevent="changePosition()" @blur.prevent="changePosition1()">
</div>
<div class="Text" :class="{ maeginTop:!completeState}">
<div class="Text">
<div class="left" id="pullrefresh" class="mui-content mui-scroll-wrapper">
<div class="mui-scroll">
<div id="theOne" :state="completeState" v-show="completeState">
<div class="mui-table-view mui-table-view-chevron">
<ul class="complet-detail" :class="{active:cur==index}" v-for="(list,index) in itemsHead" :key="list.IndexID"
@click="getDetailInfor(list.IndexID,index)">
<li>
<p><span>指令号:</span><span>{{list.IndexNo}}</span></p>
<p><span>小组:</span><span>{{list.WorkTeam}}</span></p>
<p><span>订单号:</span><span>{{list.CustomPO}}</span></p>
</li>
<li>
<p><span>货号:</span><span class="blueColor">{{list.StyleCode}}</span></p>
......@@ -44,11 +42,17 @@
</li>
<li>
<p><span>计划时间:</span><span>{{list.PlanDate}}</span></p>
<p><span>小组:</span><span>{{list.WorkTeam}}</span></p>
</li>
<li>
<p><span>预计交期:</span><span>{{list.OrderDeliveryTime}}</span></p>
<p><span>计划人:</span><span>{{list.PlanMan}}</span></p>
</li>
<!-- <a id="progress">
<div class="mui-text-center" :data-progress="list.CompleteRatio">
<p class="mui-progressbar mui-progressbar-in"><span></span></p>
</div>
</a> -->
</ul>
</div>
</div>
......@@ -57,7 +61,7 @@
<ul class="complet-detail" v-for="(list,index) in itemsLeft2" :class="{active:cur==index}" @click="getDetailInfor(list.IndexID,index)">
<li>
<p><span>指令号:</span><span>{{list.IndexNo}}</span></p>
<p><span>小组:</span><span>{{list.WorkTeam}}</span></p>
<p><span>订单号:</span><span>{{list.CustomPO}}</span></p>
</li>
<li>
<p><span>货号:</span><span class="blueColor">{{list.StyleCode}}</span></p>
......@@ -65,17 +69,17 @@
</li>
<li>
<p><span>计划时间:</span><span>{{list.PlanDate}}</span></p>
<p><span>小组:</span><span>{{list.WorkTeam}}</span></p>
</li>
<li>
<p><span>预计交期:</span><span>{{list.OrderDeliveryTime}}</span></p>
<p><span>计划人:</span><span>{{list.PlanMan}}</span></p>
</li>
<a class="meached"> <img src="../dest/img/application/haveFinish.png" /></a>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
......@@ -83,7 +87,6 @@
<div id="changePosition" class="mui-segmented-control btn_bottom">
<a id="n1" class="mui-control-item mui-active" @click="selectDisplay(1)">未完成</a>
<a id="n2" class="mui-control-item " @click="selectDisplay(2)">已完成</a>
</div>
</div>
<div id="right" class="right">
......@@ -93,8 +96,8 @@
<li class="mui-table-view-cell">
<p> 指令号: </p>
<p>&nbsp;{{rightInfor.IndexNo}} </p>
<p>日期: </p>
<p>{{rightInfor.OrderDeliveryTime}} </p>
<p>订单号: </p>
<p>{{rightInfor.CustomPO}}</p>
</li>
<li class="mui-table-view-cell">
<p> 货号: </p>
......
......@@ -44,6 +44,8 @@
<div class="mui-content-padded">
<i id="promptBtn" class="iconfont icon-diannao computed"></i>
<button id='login' class="mui-btn login-btn" data-loading-text="登录中...">登录</button>
</div>
</div>
<div class="alertBox">
......@@ -61,7 +63,9 @@
<script src="../dest/js/mui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../dest/js/zepto.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../dest/js/app.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../dest/js/public.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../dest/js/login/login.js" type="text/javascript"></script>
</body>
</html>
......@@ -16,8 +16,13 @@
</header>
<div class="mui-content">
<ul class="mui-table-view" id="setting-list">
<li class="mui-table-view-cell">
<a class="mui-navigate-right" data-href="changePassWord.html" data-id="changePassWord">
修改密码
</a>
</li>
<li class="mui-table-view-cell">
<a class="mui-navigate-right" data-href="setting-message.html" data-id="setting-message">
<a class="mui-navigate-right" data-href="message.html" data-id="message">
新消息通知
</a>
</li>
......
......@@ -7,8 +7,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<link href="../dest/css/mui.min.css" rel="stylesheet" />
</head>
<body style="margin: 0; padding: 0; width: 100px;">
<body style="margin: 0; padding: 0; width: 100%;height: 100%;">
<div id="app">
<header @click="backaction" class="mui-bar mui-bar-nav " style="width: 150px !important; background: #DCDCE1; position: relative;left: 810px; " >
<button class="mui-icon mui-icon-arrowleft mui-btn-outlined ;" style=" border: 0px; padding: 0; width: 50px; height: 100%; color: #007AFF;"
......@@ -17,13 +16,10 @@
<!-- <a class="mui-icon mui-icon-left-nav mui-pull-left" onclick="mui.back()"></a> -->
<h1 class="mui-title" >返回</h1>
</header>
<div class=" mui-fullscreen" >
<iframe style=" border-width: 0; "
:src="link"
width="100%" height="571"></iframe>
width="100%" height="100%"></iframe>
</div>
</div>
......
......@@ -75,29 +75,30 @@
</a>
</div>
<div class="application-box" types="90032">
<a ids="7" href="javascript:;">
<div class="application-img"><img src="../dest/img/application/zcsb.png" alt="针车实报" /></div>
<h3 class="application-tit" title="针车实报V2">针车实报V2</h3>
</a>
</div>
<div class="application-box" types="90033">
<a ids="8" href="javascript:;">
<div class="application-img"><img src="../dest/img/application/zcsb.png" alt="成型实报" /></div>
<h3 class="application-tit" title="成型实报V2">成型实报V2</h3>
</a>
</div>
<a ids="7" href="javascript:;">
<div class="application-img"><img src="../dest/img/application/zcsb.png" alt="针车实报" /></div>
<h3 class="application-tit" title="针车实报V2">针车实报</h3>
</a>
</div>
<div class="application-box" types="90033">
<a ids="8" href="javascript:;">
<div class="application-img"><img src="../dest/img/application/zcsb.png" alt="成型实报" /></div>
<h3 class="application-tit" title="成型实报V2">成型实报</h3>
</a>
</div>
<div class="application-box" types="90028">
<a ids="4" href="javascript:;">
<div class="application-img"><img src="../dest/img/zc.png" alt="工序交接-针车" /></div>
<h3 class="application-tit" title="工序交接-针车">针车交接</h3>
<h3 class="application-tit" title="工序交接-针车">裁断配套确认</h3>
</a>
</div>
<div class="application-box" types="90029">
<a ids="3" href="javascript:;">
<div class="application-img"><img src="../dest/img/cx.png" alt="工序交接-成型" /></div>
<h3 class="application-tit" title="工序交接-针车">成型交接</h3>
<h3 class="application-tit" title="工序交接-针车">针车配套确认</h3>
</a>
</div>
<div class="application-box" types="90030">
......@@ -112,13 +113,14 @@
<h3 class="application-tit" title="针车排班表">针车排班表</h3>
</a>
</div>
<div class="application-box" types="设置">
<!-- <div class="application-box" types="设置">
<a ids="999" href="javascript:;">
<div class="application-img"><img src="../dest/img/sz.png" alt="设置" /></div>
<h3 class="application-tit" title="设置">设置</h3>
</a>
</div>
</div> -->
</div>
<script src="../dest/js/mui.min.js"></script>
<script src="../dest/js/createView.min.js"></script>
......@@ -143,15 +145,13 @@
})(mui, document)
}
function init() {
mui.init();
var lisy = Dom.getById('lialist');
var isds = lisy.getElementsByClassName('application-box');
var ucond = Dom.getById('centicon');
var pages = ['Needlecarreport_new', 'Cutting', "Forming", "FormingHandover", "NeedlecarHandover", "MyWork","NeedlecarPBB","NeedlecarreportV2","FormingV2"
];
var pages = ['Needlecarreport_new', 'Cutting', "Forming", "NeedleMatch", "NeedlecarHandover",
"MyWork","NeedlecarPBB","NeedlecarreportV2","FormingV2"];
//var tits = ['色卡档案', '样品企划', '样品客户意见', '款式图片档案', '下单管理', '生产进度表', '消息提醒', '业务审批', '订货主场','针车实报','设置'];
var lab1 = document.getElementsByTagName("a");
function onGetDataSuccess(e) {
......@@ -162,9 +162,9 @@
var items = e.items;
console.log(JSON.stringify(items))
//手动在结尾添加了一个设置项目
items.push({
Code: "设置"
});
// items.push({
// Code: "设置"
// });
//console.log(JSON.stringify(items));
......@@ -189,12 +189,8 @@
Dom.open('login.html')
return;
}
}
}
//console.log("GetModuleList::begin" )
Api.post('/api/User/GetModuleList', {}, onGetDataSuccess, onGetDataFailure);
......
......@@ -3,7 +3,7 @@
"id" : "H544710A8", /*应用的标识,创建应用时自动生成,勿手动修改*/
"name" : "飞天兔MES", /*应用名称,程序桌面图标名称*/
"version" : {
"name" : "1.0.0.90", /*应用版本名称*/
"name" : "1.0.0.97", /*应用版本名称*/
"code" : 338
},
"description" : "飞天兔MES平板版", /*应用描述信息*/
......
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