作者 郭鑫

11111

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