Commit 1acb85d2 authored by agping's avatar agping

后台

parent 8e1e23e2
......@@ -653,6 +653,33 @@
</div>
<!-- /.modal -->
</div>
<!--时间轴-->
<div class="modal fade" id="modal-del" 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">
×
</button>
<h4 class="modal-title">
删除退款
</h4>
</div>
<div class="modal-body" class="iframe-div-parent">
<div style="font-size: 18px;padding: 20px;">确定删除该笔退款!!</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_deleteMoney" data-dismiss="modal">
确定
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<div id="img_mask_area" title="点击任意位置可关闭">
<img />
</div>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
6666
</body>
</html>
\ No newline at end of file
{layout name="global/frame_two_tpl" /}
<input type="hidden" class="page-load" id="videoCheckList" />
<style>
video{
width: 296px;
height: 200px;
}
.modal-body {
/*height: 600px;*/
overflow-y: auto;
padding-bottom: 60px;
}
.user-ul2 {
width: 100%;
height: auto;
padding-bottom: 15px;
float: left;
}
.user-ul2 li {
list-style: none;
line-height: 30px;
}
.money_total_two {
font-weight: bold;
font-size: 15px;
}
#search {
float: left;
}
#reset {
float: left;
}
#district_id {
width: 16%!important;
}
#follow_up_con{
width: 32%!important;
}
.clear{
clear: both;
}
.btn-top-house{
margin-top: 20px;
text-align: center;
}
.ld-Marheight-city{
margin-top: 8px;
}
/*加载图标*/
#main_loading_pic {
position: fixed;
top: 50%;
left: 50%;
width: 100px;
height: 100px;
margin-left: 50px;
margin-top: -100px;
overflow: hidden;
display: none;
}
/*跟进人 下拉式搜索*/
.user-ul-liu{
height: auto;
float: left;
position: relative;
left: -40px;
}
.user-ul-liu li{
list-style: none;
line-height: 30px;
}
.left-phone-liu{
float: left;
margin-top: 7px;
margin-left: 10px;
}
</style>
<div id="page-content-wrapper">
<div class="container">
<div class="row">
<div class="">
<div class="panel panel-default">
<div class="panel-heading breadcrumb">
<li>
<a href="javascript:;">商铺视频</a>
</li>
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<tr>
<td colspan="10">
<form id="form_search">
<select class="form-control btn4 ld-Marheight input" name="" id="district_id">
<option value="">上传人所属部门</option>
</select>
<select class="form-control btn4 ld-Marheight input" name="" id="guest_stores" value="">
</select>
<select class="form-control btn4 ld-Marheight input" name="" id="guest_stores_agent" value="">
</select>
<div class="left-phone-liu">
<input class="form-control" data-rule-phoneus="false" data-rule-required="false" id="partical_name" placeholder="上传人姓名" type="text" value="">
<ul class="user-ul-liu"></ul>
</div>
<select class="form-control btn2 ld-Marheight" id="shop_area_id">
<option value="-1">是否审核过</option>
<option value="0"></option>
<option value="1"></option>
</select>
<input class="form-control btn2" data-rule-phoneus="false" data-rule-required="false" id="partical_name" placeholder="商铺ID" type="text" value="" style="margin-top: 7px;">
<div class="clear">
</div>
<span class="btn btn-info btn3 ld-Marheight" id="search">搜索</span>
<span class="btn btn-info btn3 ld-Marheight" id="reset">重置</span>
</form>
</td>
</tr>
<tr>
<th class="text-center">上传时间</th>
<th class="text-center">上传人</th>
<th class="text-center">商铺ID</th>
<th class="text-center">是否审核通过</th>
<th class="text-center">操作</th>
</tr>
</thead>
<tbody class="text-center" id="shop_video_list">
</table>
</div>
<!-- /#page-content-wrapper -->
<div class="text-right" id="pagediv">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- #查看-->
<div class="modal fade modal_followup" id="modal_shop_detail" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-one">
<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 detail-modal-header-tab" >
<a href="javascript:;" class="btn btn-default">视频</a>
<a href="javascript:;" class="btn btn-info">查看商铺</a>
</h4>
</div>
<div class="modal-body modal-body-one">
<div class="detail-modal-body-sec">
视频
</div>
<div class="detail-modal-body-sec">
<iframe class="iframe-shop-detail"></iframe>
</div>
</div>
</div>
</div>
</div>
<!--审核-->
<div class="modal fade modal_followup" id="modal_shop_check" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-one" style="width: 800px;">
<div class="modal-content" style="height: 600px;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title detail-modal-header-tab">
审核视频
</h4>
</div>
<div class="modal-body modal-body-one">
<div style="overflow: hidden;">
<div style="float: left; text-align: center;">
<video src="/resource/image/liu.mp4" controls="controls" type="video/mp4"></video>
<br />
<span class="text-danger">删除</span>
</div>
<div style="float: left;margin-top: 80px;margin-left: 10px;">
<a class="btn btn-info">审核通过</a>
<span class="text-danger">备注:视频将展示给客户看,请注意不要泄露位置!</span>
</div>
</div>
<div>上传人:周小雨&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;上传时间:2019.1.10 12:00:00</div>
</div>
</div>
</div>
</div>
<!--加载图标-->
<div id="main_loading_pic">
<img src="/resource/image/jz2.gif">
</div>
......@@ -12,6 +12,7 @@ define(['doT', 'text!temp/refund_template_tpl.html', 'css!style/home.css', 'ckfi
moneyTotal : "" ,
agent_id_phone : '',
check_status : 1 ,
deleteRefundId:'',
init: function() {
//初始化dot
$(document.body).append(template);
......@@ -57,6 +58,15 @@ define(['doT', 'text!temp/refund_template_tpl.html', 'css!style/home.css', 'ckfi
var id = that.deleteId;
that.deleteTableRow(id);
});
//点击删除退款 获取退款id
$(document).on('click','.is_del',function(e){
refund.deleteRefundId = $(this).attr('data-id');
});
//删除退款
$(document).on('click','#confirm_deleteMoney',function(e){
that.deleteRefund(refund.deleteRefundId);
});
//搜索
$(document).on('click','#search',function(e){
that.getList(1);
......@@ -78,7 +88,7 @@ define(['doT', 'text!temp/refund_template_tpl.html', 'css!style/home.css', 'ckfi
});
//操作----时间轴
$(document).on('click','.timeline',function(e){
var house_id = e.target.dataset.id;;
var house_id = e.target.dataset.id;
e.preventDefault();
e.stopPropagation();
$('.iframe-time-line').attr('src', '/app_broker/timeline_pc?order_id=' + house_id);
......@@ -385,7 +395,26 @@ define(['doT', 'text!temp/refund_template_tpl.html', 'css!style/home.css', 'ckfi
}
});
},
//删除退款
deleteRefund: function(id) {
$.ajax({
url: '/index/delRefund',
type: 'POST',
async: true,
data: {
"refund_id": id
},
dataType: 'json',
success: function(data) {
if(data.code == 200) {
alert(data.msg);
} else {
alert(data.msg);
}
}
});
},
//将li里的值 赋给input(分佣方姓名)
addphone: function(obj) {//新增客户 input赋值
var that = refund ;
......
define(['doT', 'text!temp/video_check_list_template_tpl.html', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'pagination', 'bootstrapJs'], function(doT, template) {
house = {
pageNo: 1,
/*第几页*/
pageSize: 10,
AuthToken: '',
agent_id: 0,
agent_phone: '',
agent_name: '',
isFollowupSaving: false,
/*每页显示多少条*/
id: '',
house_id: '',
type: '',
valueCurrent: '',
ajaxObj: '',
stopstatus: true,
boxphoto: '',
detailTabIndex:0,//查看 弹出框 tab切换 初始化
agent_id_phone:'',//下拉跟进人id
init: function() {
//初始化dot
$(document.body).append(template);
house.event();
house.getList(1);
},
event: function() {
var _doc = $(document);
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
house.AuthToken = user_info_obj.AuthToken;
house.agent_id = user_info_obj.id;
house.phone = user_info_obj.phone;
house.name = user_info_obj.name;
// 部门 门店 二级联动
house.getDistrict(function() {
_doc.on('input', '#district_id, #district_id2', function() {
var _this = $(this);
var _id = _this.val();
_this.next().html(''); //先清空
if(_id && _id != '0') {
house.getDistrictStoreList(_id, function(_data) {
var _str = '<option value="">跟进人所在门店</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.id + '">' + item.store_name + '</option>';
});
_this.next().html(_str);
});
} else {};
});
});
//门店 经纪人联动
_doc.on('input', '#guest_stores', function() {
var _this = $(this);
var _id = _this.val();
_this.next().html(''); //先清空
if(_id && _id != '0') {
house.getStoreAgentList(_id, function(_data) {
var _str = '<option value="">选择跟进人</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.id + '">' +item.id + '-' + item.name + '-' + item.phone + '</option>';
});
_this.next().html(_str);
});
} else {};
});
$("#search").click(function() { //搜索
house.getList(1);
});
$("#reset").click(function() { //重置
document.getElementById("form_search").reset();
$('#guest_stores').html('');//重置门店
$('#guest_stores_agent').html('');//重置经纪人
house.agent_id_phone='';//重置经纪人id
});
//查看弹出框里的tab点击事件,查看商铺,商铺跟进
_doc.on('click', '.detail-modal-header-tab>a', function(e){
e.preventDefault();
e.stopPropagation();
var _this = $(this);
_this.removeClass('btn-default').addClass('btn-info').siblings().removeClass('btn-info').addClass('btn-default');
house.detailTabIndex = _this.index();
$('.detail-modal-body-sec:nth-of-type('+(house.detailTabIndex+1)+')').show().siblings().hide();
if(house.detailTabIndex == 1){
$('.iframe-shop-detail').attr('src', '/app_broker/shop_detail_pc?shop_id='+house.id);
}else if(house.detailTabIndex == 0){
$('.followup-modal-comment-area>textarea').val('');//清空跟进框内容
house.getFollowupList();
}
});
//点击查看,触发定位事件
_doc.on('click', '[href="#modal_detail"]', function(){
var _this = $(this);
if(_this.hasClass('btn-success')){
_this.removeClass('btn-success').addClass('btn-warning');
};
});
//点击跟进,获取商铺跟进动态的接口
_doc.on('click', '[href="#modal_followup"]', function(){
house.id = $(this).attr("data-id");
$('.followup-modal-comment-area>textarea').val('');//清空跟进框内容
house.getFollowupList();
});
//跟进姓名 下拉式搜索
$(document).on("input", "#partical_name", function() { //手机号新增搜索客方
if($("#partical_name").val() == '') {
house.agent_id_phone='';
$(".user-ul-liu").html('');
} else {
house.search_phone_liu();
}
});
//点击li 列表消失
$(document).delegate(".addphoneliu", "click", function() { //list消失新增客户 点击li事件 获取id ul消失
house.addphoneliu(this);
});
//查看点击事件
_doc.on('click', 'a[href="#modal_shop_detail"]', function(e){
e.preventDefault();
e.stopPropagation();
var _this = $(this);
_this.removeClass('btn-success').addClass('btn-warning');
var _id = _this.attr('data-id');
house.id=_id;
console.log(_id);
$('.detail-modal-header-tab>a:nth-of-type(1)').removeClass('btn-default').addClass('btn-info').siblings().removeClass('btn-info').addClass('btn-default');
house.detailTabIndex = 0;
$('.detail-modal-body-sec:nth-of-type(1)').show().siblings().hide();
$('.followup-modal-comment-area>textarea').val('');//清空跟进框内容
house.getFollowupList();
// $('.iframe-shop-detail').attr('src', '/app_broker/shop_detail_pc?shop_id='+_id);
});
},
getList: function(pageNo) { //商铺跟进列表
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
house.pageNo = pageNo;
var params = {};
//时间转化为时间戳
params.start_time = '1553184000';
params.end_time = '1553270399';
params.district_id = $('#district_id').val();//部门
params.store_id = $('#guest_stores').val();//门店
params.house_id = $('#houseID').val();//商铺 id
params.name_or_phone = $('#user_phone').val();
params.agent_id = house.agent_id_phone?house.agent_id_phone:$('#guest_stores_agent').val(); //下拉搜索 跟进人id
params.search_content = $('#follow_up_con').val();
params.pageNo = house.pageNo;
params.pageSize = house.pageSize;
params.AuthToken = user_info_obj.AuthToken;
$.ajax({
type: 'POST',
url: '/broker/houseFollowUpList', //商铺跟进 对接接口
data: params,
timeout: 30000,
dataType: 'json',
beforeSend: function() {
$('#main_loading_pic').show();
},
success: function(data) {
if(typeof data === 'object') {
if(data.code == 200) {
var doTtmpl = doT.template(document.getElementById('video_check_list_tpl').innerHTML);
$("#shop_video_list").html(doTtmpl(data.data.result));
/*分页代码*/
add_page(40000, pageNo, house.pageSize, house.getList);
$('.hide-total-info-liu').hide();
} else {
alert(data['msg']);
};
} else {
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function() {
$('#main_loading_pic').hide();
}
});
},
//调用部门 和 门店的接口
getDistrict: function(fn) {
$.ajax({
url: '/index/getDistrict',
type: 'GET',
async: true,
data: {
"pageSize": 1000
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
var str = '';
$.each(data.data, function(i, item) {
str += '<option value="' + item.id + '">' + item.district_name + '</option>';
});
$("#district_id").append(str);
$("#district_id2").append(str);
fn && fn();
}
}
});
},
getDistrictStoreList: function(id, fn) {
$.ajax({
url: '/index/getDistrictStoreList',
type: 'GET',
async: true,
data: {
'id': id,
"pageSize": 1000
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
fn && fn(data.data);
}
}
});
},
//获取门店的 经纪人
getStoreAgentList: function(id, fn) {
$.ajax({
url: '/index/getBroker_new',
type: 'GET',
async: true,
data: {
'store_id': id,
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
fn && fn(data.data);
}
}
});
},
//跟进人 姓名搜索
search_phone_liu: function() { //手机号新增客户
$.ajax({
url: '/index/getBroker_new',
type: 'GET',
async: true,
data: {
"phone": $("#partical_name").val(),
'all' : 1
},
dataType: 'json',
success: function(data) {
if(data.code == 200) {
var user_ul = "";
$.each(data.data, function(i, item) {
if(item.status == 0){
var status=' ';
};
if(item.status == 1){
var status='-长假';
};
if(item.status == 2){
var status='-离职';
};
if(item.status == 3){
var status='-转勤';
};
if(item.status == 4){
var status='-黑名单';
}
user_ul += '<li class="addphoneliu" data-id="' + item.id + '">' + item.id + '-' + item.name + '-' + item.phone + status + '</li>';
});
$(".user-ul-liu").html(user_ul);
} else {
alert(data.msg);
}
}
});
},
//将li里的值 赋给input(分佣方姓名)
addphoneliu: function(obj) {//新增客户 input赋值
var user_ht = $(obj).html()+'';
var user_ht_str=user_ht.substring(0,user_ht.length-3);
$("#partical_name").val(user_ht_str);
$(".user-ul-liu").html('');
house.agent_id_phone = $(obj).attr("data-id");
},
};
return house;
});
\ No newline at end of file
......@@ -44,7 +44,7 @@
<td>
<a class="btn1 btn-success timeline" href="#modal-time" data-toggle="modal" data-id='[%= it[item]["order_id"] %]'>时间轴</a>
<a class="btn1 btn-success rejected" href="#modal-check" data-toggle="modal" data-id='[%= it[item]["id"] %]'>审核</a>
<!--<a class="btn1 btn-success is_pass" href="#modal-pass" data-toggle="modal" data-id='[%= it[item]["id"] %]'>打印</a>-->
<a class="btn1 btn-success is_del" href="#modal-del" data-toggle="modal" data-id='[%= it[item]["id"] %]'>删除退款</a>
</td>
</tr>
[% } %]
......
<script id="video_check_list_tpl" type="text/template">
[% if(it&&it.length!=0) { %]
[% for(var item in it){ %]
<tr class="text-center">
<td width="47%" class="text-left follow-up-home">[%= dealPunctuation(it[item]['follow_up_info']) %]</td>
<td>[%= it[item]['name'] %]</td>
<td>[%= it[item]['house_id'] %]</td>
<td>
[% if(it[item]["internal_title"] != null) { %]
[%= hideStr(it[item]['internal_title']) %]
[% } %]
</td>
<td>
<a class="btn1 btn-success" href="#modal_shop_check" data-id='[%= it[item]["house_id"] %]' data-toggle="modal">审核</a>
<a class="btn1 btn-success" href="#modal_shop_detail" data-id='[%= it[item]["house_id"] %]' data-toggle="modal">查看商铺</a>
</td>
</tr>
[% } %]
[% }else{ %]
<tr>
<td colspan="8" style="text-align:center;"> 暂无数据</td>
</tr>
[% } %]
</script>
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