lvhao 14 godzin temu
rodzic
commit
e5b3bc3279
1 zmienionych plików z 9 dodań i 2 usunięć
  1. 9 2
      core/CoreApp/controllers/Goodimglibrary.php

+ 9 - 2
core/CoreApp/controllers/Goodimglibrary.php

@@ -369,6 +369,7 @@ class Goodimglibrary extends Start_Controller {
                 'zh'=>$u9_info['zh'],
                 'jm'=>$u9_info['jm'],
                 'u9_check'=>1,
+                "sku_check"=>1,
             ]);
             if($rr){
                 echo json_encode(['success' => true,'msg' => '商品添加成功']);
@@ -431,6 +432,8 @@ class Goodimglibrary extends Start_Controller {
 
             $jm = $this->input->post("jm",true);
             $kuwei_set = $this->input->post("kuwei_set",true);
+
+            $sku_check = $this->input->post("sku_check",true);
           
             if(empty($page))
 		    {
@@ -504,11 +507,15 @@ class Goodimglibrary extends Start_Controller {
                 $where .= ' AND kuwei_set = '.$kuwei_set.' ';
             }
 
+            if($sku_check > -1){
+                $where .= ' AND sku_check = '.$sku_check.' ';
+            }
+
             $is_able_edit = 0;
             if(in_array($user_id,[10,28])){
                 $is_able_edit = 1;
             }
-            $list = $this->goods->find_all($where,'id,sku,title,zh,jm,update_time,kuwei,old_sku','id DESC',$start,$perpage);
+            $list = $this->goods->find_all($where,'id,sku,title,zh,jm,update_time,kuwei','id DESC',$start,$perpage);
             $info_list = [];
             foreach($list as $k => $v){
                 $info_list[$k]['id'] = $v['id'];
@@ -921,7 +928,7 @@ class Goodimglibrary extends Start_Controller {
             if($info['sku'] == $sku){
                 echo json_encode(['success'=>false,'msg'=>'料品SKU未变动']);exit;
             }
-            if($this->goods->save(array('sku'=>$sku),$id)){
+            if($this->goods->save(array('sku'=>$sku,"sku_check"=>1),$id)){
                 echo json_encode(['success'=>true,'msg'=>'料品SKU修改成功']);exit;
             }else{
                 echo json_encode(['success'=>false,'msg'=>'料品SKU修改失败']);exit;