Commit a2e261c1 authored by agping's avatar agping

收款记录修改

parent 3e2f3a98
......@@ -57,7 +57,12 @@
<th>姓名</th>
<th>手机号</th>
<th>角色</th>
<!--2.2版本 -->
<!--<th>评价次数</th>
<th>分数</th>-->
<th>操作</th>
</tr>
</thead>
<tbody id="agentlist">
......@@ -199,4 +204,38 @@
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
\ No newline at end of file
</div>
<!--绑定手机 2.2版本-->
<div class="modal fade" id="modal-unbundling" 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">
<form class="form-horizontal">
<div class="form-group">
绑定手机
<!--<label class="col-sm-3 control-label">权限角色:</label>
<select name="status" class="form-control btn6" id="edit_role">
</select>-->
</div>
</form>
</div>
<div class="modal-footer">
<!--<button type="button" class="btn btn-default" data-dismiss="modal">关闭
</button>
<button type="button" class="btn btn-primary submit_user" data-dismiss="modal">
提交
</button>-->
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
......@@ -20,6 +20,8 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
},
event: function() {
var _doc = $(document);
var _imgMaskObj = $('#img_mask_area'); //预览大图的mask
_doc.on('click', 'a[href="#modal-time"]', function(e){
follow.house_id = $ (this).attr ("data-id");
e.preventDefault();
......@@ -56,6 +58,99 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
$ (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': _id
},
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';
});
//图片上传 2.2版本
},
addphone2:function(obj){
......
......@@ -12,6 +12,9 @@
<td>[%= it[item]["name"] %]</td>
<td>[%= it[item]["phone"] %]</td>
<td>[%= it[item]["groupname"] %]</td>
<!--增加评价次数 分数2.2-->
<!--<td>[%= it[item]["groupname"] %]</td>
<td>[%= it[item]["groupname"] %]</td>-->
<!--<td><span class="fa fa-check text-success"></span></td>-->
<td>
<a class="btn1 btn-success edit" href="#modal-edit" data-toggle="modal" data-id='[%= it[item]["id"] %]'>编辑</a>
......@@ -27,6 +30,9 @@
[% if(check_auth('index/updateRole')) {%]
<a href="#modal-user" class="btn1 btn-danger" id='role' href="#modal-edit" data-toggle="modal" data-id='[%= it[item]["id"] %]'>角色设置</a>
[% } %]
<!--增加绑定手机号按钮 2.2版本-->
<!--<a class="btn1 btn-success" href="#modal-unbundling" data-toggle="modal" data-id='[%= it[item]["id"] %]'>绑定手机</a>-->
</td>
</tr>
[% } %]
......
......@@ -12,6 +12,8 @@
<td>[%= it[item]['internal_address'] %]</td>
<td>[%= it[item]['house_number'] %]</td>
<td>
<!--增加收款图片 2.2版本-->
<!--<a class="btn1 btn-info add-pic" href="#modal-addPic" data-toggle="modal" data-id='[%= it[item]["order_id"] %]'>收款图片</a>-->
<a class="btn1 btn-info timeline" href="#modal-time" data-toggle="modal" data-id='[%= it[item]["order_id"] %]'>时间轴</a>
<a class="btn1 btn-info submit_edit2" href="#modal-linetime" data-toggle="modal" data-id='[%= it[item]["id"]%]' data-money='[%= it[item]["real_money"] %]'>编辑</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