edit
This commit is contained in:
@@ -25,12 +25,13 @@
|
||||
<p>
|
||||
款式
|
||||
</p>
|
||||
<%-- <input type="radio" name="kindValue" lay-filter="kindValue" value="0" title="短铆钉">--%>
|
||||
<input type="radio" name="kindValue" lay-filter="kindValue" value="1" title="长铆钉" checked="checked">
|
||||
<%-- <input type="radio" name="kindValue" lay-filter="kindValue" value="0" title="短铆钉">--%>
|
||||
<input type="radio" name="kindValue" lay-filter="kindValue" value="1" title="长铆钉" checked="checked">
|
||||
<input type="radio" name="kindValue" lay-filter="kindValue" value="2" title="普通中柄(卡扣)">
|
||||
<input type="radio" name="kindValue" lay-filter="kindValue" value="3" title="筷子柄">
|
||||
<input type="radio" name="kindValue" lay-filter="kindValue" value="4" title="团扇">
|
||||
<input type="radio" name="kindValue" lay-filter="kindValue" value="5" title="o柄">
|
||||
<input type="radio" name="kindValue" lay-filter="kindValue" value="6" title="竹柄扇">
|
||||
<p>
|
||||
规格
|
||||
</p>
|
||||
@@ -62,6 +63,20 @@
|
||||
<option value="2">21.5*34</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-form-item kind4" style="display:none">
|
||||
<select name="kind2Value" id="kind5Value" lay-filter="kind2Value" class="select">
|
||||
<option value="0">花瓶竹柄扇(190*207)</option>
|
||||
<option value="1">四瓣竹柄扇(204*204)</option>
|
||||
<option value="2">皇冠竹柄扇(183*207)</option>
|
||||
<option value="3">芭蕉竹柄扇(280*212)</option>
|
||||
<option value="4">正圆竹柄扇(205*205)</option>
|
||||
<option value="5">千叶竹柄扇(171*222)</option>
|
||||
<option value="6">海棠竹柄扇(207*203)</option>
|
||||
<option value="7">苹果竹柄扇(204*204)</option>
|
||||
<option value="8">宝相花竹柄扇(212*212)</option>
|
||||
<option value="9">蝴蝶竹柄扇(212*167)</option>
|
||||
</select>
|
||||
</div>
|
||||
<p>
|
||||
数量(个)
|
||||
</p>
|
||||
@@ -101,10 +116,11 @@
|
||||
class="layui-input">
|
||||
</div>
|
||||
<p>工艺</p>
|
||||
<div class="normalCraft"><input type="checkbox" name="craft" lay-filter="switch" value="异形" title="异形">
|
||||
<div class="normalCraft">
|
||||
<input type="checkbox" name="craft" id="mq" lay-filter="switch" value="异形" title="异形" checked/>
|
||||
</div>
|
||||
<div class="tsCraft" style="display: none;"><input type="checkbox" name="craft" lay-filter="switch"
|
||||
value="双面一样" title="双面一样"></div>
|
||||
<div class="tsCraft" style="display: none;">
|
||||
<input type="checkbox" name="craft" lay-filter="switch" value="双面一样" title="双面一样"></div>
|
||||
<hr>
|
||||
<div class="layui-form-item">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="acount_btn">计算</button>
|
||||
@@ -147,46 +163,79 @@
|
||||
//建造实例
|
||||
ins = carousel.render({});
|
||||
|
||||
form.on('checkbox(switch)', function (data) {
|
||||
if (!data.elem.checked && data.value == "异形") {
|
||||
layer.msg('不能取消 [异形] 工艺!', {offset: ['300px', '300px']}, function () {
|
||||
});
|
||||
$('#mq').prop('checked', true);
|
||||
form.render('checkbox');
|
||||
return false;
|
||||
}
|
||||
})
|
||||
$(".kind2").find(":input").attr("disabled", true);
|
||||
$(".kind3").find(":input").attr("disabled", true);
|
||||
// 没切换款式的时候默认禁用其它的下拉框,(防止提交表单)
|
||||
$(".kind2").find(":input").attr("disabled", true);
|
||||
form.on('radio(kindValue)', function (data) {
|
||||
$(".kind2").hide();
|
||||
$(".kind2").find(":input").attr("disabled", true);
|
||||
$(".kind1").hide();
|
||||
$(".kind1").find(":input").attr("disabled", true);
|
||||
$(".kind3").hide();
|
||||
$(".kind3").find(":input").attr("disabled", true);
|
||||
$(".kind4").hide();
|
||||
$(".kind4").find(":input").attr("disabled", true);
|
||||
$("#tsCount").hide();
|
||||
$("#normal").hide();
|
||||
$(".tsCraft").hide();
|
||||
$(".tsCraft").find(":input").attr("disabled", true);
|
||||
$(".normalCraft").hide();
|
||||
$(".normalCraft").find(":input").attr("disabled", true);
|
||||
let countHtml = ` <option value="500">500</option>
|
||||
<option value="1000">1000</option>
|
||||
<option value="2000">2000</option>
|
||||
<option value="3000">3000</option>
|
||||
<option value="5000">5000</option>
|
||||
<option value="10000">10000</option>`;
|
||||
if (data.value == '3') {
|
||||
$(".kind2").show();
|
||||
$(".kind2").find(":input").attr("disabled", false);
|
||||
$(".kind1").hide();
|
||||
$(".kind1").find(":input").attr("disabled", true);
|
||||
$(".kind3").hide();
|
||||
$(".kind3").find(":input").attr("disabled", true);
|
||||
$("#tsCount").hide();
|
||||
$("#normal").show();
|
||||
$(".tsCraft").hide();
|
||||
$(".normalCraft").show();
|
||||
$(".normalCraft").find(":input").attr("disabled", false);
|
||||
} else if (data.value == '4') {
|
||||
$("#tsCount").show();
|
||||
$("#normal").hide();
|
||||
//20240727隐藏
|
||||
$(".tsCraft").hide();
|
||||
$(".normalCraft").hide();
|
||||
$(".kind3").show();
|
||||
$(".kind3").find(":input").attr("disabled", false);
|
||||
$(".kind1").hide();
|
||||
$(".kind1").find(":input").attr("disabled", true);
|
||||
$(".kind2").hide();
|
||||
$(".kind2").find(":input").attr("disabled", true);
|
||||
|
||||
} else if (data.value == '6') {
|
||||
$(".kind4").show();
|
||||
$(".kind4").find(":input").attr("disabled", false);
|
||||
$("#normal").show();
|
||||
$(".normalCraft").show();
|
||||
$(".normalCraft").find(":input").attr("disabled", false);
|
||||
countHtml = `<option value="10">10</option>
|
||||
<option value="100">100</option>
|
||||
<option value="500">500</option>
|
||||
<option value="1000">1000</option>
|
||||
<option value="2000">2000</option>
|
||||
<option value="3000">3000</option>
|
||||
<option value="4000">4000</option>
|
||||
<option value="5000">5000</option>
|
||||
<option value="6000">6000</option>
|
||||
<option value="7000">7000</option>
|
||||
<option value="8000">8000</option>
|
||||
<option value="9000">9000</option>
|
||||
<option value="10000">10000</option>`
|
||||
} else {
|
||||
$(".kind1").show();
|
||||
$(".kind1").find(":input").attr("disabled", false);
|
||||
$(".kind2").hide();
|
||||
$(".kind2").find(":input").attr("disabled", true);
|
||||
$(".kind3").hide();
|
||||
$(".kind3").find(":input").attr("disabled", true);
|
||||
$("#tsCount").hide();
|
||||
$("#normal").show();
|
||||
$(".tsCraft").hide();
|
||||
$(".normalCraft").show();
|
||||
$(".normalCraft").find(":input").attr("disabled", false);
|
||||
}
|
||||
$("#count").empty().append(countHtml);
|
||||
form.render();
|
||||
getProductImage()
|
||||
});
|
||||
|
||||
@@ -212,7 +261,7 @@
|
||||
$("#carousel").append(html);
|
||||
// 如果没有说明,就不显示null
|
||||
if (remark.indexOf("null") < 0) {
|
||||
$("#remark").append(remark);
|
||||
$("#remark").empty().append(remark);
|
||||
}
|
||||
// 如果没有轮播图就隐藏
|
||||
if (result.length == 0) {
|
||||
@@ -238,7 +287,8 @@
|
||||
2: "普通中柄(卡扣)",
|
||||
3: "筷子柄",
|
||||
4: "团扇",
|
||||
5: "o柄"
|
||||
5: "o柄",
|
||||
6: "竹柄扇"
|
||||
};
|
||||
if (fanKind == 3) {
|
||||
var kind2Data = {
|
||||
@@ -255,6 +305,19 @@
|
||||
1: "24*33",
|
||||
2: "21.5*34"
|
||||
}
|
||||
} else if (fanKind == 6) {
|
||||
var kind2Data = {
|
||||
0: "花瓶竹柄扇(190*207)",
|
||||
1: "四瓣竹柄扇(204*204)",
|
||||
2: "皇冠竹柄扇(183*207)",
|
||||
3: "芭蕉竹柄扇(280*212)",
|
||||
4: "正圆竹柄扇(205*205)",
|
||||
5: "千叶竹柄扇(171*222)",
|
||||
6: "海棠竹柄扇(207*203)",
|
||||
7: "苹果竹柄扇(204*204)",
|
||||
8: "宝相花竹柄扇(212*212)",
|
||||
9: "蝴蝶竹柄扇(212*167)"
|
||||
}
|
||||
} else {
|
||||
var kind2Data = {
|
||||
0: "15*16",
|
||||
|
||||
Reference in New Issue
Block a user