123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285 |
- <%@ page contentType="text/html; charset=utf-8" session="false" %>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
- <head>
- <title>我的工作台</title>
- <%@ include file="../common/header.jsp" %>
- <script type="text/javascript">
- $(document).ready(function (){
- });
-
- function defaultconfigupdate(){
- var Calculation = $("#Calculation").val();
- var sysccountratio = $("#sysccountratio").val();
- var sysratio1 = $("#sysratio1").val();
- var sysratio2 = $("#sysratio2").val();
- var sysratio3 = $("#sysratio3").val();
- var sysratio4 = $("#sysratio4").val();
- var sysratio5 = $("#sysratio5").val();
- var sysratio6 = $("#sysratio6").val();
- var isEnableSupplyFeed = $("#isEnableSupplyFeed").val();
- var isMorningPart = $("#isMorningPart").val();
- var isNoonPart = $("#isNoonPart").val();
- var isNightPart = $("#isNightPart").val();
- var isGetLastPlan = $("#isGetLastPlan").val();
- var isGetNextPlan = $("#isGetNextPlan").val();
- var Reserved5 = $("#Reserved5").val();
- var Reserved6 = $("#Reserved6").val();
- var Reserved7 = $("#Reserved7").val();
- var isLockCount = $("#isLockCount").val();
- var maxCarpoolError = $("#maxCarpoolError").val();
- var lockSelFeed = $("#lockSelFeed").val();
- var lpplanBeginSort = $("#lpplanBeginSort").val();
- var lpplanEndSort = $("#lpplanEndSort").val();
-
- var isShowAvgAgeAndDay = $("#isShowAvgAgeAndDay").val();
-
- if(sysccountratio.length == 0){
- alert("【牛头系数】必填");
- $("#sysccountratio").focus();
- return false;
- }
- if(sysratio1.length == 0){
- alert("【早班1】必填");
- $("#sysratio1").focus();
- return false;
- }
- if(sysratio2.length == 0){
- alert("【早班2】必填");
- $("#sysratio2").focus();
- return false;
- }
- if(sysratio3.length == 0){
- alert("【中班1】必填");
- $("#sysratio3").focus();
- return false;
- }
- if(sysratio4.length == 0){
- alert("【中班2】必填");
- $("#sysratio4").focus();
- return false;
- }
- if(sysratio5.length == 0){
- alert("【晚班1】必填");
- $("#sysratio5").focus();
- return false;
- }
- if(sysratio6.length == 0){
- alert("【晚班2】必填");
- $("#sysratio6").focus();
- return false;
- }
-
- $.ajax({
- async: false,
- type: 'POST',
- dataType:'json', //返回类型json
- data: "Calculation="+Calculation+"&sysccountratio="+sysccountratio+"&sysratio1="+sysratio1+"&sysratio2="+sysratio2+"&sysratio3="+sysratio3
- +"&sysratio4="+sysratio4+"&sysratio5="+sysratio5+"&sysratio6="+sysratio6+"&isEnableSupplyFeed="+isEnableSupplyFeed+"&isMorningPart="+isMorningPart
- +"&isNoonPart="+isNoonPart+"&isNightPart="+isNightPart+"&isGetLastPlan="+isGetLastPlan+"&isGetNextPlan="+isGetNextPlan+"&Reserved5="+Reserved5
- +"&Reserved6="+Reserved6+"&Reserved7="+Reserved7+"&isLockCount="+isLockCount+"&maxCarpoolError="+maxCarpoolError+"&lockSelFeed="+lockSelFeed
- +"&lpplanBeginSort="+lpplanBeginSort+"&lpplanEndSort="+lpplanEndSort+"&isShowAvgAgeAndDay="+isShowAvgAgeAndDay,
- url: "${contextPath }/admin/basicdata/defaultconfigupdate.html",
- error: function(){alert("系统错误");},
- success: function(json){
- if(json.status == "success"){
- alert("保存成功");
- document.location.href="${contextPath}/admin/basicdata/defaultconfig.html";
- }
- }
- });
- }
- </script>
- </head>
- <body style="background-color: #E0E0E0">
- <div>
- <div class="navfrm">
- <span>当前位置:</span>
- <span><a href="${contextPath }/admin/welcome.html">首页</a></span>
- <span> >> </span>
- <span>默认参数配置</span>
- </div>
- <table cellspacing="1" cellpadding="1" border="0" style="width: 99%;" class="tabsty">
- <tbody>
- <tr>
- <th style="width: 15%;height:27px;text-align:right;">计算模式:</th>
- <td style="width: 10%;text-align: left;">
- <select id="Calculation" style="height:20px;">
- <option value="0" <c:if test="${map.Calculation eq 0 }">selected="selected"</c:if>>按比例计算</option>
- <option value="1" <c:if test="${map.Calculation eq 1 }">selected="selected"</c:if>>按重量计算</option>
- </select>
- </td>
- <th style="width: 15%;height:27px;text-align:right;">牛头系数:</th>
- <td style="width: 64%;text-align: left;">
- <input id="sysccountratio" name="sysccountratio" maxlength="16" value="${map.sysccountratio }" />
- </td>
- </tr>
- <tr>
- <th style="height:27px;text-align:right;">
- <c:if test="${map.Calculation eq 0 }">早班1比例(%):</c:if>
- <c:if test="${map.Calculation eq 1 }">早班1比例(%):</c:if>
- </th>
- <td style="text-align: left;">
- <input id="sysratio1" name="sysratio1" maxlength="16" value="${map.sysratio1 }" />
- </td>
- <th style="height:27px;text-align:right;">
- <c:if test="${map.Calculation eq 0 }">早班2比例(%):</c:if>
- <c:if test="${map.Calculation eq 1 }">早班2比例(%):</c:if>
- </th>
- <td style="text-align: left;">
- <input id="sysratio2" name="sysratio2" maxlength="16" value="${map.sysratio2 }" />
- </td>
- </tr>
- <tr>
- <th style="height:27px;text-align:right;">
- <c:if test="${map.Calculation eq 0 }">中班1比例(%):</c:if>
- <c:if test="${map.Calculation eq 1 }">中班1比例(%):</c:if>
- </th>
- <td style="text-align: left;">
- <input id="sysratio3" name="sysratio3" maxlength="16" value="${map.sysratio3 }" />
- </td>
- <th style="height:27px;text-align:right;">
- <c:if test="${map.Calculation eq 0 }">中班2比例(%):</c:if>
- <c:if test="${map.Calculation eq 1 }">中班2比例(%):</c:if>
- </th>
- <td style="text-align: left;">
- <input id="sysratio4" name="sysratio4" maxlength="16" value="${map.sysratio4 }" />
- </td>
- </tr>
- <tr>
- <th style="height:27px;text-align:right;">
- <c:if test="${map.Calculation eq 0 }">晚班1比例(%):</c:if>
- <c:if test="${map.Calculation eq 1 }">晚班1比例(%):</c:if>
- </th>
- <td style="text-align: left;">
- <input id="sysratio5" name="sysratio5" maxlength="16" value="${map.sysratio5 }" />
- </td>
- <th style="height:27px;text-align:right;">
- <c:if test="${map.Calculation eq 0 }">晚班2比例(%):</c:if>
- <c:if test="${map.Calculation eq 1 }">晚班2比例(%):</c:if>
- </th>
- <td style="text-align: left;">
- <input id="sysratio6" name="sysratio6" maxlength="16" value="${map.sysratio6 }" />
- </td>
- </tr>
- <tr>
- <th style="height:27px;text-align:right;">是否启用补料:</th>
- <td style="text-align: left;">
- <select id="isEnableSupplyFeed" style="height:20px;">
- <option value="0" <c:if test="${map.isEnableSupplyFeed == false }">selected="selected"</c:if>>否</option>
- <option value="1" <c:if test="${map.isEnableSupplyFeed == true }">selected="selected"</c:if>>是</option>
- </select>
- </td>
- <th style="height:27px;text-align:right;">早班分车:</th>
- <td style="text-align: left;">
- <select id="isMorningPart" style="height:20px;">
- <option value="0" <c:if test="${map.isMorningPart == false }">selected="selected"</c:if>>未分车</option>
- <option value="1" <c:if test="${map.isMorningPart == true }">selected="selected"</c:if>>分车</option>
- </select>
- </td>
- </tr>
- <tr>
- <th style="height:27px;text-align:right;">中班分车:</th>
- <td style="text-align: left;">
- <select id="isNoonPart" style="height:20px;">
- <option value="0" <c:if test="${map.isNoonPart == false }">selected="selected"</c:if>>未分车</option>
- <option value="1" <c:if test="${map.isNoonPart == true }">selected="selected"</c:if>>分车</option>
- </select>
- </td>
- <th style="height:27px;text-align:right;">晚班分车:</th>
- <td style="text-align: left;">
- <select id="isNightPart" style="height:20px;">
- <option value="0" <c:if test="${map.isNightPart == false }">selected="selected"</c:if>>未分车</option>
- <option value="1" <c:if test="${map.isNightPart == true }">selected="selected"</c:if>>分车</option>
- </select>
- </td>
- </tr>
- <tr>
- <th style="height:27px;text-align:right;">是否可取前一天计划:</th>
- <td style="text-align: left;">
- <select id="isGetLastPlan" style="height:20px;">
- <option value="0" <c:if test="${map.isGetLastPlan == false }">selected="selected"</c:if>>否</option>
- <option value="1" <c:if test="${map.isGetLastPlan == true }">selected="selected"</c:if>>是</option>
- </select>
- <b>开始车次:</b>
- <input id="lpplanBeginSort" name="lpplanBeginSort" style="width: 30px;" maxlength="16" value="${map.lpplanBeginSort }" />
- </td>
- <th style="height:27px;text-align:right;">是否可取后一天计划:</th>
- <td style="text-align: left;">
- <select id="isGetNextPlan" style="height:20px;">
- <option value="0" <c:if test="${map.isGetNextPlan == false }">selected="selected"</c:if>>否</option>
- <option value="1" <c:if test="${map.isGetNextPlan == true }">selected="selected"</c:if>>是</option>
- </select>
- <b>结束车次:</b>
- <input id="lpplanEndSort" name="lpplanEndSort" style="width: 30px;" maxlength="16" value="${map.lpplanEndSort }" />
- </td>
- </tr>
- <tr>
- <th style="height:27px;text-align:right;">日计划报表小数位数:</th>
- <td style="text-align: left;">
- <select id="Reserved5" style="height:20px;">
- <option value="0" <c:if test="${map.Reserved5 eq 0 }">selected="selected"</c:if>>整数</option>
- <option value="1" <c:if test="${map.Reserved5 eq 1 }">selected="selected"</c:if>>保留一位</option>
- <option value="2" <c:if test="${map.Reserved5 eq 2 }">selected="selected"</c:if>>保留二位</option>
- <option value="3" <c:if test="${map.Reserved5 eq 3 }">selected="selected"</c:if>>保留三位</option>
- </select>
- </td>
- <th style="height:27px;text-align:right;">是否启用剩料:</th>
- <td style="text-align: left;">
- <select id="Reserved6" style="height:20px;">
- <option value="0" <c:if test="${map.Reserved6 eq 0 }">selected="selected"</c:if>>禁用</option>
- <option value="1" <c:if test="${map.Reserved6 eq 1 }">selected="selected"</c:if>>启用</option>
- </select>
- </td>
- </tr>
- <tr>
- <th style="height:27px;text-align:right;">锁定班次:</th>
- <td style="text-align: left;">
- <select id="Reserved7" style="height:20px;">
- <option value="0" <c:if test="${map.Reserved7 eq 0 }">selected="selected"</c:if>>否</option>
- <option value="1" <c:if test="${map.Reserved7 eq 1 }">selected="selected"</c:if>>1</option>
- <option value="2" <c:if test="${map.Reserved7 eq 2 }">selected="selected"</c:if>>2</option>
- <option value="3" <c:if test="${map.Reserved7 eq 3 }">selected="selected"</c:if>>3</option>
- <option value="4" <c:if test="${map.Reserved7 eq 4 }">selected="selected"</c:if>>4</option>
- </select>
- </td>
- <th style="height:27px;text-align:right;">启用饲料锁定牛头数:</th>
- <td style="text-align: left;">
- <select id="isLockCount" style="height:20px;">
- <option value="0" <c:if test="${map.isLockCount eq 0 }">selected="selected"</c:if>>禁用</option>
- <option value="1" <c:if test="${map.isLockCount eq 1 }">selected="selected"</c:if>>启用</option>
- </select>
- </td>
- </tr>
- <tr>
- <th style="height:27px;text-align:right;">最大拼车误差:</th>
- <td style="text-align: left;">
- <input id="maxCarpoolError" name="maxCarpoolError" maxlength="16" value="${map.maxCarpoolError }" />
- </td>
- <th style="height:27px;text-align:right;">锁定班次饲料:</th>
- <td style="text-align: left;">
- <input id="lockSelFeed" name="lockSelFeed" maxlength="16" value="${map.lockSelFeed }" />
- </td>
- </tr>
- <tr>
- <th style="height:27px;text-align:right;">是否显示泌乳天数、平均月龄:</th>
- <td style="text-align: left;">
- <select id="isShowAvgAgeAndDay" style="height:20px;">
- <option value="0" <c:if test="${map.isShowAvgAgeAndDay == false }">selected="selected"</c:if>>否</option>
- <option value="1" <c:if test="${map.isShowAvgAgeAndDay == true }">selected="selected"</c:if>>是</option>
- </select>
- </td>
- <th></th>
- <td></td>
- </tr>
- <tr class="greb">
- <td></td>
- <td colspan="3">
- <input type="button" value="保存" onclick="defaultconfigupdate();" style="height:30px;width:100px;">
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </body>
- </html>
|