迅睿CMS框架是一款PHP8高性能·简单易用的CMS开源开发框架,基于MIT开源许可协议发布,免费且不限制商业使用,是免费开源的产品,以万端互联为设计理念,支持的微信公众号、小程序、APP客户端、移动端网站、PC网站等多终端式管理系统。
联系官方销售客服
1835022288
028-61286886
后台财务流水已付流水自定义时间!加入自定义字段
<div class="form-group" id="dr_row_inputtime"> <label class="control-label col-md-2"> <span class="required" aria-required="true"> * </span>到期时间限制</label> <div class="col-md-9"><div class="form-date input-group"> <link href="http://xunrui.cc/static/assets/global/plugins/bootstrap-daterangepicker/daterangepicker.min.css?v=20200319144529" rel="stylesheet" type="text/css" /> <link href="http://xunrui.cc/static/assets/global/plugins/bootstrap-datepicker/css/bootstrap-datepicker.min.css?v=20200319144529" rel="stylesheet" type="text/css" /> <link href="http://xunrui.cc/static/assets/global/plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css?v=20200319144529" rel="stylesheet" type="text/css" /> <script src="http://xunrui.cc/static/assets/global/plugins/moment.min.js?v=20200319144529" type="text/javascript"></script> <script src="http://xunrui.cc/static/assets/global/plugins/bootstrap-datepicker/js/bootstrap-datepicker.finecms.js?v=20200319144529" type="text/javascript"></script> <script src="http://xunrui.cc/static/assets/global/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.finecms.js?v=20200319144529" type="text/javascript"></script> <div class="input-group date field_date_inputtime"><span class="input-group-btn"> <button class="btn default date-set" type="button"> <i class="fa fa-calendar"></i> </button> </span><input name="endtime" id="endtime" type="text" style="width:170px;" value="{dr_date($data.endtime)}" required="required" class="form-control "></div> <script> $(function(){ $(".field_date_inputtime").datetimepicker({ isRTL: false, format: "yyyy-mm-dd hh:ii:ss", showMeridian: true, autoclose: true, pickerPosition: "bottom-right", todayBtn: true }); }); </script> </div></div> </div> <button type="button" onclick="tijiao()" class="btn green"> <i class="fa fa-save"></i> {dr_lang('提交')}</button>
<script> function tijiao() { $.ajax({ type: 'POST', dataType: 'json', url: '{dr_url("member_paylog/xiugai")}&id={$_GET["id"]}', data: { endtime: $('#endtime').val(), {csrf_token()} : "{csrf_hash()}" }, success: function (data) { if (data.code == 1){ layer.msg('修改成功'); } }, error: function (data) { if (data.code == 0){ layer.msg('修改失败'); } } }) } </script>
public function xiugai(){ $id = $this->request->getGet('id'); $endtime = strtotime($this->request->getPost('endtime')); $result = \Phpcmf\Service::M()->db->table('member_paylog')->where('id',$id)->update(['endtime' => $endtime]); if ($result){ return json_encode(['code'=>1]); }else { return json_encode(['code'=>0]); } }