Accept Merge Request #1670: (feature/前端样式修改 -> develop)

Merge Request: 修复会计列表表头少了列bug

Created By: @黄焱
Reviewed By: @马广威
Approved By: @马广威 
Accepted By: @黄焱
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1670?initial=true
This commit is contained in:
黄焱
2024-12-30 14:40:22 +08:00
committed by Coding

View File

@@ -139,6 +139,7 @@ patch(ListRenderer.prototype, 'jikimo_frontend.ListRenderer', {
owl.onMounted(() => {
this.activeElement = this.uiService.activeElement;
this.setRequired()
this.listherHeaderBodyNum()
})
return this._super(...arguments);
},
@@ -165,6 +166,25 @@ patch(ListRenderer.prototype, 'jikimo_frontend.ListRenderer', {
} catch (e) {
console.log(e)
}
},
listherHeaderBodyNum() {
const dom = this.tableRef.el
try {
const thead = $(dom).children('thead')
const tbody = $(dom).children('tbody')
const thead_tr = thead.children().eq(0)
const tbody_tr = tbody.children().eq(0)
const thead_th_num = thead_tr.children().length
const tbody_tr_num = tbody_tr.children().length
const num = thead_th_num - tbody_tr_num
console.log('num', num);
if(num == -1) {
thead_tr.prepend('<td>序号</td>')
}
} catch (e) {
console.log(e)
}
}
})