|
|
@@ -412,42 +412,42 @@ helper.getDropList = {
|
|
412
|
412
|
},
|
|
413
|
413
|
|
|
414
|
414
|
//区县,主干道、乡镇,路社区村三级联动(目前在来电弹屏中使用)
|
|
415
|
|
- getLocations: function (obj, obj1, obj2) {
|
|
|
415
|
+ getLocations: function (obj) {
|
|
416
|
416
|
var dtd = $.Deferred(); //在函数内部,新建一个Deferred对象
|
|
417
|
417
|
helper.getDropList.getAreas(obj, 0).then(function () {
|
|
418
|
418
|
//主干道、乡镇
|
|
419
|
|
- obj.change(function () {
|
|
420
|
|
- if (obj.find("option:selected").val() != 0) {
|
|
421
|
|
- helper.getDropList.getAreas(obj1, obj.find("option:selected").val());
|
|
422
|
|
- } else {
|
|
423
|
|
- obj1.empty();
|
|
424
|
|
- obj1.append('<option selected="selected" value="0">请选择</option>');
|
|
425
|
|
- $('#sourceaddress').val('');
|
|
426
|
|
- }
|
|
427
|
|
- obj1.trigger('change');
|
|
428
|
|
- });
|
|
429
|
|
-
|
|
430
|
|
- //路社区村
|
|
431
|
|
- obj1.change(function () {
|
|
432
|
|
- if (obj1.find("option:selected").val() != 0) {
|
|
433
|
|
- helper.getDropList.getAreas(obj2, obj1.find("option:selected").val());
|
|
434
|
|
- $('#sourceaddress').val(obj1.find("option:selected").text());
|
|
435
|
|
- } else if (obj.find("option:selected").val() != 0) {
|
|
436
|
|
- obj2.empty();
|
|
437
|
|
- obj2.append('<option selected="selected" value="0">请选择</option>');
|
|
438
|
|
- $('#sourceaddress').val('');
|
|
439
|
|
- }
|
|
440
|
|
- obj2.trigger('change');
|
|
441
|
|
- });
|
|
442
|
|
-
|
|
443
|
|
- obj2.change(function () {
|
|
444
|
|
- if (obj2.find("option:selected").val() != 0) {
|
|
445
|
|
- $('#sourceaddress').val(obj1.find("option:selected").text() + obj2.find("option:selected").text());
|
|
446
|
|
- } else if (obj1.find("option:selected").val() != 0) {
|
|
447
|
|
- $('#sourceaddress').val(obj1.find("option:selected").text());
|
|
448
|
|
- }
|
|
449
|
|
- dtd.resolve(); // 改变Deferred对象的执行状态
|
|
450
|
|
- });
|
|
|
419
|
+// obj.change(function () {
|
|
|
420
|
+// if (obj.find("option:selected").val() != 0) {
|
|
|
421
|
+// helper.getDropList.getAreas(obj1, obj.find("option:selected").val());
|
|
|
422
|
+// } else {
|
|
|
423
|
+// obj1.empty();
|
|
|
424
|
+// obj1.append('<option selected="selected" value="0">请选择</option>');
|
|
|
425
|
+// $('#sourceaddress').val('');
|
|
|
426
|
+// }
|
|
|
427
|
+// obj1.trigger('change');
|
|
|
428
|
+// });
|
|
|
429
|
+//
|
|
|
430
|
+// //路社区村
|
|
|
431
|
+// obj1.change(function () {
|
|
|
432
|
+// if (obj1.find("option:selected").val() != 0) {
|
|
|
433
|
+// helper.getDropList.getAreas(obj2, obj1.find("option:selected").val());
|
|
|
434
|
+// $('#sourceaddress').val(obj1.find("option:selected").text());
|
|
|
435
|
+// } else if (obj.find("option:selected").val() != 0) {
|
|
|
436
|
+// obj2.empty();
|
|
|
437
|
+// obj2.append('<option selected="selected" value="0">请选择</option>');
|
|
|
438
|
+// $('#sourceaddress').val('');
|
|
|
439
|
+// }
|
|
|
440
|
+// obj2.trigger('change');
|
|
|
441
|
+// });
|
|
|
442
|
+//
|
|
|
443
|
+// obj2.change(function () {
|
|
|
444
|
+// if (obj2.find("option:selected").val() != 0) {
|
|
|
445
|
+// $('#sourceaddress').val(obj1.find("option:selected").text() + obj2.find("option:selected").text());
|
|
|
446
|
+// } else if (obj1.find("option:selected").val() != 0) {
|
|
|
447
|
+// $('#sourceaddress').val(obj1.find("option:selected").text());
|
|
|
448
|
+// }
|
|
|
449
|
+// dtd.resolve(); // 改变Deferred对象的执行状态
|
|
|
450
|
+// });
|
|
451
|
451
|
|
|
452
|
452
|
});
|
|
453
|
453
|
|