#@layer()

#define script()
<script src="/static/components/jquery-file-upload/js/vendor/jquery.ui.widget.js"></script>
<script src="/static/components/jquery-file-upload/js/jquery.iframe-transport.js"></script>
<script src="/static/components/jquery-file-upload/js/jquery.fileupload.js"></script>
<script>

    $('#cfile').fileupload({
        dropZone: $('#uploader'),
        url: '/commons/attachment/upload',
        sequentialUploads: true,
        done: function (e, data) {
            if (data.result.state == "ok") {
                $('#paidProof').val(data.result.src);
                toastr.success("文件上传成功...")
            } else {
                toastr.error(data.result.message)
            }
        }
    });
</script>
#end

#define css()
<link rel="stylesheet" href="/static/components/jquery-file-upload/css/jquery.fileupload.css">
<style>
    #uploader {
        height: 180px;
        border: 1px dashed #999;
        padding: 10px;
    }

    .myPanel {
        font-size: 25px;
        color: #ccc;
        text-align: center;
        padding-top: 30px;
    }
</style>
#end

#define content()

<section class="content">

    <div class="row">
        <div class="col-xs-12">
            <form class="form-horizontal form-setting autoAjaxSubmit" autocomplete="off"
                  action="#(CPATH)/admin/order/doUpdatePaystatus"
                  method="POST"
                  data-ok-function="parent.layer.closeAll()"
            >
                <input type="hidden" name="orderId" value="#(order.id ??)">
                <div class="box-body ">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">支付类型</label>
                        <div class="col-sm-8">
                            <select class="form-control" name="payStatus">
                                <option value="10"> 线下支付</option>
                                <option value="11"> 微信或支付宝等工具支付</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">入账金额</label>
                        <div class="col-sm-8">
                            <input type="input" name="paidAmount" class="form-control"
                                   value=""
                                   placeholder="请填写该订单已经入账的金额">
                        </div>
                    </div>


                    <div class="form-group">
                        <label class="col-sm-2 control-label">时间</label>
                        <div class="col-sm-8">
                            <input type="input" name="paidTime" class="form-control datetimepicker"
                                   value=""
                                   placeholder="请填写该订单已经入账的时间">
                        </div>
                    </div>


                    <div class="form-group">
                        <label class="col-sm-2 control-label">备注</label>
                        <div class="col-sm-8">
                            <textarea rows="3" name="paidRemarks" class="form-control"
                                              placeholder="备注信息..."></textarea>
                        </div>
                    </div>


                    <div class="form-group">
                        <label class="col-sm-2 control-label">入账截图（证明）</label>
                        <div class="col-sm-8 ">
                            <input type="hidden" id="paidProof" name="paidProof" value="">
                            <div id="uploader">
                                <span class="btn btn-block btn-primary fileinput-button" style="width: 120px">
                                    <i class="glyphicon glyphicon-plus"></i>
                                    <span>选择图片...</span>
                                    <input id="cfile" type="file" name="files" multiple>
                                </span>

                                <div class="myPanel">
                                    或者拖动图片到这里进行上传...
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
                <!-- /.box-body -->
                <div class="box-footer">
                    <div class="col-sm-offset-9 col-sm-2 submit-block">
                        <div class="box-submit">
                            <button type="submit" class="btn btn-primary">提交</button>
                        </div>
                    </div>
                </div>
                <!-- /.box-footer -->
            </form>
        </div>
    </div>

</section>

#end
