Jelajahi Sumber

Merge branch 'master-new-wgg' of wugg/phpstock into master-new

wugg 1 tahun lalu
induk
melakukan
16b8b071c9
2 mengubah file dengan 5 tambahan dan 6 penghapusan
  1. 1 1
      .env
  2. 4 5
      app/admin/controller/Resign.php

+ 1 - 1
.env

@@ -1 +1 @@
-APP_DEBUG = true

default_admin_addcount_role_id = 1
default_supplier_addcount_role_id = 90


[APP]
DEFAULT_TIMEZONE = Asia/Shanghai


[LANG]
default_lang = zh-cn

[USER]
hosturl=http://user.test241.wanyuhengtong.com/

[FIN]
hosturl=http://stockinv.test241.wanyuhengtong.com/
+APP_DEBUG = true

default_admin_addcount_role_id = 1
default_supplier_addcount_role_id = 50


[APP]
DEFAULT_TIMEZONE = Asia/Shanghai


[LANG]
default_lang = zh-cn

[USER]
hosturl=http://user.test241.wanyuhengtong.com/


#主数据库
[database]
type=mysql
hostname=120.46.155.214
database=wsm3_pre_release
username=root
password=test!@#wyht123
charset=utf8
prefix=wsm_


[mysql3]
type=mysql
hostname=120.46.155.214
database=inv
username=root
password=test!@#wyht123
charset=utf8
prefix=cfp_

#有赞数据库
[mysql_yz]
type=mysql
hostname=120.46.155.214
database=youzan
username=root
password=test!@#wyht123
hostport=3306
charset=utf8
prefix=yz_


#账号数据库
[mysql_sys]
type=mysql
hostname=120.46.155.214
database=sys_user_pre_release
username=root
password=test!@#wyht123
hostport=3306
charset=utf8
prefix=sys_



#结算平台数据库
[mysql_cxinv]
type=mysql
hostname=120.46.155.214
database=cxinv_v2_pre_release
username=root
password=test!@#wyht123
hostport=3306
charset=utf8
prefix=cfp_

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

@@ -445,18 +445,14 @@ class Resign extends Base
         if($status===""){
             return error_show(1001,'status不能为空');
         }
+        if($status==3 && $info['status']==2)return error_show(1001,'备库单已完成无法取消');
         $temp = $info['status'];
         $info['status']= $status;
         $info['updatetime']=date("Y-m-d H:i:s");
         $up = Db::name("purchease")->update($info);
         if($up){
-
-            if($status==1){
-                $order = ["order_type" => 'BHD', "order_code" => $info['bk_code'], "order_id" => $info['id'], "order_status" => $status, "before_status" => $temp,'wait_id' => $holder_id, 'wait_name' => $holder_name];
-            }else $order = ["order_type" => 'BHD', "order_code" => $info['bk_code'], "order_id" => $info['id'], "order_status" => $status, "before_status" => $temp, 'holder_id' => $info['apply_id']];
             $order = ["order_type" => 'BHD', "order_code" => $info['bk_code'], "order_id" => $info['id'], "order_status" => $status, "before_status" => $temp, 'holder_id' => $info['apply_id']];
             ProcessOrder::AddProcess($this->post['token'],$order);
-
             $ste = ["order_code"=>$info['bk_code'],"status"=> $temp,"action_remark"=>'',"action_type"=>"status"];
             ActionLog::logAdd($this->post['token'],$ste,"BHD",$status,$info);
             return app_show(0,"更新成功",['bk_code'=>$info['bk_code']]);
@@ -867,6 +863,9 @@ class Resign extends Base
         if($info==false){
             return error_show(1002,'未找到备库数据');
         }
+        if($info['status']!=1){
+        	 return error_show(1002,'备库数据状态有误');
+        }
         $wsm_code =isset($this->post['wsm_code'])&&$this->post['wsm_code']!=="" ? trim($this->post['wsm_code']):'';
         if($wsm_code==""){
             return error_show(1002,'备库仓库不能为空');