Complain.php 26 KB

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