Commit 49c805ce authored by 上官's avatar 上官

1.MES_PAD :系统登录界面横排显示 ,调节图片大小 正好一个屏幕,不用下拉点击登录

2.MEs_PAD: 针车品检也增加 今日时报 和 单款时报 查看时报 输入框也做遮罩处理
parent f2b1862a
......@@ -23,6 +23,16 @@
height: 200%;
/*background-color: #F6F6F6;*/
}
.mui-backdrop {
position: fixed;
top: 209px;
right: 13px;
bottom: 46px;
left: 695px;
z-index: 998;
background-color: rgba(0, 0, 0, .3);
}
</style>
</head>
......@@ -34,11 +44,11 @@
<div id="left" style=" display: inline-block; width: 30%; ">
<div id="left-1" style="position: absolute; top: 1px;">
<!-- <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" @tap="back"></a> -->
<label style=" text-align: center; position: relative; left: 50px;">今日次品数量:{{number}} </label>
</div>
<div id="left-2">
<table class="mui-table" style="position: relative;top: -495px;">
<table class="mui-table" style="position: relative;top: -455px;">
<thead class="mui-table-view">
<tr>
<th style="font-size: 16px;font-weight: normal;background-color: #E2E2E9;">时间</th>
......@@ -48,10 +58,8 @@
</tr>
</thead>
</table>
<div class="mui-scroll-wrapper " style="border: solid #DAE6EF 1px ;background: white; display: inline-block; width: 30%; top: 45px;">
<div id="item1" class="mui-scroll-wrapper " style="border: solid #DAE6EF 1px ;background: white; display: inline-block;height: 480px; width: 30%; top: 45px;">
<div class="mui-scroll">
<table class="mui-table">
<tbody class="mui-table-view-cell">
<tr :id="'ReportID_'+item.ReportID" class="Report" v-for=" item in itemsLeft" @click="selectReport(item.ReportID)">
......@@ -65,11 +73,26 @@
</div>
</div>
<div id="item2" class="mui-scroll-wrapper " :style="display_" style="border: solid #DAE6EF 1px ;background: white; display: inline-block;height: 480px; width: 30%; top: 45px;">
<div class="mui-scroll">
<table class="mui-table">
<tbody class="mui-table-view-cell">
<tr :id="'ReportID_'+item.ReportID" class="Report" v-for=" item in itemsLeft2" @click="selectReport2(item.ReportID)">
<td align="center">{{item.Date}}</td>
<td align="center">{{item.IndexNo}}</td>
<td align="center">{{item.Qty}}</td>
<td align="center">{{item.ProcessingType==1?"返修" :"报废"}}</td>
</tbody>
</tr>
</table>
</div>
</div>
<div class="mui-segmented-control" style="position: relative;top: 30px;">
<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>
<div id="right" style=" display: inline-block; width: 69%; ">
......@@ -95,15 +118,12 @@
<p style="float: left;width: 12%; color: #060606;">班组: </p>
<p style="float: left;width: 32%; color: #060606;">{{itemsDetail.WorkTeam}} </p>
</li>
</ul>
</div>
<div style=" display: inline-block; width: 19%; position: relative;top: -25px;">
<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="back">返回时报</button>
</div>
</div>
<div id="right-3" style="border: solid #DAE6EF 1px ;position: relative;top : -18px">
<table class="mui-table ">
......@@ -117,7 +137,6 @@
<button class="bg" :style="stylebg(itemd)" style="width: 100%;height: 50px; border:0px ;" type="button" class="mui-btn mui-btn-blue mui-btn-outlined"
@click="selectSize(itemd)">{{itemd}}</button>
</td>
</tr>
</tbody>
</table>
......@@ -128,68 +147,61 @@
<div style=" display: inline-block; width: 60%;height: 305px; position: relative;top:-15px;">
<div class="mui-scroll-wrapper">
<div class="mui-scroll">
<table class="mui-table">
<tbody class="mui-table-view-cell">
<tr style="height:60px ;" v-for="itemq , n in itemsDetail1_ar">
<td :id="'Quality_'+ itemqq.ID" class="altrowstable Quality" style="height: 60px;text-align: center; "
v-for="itemqq , n in itemq" @click="selectQQ(itemqq.ID)">
<p style="font-size: 27px; text-align: center;">{{itemqq.Code}}</p>
<label class="mui-pull-caption " style=" font-size: 12px; padding: 0px; margin: 5px 0px 0px 0px; line-height: 12px !important;text-align: center!important">{{itemqq.Name}}</label>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div style=" display: inline-block; width: 39%; position: relative;top: -50px;">
<input readonly="readonly" style="border: 1px solid #DDDDDD; width: 170px ;height: 65px;margin-right: -6px;margin-bottom: -1px; text-align: center;color: red;background: #C8C7CC;font-size: 25px "
onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" v-model="qty" :value="qty" :onchange="changeValue()" />
<button style=" width: 85px;height: 65px;margin-bottom: -1px;font-size: 25px" @click="backNumber()"> ←</button>
<button style=" width: 85px;height: 65px; margin-right: -5px;margin-bottom: -1px ; font-size: 25px;" @click="selectNumber(1)"> 1</button>
<button style=" width: 85px;height: 65px; margin-right: -5px;margin-bottom: -1px;font-size: 25px" @click="selectNumber(2)"> 2</button>
<button style=" width: 85px;height: 65px; margin-right: -4px ;margin-bottom: -1px;font-size: 25px" @click="selectNumber(3)"> 3</button>
<button style=" width: 85px; height: 65px;margin-right: -5px ;margin-bottom: -1px;font-size: 25px" @click="selectNumber(4)"> 4</button>
<button style=" width: 85px; height: 65px;margin-right: -5px;margin-bottom: -1px;font-size: 25px" @click="selectNumber(5)"> 5</button>
<button style=" width: 85px;height: 65px;margin-right: -5px;margin-bottom: -1px;font-size: 25px" @click="selectNumber(6)"> 6</button>
<button style=" width: 85px;height: 65px; margin-right: -5px;margin-bottom: -1px;font-size: 25px" @click="selectNumber(7)"> 7</button>
<button style=" width: 85px;height: 65px; margin-right: -5px;margin-bottom: -1px;font-size: 25px" @clicl="selectNumber(8)"> 8</button>
<button style=" width: 85px;height: 65px; margin-right: -5px;margin-bottom: -1px ; font-size: 25px;" @click="selectNumber(1)">
1</button>
<button style=" width: 85px;height: 65px; margin-right: -5px;margin-bottom: -1px;font-size: 25px" @click="selectNumber(2)">
2</button>
<button style=" width: 85px;height: 65px; margin-right: -4px ;margin-bottom: -1px;font-size: 25px" @click="selectNumber(3)">
3</button>
<button style=" width: 85px; height: 65px;margin-right: -5px ;margin-bottom: -1px;font-size: 25px" @click="selectNumber(4)">
4</button>
<button style=" width: 85px; height: 65px;margin-right: -5px;margin-bottom: -1px;font-size: 25px" @click="selectNumber(5)">
5</button>
<button style=" width: 85px;height: 65px;margin-right: -5px;margin-bottom: -1px;font-size: 25px" @click="selectNumber(6)">
6</button>
<button style=" width: 85px;height: 65px; margin-right: -5px;margin-bottom: -1px;font-size: 25px" @click="selectNumber(7)">
7</button>
<button style=" width: 85px;height: 65px; margin-right: -5px;margin-bottom: -1px;font-size: 25px" @clicl="selectNumber(8)">
8</button>
<button style=" width: 85px;height: 65px; margin-bottom: -1px;font-size: 25px" @click="selectNumber(9)"> 9</button>
<button style=" width: 85px;height: 65px; margin-right: -5px;font-size: 25px" @click="selectNumber(0)"> 0</button>
<button class="mui-btn-blue" style=" width: 170px;height: 65px; " @click="submit" :disabled="disable_save_button2">
提交</button>
</div>
</div>
<div id="right-5" style=" ">
<label style="height:50px;width: 100px ; text-align: center; vertical-align:middle ; position: relative;top: 14px; "> 处理类型:</label>
<label style="height:50px;width: 100px ; text-align: center; vertical-align:middle ; position: relative;top: 14px; ">
处理类型:</label>
</div>
<div id="right-5" style=" position: absolute; left:375px ; bottom: 5px;">
<!-- <label style="height:50px;width: 100px ; text-align: center; vertical-align:middle ; "> 处理类型:</label> -->
<button id="ProcessingType_1" type="button" class="mui-btn mui-btn-blue mui-btn-outlined" style="height:50px;width: 100px;background: #02C1ED ;font-size: 22px"
@click="selectProcessingType(1)">返修</button>
<button id="ProcessingType_2" type="button" class="mui-btn mui-btn-blue mui-btn-outlined" style="height:50px;width: 100px ;font-size: 22px"
@click="selectProcessingType(2)">报废</button>
</div>
</div>
</div>
</div>
......@@ -221,43 +233,28 @@
qualityID: 0,
itemsDetail: [], //订单明细
itemsDetail1: [], //品检项目
itemsDetail1_ar: [
[{
"ID": 20,
"Code": "C20",
"Name": "浮线跳针,断针"
}, {
"ID": 21,
"Code": "C21",
"Name": "拉链齿损坏不能咬合"
}, {
"ID": 22,
"Code": "C22",
"Name": "色泽不均或掉色"
}, {
"ID": 23,
"Code": "C23",
"Name": "扣件饰物安装不牢固"
}, {
"ID": 24,
"Code": "C24",
"Name": "尺寸数据误差大"
}]
],
itemsDetail1_ar: [],
itemsDetail2: [],
itemsHead: [],
itemsLeft: [],
itemsLeft: [], //今日实报
itemsLeft2: [], //单款实报
itemsSize: [],
SizeQty: [],
itemsSizeDef: [40, 41, 42, 43, 44, 45, 46],
type : 1,
parentSize:0,
type: 1,
parentSize: 0,
IndexID: 0,
disable_save_button: 'disabled',
disable_reportDelete: 'disabled',
ProcessingType: 1,
ReportID: 0,
Model: 0, //0 可以提交 1 不可以提交
zhezhao: 1, //
displayModel: 1,
mask_: mui.createMask(function(e) {
return false;
}),
ReportType:1,
},
computed: {
......@@ -267,6 +264,12 @@
} else {
return 'disabled';
}
},
display_: function() {
if (this.displayModel == 1) {
return "display: none "
}
}
},
methods: {
......@@ -274,50 +277,39 @@
mui.init({
beforeback: function() {
var temp = 'Needlecarreport_new.html';
console.log("退回前页面")
var list = plus.webview.getWebviewById(temp);
mui.fire(list, 'back');
return true;
}
});
mui('.mui-scroll-wrapper').scroll({
bounce: false,
indicators: true, //是否显示滚动条
});
this.dateTime = new Date().toLocaleDateString();
this.dateTime = this.dateTime.replace("/", "-")
this.dateTime = this.dateTime.replace("/", "-")
this.IndexID = mui.currentWebview.IndexID;
this.itemsDetail = mui.currentWebview.itemsDetail;
this.itemsSize = mui.currentWebview.itemsSize;
this.type = mui.currentWebview.type;
this.parentSize = mui.currentWebview.parentSize;
console.log("this.type:::" + this.type)
console.log("this.parentSize:::" + this.parentSize)
this.getDataInit();
},
getDataInit: function() {
this.getDataDetail1();
this.getDataDetail2();
this.getDataDetail2(1);
this.getTatolNum();
},
getData: function() {
var that = this;
var para = {
ReportType: 1,
ReportType: this.ReportType,
IndexID: this.IndexID
};
Api.post('/api/vMES/InspectionReport/GetQIItem', para, function(e) {
......@@ -330,7 +322,7 @@
that.IndexID = e.items[0].IndexID;
that.getDataDetail1();
that.getDataDetail2();
that.getDataDetail2(1);
that.getTatolNum();
that.qty = 0;
that.disable_reportDelete = 'disabled';
......@@ -353,13 +345,12 @@
getDataDetail1: function() {
var that = this;
var para = {
ReportType: 1,
ReportType: this.ReportType,
IndexID: this.IndexID
};
Api.post('/api/vMES/InspectionReport/GetQIItem', para, function(e) {
console.log(JSON.stringify(e.items))
that.itemsDetail1 = e.items;
that.itemsDetail1_ar = [];
......@@ -370,42 +361,43 @@
});
},
//完成信息明细
getDataDetail2: function() {
getDataDetail2: function(n) {
var that = this;
var para = {
ReportType: 1,
Date: this.dateTime + " 00:00:00",
IndexID: this.IndexID,
ReportType: this.ReportType,
// Date: this.dateTime + " 00:00:00",
IndexID: n == 1 ? 0 : this.IndexID,
PageSize: 200,
PageIndex: 1,
};
if (n == 1) {
Api.post('/api/vMES/InspectionReport/Report', para, function(e) {
console.log(JSON.stringify(e));
that.itemsLeft = e.items;
console.log(JSON.stringify(that.itemsLeft));
});
} else if (n == 2) {
Api.post('/api/vMES/InspectionReport/Report', para, function(e) {
that.itemsLeft2 = e.items;
});
}
},
getTatolNum: function() {
var that = this;
var para = {
ReportType: 1,
ReportType: this.ReportType,
Date: this.dateTime + " 00:00:00",
};
Api.post('/api/vMES/InspectionReport/TotalQty', para, function(e) {
that.number = e.data;
});
},
getReportDetail: function() {
var that = this;
var para = {
ReportID: this.ReportID
};
Api.post('/api/vMES/InspectionReport/ReportDetail', para, function(e) {
......@@ -439,6 +431,7 @@
Api.post('/api/vMES/InspectionReport/Delete', para, function(e) {
if (e.success) {
that.createZhezhao(-1)
that.disable_reportDelete = 'disabled'
that.size = 0;
that.qty = 0;
......@@ -450,11 +443,12 @@
//that.getDataDetail1(); //获取列表尺码对应数量
that.getTatolNum(); //获取今日完成数量
that.getDataDetail2(); //获取左边列表明细
that.getDataDetail2(1); //获取左边列表明细
that.getDataDetail2(2); //获取左边列表明细
that.Model = 0;
mui.toast("撤回成功")
} else {
mui.toast("撤回失败" + e.success.message)
mui.toast("撤回失败" + e.message)
}
});
......@@ -469,9 +463,6 @@
this.SizeQty.push(tempa);
}
},
submit: function() {
if (!this.checkValue()) {
......@@ -500,8 +491,8 @@
that.selectReport(0);
//that.getDataDetail1(); //获取列表尺码对应数量
that.getTatolNum(); //获取今日完成数量
that.getDataDetail2(); //获取左边列表明细
that.getDataDetail2(1); //获取左边列表明细
that.getDataDetail2(2); //获取左边列表明细
mui.toast("提交成功");
} else {
mui.toast("提交失败: " + e.success.message);
......@@ -552,7 +543,7 @@
if (this.IndexID != 0) {
this.getDataDetail1();
this.getDataDetail2();
this.getDataDetail2(1);
this.getTatolNum();
this.qty = 0;
this.size = 0;
......@@ -572,9 +563,25 @@
},
selectReport: function(obj) {
var op = document.getElementById("ReportID_" + obj)
this.ReportID = obj;
if (this.ReportID != 0) {
this.disable_reportDelete = null;
}
var reportele = document.getElementsByClassName("Report");
for (var i = 0; i < reportele.length; i++) {
reportele[i].style.background = ""
}
if (obj != 0) {
this.createZhezhao(1)
op.style.background = "#02C1ED";
this.displayReport();
}
},
selectReport2: function(obj) {
var op = document.getElementById("ReportID_" + obj)
this.ReportID = obj;
......@@ -587,13 +594,54 @@
reportele[i].style.background = ""
}
if (obj != 0) {
this.createZhezhao(1)
op.style.background = "#02C1ED";
this.displayReport();
}
},
selectDisplay: function(n) {
var opt = document.getElementById("item1")
var opt2 = document.getElementById("item2")
var n1 = document.getElementById("n1")
var n2 = document.getElementById("n2")
if (n == 1) {
n1.style.background = "royalblue"
n1.style.color = "white"
n2.style.background = "white"
n2.style.color = "royalblue"
opt.style.display = "inline-block";
opt2.style.display = "none"
}
if (n == 2) {
this.getDataDetail2(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"
}
},
createZhezhao: function(n) {
if (n == -1) {
this.mask_._remove()
this.zhezhao = 1;
} else {
if (this.zhezhao == 1) {
this.mask_.show(); //显示遮罩
this.zhezhao = 2
// mask.close();//关闭遮罩
}
}
},
changeValue: function() {
if (isNaN(parseInt(this.qty))) {
......@@ -635,7 +683,6 @@
return;
}
var str = this.qty.toString();
this.qty = str.substring(0, str.length - 1);
},
......@@ -665,12 +712,11 @@
},
stylebg: function(k) {
if(this.type ==1){
if (this.type == 1) {
return
}
else if(this.type ==2) {
} else if (this.type == 2) {
if (k == this.parentSize) {
this.size=this.parentSize
this.size = this.parentSize
return {
"background": "#02C1ED"
......@@ -680,7 +726,6 @@
},
back: function() {
mui.back();
// plus.screen.lockOrientation("portrait-primary") //横屏
......
......@@ -335,9 +335,9 @@
init: function() {
mui.init();
window.addEventListener('back', function(e) {
console.log("back");
var that = this;
console.log(that.IndexID)
app.getDataDetail1();
});
......@@ -420,7 +420,7 @@
PageSize: 200,
PageIndex: 1,
};
console.log(JSON.stringify(para))
// console.log(JSON.stringify(para))
if( n ==1 ){
Api.post('/api/vMES/ProductionReport/Report', para, function(e) {
......@@ -461,15 +461,15 @@
IndexID: n
};
console.log(JSON.stringify(para))
// console.log(JSON.stringify(para))
Api.post('/api/vMES/ProductionReport/IndexNoCompleteRatio', para, function(e) {
that.CompleteRatio = e.data;
console.log(JSON.stringify(e))
// console.log(JSON.stringify(e))
for (var i = 0; i < that.itemsHead.length; i++) {
if (that.itemsHead[i].IndexID == n) {
that.itemsHead[i].CompleteRatio = that.CompleteRatio;
console.log(that.CompleteRatio);
// console.log(that.CompleteRatio);
}
}
});
......@@ -538,10 +538,10 @@
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))
// console.log( JSON.stringify(e))
that.link = e.data.Url ;
var url_ = "sop.html";
......@@ -621,8 +621,8 @@
}
console.log(JSON.stringify(para));
console.log(JSON.stringify(para));
// console.log(JSON.stringify(para));
// console.log(JSON.stringify(para));
Api.post('/api/vMES/ProductionReport/SingleComplete', para, function(e) {
......@@ -696,14 +696,14 @@
},
createZhezhao:function(n){
console.log(n)
// console.log(n)
if(n== -1){
// var mask = mui.createMask();//callback为用户点击蒙版时自动执行的回调;
// this.mask_.close();
this.mask_._remove()
this.zhezhao = 1;
console.log("n== -1")
}
else{
if (this.zhezhao == 1 ){
......@@ -790,8 +790,7 @@
reportele[i].style.background = ""
}
if (obj != 0) {
console.log("obj:;" + obj )
console.log("IndexID::" + this.IndexID )
if(this.IndexID != 0){
var Index = document.getElementById("Index_" + this.IndexID)
Index.style.background = "";
......@@ -810,8 +809,7 @@
var n1 = document.getElementById("n1" )
var n2 = document.getElementById("n2" )
console.log(opt.style.display)
console.log(opt2.style.display)
if( n== 1){
n1.style.background ="royalblue"
n1.style.color = "white"
......@@ -899,7 +897,7 @@
},
nextday: function(n) {
this.createZhezhao(-1)
console.log("next")
var d = new Date(this.dateTime);
d.setTime(d.getTime() + 24 * 60 * 60 * 1000 * n);
if (d.getDate().toString().length == 1) {
......@@ -985,7 +983,7 @@
* rs.h 时,用法同年
* rs.i 分(minutes 的第二个字母),用法同年
*/
console.log(rs.value)
_self.innerText = rs.text;
that.dateTime = rs.text;
that.getData();
......
......@@ -123,7 +123,7 @@
function onGetDataSuccess(e){
console.log(JSON.stringify(e))
var isSuccess = e.success;
if(isSuccess) {
var items = e.items;
......
......@@ -10,14 +10,14 @@
</head>
<body>
<div class="mui-content">
<div class="app-header">
<div >
<div class="app-logo">
<img src="../dest/img/applogo.png" />
</div>
<h1 class="app-title ">FetetO&nbsp;Cloud&nbsp;APP</h1>
</div>
<div class="app-form-bg">
<p>欢迎回来!</p>
<div style=" margin-top: 0;" class="app-form-bg">
<p style="padding-bottom: 5px; padding-top: 5px;">欢迎回来!</p>
<form id='login-form' class="mui-input-group">
<div class="mui-input-row">
<label class="mui-code" for="corpid">企业代码</label>
......@@ -48,6 +48,8 @@
<script src="../dest/js/app.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
(function ($, doc) {
$.init({
statusBarBackground: '#72757e'
});
......@@ -73,8 +75,11 @@
plus.runtime.quit();
};
$.plusReady(function () {
plus.navigator.closeSplashscreen()
plus.screen.lockOrientation("portrait-primary")
plus.screen.lockOrientation("landscape-primary") //横屏
// plus.screen.lockOrientation("portrait-primary")
if (mui.os.ios) {
plus.navigator.setFullscreen(true);
......
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