b31f721a by wang

init

1 parent 7e476bc1
......@@ -21,6 +21,11 @@ class Finance extends CI_Controller {
$this->load->view('finance/makeLoan');
}
public function addtime()
{
$this->load->view('finance/addtime');
}
public function chargedetail()
{
$this->load->view('finance/chargedetail');
......
<?php $this->load->view('common/header'); ?>
<body>
<form action="" id="form1">
<input type="hidden" name="orderId" value="<?=$id?>">
<div class="panel panel-default mb-20">
<div class="panel-body cl">
<div class="row cl">
<div class="form-group col-sm-3 col-md-1">
<label>确认时间</label>
<input name="phoneAuditTime" type="text" class="form-control input-text Wdate" value="" onfocus="WdatePicker()">
</div>
</div>
<!-- <div class="row cl">-->
<!-- <div class="form-group col-sm-3 col-md-1">-->
<!-- <label>是否拨通</label>-->
<!-- <span class="form-control select-box">-->
<!-- <select class="select" size="1" name="hasPutThrough">-->
<!-- <option value="1">是</option>-->
<!-- <option value="0">否</option>-->
<!-- </select>-->
<!-- </span>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="row cl">-->
<!-- <div class="form-group col-sm-12 col-md-12">-->
<!-- <label>备注</label>-->
<!-- <textarea class="textarea" name="remark"></textarea>-->
<!-- </div>-->
<!-- </div>-->
</div>
</div>
</form>
<div class="row cl col-sm-12">
<div class="col-sm-2">
<button class="btn btn-primary btn-block" onclick="pass();">保存</button>
</div>
</div>
<?php $this->load->view('common/footer'); ?>
</body>
<script>
function pass() {
var data = $("#form1").serializeJson();
$.ajax({
type: 'patch',
url: apiBaseUrl + 'manage/financial/confirm/' + id + '?realRepaymentDate=' + Date.now(),
cache: false,
dataType: 'json',
data: JSON.stringify(data),
contentType: "application/json; charset=UTF-8",
success: function (data) {
if (data.msg) {
layer.alert(data.msg);
} else if (data.code != 0) {
layer.alert('操作失败');
} else {
layer.msg('通过');
}
if(!data.code){
setTimeout(function () {
layer_close();
}, 500)
}
},
error: function () {
layer.alert("操作失败")
}
});
// $.ajax({
// type: 'post',
// url: apiBaseUrl + 'audit/phoneAudit/record',
// cache: false,
// data: JSON.stringify(data),
// dataType: 'json',
// contentType: "application/json; charset=UTF-8",
// success: function (data) {
// if (data.msg) {
// layer.alert(data.msg);
// } else if (data.code != 0) {
// layer.alert('操作失败');
// } else {
// layer.alert('操作成功');
// }
// if(!data.code){
// setTimeout(function () {
// layer_close();
// }, 500)
// }
// },
// error: function () {
// layer.alert("操作失败")
// }
//
// })
}
</script>
</html>
\ No newline at end of file
......@@ -219,37 +219,48 @@
}
function pass(id) {
layer.confirm('通过之后, 账单同步更新到收款明细列表', {
btn: ['通过', '取消'],
title: '确认到账',
icon: 3
}, function () {
var data = {
realRepaymentDate: getNowFormatDate()
};
$.ajax({
type: 'patch',
url: apiBaseUrl + 'manage/financial/confirm/' + id + '?realRepaymentDate=' + Date.now(),
cache: false,
dataType: 'json',
data: JSON.stringify(data),
contentType: "application/json; charset=UTF-8",
success: function (data) {
if (data.msg) {
layer.alert(data.msg);
} else if (data.code != 0) {
layer.alert('操作失败');
} else {
layer.msg('通过');
}
},
error: function () {
layer.alert("操作失败")
}
})
layer.open({
type: 2,
title: '确认时间',
shadeClose: true,
area: ['400px', '400px'],
content: '<?=site_url('Finance/addtime/')?>'+id
});
}
// function pass(id) {
// layer.confirm('通过之后, 账单同步更新到收款明细列表', {
// btn: ['通过', '取消'],
// title: '确认到账',
// icon: 3
// }, function () {
// var data = {
// realRepaymentDate: getNowFormatDate()
// };
// $.ajax({
// type: 'patch',
// url: apiBaseUrl + 'manage/financial/confirm/' + id + '?realRepaymentDate=' + Date.now(),
// cache: false,
// dataType: 'json',
// data: JSON.stringify(data),
// contentType: "application/json; charset=UTF-8",
// success: function (data) {
// if (data.msg) {
// layer.alert(data.msg);
// } else if (data.code != 0) {
// layer.alert('操作失败');
// } else {
// layer.msg('通过');
// }
// },
// error: function () {
// layer.alert("操作失败")
// }
// })
//
// });
// }
</script>
</body>
<html>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!