Commit 9214f1ae authored by zw's avatar zw

Merge branch 'test'

# Conflicts: # application/database.php
parents 4857bdfd 051def70
......@@ -3,6 +3,8 @@
namespace app\api\controller;
use app\api_broker\service\PushMessageService;
use app\index\service\UserService;
use app\model\AAgents;
use think\Request;
use app\api\extend\Basic;
use app\api\untils\MessageUntils;
......@@ -416,6 +418,7 @@ class Member extends Basic
$data["user_phone"] = $result[0]["user_phone"];
$data["user_pic"] = !empty($result[0]["user_pic"]) ? HEADERIMGURL . $result[0]["user_pic"] : $result[0]["other_pic"];
$data["AuthToken"] = $AuthToken;
}else{
return $this->response("101", "数据查询失败");
}
......@@ -501,4 +504,102 @@ class Member extends Basic
return $this->response($data['status'], $data['msg'], $data['data']);
}
/**
* 查询客户邀请人
* @param $referrer_id
* @param $referrer_source
* @return string
*/
public function userDetailUserInvite($referrer_id,$referrer_source)
{
if($referrer_id == 0){
return '';
}
if ($referrer_source == 10) {
$m_user = new Users();
$referrer_res = $m_user->verifyUser('id,user_name,user_phone', '', [ 'id' => $referrer_id ]);
//$user_phone = empty($referrer_res['user_phone']) ? '' : substr_replace($referrer_res['user_phone'], '****', 3, 4);
$referrer_user_string['phone'] = $referrer_res['user_phone'];
$referrer_user_string['name'] = $referrer_res['user_name'];
$referrer_user_string['id'] = $referrer_res['id'];
} else {
$m_agent = new AAgents();
$referrer_res = $m_agent->verifyUser('id,name,phone', '', [ 'id' => $referrer_id ]);
$referrer_user_string['phone'] = $referrer_res['phone'];
$referrer_user_string['name'] = $referrer_res['name'];
$referrer_user_string['id'] = $referrer_res['id'];
}
return $referrer_user_string;
}
/**
* 设置客户邀请人
* @return \think\Response
*/
public function myInvite() {
$params = $this->params;
/*
user_id:244
phone:15625362536
AuthToken:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7ImlkIjoxODEsInVzZXJOaWNrIjoiXHU5MGZkXHU1Zjg4XHU1OTdkIiwicGhvbmUiOiIxNTIzMjE0NTIxNCJ9LCJ0aW1lU3RhbXBfIjoxNTQ1OTY4MzE4fQ.hyLOQs-zfu37hqiVGo6Fx4Elorp68tQQj3CKkUb6yjM
*/
if (empty($params['user_id'])) {
return $this->response(101, '参数缺失', '');
}
$fields = "a.id,a.referrer_id,a.referrer_source";
$result = $this->user->getUserInfoById($params, $fields);
$data = [];
if(count($result) > 0){
$data["referrer_source"] = $result[0]["referrer_source"];
$invite = $this->userDetailUserInvite($result[0]["referrer_id"],$result[0]["referrer_source"]);
$data["invite"] = $invite ? $invite['name'].'-'.$invite['phone'] : '';
}else{
return $this->response("101", "数据查询失败");
}
return $this->response("200","请求成功",$data);
}
/**
* 设置客户邀请人
* @return \think\Response
*/
public function setUserInvite() {
$params = $this->params;
/*
user_id:244
phone:15625362536
AuthToken:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7ImlkIjoxODEsInVzZXJOaWNrIjoiXHU5MGZkXHU1Zjg4XHU1OTdkIiwicGhvbmUiOiIxNTIzMjE0NTIxNCJ9LCJ0aW1lU3RhbXBfIjoxNTQ1OTY4MzE4fQ.hyLOQs-zfu37hqiVGo6Fx4Elorp68tQQj3CKkUb6yjM
*/
if (empty($params['user_id']) or empty($params['phone'])) {
return $this->response(101, '参数缺失', '');
}
$s_index_user = new UserService();
$result = $s_index_user->userInvite($params['user_id'],$params['phone']);
switch ($result) {
case 0 :
return $this->response("300", "绑定失败");
break;
case 1 :
return $this->response("200","请求成功");
break;
case 2 :
return $this->response("300","不能绑定自己");
break;
case 4 :
return $this->response("300", "不存在该邀请人!");
break;
default :
return $this->response("300", "绑定失败");
}
}
}
\ No newline at end of file
<?php
namespace app\api_broker\controller;
use app\api_broker\extend\Basic;
use app\api_broker\service\DailyPaperService;
use think\Request;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/12/17
* Time : 11:09 AM
* Intro:
*/
class DailyPaper extends Basic
{
private $service_;
public function __construct(Request $request = null)
{
parent::__construct($request);
$this->service_ = new DailyPaperService();
}
/**
* 财务日报
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function dailyDetail()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/* $params = array(
"store_id" => 730,//门店id
"is_store" => 0,//身份是否是店长,财务显示不一样 0店长 1财务
"daily_data" => "2018-12-18"
);
$this->userId = 5775;*/
if (!isset($params["store_id"]) || !isset($params["is_store"]) || !isset($params["daily_data"])) {
return $this->response("101", "请求参数错误");
}
$store_id = $params["store_id"];
$is_store = $params["is_store"];
$daily_data = $params["daily_data"];
$result = $this->service_->getDaily($this->agentId, $store_id, $is_store, $daily_data);
if ($result["code"] == 101) {
return $this->response("101", $result["msg"]);
} else {
return $this->response("200", "success", $result["data"]);
}
}
/**
* 店长提交财务日报
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function addDaily()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/* $params = array(
"agent_id" => 5775,//经纪人id
"agent_name" => "222",//经纪人姓名
"daily_date" => "2018-12-02",//日报日期
"alipay" => "12",//支付宝收款
"tenpay" => "2323",//微信收款
"realty_pay" => "232",//地产转帐
"family_pay" => "444",//世家公账
"private_bank" => "55",//3000账号
"cash" => "666",//现金
"pos" => "777",//pos机
"other_bank" => "888"//其他
);*/
if (empty($params["agent_id"]) || empty($params["agent_name"]) || empty($params["daily_date"]) ||
!isset($params["alipay"]) || !isset($params["tenpay"]) || !isset($params["realty_pay"]) ||
!isset($params["family_pay"]) || !isset($params["private_bank"]) || !isset($params["cash"]) ||
!isset($params["pos"]) || !isset($params["other_bank"])
) {
return $this->response("101", "请求参数错误");
}
$agent_id = $params["agent_id"];
$agent_name = $params["agent_name"];
$daily_date = $params["daily_date"];
$alipay = $params["alipay"];
$tenpay = $params["tenpay"];
$realty_pay = $params["realty_pay"];
$private_bank = $params["private_bank"];
$family_pay = $params["family_pay"];
$cash = $params["cash"];
$pos = $params["pos"];
$other_bank = $params["other_bank"];
$result = $this->service_->addDaily($agent_id, $agent_name, $daily_date, $alipay, $tenpay, $realty_pay,
$family_pay,$private_bank ,$cash, $pos, $other_bank);
if ($result["code"] == 101) {
return $this->response("101", $result["msg"]);
} else {
return $this->response("200", "success", $result["data"]);
}
}
/**
* 财务审核新增
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function commitCheck(){
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/*$params = array(
"daily_id" => 1,//日报id
"agent_id" => 5775,//经纪人id
"agent_name" => "222",//经纪人姓名
"alipay" => "12",//支付宝收款
"tenpay" => "2323",//微信收款
"realty_pay" => "232",//地产转帐
"family_pay" => "444",//世家公账
"private_bank" => "55",//3000账号
"cash" => "666",//现金
"pos" => "777",//pos机
"other_bank" => "888",//其他,
"operation_status" => 1,//0审核通过 1转为已审核
"remark" => "888"//备注,
);*/
if (!isset($params["daily_id"]) || empty($params["agent_id"]) || empty($params["agent_name"]) ||
!isset($params["alipay"]) || !isset($params["tenpay"]) || !isset($params["realty_pay"]) ||
!isset($params["family_pay"]) || !isset($params["private_bank"]) || !isset($params["cash"]) ||
!isset($params["pos"]) || !isset($params["other_bank"]) || !isset($params["operation_status"])
) {
return $this->response("101", "请求参数错误");
}
$daily_id = $params["daily_id"];
$agent_id = $params["agent_id"];
$agent_name = $params["agent_name"];
$alipay = $params["alipay"];
$tenpay = $params["tenpay"];
$realty_pay = $params["realty_pay"];
$private_bank = $params["private_bank"];
$family_pay = $params["family_pay"];
$cash = $params["cash"];
$pos = $params["pos"];
$other_bank = $params["other_bank"];
$remark = $params["remark"];
$operation_status = $params["operation_status"];
if($operation_status != 0 && $operation_status != 1){
return $this->response("101", "审核状态错误");
}
$result = $this->service_->addDailyCheck($daily_id,$agent_id, $agent_name, $alipay, $tenpay, $realty_pay,
$family_pay,$private_bank ,$cash, $pos, $other_bank,$remark,$operation_status);
if ($result["code"] == 101) {
return $this->response("101", $result["msg"]);
} else {
return $this->response("200", "success", $result["data"]);
}
}
/**
* @return \think\Response
*/
public function getPayLogImg(){
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/* $params = array(
"pay_log_id" => 1
);*/
if(!isset($params["pay_log_id"])){
return $this->response("101", "请求参数错误");
}
$img_list = $this->service_->getImgs($params["pay_log_id"]);
if(count($img_list) > 0){
$result["img_path"] = CHAT_IMG_URL;
$result["img_info"] = $img_list;
return $this->response("200","success",$result);
}else{
return $this->response("200","request null");
}
}
}
\ No newline at end of file
......@@ -179,8 +179,9 @@ class OrderLog extends Basic
Log::record("********************transfer_img**". json_encode($transfer_img));
$source = isset($params["source"]) ? $params["source"] : 0;
$income_time = isset($params["income_time"]) ? $params["income_time"] : "";
$is_ok = $this->service_->addCollectingBillV2($params["agent_id"], $params["agent_name"], $params["report_id"], $params["order_id"], $params["order_no"],
$params["collecting_bill"], $params["house_number"], $params["industry_type"], $remark, $transfer_img, $source,$income_time);
$received_money = isset($params["received_money"]) ? $params["received_money"] : "";
$type_ext = isset($params["type_ext"]) ? $params["type_ext"] : "";
$is_ok = $this->service_->addCollectingBillV2($params["agent_id"], $params["agent_name"], $params["report_id"], $params["order_id"], $params["order_no"],$params["collecting_bill"], $params["house_number"], $params["industry_type"], $remark, $transfer_img, $source,$income_time, $received_money, $type_ext);
if ($is_ok > 0) {
return $this->response("200", "request success", [ "bill_id" => $is_ok ]);
......@@ -235,18 +236,21 @@ class OrderLog extends Basic
$remark = isset($params["remark"]) ? $params["remark"] : "";
$transfer_img = isset($params["transfer_img"]) ? json_decode($params["transfer_img"] ,true): "";
$income_time = isset($params["income_time"]) ? $params["income_time"] : "";
$last_transfer_time = isset($params["last_transfer_time"]) ? $params["last_transfer_time"] : "";
$pay_id = isset($params["pay_id"]) ? $params["pay_id"] : 0;
$source = $params["source"] ? $params["source"] : 0;
$receipt_number = isset($params["receipt_number"]) ? $params["receipt_number"] : "";
$transfer_name = isset($params["transfer_name"]) ? $params["transfer_name"] : "";
$received_money = isset($params["received_money"]) ? $params["received_money"] : 0;
$type_ext = isset($params["type_ext"]) ? $params["type_ext"] : 0;
if($pay_id > 0){
$source = 2;
}
$is_ok = $this->service_->addCollectingBill($params["agent_id"], $params["agent_name"], $params["report_id"],
$params["order_id"], $params["order_no"], $params["collecting_bill"], $params["house_number"], $params["industry_type"],
$remark, $transfer_img, $source,$income_time,$params["is_dividend"],$params["last_transfer_time"],$pay_id,
$receipt_number,$transfer_name);
$remark, $transfer_img, $source,$income_time,$params["is_dividend"],$last_transfer_time,$pay_id,
$receipt_number,$transfer_name, $received_money, $type_ext);
if ($is_ok > 0) {
return $this->response("200", "request success", [ "bill_id" => $is_ok ]);
......
......@@ -1027,24 +1027,32 @@ class Shop extends Basic
/**
* 商铺列表添加和编辑独家
*
* @return \think\Response
*/
public function editExclusive()
{
// $res = $this->gHousesModel->exclusive($this->params, $this->params['houses_id'], $this->agentId, $this->siteId);
if (empty($this->params['id'])) {
return $this->response(101, '参数错误');
}
$code = 200;
$msg = "";
$house = new HouseService();
if ($this->params['is_exclusive_type'] == 1) {
$house = new HouseService();
if (empty($this->params['exclusive_ids'])) {
return $this->response(101, '参数错误');
}
$result = $house->addHouse($this->params, $this->agentId, 1, 0, 'exclusive');
if ($result['status'] == 'fail') {
$code = 101;
$msg = $result['msg'];
}
} else {
$this->gHousesModel->editData(['is_exclusive_type'=>0], $this->params['id']);
$result = $house->delAgentHouse(3, $this->params['id']);
if (!$result) {
$code = 101;
$msg = '解除独家关系失败';
}
}
return $this->response($code, $msg);
......
......@@ -955,4 +955,6 @@ class User extends Basic
}
}
}
\ No newline at end of file
......@@ -117,4 +117,7 @@ class BrokerService
}
}
\ No newline at end of file
......@@ -14,10 +14,12 @@ use app\api_broker\untils\RongDemo;
use app\extra\RedisExt;
use app\model\AliYunPhone;
use app\model\BindingPhone;
use app\model\AliYunSecretReport;
use app\model\SecretReport;
use app\model\UPhoneFollowUp;
use app\model\UPhoneFollowUpTemporary;
use app\model\Users;
use app\model\AAgents;
use think\Log;
class CallPhoneService
......@@ -408,18 +410,28 @@ class CallPhoneService
$where['a.status'] = 1;
$where['a.phone_a'] = $this->phone_a;
$where['a.type'] = $this->is_privacy;
$agent_call = $this->m_bind->getPhoneX('a.id,a.phone_a,a.phone_b,b.phone_x', $where, 'a.id ASC');
$result_unbind = $this->agentsUnBindRedis($agent_call['phone_a'], $agent_call['phone_b'], $agent_call['phone_x']);
$agent_call = $this->m_bind->getBindingPhoneListLimit(1, 100,'a.id,a.phone_a,a.phone_b,b.phone_x', $where);
$data['msg'] = '号码使用完,请联系运营人员。';
if ($result_unbind['status'] == 'successful') {
$result = PlsDemo::bindAxb($this->phone_a, $this->phone_b, $this->expiry_date, $this->record, '', $this->city);
$data['status'] = 'success';
$data['msg'] = '绑定成功。';
$data['phone'] = $result->SecretBindDTO->SecretNo;
$this->subs_id = $result->SecretBindDTO->SubsId;
$this->request_id = $result->RequestId;
$this->m_bind->unBindTable($agent_call['id']);
$is_bind = 0;
//处理经纪人全部点有意向,占用完号码的情况,释放100组号码
foreach ($agent_call['data'] as $k=>$v) {
$result_unbind = $this->agentsUnBindRedis($v['phone_a'], $v['phone_b'], $v['phone_x']); //释放成功一次
if ($result_unbind['status'] == 'successful') {
$is_bind = 1;
$this->m_bind->unBindTable($v['id']);
}
}
if ($is_bind) {
$result = PlsDemo::bindAxb($this->phone_a, $this->phone_b, $this->expiry_date, $this->record, '', $this->city);
if ($result->Code == 'OK') {
$data['status'] = 'success';
$data['msg'] = '绑定成功。';
$data['phone'] = $result->SecretBindDTO->SecretNo;
$this->subs_id = $result->SecretBindDTO->SubsId;
$this->request_id = $result->RequestId;
}
}
} else {
$data['msg'] = '拨号失败,15秒再试,再无法拨号请联系请联系运营人员!';
......@@ -545,41 +557,50 @@ class CallPhoneService
*/
public function defaultFollowUp()
{
/*$current_time = time();
$time = $current_time - 3600;
// $start_date = date('Y-m-d', $time);
$end_date = date('Y-m-d');
$user_key = 'call_phone_user_' . $end_date;
$user_data = $this->redis->hKeys($user_key);
$content = '拨打电话,未打跟进。';
$follow_where['create_time'] = ['between', [date('Y-m-d H:i:s', $time), date('Y-m-d H:i:s')]];
$secret_model = new AliYunSecretReport();
$agent_model = new AAgents();
$current_time = time();
$end_time = $current_time - 3600;
$start_time = $end_time - 3600;
$save_follow['content'] = '拨打电话,未打跟进。';
$follow_where['create_time'] = $bind_where['create_time'] = [
'between', [date('Y-m-d H:i:s', $start_time), date('Y-m-d H:i:s',$end_time)]
];
$bind_where['time'] = ['>', 0];
$num = $secret_model->getTotal($bind_where);
//用户
if (!empty($user_data)) {
if ($num > 0) {
for ($i=1; $i <= $num; $i++) {
$secret_data = $secret_model->getList($i, 500, '', 'agents_id,users_id,create_time', $bind_where);
foreach ($secret_data as $key => $value) {
if (empty($value['agents_id']) || empty($value['users_id'])) {
continue;
}
foreach ($user_data as $k => $v) {
$call_time = $this->redis->hGet($user_key, $v);
$site_id = $agent_model->getAgentsById($value['agents_id'], 'site_id');
if (empty($site_id)) {
continue;
}
if ($current_time - $call_time > 3600) {
$array = explode('-', $v);
$follow_where['agent_id'] = $array[0];
$follow_where['user_id'] = $array[1];
if(empty($array[2])){
$this->redis->hDel($user_key, $v);
} else {
$m_follow_up = new UPhoneFollowUpTemporary($array[2]);
$num = $m_follow_up->getFollowTotal($follow_where);
if (empty($num) && !empty($array[1])) {
//$agent_id, $user_id, $content, $type
$m_follow_up->insertDefaultFollow($array[0], $array[1], $content, 0);
$this->redis->hDel($user_key, $v);
}
$follow_model = new UPhoneFollowUpTemporary($site_id);
$follow_where['user_id'] = $value['users_id'];
$follow_where['agent_id'] = $value['agents_id'];
$count = $follow_model->getFollowTotal($follow_where);
if (empty($count)) {
$save_follow['user_id'] = $value['users_id'];
$save_follow['agent_id'] = $value['agents_id'];
$save_follow['user_status'] = -1;
$save_follow['type'] = 0;
$save_follow['labels_id'] = 0;
$save_follow['create_time'] = $value['create_time'];
$follow_model->savePhoneFollow($save_follow);
}
}
}
}
return;*/
return;
}
/**
......@@ -624,6 +645,9 @@ class CallPhoneService
case '杭州' :
$code = '0571';
break;
case '深圳' :
$code = '0755';
break;
default :
$code = '021';
}
......
......@@ -235,7 +235,7 @@ class DailyPaperService
$payLogModel = new OPayLogModel();
//中介费入账
$field = "a.id,c.id as bargain_id,b.house_id,c.price,a.money,a.pay_type,a.transfer_name,
d.report_agent_id as agent_id,c.is_open,a.is_dividend,a.receipt_number,a.create_time,a.remark";
d.report_agent_id as agent_id,c.is_open,a.is_dividend,a.receipt_number,a.create_time,a.remark,a.received_money";
$params["a.agent_id"] = array("in", ($ids));
$params["a.create_time"] = array("between", array($daily_data, $daily_data . " 23:59:59"));
$params["a.is_del"] = 0;
......@@ -270,6 +270,7 @@ class DailyPaperService
$field_adjustment = "b.id,c.house_id,b.new_paylog_id as pay_log_id,a.agent_id,b.money,a.income_time,b.type,a.receipt_number,a.create_time";
$params_adjustment["a.agent_id"] = array("in", ($ids));
$params_adjustment["a.is_del"] = 0;
$params_adjustment["b.is_del"] = 0;
$params_adjustment["b.create_time"] = array("between", array($daily_data, $daily_data . " 23:59:59"));
$info["adjustment"] = $this->getHouseAndAgentInfo(
$payLogModel->selectAdjustmentList($field_adjustment, $params_adjustment)
......@@ -634,5 +635,19 @@ class DailyPaperService
return $oImgModel->getImgList($params);
}
/**
* 检查是否审核
*
* @param $daily_id
* @return int
*/
public function isCheck($daily_id) {
$where['daily_id'] = $daily_id;
$where['is_del'] = 0;
$num = $this->oDailyLogModel->getTotal($where);
$result = $num > 0 ? 1 : 0;
return $result;
}
}
\ No newline at end of file
......@@ -43,6 +43,7 @@ class OrderLogService
/**
* 批量插入收款记录
*
* @param $agent_id
* @param $agent_name
* @param $report_id
......@@ -54,14 +55,17 @@ class OrderLogService
* @param $remark
* @param $transfer_img
* @param $source
* @param $income_time
* @param $received_money
* @param $type_ext
* @return int|string
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\Exception
*/
public function addCollectingBillV2($agent_id, $agent_name, $report_id, $order_id, $order_no, $collecting_bill, $house_number,
$industry_type, $remark, $transfer_img, $source, $income_time)
$industry_type, $remark, $transfer_img, $source, $income_time, $received_money, $type_ext)
{
$bill_arr = $params = [];
$father_id = 0;
......@@ -69,11 +73,11 @@ class OrderLogService
if (isset($collecting["type"]) && isset($collecting["pay_type"]) && isset($collecting["money"])) {
if ($father_id == 0) {
$params = $this->collectingBillBin($father_id, $collecting, $agent_id, $agent_name, $report_id, $order_id, $order_no,
$house_number, $industry_type, $remark, $transfer_img, $source, $income_time, 0, 0);
$house_number, $industry_type, $remark, $transfer_img, $source, $income_time, 0, 0, $received_money, $type_ext);
$father_id = $this->payLogModel->insertPayLog($params);
} else {
array_push($bill_arr, $this->collectingBillBin($father_id, $collecting, $agent_id, $agent_name, $report_id, $order_id, $order_no,
$house_number, $industry_type, $remark, $transfer_img, $source, $income_time, 0, 0));
$house_number, $industry_type, $remark, $transfer_img, $source, $income_time, 0, 0, $received_money, $type_ext));
}
}
}
......@@ -94,6 +98,7 @@ class OrderLogService
/**
* 批量插入收款记录
*
* @param $agent_id
* @param $agent_name
* @param $report_id
......@@ -111,6 +116,8 @@ class OrderLogService
* @param $pay_id
* @param $receipt_number
* @param $transfer_name
* @param $received_money
* @param $type_ext
* @return int|string
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
......@@ -119,7 +126,7 @@ class OrderLogService
*/
public function addCollectingBill($agent_id, $agent_name, $report_id, $order_id, $order_no, $collecting_bill, $house_number,
$industry_type, $remark, $transfer_img, $source, $income_time, $is_dividend,
$last_transfer_time, $pay_id, $receipt_number, $transfer_name)
$last_transfer_time, $pay_id, $receipt_number, $transfer_name, $received_money, $type_ext)
{
$bill_arr = $params = [];
$father_id = 0;
......@@ -141,12 +148,12 @@ class OrderLogService
if ($father_id == 0) {
$params = $this->collectingBillBin($father_id, $collecting, $agent_id, $agent_name, $report_id,
$order_id, $order_no, $house_number, $industry_type, $remark, $transfer_img, $source, $income_time,
$is_dividend, $last_transfer_time, $receipt_number, $transfer_name);
$is_dividend, $last_transfer_time, $receipt_number, $transfer_name, $received_money, $type_ext);
$father_id = $this->payLogModel->insertPayLog($params);
} else {
array_push($bill_arr, $this->collectingBillBin($father_id, $collecting, $agent_id, $agent_name,
$report_id, $order_id, $order_no, $house_number, $industry_type, $remark, $transfer_img, $source,
$income_time, $is_dividend, $last_transfer_time, $receipt_number, $transfer_name));
$income_time, $is_dividend, $last_transfer_time, $receipt_number, $transfer_name, $received_money, $type_ext));
}
}
}
......@@ -202,10 +209,14 @@ class OrderLogService
break;
case 11:
break;
case 12:
break;
case 20:
break;
case 21:
break;
case 22:
break;
case 30:
break;
case 40:
......@@ -218,6 +229,8 @@ class OrderLogService
break;
case 60:
break;
case 70:
break;
default:
return false;
}
......@@ -274,11 +287,12 @@ class OrderLogService
* @param $last_transfer_time
* @param $receipt_number
* @param $transfer_name
* @param $received_money
* @return mixed
*/
private function collectingBillBin($father_id, $collecting_arr, $agent_id, $agent_name, $report_id, $order_id,
$order_no, $house_number, $industry_type, $remark, $transfer_img, $source,
$income_time, $is_dividend, $last_transfer_time, $receipt_number, $transfer_name)
$income_time, $is_dividend, $last_transfer_time, $receipt_number, $transfer_name, $received_money, $type_ext)
{
$arr["report_id"] = $report_id;
......@@ -300,6 +314,8 @@ class OrderLogService
$arr["create_time"] = date("Y-m-d H:i:s", time());
$arr["update_time"] = date("Y-m-d H:i:s", time());
$arr["is_dividend"] = $is_dividend;
$arr["received_money"] = $received_money;
$arr["type_ext"] = $type_ext;
if ($income_time) {
$arr["income_time"] = date("Y-m-d H:i:s", $income_time);
}
......
......@@ -80,8 +80,17 @@
<ol v-if="item.step_name==='pay_log'" class="li-img-list">
<li v-for="(item2, idnex2) in item.img">
<a href="javascript:;" class="click-big-img-a"><img :src="item.img_path+item2.img_name"></a>
<a href="javascript:;" class="click-big-img-a"><img class="J_preview" :src="item.img_path+item2.img_name"></a>
</li>
<!--<li>
<a href="javascript:;" class="click-big-img-a"><img class="J_preview" src="https://pre2.tonglianjituan.com/static/chat_image/20190114/201901141550135536.jpg"></a>
</li>
<li>
<a href="javascript:;" class="click-big-img-a"><img class="J_preview" src="https://pre2.tonglianjituan.com/static/chat_image/20190114/20190114155013553693.jpg"></a>
</li>
<li>
<a href="javascript:;" class="click-big-img-a"><img class="J_preview" src="https://pre2.tonglianjituan.com/static/chat_image/20190114/201901141550135536932722.jpg"></a>
</li>-->
</ol>
<p v-if="item.step_name==='refund'">退款ID:<span class="span-active">{{item.id}}</span></p>
<p v-if="item.step_name==='refund'">要退金额的收款ID:<span class="span-active">{{item.pay_log_id}}</span></p>
......@@ -110,17 +119,17 @@
<p v-if="item.step_name==='march_in'">地址:{{item.march_in_area}}</p>
<ol v-if="item.step_name==='march_in'" class="li-img-list">
<li v-for="(item2, idnex2) in item.img">
<a href="javascript:;" class="click-big-img-a"><img :src="item.img_path+item2.img_name"></a>
<a href="javascript:;" class="click-big-img-a"><img class="J_preview" :src="item.img_path+item2.img_name"></a>
</li>
</ol>
<ol v-if="item.step_name==='follow_up_log'" class="li-img-list">
<li>
<a href="javascript:;" class="click-big-img-a"><img :src="item.img_path+item.explain_img"></a>
<a href="javascript:;" class="click-big-img-a"><img class="J_preview" :src="item.img_path+item.explain_img"></a>
</li>
</ol>
<ol v-if="item.step_name==='refund_check' && item.status*1 == 2" class="li-img-list">
<li v-for="(item2, idnex2) in item.img">
<a href="javascript:;" class="click-big-img-a"><img :src="item.img_path+item2.img_name"></a>
<a href="javascript:;" class="click-big-img-a"><img class="J_preview" :src="item.img_path+item2.img_name"></a>
</li>
</ol>
<p v-if="item.step_name==='march_in'" class="li-caozuoren">操作人:<span>{{item.reception_name}}</span></p>
......@@ -135,7 +144,7 @@
<p v-if="item.step_name==='refund_check' && item.status*1 == 2">操作人:<span>{{item.operation_name}}</span></p>
<ol v-if="item.step_name==='refund'" class="li-img-list">
<li v-for="(item2, idnex2) in item.img">
<a href="javascript:;" class="click-big-img-a"><img :src="item.img_path+item2.img_name"></a>
<a href="javascript:;" class="click-big-img-a"><img class="J_preview" :src="item.img_path+item2.img_name"></a>
</li>
</ol>
</div>
......
......@@ -231,7 +231,7 @@ return [
// 是否自动开启 SESSION
'auto_start' => true,
//过期时间
'expire' => 36000
'expire' => 7200
],
// +----------------------------------------------------------------------
......
......@@ -13,15 +13,19 @@ return [
// 数据库类型
'type' => 'mysql',
// 服务器地址
'hostname' => '47.100.51.167',
//'hostname' => '106.15.189.146',
'hostname' => 'rm-uf6im23128lg530393o.mysql.rds.aliyuncs.com',
// 'hostname' => '127.0.0.1',
// 数据库名
'database' => 'db_tongliandichan',
// 用户名
'username' => 'tldc_online',
'username' => 'tl_root',
// 'username' => 'root',
// 密码
'password' => 'FujuhaofangrootTljt',
'password' => '@!tljt**123',
// 'password' => '123456',
// 端口
'hostport' => '3307',
'hostport' => '3306',
//'hostport' => '',
......
......@@ -32,6 +32,7 @@ class DailyPaper extends Basic
*/
public function dailyDetail()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/* $params = array(
"store_id" => 730,//门店id
......@@ -63,6 +64,7 @@ class DailyPaper extends Basic
*/
public function addDaily()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/* $params = array(
"agent_id" => 5775,//经纪人id
......@@ -113,6 +115,7 @@ class DailyPaper extends Basic
* @throws \think\exception\DbException
*/
public function commitCheck(){
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/*$params = array(
"daily_id" => 1,//日报id
......@@ -167,6 +170,7 @@ class DailyPaper extends Basic
* @return \think\Response
*/
public function getPayLogImg(){
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/* $params = array(
"pay_log_id" => 1
......
......@@ -2565,13 +2565,11 @@ class Finance extends Basic
$m_agent_house = new GHousesToAgents();
foreach ($list as $k=>$v) {
$source_id = $m_pay_adjustment->getFieldColumn('new_paylog_id', ['paylog_id'=> $v['id']]);
$list[$k]['source_id'] = empty($source_id) ? 0 : implode(',', $source_id);
if (empty($list[$k]['source_id'])) {
$list[$k]['source'] = 0;
if ($v['source'] == 2) {
$source_id = $m_pay_adjustment->getFieldColumn('id', ['new_paylog_id'=> $v['id']]);
$list[$k]['source_id'] = empty($source_id) ? 0 : implode(',', $source_id);
} else {
$list[$k]['source'] = 2;
$list[$k]['source_id'] = '';
}
if ($v['type'] != 10 && $v['type'] != 30) {
......@@ -2889,7 +2887,7 @@ class Finance extends Basic
try {
$m_pay = new OPayLogModel();
$pay_fields = 'id,order_id,agent_name,create_time,income_time,house_number,type,real_money,income_time,transfer_name,';
$pay_fields .= 'transaction_fee,is_dividend,receipt_number,source,pay_type,last_transfer_time,money,industry_type';
$pay_fields .= 'transaction_fee,is_dividend,receipt_number,source,pay_type,last_transfer_time,money,industry_type,received_money,type_ext';
$pay_data = $m_pay->selectReceiptImgList($pay_fields, ['id'=>$this->params['pay_id']]);
$pay_data = $pay_data[0];
//成交报告id
......@@ -2916,8 +2914,12 @@ class Finance extends Basic
}
$m_pay_adjustment = new OPayLogAdjustment();
$source_id = $m_pay_adjustment->getFieldValue('id', ['paylog_id'=> $pay_data['id']]);
$pay_data['source_id'] = empty($source_id) ? 0 : $source_id;
if ($pay_data['source'] == 2) {
$source_id = $m_pay_adjustment->getFieldColumn('id', ['new_paylog_id'=> $pay_data['id']]);
$pay_data['source_id'] = empty($source_id) ? 0 : implode(',', $source_id);
} else {
$pay_data['source_id'] = '';
}
if (empty($source_id)) {
$pay_data['source'] = 0;
......@@ -2997,6 +2999,10 @@ class Finance extends Basic
$save_data['transfer_name'] = isset($this->params['transfer_name']) ? $this->params['transfer_name']:'';
$save_data['money'] = $this->params['money'];
$save_data['receipt_number'] = isset($this->params['receipt_number'])? $this->params['receipt_number']:'';
$save_data['type_ext'] = empty($this->params['type_ext']) ? 0 : 1;
$save_data['received_money'] = empty($this->params['received_money']) ? 0 : $this->params['received_money'];
$save_data['type_ext'] = empty($this->params['type_ext']) ? 0 : $this->params['type_ext'];
$save_data['is_dividend'] = empty($this->params['is_dividend']) ? 0 : $this->params['is_dividend'];
$m_pay->updatePayLog($save_data);
} catch (\Exception $e) {
$code = 101;
......@@ -3053,18 +3059,20 @@ class Finance extends Basic
$remark = isset($params["remark"]) ? $params["remark"] : "";
$transfer_img = isset($params["transfer_img"]) ? json_decode($params["transfer_img"], true): "";
$income_time = isset($params["income_time"]) ? strtotime($params["income_time"]) : "";
$last_transfer_time = isset($params["income_time"]) ? strtotime($params["last_transfer_time"]) : "";
$last_transfer_time = isset($params["last_transfer_time"]) ? strtotime($params["last_transfer_time"]) : "";
$pay_id = isset($params["pay_id"]) ? $params["pay_id"] : 0;
$source = $params["source"] ? $params["source"] : 0;
$receipt_number = isset($params["receipt_number"]) ? $params["receipt_number"] : "";
$transfer_name = isset($params["transfer_name"]) ? $params["transfer_name"] : "";
$received_money = isset($params["received_money"]) ? $params["received_money"] : 0;
$type_ext = isset($params["type_ext"]) ? $params["type_ext"] : 0;
if($pay_id > 0){
$source = 2;
}
$service_ = new OrderLogService();
$is_ok = $service_->addCollectingBill($params["agent_id"], $params["agent_name"], $params["report_id"],
$params["order_id"], $params["order_no"], $params["collecting_bill"], $params["house_number"], $params["industry_type"],
$remark, $transfer_img, $source,$income_time,$params["is_dividend"],$last_transfer_time,$pay_id, $receipt_number,$transfer_name);
$remark, $transfer_img, $source,$income_time,$params["is_dividend"],$last_transfer_time,$pay_id, $receipt_number,$transfer_name, $received_money, $type_ext);
if ($is_ok > 0) {
return $this->response("200", "request success", [ "bill_id" => $is_ok ]);
......
......@@ -528,18 +528,34 @@ class Houses extends Basic
* 商铺列表添加和编辑独家
*
* @return \think\Response
* @throws \Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function editExclusive()
{
if (empty($this->params['houses_id']) || empty($this->params['exclusive_id'])) {
if (empty($this->params['houses_id'])) {
return $this->response(101, '参数错误');
}
$this->data = $this->house->exclusive($this->params, $this->params['houses_id'], $this->userId, $this->siteId);
$house = new HouseService();
if ($this->params['is_exclusive_type'] == 1) {
if (empty($this->params['exclusive_ids'])) {
return $this->response(101, '参数错误');
}
$data = $this->params;
$data['id'] = $this->params['houses_id'];
unset($data['houses_id']);
$house = new HouseService();
$this->data = $house->addHouse($data, $this->userId, 0, $this->siteId, 'exclusive');
if ($this->data['status'] == 'fail') {
$this->code = 101;
$this->msg = $this->data['msg'];
}
} else {
$result = $house->delAgentHouse(3, $this->params['houses_id']);
if (!$result) {
$this->code = 101;
$this->msg = '解除独家关系失败';
}
}
return $this->response($this->code, $this->msg, $this->data);
}
......
......@@ -11,6 +11,8 @@ use app\model\ASite;
use app\model\AStore;
use app\model\AuthGroup;
use app\model\AuthRule;
use think\Config;
use think\Cookie;
use think\Session;
/**
......@@ -163,12 +165,15 @@ class Login extends Basic
$jwt_data['level'] = $user_data['level'];
$user_data['AuthToken'] = $jwt->createToken($jwt_data);
$expire = Config::get('session.expire');
$expire_time = $expire + time() - 300;
Session::set("userName", $user_data["name"]);
Session::set("userId", $user_data["id"]);
Session::set("expire_time", $expire_time);
Session::set("lastLoginTime", time());
Session::set("user_info", $user_data);
$this->operating_records($user_data["id"], 1, '后台登陆'); //记录操作日志
Cookie::set('PHPSESSID', session_id(), $expire); //更新session_id过期时间
return $this->response('200', '登录成功', $user_data);
}
......
......@@ -78,7 +78,8 @@ class Remark extends Basic
}
if (!empty($this->params['content'])) {
$where['content'] = ['LIKE', "%{$this->params['content']}%"];
$content = trim($this->params['content']);
$where['content'] = ['LIKE', "%{$content}%"];
}
//跟进人id
......@@ -187,10 +188,13 @@ class Remark extends Basic
$code = 200;
$msg = '';
$follow_up_service = new PhoneFollowUpService($this->siteId);
$where = $list = [];
$where['page_no'] = $this->params['pageNo'];
$where['page_size'] = $this->params['pageSize'];
//默认跟进城市
$site_id = $this->siteId;
if (!empty($this->params['user_id'])) {
$where['user_id'] = (int)$this->params['user_id'];
}
......@@ -207,6 +211,12 @@ class Remark extends Basic
$where['district_id'] = (int)$this->params['remark_district_id'];
}
//有权限的人可以查看其它城市的跟进
if (!empty($this->params['site_id'])) {
$site_id = $this->params['site_id'];
}
$follow_up_service = new PhoneFollowUpService($site_id);
$result_data = $follow_up_service->getPhoneFollowList($this->params['start_date'], $this->params['end_date'], $where, $this->userId);
if ($result_data['code'] == 200) {
if (!empty($result_data['data'])) {
......
......@@ -14,7 +14,9 @@ use app\model\AAgents;
use app\model\GHousesToAgents;
use app\model\GOperatingRecords;
use app\model\Users;
use think\Config;
use think\Controller;
use think\Cookie;
use think\Request;
use think\Response;
use think\Session;
......@@ -35,6 +37,7 @@ class Basic extends Controller
public $userId;
public $expire_time;
public $lastLoginTime;
public $city;
......@@ -228,7 +231,7 @@ class Basic extends Controller
if (empty($is_auth) && $this->userId != 1) {
if($this->request->isAjax()){
echo json_encode(array( "code" => "300", "msg" => "没有权限!", "data" => [], "type" => "json" ));exit;
echo json_encode(array( "code" => "301", "msg" => "没有权限!", "data" => [], "type" => "json" ));exit;
} else {
$this->error('没有当前页面权限');exit;
}
......@@ -243,27 +246,20 @@ class Basic extends Controller
*/
public function userVerify(){
$this->lastLoginTime = Session::get("lastLoginTime");
if(empty($this->userName) || empty($this->userId) || empty($this->lastLoginTime) ){
$this->expire_time = Session::get("expire_time");
if(empty($this->lastLoginTime)){
if ($this->request->isAjax()) {
echo json_encode(array( "code" => "101", "msg" => "登录失效,请重新登录", "data" => [], "type" => "json" ));exit;
echo json_encode(array( "code" => "300", "msg" => "登录失效,请重新登录", "data" => [], "type" => "json" ));exit;
} else {
$this->redirect('/index/login');
}
}
$time = time();
//登录有效期判断
if (($time - $this->lastLoginTime) > 36000) {
if ($this->request->isAjax()) {
echo json_encode(array( "code" => "101", "msg" => "登录失效,请重新登录", "data" => [], "type" => "json" ));exit;
} else {
$this->redirect('/index/login');die;
}
} else {
//更新时间
Session::set("lastLoginTime", $time);
if ($this->expire_time < time()) {
$expire = Config::get('session.expire');
$expire = empty($expire) ? 7200 : $expire;
Cookie::set('PHPSESSID', session_id(), $expire); //更新session_id过期时间
}
return ;
}
......
......@@ -134,6 +134,11 @@ class HouseService
}
$m_operating->record($agent_id, 6, $remark, $data['id']);
if (empty($data['is_exclusive_type'])) {
$this->delAgentHouse(3, $data['id'], 0);
unset($data['exclusive_ids']);
}
}
$house_id = $this->m_house->addHouse($data, $agent_id);
......@@ -935,4 +940,31 @@ class HouseService
return ;
}
/**
* 删除经纪人与楼盘关系
*
* @param $type
* @param $house_id
* @param $id_edit
* @return GHousesToAgents|bool
*/
public function delAgentHouse($type, $house_id, $id_edit = 1) {
if (empty($type) || empty($house_id)) {
return false;
}
$id = $this->m_house->getTotal(['id'=>$house_id,'is_exclusive_type'=>1]);
if (empty($id)) {
return false;
}
$where['houses_id'] = $house_id;
$where['type'] = $type;
$is_ok = $this->agent_house->updateData($where, ['is_del'=>1]);
if ($id_edit && $type == 3) {
$this->m_house->editData(['is_exclusive_type'=>0], $house_id);
}
return $is_ok;
}
}
\ No newline at end of file
......@@ -242,7 +242,7 @@ class UserLogService
{
//查询客户详情
$field = 'id as user_id,sex,user_pic,user_nick,user_name,user_phone,site_ids,agent_id,user_label,industry_type,price_demand,area_demand,vip';
$field = 'id as user_id,sex,user_pic,user_nick,user_name,user_phone,site_ids,agent_id,user_label,industry_type,price_demand,area_demand,vip,user_status';
$result = $this->userModel->getUserDetailStreamline($user_id,$field);
if (count($result) <= 0) {
......
......@@ -626,7 +626,7 @@ class UserService
}
//bind_id是否等于0 是否主账号
$user_info = $this->user->getUserById($field = 'bind_id', $user_id);
$field = 'id as user_id,user_nick,user_name,user_phone,bind_id';
$field = 'id as user_id,user_nick,user_name,user_phone,bind_id,user_status';
if($user_info['bind_id'] == 0){
//主账号只需要查bind_id等于当前用户的ID
$where['bind_id'] = $user_id;
......@@ -652,5 +652,40 @@ class UserService
}
/**
* 客户邀请人
* @param $phone
* @return int
*/
public function userInvite($user_id,$phone)
{
$m_agent = new AAgents();
// 判断经纪人表是否存在
$agent_res = $m_agent->findByOne('id', ["phone" => $phone,"status" => 0]);
// 判断客户表是否存在
$user_res = $this->user->findByOne('id', ["user_phone" => $phone,"status" => 0]);
if(!$agent_res && !$user_res){
return 4;
}
if ($agent_res) {
// 邀请人 为 经纪人 经纪人表客户表同时存在
$referrer_source = 20;
$referrer_id = $agent_res['id'];
} else {
// 邀请人 为 经纪人 只存在于客户表
$referrer_source = 10;
$referrer_id = $user_res['id'];
}
if(($referrer_source == 10) and ($user_id == $referrer_id)){
return 2;
}
$res = $this->user->setUserInvite($user_id,$referrer_source,$referrer_id);
return $res == 1 ? 1 : 0;
}
}
\ No newline at end of file
{layout name="global/frame_two_tpl" /}
<input type="hidden" class="page-load" id="financial_manager_daily_list" />
<style type="text/css">
.col-xs-3{
padding-left: 8px;
padding-right: 8px;
};
/*图片*/
.clear{
clear: both;
......@@ -279,6 +284,7 @@
<th class="text-center">成交价</th>
<th class="text-center">应收金额</th>
<th class="text-center">本次收佣</th>
<th class="text-center">之前已收佣</th>
<th class="text-center">多收金额</th>
<th class="text-center">支付方式</th>
<th class="text-center">转账户名</th>
......@@ -307,6 +313,7 @@
<th class="text-center">成交商铺地址</th>
<th class="text-center">应收案场费</th>
<th class="text-center">本次收佣</th>
<th class="text-center">之前已收佣</th>
<th class="text-center">支付方式</th>
<th class="text-center">转账户名</th>
<th class="text-center">业务员</th>
......@@ -694,6 +701,29 @@
<span id="intoType" class="col-xs-6 ld-Marheight">中介费</span>
</div>
</div>
<!--收款详情 加中介费类型 之前已收佣-->
<div class="col-xs-12">
<div class="col-xs-6 agency_fees_type_hide">
<div class="form-group">
<strong><span class="col-xs-3 ld-Marheight" style="margin-left: -7px;">中介费类型:</span></strong>
<div class="col-xs-6">
<select class="form-control" id="agency_fees_type_text">
<option class="" value="0">正常</option>
<option class="" value="1">多收</option>
</select>
</div>
</div>
</div>
<div class="col-xs-6 before_commission_hide">
<div class="form-group">
<strong><span class="col-xs-3 ld-Marheight">之前已收佣:</span></strong>
<div class="col-xs-6">
<input class="form-control" type="text" value="0" id="before_commission_text">
</div>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<strong><span class="col-xs-3 ld-Marheight">商铺号:</span></strong>
......@@ -802,14 +832,17 @@
<div class="col-xs-6">
<select class="form-control" id="payType">
<option value="10">施总支付宝</option>
<option value="11">林老师支付宝</option>
<option value="11">林老师支付宝</option>
<option value="12">筠姐支付宝</option>
<option value="20">施总微信</option>
<option value="21">林老师微信</option>
<option value="21">林老师微信</option>
<option value="22">筠姐微信</option>
<option value="30">pos机器</option>
<option value="40">地产转账</option>
<option value="41">世家公账</option>
<option value="42">3000账号</option>
<option value="50">现金</option>
<option value="70">银满谷银行卡</option>
<option value="60">其他</option>
</select>
</div>
......@@ -879,4 +912,34 @@
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!-- /#删除模态框 -->
<div class="modal fade" id="modal-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title">
删除
</h4>
</div>
<div class="modal-body">
<div class="modal-body">
<input type="hidden" value="" id="delete_id" /> 确认删除吗?
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消
</button>
<button type="button" class="btn btn-primary" id="confirm_delete" data-dismiss="modal">
删除
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
\ No newline at end of file
{layout name="global/frame_two_tpl" /}
<input type="hidden" class="page-load" id="getCollection" />
<style>
.col-xs-3{
padding-left: 8px;
padding-right: 8px;
};
.reportArea{
float: left;
position: relative;
......@@ -47,7 +52,7 @@
}
.modal-body-height {
overflow-y: auto;
height: 521px;
height: 551px;
}
#container_body_img_area>div{
float: left;
......@@ -365,14 +370,19 @@
<option value="">入账方式</option>
<option value="10">施总支付宝</option>
<option value="11">林老师支付宝</option>
<option value="12">筠姐支付宝</option>
<option value="20">施总微信</option>
<option value="21">林老师微信</option>
<option value="22">筠姐微信</option>
<option value="30">POS机器</option>
<option value="40">地产转账</option>
<option value="41">世家公账</option>
<option value="42">3000账号</option>
<option value="50">现金</option>
<option value="70">银满谷银行卡</option>
<option value="60">其他</option>
</select>
<select class="form-control btn2 ld-Marheight" id="come_from">
<option value="-1">来源</option>
......@@ -491,6 +501,25 @@
<!--<strong><span class="col-xs-2 ld-Marheight">元</span></strong>-->
</div>
</div>
<!--新增中介费 类型 之前已收佣-->
<div class="col-xs-6" id="agency_fees_type_div">
<div class="form-group">
<strong><span class="col-xs-4 ld-Marheight">中介费类型:</span></strong>
<div class="col-xs-6">
<select class="form-control" id="agency_fees_type">
<option class="" value="0">正常</option>
<option class="" value="1">多收</option>
</select>
</div>
</div>
</div>
<div class="col-xs-6" id="before_commission_div">
<div class="form-group">
<strong><span class="col-xs-4 ld-Marheight">之前已收佣(元):</span></strong>
<div class="col-xs-6"><input class="form-control" type="text" value="0" id="before_commission" /></div>
<!--<strong><span class="col-xs-2 ld-Marheight">元</span></strong>-->
</div>
</div>
<div class="col-xs-12 rep">
<div class="form-group">
<strong><span class="col-xs-2 ld-Marheight">成交报告ID:</span></strong>
......@@ -662,6 +691,30 @@
<span id="intoType" class="col-xs-6 ld-Marheight">中介费</span>
</div>
</div>
<!--收款详情 加中介费类型 之前已收佣-->
<div class="col-xs-12">
<div class="col-xs-6 agency_fees_type_hide">
<div class="form-group">
<strong><span class="col-xs-3 ld-Marheight" style="margin-left: -7px;">中介费类型:</span></strong>
<div class="col-xs-6">
<select class="form-control" id="agency_fees_type_text">
<option class="" value="0">正常</option>
<option class="" value="1">多收</option>
</select>
</div>
</div>
</div>
<div class="col-xs-6 before_commission_hide">
<div class="form-group">
<strong><span class="col-xs-3 ld-Marheight">之前已收佣:</span></strong>
<div class="col-xs-6">
<input class="form-control" type="text" value="0" id="before_commission_text">
</div>
</div>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<strong><span class="col-xs-3 ld-Marheight">商铺号:</span></strong>
......@@ -770,14 +823,17 @@
<div class="col-xs-6">
<select class="form-control" id="payType">
<option value="10">施总支付宝</option>
<option value="11">林老师支付宝</option>
<option value="11">林老师支付宝</option>
<option value="12">筠姐支付宝</option>
<option value="20">施总微信</option>
<option value="21">林老师微信</option>
<option value="21">林老师微信</option>
<option value="22">筠姐微信</option>
<option value="30">pos机器</option>
<option value="40">地产转账</option>
<option value="41">世家公账</option>
<option value="42">3000账号</option>
<option value="50">现金</option>
<option value="70">银满谷银行卡</option>
<option value="60">其他</option>
</select>
</div>
......
......@@ -58,7 +58,6 @@
margin-left:30px;
}
.c-user>li>a {
/*background-color:rgba(255,255,255) !important;*/
background-color:rgba(255,255,255,1) !important;
color:#333333 !important;
opacity: 30% !important;
......
......@@ -385,6 +385,8 @@
<tr>
<td colspan="9">
<form id="form_search">
<select class="form-control btn2-city ld-Marheight user_city_choose_site_list"></select>
<!--<select class="form-control btn2 ld-Marheight" id="user_area_choose">
<option value="" selected="selected">区域筛选</option>
</select>-->
......
......@@ -1575,4 +1575,13 @@ class AAgents extends BaseModel
return $result;
}
public function findByOne($field,$params) {
$result = $this
->field($field)
->where($params)
->find();
//dump($this->getLastSql());
return $result;
}
}
\ No newline at end of file
......@@ -573,4 +573,13 @@ class GHousesToAgents extends BaseModel
$result = $this->where($where_)->count();
return $result;
}
/**
* @param $where
* @param $data
* @return GHousesToAgents
*/
public function updateData($where, $data) {
return $this->where($where)->update($data);
}
}
......@@ -12,13 +12,14 @@ use think\Model;
* Time : 2:36 PM
* Intro:
*/
class ODailyLog extends Model
class ODailyLog extends BaseModel
{
protected $table = "o_daily_log";
private $db_;
public function __construct()
public function __construct($data = [])
{
parent::__construct($data);
$this->db_ = Db::name($this->table);
}
......
......@@ -63,6 +63,9 @@ class UPhoneFollowUpTemporary extends BaseModel
if (isset($params["user_status"])) {
$arr["user_status"] = $params["user_status"];
}
if (isset($params['create_time'])) {
$arr["create_time"] = $params["create_time"];
}
if (isset($this->siteId)) {
switch ($this->siteId) {
......
......@@ -1020,5 +1020,23 @@ class Users extends Model
return $data;
}
public function findByOne($field,$params) {
$result = $this
->field($field)
->where($params)
->find();
//dump($this->getLastSql());
return $result;
}
public function setUserInvite($user_id,$referrer_source,$referrer_id)
{
$result = $this->where(['id'=>$user_id])->update(['referrer_source'=>$referrer_source,'referrer_id'=>$referrer_id]);
//dump($this->getLastSql());
// big_log($this->getLastSql());
return $result;
}
}
......@@ -443,6 +443,9 @@ Route::group('api', [
'register' => ['api/member/register', ['method' => 'post']], //注册|邀请注册|编辑
'uploadHeadImg' => ['api/member/uploadHeadImg', ['method' => 'post']], //头像上传
'setUserInvite' => ['api/member/setUserInvite', ['method' => 'get | post']],
'myInvite' => ['api/member/myInvite', ['method' => 'get | post']],
// shop
'getShopList' => ['api/shop/getShopList', ['method' => 'get|post']],
'filtrateCondition' => ['api/shop/filtrateCondition', ['method' => 'get | post']],
......@@ -775,6 +778,12 @@ Route::group('broker', [
'addUserBind' => [ 'api_broker/User/addUserBind', [ 'method' => 'get|post' ] ],
'removeUserBind' => [ 'api_broker/User/removeUserBind', [ 'method' => 'get|post' ] ],
'dailyDetail' => ['api_broker/DailyPaper/dailyDetail', ['method' => 'get|post']],
'addDaily' => ['api_broker/DailyPaper/addDaily', ['method' => 'get|post']],
'commitCheck' => ['api_broker/DailyPaper/commitCheck', ['method' => 'get|post']],
'getPayLogImg' => ['api_broker/DailyPaper/getPayLogImg', ['method' => 'get|post']],
]);
//Route::miss('api/index/miss');//处理错误的url
\ No newline at end of file
......@@ -23,4 +23,4 @@
if(!doc.addEventListener) return;
win.addEventListener(resizeEvt, recalc, false);
doc.addEventListener('DOMContentLoaded', recalc, false);
})(document, window);</script><link href=./static/css/app.9c41573e45da0124ddc73474137de15d.css rel=stylesheet></head><body><div id=app></div><script src=https://api.tonglianjituan.com/app/js/libs/vue.min.js></script><script src=https://api.tonglianjituan.com/app/js/libs/vue-router.min.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.74698e64579a16bcf167.js></script><script type=text/javascript src=./static/js/app.200d02c9b297fd3322ec.js></script></body></html>
\ No newline at end of file
})(document, window);</script><link href=./static/css/app.193e9a51ba0a6c766f7289cf647aca68.css rel=stylesheet></head><body><div id=app></div><script src=https://api.tonglianjituan.com/app/js/libs/vue.min.js></script><script src=https://api.tonglianjituan.com/app/js/libs/vue-router.min.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.c1544c6e64ebde97066c.js></script><script type=text/javascript src=./static/js/app.d154fd833469c71ecc7c.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment