123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269 |
- <%@ 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 statusList = ${requestScope.statusList};
- var functionId = '${functionId}';
-
- function statusFormat(value)
- {
- for ( var i = 0; i < statusList.length; i++)
- {
- var statusItem = statusList[i];
-
- if (value == statusItem.id)
- {
- return statusItem.dictionaryName;
- }
- }
- }
-
-
- $(function(){
- var buttonData = '${requestScope.buttons}';
- //实例化查询表单,当前页面只能实例化一次
- var searchForm = $("#searchForm").searchForm();
-
- var x = document.getElementById("PrintSQW");
-
-
- $("#status").combobox({
- valueField: 'id',
- textField: 'dictionaryName',
- editable:false,
- data:statusList
- });
-
- //实例化实体List
- $.ShelvesTaskList = new $.AbstractList( {
- entity:"ShelvesTask",
- searchForm:searchForm,
- functionId : functionId,
- showExportButton : true,
- showTopic:true,
- autoLoad:false
- }) ;
-
- $.btnSearch = $('#btnSearch').advSearch({
- functionId:functionId,
- baseList:$.ShelvesTaskList
- });
-
- function printDo(response)
- {
- if( response.code=='fail'){
- alertMsg("打印查询","查询要打印的入储单出现异常:"+response.errorDesc,"error");
- }else{
- var data = response.data;
- var config = {
- autoMatch:1,
- templeteType:'入储单'
- };
- var printPlugIn = new top.PrintPlugIn(config);
- printPlugIn.print(data);
- }
- }
-
- function batchPrintCheck(response)
- {
- // succeed
- if (response.code == "success") {
- var data = response.data;
-
- if (data[0].length == 0)
- {
- showMsg("提示", "可以打印的列表为空");
-
- return;
- }
-
- $.messager.confirm('提示', '可以打印' + data[0].length + '条记录,确定要打印吗?', function(result)
- {
- if (result)
- {
- if (data[0].length > 0)
- {
- var url = WEBROOT + "/ShelvesTask/doPrint.action";
- var postData = {
- ids : $.encodeJSON(data[0])
- }
- ajaxRequest(url, postData, printDo, null, this);// successSignDo为调用成功回掉函数
- }
- }
- });
- } else {
- var errorDesc = response.errorDesc;
- showMsg("打印失败", errorDesc);
- }
- }
-
- $.fn.extend($.ShelvesTaskList, {
- batchPrint:function(){
- var url = WEBROOT + "/ShelvesTask/batchPrintCheck.action";
- var rows = this.getSelections();
- if (rows.length == 0)
- {
- var conditionForSign = this.searchForm.getQo();// 获得查询条件
-
- if (conditionForSign['conditionRules'] != "")
- {
- var postData = {
- conditions : JSON.stringify(this.searchForm.getQo())
- // 传输查询条件
- }
- ajaxRequest(url, postData, batchPrintCheck, null, this);// 传输后台AJAX操作
- }
- else
- {
- $.messager.alert("提示", "请选择要审批的行", "error");
- }
- }
- else
- {
- var ids = [];
- for ( var i = 0; i < rows.length; i++)
- {
- ids.push(rows[i][this.id]);// 获取勾选项
- }
- var postData = {
- ids : $.encodeJSON(ids)
- }
- ajaxRequest(url, postData, batchPrintCheck, null, this);// successSignCheck为验证完的回调函数。
- }
- }
- });
-
- if( !$.isEmpty(buttonData )){
- //构建权限按钮
- var jsonButtons = JSON.parse(buttonData);
- $.buildToolbar( $("#toolbar"),jsonButtons );
- };
-
- $("#btnSearch").bind("click",$.proxy( $.ShelvesTaskList.quickSearch, $.ShelvesTaskList ) );
- $("#btnReset").bind("click",$.proxy($.ShelvesTaskList.reset, $.ShelvesTaskList));
-
- $('#customerId').combogrid({ // 货主
- url : WEBROOT + "/loadData.action?entity=customer",
- idField : 'customerId',
- textField : 'customerName',
- delay : 500,
- mode : 'remote',
- showHeader : false,
- striped : true,
- columns : [ [ {
- field : 'customerName',
- width : '150'
- } ] ],
- onBeforeLoad : function(param) { // 此设置使控件不会自动加载数据 这里不能使用this
- if (!$("#customerId").combogrid('getText')) {
- return false;
- } else {
- return true;
- }
- },
- onShowPanel : function() { // 在第一次触发下拉框事件是加载数据
- if (!$(this).combogrid('getText')) {
- $(this).combogrid({
- onBeforeLoad : function(param) {
- return true;
- }
- });
- }
- }
- });
- });
- </script>
- </head>
- <body style="overflow-y: hidden" fit="true" scroll="no">
- <div id="tabs" class="easyui-tabs" fit="true">
- <div title="查询">
- <form id="searchForm" action="#" method="post">
- <table width="100%">
- <tr>
- <td class="title"><label for="id"
- style="vertical-align: middle">入储单号:</label></td>
- <td><textarea class="easyui-validatebox"
- style="vertical-align: middle" name="id"
- condition='"operator":"in"'></textarea></td>
- <td class="title"><label for="receiptId"
- style="vertical-align: middle">收货单号:</label></td>
- <td><textarea class="easyui-validatebox"
- style="vertical-align: middle" name="receiptId"
- condition='"operator":"in"'></textarea></td>
- <td class="title"><label for="customerRefferenceId"
- style="vertical-align: middle">客户订单号:</label></td>
- <td><textarea class="easyui-validatebox"
- style="vertical-align: middle; "
- name="customerRefferenceId" condition='"operator":"in"'></textarea>
- </td>
- </tr>
- <tr>
-
- <td class="title"><label for="pickInboundId"
- style="vertical-align: middle">入库单号:</label></td>
- <td>
- <input class="easyui-validatebox" type="text" style="vertical-align:middle" name="pickInboundId" condition ='"operator":"like"' />
- </td>
- <td class="title"><label for="shelvesStatus"
- style="vertical-align: middle">入储状态:</label></td>
- <td calss="title"><select id="status" name="shelvesStatus"
- style="width: 155px" class="easyui-combobox"
- data-options="multiple:true,editable:false,panelHeight:'auto'"
- condition='"operator":"in"'>${showStatusList}
- </select>
- </td>
-
- <td class="title">货主:</td>
- <td>
- <input id="customerId" name="customerId" myType="easyui-combogrid" condition ='"operator":"in"'/>
- </td>
- </tr>
- <tr>
- <td align="right" colspan="6"><a id="btnSearch" href="#"
- class="easyui-linkbutton" data-options="iconCls:'icon-search'">查询</a>
- <a id="btnReset" href="#" class="easyui-linkbutton"
- data-options="iconCls:'icon-reset'">重置</a></td>
- </tr>
- </table>
- </form>
- <div id="toolbar" style="padding: 5px; border: 1px solid #ddd;">
- </div>
- <table id="maingrid">
- <thead>
- <tr>
- <th data-options="field:'ck',checkbox:true">编码</th>
- <th data-options="field:'id'">入储单号</th>
- <th
- data-options="field:'shelvesStatus',align:'center',width:100,formatter:statusFormat">入储状态</th>
- <th
- data-options="field:'customerRefferenceId',align:'center',width:100">客户订单号</th>
- <th data-options="field:'quantity',align:'center',width:100">预期入储数量</th>
- <th
- data-options="field:'shelvedQuantity',align:'center',width:100">已入储数量</th>
- <th data-options="field:'shelvePerson',align:'center',width:100">入储人员</th>
- <th data-options="field:'creationTime',align:'center',width:130">创建时间</th>
- <th data-options="field:'createdBy',align:'center',width:100">创建人</th>
- <th data-options="field:'updateTime',align:'center',width:130">修改时间</th>
- <th data-options="field:'updatedBy',align:'center',width:100">修改人</th>
- </tr>
- </thead>
- </table>
- </div>
- <div title="内容">
- <iframe id="innerFrame" name="innerTab" scrolling="auto"
- frameborder="0" style="width: 100%; height: 99.4%; border: none;"></iframe>
- </div>
- </div>
- </body>
- </html>
|