withdrawallist.html 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <?php $shoname_name = D('Home/Front')->get_config_by_name('shoname'); ?>
  6. <title><?php echo $shoname; ?></title>
  7. <link rel="shortcut icon" href="" />
  8. <meta name="renderer" content="webkit">
  9. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  11. <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
  12. <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
  13. <!--[if lt IE 9]>
  14. <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  15. <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
  16. <![endif]-->
  17. <link href="./resource/css/bootstrap.min.css?v=201903260001" rel="stylesheet">
  18. <link href="./resource/css/common.css?v=201903260001" rel="stylesheet">
  19. <script type="text/javascript">
  20. window.sysinfo = {
  21. <?php if (!empty($_W['uniacid']) ){ ?>'uniacid': '{$_W['uniacid']}',<?php } ?>
  22. <?php if( !empty($_W['acid']) ){ ?>'acid': '{$_W['acid']}',<?php } ?>
  23. <?php if (!empty($_W['openid']) ) { ?>'openid': '{$_W['openid']}',<?php } ?>
  24. <?php if( !empty($_W['uid']) ) { ?>'uid': '{$_W['uid']}',<?php } ?>
  25. 'isfounder': <?php if (!empty($_W['isfounder']) ) { ?>1<?php }else{ ?>0<?php } ?>,
  26. 'siteroot': '{$_W['siteroot']}',
  27. 'siteurl': '{$_W['siteurl']}',
  28. 'attachurl': '{$_W['attachurl']}',
  29. 'attachurl_local': '{$_W['attachurl_local']}',
  30. 'attachurl_remote': '{$_W['attachurl_remote']}',
  31. 'module' : {'url' : '<?php if( defined('MODULE_URL') ) { ?>{MODULE_URL}<?php } ?>', 'name' : '<?php if (defined('IN_MODULE') ) { ?>{IN_MODULE}<?php } ?>'},
  32. 'cookie' : {'pre': ''},
  33. 'account' : {:json_encode($_W['account'])},
  34. };
  35. </script>
  36. <script type="text/javascript" src="./resource/js/lib/jquery-1.11.1.min.js"></script>
  37. <script type="text/javascript" src="./resource/js/lib/bootstrap.min.js"></script>
  38. <script type="text/javascript" src="./resource/js/app/util.js?v=201903260001"></script>
  39. <script type="text/javascript" src="./resource/js/app/common.min.js?v=201903260001"></script>
  40. <script type="text/javascript" src="./resource/js/require.js?v=201903260001"></script>
  41. <script type="text/javascript" src="./resource/js/lib/jquery.nice-select.js?v=201903260001"></script>
  42. <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
  43. <link href="/static/css/snailfish.css" rel="stylesheet">
  44. <style>
  45. .daterangepicker select.ampmselect, .daterangepicker select.hourselect, .daterangepicker select.minuteselect {
  46. width: auto!important;
  47. }
  48. .img-40{width:40px;height:40px;}
  49. tbody tr td{
  50. position: relative;
  51. }
  52. tbody tr .icow-weibiaoti--{
  53. visibility: hidden;
  54. display: inline-block;
  55. color: #fff;
  56. height:18px;
  57. width:18px;
  58. background: #e0e0e0;
  59. text-align: center;
  60. line-height: 18px;
  61. vertical-align: middle;
  62. }
  63. tbody tr:hover .icow-weibiaoti--{
  64. visibility: visible;
  65. }
  66. tbody tr .icow-weibiaoti--.hidden{
  67. visibility: hidden !important;
  68. }
  69. .full .icow-weibiaoti--{
  70. margin-left:10px;
  71. }
  72. .full>span{
  73. display: -webkit-box;
  74. display: -webkit-flex;
  75. display: -ms-flexbox;
  76. display: flex;
  77. vertical-align: middle;
  78. align-items: center;
  79. }
  80. tbody tr .label{
  81. margin: 5px 0;
  82. }
  83. .goods_attribute a{
  84. cursor: pointer;
  85. }
  86. .newgoodsflag{
  87. width: 22px;height: 16px;
  88. background-color: #ff0000;
  89. color: #fff;
  90. text-align: center;
  91. position: absolute;
  92. bottom: 70px;
  93. left: 57px;
  94. font-size: 12px;
  95. }
  96. .a{cursor: pointer;}
  97. .img-40 {
  98. width: 40px;
  99. height: 40px;
  100. }
  101. .daterangepicker select.ampmselect, .daterangepicker select.hourselect, .daterangepicker select.minuteselect{
  102. width:auto!important;
  103. }
  104. </style>
  105. </head>
  106. <body layadmin-themealias="default">
  107. <table id="demo" lay-filter="test"></table>
  108. <div class="layui-fluid">
  109. <div class="layui-card">
  110. <div class="layui-card-header layui-elem-quote">当前位置:<span class="line-text">佣金申请列表</span></div>
  111. <div class="layui-card-body" style="padding:15px;">
  112. <form action="" method="get" class="form-horizontal form-search layui-form" role="form">
  113. <input type="hidden" name="c" value="distribution" />
  114. <input type="hidden" name="a" value="withdrawallist" />
  115. <div class="layui-form-item">
  116. <div class="layui-inline">
  117. <div class="layui-input-inline" style="width:280px;">
  118. {:tpl_form_field_daterange('time', array('starttime'=>date('Y-m-d H:i', $starttime),'endtime'=>date('Y-m-d H:i', $endtime),'sm'=>true, 'placeholder'=>'申请时间'),true);}
  119. </div>
  120. <div class="layui-input-inline" >
  121. <select name='comsiss_state' class='layui-input layui-unselect' style="width:80px;" >
  122. <option value=''>状态</option>
  123. <option value='0' <?php if($_GPC['comsiss_state']=='0'){ ?>selected<?php } ?>>未审核</option>
  124. <option value='1' <?php if($_GPC['comsiss_state']=='1'){ ?>selected<?php } ?>>已审核</option>
  125. <option value='2' <?php if($_GPC['comsiss_state']=='2'){ ?>selected<?php } ?>>拒绝通过</option>
  126. </select>
  127. </div>
  128. <div class="layui-input-inline" >
  129. <input type="text" class="layui-input" name="keyword" value="{$_GPC['keyword']}" placeholder="申请订单id"/>
  130. </div>
  131. <div class="layui-input-inline">
  132. <button class="layui-btn layui-btn-sm" type="submit"> 搜索</button>
  133. <button type="submit" name="export" value="1" class="btn btn-success layui-btn layui-btn-sm">导出</button>
  134. </div>
  135. </div>
  136. </div>
  137. </form>
  138. <form action="" class="layui-form" lay-filter="example" method="post" >
  139. <div class="row">
  140. <div class="col-md-12">
  141. <div class="page-table-header">
  142. <input type='checkbox' name="checkall" lay-skin="primary" lay-filter="checkboxall" />
  143. <div class="btn-group">
  144. <button class='btn btn-default btn-sm btn-op btn-operation' type="button" data-toggle='batch' data-href="{:U('distribution/agent_check_apply',array('state'=>1))}" data-confirm='确认要审核通过,已打款?'>
  145. 审核通过
  146. </button>
  147. <button class='btn btn-default btn-sm btn-op btn-operation' type="button" data-toggle='batch' data-href="{:U('distribution/agent_check_apply',array('state'=>2))}" data-confirm='确认要拒绝通过?'>
  148. 拒绝通过
  149. </button>
  150. </div>
  151. </div>
  152. <table class="table table-responsive" lay-even lay-skin="line" lay-size="lg">
  153. <thead>
  154. <tr>
  155. <th style="width:25px;"></th>
  156. <th style="width:60px;">ID</th>
  157. <th style="">会员名称</th>
  158. <th style="">联系方式</th>
  159. <th style="">提现方式</br>提现账户</th>
  160. <th style=''>申请提现金额</br>手续费</br>到账金额</th>
  161. <th style="">申请时间</br>审核时间</th>
  162. <th style='width:170px;'>状态</th>
  163. </tr>
  164. </tr>
  165. </thead>
  166. <tbody>
  167. <?php foreach($list as $row){ ?>
  168. <tr>
  169. <td style="position: relative; ">
  170. <input type='checkbox' name="item_checkbox" class="checkone" lay-skin="primary" value="{$row['id']}"/>
  171. </td>
  172. <td>
  173. {$row['id']}
  174. </td>
  175. <td style="overflow: visible">
  176. <div rel="pop" style="display: flex" >
  177. <img class="img-40" src="{$row['member_info']['avatar']}" style='width:40px;height: 40px;border-radius:50%;border:1px solid #efefef;' />
  178. <span style="display: flex;flex-direction: column;justify-content: center;align-items: flex-start;padding-left: 5px">
  179. <span class="nickname">
  180. <?php if(empty($row['member_info']['username'])){ ?><?php }else{ ?>{$row['member_info']['username']}<?php } ?>
  181. </span>
  182. </span>
  183. </div>
  184. </td>
  185. <td>
  186. {$row['member_info']['telephone']}
  187. </td>
  188. <td>
  189. <?php if($row['type'] > 0){ ?>
  190. <?php if( $row['type'] == 1 ){ ?>
  191. 会员余额
  192. <?php }else if($row['type'] == 2){ ?>
  193. 微信零钱<br/>
  194. 真实姓名:<br/>
  195. <a href='javascript:;' data-toggle='ajaxEdit' data-href="{:U('distribution/changename',array('type'=>'bankusername','id'=>$row['id']))}" >
  196. <text class='text-primary'>{$row['bankusername']}</text>
  197. </a>
  198. <?php }else if($row['type'] == 3){ ?>
  199. 支付宝<br/>
  200. <text class='text-primary'>真实姓名:{$row['bankusername']}</text><br/>
  201. <text class='text-danger'>账户:{$row['bankaccount']}</text>
  202. <?php }else if($row['type'] == 4){ ?>
  203. 银行卡<br/>
  204. <text class='text-primary'>开户行:{$row['bankname']}</text><br/>
  205. <text class='text-danger'>卡号:{$row['bankaccount']}</text><br/>
  206. <text class='text-danger'>持卡人姓名:{$row['bankusername']}</text>
  207. <?php } ?>
  208. <?php }else{ ?>
  209. {$row['community_head_commiss']['bankname']}<br/>
  210. <text class='text-primary'>{$row['community_head_commiss']['bankaccount']}</text><br/>
  211. <text class='text-danger'>{$row['community_head_commiss']['bankusername']}</text>
  212. <?php } ?>
  213. </td>
  214. <td>
  215. {$row['money']}<br/><text class='text-primary'>{$row['service_charge_money']}</text><br/>
  216. <text class='text-danger'><?php echo $row['money']-$row['service_charge_money']; ?></text>
  217. </td>
  218. <td>{:date("Y-m-d",$row['addtime'])}<br/>{:date("H:i:s",$row['addtime'])}
  219. <br/>
  220. <?php if( !empty($row['shentime']) ){ ?>
  221. {:date("Y-m-d",$row['shentime'])}<br/>{:date("H:i:s",$row['shentime'])}
  222. <?php } ?>
  223. </td>
  224. <td>
  225. <?php if($row[state] ==2){ ?>
  226. 已拒绝
  227. <?php }elseif($row[state] ==1){ ?>
  228. <text class='text-danger'>已打款</text>
  229. <?php }else{ ?>
  230. <input type="checkbox" name="" lay-filter="statewsitch" tx_type="<?php echo $row['type'];?>" data-href="{:U('distribution/agent_check_apply',array('id'=>$row['id']))}" <?php if($row['state']==1){ ?>checked <?php } ?> lay-skin="switch" lay-text="已审核|未审核">
  231. <?php } ?>
  232. <br/>
  233. </td>
  234. </tr>
  235. <?php } ?>
  236. </tbody>
  237. <tfoot>
  238. <tr>
  239. <td colspan="5">
  240. <div class="page-table-header">
  241. <input type="checkbox" name="checkall" lay-skin="primary" lay-filter="checkboxall">
  242. <div class="btn-group">
  243. <button class='btn btn-default btn-sm btn-op btn-operation' type="button" data-toggle='batch' data-href="{:U('distribution/agent_check_apply',array('state'=>1))}" data-confirm='确认要审核通过,已打款?'>
  244. 审核通过
  245. </button>
  246. <button class='btn btn-default btn-sm btn-op btn-operation' type="button" data-toggle='batch' data-href="{:U('distribution/agent_check_apply',array('state'=>2))}" data-confirm='确认要拒绝通过?'>
  247. 拒绝通过
  248. </button>
  249. </div>
  250. </div>
  251. </td>
  252. <td colspan="4" style="text-align: right">
  253. {$pager}
  254. </td>
  255. </tr>
  256. </tfoot>
  257. </table>
  258. </div>
  259. </div>
  260. </form>
  261. </div>
  262. </div>
  263. </div>
  264. <script src="/layuiadmin/layui/layui.js"></script>
  265. <script>
  266. layui.config({
  267. base: '/layuiadmin/' //静态资源所在路径
  268. }).extend({
  269. index: 'lib/index' //主入口模块
  270. }).use('index');
  271. </script>
  272. <script>
  273. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  274. var layer = layui.layer;
  275. var $;
  276. layui.use(['jquery', 'layer','form'], function(){
  277. $ = layui.$;
  278. var form = layui.form;
  279. $('.deldom').click(function(){
  280. var s_url = $(this).attr('data-href');
  281. layer.confirm($(this).attr('data-confirm'), function(index){
  282. $.ajax({
  283. url:s_url,
  284. type:'post',
  285. dataType:'json',
  286. success:function(info){
  287. if(info.status == 0)
  288. {
  289. layer.msg(info.result.message,{icon: 1,time: 2000});
  290. }else if(info.status == 1){
  291. var go_url = location.href;
  292. if( info.result.hasOwnProperty("url") )
  293. {
  294. go_url = info.result.url;
  295. }
  296. layer.msg('操作成功',{time: 1000,
  297. end:function(){
  298. location.href = info.result.url;
  299. }
  300. });
  301. }
  302. }
  303. })
  304. });
  305. })
  306. $('.btn-operation').click(function(){
  307. var ids_arr = [];
  308. var obj = $(this);
  309. var s_toggle = $(this).attr('data-toggle');
  310. var s_url = $(this).attr('data-href');
  311. $(obj).attr('disabled',true);
  312. $("input[name=item_checkbox]").each(function() {
  313. if( $(this).prop('checked') )
  314. {
  315. ids_arr.push( $(this).val() );
  316. }
  317. })
  318. if(ids_arr.length < 1)
  319. {
  320. layer.msg('请选择要操作的内容');
  321. $(obj).attr('disabled',false);
  322. }else{
  323. var can_sub = true;
  324. if( s_toggle == 'batch-remove' )
  325. {
  326. can_sub = false;
  327. $(obj).attr('disabled',false);
  328. layer.confirm($(obj).attr('data-confirm'), function(index){
  329. $.ajax({
  330. url:s_url,
  331. type:'post',
  332. dataType:'json',
  333. data:{ids:ids_arr},
  334. success:function(info){
  335. if(info.status == 0)
  336. {
  337. layer.msg(info.result.message,{icon: 1,time: 2000});
  338. }else if(info.status == 1){
  339. var go_url = location.href;
  340. if( info.result.hasOwnProperty("url") )
  341. {
  342. go_url = info.result.url;
  343. }
  344. layer.msg('操作成功',{time: 1000,
  345. end:function(){
  346. location.href = info.result.url;
  347. }
  348. });
  349. }
  350. }
  351. })
  352. });
  353. }else{
  354. $.ajax({
  355. url: s_url,
  356. type: 'post',
  357. dataType: 'json',
  358. data: {ids: ids_arr},
  359. success: function (info) {
  360. if (info.status == 0) {
  361. layer.msg(info.result.message, {icon: 1, time: 2000,
  362. end:function(){
  363. $(obj).attr('disabled',false);
  364. }});
  365. } else if (info.status == 1) {
  366. var go_url = location.href;
  367. if (info.result.hasOwnProperty("url")) {
  368. go_url = info.result.url;
  369. }
  370. layer.msg('操作成功', {
  371. time: 1000,
  372. end: function () {
  373. location.href = info.result.url;
  374. }
  375. });
  376. }
  377. }
  378. })
  379. }
  380. }
  381. })
  382. form.on('switch(restwsitch)', function(data){
  383. var s_url = $(this).attr('data-href')
  384. var rest = 1;
  385. if(data.elem.checked)
  386. {
  387. rest = 1;
  388. }else{
  389. rest = 0;
  390. }
  391. $.ajax({
  392. url:s_url,
  393. type:'post',
  394. dataType:'json',
  395. data:{rest:rest},
  396. success:function(info){
  397. if(info.status == 0)
  398. {
  399. layer.msg(info.result.message,{icon: 1,time: 2000});
  400. }else if(info.status == 1){
  401. var go_url = location.href;
  402. if( info.result.hasOwnProperty("url") )
  403. {
  404. go_url = info.result.url;
  405. }
  406. layer.msg('操作成功',{time: 1000,
  407. end:function(){
  408. location.href = info.result.url;
  409. }
  410. });
  411. }
  412. }
  413. })
  414. });
  415. form.on('switch(enablewsitch)', function(data){
  416. var s_url = $(this).attr('data-href')
  417. var enable = 1;
  418. if(data.elem.checked)
  419. {
  420. enable = 1;
  421. }else{
  422. enable = 0;
  423. }
  424. $.ajax({
  425. url:s_url,
  426. type:'post',
  427. dataType:'json',
  428. data:{enable:enable},
  429. success:function(info){
  430. if(info.status == 0)
  431. {
  432. layer.msg(info.result.message,{icon: 1,time: 2000});
  433. }else if(info.status == 1){
  434. var go_url = location.href;
  435. if( info.result.hasOwnProperty("url") )
  436. {
  437. go_url = info.result.url;
  438. }
  439. layer.msg('操作成功',{time: 1000,
  440. end:function(){
  441. location.href = info.result.url;
  442. }
  443. });
  444. }
  445. }
  446. })
  447. });
  448. form.on('switch(statewsitch)', function(data){
  449. var lock = false;
  450. var s_url = $(this).attr('data-href')
  451. var x=data.elem.checked;
  452. var tx_type = $(this).attr('tx_type');
  453. var tip_msg = '确认审核通过,已经打款?';
  454. if(tx_type == 1){
  455. //系统余额
  456. tip_msg = '确认审核通过,该会员个人中心余额会立即收到,只能用于小程序消费。';
  457. }else if(tx_type == 2){
  458. //1、微信零钱
  459. tip_msg = '确认审核通过,将立即从微信支付商户扣款打到该会员微信零钱中。';
  460. }else if(tx_type == 3){
  461. //支付宝
  462. tip_msg = '请确认已手动转账到对方支付宝账户。';
  463. }else if(tx_type == 4){
  464. //银行卡
  465. tip_msg = '请确认已手动转账到对方银行卡账户。';
  466. }
  467. layer.confirm(tip_msg,{
  468. btn:['确定','取消'],
  469. },function () {
  470. var state = 1;
  471. if (data.elem.checked) {
  472. state = 1;
  473. } else {
  474. state = 0;
  475. }
  476. if(!lock) {
  477. lock = true;
  478. $.ajax({
  479. url: s_url,
  480. type: 'post',
  481. dataType: 'json',
  482. data: {state: state},
  483. success: function (info) {
  484. if (info.status == 0) {
  485. layer.msg(info.result.message, {
  486. icon: 1, time: 2000,
  487. end: function () {
  488. location.href = location.href;
  489. }
  490. });
  491. } else if (info.status == 1) {
  492. var go_url = location.href;
  493. if (info.result.hasOwnProperty("url")) {
  494. go_url = info.result.url;
  495. }
  496. layer.msg('操作成功', {
  497. time: 1000,
  498. end: function () {
  499. location.href = info.result.url;
  500. }
  501. });
  502. }
  503. }
  504. })
  505. }
  506. },function(){
  507. data.elem.checked=!x;
  508. form.render();
  509. })
  510. });
  511. form.on('checkbox(checkboxall)', function(data){
  512. if(data.elem.checked)
  513. {
  514. $("input[name=item_checkbox]").each(function() {
  515. $(this).prop("checked", true);
  516. });
  517. $("input[name=checkall]").each(function() {
  518. $(this).prop("checked", true);
  519. });
  520. }else{
  521. $("input[name=item_checkbox]").each(function() {
  522. $(this).prop("checked", false);
  523. });
  524. $("input[name=checkall]").each(function() {
  525. $(this).prop("checked", false);
  526. });
  527. }
  528. form.render('checkbox');
  529. });
  530. //监听提交
  531. form.on('submit(formDemo)', function(data){
  532. $.ajax({
  533. url: data.form.action,
  534. type: data.form.method,
  535. data: data.field,
  536. dataType:'json',
  537. success: function (info) {
  538. if(info.status == 0)
  539. {
  540. layer.msg(info.result.message,{icon: 1,time: 2000});
  541. }else if(info.status == 1){
  542. var go_url = location.href;
  543. if( info.result.hasOwnProperty("url") )
  544. {
  545. go_url = info.result.url;
  546. }
  547. layer.msg('操作成功',{time: 1000,
  548. end:function(){
  549. location.href = info.result.url;
  550. }
  551. });
  552. }
  553. }
  554. });
  555. return false;
  556. });
  557. })
  558. </script>
  559. <script>
  560. $(document).on("click", '[data-toggle="ajaxEdit"]', function(e) {
  561. var obj = $(this),
  562. url = obj.data('href') || obj.attr('href'),
  563. data = obj.data('set') || {},
  564. html = $.trim(obj.text()),
  565. required = obj.data('required') || true,
  566. edit = obj.data('edit') || 'input';
  567. var oldval = $.trim($(this).text());
  568. e.preventDefault();
  569. submit = function() {
  570. e.preventDefault();
  571. var val = $.trim(input.val());
  572. if (required) {
  573. if (val == '') {
  574. layer.msg(tip.lang.empty);
  575. return
  576. }
  577. }
  578. if (val == html) {
  579. input.remove(), obj.html(val).show();
  580. return
  581. }
  582. if (url) {
  583. $.post(url, {
  584. value: val
  585. }, function(ret) {
  586. ret = eval("(" + ret + ")");
  587. if (ret.status == 1) {
  588. obj.html(val).show()
  589. } else {
  590. layer.msg(ret.result.message, ret.result.url)
  591. }
  592. input.remove();
  593. location.reload();
  594. }).fail(function() {
  595. input.remove(), layer.msg(tip.lang.exception)
  596. })
  597. } else {
  598. input.remove();
  599. obj.html(val).show()
  600. }
  601. obj.trigger('valueChange', [val, oldval])
  602. }, obj.hide().html('<i class="fa fa-spinner fa-spin"></i>');
  603. var input = $('<input type="text" class="form-control input-sm" style="width: 80%;display: inline;" />');
  604. if (edit == 'textarea') {
  605. input = $('<textarea type="text" class="form-control" style="resize:none" rows=3 ></textarea>')
  606. }
  607. obj.after(input);
  608. input.val(html).select().blur(function() {
  609. submit(input)
  610. }).keypress(function(e) {
  611. if (e.which == 13) {
  612. submit(input)
  613. }
  614. })
  615. })
  616. </script>
  617. </body>