infoPurchaseOrder.jsp 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. <%@ page language="java" contentType="text/html;charset=UTF-8"
  2. pageEncoding="UTF-8"%>
  3. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
  8. <META content=IE=edge,chrome=1 http-equiv=X-UA-Compatible>
  9. <META name=description content="">
  10. <META name=viewport content=width=device-width>
  11. <title>查看订单</title>
  12. <link href="${ pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  13. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css"
  14. rel="stylesheet" type="text/css" />
  15. <LINK rel=stylesheet href="/shares/single/single_files/prism.css">
  16. <LINK rel=stylesheet href="/shares/single/single_files/website.css">
  17. <LINK rel=stylesheet href="/shares/single/single_files/drawingboard.css">
  18. <%-- <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" --%>
  19. <!-- type="text/javascript"></script> -->
  20. <script type="text/javascript" src="/shares/js/jquery-1.8.2.js"></script>
  21. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/ligerui.all.js"
  22. type="text/javascript"></script>
  23. <script type="text/javascript" src="/shares/js/constant.js"></script>
  24. <script type="text/javascript" src="/shares/js/common.js"></script>
  25. <script type="text/javascript" src="/shares/js/file.js"></script>
  26. <script type="text/javascript" src="${pageContext.request.contextPath}/yw/contract/contractPurchaseOrder/js/purchaseOrder.js"></script>
  27. <STYLE type="text/css">
  28. body {
  29. background-color: white;
  30. }
  31. </STYLE>
  32. <script type="text/javascript">
  33. $(document).ready(function() {
  34. $("#addBuyInfo").remove();
  35. $(".substract1").remove();
  36. $(".TextDisplay").each(function (i, v) { // 将input隐藏,显示该input的文本值(不带文本框)
  37. $(v).hide();
  38. if ($(v).val() == '') {
  39. $(v).after('');
  40. } else {
  41. $(v).after($(v).val());
  42. }
  43. });
  44. //点击添加tr
  45. $("#addBuyInfo").click(function () {
  46. getMaterial();
  47. });
  48. //删除某行数据
  49. $(".substract1").live('click', function () {
  50. var obj = $(this).parent().parent();
  51. $.ligerDialog.confirm('确定删除该行', function (yes) {
  52. if (yes == true) {
  53. obj.remove();
  54. addIdAndName();
  55. calTotalAmount();
  56. }
  57. });
  58. });
  59. //计算物品合计金额
  60. $(".qty").live('blur', function () {
  61. calTotalAmount();
  62. });
  63. $(".price").live('blur', function () {
  64. calTotalAmount();
  65. });
  66. $(".cess").live('blur', function () {
  67. calTotalAmount();
  68. });
  69. });
  70. function checkForm() {
  71. var rs = true;
  72. rs = $.validate({name: "contractPurchaseOrder.contractNumber", model: [{type: "require", msg: "请选择合同!"}]});
  73. return rs;
  74. }
  75. function saveContractNumber(){
  76. var result = saveForm("contractPurchaseOrderAction.do", "#cform");
  77. if(result){
  78. closeTabAndRefreshOpener();
  79. }
  80. }
  81. </script>
  82. </head>
  83. <body>
  84. <form action="contractPurchaseOrderAction.do" method="post" id="cform" name="cform"
  85. onsubmit="return checkForm();">
  86. <input id="tabid" name="tabid" value="${param.tabid }" type="hidden"/>
  87. <input type="hidden" id="universalid" name="contractPurchaseOrder.universalid" value="${contractPurchaseOrder.universalid}">
  88. <input type="hidden" id="task" name="task" value="saveContractNumber">
  89. <div id="title" class="form-button" style="width: 100%;">
  90. <c:if test="${contractPurchaseOrder.source == 1 && empty contractPurchaseOrder.contractNumber}">
  91. <input type="button" onclick="saveContractNumber()" class="l-button" value="保存合同" />
  92. </c:if>
  93. <input onclick="closeTabUseInOA();" type="button" value="关闭" class="l-button">
  94. </div>
  95. <div class="container-layout">
  96. <!-- <div class="container"> -->
  97. <div class="forum-container">
  98. <center>
  99. <table class="l-table-edit line" style="width: 100%;">
  100. <tr>
  101. <th colspan="4">采购订单</th>
  102. </tr>
  103. <tr>
  104. <td class="l-table-edit-text" width="20%">采购订单编号:</td>
  105. <td class="l-table-edit-td" width="30%">
  106. ${contractPurchaseOrder.orderNumber }
  107. </td>
  108. <td class="l-table-edit-text" width="20%">采购订单名称:</td>
  109. <td class="l-table-edit-td" width="30%">
  110. ${contractPurchaseOrder.orderName }
  111. </td>
  112. </tr>
  113. <c:choose>
  114. <c:when test="${contractPurchaseOrder.source == 0}">
  115. <tr>
  116. <td class="l-table-edit-text">来源 :</td>
  117. <td class="l-table-edit-td" colspan="3">
  118. </td>
  119. </tr>
  120. </c:when>
  121. <c:when test="${contractPurchaseOrder.source == 1}">
  122. <tr>
  123. <td class="l-table-edit-text">来源 :</td>
  124. <td class="l-table-edit-td">
  125. 合同
  126. </td>
  127. <td class="l-table-edit-text">合同:</td>
  128. <td class="l-table-edit-td">
  129. <c:choose>
  130. <c:when test="${empty contractPurchaseOrder.contractNumber}">
  131. <input type="hidden" id="contractId" name="contractPurchaseOrder.contractId" value="${contractPurchaseOrder.contractId }" />
  132. <input type="text" readonly="readonly" id="contractNumber" name="contractPurchaseOrder.contractNumber" value="${contractPurchaseOrder.contractNumber }">
  133. <input type="hidden" id="contractName" name="contractPurchaseOrder.contractName" value="${contractPurchaseOrder.contractName }">
  134. <img id="searchContract" class="fee" onClick="selectContract()" src="${pageContext.request.contextPath}/images/sousuo.png" style="height: 20px; width: 20px; cursor: pointer;">
  135. <input id="clearContractBtn" name="clearContractBtn" type="button" class="button_fj" value="清除" onclick="clearContract()"/>
  136. <input type="hidden" id="purchaseId" name="contractPurchaseOrder.purchaseId" value="${contractPurchaseOrder.purchaseId }" />
  137. <input type="hidden" id="purchaseNumber" name="contractPurchaseOrder.purchaseNumber" value="${contractPurchaseOrder.purchaseNumber }"/>
  138. </c:when>
  139. <c:otherwise>
  140. ${contractPurchaseOrder.contractNumber }
  141. </c:otherwise>
  142. </c:choose>
  143. </td>
  144. </tr>
  145. </c:when>
  146. <c:when test="${contractPurchaseOrder.source == 2}">
  147. <tr>
  148. <td class="l-table-edit-text">来源 :</td>
  149. <td class="l-table-edit-td">
  150. 采购申请单
  151. </td>
  152. <td class="l-table-edit-text">采购申请单:</td>
  153. <td class="l-table-edit-td">
  154. ${contractPurchaseOrder.purchaseNumber }
  155. </td>
  156. </tr>
  157. </c:when>
  158. </c:choose>
  159. <tr>
  160. <td class="l-table-edit-text">供应商 :</td>
  161. <td class="l-table-edit-td">
  162. ${contractPurchaseOrder.supplierName }
  163. </td>
  164. <td class="l-table-edit-text">订单状态:</td>
  165. <td class="l-table-edit-td">
  166. <c:choose>
  167. <c:when test="${contractPurchaseOrder.orderStatus == 0}">未开始</c:when>
  168. <c:when test="${contractPurchaseOrder.orderStatus == 1}">进行中</c:when>
  169. <c:when test="${contractPurchaseOrder.orderStatus == 2}">已完成</c:when>
  170. <c:otherwise>未知</c:otherwise>
  171. </c:choose>
  172. </td>
  173. </tr>
  174. </table>
  175. <div id="firstDiv">
  176. <table id="headTable" class="l-table-edit line" style="width:99%">
  177. <tr>
  178. <td colspan="2" style="text-align:center; font-size:16px;font-weight:bold;">
  179. <span style="font-size: 20px;">物品信息</span>
  180. <img align="bottom" id="addBuyInfo" style="cursor: pointer" class="add"
  181. src="${pageContext.request.contextPath}/liger/lib/ligerUI/skins/${sessionScope.css}/images/index/jia.png">
  182. </td>
  183. </tr>
  184. </table>
  185. <table class="l-table-edit line" width="99%">
  186. <tr>
  187. <th class="l-table-edit-new" colspan="1" style="padding-right: 0px;padding-left: 0px;">物料编码</th>
  188. <th class="l-table-edit-new" colspan="1" style="padding-right: 0px;padding-left: 0px;">物料名称</th>
  189. <th class="l-table-edit-new" colspan="1" style="padding-right: 0px;padding-left: 0px;">型号/规格</th>
  190. <th class="l-table-edit-new" colspan="1" style="padding-right: 0px;padding-left: 0px;">数量</th>
  191. <th class="l-table-edit-new" colspan="1" style="padding-right: 0px;padding-left: 0px;">单价</th>
  192. <th class="l-table-edit-new" colspan="1" style="padding-right: 0px;padding-left: 0px;">税率</th>
  193. </tr>
  194. <c:forEach items="${contractPurchaseOrderDetailList}" var="items">
  195. <tr class="startTr1">
  196. <td class="l-table-edit-new" colspan="1" style="padding-right: 0px;padding-left: 0px;">
  197. <input type="hidden" name="" class="input-width universalid" value="${items.universalid}">
  198. <input type="text" name="" class="input-width materialCode TextDisplay" value="${items.materialCode}" readonly>
  199. </td>
  200. <td class="l-table-edit-new" colspan="1" style="padding-right: 0px;padding-left: 0px;">
  201. <input type="text" name="" class="input-width materialName TextDisplay" value="${items.materialName}" readonly>
  202. </td>
  203. <td class="l-table-edit-new" colspan="1" style="padding-right: 0px;padding-left: 0px;">
  204. <input type="text" name="" class="input-width materialModel TextDisplay" value="${items.materialModel}" readonly>
  205. <input type="hidden" name="" class="measureName" value="${items.measureName}">
  206. </td>
  207. <td class="l-table-edit-new" colspan="1" style="padding-right: 0px;padding-left: 0px;">
  208. <input type="text" name="" class="input-width qty TextDisplay" onkeyup="value=value.replace(/[^\d\.]/g,'')" onblur="value=value.replace(/[^\d\.]/g,'')" value="${items.qty}">
  209. </td>
  210. <td class="l-table-edit-new" colspan="1" style="padding-right: 0px;padding-left: 0px;">
  211. <input type="text" name="" class="input-width price TextDisplay" onkeyup="value=value.replace(/[^\d\.]/g,'')" onblur="value=value.replace(/[^\d\.]/g,'')" value="${items.price}">
  212. </td>
  213. <td class="l-table-edit-new" colspan="1" style="padding-right: 0px;padding-left: 0px;">
  214. <input type="text" name="" class="input-width cess TextDisplay" onkeyup="value=value.replace(/[^\d\.]/g,'')" onblur="value=value.replace(/[^\d\.]/g,'')" value="${items.cess}">
  215. <img align="bottom" style="cursor: pointer" class="substract1" src="${pageContext.request.contextPath}/liger/lib/ligerUI/skins/${sessionScope.css}/images/index/jian.png">
  216. </td>
  217. </tr>
  218. </c:forEach>
  219. <tr id="firstPoint"></tr>
  220. <tr>
  221. <td class="l-table-edit-new" colspan="3" style="padding-right: 0px;padding-left: 0px;"></td>
  222. <td class="l-table-edit-new" colspan="1" style="padding-right: 0px;padding-left: 0px;"> 合计(元):</td>
  223. <td class="l-table-edit-new" colspan="1"
  224. style="padding-right: 0px;padding-left: 0px;text-align: center;">
  225. ${contractPurchaseOrder.totalAmount}
  226. </td>
  227. <td class="l-table-edit-new" colspan="1" style="padding-right: 0px;padding-left: 0px;"></td>
  228. </tr>
  229. </table>
  230. </div>
  231. <input type="hidden" id="task" name="task" value="edit">
  232. <input type="hidden" id="tabid" name="tabid"
  233. value="${param.tabid }">
  234. </center>
  235. </div>
  236. </div>
  237. </form>
  238. <%@ include file="/include/message.jsp"%>
  239. </body>
  240. </html>