联系我们
028-61286886
投诉邮箱

q@xunruicms.com

后台财务流水已付流水自定义时间!加入自定义字段
方案栏目:迅睿CMS 发布时间:2020-03-25 15:25:12

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

解决方案列表
  • 2020-03-25 15:26:19

    这个地方不能加自定义字段,没有做财务表的自定义字段功能的

  • 2020-03-25 15:29:09

    自己建一个财务表,建一个控制器,系统表肯定不让改的

  • 2020-03-25 15:30:56
    <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  target="_blank" href="http://xunrui.cc/static/assets/global/plugins/bootstrap-daterangepicker/daterangepicker.min.css?v=20200319144529" rel="stylesheet" type="text/css" />
                        <link  target="_blank" href="http://xunrui.cc/static/assets/global/plugins/bootstrap-datepicker/css/bootstrap-datepicker.min.css?v=20200319144529" rel="stylesheet" type="text/css" />
                        <link  target="_blank" 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]);
        }
    }
    最佳满意方案
  • 2020-03-25 15:32:03
    @琉惗:感谢大佬