Commit b92d5d21 authored by hujun's avatar hujun

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

parents ce93d946 9ae6f5e5
<?php
namespace app\api_broker\controller;
/**
* Created by PhpStorm.
* User: zhuwei
* Date: 2018/7/4
* Time: 下午3:25
*/
use app\api_broker\extend\Basic;
use app\model\ACollectHouse;
use think\Request;
class CollectHouse extends Basic
{
protected $aCollectHouse;
public function __construct($request = null)
{
parent::__construct($request);
$this->aCollectHouse = new ACollectHouse();
}
/**
* 收藏或取消收藏商铺
* User: 朱伟
* Date: 2018-07-04
* Time: 15:35:40
*/
public function addCollectHouse(){
$params = $this->params;
/*$params = array(
"agents_id" => 1,
"house_id" => 4,
"status" => 2,
);*/
if (!isset($params["agents_id"]) or !isset($params["house_id"]) or !isset($params["status"])) {
return $this->response("101", "请求参数错误");
}
//先判断是否已经存在数据
$field = 'id,status';
$get_params['agents_id'] = $params["agents_id"];
$get_params['house_id'] = $params["house_id"];
$res = $this->aCollectHouse->getCollectHouse($field,$get_params);
if($res){//如果存在
if($res[0]['status'] != $params["status"] ){//如果存在-并且状态一致 不作处理 不一致则更新状态
$insert["id"] = $res[0]['id'];
$insert["status"] = $params["status"];
$res = $this->aCollectHouse->updateCollectHouse($insert);//int(1)
}else{
$res = true ;
}
}else{//不存在则新增数据
$insert["agents_id"] = $params['agents_id'];
$insert["house_id"] = $params['house_id'];
$insert["status"] = 1;
$res = $this->aCollectHouse->saveCollectHouse($insert);//int(1)
}
if ($res) {
return $this->response("200", "成功");
} else {
return $this->response("101", "失败");
}
}
}
\ No newline at end of file
<?php
namespace app\api_broker\controller;
/**
* Created by PhpStorm.
* User: zhuwei
* Date: 2018/7/4
* Time: 下午3:25
*/
use app\api_broker\extend\Basic;
use app\model\ACollectUser;
use think\Request;
class CollectUser extends Basic
{
protected $aCollectUser;
public function __construct($request = null)
{
parent::__construct($request);
$this->aCollectUser = new ACollectUser();
}
/**
* 收藏或取消收藏客户
* User: 朱伟
* Date: 2018-07-04
* Time: 15:35:40
*/
public function addCollectUser()
{
$params = $this->params;
/*$params = array(
"agents_id" => 2,
"user_id" => 3,
"status" => 2,
);*/
if (!isset($params["agents_id"]) or !isset($params["user_id"]) or !isset($params["status"])) {
return $this->response("101", "请求参数错误");
}
//先判断是否已经存在数据
$field = 'id,status';
$get_params['agents_id'] = $params["agents_id"];
$get_params['user_id'] = $params["user_id"];
$res = $this->aCollectUser->getCollectUser($field,$get_params);
if($res){//如果存在
if($res[0]['status'] != $params["status"] ){//如果存在-并且状态一致 不作处理 不一致则更新状态
$insert["id"] = $res[0]['id'];
$insert["status"] = $params["status"];
$res = $this->aCollectUser->updateCollectUser($insert);//int(1)
}else{
$res = true ;
}
}else{//不存在则新增数据
$insert["agents_id"] = $params['agents_id'];
$insert["user_id"] = $params['user_id'];
$insert["status"] = 1;
$res = $this->aCollectUser->saveCollectUser($insert);//int(1)
}
if ($res) {
return $this->response("200", "成功");
} else {
return $this->response("101", "失败");
}
}
}
\ No newline at end of file
......@@ -333,7 +333,7 @@ class OrderLog extends Basic
{
$params = $this->params;
/* $params = array(
"order_id" => 2,
"order_id" => 38024,
);*/
if (!isset($params["order_id"])) {
return $this->response("101", "请求参数错误");
......
......@@ -79,7 +79,7 @@ class OrderLogService
if ($father_id > 0) {
//保存图片
$oImgModel = new OImg();
$oImgModel->addImgAll($father_id,2,$transfer_img);
$oImgModel->addImgAll($father_id, 2, $transfer_img);
$pushMarchIn = new PushMessageService($params["report_id"], 2);
$pushMarchIn->pushMarchInMessage($params["report_id"], 2); //推送
......@@ -283,12 +283,12 @@ class OrderLogService
}
//收款
$field_pay_log = "id,order_no,order_id,agent_id,agent_name,type,pay_type,money,house_number,industry_type,
$field_pay_log = "id,order_no,father_id,order_id,agent_id,agent_name,type,pay_type,money,house_number,industry_type,
remark,transfer_img,real_money,source,create_time";
$payLogData = $oPayLogModel->selectPayLogByOrderNo($field_pay_log, [ "order_id" => $order_id ]);
if (count($payLogData) > 0) {
foreach ($payLogData as $k => $v) {
$sortPayLogData = $this->arr2tree($payLogData);
foreach ($sortPayLogData as $k => $v) {
$v["step_name"] = "pay_log";
$v["img_path"] = CHAT_IMG_URL;
$result[$sort++] = $v;
......@@ -321,6 +321,33 @@ class OrderLogService
return $this->sortByTime($result);
}
public function arr2tree($list)
{
$tree = $trees = [];
foreach ($list as $key => $item) {
if ($item["father_id"] == 0) {
$list[$key]["father_id"] = $item["id"];
}
}
foreach ($list as $value) {
$tree[$value["father_id"]][] = $value;
}
foreach ($tree as $i => $v) {
//查询图片
$oImgModel = new OImg();
$params["img_id"] = $v[0]["father_id"];
$params["img_type"] = 2;
$img_arr = $oImgModel->getImgList($params);
$trees[$i]["img"] = $img_arr;
$trees[$i]["list"] = $v;
$trees[$i]["create_time"] = $v[0]["create_time"];
}
sort($trees);
return $trees;
}
/**
* 查询流程 客户动态
......
......@@ -32,11 +32,20 @@
<p v-if="item.step_name==='follow_up_log'">对面积的要求:<span>{{item.area_requirement}}</span></p>
<p v-if="item.step_name==='follow_up_log'">对价格的要求:<span>{{item.price_requirement}}</span></p>
<p v-if="item.step_name==='follow_up_log'">所在区域:<span>{{item.area_detail+' '+item.business_area}}</span></p>
<p v-if="item.step_name==='pay_log'">入账类型:<span>{{switchRzType(item.type)}}</span></p>
<p v-if="item.step_name==='pay_log'">支付方式:<span>{{switchPayType(item.pay_type)}}</span></p>
<p v-if="item.step_name==='pay_log'">入账金额:<span class="span-active">{{item.money}}元</span></p>
<div v-if="item.step_name==='pay_log'">
<div class="sp-pay-log-div" v-for="(item2, idnex2) in item.list">
<p>入账类型:<span>{{switchRzType(item2.type)}}</span></p>
<p>支付方式:<span>{{switchPayType(item2.pay_type)}}</span></p>
<p>入账金额:<span class="span-active">{{item2.money}}元</span></p>
</div>
</div>
<p v-if="item.step_name==='pay_log'">商铺号:<span class="span-active">{{item.house_number}}</span></p>
<p v-if="item.step_name==='pay_log'">业态/品牌:<span>{{item.industry_type}}</span></p>
<ol v-if="item.step_name==='pay_log'" class="li-img-list">
<li v-for="(item2, idnex2) in item.img">
<a href="javascript:;" data-id="item2.id"><img :src="item.img_path+item2.img_name"></a>
</li>
</ol>
<p v-if="item.step_name==='refund'">退款金额:<span class="span-active">{{item.refund_money}}元</span></p>
<p v-if="item.step_name==='refund'" class="yinhangka-info">退款银行卡信息</p>
<p v-if="item.step_name==='refund'">姓名:<span>{{item.agent_name}}</span></p>
......@@ -75,3 +84,13 @@
</body>
</html>
<!--
report 报备
march_in 进场
follow_up_log 跟进
pay_log 收款
refund 退款
bargain 成交报告
-->
\ No newline at end of file
......@@ -168,9 +168,9 @@ class Collection extends Basic
*/
public function receiptImgList(){
$params = $this->params;
$params = array(
/*$params = array(
"id" => 6,
);
);*/
if(!isset($params["id"])){
return $this->response("101","请求参数错误");
......
......@@ -127,6 +127,53 @@
.delet-pic-btn{
color:red;
}
/*css样式*/
.img-cont{
width:1000px;
height:570px;
border:2px solid #317ef3;
margin:50px auto;
}
.img-cont>div{
width:300px;
height:260px;
border:1px solid #777;
float:left;
margin:20px 0 0 20px;
}
.img-cont>div>div{
width:300px;
height:220px;
border:1px solid red;
}
.img-cont>div>a{
width:60px;
height:30px;
border-radius:4px;
line-height: 30px;
text-align: center;
color:#fff;
display: block;
background: #317ef3;
margin:5px 0 0 0px;
cursor: pointer;
}
.hide{
display: none !important;
}
.result{
width: 600px;
}
.result>img{
width: 200px;
height: 200px;
}
/*css样式*/
</style>
<div id="page-content-wrapper">
<div class="container">
......@@ -258,10 +305,11 @@
<li class="list-group-item">
<div class="form-group full-width-100 full-pic-area">
<!--<label for="">详情页轮播图(至少4张)</label>-->
<input readonly="readonly" type="text" name="xiangqing_pic_input" class="form-control" style="display: none" id="xiangqing_pic_input" placeholder="请选择图片">
<button class="btn btn-default upload-image-btn" id="xiangqing_pic_btn" type="button" data-limittop="20">上传图片</button>
<span class="tip"></span>
<!--input上传图片-->
<div id="container_body">
<label>请选择一个图像文件:</label>
<input type="file" id="file_input"/>
</div>
</div>
<ul class="img-pre-ul" id="xiangqing_pic_ul">
</ul>
......
......@@ -119,8 +119,7 @@
</select> <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><input type="date" id="bargaininfo_expect_payback_time" placeholder="请输入"><br>
<span>客户电话:</span><span id="bargaininfo_user_phone"></span><br>
<span>成交日期:</span><span id="bargaininfo_create_time"></span><br>
<span>成交价:</span>&nbsp;<input class="form-control" id="bargaininfo_chengjiao_price" type="number">
......
......@@ -150,6 +150,7 @@
</select> <br />
<span>商铺号:</span><span id="bargaininfo_shop_num"></span><br>
<span>客户电话:</span><span id="bargaininfo_user_phone"></span><br>
<span>预计收款时间:</span><input type="date" id="bargaininfo_expect_payback_time" readonly="readonly" placeholder="请输入"><br>
<span>成交日期:</span><span id="bargaininfo_create_time"></span><br>
<span>成交价:</span>&nbsp;<input class="form-control" id="bargaininfo_chengjiao_price" disabled="disabled" type="number">
</div>
......
......@@ -150,6 +150,7 @@
</select> <br />
<span>商铺号:</span><span id="bargaininfo_shop_num"></span><br>
<span>客户电话:</span><span id="bargaininfo_user_phone"></span><br>
<span>预计收款时间:</span><input type="date" id="bargaininfo_expect_payback_time" readonly="readonly" placeholder="请输入"><br>
<span>成交日期:</span><span id="bargaininfo_create_time"></span><br>
<span>成交价:</span>&nbsp;<input class="form-control" id="bargaininfo_chengjiao_price" disabled="disabled" type="number">
</div>
......
......@@ -462,3 +462,6 @@
</div>
<!-- /.modal -->
</div>
<div id="img_mask_area" title="点击任意位置可关闭">
<img />
</div>
\ No newline at end of file
......@@ -519,3 +519,6 @@
</div>
<!-- /.modal -->
</div>
<div id="img_mask_area" title="点击任意位置可关闭">
<img />
</div>
\ No newline at end of file
<?php
namespace app\model;
use think\Db;
use think\Model;
class ACollectHouse extends Model
{
// 设置当前模型对应的完整数据表名称
protected $table = 'a_collect_house';
public function saveCollectHouse($data) {
$time = date("Y-m-d h:i:sa", time());
$data['create_time'] = $time;
$data['update_time'] = $time;
return $this->insert($data);
}
/**
* 查询数据
* 朱伟 2018-07-04
*/
public function getCollectHouse($field,$params)
{
$result = Db::table($this->table)
->field($field)
//->alias('a')
->where($params)
->select();
//dump($this->getLastSql());
return $result;
}
/**
* 更新数据
* 朱伟 2018-07-04
*/
public function updateCollectHouse($params)
{
$result = $this->update($params);
//dump($this->getLastSql());
return $result;
}
}
<?php
namespace app\model;
use think\Db;
use think\Model;
class ACollectUser extends Model
{
// 设置当前模型对应的完整数据表名称
protected $table = 'a_collect_user';
public function saveCollectUser($data) {
$time = date("Y-m-d h:i:sa", time());
$data['create_time'] = $time;
$data['update_time'] = $time;
return $this->insert($data);
}
/**
* 查询数据
* 朱伟 2018-07-04
*/
public function getCollectUser($field,$params)
{
$result = Db::table($this->table)
->field($field)
//->alias('a')
->where($params)
->select();
//dump($this->getLastSql());
return $result;
}
/**
* 更新数据
* 朱伟 2018-07-04
*/
public function updateCollectUser($params)
{
$result = $this->update($params);
//dump($this->getLastSql());
return $result;
}
}
......@@ -104,7 +104,7 @@ class OImg extends BaseModel
* @param string $field
* @return false|\PDOStatement|string|\think\Collection
*/
public function getImgList(array $params, string $field = "id")
public function getImgList(array $params, string $field = "id,img_name")
{
if (isset($params["img_id"])) {
$where_["img_id"] = $params["img_id"];
......@@ -114,13 +114,12 @@ class OImg extends BaseModel
}
$where_["img_status"] = 0;
$res = $this
$data = $this->db_
->field($field)
->where($where_)
->select();
//var_dump($this->getLastSql());
return $res;
// echo $this->getLastSql();
return $data;
}
/**
......
......@@ -501,6 +501,9 @@ Route::group('broker', [
'getComment' => [ 'api_broker/news/getComment', [ 'method' => 'GET' ] ], //商学院评论列表
'commentNews' => [ 'api_broker/news/commentNews', [ 'method' => 'POST' ] ], //评论商学院文章
'addCollectUser' => [ 'api_broker/CollectUser/addCollectUser', [ 'method' => 'POST|GET' ] ], //监督执行列表 朱伟 2018-06-15
'addCollectHouse' => [ 'api_broker/CollectHouse/addCollectHouse', [ 'method' => 'POST|GET' ] ], //新增-监督执行 朱伟 2018-06-20
]);
......
......@@ -130,3 +130,7 @@ body{
#main_list>li.main-li-first>.main-area>.right-area>h6{
color: #ff9419;
}
.sp-pay-log-div+.sp-pay-log-div{
padding-top: .3rem;
}
<template>
<li @click="goPage">
<li>
<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>
<p>{{data.name}}</p>
<p>{{data.create_time}}</p>
<div>
<p>{{showContent}}</p>
<a class="comment-a-lookmore oh" href="javascript:;" @click="lookMore" v-show="!isLookMore"><span class="fl">查看更多</span></a>
<a class="comment-a-shouqi oh" href="javascript:;" @click="shouqi" v-show="isLookMore"><span>收起</span></a>
</div>
</div>
</div>
</li>
</template>
......@@ -32,25 +37,31 @@
},
data: () => ({
dealContent: '',
showContent: '',
isLookMore: false,
limitNumberNum: 40
}),
created() {
let _this = this;
let _str = _this.data.comment_content;
let _len = _str.length;
let _lim = _this.limitNumberNum;
_this.showContent = _this.dealContent = _len>_lim ? _str.slice(0,_lim)+'...' : _str;
},
mounted() {
let _this = this;
},
methods: {
goPage() {
lookMore() {
let _this = this;
_this.$router.push({
path: '/articleDetail',
query: {
'id': '123'
}
});
_this.isLookMore = true;
_this.showContent = _this.data.comment_content;
},
shouqi() {
let _this = this;
_this.isLookMore = false;
_this.showContent = _this.dealContent;
}
},
computed: {
......@@ -60,34 +71,63 @@
</script>
<style scoped>
li{
padding: 0 .3rem;
background-color: white;
}
li>div{
height: 2.2rem;
border-bottom: 1px solid #eee;
padding: .3rem 0;
}
li>div>div:nth-of-type(1){
flex-direction: column;
justify-content: center;
padding-right: .5rem;
padding-right: .24rem;
}
li>div>div:nth-of-type(1)>img{
width: .75rem;
height: .75rem;
border-radius: .375rem;
}
li>div>div:nth-of-type(1)>p:nth-of-type(1){
color: #343434;
li>div>div:nth-of-type(2){}
li>div>div:nth-of-type(2)>p:nth-of-type(1){
color: #808080;
font-size: .3rem;
}
li>div>div:nth-of-type(1)>p:nth-of-type(2){
color: #999;
li>div>div:nth-of-type(2)>p:nth-of-type(2){
color: #808080;
font-size: .24rem;
padding-top: .2rem;
padding-top: .1rem;
}
li>div>div:nth-of-type(2){
li>div>div:nth-of-type(2)>div{
padding: .2rem 0 .2rem;
color: #1a1a1a;
position: relative;
}
.comment-a-lookmore,.comment-a-shouqi{
display: block;
line-height: .4rem;
color: #FF9419;
font-size: .26rem;
position: relative;
}
li>div>div:nth-of-type(2)>img{
width: 2.2rem;
height: 1.6rem;
object-fit: cover;
.comment-a-lookmore{
width: 1.4rem;
position: absolute;
right: 0;
bottom: .2rem;
}
.comment-a-shouqi{
text-align: right;
}
.comment-a-lookmore::after{
content: '';
float: right;
width: .18rem;
height: .4rem;
padding-left: .18rem;
background: url(images/icon_down@2x.png) no-repeat center center/.18rem .13rem;
transform: rotate(180deg);
}
.comment-a-shouqi::after{
content: '';
width: .18rem;
height: .4rem;
padding-left: .36rem;
background: url(images/icon_down@2x.png) no-repeat center center/.18rem .13rem;
}
</style>
\ No newline at end of file
......@@ -2,55 +2,36 @@
<div>
<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>
<div class="article-bar">
<h1>{{articleTitle}}</h1>
<p>{{articleTime}}</p>
</div>
<div v-html="articleContent">{{articleContent}}</div>
</article>
<div class="list-commnet-area">
<h2>最新评论</h2>
<pagination-load :canload="!isStop" :distance="10" @load="getCommentList">
<ul>
<!--<li is="self-defined-li" v-for="(item2, index2) in item.dataList" :data="item2" :dataindex="index2"></li>-->
<li is="self-defined-li" v-for="(item, index) in commentDataList" :data="item" :dataindex="index"></li>
</ul>
</pagination-load>
<div class="loading-gif-block" v-show="isLoading">正在加载...</div>
<div class="no-data-block" v-if="noDataFlag">暂无数据</div>
<div class="no-more-block" v-if="!noDataFlag&&isStop">没有更多了...</div>
</div>
<div class="comment-area-seat"></div>
<div class="txt-comment-area" v-show="isCommentingFlag">
<div>
<div class="mask-comment-area" @click="isCommentingFlag = false"></div>
<div class="real-comment-area">
<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>
<a class="fr flex-center" href="javascript:;" @click="commentSend" v-show="!isSending">发送</a>
<a class="fr flex-center" href="javascript:;" v-show="isSending">发送ing</a>
</div>
</div>
</div>
......@@ -83,23 +64,76 @@
'pagination-load': paginationLoad,
'self-defined-li': selfDefinedLi
},
data: () => ({
data() {
let _this = this;
return {
headerData: {
'title': '文章详情',
'noborder': false,
'isBack': true
},
articleId: _this.$route.query.id,
token: localStorage.getItem('token'),
articleTitle: '',
articleTime: '',
articleContent: '',
commentIcon,
isCommentingFlag: false,
commentContent: ''
}),
isCommentingFlag: false,//是否正在写评论
commentContent: '',//评论的内容
isSending: false,//是否正在提交评论
isStop: false,
isLoading: false,
noDataFlag: false,
pageSize: 10,
page: 1,
commentDataList: []
};
},
created() {
let _this = this;
_this.common.duringRequest({
'urlStr': '/broker/getComment',
startAction() {
_this.isLoading = true;
},
mounted() {
let _this = this;
endAction() {
_this.isLoading = false;
}
},{
'urlStr': '/broker/commentNews',
startAction() {
_this.isSending = true;
},
endAction() {
_this.isSending = false;
}
});
_this.axios({
method: 'get',
url: '/broker/getNewsInfo',
responseType: 'json',
data: {
'id': _this.articleId,
'AuthToken': _this.token
}
})
.then(function(response) {
if(response.data.code == 200) {
let _news = response.data.data.news;
_this.articleTitle = _news.title;
_this.articleTime = _news.create_time;
_this.articleContent = _news.content;
} else {
layer.tipsX(response.data.msg);
}
})
.catch(function(error) {
layer.tipsX(error);
});
//获取评论列表
_this.getCommentList();
},
methods: {
commentSend() {
......@@ -108,8 +142,70 @@
if(_len<100 || _len>500){
layer.tipsX('评论字数需在100~500之间,当前字数为'+_len);
}else{
_this.axios({
method: 'POST',
url: '/broker/commentNews',
responseType: 'json',
data: {
'content': _this.commentContent,
'news_id': _this.articleId,
'AuthToken': _this.token
}
})
.then(function(response) {
if(response.data.code == 200) {
_this.resetCommentList();
_this.getCommentList();
_this.isCommentingFlag = false;
} else {
layer.tipsX(response.data.msg);
}
})
.catch(function(error) {
layer.tipsX(error);
});
}
},
getCommentList() {
let _this = this;
_this.axios({
method: 'get',
url: '/broker/getComment',
responseType: 'json',
data: {
'pageNo': _this.page,
'pageSize': _this.pageSize,
'news_id': _this.articleId,
'AuthToken': _this.token
}
})
.then(function(response) {
if(response.data.code == 200) {
let _list = response.data.data;
if(Array.isArray(_list)){
if(_list.length === 0) {
_this.page === 1 && (_this.noDataFlag = true);
_this.isStop = true;
} else {
_this.commentDataList.push(..._list); //这里使用push要注意,先把数组展开
_list.length < _this.pageSize && (_this.isStop = true);
_this.page++;
};
};
} else {
layer.tipsX(response.data.msg);
}
})
.catch(function(error) {
layer.tipsX(error);
});
},
resetCommentList() {
//重置评论列表的内容
let _this = this;
_this.commentDataList = [];
_this.page = 1;
_this.noDataFlag = false;
}
},
computed: {
......@@ -119,6 +215,36 @@
</script>
<style scoped>
article,.list-commnet-area{
background-color: white;
padding: .3rem;
}
article{
}
.article-bar>h1{
font-size: .4rem;
color: #1a1a1a;
}
.article-bar>p{
font-size: .3rem;
color: #999;
}
.article-bar+div{
padding-top: .3rem;
}
.list-commnet-area{
margin-top: .2rem;
}
.list-commnet-area>h2{
font-size: .32rem;
color: #1a1a1a;
}
.comment-area-seat{
height: .98rem;
}
.btn-comment-area{
position: fixed;
bottom: 0;
......@@ -148,7 +274,11 @@
width: 100%;
height: 100%;
}
.txt-comment-area>div{
.mask-comment-area{
width: 100%;
height: 100%;
}
.real-comment-area{
position: fixed;
left: 0;
bottom: 0;
......@@ -156,20 +286,20 @@
height: 2.6rem;
background-color: #f4f4f4;
}
.txt-comment-area>div>div:nth-of-type(1){
.real-comment-area>div:nth-of-type(1){
height: 1.8rem;
}
.txt-comment-area>div>div:nth-of-type(1)>textarea{
.real-comment-area>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){
.real-comment-area>div:nth-of-type(2){
padding: 0 .3rem;
}
.txt-comment-area>div>div:nth-of-type(2)>a{
.real-comment-area>div:nth-of-type(2)>a{
box-sizing: border-box;
width: 1.2rem;
height: .6rem;
......@@ -178,8 +308,12 @@
color: #999;
border: 1px solid #e0e0e0;
}
.txt-comment-area>div>div:nth-of-type(2)>a:nth-of-type(2){
.real-comment-area>div:nth-of-type(2)>a:nth-of-type(2){
background-color: #FA903F;
color: white;
}
.real-comment-area>div:nth-of-type(2)>a:nth-of-type(3){
background-color: #999;
color: white;
}
</style>
\ No newline at end of file
......@@ -3,24 +3,25 @@
<header-pulic :data="headerData"></header-pulic>
<nav>
<div class="nav-main">
<ul :style="'width: '+ulWid+'rem'">
<li v-for="(item, index) in mainData" :key="item.labelName" :data-id="item.id" :class="{active:index === initTabNumMain}" @click="tabMain(index)">{{item.labelName}}</li>
<ul class="oh" :style="'width: '+ulWid+'rem'">
<li v-for="(item, index) in mainData" :key="item.labelName" :data-id="item.id" class="pointer-click-item" :class="{active:index === initTabNumMain}" @click="tabMain(index)">{{item.labelName}}</li>
</ul>
<div class="nav-bg-right"></div>
</div>
<div class="nav-seat"></div>
</nav>
<main>
<section v-for="(item, index) in mainData">
<pagination-load :canload="!isStop" :distance="10" @load="getLoad">
<section v-for="(item, index) in mainData" v-show="index === initTabNumMain">
<pagination-load :canload="!item.isStop" :distance="30" @load="getList">
<ul>
<li is="self-defined-li" v-for="(item2, index2) in item.dataList" :data="item2" :dataindex="index2"></li>
</ul>
</pagination-load>
<div class="no-data-block" v-if="noDataFlag">暂无数据</div>
<div class="no-more-block" v-if="!noDataFlag&&isStop">没有更多了...</div>
<div class="no-data-block" v-show="item.noDataFlag">暂无数据</div>
<div class="no-more-block" v-show="!item.noDataFlag&&item.isStop">没有更多了...</div>
<div class="loading-gif-block" v-show="isLoading">正在加载...</div>
</section>
</main>
<div class="loading-gif-block" v-show="isLoading">正在加载...</div>
</div>
</template>
......@@ -46,31 +47,67 @@
'pagination-load': paginationLoad,
'self-defined-li': selfDefinedLi
},
data: () => ({
data() {
let _this = this;
let _token = _this.$route.query.token;
if(!_token) {
layer.tipsX('token获取出错');
return false;
};
return {
headerData: {
'title': '商学院',
'noborder': true,
'isBack': false
},
token: _token,
ulWid: 6.9,
pageSize: 10,
initTabNumMain: 0,
isStop: false,
isLoading: false,
noDataFlag: false,
mainData: []
}),
isLoading: false,//是否正在加载
mainData: [{
'dataList': [],
'id': 0,
'page': 1,//页码
'isLoadOnce': false,//是否请求过一次数据
'isStop': false,//是否所有页的数据加载完毕
'noDataFlag': false,//是否是无数据
'labelName': '全部'
}]
}
},
created() {
let _this = this;
_this.getLabel(()=>{
console.log(99);
_this.getPageList();
})
_this.common.duringRequest({
'urlStr': '/broker/business_school',
startAction() {
_this.isLoading = true;
},
mounted() {
let _this = this;
endAction() {
_this.isLoading = false;
}
});
_this.common.h5PageC(_this.token, () => {
_this.loadMain();
});
},
methods: {
loadMain() {
let _this = this;
_this.token = localStorage.getItem('token');
_this.getLabel(()=>{
_this.getList();
});
},
tabMain(index) {
let _this = this;
_this.initTabNumMain = index;
if(!_this.mainData[index].isLoadOnce) {
_this.getList();
};
},
getLabel(fn) {
let _this = this;
_this.axios({
......@@ -78,7 +115,7 @@
url: '/broker/getNewsLabel',
responseType: 'json',
data: {
'AuthToken': _this.$route.query.token,
'AuthToken': _this.token,
}
})
.then(function(response) {
......@@ -87,12 +124,17 @@
let _len = _data.length;
for(let i = 0;i<_len;i++){
_this.mainData.push({
'isLoadOnce': false,
'dataList': [],
'id': _data[i].id,
'page': 1,//页码
'isLoadOnce': false,//是否请求过一次数据
'isStop': false,//是否所有页的数据加载完毕
'noDataFlag': false,//是否是无数据
'labelName': _data[i].label_name
});
};
_this.ulWid = (_len*1.6>_this.ulWid)?(_len*1.6):_this.ulWid;
_this.ulWid = ((_len+1)*1.6>_this.ulWid)?((_len+1)*1.6):_this.ulWid;
fn && fn();
} else {
layer.tipsX(response.data.msg);
......@@ -102,23 +144,35 @@
layer.tipsX(error);
});
},
getPageList() {
getList() {
let _this = this;
let _index = _this.initTabNumMain;
if(!_this.isLoading && !_this.mainData[_index].isStop) {
_this.axios({
method: 'get',
//url: '/broker/business_school',
url: 'http://c.tonglianjituan.com/broker/business_school',
url: '/broker/business_school',
responseType: 'json',
data: {
'AuthToken': _this.$route.query.token,
'pageNo': 1,
'pageSize': 1000
'AuthToken': _this.token,
'pageNo': _this.mainData[_index].page,
'pageSize': _this.pageSize,
'label_id': _index
}
})
.then(function(response) {
_this.mainData[_index].isLoadOnce = true;
if(response.data.code == 200) {
let _data = response.data.data;
let _list = response.data.data.list;
if(Array.isArray(_list)){
if(_list.length === 0) {
_this.mainData[_index].page === 1 && (_this.mainData[_index].noDataFlag = true);
_this.mainData[_index].isStop = true;
} else {
_this.mainData[_index].dataList.push(..._list); //这里使用push要注意,先把数组展开
_list.length < _this.pageSize && (_this.mainData[_index].isStop = true);
_this.mainData[_index].page += 1;
};
};
} else {
layer.tipsX(response.data.msg);
}
......@@ -126,12 +180,7 @@
.catch(function(error) {
layer.tipsX(error);
});
},
tabMain() {
},
getLoad() {
};
}
},
computed: {
......@@ -145,9 +194,8 @@
width: 7.5rem;
}
nav>.nav-main {
box-sizing: border-box;
background-color: white;
width: 7.5rem;
width: 6.9rem;
height: .9rem;
line-height: .9rem;
padding: 0 .3rem;
......@@ -160,6 +208,14 @@
nav>.nav-main>ul{
/*width: 10rem;*/
}
nav>.nav-main>.nav-bg-right{
position: fixed;
right: 0;
top: .88rem;
width: .8rem;
height: .9rem;
background: url(images/img_more@2x.png) repeat-y center center/.8rem .27rem;
}
nav>.nav-seat {
height: .9rem;
}
......
......@@ -2,11 +2,11 @@
<li @click="goPage">
<div class="flex">
<div class="flex">
<p>{{data.content}}</p>
<p>{{data.time}}</p>
<p>{{data.title}}</p>
<p>{{data.create_time}}</p>
</div>
<div class="flex-center">
<img-error :datasrc="data.img" :imgtype="'avatar'"></img-error>
<img-error :datasrc="data.cover_plan" :imgtype="'div'"></img-error>
</div>
</div>
</li>
......@@ -48,7 +48,7 @@
_this.$router.push({
path: '/articleDetail',
query: {
'id': '123'
'id': _this.data.id
}
});
}
......@@ -72,6 +72,7 @@
flex-direction: column;
justify-content: center;
padding-right: .5rem;
flex: 1;
}
li>div>div:nth-of-type(1)>p:nth-of-type(1){
color: #343434;
......@@ -83,7 +84,7 @@
padding-top: .2rem;
}
li>div>div:nth-of-type(2){
flex: 2.2rem 0 0;
}
li>div>div:nth-of-type(2)>img{
width: 2.2rem;
......
......@@ -14,7 +14,7 @@
},
imgtype: {
type: String,
default: () => 'avatar'
default: () => 'div'
}
},
data() {
......
......@@ -472,6 +472,7 @@ define(['doT', 'text!temp/commission_template_tpl.html', 'text!temp/reportList_s
$("#bargaininfo_type").val(data.data.trade_type);
$("#bargaininfo_total_commission").val(data.data.commission);
$("#bargaininfo_create_time").html(data.data.create_time);
$("#bargaininfo_expect_payback_time").val(data.data.estimated_receipt_date);
$("#bargaininfo_yetai").val(data.data.industry_type);
$("#bargaininfo_chengjiao_price").val(data.data.price);
......
define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'pagination', 'bootstrapJs'], function(doT, template) {
follow = {
pageNo: 1,
......@@ -12,37 +11,68 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
ajaxObj: '',
stopstatus: true,
boxphoto: '',
image_file: '',
init: function() {
//初始化dot
$(document.body).append(template);
follow.getList(0);
follow.event();
},
event: function() {
var _doc = $(document);
var _imgMaskObj = $('#img_mask_area'); //预览大图的mask
var _imgUploadLunbo = $('#xiangqing_pic_ul'); //详情页轮播图ul
_doc.on('click', 'a[href="#modal-time"]', function(e){
follow.house_id = $ (this).attr ("data-id");
// 收款图片上传多张图片
// window.onload = function(){
// var input = document.getElementById("file_input");
// var result,div;
//
// if(typeof FileReader==='undefined'){
// result.innerHTML = "抱歉,你的浏览器不支持 FileReader";
// input.setAttribute('disabled','disabled');
// }else{
// input.addEventListener('change',readFile,false);
// }
// function readFile(){
// for(var i=0;i<this.files.length;i++){
// if (!input['value'].match(/.jpg|.gif|.png|.bmp/i)){  //判断上传文件格式
// return alert("上传的图片格式不正确,请重新选择")
//     }
// var reader = new FileReader();
// reader.readAsDataURL(this.files[i]);
// reader.onload = function(e){
// result = '<div id="result"><img src="'+this.result+'" alt=""/></div>';
// div = document.createElement('div');
// div.innerHTML = result;
// document.getElementById('body').appendChild(div);   //插入dom树 <br>          }
// }
// }
// };
// $('.span-del').click(function(){
// console.log(55);
// $(this).parent().remove();
// });
_doc.on('click', '.span-del', function(e) {
e.preventDefault();
e.stopPropagation();
$(this).parent().remove();
});
_doc.on('click', 'a[href="#modal-time"]', function(e) {
follow.house_id = $(this).attr("data-id");
e.preventDefault();
e.stopPropagation();
// console.log('follow.house_id');
$('.iframe-time-line').attr('src', '/app_broker/timeline_pc?order_id='+follow.house_id);
// console.log('follow.house_id');
$('.iframe-time-line').attr('src', '/app_broker/timeline_pc?order_id=' + follow.house_id);
});
$("#search").click(function() {
follow.getList(1);
});
//点击收款图片 2.2版本
// $(".add-pic").click(function() {
// follow.getaddPicList();
// });
_doc.on('click', '.add-pic', function(){
// $(".add-pic").click(function() {
// //监听图片上传
// follow.getaddPicList();
// });
_doc.on('click', '.add-pic', function() {
follow.getaddPicList();
});
......@@ -52,180 +82,89 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
$("#export").click(function() { //导出列表
follow.exportList();
});
$ (document).delegate (".submit_edit2", "click", function () {//提交
follow.house_id2 = $ (this).attr ("data-id");
$(document).delegate(".submit_edit2", "click", function() { //提交
follow.house_id2 = $(this).attr("data-id");
console.log(follow.house_id2);
$("#real_money").val($(this).attr ("data-money"));
$("#real_money").val($(this).attr("data-money"));
});
$ (document).delegate (".submit_edit", "click", function () {//提交
$(document).delegate(".submit_edit", "click", function() { //提交
follow.Submit_follow();
});
$ (document).on ("input","#cus_fang", function () {//手机号搜索客方2
if($("#cus_fang").val()==''){
$(document).on("input", "#cus_fang", function() { //手机号搜索客方2
if($("#cus_fang").val() == '') {
$(".user-ul2").html('');
}else{
} else {
follow.search_phone2();
}
});
$ (document).delegate (".addphone2", "click", function () {//list2消失
$(document).delegate(".addphone2", "click", function() { //list2消失
follow.addphone2(this);
});
//图片上传 2.2版本
//图片上传,附件上传处理事件
$(".upload-image-btn").click(function() {
var _this = $(this),
_spFile = _this.data('spfile'),
_limitTop = _this.data('limittop'),
_fileNum = _this.parent().next().find('.delet-pic-btn').length; //根据删除按钮的个数,确定文件的个数
if(_limitTop && (_fileNum < _limitTop)) {
BrowseServer(_this.prev().attr('id'), function(url) {
console.log(url);
if(_spFile == 'pdf') {
if(/(\.pdf)$/i.test(url)) {
_this.parent().next().prepend('<li class="pdf-pre-li"><a class="pdf-pre-a" href="{0}" target="_blank" title="点击查看">{1}</a><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({
'0': url,
'1': dealFileName(decodeURI(url.slice(url.lastIndexOf('/') + 1)))
}));
} else {
alert('所选择的格式不是pdf,请重新选择');
return false;
}
} else {
if(/(\.jpg|\.jpeg|\.png|\.gif|\.bmp)$/i.test(url)) {
_this.parent().next().prepend('<li><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({
'0': url
}));
} else {
alert('所选择的格式不正确,请重新选择');
return false;
}
};
});
} else {
alert('上传上限为 ' + _limitTop);
return false;
};
});
//图片上传删除键事件
_doc.on('click', '.delet-pic-btn', function(e) {
var _this = $(this);
e.preventDefault();
e.stopPropagation();
if(confirm('确定删除该文件吗?')){
var _imgId = _this.parent().attr('data-imgid');
if(_imgId){
$.ajax({
type: 'POST',
url: '/index/delHouseFile',
data: {
'id': _imgId,
'house_id': 3104,
},
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(_data) {
if(typeof _data === 'object') {
if(_data['code'] == '200') {
_this.parent().remove();
} else {
alert(_data['msg']);
}
} else {
alert('数据错误');
};
},
error: function() {
alert('enter error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout') {
//处理超时的逻辑
alert('请求超时,请重试');
};
}
});
}else{
_this.parent().remove();
}
};
});
//图片预览点击放大事件
_doc.on('click', '.img-pre-ul>li>img', function(e) {
_imgMaskObj.show().find('img').attr('src', this.src);
});
_imgMaskObj.click(function(e) {
this.style.display = 'none';
});
//保存上传的图片
_doc.on('click', '#saveBtn', function(e) {
console.log(555);
var _this = $(this);
var _data={
id:3104,
var _data = {
type: 1,
image1: follow.image_file
};
e.preventDefault();
e.stopPropagation();
var _imgUploadLunbo = $('#xiangqing_pic_ul'); //详情页轮播图ul
var _xiangqingPicObj = _imgUploadLunbo.find('li>img');
var _urlCut = location.origin + '/resource/lib/Attachments/images/';//要截取的部分url
$.each(_xiangqingPicObj, function(i, item) {
_data['slide_show[' + i + ']'] = item.src.replace(_urlCut, '');
});
var _imgId = _this.parent().attr('data-imgid');
$.ajax({
type: 'POST',
url: '/index/houseEdit',
data: _data,
// timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(_data) {
if(typeof _data === 'object') {
} else {
alert('数据错误');
};
},
error: function() {
alert('enter error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout') {
//处理超时的逻辑
alert('请求超时,请重试');
};
}
});
// $.ajax({
// type: 'GET',
// url: '/index/uploadImg',
// data: _data,
//// timeout: 30000,
// dataType: 'json',
// beforeSend: function() {},
// success: function(_data) {
// if(typeof _data === 'object') {
//
// } else {
// alert('数据错误');
// };
// },
// error: function() {
// alert('enter error');
// },
// complete: function(xhr, textStatus){
// if(textStatus === 'timeout') {
// //处理超时的逻辑
// alert('请求超时,请重试');
// };
// }
// });
});
//图片上传 2.2版本
},
addphone2:function(obj){
var user_ht=$(obj).html();
addphone2: function(obj) {
var user_ht = $(obj).html();
$("#cus_fang").val(user_ht);
$(".user-ul2").html('');
follow.agent_id = $ (obj).attr ("data-id");
follow.agent_id = $(obj).attr("data-id");
},
search_phone2:function(){//手机号
$.ajax ({
search_phone2: function() { //手机号
$.ajax({
url: '/index/select_by_phone',
type: 'POST',
async: true,
data: {
"phone":$("#cus_fang").val()
"phone": $("#cus_fang").val()
},
dataType: 'json',
success: function (data) {
if (data.code == 200) {
success: function(data) {
if(data.code == 200) {
var user_ul2 = "";
$.each(data.data, function(i,item) {
user_ul2+='<li class="addphone2" data-id="'+item.id+'">'+item.id+'-'+item.realname+'-'+item.phone+'</li>';
$.each(data.data, function(i, item) {
user_ul2 += '<li class="addphone2" data-id="' + item.id + '">' + item.id + '-' + item.realname + '-' + item.phone + '</li>';
});
$(".user-ul2").html(user_ul2);
......@@ -249,40 +188,77 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
success: function(data) {
if(data.code == 200) {
follow.getList(0);
} else {
}
} else {}
}
});
},
//点击收款图片 调用的接口
getaddPicList: function() { //提交
var _imgUploadLunbo = $('#xiangqing_pic_ul'); //详情页轮播图ul
var _urlCut = location.origin + '/resource/lib/Attachments/images/';//要截取的部分url
_imgUploadLunbo.empty();
$.ajax({
'type': 'GET',
'url': '/index/houseEdit',
data: {
"id": 3104,
},
dataType: "json",
success: function(data) {
if(data.code == 200) {
var _data = data['data'];
for(var i in _data['slide_show']) {
_imgUploadLunbo.append('<li data-imgid="{id}"><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({
'0': _urlCut + _data['slide_show'][i]['img_name'],
'id': _data['slide_show'][i]['id']
}));
};
getaddPicList: function() {
// follow.getList(0);
var input = document.getElementById("file_input");
var result, div;
if(typeof FileReader === 'undefined') {
result.innerHTML = "抱歉,你的浏览器不支持 FileReader";
input.setAttribute('disabled', 'disabled');
} else {
input.addEventListener('change', readFile, false);
};
function readFile() {
console.log(this.files);
// var _this=$(this);
for(var i = 0; i < this.files.length; i++) {
if(!input['value'].match(/.jpg|.gif|.png|.bmp/i)) {   //判断上传文件格式
return alert("上传的图片格式不正确,请重新选择")    
}
var reader = new FileReader();
reader.readAsDataURL(this.files[i]);
reader.onload = function(e) {
result = '<div class="result"><img src="' + this.result + '" alt=""/> <span class="span-del">删除</span></div>';
div = document.createElement('div');
div.innerHTML = result;
document.getElementById('container_body').appendChild(div);   
}
};
var formData = new FormData();
formData.append('type',1);
formData.append('image',this.files[0]);
console.log(this.files[0]);
console.log(formData);
$.ajax({
type: 'post',
url: '/index/uploadImg',
data: formData,
dataType: 'json',
contentType: false,
cache: false,
processData:false,
beforeSend: function() {},
success: function(_data) {
if(typeof _data === 'object') {
} else {
alert('数据错误');
};
},
error: function() {
alert('enter error');
},
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
//处理超时的逻辑
alert('请求超时,请重试');
};
}
});
};
},
// 导出列表
//删除图片
// 导出列表
exportList: function(pageNo) {
console.log(2);
follow.pageNo = pageNo;
......@@ -298,8 +274,8 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
var store_name = $('#store_name').val();
var report_phone = $('#applicant_phone').val();
var report_name = $('#applicant_name').val();
window.open('/index/getCollection?'+
'excel='+ excel_two +'&user_name=' + user_name + '&start_time=' + start_time + '&end_time=' + end_time + '&internal_title=' + internal_title + '&user_phone=' + user_phone + '&id=' + id+ '&store_name=' + store_name+ '&report_phone=' + report_phone+ '&report_name=' + report_name);
window.open('/index/getCollection?' +
'excel=' + excel_two + '&user_name=' + user_name + '&start_time=' + start_time + '&end_time=' + end_time + '&internal_title=' + internal_title + '&user_phone=' + user_phone + '&id=' + id + '&store_name=' + store_name + '&report_phone=' + report_phone + '&report_name=' + report_name);
},
getList: function(pageNo) {
......@@ -308,15 +284,15 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
console.log($('#shop_name').val());
follow.pageNo = pageNo;
var params = {};
params.user_name =$.trim($('#customer_name').val());
params.start_time =$('#start_date').val();
params.end_time =$('#end_date').val();
params.internal_title =$('#shop_name').val();
params.user_phone =$('#customer_phone').val();
params.id =$('#shop_num').val()*1;
params.store_name =$('#store_name').val();
params.report_phone =$('#applicant_phone').val();
params.report_name =$('#applicant_name').val();
params.user_name = $.trim($('#customer_name').val());
params.start_time = $('#start_date').val();
params.end_time = $('#end_date').val();
params.internal_title = $('#shop_name').val();
params.user_phone = $('#customer_phone').val();
params.id = $('#shop_num').val() * 1;
params.store_name = $('#store_name').val();
params.report_phone = $('#applicant_phone').val();
params.report_name = $('#applicant_name').val();
params.pageNo = follow.pageNo;
params.pageSize = follow.pageSize;
......@@ -329,67 +305,66 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
beforeSend: function() {},
success: function(data) {
if(typeof data === 'object') {
if (data.code == 200) {
if(data.code == 200) {
var doTtmpl = doT.template(document.getElementById('get_collection_tpl').innerHTML);
$("#follow_list").html(doTtmpl(data.data.list));
// 支付方式 10支付宝 20 微信 30pos机器 40转账 50现金 60其他
$("#follow_list tr").each(function (e) {
$("#follow_list tr").each(function(e) {
//e代表索引 从0开始 eq(0)就是第一行
var temp = $("#follow_list").find("tr").eq(e).find("td").eq(5).html(); //获取一列的值
var temp_two = $("#follow_list").find("tr").eq(e).find("td").eq(6).html();
// null
var temp_one = $("#follow_list").find("tr").eq(e).find("td").eq(1).html();
if(temp_two*1==10){
if(temp_two * 1 == 10) {
$("#follow_list").find("tr").eq(e).find("td").eq(6).html("支付宝")
}
if(temp_two*1==20){
if(temp_two * 1 == 20) {
$("#follow_list").find("tr").eq(e).find("td").eq(6).html("微信")
}
if(temp_two*1==30){
if(temp_two * 1 == 30) {
$("#follow_list").find("tr").eq(e).find("td").eq(6).html("pos机器")
}
if(temp_two*1==40){
if(temp_two * 1 == 40) {
$("#follow_list").find("tr").eq(e).find("td").eq(6).html("转账")
}
if(temp_two*1==50){
if(temp_two * 1 == 50) {
$("#follow_list").find("tr").eq(e).find("td").eq(6).html("现金")
}
if(temp_two*1==60){
if(temp_two * 1 == 60) {
$("#follow_list").find("tr").eq(e).find("td").eq(6).html("其他")
}
// 付款类型 10意向金 20定金 30保管金 40押金 50 租金 60 进场费 70转让费 80其他
if(temp*1==10){
if(temp * 1 == 10) {
$("#follow_list").find("tr").eq(e).find("td").eq(5).html("意向金")
}
if(temp*1==20){
if(temp * 1 == 20) {
$("#follow_list").find("tr").eq(e).find("td").eq(5).html("定金")
}
if(temp*1==30){
if(temp * 1 == 30) {
$("#follow_list").find("tr").eq(e).find("td").eq(5).html("保管金")
}
if(temp*1==40){
if(temp * 1 == 40) {
$("#follow_list").find("tr").eq(e).find("td").eq(5).html("押金")
}
if(temp*1==50){
if(temp * 1 == 50) {
$("#follow_list").find("tr").eq(e).find("td").eq(5).html("租金")
}
if(temp*1==60){
if(temp * 1 == 60) {
$("#follow_list").find("tr").eq(e).find("td").eq(5).html("进场费")
}
if(temp*1==70){
if(temp * 1 == 70) {
$("#follow_list").find("tr").eq(e).find("td").eq(5).html("转让费")
}
if(temp*1==80){
if(temp * 1 == 80) {
$("#follow_list").find("tr").eq(e).find("td").eq(5).html("其他")
}
if(temp*1==90){
if(temp * 1 == 90) {
$("#follow_list").find("tr").eq(e).find("td").eq(5).html("佣金")
}
// null 佣金
if(temp_one=='null'){
if(temp_one == 'null') {
$("#follow_list").find("tr").eq(e).find("td").eq(1).html(" ")
}
});
......@@ -397,7 +372,7 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
$("#money_total").html(data.data.money_total)
/*分页代码*/
add_page(data.data.total,pageNo,follow.pageSize,follow.getList);
add_page(data.data.total, pageNo, follow.pageSize, follow.getList);
/* $("#pagediv").pagination({
length:data.data.total,
current: pageNo,
......@@ -406,18 +381,18 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
follow.getList(el.num.current);
}
});*/
}else {
} else {
alert(data['msg']);
};
}else{
} else {
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout'){
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
alert('请求超时');
};
}
......
......@@ -450,7 +450,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
$("#bargaininfo_type").val(data.data.trade_type);
$("#bargaininfo_total_commission").val(data.data.commission);
$("#bargaininfo_create_time").html(data.data.create_time);
$("#bargaininfo_expect_payback_time").html(data.data.payback_time);
$("#bargaininfo_expect_payback_time").val(data.data.estimated_receipt_date);
$("#bargaininfo_yetai").val(data.data.industry_type);
$("#bargaininfo_chengjiao_price").val(data.data.price);
......@@ -490,7 +490,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
'trade_type': $('#bargaininfo_type').val(),
'industry_type': $.trim($('#bargaininfo_yetai').val()),
'price': $('#bargaininfo_chengjiao_price').val(),
'payback_time': $('#bargaininfo_expect_payback_time').val(),
'estimated_receipt_date': $('#bargaininfo_expect_payback_time').val(),
'step': bargain.mainTabIndex+1
};
......
......@@ -487,7 +487,7 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
// 封面图一张
if(_data['cover_plan']){
_imgUploadLiebiao.html('<li><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({
'0': _urlCut + _data['cover_plan']
'0': _data['cover_plan']
}));
};
// 封面图一张
......@@ -532,15 +532,15 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
var _data = {};
//字符串形式 传过去
$.each(_liebiaoPicObj, function(i, item) {
_data['file_img[' + i + ']'] = item.src.replace(_urlCut, '');
// _data['file_img[' + i + ']'] = item.src;
});
// $.each(_liebiaoPicObj, function(i, item) {
// _data['file_img'] = item.src.replace(_urlCut, '');
//// _data['file_img[' + i + ']'] = item.src;
//
// });
_data.title = $("#announcement_title").val();
_data.title2 = $("#district_id2").val();//商学院标签id
// _data.file_img = _liebiaoPicObj[0].src.replace(_urlCut, '');//封面图 剪切后的字符串
_data.s_label_id = $("#district_id2").val();//商学院标签id
_data.file_img = _liebiaoPicObj[0].src.replace(_urlCut, '');//封面图 剪切后的字符串
_data.content = _dajiangtangVal;
// if (params.title == '') {
// alert('标题不能为空');
......
......@@ -468,6 +468,7 @@ define(['doT', 'text!temp/tax_template_tpl.html', 'text!temp/reportList_shuiFee2
$("#bargaininfo_type").val(data.data.trade_type);
$("#bargaininfo_total_commission").val(data.data.commission);
$("#bargaininfo_create_time").html(data.data.create_time);
$("#bargaininfo_expect_payback_time").val(data.data.estimated_receipt_date);
$("#bargaininfo_yetai").val(data.data.industry_type);
$("#bargaininfo_chengjiao_price").val(data.data.price);
......
......@@ -399,9 +399,9 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
var params = {};
// 增加客户id的搜索 客户姓名和手机号搜索分开
// params.name = $("input[name='user']").val();
// params.phone = $("input[name='phone']").val();
// params.nameID = $("input[name='nameID']").val();
params.user_nick = $("input[name='user']").val();
params.phone = $("input[name='phone']").val();
params.id = $("input[name='userID']").val();
params.phone = $("input[name='phone']").val();
params.invite_phone = $("input[name='invite_phone']").val();
params.start_date = $("#start_date").val();
......
......@@ -15,7 +15,7 @@
</td>
<!--<td>[%= it[item]["label_name"] %]</td>-->
<!--没有评论数字段-->
<td>[%= it[item]["create_time"] %]</td>
<td>[%= it[item]["comment_number"] %]</td>
<td>
<a class="btn1 btn-success" href="new_text.html?id=[%= it[item]["id"] %]" data-createTime='[%= it[item]["create_time"] %]' data-title='[%= it[item]["title"] %]' data-id='[%= it[item]["id"] %]' data-content='[%= it[item]["content"] %]' target="_blank">
......@@ -23,7 +23,7 @@
</a>
[% if(check_auth('index/delNews')) { %]
<!--删除权限-->
<a class="btn1 btn-success announcement-del" href="#modal-delete" data-toggle="modal" data-id='[%= it[item]["id"] %]'>删除</a>
<a class="btn1 btn-danger announcement-del" href="#modal-delete" data-toggle="modal" data-id='[%= it[item]["id"] %]'>删除</a>
[% } %]
</td>
......
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