orders-update.jsp 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  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. // 区分浏览器 IE浏览器时
  18. if (window.ActiveXObject || "ActiveXObject" in window){
  19. }
  20. // 查看的时候隐藏返回和提交按钮
  21. if($("#viewFlag").val() != null && $("#viewFlag").val() == '1'){
  22. $("#buttomTable").find('tr:eq(2)').remove();
  23. }
  24. // 金额转换方法 科学计数法 转为 数字
  25. var discountMoney = $("#discountMoney").val();
  26. if(discountMoney != null && discountMoney != ''){
  27. $("#discountMoney").val(new Number(discountMoney));
  28. }
  29. var prepaidMoney = $("#prepaidMoney").val();
  30. if(prepaidMoney != null && prepaidMoney != ''){
  31. $("#prepaidMoney").val(new Number(prepaidMoney));
  32. }
  33. var totalMoney = $("#totalMoney").val();
  34. if(totalMoney != null && totalMoney != ''){
  35. $("#totalMoney").val(new Number(totalMoney));
  36. }
  37. var amountPayable = $("#amountPayable").val();
  38. if(amountPayable != null && amountPayable != ''){
  39. $("#amountPayable").val(new Number(amountPayable));
  40. }
  41. });
  42. function btn_ok(){
  43. var trList = $("#add_orderDetails_table").children("tr");
  44. if(trList.length == 0){
  45. layer.alert("请至少输入一条货品详细信息");
  46. return;
  47. }
  48. // 判断是否有重复的货品 begin
  49. $("#btnsub").click();
  50. }
  51. function btn_back(){
  52. window.location.href="pOrdersController.do?list";
  53. }
  54. function callback(data){
  55. if(data.success){
  56. layer.alert(data.msg, function(index){
  57. window.location.href="pOrdersController.do?list";
  58. layer.close(index);
  59. });
  60. }
  61. else{
  62. layer.alert(data.msg);
  63. }
  64. }
  65. </script>
  66. </head>
  67. <body style="overflow-x: hidden;">
  68. <t:formvalid formid="formobj" dialog="false" usePlugin="password" layout="table" tiptype="1" action="pOrdersController.do?doUpdate" callback="callback">
  69. <input id="id" name="id" type="hidden" value="${ordersPage.id }">
  70. <input id="createBy" name="createBy" type="hidden" value="${ordersPage.createBy }">
  71. <input id="updateName" name="updateName" type="hidden" value="${ordersPage.updateName }">
  72. <input id="updateBy" name="updateBy" type="hidden" value="${ordersPage.updateBy }">
  73. <input id="updateDate" name="updateDate" type="hidden" value="${ordersPage.updateDate }">
  74. <input id="bpmStatus" name="bpmStatus" type="hidden" value="${ordersPage.bpmStatus }">
  75. <input id="orderStatus" name="orderStatus" type="hidden" value="${ordersPage.orderStatus }">
  76. <input id="orderOnumber" name="orderOnumber" type="hidden" value="${ordersPage.orderOnumber }">
  77. <input id="viewFlag" name="viewFlag" type="hidden" value="${viewFlag}">
  78. <%--<table cellpadding="0" cellspacing="1" class="formtable">
  79. <tr>
  80. <td align="right" width="100px">
  81. <label class="Validform_label"><span color="red" class="requiredIcon">*</span>单据日期:</label>
  82. </td>
  83. <td class="value">
  84. <input id="orderDate" name="orderDate" type="text" style="width: 150px" value='<fmt:formatDate value='${ordersPage.orderDate}' type="date" pattern="yyyy-MM-dd hh:mm:ss"/>' readonly="readonly">
  85. <span class="Validform_checktip"></span>
  86. <label class="Validform_label" style="display: none;">单据日期</label>
  87. </td>
  88. <td align="right" width="100px">
  89. <label class="Validform_label">单据编码:</label>
  90. </td>
  91. <td class="value">
  92. <input id="orderOnumber" name="orderOnumber" type="text" style="width: 150px" class="inputxt" value='${ordersPage.orderOnumber}' readonly="readonly">
  93. <span class="Validform_checktip"></span>
  94. <label class="Validform_label" style="display: none;">单据编码</label>
  95. </td>
  96. <td align="right" width="100px">
  97. <label class="Validform_label"><span color="red" class="requiredIcon">*</span>供应商名称:</label>
  98. </td>
  99. <td class="value" nowrap>
  100. <input id="supplierId" name="supplierId" type="hidden" value='${ordersPage.supplierId}'>
  101. <input name="supplierName" class="inputxt" style="width: 150px" id="supplierName" readonly="readonly" datatype="*" value='${ordersPage.supplierName}'/>
  102. <span class="Validform_checktip"></span>
  103. <label class="Validform_label" style="display: none;">供应商名称</label>
  104. <t:choose url="pOrdersController.do?selectReferUnits&classname=cn.com.lzt.relatedunits.entity.RelatedUnitsEntity&codefield=unitCode&namefield=unitName" name="list"
  105. icon="icon-search" title="往来单位" inputTextname="supplierId,supplierName" textname="id,unitName" isclear="true" isInit="true" ></t:choose>
  106. </td>
  107. </tr>
  108. <tr>
  109. <td align="right" width="100px">
  110. <label class="Validform_label"><span color="red" class="requiredIcon">*</span>领料点:</label>
  111. </td>
  112. <td class="value" nowrap>
  113. <input id="warehouseId" name="warehouseId" type="hidden" value='${ordersPage.warehouseId}'>
  114. <input name="warehouseName" class="inputxt" style="width: 150px" id="warehouseName" readonly="readonly" datatype="*" value='${ordersPage.warehouseName}'/>
  115. <span class="Validform_checktip"></span>
  116. <label class="Validform_label" style="display: none;">领料点</label>
  117. <t:choose url="pOrdersController.do?selectReferWareHouse&classname=cn.com.lzt.warehouse.entity.WarehouseEntity&codefield=warehouseCode&namefield=warehouseName" name="list"
  118. icon="icon-search" title="领料点" inputTextname="warehouseId,warehouseName" textname="id,warehouseName" isclear="true" isInit="true"></t:choose>
  119. </td>
  120. <td align="right">
  121. <label class="Validform_label">付款账户:</label>
  122. </td>
  123. <td class="value">
  124. <input id="payAccount" name="payAccount" type="text" style="width: 150px" maxlength="20" class="inputxt" value='${ordersPage.payAccount}'>
  125. <span class="Validform_checktip"></span>
  126. <label class="Validform_label" style="display: none;">付款账户</label>
  127. </td>
  128. <td align="right">
  129. <label class="Validform_label">预付定金:</label>
  130. </td>
  131. <td class="value">
  132. <input id="prepaidMoney" name="prepaidMoney" 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')" value='${ordersPage.prepaidMoney}'><b> 元</b>
  133. <span class="Validform_checktip"></span>
  134. <label class="Validform_label" style="display: none;">预付定金</label>
  135. </td>
  136. </tr>
  137. <tr>
  138. <td align="right">
  139. <label class="Validform_label"><span color="red" class="requiredIcon">*</span>经手人:</label>
  140. </td>
  141. <td class="value" nowrap colspan="5">
  142. <input id="handlerPersonId" name="handlerPersonId" type="hidden" value='${ordersPage.handlerPersonId}'>
  143. <input id="handlerPersonName" name="handlerPersonName" class="inputxt" style="width: 150px" value='${ordersPage.handlerPersonName}' datatype="*" readonly="readonly" />
  144. <span class="Validform_checktip"></span>
  145. <label class="Validform_label" style="display: none;">经手人</label>
  146. <t:choose url="pOrdersController.do?selectReferHandlerPerson&classname=org.jeecgframework.web.system.pojo.base.TSBaseUser&codefield=userName&namefield=realName" name="list"
  147. icon="icon-search" title="经手人" inputTextname="handlerPersonId,handlerPersonName" textname="id,realName" isclear="true" isInit="true" ></t:choose>
  148. </td>
  149. </tr>
  150. </table> --%>
  151. <%-- 增加一个div,用于调节页面大小,否则默认太小 --%>
  152. <t:tabs id="tt" iframe="false" tabPosition="top" fit="false">
  153. <t:tab href="pOrdersController.do?orderDetailsList&id=${ordersPage.id}" icon="icon-search" title="采购货品" id="orderDetails"></t:tab>
  154. </t:tabs>
  155. <%--底部begin --%>
  156. <table cellpadding="0" cellspacing="1" class="formtable" id="buttomTable" style="position:fixed;bottom:0px;">
  157. <tr>
  158. <td align="right" width="100px">
  159. <label class="Validform_label"><span color="red" class="requiredIcon">*</span>领料点:</label>
  160. </td>
  161. <td class="value" nowrap>
  162. <input id="warehouseId" name="warehouseId" type="hidden" value='${ordersPage.warehouseId}'>
  163. <input name="warehouseName" class="inputxt" value='${ordersPage.warehouseName}' style="width: 150px" id="warehouseName" readonly="readonly" datatype="*" nullmsg="请选择领料点"/>
  164. <span class="Validform_checktip"></span>
  165. <c:if test="${empty viewFlag}">
  166. <label class="Validform_label" style="display: none;">领料点</label>
  167. <t:choose hiddenName="warehouseId" hiddenid="id" url="pOrdersController.do?selectReferWareHouse&classname=cn.com.lzt.warehouse.entity.WarehouseEntity&codefield=warehouseCode&namefield=warehouseName" name="list"
  168. icon="icon-search" title="领料点" textname="warehouseName" isclear="true" isInit="true" ></t:choose>
  169. </c:if>
  170. </td>
  171. <td align="right">
  172. <label class="Validform_label">总金额:</label>
  173. </td>
  174. <td class="value">
  175. <input id="totalMoney" name="totalMoney" type="text" style="width: 150px" class="inputxt" value='${ordersPage.totalMoney}' readonly="readonly"><b> 元</b>
  176. <span class="Validform_checktip"></span>
  177. <label class="Validform_label" style="display: none;">总金额</label>
  178. </td>
  179. <%--<td align="right">
  180. <label class="Validform_label">整单优惠:</label>
  181. </td>
  182. <td class="value">
  183. <input id="discountMoney" name="discountMoney" type="text" style="width: 150px" maxlength="10" ignore="ignore" class="inputxt" value='${ordersPage.discountMoney}' ignore="ignore" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/" onKeyUp="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"><b> 元</b>
  184. <span class="Validform_checktip"></span>
  185. <label class="Validform_label" style="display: none;">整单优惠</label>
  186. </td> --%>
  187. <td align="right" colspan="3" width="100px">
  188. </td>
  189. <td align="right" width="100px">
  190. </td>
  191. <td align="right" width="100px">
  192. </td>
  193. <td align="right" width="100px">
  194. </td>
  195. <td align="right" style="display: none;">
  196. <label class="Validform_label">优惠后金额(可手动编辑):</label>
  197. </td>
  198. <td class="value" colspan="3" style="display: none;">
  199. <input id="amountPayable" name="amountPayable" type="text" style="width: 150px" class="inputxt" value='${ordersPage.amountPayable}' readonly="readonly"><b>元</b>
  200. <span class="Validform_checktip"></span>
  201. <label class="Validform_label" style="display: none;">优惠后金额</label>
  202. </td>
  203. </tr>
  204. <tr style="display: none;">
  205. <td align="right">
  206. <label class="Validform_label">制单人:</label>
  207. </td>
  208. <td class="value">
  209. <input id="createName" name="createName" type="text" style="width: 150px" class="inputxt" value='${ordersPage.createName}' readonly="readonly">
  210. <span class="Validform_checktip"></span>
  211. <label class="Validform_label" style="display: none;">制单人</label>
  212. </td>
  213. <td align="right">
  214. <label class="Validform_label">提交人:</label>
  215. </td>
  216. <td class="value">
  217. <input id="orderAuditor" name="orderAuditor" type="text" style="width: 150px" class="inputxt" value='${ordersPage.orderAuditor}' readonly="readonly">
  218. <span class="Validform_checktip"></span>
  219. <label class="Validform_label" style="display: none;">提交人</label>
  220. </td>
  221. <td align="right">
  222. <label class="Validform_label">制单日期:</label>
  223. </td>
  224. <td class="value">
  225. <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">
  226. <span class="Validform_checktip"></span>
  227. <label class="Validform_label" style="display: none;">制单日期</label>
  228. </td>
  229. <td align="right">
  230. <label class="Validform_label">提交日期:</label>
  231. </td>
  232. <td class="value">
  233. <input id="auditDate" name="auditDate" type="text" style="width: 150px" class="inputxt" value='<fmt:formatDate value='${ordersPage.auditDate}' type="date" pattern="yyyy-MM-dd hh:mm:ss"/>' readonly="readonly">
  234. <span class="Validform_checktip"></span>
  235. <label class="Validform_label" style="display: none;">提交日期</label>
  236. <input name="viewFlag" id="viewFlag" value="${viewFlag}" style="display:none"/>
  237. </td>
  238. </tr>
  239. <tr>
  240. <td height="50px" align="center" colspan="8">
  241. <a style="margin-left:80px" href="#" class="easyui-linkbutton l-btn" plain="true" iconcls="icon-le-back" onclick="btn_back()">返回</a>
  242. <div style="display:none"><input type="submit" id ="btnsub" value=""/></div>
  243. <a href="#" class="easyui-linkbutton l-btn" iconcls="icon-le-ok" onclick="btn_ok()">提交</a>
  244. </td>
  245. </tr>
  246. </table>
  247. <%--底部end --%>
  248. </t:formvalid>
  249. <!-- 添加 附表明细 模版 -->
  250. <%-- <div style="width: auto;height: 200px;"></div>--%>
  251. <table style="display:none" id="add_orderDetails_table">
  252. <tbody id="add_orderDetails_table_template">
  253. <tr>
  254. <td align="center"><div style="width: 35px;" name="xh"></div></td>
  255. <td align="center"><input style="width:35px;" type="checkbox" name="ck"/></td>
  256. <td align="left">
  257. <input name="orderDetailsList[#index#].pname" maxlength="32"
  258. type="text" class="inputxt" style="width:130px;"
  259. >
  260. <label class="Validform_label" style="display: none;">货品名称</label>
  261. </td>
  262. <td align="left">
  263. <input name="orderDetailsList[#index#].specType" maxlength="50"
  264. type="text" class="inputxt" style="width:94px;"
  265. >
  266. <label class="Validform_label" style="display: none;">规格型号</label>
  267. </td>
  268. <td align="left">
  269. <t:dictSelect field="orderDetailsList[#index#].measureUnit" type="list" extendJson="{class:'form-control',style:'width:80px'}" readonly="readonly"
  270. typeGroupCode="metering_calcu_unit" defaultVal="" hasLabel="false" title="计量单位" datatype="*"></t:dictSelect>
  271. <label class="Validform_label" style="display: none;">计量单位</label>
  272. </td>
  273. <td align="left">
  274. <input name="orderDetailsList[#index#].quantity" maxlength="10" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/" onKeyUp="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  275. type="text" class="inputxt" style="width:80px;"readonly="readonly"
  276. datatype="*">
  277. <label class="Validform_label" style="display: none;">数量</label>
  278. </td>
  279. <td align="left">
  280. <input name="orderDetailsList[#index#].purchasePrice" maxlength="10" readonly="readonly"
  281. type="text" class="inputxt" style="width:100px;"readonly="readonly"
  282. datatype="*">
  283. <label class="Validform_label" style="display: none;">采购单价</label>
  284. </td>
  285. <td align="left">
  286. <input name="orderDetailsList[#index#].money" readonly="readonly"
  287. type="text" class="inputxt" style="width:100px;"
  288. >
  289. <label class="Validform_label" style="display: none;">金额</label>
  290. </td>
  291. <td align="left">
  292. <input name="orderDetailsList[#index#].supplierName" maxlength="100"
  293. type="hidden" class="inputxt" style="width:130px;" >
  294. <label class="Validform_label" style="display: none;">供应商</label>
  295. </td>
  296. <td align="left">
  297. <input name="orderDetailsList[#index#].remark" maxlength="100"
  298. type="text" class="inputxt" style="width:136px;"
  299. >
  300. <label class="Validform_label" style="display: none;">备注</label>
  301. <input name="orderDetailsList[#index#].goodsId" type="text" style="display:none"/>
  302. </td>
  303. </tr>
  304. </tbody>
  305. </table>
  306. </body>
  307. <script src = "webpage/cn/com/lzt/purchase/orders.js"></script>