迅睿CMS框架是一款PHP8高性能·簡單易用的CMS開源開發(fā)框架,基于MIT開源許可協(xié)議發(fā)布,免費且不限制商業(yè)使用,是免費開源的產(chǎn)品,以萬端互聯(lián)為設(shè)計理念,支持的微信公眾號、小程序、APP客戶端、移動端網(wǎng)站、PC網(wǎng)站等多終端式管理系統(tǒng)。
聯(lián)系官方銷售客服
1835022288
028-61286886
后臺財務(wù)流水已付流水自定義時間!加入自定義字段
這個地方不能加自定義字段,沒有做財務(wù)表的自定義字段功能的
自己建一個財務(wù)表,建一個控制器,系統(tǒng)表肯定不讓改的
<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]); } }
這個地方不能加自定義字段,沒有做財務(wù)表的自定義字段功能的
自己建一個財務(wù)表,建一個控制器,系統(tǒng)表肯定不讓改的