materialsusing-add.jsp 9.2 KB

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