wangkaiyue 5 lat temu
rodzic
commit
db7e42a24d

+ 8 - 2
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/css/choose_area.css

@@ -494,16 +494,22 @@
 
 #choose_area .select-area-box .tab .province .checkbox:checked {
   border: 0;
-  background: url(../image/xuanzhong.png) no-repeat center center;
+  background: url(/jyapp/vipsubscribe/image/xuanzhong.png) no-repeat center center;
   background-size: 100% 100%;
 }
 
 #choose_area .select-area-box .tab .province .checkbox[disabled] {
   border: 0;
-  background: url(../image/active_disabled.png) no-repeat center center;
+  background: url(/jyapp/vipsubscribe/image/active_disabled.png) no-repeat center center;
   background-size: 100% 100%;
 }
 
+#choose_area .select-area-box .tab .province .checkbox.half:checked {
+  border: 0 !important;
+  background: url(/jyapp/vipsubscribe/image/banxuan.png) no-repeat center center !important;
+  background-size: cover !important;
+}
+
 #choose_area .select-area-box label::after {
   font-size: 14px;
   float: right;

+ 1 - 1
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/editArea.js

@@ -103,7 +103,7 @@ function getResult() {
     $('count').html($('.checkbox:not(.other):checked').length);
     $('.result_name').append(data.substring(0, data.length - 1));
     //校验是否修改
-    if (theSameAs(obj)) {
+    if (theSameAs(obj) || $.isEmptyObject(obj)) {
         $('#enter').attr("disabled", "disabled");
     } else {
         $('#enter').removeAttr("disabled");

+ 18 - 5
src/jfw/modules/app/src/web/templates/vipsubscribe/choose_area.html

@@ -466,7 +466,7 @@
                         $(dom).addClass('active').attr('disabled', !canClick).parents().siblings('.tab')
                             .addClass('selected').children('.province').children('.checkbox').attr({
                             "checked": true
-                        })
+                        }).addClass('half');
                     }
                 })
             })
@@ -475,6 +475,7 @@
             //如果选中所有,则转为全国
             if ($(".city").length == $(".city.active").length) {
                 $(".checkbox.other").trigger("click");
+                $(".checkbox").removeClass("half");
                 return
             }
             var tmpSelect = {};
@@ -680,12 +681,19 @@
                     $(".province input").prop('checked', false);
                     $(".city").removeClass('active');
                     $(this).prop('checked', true);
+                    $(".checkbox").removeClass("half");
                 } else {
                     $(".checkbox.other").prop('checked', false);
-                    if ($(this).is(':checked') == false) {
-                        $(this).parent().parent().siblings('.tab_content').children('.city').removeClass('active');
-                        if ($(".province .checkbox:checked").length == 0) {//若没有省份被选中 则选中全国
-                            $(".checkbox.other").prop('checked', true);
+                    if (!$(this).is(':checked')) {
+                        if ($(this).hasClass("half")) {//判断当前是否是半选
+                            $(this).prop("checked", true).removeClass("half");
+                            $(this).parent().parent().siblings('.tab_content').children('.city').addClass('active');
+                        } else {
+                            $(this).parent().parent().siblings('.tab_content').children('.city').removeClass('active');
+                            if ($(".province .checkbox:checked").length == 0) {//若没有省份被选中 则选中全国
+                                $(".checkbox.other").prop('checked', true);
+                                $(".checkbox").removeClass("half");
+                            }
                         }
                     } else {
                         $(this).parent().parent().siblings('.tab_content').children('.city').addClass('active');
@@ -703,6 +711,11 @@
                     var input = $(this).parents('li').find('input.checkbox')
                     window.input = input
                     input.prop('checked', true)
+                    if (isActive != $(this).parent().find('.city').length) {//是否全选
+                        $(this).parent('div').siblings('.tab').find('.province .checkbox').addClass('half');
+                    } else {
+                        $(this).parent('div').siblings('.tab').find('.province .checkbox').removeClass('half');
+                    }
                 } else {
                     $(this).parent('div').siblings('.tab').children().children('.checkbox').prop(
                         'checked', false)

+ 0 - 2
src/jfw/modules/app/src/web/templates/vipsubscribe/choose_industry.html

@@ -318,8 +318,6 @@
             // 除全部行业外所有按钮都被选中了
             $('#all button').trigger('click');
         }
-        //调整高度
-        $(".select-area-box .list").css("margin-top", $(".result").height() + 20);
     }
 
     function showSelect(arr, canclick) {

+ 1 - 1
src/jfw/modules/app/src/web/templates/vipsubscribe/edit_subscribe.html

@@ -103,7 +103,7 @@
 
             //行业展示                 
             if (this.reqData.buyset.buyerclasscount === -1) {
-                $(".edit_item.industry .item_bottom").text("已购买全");
+                $(".edit_item.industry .item_bottom").text("已购买全行业");
             } else {
                 $(".edit_item.industry .item_bottom").text("已购买" + this.reqData.buyset.buyerclasscount + "个行业");
             }