Commit 1c587793 authored by hujun's avatar hujun

Merge remote-tracking branch 'origin/0702-v.2.2.0' into 0702-v.2.2.0

parents c92c477b 78cea8d2
...@@ -186,7 +186,7 @@ class OrderLogService ...@@ -186,7 +186,7 @@ class OrderLogService
$arr["is_open"] = $is_open; $arr["is_open"] = $is_open;
$arr["create_time"] = date("Y-m-d H:i:s", time()); $arr["create_time"] = date("Y-m-d H:i:s", time());
$arr["update_time"] = date("Y-m-d H:i:s", time()); $arr["update_time"] = date("Y-m-d H:i:s", time());
$arr["estimated_receipt_date"] = $estimated_receipt_date; $arr["estimated_receipt_date"] = date("Y-m-d H:i:s", $estimated_receipt_date);
$arr["industry_type"] = $industry_type; $arr["industry_type"] = $industry_type;
return $arr; return $arr;
} }
......
...@@ -26,6 +26,7 @@ use app\model\AAgents; ...@@ -26,6 +26,7 @@ use app\model\AAgents;
use app\model\ABindingDevice; use app\model\ABindingDevice;
use app\model\Agents; use app\model\Agents;
use app\model\AStore; use app\model\AStore;
use app\model\Evaluate;
use app\model\Regions; use app\model\Regions;
use think\Exception; use think\Exception;
use think\Session; use think\Session;
...@@ -300,4 +301,35 @@ class Agent extends Basic ...@@ -300,4 +301,35 @@ class Agent extends Basic
return $this->response($code, $msg, $data); return $this->response($code, $msg, $data);
} }
/**
* 经纪人列表计算-评价次数和分数
* 朱伟 2018年07月03日
*/
public function agentEvaluateNumAndFraction()
{
$data = $this->request->param();
$agents_id = $data['agents_id'];
if (!isset($agents_id)) {
return $this->response("300", "参数不全");
}
$params['agents_id'] = $agents_id;
$field='sum(evaluate_grade) as agent_evaluate_fraction';
$model = new Evaluate();
$agent_evaluate_num = $model->getAgentEvaluateNum($params);
$agent_evaluate_fraction_res = $model->getAgentEvaluateFraction($field,$params);
$agent_evaluate_fraction = round($agent_evaluate_fraction_res[0]['agent_evaluate_fraction']/2 /$agent_evaluate_num,1);
if ($agent_evaluate_num && $agent_evaluate_fraction_res) {
$result['agent_evaluate_num'] = $agent_evaluate_num;
$result['agent_evaluate_fraction'] = $agent_evaluate_fraction;
return $this->response(200, '成功', $result);
} else {
return $this->response(100, '失败');
}
}
} }
\ No newline at end of file
...@@ -60,7 +60,13 @@ class Member extends Basic{ ...@@ -60,7 +60,13 @@ class Member extends Basic{
//客户手机号 //客户手机号
if (!empty($params['phone'])) { if (!empty($params['phone'])) {
$where[0] = ['EXP','a.user_phone LIKE "%'.$this->params['phone'].'%" or a.user_nick LIKE "%'.$this->params['phone'].'%"']; //$where[0] = ['EXP','a.user_phone LIKE "%'.$this->params['phone'].'%" or a.user_nick LIKE "%'.$this->params['phone'].'%"'];
$where['a.user_phone'] = ['LIKE','%'.$params['phone'].'%'];
}
if (!empty($params['user_nick'])) {
//$where[0] = ['EXP','a.user_phone LIKE "%'.$this->params['phone'].'%" or a.user_nick LIKE "%'.$this->params['phone'].'%"'];
$where['a.user_nick'] = ['LIKE','%'.$params['user_nick'].'%'];
} }
//是否公客 //是否公客
......
...@@ -118,6 +118,9 @@ ...@@ -118,6 +118,9 @@
<option value="1"></option> <option value="1"></option>
</select> <br /> </select> <br />
<span>商铺号:</span><span id="bargaininfo_shop_num"></span><br> <span>商铺号:</span><span id="bargaininfo_shop_num"></span><br>
<!--<span>预计收款时间:</span><span id="bargaininfo_expect_payback_time"></span><br>-->
<span>预计收款时间:</span><input type="date" id="bargaininfo_expect_payback_time" placeholder="请输入">
<br>
<span>客户电话:</span><span id="bargaininfo_user_phone"></span><br> <span>客户电话:</span><span id="bargaininfo_user_phone"></span><br>
<span>成交日期:</span><span id="bargaininfo_create_time"></span><br> <span>成交日期:</span><span id="bargaininfo_create_time"></span><br>
<span>成交价:</span>&nbsp;<input class="form-control" id="bargaininfo_chengjiao_price" type="number"> <span>成交价:</span>&nbsp;<input class="form-control" id="bargaininfo_chengjiao_price" type="number">
...@@ -300,17 +303,15 @@ ...@@ -300,17 +303,15 @@
<option value="3">反签</option> <option value="3">反签</option>
<option value="4">独家</option> <option value="4">独家</option>
<option value="5">合作方</option> <option value="5">合作方</option>
<option value="6">APP盘下载方</option>
<option value="7">APP客下载方</option>
</select> </select>
</div> </div>
<div class="po-relative"> <div class="po-relative">
<span>业务员:</span><input class="form-control" type="text" id="addmaid_input_ywy" /> <span>业务员:</span><input class="form-control" type="text" id="addmaid_input_ywy" />
<ul> <ul>
<li data-id="5755">5755-测试-小杨业务员-17621975554</li> <!--<li data-id="5755">5755-测试-小杨业务员-17621975554</li>
<li data-id="5755">5755-测试-小杨业务员-17621975554</li> <li data-id="5755">5755-测试-小杨业务员-17621975554</li>-->
<li data-id="5755">5755-测试-小杨业务员-17621975554</li>
<li data-id="5755">5755-测试-小杨业务员-17621975554</li>
<li data-id="5755">5755-测试-小杨业务员-17621975554</li>
<li data-id="5755">5755-测试-小杨业务员-17621975554</li>
</ul> </ul>
</div> </div>
<div> <div>
......
...@@ -164,4 +164,32 @@ class Evaluate extends Model ...@@ -164,4 +164,32 @@ class Evaluate extends Model
return $result; return $result;
} }
/**
* 经纪人列表计算-评价次数
* 朱伟 2018年07月03日
*/
public function getAgentEvaluateNum($params = '')
{
$result = $this
->alias('a')
->where($params)
->count();
//dump($this->getLastSql());
return $result;
}
/**
* 经纪人列表计算-分数
* 朱伟 2018年07月03日
*/
public function getAgentEvaluateFraction($field,$params = '')
{
$result = Db::table('u_evaluate')
->field($field)
->alias('a')
->where($params)
->select();
//dump($this->getLastSql());
return $result;
}
} }
...@@ -251,6 +251,8 @@ Route::group('index', [ ...@@ -251,6 +251,8 @@ Route::group('index', [
'getNewsInfo' => [ 'index/news/getNewsInfo', [ 'method' => 'GET' ] ], //商学院资讯详情 'getNewsInfo' => [ 'index/news/getNewsInfo', [ 'method' => 'GET' ] ], //商学院资讯详情
'getNewsLabel' => [ 'index/news/getNewsLabel', [ 'method' => 'GET' ] ], //商学院资标签 'getNewsLabel' => [ 'index/news/getNewsLabel', [ 'method' => 'GET' ] ], //商学院资标签
'delNews' => [ 'index/news/delNews', [ 'method' => 'POST' ] ], //删除商学院文章 'delNews' => [ 'index/news/delNews', [ 'method' => 'POST' ] ], //删除商学院文章
'agentEvaluateNumAndFraction' => [ 'index/agent/agentEvaluateNumAndFraction', [ 'method' => 'POST|GET' ] ],//经纪人列表计算-评价次数和分数 朱伟 2018-07-03
]); ]);
......
<template>
<li @click="goPage">
<div class="flex">
<div class="flex">
<p>{{data.content}}</p>
<p>{{data.time}}</p>
</div>
<div class="flex-center">
<img-error :datasrc="data.img" :imgtype="'avatar'"></img-error>
</div>
</div>
</li>
</template>
<script>
import '@/assets/js/layer041002.js';
export default {
name: '',
props: {
data: {
type: Object,
default: () => ({
message: 'hello'
})
},
dataindex: {
type: [Number, String],
default: 0
}
},
components: {
},
data: () => ({
}),
created() {
let _this = this;
},
mounted() {
let _this = this;
},
methods: {
goPage() {
let _this = this;
_this.$router.push({
path: '/articleDetail',
query: {
'id': '123'
}
});
}
},
computed: {
}
}
</script>
<style scoped>
li{
padding: 0 .3rem;
background-color: white;
}
li>div{
height: 2.2rem;
border-bottom: 1px solid #eee;
}
li>div>div:nth-of-type(1){
flex-direction: column;
justify-content: center;
padding-right: .5rem;
}
li>div>div:nth-of-type(1)>p:nth-of-type(1){
color: #343434;
font-size: .3rem;
}
li>div>div:nth-of-type(1)>p:nth-of-type(2){
color: #999;
font-size: .24rem;
padding-top: .2rem;
}
li>div>div:nth-of-type(2){
}
li>div>div:nth-of-type(2)>img{
width: 2.2rem;
height: 1.6rem;
object-fit: cover;
}
</style>
\ No newline at end of file
<template> <template>
<div> <div>
<header-pulic :data="headerData"></header-pulic> <header-pulic :data="headerData"></header-pulic>
<article>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
<p>示例文字示例文字示例文字</p>
</article>
<div class="list-commnet-area">
<h2>最新评论</h2>
<ul>
<!--<li is="self-defined-li" v-for="(item2, index2) in item.dataList" :data="item2" :dataindex="index2"></li>-->
</ul>
</div>
<div class="txt-comment-area" v-show="isCommentingFlag">
<div>
<div class="flex-center">
<textarea v-model="commentContent"></textarea>
</div>
<div class="oh">
<a class="fl flex-center" href="javascript:;" @click="isCommentingFlag = false">取消</a>
<a class="fr flex-center" href="javascript:;" @click="commentSend">发送</a>
</div>
</div>
</div>
<div class="btn-comment-area flex-center" v-show="!isCommentingFlag">
<a href="javascript:;" class="flex-center" @click="isCommentingFlag = true"><img :src="commentIcon" />我来说两句</a>
</div>
</div> </div>
</template> </template>
<script> <script>
import '@/assets/js/layer041002.js'; import '@/assets/js/layer041002.js';
import paginationLoad from '@/components/publicEg/paginationLoad'; import paginationLoad from '@/components/publicEg/paginationLoad';
import selfDefinedLi from '@/components/businessCollege/articleListLi'; import selfDefinedLi from '@/components/businessCollege/articleCommentLi';
import commentIcon from '@/components/businessCollege/images/icon_comment_2x.png';
export default { export default {
name: '', name: '',
props: { props: {
...@@ -28,10 +85,13 @@ ...@@ -28,10 +85,13 @@
}, },
data: () => ({ data: () => ({
headerData: { headerData: {
'title': '', 'title': '文章详情',
'noborder': true, 'noborder': false,
'isBack': true 'isBack': true
} },
commentIcon,
isCommentingFlag: false,
commentContent: ''
}), }),
created() { created() {
let _this = this; let _this = this;
...@@ -42,11 +102,14 @@ ...@@ -42,11 +102,14 @@
}, },
methods: { methods: {
tabMain() { commentSend() {
let _this = this;
}, let _len = _this.commentContent.length;
getLoad() { if(_len<100 || _len>500){
layer.tipsX('评论字数需在100~500之间,当前字数为'+_len);
}else{
_this.isCommentingFlag = false;
}
} }
}, },
computed: { computed: {
...@@ -56,5 +119,67 @@ ...@@ -56,5 +119,67 @@
</script> </script>
<style scoped> <style scoped>
.btn-comment-area{
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: .98rem;
border-top: 1px solid #ccc;
background-color: white;
}
.btn-comment-area>a{
height: .7rem;
width: 6.86rem;
border-radius: .35rem;
border: 1px solid #ccc;
color: #ccc;
}
.btn-comment-area>a>img{
width: .3rem;
padding-right: .6em;
}
.txt-comment-area{
position: fixed;
left: 0;
bottom: 0;
background-color: rgba(0, 0, 0, .3);
width: 100%;
height: 100%;
}
.txt-comment-area>div{
position: fixed;
left: 0;
bottom: 0;
width: 100%;
height: 2.6rem;
background-color: #f4f4f4;
}
.txt-comment-area>div>div:nth-of-type(1){
height: 1.8rem;
}
.txt-comment-area>div>div:nth-of-type(1)>textarea{
width: 6.86rem;
height: 1.4rem;
border: #1px solid #e0e0e0;
border-radius: .1rem;
background-color: white;
}
.txt-comment-area>div>div:nth-of-type(2){
padding: 0 .3rem;
}
.txt-comment-area>div>div:nth-of-type(2)>a{
box-sizing: border-box;
width: 1.2rem;
height: .6rem;
border-radius: .1rem;
font-size: .28rem;
color: #999;
border: 1px solid #e0e0e0;
}
.txt-comment-area>div>div:nth-of-type(2)>a:nth-of-type(2){
background-color: #FA903F;
color: white;
}
</style> </style>
\ No newline at end of file
...@@ -15,6 +15,7 @@ import announcementDetails from '@/components/announcementDetails/announcementDe ...@@ -15,6 +15,7 @@ import announcementDetails from '@/components/announcementDetails/announcementDe
import inviteRegister from '@/components/inviteRegister/inviteRegister' import inviteRegister from '@/components/inviteRegister/inviteRegister'
import agreement from '@/components/inviteRegister/agreement' import agreement from '@/components/inviteRegister/agreement'
import businessCollege from '@/components/businessCollege/articleList' import businessCollege from '@/components/businessCollege/articleList'
import articleDetail from '@/components/businessCollege/articleDetail'
Vue.use(Router) Vue.use(Router)
...@@ -98,6 +99,11 @@ export default new Router({ ...@@ -98,6 +99,11 @@ export default new Router({
path: '/businessCollege', path: '/businessCollege',
name: 'v-business-college', name: 'v-business-college',
component: businessCollege component: businessCollege
},
{
path: '/articleDetail',
name: 'v-article-detail',
component: articleDetail
} }
] ]
}) })
\ No newline at end of file
...@@ -46,9 +46,13 @@ addtax_ ...@@ -46,9 +46,13 @@ addtax_
display: inline-block; display: inline-block;
} }
#bargaininfo_expect_payback_time{
height: 32px;
}
.detail-modal-bargaininfo-main-right { .detail-modal-bargaininfo-main-right {
line-height: 36px; line-height: 36px;
width: 580px; width: 700px;
} }
#bargaininfo_yetai{ #bargaininfo_yetai{
......
...@@ -295,57 +295,57 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -295,57 +295,57 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
var _addmaid_input_servantObj = $('#addmaid_input_servant'); var _addmaid_input_servantObj = $('#addmaid_input_servant');
_doc.on('input', '#addmaid_input_ywy', function() { _doc.on('input', '#addmaid_input_ywy', function() {
var _this = $(this); var _this = $(this);
if(_addmaid_input_servantObj.val() == '5'){
//当分佣方的值为5,合作方的时候,才能查询 //当分佣方的值为5,合作方的时候,才能查询
var _thisVal = $.trim(_this.val()); var _thisVal = $.trim(_this.val());
_this.removeAttr('data-id'); //移除之前携带的信息 _this.removeAttr('data-id'); //移除之前携带的信息
if(_thisVal != '') { if(_thisVal != '') {
_ajaxObjTel && _ajaxObjTel.abort(); _ajaxObjTel && _ajaxObjTel.abort();
_ajaxObjTel = $.ajax({ _ajaxObjTel = $.ajax({
type: 'GET', type: 'GET',
url: '/index/getBroker_new', url: '/index/getBroker_new',
data: { data: {
'phone': $.trim(_this.val()) 'phone': $.trim(_this.val())
}, },
timeout: 30000, timeout: 30000,
dataType: 'json', dataType: 'json',
beforeSend: function() {}, beforeSend: function() {},
success: function(data) { success: function(data) {
if(typeof data === 'object') { if(typeof data === 'object') {
if(data.code == 200) { if(data.code == 200) {
if(data['data'].length > 0) { if(data['data'].length > 0) {
var _htmlTemp = ''; var _htmlTemp = '';
$.each(data['data'], function(i, item) { $.each(data['data'], function(i, item) {
_htmlTemp += '<li data-id="{3}">{0}-{1}<li>'.stringFormatObj({ _htmlTemp += '<li data-id="{3}">{0}-{1}<li>'.stringFormatObj({
'0': item['name'], '0': item['name'],
'1': item['phone'], '1': item['phone'],
'3': item['id'] '3': item['id']
});
}); });
_this.next().show().html(_htmlTemp); });
} else { _this.next().show().html(_htmlTemp);
_this.next().html('');
};
} else { } else {
alert(data['msg']); _this.next().html('');
}; };
} else { } else {
alert('数据错误'); alert(data['msg']);
};
},
error: function() {
//alert('error');
},
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
alert('请求超时');
}; };
} } else {
}); alert('数据错误');
}else{ };
_this.next().hide(); },
} error: function() {
}else{} //alert('error');
},
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
alert('请求超时');
};
}
});
}else{
_this.next().hide();
}
}); });
...@@ -363,12 +363,16 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -363,12 +363,16 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
getDefaultRadio: function(v){ getDefaultRadio: function(v){
switch (Number(v)){ switch (Number(v)){
case 1: case 1:
return 25; return 20;
case 2: case 2:
return 30; return 25;
case 3: case 3:
return 35; return 35;
case 4: case 4:
return 100;
case 6:
return 10;
case 7:
return 10; return 10;
default: default:
return 25; return 25;
...@@ -446,6 +450,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -446,6 +450,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
$("#bargaininfo_type").val(data.data.trade_type); $("#bargaininfo_type").val(data.data.trade_type);
$("#bargaininfo_total_commission").val(data.data.commission); $("#bargaininfo_total_commission").val(data.data.commission);
$("#bargaininfo_create_time").html(data.data.create_time); $("#bargaininfo_create_time").html(data.data.create_time);
$("#bargaininfo_expect_payback_time").html(data.data.payback_time);
$("#bargaininfo_yetai").val(data.data.industry_type); $("#bargaininfo_yetai").val(data.data.industry_type);
$("#bargaininfo_chengjiao_price").val(data.data.price); $("#bargaininfo_chengjiao_price").val(data.data.price);
...@@ -485,6 +490,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -485,6 +490,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
'trade_type': $('#bargaininfo_type').val(), 'trade_type': $('#bargaininfo_type').val(),
'industry_type': $.trim($('#bargaininfo_yetai').val()), 'industry_type': $.trim($('#bargaininfo_yetai').val()),
'price': $('#bargaininfo_chengjiao_price').val(), 'price': $('#bargaininfo_chengjiao_price').val(),
'payback_time': $('#bargaininfo_expect_payback_time').val(),
'step': bargain.mainTabIndex+1 'step': bargain.mainTabIndex+1
}; };
...@@ -505,7 +511,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -505,7 +511,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
alert('修改成功'); alert('修改成功');
bargain.bargaininfoShow(); bargain.bargaininfoShow();
bargain.getList(0); //bargain.getList(0);
} else { } else {
alert(data.msg); alert(data.msg);
} }
...@@ -588,7 +594,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -588,7 +594,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
if(data.code == 200) { if(data.code == 200) {
if(data.data) { if(data.data) {
bargain.getList(1); //bargain.getList(1);
} }
} else { } else {
alert('获取失败!'); alert('获取失败!');
...@@ -957,7 +963,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -957,7 +963,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
if(typeof _data === 'object') { if(typeof _data === 'object') {
if(_data['code'] == '200') { if(_data['code'] == '200') {
alert('修改成功'); alert('修改成功');
bargain.getList(1); //bargain.getList(1);
} else { } else {
layerTipsX(_data['msg']); layerTipsX(_data['msg']);
} }
...@@ -976,6 +982,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -976,6 +982,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
} }
}); });
}, },
//结单
account: function(){ account: function(){
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
...@@ -990,7 +997,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s ...@@ -990,7 +997,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
if(typeof _data === 'object') { if(typeof _data === 'object') {
if(_data['code'] == '200') { if(_data['code'] == '200') {
alert('结单成功!'); alert('结单成功!');
bargain.getList(1); //bargain.getList(1);
} else { } else {
layerTipsX(_data['msg']); layerTipsX(_data['msg']);
} }
......
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