|
|
@@ -1,15 +1,16 @@
|
|
1
|
1
|
<!DOCTYPE html>
|
|
2
|
2
|
<html>
|
|
|
3
|
+
|
|
3
|
4
|
<head>
|
|
4
|
5
|
<meta charset="UTF-8">
|
|
5
|
6
|
<script src="../Script/Common/huayi.load.js"></script>
|
|
6
|
|
- <script src="../Script/Common/huayi.config.js"></script>
|
|
7
|
|
- <link href="../js/bootstrap-select/css/bootstrap-select.css" rel="stylesheet" />
|
|
8
|
|
- <script src="province.js"></script>
|
|
9
|
|
- <link rel="stylesheet" href="../css/init.css" />
|
|
|
7
|
+ <script src="../Script/Common/huayi.config.js"></script>
|
|
|
8
|
+ <link href="../js/bootstrap-select/css/bootstrap-select.css" rel="stylesheet" />
|
|
|
9
|
+ <script src="province.js"></script>
|
|
|
10
|
+ <link rel="stylesheet" href="../css/init.css" />
|
|
10
|
11
|
<title></title>
|
|
11
|
12
|
<style>
|
|
12
|
|
- .clearfix:after {
|
|
|
13
|
+ .clearfix:after {
|
|
13
|
14
|
content: "";
|
|
14
|
15
|
display: block;
|
|
15
|
16
|
clear: both;
|
|
|
@@ -27,10 +28,11 @@
|
|
27
|
28
|
.boxCon>div {
|
|
28
|
29
|
padding: 15px 0;
|
|
29
|
30
|
}
|
|
30
|
|
- .boxCon table th {
|
|
|
31
|
+
|
|
|
32
|
+ .boxCon table th {
|
|
31
|
33
|
padding: 5px 8px 5px 0;
|
|
32
|
34
|
text-align: right;
|
|
33
|
|
- width: 32%;
|
|
|
35
|
+ width: 32%;
|
|
34
|
36
|
}
|
|
35
|
37
|
|
|
36
|
38
|
.boxCon table td {
|
|
|
@@ -39,24 +41,30 @@
|
|
39
|
41
|
color: #717171;
|
|
40
|
42
|
line-height: 200%;
|
|
41
|
43
|
}
|
|
42
|
|
- .kong{
|
|
|
44
|
+
|
|
|
45
|
+ .kong {
|
|
43
|
46
|
display: none;
|
|
44
|
47
|
}
|
|
45
|
|
- .bootstrap-select > .dropdown-toggle.bs-placeholder {
|
|
46
|
|
- background-color: #ffffff!important;
|
|
47
|
|
- border-color: #e5e6e7!important;
|
|
|
48
|
+
|
|
|
49
|
+ .bootstrap-select>.dropdown-toggle.bs-placeholder {
|
|
|
50
|
+ background-color: #ffffff!important;
|
|
|
51
|
+ border-color: #e5e6e7!important;
|
|
48
|
52
|
}
|
|
49
|
|
- .filter-option{
|
|
|
53
|
+
|
|
|
54
|
+ .filter-option {
|
|
50
|
55
|
color: #676b6d;
|
|
51
|
56
|
}
|
|
52
|
|
- .form-inline{
|
|
|
57
|
+
|
|
|
58
|
+ .form-inline {
|
|
53
|
59
|
display: inline-block;
|
|
54
|
60
|
}
|
|
55
|
|
- .bootstrap-select > .dropdown-toggle.btn-default{
|
|
56
|
|
- background-color: #ffffff!important;
|
|
57
|
|
- border-color: #e5e6e7!important;
|
|
58
|
|
- color: #555;
|
|
|
61
|
+
|
|
|
62
|
+ .bootstrap-select>.dropdown-toggle.btn-default {
|
|
|
63
|
+ background-color: #ffffff!important;
|
|
|
64
|
+ border-color: #e5e6e7!important;
|
|
|
65
|
+ color: #555;
|
|
59
|
66
|
}
|
|
|
67
|
+
|
|
60
|
68
|
.testInput-list {
|
|
61
|
69
|
position: absolute;
|
|
62
|
70
|
z-index: 999;
|
|
|
@@ -77,203 +85,207 @@
|
|
77
|
85
|
background-color: #E43926;
|
|
78
|
86
|
color: #fff;
|
|
79
|
87
|
}
|
|
80
|
|
- #testInput4{
|
|
81
|
|
- outline:none;
|
|
|
88
|
+
|
|
|
89
|
+ #testInput4 {
|
|
|
90
|
+ outline: none;
|
|
82
|
91
|
border: 1px solid #ccc;
|
|
83
|
92
|
padding-left: 10px;
|
|
84
|
|
- outline-color :#fff;
|
|
85
|
|
-
|
|
|
93
|
+ outline-color: #fff;
|
|
86
|
94
|
}
|
|
87
|
95
|
</style>
|
|
88
|
96
|
</head>
|
|
|
97
|
+
|
|
89
|
98
|
<body>
|
|
90
|
99
|
<div class="container-fluid">
|
|
91
|
100
|
<div class="boxCon">
|
|
92
|
|
- <table>
|
|
93
|
|
- <tbody>
|
|
94
|
|
- <tr>
|
|
95
|
|
- <th>客户名称: </th>
|
|
96
|
|
- <td>
|
|
97
|
|
- <div class="form-inline">
|
|
98
|
|
- <div class="form-group" style="position: relative;">
|
|
99
|
|
- <!--<select class="form-control selectpicker" id="customer_name" data-live-search="true">
|
|
|
101
|
+ <table>
|
|
|
102
|
+ <tbody>
|
|
|
103
|
+ <tr>
|
|
|
104
|
+ <th>客户名称: </th>
|
|
|
105
|
+ <td>
|
|
|
106
|
+ <div class="form-inline">
|
|
|
107
|
+ <div class="form-group" style="position: relative;">
|
|
|
108
|
+ <!--<select class="form-control selectpicker" id="customer_name" data-live-search="true">
|
|
100
|
109
|
<option value="">请选择客户名称</option>
|
|
101
|
110
|
</select>-->
|
|
102
|
|
- <input id="testInput4" type="text" style="width:100%;"/>
|
|
103
|
|
- <ul class="testInput-list">
|
|
104
|
|
- <li></li>
|
|
105
|
|
- </ul>
|
|
106
|
|
- </div>
|
|
|
111
|
+ <input id="testInput4" type="text" style="width:100%;" />
|
|
|
112
|
+ <ul class="testInput-list">
|
|
|
113
|
+ <li></li>
|
|
|
114
|
+ </ul>
|
|
107
|
115
|
</div>
|
|
108
|
|
- <span class="addJsz_kong" style="color: red;">*</span>
|
|
109
|
|
- </td>
|
|
110
|
|
- </tr>
|
|
111
|
|
- <tr>
|
|
112
|
|
- <th>省份: </th>
|
|
113
|
|
- <td>
|
|
114
|
|
- <div class="form-inline">
|
|
115
|
|
- <div class="form-group">
|
|
116
|
|
- <select class="form-control selectpicker" id="province" data-live-search="true">
|
|
117
|
|
- <option value="">请选择省份</option>
|
|
118
|
|
- </select>
|
|
119
|
|
- </div>
|
|
|
116
|
+ </div>
|
|
|
117
|
+ <span class="addJsz_kong" style="color: red;">*</span>
|
|
|
118
|
+ </td>
|
|
|
119
|
+ </tr>
|
|
|
120
|
+ <tr>
|
|
|
121
|
+ <th>省份: </th>
|
|
|
122
|
+ <td>
|
|
|
123
|
+ <div class="form-inline">
|
|
|
124
|
+ <div class="form-group">
|
|
|
125
|
+ <select class="form-control selectpicker" id="province" data-live-search="true">
|
|
|
126
|
+ <option value="">请选择省份</option>
|
|
|
127
|
+ </select>
|
|
120
|
128
|
</div>
|
|
121
|
|
- <span class="addJsz_kong" style="color: red;">*</span>
|
|
122
|
|
- </tr>
|
|
123
|
|
- <tr>
|
|
124
|
|
- <th>联系人: </th>
|
|
125
|
|
- <td><input type="text" class="name" />
|
|
|
129
|
+ </div>
|
|
|
130
|
+ <span class="addJsz_kong" style="color: red;">*</span>
|
|
|
131
|
+ </tr>
|
|
|
132
|
+ <tr>
|
|
|
133
|
+ <th>联系人: </th>
|
|
|
134
|
+ <td><input type="text" class="name" />
|
|
126
|
135
|
<!--<span class="addJsz_kong" style="color: red;">*</span>-->
|
|
127
|
|
- </td>
|
|
128
|
|
- </tr>
|
|
129
|
|
- <tr>
|
|
130
|
|
- <th>电话: </th>
|
|
131
|
|
- <td >
|
|
132
|
|
- <input type="text" class="mobile" />
|
|
133
|
|
- <!--<span class="kong addJsz_kong" style="color: red;">*角色值不允许为空</span>-->
|
|
134
|
|
- </td>
|
|
135
|
|
- </tr>
|
|
136
|
|
- </tbody>
|
|
137
|
|
- </table>
|
|
138
|
|
- <div style="text-align: center;"><button class="btns addCun">保存</button></div>
|
|
139
|
|
- </div>
|
|
140
|
|
-
|
|
|
136
|
+ </td>
|
|
|
137
|
+ </tr>
|
|
|
138
|
+ <tr>
|
|
|
139
|
+ <th>电话: </th>
|
|
|
140
|
+ <td>
|
|
|
141
|
+ <input type="text" class="mobile" />
|
|
|
142
|
+ <!--<span class="kong addJsz_kong" style="color: red;">*角色值不允许为空</span>-->
|
|
|
143
|
+ </td>
|
|
|
144
|
+ </tr>
|
|
|
145
|
+ </tbody>
|
|
|
146
|
+ </table>
|
|
|
147
|
+ <div style="text-align: center;"><button class="btns addCun">保存</button></div>
|
|
|
148
|
+ </div>
|
|
|
149
|
+
|
|
141
|
150
|
</div>
|
|
142
|
151
|
<script src="../js/bootstrap-select/js/bootstrap-select.js"></script>
|
|
143
|
|
- <script>
|
|
144
|
|
- var token = $.cookie("token");
|
|
145
|
|
- var id=helper.request.queryString("ids");
|
|
146
|
|
- Select($("#testInput4"));
|
|
147
|
|
- $(document).ready(function(){
|
|
148
|
|
-
|
|
149
|
|
- var regBox = {
|
|
150
|
|
- //regEmail: /^([A-Za-z0-9_\.-]+)@([\dA-Za-z_\.-]+)\.([A-Za-z_\.-]{2,6})$/, //邮箱
|
|
151
|
|
- //regEmail: /@/, //邮箱
|
|
152
|
|
- //regName: /^[a-z0-9_-]{3,16}$/, //用户名
|
|
153
|
|
- //regMobile: /^1(3|4|5|7|8)\d{9}$/ //手机
|
|
154
|
|
- //regTel: /^0[\d]{2,3}-[\d]{7,8}$/,
|
|
155
|
|
- //regData: /^[0-9]*$/ //数字
|
|
156
|
|
- regMobOrTel: /^(\(\d{3,4}\)|\d{3,4}-|\s)?\d{7,14}$/
|
|
157
|
|
- }
|
|
158
|
|
- //判断
|
|
159
|
|
- function Isnullorempty(selstr) {
|
|
160
|
|
- if (selstr == null || selstr == "" || selstr == undefined || selstr == "null" || selstr == "undefined" || parseFloat(selstr) <= 0) {
|
|
161
|
|
- return true;
|
|
162
|
|
- } else {
|
|
163
|
|
- return false;
|
|
164
|
|
- }
|
|
165
|
|
- }
|
|
166
|
|
- //保存按钮
|
|
167
|
|
- $('.addCun').click(function() {
|
|
168
|
|
- var tel = $(".mobile").val();
|
|
169
|
|
- var reg=/^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0,5-9]))\d{8}$|^0\d{2,3}-?\d{7,8}$/;
|
|
170
|
|
- if($('#customer_name').val()=='') {
|
|
171
|
|
- layer.confirm('请选择客户名称!', {
|
|
172
|
|
- btn: ['确定']
|
|
173
|
|
- });
|
|
174
|
|
- return;
|
|
175
|
|
- }
|
|
176
|
|
- if($('#province').val()=='') {
|
|
177
|
|
- layer.confirm('请选择省份!', {
|
|
178
|
|
- btn: ['确定']
|
|
179
|
|
- });
|
|
180
|
|
- return;
|
|
181
|
|
- }
|
|
182
|
|
- if(!reg.test($.trim($(".mobile").val()))) {
|
|
183
|
|
- layer.confirm('请输入正确的联系电话', {
|
|
184
|
|
- btn: ['确定']
|
|
185
|
|
- });
|
|
186
|
|
- return;
|
|
187
|
|
- }
|
|
188
|
|
- $.post(huayi.config.callcenter_url + 'Customer/AddCustomer', {
|
|
189
|
|
- cid: id,
|
|
190
|
|
- customerindustry: $('#testInput4').val(),
|
|
191
|
|
- province: $('#province').val(),
|
|
192
|
|
- mobile: $('.mobile').val(),
|
|
193
|
|
- name: $('.name').val(),
|
|
194
|
|
- "token": $.cookie("token")
|
|
195
|
|
- }, function(result) {
|
|
196
|
|
- result = $.parseJSON(result);
|
|
197
|
|
- if(result.state.toLowerCase() == "success") {
|
|
198
|
|
- $("#activess").val(result.data);
|
|
199
|
|
- var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
|
200
|
|
- parent.layer.close(index); //再执行关闭
|
|
201
|
|
- parent.layer.msg("添加成功!");
|
|
202
|
|
- parent.table.bootstrapTable('refresh');
|
|
|
152
|
+ <script>
|
|
|
153
|
+ var token = $.cookie("token");
|
|
|
154
|
+ var id = helper.request.queryString("ids");
|
|
|
155
|
+ Select($("#testInput4"));
|
|
|
156
|
+ $(document).ready(function() {
|
|
|
157
|
+
|
|
|
158
|
+ var regBox = {
|
|
|
159
|
+ //regEmail: /^([A-Za-z0-9_\.-]+)@([\dA-Za-z_\.-]+)\.([A-Za-z_\.-]{2,6})$/, //邮箱
|
|
|
160
|
+ //regEmail: /@/, //邮箱
|
|
|
161
|
+ //regName: /^[a-z0-9_-]{3,16}$/, //用户名
|
|
|
162
|
+ //regMobile: /^1(3|4|5|7|8)\d{9}$/ //手机
|
|
|
163
|
+ //regTel: /^0[\d]{2,3}-[\d]{7,8}$/,
|
|
|
164
|
+ //regData: /^[0-9]*$/ //数字
|
|
|
165
|
+ regMobOrTel: /^(\(\d{3,4}\)|\d{3,4}-|\s)?\d{7,14}$/
|
|
203
|
166
|
}
|
|
204
|
|
- })
|
|
205
|
|
-
|
|
206
|
|
- })
|
|
207
|
|
- if(id){
|
|
208
|
|
- $.get(huayi.config.callcenter_url + 'Customer/GetCustomer', {
|
|
209
|
|
- cid: id,
|
|
210
|
|
- "token": $.cookie("token")
|
|
211
|
|
- }, function(result) {
|
|
212
|
|
- result = $.parseJSON(result);
|
|
213
|
|
- if(result.state.toLowerCase() == "success") {
|
|
214
|
|
- var con=result.data;
|
|
215
|
|
- $("#testInput4").val(con.F_CustomerIndustry);
|
|
216
|
|
- $('#customer_name').trigger("change");
|
|
217
|
|
-// $("#customer_name").find('option[text='+ con.F_CustomerIndustry +']').attr("selected",true);
|
|
218
|
|
- $("#province").val(con.F_Province);
|
|
219
|
|
- $('#province').trigger("change");
|
|
220
|
|
- $(".mobile").val(con.F_Telephone);
|
|
221
|
|
- $(".name").val(con.F_CustomerName);
|
|
|
167
|
+ //判断
|
|
|
168
|
+ function Isnullorempty(selstr) {
|
|
|
169
|
+ if(selstr == null || selstr == "" || selstr == undefined || selstr == "null" || selstr == "undefined" || parseFloat(selstr) <= 0) {
|
|
|
170
|
+ return true;
|
|
|
171
|
+ } else {
|
|
|
172
|
+ return false;
|
|
|
173
|
+ }
|
|
222
|
174
|
}
|
|
223
|
|
- })
|
|
224
|
|
-
|
|
225
|
|
- }
|
|
226
|
|
-
|
|
227
|
|
- })
|
|
228
|
|
- //客户名称
|
|
229
|
|
- getAccount()
|
|
230
|
|
- function getAccount() {
|
|
231
|
|
- $.ajax({
|
|
232
|
|
- type: "get",
|
|
233
|
|
- url: huayi.config.callcenter_url + "Customer/BindLDdep",
|
|
234
|
|
- dataType: 'json',
|
|
235
|
|
- async: true,
|
|
236
|
|
- data: {
|
|
237
|
|
- token: $.cookie("token")
|
|
238
|
|
- },
|
|
239
|
|
- success: function(data) {
|
|
240
|
|
- var Count = data.data.dep;
|
|
241
|
|
- $(Count).each(function(i,n){
|
|
242
|
|
- $("<option value='" + n + "'>" + n + "</option>").appendTo($("#customer_name"));
|
|
|
175
|
+ //保存按钮
|
|
|
176
|
+ $('.addCun').click(function() {
|
|
|
177
|
+ var tel = $(".mobile").val();
|
|
|
178
|
+ //var reg = /^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0,5-9]))\d{8}$|^0\d{2,3}-?\d{7,8}$/;
|
|
|
179
|
+ if($('#customer_name').val() == '') {
|
|
|
180
|
+ layer.confirm('请选择客户名称!', {
|
|
|
181
|
+ btn: ['确定']
|
|
|
182
|
+ });
|
|
|
183
|
+ return;
|
|
|
184
|
+ }
|
|
|
185
|
+ if($('#province').val() == '') {
|
|
|
186
|
+ layer.confirm('请选择省份!', {
|
|
|
187
|
+ btn: ['确定']
|
|
|
188
|
+ });
|
|
|
189
|
+ return;
|
|
|
190
|
+ }
|
|
|
191
|
+// if(!reg.test($.trim($(".mobile").val()))) {
|
|
|
192
|
+// layer.confirm('请输入正确的联系电话', {
|
|
|
193
|
+// btn: ['确定']
|
|
|
194
|
+// });
|
|
|
195
|
+// return;
|
|
|
196
|
+// }
|
|
|
197
|
+ $.post(huayi.config.callcenter_url + 'Customer/AddCustomer', {
|
|
|
198
|
+ cid: id,
|
|
|
199
|
+ customerindustry: $('#testInput4').val(),
|
|
|
200
|
+ province: $('#province').val(),
|
|
|
201
|
+ mobile: $('.mobile').val(),
|
|
|
202
|
+ name: $('.name').val(),
|
|
|
203
|
+ "token": $.cookie("token")
|
|
|
204
|
+ }, function(result) {
|
|
|
205
|
+ result = $.parseJSON(result);
|
|
|
206
|
+ if(result.state.toLowerCase() == "success") {
|
|
|
207
|
+ $("#activess").val(result.data);
|
|
|
208
|
+ var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
|
|
209
|
+ parent.layer.close(index); //再执行关闭
|
|
|
210
|
+ parent.layer.msg("添加成功!");
|
|
|
211
|
+ parent.table.bootstrapTable('refresh');
|
|
|
212
|
+ }
|
|
|
213
|
+ })
|
|
|
214
|
+
|
|
|
215
|
+ })
|
|
|
216
|
+ if(id) {
|
|
|
217
|
+ $.get(huayi.config.callcenter_url + 'Customer/GetCustomer', {
|
|
|
218
|
+ cid: id,
|
|
|
219
|
+ "token": $.cookie("token")
|
|
|
220
|
+ }, function(result) {
|
|
|
221
|
+ result = $.parseJSON(result);
|
|
|
222
|
+ if(result.state.toLowerCase() == "success") {
|
|
|
223
|
+ var con = result.data;
|
|
|
224
|
+ $("#testInput4").val(con.F_CustomerIndustry);
|
|
|
225
|
+ $('#customer_name').trigger("change");
|
|
|
226
|
+ // $("#customer_name").find('option[text='+ con.F_CustomerIndustry +']').attr("selected",true);
|
|
|
227
|
+ $("#province").val(con.F_Province);
|
|
|
228
|
+ $('#province').trigger("change");
|
|
|
229
|
+ $(".mobile").val(con.F_Telephone);
|
|
|
230
|
+ $(".name").val(con.F_CustomerName);
|
|
|
231
|
+ }
|
|
243
|
232
|
})
|
|
244
|
|
- $('#customer_name').selectpicker('refresh');
|
|
|
233
|
+
|
|
245
|
234
|
}
|
|
246
|
|
- });
|
|
247
|
|
- }
|
|
248
|
|
- //省份
|
|
249
|
|
- getProvince()
|
|
250
|
|
- function getProvince() {
|
|
251
|
|
-// $.ajax({
|
|
252
|
|
-// type: "get",
|
|
253
|
|
-// url: 'province.json',
|
|
254
|
|
-// dataType: 'json',
|
|
255
|
|
-// async: true,
|
|
256
|
|
-// data: {
|
|
257
|
|
-//// token: $.cookie("token")
|
|
258
|
|
-// },
|
|
259
|
|
-// success: function(data) {
|
|
260
|
|
-// var Count = data.provinces;
|
|
261
|
|
-// $(Count).each(function(i,n){
|
|
262
|
|
-// $("<option value='" + n.provinceName + "'>" + n.provinceName + "</option>").appendTo($("#province"));
|
|
263
|
|
-// })
|
|
264
|
|
-// $('#province').selectpicker('refresh');
|
|
265
|
|
-// }
|
|
266
|
|
- // });
|
|
267
|
|
- var Count = geo.provinces;
|
|
268
|
|
- $(Count).each(function (i, n) {
|
|
269
|
|
- $("<option value='" + n.provinceName + "'>" + n.provinceName + "</option>").appendTo($("#province"));
|
|
270
|
|
- })
|
|
271
|
|
- $('#province').selectpicker('refresh');
|
|
272
|
|
- }
|
|
273
|
|
- function Select(obj) {
|
|
274
|
|
- obj.click(function (event) {
|
|
275
|
|
- event.preventDefault();
|
|
276
|
|
- });
|
|
|
235
|
+
|
|
|
236
|
+ })
|
|
|
237
|
+ //客户名称
|
|
|
238
|
+ getAccount()
|
|
|
239
|
+
|
|
|
240
|
+ function getAccount() {
|
|
|
241
|
+ $.ajax({
|
|
|
242
|
+ type: "get",
|
|
|
243
|
+ url: huayi.config.callcenter_url + "Customer/BindLDdep",
|
|
|
244
|
+ dataType: 'json',
|
|
|
245
|
+ async: true,
|
|
|
246
|
+ data: {
|
|
|
247
|
+ token: $.cookie("token")
|
|
|
248
|
+ },
|
|
|
249
|
+ success: function(data) {
|
|
|
250
|
+ var Count = data.data.dep;
|
|
|
251
|
+ $(Count).each(function(i, n) {
|
|
|
252
|
+ $("<option value='" + n + "'>" + n + "</option>").appendTo($("#customer_name"));
|
|
|
253
|
+ })
|
|
|
254
|
+ $('#customer_name').selectpicker('refresh');
|
|
|
255
|
+ }
|
|
|
256
|
+ });
|
|
|
257
|
+ }
|
|
|
258
|
+ //省份
|
|
|
259
|
+ getProvince()
|
|
|
260
|
+
|
|
|
261
|
+ function getProvince() {
|
|
|
262
|
+ // $.ajax({
|
|
|
263
|
+ // type: "get",
|
|
|
264
|
+ // url: 'province.json',
|
|
|
265
|
+ // dataType: 'json',
|
|
|
266
|
+ // async: true,
|
|
|
267
|
+ // data: {
|
|
|
268
|
+ //// token: $.cookie("token")
|
|
|
269
|
+ // },
|
|
|
270
|
+ // success: function(data) {
|
|
|
271
|
+ // var Count = data.provinces;
|
|
|
272
|
+ // $(Count).each(function(i,n){
|
|
|
273
|
+ // $("<option value='" + n.provinceName + "'>" + n.provinceName + "</option>").appendTo($("#province"));
|
|
|
274
|
+ // })
|
|
|
275
|
+ // $('#province').selectpicker('refresh');
|
|
|
276
|
+ // }
|
|
|
277
|
+ // });
|
|
|
278
|
+ var Count = geo.provinces;
|
|
|
279
|
+ $(Count).each(function(i, n) {
|
|
|
280
|
+ $("<option value='" + n.provinceName + "'>" + n.provinceName + "</option>").appendTo($("#province"));
|
|
|
281
|
+ })
|
|
|
282
|
+ $('#province').selectpicker('refresh');
|
|
|
283
|
+ }
|
|
|
284
|
+
|
|
|
285
|
+ function Select(obj) {
|
|
|
286
|
+ obj.click(function(event) {
|
|
|
287
|
+ event.preventDefault();
|
|
|
288
|
+ });
|
|
277
|
289
|
obj.focus(function() { //
|
|
278
|
290
|
//失去焦点后触发的事件
|
|
279
|
291
|
obj.parent().find('.testInput-list').show();
|
|
|
@@ -284,6 +296,7 @@
|
|
284
|
296
|
obj.parent().find('.testInput-list').show();
|
|
285
|
297
|
BindLDdep(value)
|
|
286
|
298
|
});
|
|
|
299
|
+
|
|
287
|
300
|
function BindLDdep(str) {
|
|
288
|
301
|
$('.testInput-list').empty();
|
|
289
|
302
|
$.ajax({
|
|
|
@@ -300,7 +313,7 @@
|
|
300
|
313
|
console.log(Count);
|
|
301
|
314
|
var html = '';
|
|
302
|
315
|
$(Count).each(function(i, n) {
|
|
303
|
|
- html = '<li value="' + n + '" id="td'+i+'">' + n + '</li>';
|
|
|
316
|
+ html = '<li value="' + n + '" id="td' + i + '">' + n + '</li>';
|
|
304
|
317
|
$(html).appendTo($('.testInput-list'));
|
|
305
|
318
|
});
|
|
306
|
319
|
$('.testInput-list>li').click(function() {
|
|
|
@@ -308,7 +321,7 @@
|
|
308
|
321
|
console.log($(this).html());
|
|
309
|
322
|
$('.testInput-list').hide();
|
|
310
|
323
|
})
|
|
311
|
|
-
|
|
|
324
|
+
|
|
312
|
325
|
}
|
|
313
|
326
|
});
|
|
314
|
327
|
};
|
|
|
@@ -317,16 +330,16 @@
|
|
317
|
330
|
}
|
|
318
|
331
|
|
|
319
|
332
|
//请求单位
|
|
320
|
|
-
|
|
321
|
|
- $(document).ready(function(){
|
|
322
|
|
-
|
|
323
|
|
-
|
|
324
|
|
- $(document).click(function(e) {
|
|
325
|
|
- if(!$(e.target).is($('.testInput-list>li'))&&!$(e.target).is($('#testInput1'))&&!$(e.target).is($('#testInput2'))&&!$(e.target).is($('#testInput3'))&&!$(e.target).is($('#testInput4'))) {
|
|
326
|
|
- $('.testInput-list').hide();
|
|
327
|
|
- }
|
|
|
333
|
+
|
|
|
334
|
+ $(document).ready(function() {
|
|
|
335
|
+
|
|
|
336
|
+ $(document).click(function(e) {
|
|
|
337
|
+ if(!$(e.target).is($('.testInput-list>li')) && !$(e.target).is($('#testInput1')) && !$(e.target).is($('#testInput2')) && !$(e.target).is($('#testInput3')) && !$(e.target).is($('#testInput4'))) {
|
|
|
338
|
+ $('.testInput-list').hide();
|
|
|
339
|
+ }
|
|
|
340
|
+ })
|
|
328
|
341
|
})
|
|
329
|
|
- })
|
|
330
|
|
-</script>
|
|
|
342
|
+ </script>
|
|
331
|
343
|
</body>
|
|
332
|
|
-</html>
|
|
|
344
|
+
|
|
|
345
|
+</html>
|