Commit a708af0a authored by 上官's avatar 上官

调整 同步

parent 9bb68c5a
......@@ -23,14 +23,27 @@
height: 200%;
/*background-color: #F6F6F6;*/
}
.mark{
position:fixed;
left:0;
top:0;
opacity:.5;
width:100%;
height:100%;
background:#000;
z-index:998;
pointer-events: none; //不能操作
}
.mui-backdrop {position: fixed;top:251px;right: 10px;bottom: 5px;left: 698px;z-index: 998;background-color: rgba(0,0,0,.3);}
</style>
</head>
<body>
<div id="app">
<div></div>
<div id="app" style=" display:none">
<div class="mui-content">
<div id="left" style=" display: inline-block; width: 30%; ">
......@@ -194,7 +207,7 @@
<tr>
<th style="font-size: 16px;font-weight: normal;background-color: #E2E2E9;">尺码</th>
<th style="font-size: 16px;font-weight: normal;background-color: #E2E2E9;">数量</th>
<th style="font-size: 16px;font-weight: normal;background-color: #E2E2E9;">合格数</th>
<th style="font-size: 16px;font-weight: normal;background-color: #E2E2E9;">完工数</th>
<th style="font-size: 16px;font-weight: normal;background-color: #E2E2E9;">不合格数</th>
</tr>
</thead>
......@@ -255,8 +268,6 @@
</div>
</div>
</div>
</div>
......@@ -269,7 +280,9 @@
<script src="../dest/js/moment.js"></script>
<script type="text/javascript">
mui.plusReady(function() {
// plus.nativeUI.closeWaiting();
plus.nativeUI.showWaiting()
// mui.currentWebview.show();
initPage();
});
......@@ -308,6 +321,7 @@
displayModel:1,
zhezhao :1, //
mask_: mui.createMask(function(e){return false;}),
appdis:0,
},
computed: {
disable_save_button_C: function() {
......@@ -338,12 +352,14 @@
else{
return null
}
}
},
},
methods: {
init: function() {
mui.init();
window.addEventListener('back', function(e) {
var that = this;
......@@ -351,6 +367,13 @@
app.getDataDetail1();
});
setTimeout(function(){
plus.nativeUI.closeWaiting();
var ap = document.getElementById("app");
console.log("app::" + ap.style)
ap.style=" display: inline-block";
},200)
mui('.mui-scroll-wrapper').scroll({
......
......@@ -77,11 +77,11 @@
<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>
<tr :id="'ReportID2_'+item.ReportID" class="Report" v-for=" item in itemsLeft2" @click="selectReport2(item.ReportID)">
<td align="center" style="width: 20%">{{item.Date}}</td>
<td align="center" style="width: 50%">{{item.IndexNo}}</td>
<td align="center" style="width: 15%">{{item.Qty}}</td>
<td align="center" style="width: 15%">{{item.ProcessingType==1?"返修" :"报废"}}</td>
</tbody>
</tr>
</table>
......@@ -130,11 +130,9 @@
<tbody class="mui-table-view-cell">
<tr style=" height: 50px">
<td class="altrowstable" style="background: white;height: 50px; text-align: center;">尺码:</td>
<td class="altrowstable" style=" height: 50px" v-for="itemdef in itemsSizeDef" v-if="itemsSize.length ==0">
<button class="bg" type="button" style="width: 100%;height: 50px" class="mui-btn mui-btn-blue mui-btn-outlined">{{itemdef}}</button>
</td>
<td class="altrowstable" style=" height: 50px" v-for="itemd,isize in itemsSize">
<button class="bg" :style="stylebg(itemd)" style="width: 100%;height: 50px; border:0px ;" type="button" class="mui-btn mui-btn-blue mui-btn-outlined"
<button class="bg" 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>
......@@ -181,8 +179,9 @@
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)">
<button style=" width: 85px;height: 65px; margin-right: -5px;margin-bottom: -1px;font-size: 25px" @click="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">
......@@ -298,6 +297,10 @@
this.type = mui.currentWebview.type;
this.parentSize = mui.currentWebview.parentSize;
// this.sizeNum = mui.currentWebview.sizeNum;
var that = this;
setTimeout(function(e){
that.selectSize(that.parentSize)
},200)
this.getDataInit();
},
getDataInit: function() {
......@@ -643,7 +646,7 @@
}
},
selectReport2: function(obj) {
var op = document.getElementById("ReportID_" + obj)
var op = document.getElementById("ReportID2_" + obj)
this.ReportID = obj;
if (this.ReportID != 0) {
......@@ -744,6 +747,9 @@
return false;
}
else if (this.qty > this.sizeNum[i].Qty - this.sizeNum[i].UnQualifiedQty){
console.log(this.qty)
console.log(this.sizeNum[i].Qty)
console.log(this.sizeNum[i].UnQualifiedQty)
this.qty = 0;
mui.toast("不合格数量不能大于总数,请重新输入")
return false;
......@@ -762,6 +768,7 @@
},
selectNumber: function(n) {
if (this.Model == 1) {
return;
}
......@@ -786,20 +793,7 @@
},
stylebg: function(k) {
if (this.type == 1) {
return
} else if (this.type == 2) {
if (k == this.parentSize) {
this.size = this.parentSize
return {
"background": "#02C1ED"
}
}
}
},
back: function() {
mui.back();
......
......@@ -194,7 +194,7 @@
<tr>
<th style="font-size: 16px;font-weight: normal;background-color: #E2E2E9;">尺码</th>
<th style="font-size: 16px;font-weight: normal;background-color: #E2E2E9;">数量</th>
<th style="font-size: 16px;font-weight: normal;background-color: #E2E2E9;">合格数</th>
<th style="font-size: 16px;font-weight: normal;background-color: #E2E2E9;">完工数</th>
<th style="font-size: 16px;font-weight: normal;background-color: #E2E2E9;">不合格数</th>
</tr>
</thead>
......
......@@ -77,11 +77,11 @@
<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>
<tr :id="'ReportID2_'+item.ReportID" class="Report" v-for=" item in itemsLeft2" @click="selectReport2(item.ReportID)">
<td align="center" style="width: 20% ">{{item.Date}}</td>
<td align="center" style="width: 50% ">{{item.IndexNo}}</td>
<td align="center" style="width: 15% ">{{item.Qty}}</td>
<td align="center" style="width: 15% ">{{item.ProcessingType==1?"返修" :"报废"}}</td>
</tbody>
</tr>
</table>
......@@ -130,11 +130,11 @@
<tbody class="mui-table-view-cell">
<tr style=" height: 50px">
<td class="altrowstable" style="background: white;height: 50px; text-align: center;">尺码:</td>
<td class="altrowstable" style=" height: 50px" v-for="itemdef in itemsSizeDef" v-if="itemsSize.length ==0">
<!-- <td class="altrowstable" style=" height: 50px" v-for="itemdef in itemsSizeDef" v-if="itemsSize.length ==0">
<button class="bg" type="button" style="width: 100%;height: 50px" class="mui-btn mui-btn-blue mui-btn-outlined">{{itemdef}}</button>
</td>
</td> -->
<td class="altrowstable" style=" height: 50px" v-for="itemd,isize in itemsSize">
<button class="bg" :style="stylebg(itemd)" style="width: 100%;height: 50px; border:0px ;" type="button" class="mui-btn mui-btn-blue mui-btn-outlined"
<button class="bg" 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>
......@@ -181,7 +181,7 @@
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)">
<button style=" width: 85px;height: 65px; margin-right: -5px;margin-bottom: -1px;font-size: 25px" @click="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>
......@@ -241,7 +241,7 @@
itemsLeft2: [], //单款实报
itemsSize: [],
SizeQty: [],
itemsSizeDef: [40, 41, 42, 43, 44, 45, 46],
type: 1,
parentSize: 0,
IndexID: 0,
......@@ -257,6 +257,7 @@
}),
ReportType: 2,
sizeNum: [], //尺码与数量
},
computed: {
......@@ -297,11 +298,16 @@
this.itemsSize = mui.currentWebview.itemsSize;
this.type = mui.currentWebview.type;
this.parentSize = mui.currentWebview.parentSize;
this.once_ = mui.currentWebview.itemsSize.length;
// this.sizeNum = mui.currentWebview.sizeNum;
var that = this;
setTimeout(function(e){
that.selectSize(that.parentSize)
},200)
this.getDataInit();
},
getDataInit: function() {
this.getsizeNum()
this.getDataDetail1();
this.getDataDetail2(1);
......@@ -375,7 +381,7 @@
if (n == 1) {
Api.post('/api/vMES/InspectionReport/Report', para, function(e) {
console.log("itemsLeft::" + JSON.stringify(e))
that.itemsLeft = e.items;
});
......@@ -645,7 +651,7 @@
}
},
selectReport2: function(obj) {
var op = document.getElementById("ReportID_" + obj)
var op = document.getElementById("ReportID2_" + obj)
this.ReportID = obj;
if (this.ReportID != 0) {
......@@ -719,6 +725,7 @@
}
},
checkValue: function() {
console.log(this.size)
//数量不正确
if (isNaN(parseInt(this.qty)) || parseInt(this.qty) <= 0) {
mui.toast("数量不正确")
......@@ -747,6 +754,11 @@
return false;
}
else if (this.qty > this.sizeNum[i].Qty - this.sizeNum[i].UnQualifiedQty){
console.log(this.sizeNum[i].SizeName)
console.log(this.size)
console.log(this.qty)
console.log(this.sizeNum[i].Qty)
console.log(this.sizeNum[i].UnQualifiedQty)
this.qty = 0;
mui.toast("不合格数量不能大于总数,请重新输入")
return false;
......@@ -776,6 +788,7 @@
selectSize: function(n) {
var bg = document.getElementsByClassName("bg");
console.log(bg.length )
for (var i = 0; i < bg.length; i++) {
bg[i].style.background = ""
......@@ -786,23 +799,27 @@
}
this.size = n;
console.log("size " +this.size);
},
stylebg: function(k) {
if (this.type == 1) {
return
} else if (this.type == 2) {
if (k == this.parentSize) {
this.size = this.parentSize
return {
"background": "#02C1ED"
}
}
}
},
// stylebg: function(k) {
// if (this.type == 1) {
// console.log(this.size)
// return
// } else if (this.type == 2 ) {
// if (k == this.parentSize) {
//
// this.size = this.parentSize
// console.log(this.size)
// return {
// "background": "#02C1ED"
//
// }
// }
// }
//
// },
back: function() {
mui.back();
......
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<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 rel="stylesheet" type="text/css" href="../dest/css/mui.picker.min.css" />
<style>
.altrowstable {
border-width: 1px;
/*padding: 2px;*/
border-style: solid;
border-color: #a9c6c9;
height: 200%;
/*background-color: #F6F6F6;*/
}
</style>
</head>
<body>
<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;" @click="back"></a>
<label style=" text-align: center; margin-left: 100px; color: white; position: relative;top: 7px;">我的任务 </label>
</div>
<div id="left-2" style="width: 40%">
<div id="left-date" style=" border: solid #B6B6B6 1px; ">
<button class="mui-icon mui-icon-arrowleft mui-btn-outlined ;" style="border: 0px ; color:royalblue; width: 23%;height: 100%; text-align: left; padding-left:0px ;"
@click="nextday(-1)">
</button>
<button class="mui-btn-outlined" style="border: 0 ; padding: 0 0 0 6px; width: 54%;height: 36px; margin-left: -4px"
id="selectdate" data-options='{"type":"date"}' name="shipdate" @click="selecttime()">{{dateTime}}</button>
<button class="mui-icon mui-icon-arrowright mui-btn-outlined " style=" border: 0px;color:royalblue; width: 20%;height: 36px; padding:0px ;
text-align: right;padding-top:0px ;"
@click="nextday(1)">
</button>
</div>
<div id="left-detail" class="mui-scroll-wrapper scroll1" style=" border: solid #DAE6EF 1px ;height: 503px; background: white; display: inline-block; width: 40%; top: 68px;">
<div class="mui-scroll">
<ul class="mui-table-view" style="margin-top: 5px;" v-if="itemsLeft.length == 0">
<li class="mui-table-view-cell">无明细数据.请选择其他日期</li>
</ul>
<ul class="mui-table-view" style="margin-top: 5px;" v-for=" itemsDetail ,n in itemsLeft" @click="nextPage(itemsDetail)">
<li style=" padding: 11px 15px;">
<p style="float: left;width: 16%; color: #060606;"> 指令号: </p>
<p style="float: left;width: 40%; color: #060606;">&nbsp;{{itemsDetail.IndexNo}} </p>
<p style="float: left;width: 12%; color: #060606;">班组: </p>
<p style="float: left;width: 32%; color: #060606;">{{itemsDetail.WorkTeam}} </p>
</li>
<li style=" padding: 11px 15px;">
<p style="float: left;width: 16%; color: #060606;"> 货号: </p>
<p style="float: left;width: 40%; color: #007AFF;">&nbsp;{{itemsDetail.StyleCode}} </p>
<p style="float: left;width: 14%; color: #060606;">数量: </p>
<p style="float: left;width: 28%; color: red;">{{itemsDetail.Qty}} </p>
</li>
<li style=" padding: 11px 15px;">
<p style="float: left;width: 18%; color: #060606;"> 计划时间: </p>
<p style="float: left;width: 30%; color: #060606;">&nbsp;{{itemsDetail.PlanDate}} </p>
<p style="float: left;width: 18%; color: #060606;"> 完成时间: </p>
<p style="float: left;width: 30%; color: #060606;">&nbsp;{{itemsDetail.OrderDeliveryTime}} </p>
</li>
<li class="mui-table-view-cell">
<p style="float: left;width: 18%; color: darkgray;"> 发布时间: </p>
<p style="float: left;width: 40%; color: darkgray;">&nbsp;{{itemsDetail.CreateDate}} </p>
<p style="float: left;width: 14%; color: darkgray;">发布人: </p>
<p style="float: left;width: 28%; color: darkgray;">{{itemsDetail.PlanMan}} </p>
</li>
</ul>
</div>
</div>
</div>
<div id="right " class="mui-pull-right " style=" width: 60%; display: inline-block; position: relative; top: -70px ; ">
<div id="right-1">
<table class="mui-table" style="background: #BBBBBB;">
<tbody class="mui-table-view-cell">
<tr style="height: 31px;">
<td style="text-align: center; width: 40%;">工序</td>
<td style="text-align: center; width: 20%">当前总量</td>
<td style="text-align: center; width: 20%">个人产量</td>
</tr>
</tbody>
</table>
<div id=22 class="mui-scroll-wrapper" style=" margin-top: 35px ;height: 452px;">
<div class="mui-scroll">
<!--这里放置真实显示的DOM内容-->
<!-- <div id="right-2">dfsfsfs</div> -->
<table class="mui-table">
<tbody class="mui-table-view-cell">
<tr v-for="item2 ,m in itemsData2">
<td class="altrowstable" style="text-align: center; width: 40%;">{{item2.IEName}}</td>
<td class="altrowstable" style="text-align: center; width: 20%;">{{item2.TotalQty}}</td>
<td class="altrowstable" style="text-align: center; width: 20%;">
<input type="number" name="" id="" style="margin: 0;text-align: center" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')"
:onchange="changeValue(item2.Qty,m)" v-model="item2.Qty" :value="item2.Qty" />
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- <div id="right-dis " class="mui-pull-right " style="display: none; border: solid red 1px; width: 60%; display: inline-block; position: relative; top: -70px; ">
<div id="right-1">
<ul class="mui-table-view">
<li class="mui-table-view-cell">
<p style="float: left;width: 16%; color: #060606;"> 指令号: </p>
<p style="float: left;width: 40%; color: #060606;">&nbsp;{{itemsDetail.IndexNo}} </p>
<p style="float: left;width: 12%; color: #060606;">班组: </p>
<p style="float: left;width: 32%; color: #060606;">{{itemsDetail.WorkTeam}} </p>
</li>
<li class="mui-table-view-cell">
<p style="float: left;width: 16%; color: #060606;"> 货号: </p>
<p style="float: left;width: 40%;color: #1B83FE;">&nbsp;{{itemsDetail.StyleCode}} </p>
<p style="float: left;width: 12%; color: #060606;">颜色: </p>
<p style="float: left;width: 32%; color: #060606;">{{itemsDetail.ColorName}} </p>
</li>
<li class="mui-table-view-cell">
<p style="float: left;width: 16%; color: #060606;"> 数量: </p>
<p style="float: left;width: 40%; color: red;">&nbsp;{{itemsDetail.Qty}} </p>
</li>
<li class="mui-table-view-cell">
<p style="float: left;width: 16%; color: #060606;"> 不合格数: </p>
<p style="float: left;width: 40%; color: red;">&nbsp;{{itemsDetail.Qty}} </p>
<p style="float: left;width: 12%; color: #060606;">报废数: </p>
<p style="float: left;width: 32%; color: red;">{{itemsDetail.Qty}} </p>
</li>
<li class="mui-table-view-cell">
<p style="float: left;width: 16%; color: #060606;"> 计划时间: </p>
<p style="float: left;width: 40%; color: #060606;">&nbsp;{{itemsDetail.Date}} </p>
<p style="float: left;width: 12%; color: 060606;">实报时间: </p>
<p style="float: left;width: 32%; color: 060606;">{{itemsDetail.Date}} </p>
</li>
<li class="mui-table-view-cell">
<p style="float: left;width: 16%; color: #060606;"> 实报人: </p>
<p style="float: left;width: 40%; color: #060606;">&nbsp;{{itemsDetail.sbr}} </p>
</li>
</ul>
</div>
</div> -->
<div id="right-2" style="position: absolute; bottom: 1px ; right: 1px; ">
<button type="button" class="mui-btn mui-btn-blue " style=" width: 200px; height: 70px;" @click="sop">SOP</button>
<button type="button" class="mui-btn mui-btn-blue " style=" width: 200px; height: 70px;" @click="submit">提交</button>
</div>
</div>
<script src="../dest/js/mui.min.js"></script>
<script src="../dest/js/vue.min.js"></script>
<script src="../dest/js/public.min.js"></script>
<script src="../dest/js/mui.picker.min.js"></script>
<script src="../dest/js/moment.js"></script>
<script type="text/javascript">
mui.plusReady(function() {
initPage();
});
function initPage() {
// plus.screen.lockOrientation("landscape-secondary") //横屏
plus.screen.lockOrientation("landscape-primary") //横屏
app.init();
}
var app = new Vue({
el: '#app',
data: {
displayModel: 1,
dateTime: "2018-10-29",
TotalQty: 0,
itemsLeft: [],
itemsData2: [],
itemsData2_copy: [],
IndexID: 0,
selectDetail: {},
link: "",
},
computed: {
display_: function() {
if (this.displayModel == 1) {
return "display: none "
}
},
},
methods: {
init: function() {
mui.init();
mui('.mui-scroll-wrapper').scroll({
bounce: false,
indicators: true, //是否显示滚动条
});
this.dateTime = moment().format().substring(0, 10)
this.getData();
},
getData: function() {
var that = this;
var para = {
TaskType: 1,
Date: this.dateTime + " 00:00:00",
}
console.log(JSON.stringify(para))
Api.post('/api/vMES/MyTask/TaskList', para, function(e) {
console.log("dd" + JSON.stringify(e))
that.itemsLeft = e.items
})
},
nextday: function(n) {
var d = new Date(this.dateTime);
d.setTime(d.getTime() + 24 * 60 * 60 * 1000 * n);
if (d.getDate().toString().length == 1) {
this.dateTime = d.getFullYear() + "-" + (d.getMonth() + 1) + "-0" + d.getDate();
} else {
this.dateTime = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate();
}
this.getData();
mui('.scroll1').scroll().scrollTo(0, 0, 100);
// mui('.scroll2').scroll().scrollTo(0, 0, 100);
// mui('.scroll3').scroll().scrollTo(0, 0, 100);
// mui('.scroll4').scroll().scrollTo(0, 0, 100);
},
nextPage: function(o) {
var that = this;
this.IndexID = o.IndexID;
this.selectDetail = o;
var para = {
IndexID: o.IndexID
}
console.log("nextpage::" + JSON.stringify(para))
Api.post('/api/vMES/MyTask/Task', para, function(e) {
console.log("nextpageDetail::" + JSON.stringify(e))
that.itemsData2 = e.data.OutputDetail
that.TotalQty = e.data.Main.Qty
for (var i = 0; i < that.itemsData2.length; i++) {
var temp = {
"IEID": 0,
"IEName": "",
"TotalQty": 0,
"Qty": 0,
"OtherQty": 0
}
temp.IEID = that.itemsData2[i].IEID
temp.IEName = that.itemsData2[i].IEName
temp.TotalQty = that.itemsData2[i].TotalQty
temp.Qty = that.itemsData2[i].Qty
temp.OtherQty = that.itemsData2[i].TotalQty - that.itemsData2[i].Qty
that.itemsData2_copy.push(temp);
}
})
},
sop: function() {
this.getLink();
},
getLink: function() {
var that = this;
var para = {
ReportType: 0,
StyleCode: this.selectDetail.StyleCode
}
Api.post('/api/vMES/Sop/StyleSop', para, function(e) {
if (e.success) {
that.link = e.data.Url;
var url_ = "sop.html";
var id_ = "sop.html";
mui.openWindow({
url: url_,
id: id_,
extras: {
style: that.selectDetail.StyleCode,
ReportType: 0,
link: that.link,
parentPage: "MyWork.html"
},
});
} else {
mui.toast("获取sop地址失败: " + e.message)
}
}, function(b, bb, bbb) {
mui.toast(JSON.stringify(bbb.message))
});
},
selecttime: function() {
var that = this;
var _self = document.getElementById("selectdate")
if (_self.picker) {
_self.picker.show(function(rs) {
_self.innerText = rs.text
_self.picker.dispose();
_self.picker = null;
});
} else {
var optionsJson = _self.getAttribute('data-options') || '{}';
var options = JSON.parse(optionsJson);
var id = _self.getAttribute('id');
/*
* 首次显示时实例化组件
* 示例为了简洁,将 options 放在了按钮的 dom 上
* 也可以直接通过代码声明 optinos 用于实例化 DtPicker
*/
_self.picker = new mui.DtPicker(options);
_self.picker.show(function(rs) {
/*
* rs.value 拼合后的 value
* rs.text 拼合后的 text
* rs.y 年,可以通过 rs.y.vaue 和 rs.y.text 获取值和文本
* rs.m 月,用法同年
* rs.d 日,用法同年
* rs.h 时,用法同年
* rs.i 分(minutes 的第二个字母),用法同年
*/
_self.innerText = rs.text;
that.dateTime = rs.text;
that.getData();
/*
* 返回 false 可以阻止选择框的关闭
* return false;
*/
/*
* 释放组件资源,释放后将将不能再操作组件
* 通常情况下,不需要示放组件,new DtPicker(options) 后,可以一直使用。
* 当前示例,因为内容较多,如不进行资原释放,在某些设备上会较慢。
* 所以每次用完便立即调用 dispose 进行释放,下次用时再创建新实例。
*/
_self.picker.dispose();
_self.picker = null;
});
}
mui('.scroll1').scroll().scrollTo(0, 0, 100);
// mui('.scroll2').scroll().scrollTo(0, 0, 100);
// mui('.scroll3').scroll().scrollTo(0, 0, 100);
// mui('.scroll4').scroll().scrollTo(0, 0, 100);
}, //selecttime
changeValue: function(n, k) {
if (isNaN(parseInt(n))) {
this.itemsData2[k].Qty = 0;
}
if (parseInt(n) > 0) {
this.itemsData2[k].Qty = parseInt(n);
var otherQty = this.itemsData2_copy[k].OtherQty
if (this.TotalQty - otherQty < parseInt(n)) {
mui.toast("最多只能输入" + (this.TotalQty - otherQty))
this.itemsData2[k].Qty = this.TotalQty - otherQty
}
}
},
selectPerson: function() {
},
submit: function() {
var that = this;
var Items = []
for (var i = 0; i < this.itemsData2.length; i++) {
var itemsdd = {
"IEID": 0,
"Qty": 0
};
itemsdd.IEID = this.itemsData2[i].IEID
itemsdd.Qty = this.itemsData2[i].Qty
Items.push(itemsdd);
}
var para = {
IndexID: this.IndexID,
Items: Items,
}
Api.post('/api/vMES/MyTask/Save', para, function(e) {
if (e.success) {
mui.toast("提交成功");
that.nextPage(that.selectDetail);
} else {
mui.toast("提交失败: " + e.message);
}
}, function(b, bb, bbb) {
mui.toast(JSON.stringify(bbb.message))
})
},
back: function() {
},
},
})
</script>
</body>
</html>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<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>
<body>
<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;" @click="back"></a>
<label style=" text-align: center; margin-left: 100px; color: white;">车间交接 </label>
</div>
<div id="left-2" style="width: 40%">
<div class="mui-segmented-control" style="">
<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 id="item1" class="mui-scroll-wrapper scroll1" style=" border: solid #DAE6EF 1px ;height: 503px; background: white; display: inline-block; width: 40%; top: 72px;">
<div class="mui-scroll">
<ul :id="items.IndexID" class="mui-table-view bg" v-for=" items,n in itemsLeft" @click="selectLeft(items)">
<li style=" padding: 11px 15px;">
<p style="float: left;width: 16%; color: #060606;"> 指令号: </p>
<p style="float: left;width: 40%; color: #060606;">&nbsp;{{items.IndexNo}} </p>
<p style="float: left;width: 12%; color: #060606;">班组: </p>
<p style="float: left;width: 32%; color: #060606;">{{items.WorkTeam}} </p>
</li>
<li style=" padding: 11px 15px;">
<p style="float: left;width: 16%; color: #060606;"> 货号: </p>
<p style="float: left;width: 40%;color: #1B83FE;">&nbsp;{{items.StyleCode}} </p>
<p style="float: left;width: 12%; color: #060606;">数量: </p>
<p style="float: left;width: 32%; color: red;">{{items.Qty}} </p>
</li>
<li style=" padding: 11px 15px;">
<p style="float: left;width: 20%; color: #060606;"> 计划时间: </p>
<p style="float: left;width: 80%; color: #060606;">&nbsp;{{items.PlanDate}} </p>
</li>
<li class="mui-table-view-cell" style=" padding: 0px 15px 11px 15px;">
<p style="float: left;width: 20%; color: 060606;"> 时报时间: </p>
<p style="float: left;width: 35%; color: 060606;">&nbsp;{{items.ReportDate}} </p>
<p style="float: left;width: 16%; color: 060606;">实报人: </p>
<p style="float: left;width: 28%; color: 060606;">{{items.ReportUser}} </p>
</li>
</ul>
</div>
</div>
<div id="item2" class="mui-scroll-wrapper scroll2" :style="display_" style=" border: solid #DAE6EF 1px ;height: 503px; background: white; display: inline-block; width: 40%; top: 72px;">
<div class="mui-scroll">
<ul :id="items.IndexID" class="mui-table-view bg" v-for=" items,n in itemsLeft2" @click="selectLeft(items)">
<li style=" padding: 11px 15px;">
<p style="float: left;width: 16%; color: #060606;"> 指令号: </p>
<p style="float: left;width: 40%; color: #060606;">&nbsp;{{items.IndexNo}} </p>
<p style="float: left;width: 12%; color: #060606;">班组: </p>
<p style="float: left;width: 32%; color: #060606;">{{items.WorkTeam}} </p>
</li>
<li style=" padding: 11px 15px;">
<p style="float: left;width: 16%; color: #060606;"> 货号: </p>
<p style="float: left;width: 40%;color: #1B83FE;">&nbsp;{{items.StyleCode}} </p>
<p style="float: left;width: 12%; color: #060606;">数量: </p>
<p style="float: left;width: 32%; color: red;">{{items.Qty}} </p>
</li>
<li style=" padding: 11px 15px;">
<p style="float: left;width: 20%; color: #060606;"> 计划时间: </p>
<p style="float: left;width: 80%; color: #060606;">&nbsp;{{items.PlanDate}} </p>
</li>
<li class="mui-table-view-cell" style=" padding: 0px 15px 11px 15px;">
<p style="float: left;width: 20%; color: 060606;"> 时报时间: </p>
<p style="float: left;width: 35%; color: 060606;">&nbsp;{{items.ReportDate}} </p>
<p style="float: left;width: 16%; color: 060606;">实报人: </p>
<p style="float: left;width: 28%; color: 060606;">{{items.ReportUser}} </p>
</li>
</ul>
</div>
</div>
</div>
<div id="right " class="mui-pull-right " style=" width: 60%; display: inline-block; position: relative; top: -70px ; ">
<div id="right-1">
<ul class="mui-table-view">
<li class="mui-table-view-cell">
<p style="float: left;width: 16%; color: #060606;"> 指令号: </p>
<p style="float: left;width: 40%; color: #060606;">&nbsp;{{itemsDetail.IndexNo}} </p>
<p style="float: left;width: 12%; color: #060606;">班组: </p>
<p style="float: left;width: 32%; color: #060606;">{{itemsDetail.WorkTeam}} </p>
</li>
<li class="mui-table-view-cell">
<p style="float: left;width: 16%; color: #060606;"> 货号: </p>
<p style="float: left;width: 40%;color: #1B83FE;">&nbsp;{{itemsDetail.StyleCode}} </p>
<p style="float: left;width: 12%; color: #060606;">颜色: </p>
<p style="float: left;width: 32%; color: #060606;">{{itemsDetail.ColorName}} </p>
</li>
<li class="mui-table-view-cell">
<p style="float: left;width: 16%; color: #060606;"> 数量: </p>
<p style="float: left;width: 40%; color: red;">&nbsp;{{itemsDetail.FinishQty}} </p>
</li>
<li class="mui-table-view-cell">
<p style="float: left;width: 16%; color: #060606;"> 不合格数: </p>
<p style="float: left;width: 40%; color: red;">&nbsp;{{itemsDetail.UnQualifiedQty}} </p>
<p style="float: left;width: 12%; color: #060606;">报废数: </p>
<p style="float: left;width: 32%; color: red;">{{itemsDetail.ScrapQty}} </p>
</li>
<li class="mui-table-view-cell">
<p style="float: left;width: 16%; color: #060606;"> 计划时间: </p>
<p style="float: left;width: 40%; color: #060606;">&nbsp;{{itemsDetail.PlanDate}} </p>
<p style="float: left;width: 12%; color: 060606;">实报时间: </p>
<p style="float: left;width: 32%; color: 060606;">{{itemsDetail.ReportDate}} </p>
</li>
<li class="mui-table-view-cell">
<p style="float: left;width: 16%; color: #060606;"> 实报人: </p>
<p style="float: left;width: 40%; color: #060606;">&nbsp;{{itemsDetail.ReportUser}} </p>
</li>
</ul>
</div>
</div>
<div id="right-2" style="position: absolute; bottom: 1px ; right: 1px; ">
<button type="button" class="mui-btn mui-btn-blue " :disabled="sty1" style=" width: 200px; height: 70px;" @click="selectPerson">人员排班</button>
<button type="button" class="mui-btn mui-btn-blue " :disabled="sty1" style=" width: 200px; height: 70px;" @click="submit">{{submitText}}</button>
</div>
</div>
<script src="../dest/js/mui.min.js"></script>
<script src="../dest/js/vue.min.js"></script>
<script src="../dest/js/public.min.js"></script>
<script type="text/javascript">
mui.plusReady(function() {
initPage();
});
function initPage() {
// plus.screen.lockOrientation("landscape-secondary") //横屏
plus.screen.lockOrientation("landscape-primary") //横屏
app.init();
}
var app = new Vue({
el: '#app',
data: {
displayModel: 1,
IndexID: 0,
itemsLeft: [],
itemsLeft2: [],
itemsDetail: {},
submitModel: 0,
submitText: "确认接收",
nextDetail:{},
},
computed: {
display_: function() {
if (this.displayModel == 1) {
return "display: none "
}
},
sty1: function() {
if (this.IndexID == 0) {
return "disabled"
} else {
return null
}
}
},
methods: {
init: function() {
mui.init();
mui('.mui-scroll-wrapper').scroll({
bounce: false,
indicators: true, //是否显示滚动条
});
this.getData(0)
},
getData: function(n) {
var that = this;
var para = {
ReportType: 1,
State: n,
}
console.log(JSON.stringify(para))
Api.post('/api/vMES/Handover/List', para, function(e) {
console.log("List::" + JSON.stringify(e))
if (n == 0) {
that.itemsLeft = e.items
} else {
that.itemsLeft2 = e.items
}
}, function(b, bb, bbb) {
mui.toast(JSON.stringify(bbb.message))
})
},
selectPerson:function(){
var that = this;
mui.openWindow({
url: 'NeedlecarPBB.html',
id: 'NeedlecarPBB.html',
extras: {
nextDetail :that.nextDetail
}
});
},
selectLeftBack: function(k) {
var bgs = document.getElementsByClassName("bg");
var bf = document.getElementById(k);
for (var i = 0; i < bgs.length; i++) {
bgs[i].style.background = ""
}
if(k!=0){
bf.style.background = "#1DAAEC";
}
},
selectLeft: function(obj) {
this.selectLeftBack(obj.IndexID);
this.IndexID = obj.IndexID;
this.nextDetail = obj;
var that = this;
var para = {
ReportType: 1,
IndexID: this.IndexID,
}
Api.post('/api/vMES/Handover/Index', para, function(e) {
console.log("Index::" + JSON.stringify(e))
if (e.success) {
that.itemsDetail = e.items[0];
}
}, function(b, bb, bbb) {
mui.toast(JSON.stringify(bbb.message))
})
},
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"
this.submitModel = 0;
this.submitText = "确认接收";
this.getData(0)
}
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"
this.submitModel = 1;
this.submitText = "撤回接收";
this.getData(1)
}
},
submit: function() {
var that = this;
var para = {
IndexID: this.IndexID,
}
console.log(JSON.stringify(para))
var html = '/api/vMES/Handover/Receive';
if (this.submitModel == 1) {
html = '/api/vMES/Handover/UnReceive';
}
Api.post(html, para, function(e) {
if (e.success) {
mui.toast("操作成功");
that.selectLeftBack(0);
that.IndexID = 0;
that.nextDetail ={};
that.itemsDetail =[];
that.getData(0);
that.getData(1);
} else {
mui.toast("操作失败: " + e.message);
}
}, function(b, bb, bbb) {
mui.toast("操作失败" + JSON.stringify(bbb.message))
})
},
back: function() {
},
},
})
</script>
</body>
</html>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<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 rel="stylesheet" type="text/css" href="../dest/css/mui.picker.min.css" />
<link rel="stylesheet" type="text/css" href="../dest/css/icons-extra.css" />
<style>
.altrowstable {
border-width: 1px;
/*padding: 2px;*/
border-style: solid;
border-color: #a9c6c9;
height: 200%;
/*background-color: #F6F6F6;*/
}
</style>
</head>
<body>
<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;" @click="back"></a>
<label style=" text-align: center; margin-left: 100px; color: white; position: relative;top: 7px;">针车排班表 </label>
</div>
<div id="left-2" style="width: 40%">
<div id="left-date" style=" border: solid #B6B6B6 1px; ">
<button class="mui-icon mui-icon-arrowleft mui-btn-outlined ;" style="border: 0px ; color:royalblue; width: 23%;height: 100%; text-align: left; padding-left:0px ;"
@click="nextday(-1)">
</button>
<button class="mui-btn-outlined" style="border: 0 ; padding: 0 0 0 6px; width: 54%;height: 36px; margin-left: -4px"
id="selectdate" data-options='{"type":"date"}' name="shipdate" @click="selecttime()">{{dateTime}}</button>
<button class="mui-icon mui-icon-arrowright mui-btn-outlined " style=" border: 0px;color:royalblue; width: 20%;height: 36px; padding:0px ;
text-align: right;padding-top:0px ;"
@click="nextday(1)">
</button>
</div>
<div id="left-detail" class="mui-scroll-wrapper scroll1" style=" border: solid #DAE6EF 1px ;height: 503px; background: white; display: inline-block; width: 40%; top: 68px;">
<div class="mui-scroll">
<ul class="mui-table-view" style="margin-top: 5px;" v-if="itemsLeft.length == 0">
<li class="mui-table-view-cell">无明细数据.请选择其他日期</li>
</ul>
<ul :id="itemsDetail.IndexID" class="mui-table-view detail_" style="margin-top: 5px;" v-for=" itemsDetail ,n in itemsLeft"
@click="nextPage(itemsDetail,1)">
<li style=" padding: 11px 15px;">
<p style="float: left;width: 16%; color: #060606;"> 指令号: </p>
<p style="float: left;width: 40%; color: #060606;">&nbsp;{{itemsDetail.IndexNo}} </p>
<p style="float: left;width: 12%; color: #060606;">班组: </p>
<p style="float: left;width: 32%; color: #060606;">{{itemsDetail.WorkTeam}} </p>
</li>
<li style=" padding: 11px 15px;">
<p style="float: left;width: 16%; color: #060606;"> 货号: </p>
<p style="float: left;width: 40%; color: #007AFF;">&nbsp;{{itemsDetail.StyleCode}} </p>
<p style="float: left;width: 14%; color: #060606;">数量: </p>
<p style="float: left;width: 28%; color: red;">{{itemsDetail.Qty}} </p>
</li>
<li style=" padding: 11px 15px;">
<p style="float: left;width: 18%; color: #060606;"> 计划时间: </p>
<p style="float: left;width: 30%; color: #060606;">&nbsp;{{itemsDetail.PlanDate}} </p>
<p style="float: left;width: 18%; color: #060606;"> 完成时间: </p>
<p style="float: left;width: 30%; color: #060606;">&nbsp;{{itemsDetail.OrderDeliveryTime}} </p>
</li>
<li class="mui-table-view-cell" style=" padding: 0px 15px 11px 15px;">
<p style="float: left;width: 18%; color: darkgray;"> 发布时间: </p>
<p style="float: left;width: 40%; color: darkgray;">&nbsp;{{itemsDetail.CreateDate}} </p>
<p style="float: left;width: 14%; color: darkgray;">发布人: </p>
<p style="float: left;width: 28%; color: darkgray;">{{itemsDetail.PlanMan}} </p>
</li>
</ul>
</div>
</div>
</div>
<div id="right " class="mui-pull-right " style=" width: 60%; display: inline-block; position: relative; top: -70px ; ">
<div id="right-1" :style="sty2">
<table class="mui-table" style="background: #C8C7CC;">
<tbody class="mui-table-view-cell">
<tr>
<td style="text-align: center; width: 25%;">
<div class="mui-input-row mui-checkbox mui-left" @click="selectAll">
<label style="padding:11px 0px 11px 40px ;">全选</label>
<input id="cheAll" name="checkbox1" type="checkbox">
</div>
</td>
<td style="text-align: center; width: 35%;">工序</td>
<td style="text-align: center; width: 15%;">数量</td>
<td style="text-align: center; width: 25%;">人员</td>
</tr>
</tbody>
</table>
<div class="mui-scroll-wrapper" style=" margin-top: 40px ; height: 450px;">
<div class="mui-scroll">
<!--这里放置真实显示的DOM内容-->
<table class="mui-table">
<tbody class="mui-table-view-cell">
<tr v-for="item2 ,m in itemsData2">
<td class="altrowstable" style="text-align: center; width: 20%;">
<div class="mui-input-row mui-checkbox mui-left">
<label>&nbsp;</label>
<input :id="item2.IEID" class="che" name="checkbox1" type="checkbox" @click="selectCheck()">
</div>
</td>
<td class="altrowstable" style="text-align: center; width: 40%;">{{item2.IEName}}</td>
<td class="altrowstable" style="text-align: center; width: 15%;">{{item2.TotalQty}}</td>
<td class="altrowstable" style="text-align: center; width: 25%;">
<a @click="selectPerson(item2)" v-if="item2.Workers.length == 0">
<span class="mui-icon-extra mui-icon-extra-addpeople"></span>
</a>
<a @click="selectPerson(item2)" v-else>
<label v-for="k in item2.Workers"> {{k.UserName}}:{{k.Qty}}</label>
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div id="right-dis " class="mui-pull-right " :style="sty1" style=" width: 60%; position: relative; top: -70px; ">
<table class="mui-table">
<tbody class="mui-table-view-cell">
<tr style="height: 40px; ">
<td style="text-align: center; border-bottom:1px solid #BBB; width: 300px;">
姓名
</td>
<td style="text-align: center; border-bottom:1px solid #BBB;">
数量
</td>
</tr>
</tbody>
</table>
<div class="mui-scroll-wrapper" style="top: 40px; width: 100%; height: 450px;">
<div class="mui-scroll">
<!--这里放置真实显示的DOM内容-->
<div id='list' >
<table class="mui-table">
<tbody class="mui-table-view-cell">
<tr v-for="item ,m in PersonList" >
<td style="text-align: center; border-bottom:1px solid #BBB; width: 300px;" @click ="selectChe(item)">
<div class="mui-input-row mui-checkbox mui-left">
<label>{{item.UserName}}</label>
<input :id="item.UserID" class="che" name="checkbox1" type="checkbox" >
</div>
</td>
<td :id="'num_' + item.UserID " style="text-align: center; border-bottom:1px solid #BBB;">0</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div id="right-2" style="position: absolute; bottom: 1px ; right: 1px; ">
<button type="button" class="mui-btn mui-btn-blue " style=" width: 150px; height: 70px;" @click="sop">SOP</button>
<button type="button" class="mui-btn mui-btn-blue " :disabled="selectPL" style="width:150px;height: 70px; " @click="selectPersonAll">批量选员</button>
<button id="submit" type="button" class="mui-btn mui-btn-blue " style=" width: 150px; height: 70px;" @click="submit">提交</button>
</div>
</div>
<script src="../dest/js/mui.min.js"></script>
<script src="../dest/js/vue.min.js"></script>
<script src="../dest/js/public.min.js"></script>
<script src="../dest/js/mui.picker.min.js"></script>
<script src="../dest/js/moment.js"></script>
<script type="text/javascript">
mui.plusReady(function() {
initPage();
});
function initPage() {
// plus.screen.lockOrientation("landscape-secondary") //横屏
plus.screen.lockOrientation("landscape-primary") //横屏
app.init();
}
var app = new Vue({
el: '#app',
data: {
displayModel: 1,
dateTime: "2018-10-29",
TotalQty: 0,
itemsLeft: [],
itemsData2: [],
itemsData2_copy: [],
IndexID: 0,
selectDetail: {},
link: "",
WorkTeamID: 0,
selectList: [],
selectList2:[],
selectif_PL: 0,
PersonList:[],
sty1:"display: none",
sty2:"",
Workers:[],
finishDis:0,
},
computed: {
display_: function() {
if (this.displayModel == 1) {
return "display: none "
}
},
selectPL: function() {
if (this.selectif_PL == 0) {
return "disabled"
} else {
return null
}
},
},
methods: {
init: function() {
mui.init();
mui('.mui-scroll-wrapper').scroll({
bounce: false,
indicators: true, //是否显示滚动条
});
this.dateTime = moment().format().substring(0, 10);
this.selectDetail = mui.currentWebview.nextDetail;
console.log(this.selectDetail);
if(this.selectDetail === undefined){
this.getData();
}
else{
var that =this;
this.itemsLeft =[];
this.itemsLeft.push(this.selectDetail );
setTimeout(function(){
that.nextPage(that.itemsLeft[0],1)
},100)
}
},
getData: function() {
var that = this;
var para = {
TaskType: 1,
Date: this.dateTime + " 00:00:00",
}
console.log(JSON.stringify(para))
Api.post('/api/vMES/TaskWork/TaskList', para, function(e) {
console.log("dd" + JSON.stringify(e))
that.itemsLeft = e.items
if(e.items.length > 0){
setTimeout(function(){
that.nextPage(e.items[0],1)
},100)
}
})
},
nextday: function(n) {
var d = new Date(this.dateTime);
d.setTime(d.getTime() + 24 * 60 * 60 * 1000 * n);
if (d.getDate().toString().length == 1) {
this.dateTime = d.getFullYear() + "-" + (d.getMonth() + 1) + "-0" + d.getDate();
} else {
this.dateTime = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate();
}
this.getData();
mui('.scroll1').scroll().scrollTo(0, 0, 100);
// mui('.scroll2').scroll().scrollTo(0, 0, 100);
// mui('.scroll3').scroll().scrollTo(0, 0, 100);
// mui('.scroll4').scroll().scrollTo(0, 0, 100);
},
selectLeftDetail: function(k) {
var bgs = document.getElementsByClassName("detail_");
var bf = document.getElementById(k);
for (var i = 0; i < bgs.length; i++) {
bgs[i].style.background = ""
}
bf.style.background = "#1DAAEC";
},
getdataUser: function(o) {
var para={};
if (o === undefined){
para = {
WorkSectionID: 0,
WorkTeamID: this.WorkTeamID,
IndexID : this.IndexID
};
}
else{
para = {
WorkSectionID: o.IEID,
WorkTeamID: this.WorkTeamID,
IndexID : o.IndexID
};
}
var that = this;
console.log("para" + JSON.stringify(para));
Api.post('/api/vMES/TaskWork/TaskWorker', para, function(e) {
if (e.success) {
that.PersonList = e.items;
setTimeout(function(){
that.initWork()
},100)
}
}, function(b, bb, bbb) {
mui.toast(JSON.stringify(bbb.message))
});
},
nextPage: function(o,kk) {
console.log("nextPage" + JSON.stringify(o));
this.sty1 ="display: none";
this.sty2 ="";
var sub = document.getElementById("submit")
sub.innerHTML = "提交"
if(kk==1){
this.selectLeftDetail(o.IndexID);
}
var that = this;
this.IndexID = o.IndexID;
this.selectDetail = o;
var para = {
IndexID: o.IndexID
}
console.log("nextpage::" + JSON.stringify(para))
Api.post('/api/vMES/TaskWork/Task', para, function(e) {
console.log("itemsData2::" + JSON.stringify(e.data.IETask))
that.WorkTeamID = e.data.Main.WorkTeamID;
// that.itemsLeft.push(e.data.Main )
that.itemsData2 = e.data.IETask;
that.TotalQty = e.data.Main.Qty;
})
},
initWork:function(){
var che = document.getElementsByClassName("che");
console.log("Workers" + JSON.stringify(this.Workers) )
for (var j = 0; j < che.length; j++) {
che[j].checked = false;
}
if(this.Workers.length >0){
for (var i = 0; i < this.Workers.length; i++) {
for (var j = 0; j < che.length; j++) {
if (che[j].id == this.Workers[i].UserID ){
var xx = document.getElementById("num_" + this.Workers[i].UserID)
xx.innerText = this.Workers[i].Qty
this.finishDis =1;
che[j].checked = true;
}
}
}
}
},
selectPerson: function(obj) {
this.selectList = [];
this.selectList.push(obj.IEID)
this.sty1 = "";
this.sty2 ="display: none";
this.Workers = obj.Workers;
var sub = document.getElementById("submit")
sub.innerHTML = "保存"
this.getdataUser(obj)
// mui.openWindow({
// url: 'person_selectlist_PPB.html',
// id: 'person_selectlist_PPB.html',
//
// extras: {
// WorkSectionID: 1,
// WorkTeamID: that.WorkTeamID,
// Workers: obj.Workers,
// IndexID: that.IndexID
// }
// });
},
selectPersonAll: function() {
this.selectCheck()
this.sty1 = "";
this.sty2 ="display: none";
this.Workers = [];
var sub = document.getElementById("submit")
sub.innerHTML = "保存"
this.getdataUser()
},
selectAll: function() {
var che = document.getElementsByClassName("che");
var cheAll = document.getElementById("cheAll");
for (var i = 0; i < che.length; i++) {
che[i].checked = cheAll.checked
}
this.selectCheck();
},
selectCheck: function() {
this.selectList = [];
var che = document.getElementsByClassName("che");
var bol = true;
for (var i = 0; i < che.length; i++) {
if (che[i].checked) {
bol = false;
this.selectif_PL = 1;
this.selectList.push(che[i].id)
}
}
if (bol) {
this.selectif_PL = 0;
}
},
selectChe:function(obj){
var che = document.getElementsByClassName("che");
this.selectList2 =[];
for (var i = 0; i < che.length; i++) {
if(che[i].checked )
{
this.selectList2.push(che[i].id)
this.finishDis = 1;
}
}
},
submit_person: function() {
var tempPara =[];
console.log(JSON.stringify(this.selectList2));
if(this.selectList2.length >0){
for (var i = 0; i < this.selectList.length; i++) {
for (var j = 0; j < this.selectList2.length; j++) {
var temp = {IEID: 0,UserID: 0};
temp.IEID = this.selectList[i];
temp.UserID = this.selectList2[j];
tempPara.push(temp);
}
}
}
if(tempPara.length ==0){
mui.toast("请选择派工人员");
return;
}
var that = this;
var para = {
IndexID: this.IndexID,
Items: tempPara,
}
Api.post('/api/vMES/TaskWork/Save', para, function(e) {
if (e.success) {
mui.toast("保存成功");
var sub = document.getElementById("submit")
sub.innerHTML = "提交"
that.nextPage(that.selectDetail ,1);
} else {
mui.toast("保存失败: " + e.message);
}
}, function(b, bb, bbb) {
mui.toast(JSON.stringify(bbb.message))
})
},
sop: function() {
console.log("sop");
this.getLink();
},
getLink: function() {
console.log("sop");
var that = this;
var para = {
ReportType: 0,
StyleCode: this.selectDetail.StyleCode
}
Api.post('/api/vMES/Sop/StyleSop', para, function(e) {
if (e.success) {
that.link = e.data.Url;
var url_ = "sop.html";
var id_ = "sop.html";
mui.openWindow({
url: url_,
id: id_,
extras: {
style: that.selectDetail.StyleCode,
ReportType: 0,
link: that.link,
parentPage: "NeedlacarPBB.html"
},
});
} else {
mui.toast("获取sop地址失败: " + e.message)
}
}, function(b, bb, bbb) {
mui.toast(JSON.stringify(bbb.message))
});
},
selecttime: function() {
var that = this;
var _self = document.getElementById("selectdate")
if (_self.picker) {
_self.picker.show(function(rs) {
_self.innerText = rs.text
_self.picker.dispose();
_self.picker = null;
});
} else {
var optionsJson = _self.getAttribute('data-options') || '{}';
var options = JSON.parse(optionsJson);
var id = _self.getAttribute('id');
/*
* 首次显示时实例化组件
* 示例为了简洁,将 options 放在了按钮的 dom 上
* 也可以直接通过代码声明 optinos 用于实例化 DtPicker
*/
_self.picker = new mui.DtPicker(options);
_self.picker.show(function(rs) {
/*
* rs.value 拼合后的 value
* rs.text 拼合后的 text
* rs.y 年,可以通过 rs.y.vaue 和 rs.y.text 获取值和文本
* rs.m 月,用法同年
* rs.d 日,用法同年
* rs.h 时,用法同年
* rs.i 分(minutes 的第二个字母),用法同年
*/
_self.innerText = rs.text;
that.dateTime = rs.text;
that.getData();
/*
* 返回 false 可以阻止选择框的关闭
* return false;
*/
/*
* 释放组件资源,释放后将将不能再操作组件
* 通常情况下,不需要示放组件,new DtPicker(options) 后,可以一直使用。
* 当前示例,因为内容较多,如不进行资原释放,在某些设备上会较慢。
* 所以每次用完便立即调用 dispose 进行释放,下次用时再创建新实例。
*/
_self.picker.dispose();
_self.picker = null;
});
}
mui('.scroll1').scroll().scrollTo(0, 0, 100);
// mui('.scroll2').scroll().scrollTo(0, 0, 100);
// mui('.scroll3').scroll().scrollTo(0, 0, 100);
// mui('.scroll4').scroll().scrollTo(0, 0, 100);
}, //selecttime
changeValue: function(n, k) {
if (isNaN(parseInt(n))) {
this.itemsData2[k].Qty = 0;
}
if (parseInt(n) > 0) {
this.itemsData2[k].Qty = parseInt(n);
var otherQty = this.itemsData2_copy[k].OtherQty
if (this.TotalQty - otherQty < parseInt(n)) {
mui.toast("最多只能输入" + (this.TotalQty - otherQty))
this.itemsData2[k].Qty = this.TotalQty - otherQty
}
}
},
submit: function() {
var sub = document.getElementById("submit")
if(sub.innerHTML == "保存") {
this.submit_person();
}
else{
var that = this;
var para = {
IndexID: this.IndexID,
}
Api.post('/api/vMES/TaskWork/Submit', para, function(e) {
if (e.success) {
mui.toast("提交成功");
} else {
mui.toast("提交失败: " + e.message);
}
}, function(b, bb, bbb) {
mui.toast(JSON.stringify(bbb.message))
})
}
},
back: function() {
},
},
})
</script>
</body>
</html>
......@@ -77,11 +77,11 @@
<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>
<tr :id="'ReportID2_'+item.ReportID" class="Report" v-for=" item in itemsLeft2" @click="selectReport2(item.ReportID)">
<td align="center" style="width: 20% ">{{item.Date}}</td>
<td align="center" style="width: 50% ">{{item.IndexNo}}</td>
<td align="center" style="width: 15% ">{{item.Qty}}</td>
<td align="center" style="width: 15% ">{{item.ProcessingType==1?"返修" :"报废"}}</td>
</tbody>
</tr>
</table>
......@@ -130,11 +130,9 @@
<tbody class="mui-table-view-cell">
<tr style=" height: 50px">
<td class="altrowstable" style="background: white;height: 50px; text-align: center;">尺码:</td>
<td class="altrowstable" style=" height: 50px" v-for="itemdef in itemsSizeDef" v-if="itemsSize.length ==0">
<button class="bg" type="button" style="width: 100%;height: 50px" class="mui-btn mui-btn-blue mui-btn-outlined">{{itemdef}}</button>
</td>
<td class="altrowstable" style=" height: 50px" v-for="itemd,isize in itemsSize">
<button class="bg" :style="stylebg(itemd)" style="width: 100%;height: 50px; border:0px ;" type="button" class="mui-btn mui-btn-blue mui-btn-outlined"
<button class="bg" 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>
......@@ -181,7 +179,7 @@
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)">
<button style=" width: 85px;height: 65px; margin-right: -5px;margin-bottom: -1px;font-size: 25px" @click="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>
......@@ -298,6 +296,10 @@
this.type = mui.currentWebview.type;
this.parentSize = mui.currentWebview.parentSize;
// this.sizeNum = mui.currentWebview.sizeNum;
var that = this;
setTimeout(function(e){
that.selectSize(that.parentSize)
},200)
this.getDataInit();
},
getDataInit: function() {
......@@ -642,7 +644,7 @@
}
},
selectReport2: function(obj) {
var op = document.getElementById("ReportID_" + obj)
var op = document.getElementById("ReportID2_" + obj)
this.ReportID = obj;
if (this.ReportID != 0) {
......@@ -786,20 +788,7 @@
},
stylebg: function(k) {
if (this.type == 1) {
return
} else if (this.type == 2) {
if (k == this.parentSize) {
this.size = this.parentSize
return {
"background": "#02C1ED"
}
}
}
},
back: function() {
mui.back();
......
......@@ -194,7 +194,7 @@
<tr>
<th style="font-size: 16px;font-weight: normal;background-color: #E2E2E9;">尺码</th>
<th style="font-size: 16px;font-weight: normal;background-color: #E2E2E9;">数量</th>
<th style="font-size: 16px;font-weight: normal;background-color: #E2E2E9;">合格数</th>
<th style="font-size: 16px;font-weight: normal;background-color: #E2E2E9;">完工数</th>
<th style="font-size: 16px;font-weight: normal;background-color: #E2E2E9;">不合格数</th>
</tr>
</thead>
......
......@@ -32,7 +32,7 @@
}
.application-tit {
overflow: hidden;
/* overflow: hidden; */
white-space: nowrap;
text-overflow: ellipsis;
font-weight: 400;
......@@ -55,28 +55,51 @@
<div class="application" id="lialist">
<div class="application-box" types="针车实报" >
<a ids="0" href="javascript:;">
<div class="application-img" ><img src="../dest/img/application/zcsb.png" alt="针车实报" /></div>
<h3 class="application-tit" title="针车实报">针车实报</h3>
</a>
</div>
<div class="application-box" types="裁断实报">
<a ids="1" href="javascript:;">
<div class="application-img"><img src="../dest/img/application/zcsb.png" alt="裁断实报" /></div>
<h3 class="application-tit" title="裁断实报">裁断实报</h3>
</a>
</div>
<div class="application-box" types="针车实报" >
<a ids="0" href="javascript:;">
<div class="application-img" ><img src="../dest/img/application/zcsb.png" alt="针车实报" /></div>
<h3 class="application-tit" title="针车实报">针车实报</h3>
</a>
</div>
<div class="application-box" types="成型实报">
<a ids="2" href="javascript:;">
<div class="application-img"><img src="../dest/img/application/zcsb.png" alt="成型实报" /></div>
<h3 class="application-tit" title="成型实报">成型实报</h3>
</a>
</div>
<div class="application-box" types="工序交接-针车">
<a ids="3" href="javascript:;">
<div class="application-img"><img src="../dest/img/sz.png" alt="工序交接-针车" /></div>
<h3 class="application-tit" title="工序交接-针车">工序交接-针车</h3>
</a>
</div>
<div class="application-box" types="我的任务">
<a ids="4" href="javascript:;">
<div class="application-img"><img src="../dest/img/sz.png" alt="我的任务" /></div>
<h3 class="application-tit" title="我的任务">我的任务</h3>
</a>
</div>
<div class="application-box" types="针车排班表">
<a ids="5" href="javascript:;">
<div class="application-img"><img src="../dest/img/sz.png" alt="针车排班表" /></div>
<h3 class="application-tit" title="针车排班表">针车排班表</h3>
</a>
</div>
<div class="application-box" types="设置">
<a ids="999" href="javascript:;">
<div class="application-img"><img src="../dest/img/application/settings.png" alt="设置" /></div>
<div class="application-img"><img src="../dest/img/sz.png" alt="设置" /></div>
<h3 class="application-tit" title="设置">设置</h3>
</a>
</div>
......@@ -116,7 +139,7 @@
var lisy = Dom.getById('lialist');
var isds = lisy.getElementsByClassName('application-box');
var ucond = Dom.getById('centicon');
var pages = ['Needlecarreport_new','Cutting',"Forming"];
var pages = ['Needlecarreport_new','Cutting',"Forming","NeedlecarHandover","MyWork","NeedlecarPBB"];
//var tits = ['色卡档案', '样品企划', '样品客户意见', '款式图片档案', '下单管理', '生产进度表', '消息提醒', '业务审批', '订货主场','针车实报','设置'];
var lab1 = document.getElementsByTagName("a");
var back__first = null;
......@@ -132,6 +155,16 @@
items.push({
Name: "设置"
});
items.push({
Name: "工序交接-针车"
});
items.push({
Name: "我的任务"
});
items.push({
Name: "针车排班表"
});
//console.log(JSON.stringify(items));
......@@ -161,7 +194,7 @@
}
console.log("need get module list ")
Api.post('/api/User/GetModuleList',null,onGetDataSuccess,onGetDataFailure);
......
......@@ -165,7 +165,12 @@
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
"orientation" : ["portrait-primary","portrait-secondary","landscape-primary","landscape-secondary"], /*应用支持的方向,portrait-primary:竖屏正方向;portrait-secondary:竖屏反方向;landscape-primary:横屏正方向;landscape-secondary:横屏反方向*/
"orientation" : [
"portrait-primary",
"portrait-secondary",
"landscape-primary",
"landscape-secondary"
], /*应用支持的方向,portrait-primary:竖屏正方向;portrait-secondary:竖屏反方向;landscape-primary:横屏正方向;landscape-secondary:横屏反方向*/
"icons" : {
"ios" : {
"prerendered" : true, /*应用图标是否已经高亮处理,在iOS6及以下设备上有效*/
......
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