orders-addByQGD.jsp 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  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. // 应付金额
  19. $("#amountPayable").val(0);
  20. // 整单优惠
  21. $("#discountMoney").val(0);
  22. // 总金额
  23. $("#totalMoney").val(0);
  24. $('#discountMoney').bind("input",function(){
  25. // 优惠金额
  26. var discountMoney = parseFloat($("#discountMoney").val()) || 0;
  27. var totalmoney = parseFloat($("#totalMoney").val()) || 0;
  28. var money = Math.round((totalmoney - discountMoney)*100)/100;
  29. // 应付金额
  30. $("#amountPayable").val(money);
  31. });
  32. // 格式 月和日
  33. function p(s) {
  34. return s < 10 ? '0' + s: s;
  35. }
  36. var myDate = new Date();
  37. //获取当前年
  38. var year=myDate.getFullYear();
  39. //获取当前月
  40. var month=myDate.getMonth()+1;
  41. //获取当前日
  42. var date=myDate.getDate();
  43. var orderDate=year+'-'+p(month)+"-"+p(date)+" "+p(myDate.getHours())+':'+p(myDate.getMinutes())+":"+p(myDate.getSeconds());
  44. $("#orderDate").val(orderDate);
  45. });
  46. function btn_ok(){
  47. var trList = $("#add_orderDetails_table").children("tr");
  48. if(trList.length == 0){
  49. layer.alert("请至少输入一条货品详细信息");
  50. return;
  51. }
  52. $("#btnsub").click();
  53. }
  54. function btn_back(){
  55. window.closeCurrentDialog();
  56. }
  57. function callback(data){
  58. if(data.success){
  59. layer.alert(data.msg, function(index){
  60. frameElement.api.opener.refresh();
  61. window.closeCurrentDialog();
  62. });
  63. }
  64. else{
  65. layer.alert(data.msg);
  66. }
  67. }
  68. </script>
  69. </head>
  70. <body style="overflow-x: hidden;">
  71. <t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" tiptype="1" action="pOrdersController.do?doAdd" callback="callback">
  72. <input id="id" name="id" type="hidden" value="${ordersPage.id }">
  73. <input id="createBy" name="createBy" type="hidden" value="${ordersPage.createBy }">
  74. <input id="updateName" name="updateName" type="hidden" value="${ordersPage.updateName }">
  75. <input id="updateBy" name="updateBy" type="hidden" value="${ordersPage.updateBy }">
  76. <input id="updateDate" name="updateDate" type="hidden" value="${ordersPage.updateDate }">
  77. <input id="bpmStatus" name="bpmStatus" type="hidden" value="${ordersPage.bpmStatus }">
  78. <input id="orderStatus" name="orderStatus" type="hidden" value="${ordersPage.orderStatus }">
  79. <input id="orderOnumber" name="orderOnumber" type="hidden" value="${ordersPage.orderOnumber }">
  80. <input id="sourceType" name="sourceType" type="hidden" value="${empty ordersPage.sourceType?sourceType: ordersPage.sourceType }"/>
  81. <input id="sourceId" name="sourceId" type="hidden" value="${empty ordersPage.sourceId?param.qgdid : ordersPage.sourceId }"/>
  82. <%
  83. String url= "pOrdersController.do?orderDetailsListNew&qgdid=" +(String)request.getParameter("qgdid");
  84. %>
  85. <t:tabs id="tt" iframe="false" tabPosition="top" fit="false" >
  86. <t:tab href='<%=url%>' icon="icon-search" title="采购货品" id="orderDetails" heigth="1000px"></t:tab>
  87. </t:tabs>
  88. <%--底部begin --%>
  89. <table cellpadding="0" cellspacing="1" class="formtable" style="position:fixed;bottom:0px;">
  90. <tr>
  91. <td align="right" width="100px">
  92. <label class="Validform_label"><span color="red" class="requiredIcon">*</span>领料点:</label>
  93. </td>
  94. <td class="value" nowrap>
  95. <input id="warehouseId" name="warehouseId" type="hidden" value='${ordersPage.warehouseId}'>
  96. <input name="warehouseName" class="inputxt" value='${ordersPage.warehouseName}' style="width: 130px" id="warehouseName" readonly="readonly" datatype="*" nullmsg="请选择领料点"/>
  97. <span class="Validform_checktip"></span>
  98. <label class="Validform_label" style="display: none;">领料点</label>
  99. <t:choose hiddenName="warehouseId" hiddenid="id" url="pOrdersController.do?selectReferWareHouse&classname=cn.com.lzt.warehouse.entity.WarehouseEntity&codefield=warehouseCode&namefield=warehouseName" name="list"
  100. icon="icon-search" title="领料点" textname="warehouseName" isclear="true" isInit="true" ></t:choose>
  101. </td>
  102. <td align="right">
  103. <label class="Validform_label">总金额:</label>
  104. </td>
  105. <td class="value">
  106. <input id="totalMoney" name="totalMoney" value='${ordersPage.totalMoney}' type="text" style="width: 120px" class="inputxt" readonly="readonly"><b> 元</b>
  107. <span class="Validform_checktip"></span>
  108. <label class="Validform_label" style="display: none;">总金额</label>
  109. </td>
  110. <%--<td align="right">
  111. <label class="Validform_label">整单优惠:</label>
  112. </td>
  113. <td class="value">
  114. <input id="discountMoney" name="discountMoney" type="text" style="width: 150px" class="inputxt" maxlength="10" ignore="ignore" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/" onKeyUp="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"><b> 元</b>
  115. <span class="Validform_checktip"></span>
  116. <label class="Validform_label" style="display: none;">整单优惠</label>
  117. </td>--%>
  118. <td align="right" colspan="3" width="100px">
  119. </td>
  120. <td align="right" width="100px">
  121. </td>
  122. <td align="right" width="100px">
  123. </td>
  124. <td align="right" width="100px">
  125. </td>
  126. <td align="right" style="display: none;">
  127. <label class="Validform_label">优惠后金额:</label>
  128. </td>
  129. <td class="value" colspan="3" style="display: none;">
  130. <input id="amountPayable" name="amountPayable" value='${ordersPage.amountPayable}' type="text" style="width: 120px" class="inputxt"><b> 元</b>
  131. <span class="Validform_checktip"></span>
  132. <label class="Validform_label" style="display: none;">优惠后金额</label>
  133. </td>
  134. </tr>
  135. <tr style="display:none;">
  136. <td align="right">
  137. <label class="Validform_label">制单人:</label>
  138. </td>
  139. <td class="value">
  140. <input id="createName" name="createName" type="text" style="width: 150px" class="inputxt" readonly="readonly">
  141. <span class="Validform_checktip"></span>
  142. <label class="Validform_label" style="display: none;">制单人</label>
  143. </td>
  144. <td align="right">
  145. <label class="Validform_label">提交人:</label>
  146. </td>
  147. <td class="value">
  148. <input id="orderAuditor" name="orderAuditor" type="text" style="width: 150px" class="inputxt" readonly="readonly">
  149. <span class="Validform_checktip"></span>
  150. <label class="Validform_label" style="display: none;">提交人</label>
  151. </td>
  152. <td align="right">
  153. <label class="Validform_label">制单日期:</label>
  154. </td>
  155. <td class="value">
  156. <input id="createDate" name="createDate" type="text" style="width: 150px" class="inputxt" readonly="readonly">
  157. <span class="Validform_checktip"></span>
  158. <label class="Validform_label" style="display: none;">制单日期</label>
  159. </td>
  160. <td align="right">
  161. <label class="Validform_label">提交日期:</label>
  162. </td>
  163. <td class="value">
  164. <input id="auditDate" name="auditDate" type="text" style="width: 150px" class="inputxt" readonly="readonly">
  165. <span class="Validform_checktip"></span>
  166. <label class="Validform_label" style="display: none;">提交日期</label>
  167. </td>
  168. </tr>
  169. <tr>
  170. <td height="50px" align="center" colspan="8">
  171. <div style="display:none"><input type="submit" id ="btnsub" value=""/></div>
  172. <a style="margin-left:80px" href="#" class="easyui-linkbutton l-btn" iconcls="icon-le-ok" onclick="btn_ok()">提交</a>
  173. <a href="#" class="easyui-linkbutton l-btn" plain="true" iconcls="icon-le-back" onclick="btn_back()">返回</a>
  174. </td>
  175. </tr>
  176. </table>
  177. <%--底部end --%>
  178. </t:formvalid>
  179. <!-- 添加 附表明细 模版 -->
  180. <div id="listdiv" fit="false" style="margin: 0px; padding: 0px; overflow: hidden; width: auto;">
  181. <table style="display:none;width: auto;" id="add_orderDetails_table" >
  182. <tbody id="add_orderDetails_table_template" >
  183. <tr>
  184. <td align="center"><div style="width: 35px;" name="xh"></div></td>
  185. <td align="center"><input style="width:35px;" type="checkbox" name="ck"/></td>
  186. <td align="left" style="display: none;">
  187. <input name="orderDetailsList[#index#].pnumber" maxlength="16"
  188. type="text" class="inputxt" style="width:130px;" readonly="readonly">
  189. <label class="Validform_label" style="display: none;">货品编码</label>
  190. </td>
  191. <td align="left">
  192. <input name="orderDetailsList[#index#].pname" maxlength="32"
  193. type="text" class="inputxt" style="width:120px;">
  194. <label class="Validform_label" style="display: none;">货品名称</label>
  195. </td>
  196. <td align="left">
  197. <input name="orderDetailsList[#index#].specType" maxlength="50" readonly="readonly"
  198. type="text" class="inputxt" style="width:94px;" >
  199. <label class="Validform_label" style="display: none;">规格型号</label>
  200. </td>
  201. <td align="left">
  202. <t:dictSelect field="orderDetailsList[#index#].measureUnit" type="list" extendJson="{class:'form-control',style:'width:80px'}"
  203. typeGroupCode="metering_calcu_unit" defaultVal="" hasLabel="false" title="计量单位" datatype="*"></t:dictSelect>
  204. <label class="Validform_label" style="display: none;">计量单位</label>
  205. </td>
  206. <td align="left">
  207. <input name="orderDetailsList[#index#].quantity" maxlength="10"
  208. type="text" class="inputxt" style="width:80px;" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/" onKeyUp="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')">
  209. <label class="Validform_label" style="display: none;">数量</label>
  210. </td>
  211. <td align="left">
  212. <input name="orderDetailsList[#index#].purchasePrice" maxlength="10" readonly="readonly"
  213. type="text" class="inputxt" style="width:100px;" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/" onKeyUp="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')">
  214. <label class="Validform_label" style="display: none;">采购单价</label>
  215. </td>
  216. <td align="left">
  217. <input name="orderDetailsList[#index#].money" readonly="readonly"
  218. type="text" class="inputxt" style="width:100px;" >
  219. <label class="Validform_label" style="display: none;">金额</label>
  220. </td>
  221. <td align="left">
  222. <input name="orderDetailsList[#index#].supplierName" maxlength="100"
  223. type="text" class="inputxt" style="width:130px;" value="${poVal.supplierName}">
  224. <label class="Validform_label" style="display: none;">供应商</label>
  225. </td>
  226. <td align="left">
  227. <input name="orderDetailsList[#index#].remark" maxlength="100" style="width:136px;"
  228. type="text" class="inputxt">
  229. <label class="Validform_label" style="display: none;">备注</label>
  230. <input name="orderDetailsList[#index#].goodsId" type="text" style="display:none"/>
  231. </td>
  232. </tr>
  233. </tbody>
  234. </table>
  235. </div>
  236. </body>
  237. <script src = "webpage/cn/com/lzt/purchase/orders.js"></script>