|
@@ -74,8 +74,8 @@ class ApproveInfoService
|
|
|
except('非审批驳回状态无法操作');
|
|
|
}
|
|
|
} else {
|
|
|
- // 9=合同呈批申请
|
|
|
- if ($module == CommonConstant::MODULE_9) {
|
|
|
+ // 3=入库申请,9=合同呈批申请
|
|
|
+ if (in_array($module, [CommonConstant::MODULE_3, CommonConstant::MODULE_9])) {
|
|
|
// 存在申购申请单 判断申购申请单
|
|
|
if ($params['apply_id'] > 0) {
|
|
|
$apply = ApproveInfo::field('id')
|
|
@@ -1069,8 +1069,8 @@ class ApproveInfoService
|
|
|
->where('is_deleted', CommonConstant::IS_DELETED_0)
|
|
|
->where('apply_id', $info['id'])
|
|
|
->select();
|
|
|
- $info['contract'] = $contract;
|
|
|
}
|
|
|
+ $info['contract'] = $contract;
|
|
|
break;
|
|
|
case CommonConstant::MODULE_3:
|
|
|
if ($type == 'detail') {
|
|
@@ -1079,16 +1079,15 @@ class ApproveInfoService
|
|
|
$info->stock_goods;
|
|
|
}
|
|
|
|
|
|
- // 关联的采购审批单
|
|
|
+ // 关联的申购申请单
|
|
|
$apply = null;
|
|
|
- if($info['apply_id']>0){
|
|
|
+ if($info['apply_id'] > 0){
|
|
|
$apply = ApproveInfo::field('id,order_no')
|
|
|
->where('module', CommonConstant::MODULE_1)
|
|
|
->where('status', CommonConstant::STATUS_3)
|
|
|
->where('is_deleted', CommonConstant::IS_DELETED_0)
|
|
|
->find($info['apply_id']);
|
|
|
}
|
|
|
-
|
|
|
$info['apply'] = $apply;
|
|
|
break;
|
|
|
case CommonConstant::MODULE_4:
|
|
@@ -1105,9 +1104,17 @@ class ApproveInfoService
|
|
|
$info->peer_user;
|
|
|
}
|
|
|
break;
|
|
|
- case CommonConstant::MODULE_8:
|
|
|
- if ($type == 'detail') {
|
|
|
+ case CommonConstant::MODULE_9:
|
|
|
+ // 关联的申购申请单
|
|
|
+ $apply = null;
|
|
|
+ if($info['apply_id'] > 0){
|
|
|
+ $apply = ApproveInfo::field('id,order_no')
|
|
|
+ ->where('module', CommonConstant::MODULE_1)
|
|
|
+ ->where('status', CommonConstant::STATUS_3)
|
|
|
+ ->where('is_deleted', CommonConstant::IS_DELETED_0)
|
|
|
+ ->find($info['apply_id']);
|
|
|
}
|
|
|
+ $info['apply'] = $apply;
|
|
|
break;
|
|
|
}
|
|
|
}
|