|
@@ -978,6 +978,14 @@ class Purchin extends Base
|
|
|
Db::rollback();
|
|
|
return error_show(1002,"未找到采购单数据");
|
|
|
}
|
|
|
+
|
|
|
+ $uid = Db::name('user_role')
|
|
|
+ ->where([
|
|
|
+ ['is_del', '=', 0],
|
|
|
+ ['roleid', 'in', [31, 41]],
|
|
|
+ ['status', '=', 1]
|
|
|
+ ])->column('uid');
|
|
|
+ $handle_user_list=implode(",",$uid);
|
|
|
if($info['status']==4){
|
|
|
$order = ["order_code"=>$info['cgdNo'],"status"=>$cgdinfo['status'],"action_remark"=>'',"action_type"=>"edit"];
|
|
|
$cgdinfo['wsend_num']-=$info['send_num'];
|
|
@@ -994,27 +1002,14 @@ class Purchin extends Base
|
|
|
|
|
|
$holder_id = Db::name('supplier')->where(['code' => $cgdinfo['supplierNo'], 'is_del' => 0])->value('personid', 0);
|
|
|
if($cgdinfo['status']==1 || $cgdinfo['status']==2){
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
$is_stock = Db::name('good_basic')
|
|
|
->where(['is_del'=>0,'spuCode'=>$cgdinfo['spuCode']])
|
|
|
->value('is_stock');
|
|
|
if($is_stock==1){
|
|
|
|
|
|
- $uid = Db::name('user_role')
|
|
|
- ->where([
|
|
|
- ['is_del', '=', 0],
|
|
|
- ['roleid', 'in', [31, 41]],
|
|
|
- ['status', '=', 1]
|
|
|
- ])->column('uid');
|
|
|
+
|
|
|
if(!in_array($this->uid,$uid)) throw new Exception('库存品订单只能由库管人员操作');
|
|
|
- $handle_user_list=implode(",",$uid);
|
|
|
+
|
|
|
|
|
|
}else{
|
|
|
|