123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382 |
- <%@ 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">
- var receiptEntity = ${requestScope.receipt};
- var skuNumber = ${requestScope.skuNumber};
- var voice = null;
- try
- {
- voice = new ActiveXObject('Sapi.SpVoice');
- }
- catch(e)
- {
-
- }
- var sortingCount = 1;
- var lastIndex = -1;
- var editIndex;
- function formatStatus(value)
- {
- if (0 == value)
- {
- return "正常";
- }
- else if (1 == value)
- {
- return "关闭";
- }
- }
- function closeBox(row)
- {
- var url = WEBROOT + "/Receipt/closeBox.action";
-
- var postData = {
- id:row.id
- };
-
- ajaxRequest(url, postData, function(response){
- // succeed
- if (response.code == "success") {
- showMsg("提示", "箱子关闭成功");
- } else {
- var errorDesc = response.errorDesc;
- showMsg("失败", errorDesc);
- }
- }, null, this);
- }
- $(function(){
- $("#closeBtn").click(function(){
- //parent.$.scanDialog.dialog('close');
- });
-
- $("#preBoxListTable").datagrid({
- width : '100%',
- checkOnSelect:true,
- nowrap : false,
- striped : true,
- collapsible : false,
- fitColumns : true,
- pagination : true,
- singleSelect : true,
- pageSize : 50,
- idField : 'id',
- url : WEBROOT + '/Receipt/showPreBoxList.action',
- queryParams:{receiptId:receiptEntity.receiptId,sortingCount:sortingCount},
- remoteSort : true,
- pageList : [50, 100],
- columns:[[
- {field:'boxNo',title:'中转箱号',width:100},
- {field:'skuCount',title:'SKU数',width:100},
- {field:'qty',title:'总件数',width:100}
- ]]
- });
-
- $("#realyBoxNo").combobox({
- data:${requestScope.boxList},
- valueField:'boxId',
- textField:'boxNo'
- });
-
- $("#useBox").click(function(){
- if (this.checked)
- {
- $("#realyBoxNo").combobox('enable');
- }
- else
- {
- $("#realyBoxNo").combobox('clear');
- $("#realyBoxNo").combobox('disable');
- }
- });
-
- $('#barCode').keydown(function(e)
- {
- if (e.keyCode == 13)
- {
- //校验产品是否在箱明细中 如果不在说明多发货
- if ($("#useBox").attr("checked") && !$("#realyBoxNo").combobox('getValue'))
- {
- setTimeout(function()
- {
- alertMsg("提示", "请选择箱号", "error");
- }, 100);
- return;
- }
-
- //更新系统箱信息
- var postData = {
- "realyBoxId" : $("#realyBoxNo").combobox('getValue'),
- "realyBoxNo" : $("#realyBoxNo").combobox('getText'),
- "barCode" : $('#barCode').val(),
- "receiptId" : receiptEntity.receiptId,
- "sortingCount":sortingCount
- };
- var url = WEBROOT + '/Receipt/itemScan.action';
- ajaxRequest(url, postData, function(response)
- {
- if (response.code == "success")
- {
- $("#sortingBoxNo").val(response.data.preBoxNo);
-
- setTimeout(function()
- {
- $("#sortingBox").datagrid('reload');
-
- $("#sortingDetail").datagrid('reload',{
- receiptId:receiptEntity.receiptId,
- preBoxId:response.data.boxId,
- sortingCount:sortingCount
- });
-
- $("#sortingScanDetail").datagrid('reload');
-
- try
- {
- voice.Speak(response.data.preBoxNo,1);
- }
- catch(e)
- {
- alert('请参见语音播报配置手册进行配置');
- }
- }, 100);
- }
- else if (response.code == "fail")
- {
- showMsg("错误", response.errorDesc);
- }
- });
-
- //刷新页面箱信息
- }
- });
-
- $("#preBoxDetailTable").datagrid({
- width : '100%',
- checkOnSelect:true,
- nowrap : false,
- striped : true,
- collapsible : false,
- fitColumns : true,
- pagination : true,
- singleSelect : true,
- pageSize : 50,
- idField : 'id',
- url : WEBROOT + '/Receipt/showPreBoxDetail.action',
- queryParams:{receiptId:receiptEntity.receiptId,sortingCount:sortingCount},
- remoteSort : true,
- pageList : [50, 100],
- columns:[[
- {field:'boxNo',title:'中转箱号',width:100},
- {field:'itemCode',title:'SKU',width:100},
- {field:'zoneName',title:'库区',width:100},
- {field:'locationName',title:'储位',width:100},
- ]]
- });
-
-
- $("#sortingBox").datagrid({
- width : '100%',
- checkOnSelect:true,
- nowrap : false,
- striped : true,
- collapsible : false,
- fitColumns : true,
- pagination : true,
- singleSelect : true,
- pageSize : 50,
- idField : 'id',
- url : WEBROOT + '/Receipt/showSortingBox.action',
- queryParams:{receiptId:receiptEntity.receiptId,sortingCount:sortingCount},
- remoteSort : true,
- pageList : [50, 100],
- columns:[[
- {field:'preBoxNo',title:'预分拣箱号',width:100},
- {field:'cartonBoxNo',title:'实际箱号',width:100},
- {field:'qty',title:'数量',width:100},
- {field:'status',title:'状态',width:100,formatter:formatStatus,editor:{
- type : 'combobox',
- options:{
- valueField: 'id',
- textField: 'text',
- data:[{id:0,text:'正常'},{id:1,text:'关闭'}],
- onSelect:function(record){
- setTimeout(function(){
- $('#sortingBox').datagrid('endEdit', editIndex);
-
- var rows = $('#sortingBox').datagrid('getRows');
- var row = rows[editIndex];
-
- row.status = record.id;
- $('#sortingBox').datagrid('updateRow',{index:editIndex,row:row});
-
- closeBox(row);
-
- lastIndex = -1;
- }, 100);
- }
- }
- }}
- ]],
- onClickCell : function (rowIndex, field, value) {
- if(field == "status" && 0 == value){
- if (lastIndex != rowIndex) {
- $('#sortingBox').datagrid('cancelEdit', lastIndex);
-
- editIndex = rowIndex;
- lastIndex = rowIndex;
- $('#sortingBox').datagrid('beginEdit', rowIndex);
- }
- }
- }
- });
-
-
- $("#sortingDetail").datagrid({
- width : '100%',
- checkOnSelect:true,
- nowrap : false,
- striped : true,
- collapsible : false,
- fitColumns : true,
- pagination : true,
- singleSelect : true,
- pageSize : 50,
- idField : 'id',
- url : WEBROOT + '/Receipt/showSortingDetail.action',
- queryParams:{receiptId:receiptEntity.receiptId,sortingCount:sortingCount},
- remoteSort : true,
- pageList : [50, 100],
- columns:[[
- {field:'cartonBoxNo',title:'实际箱号',width:100},
- {field:'itemCode',title:'SKU',width:100},
- {field:'qty',title:'数量',width:100}
- ]]
- });
-
- $("#sortingScanDetail").datagrid({
- width : '100%',
- checkOnSelect:true,
- nowrap : false,
- striped : true,
- collapsible : false,
- fitColumns : true,
- pagination : true,
- singleSelect : true,
- pageSize : 50,
- idField : 'id',
- url : WEBROOT + '/Receipt/showScanDetail.action',
- queryParams:{receiptId:receiptEntity.receiptId,sortingCount:sortingCount},
- remoteSort : true,
- pageList : [50, 100],
- columns:[[
- {field:'itemCode',title:'SKU',width:100},
- {field:'itemBarCode',title:'条码',width:150},
- {field:'qty',title:'数量',width:50},
- {field:'orgCartonBoxNo',title:'原始箱号',width:50}
- ]]
- });
- });
- </script>
- </head>
- <body id="body" style="background:#fafafa;">
- <div class="easyui-panel" style="width:1070px;height:45px;padding:10px;background:#fafafa;"
- data-options="iconCls:'icon-base',closable:false,collapsible:false,minimizable:false,maximizable:false">
- <table style="width: 100%">
- <tr>
- <td colspan="2"><a href="#" icon="icon-close" id="closeBtn" class="easyui-linkbutton">关闭</a>
- </td>
- <td>收货单号:</td>
- <td><input class="easyui-validatebox" value="${requestScope.receipt.receiptId}" disabled="disabled" id="receiptId" name="receiptId"></input>
- </td>
- <td>总SKU数:</td>
- <td><input class="easyui-validatebox" value="${requestScope.skuNumber}" disabled="disabled" id="skuNumber" name="skuNumber"></input>
- </td>
- <td>总件数:</td>
- <td><input class="easyui-validatebox" value="${requestScope.receipt.expectedReceiveQuantity}" disabled="disabled"
- id="expectedQuantity" name="expectedQuantity"></input></td>
- </tr>
- </table>
- </div>
- <div style="float:left;margin-left:10px;">
- <div class="easyui-panel" title="预分拣箱清单" style="width:330px;height:200px;"
- data-options="iconCls:'icon-base',closable:false,collapsible:false,minimizable:false,maximizable:false">
- <table id="preBoxListTable">
-
- </table>
- </div>
- </div>
- <div style="float:left; width:80px; height:200px">
- <br> <br> <br> <br> <br> <br>
- </div>
- <div>
- <div class="easyui-panel" title="实际分拣箱清单" style="float:left;width:330px;height:200px;background:#fafafa;"
- data-options="iconCls:'icon-base',closable:false,collapsible:false,minimizable:false,maximizable:false">
- <table id="sortingBox">
-
- </table>
- </div>
- </div>
- <div class="easyui-panel" style="width:800px;height:80px;background:#fafafa;margin-left:10px;"
- data-options="iconCls:'icon-base',closable:false,collapsible:false,minimizable:false,maximizable:false">
- <table style="width: 50%">
- <tr>
- <td><input type="checkbox" value="1" name="useBox" id="useBox"/>按箱扫描</td>
- </tr>
- </table>
- <table style="width: 100%">
- <tr>
- <td>箱号:</td>
- <td><input class="easyui-combobox" disabled="disabled" id="realyBoxNo" name="boxNo"></input></td>
- <td>条码:</td>
- <td><input class="easyui-validatebox" id="barCode" name="barCode"></input></td>
- <td>中转箱号:</td>
- <td><input class="easyui-validatebox" disabled="disabled" id="sortingBoxNo" name="sortingBoxNo"></input></td>
- <td colspan="2"><input type="checkbox" value="1" name="printEle" id="printEle"/>打印分拣标签</td>
- </tr>
- </table>
- </div>
- <div style="float:left;margin-left:10px;">
- <div class="easyui-panel" title="预分拣箱汇总明细" style="width:330px;height:200px;"
- data-options="iconCls:'icon-base',closable:false,collapsible:false,minimizable:false,maximizable:false">
- <table id="preBoxDetailTable">
- </table>
- </div>
- </div>
- <div style="float:left; width:80px; height:200px">
- <br> <br> <br> <br> <br> <br>
- </div>
- <div style="float:left;">
- <div class="easyui-panel" title="实际分拣明细" style="width:330px;height:200px;background:#fafafa;"
- data-options="iconCls:'icon-base',closable:false,collapsible:false,minimizable:false,maximizable:false">
- <table id="sortingDetail">
-
- </table>
- </div>
- </div>
- <div style="float:left; width:80px; height:130px">
- <br> <br> <br> <br> <br> <br>
- </div>
- <div>
- <div class="easyui-panel" title="实际分拣扫描明细" style="float:left;width:300px;height:200px;background:#fafafa;"
- data-options="iconCls:'icon-base',closable:false,collapsible:false,minimizable:false,maximizable:false">
- <table id="sortingScanDetail">
-
- </table>
- </div>
- </div>
- </body>
- </html>
|