Sfoglia il codice sorgente

修改 号码归属地

fanlongfei 8 anni fa
parent
commit
47ca508608
1 ha cambiato i file con 27 aggiunte e 15 eliminazioni
  1. 27 15
      CallCenterWeb.UI/TelCall/NumberAssignment.html

+ 27 - 15
CallCenterWeb.UI/TelCall/NumberAssignment.html

@@ -85,7 +85,7 @@
85 85
                 $(".remove").click(function () {
86 86
                     var ids = $.map($('#list').bootstrapTable('getSelections'),
87 87
                         function (row) {
88
-                            return row.F_MobileNum;
88
+                            return row.F_Id;
89 89
                         });
90 90
                     /*判断长度*/
91 91
                     if (ids.length <= 0) {
@@ -100,7 +100,7 @@
100 100
                 $(".xg").click(function () {
101 101
                     var mobileNum = $.map($('#list').bootstrapTable('getSelections'),
102 102
                         function (row) {
103
-                            return row.F_MobileNum;
103
+                            return row.F_Id;
104 104
                         });
105 105
                     if (mobileNum.length != 1) {
106 106
                         layer.confirm('请选择一行进行修改?', {
@@ -109,7 +109,7 @@
109 109
                         return;
110 110
                     } else {
111 111
                         
112
-                        $.getJSON(huayi.config.callcenter_url + "Mobiledata/GetMobiledata", { mobileNum: mobileNum[0], token: $.cookie("token") }, function (result) {
112
+                        $.getJSON(huayi.config.callcenter_url + "Mobiledata/GetMobiledata", { id: mobileNum[0], token: $.cookie("token") }, function (result) {
113 113
                             if (result.state.toLowerCase() == "success") {
114 114
                                 tc = layer.open({
115 115
                                     type: 1,
@@ -118,7 +118,7 @@
118 118
                                     content: html
119 119
                                 });
120 120
 
121
-                                $("#hidhd").val(result.data.F_MobileNum);
121
+                                $("#hidhd").val(result.data.F_Id);
122 122
                                 $("#hd").val(result.data.F_MobileNum);
123 123
                                 $("#qphone").val(result.data.F_ZipCode);
124 124
                                 $("#city").val(result.data.F_CityDes);
@@ -184,7 +184,7 @@
184 184
 					/*执行删除*/
185 185
 					var ids = $.map($('#list').bootstrapTable('getSelections'),
186 186
 						function(row) {
187
-							return row.F_MobileNum;
187
+							return row.F_Id;
188 188
 						});
189 189
 				    /*发送请求*/
190 190
 					$.post(huayi.config.callcenter_url + "Mobiledata/DelMobiledata", { nums: ids, token: $.cookie("token") }, function (result) {
@@ -202,34 +202,46 @@
202 202
 			}
203 203
 			//新增或者编辑
204 204
 			function addedit() {
205
-			    if (!$("#hd").val()) {
206
-			        layer.confirm('请输入号段', {
205
+			   	var mobileNumReg = /^\d{1,20}$/,
206
+			        zipCodeReg = /^\d{1,10}$/,
207
+			        cityDesReg = /^(.){1,25}$/,
208
+			        cardDesReg = /^(.){1,25}$/			
209
+			    if (!mobileNumReg.test($.trim($("#hd").val()))) {
210
+			        layer.confirm('号段长度在1-20位之间,且必须是数字。', {
211
+			            icon: 2,
207 212
 			            btn: ['确定'] //按钮
208 213
 			        });
209 214
 			        return;
210 215
 			    }
211
-			    if (!$("#qphone").val()) {
212
-			        layer.confirm('请输入输入区号', {
216
+			    if (!zipCodeReg.test($.trim($("#qphone").val()))) {
217
+			        layer.confirm('区号长度在1-10位之间,且必须是数字。', {
218
+			            icon:2,
213 219
 			            btn: ['确定'] //按钮
214 220
 			        });
215 221
 			        return;
216 222
 			    }
217
-			    if (!$("#city").val()) {
218
-			        layer.confirm('请选择城市', {
223
+			    if (!cityDesReg.test($.trim($("#city").val()))) {
224
+			        layer.confirm('城市长度在1-25位之间。', {
225
+			            icon:2,
219 226
 			            btn: ['确定'] //按钮
220 227
 			        });
221 228
 			        return;
222 229
 			    }
223
-			    if (!$("#Pb").val()) {
224
-			        layer.confirm('请输入卡类型', {
230
+			    if (!cardDesReg.test($.trim($("#Pb").val()))) {
231
+			        layer.confirm('卡类型长度在1-25位之间。', {
232
+			            icon:2,
225 233
 			            btn: ['确定'] //按钮
226 234
 			        });
227 235
 			        return;
228 236
 			    }
229 237
 			    /*发送请求*/
230 238
 			    $.post(huayi.config.callcenter_url + "Mobiledata/AddMobiledata", {
231
-			        mobileNum: $("#hd").val(), zipCode: $("#qphone").val(), cityDes: $("#city").val(),
232
-			        cardDes: $("#Pb").val(), token: $.cookie("token")
239
+			        id: $("#hidhd").val(),
240
+			        mobileNum: $("#hd").val(), 
241
+			        zipCode: $("#qphone").val(), 
242
+			        cityDes: $("#city").val(),
243
+			        cardDes: $("#Pb").val(), 
244
+			        token: $.cookie("token")
233 245
 			    }, function (result) {
234 246
 			        result = JSON.parse(result);
235 247
 			        if (result.state.toLowerCase() == "success") {