Commit 6cf08438 authored by hujun's avatar hujun

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

parents 536d6d55 dbdba08d
......@@ -77,7 +77,7 @@ class Collection extends Basic
}
if (empty($this->params['excel'])) {
$field = 'a.id,a.order_id,a.create_time,c.user_name,c.user_phone,a.money,a.real_money,a.pay_type,a.house_number,a.type,d.internal_title,d.internal_address,a.source';
$field = 'a.id,a.father_id,a.order_id,a.create_time,c.user_name,c.user_phone,a.money,a.real_money,a.pay_type,a.house_number,a.type,d.internal_title,d.internal_address,a.source';
$data['data']['list'] = $order->getAddPayLogOrderListLmit($pageNo, $pageSize, $order_ = 'a.id desc', $field, $where);
$data['data']['total'] = $order->getAddPayLogOrderListLmitTotal($where);
$data['data']['money_total'] = $order->getMoneyTotal(); //总额
......
......@@ -97,83 +97,106 @@
margin-top: -350px;
}
/*上传图片列表 样式*/
.form-group {
margin: 10px;
}
}
.input-100-width {
.input-100-width {
width: 100px!important;
}
}
.input-360-width {
.input-360-width {
width: 360px!important;
}
}
.textarea-500-width {
.textarea-500-width {
width: 500px!important;
}
}
.list-group-item>.full-width-100+.full-width-100 {
.list-group-item>.full-width-100+.full-width-100 {
padding-top: 10px;
}
}
.list-group-item>.full-width-100>label {
.list-group-item>.full-width-100>label {
width: 60px;
}
}
.list-group-item>.full-pic-area>label {
.list-group-item>.full-pic-area>label {
width: 120px;
}
.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;
}
.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;
color: #fff;
display: block;
background: #317ef3;
margin:5px 0 0 0px;
margin: 5px 0 0 0px;
cursor: pointer;
}
.hide{
.hide {
display: none !important;
}
.result{
.result,.result2 {
width: 600px;
}
.result>img{
.result>img,.result2>img{
width: 200px;
height: 200px;
}
/*css样式*/
#container_body{
position: relative;
}
#file_input {
opacity: 0;
position: absolute;
top: 0;
left: 145px;
height: 35px;
width: 80px;
}
.out-style {
position: absolute;
top: 0;
left: 60px;
}
/*css样式*/
</style>
<div id="page-content-wrapper">
<div class="container">
......@@ -308,6 +331,7 @@
<!--input上传图片-->
<div id="container_body">
<label>请选择一个图像文件:</label>
<button type="button btn2" class="btn btn-default">上传图片</button>
<input type="file" id="file_input"/>
</div>
</div>
......@@ -320,7 +344,7 @@
<div class="modal-footer">
<!--<button type="button" class="btn btn-default" data-dismiss="modal">关闭
</button>-->
<button type="button" class="btn btn-primary" id="saveBtn" data-dismiss="modal">
<button type="button btn2" class="btn btn-primary" id="saveBtn" data-dismiss="modal">
保存
</button>
</div>
......@@ -331,4 +355,4 @@
</div>
<div id="img_mask_area" title="点击任意位置可关闭">
<img />
</div>
\ No newline at end of file
</div>
\ No newline at end of file
......@@ -279,8 +279,11 @@ function loadMain(){
var _this = $(this);
if((_this.attr('data-markid') == '1') || (_this.attr('data-markid') == '4')){
//如果选择了未打通,或取消拨打,则直接关闭
if(_this.parent().parent().index() === 0){
//只有在.genjin-mark-area-putong,电话跟进特有,下的标签才会隐藏
_genjinModal.hide();//跟进模态框关闭
return false;
}
};
if(!_this.hasClass('genjin-mark-active')){
_this.addClass('genjin-mark-active').siblings().removeClass('genjin-mark-active');
......@@ -292,8 +295,6 @@ function loadMain(){
e.preventDefault();
e.stopPropagation();
var _genjinMarkOBj = $('.genjin-mark-area-zhuangtai .genjin-mark-active'),
_genjinMarkOBj2 = $('.genjin-mark-area-putong .genjin-mark-active'),
_beizhuObjVal = $.trim(_beizhuObj.val()),
......@@ -340,9 +341,6 @@ function loadMain(){
if(_isFreeFlag) {
freePhone();
};
layer.close(_index);
return false;
//如果是电话跟进,选择了没打通或者取消拨打,则关掉不进行提交
}else{
$.ajax({
type: 'POST',
......
......@@ -48,8 +48,8 @@
<li class="main-sec-li">
<div>应收佣金<span class="left">{{commission}}</span></div>
</li>
<li class="main-sec-li">
<div>预计收款时间<span class="left">{{commission}}</span></div>
<li class="main-sec-li" v-if="!(estimated_receipt_date==''||estimated_receipt_date==null)">
<div>预计收款时间<span class="left">{{estimated_receipt_date}}</span></div>
</li>
</ul>
<ul v-for="(item, index) in list">
......@@ -182,6 +182,7 @@
house_number: '',
price: '',
commission: '',
estimated_receipt_date:'',
is_open: '',
trade_type: '',
token: '',
......@@ -230,7 +231,14 @@
}
if(e =='5') {
return '合作方'
}else{
}if(e =='6') {
return 'APP盘下载方'
}
if(e =='7') {
return 'APP客下载方'
}
else{
layer.tipsX('分佣方类型判断错误');
}
},
......@@ -260,6 +268,7 @@
_this.house_number = response.data.data.bargainInfo.house_number;
_this.commission = response.data.data.bargainInfo.commission;
_this.price = response.data.data.bargainInfo.price;
_this.estimated_receipt_date=response.data.data.bargainInfo.estimated_receipt_date;
_this.list = response.data.data.bargainInfo.realIncome;
_this.Datas = response.data.data.cent_commission;
_this.taxDatas = response.data.data.taxes;
......
This diff is collapsed.
......@@ -17,6 +17,7 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
$(document.body).append(template);
follow.getList(0);
follow.event();
follow.getaddPicList2();
},
event: function() {
......@@ -56,6 +57,15 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
e.stopPropagation();
$(this).parent().remove();
});
_doc.on('click', '.span-del2', function(e) {
e.preventDefault();
e.stopPropagation();
$(this).parent().remove();
$(this).prev().attr('class');
console.log($(this).prev().attr('class'));
follow.spandelList($(this).prev().attr('class'));
});
_doc.on('click', 'a[href="#modal-time"]', function(e) {
follow.house_id = $(this).attr("data-id");
e.preventDefault();
......@@ -73,7 +83,9 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
// follow.getaddPicList();
// });
_doc.on('click', '.add-pic', function() {
follow.house_id = $(this).attr("data-id");
follow.getaddPicList();
});
$("#reset").click(function() { //重置
......@@ -108,37 +120,42 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
_doc.on('click', '#saveBtn', function(e) {
console.log(555);
var _this = $(this);
var _data = {
type: 1,
image1: follow.image_file
};
e.preventDefault();
e.stopPropagation();
// $.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('请求超时,请重试');
// };
// }
// });
var imgname=[];
for(var i=0;i<$('.result').length;i++){
imgname[i]=$('.result>img').get(i).getAttribute("class");
}
console.log(imgname.join(','));
var _data = {
img_id: follow.house_id,
img_name: imgname.join(',')
};
$.ajax({
type: 'GET',
url: '/index/addReceiptImg',
data: _data,
dataType: 'json',
beforeSend: function() {},
success: function(_data) {
if(typeof _data === 'object') {
follow.getList(0);
} else {
alert('数据错误');
};
},
error: function() {
alert('enter error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout') {
//处理超时的逻辑
alert('请求超时,请重试');
};
}
});
});
//图片上传 2.2版本
......@@ -192,9 +209,49 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
}
});
},
//点击收款图片 调用的接口
getaddPicList: function() {
spandelList: function(n) { //提交
$.ajax({
'type': 'POST',
'url': '/index/deleteReceiptImg',
data: {
id:n
},
dataType: "json",
success: function(data) {
if(data.code == 200) {
} else {}
}
});
},
getaddPicList: function() {//获取收款图片
// container_body
$('.result2,.result').remove();
$.ajax({
'type': 'GET',
'url': '/index/receiptImgList',
data: {
"id": follow.house_id,
},
dataType: "json",
success: function(data) {
if(data.code == 200) {
//渲染已经有的列表
for(i=0;i<data.data.length;i++){
var result = '<div class="result2"><img class="' + data.data[i].id + '" src="' + data.data[i].img_name + '" alt=""/> <span class="span-del2">删除</span></div>';
div = document.createElement('div');
div.innerHTML = result;
document.getElementById('container_body').appendChild(div);
}
 
} else {}
}
});
},
//点击收款图片 调用的接口 上传图片
getaddPicList2: function() {
var input = document.getElementById("file_input");
var result, div;
if(typeof FileReader === 'undefined') {
......@@ -203,30 +260,21 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
} 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]);
formData.append('type', 'chat');
formData.append('image', this.files[0]);
console.log(this.files[0]);
console.log(formData);
reader.onload = function(e) {
var result2 = this.result;
$.ajax({
type: 'post',
url: '/index/uploadImg',
......@@ -234,13 +282,17 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
dataType: 'json',
contentType: false,
cache: false,
processData:false,
processData: false,
beforeSend: function() {},
success: function(_data) {
if(typeof _data === 'object') {
if(_data.code == 200) {
result = '<div class="result"><img class="' + _data.data.img_path + '" src="' + result2 + '" alt=""/> <span class="span-del">删除</span></div>';
div = document.createElement('div');
div.innerHTML = result;
document.getElementById('container_body').appendChild(div); 
} else {
alert('数据错误');
alert(_data.msg);
};
},
error: function() {
......@@ -253,6 +305,9 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
};
}
});
 
}
};
};
},
......
......@@ -518,7 +518,7 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
}
});
},
add_news : function () {//新增文章
add_news : function () {//新增文章 编辑文章
var _imgUploadLiebiao = $('#liebiao_pic_ul');//列表页封面图ul
var _liebiaoPicObj = _imgUploadLiebiao.find('li>img');
var _urlCut = location.origin + '/resource/lib/Attachments/images/';//要截取的部分url
......@@ -538,6 +538,10 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
//
// });
if(getUrlParam('id')){
_data.id = getUrlParam('id');
};
_data.title = $("#announcement_title").val();
_data.s_label_id = $("#district_id2").val();//商学院标签id
_data.file_img = _liebiaoPicObj[0].src.replace(_urlCut, '');//封面图 剪切后的字符串
......
......@@ -13,12 +13,9 @@
<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>
<a class="btn1 btn-info add-pic" href="#modal-addPic" data-toggle="modal" data-id='[%= it[item]["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>
</tr>
[% } %]
......
......@@ -18,6 +18,7 @@
<td>[%= it[item]["comment_number"] %]</td>
<td>
_data.title = $("#announcement_title").val();
<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">
编辑
</a>
......
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