init
Showing
1 changed file
with
86 additions
and
0 deletions
| ... | @@ -67,6 +67,8 @@ | ... | @@ -67,6 +67,8 @@ |
| 67 | <button class="btn radius size-M">请选择 <i class="Hui-iconfont"></i></button>\ | 67 | <button class="btn radius size-M">请选择 <i class="Hui-iconfont"></i></button>\ |
| 68 | <ul class="dropDown-menu menu radius box-shadow">\ | 68 | <ul class="dropDown-menu menu radius box-shadow">\ |
| 69 | <li><a href="javascript:;edit('+data+')">编辑订单</a></li>\ | 69 | <li><a href="javascript:;edit('+data+')">编辑订单</a></li>\ |
| 70 | <li><a href="javascript:;confirma('+data+')">确认起诉</a></li>\ | ||
| 71 | <li><a href="javascript:;transfer('+data+')">移交起诉</a></li>\ | ||
| 70 | <li><a href="javascript:;del('+data+')">删除订单</a></li>\ | 72 | <li><a href="javascript:;del('+data+')">删除订单</a></li>\ |
| 71 | </ul></span>'; | 73 | </ul></span>'; |
| 72 | } | 74 | } |
| ... | @@ -171,6 +173,90 @@ | ... | @@ -171,6 +173,90 @@ |
| 171 | }); | 173 | }); |
| 172 | } | 174 | } |
| 173 | 175 | ||
| 176 | function transfer(id) { | ||
| 177 | layer.confirm('是否移交', { | ||
| 178 | btn: ['确认','取消'], | ||
| 179 | title: '移交', | ||
| 180 | icon: 3 | ||
| 181 | }, function(){ | ||
| 182 | // ajax('/loanAfter/repaymentPlan/'+id, 'delete') | ||
| 183 | |||
| 184 | var data = { | ||
| 185 | stateCode: 2 | ||
| 186 | }; | ||
| 187 | $.ajax({ | ||
| 188 | type: 'patch', | ||
| 189 | // url: apiBaseUrl + 'manage/financial/confirm/' + id + '?realRepaymentDate=' + Date.now(), | ||
| 190 | url: apiBaseUrl + 'loanAfter/prosecute/operate/'+id+'?stateCode=2', | ||
| 191 | cache: false, | ||
| 192 | dataType: 'json', | ||
| 193 | data: JSON.stringify(data), | ||
| 194 | contentType: "application/json; charset=UTF-8", | ||
| 195 | success: function (data) { | ||
| 196 | if (data.msg) { | ||
| 197 | layer.alert(data.msg); | ||
| 198 | } else if (data.code != 0) { | ||
| 199 | layer.alert('操作失败'); | ||
| 200 | } else { | ||
| 201 | layer.msg('通过'); | ||
| 202 | } | ||
| 203 | if(!data.code){ | ||
| 204 | setTimeout(function () { | ||
| 205 | layer_close(); | ||
| 206 | }, 500) | ||
| 207 | } | ||
| 208 | }, | ||
| 209 | error: function () { | ||
| 210 | layer.alert("操作失败") | ||
| 211 | } | ||
| 212 | }); | ||
| 213 | |||
| 214 | |||
| 215 | }); | ||
| 216 | } | ||
| 217 | |||
| 218 | function confirma(id) { | ||
| 219 | layer.confirm('是否确认移交', { | ||
| 220 | btn: ['确认','取消'], | ||
| 221 | title: '确认移交', | ||
| 222 | icon: 3 | ||
| 223 | }, function(){ | ||
| 224 | // ajax('/loanAfter/repaymentPlan/'+id, 'delete') | ||
| 225 | |||
| 226 | var data = { | ||
| 227 | stateCode: 3 | ||
| 228 | }; | ||
| 229 | $.ajax({ | ||
| 230 | type: 'patch', | ||
| 231 | // url: apiBaseUrl + 'manage/financial/confirm/' + id + '?realRepaymentDate=' + Date.now(), | ||
| 232 | url: apiBaseUrl + 'loanAfter/prosecute/operate/'+id+'?stateCode=3', | ||
| 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 | if(!data.code){ | ||
| 246 | setTimeout(function () { | ||
| 247 | layer_close(); | ||
| 248 | }, 500) | ||
| 249 | } | ||
| 250 | }, | ||
| 251 | error: function () { | ||
| 252 | layer.alert("操作失败") | ||
| 253 | } | ||
| 254 | }); | ||
| 255 | |||
| 256 | |||
| 257 | }); | ||
| 258 | } | ||
| 259 | |||
| 174 | function reload() { | 260 | function reload() { |
| 175 | table.fnDraw(); | 261 | table.fnDraw(); |
| 176 | } | 262 | } | ... | ... |
-
Please register or sign in to post a comment