init
Showing
3 changed files
with
148 additions
and
29 deletions
| ... | @@ -21,6 +21,11 @@ class Finance extends CI_Controller { | ... | @@ -21,6 +21,11 @@ class Finance extends CI_Controller { |
| 21 | $this->load->view('finance/makeLoan'); | 21 | $this->load->view('finance/makeLoan'); |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | public function addtime() | ||
| 25 | { | ||
| 26 | $this->load->view('finance/addtime'); | ||
| 27 | } | ||
| 28 | |||
| 24 | public function chargedetail() | 29 | public function chargedetail() |
| 25 | { | 30 | { |
| 26 | $this->load->view('finance/chargedetail'); | 31 | $this->load->view('finance/chargedetail'); | ... | ... |
application/views/finance/addtime.php
0 → 100644
| 1 | <?php $this->load->view('common/header'); ?> | ||
| 2 | |||
| 3 | <body> | ||
| 4 | <form action="" id="form1"> | ||
| 5 | <input type="hidden" name="orderId" value="<?=$id?>"> | ||
| 6 | <div class="panel panel-default mb-20"> | ||
| 7 | <div class="panel-body cl"> | ||
| 8 | <div class="row cl"> | ||
| 9 | <div class="form-group col-sm-3 col-md-1"> | ||
| 10 | <label>确认时间</label> | ||
| 11 | <input name="phoneAuditTime" type="text" class="form-control input-text Wdate" value="" onfocus="WdatePicker()"> | ||
| 12 | </div> | ||
| 13 | </div> | ||
| 14 | <!-- <div class="row cl">--> | ||
| 15 | <!-- <div class="form-group col-sm-3 col-md-1">--> | ||
| 16 | <!-- <label>是否拨通</label>--> | ||
| 17 | <!-- <span class="form-control select-box">--> | ||
| 18 | <!-- <select class="select" size="1" name="hasPutThrough">--> | ||
| 19 | <!-- <option value="1">是</option>--> | ||
| 20 | <!-- <option value="0">否</option>--> | ||
| 21 | <!-- </select>--> | ||
| 22 | <!-- </span>--> | ||
| 23 | <!-- </div>--> | ||
| 24 | <!-- </div>--> | ||
| 25 | <!-- <div class="row cl">--> | ||
| 26 | <!-- <div class="form-group col-sm-12 col-md-12">--> | ||
| 27 | <!-- <label>备注</label>--> | ||
| 28 | <!-- <textarea class="textarea" name="remark"></textarea>--> | ||
| 29 | <!-- </div>--> | ||
| 30 | <!-- </div>--> | ||
| 31 | </div> | ||
| 32 | </div> | ||
| 33 | |||
| 34 | </form> | ||
| 35 | |||
| 36 | <div class="row cl col-sm-12"> | ||
| 37 | <div class="col-sm-2"> | ||
| 38 | <button class="btn btn-primary btn-block" onclick="pass();">保存</button> | ||
| 39 | </div> | ||
| 40 | </div> | ||
| 41 | |||
| 42 | <?php $this->load->view('common/footer'); ?> | ||
| 43 | </body> | ||
| 44 | <script> | ||
| 45 | |||
| 46 | function pass() { | ||
| 47 | var data = $("#form1").serializeJson(); | ||
| 48 | $.ajax({ | ||
| 49 | type: 'patch', | ||
| 50 | url: apiBaseUrl + 'manage/financial/confirm/' + id + '?realRepaymentDate=' + Date.now(), | ||
| 51 | cache: false, | ||
| 52 | dataType: 'json', | ||
| 53 | data: JSON.stringify(data), | ||
| 54 | contentType: "application/json; charset=UTF-8", | ||
| 55 | success: function (data) { | ||
| 56 | if (data.msg) { | ||
| 57 | layer.alert(data.msg); | ||
| 58 | } else if (data.code != 0) { | ||
| 59 | layer.alert('操作失败'); | ||
| 60 | } else { | ||
| 61 | layer.msg('通过'); | ||
| 62 | } | ||
| 63 | if(!data.code){ | ||
| 64 | setTimeout(function () { | ||
| 65 | layer_close(); | ||
| 66 | }, 500) | ||
| 67 | } | ||
| 68 | }, | ||
| 69 | error: function () { | ||
| 70 | layer.alert("操作失败") | ||
| 71 | } | ||
| 72 | }); | ||
| 73 | |||
| 74 | // $.ajax({ | ||
| 75 | // type: 'post', | ||
| 76 | // url: apiBaseUrl + 'audit/phoneAudit/record', | ||
| 77 | // cache: false, | ||
| 78 | // data: JSON.stringify(data), | ||
| 79 | // dataType: 'json', | ||
| 80 | // contentType: "application/json; charset=UTF-8", | ||
| 81 | // success: function (data) { | ||
| 82 | // if (data.msg) { | ||
| 83 | // layer.alert(data.msg); | ||
| 84 | // } else if (data.code != 0) { | ||
| 85 | // layer.alert('操作失败'); | ||
| 86 | // } else { | ||
| 87 | // layer.alert('操作成功'); | ||
| 88 | // } | ||
| 89 | // if(!data.code){ | ||
| 90 | // setTimeout(function () { | ||
| 91 | // layer_close(); | ||
| 92 | // }, 500) | ||
| 93 | // } | ||
| 94 | // }, | ||
| 95 | // error: function () { | ||
| 96 | // layer.alert("操作失败") | ||
| 97 | // } | ||
| 98 | // | ||
| 99 | // }) | ||
| 100 | } | ||
| 101 | |||
| 102 | </script> | ||
| 103 | </html> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -219,37 +219,48 @@ | ... | @@ -219,37 +219,48 @@ |
| 219 | } | 219 | } |
| 220 | 220 | ||
| 221 | function pass(id) { | 221 | function pass(id) { |
| 222 | layer.confirm('通过之后, 账单同步更新到收款明细列表', { | 222 | layer.open({ |
| 223 | btn: ['通过', '取消'], | 223 | type: 2, |
| 224 | title: '确认到账', | 224 | title: '确认时间', |
| 225 | icon: 3 | 225 | shadeClose: true, |
| 226 | }, function () { | 226 | area: ['400px', '400px'], |
| 227 | var data = { | 227 | content: '<?=site_url('Finance/addtime/')?>'+id |
| 228 | realRepaymentDate: getNowFormatDate() | ||
| 229 | }; | ||
| 230 | $.ajax({ | ||
| 231 | type: 'patch', | ||
| 232 | url: apiBaseUrl + 'manage/financial/confirm/' + id + '?realRepaymentDate=' + Date.now(), | ||
| 233 | cache: false, | ||
| 234 | dataType: 'json', | ||
| 235 | data: JSON.stringify(data), | ||
| 236 | contentType: "application/json; charset=UTF-8", | ||
| 237 | success: function (data) { | ||
| 238 | if (data.msg) { | ||
| 239 | layer.alert(data.msg); | ||
| 240 | } else if (data.code != 0) { | ||
| 241 | layer.alert('操作失败'); | ||
| 242 | } else { | ||
| 243 | layer.msg('通过'); | ||
| 244 | } | ||
| 245 | }, | ||
| 246 | error: function () { | ||
| 247 | layer.alert("操作失败") | ||
| 248 | } | ||
| 249 | }) | ||
| 250 | |||
| 251 | }); | 228 | }); |
| 252 | } | 229 | } |
| 230 | |||
| 231 | |||
| 232 | // function pass(id) { | ||
| 233 | // layer.confirm('通过之后, 账单同步更新到收款明细列表', { | ||
| 234 | // btn: ['通过', '取消'], | ||
| 235 | // title: '确认到账', | ||
| 236 | // icon: 3 | ||
| 237 | // }, function () { | ||
| 238 | // var data = { | ||
| 239 | // realRepaymentDate: getNowFormatDate() | ||
| 240 | // }; | ||
| 241 | // $.ajax({ | ||
| 242 | // type: 'patch', | ||
| 243 | // url: apiBaseUrl + 'manage/financial/confirm/' + id + '?realRepaymentDate=' + Date.now(), | ||
| 244 | // cache: false, | ||
| 245 | // dataType: 'json', | ||
| 246 | // data: JSON.stringify(data), | ||
| 247 | // contentType: "application/json; charset=UTF-8", | ||
| 248 | // success: function (data) { | ||
| 249 | // if (data.msg) { | ||
| 250 | // layer.alert(data.msg); | ||
| 251 | // } else if (data.code != 0) { | ||
| 252 | // layer.alert('操作失败'); | ||
| 253 | // } else { | ||
| 254 | // layer.msg('通过'); | ||
| 255 | // } | ||
| 256 | // }, | ||
| 257 | // error: function () { | ||
| 258 | // layer.alert("操作失败") | ||
| 259 | // } | ||
| 260 | // }) | ||
| 261 | // | ||
| 262 | // }); | ||
| 263 | // } | ||
| 253 | </script> | 264 | </script> |
| 254 | </body> | 265 | </body> |
| 255 | <html> | 266 | <html> | ... | ... |
-
Please register or sign in to post a comment