Complain.php 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662
  1. <?php
  2. namespace app\admin\controller;
  3. use think\facade\View;
  4. use think\facade\Lang;
  5. /**
  6. *
  7. *
  8. * ----------------------------------------------------------------------------
  9. *
  10. * 控制器
  11. */
  12. class Complain extends AdminControl
  13. {
  14. //定义投诉状态常量
  15. const STATE_NEW = 10;
  16. const STATE_APPEAL = 20;
  17. const STATE_TALK = 30;
  18. const STATE_HANDLE = 40;
  19. const STATE_FINISH = 99;
  20. const STATE_ACTIVE = 2;
  21. const STATE_UNACTIVE = 1;
  22. public function initialize()
  23. {
  24. parent::initialize(); // TODO: Change the autogenerated stub
  25. Lang::load(base_path() . 'admin/lang/' . config('lang.default_lang') . '/complain.lang.php');
  26. }
  27. /*
  28. * 未处理的投诉列表
  29. */
  30. public function complain_new_list()
  31. {
  32. $this->get_complain_list(self::STATE_NEW, 'complain_new_list');
  33. return View::fetch('complain_list');
  34. }
  35. /*
  36. * 待申诉的投诉列表
  37. */
  38. public function complain_appeal_list()
  39. {
  40. $this->get_complain_list(self::STATE_APPEAL, 'complain_appeal_list');
  41. return View::fetch('complain_list');
  42. }
  43. /*
  44. * 对话的投诉列表
  45. */
  46. public function complain_talk_list()
  47. {
  48. $this->get_complain_list(self::STATE_TALK, 'complain_talk_list');
  49. return View::fetch('complain_list');
  50. }
  51. /*
  52. * 待仲裁的投诉列表
  53. */
  54. public function complain_handle_list()
  55. {
  56. $this->get_complain_list(self::STATE_HANDLE, 'complain_handle_list');
  57. return View::fetch('complain_list');
  58. }
  59. /*
  60. * 已关闭的投诉列表
  61. */
  62. public function complain_finish_list()
  63. {
  64. $this->get_complain_list(self::STATE_FINISH, 'complain_finish_list');
  65. return View::fetch('complain_list');
  66. }
  67. /*
  68. * 获取投诉列表
  69. */
  70. private function get_complain_list($complain_state, $action)
  71. {
  72. $complain_model = model('complain');
  73. //搜索条件
  74. $condition = array();
  75. $condition[] = array('accuser_name', 'like', "%" . input('param.input_complain_accuser') . "%");
  76. $condition[] = array('accused_name', 'like', "%" . input('param.input_complain_accused') . "%");
  77. $condition[] = array('complain_subject_content', 'like', "%" . input('param.input_complain_subject_content') . "%");
  78. if (input('param.input_complain_datetime_end')) {
  79. $stime = strtotime(input('param.input_complain_datetime_start'));
  80. $condition[] = array('complain_datetime', '>=', $stime);
  81. }
  82. if (input('param.input_complain_datetime_end')) {
  83. $etime = strtotime(input('param.input_complain_datetime_end')) + 86399;
  84. $condition[] = array('complain_datetime', '<=', $etime);
  85. }
  86. if ($action === 'complain_finish_list') {
  87. $order = 'complain_id desc';
  88. } else {
  89. $order = 'complain_id asc';
  90. }
  91. $condition[] = array('complain_state', '=', $complain_state);
  92. $complain_list = $complain_model->getComplainList($condition, 10, $order);
  93. $this->setAdminCurItem($action);
  94. View::assign('complain_list', $complain_list);
  95. View::assign('show_page', $complain_model->page_info->render());
  96. }
  97. /*
  98. * 进行中的投诉
  99. */
  100. public function complain_progress()
  101. {
  102. $complain_id = intval(input('param.complain_id'));
  103. //获取投诉详细信息
  104. $complain_info = $this->get_complain_info($complain_id);
  105. //获取订单详细信息
  106. $order_info = $this->get_order_info($complain_info['order_id']);
  107. //获取投诉的商品列表
  108. $complain_goods_list = $this->get_complain_goods_list($complain_info['order_goods_id']);
  109. View::assign('complain_goods_list', $complain_goods_list);
  110. if (intval($complain_info['complain_subject_id']) == 1) { //退款信息
  111. $refundreturn_model = model('refundreturn');
  112. $this->getRefundStateArray(); //向模板页面输出退款退货状态
  113. $list = $refundreturn_model->getComplainRefundList($order_info, $complain_info['order_goods_id']);
  114. View::assign('refund_list', $list['refund']); //已退或处理中商品
  115. View::assign('refund_goods', $list['goods']); //可退商品
  116. }
  117. $this->setAdminCurItem('complain_progress');
  118. View::assign('order_info', $order_info);
  119. View::assign('complain_info', $complain_info);
  120. return View::fetch('complain_info');
  121. }
  122. function getRefundStateArray($type = 'all')
  123. {
  124. $state_array = array(
  125. '1' => lang('refund_state_confirm'),
  126. '2' => lang('refund_state_yes'),
  127. '3' => lang('refund_state_no')
  128. ); //卖家处理状态:1为待审核,2为同意,3为不同意
  129. View::assign('state_array', $state_array);
  130. $admin_array = array(
  131. '1' => lang('ds_processing'),
  132. '2' => lang('ds_processed'),
  133. '3' => lang('order_state_success')
  134. ); //确认状态:1为买家或卖家处理中,2为待平台管理员处理,3为退款退货已完成
  135. View::assign('admin_array', $admin_array);
  136. $state_data = array(
  137. 'seller' => $state_array,
  138. 'admin' => $admin_array
  139. );
  140. if ($type == 'all') {
  141. return $state_data; //返回所有
  142. }
  143. return $state_data[$type];
  144. }
  145. /*
  146. * 审核提交的投诉
  147. */
  148. public function complain_verify()
  149. {
  150. $complain_id = intval(input('post.complain_id'));
  151. $complain_info = $this->get_complain_info($complain_id);
  152. if (intval($complain_info['complain_state']) === self::STATE_NEW) {
  153. $complain_model = model('complain');
  154. $update_array = array();
  155. $update_array['complain_state'] = self::STATE_APPEAL;
  156. $update_array['complain_handle_datetime'] = TIMESTAMP;
  157. $update_array['complain_handle_member_id'] = $this->get_admin_id();
  158. $update_array['complain_active'] = self::STATE_ACTIVE;
  159. $condition = array();
  160. $condition[] = array('complain_id', '=', $complain_id);
  161. if ($complain_model->editComplain($update_array, $condition)) {
  162. $this->log(lang('complain_verify_success') . '[' . $complain_id . ']', 1);
  163. // 发送商家消息
  164. $param = array();
  165. $param['code'] = 'complain';
  166. $param['store_id'] = $complain_info['accused_id'];
  167. $param['ali_param'] = array(
  168. 'complain_id' => $complain_id
  169. );
  170. $param['ten_param'] = array(
  171. $complain_id
  172. );
  173. $param['param'] = $param['ali_param'];
  174. //微信模板消息
  175. $param['weixin_param'] = array(
  176. 'url' => config('ds_config.h5_store_site_url') . '/pages/seller/complaint/ComplaintForm?complain_id=' . $complain_id,
  177. 'data' => array(
  178. "keyword1" => array(
  179. "value" => $complain_info['accuser_name'],
  180. "color" => "#333"
  181. ),
  182. "keyword2" => array(
  183. "value" => $complain_info['complain_subject_content'],
  184. "color" => "#333"
  185. )
  186. ),
  187. );
  188. model('cron')->addCron(array('cron_exetime' => TIMESTAMP, 'cron_type' => 'sendStoremsg', 'cron_value' => serialize($param)));
  189. $this->success(lang('complain_verify_success'), (string)url('Complain/complain_new_list'));
  190. } else {
  191. $this->error(lang('complain_verify_fail'), (string)url('Complain/complain_new_list'));
  192. }
  193. } else {
  194. $this->error(lang('param_error'), '');
  195. }
  196. }
  197. /*
  198. * 关闭投诉
  199. */
  200. public function complain_close()
  201. {
  202. //获取输入的数据
  203. $complain_id = intval(input('post.complain_id'));
  204. $final_handle_message = trim(input('post.final_handle_message'));
  205. $data = [
  206. 'final_handle_message' => $final_handle_message
  207. ];
  208. $complain_validate = ds_validate('complain');
  209. if (!$complain_validate->scene('complain_close')->check($data)) {
  210. $this->error($complain_validate->getError());
  211. }
  212. $complain_info = $this->get_complain_info($complain_id);
  213. $current_state = intval($complain_info['complain_state']);
  214. if ($current_state !== self::STATE_FINISH) {
  215. $complain_model = model('complain');
  216. $update_array = array();
  217. $update_array['complain_state'] = self::STATE_FINISH;
  218. $update_array['final_handle_message'] = $final_handle_message;
  219. $update_array['final_handle_datetime'] = TIMESTAMP;
  220. $update_array['final_handle_member_id'] = $this->get_admin_id();
  221. $condition = array();
  222. $condition[] = array('complain_id', '=', $complain_id);
  223. if ($complain_model->editComplain($update_array, $condition)) {
  224. if (intval($complain_info['complain_subject_id']) == 1) { //退款信息
  225. $order = $this->get_order_info($complain_info['order_id']);
  226. $refundreturn_model = model('refundreturn');
  227. $list = $refundreturn_model->getComplainRefundList($order, $complain_info['order_goods_id']);
  228. $refund_goods = $list['goods']; //可退商品
  229. if (!empty($refund_goods) && is_array($refund_goods)) {
  230. $checked_goods = input('post.checked_goods/a'); #获取数组
  231. foreach ($refund_goods as $key => $value) {
  232. $goods_id = $value['rec_id']; //订单商品表编号
  233. if (!empty($checked_goods) && array_key_exists($goods_id, $checked_goods)) { //验证提交的商品属于订单
  234. $refund_array = array();
  235. $refund_array['refund_type'] = '1'; //类型:1为退款,2为退货
  236. $refund_array['seller_state'] = '2'; //卖家处理状态:1为待审核,2为同意,3为不同意
  237. $refund_array['refund_state'] = '2'; //状态:1为处理中,2为待管理员处理,3为已完成
  238. $refund_array['order_lock'] = '1'; //锁定类型:1为不用锁定,2为需要锁定
  239. $refund_array['refund_amount'] = ds_price_format($value['goods_refund']);
  240. $refund_array['reason_id'] = '0';
  241. $refund_array['reason_info'] = lang('complaints_success');
  242. $refund_array['buyer_message'] = lang('complaints_success_confirm');
  243. $refund_array['seller_message'] = lang('complaints_success_confirm');
  244. $refund_array['add_time'] = TIMESTAMP;
  245. $refund_array['seller_time'] = TIMESTAMP;
  246. $refundreturn_model->addRefundreturn($refund_array, $order, $value);
  247. }
  248. }
  249. }
  250. }
  251. $this->log(lang('complain_close_success') . '[' . $complain_id . ']', 1);
  252. $this->success(lang('complain_close_success'), $this->get_complain_state_link($current_state));
  253. } else {
  254. $this->error(lang('complain_close_fail'), $this->get_complain_state_link($current_state));
  255. }
  256. } else {
  257. $this->error(lang('param_error'), '');
  258. }
  259. }
  260. /*
  261. * 投诉主题列表
  262. */
  263. public function complain_subject_list()
  264. {
  265. /*
  266. * 获得举报主题列表
  267. */
  268. $complainsubject_model = model('complainsubject');
  269. //搜索条件
  270. $condition = array();
  271. $condition[] = array('complainsubject_state', '=', 1);
  272. $complainsubject_list = $complainsubject_model->getComplainsubject($condition, 10);
  273. $this->setAdminCurItem('complain_subject_list');
  274. View::assign('complainsubject_list', $complainsubject_list);
  275. View::assign('show_page', $complainsubject_model->page_info->render());
  276. return View::fetch('complain_subject_list');
  277. }
  278. /*
  279. * 添加投诉主题页面
  280. */
  281. public function complain_subject_add()
  282. {
  283. if (!request()->isPost()) {
  284. $this->setAdminCurItem('complain_subject_add');
  285. return View::fetch();
  286. } else {
  287. //获取提交的内容
  288. $input['complainsubject_content'] = trim(input('post.complain_subject_content'));
  289. $input['complainsubject_desc'] = trim(input('post.complain_subject_desc'));
  290. //验证提交的内容
  291. $data = [
  292. 'complain_subject_content' => $input['complainsubject_content'],
  293. 'complain_subject_desc' => $input['complainsubject_desc'],
  294. ];
  295. $complain_validate = ds_validate('complain');
  296. if (!$complain_validate->scene('complain_subject_add')->check($data)) {
  297. $this->error($complain_validate->getError());
  298. } else {
  299. //验证成功保存
  300. $input['complainsubject_state'] = 1;
  301. $complainsubject_model = model('complainsubject');
  302. $complainsubject_model->addComplainsubject($input);
  303. $this->log(lang('complain_subject_add_success') . '[' . input('complain_subject_content') . ']', 1);
  304. $this->success(lang('complain_subject_add_success'), 'complain/complain_subject_list');
  305. }
  306. }
  307. }
  308. /*
  309. * 删除投诉主题,伪删除只是修改标记
  310. */
  311. public function complain_subject_drop()
  312. {
  313. $complain_subject_id = input('param.complain_subject_id');
  314. $complain_subject_id_array = ds_delete_param($complain_subject_id);
  315. if ($complain_subject_id_array == FALSE) {
  316. $this->error(lang('param_error'));
  317. }
  318. $condition = array();
  319. $condition[] = array('complainsubject_id', 'in', $complain_subject_id_array);
  320. $complainsubject_model = model('complainsubject');
  321. $update_array = array();
  322. $update_array['complainsubject_state'] = 2;
  323. if ($complainsubject_model->editComplainsubject($update_array, $condition)) {
  324. $this->log(lang('complain_subject_delete_success') . '[ID:' . input('post.complain_subject_id') . ']', 1);
  325. ds_json_encode(10000, lang('complain_subject_delete_success'));
  326. } else {
  327. ds_json_encode(10001, lang('complain_subject_delete_fail'));
  328. }
  329. }
  330. /*
  331. * 根据投诉id获取投诉对话列表
  332. */
  333. public function get_complain_talk()
  334. {
  335. $complain_id = intval(input('param.complain_id'));
  336. $complain_info = $this->get_complain_info($complain_id);
  337. $complain_talk_list = $this->get_talk_list($complain_id);
  338. $talk_list = array();
  339. $i = 0;
  340. foreach ($complain_talk_list as $talk) {
  341. $talk_list[$i]['css'] = $talk['talk_member_type'];
  342. $talk_list[$i]['talk'] = date("Y-m-d", $talk['talk_datetime']);
  343. switch ($talk['talk_member_type']) {
  344. case 'accuser':
  345. $talk_list[$i]['talk'] .= lang('complain_accuser');
  346. break;
  347. case 'accused':
  348. $talk_list[$i]['talk'] .= lang('complain_accused');
  349. break;
  350. case 'admin':
  351. $talk_list[$i]['talk'] .= lang('complain_admin');
  352. break;
  353. default:
  354. $talk_list[$i]['talk'] .= lang('complain_unknow');
  355. }
  356. if (intval($talk['talk_state']) === 2) {
  357. $talk['talk_content'] = lang('talk_forbit_message');
  358. $forbit_link = '';
  359. } else {
  360. $forbit_link = "&nbsp;&nbsp;<a href='#' onclick=forbit_talk(" . $talk['talk_id'] . ")>" . lang('complain_text_forbit') . "</a>";
  361. }
  362. $talk_list[$i]['talk'] .= '(' . $talk['talk_member_name'] . ')' . lang('complain_text_say') . ':' . $talk['talk_content'] . $forbit_link;
  363. $i++;
  364. }
  365. echo json_encode($talk_list);
  366. }
  367. /*
  368. * 发布投诉对话
  369. */
  370. public function publish_complain_talk()
  371. {
  372. $complain_id = intval(input('param.complain_id'));
  373. $complain_talk = trim(input('param.complain_talk'));
  374. $talk_len = strlen($complain_talk);
  375. if ($talk_len > 0 && $talk_len < 255) {
  376. $complain_info = $this->get_complain_info($complain_id);
  377. $complaintalk_model = model('complaintalk');
  378. $param = array();
  379. $param['complain_id'] = $complain_id;
  380. $param['talk_member_id'] = $this->get_admin_id();
  381. $param['talk_member_name'] = $this->get_admin_name();
  382. $param['talk_member_type'] = 'admin';
  383. $param['talk_content'] = $complain_talk;
  384. $param['talk_state'] = 1;
  385. $param['talk_admin'] = 0;
  386. $param['talk_datetime'] = TIMESTAMP;
  387. if ($complaintalk_model->addComplaintalk($param)) {
  388. echo json_encode('success');
  389. } else {
  390. echo json_encode('error2');
  391. }
  392. } else {
  393. echo json_encode('error1');
  394. }
  395. }
  396. /*
  397. * 屏蔽对话
  398. */
  399. public function forbit_talk()
  400. {
  401. $talk_id = intval(input('post.talk_id'));
  402. if (!empty($talk_id) && is_integer($talk_id)) {
  403. $complaintalk_model = model('complaintalk');
  404. $update_array = array();
  405. $update_array['talk_state'] = 2;
  406. $update_array['talk_admin'] = $this->get_admin_id();
  407. $condition = array();
  408. $condition[] = array('talk_id', '=', $talk_id);
  409. if ($complaintalk_model->editComplaintalk($update_array, $condition)) {
  410. echo json_encode('success');
  411. } else {
  412. echo json_encode('error2');
  413. }
  414. } else {
  415. echo json_encode('error1');
  416. }
  417. }
  418. /**
  419. * 投诉设置
  420. **/
  421. public function complain_setting()
  422. {
  423. if (!request()->isPost()) {
  424. //读取设置内容 $list_setting
  425. $list_setting = rkcache('config', true);
  426. View::assign('list_setting', $list_setting);
  427. $this->setAdminCurItem('complain_setting');
  428. return View::fetch('complain_setting');
  429. } else {
  430. $setting_model = model('config');
  431. $complain_time_limit = intval(input('post.complain_time_limit'));
  432. if (empty($complain_time_limit)) {
  433. //如果输入不合法默认30天
  434. $complain_time_limit = 2592000;
  435. } else {
  436. $complain_time_limit = $complain_time_limit * 86400;
  437. }
  438. $update_array['complain_time_limit'] = $complain_time_limit;
  439. if ($setting_model->editConfig($update_array)) {
  440. $this->log(lang('complain_setting_save_success'), 1);
  441. $this->success(lang('complain_setting_save_success'));
  442. } else {
  443. $this->error(lang('complain_setting_save_fail'));
  444. }
  445. }
  446. }
  447. /*
  448. * 获取订单信息
  449. */
  450. private function get_order_info($order_id)
  451. {
  452. $order_model = model('order');
  453. $order_info = $order_model->getOrderInfo(array('order_id' => $order_id), array('order_goods'));
  454. if (empty($order_info)) {
  455. $this->error(lang('param_error'));
  456. }
  457. $order_info['order_state_text'] = get_order_state($order_info);
  458. return $order_info;
  459. }
  460. /*
  461. * 获取投诉信息
  462. */
  463. private function get_complain_info($complain_id)
  464. {
  465. $complain_model = model('complain');
  466. $complain_info = $complain_model->getOneComplain($complain_id);
  467. if (empty($complain_info)) {
  468. $this->error(lang('param_error'));
  469. }
  470. $complain_info['complain_state_text'] = $this->get_complain_state_text($complain_info['complain_state']);
  471. return $complain_info;
  472. }
  473. /*
  474. * 获取投诉商品列表
  475. */
  476. private function get_complain_goods_list($order_goods_id)
  477. {
  478. $order_model = model('order');
  479. $param = array();
  480. $param['rec_id'] = $order_goods_id;
  481. $complain_goods_list = $order_model->getOrdergoodsList($param);
  482. return $complain_goods_list;
  483. }
  484. /*
  485. * 获取对话列表
  486. */
  487. private function get_talk_list($complain_id)
  488. {
  489. $complaintalk_model = model('complaintalk');
  490. $param = array();
  491. $param['complain_id'] = $complain_id;
  492. $talk_list = $complaintalk_model->getComplaintalkList($param);
  493. return $talk_list;
  494. }
  495. /*
  496. * 获得投诉状态文本
  497. */
  498. private function get_complain_state_text($complain_state)
  499. {
  500. switch (intval($complain_state)) {
  501. case self::STATE_NEW:
  502. return lang('complain_state_new');
  503. break;
  504. case self::STATE_APPEAL:
  505. return lang('complain_state_appeal');
  506. break;
  507. case self::STATE_TALK:
  508. return lang('complain_state_talk');
  509. break;
  510. case self::STATE_HANDLE:
  511. return lang('complain_state_handle');
  512. break;
  513. case self::STATE_FINISH:
  514. return lang('complain_state_finish');
  515. break;
  516. default:
  517. $this->error(lang('param_error'), '');
  518. }
  519. }
  520. /*
  521. * 获得投诉状态文本
  522. */
  523. private function get_complain_state_link($complain_state)
  524. {
  525. switch (intval($complain_state)) {
  526. case self::STATE_NEW:
  527. return 'complain/complain_new_list';
  528. break;
  529. case self::STATE_APPEAL:
  530. return 'complain/complain_appeal_list';
  531. break;
  532. case self::STATE_TALK:
  533. return 'complain/complain_talk_list';
  534. break;
  535. case self::STATE_HANDLE:
  536. return 'complain/complain_handle_list';
  537. break;
  538. case self::STATE_FINISH:
  539. return 'complain/complain_finish_list';
  540. break;
  541. default:
  542. $this->error(lang('param_error'));
  543. }
  544. }
  545. /*
  546. * 获得管理员id
  547. */
  548. private function get_admin_id()
  549. {
  550. $admin_info = $this->getAdminInfo();
  551. return $admin_info['admin_id'];
  552. }
  553. /*
  554. * 获得管理员name
  555. */
  556. private function get_admin_name()
  557. {
  558. $admin_info = $this->getAdminInfo();
  559. return $admin_info['admin_name'];
  560. }
  561. protected function getAdminItemList()
  562. {
  563. $menu_array = array(
  564. array(
  565. 'name' => 'complain_new_list',
  566. 'text' => lang('complain_new_list'),
  567. 'url' => (string)url('complain/complain_new_list')
  568. ),
  569. array(
  570. 'name' => 'complain_appeal_list',
  571. 'text' => lang('complain_appeal_list'),
  572. 'url' => (string)url('Complain/complain_appeal_list')
  573. ),
  574. array(
  575. 'name' => 'complain_talk_list',
  576. 'text' => lang('complain_talk_list'),
  577. 'url' => (string)url('Complain/complain_talk_list')
  578. ),
  579. array(
  580. 'name' => 'complain_handle_list',
  581. 'text' => lang('complain_handle_list'),
  582. 'url' => (string)url('Complain/complain_handle_list')
  583. ),
  584. array(
  585. 'name' => 'complain_finish_list',
  586. 'text' => lang('complain_finish_list'),
  587. 'url' => (string)url('Complain/complain_finish_list')
  588. ),
  589. array(
  590. 'name' => 'complain_subject_list',
  591. 'text' => lang('complain_subject_list'),
  592. 'url' => (string)url('Complain/complain_subject_list')
  593. ),
  594. array(
  595. 'name' => 'complain_subject_add',
  596. 'text' => lang('complain_subject_add'),
  597. 'url' => (string)url('Complain/complain_subject_add')
  598. ),
  599. array(
  600. 'name' => 'complain_setting',
  601. 'text' => lang('complain_setting'),
  602. 'url' => (string)url('Complain/complain_setting')
  603. )
  604. );
  605. if (request()->action() == 'complain_progress') {
  606. $menu_array[] = array(
  607. 'name' => 'complain_progress',
  608. 'text' => lang('complain_progress'),
  609. 'url' => '###'
  610. );
  611. }
  612. return $menu_array;
  613. }
  614. }