|
@@ -634,6 +634,7 @@ class ApproveInfoService
|
|
|
'moduleInfo',
|
|
|
'approve' => function ($query) {
|
|
|
$query->field('is_deleted,create_at', true)
|
|
|
+ ->where('state', 'in',[CommonConstant::IS_WHO_0,CommonConstant::IS_WHO_1])
|
|
|
->with([
|
|
|
'user' => function ($query) {
|
|
|
$query->field('userid,name,avatar');
|
|
@@ -651,6 +652,7 @@ class ApproveInfoService
|
|
|
]);
|
|
|
$info = $info->find($id);
|
|
|
if ($info) {
|
|
|
+ //
|
|
|
$module = $info['module'];
|
|
|
// 审批提交人申请人信息
|
|
|
if ($user) {
|
|
@@ -737,6 +739,8 @@ class ApproveInfoService
|
|
|
'approveOne' => function ($query) use ($status, $field) {
|
|
|
$query->field($field)
|
|
|
->where('status', $status)
|
|
|
+ ->where('group', CommonConstant::IS_WHO_0)
|
|
|
+ ->where('state', CommonConstant::IS_WHO_0)
|
|
|
->with([
|
|
|
'user' => function ($query) {
|
|
|
$query->field('userid,name');
|
|
@@ -762,6 +766,8 @@ class ApproveInfoService
|
|
|
'approveOne' => function ($query) use ($status, $field) {
|
|
|
$query->field($field)
|
|
|
->where('status', $status)
|
|
|
+ ->where('group', CommonConstant::IS_WHO_0)
|
|
|
+ ->where('state', CommonConstant::IS_WHO_0)
|
|
|
->with([
|
|
|
'user' => function ($query) {
|
|
|
$query->field('userid,name');
|
|
@@ -779,6 +785,8 @@ class ApproveInfoService
|
|
|
'approveOne' => function ($query) use ($status, $field) {
|
|
|
$query->field($field)
|
|
|
->where('status', $status)
|
|
|
+ ->where('group', CommonConstant::IS_WHO_0)
|
|
|
+ ->where('state', CommonConstant::IS_WHO_0)
|
|
|
->with([
|
|
|
'user' => function ($query) {
|
|
|
$query->field('userid,name');
|
|
@@ -805,6 +813,8 @@ class ApproveInfoService
|
|
|
'approveOne' => function ($query) use ($status, $field) {
|
|
|
$query->field($field)
|
|
|
->where('status', $status)
|
|
|
+ ->where('group', CommonConstant::IS_WHO_0)
|
|
|
+ ->where('state', CommonConstant::IS_WHO_0)
|
|
|
->with([
|
|
|
'user' => function ($query) {
|
|
|
$query->field('userid,name');
|
|
@@ -831,6 +841,8 @@ class ApproveInfoService
|
|
|
'approveOne' => function ($query) use ($status, $field) {
|
|
|
$query->field($field)
|
|
|
->where('status', $status)
|
|
|
+ ->where('group', CommonConstant::IS_WHO_0)
|
|
|
+ ->where('state', CommonConstant::IS_WHO_0)
|
|
|
->with([
|
|
|
'user' => function ($query) {
|
|
|
$query->field('userid,name');
|
|
@@ -861,6 +873,8 @@ class ApproveInfoService
|
|
|
'approveOne' => function ($query) use ($status, $field) {
|
|
|
$query->field($field)
|
|
|
->where('status', $status)
|
|
|
+ ->where('group', CommonConstant::IS_WHO_0)
|
|
|
+ ->where('state', CommonConstant::IS_WHO_0)
|
|
|
->with([
|
|
|
'user' => function ($query) {
|
|
|
$query->field('userid,name');
|
|
@@ -886,6 +900,7 @@ class ApproveInfoService
|
|
|
$module = $info['module'];
|
|
|
switch ($module) {
|
|
|
case CommonConstant::MODULE_1:
|
|
|
+ $info['apply_goods'] = [];
|
|
|
if ($info['type'] == ApplyConstant::TYPE_1) {
|
|
|
if ($type == 'detail') {
|
|
|
$info['apply_goods'] = $info->applyGoods()->field('id,info_id,goods_name,total_price,goods_stock')->select();
|