123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333 |
- <%@ 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" src="<%=path %>/script/common/jquery-easyui-1.3.2/plugins/jquery.datagrid_detailview.js"></script>
- <script type="text/javascript">
-
- var storageTypeList = ${requestScope.storageTypeList};
-
- var functionId = '${functionId}';
-
- function storageTypeFormat(value){
-
- for ( var i = 0; i < storageTypeList.length; i++)
- {
- var statusValues = storageTypeList[i];
-
- if (value == statusValues.id)
- {
- return statusValues.dictionaryName;
- }
- }
- }
- function statusFormat(value)
- {
-
- if(value == 1){
- return "是";
- }else {
- return "否";
- }
-
- }
- $(function(){
- var buttonData = '${requestScope.buttons}';
- //实例化查询表单,当前页面只能实例化一次
- var searchForm = $("#searchForm").searchForm();
- //实例化实体List
- $.ReceiptList = new $.AbstractList( {
- entity:"Receipt",
- searchForm:searchForm,
- id:"receiptId",
- functionId : functionId,
- showExportButton : true,
- showTopic:true,
- autoLoad:false,
- myGridConfig:{
- view: detailview,
- detailFormatter:function(index,row){
- return '<div class="ddv" style="padding:5px 0"></div>';
- },
- onExpandRow: function(index,row){
- var readDetailForm = $("#readDetailForm");
- var hiddenReceiptId = readDetailForm.find("input[name='receiptId']");
- hiddenReceiptId.val(row.receiptId);
- var ddv = $(this).datagrid('getRowDetail',index).find('div.ddv');
- var readUrl = WEBROOT + '/ReceiptDetail/readDetails.action';
- ddv.panel({
- border:false,
- cache:false,
- href:readUrl+'?searchConditions='+JSON.stringify(readDetailForm.searchForm().getQo()),
- onLoad:function(){
- $.ReceiptList.datagrid.datagrid('fixDetailRowHeight',index);
- }
- });
- $.ReceiptList.datagrid.datagrid('fixDetailRowHeight',index);
- }
- }
- }) ;
- $.btnSearch = $('#btnSearch').advSearch({
- functionId:functionId,
- baseList:$.ReceiptList
- });
-
- if( !$.isEmpty(buttonData )){
- //构建权限按钮
- var jsonButtons = JSON.parse(buttonData);
- $.buildToolbar( $("#toolbar"),jsonButtons );
- };
-
- $.fn.extend($.ReceiptList, {
- printReceipt : function(){
- var url = WEBROOT + "/Receipt/printReceiptCheck.action";
- var rows = this.getSelections();
-
- if (rows.length == 0) {
- if(this.advSearchForm) {
- this.searchForm.setBaseConditions(this.advSearchForm.getConditions());
- }
- var conditionForSign = this.searchForm.getQo();
- if (conditionForSign['conditionRules'] != "") {
- var postData = {
- conditions : JSON.stringify(conditionForSign)
- };
- ajaxRequest(url, postData, successPrintCheck, null, this);
- } else {
- alertMsg("提示", "请选择要打印的行", "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, successPrintCheck, null, this);
- }
- },
-
- close : function(){
- var url = WEBROOT + "/Receipt/closeCheck.action";
- var rows = this.getSelections();
-
- if (rows.length == 0) {
- if(this.advSearchForm) {
- this.searchForm.setBaseConditions(this.advSearchForm.getConditions());
- }
- var conditionForSign = this.searchForm.getQo();
- if (conditionForSign['conditionRules'] != "") {
- var postData = {
- conditions : JSON.stringify(conditionForSign)
- };
- ajaxRequest(url, postData, successCloseCheck, null, this);
- } else {
- alertMsg("提示", "请选择要关闭的行", "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, successCloseCheck, null, this);
- }
- }
- });
-
- $("#btnSearch").bind("click",$.proxy( $.ReceiptList.quickSearch, $.ReceiptList ) );
- $("#btnReset").bind("click",
- $.proxy($.ReceiptList.reset, $.ReceiptList));
-
- $('#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;
- }
- });
- }
- }
- });
- });
-
- function successPrintCheck(data){
- $.messager.confirm('提示', '共【' + data[0].length + '】个订单可以打印,确定要打印吗?',
- function(result) {
- if (result) {
- if(data[0].length>0){
- var url = WEBROOT + "/Receipt/doPrintReceipt.action";
- var postData={
- ids:$.encodeJSON(data[0])
- };
- ajaxRequest(url, postData, successQueryPrint, null, this);
- }
- }
- });
- };
-
- function successQueryPrint(ajaxResponse){
- if( ajaxResponse.code=='fail'){
- alertMsg("打印查询","查询要打印的订单出现异常:"+ajaxResponse.errorDesc,"error");
- }else{
- var data = ajaxResponse.data;
- var config = {
- showPrinterSelect:"1",
- showPreview:1,
- autoMatch:1,
- templeteType:'收货单'
- };
- var printPlugIn = new top.PrintPlugIn(config);
- printPlugIn.print(data);
- }
- };
-
- function successCloseCheck(data){
- $.messager.confirm('提示', '共【' + data[0].length + '】个订单可以关闭,确定要关闭吗?',
- function(result) {
- if (result) {
- if(data[0].length>0){
- var url = WEBROOT + "/Receipt/doClose.action";
- var postData={
- ids:$.encodeJSON(data[0])
- };
- ajaxRequest(url, postData, successClose, null, this);
- }
- }
- });
- };
-
- function successClose(ajaxResponse){
- if( ajaxResponse.code=='fail'){
- alertMsg("提示",ajaxResponse.errorDesc,"error");
- }else{
- alertMsg("提示","关闭成功");
-
- $.ReceiptList.datagrid.datagrid('clearSelections');
- $.ReceiptList.datagrid.datagrid('reload');
- }
- };
-
- </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">收货单号:
- </td>
- <td>
- <textarea class="easyui-validatebox" style="vertical-align:middle" name="receiptId" condition ='"operator":"in"' ></textarea>
- </td>
- <td class="title">客户查询号:
- </td>
- <td>
- <textarea class="easyui-validatebox" style="vertical-align:middle" name="customerRefferenceId" condition ='"operator":"in"' ></textarea>
- </td>
- <td class="title">订单状态:
- </td>
- <td>
- <select name="receiptStatus" style="width: 155px"
- class="easyui-combobox"
- data-options="multiple:true,editable:false,panelHeight:'auto'"
- condition='"operator":"in"'>${receiptStatus}
- </select>
- </td>
- </tr>
- <tr>
- <td class="title">供应商代码:
- </td>
- <td>
- <input class="easyui-validatebox" type="text" style="vertical-align:middle" name="senderCode" condition ='"operator":"like"' />
- </td>
- <td class="title">订单类型:
- </td>
- <td>
- <s:select list="#request.inboundKinds" listKey="id" listValue="dictionaryName" cssClass="easyui-combobox" cssStyle="width: 155px" name="inboundKind" theme="simple" condition ='"operator":"="'></s:select>
- </td>
-
- <td class="title">货主:</td>
- <td>
- <input id="customerId" name="customerId" myType="easyui-combogrid" condition ='"operator":"in"'/>
- </td>
- </tr>
- <tr>
- <td class="title">预计到货时间:
- </td>
- <td colspan="3">
- <input class="easyui-datetimebox" type="text" style="vertical-align:middle" name="expectedReceiveTime" condition ='"operator":">"' >
- ~
- <input class="easyui-datetimebox" type="text" style="vertical-align:middle" name="expectedReceiveTime" condition ='"operator":"<"' >
- </td>
- </tr>
- <tr>
- <td colspan="6" align="right">
- <a id="btnSearch" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'">查询</a>
- <a id="btnAdvSearch" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'">高级查询<span class="totals"></span> </a>
- <a id="btnReset" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reset'">重置</a>
- </td>
- </tr>
- </table>
- </form>
- <div id="toolbar" class="toolbar"></div>
-
- <table id="maingrid" data-options="">
- <thead>
- <tr>
- <th data-options="field:'ck',width:20,checkbox:true">编码</th>
- <th data-options="field:'receiptId',align:'center',width:140">收货单号</th>
- <th data-options="field:'customerRefferenceId',align:'center',width:100">客户订单号</th>
- <th data-options="field:'storageType',align:'center',width:100,formatter:storageTypeFormat">入库类型</th>
- <th data-options="field:'customerName',align:'center',width:100">货主</th>
- <th data-options="field:'warehouseName',align:'center',width:100">仓库名称</th>
- <th data-options="field:'receiptStatus',align:'center',width:100">收货单状态</th>
- <th data-options="field:'senderCode',align:'center',width:100">发货人代码</th>
- <th data-options="field:'senderName',align:'center',width:100">发货人名称</th>
- <th data-options="field:'carrierTrackingNumber',align:'center',width:100">承运单号</th>
- <th data-options="field:'carrierName',align:'center',width:100">承运商名称</th>
- <th data-options="field:'creationTime',align:'center',width:100">创建时间</th>
- <th data-options="field:'createdBy',align:'center',width:100">创建人</th>
- <th data-options="field:'updatedBy',align:'center',width:100">更新人</th>
- <th data-options="field:'updateTime',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>
- <form id="readDetailForm">
- <input class="easyui-validatebox" type="hidden" style="vertical-align:middle" name="receiptId" value="" condition ='"operator":"="' />
- </form>
- </body>
- </html>
|