作者 郭鑫

11111

@@ -236,7 +236,7 @@ class IntermediaryController extends CommonController @@ -236,7 +236,7 @@ class IntermediaryController extends CommonController
236 $where_agency['need_id'] = $need_id; 236 $where_agency['need_id'] = $need_id;
237 $agency_list = Db::name('Agency') 237 $agency_list = Db::name('Agency')
238 ->where($where_agency) 238 ->where($where_agency)
239 - ->field("id,housing_price,assessment_tax,security_tax,else_tax,service_charge") 239 + ->field("id,housing_price,assessment_tax,security_tax,else_tax,service_charge,refuse_complaint_time")
240 ->select()->toArray(); 240 ->select()->toArray();
241 $final_list = array(); 241 $final_list = array();
242 $add_arr = array(); 242 $add_arr = array();
@@ -330,6 +330,7 @@ class IntermediaryController extends CommonController @@ -330,6 +330,7 @@ class IntermediaryController extends CommonController
330 */ 330 */
331 public function myMoney(Request $request){ 331 public function myMoney(Request $request){
332 $data = $request->param(); 332 $data = $request->param();
  333 + $size = 2;
333 $my = $this->left($data['token']); 334 $my = $this->left($data['token']);
334 $final['intermediary'] = $my; 335 $final['intermediary'] = $my;
335 $where_need['a.agency_id'] = $my['id']; 336 $where_need['a.agency_id'] = $my['id'];
@@ -338,11 +339,16 @@ class IntermediaryController extends CommonController @@ -338,11 +339,16 @@ class IntermediaryController extends CommonController
338 ->where($where_need) 339 ->where($where_need)
339 ->join("UserNeed n",'n.id = a.need_id') 340 ->join("UserNeed n",'n.id = a.need_id')
340 ->field("n.city,n.quarters,n.room,n.floor,n.house_type,n.renovation,n.status as need_status,n.create_time as need_time,n.quotation_time, 341 ->field("n.city,n.quarters,n.room,n.floor,n.house_type,n.renovation,n.status as need_status,n.create_time as need_time,n.quotation_time,
341 - a.all_price,a.create_time,a.status,a.id as intermediaryNeed_id,a.pay_time 342 + a.all_price,a.create_time,a.status,a.id as intermediaryNeed_id,a.pay_time,a.id ,a.refuse_complaint_time,a.choose_time
342 ") 343 ")
343 - ->limit(10)->page($page) 344 + ->limit($size)->page($page)
344 ->select()->toArray(); 345 ->select()->toArray();
345 if($need){ 346 if($need){
  347 + $number = Db::name('Agency')->alias('a')
  348 + ->where($where_need)
  349 + ->join("UserNeed n",'n.id = a.need_id')
  350 + ->count();
  351 + $final['all_page'] = ceil($number/$size);
346 foreach ($need as $nk=>$nv){ 352 foreach ($need as $nk=>$nv){
347 $changeInt = (int)$nv['all_price']; 353 $changeInt = (int)$nv['all_price'];
348 $need[$nk]['intPrice'] = substr($changeInt,0,-4); 354 $need[$nk]['intPrice'] = substr($changeInt,0,-4);
@@ -467,11 +467,11 @@ class UserController extends CommonController @@ -467,11 +467,11 @@ class UserController extends CommonController
467 public function changetTel(){ 467 public function changetTel(){
468 $data = $this->request->param(); 468 $data = $this->request->param();
469 $user = $this->myleft($data['token']); 469 $user = $this->myleft($data['token']);
470 - if(!empty($data['password'])){ 470 + if(!empty($data['Password'])){
471 $userModel = new MemberModel(); 471 $userModel = new MemberModel();
472 $where_change['status'] = 1; 472 $where_change['status'] = 1;
473 $where_change['token'] = $data['token']; 473 $where_change['token'] = $data['token'];
474 - $where_change['password'] = $this->md5($data['password']); 474 + $where_change['password'] = $this->md5($data['Password']);
475 $findChange = $userModel->where($where_change)->find(); 475 $findChange = $userModel->where($where_change)->find();
476 if($findChange){ 476 if($findChange){
477 $this->apiResponse('1','验证成功'); 477 $this->apiResponse('1','验证成功');
@@ -1075,7 +1075,7 @@ class UserController extends CommonController @@ -1075,7 +1075,7 @@ class UserController extends CommonController
1075 $this->apiResponse('0','状态错误'); 1075 $this->apiResponse('0','状态错误');
1076 } 1076 }
1077 $need_update['status'] = 7; 1077 $need_update['status'] = 7;
1078 - $need_update['choose_time'] = time(); 1078 + $need_update['next_choose_time'] = time();
1079 $need_res = Db::name('UserNeed')->where($where_need)->update($need_update); 1079 $need_res = Db::name('UserNeed')->where($where_need)->update($need_update);
1080 if(!$need_res){ 1080 if(!$need_res){
1081 $this->apiResponse('0','成交失败'); 1081 $this->apiResponse('0','成交失败');
@@ -1088,6 +1088,7 @@ class UserController extends CommonController @@ -1088,6 +1088,7 @@ class UserController extends CommonController
1088 $where_ag['id'] = $data['intermediary_id']; 1088 $where_ag['id'] = $data['intermediary_id'];
1089 $add['status'] = 5; 1089 $add['status'] = 5;
1090 $add['update_time'] = time(); 1090 $add['update_time'] = time();
  1091 + $need_update['choose_time'] = time();
1091 $save = Db::name('Agency')->where($where_ag)->update($add); 1092 $save = Db::name('Agency')->where($where_ag)->update($add);
1092 if($save){ 1093 if($save){
1093 $this->apiResponse('1','确认成功'); 1094 $this->apiResponse('1','确认成功');
@@ -1287,6 +1288,20 @@ class UserController extends CommonController @@ -1287,6 +1288,20 @@ class UserController extends CommonController
1287 $add['update_time'] = time(); 1288 $add['update_time'] = time();
1288 $is_add = Db::name('Complaint')->insertGetId($add); 1289 $is_add = Db::name('Complaint')->insertGetId($add);
1289 if($is_add){ 1290 if($is_add){
  1291 + $where_changeNeed['id'] = $data['need_id'];
  1292 + $save_need['status'] = 12;
  1293 + $save_need['complaint_time'] = time();
  1294 + $changeNeed = Db::name('UserNeed')->where($where_changeNeed)->update($save_need);
  1295 + if(!$changeNeed){
  1296 + $this->apiResponse('0','投诉失败');
  1297 + }
  1298 + $where_changeAgency['id'] = $data['intermediary_id'];
  1299 + $save_agency['status'] = 12;
  1300 + $save_agency['complaint_time'] = time();
  1301 + $changeAgency = Db::name('Agency')->where($where_changeAgency)->update($save_agency);
  1302 + if(!$changeAgency){
  1303 + $this->apiResponse('0','投诉失败');
  1304 + }
1290 $final['complaint_id'] = $is_add; 1305 $final['complaint_id'] = $is_add;
1291 $this->apiResponse('1','投诉成功',$final); 1306 $this->apiResponse('1','投诉成功',$final);
1292 }else{ 1307 }else{
  1 +<?php
  2 +// +----------------------------------------------------------------------
  3 +// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
  4 +// +----------------------------------------------------------------------
  5 +// | Copyright (c) 2013-2018 http://www.thinkcmf.com All rights reserved.
  6 +// +----------------------------------------------------------------------
  7 +// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8 +// +----------------------------------------------------------------------
  9 +// | Author: 老猫 <thinkcmf@126.com>
  10 +// +----------------------------------------------------------------------
  11 +namespace app\portal\controller;
  12 +use app\portal\model\UserNeedModel;
  13 +use cmf\controller\AdminBaseController;
  14 +use app\portal\model\NeedAnswerModel;
  15 +use app\portal\model\MemberModel;
  16 +use app\portal\model\UserModel;
  17 +use app\portal\service\PostService;
  18 +use think\Db;
  19 +use think\Request;
  20 +use think\Loader;
  21 +/**
  22 + * @title 保证金内容管理
  23 + * @description 接口说明
  24 + * @group 接口分组
  25 + */
  26 +
  27 +class AgencyController extends AdminBaseController
  28 +{
  29 +// 列表
  30 + public function index(Request $request)
  31 + {
  32 + $where_coo['a.status'] = array('neq',9);
  33 +// $where_coo['type'] = 2;
  34 +// $where_coo = array();
  35 + $status = 0;
  36 + if($request->post()){
  37 + $search = $request->post();
  38 + if($search['start_time']){
  39 + $start = strtotime($search['start_time']);
  40 + if($search['end_time']){
  41 + $end = strtotime($search['end_time']);
  42 + }else{
  43 + $end = time();
  44 + }
  45 + $where_coo['a.update_time'] = array('between',"$start,$end");
  46 + $this->assign('start_time',date('Y-m-d H:i',$start));
  47 + $this->assign('end_time',date('Y-m-d H:i',$end));
  48 + }
  49 + if(!empty($search['name'])){
  50 + $where_coo['m.name'] = array('like',"%".$search['name']."%");
  51 + $this->assign('name',$search['name']);
  52 + }
  53 + if(!empty($search['tel'])){
  54 + $where_coo['m.tel'] = array('like',"%".$search['tel']."%");
  55 + $this->assign('tel',$search['tel']);
  56 + }
  57 + if(!empty($search['need_id'])){
  58 + $where_coo['a.need_id'] = $search['need_id'];
  59 + $this->assign('need_id',$search['need_id']);
  60 + }
  61 + if(!empty($search['status'])){
  62 + $where_coo['a.status'] = $search['status'];
  63 + $status = $search['status'];
  64 + }
  65 + }
  66 + $this->assign('status',$status);
  67 + $coo_list = Db::name('Agency')->alias('a')
  68 + ->join("Member m",'m.id = a.agency_id')
  69 + ->where($where_coo)
  70 + ->field("m.name as user_name,m.tel as user_tel,a.*")
  71 + ->order('create_time desc')
  72 + ->select()->toArray();
  73 +
  74 +
  75 + $this->assign('list',$coo_list);
  76 + return $this->fetch('index');
  77 + }
  78 +
  79 +
  80 +// 详情
  81 + public function detail(){
  82 + $data = $this->request->param();
  83 + $where_need['a.id'] = $data['id'];
  84 + $where_need['a.status'] = array('neq',9);
  85 + $need = Db::name('Agency')->alias('a')
  86 + ->join("Member m",'m.id = a.agency_id')
  87 + ->where($where_need)
  88 + ->field('m.name as user_name,a.*')
  89 + ->find();
  90 + if($need['pay_time']){
  91 + $need['pay_time'] = date('Y-m-d H:i:s',$need['pay_time']);
  92 + }else{
  93 + $need['pay_time'] = '';
  94 + }
  95 +
  96 + if(!$need){
  97 + $this->error('需求错误');
  98 + }
  99 + $this->assign('list',$need);
  100 + return $this->fetch();
  101 + }
  102 +
  103 +// 修改信息
  104 + public function change(Request $request)
  105 + {
  106 + $data = $request->Post();
  107 + $where_agency['id'] = $data['id'];
  108 + $where_agency['status'] = array('neq',9);
  109 + $agency = Db::name('Agency')->where($where_agency)->find();
  110 +// 判断是否存在报价
  111 + if($agency){
  112 + $validate = Loader::validate('IntermediaryNeed');
  113 + if(!$validate->check($_POST)){
  114 + return json(array('code'=>0,'msg'=>$validate->getError()));
  115 + }
  116 +// 保证金
  117 + if($agency['status'] == 1) {
  118 + $where_inteRule['low'] = array('lt',$data['housing_price']);
  119 + $where_inteRule['height'] = array('egt',$data['housing_price']);
  120 + $inte_money = Db::name('IntermediaryRule')->where($where_inteRule)->field('money')->find();
  121 + if(!$inte_money){
  122 + $this->error('保证金获取失败');
  123 + }else{
  124 + $data['deposit'] = $inte_money['money'];
  125 + }
  126 + }
  127 +// 加数据库
  128 + $save = Db::name('Agency')->where($where_agency)->update($data);
  129 + }
  130 + if($save){
  131 + $this->success('修改成功',url('Agency/index'));
  132 + }else{
  133 + $this->error('修改失败');
  134 + }
  135 +
  136 + }
  137 +
  138 +
  139 + // 删除
  140 + public function del(Request $request){
  141 + $ids = $this->request->post();
  142 + $id = $request->param('id');
  143 + if($ids){
  144 + $where_del['id'] = array('in',$ids['ids']);
  145 + }else if($id){
  146 + $where_del['id'] = $request->param('id');
  147 + }else{
  148 + $this->error('删除失败');
  149 + }
  150 + $add_del['status'] = 9;
  151 + $add_del['update_time'] = time();
  152 + $del = Db::name('Agency')->where($where_del)->update($add_del);
  153 + if($del){
  154 + $this->success('删除成功',url('index'));
  155 + }else{
  156 + $this->error('删除失败');
  157 + }
  158 + }
  159 +
  160 +// 返回上一級狀態
  161 + public function level(){
  162 + $data = $this->request->param();
  163 +// 判断是否状态正确
  164 + $where_need['id'] = $data['need_id'];
  165 + $where_need['status'] = 7;
  166 + $need = Db::name('UserNeed')->where($where_need)->find();
  167 + if($need){
  168 +// 修改需求状态
  169 + $save_need['status'] = 5;
  170 + $save_need['update_time'] = time();
  171 + $save_need['choose_time'] = time();
  172 + $save_need['next_choose_time'] = '';
  173 + $save_need['complaint_time'] = '';
  174 + $changeNeed = Db::name('UserNeed')->where($where_need)->update($save_need);
  175 +// 修改报价状态
  176 + $where_agency['need_id'] = $data['need_id'];
  177 + $save_agency['status'] = 4;
  178 + $save_agency['update_time'] = time();
  179 + $save_agency['choose_time'] = '';
  180 + $save_agency['complaint_time'] = '';
  181 + $changeAgency = Db::name('Agency')->where($where_agency)->update($save_agency);
  182 + if(!$changeAgency || !$changeNeed){
  183 + $this->error('修改失败');
  184 + }else{
  185 + $this->success('修改成功');
  186 + }
  187 + }else{
  188 + $this->error('当前状态不支持修改');
  189 + }
  190 +
  191 +
  192 +
  193 +
  194 + }
  195 +
  196 +
  197 +}
@@ -62,6 +62,52 @@ class AlipayController extends HomeBaseController @@ -62,6 +62,52 @@ class AlipayController extends HomeBaseController
62 var_dump($response); 62 var_dump($response);
63 } 63 }
64 64
  65 + // 退款
  66 + public function refund($data) {
  67 +// $data = $this->request->param();
  68 + $config = $this->config;
  69 +
  70 + //商户订单号,商户网站订单系统中唯一订单号
  71 + $out_trade_no = '';
  72 + if(!empty($data['out_trade_no'])) {
  73 + $out_trade_no = trim($data['out_trade_no']);
  74 + }
  75 +
  76 + //支付宝交易号
  77 + if(!empty($data['trade_no'])) {
  78 + $trade_no = trim($data['trade_no']);
  79 + }
  80 + //请二选一设置
  81 +
  82 + //需要退款的金额,该金额不能大于订单金额,必填
  83 + $refund_amount = trim($data['refund_amount']);
  84 +
  85 + //退款的原因说明
  86 + $refund_reason = trim($data['refund_reason']);
  87 +
  88 + //标识一次退款请求,同一笔交易多次退款需要保证唯一,如需部分退款,则此参数必传
  89 +// $out_request_no = trim($data['WIDTRout_request_no']);
  90 + $out_request_no = '';
  91 +
  92 + //构造参数
  93 + $RequestBuilder=new \AlipayTradeRefundContentBuilder();
  94 + $RequestBuilder->setOutTradeNo($out_trade_no);
  95 + $RequestBuilder->setTradeNo($trade_no);
  96 + $RequestBuilder->setRefundAmount($refund_amount);
  97 + $RequestBuilder->setOutRequestNo($out_request_no);
  98 + $RequestBuilder->setRefundReason($refund_reason);
  99 +
  100 + $aop = new \AlipayTradeService($config);
  101 +
  102 + /**
  103 + * alipay.trade.refund (统一收单交易退款接口)
  104 + * @param $builder 业务参数,使用buildmodel中的对象生成。
  105 + * @return $response 支付宝返回的信息
  106 + */
  107 + $response = $aop->Refund($RequestBuilder);
  108 + return $response;
  109 + }
  110 +
65 // 回调 111 // 回调
66 public function notify_url() { 112 public function notify_url() {
67 $config = $this->config; 113 $config = $this->config;
@@ -92,6 +92,26 @@ class ComplaintController extends AdminBaseController @@ -92,6 +92,26 @@ class ComplaintController extends AdminBaseController
92 $save['update_time'] = time(); 92 $save['update_time'] = time();
93 $update = Db::name('Complaint')->where($where_money)->update($save); 93 $update = Db::name('Complaint')->where($where_money)->update($save);
94 if($update){ 94 if($update){
  95 + $where_need['id'] = $money['need_id'];
  96 + $where_need['status'] = array('neq',9);
  97 + $findNeed = Db::name('UserNeed')->where($where_need)->find();
  98 + $needTime = ($findNeed['next_choose_time']+259200)-$findNeed['complaint_time'];
  99 + $change_need['refuse_complaint_time'] = time()+$needTime;
  100 + $change_need['status'] = 14;
  101 + $saveNeed = Db::name('UserNeed')->where($where_need)->update($change_need);
  102 + if(!$saveNeed){
  103 + $this->error('拒绝失败');
  104 + }
  105 + $where_agency['id'] = $money['intermediary_id'];
  106 + $where_agency['status'] = array('neq',9);
  107 + $findAgency = Db::name('UserNeed')->where($where_agency)->find();
  108 + $agencyTime = ($findAgency['choose_time']+259200)-$findAgency['complaint_time'];
  109 + $change_agency['refuse_complaint_time'] = time()+$agencyTime;
  110 + $change_agency['status'] = 14;
  111 + $saveAgency = Db::name('UserNeed')->where($where_agency)->update($change_agency);
  112 + if(!$saveAgency){
  113 + $this->error('拒绝失败');
  114 + }
95 $this->success('成功'); 115 $this->success('成功');
96 }else{ 116 }else{
97 $this->error('失败'); 117 $this->error('失败');
@@ -32,6 +32,7 @@ class NeedController extends AdminBaseController @@ -32,6 +32,7 @@ class NeedController extends AdminBaseController
32 $where_coo['n.status'] = array('neq',9); 32 $where_coo['n.status'] = array('neq',9);
33 // $where_coo['type'] = 2; 33 // $where_coo['type'] = 2;
34 // $where_coo = array(); 34 // $where_coo = array();
  35 + $status = 0;
35 if($request->post()){ 36 if($request->post()){
36 $search = $request->post(); 37 $search = $request->post();
37 if($search['start_time']){ 38 if($search['start_time']){
@@ -45,11 +46,20 @@ class NeedController extends AdminBaseController @@ -45,11 +46,20 @@ class NeedController extends AdminBaseController
45 $this->assign('start_time',date('Y-m-d H:i',$start)); 46 $this->assign('start_time',date('Y-m-d H:i',$start));
46 $this->assign('end_time',date('Y-m-d H:i',$end)); 47 $this->assign('end_time',date('Y-m-d H:i',$end));
47 } 48 }
48 - if($search['keyword']){  
49 - $where_coo['n.title'] = array('like',"%".$search['keyword']."%");  
50 - $this->assign('keyword',$search['keyword']); 49 + if(!empty($search['name'])){
  50 + $where_coo['m.name'] = array('like',"%".$search['name']."%");
  51 + $this->assign('name',$search['name']);
  52 + }
  53 + if(!empty($search['tel'])){
  54 + $where_coo['m.tel'] = array('like',"%".$search['tel']."%");
  55 + $this->assign('tel',$search['tel']);
  56 + }
  57 + if(!empty($search['status'])){
  58 + $where_coo['n.status'] = $search['status'];
  59 + $status = $search['status'];
51 } 60 }
52 } 61 }
  62 + $this->assign('status',$status);
53 $coo_list = Db::name('UserNeed')->alias('n') 63 $coo_list = Db::name('UserNeed')->alias('n')
54 ->join("Member m",'m.id = n.user_id') 64 ->join("Member m",'m.id = n.user_id')
55 ->where($where_coo) 65 ->where($where_coo)
@@ -165,4 +175,41 @@ class NeedController extends AdminBaseController @@ -165,4 +175,41 @@ class NeedController extends AdminBaseController
165 } 175 }
166 } 176 }
167 177
  178 +// 返回上一級狀態
  179 + public function level(){
  180 + $data = $this->request->param();
  181 +// 判断是否状态正确
  182 + $where_need['id'] = $data['need_id'];
  183 + $where_need['status'] = 7;
  184 + $need = Db::name('UserNeed')->where($where_need)->find();
  185 + if($need){
  186 +// 修改需求状态
  187 + $save_need['status'] = 5;
  188 + $save_need['update_time'] = time();
  189 + $save_need['choose_time'] = time();
  190 + $save_need['next_choose_time'] = '';
  191 + $save_need['complaint_time'] = '';
  192 + $changeNeed = Db::name('UserNeed')->where($where_need)->update($save_need);
  193 +// 修改报价状态
  194 + $where_agency['need_id'] = $data['need_id'];
  195 + $save_agency['status'] = 4;
  196 + $save_agency['update_time'] = time();
  197 + $save_agency['choose_time'] = '';
  198 + $save_agency['complaint_time'] = '';
  199 + $changeAgency = Db::name('Agency')->where($where_agency)->update($save_agency);
  200 + if(!$changeAgency || !$changeNeed){
  201 + $this->error('修改失败');
  202 + }else{
  203 + $this->success('修改成功');
  204 + }
  205 + }else{
  206 + $this->error('当前状态不支持修改');
  207 + }
  208 +
  209 +
  210 +
  211 +
  212 + }
  213 +
  214 +
168 } 215 }
@@ -25,12 +25,102 @@ use think\Loader; @@ -25,12 +25,102 @@ use think\Loader;
25 25
26 class StatisticsController extends AdminBaseController 26 class StatisticsController extends AdminBaseController
27 { 27 {
  28 + /**
  29 + * API返回信息格式函数 ;0失败,1成功,-1需要登录
  30 + * @param string $code
  31 + * @param string $message
  32 + * @param array $data
  33 + */
  34 + public function apiResponse($code = '0', $message = '',$data = array(),$nums =0){
  35 + header('Access-Control-Allow-Origin: *');
  36 + header('Content-Type:application/json; charset=utf-8');
  37 + $result = array(
  38 + 'code'=>$code,
  39 + 'message'=>$message,
  40 + 'data'=>$data,
  41 + 'nums'=>''.$nums
  42 + );
  43 + die(json_encode($result,JSON_UNESCAPED_UNICODE));
  44 + }
  45 +
  46 +
  47 +
28 // 列表 48 // 列表
29 public function index(Request $request) 49 public function index(Request $request)
30 { 50 {
31 -  
32 return $this->fetch('index'); 51 return $this->fetch('index');
33 } 52 }
  53 + public function find(){
  54 + // 注册人数
  55 +// 中介
  56 + $data = $this->request->param();
  57 + foreach ($data['time'] as $tk=>$tv){
  58 + $time[$tk]['start_time'] = strtotime($tv);
  59 + $time[$tk]['end_time'] = strtotime($tv)+86400;
  60 + }
  61 + $start_time = '';
  62 + $end_time = '';
  63 + $where_member['status'] = array('neq',9);
  64 + $all_member = Db::name('Member')->where($where_member)->select()->toArray();
  65 + $pie_user = 0;
  66 + $pie_member = 0;
  67 +// 筛选时间判断
  68 + if(!empty($data['start_time']) || !empty($data['end_time'])) {
  69 +// 搜索
  70 + if (!empty($data['start_time'])) {
  71 + $start_time = strtotime($data['start_time']);
  72 + }
  73 + if (!empty($data['end_time'])) {
  74 + $end_time = strtotime($data['end_time']);
  75 + }
  76 +
  77 + }else{
  78 +// 默认
  79 + $date_str = date('Y-m-d',time());
  80 + $date_time = strtotime($date_str);
  81 + $end_time = time();
  82 + $start_time = $date_time;
  83 + }
  84 +// 饼状图
  85 + foreach ($all_member as $mk => $mv) {
  86 + if ($mv['create_time'] >= $start_time && $mv['create_time'] <= $end_time) {
  87 + if ($mv['type'] == 1) {
  88 + $pie_user += 1;
  89 + } else {
  90 + $pie_member += 1;
  91 + }
  92 + }
  93 + }
34 94
  95 +// 柱状图
  96 + foreach ($time as $timek=>$timev){
  97 + $user_add = 0;
  98 + $member_add = 0;
  99 + foreach ($all_member as $memberk=>$memberv){
  100 + // 判断时间
  101 + if($memberv['create_time'] >=$timev['start_time'] && $memberv['create_time'] <=$timev['end_time']){
  102 +// 判断类型
  103 + if($memberv['type'] == 1){
  104 + $user_add += 1;
  105 + }else{
  106 + $member_add += 1;
  107 + }
  108 + }
  109 + }
  110 + $user[] = $user_add;
  111 + $member[] = $member_add;
  112 +
  113 + }
  114 +
  115 + $final['user'] = $user;
  116 + $final['member'] = $member;
  117 + $final['start_time'] = $start_time;
  118 + $final['end_time'] = $end_time;
  119 + $final['pie_user'] = $pie_user;
  120 + $final['pie_member'] = $pie_member;
  121 + $this->apiResponse('1','成功',$final);
  122 +
  123 +
  124 + }
35 125
36 } 126 }
  1 +<?php
  2 +// +----------------------------------------------------------------------
  3 +// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
  4 +// +----------------------------------------------------------------------
  5 +// | Copyright (c) 2013-2018 http://www.thinkcmf.com All rights reserved.
  6 +// +----------------------------------------------------------------------
  7 +// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8 +// +----------------------------------------------------------------------
  9 +// | Author: 小夏 < 449134904@qq.com>
  10 +// +----------------------------------------------------------------------
  11 +namespace app\portal\validate;
  12 +
  13 +use think\Validate;
  14 +
  15 +class IntermediaryNeedValidate extends Validate
  16 +{
  17 + protected $rule = [
  18 + 'need_id' => 'require',
  19 + 'housing_price' => 'require',
  20 + ];
  21 + protected $message = [
  22 + 'need_id.require' => '需求id不能为空!',
  23 + 'housing_price.require' => '房价不能为空!',
  24 +
  25 + ];
  26 +
  27 + protected $scene = [
  28 + 'offer' => ['need_id','housing_price'],
  29 +
  30 + ];
  31 +
  32 +}
@@ -149,6 +149,7 @@ return array ( @@ -149,6 +149,7 @@ return array (
149 'PORTAL_ADMINTAG_DELETE' => '删除文章标签', 149 'PORTAL_ADMINTAG_DELETE' => '删除文章标签',
150 'PORTAL_ADMINTAG_INDEX' => '文章标签', 150 'PORTAL_ADMINTAG_INDEX' => '文章标签',
151 'PORTAL_ADMINTAG_UPSTATUS' => '更新标签状态', 151 'PORTAL_ADMINTAG_UPSTATUS' => '更新标签状态',
  152 + 'PORTAL_AGENCY_INDEX' => '报价管理',
152 'PORTAL_ALL_ADD' => '包干价', 153 'PORTAL_ALL_ADD' => '包干价',
153 'PORTAL_BANK_DEFAULT' => '银行管理', 154 'PORTAL_BANK_DEFAULT' => '银行管理',
154 'PORTAL_BANK_INDEX' => '银行名称列表', 155 'PORTAL_BANK_INDEX' => '银行名称列表',
  1 +(function(H) {
  2 + var protocol = window.location.protocol;
  3 + var defaultOptionsZhCn = {
  4 + lang: {
  5 + contextButtonTitle: "",
  6 + decimalPoint: ".",
  7 + downloadJPEG: "",
  8 + downloadPDF: "",
  9 + downloadPNG: "",
  10 + downloadSVG: "",
  11 + drillUpText: "返回 {series.name}",
  12 + invalidDate: "无效的时间",
  13 + loading: "加载中...",
  14 + months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
  15 + noData: "没有数据",
  16 + numericSymbols: null,
  17 + printChart: "",
  18 + resetZoom: "重置缩放比例",
  19 + resetZoomTitle: "重置为原始大小",
  20 + shortMonths: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
  21 + thousandsSep: ",",
  22 + weekdays: ["星期天", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
  23 + rangeSelectorFrom: "开始时间",
  24 + rangeSelectorTo: "结束时间",
  25 + rangeSelectorZoom: "范围",
  26 + zoomIn: "缩小",
  27 + zoomOut: "放大"
  28 + },
  29 + global: {
  30 + canvasToolsURL: protocol + "//cdn.hcharts.cn/highcharts/modules/canvas-tools.js",
  31 + VMLRadialGradientURL: protocol + +"//cdn.hcharts.cn/highcharts/gfx/vml-radial-gradient.png"
  32 + },
  33 + title: {
  34 + text: "图表标题"
  35 + },
  36 + tooltip: {
  37 + dateTimeLabelFormats: {
  38 + millisecond: "%H:%M:%S.%L",
  39 + second: "%H:%M:%S",
  40 + minute: "%H:%M",
  41 + hour: "%H:%M",
  42 + day: "%Y-%m-%d",
  43 + week: "%Y-%m-%d",
  44 + month: "%Y-%m",
  45 + year: "%Y"
  46 + },
  47 + split: false
  48 + },
  49 + exporting: {
  50 + url: protocol + "//export.highcharts.com.cn"
  51 + },
  52 + credits: {
  53 + text: "",
  54 + href: "https://www.highcharts.com.cn"
  55 + },
  56 + xAxis: {
  57 + dateTimeLabelFormats: {
  58 + millisecond: "%H:%M:%S.%L",
  59 + second: "%H:%M:%S",
  60 + minute: "%H:%M",
  61 + hour: "%H:%M",
  62 + day: "%Y-%m-%d",
  63 + week: "%Y-%m",
  64 + month: "%Y-%m",
  65 + year: "%Y"
  66 + }
  67 + },
  68 + rangeSelector: {
  69 + inputDateFormat: "%Y-%m-%d",
  70 + buttonTheme: {
  71 + width: "auto",
  72 + style: {
  73 + fontSize: "12px",
  74 + padding: "4px"
  75 + }
  76 + },
  77 + buttons: [{
  78 + type: "month",
  79 + count: 1,
  80 + text: "月"
  81 + },
  82 + {
  83 + type: "month",
  84 + count: 3,
  85 + text: "季度"
  86 + },
  87 + {
  88 + type: "month",
  89 + count: 6,
  90 + text: "半年"
  91 + },
  92 + {
  93 + type: "ytd",
  94 + text: "YTD"
  95 + },
  96 + {
  97 + type: "year",
  98 + count: 1,
  99 + text: "年"
  100 + },
  101 + {
  102 + type: "all",
  103 + text: "所有"
  104 + }]
  105 + },
  106 + plotOptions: {
  107 + series: {
  108 + dataGrouping: {
  109 + dateTimeLabelFormats: {
  110 + millisecond: ["%Y-%m-%d %H:%M:%S.%L", "%Y-%m-%d %H:%M:%S.%L", " ~ %H:%M:%S.%L"],
  111 + second: ["%Y-%m-%d %H:%M:%S", "%Y-%m-%d %H:%M:%S", " ~ %H:%M:%S"],
  112 + minute: ["%Y-%m-%d %H:%M", "%Y-%m-%d %H:%M", " ~ %H:%M"],
  113 + hour: ["%Y-%m-%d %H:%M", "%Y-%m-%d %H:%M", " ~ %H:%M"],
  114 + day: ["%Y-%m-%d", "%Y-%m-%d", " ~ %Y-%m-%d"],
  115 + week: ["%Y-%m-%d", "%Y-%m-%d", " ~ %Y-%m-%d"],
  116 + month: ["%Y-%m", "%Y-%m", " ~ %Y-%m"],
  117 + year: ["%Y", "%Y", " ~ %Y"]
  118 + }
  119 + }
  120 + },
  121 + ohlc: {
  122 + tooltip: {
  123 + split: false,
  124 + pointFormat: '<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>' + "开盘:{point.open}<br/>" + "最高:{point.high}<br/>" + "最低:{point.low}<br/>" + "收盘:{point.close}<br/>"
  125 + }
  126 + },
  127 + candlestick: {
  128 + tooltip: {
  129 + split: false,
  130 + pointFormat: '<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>' + "开盘:{point.open}<br/>" + "最高:{point.high}<br/>" + "最低:{point.low}<br/>" + "收盘:{point.close}<br/>"
  131 + }
  132 + }
  133 + }
  134 + };
  135 + H.setOptions(defaultOptionsZhCn)
  136 +})(Highcharts);
  1 +<include file="public@header"/>
  2 +<style type="text/css">
  3 + .pic-list li {
  4 + margin-bottom: 5px;
  5 + }
  6 +</style>
  7 +</head>
  8 +<body>
  9 +<div class="wrap js-check-wrap">
  10 + <ul class="nav nav-tabs">
  11 + <li><a href="{:url('UserNeed/index')}">保证金说明列表</a></li>
  12 + <li class="active"><a href="{:url('UserNeed/add')}">添加保证金说明</a></li>
  13 + </ul>
  14 + <form action="{:url('UserNeed/add')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
  15 + <div class="row">
  16 + <div class="col-md-9">
  17 + <table class="table table-bordered">
  18 + <input class="form-control" type="hidden" name="id"
  19 + value="{$list['id']}"/>
  20 + <tr>
  21 + <th>标题<span class="form-required">*</span></th>
  22 + <td>
  23 + <input class="form-control" type="text" name="title"
  24 + id="title" value="{$list['title']}" placeholder="请输入标题"/>
  25 + </td>
  26 + </tr>
  27 + <tr>
  28 + <th width="10%">内容<span class="form-required">*</span></th>
  29 + <td>
  30 + <script type="text/plain" id="content" name="content">{$list['content']}</script>
  31 + </td>
  32 + </tr>
  33 + <tr>
  34 + <th>排序</th>
  35 + <td>
  36 + <input class="form-control" type="text" name="score"
  37 + value="{$list['score']}" placeholder="请输入排序,数字越大越靠前"/>
  38 + </td>
  39 + </tr>
  40 +
  41 +
  42 + </table>
  43 + <div class="form-group">
  44 + <div class="col-sm-offset-2 col-sm-10">
  45 + <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
  46 + <a class="btn btn-default" href="{:url('UserNeed/index')}">{:lang('BACK')}</a>
  47 + </div>
  48 + </div>
  49 + </div>
  50 + </div>
  51 + </form>
  52 +</div>
  53 +<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
  54 +<script type="text/javascript">
  55 + //编辑器路径定义
  56 + var editorURL = GV.WEB_ROOT;
  57 +</script>
  58 +<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
  59 +<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
  60 +<script type="text/javascript">
  61 + $(function () {
  62 +
  63 + editorcontent = new baidu.editor.ui.Editor();
  64 + editorcontent.render('content');
  65 + try {
  66 + editorcontent.sync();
  67 + } catch (err) {
  68 + }
  69 +
  70 + $('.btn-cancel-thumbnail').click(function () {
  71 + $('#thumbnail-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
  72 + $('#thumbnail').val('');
  73 + });
  74 +
  75 + });
  76 +
  77 + // function doSelectCategory() {
  78 + // var selectedCategoriesId = $('#js-categories-id-input').val();
  79 + // openIframeLayer("{:url('AdminCategory/select')}?ids=" + selectedCategoriesId, '请选择分类', {
  80 + // area: ['700px', '400px'],
  81 + // btn: ['确定', '取消'],
  82 + // yes: function (index, layero) {
  83 + // //do something
  84 + //
  85 + // var iframeWin = window[layero.find('iframe')[0]['name']];
  86 + // var selectedCategories = iframeWin.confirm();
  87 + // if (selectedCategories.selectedCategoriesId.length == 0) {
  88 + // layer.msg('请选择分类');
  89 + // return;
  90 + // }
  91 + // $('#js-categories-id-input').val(selectedCategories.selectedCategoriesId.join(','));
  92 + // $('#js-categories-name-input').val(selectedCategories.selectedCategoriesName.join(' '));
  93 + // //console.log(layer.getFrameIndex(index));
  94 + // layer.close(index); //如果设定了yes回调,需进行手工关闭
  95 + // }
  96 + // });
  97 + // }
  98 +</script>
  99 +</body>
  100 +</html>
  1 +<include file="public@header"/>
  2 +<style type="text/css">
  3 + .pic-list li {
  4 + margin-bottom: 5px;
  5 + }
  6 + .dingwei{
  7 + position: relative;
  8 + width: 20%;
  9 + }
  10 + .day_tian{
  11 + position: absolute;
  12 + right: 4px;
  13 + line-height: 33px;
  14 + top: 0;
  15 + }
  16 +</style>
  17 +</head>
  18 +<body>
  19 +<div class="wrap js-check-wrap">
  20 + <ul class="nav nav-tabs">
  21 + <!--<li><a href="{:url('Bank/index')}">银行列表</a></li>-->
  22 + <!--<li class="active"><a href="{:url('Bank/add')}">添加银行</a></li>-->
  23 + </ul>
  24 + <form action="{:url('Agency/change')}" method="post" class="form-horizontal js-ajax-form margin-top-20" enctype="multipart/form-data" >
  25 + <div class="row">
  26 + <div class="col-md-9">
  27 + <table class="table table-bordered">
  28 + <input class="form-control" type="hidden" name="id"
  29 + value="{$list['id']}"/>
  30 + <tr>
  31 + <th width="15%">中介名</th>
  32 + <td><input class="form-control" type="text" readonly="readonly"
  33 + value="{$list['user_name']}" />
  34 +
  35 + </td>
  36 + </tr>
  37 + <tr>
  38 + <th width="15%">需求id</th>
  39 + <td><input class="form-control" type="text" name="need_id"
  40 + value="{$list['need_id']}" />
  41 +
  42 + </td>
  43 + </tr>
  44 + <tr>
  45 + <th width="15%">房价</th>
  46 +
  47 + <td>
  48 + <div class="dingwei">
  49 + <input class="form-control" type="text" name="housing_price"
  50 + value="{$list['housing_price']}" />
  51 + <span class="day_tian">万元</span>
  52 + </div>
  53 + </td>
  54 +
  55 + </tr>
  56 + <tr>
  57 + <th width="15%">评估税</th>
  58 + <td>
  59 + <div class="dingwei">
  60 + <input class="form-control" type="text" name="assessment_tax" value="{$list['assessment_tax']}" />
  61 + <span class="day_tian"></span>
  62 + </div>
  63 + </td>
  64 + </tr>
  65 + <tr>
  66 + <th width="15%">增值税</th>
  67 + <td><div class="dingwei">
  68 + <input class="form-control" type="text" name="value_added_tax"
  69 + value="{$list['value_added_tax']}" />
  70 + <span class="day_tian"></span>
  71 + </div>
  72 + </td>
  73 + </tr>
  74 + <tr>
  75 + <th width="15%">贷款担保税</th>
  76 + <td>
  77 + <div class="dingwei">
  78 + <input class="form-control" type="text" name="security_tax"
  79 + value="{$list['security_tax']}" />
  80 + <span class="day_tian"></span>
  81 + </div>
  82 + </td>
  83 + </tr>
  84 + <tr>
  85 + <th width="15%">契税</th>
  86 + <td>
  87 + <div class="dingwei">
  88 + <input class="form-control" type="text" name="deed_tax"
  89 + value="{$list['deed_tax']}" />
  90 + <span class="day_tian"></span>
  91 + </div>
  92 + </td>
  93 + </tr>
  94 + <tr>
  95 + <th width="15%">其他税费</th>
  96 + <td>
  97 + <div class="dingwei">
  98 + <input class="form-control" type="text" name="else_tax"
  99 + value="{$list['else_tax']}" />
  100 + <span class="day_tian"></span>
  101 + </div>
  102 + </td>
  103 + </tr>
  104 + <tr>
  105 +
  106 + <th width="15%">个税</th>
  107 + <td>
  108 + <div class="dingwei">
  109 + <input class="form-control" type="text" name="personal_income_tax"
  110 + value="{$list['personal_income_tax']}" style="width: 100%;" />
  111 + <span class="day_tian"></span>
  112 + </div>
  113 + </td>
  114 + </tr>
  115 + <tr>
  116 +
  117 + <th width="15%">居间服务费</th>
  118 + <td>
  119 + <div class="dingwei">
  120 + <input class="form-control" type="text" name="service_charge"
  121 + value="{$list['service_charge']}" style="width: 100%;" />
  122 + <span class="day_tian"></span>
  123 + </div>
  124 + </td>
  125 + </tr>
  126 + <tr>
  127 +
  128 + <th width="15%">备注</th>
  129 + <td>
  130 + <input class="form-control" type="text" name="else"
  131 + value="{$list['else']}" style="width: 100%;" />
  132 + </td>
  133 + </tr>
  134 + <tr>
  135 +
  136 + <th width="15%">总价</th>
  137 + <td>
  138 + <div class="dingwei">
  139 + <input class="form-control" type="text" name="all_price"
  140 + value="{$list['all_price']}" style="width: 100%;" />
  141 + <span class="day_tian"></span>
  142 + </div>
  143 + </td>
  144 + </tr>
  145 +
  146 +
  147 + <tr>
  148 + <th width="15%">押金</th>
  149 + <td>
  150 + <div class="dingwei">
  151 + <input class="form-control" type="text" name="deposit" value="{$list['deposit']}" />
  152 + <span class="day_tian"></span>
  153 + </div>
  154 + </td>
  155 + </tr>
  156 + <tr>
  157 + <th width="15%">创建时间</th>
  158 + <td><input class="form-control" type="text" value="{$list['create_time']|date='Y-m-d H:i:s',###}" readonly="readonly"/>
  159 + </td>
  160 + </tr>
  161 + <tr>
  162 + <th width="18%">更新时间</th>
  163 + <td><input class="form-control" type="text" value="{$list['update_time']|date='Y-m-d H:i:s',###}" readonly="readonly"/>
  164 + </td>
  165 + </tr>
  166 + <tr>
  167 + <th width="18%">支付押金时间</th>
  168 + <td><input class="form-control" type="text" value="{$list['pay_time']}" readonly="readonly"/>
  169 + </td>
  170 + </tr>
  171 + <tr>
  172 + <th>状态</th>
  173 + <td>
  174 + <eq name="list.status" value="1">未交保证金</eq>
  175 + <eq name="list.status" value="2">待中标</eq>
  176 + <eq name="list.status" value="3">初选未中标</eq>
  177 + <eq name="list.status" value="4">待用户选择</eq>
  178 + <eq name="list.status" value="5">已中标</eq>
  179 + <eq name="list.status" value="6">复选未中标</eq>
  180 + <eq name="list.status" value="7">人数不足</eq>
  181 + <eq name="list.status" value="8">复选用户未选择</eq>
  182 + <eq name="list.status" value="10">中介未确认</eq>
  183 + <eq name="list.status" value="11">成交</eq>
  184 + <eq name="list.status" value="12">投诉申请中</eq>
  185 + <eq name="list.status" value="13">同意投诉申请</eq>
  186 + <eq name="list.status" value="14">拒绝投诉申请</eq>
  187 + </td>
  188 + </tr>
  189 + </table>
  190 + <div class="form-group">
  191 + <div class="col-sm-offset-2 col-sm-10">
  192 + <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
  193 + <a class="btn btn-default" href="{:url('Agency/index')}">{:lang('BACK')}</a>
  194 + </div>
  195 + </div>
  196 + </div>
  197 + </div>
  198 + </form>
  199 +</div>
  200 +<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
  201 +<script type="text/javascript">
  202 + //编辑器路径定义
  203 + var editorURL = GV.WEB_ROOT;
  204 +</script>
  205 +<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
  206 +<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
  207 +<script type="text/javascript">
  208 + $(function () {
  209 +
  210 + editorcontent = new baidu.editor.ui.Editor();
  211 + editorcontent.render('content');
  212 + try {
  213 + editorcontent.sync();
  214 + } catch (err) {
  215 + }
  216 +
  217 + $('.btn-cancel-thumbnail').click(function () {
  218 + $('#thumbnail-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
  219 + $('#thumbnail').val('');
  220 + });
  221 +
  222 + });
  223 +
  224 +</script>
  225 +</body>
  226 +</html>
  1 +<include file="public@header"/>
  2 +<link rel="stylesheet" href="__STATIC__/install/css/mdialog.css">
  3 +<style>
  4 + .popup{
  5 + width: 250px;
  6 + height: 100px;
  7 + background-color: rgba(0,0,0,0.5);
  8 + position: fixed;
  9 + top: 50%;
  10 + transform: translateY(-50px);
  11 + left: 0;
  12 + right: 0;
  13 + margin: 0 auto;
  14 + border-radius: 5px;
  15 + color: #ffffff;
  16 + }
  17 + .popup p{
  18 + text-align: center;
  19 + margin-top: 20px;
  20 + }
  21 + .popup span{
  22 + text-align: center;
  23 + line-height: 30px;
  24 + cursor: pointer;
  25 + }
  26 + .popup .queding{
  27 + display: inline-block;
  28 + width: 80px;
  29 + height: 30px;
  30 + background-color: #1E9FFF;
  31 + border-radius: 3px;
  32 + }
  33 + .popup span:hover{
  34 + opacity: 0.8;
  35 + }
  36 + .popup .quxiao{
  37 + display: inline-block;
  38 + width: 80px;
  39 + height: 30px;
  40 + ckground-color: #9cb945 ;
  41 + color: #333333;
  42 + border-radius: 3px;
  43 + background-color:#fff;
  44 + margin-left: 35px;
  45 + }
  46 + .btn_list{
  47 + margin: 0 auto;
  48 + width: 200px;
  49 + }
  50 +</style>
  51 +</head>
  52 +<body>
  53 +<div class="wrap js-check-wrap">
  54 + <ul class="nav nav-tabs">
  55 + <li class="active"><a href=" ">需求列表</a></li>
  56 + </ul>
  57 + <form class="well form-inline margin-top-20" method="post" action="{:url('Need/index')}">
  58 + <!--分类:-->
  59 + <!--<select class="form-control" name="category" style="width: 140px;">-->
  60 + <!--<option value='0'>全部</option>-->
  61 + <!--{$category_tree|default=''}-->
  62 + <!--</select> &nbsp;&nbsp;-->
  63 + 时间:
  64 + <input type="text" class="form-control js-bootstrap-datetime" name="start_time"
  65 + value="{$start_time|default=''}"
  66 + style="width: 140px;" autocomplete="off">-
  67 + <input type="text" class="form-control js-bootstrap-datetime" name="end_time"
  68 + value="{$end_time|default=''}"
  69 + style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;
  70 + 用户名:
  71 + <input type="text" class="form-control" name="name" style="width: 200px;"
  72 + value="{$name|default=''}" placeholder="请输入用户名">
  73 + 手机号:
  74 + <input type="text" class="form-control" name="tel" style="width: 200px;"
  75 + value="{$tel|default=''}" placeholder="请输入手机号"> <br/>
  76 + 需求id:
  77 + <input type="text" class="form-control" name="need_id" style="width: 200px;"
  78 + value="{$need_id|default=''}" placeholder="请输入需求id">
  79 + 状态:
  80 + <select name="status" style="border: 1px solid #dce4ec; margin-top: 20px;">
  81 + <option name="status" value="0" <eq name="status" value="0">selected</eq>>&nbsp; &nbsp;---请选择---</option>
  82 + <option name="status" value="1" <eq name="status" value="1">selected</eq>>未交押金</option>
  83 + <option name="status" value="2" <eq name="status" value="2">selected</eq>>待中标</option>
  84 + <option name="status" value="3" <eq name="status" value="3">selected</eq>>初选未中标</option>
  85 + <option name="status" value="4" <eq name="status" value="4">selected</eq>>待用户选择</option>
  86 + <option name="status" value="5" <eq name="status" value="5">selected</eq>>已中标</option>
  87 + <option name="status" value="6" <eq name="status" value="6">selected</eq>>复选未中标</option>
  88 + <option name="status" value="7" <eq name="status" value="7">selected</eq>>人数不足</option>
  89 + <option name="status" value="8" <eq name="status" value="8">selected</eq>>复选用户未选择</option>
  90 + <option name="status" value="10" <eq name="status" value="10">selected</eq>>中介未确认</option>
  91 + <option name="status" value="11" <eq name="status" value="11">selected</eq>>成交</option>
  92 + <option name="status" value="12" <eq name="status" value="12">selected</eq>>投诉申请中</option>
  93 + <option name="status" value="13" <eq name="status" value="13">selected</eq>>同意投诉申请</option>
  94 + <option name="status" value="14" <eq name="status" value="14">selected</eq>>拒绝投诉申请</option>
  95 +
  96 + </select>
  97 + &nbsp;&nbsp;&nbsp;&nbsp;
  98 + <input type="submit" class="btn btn-primary" value="搜索"/>
  99 + <a class="btn btn-danger" href="{:url('Need/index')}">清空</a>
  100 + </form>
  101 + <form class="js-ajax-form" action="" method="post">
  102 + <div class="table-actions">
  103 + <button class="btn btn-danger btn-sm js-ajax-submit" type="submit"
  104 + data-action="{:url('Need/del')}" data-subcheck="true" data-msg="您确定删除吗?">
  105 + {:lang('DELETE')}
  106 + </button>
  107 + </div>
  108 + <table class="table table-hover table-bordered table-list">
  109 + <thead>
  110 + <tr>
  111 + <th width="15">
  112 + <label>
  113 + <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
  114 + </label>
  115 + </th>
  116 + <notempty name="category">
  117 + <th width="50">{:lang('SORT')}</th>
  118 + </notempty>
  119 + <th width="50">ID</th>
  120 + <th>中介名</th>
  121 + <th>中介手机号</th>
  122 + <th>需求id</th>
  123 + <th>房价(万元)</th>
  124 + <th>总价(元)</th>
  125 + <th>押金(元)</th>
  126 + <th>状态</th>
  127 + <th>提交时间</th>
  128 + <th>操作</th>
  129 + <th>操作</th>
  130 + </tr>
  131 + </thead>
  132 + <foreach name="list" item="list">
  133 + <tr>
  134 + <td>
  135 + <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
  136 + value="{$list.id}" title="ID:{$list.id}">
  137 + </td>
  138 +
  139 + <td>{$list.id}</td>
  140 + <td>{$list.user_name}</td>
  141 + <td>{$list.user_tel}</td>
  142 + <td>{$list.need_id}</td>
  143 + <td>{$list.housing_price}</td>
  144 + <td>{$list.all_price}</td>
  145 + <td>{$list.deposit}</td>
  146 + <td>
  147 + <eq name="list.status" value="1">未交保证金</eq>
  148 + <eq name="list.status" value="2">待中标</eq>
  149 + <eq name="list.status" value="3">初选未中标</eq>
  150 + <eq name="list.status" value="4">待用户选择</eq>
  151 + <eq name="list.status" value="5">已中标</eq>
  152 + <eq name="list.status" value="6">复选未中标</eq>
  153 + <eq name="list.status" value="7">人数不足</eq>
  154 + <eq name="list.status" value="8">复选用户未选择</eq>
  155 + <eq name="list.status" value="10">中介未确认</eq>
  156 + <eq name="list.status" value="11">成交</eq>
  157 + <eq name="list.status" value="12">投诉申请中</eq>
  158 + <eq name="list.status" value="13">同意投诉申请</eq>
  159 + <eq name="list.status" value="14">拒绝投诉申请</eq>
  160 + </td>
  161 + <td>
  162 + {:date('Y-m-d H:i',$list['create_time'])}
  163 + </td>
  164 + <td>
  165 + <a href="{:url('Agency/detail',array('id'=>$list['id']))}">查看详情</a>
  166 + <a href="{:url('Agency/del',array('id'=>$list['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>
  167 + </td>
  168 + <td>
  169 + <switch name="list.status" >
  170 + <case value="10|12|13|14">
  171 + <span id="level" index="{$list.need_id}" style="color: red;cursor: pointer; ">返回上一级状态</span>
  172 + </case>
  173 + <case value="1|2|3|4|5|6|7|8|11">
  174 + <span style="color:#aaaaaa; cursor: pointer; ">当前状态不可修改</span>
  175 + </case>
  176 +
  177 + </switch>
  178 +
  179 + </td>
  180 + </tr>
  181 + </foreach>
  182 +
  183 + </table>
  184 + <ul class="pagination">{$page|default=''}</ul>
  185 + </form>
  186 + <div class="popup" style="display: none; z-index:100;">
  187 + <p>确认返回上一级</p>
  188 + <div class="btn_list">
  189 + <span class="queding">确认</span>
  190 + <span class="quxiao">取消</span>
  191 + </div>
  192 + </div>
  193 +</div>
  194 +<script src="__STATIC__/js/admin.js"></script>
  195 +<script src="__STATIC__/js/layer/layer.js"></script>
  196 +<script type="text/javascript" src="__STATIC__/js/zepto.min.js"></script>
  197 +<script type="text/javascript" src="__STATIC__/js/mdialog.js"></script>
  198 +<script>
  199 + // 删除
  200 + $('#level').click(function () {
  201 + var id = $(this).attr('index');
  202 + $('.popup').css('display','block');
  203 + $('.queding').click(function () {
  204 + $.ajax({
  205 + type:"POST",
  206 + url:"{:url('Agency/level')}",
  207 + data:{
  208 + "need_id":id,
  209 + },
  210 + success:function (data) {
  211 + new TipBox({type:'success',str:'操作成功',hasBtn:true});
  212 + $('.popup').css('display','none');
  213 + },
  214 + error:function () {
  215 + new TipBox({type:'error',str:'对不起,出错了!',hasBtn:true});
  216 + $('.popup').css('display','none');
  217 + }
  218 + })
  219 + })
  220 + })
  221 + $('.quxiao').click(function () {
  222 + $('.popup').css('display','none');
  223 + })
  224 +
  225 +
  226 +</script>
  227 +</body>
  228 +</html>
  1 +<include file="public@header"/>
  2 +</head>
  3 +<body>
  4 +<div class="wrap js-check-wrap">
  5 + <ul class="nav nav-tabs">
  6 + <li class="active"><a href="javascript:;">保证金说明列表</a></li>
  7 + <li><a href="{:url('UserNeed/add')}">添加保证金说明</a></li>
  8 + </ul>
  9 + <form class="well form-inline margin-top-20" method="post" action="{:url('UserNeed/index')}">
  10 + <!--分类:-->
  11 + <!--<select class="form-control" name="category" style="width: 140px;">-->
  12 + <!--<option value='0'>全部</option>-->
  13 + <!--{$category_tree|default=''}-->
  14 + <!--</select> &nbsp;&nbsp;-->
  15 + 时间:
  16 + <input type="text" class="form-control js-bootstrap-datetime" name="start_time"
  17 + value="{$start_time|default=''}"
  18 + style="width: 140px;" autocomplete="off">-
  19 + <input type="text" class="form-control js-bootstrap-datetime" name="end_time"
  20 + value="{$end_time|default=''}"
  21 + style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;
  22 + 关键字:
  23 + <input type="text" class="form-control" name="keyword" style="width: 200px;"
  24 + value="{$keyword|default=''}" placeholder="请输入说明标题">
  25 + <input type="submit" class="btn btn-primary" value="搜索"/>
  26 + <a class="btn btn-danger" href="{:url('UserNeed/index')}">清空</a>
  27 + </form>
  28 + <form class="js-ajax-form" action="" method="post">
  29 + <div class="table-actions">
  30 + <!--<notempty name="category">-->
  31 + <!--<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"-->
  32 + <!--data-action="{:url('AdminArticle/listOrder')}">{:lang('SORT')}-->
  33 + <!--</button>-->
  34 + <!--</notempty>-->
  35 + <!--<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"-->
  36 + <!--data-action="{:url('AdminArticle/publish',array('yes'=>1))}" data-subcheck="true">发布-->
  37 + <!--</button>-->
  38 + <!--<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"-->
  39 + <!--data-action="{:url('AdminArticle/publish',array('no'=>1))}" data-subcheck="true">取消发布-->
  40 + <!--</button>-->
  41 + <!--<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"-->
  42 + <!--data-action="{:url('AdminArticle/top',array('yes'=>1))}" data-subcheck="true">置顶-->
  43 + <!--</button>-->
  44 + <!--<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"-->
  45 + <!--data-action="{:url('AdminArticle/top',array('no'=>1))}" data-subcheck="true">取消置顶-->
  46 + <!--</button>-->
  47 + <!--<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"-->
  48 + <!--data-action="{:url('AdminArticle/recommend',array('yes'=>1))}" data-subcheck="true">推荐-->
  49 + <!--</button>-->
  50 + <!--<button class="btn btn-primary btn-sm js-ajax-submit" type="submit"-->
  51 + <!--data-action="{:url('AdminArticle/recommend',array('no'=>1))}" data-subcheck="true">取消推荐-->
  52 + <!--</button>-->
  53 + <!--
  54 + <notempty name="category">
  55 + <button class="btn btn-primary btn-sm js-articles-move" type="button">批量移动</button>
  56 + </notempty>
  57 + <button class="btn btn-primary btn-sm js-articles-copy" type="button">批量复制</button>
  58 + -->
  59 + <button class="btn btn-danger btn-sm js-ajax-submit" type="submit"
  60 + data-action="{:url('UserNeed/del')}" data-subcheck="true" data-msg="您确定删除吗?">
  61 + {:lang('DELETE')}
  62 + </button>
  63 + </div>
  64 + <table class="table table-hover table-bordered table-list">
  65 + <thead>
  66 + <tr>
  67 + <th width="15">
  68 + <label>
  69 + <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
  70 + </label>
  71 + </th>
  72 + <notempty name="category">
  73 + <th width="50">{:lang('SORT')}</th>
  74 + </notempty>
  75 + <th width="50">ID</th>
  76 + <th width="10%">标题</th>
  77 + <th>内容</th>
  78 + <th>排序</th>
  79 + <th width="130">更新时间</th>
  80 + <th width="130">发布时间</th>
  81 + <!--<th width="70">状态</th>-->
  82 + <th width="90">操作</th>
  83 + </tr>
  84 + </thead>
  85 + <foreach name="list" item="list">
  86 + <tr>
  87 + <td>
  88 + <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
  89 + value="{$list.id}" title="ID:{$list.id}">
  90 + </td>
  91 +
  92 + <td>{$list.id}</td>
  93 + <td>
  94 + {$list.title}
  95 + </td>
  96 + <td>
  97 + {$list.content}
  98 + </td>
  99 + <td>
  100 + {$list.score}
  101 + </td>
  102 + <td>
  103 + {:date('Y-m-d H:i',$list['update_time'])}
  104 + </td>
  105 + <td>
  106 + {:date('Y-m-d H:i',$list['create_time'])}
  107 + <!--<empty name="vo.published_time">-->
  108 + <!--未发布-->
  109 + <!--<else/>-->
  110 + <!--{:date('Y-m-d H:i',$list['published_time'])}-->
  111 + <!--</empty>-->
  112 +
  113 + </td>
  114 +
  115 + <td>
  116 + <a href="{:url('UserNeed/add',array('id'=>$list['id']))}">{:lang('EDIT')}</a>
  117 + <a href="{:url('UserNeed/del',array('id'=>$list['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>
  118 + </td>
  119 + </tr>
  120 + </foreach>
  121 +
  122 + </table>
  123 +
  124 + <ul class="pagination">{$page|default=''}</ul>
  125 + </form>
  126 +</div>
  127 +<script src="__STATIC__/js/admin.js"></script>
  128 +<script>
  129 +
  130 + function reloadPage(win) {
  131 + win.location.reload();
  132 + }
  133 +
  134 + $(function () {
  135 + setCookie("refersh_time", 0);
  136 + Wind.use('ajaxForm', 'artDialog', 'iframeTools', function () {
  137 + //批量复制
  138 + $('.js-articles-copy').click(function (e) {
  139 + var ids = [];
  140 + $("input[name='ids[]']").each(function () {
  141 + if ($(this).is(':checked')) {
  142 + ids.push($(this).val());
  143 + }
  144 + });
  145 +
  146 + if (ids.length == 0) {
  147 + art.dialog.through({
  148 + id: 'error',
  149 + icon: 'error',
  150 + content: '您没有勾选信息,无法进行操作!',
  151 + cancelVal: '关闭',
  152 + cancel: true
  153 + });
  154 + return false;
  155 + }
  156 +
  157 + ids = ids.join(',');
  158 + art.dialog.open("__ROOT__/index.php?g=portal&m=AdminArticle&a=copy&ids=" + ids, {
  159 + title: "批量复制",
  160 + width: "300px"
  161 + });
  162 + });
  163 + //批量移动
  164 + $('.js-articles-move').click(function (e) {
  165 + var ids = [];
  166 + $("input[name='ids[]']").each(function () {
  167 + if ($(this).is(':checked')) {
  168 + ids.push($(this).val());
  169 + }
  170 + });
  171 +
  172 + if (ids.length == 0) {
  173 + art.dialog.through({
  174 + id: 'error',
  175 + icon: 'error',
  176 + content: '您没有勾选信息,无法进行操作!',
  177 + cancelVal: '关闭',
  178 + cancel: true
  179 + });
  180 + return false;
  181 + }
  182 +
  183 + ids = ids.join(',');
  184 + art.dialog.open("__ROOT__/index.php?g=portal&m=AdminArticle&a=move&old_term_id={$term.term_id|default=0}&ids=" + ids, {
  185 + title: "批量移动",
  186 + width: "300px"
  187 + });
  188 + });
  189 + });
  190 + });
  191 +</script>
  192 +</body>
  193 +</html>
1 <include file="public@header"/> 1 <include file="public@header"/>
  2 +<link rel="stylesheet" href="__STATIC__/install/css/mdialog.css">
  3 +<style>
  4 + .popup{
  5 + width: 250px;
  6 + height: 100px;
  7 + background-color: rgba(0,0,0,0.5);
  8 + position: fixed;
  9 + top: 50%;
  10 + transform: translateY(-50px);
  11 + left: 0;
  12 + right: 0;
  13 + margin: 0 auto;
  14 + border-radius: 5px;
  15 + color: #ffffff;
  16 + }
  17 + .popup p{
  18 + text-align: center;
  19 + margin-top: 20px;
  20 + }
  21 + .popup span{
  22 + text-align: center;
  23 + line-height: 30px;
  24 + cursor: pointer;
  25 + }
  26 + .popup .queding{
  27 + display: inline-block;
  28 + width: 80px;
  29 + height: 30px;
  30 + background-color: #1E9FFF;
  31 + border-radius: 3px;
  32 + }
  33 + .popup span:hover{
  34 + opacity: 0.8;
  35 + }
  36 + .popup .quxiao{
  37 + display: inline-block;
  38 + width: 80px;
  39 + height: 30px;
  40 + ckground-color: #9cb945 ;
  41 + color: #333333;
  42 + border-radius: 3px;
  43 + background-color:#fff;
  44 + margin-left: 35px;
  45 + }
  46 + .btn_list{
  47 + margin: 0 auto;
  48 + width: 200px;
  49 + }
  50 +</style>
2 </head> 51 </head>
3 <body> 52 <body>
4 <div class="wrap js-check-wrap"> 53 <div class="wrap js-check-wrap">
@@ -18,9 +67,30 @@ @@ -18,9 +67,30 @@
18 <input type="text" class="form-control js-bootstrap-datetime" name="end_time" 67 <input type="text" class="form-control js-bootstrap-datetime" name="end_time"
19 value="{$end_time|default=''}" 68 value="{$end_time|default=''}"
20 style="width: 140px;" autocomplete="off"> &nbsp; &nbsp; 69 style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;
21 - 关键字:  
22 - <input type="text" class="form-control" name="keyword" style="width: 200px;"  
23 - value="{$keyword|default=''}" placeholder="请输入说明标题"> 70 + 用户名:
  71 + <input type="text" class="form-control" name="name" style="width: 200px;"
  72 + value="{$name|default=''}" placeholder="请输入用户名">
  73 + 手机号:
  74 + <input type="text" class="form-control" name="tel" style="width: 200px;"
  75 + value="{$tel|default=''}" placeholder="请输入手机号"> <br/>
  76 + 状态:
  77 + <select name="status" style="border: 1px solid #dce4ec; margin-top: 20px;">
  78 + <option name="status" value="0" <eq name="status" value="0">selected</eq>>&nbsp; &nbsp;---请选择---</option>
  79 + <option name="status" value="1" <eq name="status" value="1">selected</eq>>未交押金</option>
  80 + <option name="status" value="2" <eq name="status" value="2">selected</eq>>待发布</option>
  81 + <option name="status" value="3" <eq name="status" value="3">selected</eq>>待报价</option>
  82 + <option name="status" value="4" <eq name="status" value="4">selected</eq>>报价人数不足</option>
  83 + <option name="status" value="5" <eq name="status" value="5">selected</eq>>待选择中介</option>
  84 + <option name="status" value="6" <eq name="status" value="6">selected</eq>>未选择中介</option>
  85 + <option name="status" value="7" <eq name="status" value="7">selected</eq>>待中介确认</option>
  86 + <option name="status" value="10" <eq name="status" value="10">selected</eq>>待评价</option>
  87 + <option name="status" value="11" <eq name="status" value="11">selected</eq>>已评价</option>
  88 + <option name="status" value="12" <eq name="status" value="12">selected</eq>>投诉申请中</option>
  89 + <option name="status" value="13" <eq name="status" value="13">selected</eq>>同意投诉申请</option>
  90 + <option name="status" value="14" <eq name="status" value="14">selected</eq>>拒绝投诉申请</option>
  91 +
  92 + </select>
  93 + &nbsp;&nbsp;&nbsp;&nbsp;
24 <input type="submit" class="btn btn-primary" value="搜索"/> 94 <input type="submit" class="btn btn-primary" value="搜索"/>
25 <a class="btn btn-danger" href="{:url('Need/index')}">清空</a> 95 <a class="btn btn-danger" href="{:url('Need/index')}">清空</a>
26 </form> 96 </form>
@@ -83,93 +153,74 @@ @@ -83,93 +153,74 @@
83 <eq name="list.status" value="7">待中介确认</eq> 153 <eq name="list.status" value="7">待中介确认</eq>
84 <eq name="list.status" value="10">待评价</eq> 154 <eq name="list.status" value="10">待评价</eq>
85 <eq name="list.status" value="11">已评价</eq> 155 <eq name="list.status" value="11">已评价</eq>
  156 + <eq name="list.status" value="12">投诉申请中</eq>
  157 + <eq name="list.status" value="13">同意投诉申请</eq>
  158 + <eq name="list.status" value="14">拒绝投诉申请</eq>
86 </td> 159 </td>
87 <td> 160 <td>
88 {:date('Y-m-d H:i',$list['create_time'])} 161 {:date('Y-m-d H:i',$list['create_time'])}
89 - <!--<empty name="vo.published_time">-->  
90 - <!--未发布-->  
91 - <!--<else/>-->  
92 - <!--{:date('Y-m-d H:i',$list['published_time'])}-->  
93 - <!--</empty>-->  
94 -  
95 </td> 162 </td>
96 -  
97 <td> 163 <td>
98 <a href="{:url('Need/detail',array('id'=>$list['id']))}">查看详情</a> 164 <a href="{:url('Need/detail',array('id'=>$list['id']))}">查看详情</a>
99 <a href="{:url('Need/del',array('id'=>$list['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a> 165 <a href="{:url('Need/del',array('id'=>$list['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>
100 - </td> 166 + </td>
  167 + <td>
  168 + <switch name="list.status" >
  169 + <case value="7|12|13|14">
  170 + <span id="level" index="{$list.id}" style="color: red;cursor: pointer; ">返回上一级状态</span>
  171 + </case>
  172 + <case value="1|2|3|4|5|6|8|10|11">
  173 + <span style="color:#aaaaaa; cursor: pointer; ">当前状态不可修改</span>
  174 + </case>
  175 +
  176 + </switch>
  177 + </td>
101 </tr> 178 </tr>
102 </foreach> 179 </foreach>
103 180
104 </table> 181 </table>
105 -  
106 <ul class="pagination">{$page|default=''}</ul> 182 <ul class="pagination">{$page|default=''}</ul>
107 </form> 183 </form>
  184 + <div class="popup" style="display: none; z-index:100;">
  185 + <p>确认返回上一级</p>
  186 + <div class="btn_list">
  187 + <span class="queding">确认</span>
  188 + <span class="quxiao">取消</span>
  189 + </div>
  190 + </div>
108 </div> 191 </div>
109 <script src="__STATIC__/js/admin.js"></script> 192 <script src="__STATIC__/js/admin.js"></script>
  193 +<script src="__STATIC__/js/layer/layer.js"></script>
  194 +<script type="text/javascript" src="__STATIC__/js/zepto.min.js"></script>
  195 +<script type="text/javascript" src="__STATIC__/js/mdialog.js"></script>
110 <script> 196 <script>
  197 + // 删除
  198 + $('#level').click(function () {
  199 + var id = $(this).attr('index');
  200 + $('.popup').css('display','block');
  201 + $('.queding').click(function () {
  202 + $.ajax({
  203 + type:"POST",
  204 + url:"{:url('Need/level')}",
  205 + data:{
  206 + "need_id":id,
  207 + },
  208 + success:function (data) {
  209 + new TipBox({type:'success',str:'操作成功',hasBtn:true});
  210 + $('.popup').css('display','none');
  211 + },
  212 + error:function () {
  213 + new TipBox({type:'error',str:'对不起,出错了!',hasBtn:true});
  214 + $('.popup').css('display','none');
  215 + }
  216 + })
  217 + })
  218 + })
  219 + $('.quxiao').click(function () {
  220 + $('.popup').css('display','none');
  221 + })
111 222
112 - function reloadPage(win) {  
113 - win.location.reload();  
114 - }  
115 -  
116 - $(function () {  
117 - setCookie("refersh_time", 0);  
118 - Wind.use('ajaxForm', 'artDialog', 'iframeTools', function () {  
119 - //批量复制  
120 - $('.js-articles-copy').click(function (e) {  
121 - var ids = [];  
122 - $("input[name='ids[]']").each(function () {  
123 - if ($(this).is(':checked')) {  
124 - ids.push($(this).val());  
125 - }  
126 - });  
127 -  
128 - if (ids.length == 0) {  
129 - art.dialog.through({  
130 - id: 'error',  
131 - icon: 'error',  
132 - content: '您没有勾选信息,无法进行操作!',  
133 - cancelVal: '关闭',  
134 - cancel: true  
135 - });  
136 - return false;  
137 - }  
138 -  
139 - ids = ids.join(',');  
140 - art.dialog.open("__ROOT__/index.php?g=portal&m=AdminArticle&a=copy&ids=" + ids, {  
141 - title: "批量复制",  
142 - width: "300px"  
143 - });  
144 - });  
145 - //批量移动  
146 - $('.js-articles-move').click(function (e) {  
147 - var ids = [];  
148 - $("input[name='ids[]']").each(function () {  
149 - if ($(this).is(':checked')) {  
150 - ids.push($(this).val());  
151 - }  
152 - });  
153 -  
154 - if (ids.length == 0) {  
155 - art.dialog.through({  
156 - id: 'error',  
157 - icon: 'error',  
158 - content: '您没有勾选信息,无法进行操作!',  
159 - cancelVal: '关闭',  
160 - cancel: true  
161 - });  
162 - return false;  
163 - }  
164 223
165 - ids = ids.join(',');  
166 - art.dialog.open("__ROOT__/index.php?g=portal&m=AdminArticle&a=move&old_term_id={$term.term_id|default=0}&ids=" + ids, {  
167 - title: "批量移动",  
168 - width: "300px"  
169 - });  
170 - });  
171 - });  
172 - });  
173 </script> 224 </script>
174 </body> 225 </body>
175 </html> 226 </html>
@@ -6,170 +6,141 @@ @@ -6,170 +6,141 @@
6 /* css 代码 */ 6 /* css 代码 */
7 </style> 7 </style>
8 <script src="https://img.hcharts.cn/highcharts/highcharts.js"></script> 8 <script src="https://img.hcharts.cn/highcharts/highcharts.js"></script>
9 -<script src="https://img.hcharts.cn/highcharts/modules/exporting.js"></script>  
10 -<script src="https://img.hcharts.cn/highcharts-plugins/highcharts-zh_CN.js"></script> 9 +<!--<script src="https://img.hcharts.cn/highcharts/modules/exporting.js"></script>-->
  10 +<script src="__STATIC__/js/highcharts.js"></script>
11 </head> 11 </head>
12 <body> 12 <body>
13 -<div class="wrap js-check-wrap">  
14 - <form class="well form-inline margin-top-20" method="post" action="{:url('New/index')}">  
15 - <!--分类:-->  
16 - <!--<select class="form-control" name="category" style="width: 140px;">-->  
17 - <!--<option value='0'>全部</option>-->  
18 - <!--{$category_tree|default=''}-->  
19 - <!--</select> &nbsp;&nbsp;--> 13 +<div class="wrap js-check-wrap" style="padding: 20px 20px 0px;">
  14 + <div class="well form-inline margin-top-20" >
20 时间: 15 时间:
21 - <input type="text" class="form-control js-bootstrap-datetime" name="start_time" 16 + <input type="text" class="form-control js-bootstrap-datetime start_time" name="start_time"
22 value="{$start_time|default=''}" 17 value="{$start_time|default=''}"
23 style="width: 140px;" autocomplete="off">- 18 style="width: 140px;" autocomplete="off">-
24 - <input type="text" class="form-control js-bootstrap-datetime" name="end_time" 19 + <input type="text" class="form-control js-bootstrap-datetime end_time" name="end_time"
25 value="{$end_time|default=''}" 20 value="{$end_time|default=''}"
26 - style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;  
27 - 关键字:  
28 - <input type="text" class="form-control" name="keyword" style="width: 200px;"  
29 - value="{$keyword|default=''}" placeholder="请输入用户名">  
30 - <input type="submit" class="btn btn-primary" value="搜索"/>  
31 - <a class="btn btn-danger" href="{:url('New/index')}">清空</a>  
32 - </form> 21 + style="width: 140px;" autocomplete="off">
  22 + <input type="submit" class="btn btn-primary" value="搜索" onclick="getData()"/>
  23 + <a class="btn btn-danger" href="{:url('Statistics/index')}">清空</a>
  24 + </div>
  25 +</div>
  26 +<div id="container" style="min-width:400px;height:400px">
33 27
34 </div> 28 </div>
35 -<div id="container" style="min-width:400px;height:400px"></div>  
36 -<div id="container1" style="min-width:400px;height:400px"></div> 29 +<!--<div id="container1" style="min-width:400px;height:400px"></div>-->
37 <script src="__STATIC__/js/admin.js"></script> 30 <script src="__STATIC__/js/admin.js"></script>
38 <script> 31 <script>
39 - var chart = Highcharts.chart('container', {  
40 - title: {  
41 - text: '混合图表'  
42 - },  
43 - xAxis: {  
44 - categories: ['苹果', ' 橙', '梨', '香蕉', '李子']  
45 - },  
46 - plotOptions: {  
47 - series: {  
48 - stacking: 'normal'  
49 - }  
50 - },  
51 - labels: {  
52 - items: [{  
53 - html: '水果消耗',  
54 - style: {  
55 - left: '100px',  
56 - top: '18px',  
57 - color: (Highcharts.theme && Highcharts.theme.textColor) || 'black'  
58 - }  
59 - }]  
60 - },  
61 - series: [{  
62 - type: 'column',  
63 - name: '小张',  
64 - data: [3, 2, 1, 3, 4]  
65 - }, {  
66 - type: 'column',  
67 - name: '小潘',  
68 - data: [2, 3, 5, 7, 6]  
69 - }, {  
70 - type: 'column',  
71 - name: '小王',  
72 - data: [4, 3, 3, 9, 0]  
73 - }, {  
74 - type: 'spline',  
75 - name: '平均值',  
76 - data: [3, 2.67, 3, 6.33, 3.33],  
77 - marker: {  
78 - lineWidth: 2,  
79 - lineColor: Highcharts.getOptions().colors[3],  
80 - fillColor: 'white'  
81 - }  
82 - }, {  
83 - type: 'pie',  
84 - name: '总的消耗',  
85 - data: [{  
86 - name: '小张',  
87 - y: 13,  
88 - color: Highcharts.getOptions().colors[0] // Jane's color  
89 - }, {  
90 - name: '小潘',  
91 - y: 23,  
92 - color: Highcharts.getOptions().colors[1] // John's color  
93 - }, {  
94 - name: '小王',  
95 - y: 19,  
96 - color: Highcharts.getOptions().colors[2] // Joe's color  
97 - }],  
98 - center: [100, 80],  
99 - size: 100,  
100 - showInLegend: false,  
101 - dataLabels: {  
102 - enabled: false  
103 - }  
104 - }]  
105 - });  
106 - var chart = Highcharts.chart('container1', {  
107 - title: {  
108 - text: '混合图表'  
109 - },  
110 - xAxis: {  
111 - categories: ['苹果', ' 橙', '梨', '香蕉', '李子']  
112 - },  
113 - plotOptions: {  
114 - series: {  
115 - stacking: 'normal'  
116 - }  
117 - },  
118 - labels: {  
119 - items: [{  
120 - html: '水果消耗',  
121 - style: {  
122 - left: '100px',  
123 - top: '18px',  
124 - color: (Highcharts.theme && Highcharts.theme.textColor) || 'black' 32 + function all() {
  33 + var timeList=[];
  34 + var _user=[] ;
  35 + var _member=[] ;
  36 + var chart ;
  37 + var pie_user ;
  38 + var pie_member ;
  39 + var start_time = $('.start_time').val();
  40 + var end_time = $('.end_time').val();
  41 + function GetDateStr(AddDayCount) {
  42 + var dd = new Date();
  43 + dd.setDate(dd.getDate()+AddDayCount);//获取AddDayCount天后的日期
  44 + var y = dd.getFullYear();
  45 + var m = dd.getMonth()+1;//获取当前月份的日期
  46 + var d = dd.getDate();
  47 + return y+"-"+m+"-"+d;
  48 + }
  49 + for(var i=-4;i<1;i++){
  50 + timeList.push(GetDateStr(i))
  51 + }
  52 + getData();
  53 + function getData(){
  54 + $.ajax({
  55 + type:"POST",
  56 + url:"{:url('portal/Statistics/find')}",
  57 + data:{
  58 + "time":timeList,
  59 + "start_time":start_time,
  60 + "end_time":end_time,
  61 + },
  62 + success:function (data) {
  63 + console.log(data)
  64 + _user = Object.assign([],data.data.user);
  65 + _member = Object.assign([],data.data.member);
  66 + pie_user = data.data.pie_user;
  67 + pie_member = data.data.pie_member;
  68 + // 图表
  69 + chart = Highcharts.chart('container', {
  70 + title: {
  71 + text: '注册统计图表'
  72 + },
  73 + xAxis: {
  74 + categories: timeList,
  75 + crosshair: true
  76 + },
  77 + plotOptions: {
  78 + column: {
  79 + pointPadding: 0,
  80 + borderWidth: 0
  81 + }
  82 + },
  83 + labels: {
  84 + items: [{
  85 + html: '即时数据/筛选结果',
  86 + style: {
  87 + left: '100px',
  88 + top: '18px',
  89 + color: (Highcharts.theme && Highcharts.theme.textColor) || 'black'
  90 + }
  91 + }]
  92 + },
  93 + tooltip :{
  94 + headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
  95 + pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
  96 + '<td style="padding:0"><b>{point.y:.0f} 人</b></td></tr>',
  97 + footerFormat: '</table>',
  98 + shared: true,
  99 + useHTML: true
  100 + },
  101 + series: [{
  102 + type: 'column',
  103 + name: '用户',
  104 + data: _user
  105 + }, {
  106 + type: 'column',
  107 + name: '中介',
  108 + data: _member
  109 + }, {
  110 + type: 'pie',
  111 + name: '注册人数',
  112 + data: [{
  113 + name: '中介',
  114 + y: pie_member,
  115 + color: Highcharts.getOptions().colors[1] // Jane's color
  116 + }, {
  117 + name: '用户',
  118 + y: pie_user,
  119 + color: Highcharts.getOptions().colors[0] // John's color
  120 + }],
  121 + center: [100, 80],
  122 + size: 100,
  123 + showInLegend: false,
  124 + dataLabels: {
  125 + enabled: false
  126 + }
  127 + }]
  128 + });
  129 + },
  130 + error:function () {
  131 + alert("网络错误");
125 } 132 }
126 - }]  
127 - },  
128 - series: [{  
129 - type: 'column',  
130 - name: '小张',  
131 - data: [3, 2, 1, 3, 4]  
132 - }, {  
133 - type: 'column',  
134 - name: '小潘',  
135 - data: [2, 3, 5, 7, 6]  
136 - }, {  
137 - type: 'column',  
138 - name: '小王',  
139 - data: [4, 3, 3, 9, 0]  
140 - }, {  
141 - type: 'spline',  
142 - name: '平均值',  
143 - data: [3, 2.67, 3, 6.33, 3.33],  
144 - marker: {  
145 - lineWidth: 2,  
146 - lineColor: Highcharts.getOptions().colors[3],  
147 - fillColor: 'white'  
148 - }  
149 - }, {  
150 - type: 'pie',  
151 - name: '总的消耗',  
152 - data: [{  
153 - name: '小张',  
154 - y: 13,  
155 - color: Highcharts.getOptions().colors[0] // Jane's color  
156 - }, {  
157 - name: '小潘',  
158 - y: 23,  
159 - color: Highcharts.getOptions().colors[1] // John's color  
160 - }, {  
161 - name: '小王',  
162 - y: 19,  
163 - color: Highcharts.getOptions().colors[2] // Joe's color  
164 - }],  
165 - center: [100, 80],  
166 - size: 100,  
167 - showInLegend: false,  
168 - dataLabels: {  
169 - enabled: false  
170 - }  
171 - }]  
172 - }); 133 + })
  134 + }
  135 + }
  136 + // 请求获取数据
  137 +
  138 +
  139 +
  140 + all();
  141 + $('.btn').click(function () {
  142 + all();
  143 + })
173 </script> 144 </script>
174 </body> 145 </body>
175 </html> 146 </html>