wugg 2 anni fa
parent
commit
38ef7f4a09

+ 134 - 43
app/admin/controller/Exclusive.php

@@ -5,7 +5,9 @@ namespace app\admin\controller;
 
 
 use think\App;
+use think\Exception;
 use think\facade\Db;
+use think\facade\Validate;
 
 //泰康专属的一个列表
 class Exclusive extends Base
@@ -89,7 +91,9 @@ class Exclusive extends Base
         }
     }
 
-    public function  status(){
+    //业务参数-专属类型管理的启用/禁用
+    public function status()
+    {
 //            $id=isset($this->post['id'])&&$this->post['id']!=="" ? intval($this->post['id']):"";
 //            if($id===""){
 //                return error_show(1004,"参数id不能为空");
@@ -107,51 +111,138 @@ class Exclusive extends Base
 //            }else{
 //                return error_show(1004,"{$msg}失败");
 //            }
-        $id = isset($this->post['id']) && $this->post['id'] !=="" ? intval($this->post['id']):"";
-        if($id===""){
-            return error_show(1002,"参数id不能为空");
-        }
-        $stn = Db::name('exclusive')->where(['id'=>$id])->find();
-        if(empty($stn)){
-            return error_show(1002,"未找到商品数据");
-        }
-        $status = isset($this->post['status']) && $this->post['status'] !=="" ? intval($this->post['status']) :"";
-        if($status===""){
-            return error_show(1002,"参数status不能为空");
-        }
-        if ($stn['level']==2) {
-            if($status==1){
-                $can = mai($stn['id']);
-                $cat=array_column($can,'id');
-            }else{
-                $cat =$stn['id'];
-            }
-            // return error_show(1002, "所在级别不能启用");
-        }
-        if($stn['level']==1){
-            if($status==1){
-                return error_show(1002,"所在等级不能启用");
-            }else{
-                $db= Db::name('exclusive')->where(['pid'=>$stn['id'],'status'=>1,'is_del'=>0])->count();
-                if($db==0){
-                    $cat = $stn['id'];
-                }else{
-                    return error_show(1002,"子级分类未禁用");
+
+
+        $param = $this->request->only(['id', 'status']);
+
+        $val = Validate::rule([
+            'id' => 'require|number|gt:0',
+            'status' => 'require|number|in:0,1',
+        ]);
+
+        if (!$val->check($param)) return error_show(1004, $val->getError());
+
+        Db::startTrans();
+        try {
+
+            $res = Db::name('exclusive')
+                ->field('id,level,status,pid')
+                ->where('id', $param['id'])
+                ->find();
+
+            if (empty($res)) throw new Exception('该专属类型不存在');
+
+            //启用
+            if ($param['status'] == 1) {
+                //一级
+                if ($res['level'] == 1) {
+
+                    //是否存在子级
+                    $total = Db::name('exclusive')
+                        ->where(['pid' => $param['id'], 'is_del' => 0])
+                        ->count('id');
+
+                    if ($total) {
+                        //有子级的话,子级有一个启用,即可启用
+                        $child_id = Db::name('exclusive')
+                            ->field('id')
+                            ->where(['pid' => $param['id'], 'is_del' => 0, 'status' => 1])
+                            ->find();
+
+                        if (empty($child_id)) throw new Exception('请先启用一个子级');
+
+                    }
+
+
+                } else {
+                    //二级的话,顺便把它的上级也启用了
+                    Db::name('exclusive')
+                        ->where(['id' => $res['pid'], 'is_del' => 0, 'status' => 0])
+                        ->update(['status' => $param['status'], 'updatetime' => date('Y-m-d H:i:s')]);
+
                 }
+
+            } elseif ($param['status'] == 0) {
+                //禁用
+                if ($res['level'] == 1) {
+
+                    //是否存在子级
+                    $total = Db::name('exclusive')
+                        ->where(['pid' => $param['id'], 'is_del' => 0])
+                        ->count('id');
+
+                    if ($total) {
+                        //有子级的话,子级全部禁用,方可禁用
+                        $child_id = Db::name('exclusive')
+                            ->field('id')
+                            ->where(['pid' => $param['id'], 'is_del' => 0, 'status' => 1])
+                            ->find();
+                        if (!empty($child_id)) throw new Exception('请先禁用全部子级');
+
+                    }
+                }
+
             }
+
+            //修改自己
+            Db::name('exclusive')
+                ->where(['id' => $param['id'], 'is_del' => 0])
+                ->update(['status' => $param['status'], 'updatetime' => date('Y-m-d H:i:s')]);
+
+            Db::commit();
+            return error_show(0, "状态更新成功");
+        } catch (\Exception $e) {
+            Db::rollback();
+            return error_show(1005, $e->getMessage());
         }
-        // $pd= $stn['status'];
-        $it=[];
-        $it['status']=$status;
-        $it['updatetime']=date("Y-m-d H:i:s");
-        $str = Db::name('exclusive')->where(['id'=>$cat,'is_del'=>0])->save($it);
-        if($str){
-//        $order = ["order_code"=>$id,"status"=>$pd,"action_remark"=>'',"action_type"=>"edit"];
-//        ActionLog::logAdd($this->post['token'],$order,"sxd",$stn['status'],$order);
-            return error_show(0,"状态更新成功");
-        }else{
-            return error_show(1002,"状态更新失败");
-        }
+
+//        $id = isset($this->post['id']) && $this->post['id'] !=="" ? intval($this->post['id']):"";
+//        if($id===""){
+//            return error_show(1002,"参数id不能为空");
+//        }
+//        $stn = Db::name('exclusive')->where(['id'=>$id])->find();
+//        if(empty($stn)){
+//            return error_show(1002,"未找到商品数据");
+//        }
+//        $status = isset($this->post['status']) && $this->post['status'] !=="" ? intval($this->post['status']) :"";
+//        if($status===""){
+//            return error_show(1002,"参数status不能为空");
+//        }
+//            if ($stn['level'] == 2) {
+//                if ($status == 1) {
+//                    $can = mai($stn['id']);
+//                    $cat = array_column($can, 'id');//子级如果启用,连同它的父级一起启用
+//                } else {
+//                    $cat = $stn['id'];
+//                }
+//                // return error_show(1002, "所在级别不能启用");
+//            }
+//            if ($stn['level'] == 1) {
+//                if ($status == 1) {
+//                    return error_show(1002, "所在等级不能启用");
+//                } else {
+//                    $db = Db::name('exclusive')->where(['pid' => $stn['id'], 'status' => 1, 'is_del' => 0])->count();
+//                    if ($db == 0) {
+//                        $cat = $stn['id'];
+//                    } else {
+//                        return error_show(1002, "子级分类未禁用");
+//                    }
+//                }
+//            }
+//            // $pd= $stn['status'];
+//            $it = [];
+//            $it['status'] = $status;
+//            $it['updatetime'] = date("Y-m-d H:i:s");
+//            $str = Db::name('exclusive')->where(['id' => $cat, 'is_del' => 0])->save($it);
+//            if ($str) {
+////        $order = ["order_code"=>$id,"status"=>$pd,"action_remark"=>'',"action_type"=>"edit"];
+////        ActionLog::logAdd($this->post['token'],$order,"sxd",$stn['status'],$order);
+//                return error_show(0, "状态更新成功");
+//            } else {
+//                return error_show(1002, "状态更新失败");
+//            }
+
+
     }
 
     public function query(){

+ 59 - 23
app/admin/controller/Good.php

@@ -5,6 +5,7 @@ namespace app\admin\controller;
 
 use app\admin\model\GoodLog;
 use think\App;
+use think\db\Raw;
 use think\facade\Db;
 use think\facade\Validate;
 
@@ -875,39 +876,74 @@ class Good extends Base
     //根据价格区间,筛选符合条件的商品列表
     public function getGoodListByLadder()
     {
-
         //1.请求参数
-        $param=$this->request->only(['min_price','max_price','page'=>1,'size'=>15],'post','trim');
+        $param = $this->request->only([
+            'is_stock' => '',
+            'min_price' => 0,
+            'max_price' => 0,
+            'moq' => 0,
+            'page' => 1,
+            'size' => 15
+        ], 'post', 'trim');
+
+        if ($param['is_stock'] === '') $param['is_stock'] = 2;//2表示全部
 
         //2.参数校验
-        $val=Validate::rule([
-            'min_price'=>'require|float|elt:max_price',
-            'max_price'=>'require|float|egt:min_price',
-            'page'=>'require|number|gt:0',
-            'size'=>'require|number|gt:0',
+        $val = Validate::rule([
+            'is_stock|是否库存品' => 'require|number|in:0,1,2',
+            'min_price' => 'require|float|elt:max_price',
+            'max_price' => 'require|float|egt:min_price',
+            'moq|起订量' => 'require|number',
+            'page' => 'require|number|gt:0',
+            'size' => 'require|number|gt:0',
         ]);
 
-        if(!$val->check($param)) return error_show(1004,$val->getError());
+        if (!$val->check($param)) return error_show(1004, $val->getError());
+
+        //3.组织SQL
+        $count = Db::name('good')
+            ->alias("a")
+            ->field("b.skuCode,b.platform_code,b.plat_code,b.id as good_id,a.*,b.addtime,b.updatetime,b.exam_status,gb.createrid purchase_id,gb.creater purchase,gl.min_num,gl.max_num")//成本表里的创建人,也是线上商品的采购人,为了防止混淆,给creater取个别名
+            ->leftJoin("good_platform b", "a.spuCode=b.spuCode")
+            ->leftJoin("good_basic gb", "gb.spuCode=a.spuCode")
+            ->leftJoin("good_ladder gl", "gl.skuCode=b.skuCode");
 
-        //3.组织SQL语句
-        $skuCodes = Db::name('good_ladder')
-            ->field('skuCode')
-            ->whereBetween('sale_price', [$param['min_price'], $param['max_price']])
-            ->where(['is_del' => 0, 'status' => 1])
-            ->group('skuCode')
-            ->buildSql();
 
-        //4.查询列表并补充相关信息(从list方法照搬)
         $list = Db::name('good')
             ->alias("a")
-            ->field("b.skuCode,b.platform_code,b.plat_code,b.id as good_id,a.*,b.addtime,b.updatetime,b.exam_status,gb.createrid purchase_id,gb.creater purchase,gl.min_num,gl.max_num")//成本表里的创建人,也是线上商品的采购人,为了防止混淆,给creater取个别名
+            ->field("b.skuCode,b.platform_code,b.plat_code,b.id as good_id,a.*,b.addtime,b.updatetime,b.exam_status,gb.createrid purchase_id,gb.creater purchase,gl.min_num,gl.max_num,gl.sale_price")//成本表里的创建人,也是线上商品的采购人,为了防止混淆,给creater取个别名
             ->leftJoin("good_platform b", "a.spuCode=b.spuCode")
             ->leftJoin("good_basic gb", "gb.spuCode=a.spuCode")
-            ->leftJoin("good_ladder gl", "gl.skuCode=b.skuCode")
-            ->where('b.skuCode in ' . $skuCodes)
-            ->page($param['page'], $param['size'])
-            ->order("b.addtime desc")
-            ->select();
+            ->leftJoin("good_ladder gl", "gl.skuCode=b.skuCode");
+
+        //4.加入条件
+        if ($param['min_price'] && $param['max_price']) {
+            $skuCodes = Db::name('good_ladder')
+                ->field('skuCode')
+                ->whereBetween('sale_price', [$param['min_price'], $param['max_price']])
+                ->where(['is_del' => 0, 'status' => 1])
+                ->group('skuCode')
+                ->buildSql();
+
+            $count->where('b.skuCode in ' . $skuCodes);
+            $list->where('b.skuCode in ' . $skuCodes);
+
+        }
+
+        if ($param['is_stock'] != 2) {
+            $count->where('a.is_stock', '=', $param['is_stock']);
+            $list->where('a.is_stock', '=', $param['is_stock']);
+        }
+        if ($param['moq']) {
+            $count->where('a.moq', '>=', $param['moq']);
+            $list->where('a.moq', '>=', $param['moq']);
+        }
+
+        //5.获取结果
+        $count = $count->order("b.addtime desc")->count('a.id');
+        $list = $list->page($param['page'], $param['size'])->order("b.addtime desc")->select()->toArray();
+
+        //6.补充数据,照搬list方法
         $data = [];
         foreach ($list as $value) {
             $value['cat_info'] = made($value['cat_id'], []);
@@ -946,7 +982,7 @@ class Good extends Base
             $data[] = $value;
         }
 
-        return app_show(0, '请求成功', $data);
+        return app_show(0, "获取成功", ['list' => $data, 'count' => $count]);
 
     }
 

+ 5 - 4
app/admin/controller/Goodup.php

@@ -451,10 +451,11 @@ class Goodup extends Base
                         $lemp['package_fee'] = $value['package_fee'];
                         $lemp['other_fee'] = $value['other_fee'];
                         if($is_gold_price==1){
-                            $gold =Db::name("gold_price1")->where(["type"=>$noble_metal,"status"=>1,"is_del"=>0])->order("addtime desc")->find();
-                            $lemp['nake_total'] =$noble_weight*$gold['price']+ $value['cost_fee']*$noble_weight+$value['mark_fee']+$value['package_fee']+$value['cert_fee']+$value['nake_fee']+$value['delivery_fee']+$value['other_fee'];
-//
-//                            成本总计启用实时金价时,采用供应商实时金价
+
+                            $gold = Db::name("gold_price1")->where(["type" => $noble_metal, "status" => 1, "is_del" => 0])->order("addtime desc")->find();
+                            $lemp['nake_total'] = $noble_weight * $gold['price'] + $value['cost_fee'] * $noble_weight + $value['mark_fee'] + $value['package_fee'] + $value['cert_fee'] + $value['nake_fee'] + $value['delivery_fee'] + $value['other_fee'];
+
+                            //成本总计启用实时金价时,采用供应商实时金价
 //                            $lemp['nake_total'] = $noble_weight * $cgd_gold_price + $value['cost_fee'] * $noble_weight + $value['mark_fee'] + $value['package_fee'] + $value['cert_fee'] + $value['nake_fee'] + $value['delivery_fee'] + $value['other_fee'];
                         }else{
                             $lemp['nake_total'] =$value['nake_fee']+$value['delivery_fee']+$value['cert_fee']+$value['mark_fee']+$value['package_fee']+$value['other_fee'];

+ 24 - 5
app/admin/controller/Process.php

@@ -69,13 +69,32 @@ class Process extends BaseController
       if($orderCode==""){
           return error_show(1004,"参数orderCode不能为空");
       }
-    $list = Db::name("action_process")->where(['order_type'=>$process_type,"is_del"=>0,"status"=>1])->order("weight desc,id desc")
-        ->select();
+    $list = Db::name("action_process")
+        ->withoutField('updatetime')//排除更新时间
+        ->where(['order_type'=>$process_type,"is_del"=>0,"status"=>1])
+        ->order("weight desc,id desc")
+        ->select()
+        ->toArray();
+
+      //根据所有的状态,查询对应的操作
+      $order_process_s = array_column($list,'order_process');
+
+      $node= Db::name("process_order")
+          ->where(["order_type"=>$process_type,"order_code"=>$orderCode])
+          ->whereIn('action_process',$order_process_s)
+          ->column('id,action_uid,action_name,addtime','action_process');
+
     $data=[];
     foreach ($list as $value){
-        $node = Db::name("process_order")->where(["order_type"=>$value['order_type'],"action_process"=>$value['order_process'],"order_code"=>$orderCode])->find();
-        $value['action_uid']= isset($node['action_uid']) ? $node['action_uid']:'';
-        $value['action_name']= isset($node['action_name']) ? $node['action_name']:'';
+//        $node = Db::name("process_order")
+//            ->where([
+//                "order_type"=>$value['order_type'],
+//                "action_process"=>$value['order_process'],
+//                "order_code"=>$orderCode])
+//            ->find();
+        $value['action_uid']= isset($node[$value['order_process']]['action_uid']) ? $node[$value['order_process']]['action_uid']:'';
+        $value['action_name']= isset($node[$value['order_process']]['action_name']) ? $node[$value['order_process']]['action_name']:'';
+        $value['addtime']= isset($node[$value['order_process']]['addtime']) ? $node[$value['order_process']]['addtime']:'';
         $data[]=$value;
     }
     return app_show(0,"获取成功",$data);

+ 26 - 8
app/admin/controller/Purchin.php

@@ -332,7 +332,7 @@ class Purchin extends BaseController
                                         foreach ($out as $k => $v_outCode) {
                                             //修改状态,添加待办
                                             ActionLog::logAdd($this->post['token'], [
-                                                "order_code" => $v_outCode,//出库单号
+                                                "order_code" => $v_outCode['outCode'],//出库单号
                                                 "status" => 0,//这里的status是之前的值
                                                 "action_remark" => '',//备注
                                                 "action_type" => "status"//新建create,编辑edit,更改状态status
@@ -340,7 +340,7 @@ class Purchin extends BaseController
 
                                             ProcessOrder::AddProcess($this->post['token'], [
                                                 "order_type" => 'CKD',
-                                                "order_code" => $v_outCode,//出库单号
+                                                "order_code" => $v_outCode['outCode'],//出库单号
                                                 "order_id" => 0,
                                                 "order_status" => 1
                                             ]);
@@ -435,9 +435,21 @@ class Purchin extends BaseController
         (['wsm_in_code'=>$incode,"a.is_del"=>0])->field("a.id,a.wsm_in_code,a.num,a.error_code,b.result as error_msg,a.error_img,remark,a.is_del")->select();
         $info['checkinfo']= $check;
         $return = Db::name("purchease_return")->where(['wsm_in_code'=>$incode,"is_del"=>0])->find();
-        $return['return_contactor']=isset($return['return_contactor'])&&$return['return_contactor']!="" ?$return['return_contactor']:$info['wsm_contactor'];
-        $return['return_addr']=isset($return['return_addr'])&&$return['return_addr']!="" ?$return['return_addr']:$info['wsm_addr'];
-        $return['return_mobile']=isset($return['return_mobile'])&&$return['return_mobile']!="" ?$return['return_mobile']:$info['wsm_mobile'];
+        $return['return_contactor']=isset($return['return_contactor'])&&$return['return_contactor']!="" ?$return['return_contactor']:'';
+        $return['return_addr']=isset($return['return_addr'])&&$return['return_addr']!="" ?$return['return_addr']:'';
+        $return['return_mobile']=isset($return['return_mobile'])&&$return['return_mobile']!="" ?$return['return_mobile']:'';
+
+        //以下字段临时补充到return中
+        $return['wsm_in_code'] = $incode;
+        $return['wsm_num'] = isset($return['wsm_num']) ? $return['wsm_num'] : 0;
+        $return['reissue_num'] = isset($return['reissue_num']) ? $return['reissue_num'] : 0;
+        $return['return_num'] = isset($return['return_num']) ? $return['return_num'] : 0;
+        $return['contactor'] = $return['return_contactor'];
+        $return['addr'] = $return['return_addr'];
+        $return['mobile'] = $return['return_mobile'];
+        $return['error_remark'] = isset($return['error_remark']) ? $return['error_remark'] : '';
+        $return['remark'] = isset($return['remark']) ? $return['remark'] : '';
+
         $info['return']= $return;
         $info['can']=$cat;
         if(isset($dom['companyNo'])&&$dom['companyNo']!=""){
@@ -706,11 +718,14 @@ class Purchin extends BaseController
         if(empty($info)){
             return error_show(1004,"未找到数据");
         }
+        //正常入库数量
         $wsm_num = isset($this->post['wsm_num']) &&$this->post['wsm_num']!=="" ? intval($this->post['wsm_num']):"" ;
         if($wsm_num===""){
             return error_show(1004,"参数wsm_num 不为空");
         }
+        //补货数量
         $reissue_num = isset($this->post['reissue_num']) &&$this->post['reissue_num']!=="" ? intval($this->post['reissue_num']):"0" ;
+        //退货数量
         $return_num = isset($this->post['return_num']) &&$this->post['return_num']!=="" ? intval($this->post['return_num']):"0" ;
         $contactor = isset($this->post['contactor']) &&$this->post['contactor']!=="" ? trim($this->post['contactor']):"" ;
         if($contactor==""){
@@ -734,7 +749,8 @@ class Purchin extends BaseController
         Db::startTrans();
        try{
 
-        $info['status'] =$info['wsm_num']==$wsm_num ? 4 :5;
+//        $info['status'] =$info['wsm_num']==$wsm_num ? 4 :5;
+           $info['status'] = $info['send_num'] == $wsm_num ? 4 : 5;//艳蓉说,这里不能用入库数量比较,应该是用入库数量,即总数来比较
         $info['is_th'] =$return_num>0 ?1:0;
         $info['updatetime'] = date("Y-m-d H:i:s");
         $up= Db::name("purchease_in")->save($info);
@@ -776,7 +792,9 @@ class Purchin extends BaseController
             GoodLog::LogAdd($this->post['token'],$good_data,'RKD');
             $process=["order_code"=>$info['wsm_in_code'],"order_id"=>$info['id'],"order_status"=>$info['status'],"order_type"=>'RKD'];
             ProcessOrder::AddProcess($this->post['token'],$process);
-            if($info['status']==5){
+
+            //需要在详情页把相关退货记录原样取出来,所以这里把if去掉,所有记录都入purchease_return表
+//            if($info['status']==5){
                 $data=[
                     "wsm_in_code"=>$incode,
                     "wsm_num"=>$wsm_num,
@@ -805,7 +823,7 @@ class Purchin extends BaseController
                 ActionLog::logAdd($this->post['token'],$sto,"RKTHD",0,$sto);
                 $process = ["order_code" => $info['wsm_in_code'], "order_id" => $res, "order_status" => 0, "order_type" => 'RKTHD'];
                 ProcessOrder::AddProcess($this->post['token'],$process);
-            }
+//            }
 
             Db::commit();
             return app_show(0,"验货审核完成");

+ 12 - 0
app/admin/controller/Resign.php

@@ -140,6 +140,18 @@ class Resign extends BaseController
         if($good==false){
             return error_show(1004,"未找到商品数据");
         }
+
+        //校验数量
+        $goodnake = Db::name("good_nake")
+            ->field('id,min_num')
+            ->where([["spuCode", "=", $good_code], ["is_del", "=", 0]])
+            ->order("min_num asc")
+            ->find();
+
+        if (empty($goodnake)) return error_show(1004, '未找到商品成本数据');
+        if ($goodnake['min_num'] > $good_num) return error_show(1004, '该商品最低采购数量为' . $goodnake['min_num']);
+
+
         $lastime = isset($this->post['lastime'])&&$this->post['lastime']!="" ? $this->post['lastime']:"";
         if($lastime===""){
             return error_show(1004,"参数lastime不能为空");

+ 0 - 62
app/admin/controller/Version.php

@@ -306,14 +306,6 @@ class Version extends BaseController
                     $up = Db::name("project_info")->save($value);
                     if($up){
 
-                        //修改状态,添加待办,只记录动作
-                        ActionLog::logAdd($this->post['token'], [
-                            "order_code" => $value['projectNo'],//编码
-                            "status" => $old_value_status,//这里的status是之前的值
-                            "action_remark" => '',//备注
-                            "action_type" => "status"//新建create,编辑edit,更改状态status
-                        ], "PRO", 3, $value);
-
                         $count = Db::name("project_info")->where(["projectNo"=>$value['projectNo'],"status"=>2])
                             ->count();
                         if($count==0){
@@ -322,22 +314,6 @@ class Version extends BaseController
                             if(!$proc){
                                 Db::rollback();
                                 return error_show(1004,"反馈数据选择失败");
-                            }else{
-
-                                //修改状态,添加待办
-                                ActionLog::logAdd($this->post['token'], [
-                                    "order_code"=>$value['projectNo'],//项目编码
-                                    "status"=>$old_value_status,//这里的status是之前的值
-                                    "action_remark"=>'',//备注
-                                    "action_type"=>"status"//新建create,编辑edit,更改状态status
-                                ],"PRO",$value['status'],$value);
-
-                                ProcessOrder::AddProcess($this->post['token'],[
-                                    "order_type"=>'PRO',
-                                    "order_code"=>$value['projectNo'],
-                                    "order_id"=>$value['id'],
-                                    "order_status"=>$value['status']
-                                ]);
                             }
                         }
                     }else{
@@ -354,21 +330,6 @@ class Version extends BaseController
                             if($staar==false){
                                 Db::rollback();
                                 return error_show(1002, "项目咨询单招标结束失败");
-                            }else{
-                                //修改状态,添加待办
-                                ActionLog::logAdd($this->post['token'], [
-                                    "order_code" => $consult['zxNo'],//项目编码
-                                    "status" => 1,//这里的status是之前的值
-                                    "action_remark" => '',//备注
-                                    "action_type" => "status"//新建create,编辑edit,更改状态status
-                                ], "ZXD", 2, $this->post);
-
-                                ProcessOrder::AddProcess($this->post['token'], [
-                                    "order_type" => 'ZXD',
-                                    "order_code" => $consult['zxNo'],
-                                    "order_id" => 0,
-                                    "order_status" => 2
-                                ]);
                             }
                         }
                     }
@@ -411,32 +372,9 @@ class Version extends BaseController
                 $pro = Db::name("project")->where(["projectNo" => $project, "status" => 4])->save(["status" => 5, "updatetime" => date("Y-m-d H:i:s")]);
                 if ($pro) {
 
-                    //修改状态,添加待办
-                    ActionLog::logAdd($this->post['token'], [
-                        "order_code"=>$project,//项目编码
-                        "status"=>4,//这里的status是之前的值
-                        "action_remark"=>'',//备注
-                        "action_type"=>"status"//新建create,编辑edit,更改状态status
-                    ],"PRO",5,$this->post);
-
-                    ProcessOrder::AddProcess($this->post['token'],[
-                        "order_type"=>'PRO',
-                        "order_code"=>$project,
-                        "order_id"=>0,//这里更新是根据编码更新的,没有主键id
-                        "order_status"=>5
-                    ]);
-
                     Db::commit();
                     return app_show(0, "方案数据修改成功");
                 }
-            }else{
-                //修改状态,添加待办,只记录动作
-                ActionLog::logAdd($this->post['token'], [
-                    "order_code" => $planNos,//编码
-                    "status" => 0,//这里的status是之前的值
-                    "action_remark" => '',//备注
-                    "action_type" => "status"//新建create,编辑edit,更改状态status
-                ], "PRO", 1, $this->post);
             }
             Db::rollback();
             return error_show(1004,"方案选择失败");

+ 2 - 2
app/admin/route/app.php

@@ -175,7 +175,7 @@ Route::rule("goodplist","admin/Good/goodlist");
 Route::rule("getgoodlistbyladder","admin/Good/getGoodListByLadder");
 
 Route::rule("purchlist","admin/Resign/list");
-Route::rule("purchadd","admin/Resign/add");
+Route::rule("purchadd","admin/Resign/add");//创建备库单
 Route::rule("purchcopy","admin/Resign/copy");
 Route::rule("purchedit","admin/Resign/edit");
 Route::rule("purchdel","admin/Resign/delete");
@@ -442,7 +442,7 @@ Route::rule("projectfeeddel","admin/Project/feeddel");
 
 Route::rule("exclulist","admin/Exclusive/list");
 Route::rule("excluadd","admin/Exclusive/add");
-Route::rule("exclustatus","admin/Exclusive/status");
+Route::rule("exclustatus","admin/Exclusive/status");//业务参数-专属类型管理的启用/禁用
 Route::rule("excluquery","admin/Exclusive/query");
 Route::rule("excludel","admin/Exclusive/delete");
 Route::rule("excluedit","admin/Exclusive/edit");