作者 anyv
1 个管道 的构建 通过 耗费 0 秒

4

... ... @@ -167,6 +167,9 @@ class SalesmangoodsController extends WeChatBaseController{
public function Salesman_goods_edit(){
if($this -> request -> isPost()){
if($_POST['money']>$_POST['price']){
return 2;
}
$data['show_img'] = $_POST['show_img'];
$data['thumbnail'] = $_POST['thumbnail'];
$data['book_name'] = $_POST['book_name'];
... ...
... ... @@ -355,11 +355,16 @@
}
$.post("{:url('Salesmangoods/Salesman_goods_edit')}",{id:id,show_img:show_img,thumbnail:thumbnail,book_name:book_name,money:money,price:price,pricing:pricing,instr:instr,book_number:book_number,paper:paper,book_size:book_size,binding:binding,author:author,press:press,press_time:press_time,suit:suit,grade:grade,img0:img0,img1:img1,img2:img2,printing:printing},function(data){
if(data){
window.location.href="{:url('Salesmangoods/salesman_goods')}";
if(data == 2){
alert('佣金不能大于售价');
}else{
alert('更新失败!');
if(data){
window.location.href="{:url('Salesmangoods/salesman_goods')}";
}else{
alert('更新失败!');
}
}
});
}
... ...