<script type="text/html" template lay-done="layui.data.sendParams(d);">
    <div class="layui-form coreshop-form layui-form-pane" lay-filter="LAY-app-CoreCmsUserServicesOrder-editForm" id="LAY-app-CoreCmsUserServicesOrder-editForm">

        <div class="layui-form-item">
            <label for="serviceOrderId" class="layui-form-label  layui-form-required">服务订单编号</label>
            <div class="layui-input-block">
                <input name="serviceOrderId" lay-verType="tips" lay-verify="required|verifyserviceOrderId" class="layui-input" placeholder="请输入服务订单编号" lay-reqText="请输入服务订单编号" value="{{d.params.data.serviceOrderId || '' }}" />
            </div>
        </div>

        <div class="layui-form-item">
            <label for="userId" class="layui-form-label  layui-form-required">关联用户</label>
            <div class="layui-input-block">
                <input type="number" min="0" max="999999" name="userId" lay-verType="tips" lay-verify="required|number" class="layui-input" value="{{d.params.data.userId || '' }}" placeholder="请输入关联用户" lay-reqText="请输入关联用户并为数字" />
            </div>
        </div>

        <div class="layui-form-item">
            <label for="servicesId" class="layui-form-label  layui-form-required">关联服务</label>
            <div class="layui-input-block">
                <input type="number" min="0" max="999999" name="servicesId" lay-verType="tips" lay-verify="required|number" class="layui-input" value="{{d.params.data.servicesId || '' }}" placeholder="请输入关联服务" lay-reqText="请输入关联服务并为数字" />
            </div>
        </div>

        <div class="layui-form-item" pane>
            <label for="isPay" class="layui-form-label  layui-form-required">是否支付</label>
            <div class="layui-input-block">
                <input type="checkbox" lay-filter="switch" name="isPay" {{ d.params.data.isPay ? 'checked' : '' }} lay-skin="switch" lay-text="开启|关闭"> </div> </div>  <div class="layui-form-item"> <label for="payTime" class="layui-form-label  layui-form-required">支付时间</label> <div class="layui-input-block"> <input name="payTime" id="editTime-CoreCmsUserServicesOrder-payTime" type="text" lay-verType="tips" lay-verify="required|datetime" class="layui-input" placeholder="请输入支付时间" lay-reqText="请输入支付时间" value="{{d.params.data.payTime || '' }} "  />
            </div>
        </div>

        <div class="layui-form-item">
            <label for="paymentId" class="layui-form-label  layui-form-required">支付单号</label>
            <div class="layui-input-block">
                <input name="paymentId" lay-verType="tips" lay-verify="required|verifypaymentId" class="layui-input" placeholder="请输入支付单号" lay-reqText="请输入支付单号" value="{{d.params.data.paymentId || '' }}" />
            </div>
        </div>

        <div class="layui-form-item">
            <label for="status" class="layui-form-label  layui-form-required">状态</label>
            <div class="layui-input-block">
                <input type="number" min="0" max="999999" name="status" lay-verType="tips" lay-verify="required|number" class="layui-input" value="{{d.params.data.status || '' }}" placeholder="请输入状态" lay-reqText="请输入状态并为数字" />
            </div>
        </div>

        <div class="layui-form-item">
            <label for="createTime" class="layui-form-label  layui-form-required">订单创建时间</label>
            <div class="layui-input-block">
                <input name="createTime" id="editTime-CoreCmsUserServicesOrder-createTime" type="text" lay-verType="tips" lay-verify="required|datetime" class="layui-input" placeholder="请输入订单创建时间" lay-reqText="请输入订单创建时间" value="{{d.params.data.createTime || '' }}" />
            </div>
        </div>

        <div class="layui-form-item">
            <label for="servicesEndTime" class="layui-form-label  layui-form-required">截止服务时间</label>
            <div class="layui-input-block">
                <input name="servicesEndTime" id="editTime-CoreCmsUserServicesOrder-servicesEndTime" type="text" lay-verType="tips" lay-verify="required|datetime" class="layui-input" placeholder="请输入截止服务时间" lay-reqText="请输入截止服务时间" value="{{d.params.data.servicesEndTime || '' }}" />
            </div>
        </div>

        <div class="layui-form-item text-right">
            <input type="button" class="layui-btn" lay-submit lay-filter="LAY-app-CoreCmsUserServicesOrder-editForm-submit" id="LAY-app-CoreCmsUserServicesOrder-editForm-submit" value="确认编辑">
        </div>
    </div>
</script>
<script>
    var debug = layui.setter.debug;
    layui.data.sendParams = function (d) {
        //开启调试情况下获取接口赋值数据
        if (debug) { console.log(d.params.data); }
        layui.use(['admin', 'form', 'laydate', 'upload', 'coreHelper', 'cropperImg'],
            function () {
                var $ = layui.$
                    , form = layui.form
                    , admin = layui.admin
                    , laydate = layui.laydate
                    , upload = layui.upload
                    , cropperImg = layui.cropperImg
                    , coreHelper = layui.coreHelper;

                laydate.render({
                    elem: '#editTime-CoreCmsUserServicesOrder-payTime',
                    type: 'datetime'
                });
                laydate.render({
                    elem: '#editTime-CoreCmsUserServicesOrder-createTime',
                    type: 'datetime'
                });
                laydate.render({
                    elem: '#editTime-CoreCmsUserServicesOrder-servicesEndTime',
                    type: 'datetime'
                });
                form.verify({

                    verifyserviceOrderId: [/^[\S]{0,50}$/, '服务订单编号最大只允许输入50位字符，且不能出现空格'],
                    verifypaymentId: [/^[\S]{0,50}$/, '支付单号最大只允许输入50位字符，且不能出现空格'],
                });
                //重载form
                form.render(null, 'LAY-app-CoreCmsUserServicesOrder-editForm');
            })
    };
</script>