|
|
|
@ -176,7 +176,7 @@ class WorkOrderController extends ThinkController
|
|
|
|
|
case 2:
|
|
|
|
|
$data = array_merge(I('feedback'), $data);
|
|
|
|
|
$user = M('user', 'tab_')->where(['account'=>$data['user_account']])->find();
|
|
|
|
|
if (empty($user)) $this->error("账号不存在23123{$data['user_account']}");
|
|
|
|
|
if (empty($user)) $this->error("账号不存在{$data['user_account']}");
|
|
|
|
|
$log = $this->modifyProcessLog($info, $data);
|
|
|
|
|
if ($log) {
|
|
|
|
|
$process_log = json_decode($info['process_log'], true) ?: [];
|
|
|
|
@ -296,13 +296,11 @@ class WorkOrderController extends ThinkController
|
|
|
|
|
if (IS_POST) {
|
|
|
|
|
if (empty(I('evaluate_content'))) $this->error('请填写评价内容');
|
|
|
|
|
$data['score'] = I('evaluate', 5);
|
|
|
|
|
if($info['type'] == 2) {
|
|
|
|
|
$info['process_log'] = json_decode($info['process_log'], true);
|
|
|
|
|
$log = [['type'=>3, 'title'=>sprintf('%s于 %s 评价了工单%s为%s分,工单状态%s', get_admin_name(is_login()), date('Y-m-d H:i:s'), $info['order_no'], $data['score'], $this->getOrderStatus($info['status'])), 'detail'=>I('evaluate_content')]];
|
|
|
|
|
$data['process_log'] = json_encode(array_merge($info['process_log'], $log));
|
|
|
|
|
$upt = M('work_order_info', 'tab_')->where(['id'=>$id])->save($data);
|
|
|
|
|
return $upt ? $this->success('评价成功', U('WorkOrder/list')) : $this->error('评价失败');
|
|
|
|
|
}
|
|
|
|
|
$info['process_log'] = json_decode($info['process_log'], true);
|
|
|
|
|
$log = [['type'=>3, 'title'=>sprintf('%s于 %s 评价了工单%s为%s分,工单状态%s', get_admin_name(is_login()), date('Y-m-d H:i:s'), $info['order_no'], $data['score'], $this->getOrderStatus($info['status'])), 'detail'=>I('evaluate_content')]];
|
|
|
|
|
$data['process_log'] = json_encode(array_merge($info['process_log'], $log));
|
|
|
|
|
$upt = M('work_order_info', 'tab_')->where(['id'=>$id])->save($data);
|
|
|
|
|
return $upt ? $this->success('评价成功', U('WorkOrder/list')) : $this->error('评价失败');
|
|
|
|
|
} else {
|
|
|
|
|
$this->assign('data', $info);
|
|
|
|
|
$this->display('feedbackEvaluate');
|
|
|
|
|