错配弹框对应处理
来源:互联网 发布:数据更新维护机制 编辑:程序博客网 时间:2024/06/05 05:52
//Controllerpublic function abnormalDistributionStatisticsAction() { $opCode = $this->_request->getParam("orders_code_ch", ""); $opMore = $this->_request->getParam("op_more", ""); $opWrong = $this->_request->getParam("op_wrong", ""); $opLeakage = $this->_request->getParam("op_leakage", ""); $noAbnormalities = $this->_request->getParam("no_abnormalities", ""); $return = array("ask" => 0, "msg" => ""); $opId = Order_Service_OrderPickup::getByValue($opCode, "op_code"); if (!$opId) { $return['msg'] = "请输入下架单号"; } else { if ($noAbnormalities == 1) { if (($opMore == "" && $opWrong == "" && $opLeakage == "") || ($opMore == 0 && $opWrong == 0 && $opLeakage == 0)) { $return = array("ask" => 1, "msg" => "配货异常统计成功"); } else { $return = array("ask" => 0, "msg" => "配货异常数量跟无异常不能同时存在"); } die(json_encode($return)); } else { if ($opMore == 0 && $opWrong == 0 && $opLeakage == 0) { $return = array("ask" => 0, "msg" => "配货异常统计多配、错配、漏配不可一起 0 通过,如果无异常数量,请在无异常处打钩"); die(json_encode($return)); } else { $combination = array( "op_more" => $opMore, "op_wrong" => $opWrong, "op_leakage" => $opLeakage, ); } } $opIdInfo = Order_Service_OrderPickup::update($combination, $opId['op_id']); if (!$opIdInfo) { $return = array("ask" => 0, "msg" => "配货异常统计失败"); } else { $return = array("ask" => 1, "msg" => "配货异常统计成功"); } } die(json_encode($return));}//Html<div id="abnormalDistributionStatisticsDialog" style="display:none" title="配货异常统计"></div>//Js//允许配货异常记录执行var isShow = true;//允许最后一次执行var isEnd = false;//限制仓库var warehouseIds = ['11', '4'];//允许关闭弹框var isAllow = false;//允许提示var isOnce = true;//最后一次执行OrdersTotal = parseInt($('#OrdersTotal').text()); ScanOrdersTotal = parseInt($('#ScanOrdersTotal').text()); if(OrdersTotal == (ScanOrdersTotal + 1)) { isEnd = true; }//弹框if ($.inArray(json.warehouse_id, warehouseIds) != -1 && isShow == true && isEnd == true) { statistics(); isShow = false; }//打包超时提示if($.inArray(json.warehouse_id, warehouseIds) != -1 && (json.time != 0 || json.time != "") && isOnce == true) { myVar = setInterval(packageTimeoutPrompt, json.time * 60000);}if(typeof myVar != "undefined") { clearInterval(myVar); isOnce = false;}//配货异常统计必填$("#abnormalDistributionStatisticsDialog").dialog({ autoOpen: false, modal: true, width: 500, height: 300, show: "slide", beforeclose: function () { var op_more = $("#op_more").text(); var op_wrong = $("#op_wrong").text(); var op_leakage = $("#op_leakage").text(); var no_abnormalities = $("#no_abnormalities").text(); if (op_more == "" && op_wrong == "" && op_leakage == "" && no_abnormalities == "") { alert('禁止进行关闭操作'); return false; } return true; }, buttons: { "提交": function () { abnormalDistributionStatistics(); } }, beforeclose: function () { if (isAllow == false) { alert('不允许进行关闭操作'); return false; } isAllow = true; return true; }});//配货异常统计输入框function statistics() { var Html = ""; Html += "<table width='100%' height='100%' border='1' style='text-align: center'>"; Html += "<tr>"; Html += "<th>多配数量</th>"; Html += "<th><input class='op_more' type='text' name='op_more' value=''></th>"; Html += "</tr>"; Html += "<tr>"; Html += "<th>错配数量</th>"; Html += "<th><input class='op_wrong' type='text' name='op_wrong' value=''></th>"; Html += "</tr>"; Html += "<tr>"; Html += "<th>漏配数量</th>"; Html += "<th><input class='op_leakage' type='text' name='op_leakage' value=''></th>"; Html += "</tr>"; Html += "<tr>"; Html += "<th>无异常</th>"; Html += "<th><input class='no_abnormalities' type='checkbox' name='no_abnormalities' value='1'></th>"; Html += "</tr>"; Html += "</table>"; $("#abnormalDistributionStatisticsDialog").html(Html); $("#abnormalDistributionStatisticsDialog").dialog("open");}//配货异常统计提交function abnormalDistributionStatistics() { var orders_code_ch = $("#orders_code_ch").val(); var op_more = $("[name=op_more]").val(); var op_wrong = $("[name=op_wrong]").val(); var op_leakage = $("[name=op_leakage]").val(); var no_abnormalities = $("[name=no_abnormalities]:checked").attr("value"); $.ajax({ type: "post", async: false, dataType: "json", url: "/warehouse/pack-check/abnormal-distribution-statistics/", data: { "orders_code_ch": orders_code_ch, "op_more": op_more, "op_wrong": op_wrong, "op_leakage": op_leakage, "no_abnormalities": no_abnormalities }, success: function (json) { if (!json.ask) { alertTip(json.msg); } else { isAllow = true; $("#abnormalDistributionStatisticsDialog").dialog("close"); if(typeof myVar != "undefined") { clearInterval(myVar); isOnce = false; } } } }); closeLoading();}//打包超时提示function packageTimeoutPrompt() { if(typeof myVar != "undefined") { clearInterval(myVar); isOnce = false; } $('<div title="提示"><p align="center">打包时间已超时</p></div>').dialog({ modal: true, buttons: { '确定': function () { $(this).dialog("close"); } } });}
阅读全文
0 0
- 错配弹框对应处理
- 常见问题与对应处理算法
- WM_ 对应的处理函数 MFC
- android手机返回键对应处理
- 碰撞事件对应捕捉与处理实例
- 审核对应的业务逻辑处理
- MFC 中WM_消息处理对应的处理函数
- MFC 中WM_消息处理对应的处理函数
- UPDATE_COMMAND_UI 处理菜单对应的用户界面 COMMAND 处理该菜单对应的功能
- Hibernate 二次笔记 之 非一一对应关系处理
- Eclipse报错及对应处理方法积累
- 处理SWT bit版本与JDK bit版本的对应
- (转)Eclipse报错及对应处理方法积累
- SPHysics浮体模型及对应边界处理
- 在js中处理特殊字符对应的中文编码
- 编程中的数值与对应符号的处理
- Android dpi的对应drawable,values文件处理
- Exec函数对应的系统调用处理过程
- glog简单使用
- PowerDesigner中显示Code和Name
- 【2017.11.03】摄影-构图
- 配置nginx实现负载均衡和HTTPS
- Arduino-uno-rev3基础知识
- 错配弹框对应处理
- codeforces 573A Bear and Poker
- Struts2+JSP+JDBC实现学生信息的增删改查
- 需求(Java语言实现):对存有图片URL的txt文件进行逐行读取,自行下载txt文件中的图片到指定文件夹中
- bzoj 4972 [Lydsy八月月赛]小Q的方格纸(前缀和)
- C语言类型转换
- Makefile:xxx: recipe for target xxx failed +如何忽略makefile执行过程中的某些命令的错误而得以继续运行
- 关于web.xml中<web-app>报错解决方案
- 写会MySQL索引