brandRebateImport.html 1.72 KB
<!DOCTYPE html>
<table style="width: 100%">
    <tbody>
    <tr>
        <td style="font-size: medium" width="20%" align="center">上传文件:</td>
        <td width="80%">
            <div id="batchImportDiv"></div>
        </td>
    </tr>
    <tr>
        <td style="font-size: medium" align="center" width="20%">规则:</td>
        <td style="font-size: medium" width="80%">
            1、上传文件必须是.xls或者.xlsx文件<br>
            2、Excel表头:品牌ID 、返佣比例、品牌返佣状态<br>
            3、结算比例格式为百分比,百分号内最多包含一位小数。0.0%<取值范围≤25.0%;或默认<br>
            4、返佣状态:1开启、2关闭<br>
            5、每个csv文件控制在2500行以内<br>
            6、<a id="downloadSample">下载样例</a>
        </td>
    </tr>
    </tbody>
</table>

<script type="text/javascript">
    $(function () {
        //todo
        $("#downloadSample").attr("href", contextPath + "/common/shareRebateBrand.xlsx");

        $("#batchImportDiv").fileUpload({
            text: "请选择文件",
            uploadInputName: "file",
            url: contextPath + "/batch/import",
            queryParams: {
                type: "shareRebateImport",//todo
                args: "import"
            },
            showFileName: false,
            onLoadSuccess: function (fileName, data) {
                //todo
                $("#shareRebateBrandTable").myDatagrid("reload");
                $("#batchImportDialogDiv").dialog("close");
                $.messager.show({
                    title: "提示",
                    msg: "导入成功!",
                    height: 200
                });
            }
        });
    });
</script>