123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- <%@ page contentType="text/html;charset=UTF-8"%>
- <%@ include file="/WEB-INF/include/taglibs.jsp"%>
- <!DOCTYPE html>
- <html>
- <head>
- <title></title>
- <%@ include file="/WEB-INF/include/common.jsp"%>
- <script type="text/javascript">
- $(function() {
- var $inputNum = $("#inputNum");
- var $orderId = $("#orderId");
- var $tagId = $("#tagId");
- var $boxNo = $("#boxNo");
-
- $inputNum.focus();
- $inputNum.keydown(function(event) {
- var keyCode = event.keyCode;
- if (keyCode == "13") {
- var tempValue = $inputNum.val().trim();
- if( tempValue.length > 3 ){
- var prex1 = tempValue.substring(0,1);
- var prex2 = tempValue.substring(0,2);
- var prex3 = tempValue.substring(0,3);
- if( prex1=="O"){
- jQuery.ajax({
- type:'post',
- contentType: "application/x-www-form-urlencoded; charset=utf-8",
- async:false,
- dataType: "json",
- url:WEBROOT + '/PickList/loadOrder.action?orderId=' + tempValue,
- success:function(response){
- if (response.code == 'success')
- {
- $("#orderId").val(tempValue);
- if (response.data == 1)
- {
- $("#tagId").val("T" + tempValue);
- }
- }
- else
- {
- setTimeout(function(){
- alertMsg("提示", response.errorDesc, "error",function(){
- $inputNum.focus();
- });
- }, 10)
- return;
- }
- }
- });
-
- }else if(prex2 =="TO"){
- $("#tagId").val(tempValue);
- }else if( prex3=="XJT"){
- $("#boxNo").val(tempValue);
- }else{
- showMsg('错误','输入值号不匹配!');
- $inputNum.val("");
- $inputNum.focus();
- return ;
- }
- var orderId = $orderId.val().trim();
- var tagId = $tagId.val().trim();
- var boxNo = $boxNo.val().trim();
- if( !$.isEmpty(orderId) && !$.isEmpty(tagId) && !$.isEmpty(boxNo) ){
- if( tagId != ("T"+orderId) ) {
- showMsg('错误','订单号与标签号不匹配!');
- $("#orderId").val("");
- $("#tagId").val("");
- $("#inputNum").val("");
- $inputNum.focus();
- return ;
- }
- var url =WEBROOT+"/PickList/doBindBox.action";
- ajaxRequest(url, {orderId:orderId,tagId:tagId,boxNo:boxNo}, function(response){
- if( response.code=="fail"){
- showMsg('错误',response.errorDesc);
- }else{
- showMsg('信息',response.data);
- }
-
- $("#orderId").val("");
- $("#tagId").val("");
- $("#boxNo").val("");
- $("#inputNum").val("");
- $inputNum.focus();
- });
- }else{
- $("#inputNum").val("");
- $inputNum.focus();
- }
-
- }else{
- $inputNum.val("");
- $inputNum.focus();
- }
-
-
- }
- });
-
- });
- </script>
- </head>
- <body style="overflow-y: hidden" fit="true" scroll="no">
- <div class="easyui-panel" fit="true"
- style="padding: 50px; background: #fafafa;">
- <table style="width: 100%">
- <tr>
- <td align="right">输入:</td>
- <td><input class="easyui-validatebox" id="inputNum"
- name="inputNum" style="width: 300px" />
- </td>
- </tr>
- <tr>
- <td colspan="6">
- <hr>
- </td>
- </tr>
- <tr>
- <td align="right">订单号:</td>
- <td><input class="easyui-validatebox" id="orderId"
- name="pickListId" style="width: 300px" disabled="disabled" />
- </td>
- </tr>
- <tr>
- <td align="right">标签号:</td>
- <td><input class="easyui-validatebox" id="tagId" name="tagId"
- style="width: 300px" disabled="disabled" />
- </td>
- </tr>
- <tr>
- <td align="right">箱号:</td>
- <td><input class="easyui-validatebox" id="boxNo" name="boxNo"
- style="width: 300px" disabled="disabled" />
- </td>
- </tr>
- </table>
- </div>
- </body>
- </html>
|