Commit 74687a49 authored by hujun's avatar hujun

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

parents 2fe01f51 eea7f74d
...@@ -161,6 +161,47 @@ class Collection extends Basic ...@@ -161,6 +161,47 @@ class Collection extends Basic
} }
/**
* 收款列表-收款图片列表
* 朱伟 2018-07-04
*/
public function receiptImgList(){
$params = $this->params;
$params = array(
"id" => 6,
);
if(!isset($params["id"])){
return $this->response("101","请求参数错误");
}
$params['id'] = $params["id"];
$field = 'id,father_id';
//先查询收款表
$order = new OPayLogModel();
$order_res = $order->selectReceiptImgList($field , $params);
//判断收款表数据father_id是否大于o,如果大于0图片需要按img_id=father_id查询
if(!empty($order_res[0]['father_id']) && ($order_res[0]['father_id'] > 0)){
$params_img['img_id'] = $order_res[0]['father_id'];
}else{
$params_img['img_id'] = $params['id'];
}
$field = 'id,img_name';
$order = new OImg();
$res = $order->getImgList($params_img,$field);
foreach ($res as $k => $v) {
$res[$k]['img_name'] = CHAT_IMG_URL . $v['img_name'];
}
if($res){
return $this->response("200","成功",$res);
}else{
return $this->response("200","成功",$res);
}
}
/** /**
* 收款列表记录上传图片 * 收款列表记录上传图片
* 朱伟 2018-07-04 * 朱伟 2018-07-04
......
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
<div class="pull-right"> <div class="pull-right">
<ul class="bread_btn"> <ul class="bread_btn">
<li> <li>
<a href="new_text.html" class="btn btn-default add_alert"><i class="icon-plus"></i> 新增文章 <a href="new_text.html" class="btn btn-default add_alert" target="_blank"><i class="icon-plus"></i> 新增文章
</a> </a>
</li> </li>
</ul> </ul>
......
...@@ -114,10 +114,13 @@ class OImg extends BaseModel ...@@ -114,10 +114,13 @@ class OImg extends BaseModel
} }
$where_["img_status"] = 0; $where_["img_status"] = 0;
return $this $res = $this
->field($field) ->field($field)
->where($where_) ->where($where_)
->select(); ->select();
//var_dump($this->getLastSql());
return $res;
} }
/** /**
......
...@@ -74,6 +74,9 @@ class OPayLogModel extends Model ...@@ -74,6 +74,9 @@ class OPayLogModel extends Model
public function selectPayLogByOrderNo($filed , $params) public function selectPayLogByOrderNo($filed , $params)
{ {
$where_ = []; $where_ = [];
if (isset($params["id"])) {
$where_["id"] = $params["id"];
}
if (isset($params["report_id"])) { if (isset($params["report_id"])) {
$where_["report_id"] = $params["report_id"]; $where_["report_id"] = $params["report_id"];
} }
...@@ -330,4 +333,21 @@ class OPayLogModel extends Model ...@@ -330,4 +333,21 @@ class OPayLogModel extends Model
public function getMoneyTotal() { public function getMoneyTotal() {
return $this->sum('money'); return $this->sum('money');
} }
/**
* 收款列表-查询收款数据
* 朱伟 2018-07-04
*/
public function selectReceiptImgList($filed , $params)
{
$where_ = [];
if (isset($params["id"])) {
$where_["id"] = $params["id"];
}
return Db::table($this->table)
->field($filed)
->where($where_)
->select();
}
} }
\ No newline at end of file
...@@ -234,6 +234,7 @@ Route::group('index', [ ...@@ -234,6 +234,7 @@ Route::group('index', [
'checkOver' => [ 'index/Finance/checkOver', [ 'method' => 'POST' ] ], //财务结单 'checkOver' => [ 'index/Finance/checkOver', [ 'method' => 'POST' ] ], //财务结单
'addReceiptImg' => [ 'index/Collection/addReceiptImg', [ 'method' => 'post|get' ] ],//收款图片信息保存 'addReceiptImg' => [ 'index/Collection/addReceiptImg', [ 'method' => 'post|get' ] ],//收款图片信息保存
'deleteReceiptImg' => [ 'index/Collection/deleteReceiptImg', [ 'method' => 'post|get' ] ],//删除收款图片 'deleteReceiptImg' => [ 'index/Collection/deleteReceiptImg', [ 'method' => 'post|get' ] ],//删除收款图片
'receiptImgList' => [ 'index/Collection/receiptImgList', [ 'method' => 'post|get' ] ],//收款列表-收款图片列表
......
...@@ -10,6 +10,7 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde ...@@ -10,6 +10,7 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
//初始化dot //初始化dot
$ ("body").append (template); $ ("body").append (template);
user.getList (); user.getList ();
user.event (); user.event ();
//时间控件初始化 //时间控件初始化
/* $('#datetimepicker').datetimepicker({ /* $('#datetimepicker').datetimepicker({
...@@ -89,6 +90,10 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde ...@@ -89,6 +90,10 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
$('.notice-title').html($ (this).attr ("data-title")); $('.notice-title').html($ (this).attr ("data-title"));
$('.notice-time').html($ (this).attr ("data-createTime")); $('.notice-time').html($ (this).attr ("data-createTime"));
$('.notice-text').html($ (this).attr ("data-content")); $('.notice-text').html($ (this).attr ("data-content"));
user.news_id = $ (this).attr ("data-id");
console.log(user.news_id);
user.announcement_details();
}); });
$ (document).on ("input","#set_father_id3", function () {//手机号搜索客方 $ (document).on ("input","#set_father_id3", function () {//手机号搜索客方
if($("#set_father_id3").val()==''){ if($("#set_father_id3").val()==''){
...@@ -458,38 +463,35 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde ...@@ -458,38 +463,35 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
} }
}); });
}, },
//点击收款图片 调用的接口 //点击编辑 调用的接口
getaddPicList: function() { //提交 announcement_details: function() { //提交
var news_id = getUrlParam('id');//地址栏获取的商铺或者街铺id
var _imgUploadLunbo = $('#xiangqing_pic_ul'); //详情页轮播图ul var _imgUploadLunbo = $('#xiangqing_pic_ul'); //详情页轮播图ul
var _imgUploadLiebiao = $('#liebiao_pic_ul');//列表页封面图ul var _imgUploadLiebiao = $('#liebiao_pic_ul');//列表页封面图ul
var _urlCut = location.origin + '/resource/lib/Attachments/images/';//要截取的部分url var _urlCut = location.origin + '/resource/lib/Attachments/images/';//要截取的部分url
_imgUploadLunbo.empty(); var _dajiangtangObj = $('#dajiangtang'); //大讲堂
$.ajax({ $.ajax({
'type': 'GET', 'type': 'GET',
'url': '/index/houseEdit', 'url': '/index/getNewsInfo',
data: { data: {
"id": 3104, 'id':news_id,
}, },
dataType: "json", dataType: "json",
success: function(data) { success: function(data) {
if(data.code == 200) { if(data.code == 200) {
//获取标签 id
$("#announcement_title").val(data.data.title);
$("#district_id2").val(data.data.s_label_id*1);//商学院标签id
// 获取封面图
var _data = data['data'];
// 封面图一张 // 封面图一张
if(_data['cover']){ if(_data['cover_plan']){
_imgUploadLiebiao.html('<li><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({ _imgUploadLiebiao.html('<li><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({
'0': _urlCut + _data['cover'] '0': _urlCut + _data['cover_plan']
})); }));
}; };
// 封面图一张 // 封面图一张
_dajiangtangObj.find('iframe').contents().find('body').html(_data['content']); //大讲堂
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']
}));
};
// follow.getList(0);
} else { } else {
} }
} }
...@@ -510,6 +512,7 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde ...@@ -510,6 +512,7 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
}); });
$("#district_id").append(str); $("#district_id").append(str);
$("#district_id2").append(str); $("#district_id2").append(str);
user.announcement_details();
fn && fn(); fn && fn();
} }
} }
...@@ -529,15 +532,15 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde ...@@ -529,15 +532,15 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
var _data = {}; var _data = {};
//字符串形式 传过去 //字符串形式 传过去
// $.each(_liebiaoPicObj, function(i, item) { $.each(_liebiaoPicObj, function(i, item) {
//// _data['cover[' + i + ']'] = item.src.replace(_urlCut, ''); _data['file_img[' + i + ']'] = item.src.replace(_urlCut, '');
// _data['file_img[' + i + ']'] = item.src; // _data['file_img[' + i + ']'] = item.src;
//
// }); });
_data.title = $("#announcement_title").val(); _data.title = $("#announcement_title").val();
_data.title2 = $("#district_id2").val();//商学院标签id _data.title2 = $("#district_id2").val();//商学院标签id
_data.file_img = _liebiaoPicObj[0].src;//封面图 // _data.file_img = _liebiaoPicObj[0].src.replace(_urlCut, '');//封面图 剪切后的字符串
_data.content = _dajiangtangVal; _data.content = _dajiangtangVal;
// if (params.title == '') { // if (params.title == '') {
// alert('标题不能为空'); // alert('标题不能为空');
...@@ -576,6 +579,9 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde ...@@ -576,6 +579,9 @@ define (['doT', 'text!temp/schoolBusiness_template_tpl.html','ckfinder','ckfinde
$ ("#modal_add_user").modal ('hide');//提交成功 关闭模态框 $ ("#modal_add_user").modal ('hide');//提交成功 关闭模态框
user.getList(1); user.getList(1);
alert('提交成功') alert('提交成功')
// window.open('/index/business_school.html');
window.location.href='/index/business_school';
console.log(66);
} else { } else {
alert(data.msg); alert(data.msg);
} }
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<td>[%= it[item]["create_time"] %]</td> <td>[%= it[item]["create_time"] %]</td>
<td> <td>
<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" 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> </a>
[% if(check_auth('index/delNews')) { %] [% if(check_auth('index/delNews')) { %]
......
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