<script type="text/html" template lay-done="layui.data.sendParams(d);">
    <div class="layui-tab-item  layui-show">
        <div class="">
            <div class="warning-msg">
                <div class="warning-msg-content">
                    <p>当前选中{{d.params.data.entity.id.length}}条数据</p>
                    <p>
                        使用说明：<br />
                        价格类型：是指具体要修改某一种类型的价格，包含会员价，调整类型：是在原有的基础上对价格进行修改。调整值是价格类型通过调整类型和调整值计算得到。<br />
                        例如：调整销售价统一设置为10，则价格类型选择销售价，调整类型选择=，调整值输入10即可。
                        如想调整销售价上浮10%，则价格选择销售价，调整类型选择x，调整值输入1.1即可。
                    </p>

                    注：会员等级价格调整时，是商品实际价格为商品价格减去会员价
                </div>
            </div>
            <div id="layui-card">
                <div class="layui-form" lay-filter="LAY-app-CoreCmsGoods-batchModifyPrice" id="LAY-app-CoreCmsGoods-batchModifyPrice">
                    <input type="hidden" name="ids" value="{{d.params.data.entity.id}}">
                    <div class="layui-form-item">
                        <label class="layui-form-label">价格类型：</label>
                        <div class="layui-input-inline">
                            <select name="priceType">
                                {{# layui.each(d.params.data.priceType, function(index, item){ }}
                                <option value="{{ item.title }}">{{ item.description }}</option>
                                {{# }); }}
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">调整类型：</label>
                        <div class="layui-input-inline">
                            <select name="modifyType">
                                <option value="+">+</option>
                                <option value="-">-</option>
                                <option value="=">=</option>
                                <option value="*">x</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">调整值：</label>
                        <div class="layui-input-inline">
                            <input type="text" value="" name="priceValue" lay-verType="tips" lay-verify="required|money" placeholder="请输入金额调整值" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item core-hidden">
                        <input type="button" class="layui-btn" lay-submit lay-filter="LAY-app-CoreCmsGoods-batchModifyPrice-submit" id="LAY-app-CoreCmsGoods-batchModifyPrice-submit" value="确认提交">
                    </div>
                </div>
            </div>
        </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'],
            function () {
                var $ = layui.$
                    , form = layui.form
                    , admin = layui.admin
                    , laydate = layui.laydate
                    , upload = layui.upload
                    , coreHelper = layui.coreHelper;

                form.verify({
                    money: [/((^[1-9]\d*)|^0)(\.\d{0,2}){0,1}$/, '请输入金额'],
                });
                //重载form
                form.render(null, 'LAY-app-CoreCmsGoods-batchModifyPrice');
            })
    };
</script>