Ver código fonte

新增UV工艺

zhuyiyi 2 meses atrás
pai
commit
31ed14ceed
1 arquivos alterados com 13 adições e 2 exclusões
  1. 13 2
      src/main/webapp/views/product/metal.jsp

+ 13 - 2
src/main/webapp/views/product/metal.jsp

@@ -164,6 +164,11 @@
                             <option value="炫彩镭射">炫彩镭射</option>
                         </select>
                     </div>
+                    <div class="layui-input-block">
+                        常见工艺:
+                        <input type="checkbox" name="craft" lay-filter="craftZhuan" value="哑光" title="哑光"
+                               class="craftZhuan">
+                    </div>
                     <div class="layui-input-block">
                         配件:
                         <input type="checkbox" name="craft" lay-filter="craftZhuan" value="刮板" title="刮板"
@@ -373,12 +378,18 @@
         form.on('checkbox(craftZhuan)', function (data) {
             // 专金专银只能选一个
             let craft_list = [];
+            var craftZhuan = $(".craftZhuan:checked").length;
             $("input:checkbox[name='craft']:checked").each(function (i) {
                 if (!$(this).is(':disabled')) {
                     craft_list.push($(this).val());
                 }
             });
-
+            if (craft_list.indexOf("哑光") > -1 && (craft_list.indexOf("烫画") > -1 || craft_list.indexOf("冷转印") > -1 || craftZhuan.length > 0)) {
+                $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
+                $(data.elem).prop("checked", false);
+                layer.msg('[哑光]不能选择其他工艺!', {offset: ['300px', '300px']}, {icon: 5});
+                return false;
+            }
             if (craft_list.indexOf("刮板") > -1 && (craft_list.indexOf("烫画") > -1 || craft_list.indexOf("冷转印") > -1)) {
                 $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
                 $(data.elem).prop("checked", false);
@@ -392,7 +403,7 @@
             } else {
                 $("#guaban").hide();
             }
-            var craftZhuan = $(".craftZhuan:checked").length;
+
             if (craftZhuan > most) {
                 $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox");
                 $(data.elem).prop("checked", false);