|
@@ -299,7 +299,7 @@ class Purchin extends Base
|
|
|
];
|
|
|
Db::startTrans();
|
|
|
try{
|
|
|
-
|
|
|
+//
|
|
|
if ($this->level == 2) {
|
|
|
//如果开通了供应商账号,则只允许level3账号操作,level2账号不允许操作
|
|
|
$all_has_supplier_account = checkHasAccountBySupplierNos([$cgdinfo['supplierNo']]);
|
|
@@ -337,7 +337,7 @@ class Purchin extends Base
|
|
|
$supplier_temp = $userCommon->handle('sInfo',['code'=>$cgdinfo['supplierNo']]);
|
|
|
$person = $supplier_temp['data'];
|
|
|
|
|
|
- if ($this->level == 2 && $this->uid != $person['personid']) throw new Exception('只能由供应商负责人操作');
|
|
|
+// if ($this->level == 2 && $this->uid != $person['personid']) throw new Exception('只能由供应商负责人操作');
|
|
|
|
|
|
if($status==1){
|
|
|
Db::commit();
|
|
@@ -501,7 +501,7 @@ class Purchin extends Base
|
|
|
// ->where('code',$cgdinfo['supplierNo'])
|
|
|
// ->value('personid');
|
|
|
|
|
|
- if($cgdinfo['status']==1 || $cgdinfo['status']==2){
|
|
|
+// if($cgdinfo['status']==1 || $cgdinfo['status']==2){
|
|
|
|
|
|
// $is_stock = Db::name('good_basic')
|
|
|
// ->where(['is_del'=>0,'spuCode'=>$cgdinfo['spuCode']])
|
|
@@ -518,9 +518,9 @@ class Purchin extends Base
|
|
|
//// $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->level == 2) && ($this->uid != $person['personid'])) throw new Exception('只能由供应商负责人操作');
|
|
|
+// if (($this->level == 2) && ($this->uid != $person['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];
|
|
|
+// }//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' => $person['personid']??0]);
|
|
|
Db::commit();
|