shelvesTaskList.jsp 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. <%@ page contentType="text/html;charset=UTF-8"%>
  2. <%@ include file="/WEB-INF/include/taglibs.jsp"%>
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <title>用户管理</title>
  7. <%@ include file="/WEB-INF/include/common.jsp"%>
  8. <script type="text/javascript">
  9. var statusList = ${requestScope.statusList};
  10. var functionId = '${functionId}';
  11. function statusFormat(value)
  12. {
  13. for ( var i = 0; i < statusList.length; i++)
  14. {
  15. var statusItem = statusList[i];
  16. if (value == statusItem.id)
  17. {
  18. return statusItem.dictionaryName;
  19. }
  20. }
  21. }
  22. $(function(){
  23. var buttonData = '${requestScope.buttons}';
  24. //实例化查询表单,当前页面只能实例化一次
  25. var searchForm = $("#searchForm").searchForm();
  26. var x = document.getElementById("PrintSQW");
  27. $("#status").combobox({
  28. valueField: 'id',
  29. textField: 'dictionaryName',
  30. editable:false,
  31. data:statusList
  32. });
  33. //实例化实体List
  34. $.ShelvesTaskList = new $.AbstractList( {
  35. entity:"ShelvesTask",
  36. searchForm:searchForm,
  37. functionId : functionId,
  38. showExportButton : true,
  39. showTopic:true,
  40. autoLoad:false
  41. }) ;
  42. $.btnSearch = $('#btnSearch').advSearch({
  43. functionId:functionId,
  44. baseList:$.ShelvesTaskList
  45. });
  46. function printDo(response)
  47. {
  48. if( response.code=='fail'){
  49. alertMsg("打印查询","查询要打印的入储单出现异常:"+response.errorDesc,"error");
  50. }else{
  51. var data = response.data;
  52. var config = {
  53. autoMatch:1,
  54. templeteType:'入储单'
  55. };
  56. var printPlugIn = new top.PrintPlugIn(config);
  57. printPlugIn.print(data);
  58. }
  59. }
  60. function batchPrintCheck(response)
  61. {
  62. // succeed
  63. if (response.code == "success") {
  64. var data = response.data;
  65. if (data[0].length == 0)
  66. {
  67. showMsg("提示", "可以打印的列表为空");
  68. return;
  69. }
  70. $.messager.confirm('提示', '可以打印' + data[0].length + '条记录,确定要打印吗?', function(result)
  71. {
  72. if (result)
  73. {
  74. if (data[0].length > 0)
  75. {
  76. var url = WEBROOT + "/ShelvesTask/doPrint.action";
  77. var postData = {
  78. ids : $.encodeJSON(data[0])
  79. }
  80. ajaxRequest(url, postData, printDo, null, this);// successSignDo为调用成功回掉函数
  81. }
  82. }
  83. });
  84. } else {
  85. var errorDesc = response.errorDesc;
  86. showMsg("打印失败", errorDesc);
  87. }
  88. }
  89. $.fn.extend($.ShelvesTaskList, {
  90. batchPrint:function(){
  91. var url = WEBROOT + "/ShelvesTask/batchPrintCheck.action";
  92. var rows = this.getSelections();
  93. if (rows.length == 0)
  94. {
  95. var conditionForSign = this.searchForm.getQo();// 获得查询条件
  96. if (conditionForSign['conditionRules'] != "")
  97. {
  98. var postData = {
  99. conditions : JSON.stringify(this.searchForm.getQo())
  100. // 传输查询条件
  101. }
  102. ajaxRequest(url, postData, batchPrintCheck, null, this);// 传输后台AJAX操作
  103. }
  104. else
  105. {
  106. $.messager.alert("提示", "请选择要审批的行", "error");
  107. }
  108. }
  109. else
  110. {
  111. var ids = [];
  112. for ( var i = 0; i < rows.length; i++)
  113. {
  114. ids.push(rows[i][this.id]);// 获取勾选项
  115. }
  116. var postData = {
  117. ids : $.encodeJSON(ids)
  118. }
  119. ajaxRequest(url, postData, batchPrintCheck, null, this);// successSignCheck为验证完的回调函数。
  120. }
  121. }
  122. });
  123. if( !$.isEmpty(buttonData )){
  124. //构建权限按钮
  125. var jsonButtons = JSON.parse(buttonData);
  126. $.buildToolbar( $("#toolbar"),jsonButtons );
  127. };
  128. $("#btnSearch").bind("click",$.proxy( $.ShelvesTaskList.quickSearch, $.ShelvesTaskList ) );
  129. $("#btnReset").bind("click",$.proxy($.ShelvesTaskList.reset, $.ShelvesTaskList));
  130. $('#customerId').combogrid({ // 货主
  131. url : WEBROOT + "/loadData.action?entity=customer",
  132. idField : 'customerId',
  133. textField : 'customerName',
  134. delay : 500,
  135. mode : 'remote',
  136. showHeader : false,
  137. striped : true,
  138. columns : [ [ {
  139. field : 'customerName',
  140. width : '150'
  141. } ] ],
  142. onBeforeLoad : function(param) { // 此设置使控件不会自动加载数据 这里不能使用this
  143. if (!$("#customerId").combogrid('getText')) {
  144. return false;
  145. } else {
  146. return true;
  147. }
  148. },
  149. onShowPanel : function() { // 在第一次触发下拉框事件是加载数据
  150. if (!$(this).combogrid('getText')) {
  151. $(this).combogrid({
  152. onBeforeLoad : function(param) {
  153. return true;
  154. }
  155. });
  156. }
  157. }
  158. });
  159. });
  160. </script>
  161. </head>
  162. <body style="overflow-y: hidden" fit="true" scroll="no">
  163. <div id="tabs" class="easyui-tabs" fit="true">
  164. <div title="查询">
  165. <form id="searchForm" action="#" method="post">
  166. <table width="100%">
  167. <tr>
  168. <td class="title"><label for="id"
  169. style="vertical-align: middle">入储单号:</label></td>
  170. <td><textarea class="easyui-validatebox"
  171. style="vertical-align: middle" name="id"
  172. condition='"operator":"in"'></textarea></td>
  173. <td class="title"><label for="receiptId"
  174. style="vertical-align: middle">收货单号:</label></td>
  175. <td><textarea class="easyui-validatebox"
  176. style="vertical-align: middle" name="receiptId"
  177. condition='"operator":"in"'></textarea></td>
  178. <td class="title"><label for="customerRefferenceId"
  179. style="vertical-align: middle">客户订单号:</label></td>
  180. <td><textarea class="easyui-validatebox"
  181. style="vertical-align: middle; "
  182. name="customerRefferenceId" condition='"operator":"in"'></textarea>
  183. </td>
  184. </tr>
  185. <tr>
  186. <td class="title"><label for="pickInboundId"
  187. style="vertical-align: middle">入库单号:</label></td>
  188. <td>
  189. <input class="easyui-validatebox" type="text" style="vertical-align:middle" name="pickInboundId" condition ='"operator":"like"' />
  190. </td>
  191. <td class="title"><label for="shelvesStatus"
  192. style="vertical-align: middle">入储状态:</label></td>
  193. <td calss="title"><select id="status" name="shelvesStatus"
  194. style="width: 155px" class="easyui-combobox"
  195. data-options="multiple:true,editable:false,panelHeight:'auto'"
  196. condition='"operator":"in"'>${showStatusList}
  197. </select>
  198. </td>
  199. <td class="title">货主:</td>
  200. <td>
  201. <input id="customerId" name="customerId" myType="easyui-combogrid" condition ='"operator":"in"'/>
  202. </td>
  203. </tr>
  204. <tr>
  205. <td align="right" colspan="6"><a id="btnSearch" href="#"
  206. class="easyui-linkbutton" data-options="iconCls:'icon-search'">查询</a>
  207. <a id="btnReset" href="#" class="easyui-linkbutton"
  208. data-options="iconCls:'icon-reset'">重置</a></td>
  209. </tr>
  210. </table>
  211. </form>
  212. <div id="toolbar" style="padding: 5px; border: 1px solid #ddd;">
  213. </div>
  214. <table id="maingrid">
  215. <thead>
  216. <tr>
  217. <th data-options="field:'ck',checkbox:true">编码</th>
  218. <th data-options="field:'id'">入储单号</th>
  219. <th
  220. data-options="field:'shelvesStatus',align:'center',width:100,formatter:statusFormat">入储状态</th>
  221. <th
  222. data-options="field:'customerRefferenceId',align:'center',width:100">客户订单号</th>
  223. <th data-options="field:'quantity',align:'center',width:100">预期入储数量</th>
  224. <th
  225. data-options="field:'shelvedQuantity',align:'center',width:100">已入储数量</th>
  226. <th data-options="field:'shelvePerson',align:'center',width:100">入储人员</th>
  227. <th data-options="field:'creationTime',align:'center',width:130">创建时间</th>
  228. <th data-options="field:'createdBy',align:'center',width:100">创建人</th>
  229. <th data-options="field:'updateTime',align:'center',width:130">修改时间</th>
  230. <th data-options="field:'updatedBy',align:'center',width:100">修改人</th>
  231. </tr>
  232. </thead>
  233. </table>
  234. </div>
  235. <div title="内容">
  236. <iframe id="innerFrame" name="innerTab" scrolling="auto"
  237. frameborder="0" style="width: 100%; height: 99.4%; border: none;"></iframe>
  238. </div>
  239. </div>
  240. </body>
  241. </html>