【多选 】批量处理 input
来源:互联网 发布:csgo a卡优化 编辑:程序博客网 时间:2024/06/04 19:24
//批量处理<script type="text/javascript"> function recordSend(){ var ids=''; $("input[name^=ids").each(function() { if ($(this).attr("checked")) { ids += ","+$(this).val(); } }); if($.trim(ids)!='' && confirm('确认要进行批量发货吗?')){ $.getJSON("{:U('order/updateSendIdsP')}&ids="+ids+"&callback=?",function(data){ if(data.code==1){ location.reload(); }else{ alert(data.message); } }); } }</script>
/** * 批量发货( 只能发货,不可取消发货) */ public function updateSendIdsP(){$ids= trim(trim(I("ids")),',');$idsArr=explode(',',$ids);foreach($idsArr as $k=>$id){if((int)$id<1){$return = array('message' => '参数有误','code' =>2);$this->ajaxReturn($return, 'JSONP');exit;}}$sqlWhere="id in (".$ids.") and virtual=1";$count = $this->model->where($sqlWhere)->count();if(count($idsArr)!=$count){$return = array('message' => '参数有误,有不是实物的id','code' =>3);$this->ajaxReturn($return, 'JSONP');}$data['send']=1; $rst = $this->model->where($sqlWhere)->save($data);if( $rst>=0){$return = array('message' => '更新成功','code' =>1);}else{$return = array('message' => '更新失败','code' =>4);}$this->ajaxReturn($return, 'JSONP');}
0 0
- 【多选 】批量处理 input
- 批量处理
- 批量处理
- 批量处理
- 批量处理
- 批量处理
- 玩转Web值jquery(一)---对表单中的某一标签批量处理(以input为例)
- 图片格式批量转换,批量处理
- input hint水印处理
- input事件的处理
- 输入处理 Input Processor
- input device 按键处理
- input子系统按键处理
- input事件的处理
- 比较批量处理与非批量处理
- input子系统四 input事件处理
- input子系统四 input事件处理
- input子系统四 input事件处理
- I2C总线之(二)---时序
- iOS实现一个颜色渐变的弧形进度条
- C++11实现自旋锁
- Qt学习笔记(二)——qt空文档项目
- 什么转换器能将pdf转换成html
- 【多选 】批量处理 input
- 范冰冰驾“风火轮”调皮出行 李晨爱相随引围观
- MongoDB常用命令大全
- 实现网站由http协议转为https协议
- FatSecret Platform API
- 【从头开始写操作系统系列】实现一个-GDT(1)
- String Hashing(字符串哈希)
- Eclipse将引用了第三方jar包的Java项目打包成jar文件的两种方法
- Best Time to Buy and Sell Stock III