Merge remote-tracking branch 'origin/develop' into develop
Showing
15 changed files
with
300 additions
and
134 deletions
| ... | @@ -29,20 +29,15 @@ class Loan extends CI_Controller { | ... | @@ -29,20 +29,15 @@ class Loan extends CI_Controller { |
| 29 | 29 | ||
| 30 | public function import($state = 1) | 30 | public function import($state = 1) |
| 31 | { | 31 | { |
| 32 | switch ($state) { | 32 | $this->load->driver('enum'); |
| 33 | case 1: | 33 | $this->load->driver('configure'); |
| 34 | $this->load->view('/loan/还款导入'); | 34 | $this->load->driver('LoanAfter'); |
| 35 | break; | 35 | $ret = new stdClass(); |
| 36 | case 2: | 36 | $ret->enumRepayStatus = $this->enum->repaymentPlan->status(); |
| 37 | $this->load->view('/loan/还款批量导入'); | 37 | $ret->enumSource = $this->enum->repaymentPlan->source(); |
| 38 | break; | 38 | $ret->prosecuteStatus = $state - 1; |
| 39 | case 3: | 39 | |
| 40 | $this->load->view('/loan/催收导入'); | 40 | $this->load->view('/loan/导入', $ret); |
| 41 | break; | ||
| 42 | case 4: | ||
| 43 | $this->load->view('/loan/数据库导入'); | ||
| 44 | break; | ||
| 45 | } | ||
| 46 | } | 41 | } |
| 47 | 42 | ||
| 48 | public function edit($id = null) | 43 | public function edit($id = null) |
| ... | @@ -60,9 +55,12 @@ class Loan extends CI_Controller { | ... | @@ -60,9 +55,12 @@ class Loan extends CI_Controller { |
| 60 | $this->load->view('/loan/还款编辑', $ret); | 55 | $this->load->view('/loan/还款编辑', $ret); |
| 61 | } | 56 | } |
| 62 | 57 | ||
| 63 | public function move() | 58 | public function move($id) |
| 64 | { | 59 | { |
| 65 | $this->load->view('/loan/资料移交'); | 60 | $this->load->driver('order'); |
| 61 | $sources = $this->order->ordersource($id); | ||
| 62 | |||
| 63 | $this->load->view('/loan/资料移交', compact('sources', 'id')); | ||
| 66 | } | 64 | } |
| 67 | 65 | ||
| 68 | public function data($format = 'days') | 66 | public function data($format = 'days') | ... | ... |
| 1 | <?php | ||
| 2 | |||
| 3 | class LoanAfter_enum extends CI_Driver | ||
| 4 | { | ||
| 5 | public $CI; | ||
| 6 | |||
| 7 | public function __construct () { | ||
| 8 | $this->CI = &get_instance(); | ||
| 9 | } | ||
| 10 | |||
| 11 | public function prosecute () { | ||
| 12 | $url = $this->CI->config->item('apiBaseUrl') . 'loanAfter/enum/prosecute'; | ||
| 13 | $result = file_get_contents($url); | ||
| 14 | $json = json_decode($result, true); | ||
| 15 | $ret = $json['data']; | ||
| 16 | |||
| 17 | return $ret; | ||
| 18 | } | ||
| 19 | } |
application/libraries/Order/Order.php
0 → 100644
| 1 | <?php | ||
| 2 | |||
| 3 | class Order_ordersource extends CI_Driver | ||
| 4 | { | ||
| 5 | public $CI; | ||
| 6 | |||
| 7 | public function __construct () { | ||
| 8 | $this->CI = &get_instance(); | ||
| 9 | } | ||
| 10 | |||
| 11 | public function all ($id) { | ||
| 12 | $url = $this->CI->config->item('apiBaseUrl') . 'order/ordersource/'.$id; | ||
| 13 | $result = file_get_contents($url); | ||
| 14 | $json = json_decode($result); | ||
| 15 | $ret = $json->data; | ||
| 16 | |||
| 17 | return $ret; | ||
| 18 | } | ||
| 19 | } |
| ... | @@ -117,6 +117,7 @@ | ... | @@ -117,6 +117,7 @@ |
| 117 | aoData.modifyUser = $('[name="modifyUser"]').val() || ''; | 117 | aoData.modifyUser = $('[name="modifyUser"]').val() || ''; |
| 118 | aoData.proposerName = $('[name="proposerName"]').val() || ''; | 118 | aoData.proposerName = $('[name="proposerName"]').val() || ''; |
| 119 | aoData.phoneNumber = $('[name="phoneNumber"]').val() || ''; | 119 | aoData.phoneNumber = $('[name="phoneNumber"]').val() || ''; |
| 120 | aoData.role = $('[name="role"]').val() || ''; | ||
| 120 | }, | 121 | }, |
| 121 | }); | 122 | }); |
| 122 | 123 | ||
| ... | @@ -132,7 +133,7 @@ | ... | @@ -132,7 +133,7 @@ |
| 132 | $('#table').DataTable().draw(); | 133 | $('#table').DataTable().draw(); |
| 133 | } | 134 | } |
| 134 | 135 | ||
| 135 | function ajax(url, method = 'GET', data = {}) { | 136 | function ajax(url, method = 'GET', data = {}, msg = '操作成功', callback = function (){}) { |
| 136 | $.ajax({ | 137 | $.ajax({ |
| 137 | type: method, | 138 | type: method, |
| 138 | url: apiBaseUrl + url, | 139 | url: apiBaseUrl + url, |
| ... | @@ -146,7 +147,7 @@ | ... | @@ -146,7 +147,7 @@ |
| 146 | } else if(data.code != 0){ | 147 | } else if(data.code != 0){ |
| 147 | layer.alert('操作失败'); | 148 | layer.alert('操作失败'); |
| 148 | } else { | 149 | } else { |
| 149 | layer.alert('操作成功'); | 150 | layer.alert(msg, callback); |
| 150 | } | 151 | } |
| 151 | }, | 152 | }, |
| 152 | error:function(){ | 153 | error:function(){ | ... | ... |
| ... | @@ -8,7 +8,7 @@ | ... | @@ -8,7 +8,7 @@ |
| 8 | <button class="btn btn-primary radius" type="button" onclick="$('#table').DataTable().draw()">搜索</button> | 8 | <button class="btn btn-primary radius" type="button" onclick="$('#table').DataTable().draw()">搜索</button> |
| 9 | <input class="btn btn-warning radius" type="reset" value="重置"> | 9 | <input class="btn btn-warning radius" type="reset" value="重置"> |
| 10 | 10 | ||
| 11 | <button class="btn btn-primary radius" type="button" onclick="layer_show('导入', '<?=site_url('loan/import/3')?>')">导入</button> | 11 | <button class="btn btn-primary radius" type="button" onclick="layer_show('导入', '<?=site_url('loan/import/4')?>')">导入</button> |
| 12 | <button class="btn btn-success radius r" type="button" onclick="excel()">导出</button> | 12 | <button class="btn btn-success radius r" type="button" onclick="excel()">导出</button> |
| 13 | </div> | 13 | </div> |
| 14 | </form> | 14 | </form> | ... | ... |
| ... | @@ -79,27 +79,12 @@ | ... | @@ -79,27 +79,12 @@ |
| 79 | ] | 79 | ] |
| 80 | }); | 80 | }); |
| 81 | 81 | ||
| 82 | $('.table_search').on('change', function () { | ||
| 83 | search = $(this).val(); | ||
| 84 | column = $(this).attr('column'); | ||
| 85 | |||
| 86 | $('#table').DataTable().column(column).search(search).draw(); | ||
| 87 | }); | ||
| 88 | |||
| 89 | $('#min, #max').on('keyup', function () { | ||
| 90 | $('#table').DataTable().draw(); | ||
| 91 | }); | ||
| 92 | |||
| 93 | function resetHandler() { | ||
| 94 | $('#table').DataTable().columns().search("").draw(); | ||
| 95 | } | ||
| 96 | |||
| 97 | function edit(id) { | 82 | function edit(id) { |
| 98 | layer_show('编辑', '<?=site_url('/loan/edit/')?>/'+id); | 83 | layer_show('编辑', '<?=site_url('/loan/edit/')?>/'+id); |
| 99 | } | 84 | } |
| 100 | 85 | ||
| 101 | function move(id) { | 86 | function move(id) { |
| 102 | layer_show('资料移交', '<?=site_url('/loan/move')?>'); | 87 | layer_show('资料移交', '<?=site_url('/loan/move')?>/'+id); |
| 103 | } | 88 | } |
| 104 | 89 | ||
| 105 | function reload() { | 90 | function reload() { | ... | ... |
| 1 | <div class="date mb-20"> | 1 | <div class="date mb-20"> |
| 2 | <div class="col-xs-2"> | ||
| 3 | <span class="select-box"> | ||
| 4 | <select class="select table_search" column="17" name="code"> | ||
| 5 | <option value=""></option> | ||
| 6 | <option value="0" >进件时间</option> | ||
| 7 | <option value="1" >放款时间</option> | ||
| 8 | <option value="2" >计划还款日期</option> | ||
| 9 | |||
| 10 | </select> | ||
| 11 | </span> | ||
| 12 | </div> | ||
| 13 | |||
| 2 | <input type="text" | 14 | <input type="text" |
| 3 | onfocus="WdatePicker({ maxDate:'#F{$dp.$D(\'max\')||\'%y-%M-%d\'}',onpicked:function(){$('#table').DataTable().draw()} })" | 15 | onfocus="WdatePicker({ maxDate:'#F{$dp.$D(\'enterMaxDate\')||\'%y-%M-%d\'}',onpicked:function(){$('#table').DataTable().draw()} })" |
| 4 | id="min" class="input-text Wdate"> - | 16 | id="enterMinDate" class="input-text Wdate"> - |
| 5 | <input type="text" | 17 | <input type="text" |
| 6 | onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'min\')}',maxDate:'%y-%M-%d',onpicked:function(){$('#table').DataTable().draw()} })" | 18 | onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'enterMinDate\')}',maxDate:'%y-%M-%d',onpicked:function(){$('#table').DataTable().draw()} })" |
| 7 | id="max" class="input-text Wdate"> | 19 | id="enterMaxDate" class="input-text Wdate"> |
| 8 | </div> | 20 | </div> |
| 9 | <div class="row cl mb-20"> | 21 | <div class="row cl mb-20"> |
| 10 | <div class="col-xs-2"> | 22 | <div class="col-xs-2"> |
| 11 | <span class="select-box"> | 23 | <span class="select-box"> |
| 12 | <select class="select table_search" column="17"> | 24 | <select class="select table_search" column="17" name="repayStatus"> |
| 13 | <option value="" selected>还款状态</option> | 25 | <option value="" selected>还款状态</option> |
| 14 | <?php foreach ($this->session->repayStatus as $k=>$v):?> | 26 | <?php foreach ($this->session->repaymentPlans as $k=>$v):?> |
| 15 | <option value="<?=$v->id?>"><?=$v->name?></option> | 27 | <option value="<?=$k?>"><?=$v?></option> |
| 16 | <?php endforeach;?> | 28 | <?php endforeach;?> |
| 17 | </select> | 29 | </select> |
| 18 | </span> | 30 | </span> |
| 19 | </div> | 31 | </div> |
| 20 | <div class="col-xs-2"> | 32 | <div class="col-xs-2"> |
| 21 | <span class="select-box"> | 33 | <span class="select-box"> |
| 22 | <select class="select table_search" size="1" column="7"> | 34 | <select class="select table_search" size="1" column="7" name="branchName"> |
| 23 | <option value="" selected>网点</option> | 35 | <option value="" selected>网点</option> |
| 24 | <?php foreach ($this->session->departments as $k=>$v):?> | 36 | <?php foreach ($this->session->departments as $k=>$v):?> |
| 25 | <option value="<?=$v->id?>"><?=$v->name?></option> | 37 | <option value="<?=$v->id?>"><?=$v->name?></option> |
| ... | @@ -32,25 +44,25 @@ | ... | @@ -32,25 +44,25 @@ |
| 32 | </select> | 44 | </select> |
| 33 | </span> | 45 | </span> |
| 34 | </div> | 46 | </div> |
| 35 | <div class="col-xs-2"> | 47 | <!--<div class="col-xs-2"> |
| 36 | <span class="select-box"> | 48 | <span class="select-box"> |
| 37 | <select class="select table_search" column="16"> | 49 | <select class="select table_search" column="16"> |
| 38 | <option value="" selected>是否逾期</option> | 50 | <option value="" selected>是否逾期</option> |
| 39 | <option>是</option> | 51 | <option value="1">是</option> |
| 40 | <option>否</option> | 52 | <option value="0">否</option> |
| 41 | </select> | 53 | </select> |
| 42 | </span> | 54 | </span> |
| 43 | </div> | 55 | </div> |
| 44 | <div class="col-xs-2"> | 56 | <div class="col-xs-2"> |
| 45 | <span class="select-box"> | 57 | <span class="select-box"> |
| 46 | <select class="select table_search" column="2"> | 58 | <select class="select table_search" column="2" name="source"> |
| 47 | <option value="" selected>来源</option> | 59 | <option value="" selected>来源</option> |
| 48 | <?php foreach ($this->session->source as $k=>$v):?> | 60 | <?php /*foreach ($this->session->source as $k=>$v):*/?> |
| 49 | <option value="<?=$v->id?>"><?=$v->name?></option> | 61 | <option value="<?/*=$v->id*/?>"><?/*=$v->name*/?></option> |
| 50 | <?php endforeach;?> | 62 | <?php /*endforeach;*/?> |
| 51 | </select> | 63 | </select> |
| 52 | </span> | 64 | </span> |
| 53 | </div> | 65 | </div>--> |
| 54 | <div class="col-xs-2"> | 66 | <div class="col-xs-2"> |
| 55 | <input type="text" class="form-control input-text table_search" value="" placeholder="姓名" column="3" name="proposerName"> | 67 | <input type="text" class="form-control input-text table_search" value="" placeholder="姓名" column="3" name="proposerName"> |
| 56 | </div> | 68 | </div> | ... | ... |
application/views/loan/导入.php
0 → 100644
| 1 | <?php $this->load->view('common/header'); ?> | ||
| 2 | |||
| 3 | <body> | ||
| 4 | <div class="panel panel-default mb-20"> | ||
| 5 | <form> | ||
| 6 | <input type="hidden" name="source" value="1"> | ||
| 7 | <input type="hidden" name="prosecuteStatus" value="<?=$prosecuteStatus?>"> | ||
| 8 | <div class="panel-body cl"> | ||
| 9 | <div class="row cl"> | ||
| 10 | <div class="form-group col-sm-4 col-md-2"> | ||
| 11 | <label>订单号</label> | ||
| 12 | <input type="text" class="form-control input-text" value=""name="orderNumber"> | ||
| 13 | </div> | ||
| 14 | <div class="form-group col-sm-4 col-md-2"> | ||
| 15 | <label>申请人</label> | ||
| 16 | <input type="text" class="form-control input-text" value=""name="proposerName"> | ||
| 17 | </div> | ||
| 18 | <div class="form-group col-sm-4 col-md-2"> | ||
| 19 | <label>身份证</label> | ||
| 20 | <input type="text" class="form-control input-text" value=""name="idNumber"> | ||
| 21 | </div> | ||
| 22 | <div class="form-group col-sm-4 col-md-2"> | ||
| 23 | <label>手机号</label> | ||
| 24 | <input type="text" class="form-control input-text" value=""name="phoneNumber"> | ||
| 25 | </div> | ||
| 26 | <div class="form-group col-sm-4 col-md-2"> | ||
| 27 | <label>客户经理</label> | ||
| 28 | <input type="text" class="form-control input-text" value=""name="clientManager"> | ||
| 29 | </div> | ||
| 30 | <div class="form-group col-sm-4 col-md-2"> | ||
| 31 | <label>网点</label> | ||
| 32 | <span class="form-control select-box"> | ||
| 33 | <select class="select" size="1" name="branchName"> | ||
| 34 | <?php foreach ($this->session->departments as $k=>$v):?> | ||
| 35 | <option value="<?=$v->id?>"><?=$v->name?></option> | ||
| 36 | <?php if($v->children && !empty($v->children)):?> | ||
| 37 | <?php foreach ($v->children as $kk=>$vv):?> | ||
| 38 | <option value="<?=$vv->id?>"><?=$vv->name?></option> | ||
| 39 | <?php endforeach;?> | ||
| 40 | <?php endif;?> | ||
| 41 | <?php endforeach;?> | ||
| 42 | </select> | ||
| 43 | </span> | ||
| 44 | </div> | ||
| 45 | <div class="form-group col-sm-4 col-md-2"> | ||
| 46 | <label>产品名称</label> | ||
| 47 | <span class="form-control select-box"> | ||
| 48 | <select class="select" size="1" name="productName"> | ||
| 49 | <?php foreach ($this->session->products as $k=>$v):?> | ||
| 50 | <option value="<?=$v->id?>"><?=$v->productName?></option> | ||
| 51 | <?php endforeach;?> | ||
| 52 | </select> | ||
| 53 | </span> | ||
| 54 | </div> | ||
| 55 | <div class="form-group col-sm-4 col-md-2"> | ||
| 56 | <label>借款金额</label> | ||
| 57 | <input type="text" class="form-control input-text" value=""name="applyAmount"> | ||
| 58 | </div> | ||
| 59 | <div class="form-group col-sm-4 col-md-2"> | ||
| 60 | <label>审批金额</label> | ||
| 61 | <input type="text" class="form-control input-text" value=""name="ratifyAmount"> | ||
| 62 | </div> | ||
| 63 | <div class="form-group col-sm-4 col-md-2"> | ||
| 64 | <label>进件时间</label> | ||
| 65 | <input type="text" class="form-control input-text Wdate" onfocus="WdatePicker()" value="" name="enterDate"> | ||
| 66 | </div> | ||
| 67 | <div class="form-group col-sm-4 col-md-2"> | ||
| 68 | <label>当月应还金额</label> | ||
| 69 | <input type="text" class="form-control input-text" value=""name="currentBalance"> | ||
| 70 | </div> | ||
| 71 | <div class="form-group col-sm-4 col-md-2"> | ||
| 72 | <label>已还金额</label> | ||
| 73 | <input type="text" class="form-control input-text" value=""> | ||
| 74 | </div> | ||
| 75 | <div class="form-group col-sm-4 col-md-2"> | ||
| 76 | <label>罚息</label> | ||
| 77 | <input type="text" class="form-control input-text" value=""> | ||
| 78 | </div> | ||
| 79 | <div class="form-group col-sm-4 col-md-2"> | ||
| 80 | <label>滞纳金</label> | ||
| 81 | <input type="text" class="form-control input-text" value=""name="overdueFine"> | ||
| 82 | </div> | ||
| 83 | <div class="form-group col-sm-4 col-md-2"> | ||
| 84 | <label>放款日期</label> | ||
| 85 | <input type="text" class="form-control input-text Wdate" onfocus="WdatePicker()" value="" name="loanDate"> | ||
| 86 | </div> | ||
| 87 | <div class="form-group col-sm-4 col-md-2"> | ||
| 88 | <label>总期数</label> | ||
| 89 | <input type="text" class="form-control input-text" value=""name="totalPeriods"> | ||
| 90 | </div> | ||
| 91 | <div class="form-group col-sm-4 col-md-2"> | ||
| 92 | <label>当前期数</label> | ||
| 93 | <input type="text" class="form-control input-text" value=""name="currentPeriods"> | ||
| 94 | </div> | ||
| 95 | <!-- 需求调整先去了--> | ||
| 96 | <!--<div class="form-group col-sm-4 col-md-2"> | ||
| 97 | <label>还款方式</label> | ||
| 98 | <span class="form-control select-box"> | ||
| 99 | <select class="select" size="1"> | ||
| 100 | <option>请选择</option> | ||
| 101 | <?php /*foreach ($this->session->repayments as $k=>$v):*/?> | ||
| 102 | <option <?/*=$v == $repaymentMode ? 'selected' : '' */?> value="<?/*=$k*/?>"><?/*=$v*/?></option> | ||
| 103 | <?php /*endforeach;*/?> | ||
| 104 | </select> | ||
| 105 | </span> | ||
| 106 | </div>--> | ||
| 107 | <div class="form-group col-sm-4 col-md-2"> | ||
| 108 | <label>计划还款日期</label> | ||
| 109 | <input type="text" class="form-control input-text Wdate" onfocus="WdatePicker()" value="" name="planRepaymentDate"> | ||
| 110 | </div> | ||
| 111 | <div class="form-group col-sm-4 col-md-2"> | ||
| 112 | <label>实际还款日</label> | ||
| 113 | <input type="text" class="form-control input-text Wdate" onfocus="WdatePicker()" value="" name="realRepaymentDate"> | ||
| 114 | </div> | ||
| 115 | <div class="form-group col-sm-4 col-md-2"> | ||
| 116 | <label>是否逾期</label> | ||
| 117 | <span class="form-control select-box"> | ||
| 118 | <select class="select" size="1" name="hasDue"> | ||
| 119 | <option value="1">是</option> | ||
| 120 | <option value="0">否</option> | ||
| 121 | </select> | ||
| 122 | </span> | ||
| 123 | </div> | ||
| 124 | <div class="form-group col-sm-4 col-md-2"> | ||
| 125 | <label>逾期天数</label> | ||
| 126 | <input type="text" class="form-control input-text" value=""name="dueDay"> | ||
| 127 | </div> | ||
| 128 | <div class="form-group col-sm-4 col-md-2"> | ||
| 129 | <label>还款状态</label> | ||
| 130 | <span class="form-control select-box"> | ||
| 131 | <select class="select" size="1" name="repayStatus"> | ||
| 132 | <?php foreach($enumRepayStatus as $k => $v) : ?> | ||
| 133 | <option value="<?=$k?>"><?=$v?></option> | ||
| 134 | <?php endforeach ?> | ||
| 135 | </select> | ||
| 136 | </span> | ||
| 137 | </div> | ||
| 138 | <div class="form-group col-sm-4 col-md-2"> | ||
| 139 | <label>是否结清</label> | ||
| 140 | <span class="form-control select-box"> | ||
| 141 | <select class="select" size="1" name="hasClean"> | ||
| 142 | <option value="1">是</option> | ||
| 143 | <option value="0">否</option> | ||
| 144 | </select> | ||
| 145 | </span> | ||
| 146 | </div> | ||
| 147 | </div> | ||
| 148 | </div> | ||
| 149 | </form> | ||
| 150 | </div> | ||
| 151 | |||
| 152 | <div class="row cl col-sm-12 pb-20"> | ||
| 153 | <div class="col-sm-2"> | ||
| 154 | <button class="btn btn-primary btn-block" onclick="save();">保存</button> | ||
| 155 | </div> | ||
| 156 | <div class="col-sm-2"> | ||
| 157 | <button class="btn btn-warning btn-block" onclick="layer_close();">取消</button> | ||
| 158 | </div> | ||
| 159 | </div> | ||
| 160 | |||
| 161 | <?php $this->load->view('common/footer'); ?> | ||
| 162 | |||
| 163 | <script> | ||
| 164 | function save() { | ||
| 165 | var data = $("form").serializeJson(); | ||
| 166 | |||
| 167 | ajax('loanAfter/repaymentPlan', 'POST', data, '添加成功', function () { | ||
| 168 | window.parent.reload(); | ||
| 169 | layer_close(); | ||
| 170 | }); | ||
| 171 | } | ||
| 172 | </script> | ||
| 173 | </body> | ||
| 174 | </html> |
| ... | @@ -24,22 +24,22 @@ | ... | @@ -24,22 +24,22 @@ |
| 24 | <a href="">处理日志.xls</a> | 24 | <a href="">处理日志.xls</a> |
| 25 | </td> | 25 | </td> |
| 26 | </tr> | 26 | </tr> |
| 27 | <?php foreach($sources as $sourceTypeDesc => $source) : ?> | ||
| 27 | <tr data-id="2"> | 28 | <tr data-id="2"> |
| 28 | <td class="text-c"><input type="checkbox"></td> | 29 | <td class="text-c"><input type="checkbox"></td> |
| 29 | <td class="text-c">身份证复印件</td> | 30 | <td class="text-c"><?=$sourceTypeDesc?></td> |
| 30 | <td> | 31 | <td> |
| 31 | <div class="filelist"> | 32 | <div class="filelist"> |
| 33 | <?php foreach($source as $data): ?> | ||
| 32 | <label class="radio"> | 34 | <label class="radio"> |
| 33 | <input type="checkbox" name="1"/> | 35 | <input type="checkbox" name="" value=""/> |
| 34 | <img src="holder.js/100x100"> | 36 | <img src="<?=$data->url?>" width="100"> |
| 35 | </label> | ||
| 36 | <label class="radio"> | ||
| 37 | <input type="checkbox" name="1"/> | ||
| 38 | <img src="holder.js/100x100"> | ||
| 39 | </label> | 37 | </label> |
| 38 | <?php endforeach; ?> | ||
| 40 | </div> | 39 | </div> |
| 41 | </td> | 40 | </td> |
| 42 | </tr> | 41 | </tr> |
| 42 | <?php endforeach; ?> | ||
| 43 | </tbody> | 43 | </tbody> |
| 44 | </table> | 44 | </table> |
| 45 | </div> | 45 | </div> |
| ... | @@ -53,7 +53,7 @@ | ... | @@ -53,7 +53,7 @@ |
| 53 | <button class="btn btn-warning btn-block" onclick="layer_close()">关闭</button> | 53 | <button class="btn btn-warning btn-block" onclick="layer_close()">关闭</button> |
| 54 | </div> | 54 | </div> |
| 55 | <div class="col-sm-2"> | 55 | <div class="col-sm-2"> |
| 56 | <button class="btn btn-primary btn-block" onclick="submit()">确认移交</button> | 56 | <button class="btn btn-primary btn-block" onclick="submit(<?=$id?>)">确认移交</button> |
| 57 | </div> | 57 | </div> |
| 58 | </div> | 58 | </div> |
| 59 | 59 | ||
| ... | @@ -70,11 +70,11 @@ | ... | @@ -70,11 +70,11 @@ |
| 70 | $(this).parents('tr').find('input:checkbox').prop('checked', checked); | 70 | $(this).parents('tr').find('input:checkbox').prop('checked', checked); |
| 71 | }); | 71 | }); |
| 72 | 72 | ||
| 73 | function submit() { | 73 | function submit(id) { |
| 74 | layer.alert('已进入【起诉管理】列表', function () { | 74 | ajax('loanAfter/chaseDebt/prosecute/'+id, 'patch', {}, '已进入【起诉管理】列表', function () { |
| 75 | window.parent.reload(); | 75 | window.parent.reload(); |
| 76 | layer_close(); | 76 | layer_close(); |
| 77 | }); | 77 | }) |
| 78 | } | 78 | } |
| 79 | </script> | 79 | </script> |
| 80 | </body> | 80 | </body> | ... | ... |
| ... | @@ -128,7 +128,7 @@ | ... | @@ -128,7 +128,7 @@ |
| 128 | <span class="form-control select-box"> | 128 | <span class="form-control select-box"> |
| 129 | <select class="select" size="1" name="hasDue"> | 129 | <select class="select" size="1" name="hasDue"> |
| 130 | <option value="1" <?=$hasDue == 1?'selected':''?>>是</option> | 130 | <option value="1" <?=$hasDue == 1?'selected':''?>>是</option> |
| 131 | <option>否</option> | 131 | <option value="0">否</option> |
| 132 | </select> | 132 | </select> |
| 133 | </span> | 133 | </span> |
| 134 | </div> | 134 | </div> |
| ... | @@ -151,7 +151,7 @@ | ... | @@ -151,7 +151,7 @@ |
| 151 | <span class="form-control select-box"> | 151 | <span class="form-control select-box"> |
| 152 | <select class="select" size="1" name="hasClean"> | 152 | <select class="select" size="1" name="hasClean"> |
| 153 | <option value="1" <?=$hasClean == 1?'selected':''?>>是</option> | 153 | <option value="1" <?=$hasClean == 1?'selected':''?>>是</option> |
| 154 | <option>否</option> | 154 | <option value="0">否</option> |
| 155 | </select> | 155 | </select> |
| 156 | </span> | 156 | </span> |
| 157 | </div> | 157 | </div> | ... | ... |
| ... | @@ -7,7 +7,7 @@ | ... | @@ -7,7 +7,7 @@ |
| 7 | <div class="row cl mb-20"> | 7 | <div class="row cl mb-20"> |
| 8 | <div class="col-xs-2"> | 8 | <div class="col-xs-2"> |
| 9 | <span class="select-box"> | 9 | <span class="select-box"> |
| 10 | <select class="select table_search" size="1" column="1"> | 10 | <select class="select table_search" size="1" name="departments"> |
| 11 | <option value="" selected>网点</option> | 11 | <option value="" selected>网点</option> |
| 12 | <?php foreach ($this->session->departments as $k=>$v):?> | 12 | <?php foreach ($this->session->departments as $k=>$v):?> |
| 13 | <option value="<?=$v->id?>"><?=$v->name?></option> | 13 | <option value="<?=$v->id?>"><?=$v->name?></option> |
| ... | @@ -22,7 +22,7 @@ | ... | @@ -22,7 +22,7 @@ |
| 22 | </div> | 22 | </div> |
| 23 | <div class="col-xs-2"> | 23 | <div class="col-xs-2"> |
| 24 | <span class="select-box"> | 24 | <span class="select-box"> |
| 25 | <select class="select table_search" size="1" column="2"> | 25 | <select class="select table_search" size="1" column="2" name="role"> |
| 26 | <option value="" selected>角色</option> | 26 | <option value="" selected>角色</option> |
| 27 | <?php foreach ($this->session->role as $k=>$v):?> | 27 | <?php foreach ($this->session->role as $k=>$v):?> |
| 28 | <option value="<?=$v->id?>"><?=$v->nameZh?></option> | 28 | <option value="<?=$v->id?>"><?=$v->nameZh?></option> |
| ... | @@ -32,13 +32,14 @@ | ... | @@ -32,13 +32,14 @@ |
| 32 | </div> | 32 | </div> |
| 33 | </div> | 33 | </div> |
| 34 | <div> | 34 | <div> |
| 35 | <button class="btn btn-primary radius" type="button" onclick="$('#table').DataTable().draw()">搜索</button> | ||
| 35 | <input class="btn btn-warning radius" type="reset" value="重置搜索"> | 36 | <input class="btn btn-warning radius" type="reset" value="重置搜索"> |
| 36 | <button class="btn btn-primary radius" type="button" onclick="add()">添加员工</button> | 37 | <button class="btn btn-primary radius" type="button" onclick="add()">添加员工</button> |
| 37 | </div> | 38 | </div> |
| 38 | </form> | 39 | </form> |
| 39 | 40 | ||
| 40 | <div class="body mt-20"> | 41 | <div class="body mt-20"> |
| 41 | <table class="table table-border table-bordered table-bg" id="table"> | 42 | <table class="table table-border table-bordered table-bg" id="table" url="system/user/getAllHr"> |
| 42 | <thead class="text-c"> | 43 | <thead class="text-c"> |
| 43 | <tr> | 44 | <tr> |
| 44 | <th width="68px">操作</th> | 45 | <th width="68px">操作</th> |
| ... | @@ -61,36 +62,6 @@ | ... | @@ -61,36 +62,6 @@ |
| 61 | 62 | ||
| 62 | <script> | 63 | <script> |
| 63 | var table = $('#table').dataTable({ | 64 | var table = $('#table').dataTable({ |
| 64 | aaSorting: [[1, "desc"]], | ||
| 65 | serverSide: true, | ||
| 66 | processing: true, | ||
| 67 | bSort: false, | ||
| 68 | searching: false,//是否显示搜索 | ||
| 69 | iDisplayLength: 6, | ||
| 70 | bLengthChange: false, | ||
| 71 | ajax: { | ||
| 72 | url: apiBaseUrl + 'system/user/getAllHr', | ||
| 73 | dataFilter: function (json) { | ||
| 74 | var ret = {}, json = jQuery.parseJSON(json); | ||
| 75 | ret.data = json.data || []; | ||
| 76 | var draw = getUrlParam('draw'); | ||
| 77 | if(draw) { | ||
| 78 | ret.draw = draw; | ||
| 79 | } | ||
| 80 | ret.recordsTotal = 0; | ||
| 81 | ret.recordsFiltered = 0; | ||
| 82 | if (json.page) { | ||
| 83 | ret.recordsTotal = parseInt(json.page.totalNumber); | ||
| 84 | ret.recordsFiltered = parseInt(json.page.totalNumber); | ||
| 85 | } | ||
| 86 | return JSON.stringify(ret); | ||
| 87 | }, | ||
| 88 | data: function (data) { | ||
| 89 | data.pageSize = data.length; | ||
| 90 | data.currentPage = parseFloat(data.start / data.length) + 1; | ||
| 91 | return data; | ||
| 92 | } | ||
| 93 | }, | ||
| 94 | columns: [ | 65 | columns: [ |
| 95 | { | 66 | { |
| 96 | data: "id", render: function (data, type, full) { | 67 | data: "id", render: function (data, type, full) { |
| ... | @@ -118,39 +89,6 @@ | ... | @@ -118,39 +89,6 @@ |
| 118 | {data: "remark"},//备注 | 89 | {data: "remark"},//备注 |
| 119 | ] | 90 | ] |
| 120 | }); | 91 | }); |
| 121 | $.fn.dataTableExt.afnFiltering.push( | ||
| 122 | function (oSettings, aData, iDataIndex) { | ||
| 123 | var min = document.getElementById('min').value; | ||
| 124 | var max = document.getElementById('max').value; | ||
| 125 | var iDateCol = 12; | ||
| 126 | |||
| 127 | var dateMin = new Date(aData[iDateCol]); | ||
| 128 | var dateMax = new Date(aData[iDateCol]); | ||
| 129 | |||
| 130 | if (min === '' && max === '') | ||
| 131 | return true; | ||
| 132 | else if (new Date(min).getTime() <= dateMin.getTime() && max === '') | ||
| 133 | return true; | ||
| 134 | else if (new Date(min).getTime() <= dateMin.getTime() && new Date(max).getTime() >= dateMax.getTime()) | ||
| 135 | return true; | ||
| 136 | return false; | ||
| 137 | } | ||
| 138 | ); | ||
| 139 | |||
| 140 | $('.table_search').on('change', function () { | ||
| 141 | search = $(this).val(); | ||
| 142 | column = $(this).attr('column'); | ||
| 143 | |||
| 144 | $('#table').DataTable().column(column).search(search).draw(); | ||
| 145 | }); | ||
| 146 | |||
| 147 | $('#min, #max').on('keyup', function () { | ||
| 148 | $('#table').DataTable().draw(); | ||
| 149 | }); | ||
| 150 | |||
| 151 | function resetHandler() { | ||
| 152 | $('#table').DataTable().columns().search("").draw(); | ||
| 153 | } | ||
| 154 | 92 | ||
| 155 | function add() { | 93 | function add() { |
| 156 | layer_show('添加员工', '<?=site_url('perm/staffAdd');?>'); | 94 | layer_show('添加员工', '<?=site_url('perm/staffAdd');?>'); |
| ... | @@ -258,7 +196,8 @@ | ... | @@ -258,7 +196,8 @@ |
| 258 | title: '注销账号', | 196 | title: '注销账号', |
| 259 | icon: 3 | 197 | icon: 3 |
| 260 | }, function(){ | 198 | }, function(){ |
| 261 | layer.msg('注销成功'); | 199 | ajax('/system/user/delete/'+id, 'delete'); |
| 200 | this.reload(); | ||
| 262 | }); | 201 | }); |
| 263 | } | 202 | } |
| 264 | </script> | 203 | </script> | ... | ... |
| ... | @@ -28,7 +28,7 @@ | ... | @@ -28,7 +28,7 @@ |
| 28 | <input type="text" class="form-control input-text" value="" name="password" id="password"> | 28 | <input type="text" class="form-control input-text" value="" name="password" id="password"> |
| 29 | </div> | 29 | </div> |
| 30 | <div class="form-group col-sm-4 col-md-2 pt-25"> | 30 | <div class="form-group col-sm-4 col-md-2 pt-25"> |
| 31 | <button class="btn btn-primary" onclick="random()">随机生成密码</button> | 31 | <button class="btn btn-primary" onclick="random()" type="button">随机生成密码</button> |
| 32 | </div> | 32 | </div> |
| 33 | </div> | 33 | </div> |
| 34 | <div class="row cl"> | 34 | <div class="row cl"> | ... | ... |
| ... | @@ -3,8 +3,8 @@ | ... | @@ -3,8 +3,8 @@ |
| 3 | <body> | 3 | <body> |
| 4 | <div class="cl pd-5 bg-1"> | 4 | <div class="cl pd-5 bg-1"> |
| 5 | <span class="r"> | 5 | <span class="r"> |
| 6 | <button class="btn btn-primary radius">保存</button> | 6 | <!-- <button class="btn btn-primary radius">保存</button>--> |
| 7 | <button class="btn btn-primary radius">预览信用报告</button> | 7 | <!-- <button class="btn btn-primary radius">预览信用报告</button>--> |
| 8 | </span> | 8 | </span> |
| 9 | </div> | 9 | </div> |
| 10 | 10 | ... | ... |
-
Please register or sign in to post a comment