|
@@ -468,23 +468,23 @@ class Purchin extends Base
|
|
|
|
|
|
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){
|
|
|
- //库存品,推给31库管人员、41库管-张凯旋
|
|
|
- $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('库存品订单只能由库管人员操作');
|
|
|
-// $process = ["order_code" => $cgdNo, "order_id" => $cgdinfo['id'], "order_status" => $cgdinfo['status'], "order_type" => 'CGD', "before_status" => $order['status'], 'holder_id' => $personid,'handle_user_list'=>implode(',', $uid)];
|
|
|
-
|
|
|
- }else{
|
|
|
- if($this->uid != $personid)throw new Exception('非库存品和采返商品只能由供应商负责人操作');
|
|
|
- }
|
|
|
+// $is_stock = Db::name('good_basic')
|
|
|
+// ->where(['is_del'=>0,'spuCode'=>$cgdinfo['spuCode']])
|
|
|
+// ->value('is_stock');
|
|
|
+// if($is_stock==1){
|
|
|
+// //库存品,推给31库管人员、41库管-张凯旋
|
|
|
+// $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('库存品订单只能由库管人员操作');
|
|
|
+//// $process = ["order_code" => $cgdNo, "order_id" => $cgdinfo['id'], "order_status" => $cgdinfo['status'], "order_type" => 'CGD', "before_status" => $order['status'], 'holder_id' => $personid,'handle_user_list'=>implode(',', $uid)];
|
|
|
+//
|
|
|
+// }else{
|
|
|
+ if($this->uid != $personid)throw new Exception('只能由供应商负责人操作');
|
|
|
+// }
|
|
|
}//else $process = ["order_code" => $cgdNo, "order_id" => $cgdinfo['id'], "order_status" => $cgdinfo['status'], "order_type" => 'CGD', "before_status" => $order['status'], 'holder_id' => $personid];
|
|
|
|
|
|
ProcessOrder::AddProcess(['id'=>$this->uid,'nickname'=>$this->uname],["order_code" => $cgdNo, "order_id" => $cgdinfo['id'], "order_status" => $cgdinfo['status'], "order_type" => 'CGD', "before_status" => $order['status'], 'holder_id' => $personid,'handle_user_list'=>$personid]);
|