XMTT лет назад: 7
Родитель
Сommit
64858f5a52

+ 283 - 283
css/model/sys/org.css

@ -11,9 +11,9 @@
11 11
    display: none;
12 12
}
13 13
14
.sys_org_new, .sys_org_role, .sys_org_right, .sys_org_menu, .sys_org_edit, .sys_org_cp {
15
    width: 800px;
16
    height: 1200px;
14
.sys_org_new,.sys_org_edit{
15
    width: 500px;
16
    height: 250px;
17 17
    padding: 0 20px 10px;
18 18
}
19 19
@ -25,283 +25,283 @@
25 25
26 26
}
27 27
28
.sys_org_new .newForm, .sys_org_edit .newForm, .sys_org_cp .newForm {
29
    position: relative;
30
}
31
32
.sys_org_new .newForm1, .sys_org_edit .newForm1, .sys_org_cp .newForm1 {
33
    position: relative;
34
}
35
36
.sys_org_new .newForm .head-ctn, .sys_org_edit .newForm .head-ctn {
37
    position: absolute;
38
    top: 3px;
39
    right: 30px;
40
    width: 190px;
41
    height: 190px;
42
}
43
44
.sys_org_new .orgSize.dyn-mselect .icon-drop, .sys_org_edit .orgSize.dyn-mselect .icon-drop {
45
    display: none !important;
46
}
47
48
.sys_org_new .orgSize.dyn-mselect .dd-drop, .sys_org_edit .orgSize.dyn-mselect .dd-drop {
49
    display: none !important;
50
}
51
52
.sys_org_new .orgSize.dyn-mselect .placeholder, .sys_org_edit .orgSize.dyn-mselect .placeholder {
53
    display: none !important;
54
}
55
56
.sys_org_new .newForm .head-ctn .upload-btn, .sys_org_edit .newForm .head-ctn .upload-btn {
57
    position: absolute;
58
    bottom: 10px;
59
    left: 40px;
60
    width: 110px;
61
    height: 36px;
62
    color: rgba(0, 0, 0, 1);
63
    font-size: 14px;
64
    text-align: center;
65
    border: 1px solid #555555;
66
    padding-top: 6px;
67
}
68
69
.sys_org_new .newForm .head-ctn .upload-btn i, .sys_org_edit .newForm .head-ctn .upload-btn i {
70
    font-size: 16px;
71
    color: rgb(95, 184, 120);
72
}
73
74
.sys_org_new .newForm .head-ctn img, .sys_org_edit .newForm .head-ctn img {
75
    width: 100%;
76
    height: 100%;
77
}
78
79
.sys_org_new .upload-item, .sys_org_edit .upload-item {
80
    position: absolute;
81
    width: 100%;
82
    top: 50%;
83
    transform: translateY(-50%);
84
}
85
86
.sys_org_new .upload-item .progress, .sys_org_edit .upload-item .progress {
87
    width: 1px;
88
    height: 30px;
89
    background-color: #3280FC;
90
}
91
92
.sys_org_menu .nav ul {
93
    padding-left: 20px;
94
}
95
96
.sys_org_new .webuploader-pick, .sys_org_edit .webuploader-pick {
97
    position: relative;
98
    display: inline-block;
99
    cursor: pointer;
100
    background: #00b7ee;
101
    padding: 10px 15px;
102
    color: #fff;
103
    text-align: center;
104
    border-radius: 3px;
105
    overflow: hidden;
106
}
107
108
.sys_org_new .webuploader-container, .sys_org_edit .webuploader-container {
109
    position: relative;
110
}
111
112
.sys_org_new .webuploader-element-invisible, .sys_org_edit .webuploader-element-invisible {
113
    position: absolute !important;
114
    clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
115
    clip: rect(1px, 1px, 1px, 1px);
116
}
117
118
.sys_org_new .webuploader-pick-hover, .sys_org_edit .webuploader-pick-hover {
119
    background: #00a2d4;
120
}
121
122
.sys_org_new .webuploader-pick-disable, .sys_org_edit .webuploader-pick-disable {
123
    opacity: 0.6;
124
    pointer-events: none;
125
}
126
127
.sys_org_new #picker, .sys_org_edit #picker {
128
    display: inline-block;
129
    line-height: 1.428571429;
130
    vertical-align: middle;
131
    margin: 0 12px 0 0;
132
}
133
134
.sys_org_new #picker .webuploader-pick, .sys_org_edit #picker .webuploader-pick {
135
    padding: 6px 12px;
136
    display: block;
137
}
138
139
.sys_org_new #uploader-demo .thumbnail, .sys_org_edit #uploader-demo .thumbnail {
140
    width: 110px;
141
    height: 110px;
142
}
143
144
.sys_org_new #uploader-demo .thumbnail img, .sys_org_edit #uploader-demo .thumbnail img {
145
    width: 100%;
146
}
147
148
.sys_org_new .uploader-list, .sys_org_edit .uploader-list {
149
    width: 100%;
150
    overflow: hidden;
151
}
152
153
.sys_org_new .file-item, .sys_org_edit .file-item {
154
    float: left;
155
    position: relative;
156
    margin: 0 20px 20px 0;
157
    padding: 4px;
158
}
159
160
.sys_org_new .file-item .error, .sys_org_edit .file-item .error {
161
    position: absolute;
162
    top: 4px;
163
    left: 4px;
164
    right: 4px;
165
    background: red;
166
    color: white;
167
    text-align: center;
168
    height: 20px;
169
    font-size: 14px;
170
    line-height: 23px;
171
}
172
173
.sys_org_new .file-item .info, .sys_org_edit .file-item .info {
174
    position: absolute;
175
    left: 4px;
176
    bottom: 4px;
177
    right: 4px;
178
    height: 20px;
179
    line-height: 20px;
180
    text-indent: 5px;
181
    background: rgba(0, 0, 0, 0.6);
182
    color: white;
183
    overflow: hidden;
184
    white-space: nowrap;
185
    text-overflow: ellipsis;
186
    font-size: 12px;
187
    z-index: 10;
188
}
189
190
.sys_org_new .file-item .progress, .sys_org_edit .file-item .progress {
191
    position: absolute;
192
    right: 4px;
193
    bottom: 4px;
194
    height: 3px;
195
    left: 4px;
196
    height: 4px;
197
    overflow: hidden;
198
    z-index: 15;
199
    margin: 0;
200
    padding: 0;
201
    border-radius: 0;
202
    background: transparent;
203
}
204
205
.sys_org_new .file-item .progress span, .sys_org_edit .file-item .progress span {
206
    display: block;
207
    overflow: hidden;
208
    width: 0;
209
    height: 100%;
210
    background: #d14 url(../images/progress.png) repeat-x;
211
    -webit-transition: width 200ms linear;
212
    -moz-transition: width 200ms linear;
213
    -o-transition: width 200ms linear;
214
    -ms-transition: width 200ms linear;
215
    transition: width 200ms linear;
216
    -webkit-animation: progressmove 2s linear infinite;
217
    -moz-animation: progressmove 2s linear infinite;
218
    -o-animation: progressmove 2s linear infinite;
219
    -ms-animation: progressmove 2s linear infinite;
220
    animation: progressmove 2s linear infinite;
221
    -webkit-transform: translateZ(0);
222
}
223
224
.sys_org_new .filelist div.file-panel span.cancel, .sys_org_edit .filelist div.file-panel span.cancel {
225
    /* background-position: -48px -24px; */
226
}
227
228
.sys_org_new .filelist div.file-panel span.cancel:hover, .sys_org_edit .filelist div.file-panel span.cancel:hover {
229
    background-position: -48px 0;
230
}
231
232
.sys_org_new .citybox .frmtype, .sys_org_edit .citybox .frmtype {
233
    border: 1px solid #B5B5B5;
234
}
235
236
.sys_org_new .citybox span, .sys_org_edit .citybox span {
237
    position: relative;
238
    width: 96%;
239
    display: inline-block;
240
    padding: 0 0 0 6px;
241
    cursor: pointer;
242
    margin: 0;
243
    background: #fff;
244
}
245
246
.sys_org_new .citybox span .mr_show.mr_select,.sys_org_edit .citybox span .mr_show.mr_select {
247
    color: #333;
248
}
249
250
.sys_org_new .citybox span .mr_show, .sys_org_edit .citybox span .mr_show {
251
    font-style: normal;
252
    color: #AAAAAA;
253
    width: 100%;
254
    display: inline-block;
255
    height: 32px;
256
    line-height: 32px;
257
    position: relative;
258
}
259
260
.sys_org_new .citybox span .mr_show .mr_select, .sys_org_edit .citybox span .mr_show .mr_select {
261
    color: #333;
262
}
263
264
.sys_org_new .citybox span .mr_sj, .sys_org_edit .citybox span .mr_sj {
265
    position: absolute;
266
    right: 10px;
267
    top: 15px;
268
    display: inline-block;
269
    height: 0;
270
    width: 0;
271
    border: 6px solid #fff;
272
    border-color: #28b8fa transparent transparent;
273
}
274
275
.sys_org_new .citybox span ul, .sys_org_edit .citybox span ul {
276
    width: 98%;
277
    border-radius: 0 0 5px 5px;
278
    position: absolute;
279
    border: 1px solid #E8E8E8;
280
    background: #fff;
281
    left: -1px;
282
    top: 38px;
283
    margin-bottom: 10px;
284
    display: none;
285
    z-index: 10;
286
    max-height: 280px;
287
    overflow: auto;
288
}
289
290
.sys_org_new .citybox span ul li, .sys_org_edit .citybox span ul li {
291
    width: 100%;
292
    float: left;
293
    overflow: hidden;
294
    border-top: 1px solid #E8E8E8;
295
}
296
297
.sys_org_new .citybox span ul li:first-child, .sys_org_edit .citybox span ul li:first-child {
298
    border-top: 0;
299
}
300
301
.sys_org_new .citybox span ul li a, .sys_org_edit .citybox span ul li a {
302
    display: block;
303
    height: 30px;
304
    line-height: 30px;
305
    padding: 0 8px;
306
    color: #494949;
307
}
28
/*.sys_org_new .newForm, .sys_org_edit .newForm, .sys_org_cp .newForm {*/
29
    /*position: relative;*/
30
/*}*/
31
32
/*.sys_org_new .newForm1, .sys_org_edit .newForm1, .sys_org_cp .newForm1 {*/
33
    /*position: relative;*/
34
/*}*/
35
36
/*.sys_org_new .newForm .head-ctn, .sys_org_edit .newForm .head-ctn {*/
37
    /*position: absolute;*/
38
    /*top: 3px;*/
39
    /*right: 30px;*/
40
    /*width: 190px;*/
41
    /*height: 190px;*/
42
/*}*/
43
44
/*.sys_org_new .orgSize.dyn-mselect .icon-drop, .sys_org_edit .orgSize.dyn-mselect .icon-drop {*/
45
    /*display: none !important;*/
46
/*}*/
47
48
/*.sys_org_new .orgSize.dyn-mselect .dd-drop, .sys_org_edit .orgSize.dyn-mselect .dd-drop {*/
49
    /*display: none !important;*/
50
/*}*/
51
52
/*.sys_org_new .orgSize.dyn-mselect .placeholder, .sys_org_edit .orgSize.dyn-mselect .placeholder {*/
53
    /*display: none !important;*/
54
/*}*/
55
56
/*.sys_org_new .newForm .head-ctn .upload-btn, .sys_org_edit .newForm .head-ctn .upload-btn {*/
57
    /*position: absolute;*/
58
    /*bottom: 10px;*/
59
    /*left: 40px;*/
60
    /*width: 110px;*/
61
    /*height: 36px;*/
62
    /*color: rgba(0, 0, 0, 1);*/
63
    /*font-size: 14px;*/
64
    /*text-align: center;*/
65
    /*border: 1px solid #555555;*/
66
    /*padding-top: 6px;*/
67
/*}*/
68
69
/*.sys_org_new .newForm .head-ctn .upload-btn i, .sys_org_edit .newForm .head-ctn .upload-btn i {*/
70
    /*font-size: 16px;*/
71
    /*color: rgb(95, 184, 120);*/
72
/*}*/
73
74
/*.sys_org_new .newForm .head-ctn img, .sys_org_edit .newForm .head-ctn img {*/
75
    /*width: 100%;*/
76
    /*height: 100%;*/
77
/*}*/
78
79
/*.sys_org_new .upload-item, .sys_org_edit .upload-item {*/
80
    /*position: absolute;*/
81
    /*width: 100%;*/
82
    /*top: 50%;*/
83
    /*transform: translateY(-50%);*/
84
/*}*/
85
86
/*.sys_org_new .upload-item .progress, .sys_org_edit .upload-item .progress {*/
87
    /*width: 1px;*/
88
    /*height: 30px;*/
89
    /*background-color: #3280FC;*/
90
/*}*/
91
92
/*.sys_org_menu .nav ul {*/
93
    /*padding-left: 20px;*/
94
/*}*/
95
96
/*.sys_org_new .webuploader-pick, .sys_org_edit .webuploader-pick {*/
97
    /*position: relative;*/
98
    /*display: inline-block;*/
99
    /*cursor: pointer;*/
100
    /*background: #00b7ee;*/
101
    /*padding: 10px 15px;*/
102
    /*color: #fff;*/
103
    /*text-align: center;*/
104
    /*border-radius: 3px;*/
105
    /*overflow: hidden;*/
106
/*}*/
107
108
/*.sys_org_new .webuploader-container, .sys_org_edit .webuploader-container {*/
109
    /*position: relative;*/
110
/*}*/
111
112
/*.sys_org_new .webuploader-element-invisible, .sys_org_edit .webuploader-element-invisible {*/
113
    /*position: absolute !important;*/
114
    /*clip: rect(1px 1px 1px 1px); !* IE6, IE7 *!*/
115
    /*clip: rect(1px, 1px, 1px, 1px);*/
116
/*}*/
117
118
/*.sys_org_new .webuploader-pick-hover, .sys_org_edit .webuploader-pick-hover {*/
119
    /*background: #00a2d4;*/
120
/*}*/
121
122
/*.sys_org_new .webuploader-pick-disable, .sys_org_edit .webuploader-pick-disable {*/
123
    /*opacity: 0.6;*/
124
    /*pointer-events: none;*/
125
/*}*/
126
127
/*.sys_org_new #picker, .sys_org_edit #picker {*/
128
    /*display: inline-block;*/
129
    /*line-height: 1.428571429;*/
130
    /*vertical-align: middle;*/
131
    /*margin: 0 12px 0 0;*/
132
/*}*/
133
134
/*.sys_org_new #picker .webuploader-pick, .sys_org_edit #picker .webuploader-pick {*/
135
    /*padding: 6px 12px;*/
136
    /*display: block;*/
137
/*}*/
138
139
/*.sys_org_new #uploader-demo .thumbnail, .sys_org_edit #uploader-demo .thumbnail {*/
140
    /*width: 110px;*/
141
    /*height: 110px;*/
142
/*}*/
143
144
/*.sys_org_new #uploader-demo .thumbnail img, .sys_org_edit #uploader-demo .thumbnail img {*/
145
    /*width: 100%;*/
146
/*}*/
147
148
/*.sys_org_new .uploader-list, .sys_org_edit .uploader-list {*/
149
    /*width: 100%;*/
150
    /*overflow: hidden;*/
151
/*}*/
152
153
/*.sys_org_new .file-item, .sys_org_edit .file-item {*/
154
    /*float: left;*/
155
    /*position: relative;*/
156
    /*margin: 0 20px 20px 0;*/
157
    /*padding: 4px;*/
158
/*}*/
159
160
/*.sys_org_new .file-item .error, .sys_org_edit .file-item .error {*/
161
    /*position: absolute;*/
162
    /*top: 4px;*/
163
    /*left: 4px;*/
164
    /*right: 4px;*/
165
    /*background: red;*/
166
    /*color: white;*/
167
    /*text-align: center;*/
168
    /*height: 20px;*/
169
    /*font-size: 14px;*/
170
    /*line-height: 23px;*/
171
/*}*/
172
173
/*.sys_org_new .file-item .info, .sys_org_edit .file-item .info {*/
174
    /*position: absolute;*/
175
    /*left: 4px;*/
176
    /*bottom: 4px;*/
177
    /*right: 4px;*/
178
    /*height: 20px;*/
179
    /*line-height: 20px;*/
180
    /*text-indent: 5px;*/
181
    /*background: rgba(0, 0, 0, 0.6);*/
182
    /*color: white;*/
183
    /*overflow: hidden;*/
184
    /*white-space: nowrap;*/
185
    /*text-overflow: ellipsis;*/
186
    /*font-size: 12px;*/
187
    /*z-index: 10;*/
188
/*}*/
189
190
/*.sys_org_new .file-item .progress, .sys_org_edit .file-item .progress {*/
191
    /*position: absolute;*/
192
    /*right: 4px;*/
193
    /*bottom: 4px;*/
194
    /*height: 3px;*/
195
    /*left: 4px;*/
196
    /*height: 4px;*/
197
    /*overflow: hidden;*/
198
    /*z-index: 15;*/
199
    /*margin: 0;*/
200
    /*padding: 0;*/
201
    /*border-radius: 0;*/
202
    /*background: transparent;*/
203
/*}*/
204
205
/*.sys_org_new .file-item .progress span, .sys_org_edit .file-item .progress span {*/
206
    /*display: block;*/
207
    /*overflow: hidden;*/
208
    /*width: 0;*/
209
    /*height: 100%;*/
210
    /*background: #d14 url(../images/progress.png) repeat-x;*/
211
    /*-webit-transition: width 200ms linear;*/
212
    /*-moz-transition: width 200ms linear;*/
213
    /*-o-transition: width 200ms linear;*/
214
    /*-ms-transition: width 200ms linear;*/
215
    /*transition: width 200ms linear;*/
216
    /*-webkit-animation: progressmove 2s linear infinite;*/
217
    /*-moz-animation: progressmove 2s linear infinite;*/
218
    /*-o-animation: progressmove 2s linear infinite;*/
219
    /*-ms-animation: progressmove 2s linear infinite;*/
220
    /*animation: progressmove 2s linear infinite;*/
221
    /*-webkit-transform: translateZ(0);*/
222
/*}*/
223
224
/*.sys_org_new .filelist div.file-panel span.cancel, .sys_org_edit .filelist div.file-panel span.cancel {*/
225
    /*!* background-position: -48px -24px; *!*/
226
/*}*/
227
228
/*.sys_org_new .filelist div.file-panel span.cancel:hover, .sys_org_edit .filelist div.file-panel span.cancel:hover {*/
229
    /*background-position: -48px 0;*/
230
/*}*/
231
232
/*.sys_org_new .citybox .frmtype, .sys_org_edit .citybox .frmtype {*/
233
    /*border: 1px solid #B5B5B5;*/
234
/*}*/
235
236
/*.sys_org_new .citybox span, .sys_org_edit .citybox span {*/
237
    /*position: relative;*/
238
    /*width: 96%;*/
239
    /*display: inline-block;*/
240
    /*padding: 0 0 0 6px;*/
241
    /*cursor: pointer;*/
242
    /*margin: 0;*/
243
    /*background: #fff;*/
244
/*}*/
245
246
/*.sys_org_new .citybox span .mr_show.mr_select,.sys_org_edit .citybox span .mr_show.mr_select {*/
247
    /*color: #333;*/
248
/*}*/
249
250
/*.sys_org_new .citybox span .mr_show, .sys_org_edit .citybox span .mr_show {*/
251
    /*font-style: normal;*/
252
    /*color: #AAAAAA;*/
253
    /*width: 100%;*/
254
    /*display: inline-block;*/
255
    /*height: 32px;*/
256
    /*line-height: 32px;*/
257
    /*position: relative;*/
258
/*}*/
259
260
/*.sys_org_new .citybox span .mr_show .mr_select, .sys_org_edit .citybox span .mr_show .mr_select {*/
261
    /*color: #333;*/
262
/*}*/
263
264
/*.sys_org_new .citybox span .mr_sj, .sys_org_edit .citybox span .mr_sj {*/
265
    /*position: absolute;*/
266
    /*right: 10px;*/
267
    /*top: 15px;*/
268
    /*display: inline-block;*/
269
    /*height: 0;*/
270
    /*width: 0;*/
271
    /*border: 6px solid #fff;*/
272
    /*border-color: #28b8fa transparent transparent;*/
273
/*}*/
274
275
/*.sys_org_new .citybox span ul, .sys_org_edit .citybox span ul {*/
276
    /*width: 98%;*/
277
    /*border-radius: 0 0 5px 5px;*/
278
    /*position: absolute;*/
279
    /*border: 1px solid #E8E8E8;*/
280
    /*background: #fff;*/
281
    /*left: -1px;*/
282
    /*top: 38px;*/
283
    /*margin-bottom: 10px;*/
284
    /*display: none;*/
285
    /*z-index: 10;*/
286
    /*max-height: 280px;*/
287
    /*overflow: auto;*/
288
/*}*/
289
290
/*.sys_org_new .citybox span ul li, .sys_org_edit .citybox span ul li {*/
291
    /*width: 100%;*/
292
    /*float: left;*/
293
    /*overflow: hidden;*/
294
    /*border-top: 1px solid #E8E8E8;*/
295
/*}*/
296
297
/*.sys_org_new .citybox span ul li:first-child, .sys_org_edit .citybox span ul li:first-child {*/
298
    /*border-top: 0;*/
299
/*}*/
300
301
/*.sys_org_new .citybox span ul li a, .sys_org_edit .citybox span ul li a {*/
302
    /*display: block;*/
303
    /*height: 30px;*/
304
    /*line-height: 30px;*/
305
    /*padding: 0 8px;*/
306
    /*color: #494949;*/
307
/*}*/

+ 4 - 4
html/model/sys/org/new.html

@ -6,17 +6,17 @@
6 6
        <div class="row">
7 7
            <div class="col-2 item-caption">邮箱</div>
8 8
            <div class="col-6">
9
                <div class="form-item text required" placeholder="请输入正确的邮箱地址" name="email"></div>
9
                <div class="form-item text " placeholder="请输入正确的邮箱地址" name="email"></div>
10 10
            </div>
11
            <span class="requiredSpan">*</span>
11 12
        </div>
12
        <span class="requiredSpan">*</span>
13 13
        <div class="row">
14 14
            <div class="col-2 item-caption">用户名</div>
15 15
            <div class="col-6">
16
                <div class="form-item text required" placeholder="姓名最长为10个字" name="name"></div>
16
                <div class="form-item text " placeholder="姓名最长为10个字" name="name"></div>
17 17
            </div>
18
            <span class="requiredSpan">*</span>
18 19
        </div>
19
        <span class="requiredSpan">*</span>
20 20
        <div class="row">
21 21
            <div class="col-10"></div>
22 22
            <div class="col-2">

+ 59 - 13
js/model/sys/org/details.js

@ -1,12 +1,12 @@
1 1
/**
2
 * Created by TT on 2017/7/19.
2
 * Created by TT on 2017/5/23.
3 3
 */
4 4
;
5 5
spa_define(function () {
6 6
    return $.use(["spa", "util", "form", "upload"], function (spa, util, fb, upload) {
7 7
        return {
8 8
            modal: function (data) {
9
                var root = spa.findInModal(".sys_org_new");
9
                var root = spa.findInModal(".sys_org_details");
10 10
                var ca = {ready: true, items: []};
11 11
                var form = fb.build(root.find(".newForm"), {
12 12
                    industryList: ca,
@ -20,26 +20,54 @@ spa_define(function () {
20 20
                var saveBtn = root.find(".opt-save"),
21 21
                    headArea = root.find(".head-ctn"),
22 22
                    save = function () {
23
                        console.log(form.val().fn);
23 24
                        form.val({inviterId: id});
24 25
                        form.val({
25 26
                            industry: oString(form.val().industryList),
26 27
                            subject: oString(form.val().subjectList),
27
                            qualification: oString(form.val().qualificationList)
28
                            qualification: oString(form.val().qualificationList),
28 29
                        });
29 30
                        if (form.val().orgType == null) {
30 31
                            form.val({orgType: 1});
31 32
                        }
32
                        if (form.val().forShort == null) {
33
                            util.alert("请输入企业称");
34
                        } else form.doPost("../ajax/sys/org/create", function () {
35
                            spa.closeModal();
36
                            if (data) {
37
                                data();
38
                            }
39
                        },function (data) {
40
                            util.alert(data.msg);
41
                        });
33
                        if (form.val().name == null) {
34
                            util.alert("请输入企业称");
35
                        } else if (form.val().forShort == null) {
36
                            util.alert("请输入企业简称")
37
                        } else if (form.val().city == null || form.val().city === "请选择城市") {
38
                            util.alert("请选择企业所在城市")
39
                        }
40
                        else form.doPost("../ajax/sys/org/update", function () {
41
                                spa.closeModal();
42
                                if (data.hand) {
43
                                    data.hand();
44
                                }
45
                                location.reload();
46
                            }, {});
42 47
                    };
48
49
                var split = function (data) {
50
                    var index = data.split(",");
51
                    var arr = [];
52
                    for (var m = 0; m < index.length; m++) {
53
                        ca.items.push({code: index[m], caption: index[m]});
54
                        arr.push(index[m]);
55
                    }
56
                    return arr;
57
                };
58
                if (data.data.industry) {
59
                    form.val({industryList: split(data.data.industry)});
60
                }
61
                if (data.data.subject) {
62
                    form.val({subjectList: split(data.data.subject)});
63
                }
64
                if (data.data.qualification) {
65
                    form.val({qualificationList: split(data.data.qualification)});
66
                }
67
68
69
                form.val(data.data);
70
43 71
                root.find(".modal-ctrl .icon-times").on("click", function () {
44 72
                    spa.closeModal();
45 73
                });
@ -183,6 +211,7 @@ spa_define(function () {
183 211
                uploader.on('beforeFileQueued', function (file) {
184 212
                    uploader.reset();
185 213
                });
214
186 215
                $.fn.citySelect();
187 216
                $(document).on("click", "#City li a", function () {
188 217
                    var aVal = $(this).text();
@ -196,6 +225,23 @@ spa_define(function () {
196 225
                    // console.log($("#ocity").text(),$("#oprovince").text())
197 226
                    form.val({province: $("#oprovince").text(), city: $("#ocity").text()});
198 227
                });
228
                if (data.data.province) {
229
                    $("#oprovince").text(data.data.province);
230
                }
231
                if (data.data.city) {
232
                    $("#ocity").text(data.data.city);
233
                }
234
                if (data.data.hasOrgLogo) {
235
                    // $("#oimg").attr("src", "../data/images/org/" + data.data.id + ".jpg");
236
                    var $li = $(
237
                            '<div class="file-item thumbnail">' +
238
                            '<img  src="../data/images/org/" id="oimg" />' +
239
                            '</div>'
240
                        ),
241
                        $img = $li.find('img');
242
                    $list.html($li);
243
                    $img.attr('src',  "../data/images/org/" + data.data.id + ".jpg");
244
                }
199 245
                saveBtn.on("click", save);
200 246
            }
201 247
        }

+ 5 - 5
js/model/sys/org/edit.js

@ -6,9 +6,9 @@ spa_define(function () {
6 6
    return $.use(["spa", "util", "form"], function (spa, util, fb) {
7 7
        return {
8 8
            modal: function (data) {
9
                var root = spa.findInModal(".sys_org_edit");
9
                var root = spa.findInModal(".sys_org_new");
10 10
                var form = fb.build(root.find(".newForm"));
11
                var trim = function (str) { //删除左右两端的空格			  
11
                var trim = function (str) {
12 12
                    return str.replace(/(^\s*)|(\s*$)/g, "");
13 13
                };
14 14
                var saveBtn = root.find(".opt-save"),
@ -66,9 +66,9 @@ spa_define(function () {
66 66
                        handler();
67 67
                    }
68 68
                };
69
                form.val({name:"li",email:"www"});
69
                form.val(data.data);
70 70
                saveBtn.on("click", save);
71 71
            }
72
        }
73
    });
72
        };
73
    })
74 74
});

+ 28 - 0
js/model/sys/org/index.js

@ -60,6 +60,34 @@ spa_define(function () {
60 60
                        util.alert("请选择一个用户");
61 61
                    }
62 62
                });
63
                root.find(".opt-details").on("click", function () {
64
                    var $org = root.find("td.opt-check>i.checked");
65
                    if ($org.length) {
66
                        if ($org.length > 1) {
67
                            util.alert("只能选择一个用户");
68
                        } else {
69
                            util.get("../ajax/userinfo/id/" + $org.attr("userId"), null, function (data) {
70
                                if (data) {
71
                                    if (data.state == "1" || data.state == "4") {
72
                                        spa.showModal("sys_userinfo_details", {
73
                                            data: data, hand: function () {
74
                                                pdg.load()
75
                                            }
76
                                        })
77
                                    } else {
78
                                        util.alert("待审核和审核通过的不可修改。");
79
                                    }
80
                                } else {
81
                                    util.alert("用户不存在了", function () {
82
                                        pdg.load();
83
                                    });
84
                                }
85
                            }, {});
86
                        }
87
                    } else {
88
                        util.alert("请选择一个用户");
89
                    }
90
                });
63 91
                // root.find(".opt-del").on("click", function() {
64 92
                // 	var $org = root.find("td.opt-check>i.checked");
65 93
                // 	if($org.length) {

+ 2 - 2
js/model/sys/org/new.js

@ -6,7 +6,7 @@ spa_define(function () {
6 6
    return $.use(["spa", "util", "form"], function (spa, util, fb) {
7 7
        return {
8 8
            modal: function (data) {
9
                var root = spa.findInModal(".sys_userinfo_new");
9
                var root = spa.findInModal(".sys_org_new");
10 10
                var form = fb.build(root.find(".newForm"));
11 11
                var trim = function (str) { //删除左右两端的空格			  
12 12
                    return str.replace(/(^\s*)|(\s*$)/g, "");
@ -21,7 +21,7 @@ spa_define(function () {
21 21
                                return;
22 22
                            }
23 23
                        }else{
24
                            util.alert("请输入邮箱")
24
                            util.alert("请输入邮箱");
25 25
                            return;
26 26
                        }
27 27
                        if (form.val().name) {