联系官方销售客服

1835022288

028-61286886

开发框架 版主:迅睿框架研发组
后台财务流水已付流水自定义时间!加入自定义字段
类型:迅睿CMS 更新时间:2020-03-25 15:32:03 后台

后台财务流水已付流水自定义时间!加入自定义字段

回帖
  • #1楼    迅睿框架创始人
    2020-03-25 15:26:19
    Chrome 0
    这个地方不能加自定义字段,没有做财务表的自定义字段功能的
  • 郑中建
    #2楼    郑中建
    2020-03-25 15:29:09
    Chrome 0
    自己建一个财务表,建一个控制器,系统表肯定不让改的
  • 琉惗
    #3楼    琉惗
    2020-03-25 15:30:56
    Chrome 0
    <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]);
        }
    }
    满意答案
  • 陶思健
    #4楼    陶思健
    2020-03-25 15:32:03
    Chrome 0
    @琉惗:感谢大佬