onhandreportInitial-add.jsp 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <%@page import="cn.com.lzt.common.util.StringUtil"%>
  2. <%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  3. <%@include file="/context/mytags.jsp"%>
  4. <!DOCTYPE html>
  5. <html>
  6. <head>
  7. <title>订单表</title>
  8. <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  9. <script src="plug-in/layer/layer.js"></script>
  10. <script type="text/javascript">
  11. $(document).ready(function(){
  12. $('#tt').tabs({
  13. onSelect:function(title){
  14. $('#tt .panel-body').css('width','auto');
  15. }
  16. });
  17. $(".tabs-wrap").css('width','100%');
  18. //画面数值初期化
  19. // 总金额
  20. $("#totalMoney").val(0);
  21. // 格式 月和日
  22. function p(s) {
  23. return s < 10 ? '0' + s: s;
  24. }
  25. var myDate = new Date();
  26. //获取当前年
  27. var year=myDate.getFullYear();
  28. //获取当前月
  29. var month=myDate.getMonth()+1;
  30. //获取当前日
  31. var date=myDate.getDate();
  32. var orderDate=year+'-'+p(month);
  33. $("#orderDate").val(orderDate);
  34. });
  35. function btn_ok(){
  36. var trList = $("#add_orderDetails_table").children("tr");
  37. if(trList.length == 0){
  38. layer.alert("请至少输入一条货品详细信息");
  39. return;
  40. }
  41. $("#btnsub").click();
  42. }
  43. function btn_back(){
  44. window.location.href="onhandReportController.do?listInitial";
  45. }
  46. function callback(data){
  47. if(data.success){
  48. layer.alert(data.msg, function(index){
  49. window.location.href="onhandReportController.do?listInitial";
  50. layer.close(index);
  51. });
  52. }
  53. else{
  54. layer.alert(data.msg);
  55. }
  56. }
  57. </script>
  58. </head>
  59. <body style="overflow-x: hidden;">
  60. <t:formvalid formid="formobj" dialog="false" usePlugin="password" layout="table" tiptype="1" action="onhandReportController.do?doAddInitial" callback="callback">
  61. <input id="id" name="id" type="hidden" value="${ordersPage.id }">
  62. <input id="createBy" name="createBy" type="hidden" value="${ordersPage.createBy }">
  63. <input id="updateName" name="updateName" type="hidden" value="${ordersPage.updateName }">
  64. <input id="updateBy" name="updateBy" type="hidden" value="${ordersPage.updateBy }">
  65. <input id="updateDate" name="updateDate" type="hidden" value="${ordersPage.updateDate }">
  66. <input id="bpmStatus" name="bpmStatus" type="hidden" value="${ordersPage.bpmStatus }">
  67. <input id="orderStatus" name="orderStatus" type="hidden" value="${ordersPage.orderStatus }">
  68. <input id="orderOnumber" name="orderOnumber" type="hidden" value="${ordersPage.orderOnumber }">
  69. <t:tabs id="tt" iframe="false" tabPosition="top" fit="false" >
  70. <t:tab href="onhandReportController.do?OnhandReportDetailsList&id=${ordersPage.id}" icon="icon-search" title="物料上报存货列表" id="orderDetails" heigth="1000px"></t:tab>
  71. </t:tabs>
  72. <%--底部begin --%>
  73. <table cellpadding="0" cellspacing="1" class="formtable" style="position:fixed;bottom:0px;">
  74. <tr>
  75. <td align="right" width="100px">
  76. <label class="Validform_label"><span color="red" class="requiredIcon">*</span>领料点:</label>
  77. </td>
  78. <td class="value" nowrap>
  79. <input id="warehouseId" name="warehouseId" type="hidden" value='${ordersPage.warehouseId}'><%-- '${ordersPage.warehouseId}' --%>
  80. <input name="warehouseName" class="inputxt" value='${ordersPage.warehouseName}' style="width: 150px" id="warehouseName" readonly="readonly" datatype="*" nullmsg="请选择领料点"/><%-- '${ordersPage.warehouseName}' --%>
  81. <span class="Validform_checktip"></span>
  82. <label class="Validform_label" style="display: none;">领料点</label>
  83. <t:choose hiddenName="warehouseId" hiddenid="id" url="onhandReportController.do?selectReferWareHouse&classname=cn.com.lzt.warehouse.entity.WarehouseEntity&codefield=warehouseCode&namefield=warehouseName&scope=all" name="list"
  84. icon="icon-search" title="领料点" textname="warehouseName" isclear="true" isInit="true" ></t:choose>
  85. </td>
  86. <td align="right">
  87. <label class="Validform_label">上报月份:</label>
  88. </td>
  89. <td class="value">
  90. <input id="orderDate" name="orderDate" type="text" style="width: 150px" class="inputxt"
  91. onClick="WdatePicker({dateFmt:'yyyy-MM'})">
  92. <span class="Validform_checktip"></span>
  93. <label class="Validform_label" style="display: none;">上报月份</label>
  94. </td>
  95. <%-- <td align="right">
  96. <label class="Validform_label">总金额:</label>
  97. </td>
  98. <td class="value">
  99. <input id="totalMoney" name="totalMoney" value='${ordersPage.totalMoney}' type="text" style="width: 150px" class="inputxt" readonly="readonly"><b> 元</b>
  100. <span class="Validform_checktip"></span>
  101. <label class="Validform_label" style="display: none;">总金额</label>
  102. </td> --%>
  103. <td align="right">
  104. </td>
  105. <td align="right">
  106. </td>
  107. <td align="right">
  108. </td>
  109. <td align="right">
  110. </td>
  111. </tr>
  112. <tr>
  113. <td align="right">
  114. <label class="Validform_label">制单人:</label>
  115. </td>
  116. <td class="value">
  117. <input id="createName" name="createName" type="text" style="width: 150px" class="inputxt" readonly="readonly">
  118. <span class="Validform_checktip"></span>
  119. <label class="Validform_label" style="display: none;">制单人</label>
  120. </td>
  121. <td align="right">
  122. <label class="Validform_label">制单日期:</label>
  123. </td>
  124. <td class="value">
  125. <input id="createDate" name="createDate" type="text" style="width: 150px" class="inputxt" readonly="readonly">
  126. <span class="Validform_checktip"></span>
  127. <label class="Validform_label" style="display: none;">制单日期</label>
  128. </td>
  129. <td align="right">
  130. </td>
  131. <td align="right">
  132. </td>
  133. <td align="right">
  134. </td>
  135. <td align="right">
  136. </td>
  137. </tr>
  138. <tr>
  139. <td height="50px" align="center" colspan="8">
  140. <div style="display:none"><input type="submit" id ="btnsub" value=""/></div>
  141. <a style="margin-left:80px" href="#" class="easyui-linkbutton l-btn" iconcls="icon-le-ok" onclick="btn_ok()">确定</a>
  142. <a href="#" class="easyui-linkbutton l-btn" plain="true" iconcls="icon-le-back" onclick="btn_back()">返回</a>
  143. </td>
  144. </tr>
  145. </table>
  146. <%--底部end --%>
  147. </t:formvalid>
  148. <!-- 添加 附表明细 模版 -->
  149. <div id="listdiv" fit="false" style="margin: 0px; padding: 0px; overflow: hidden; width: auto;">
  150. <table style="display:none;width: auto;" id="add_orderDetails_table" >
  151. <tbody id="add_orderDetails_table_template" >
  152. <tr>
  153. <td align="center"><div style="width: 35px;" name="xh"></div></td>
  154. <td align="center"><input style="width:35px;" type="checkbox" name="ck"/></td>
  155. <td align="left" style="display: none;">
  156. <input name="onhandReportDetailsList[#index#].pnumber" maxlength="32"
  157. type="text" class="inputxt" style="width:130px;" readonly="readonly">
  158. <label class="Validform_label" style="display: none;">货品名称</label>
  159. </td>
  160. <td align="left">
  161. <input name="onhandReportDetailsList[#index#].pname" maxlength="32"
  162. type="text" class="inputxt" style="width:130px;" readonly="readonly">
  163. <label class="Validform_label" style="display: none;">货品名称</label>
  164. </td>
  165. <td align="left">
  166. <input name="onhandReportDetailsList[#index#].specType" maxlength="50" readonly="readonly"
  167. type="text" class="inputxt" style="width:130px;" readonly="readonly">
  168. <label class="Validform_label" style="display: none;">规格型号</label>
  169. </td>
  170. <td align="left">
  171. <t:dictSelect field="onhandReportDetailsList[#index#].measureUnit" type="list" extendJson="{class:'form-control',style:'width:132px'}"
  172. typeGroupCode="metering_calcu_unit" defaultVal="" hasLabel="false" title="计量单位" ></t:dictSelect>
  173. <label class="Validform_label" style="display: none;">计量单位</label>
  174. </td>
  175. <td align="left">
  176. <input name="onhandReportDetailsList[#index#].quantity" maxlength="10"
  177. type="text" class="inputxt" style="width:130px;" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/" onKeyUp="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')">
  178. <label class="Validform_label" style="display: none;">数量</label>
  179. </td>
  180. <td align="left">
  181. <input name="onhandReportDetailsList[#index#].purchasePrice" maxlength="10"
  182. type="hidden" class="inputxt" style="width:130px;">
  183. <!-- <label class="Validform_label" style="display: none;">采购单价</label> -->
  184. </td>
  185. <td align="left">
  186. <input name="onhandReportDetailsList[#index#].money" readonly="readonly"
  187. type="hidden" class="inputxt" style="width:130px;" >
  188. <%-- <label class="Validform_label" style="display: none;">金额</label> --%>
  189. </td>
  190. <td align="left">
  191. <input name="onhandReportDetailsList[#index#].remark" maxlength="100" style="width:130px;"
  192. type="text" class="inputxt">
  193. <label class="Validform_label" style="display: none;">备注</label>
  194. <input name="onhandReportDetailsList[#index#].goodsId" type="text" style="display:none"/>
  195. </td>
  196. </tr>
  197. </tbody>
  198. </table>
  199. </div>
  200. </body>
  201. <script src = "webpage/cn/com/lzt/onhandreport/onhandreport.js"></script>