orders-proc-update.jsp 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  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="${webBasePath}/webpage/cn/com/lzt/useractiviti/select_user_tools.js"></script>
  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. // 区分浏览器 IE浏览器时
  19. if (window.ActiveXObject || "ActiveXObject" in window){
  20. $('#discountMoney').bind("input",function(){
  21. // 优惠金额
  22. var discountMoney = parseFloat($("#discountMoney").val()) || 0;
  23. var totalmoney = parseFloat($("#totalMoney").val()) || 0;
  24. var money = Math.round((totalmoney - discountMoney)*100)/100;
  25. // 应付金额
  26. $("#amountPayable").val(money);
  27. });
  28. // 非IE浏览器时
  29. }else{
  30. $('#discountMoney').bind("input",function(){
  31. // 优惠金额
  32. var discountMoney = parseFloat($("#discountMoney").val()) || 0;
  33. var totalmoney = parseFloat($("#totalMoney").val()) || 0;
  34. var money = Math.round((totalmoney - discountMoney)*100)/100;
  35. // 应付金额
  36. $("#amountPayable").val(money);
  37. });
  38. }
  39. // 查看的时候隐藏返回和提交按钮
  40. if($("#viewFlag").val() != null && $("#viewFlag").val() == '1'){
  41. $("#buttomTable").find('tr:eq(2)').remove();
  42. }
  43. // 金额转换方法 科学计数法 转为 数字
  44. var discountMoney = $("#discountMoney").val();
  45. if(discountMoney != null && discountMoney != ''){
  46. $("#discountMoney").val(new Number(discountMoney));
  47. }
  48. var prepaidMoney = $("#prepaidMoney").val();
  49. if(prepaidMoney != null && prepaidMoney != ''){
  50. $("#prepaidMoney").val(new Number(prepaidMoney));
  51. }
  52. var totalMoney = $("#totalMoney").val();
  53. if(totalMoney != null && totalMoney != ''){
  54. $("#totalMoney").val(new Number(totalMoney));
  55. }
  56. var amountPayable = $("#amountPayable").val();
  57. if(amountPayable != null && amountPayable != ''){
  58. $("#amountPayable").val(new Number(amountPayable));
  59. }
  60. });
  61. function btn_ok(){
  62. $("#btnsub").click();
  63. }
  64. function btn_back(){
  65. window.location.href="ordersController.do?list";
  66. }
  67. function callback(data){
  68. if(data.success){
  69. layer.alert(data.msg, function(index){
  70. window.location.href="ordersController.do?list";
  71. layer.close(index);
  72. });
  73. }
  74. else{
  75. layer.alert(data.msg);
  76. }
  77. }
  78. function callbackTable(msg){
  79. window.parent.callbackTable(msg);
  80. }
  81. function popWriteOption1(title,width,height,buttonTitle,taskId,nextNodeCount,nextNodeId){
  82. var trList = $("#add_orderProducts_table").children("tr");
  83. var msg = checkUnknownRow(trList);
  84. if(msg.length > 0){
  85. layer.alert(msg);
  86. return;
  87. }
  88. resetDisabled();
  89. console.info($('#formobj').serialize());
  90. $.ajax({
  91. cache: true,
  92. type: "POST",
  93. url:"ordersController.do?doUpdate",
  94. data:$('#formobj').serialize(),// 你的formid
  95. dataType:"json",
  96. async: false,
  97. success: function(data) {
  98. //dealProcFlowNoOption(title,taskId,nextNodeId,nextNodeCount,false);
  99. popWriteOption(title,width,height,buttonTitle,taskId,nextNodeCount,nextNodeId);
  100. }});
  101. // popWriteOption(title,width,height,buttonTitle,taskId,nextNodeCount,nextNodeId);
  102. }
  103. </script>
  104. </head>
  105. <body style="overflow-x: hidden;">
  106. <t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" tiptype="1" action="ordersController.do?doUpdate" callback="callback">
  107. <input id="id" name="id" type="hidden" value="${ordersPage.id }">
  108. <input id="createBy" name="createBy" type="hidden" value="${ordersPage.createBy }">
  109. <input id="updateName" name="updateName" type="hidden" value="${ordersPage.updateName }">
  110. <input id="updateBy" name="updateBy" type="hidden" value="${ordersPage.updateBy }">
  111. <input id="updateDate" name="updateDate" type="hidden" value="${ordersPage.updateDate }">
  112. <input id="bpmStatus" name="bpmStatus" type="hidden" value="${ordersPage.bpmStatus }">
  113. <input id="orderStatus" name="orderStatus" type="hidden" value="${ordersPage.orderStatus }">
  114. <%-- 增加一个div,用于调节页面大小,否则默认太小
  115. <table cellpadding="0" cellspacing="1" class="mtable">
  116. <tr>
  117. <td align="right"
  118. <label class="Validform_label">领料点:</label>
  119. </td>
  120. <td class="value">
  121. <input id="warehouseId" name="warehouseId" type="hidden" value='${ordersPage.warehouseId}'>
  122. <input name="warehouseName" class="inputxt" type="text" value='${ordersPage.warehouseName}' style="width: 150px" id="warehouseName" readonly="readonly" datatype="*" nullmsg="请选择领料点"/>
  123. </td>
  124. <td align="right">
  125. <label class="Validform_label">总金额:</label>
  126. </td>
  127. <td class="value">
  128. <input id="totalMoney" name="totalMoney" type="text" style="width: 150px" class="inputxt" value='${ordersPage.totalMoney}' readonly="readonly"><b> 元</b>
  129. <span class="Validform_checktip"></span>
  130. <label class="Validform_label" style="display: none;">总金额</label>
  131. </td>
  132. </tr>
  133. </table>--%>
  134. <t:tabs id="tt" iframe="false" tabPosition="top" fit="false">
  135. <t:tab href="ordersController.do?orderProductsProcUpdateList&id=${ordersPage.id}" icon="icon-search" title="采购货品" id="orderProducts" ></t:tab>
  136. </t:tabs>
  137. <%--底部begin --%>
  138. <table cellpadding="0" cellspacing="1" class="formtable" id="buttomTable" style="position:fixed;bottom:0px;">
  139. <tr>
  140. <td align="right">
  141. <label class="Validform_label">领料点:</label>
  142. </td>
  143. <td class="value">
  144. <input id="warehouseId" name="warehouseId" type="hidden" value='${ordersPage.warehouseId}'>
  145. <input name="warehouseName" class="inputxt" type="text" value='${ordersPage.warehouseName}' style="width: 150px" id="warehouseName" readonly="readonly" datatype="*" nullmsg="请选择领料点"/>
  146. </td>
  147. <td align="right">
  148. <label class="Validform_label">申购月份:</label>
  149. </td>
  150. <td>
  151. <t:dictSelect field="orderMonths" id="orderMonths" type="list"
  152. dictTable="t_b_ordermonths" dictField="id"
  153. dictText="ordermonths_name" datatype="*" readonly="readonly"
  154. defaultVal="${ordersPage.orderMonths}"
  155. hasLabel="false" title="申购月份"></t:dictSelect>
  156. <span class="Validform_checktip"></span>
  157. <label class="Validform_label" style="display: none;">申购月份</label>
  158. </td>
  159. <td align="right">
  160. <label class="Validform_label">总金额(元):</label>
  161. </td>
  162. <td class="value">
  163. <input id="totalMoney" name="totalMoney" type="text" style="width: 150px" class="inputxt" value='${ordersPage.totalMoney}' readonly="readonly">
  164. <span class="Validform_checktip"></span>
  165. <label class="Validform_label" style="display: none;">总金额</label>
  166. </td>
  167. </tr>
  168. <%--
  169. <tr >
  170. <td align="right">
  171. <label class="Validform_label">保洁类金额:</label>
  172. </td>
  173. <td class="value">
  174. <input id="baojieSum" name="baojieSum" type="text" style="width: 150px" class="inputxt" value='${ordersPage.baojieSum}' readonly="readonly"><b> 元</b>
  175. <span class="Validform_checktip"></span>
  176. <label class="Validform_label" style="display: none;">保洁类金额</label>
  177. </td>
  178. <td align="right">
  179. <label class="Validform_label">工程类金额:</label>
  180. </td>
  181. <td class="value">
  182. <input id="gongchengSum" name="gongchengSum" type="text" style="width: 150px" class="inputxt" value='${ordersPage.gongchengSum}' readonly="readonly"><b> 元</b>
  183. <span class="Validform_checktip"></span>
  184. <label class="Validform_label" style="display: none;">工程类金额</label>
  185. </td>
  186. <td align="right">
  187. <label class="Validform_label">办公类金额:</label>
  188. </td>
  189. <td class="value">
  190. <input id="bangongSum" name="bangongSum" type="text" style="width: 150px" class="inputxt" value='${ordersPage.bangongSum}' readonly="readonly"><b> 元</b>
  191. <span class="Validform_checktip"></span>
  192. <label class="Validform_label" style="display: none;">办公类金额</label>
  193. </td> --%>
  194. <td align="right">
  195. </td>
  196. <td align="right">
  197. </td><td align="right">
  198. </td>
  199. </tr>
  200. <tr>
  201. <td align="right">
  202. <label class="Validform_label">
  203. <font color="#FF0000"></font>
  204. 备注说明:
  205. </label>
  206. </td>
  207. <td class="value" colspan="3" >
  208. <div style="text-align:left;">
  209. <textarea style="width:680px;height: 20px;"disabled="disabled" class="inputxt" rows="3" id="description" maxlength="200" name="description" >${ordersPage.description}</textarea></div>
  210. <label class="Validform_label" style="display: none;">备注说明</label>
  211. </td>
  212. </tr>
  213. <tr>
  214. <td colspan="4" style="text-align:center;>
  215. <input id="eli" value="${flage}" type="hidden"/>
  216. <c:forEach items="${transitionList}" var="trans">
  217. <li style="list-style:none;"><button class="btn btn-default" style="width:80px; height:35px;border-radius:5px;background:#3275C6;border:0 none;margin-right:5px;color:white;" type="button" id="${trans.nextnode}"
  218. onclick="popWriteOption1('<t:mutiLang langKey="common.task.operate"/>',600,300,'${trans.Transition }','${taskId}',${nextCodeCount},'${trans.nextnode}','${trans.nextnodeName}')" >${trans.Transition }<tton>
  219. </c:forEach>
  220. </td>
  221. </tr>
  222. </table>
  223. <%--底部end --%>
  224. </t:formvalid>
  225. <!-- 添加 附表明细 模版 -->
  226. <%-- <div style="width: auto;height: 200px;"></div>--%>
  227. <table style="display:none" id="add_orderProducts_table">
  228. <tbody id="add_orderProducts_table_template">
  229. <tr>
  230. <td align="center">
  231. <div style="width: 35px;" name="xh"></div>
  232. <input name="orderProductsList[#index#].supplierId" type="hidden" />
  233. <input name="orderProductsList[#index#].supplierName" type="hidden" />
  234. </td>
  235. <td align="center"><input style="width:35px;" type="checkbox" name="ck"/></td>
  236. <td align="left" style="display: none;">
  237. <input name="orderProductsList[#index#].pnumber" maxlength="16"
  238. type="text" class="inputxt" style="width:130px;"
  239. >
  240. <label class="Validform_label" style="display: none;">货品编码</label>
  241. </td>
  242. <td align="left">
  243. <input name="orderProductsList[#index#].pname" maxlength="32"
  244. type="text" class="inputxt" style="width:130px;"
  245. >
  246. <label class="Validform_label" style="display: none;">货品名称</label>
  247. </td>
  248. <td align="left">
  249. <input name="orderProductsList[#index#].specType" maxlength="50"
  250. type="text" class="inputxt" style="width:130px;"
  251. >
  252. <label class="Validform_label" style="display: none;">规格型号</label>
  253. </td>
  254. <td align="left">
  255. <t:dictSelect field="orderProductsList[#index#].measureUnit" type="list" extendJson="{class:'form-control',style:'width:132px'}"
  256. typeGroupCode="metering_calcu_unit" defaultVal="" hasLabel="false" title="计量单位" datatype="*"></t:dictSelect>
  257. <label class="Validform_label" style="display: none;">计量单位</label>
  258. </td>
  259. <td align="left">
  260. <input name="orderProductsList[#index#].quantity" maxlength="10" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/" onKeyUp="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  261. type="text" class="inputxt" style="width:130px;"
  262. datatype="*">
  263. <label class="Validform_label" style="display: none;">数量</label>
  264. </td>
  265. <td align="left">
  266. <input name="orderProductsList[#index#].purchasePrice" maxlength="10" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/" onKeyUp="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')"
  267. type="text" class="inputxt" style="width:130px;" readonly="readonly"
  268. datatype="*">
  269. <label class="Validform_label" style="display: none;">采购单价</label>
  270. </td>
  271. <td align="left">
  272. <input name="orderProductsList[#index#].money" readonly="readonly"
  273. type="text" class="inputxt" style="width:130px;"
  274. >
  275. <label class="Validform_label" style="display: none;">金额</label>
  276. </td>
  277. <td align="left">
  278. <input name="orderProductsList[#index#].lastMonthUsedAmount" readonly="readonly"
  279. type="text" class="inputxt" style="width:130px;">
  280. <label class="Validform_label" style="display: none;">前两月使用数</label>
  281. </td>
  282. <td align="left">
  283. <input name="orderProductsList[#index#].onHandAmount" readonly="readonly"
  284. type="text" class="inputxt" style="width:130px;">
  285. <label class="Validform_label" style="display: none;">现存量</label>
  286. </td>
  287. <td align="left">
  288. <input name="orderProductsList[#index#].remark" maxlength="100"
  289. type="text" class="inputxt" style="width:130px;">
  290. <label class="Validform_label" style="display: none;">备注</label>
  291. </td>
  292. </tr>
  293. </tbody>
  294. </table>
  295. </body>
  296. <script src = "webpage/cn/com/lzt/orders/orders-proc.js"></script>