Commit 324baadd authored by agping's avatar agping

监督执行修改

parent 7d6f21bb
...@@ -49,10 +49,18 @@ ...@@ -49,10 +49,18 @@
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="start_date" name="start_date1" type="date"> <input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="start_date" name="start_date1" type="date">
<span class="fore-span ld-Marheight">-</span> <span class="fore-span ld-Marheight">-</span>
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="end_date" name="end_date1" type="date"> <input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="end_date" name="end_date1" type="date">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="visitors_shop" placeholder="拜访人所属门店名称" type="text" value=""> <!--二级联动-->
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="visitors_phone" placeholder="拜访人手机号" type="text" value=""> <select class="form-control btn4 ld-Marheight input" name="" id="district_id" >
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="visitors_name" placeholder="拜访人姓名" type="text" value=""> <option value="">所属部门</option>
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="visiting_shop" placeholder="拜访的门店名称" type="text" value="">
</select>
<select class="form-control btn4 ld-Marheight input" name="" id="guest_stores" value="">
</select>
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="submit_phone" placeholder="提交人手机号" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="submit_remark" placeholder="跟进内容" type="text" value="">
<span class="btn btn-info btn3 ld-Marheight" id="search">搜索</span> <span class="btn btn-info btn3 ld-Marheight" id="search">搜索</span>
<span class="btn btn-info btn3 ld-Marheight" id="reset">重置</span> <span class="btn btn-info btn3 ld-Marheight" id="reset">重置</span>
</form> </form>
...@@ -93,7 +101,8 @@ ...@@ -93,7 +101,8 @@
</h4> </h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<img src="images/banner/Tulips.jpg" alt="" /> <img src="" alt="" class="review-images2"/>
<!--<img src="images/banner/Tulips.jpg" alt="" />-->
</div> </div>
</div><!-- /.modal-content --> </div><!-- /.modal-content -->
</div><!-- /.modal --> </div><!-- /.modal -->
......
...@@ -27,11 +27,31 @@ define(['doT', 'text!temp/carry_out_template_tpl.html', 'css!style/home.css', 'c ...@@ -27,11 +27,31 @@ define(['doT', 'text!temp/carry_out_template_tpl.html', 'css!style/home.css', 'c
// console.log('follow.house_id'); // console.log('follow.house_id');
$('.iframe-time-line').attr('src', '/app_broker/timeline_pc?order_id='+follow.house_id); $('.iframe-time-line').attr('src', '/app_broker/timeline_pc?order_id='+follow.house_id);
}); });
//二级联动
follow.getDistrict(function(){
_doc.on('input', '#district_id, #district_id2', function(){
var _this = $(this);
var _id = _this.val();
_this.next().html('');//先清空
if(_id && _id != '0'){
follow.getDistrictStoreList(_id, function(_data){
var _str = '';
$.each(_data, function(i,item) {
_str += '<option value="'+item.id+'">'+item.store_name+'</option>';
});
_this.next().html(_str);
});
}else{
};
});
});
$("#search").click(function() { $("#search").click(function() {
follow.getList(1); follow.getList(1);
}); });
$("#reset").click(function() { //重置 $("#reset").click(function() { //重置
document.getElementById("form_search").reset(); document.getElementById("form_search").reset();
$('#guest_stores').html('');
}); });
$("#export").click(function() { //导出列表 $("#export").click(function() { //导出列表
follow.exportList(); follow.exportList();
...@@ -42,6 +62,11 @@ define(['doT', 'text!temp/carry_out_template_tpl.html', 'css!style/home.css', 'c ...@@ -42,6 +62,11 @@ define(['doT', 'text!temp/carry_out_template_tpl.html', 'css!style/home.css', 'c
$("#real_money").val($(this).attr ("data-money")); $("#real_money").val($(this).attr ("data-money"));
});
$ (document).delegate (".review-images", "click", function () {//提交
// console.log($(this).attr ("data-img"));
$('.review-images2').attr('src',$(this).attr ("data-img"));
}); });
$ (document).delegate (".submit_edit", "click", function () {//提交 $ (document).delegate (".submit_edit", "click", function () {//提交
follow.Submit_follow(); follow.Submit_follow();
...@@ -126,6 +151,44 @@ define(['doT', 'text!temp/carry_out_template_tpl.html', 'css!style/home.css', 'c ...@@ -126,6 +151,44 @@ define(['doT', 'text!temp/carry_out_template_tpl.html', 'css!style/home.css', 'c
window.open('/index/getCollection?'+ 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); '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);
}, },
//调用部门 和 门店的接口
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);
}
}
});
},
getList: function(pageNo) { getList: function(pageNo) {
console.log($('#customer_name').val()); console.log($('#customer_name').val());
...@@ -133,15 +196,12 @@ define(['doT', 'text!temp/carry_out_template_tpl.html', 'css!style/home.css', 'c ...@@ -133,15 +196,12 @@ define(['doT', 'text!temp/carry_out_template_tpl.html', 'css!style/home.css', 'c
console.log($('#shop_name').val()); console.log($('#shop_name').val());
follow.pageNo = pageNo; follow.pageNo = pageNo;
var params = {}; var params = {};
params.user_name =$.trim($('#customer_name').val()); params.create_time_start =$.trim($('#start_date').val());
params.start_time =$('#start_date').val(); params.create_time_end =$('#end_date').val();
params.end_time =$('#end_date').val(); params.district_id =$('#district_id').val();
params.internal_title =$('#shop_name').val(); params.store_id =$('#guest_stores').val();
params.user_phone =$('#customer_phone').val(); params.phone =$('#submit_phone').val();
// params.id =$('#shop_num').val()*1; params.remark =$('#submit_remark').val();
params.store_name =$('#store_name').val();
params.report_phone =$('#applicant_phone').val();
params.report_name =$('#applicant_name').val();
params.pageNo = follow.pageNo; params.pageNo = follow.pageNo;
params.pageSize = follow.pageSize; params.pageSize = follow.pageSize;
......
...@@ -48,17 +48,18 @@ define (['doT', 'text!temp/notice_template_tpl.html','ckfinder','ckfinderStart', ...@@ -48,17 +48,18 @@ define (['doT', 'text!temp/notice_template_tpl.html','ckfinder','ckfinderStart',
$("#confirm_delete").click(function(){ $("#confirm_delete").click(function(){
var params = {}; var params = {};
params.id = $ ("#delete_id").val (); params.id = user.announcementdel_id;
params.status = 1; console.log(user.announcementdel_id);
if(!params.id || params.id == null){ if(!params.id || params.id == null){
alert ("要删除的id不能为空"); alert ("要删除的id不能为空");
return false; return false;
} }
user.delete_user(params); user.delete_user(params);
}); });
// $ (document).delegate (".announcement-del", "click", function () { $ (document).delegate (".announcement-del", "click", function () {
//// user.announcement-del = $ (this).attr ("data-id"); user.announcementdel_id = $ (this).attr ("data-id");
// }); console.log(user.announcementdel_id);
});
$ (document).delegate (".add_alert", "click", function () {//新增客户 $ (document).delegate (".add_alert", "click", function () {//新增客户
document.getElementById("add_user_form").reset(); document.getElementById("add_user_form").reset();
...@@ -327,6 +328,11 @@ define (['doT', 'text!temp/notice_template_tpl.html','ckfinder','ckfinderStart', ...@@ -327,6 +328,11 @@ define (['doT', 'text!temp/notice_template_tpl.html','ckfinder','ckfinderStart',
alert('内容不能为空'); alert('内容不能为空');
$("#announcement_content").focus(); $("#announcement_content").focus();
return ; return ;
}
if (params.content.length > 250) {
alert('公告字数250以内');
$("#announcement_content").focus();
return ;
} }
$.ajax ({ $.ajax ({
url: '/index/addNotice', url: '/index/addNotice',
...@@ -336,6 +342,7 @@ define (['doT', 'text!temp/notice_template_tpl.html','ckfinder','ckfinderStart', ...@@ -336,6 +342,7 @@ define (['doT', 'text!temp/notice_template_tpl.html','ckfinder','ckfinderStart',
dataType: 'json', dataType: 'json',
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
$ ("#modal_add_user").modal ('hide');//提交成功 关闭模态框
user.getList(1); user.getList(1);
alert('提交成功') alert('提交成功')
} else { } else {
...@@ -346,7 +353,7 @@ define (['doT', 'text!temp/notice_template_tpl.html','ckfinder','ckfinderStart', ...@@ -346,7 +353,7 @@ define (['doT', 'text!temp/notice_template_tpl.html','ckfinder','ckfinderStart',
}, },
delete_user : function(params) { delete_user : function(params) {
$.ajax ({ $.ajax ({
url: '/index/del_user', url: '/index/delNotice',
type: 'POST', type: 'POST',
async: true, async: true,
data: params, data: params,
...@@ -403,9 +410,6 @@ define (['doT', 'text!temp/notice_template_tpl.html','ckfinder','ckfinderStart', ...@@ -403,9 +410,6 @@ define (['doT', 'text!temp/notice_template_tpl.html','ckfinder','ckfinderStart',
return user; return user;
}); });
function delete_user (obj) {
$ ("#delete_id").val ($ (obj).attr ("data-id"));
}
function edit(obj) { function edit(obj) {
var params = {} var params = {}
......
...@@ -3,11 +3,12 @@ ...@@ -3,11 +3,12 @@
[% for(var item in it){ %] [% for(var item in it){ %]
<tr class="text-center"> <tr class="text-center">
<td>[%= it[item]['create_time'] %]</td> <td>[%= it[item]['create_time'] %]</td>
<td>[%= it[item]['user_name'] %]</td> <td>[%= it[item]['name'] %]</td>
<td>[%= it[item]['user_phone'] %]</td> <td>[%= it[item]['address'] %]</td>
<td>[%= it[item]['money'] %]</td> <td>[%= it[item]['remark'] %]</td>
<td> <td>
<a class="btn1 btn-info timeline" href="#modal-time" data-toggle="modal" data-id='[%= it[item]["order_id"] %]'>查看</a> <a class="btn1 btn-info review-images" href="#modal-time" data-toggle="modal" data-img='[%= it[item]["supervise_img"] %]'>查看</a>
<!--<a class="btn1 btn-info timeline" href="#modal-time" data-toggle="modal" data-id='[%= it[item]["order_id"] %]'>查看</a>-->
</td> </td>
</tr> </tr>
......
...@@ -9,12 +9,9 @@ ...@@ -9,12 +9,9 @@
<a class="btn1 btn-success announcement-details" href="#modal-record" data-toggle="modal" data-createTime='[%= it[item]["create_time"] %]' data-title='[%= it[item]["title"] %]' data-content='[%= it[item]["content"] %]'> <a class="btn1 btn-success announcement-details" href="#modal-record" data-toggle="modal" data-createTime='[%= it[item]["create_time"] %]' data-title='[%= it[item]["title"] %]' data-content='[%= it[item]["content"] %]'>
查看 查看
</a> </a>
<a class="btn1 btn-success genj_ure" href="#modal-delete" data-toggle="modal" data-id='[%= it[item]["id"] %]'> <a class="btn1 btn-success announcement-del" href="#modal-delete" data-toggle="modal" data-id='[%= it[item]["id"] %]'>
删除 删除
</a> </a>
<!--<a class="btn1 btn-danger " href="#modal-delete" data-toggle="modal" onclick="delete_user(this)" data-id='[%= it[item]["id"] %]'>-->
<!--删除-->
<!--</a>-->
</td> </td>
</tr> </tr>
[% } %] [% } %]
......
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