changDqms($("#dqms").val()); changeTxfs($("#txfs").val()); changeClms($("#clms").val()); /** * 系统参数编辑页面中点击取消按钮时返回的页面 */ function cancelCssz() { loadYjsbRight(); } /** * 修改 */ function editSbcs(id, from) { huimv.loadPage('yjsbRight', 'editCssz.htm', { "id" : id, "from" : from }); } /** * 当前模式联动 */ function changDqms(val) { $("#xl").hide(); $("#xl1").hide(); $("#xl2").hide(); $("#xl3").hide(); $("#tx").hide(); $("#cl").hide(); if (val == "1") { $("#xlbttxxt").html("适应一期"); $("#xl").show(); $("#xl1").show(); } else if (val == "2") { $("#xlbttxxt").html("适应二期"); $("#xl").show(); $("#xl2").show(); } else if (val == "3") { $("#xlbttxxt").html("注册期"); $("#xl").show(); $("#xl3").show(); } else if (val == "4") { $("#tx").show(); } else if (val == "5") { $("#cl").show(); } } /** * 挑选方式联动 */ function changeTxfs(val) { $("#txfs3").hide(); $("#txmx1").hide(); $("#txmx2").hide(); var str = $("#tzdw").text(); if (val == "1") { $("#txmx1").show(); $("#tztxt").html('门限重量'); $("#tzdw").html(str+' Kg'); $("#txmx2").show(); } else if (val == "2") { $("#txmx1").show(); $("#tztxt").html('分栏比例'); $("#tzdw").html(str+' %'); $("#txmx2").show(); } else if (val == "3") { $("#txfs3").show(); } } /** * 出栏模式联动 */ function changeClms(val) { $("#clfstxt").html(""); $("#clfs1").hide(); $("#clfs2").hide(); $("#cleb").hide(); if (val == "1") { $("#clfstxt").html("出栏体重"); $("#clfs1").show(); } else if (val == "2") { $("#clfstxt").html("出栏体重"); $("#clfs1").show(); } else if (val == "3") { $("#clfs2").show(); $("#cleb").show(); } } /** * 作废代码列表 * @param id */ function disableSbcs(id,jqdaid) { Dialogs.alert("确定删除当前机器的参数设置?", { title : '提示信息', width : 250, height : 80, top : 150, button : { ok : ['确定',function(){ this.close(); huimv.showProcessModel('处理数据中'); jQuery.ajax({ url : 'disableCssz.htm', dataType : 'json', type : 'post', cache : false, data : {"id" : id,"jqdaid" : jqdaid}, success : function(data) { huimv.hideProcessModel(); if (data.returnCode > 0) { loadYjsbRight(); } else { Dialogs.alert("传入参数有误!", { width : 300, height : 50 }); } }, error : function(data) { huimv.showError(data.responseText); } }); }], cancel : ['取消',function(){ this.close(); }] } }); } /** * 管理员编辑称重注册时间 * @param gjz */ function czzcsz(gjz) { if (gjz == "xg") { $("#czzcsjtxt").hide(); $("#czzcsj").show(); $("#xg").hide(); $("#bc").show(); } if (gjz == "bc") { jQuery.ajax({ url : 'updateCzzcsj.htm', dataType : 'json', type : 'post', cache : false, data : {"lqid" : $("#lqid").val(),"czzcsj" : $("#czzcsj").val()}, success : function(data) { if (data.returnCode > 0) { $("#czzcsjtxt").html($("#czzcsj").val()); } else { Dialogs.alert("修改失败!", { width : 300, height : 50 }); } } }); $("#czzcsjtxt").show(); $("#czzcsj").hide(); $("#xg").show(); $("#bc").hide(); } }