bug修改,选择没有附件时,附件清空

master
duhui 2021-01-13 16:30:41 +08:00
parent 3a8bcd9696
commit 035d2313a9
2 changed files with 25 additions and 21 deletions

View File

@ -294,17 +294,19 @@
}
var version = new Date().getTime() / 1000;
var itemIds = [];
$("select[name='itemId']").each(function () {
if($(this).val()!=='0'){
itemIds.push($(this).val());
}
});
var itemNums =[];
$("input[name='itemNum']").each(function(){
if($(this).val()!=='') {
itemNums.push($(this).val());
}
});
if (isAttach === "1") {
$("select[name='itemId']").each(function () {
if($(this).val()!=='0'){
itemIds.push($(this).val());
}
});
$("input[name='itemNum']").each(function(){
if($(this).val()!=='') {
itemNums.push($(this).val());
}
});
}
if(itemNums.length!==itemIds.length){
erroCode.html('<span style="color: red; ">物品id或物品数量不匹配</span>');
}

View File

@ -294,17 +294,19 @@
}
var version = new Date().getTime() / 1000;
var itemIds = [];
$("select[name='itemId']").each(function () {
if ($(this).val() !== '0') {
itemIds.push($(this).val());
}
});
var itemNums = [];
$("input[name='itemNum']").each(function () {
if ($(this).val() !== '') {
itemNums.push($(this).val());
}
});
var itemNums =[];
if (isAttach === "1") {
$("select[name='itemId']").each(function () {
if($(this).val()!=='0'){
itemIds.push($(this).val());
}
});
$("input[name='itemNum']").each(function(){
if($(this).val()!=='') {
itemNums.push($(this).val());
}
});
}
if (serverId === '' || serverId == null) {
erroCode.html('<span style="color: red; ">服务器id不能为空!</span>');
return false;