Complain.php 26 KB

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