<!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" />
|
<script src="../js/mui.min.js"></script>
|
<script src="../js/api.js"></script>
|
<script src="../js/common.js"></script>
|
<script src="../js/jquery.js"></script>
|
<script src="../js/jquery-1.11.1.js"></script>
|
<script src="../js/jquery.xml2json.js.js"></script>
|
<script src="../js/template-web.js"></script>
|
<link href="../css/mui.min.css" rel="stylesheet" />
|
<link rel="stylesheet" type="text/css" href="../css/iconfont.css" />
|
<link rel="stylesheet" type="text/css" href="../css/personal.css" />
|
<link rel="stylesheet" type="text/css" href="../css/input.css" />
|
<style type="text/css">
|
.table th {
|
background-repeat: repeat-x;
|
}
|
|
.table td,
|
.table th {
|
border: 1px solid #cad9ea;
|
padding: 0 1em 0;
|
text-align: center;
|
font-size: 12px;
|
}
|
|
.table tr.alter {
|
background-color: #f5fafe;
|
}
|
|
.table tr {
|
border-top: 1px solid #0e94ea;
|
background: rgba(14, 148, 234, 0.1);
|
}
|
|
.table thead tr {
|
background: rgba(14, 148, 234, 0.4);
|
|
}
|
|
.table tr.bg-color {
|
background: rgba(14, 148, 234, 0.2);
|
}
|
</style>
|
</head>
|
|
<body class="mui-fullscreen">
|
<header class="mui-bar mui-bar-nav">
|
<button type="button" class="mui-left mui-action-back mui-btn mui-btn-link mui-btn-nav mui-pull-left">
|
<span class="mui-icon mui-icon-left-nav"></span>
|
</button>
|
<h1 class="mui-title" id="title"></h1>
|
</header>
|
<div class="mui-content">
|
<div id="divid">
|
<div class="mui-input-group" id="form">
|
<div class="mui-input-row">
|
<label>位置号</label>
|
<input type="text" id="pi_1" onkeyup="enterSearch(event,'pi_1')" class="mui-input-clear" placeholder="请输入位置号">
|
</div>
|
<div class="mui-input-row">
|
<label>仓库</label>
|
<input readonly type="text" id="pi_2" style="background-color: #f1f1f5">
|
</div>
|
<div class="mui-input-row" style="height: 4rem;">
|
<ul class="mui-table-view ulcss">
|
<li class="mui-table-view-cell acss" style="background-color: rgb(146, 148, 255);" onclick="clickButton()">
|
<a>确认发送</a>
|
</li>
|
</ul>
|
</div>
|
<div class="mui-input-row">
|
<label>提示信息</label>
|
<input readonly type="text" id="pi_3" style="background-color: #f1f1f5">
|
</div>
|
</div>
|
</div>
|
</div>
|
|
<script type="text/javascript">
|
mui.init({})
|
mui.plusReady(function() {
|
document.getElementById("title").innerHTML = api_localStorageGet("functionName");
|
})
|
|
function enterSearch(event, str) {
|
if (event.keyCode == "13") {
|
var pi_1 = document.getElementById('pi_1').value
|
var param = "托盘复位[FILED2[" + api_localStorageGet("code") + "[" + pi_1
|
getData(param);
|
}
|
}
|
|
function getData(param) {
|
mui.ajax(API.webPath + '/api_helper/prcRfAgv1?paramString=' + encodeURIComponent(param), {
|
data: {},
|
dataType: 'json',
|
type: 'POST',
|
timeout: 10000,
|
headers: {
|
'Content-Type': 'application/json'
|
},
|
success: function(data) {
|
console.log(JSON.stringify(data))
|
if (data.result) {
|
document.getElementById('pi_2').value = data.data;
|
} else {
|
document.getElementById('pi_3').value = data.msg;
|
plus.ui.toast(data.msg);
|
}
|
},
|
error: function(xhr, type, errorThrown) {
|
plus.ui.toast("error:" + type);
|
|
}
|
})
|
}
|
|
function clickButton() {
|
var value = document.getElementById('pi_1').value
|
if (value == "" || value == null) {
|
plus.ui.toast("位置号不可为空");
|
return false
|
}
|
|
var jsonObject = {
|
"PosId": value
|
}
|
var url = "http://10.0.0.220:5011/api/mes/resetTray";
|
|
mui.ajax(API.webPath + '/api_helper/setApiData?url=' + encodeURIComponent(url) + '&fjson=' + encodeURIComponent(
|
JSON.stringify(jsonObject)), {
|
data: {},
|
dataType: 'json',
|
type: 'POST',
|
timeout: 10000,
|
headers: {
|
'Content-Type': 'application/json'
|
},
|
success: function(data) {
|
var re = JSON.parse(data.data)
|
|
if (re.Result) {
|
var da = JSON.stringify(re.Data)
|
var p = "托盘复位[FILED4[" + api_localStorageGet("code") + "[" + value + "[" + JSON.stringify(jsonObject) + "[" +
|
da
|
sendLog(p)
|
} else {
|
var p = "托盘复位[FILED4[" + api_localStorageGet("code") + "[" + value + "[" + JSON.stringify(jsonObject) + "[PDA-ERROR:" +
|
re.ErrMsg
|
sendLog(p)
|
document.getElementById('pi_3').value = re.ErrMsg;
|
plus.ui.toast(re.ErrMsg);
|
}
|
},
|
error: function(xhr, type, errorThrown) {
|
var p = "托盘复位[FILED4[" + api_localStorageGet("code") + "[" + value + "[" + JSON.stringify(jsonObject) + "[PDA-ERROR:错误类型:" +
|
type+";详细:"+errorThrown
|
sendLog(p)
|
plus.ui.toast("error:" + type);
|
}
|
})
|
}
|
|
function sendLog(param) {
|
mui.ajax(API.webPath + '/api_helper/prcRfAgv1?paramString=' + encodeURIComponent(param), {
|
data: {},
|
dataType: 'json',
|
type: 'POST',
|
timeout: 10000,
|
headers: {
|
'Content-Type': 'application/json'
|
},
|
success: function(data) {
|
if (data.result) {
|
document.getElementById('pi_3').value = data.msg;
|
} else {
|
document.getElementById('pi_3').value = data.msg;
|
plus.ui.toast(data.msg);
|
}
|
},
|
error: function(xhr, type, errorThrown) {
|
plus.ui.toast("error:" + type);
|
}
|
})
|
}
|
</script>
|
</body>
|
|
</html>
|