cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <title>批量导入</title>
    [#include "/business/pages/include/static.html" /]
    [#include "/component/cfgcateSelector.html" /]
</head>
<body>
<form id="uploadForm" action="${base}/business/pages/cfg/doUploadBatchCiInfo.html" method="post"
      enctype="multipart/form-data">
    <table class="table_basic_info" style="width:100%;height:100%;margin-top:20px;">
        <tr>
            <td style="padding-left:10%;font-size:12px;">
                <input type="hidden" name="cate" value="${RequestParameters.cate}">
                <input type="hidden" name="flowId" value="${RequestParameters.flowId}">
                <input type="hidden" name="proId" value="${RequestParameters.proId}">
                <div class="file-box">
                    请选择配置分类:
                    [@cfgcate id="full_cate_id" name="full_cate_name" /]
                   <!-- <a href="javascript:downloadExecelTemplate()" >下载模板</a>-->
                    <a class="common download"  href="javascript:downloadExecelTemplate();"><span>下载模板</span></a>
                </div>
                <div class="file-box" style="margin-top:20px;">
                    请选择文件:
                    <input type="file" name="file" id="file" class="file" size="28"
                           onchange="document.getElementById('textfield').value=this.value" style="">
                </div>
            </td>
        </tr>
    </table>
</form>
</body>
<script type="text/javascript">
    function onDialogBtnClick(btnID, dialogID, config) {
        var full_cate_id = $("#full_cate_id").val();
        if ($("#full_cate_id").val() == "") {
            window.top.popupTips("请选择配置分类");
            return;
        }
        if (btnID) {
            if ($.util.isEmpty($("#file").val())) {
                window.top.popupTips('请选择文件');
                return;
            }
            var filename = $("#file").val();
            if (!$.util.endWith(filename, "xls", false)) {
                window.top.popupTips('选择的文件必须以.xls结尾');
                return;
            }
            document.getElementById("uploadForm").target = window.top.openDialog("0", "批量导入",
                {},
                {"width": 40, "height": 40, "noclose": true},
                [{btnId: "tipBtnSure", btnName: "确定", btnStyle: "bluebtn"}]);
            $("#uploadForm").submit();
            window.top.hideDialog("uploadBatch");
        }
    }
    function downloadExecelTemplate() {
        var full_cate_id = $("#full_cate_id").val()
        var full_cate_name = encodeURI(encodeURI($("#full_cate_name").val()));
        if ($("#full_cate_id").val() == "") {
            window.top.popupTips("请选择配置分类");
            return;
        }
        window.top.location.href = "${base}/business/pages/cfg/downloadExecelTemplate.html?full_cate_name=" + full_cate_name + "&full_cate_id=" + full_cate_id;
    }
</script>
</html>