orders-update-representOwner.jsp 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  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. var warehouseid = '${ordersPage.warehouseId}';
  12. if(warehouseid == null || warehouseid==''){
  13. layer.alert('只有领料点管理员可以填写申购单', {icon: 3, title:'提示'}, function(index){
  14. //do something
  15. window.location.href="ordersController.do?listByWarehouse&orderType=3";
  16. layer.close(index);});
  17. }
  18. $('#tt').tabs({
  19. onSelect:function(title){
  20. $('#tt .panel-body').css('width','auto');
  21. }
  22. });
  23. $(".tabs-wrap").css('width','100%');
  24. //画面数值初期化
  25. // 优惠后金额
  26. $("#amountPayable").val(0);
  27. // 整单优惠
  28. $("#discountMoney").val(0);
  29. // 总金额
  30. $("#totalMoney").val(0);
  31. $('#discountMoney').bind("input",function(){
  32. // 优惠金额
  33. var discountMoney = parseFloat($("#discountMoney").val()) || 0;
  34. var totalmoney = parseFloat($("#totalMoney").val()) || 0;
  35. var money = Math.round((totalmoney - discountMoney)*100)/100;
  36. // 优惠后金额
  37. $("#amountPayable").val(money);
  38. });
  39. // 格式 月和日
  40. function p(s) {
  41. return s < 10 ? '0' + s: s;
  42. }
  43. /* var myDate = new Date();
  44. //获取当前年
  45. var year=myDate.getFullYear();
  46. //获取当前月
  47. var month=myDate.getMonth()+1;
  48. //获取当前日
  49. var date=myDate.getDate();
  50. var orderDate=year+'-'+p(month)+"-"+p(date)+" "+p(myDate.getHours())+':'+p(myDate.getMinutes())+":"+p(myDate.getSeconds());
  51. $("#orderDate").val(orderDate); */
  52. });
  53. function btn_ok(){
  54. var trList = $("#add_orderProducts_table").children("tr");
  55. if(trList.length == 0){
  56. layer.alert("请至少输入一条货品详细信息");
  57. return;
  58. }
  59. var msg = checkUnknownRow(trList);
  60. if(msg.length > 0){
  61. layer.alert(msg);
  62. return;
  63. }
  64. // 判断是否有重复的货品 begin
  65. //var goodsCodeArr = new Array();
  66. // for (var i=0;i<trList.length;i++) {
  67. // goodsCodeArr[i] = $("#add_orderProducts_table").find("tr").eq(i).find(":text").eq(0).val();
  68. // }
  69. // var s = goodsCodeArr.join(",")+",";
  70. // for(var i=0;i<goodsCodeArr.length;i++) {
  71. // if(s.replace(goodsCodeArr[i]+",","").indexOf(goodsCodeArr[i]+",")>-1) {
  72. // layer.alert("输入的货品不可以重复");
  73. // return;
  74. // }
  75. // }
  76. //
  77. $("#btnsub").click();
  78. }
  79. function btn_back(){
  80. window.location.href="ordersController.do?listByWarehouse&orderType=3";
  81. }
  82. function callback(data){
  83. if(data.success){
  84. layer.alert(data.msg, function(index){
  85. window.location.href="ordersController.do?listByWarehouse&orderType=3";
  86. layer.close(index);
  87. });
  88. }
  89. else{
  90. layer.alert(data.msg);
  91. }
  92. }
  93. </script>
  94. </head>
  95. <body style="overflow-x: hidden;">
  96. <t:formvalid formid="formobj" dialog="false" usePlugin="password" layout="table" tiptype="1" action="ordersController.do?doUpdate" callback="callback">
  97. <input id="id" name="id" type="hidden" value="${ordersPage.id }">
  98. <input id="createBy" name="createBy" type="hidden" value="${ordersPage.createBy }">
  99. <input id="updateName" name="updateName" type="hidden" value="${ordersPage.updateName }">
  100. <input id="updateBy" name="updateBy" type="hidden" value="${ordersPage.updateBy }">
  101. <input id="updateDate" name="updateDate" type="hidden" value="${ordersPage.updateDate }">
  102. <input id="bpmStatus" name="bpmStatus" type="hidden" value="${ordersPage.bpmStatus }">
  103. <input id="orderStatus" name="orderStatus" type="hidden" value="${ordersPage.orderStatus }">
  104. <input id="orderType" name="orderType" type="hidden" value="${ordersPage.orderType }">
  105. <t:tabs id="tt" iframe="false" tabPosition="top" fit="false" >
  106. <t:tab href="ordersController.do?orderProductsList&&orderType=3&id=${ordersPage.id}&warehouseid=${ordersPage.warehouseId}" icon="icon-search" title="申购货品清单" id="orderProducts" heigth="1000px"></t:tab>
  107. </t:tabs>
  108. <%--底部begin --%>
  109. <table cellpadding="0" cellspacing="1" class="formtable" style="position:fixed;bottom:0px;">
  110. <tr>
  111. <td align="right" width="100px">
  112. <label class="Validform_label"><span color="red" class="requiredIcon">*</span>领料点:</label>
  113. </td>
  114. <td class="value">
  115. <t:dictSelect field="warehouseId" id="warehouseId" type="list"
  116. dictTable="t_b_warehouse" dictField="id"
  117. dictCondition="where responsible_person = '${userid}'"
  118. dictText="warehouse_name" datatype="*"
  119. defaultVal="${ordersPage.warehouseId}"
  120. hasLabel="false" title="项目领料点"></t:dictSelect>
  121. <span class="Validform_checktip"></span>
  122. <label class="Validform_label" style="display: none;">项目领料点</label>
  123. </td>
  124. <td align="right">
  125. <label class="Validform_label">申购日期:</label>
  126. </td>
  127. <td>
  128. <input id="orderDate" name="orderDate" type="text" style="width: 120px" class="inputxt Wdate" readonly="readonly"
  129. value='<fmt:formatDate value='${ordersPage.orderDate }' type="date" pattern="yyyy-MM-dd"/>' onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})">
  130. <span class="Validform_checktip"></span>
  131. <label class="Validform_label" style="display: none;">申购月份</label>
  132. </td>
  133. <td align="right">
  134. <label class="Validform_label">总金额(元):</label>
  135. </td>
  136. <td class="value">
  137. <input id="totalMoney" name="totalMoney" type="text" style="width: 120px" class="inputxt" readonly="readonly">
  138. <span class="Validform_checktip"></span>
  139. <label class="Validform_label" style="display: none;">总金额</label>
  140. </td>
  141. <td align="right">
  142. </td>
  143. <td align="right">
  144. </td><td align="right">
  145. </td>
  146. </tr>
  147. <tr>
  148. <td align="right">
  149. <label class="Validform_label">
  150. <font color="#FF0000"></font>
  151. 备注说明:
  152. </label>
  153. </td>
  154. <td class="value" colspan="3" >
  155. <div style="text-align:left;">
  156. <textarea style="width:680px;height: 20px;" class="inputxt" rows="3" id="description" maxlength="200" name="description" placeholder="请输入备注说明(最多输入文字数200)"></textarea>
  157. </div>
  158. <label class="Validform_label" style="display: none;">备注说明</label>
  159. </td>
  160. </div>
  161. </tr>
  162. <tr>
  163. <td height="50px" align="center" colspan="8">
  164. <div style="display:none"><input type="submit" id ="btnsub" value=""/></div>
  165. <a href="#" class="easyui-linkbutton l-btn" iconcls="icon-le-ok" onclick="btn_ok()">提交</a>
  166. <a style="margin-left:20px" href="#" class="easyui-linkbutton l-btn" plain="true" iconcls="icon-le-back" onclick="btn_back()">返回</a>
  167. </td>
  168. </tr>
  169. </table>
  170. <%--底部end --%>
  171. </t:formvalid>
  172. <!-- 添加 附表明细 模版 -->
  173. <div id="listdiv" fit="false" style="margin: 0px; padding: 0px; overflow: hidden; width: auto;">
  174. <table style="display:none;width: auto;" id="add_orderProducts_table" >
  175. <tbody id="add_orderProducts_table_template" >
  176. <tr>
  177. <td align="center"><div style="width: 35px;" name="xh"></div></td>
  178. <td align="center"><input style="width:35px;" type="checkbox" name="ck"/></td>
  179. <td align="left" style="display: none;">
  180. <input name="orderProductsList[#index#].pnumber" maxlength="16"
  181. type="text" class="inputxt" style="width:130px;" readonly="readonly">
  182. <label class="Validform_label" style="display: none;">货品编码</label>
  183. </td>
  184. <td align="left">
  185. <input name="orderProductsList[#index#].pname" maxlength="32" readonly="readonly"
  186. type="text" class="inputxt" style="width:130px;">
  187. <label class="Validform_label" style="display: none;">货品名称</label>
  188. </td>
  189. <td align="left">
  190. <input name="orderProductsList[#index#].specType" maxlength="50" readonly="readonly"
  191. type="text" class="inputxt" style="width:130px;" >
  192. <label class="Validform_label" style="display: none;">规格型号</label>
  193. </td>
  194. <td align="left">
  195. <t:dictSelect field="orderProductsList[#index#].measureUnit" type="list" extendJson="{class:'form-control',style:'width:132px'}"
  196. typeGroupCode="metering_calcu_unit" defaultVal="" hasLabel="false" title="计量单位" datatype="*"></t:dictSelect>
  197. <label class="Validform_label" style="display: none;">计量单位</label>
  198. </td>
  199. <td align="left">
  200. <input name="orderProductsList[#index#].quantity" maxlength="10"
  201. 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')">
  202. <label class="Validform_label" style="display: none;">数量</label>
  203. </td>
  204. <td align="left">
  205. <input name="orderProductsList[#index#].purchasePrice" maxlength="10"
  206. 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')">
  207. <label class="Validform_label" style="display: none;">采购单价</label>
  208. </td>
  209. <td align="left">
  210. <input name="orderProductsList[#index#].money" readonly="readonly"
  211. type="text" class="inputxt" style="width:130px;" >
  212. <label class="Validform_label" style="display: none;">金额</label>
  213. </td>
  214. <td align="left">
  215. <input name="orderProductsList[#index#].remark" maxlength="100" style="width:390px;"
  216. type="text" class="inputxt">
  217. <label class="Validform_label" style="display: none;">备注</label>
  218. <input name="orderProductsList[#index#].goodsId" type="text" style="display:none"/>
  219. </td>
  220. </tr>
  221. </tbody>
  222. </table>
  223. </div>
  224. </body>
  225. <script src = "webpage/cn/com/lzt/orders/orders.js"></script>