|
@@ -223,7 +223,7 @@ class OrderOutChild extends Base
|
|
|
if ($param['use_type'] !== '') $where[] = ['p.use_type', '=', $param['use_type']];
|
|
|
if ($param['cgdNo'] !== '') $where[] = ['m.cgdNo', '=', $param['cgdNo']];
|
|
|
$condition = '1=1';
|
|
|
- if($param['IsByMe']==1)$condition = '1=0';
|
|
|
+
|
|
|
|
|
|
if ($this->level == 2) {
|
|
|
|
|
@@ -233,28 +233,28 @@ class OrderOutChild extends Base
|
|
|
|
|
|
if (!empty($tmp)) $condition .= " or (a.order_type=1 AND c.contactor=" . $this->uid.")";
|
|
|
else {
|
|
|
- if($param['IsByMe']==0){
|
|
|
+
|
|
|
$role = $this->checkDataShare();
|
|
|
if (!empty($role[DataGroupModel::$type_全部])) {
|
|
|
$condition .= " or (a.apply_id in (" . implode(',', $role[DataGroupModel::$type_全部]) . "))";
|
|
|
}
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
}
|
|
|
- $person_supplier = Db::connect('mysql_sys')
|
|
|
- ->name('supplier')
|
|
|
- ->where(['is_del' => 0, 'personid' => $this->uid])
|
|
|
- ->column('code');
|
|
|
- if ($person_supplier) {
|
|
|
- if($param['IsByMe']==1){
|
|
|
- $suppe = checkHasAccountBySupplierNos($person_supplier);
|
|
|
- $suppAcco =array_diff($person_supplier,array_keys($suppe));
|
|
|
- $person_supplier= $suppAcco;
|
|
|
- }
|
|
|
- $condition .= " or (a.order_type<>1 and a.supplierNo in ('" . implode('\',\'', $person_supplier) . "'))";
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
- if ($this->level == 3 && $param['IsByMe']==1) {
|
|
|
+ if ($this->level == 3) {
|
|
|
|
|
|
|
|
|
$tmp = Db::name('warehouse_info')->field('id')->where(['is_del' => 0, 'contactor' => $this->uid])->findOrEmpty();
|