내정보 끝.

This commit is contained in:
주우성
2025-06-18 14:40:11 +09:00
parent 5e59e1ba9c
commit 5d5f357504
9 changed files with 268 additions and 93 deletions

View File

@@ -277,10 +277,18 @@
ENV.elementRefs.select.unitCodeSelect.core.init($select3,{
selectItemCallback({selectValue, dataValue}){
document.querySelector('#unitCode').value=dataValue;
if(dataValue === "code.record.unit.self") {
document.querySelector('#unit').value="";
document.querySelector('#unitDiv').style.display ='block';
} else {
document.querySelector('#unit').value="";
document.querySelector('#unitDiv').style.display ='none';
}
}
});
ENV.module.modalPopup.open();
document.querySelector('.modal-content').scrollTop = 0;
},
function(code, rstData) {
kri.logger.error('Do nothing. code: '+ code, rstData);
@@ -351,11 +359,23 @@
}
if (!form.sourcePurpose.value) errors.push({field: 'sourcePurpose', message: '용도 입력해주세요.'});
if(form.count.value){
if(!form.unitCode.value){
errors.push({
field: 'unitCode',
message: '단위를 선택해주세요.'
});
} else if (form.unitCode.value && form.unitCode.value =="code.record.unit.self" && !form.unit.value){
if (form.count.value && !form.unitCode.value) errors.push({
field: 'unitCode',
message: '단위를 선택해주세요.'
});
errors.push({
field: 'unit',
message: '단위를 입력해주세요.'
});
}
}
if (!form.price.value) errors.push({field: 'price', message: '금액을 입력해주세요.'});
console.log(errors) //////////////////////////
kri.form.error(errors);
@@ -407,15 +427,19 @@
const field = form.elements.namedItem(key);
if (field) {
field.value = val;
if(key == 'transferCategoryCode' && val == "code.bank.input.99"){
if(key == 'transferCategoryCode' && val == "code.bank.input.self"){
document.getElementById(val+"_value").value = product["transferCategory"];
}
if(key == 'unitCode' && val == "code.record.unit.self"){
document.getElementById("unitDiv").style.display = "";
}
}
});
ENV.elementRefs.select.transferCategoryCodeSelect.setValue(product.transferCategoryCode);
ENV.elementRefs.select.unitCodeSelect.setValue(product.unitCode);
document.getElementById("unit").value = product.unit;
},100)
},
@@ -476,13 +500,16 @@
const categoryCode = product.transferCategoryCode;
const categoryCodeInputValue = product.transferCategory;
const categoryValue = product[`${categoryCode}_value`] ? product[`${categoryCode}_value`] : categoryCodeInputValue;
const tagTitle = categoryCode === 'code.bank.output.99'
const tagTitle = categoryCode === 'code.bank.output.self'
? categoryCodeInputValue
: `${getCategory(categoryCode)}`;
const tagCount = product.count
? `<li><p>수량</p><span>${format(product.count)}${getUnit(product.unitCode)}</span></li>`
: '';
let tagCount = '';
if(product.count && product.unitCode != "code.record.unit.self"){
tagCount = `<li><p>수량</p><span>${format(product.count)}${getUnit(product.unitCode)}</span></li>`;
} else {
tagCount = `<li><p>수량</p><span>${format(product.count)}${product.unit}</span></li>`
}
const buttonGroupHtml = isEdit
? `