懒羊羊
2024-01-10 a556270e96bc6e7fa4202c466d57cc75f778c614
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
@layout("/common/_form.html",{js:["/assets${context.modularName}/${lowerEntity}/${lowerEntity}_add.js"],css:["/assets/expand/module/formSelects/formSelects-v4.css"]}){
 
<form class="layui-form" id="${lowerEntity}Form" lay-filter="${lowerEntity}Form">
    <div class="layui-fluid" style="padding-bottom: 75px;">
        <div class="layui-card">
            <div class="layui-card-header">基本信息</div>
            <div class="layui-card-body">
                <div class="layui-form-item layui-row">
                    <input name="${keyPropertyName}" type="hidden"/>
 
                <% for(var i=0 ; i < fieldConfigs.~size ; i++){     %>
                    <div class="layui-inline layui-col-md12">
                        <label class="layui-form-label">${fieldConfigs[i].columnComment}<span style="color: red;">*</span></label>
                <% if(fieldConfigs[i].inputType == 1){              %>
                        <div class="layui-input-block">
                            <input id="${fieldConfigs[i].camelFieldName}" name="${fieldConfigs[i].camelFieldName}" placeholder="请输入${fieldConfigs[i].columnComment}" type="text" class="layui-input" lay-verify="required" required/>
                        </div>
                <% }                                                %>
                <% if(fieldConfigs[i].inputType == 2){              %>
                        <div class="layui-input-block">
                            <select name="${fieldConfigs[i].camelFieldName}" lay-filter="${fieldConfigs[i].camelFieldName}">
                                <option value="">下拉单选框</option>
                            </select>
                        </div>
                <% }                                                %>
                <% if(fieldConfigs[i].inputType == 3 ){             %>
                        <div class="layui-input-block">
                            <select name="${fieldConfigs[i].camelFieldName}" xm-select="sel${fieldConfigs[i].camelFieldName}">
                                <option value="">下拉多选框</option>
                            </select>
                        </div>
                <% }                                                %>
                <% if(fieldConfigs[i].inputType == 4 ){             %>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input" id="${fieldConfigs[i].camelFieldName}">
                        </div>
                <% }                                                %>
                <% if(fieldConfigs[i].inputType == 5){              %>
                        <div class="layui-upload">
                            <button type="button" class="layui-btn" id="${fieldConfigs[i].camelFieldName}">上传图片</button>
                            <div class="layui-upload-list">
                                <img class="layui-upload-img" id="filePreview">
                            </div>
                        </div>
                <% }                                                %>
                    </div>
                <% }                                                %>
                </div>
            </div>
        </div>
    </div>
    <div class="form-group-bottom text-center">
        <button class="layui-btn" lay-filter="btnSubmit" lay-submit>&emsp;提交&emsp;</button>
    <% if(jumpType){            %>
        <button type="reset" class="layui-btn layui-btn-primary" ew-event="closeDialog">&emsp;取消&emsp;</button>
    <% }else{                   %>
        <button type="reset" class="layui-btn layui-btn-primary" id="cancel">&emsp;取消&emsp;</button>
    <% }                        %>
    </div>
 
</form>
 
@}