公会-薪资账户-账单修改账单类型展示文字

This commit is contained in:
chenruiye
2025-04-28 15:36:48 +08:00
parent 90a8060cd6
commit 953bc4955b

View File

@@ -99,10 +99,10 @@ function getData() {
// tradeType 1 收入 2支出
// if (item.tradeType == 1) {
str += `
<li class="${item.type == 5 || item.type == 6 ? 'actLi' : ''}">
<li class="${item.type == 5 || item.type == 6 || item.type == 8 ? 'actLi' : ''}">
<div>
${(item.type == 5 || item.type == 6) ? `<i class="sp${item.status}">${(item.status == 0 ? langReplace(localLang.bill.text10) : item.status == 1 ? langReplace(localLang.bill.text11) : langReplace(localLang.bill.text12))}</i>` : ''}
<p>${item.type == 1 ? `${langReplace(localLang.bill.text5)}` : item.type == 2 ? `${langReplace(localLang.bill.text6)}` : item.type == 3 ? `${langReplace(localLang.bill.text7)}` : item.type == 4 ? `ID:${type == 1 ? item.target.erbanNo : item.me.erbanNo} ${langReplace(localLang.bill.text8)} ID: ${type == 1 ? item.me.erbanNo : item.target.erbanNo}` : `${langReplace(localLang.bill.text9)}`}</p>
${(item.type == 5 || item.type == 6 || item.type == 8) ? `<i class="sp${item.status}">${(item.status == 0 ? langReplace(localLang.bill.text10) : item.status == 1 ? langReplace(localLang.bill.text11) : langReplace(localLang.bill.text12))}</i>` : ''}
<p>${classificationType(item.type, item)}</p>
<b dir="ltr">${type == 1 ? '+ ' + item.operateUsdNum.toLocaleString() : item.operateUsdNum.toLocaleString()} ÜS</b>
</div>
<div>
@@ -135,6 +135,34 @@ function getData() {
},
});
}
// 分类type
function classificationType(type, item) {
switch (type) {
case 1:
return langReplace(localLang.bill.text5)
break;
case 2:
return langReplace(localLang.bill.text7)
break;
case 3:
return `ID:${type == 1 ? item.target.erbanNo : item.me.erbanNo} ${langReplace(localLang.bill.text8)} ID: ${type == 1 ? item.me.erbanNo : item.target.erbanNo}`
break;
case 4:
return langReplace(localLang.bill.text9)
break;
case 5:
return langReplace(localLang.bill.text6)
break;
case 6:
return langReplace(localLang.bill.text9)
break;
case 8:
return langReplace(localLang.bill.text6)
break;
default:
return langReplace(localLang.bill.text9)
}
}
$(".income_expenses p").click(function () {
let i = $(this).index()