orders-add.jsp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  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. var warehouseid = '${ordersPage.warehouseId}';
  13. if(warehouseid == null || warehouseid==''){
  14. layer.alert('只有领料点管理员可以填写申购单', {icon: 3, title:'提示'}, function(index){
  15. //do something
  16. window.location.href="ordersFixAssetController.do?listByWarehouse&orderFor=0";
  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. function beforeSubmit(){
  27. var trList = $("#add_orderProducts_table").children("tr");
  28. if(trList.length == 0){
  29. layer.alert("请至少输入一条货品详细信息");
  30. return false;
  31. }
  32. var msg = checkUnknownRow(trList);
  33. if(msg.length > 0){
  34. layer.alert(msg);
  35. return false;
  36. }
  37. return true;
  38. }
  39. /*function btn_ok(){
  40. var trList = $("#add_orderProducts_table").children("tr");
  41. if(trList.length == 0){
  42. layer.alert("请至少输入一条货品详细信息");
  43. return;
  44. }
  45. var msg = checkUnknownRow(trList);
  46. if(msg.length > 0){
  47. layer.alert(msg);
  48. return;
  49. }
  50. $("#btnsub").click();
  51. }*/
  52. /*function btn_back(){
  53. window.location.href="ordersController.do?listByWarehouse";
  54. }
  55. function callback(data){
  56. if(data.success){
  57. layer.alert(data.msg, function(index){
  58. window.location.href="ordersController.do?listByWarehouse";
  59. layer.close(index);
  60. });
  61. }
  62. else{
  63. layer.alert(data.msg);
  64. }
  65. }*/
  66. </script>
  67. </head>
  68. <c:set var="_callback">
  69. <c:choose>
  70. <c:when test="${in_process}">@Overridecallback</c:when>
  71. <c:otherwise>callback</c:otherwise>
  72. </c:choose>
  73. </c:set>
  74. <%--flag 1制单人重填 2金额不可见 3金额可见可修改 4 金额可见--%>
  75. <c:set var="editMoney">${in_process && (param.flag==3)}</c:set>
  76. <c:set var="showMoney">${(in_process && param.flag>=3) || ordersPage.orderFor==1}</c:set>
  77. <c:if test="${editMoney}"><c:set var="update" value="true"/></c:if>
  78. <c:if test="${param.forPurchase=='true'}"><c:set var="forPurchase" value="true"/></c:if>
  79. <c:set var="_updateUrl">
  80. <c:choose>
  81. <c:when test="${forPurchase}">pOrdersController.do?doAdd4FixAsset</c:when> <%--采购单--%>
  82. <c:otherwise>ordersFixAssetController.do?doAdd</c:otherwise>
  83. </c:choose>
  84. </c:set>
  85. <c:if test="${forPurchase}"><%--采购单都能看 能改--%>
  86. <c:set var="editMoney">true</c:set>
  87. <c:set var="showMoney">true</c:set>
  88. </c:if>
  89. <body style="overflow-x: hidden;">
  90. <t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" tiptype="1" action="${_updateUrl}"
  91. callback="${_callback}" beforeSubmit="beforeSubmit">
  92. <input id="id" name="id" type="hidden" value="${ordersPage.id }">
  93. <input id="orderFor" name="orderFor" type="hidden" value="${ordersPage.orderFor}">
  94. <input id="createBy" name="createBy" type="hidden" value="${ordersPage.createBy }">
  95. <input id="updateName" name="updateName" type="hidden" value="${ordersPage.updateName }">
  96. <input id="updateBy" name="updateBy" type="hidden" value="${ordersPage.updateBy }">
  97. <input id="updateDate" name="updateDate" type="hidden" value="${ordersPage.updateDate }">
  98. <input id="bpmStatus" name="bpmStatus" type="hidden" value="${ordersPage.bpmStatus }">
  99. <input id="orderStatus" name="orderStatus" type="hidden" value="${ordersPage.orderStatus }">
  100. <input id="orderOnumber" name="orderOnumber" type="hidden" value="${ordersPage.orderOnumber }">
  101. <t:tabs id="tt" iframe="false" tabPosition="top" fit="false" >
  102. <t:tab href="ordersFixAssetController.do?orderProductsList&orderFor=0&id=${ordersPage.id}&warehouseid=${ordersPage.warehouseId}&in_process=${in_process}&flag=${param.flag}&forPurchase=${param.forPurchase}&bpmStatus=${ordersPage.bpmStatus }" icon="icon-search" title="固定资产类货品明细" id="orderProducts" heigth="1000px"></t:tab>
  103. </t:tabs>
  104. <%--底部begin --%>
  105. <table cellpadding="0" cellspacing="1" class="formtable" style="position:fixed;bottom:0px;">
  106. <tr>
  107. <td align="right" width="100px">
  108. <label class="Validform_label">领料点:</label>
  109. </td>
  110. <td class="value" >
  111. <input id="warehouseId" name="warehouseId" type="hidden" value="${ordersPage.warehouseId}"/>
  112. <input id="warehouseName" name="warehouseName" type="text" readonly="readonly" style="width: 150px" class="inputxt" value="${ordersPage.warehouseName}" />
  113. </td>
  114. <td align="right" width="100px">
  115. <label class="Validform_label">采购方式:</label>
  116. </td>
  117. <td class="value">
  118. <input type="text" readonly="readonly" style="width: 150px" class="inputxt" value="${ordersPage.orderFor==0?'公司采购':'自行采购'}"/>
  119. </td>
  120. <c:if test="${ordersPage.orderFor==0}">
  121. <td align="right" width="100px">
  122. <label class="Validform_label">所属部门:</label>
  123. </td>
  124. <td class="value">
  125. <input id="departId" name="departId" type="hidden" value="${ordersPage.departId}"/>
  126. <input id="depName" name="depName" type="text" readonly="readonly" style="width: 150px" class="inputxt" value="${ordersPage.depName}" />
  127. </td>
  128. </c:if>
  129. <c:if test="${ordersPage.orderFor==1}">
  130. <input id="departId" name="departId" type="hidden" value="${ordersPage.departId}"/>
  131. <input id="depName" name="depName" type="hidden" readonly="readonly" style="width: 150px" class="inputxt" value="${ordersPage.depName}" />
  132. </c:if>
  133. <c:if test="${showMoney}">
  134. <td align="right" width="100px">
  135. <label class="Validform_label">总金额(元):</label>
  136. </td>
  137. <td class="value">
  138. <input id="totalMoney" name="totalMoney" type="text" style="width: 150px" class="inputxt" readonly="readonly" value="${ordersPage.totalMoney}"/>
  139. <span class="Validform_checktip"></span>
  140. <label class="Validform_label" style="display: none;">总金额</label>
  141. </td>
  142. </c:if>
  143. <c:if test="${!showMoney}">
  144. <input id="totalMoney" name="totalMoney" type="hidden" value="${ordersPage.totalMoney}"/>
  145. </c:if>
  146. </tr>
  147. <%--<c:if test="${param.flag>=4}">
  148. <tr>
  149. <td align="right" width="100px">
  150. <label class="Validform_label">固定资产类金额(元):</label>
  151. </td>
  152. <td class="value">
  153. <input name="gudingSum" type="text" style="width: 150px" class="inputxt" readonly="readonly" value="${ordersPage.gudingSum}"/>
  154. </td>
  155. <td align="right" width="100px">
  156. <label class="Validform_label">应急采购类金额(元):</label>
  157. </td>
  158. <td class="value">
  159. <input name="yingjiSum" type="text" style="width: 150px" class="inputxt" readonly="readonly" value="${ordersPage.yingjiSum}"/>
  160. </td>
  161. <td align="right" width="100px">
  162. <label class="Validform_label">其他类金额(元):</label>
  163. </td>
  164. <td class="value">
  165. <input name="qitaSum" type="text" style="width: 150px" class="inputxt" readonly="readonly" value="${ordersPage.qitaSum}"/>
  166. </td>
  167. </tr>
  168. </c:if>--%>
  169. <c:if test="${!forPurchase}"><%--采购单不要备注--%>
  170. <tr>
  171. <td align="right">
  172. <label class="Validform_label">
  173. <font color="#FF0000"></font>
  174. 备注说明:
  175. </label>
  176. </td>
  177. <td class="value" colspan="5" >
  178. <div style="text-align:left;">
  179. <textarea style="width:680px;height: 20px;" class="inputxt" rows="3" id="description" maxlength="200" name="description" placeholder="请输入备注说明(最多输入文字数200)">${ordersPage.description}</textarea>
  180. </div>
  181. <label class="Validform_label" style="display: none;">备注说明</label>
  182. </td>
  183. </tr>
  184. </c:if>
  185. <%--<tr>
  186. <td height="50px" align="center" colspan="8">
  187. <div style="display:none"><input type="submit" id ="btnsub" value=""/></div>
  188. <a href="#" class="easyui-linkbutton l-btn" iconcls="icon-le-ok" onclick="btn_ok()">提交</a>
  189. <a style="margin-left:20px" href="#" class="easyui-linkbutton l-btn" plain="true" iconcls="icon-le-back" onclick="btn_back()">返回</a>
  190. </td>
  191. </tr>--%>
  192. </table>
  193. <%--底部end --%>
  194. <table style="width: 100%">
  195. <tr>
  196. <td style="text-align:center;">
  197. <%@include file="/webpage/cn/com/lzt/useractiviti/view_submit_buttons.jsp"%>
  198. </td>
  199. </tr>
  200. </table>
  201. </t:formvalid>
  202. <!-- 添加 附表明细 模版 -->
  203. <div id="listdiv" fit="false" style="margin: 0px; padding: 0px; overflow: hidden; width: auto;">
  204. <table style="display:none;width: auto;" id="add_orderProducts_table" >
  205. <tbody id="add_orderProducts_table_template" >
  206. <tr>
  207. <input name="orderProductsList[#index#].specType" maxlength="50" readonly="readonly"
  208. type="hidden" class="inputxt" style="width:130px;" ><%--规格型号--%>
  209. <c:if test="${!showMoney}"><%--不显示的时候要有隐藏 保存值--%>
  210. <input name="orderProductsList[#index#].purchasePrice" type="hidden"/>
  211. <input name="orderProductsList[#index#].money" type="hidden" />
  212. </c:if>
  213. <input name="orderProductsList[#index#].supplierId" type="hidden" />
  214. <td align="center"><div style="width: 35px;" name="xh"></div></td>
  215. <td align="center"><input style="width:35px;" type="checkbox" name="ck"/></td>
  216. <td align="left" style="display: none;">
  217. <input name="orderProductsList[#index#].pnumber" maxlength="16"
  218. type="text" class="inputxt" style="width:130px;" readonly="readonly">
  219. <label class="Validform_label" style="display: none;">货品编码</label>
  220. </td>
  221. <td align="left">
  222. <input name="orderProductsList[#index#].pname" maxlength="32" readonly="readonly"
  223. type="text" class="inputxt" style="width:130px;">
  224. <label class="Validform_label" style="display: none;">货品名称</label>
  225. </td>
  226. <td align="left">
  227. <%--货品分类--%>
  228. <input name="orderProductsList[#index#].belongCategoryCode" maxlength="32" readonly="readonly"
  229. type="hidden" class="inputxt" style="width:130px;">
  230. <input name="orderProductsList[#index#].belongCategoryName" maxlength="32" readonly="readonly"
  231. type="text" class="inputxt" style="width:130px;">
  232. </td>
  233. <td align="left">
  234. <t:dictSelect field="orderProductsList[#index#].measureUnit" type="list" extendJson="{class:'form-control',style:'width:132px'}"
  235. typeGroupCode="metering_calcu_unit" defaultVal="" hasLabel="false" title="计量单位" datatype="*"></t:dictSelect>
  236. <label class="Validform_label" style="display: none;">计量单位</label>
  237. </td>
  238. <td align="left">
  239. <input name="orderProductsList[#index#].quantity" maxlength="10"
  240. 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')">
  241. <label class="Validform_label" style="display: none;">数量</label>
  242. </td>
  243. <c:if test="${showMoney}">
  244. <td align="left">
  245. <input name="orderProductsList[#index#].purchasePrice" maxlength="10"
  246. 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')">
  247. <label class="Validform_label" style="display: none;">采购单价</label>
  248. </td>
  249. <td align="left">
  250. <input name="orderProductsList[#index#].money" readonly="readonly"
  251. type="text" class="inputxt" style="width:130px;" >
  252. <label class="Validform_label" style="display: none;">金额</label>
  253. </td>
  254. </c:if>
  255. <td align="left">
  256. <input name="orderProductsList[#index#].remark" maxlength="100" style="width:390px;"
  257. type="text" class="inputxt">
  258. <label class="Validform_label" style="display: none;">备注</label>
  259. <input name="orderProductsList[#index#].goodsId" type="text" style="display:none"/>
  260. </td>
  261. </tr>
  262. </tbody>
  263. </table>
  264. </div>
  265. </body>
  266. <script src = "webpage/cn/com/lzt/ordersfixasset/orders.js?v=3"></script>