123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <title>newHaifmMcda</title>
- <style>
- li .row {
- margin-right: 0;
- margin-left: 0;
- padding: 0.05rem 0;
- }
- .zsdaxgIscroll .mui-table-view-cell>.mui-switch {
- top: 50%;
- }
- .mui-content {
- background-color: #fff;
- }
- .row div span{
- font-size: 0.24rem;
- }
- .mui-table-view {
- overflow: hidden;
- color: #fff;
- }
- .mui-table-view-cell {
- font-size: 0.24rem;
- background: #4E768F;
- text-align: left;
- margin: 0 0.2rem;
- }
- .rowflex{
- width: 100%;
- padding: 0.1rem 0;
- }
- .hiddenli{
- margin: 0rem 0.4rem;
- }
- .rowBox{
- padding-top: 0;
- border-radius: 0.2rem;
- }
- li.mui-table-view-cell {
- display: flex;
- align-items: center;
- margin: 0.2rem 0 0.2rem 0.2rem;
- }
- .rowBox:last-child {
- border: 1px solid #4E768F;
- margin-bottom: 0.1rem;
- }
- input[placeholder], [placeholder], *[placeholder] {
- color: #000 !important;
- }
- input[type=text],input[type=number]{
- height: 0.5rem;
- line-height: 0.5rem;
- padding: 0 0.2rem;
- }
- ::-webkit-input-placeholder {
- color: #BFBFBF !important;
- }
- .btn-default{
- color: #4E768F;
- }
- .mui-btn-outlined{
- background: #4E768F;color: #FFF;border: none;border-radius: 0.1rem;font-size: 0.24rem;padding: 4px 0.2rem;
- }
- .column>span {
- background-size: 250%;background-repeat: no-repeat;background-position-x: center;background-position-y: center;
- width: 0.5rem;
- height: 0.5rem;
- border-radius: 0.05rem;
- }
- .column li .span {
- width: 50%;
- padding: 0.05rem 0.1rem;
- color: #4E768F;
- }
- .column li .sspan{
- padding: 0.05rem 0.1rem;
- color: #4E768F;
- }
- .spanColor {
- border-radius: 0.1rem;
- background: #5784a1;
- color: #fff !important;
- }
- .rowflex11{
- margin: 0.1rem 0;
- }
- i{font-style:normal;color: #f00;}
- .datepickers-container{
- left: -1rem;
- }
- .datepicker{
- width: 4rem;
- }
- .-bottom-left- .datepicker--pointer, .-top-left- .datepicker--pointer{
- left: 50%;
- }
- .rowflex>.flex-end+.flex-start{
- margin-right: 0.2rem;
- }
- .chulancl span:last-of-type,.fenlanfs span:last-of-type,.fenlanfs span:first-of-type{
- height: 1rem;line-height: 0.45rem;
- }
- </style>
- <script type="text/javascript" src="views/haifmv/mc/mcZsda/mcZsdaxg.js"></script>
- <script type="text/javascript">
- //全局变量
- var iscroll,t1;
- $(function() {
- //刚进入触发 自动打开猪舍档案
- zsWindow(0);
-
- /**
- *返回
- *
- * */
- $(".glyphicon-chevron-left").on("tap",function(){
- haifm.loadMobilePage("haifm", "haifmvMain.htm?uuid=" + $("#uuid").val() + "&mcid=" + $("#mcid").val()
- + "&qyid=" + $("#qyid").val() +"&toList=1" + "&qyzt=" + $("#qyzt").val());
- });
-
- /**
- * 初始化滚动条
- * */
- iscroll = new IScroll(".zsdaxgIscroll",{
- scrollbars: true,
- fadeScrollbars:true,
- scrollbars: 'custom',
- shrinkScrollbars:'clip',
- click:true
- });
- $(".zsdaxgIscroll").one("touchstart",function(){
- $("body").height(document.body.scrollHeight);
- iscroll.refresh();
- });
- $("#overlay,.sjok").on("tap",function(){
- setTimeout(function(){
- iscroll.refresh();
- }, 250);
- });
- /**
- * 滚动input以外失去焦点
- * */
- iscroll.on('scrollStart',function(e){
- var el = document.activeElement;
- if (el.nodeName.toLowerCase() == 'input') {
- el.blur();
- this.disable();
- this.enable();
- };
- return;
- });
- /**
- * 开关事件
- * */
- mui('.mui-content .mui-switch').each(function() { //循环所有toggle
- mui(this)['switch']();
- /**
- * toggle 事件监听
- */
- this.addEventListener('toggle', function(event) {
- //event.detail.isActive 可直接获取当前状态
- var that = $(this);
- var isActive = this.classList.contains('mui-active'); //判断打开ON或者关闭OFF
- var type = $(this).data("type");
- var zf = $(this).parent().parent().next().children();
- if(isActive){
- //要打开
- if (type == "2") {
- //判断是否能查看栏期维护
- jQuery.ajax({
- url: "isLqwhSee.htm",
- dataType: "json",
- type: "get",
- async: false,
- data: {"zsid" : $("#mczsid").val()},
- success: function(data){
- if (data.returnCode > 0) {
- that.parent().parent().parent().next().slideDown(500,function(){
- iscroll.refresh();
- }).parent().siblings('form').find('.hiddenli').stop().slideUp(500);
- $(".mui-switch").removeClass("mui-active").children().css({'transition-duration': '0.2s', 'transform': 'translate(0, 0px)'});
- that.addClass("mui-active");
- zsWindow(type);
- zf.html("保存");
- that.parent().parent().parent().parent().siblings('form').find('.qdBtn').eq(0).children().html("删除");
- that.parent().parent().parent().parent().siblings('form').find('.qdBtn').eq(1).children().html("查看");
- that.parent().parent().parent().parent().siblings('form').find('.qdBtn').eq(3).children().html("查看");
- } else {
- mui.alert("当前栏期已结束或未新建,请先新建栏期!", "提示", function() {});
- that.removeClass("mui-active").children().css({'transition-duration': '0.2s', 'transform': 'translate(0, 0px)'});
- return;
- }
- },
- });
- }else {
- if ($("#mczsid").val() != "") {
- that.parent().parent().parent().next().slideDown(500,function(){
- iscroll.refresh();
- }).parent().siblings('form').find('.hiddenli').stop().slideUp(500);
- $(".mui-switch").removeClass("mui-active").children().css({'transition-duration': '0.2s', 'transform': 'translate(0, 0px)'});
- that.addClass("mui-active");
- zsWindow(type);
- zf.html("保存");
- if (type == "0") {
- that.parent().parent().parent().parent().siblings('form').find('.qdBtn').eq(0).children().html("查看");
- that.parent().parent().parent().parent().siblings('form').find('.qdBtn').eq(1).children().html("新建");
- that.parent().parent().parent().parent().siblings('form').find('.qdBtn').eq(2).children().html("查看");
- } else if (type == "1") {
- that.parent().parent().parent().parent().siblings('form').find('.qdBtn').eq(0).children().html("删除");
- that.parent().parent().parent().parent().siblings('form').find('.qdBtn').eq(1).children().html("新建");
- that.parent().parent().parent().parent().siblings('form').find('.qdBtn').eq(2).children().html("查看");
- } else if (type == "3") {
- that.parent().parent().parent().parent().siblings('form').find('.qdBtn').eq(0).children().html("删除");
- that.parent().parent().parent().parent().siblings('form').find('.qdBtn').eq(1).children().html("查看");
- that.parent().parent().parent().parent().siblings('form').find('.qdBtn').eq(2).children().html("新建");
- }
- }else {
- if (type != "0") {
- mui.alert("请先新建猪舍档案!", "提示", function() {});
- that.removeClass("mui-active").children().css({'transition-duration': '0.2s', 'transform': 'translate(0, 0px)'});
- return;
- }else {
- that.parent().parent().parent().next().slideDown(500,function(){
- iscroll.refresh();
- }).parent().siblings('form').find('.hiddenli').stop().slideUp(500);
- $(".mui-switch").removeClass("mui-active").children().css({'transition-duration': '0.2s', 'transform': 'translate(0, 0px)'});
- that.addClass("mui-active");
- zsWindow(type);
- zf.html("保存");
- that.parent().parent().parent().parent().siblings('form').find('.qdBtn').eq(0).children().html("查看");
- that.parent().parent().parent().parent().siblings('form').find('.qdBtn').eq(1).children().html("新建");
- that.parent().parent().parent().parent().siblings('form').find('.qdBtn').eq(2).children().html("查看");
- }
- }
- }
- }else{
- that.parent().parent().parent().next().slideUp(500,function(){
- iscroll.refresh();
- });
- if (type == "0") {
- zf.html("删除");
- } else if (type == "2") {
- zf.html("新建");
- }
- else {
- zf.html("查看");
- }
- }
- //权限控制
- qxkz();
-
- });
- });
- //猪舍保存/删除
- $("#sdZs").on("tap",function() {
- if ($(this).html() == "保存") {
- saveZs();
- } else {
- deleteZs();
- }
- });
- //栏期保存/删除
- $("#sdLq").on("tap",function() {
- if ($(this).html() == "保存") {
- saveLqda();
- } /* else {
- deleteLqda();
- } */
- });
- //设备配置保存
- $("#sdSb").on("tap", function() {
- if ($(this).html() == "保存") {
- saveSbpz();
- }
- });
- //栏期维护的新建
- $("#sdLqwh").on("tap",function () {
- if ($(this).html() == "保存") {
- saveLqwh();
- }
- });
- $("#sdZs,#sdLq,#sdSb,#sdLqwh").on("tap",function () {
- setTimeout(function(){
- iscroll.refresh();
- }, 600);
- });
-
- //报警舍显示
- if ($("#lastThree").val() == "000") {
- $("#bjs").show();
- }else {
- $("#bjs").hide();
- }
- });
- function zsWindow(type) {
- var mcid = $("#mcid").val();
- var zsid = $("#mczsid").val();
- var lqid = $("#mclqid").val();
- if (type == 0) { //加载新建猪舍页面
- haifm.loadMobilePage("zsdaConstant", "haifmvDaEditZsda.htm?mcid=" + mcid + "&zsid=" + zsid);
- }else if (type == 1) {
- haifm.loadMobilePage("lqdaConstant", "haifmvDaEditLqda.htm?mcid=" + mcid + "&zsid=" + zsid + "&lqid=" + lqid);
- }else if (type == 2) {
- haifm.loadMobilePage("lqwhConstant", "haifmvDaEditLqwh.htm?mcid=" + mcid + "&zsid=" + zsid + "&lqid=" + lqid);
- }else if (type == 3) {
- haifm.loadMobilePage("sbpzConstant", "haifmvDaEditSbpz.htm?mcid=" + mcid + "&zsid=" + zsid);
- }
- }
- </script>
- </head>
- <body>
- <input type="hidden" value="$!numOfExistZs" id="zsnum">
- <input type="hidden" value="$!daZsda.id" id="mczsid">
- <input type="hidden" value="$!daZsda.dqlq" id="mclqid">
- <input type="hidden" value="$!sbid" id="mcSbid">
- <input type="hidden" value="$!numOfExistLq" id="lqnum" />
- <input type="hidden" value="" id="lqwhsee" />
- <input type="hidden" id="lastThree" value="$!lastThree" />
- <input type="hidden" id="qyzt" value="$!qyzt"/>
- <input type="hidden" id="mcZsbz" value="$!daZsda.zsbz"/>
- <input type="hidden" id="daxx_zsda_update" value="$!daxx_zsda_update">
- <input type="hidden" id="daxx_zsda_delete" value="$!daxx_zsda_delete">
- <input type="hidden" id="daxx_lqda_lqxx_update" value="$!daxx_lqda_lqxx_update">
- <input type="hidden" id="daxx_lqda_lqxx_insert" value="$!daxx_lqda_lqxx_insert">
- <input type="hidden" id="sbpz_cssz_update" value="$!sbpz_cssz_update">
- <input type="hidden" id="sbpz_cssz_insert" value="$!sbpz_cssz_insert">
- <div id="wrap">
- <header>
- <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
- <p>档案信息</p>
- <span class="glyphicon" aria-hidden="true" style="width: 18px;height: 18px;"></span>
- </header>
- <div class="middle">
- <section class="zsdaxgIscroll" style="background: #fff;">
- <div class="mui-content">
- <div class="mui-control-content mui-active">
- <ul>
- <form name="zsdaForm" id="zsdaForm" method="post" action="saveHaifmvZsda.htm">
- <!--猪舍档案-->
- <li class="align-itemscenter">
- <ul class="mui-table-view" style="width: 80%;">
- <li class="mui-table-view-cell">
- <span>猪舍档案</span>
- <div class="mui-switch mui-active" data-type="0" id="zsdndk">
- <div class="mui-switch-handle"></div>
- </div>
- </li>
- </ul>
- <div class="qdBtn" style="width: 20%;">
- <button type="button" class="mui-btn mui-btn-outlined " data-for = "1" id="sdZs">保存</button>
- </div>
- </li>
- <li class="hiddenli">
- <div class="rowBox container-fluid" id = "zsdaConstant"></div>
- </li>
- </form>
- <form name="lqdaForm" id="lqdaForm" method="post" action="saveHaifmvLqda.htm">
- <!--栏期档案-->
- <li class="align-itemscenter">
- <ul class="mui-table-view" style="width: 80%;">
- <li class="mui-table-view-cell">
- <span>栏期档案</span>
- <div class="mui-switch" data-type="1">
- <div class="mui-switch-handle"></div>
- </div>
- </li>
- </ul>
- <div class="qdBtn" style="width: 20%;">
- <button type="button" class="mui-btn mui-btn-outlined " data-for = "2" id = "sdLq">查看</button>
- </div>
- </li>
- <li class="hiddenli" style="display: none;">
- <div class="rowBox container-fluid" id = "lqdaConstant"></div>
- </li>
- </form>
- #if ($!daZsda.zsbz != 4)
- <form name="lqwhForm" id="lqwhForm" method="post" action="saveHaifmvLqwh.htm">
- <!--栏期维护-->
- <li class="align-itemscenter">
- <ul class="mui-table-view" style="width: 80%;">
- <li class="mui-table-view-cell">
- <span>栏期维护</span>
- <div class="mui-switch" data-type="2" id="seeLqwh">
- <div class="mui-switch-handle"></div>
- </div>
- </li>
- </ul>
- <div class="qdBtn" style="width: 20%;">
- <button type="button" class="mui-btn mui-btn-outlined " id = "sdLqwh" data-for="3">新建</button>
- </div>
- </li>
- <li class="hiddenli" style="display: none;">
- <div class="rowBox container-fluid" id = "lqwhConstant"></div>
- </li>
- </form>
- #end
- <form name="SbpzForm" id="SbpzForm" method="post" action="saveHaifmvCssz.htm">
- <!--设备配置-->
- <li class="align-itemscenter">
- <ul class="mui-table-view" style="width: 80%;">
- <li class="mui-table-view-cell">
- <span>设备配置</span>
- <div class="mui-switch" data-type="3">
- <div class="mui-switch-handle"></div>
- </div>
- </li>
- </ul>
- <div class="qdBtn" style="width: 20%;">
- <button type="button" class="mui-btn mui-btn-outlined " data-for = "4" id = "sdSb">查看</button>
- </div>
- </li>
- <li class="hiddenli" style="display: none;padding-bottom: 0.2rem;">
- <div class="rowBox container-fluid" id = "sbpzConstant"></div>
- </li>
- </form>
- </ul>
- </div>
- </div>
- </section>
- </div>
- <!--区域框-->
- <div class="mui-poppicker mui-active ggys qyk" style="bottom: 3rem !important;">
- <div class="title column">
- <span class="mcdazsqy1"></span>
- <h5>所属区域</h5>
- <div class="leftsanjiao"></div>
- <div class="rightsanjiao"></div>
- </div>
- <div class="mui-poppicker-body">
- <div class="mui-picker d7dfeabackground">
- <div class="mui-picker-inner">
- <div class="slkCentent">
- <div class="mui-pciker-rule mui-pciker-rule-ft"></div>
- <ul class="mui-pciker-list sllist" style="transform: perspective(1000px) rotateY(0deg) rotateX(0deg);" name="daZsda.ssqy">
- #set ($count = 1)
- #foreach($!obj in $!ssqyList)
- <li class="visible" data-for="$count" #if("$!obj.dmid" == "$!daZsda.ssqy") class = "highlight" #end>$!obj.dmmc</li>
- #set ($count = $count+1)
- #end
- </ul>
- <div class="mui-pciker-rule mui-pciker-rule-bg"></div>
- </div>
- </div>
- </div>
- </div>
- <div class="sjokbox">
- <div class="sjok oksl">
- <span class="mui-icon mui-icon-checkmarkempty"></span>
- </div>
- </div>
- </div>
- <!--猪舍区域-->
- <div class="mui-poppicker mui-active ggys qyk2" style="bottom: 3rem !important;">
- <div class="title column">
- <span class="mcdazsqy1"></span>
- <h5>猪舍区域</h5>
- <div class="leftsanjiao"></div>
- <div class="rightsanjiao"></div>
- </div>
- <div class="mui-poppicker-body">
- <div class="mui-picker d7dfeabackground">
- <div class="mui-picker-inner">
- <div class="slkCentent">
- <div class="mui-pciker-rule mui-pciker-rule-ft"></div>
- <ul class="mui-pciker-list zsqylist" style="transform: perspective(1000px) rotateY(0deg) rotateX(0deg);" name="daZsda.zsqy">
- <li class="visible" data-for="0" >无</li>
- #foreach($!obj in $!zsqyList)
- <li class="visible" data-for="$!obj.id" #if("$!obj.id" == "$!daZsda.zsqy") class = "highlight" #end>$!obj.qymc</li>
- #end
- </ul>
- <div class="mui-pciker-rule mui-pciker-rule-bg"></div>
- </div>
- </div>
- </div>
- </div>
- <div class="sjokbox">
- <div class="sjok oksl">
- <span class="mui-icon mui-icon-checkmarkempty"></span>
- </div>
- </div>
- </div>
- <!--出栏模式-->
- <div class="mui-poppicker mui-active ggys msk" style="bottom: 3rem !important;">
- <div class="title column">
- <span class="mcdazsms1"></span>
- <h5>当前模式</h5>
- <div class="leftsanjiao"></div>
- <div class="rightsanjiao"></div>
- </div>
- <div class="mui-poppicker-body">
- <div class="mui-picker d7dfeabackground">
- <div class="mui-picker-inner">
- <div class="slkCentent">
- <div class="mui-pciker-rule mui-pciker-rule-ft"></div>
- <ul class="mui-pciker-list mslist" style="transform: perspective(1000px) rotateY(0deg) rotateX(0deg);" name="xtSbcs.dqms" id="dqms">
- #set ($count = 1)
- #foreach($!obj in $!dqmsList)
- <li class="visible" data-for="$count" id="dqms$count" value="$!obj.dmid" #if("$!obj.dmid" == "$!xtSbcs.dqms") class="highlight" #end>$!obj.dmmc</li>
- #set ($count = $count+1)
- #end
- </ul>
- <div class="mui-pciker-rule mui-pciker-rule-bg"></div>
- </div>
- </div>
- </div>
- </div>
- <div class="sjokbox">
- <div class="sjok oksl">
- <span class="mui-icon mui-icon-checkmarkempty"></span>
- </div>
- </div>
- </div>
- <div id="overlay"></div>
- </div>
- </body>
- </html>
|