|
@@ -49,21 +49,21 @@ class AfterChild extends Base
|
|
|
//1.超管,查看全部;
|
|
|
//2.业务公司账号-申请人,初始状态只查看自己创建的;
|
|
|
//3.业务公司账号-退回仓库负责人,只查看自己负责仓库的数据;
|
|
|
- //4.业务公司账号-数据共享接受人,共享给自己的数据;
|
|
|
- if ($this->level == 2) {
|
|
|
- //是否仓库负责人
|
|
|
- $is_contactor = Db::name('warehouse_info')
|
|
|
- ->field('id')
|
|
|
- ->where(['is_del' => 0, 'contactor' => $this->uid])
|
|
|
- ->findOrEmpty();
|
|
|
- if (empty($is_contactor)) {
|
|
|
- $role = $this->checkDataShare();
|
|
|
- $hand = resign_hand_user($this->uid, 0);
|
|
|
- $db->whereIn('d.apply_id', array_unique(array_merge($role[DataGroupModel::$type_全部], $hand)));
|
|
|
- } else {
|
|
|
- $db->where('`a`.`return_wsm_code` in ' . Db::name('warehouse_info')->field('wsm_code')->where(['is_del' => 0, 'contactor' => $this->uid])->buildSql());
|
|
|
- }
|
|
|
- }
|
|
|
+// //4.业务公司账号-数据共享接受人,共享给自己的数据;
|
|
|
+// if ($this->level == 2) {
|
|
|
+// //是否仓库负责人
|
|
|
+// $is_contactor = Db::name('warehouse_info')
|
|
|
+// ->field('id')
|
|
|
+// ->where(['is_del' => 0, 'contactor' => $this->uid])
|
|
|
+// ->findOrEmpty();
|
|
|
+// if (empty($is_contactor)) {
|
|
|
+// $role = $this->checkDataShare();
|
|
|
+// $hand = resign_hand_user($this->uid, 0);
|
|
|
+// $db->whereIn('d.apply_id', array_unique(array_merge($role[DataGroupModel::$type_全部], $hand)));
|
|
|
+// } else {
|
|
|
+// $db->where('`a`.`return_wsm_code` in ' . Db::name('warehouse_info')->field('wsm_code')->where(['is_del' => 0, 'contactor' => $this->uid])->buildSql());
|
|
|
+// }
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
$count = $db
|