wzy
2021-04-01 d388e2788b7ef088d7cd40f901b0acdcec460bc3
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link th:href="@{/plugin/bootstrap-fileinput/css/fileinput.css}"
          media="all" rel="stylesheet" type="text/css"/>
    <!-- 本框架基本脚本和样式 -->
    <script type="text/javascript"
            th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
    <script type="text/javascript"
            th:src="@{/js/systools/MBase.js}"></script>
    <script type="text/javascript"
            th:src="@{/js/function/public.js}"></script>
    <script th:src="@{/plugin/bootstrap-fileinput/js/fileinput.js}"
            type="text/javascript"></script>
    <script th:src="@{/plugin/bootstrap-fileinput/js/locales/zh.js}"
            type="text/javascript"></script>
</head>
<body>
<div class="ibox-content">
    <form class="form-horizontal" id="dataform" onsubmit="javascript:return false;">
        <input autocomplete="off"   type="hidden" name="tokenUrl" th:value="${tokenUrl}">
        <input autocomplete="off"   type="hidden" name="token" th:value="${token}">
        <input autocomplete="off"   type="hidden" name="artypeId" th:value="${obj.artypeId}">
        <div class="form-group">
            <label class="col-offset-1 col-sm-2 control-label">父级文章类别</label>
            <div class="col-sm-4">
                <select class="form-control  select2" size="1" name="artypeParentid"
                        id="artypeParentid">
                </select>
            </div>
 
            <label class="col-sm-2 control-label">文章类别名称
                <span class="text-danger">*</span>
            </label>
            <div class="col-sm-4">
                <input autocomplete="off"   type="text" class="form-control" name="artypeName"
                       maxLength="50" dataType="s1-50"
                       th:value="${obj.artypeName}"nullmsg="文章类别名称不能为空">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">文章类别排序
                <span class="text-danger">*</span>
            </label>
            <div class="col-sm-4">
                <input autocomplete="off"   type="text" class="form-control" name="artypeSort"
                       dataType="/^\d*\.?\d+$/"
                       errormsg="仅支持数字"
                       th:value="${obj.artypeSort}"nullmsg="文章类别排序不能为空">
            </div>
 
            <label class="col-sm-2 control-label">文章类别描述
            </label>
            <div class="col-sm-4">
                <input autocomplete="off"   type="text" class="form-control" name="artypeDescribe"
                       maxLength="100" dataType="s1-100"
                       ignore="ignore"
                       th:value="${obj.artypeDescribe}"nullmsg="文章类别描述不能为空">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">文章类别编号
                <span class="text-danger">*</span>
            </label>
            <div class="col-sm-4">
                <input autocomplete="off"   type="text" class="form-control" name="artypeCode"
                       maxLength="50"  dataType="/^[0-9a-zA-Z_]{1,50}$/"
                       errormsg="仅支持数字、字母及'_'"
                       th:value="${obj.artypeCode}"nullmsg="文章类别编号不能为空">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">文章类别图片路径
            </label>
 
            <div class="col-sm-10">
                <input autocomplete="off"   value="" name="artypeImgurl" id="artypeImgurl"
                       class="form-control  upload-input" type="text" /> <a style="width: 10%"
                class="btn btn-primary radius upload-a">选择图片
            </a>
            </div>
            <!--<div class="col-sm-5">
                <input autocomplete="off"   type="text" readonly="true" class="form-control" name="artypeImgurl"
                       maxLength="250" th:value="${obj.artypeImgurl}" nullmsg="文章类别图片不能为空">
                <form enctype="multipart/form-data">
                    &lt;!&ndash;<label>French Input</label> &ndash;&gt;
                    <input autocomplete="off"   id="file-zh" name="file-zh" type="file">
                    &lt;!&ndash; <hr style="border: 2px dotted">
                        <label>Spanish Input</label>
                        <input autocomplete="off"   id="file-es" name="file-es[]" type="file" multiple> &ndash;&gt;
                </form>
            </div>
            <div class="col-sm-5">
                <img th:src="${obj.artypeImgurl}" style="width: 100%"/>
            </div>-->
        </div>
        <div class="form-group ">
            <div class="col-sm-12 text-center">
                <a href="javascript:;" onclick="myForm.submit()"
                   class="btn btn-success radius"><i class="fa fa-check"></i>  保存</a>&nbsp;&nbsp;&nbsp;&nbsp; <a
                    class="btn btn-danger radius" href="javascript:;" onclick="MTools.closeForm()" ><i class="fa fa-close"></i> 关闭</a>
            </div>
        </div>
    </form>
</div>
</body>
<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
<script type="text/javascript">
    var invokeUrl = basePath + "/admin/multipleUploadFile/doUpload";
 
    /*$('#file-zh').fileinput({
        language: 'zh',
        uploadUrl: invokeUrl,
        allowedFileExtensions: ['jpg', 'png', 'gif'],
        maxFileCount: 1,
        // minImageWidth: 50, //图片的最小宽度
        // minImageHeight: 50,//图片的最小高度
        // maxImageWidth: 100,//图片的最大宽度
        // maxImageHeight: 100,//图片的最大高度
    }).on("fileuploaded", function (event, data, previewId, index) {
        $('input[name=artypeImgurl]').val(data.response.path)
    });*/
 
    //MTools.autoFullSelect();
    MUI.initImgUpload(".upload-input");
    $(".select2").select2();
 
    var myForm = null;
    $(function() {
        myForm = MForm.initForm({
            invokeUrl :basePath+ "/admin/shopArticleType/addShopArticleType",
            afterSubmit : function() {
                parent.initArticleTypeList();
            }
        });
        fnPublci.initArticleTypeSelect("#artypeParentid");
    });
 
</script>
</body>
</html>