新增备注

master
chenzhi 5 years ago
parent c5e3d78835
commit 8bfe249251

@ -112,7 +112,7 @@ class CompanyStatementController extends ThinkController
$this->checkListOrCountAuthRestMap($map);//导出权限
//条件end
$data = M("company_statement","tab_")
->field("id,withdraw_type,company_name,company_belong,statement_begin_time,statement_end_time,statement_money,platform_amount,verify_status,verify_log,op_time")
->field("id,withdraw_type,company_name,company_belong,statement_begin_time,statement_end_time,statement_money,platform_amount,verify_status,verify_log,op_time,remark")
->where($map)
->order("op_time Desc")->page($page,$row)->select();
foreach($data as $k => &$v) {
@ -298,6 +298,17 @@ class CompanyStatementController extends ThinkController
"info"=>$opname."成功"
));
}
//保存备注
public function saveRemark(){
if(!isset($_REQUEST['id'])) $this->error("参数错误");
$id = $_REQUEST['id'];
$remark = $_REQUEST['remark'];
$this->DBModel->where("id = '{$id}'")->save(['remark'=>$remark]);
$this->ajaxReturn(array(
'status' => 1,
'info' => "操作成功"
));
}
//重算
public function updateStatement()
{

@ -48,6 +48,14 @@
.data_list table td{
line-height: 2;
}
.layui-layer-title {
text-align: center;
height: 42px;
line-height: 42px;
font-weight: 400;
font-size: 14px;
}
</style>
<div class="cf main-place top_nav_list navtab_list">
@ -230,6 +238,7 @@
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"
charset="UTF-8"></script>
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
<script src="__STATIC__/layer/extend/layer.ext.js"></script>
<script type="text/javascript">
</script>
<script>
@ -403,6 +412,77 @@
$("body").append(iframeExcel)
}
})
//新增批注
$(".addRemark").click(function(){
var id = $(this).data("id");
layer.prompt({
formType: 2,
value: '',
title: '输入备注',
area: ['360px', '300px'] //自定义文本域宽高
}, function(value, index, elem){
if(value != ''){
$.ajax({
type: "POST",
url: "{:U('saveRemark')}",
dataType: 'json',
async: false,
data: {id:id,remark:value},
success:function(data){
if(data.status==1){
layer.msg("<font style='color:white'>" + data.info + "</font>");
setTimeout(function(){
window.location.reload();
},1500);
}
}
});
}else{
layer.closeAll();
}
});
})
//编辑批注
$(".editRemark").click(function(){
var id = $(this).data("id");
var remark = $(this).data("remark");
layer.prompt({
formType: 2,
title: '修改备注',
value:remark,
area: ['360px', '300px'],
btnAlign: 'c',
id: 'prompt',
yes: function (index, layero) {
// 获取文本框输入的值
var value = layero.find(".layui-layer-input").val();
$.ajax({
type: "POST",
url: "{:U('saveRemark')}",
dataType: 'json',
async: false,
data: {id:id,remark:value},
success:function(data){
if(data.status==1){
layer.msg("<font style='color:white'>" + data.info + "</font>");
setTimeout(function(){
window.location.reload();
},1500);
}
}
});
}
});
})
//查看批注
$(".viewRemark").click(function () {
var remark = $(this).data("remark");
layer.open({
type: 1,
title:false,
content:"<div style='width: 300;height:auto;margin: auto;padding:20px;'>"+remark+"</div>"
});
});

@ -1890,7 +1890,8 @@ CREATE TABLE `tab_company_statement_pool` (
`statement_begin_time` int(11) NOT NULL DEFAULT '0' COMMENT '对账开始时间',
`statement_end_time` int(11) NOT NULL DEFAULT '0' COMMENT '对账截止时间',
`statement_money` decimal(10,2) DEFAULT '0.00' COMMENT '对账金额',
`pay_amount` decimal(10,2) DEFAULT '0.00' COMMENT '流水金额',
`pay_amount` decimal(10,2) DEFAULT '0.00' COMMENT '总计',
`platform_amount` decimal(10,2) DEFAULT '0.00' COMMENT '平台流水金额',
`verify_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '审核状态 -2:打款失败 -1审批拒绝 0:未审批 1:审核通过 2:待打款 3:打款中 4:打款成功',
`verify_log` text NOT NULL DEFAULT '' COMMENT '审批相关信息json',

Loading…
Cancel
Save