diff --git a/jikimo_frontend/static/src/js/custom_form_status_indicator.js b/jikimo_frontend/static/src/js/custom_form_status_indicator.js index 46e3ad70..1e39b719 100644 --- a/jikimo_frontend/static/src/js/custom_form_status_indicator.js +++ b/jikimo_frontend/static/src/js/custom_form_status_indicator.js @@ -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('序号') + } + + } catch (e) { + console.log(e) + } } })