defaultconfig.jsp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. <%@ page contentType="text/html; charset=utf-8" session="false" %>
  2. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
  4. <head>
  5. <title>我的工作台</title>
  6. <%@ include file="../common/header.jsp" %>
  7. <script type="text/javascript">
  8. $(document).ready(function (){
  9. });
  10. function defaultconfigupdate(){
  11. var Calculation = $("#Calculation").val();
  12. var sysccountratio = $("#sysccountratio").val();
  13. var sysratio1 = $("#sysratio1").val();
  14. var sysratio2 = $("#sysratio2").val();
  15. var sysratio3 = $("#sysratio3").val();
  16. var sysratio4 = $("#sysratio4").val();
  17. var sysratio5 = $("#sysratio5").val();
  18. var sysratio6 = $("#sysratio6").val();
  19. var isEnableSupplyFeed = $("#isEnableSupplyFeed").val();
  20. var isMorningPart = $("#isMorningPart").val();
  21. var isNoonPart = $("#isNoonPart").val();
  22. var isNightPart = $("#isNightPart").val();
  23. var isGetLastPlan = $("#isGetLastPlan").val();
  24. var isGetNextPlan = $("#isGetNextPlan").val();
  25. var Reserved5 = $("#Reserved5").val();
  26. var Reserved6 = $("#Reserved6").val();
  27. var Reserved7 = $("#Reserved7").val();
  28. var isLockCount = $("#isLockCount").val();
  29. var maxCarpoolError = $("#maxCarpoolError").val();
  30. var lockSelFeed = $("#lockSelFeed").val();
  31. var lpplanBeginSort = $("#lpplanBeginSort").val();
  32. var lpplanEndSort = $("#lpplanEndSort").val();
  33. var isShowAvgAgeAndDay = $("#isShowAvgAgeAndDay").val();
  34. if(sysccountratio.length == 0){
  35. alert("【牛头系数】必填");
  36. $("#sysccountratio").focus();
  37. return false;
  38. }
  39. if(sysratio1.length == 0){
  40. alert("【早班1】必填");
  41. $("#sysratio1").focus();
  42. return false;
  43. }
  44. if(sysratio2.length == 0){
  45. alert("【早班2】必填");
  46. $("#sysratio2").focus();
  47. return false;
  48. }
  49. if(sysratio3.length == 0){
  50. alert("【中班1】必填");
  51. $("#sysratio3").focus();
  52. return false;
  53. }
  54. if(sysratio4.length == 0){
  55. alert("【中班2】必填");
  56. $("#sysratio4").focus();
  57. return false;
  58. }
  59. if(sysratio5.length == 0){
  60. alert("【晚班1】必填");
  61. $("#sysratio5").focus();
  62. return false;
  63. }
  64. if(sysratio6.length == 0){
  65. alert("【晚班2】必填");
  66. $("#sysratio6").focus();
  67. return false;
  68. }
  69. $.ajax({
  70. async: false,
  71. type: 'POST',
  72. dataType:'json', //返回类型json
  73. data: "Calculation="+Calculation+"&sysccountratio="+sysccountratio+"&sysratio1="+sysratio1+"&sysratio2="+sysratio2+"&sysratio3="+sysratio3
  74. +"&sysratio4="+sysratio4+"&sysratio5="+sysratio5+"&sysratio6="+sysratio6+"&isEnableSupplyFeed="+isEnableSupplyFeed+"&isMorningPart="+isMorningPart
  75. +"&isNoonPart="+isNoonPart+"&isNightPart="+isNightPart+"&isGetLastPlan="+isGetLastPlan+"&isGetNextPlan="+isGetNextPlan+"&Reserved5="+Reserved5
  76. +"&Reserved6="+Reserved6+"&Reserved7="+Reserved7+"&isLockCount="+isLockCount+"&maxCarpoolError="+maxCarpoolError+"&lockSelFeed="+lockSelFeed
  77. +"&lpplanBeginSort="+lpplanBeginSort+"&lpplanEndSort="+lpplanEndSort+"&isShowAvgAgeAndDay="+isShowAvgAgeAndDay,
  78. url: "${contextPath }/admin/basicdata/defaultconfigupdate.html",
  79. error: function(){alert("系统错误");},
  80. success: function(json){
  81. if(json.status == "success"){
  82. alert("保存成功");
  83. document.location.href="${contextPath}/admin/basicdata/defaultconfig.html";
  84. }
  85. }
  86. });
  87. }
  88. </script>
  89. </head>
  90. <body style="background-color: #E0E0E0">
  91. <div>
  92. <div class="navfrm">
  93. <span>当前位置:</span>
  94. <span><a href="${contextPath }/admin/welcome.html">首页</a></span>
  95. <span>&nbsp;>>&nbsp;</span>
  96. <span>默认参数配置</span>
  97. </div>
  98. <table cellspacing="1" cellpadding="1" border="0" style="width: 99%;" class="tabsty">
  99. <tbody>
  100. <tr>
  101. <th style="width: 15%;height:27px;text-align:right;">计算模式:</th>
  102. <td style="width: 10%;text-align: left;">
  103. <select id="Calculation" style="height:20px;">
  104. <option value="0" <c:if test="${map.Calculation eq 0 }">selected="selected"</c:if>>按比例计算</option>
  105. <option value="1" <c:if test="${map.Calculation eq 1 }">selected="selected"</c:if>>按重量计算</option>
  106. </select>
  107. </td>
  108. <th style="width: 15%;height:27px;text-align:right;">牛头系数:</th>
  109. <td style="width: 64%;text-align: left;">
  110. <input id="sysccountratio" name="sysccountratio" maxlength="16" value="${map.sysccountratio }" />
  111. </td>
  112. </tr>
  113. <tr>
  114. <th style="height:27px;text-align:right;">
  115. <c:if test="${map.Calculation eq 0 }">早班1比例(%):</c:if>
  116. <c:if test="${map.Calculation eq 1 }">早班1比例(%):</c:if>
  117. </th>
  118. <td style="text-align: left;">
  119. <input id="sysratio1" name="sysratio1" maxlength="16" value="${map.sysratio1 }" />
  120. </td>
  121. <th style="height:27px;text-align:right;">
  122. <c:if test="${map.Calculation eq 0 }">早班2比例(%):</c:if>
  123. <c:if test="${map.Calculation eq 1 }">早班2比例(%):</c:if>
  124. </th>
  125. <td style="text-align: left;">
  126. <input id="sysratio2" name="sysratio2" maxlength="16" value="${map.sysratio2 }" />
  127. </td>
  128. </tr>
  129. <tr>
  130. <th style="height:27px;text-align:right;">
  131. <c:if test="${map.Calculation eq 0 }">中班1比例(%):</c:if>
  132. <c:if test="${map.Calculation eq 1 }">中班1比例(%):</c:if>
  133. </th>
  134. <td style="text-align: left;">
  135. <input id="sysratio3" name="sysratio3" maxlength="16" value="${map.sysratio3 }" />
  136. </td>
  137. <th style="height:27px;text-align:right;">
  138. <c:if test="${map.Calculation eq 0 }">中班2比例(%):</c:if>
  139. <c:if test="${map.Calculation eq 1 }">中班2比例(%):</c:if>
  140. </th>
  141. <td style="text-align: left;">
  142. <input id="sysratio4" name="sysratio4" maxlength="16" value="${map.sysratio4 }" />
  143. </td>
  144. </tr>
  145. <tr>
  146. <th style="height:27px;text-align:right;">
  147. <c:if test="${map.Calculation eq 0 }">晚班1比例(%):</c:if>
  148. <c:if test="${map.Calculation eq 1 }">晚班1比例(%):</c:if>
  149. </th>
  150. <td style="text-align: left;">
  151. <input id="sysratio5" name="sysratio5" maxlength="16" value="${map.sysratio5 }" />
  152. </td>
  153. <th style="height:27px;text-align:right;">
  154. <c:if test="${map.Calculation eq 0 }">晚班2比例(%):</c:if>
  155. <c:if test="${map.Calculation eq 1 }">晚班2比例(%):</c:if>
  156. </th>
  157. <td style="text-align: left;">
  158. <input id="sysratio6" name="sysratio6" maxlength="16" value="${map.sysratio6 }" />
  159. </td>
  160. </tr>
  161. <tr>
  162. <th style="height:27px;text-align:right;">是否启用补料:</th>
  163. <td style="text-align: left;">
  164. <select id="isEnableSupplyFeed" style="height:20px;">
  165. <option value="0" <c:if test="${map.isEnableSupplyFeed == false }">selected="selected"</c:if>>否</option>
  166. <option value="1" <c:if test="${map.isEnableSupplyFeed == true }">selected="selected"</c:if>>是</option>
  167. </select>
  168. </td>
  169. <th style="height:27px;text-align:right;">早班分车:</th>
  170. <td style="text-align: left;">
  171. <select id="isMorningPart" style="height:20px;">
  172. <option value="0" <c:if test="${map.isMorningPart == false }">selected="selected"</c:if>>未分车</option>
  173. <option value="1" <c:if test="${map.isMorningPart == true }">selected="selected"</c:if>>分车</option>
  174. </select>
  175. </td>
  176. </tr>
  177. <tr>
  178. <th style="height:27px;text-align:right;">中班分车:</th>
  179. <td style="text-align: left;">
  180. <select id="isNoonPart" style="height:20px;">
  181. <option value="0" <c:if test="${map.isNoonPart == false }">selected="selected"</c:if>>未分车</option>
  182. <option value="1" <c:if test="${map.isNoonPart == true }">selected="selected"</c:if>>分车</option>
  183. </select>
  184. </td>
  185. <th style="height:27px;text-align:right;">晚班分车:</th>
  186. <td style="text-align: left;">
  187. <select id="isNightPart" style="height:20px;">
  188. <option value="0" <c:if test="${map.isNightPart == false }">selected="selected"</c:if>>未分车</option>
  189. <option value="1" <c:if test="${map.isNightPart == true }">selected="selected"</c:if>>分车</option>
  190. </select>
  191. </td>
  192. </tr>
  193. <tr>
  194. <th style="height:27px;text-align:right;">是否可取前一天计划:</th>
  195. <td style="text-align: left;">
  196. <select id="isGetLastPlan" style="height:20px;">
  197. <option value="0" <c:if test="${map.isGetLastPlan == false }">selected="selected"</c:if>>否</option>
  198. <option value="1" <c:if test="${map.isGetLastPlan == true }">selected="selected"</c:if>>是</option>
  199. </select>
  200. <b>开始车次:</b>
  201. <input id="lpplanBeginSort" name="lpplanBeginSort" style="width: 30px;" maxlength="16" value="${map.lpplanBeginSort }" />
  202. </td>
  203. <th style="height:27px;text-align:right;">是否可取后一天计划:</th>
  204. <td style="text-align: left;">
  205. <select id="isGetNextPlan" style="height:20px;">
  206. <option value="0" <c:if test="${map.isGetNextPlan == false }">selected="selected"</c:if>>否</option>
  207. <option value="1" <c:if test="${map.isGetNextPlan == true }">selected="selected"</c:if>>是</option>
  208. </select>
  209. <b>结束车次:</b>
  210. <input id="lpplanEndSort" name="lpplanEndSort" style="width: 30px;" maxlength="16" value="${map.lpplanEndSort }" />
  211. </td>
  212. </tr>
  213. <tr>
  214. <th style="height:27px;text-align:right;">日计划报表小数位数:</th>
  215. <td style="text-align: left;">
  216. <select id="Reserved5" style="height:20px;">
  217. <option value="0" <c:if test="${map.Reserved5 eq 0 }">selected="selected"</c:if>>整数</option>
  218. <option value="1" <c:if test="${map.Reserved5 eq 1 }">selected="selected"</c:if>>保留一位</option>
  219. <option value="2" <c:if test="${map.Reserved5 eq 2 }">selected="selected"</c:if>>保留二位</option>
  220. <option value="3" <c:if test="${map.Reserved5 eq 3 }">selected="selected"</c:if>>保留三位</option>
  221. </select>
  222. </td>
  223. <th style="height:27px;text-align:right;">是否启用剩料:</th>
  224. <td style="text-align: left;">
  225. <select id="Reserved6" style="height:20px;">
  226. <option value="0" <c:if test="${map.Reserved6 eq 0 }">selected="selected"</c:if>>禁用</option>
  227. <option value="1" <c:if test="${map.Reserved6 eq 1 }">selected="selected"</c:if>>启用</option>
  228. </select>
  229. </td>
  230. </tr>
  231. <tr>
  232. <th style="height:27px;text-align:right;">锁定班次:</th>
  233. <td style="text-align: left;">
  234. <select id="Reserved7" style="height:20px;">
  235. <option value="0" <c:if test="${map.Reserved7 eq 0 }">selected="selected"</c:if>>否</option>
  236. <option value="1" <c:if test="${map.Reserved7 eq 1 }">selected="selected"</c:if>>1</option>
  237. <option value="2" <c:if test="${map.Reserved7 eq 2 }">selected="selected"</c:if>>2</option>
  238. <option value="3" <c:if test="${map.Reserved7 eq 3 }">selected="selected"</c:if>>3</option>
  239. <option value="4" <c:if test="${map.Reserved7 eq 4 }">selected="selected"</c:if>>4</option>
  240. </select>
  241. </td>
  242. <th style="height:27px;text-align:right;">启用饲料锁定牛头数:</th>
  243. <td style="text-align: left;">
  244. <select id="isLockCount" style="height:20px;">
  245. <option value="0" <c:if test="${map.isLockCount eq 0 }">selected="selected"</c:if>>禁用</option>
  246. <option value="1" <c:if test="${map.isLockCount eq 1 }">selected="selected"</c:if>>启用</option>
  247. </select>
  248. </td>
  249. </tr>
  250. <tr>
  251. <th style="height:27px;text-align:right;">最大拼车误差:</th>
  252. <td style="text-align: left;">
  253. <input id="maxCarpoolError" name="maxCarpoolError" maxlength="16" value="${map.maxCarpoolError }" />
  254. </td>
  255. <th style="height:27px;text-align:right;">锁定班次饲料:</th>
  256. <td style="text-align: left;">
  257. <input id="lockSelFeed" name="lockSelFeed" maxlength="16" value="${map.lockSelFeed }" />
  258. </td>
  259. </tr>
  260. <tr>
  261. <th style="height:27px;text-align:right;">是否显示泌乳天数、平均月龄:</th>
  262. <td style="text-align: left;">
  263. <select id="isShowAvgAgeAndDay" style="height:20px;">
  264. <option value="0" <c:if test="${map.isShowAvgAgeAndDay == false }">selected="selected"</c:if>>否</option>
  265. <option value="1" <c:if test="${map.isShowAvgAgeAndDay == true }">selected="selected"</c:if>>是</option>
  266. </select>
  267. </td>
  268. <th></th>
  269. <td></td>
  270. </tr>
  271. <tr class="greb">
  272. <td></td>
  273. <td colspan="3">
  274. <input type="button" value="保存" onclick="defaultconfigupdate();" style="height:30px;width:100px;">&nbsp;&nbsp;&nbsp;
  275. </td>
  276. </tr>
  277. </tbody>
  278. </table>
  279. </div>
  280. </body>
  281. </html>