记得上下班打卡 | git大法好,push需谨慎

Commit f69c193d authored by dongchun's avatar dongchun

修改选择商品时无法编写券名称的问题

parent 9d1ed69d
......@@ -13,7 +13,9 @@
.main_title, .main_type, .money, .scope_application, .sendType,.phoneNumber,.playMethod {
margin-bottom: 20px;
}
#searchIpt {
display: none;
}
.phoneNumber,.playMethod {
display: none;
}
......@@ -164,6 +166,7 @@
<span class="labelName"><i class="required">*</i>券名称:</span>
<div class="search_ipt" style="position: relative;display: inline;">
<input type="text" id="searchIpt" autocomplete="off" class="layui-input" placeholder="全部">
<input type="text" id="searchIptMall" autocomplete="off" class="layui-input" placeholder="全部">
<ul id="dataList" style="position: absolute;"></ul>
</div>
</div>
......@@ -457,6 +460,15 @@
});
$("input[name=selectType]").change(function(e){
selectType = e.target.value;
if (selectType == 0) {
$("#searchIptMall").show()
$("#searchIpt").hide()
$("#searchIpt").val('')
} else {
$("#searchIptMall").hide()
$("#searchIptMall").val('')
$("#searchIpt").show()
}
});
$("input[name=sendType]").change(function(e){
sendType = e.target.value;
......@@ -483,9 +495,18 @@
});
function create() {
if (!$('#searchIpt').val() || !showPicture || !$('#integralNum').val() || !$('#moneyNum').val() || !$('#inventory').val() || !$('#summernote').summernote('code') || !$('.summernote').eq(1).summernote('code')) {
if (!showPicture || !$('#integralNum').val() || !$('#moneyNum').val() || !$('#inventory').val() || !$('#summernote').summernote('code') || !$('.summernote').eq(1).summernote('code')) {
return layer.msg('请将必填项输入完整~!');
}
if (selectType == 1) {
if (!$('#searchIpt').val()) {
return layer.msg('请将必填项输入完整~!');
}
} else {
if (!$('#searchIptMall').val()) {
return layer.msg('请将必填项输入完整~!');
}
}
if (sendType == 1) {
if (!$("#linit").val()) {
return layer.msg('请填写限兑次数!');
......@@ -517,7 +538,7 @@
startTime: $.common.dateFormat(startTime, 'yyyy-MM-dd HH:mm:ss'), // 上架时间status = 2 必传)
status: Number(shelves), // 上架状态[1-不限|2-定时|7-下线]
targetId: showId, // 目标物品id
targetTitle: $('#searchIpt').val() // 目标物品标题
targetTitle: $('#searchIpt').val() || $("#searchIptMall").val() // 目标物品标题
}
let type = 'post';
if (!itemId) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment