MemberArrivalnotice.php 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. namespace app\home\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 MemberArrivalnotice extends BaseMember
  17. {
  18. public function initialize()
  19. {
  20. parent::initialize(); // TODO: Change the autogenerated stub
  21. Lang::load(base_path() . 'home/lang/'.config('lang.default_lang').'/member_arrivalnotice.lang.php');
  22. }
  23. /**
  24. * 到货列表
  25. *
  26. * @param
  27. * @return
  28. */
  29. public function index()
  30. {
  31. $arrivalnotice_model = model('arrivalnotice');
  32. $arrivalnotice_list = $arrivalnotice_model->getArrivalNoticeList(array('member_id'=>$this->member_info['member_id']),'','','',20);
  33. View::assign('arrivalnotice_list', $arrivalnotice_list);
  34. View::assign('show_page', $arrivalnotice_model->page_info->render());
  35. $this->setMemberCurItem('index');
  36. $this->setMemberCurMenu('member_arrivalnotice');
  37. return View::fetch($this->template_dir.'index');
  38. }
  39. public function del(){
  40. $arrivalnotice_id = input('param.arrivalnotice_id');
  41. $arrivalnotice_id_array = ds_delete_param($arrivalnotice_id);
  42. if ($arrivalnotice_id_array == FALSE) {
  43. ds_json_encode('10001', lang('param_error'));
  44. }
  45. $condition=array();
  46. $condition[] = array('member_id','=',$this->member_info['member_id']);
  47. $condition[]=array('arrivalnotice_id','in', $arrivalnotice_id_array);
  48. $arrivalnotice_model = model('arrivalnotice');
  49. //批量删除
  50. $result = $arrivalnotice_model->delArrivalNotice($condition);
  51. if ($result){
  52. ds_json_encode(10000, lang('ds_common_del_succ'));
  53. }else{
  54. ds_json_encode(10001, lang('ds_common_del_fail'));
  55. }
  56. }
  57. /**
  58. * 用户中心右边,小导航
  59. *
  60. * @param string $menu_key 当前导航的menu_key
  61. * @return
  62. */
  63. protected function getMemberItemList()
  64. {
  65. $menu_array = array(
  66. 1 => array(
  67. 'name' => 'index', 'text' => lang('ds_arrivalnotice'),
  68. 'url' => (string)url('MemberArrivalnotice/index')
  69. )
  70. );
  71. return $menu_array;
  72. }
  73. }