onhandreportInitial-update.jsp 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <title>订单表</title>
  7. <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  8. <script src="plug-in/layer/layer.js"></script>
  9. <script type="text/javascript">
  10. $(document).ready(function(){
  11. $('#tt').tabs({
  12. onSelect:function(title){
  13. $('#tt .panel-body').css('width','auto');
  14. }
  15. });
  16. $(".tabs-wrap").css('width','100%');
  17. // 查看的时候隐藏返回和提交按钮
  18. if($("#viewFlag").val() != null && $("#viewFlag").val() == '1'){
  19. $("#warehouse_choose").attr("onclick","");
  20. $("#warehouse_clear").attr("onclick","");
  21. $("#buttomTable").find('tr:eq(2)').remove();
  22. }
  23. // 金额转换方法 科学计数法 转为 数字
  24. var totalMoney = $("#totalMoney").val();
  25. if(totalMoney != null && totalMoney != ''){
  26. $("#totalMoney").val(new Number(totalMoney));
  27. }
  28. });
  29. function btn_ok(){
  30. var trList = $("#add_orderDetails_table").children("tr");
  31. if(trList.length == 0){
  32. layer.alert("请至少输入一条货品详细信息");
  33. return;
  34. }
  35. // 判断是否有重复的货品 begin
  36. //var goodsCodeArr = new Array();
  37. /// for (var i=0;i<trList.length;i++) {
  38. // goodsCodeArr[i] = $("#add_orderDetails_table").find("tr").eq(i).find(":text").eq(0).val();
  39. // }
  40. // var s = goodsCodeArr.join(",")+",";
  41. // for(var i=0;i<goodsCodeArr.length;i++) {
  42. // if(s.replace(goodsCodeArr[i]+",","").indexOf(goodsCodeArr[i]+",")>-1) {
  43. // layer.alert("输入的货品不可以重复");
  44. // return;
  45. // }
  46. // }
  47. $("#btnsub").click();
  48. }
  49. function btn_back(){
  50. window.location.href="onhandReportController.do?listInitial";
  51. }
  52. function callback(data){
  53. if(data.success){
  54. layer.alert(data.msg, function(index){
  55. window.location.href="onhandReportController.do?listInitial";
  56. layer.close(index);
  57. });
  58. }
  59. else{
  60. layer.alert(data.msg);
  61. }
  62. }
  63. </script>
  64. </head>
  65. <body style="overflow-x: hidden;">
  66. <t:formvalid formid="formobj" dialog="false" usePlugin="password" layout="table" tiptype="1" action="onhandReportController.do?doUpdate" callback="callback">
  67. <input id="id" name="id" type="hidden" value="${ordersPage.id }">
  68. <input id="createBy" name="createBy" type="hidden" value="${ordersPage.createBy }">
  69. <input id="updateName" name="updateName" type="hidden" value="${ordersPage.updateName }">
  70. <input id="updateBy" name="updateBy" type="hidden" value="${ordersPage.updateBy }">
  71. <input id="updateDate" name="updateDate" type="hidden" value="${ordersPage.updateDate }">
  72. <input id="bpmStatus" name="bpmStatus" type="hidden" value="${ordersPage.bpmStatus }">
  73. <input id="orderStatus" name="orderStatus" type="hidden" value="${ordersPage.orderStatus }">
  74. <input id="orderOnumber" name="orderOnumber" type="hidden" value="${ordersPage.orderOnumber }">
  75. <input id="totalMoney" name="totalMoney" type="hidden" value="${ordersPage.totalMoney}">
  76. <%-- 增加一个div,用于调节页面大小,否则默认太小 --%>
  77. <t:tabs id="tt" iframe="false" tabPosition="top" fit="false">
  78. <t:tab href="onhandReportController.do?OnhandReportDetailsList&id=${ordersPage.id}" icon="icon-search" title="物料上报存货列表" id="orderDetails"></t:tab>
  79. </t:tabs>
  80. <%--底部begin --%>
  81. <table cellpadding="0" cellspacing="1" class="formtable" id="buttomTable" style="position:fixed;bottom:0px;">
  82. <tr>
  83. <td align="right" width="100px">
  84. <label class="Validform_label"><span color="red" class="requiredIcon">*</span>领料点:</label>
  85. </td>
  86. <td class="value" nowrap>
  87. <input id="warehouseId" name="warehouseId" type="hidden" value='${ordersPage.warehouseId}'><%-- '${ordersPage.warehouseId}' --%>
  88. <input name="warehouseName" class="inputxt" value='${ordersPage.warehouseName}' style="width: 150px" id="warehouseName" readonly="readonly" datatype="*" nullmsg="请选择领料点"/><%-- '${ordersPage.warehouseName}' --%>
  89. <c:if test="${empty viewFlag}">
  90. <span class="Validform_checktip"></span>
  91. <label class="Validform_label" style="display: none;">领料点</label>
  92. <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"
  93. icon="icon-search" title="领料点" textname="warehouseName" isclear="true" isInit="true" ></t:choose>
  94. </c:if>
  95. </td>
  96. <td align="right">
  97. <label class="Validform_label">上报月份:</label>
  98. </td>
  99. <td class="value">
  100. <input id="orderDate" name="orderDate" type="text" style="width: 150px" class="inputxt" value='${ordersPage.orderDate}' readonly="readonly" >
  101. <span class="Validform_checktip"></span>
  102. <label class="Validform_label" style="display: none;">上报月份</label>
  103. </td>
  104. </tr>
  105. <tr>
  106. <td align="right">
  107. <label class="Validform_label">制单人:</label>
  108. </td>
  109. <td class="value">
  110. <input id="createName" name="createName" type="text" style="width: 150px" class="inputxt" value='${ordersPage.createName}' readonly="readonly">
  111. <span class="Validform_checktip"></span>
  112. <label class="Validform_label" style="display: none;">制单人</label>
  113. </td>
  114. <td align="right">
  115. <label class="Validform_label">制单日期:</label>
  116. </td>
  117. <td class="value">
  118. <input id="createDate" name="createDate" type="text" style="width: 150px" class="inputxt" value='<fmt:formatDate value='${ordersPage.createDate}' type="date" pattern="yyyy-MM-dd hh:mm:ss"/>' readonly="readonly">
  119. <span class="Validform_checktip"></span>
  120. <label class="Validform_label" style="display: none;">制单日期</label>
  121. </td>
  122. </tr>
  123. <c:if test="${empty viewFlag}">
  124. <tr>
  125. <td height="50px" align="center" colspan="8">
  126. <div style="display:none"><input type="submit" id ="btnsub" value=""/></div>
  127. <a style="margin-left:80px" href="#" class="easyui-linkbutton l-btn" iconcls="icon-le-ok" onclick="btn_ok()">确定 </a>
  128. <a href="#" class="easyui-linkbutton l-btn" plain="true" iconcls="icon-le-back" onclick="btn_back()">返回</a>
  129. </td>
  130. </tr>
  131. </c:if>
  132. </table>
  133. <%--底部end --%>
  134. </t:formvalid>
  135. <!-- 添加 附表明细 模版 -->
  136. <%-- <div style="width: auto;height: 200px;"></div>--%>
  137. <table style="display:none" id="add_orderDetails_table">
  138. <tbody id="add_orderDetails_table_template">
  139. <tr>
  140. <td align="center"><div style="width: 35px;" name="xh"></div></td>
  141. <td align="center"><input style="width:35px;" type="checkbox" name="ck"/></td>
  142. <td align="left" style="display: none;">
  143. <input name="onhandReportDetailsList[#index#].pnumber" maxlength="16"
  144. class="inputxt" style="width:130px;" readonly="readonly">
  145. <label class="Validform_label" style="display: none;">货品编码</label>
  146. </td>
  147. <td align="left">
  148. <input name="onhandReportDetailsList[#index#].pname" maxlength="32"
  149. type="text" class="inputxt" style="width:130px;" readonly="readonly"
  150. >
  151. <label class="Validform_label" style="display: none;">货品名称</label>
  152. </td>
  153. <td align="left">
  154. <input name="onhandReportDetailsList[#index#].specType" maxlength="50"
  155. type="text" class="inputxt" style="width:130px;" readonly="readonly"
  156. >
  157. <label class="Validform_label" style="display: none;">规格型号</label>
  158. </td>
  159. <td align="left">
  160. <t:dictSelect field="onhandReportDetailsList[#index#].measureUnit" type="list" extendJson="{class:'form-control',style:'width:132px'}"
  161. typeGroupCode="metering_calcu_unit" defaultVal="" hasLabel="false" title="计量单位" datatype="*" ></t:dictSelect>
  162. <label class="Validform_label" style="display: none;">计量单位</label>
  163. </td>
  164. <td align="left">
  165. <input name="onhandReportDetailsList[#index#].quantity" maxlength="10" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/" onKeyUp="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  166. type="text" class="inputxt" style="width:130px;"
  167. datatype="*">
  168. <label class="Validform_label" style="display: none;">数量</label>
  169. </td>
  170. <td align="left">
  171. <input name="onhandReportDetailsList[#index#].purchasePrice" maxlength="10" "
  172. type="hidden" class="inputxt" style="width:130px;"
  173. datatype="*">
  174. <%-- <label class="Validform_label" style="display: none;">采购单价</label> --%>
  175. </td>
  176. <td align="left">
  177. <input name="onhandReportDetailsList[#index#].money" readonly="readonly"
  178. type="hidden" class="inputxt" style="width:130px;"
  179. >
  180. <%-- <label class="Validform_label" style="display: none;">金额</label> --%>
  181. </td>
  182. <td align="left">
  183. <input name="onhandReportDetailsList[#index#].remark" maxlength="100"
  184. type="text" class="inputxt" style="width:130px;"
  185. >
  186. <label class="Validform_label" style="display: none;">备注</label>
  187. <input name="onhandReportDetailsList[#index#].goodsId" type="text" style="display:none"/>
  188. </td>
  189. </tr>
  190. </tbody>
  191. </table>
  192. </body>
  193. <script src = "webpage/cn/com/lzt/onhandreport/onhandreport.js"></script>