ソースを参照

修改卡片选择限制

zhuyiyi 2 ヶ月 前
コミット
0ab421eb9c
1 ファイル変更9 行追加2 行削除
  1. 9 2
      src/main/webapp/views/product/coupon.jsp

+ 9 - 2
src/main/webapp/views/product/coupon.jsp

@@ -1632,7 +1632,7 @@
                             if (kindValueData.value == 2) {
                                 //$('input[class = mq]').prop('checked', true);
                                 form.on('checkbox(switchMQ)', function (switchData) {
-                                    if ($(".mq:checked").length > 1) {
+                                    if ($(".normalCountHideCraft .mq:checked").length > 1) {
                                         $(switchData.elem).next().attr("class", "layui-unselect layui-form-checkbox");
                                         $(switchData.elem).prop("checked", false);
                                         layer.msg('[裁切- 模切]不能同时选择!', {offset: ['300px', '300px']}, {icon: 5});
@@ -1931,7 +1931,7 @@
                     $(".tj").find(":input").attr("disabled", true);
                 }
                 form.on('checkbox(switchMQ)', function (switchData) {
-                    if ($(".mq:checked").length > 1) {
+                    if ($(".normalCountHideCraft .mq:checked").length > 1) {
                         $(switchData.elem).next().attr("class", "layui-unselect layui-form-checkbox");
                         $(switchData.elem).prop("checked", false);
                         layer.msg('[裁切- 模切]不能同时选择!', {offset: ['300px', '300px']}, {icon: 5});
@@ -2480,6 +2480,13 @@
                     layer.msg('单面覆膜和双面覆膜只能选一种!', {offset: ['300px', '300px']}, {icon: 5});
                     return false;
                 }
+                if (!data.elem.checked && data.value == "双面覆哑膜") {
+                    layer.msg('不能取消 [覆膜] 工艺!', {offset: ['300px', '300px']}, function () {
+                    });
+                    $(data.elem).prop("checked", true);
+                    form.render();
+                    return;
+                }
                 let craft_list = [];
                 $("input:checkbox[name='craft']:checked").each(function (i) {
                     if (!$(this).is(':disabled')) {