|
@@ -236,6 +236,9 @@ class CardController extends Curd
|
|
if ($model->join_card_dept_id != $data['join_card_dept_id'] && empty($model->join_card_member_id)) {
|
|
if ($model->join_card_dept_id != $data['join_card_dept_id'] && empty($model->join_card_member_id)) {
|
|
$data['card_assign_datetime'] = date('Y-m-d H:i:s');
|
|
$data['card_assign_datetime'] = date('Y-m-d H:i:s');
|
|
}
|
|
}
|
|
|
|
+ if (!empty($data['join_card_dept_id']) && $model->card_status == 'INIT'){
|
|
|
|
+ $data['card_status'] = 'WAITING';
|
|
|
|
+ }
|
|
|
|
|
|
_syslog('储值卡', '编辑', $data, $request->all());
|
|
_syslog('储值卡', '编辑', $data, $request->all());
|
|
|
|
|
|
@@ -362,11 +365,13 @@ class CardController extends Curd
|
|
if ($allocation == 'CARDID' && !empty($params['card_id'])) {
|
|
if ($allocation == 'CARDID' && !empty($params['card_id'])) {
|
|
Card::whereIn('card_id', $params['card_id'])->where('join_card_dept_id', 0)->update([
|
|
Card::whereIn('card_id', $params['card_id'])->where('join_card_dept_id', 0)->update([
|
|
'join_card_dept_id' => $params['join_card_dept_id'],
|
|
'join_card_dept_id' => $params['join_card_dept_id'],
|
|
|
|
+ 'card_status'=>'WAITING',
|
|
'card_assign_datetime' => date('Y-m-d H:i:s')
|
|
'card_assign_datetime' => date('Y-m-d H:i:s')
|
|
]);
|
|
]);
|
|
} elseif ($allocation == 'ISSUE' && !empty($params['card_issue_id'])) {
|
|
} elseif ($allocation == 'ISSUE' && !empty($params['card_issue_id'])) {
|
|
Card::where('join_card_issue_id', $params['card_issue_id'])->where('join_card_dept_id', 0)->update([
|
|
Card::where('join_card_issue_id', $params['card_issue_id'])->where('join_card_dept_id', 0)->update([
|
|
'join_card_dept_id' => $params['join_card_dept_id'],
|
|
'join_card_dept_id' => $params['join_card_dept_id'],
|
|
|
|
+ 'card_status'=>'WAITING',
|
|
'card_assign_datetime' => date('Y-m-d H:i:s')
|
|
'card_assign_datetime' => date('Y-m-d H:i:s')
|
|
]);
|
|
]);
|
|
}
|
|
}
|