|
@@ -685,7 +685,12 @@ class Purch extends Base
|
|
|
$uid = $this->uid;
|
|
|
$uname = $this->uname;
|
|
|
|
|
|
+
|
|
|
+
|
|
|
foreach ($cgdNo as $vlue) {
|
|
|
+
|
|
|
+ if($status == 1 && $uid != $supplier_cgderid[$info[$vlue]['supplierNo']]) throw new Exception('只能由供应商负责人来操作');//与供应商确认的这个操作,只能由供应商负责人来操作
|
|
|
+
|
|
|
if ($status == 1 || $status == 2) {
|
|
|
// $orderinfo = Db::name('sale')
|
|
|
// ->alias('a')
|
|
@@ -707,11 +712,11 @@ class Purch extends Base
|
|
|
['roleid', 'in', [31, 41]],
|
|
|
['status', '=', 1]
|
|
|
])->column('uid');
|
|
|
- if (!in_array($this->uid, $uids)) throw new Exception('库存品订单只能由库管人员操作');
|
|
|
+// if (!in_array($this->uid, $uids)) throw new Exception('库存品订单只能由库管人员操作');
|
|
|
$process = ["order_code" => $vlue, "order_id" => isset($info[$vlue]['id']) ? $info[$vlue]['id'] : 0, "order_status" => $status, "order_type" => 'CGD', "before_status" => isset($info[$vlue]['status']) ? $info[$vlue]['status'] : 0, 'holder_id' => isset($supplier_cgderid[$info[$vlue]['supplierNo']]) ? $supplier_cgderid[$info[$vlue]['supplierNo']] : 0, 'handle_user_list' => implode(',', $uids)];
|
|
|
} elseif ($is_stock == 0 || $info[$vlue]['order_type'] == 3) {
|
|
|
//非库存品和采返商品,推给供应商负责人
|
|
|
- if ($this->uid != $supplier_cgderid[$info[$vlue]['supplierNo']]) throw new Exception('非库存品和采返商品只能由供应商负责人操作');
|
|
|
+// if ($this->uid != $supplier_cgderid[$info[$vlue]['supplierNo']]) throw new Exception('非库存品和采返商品只能由供应商负责人操作');
|
|
|
|
|
|
$process = ["order_code" => $vlue, "order_id" => isset($info[$vlue]['id']) ? $info[$vlue]['id'] : 0, "order_status" => $status, "order_type" => 'CGD', "before_status" => isset($info[$vlue]['status']) ? $info[$vlue]['status'] : 0, 'holder_id' => isset($supplier_cgderid[$info[$vlue]['supplierNo']]) ? $supplier_cgderid[$info[$vlue]['supplierNo']] : 0, 'handle_user_list' => isset($supplier_cgderid[$info[$vlue]['supplierNo']]) ? $supplier_cgderid[$info[$vlue]['supplierNo']] : 0];
|
|
|
}
|