linzhijie
2021-04-12 c632636e2f5b4188b430f5efc9d9f68c8dbe3d6d
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
70
71
72
73
74
75
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('发送短信邀请评测人员')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-testMember-sendSms">
        <input type="hidden" id="memberIds" name="memberIds" th:value="${memberIds}">
        <input type="hidden" id="type" name="type" th:value="${type}">
        <input type="hidden" id="number" name="number">
 
        <div class="form-group">
            <label class="col-sm-2 control-label">[[#{jsp.exam.test_package.022}]]:</label>
            <div class="col-sm-9">
                <textarea type="text" name="content" id="content" rows="2" cols="20" class="form-control" th:text="${template}"
                          onchange="updateSum();"
                          style="height:120px;"></textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label"></label>
            <div class="col-sm-9">
                <span>[[#{jsp.exam.test_package.023}]]:</span>
                <span id="charCount" name="charCount" style="color: red;">70</span>
                <span>[[#{jsp.exam.test_package.024}]] </span>
                <span id="numberCount" name="numberCount" style="color: red;">1</span>
                <span>item</span>
                <span>
                [[#{jsp.exam.test_package.025}]]
                </span>
                <span style="color: red;">[[#{jsp.exam.test_package.026}]]</span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">[[#{jsp.exam.test_package.027}]]:</label>
            <div class="col-sm-9">
                <select class="form-control" name="platform" id="platform" th:with="type=${@dict.getType('sms_system')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                </select>
            </div>
        </div>
        <div>
            <span>Tpis:[[#{jsp.exam.test_package.021}]]</span>
            <span style="color: red">{url}</span>
            <span>keyword。</span>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<script type="text/javascript">
    var prefix = ctx + "exam/testMember";
 
    function updateSum() {
        var len = beautySub('【TAI测评】' + $('#content').val());
        $('#numberCount').text(Math.ceil(len / 70));
        $('#charCount').text(len);
        $('#number').val($('#numberCount').text());
 
    }
 
    //计算短信长度
    function beautySub(str) {
        return str.replace(/[^\x00-\xff]/g, '__').length;
    }
 
    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/addSendTask", $('#form-testMember-sendSms').serialize());
        }
    }
</script>
</body>
</html>