台账列表显示顺序保持两位小数

This commit is contained in:
Chengliang 2024-10-22 13:58:11 +08:00
parent bdb67fd47b
commit f1b4854a1e
5 changed files with 22 additions and 5 deletions

View File

@ -328,6 +328,12 @@ export default class Company extends React.Component {
// } // }
// }); // });
columns.forEach((c, index) => { columns.forEach((c, index) => {
if (c.dataIndex == 'showOrder') {
c.render = function (text, record) {
return <span>{record.showOrder.toFixed(2)}</span>
}
}
if (c.dataIndex == 'canceled') { if (c.dataIndex == 'canceled') {
c.render = function (text, record) { c.render = function (text, record) {
return <Switch checked={record.canceled == "0" ? true : false} onChange={checked => _this.updateForbiddenTag(checked, record.id)} /> return <Switch checked={record.canceled == "0" ? true : false} onChange={checked => _this.updateForbiddenTag(checked, record.id)} />

View File

@ -375,6 +375,12 @@ export default class Department extends React.Component {
} = this.props; } = this.props;
let _this = this; let _this = this;
columns.forEach((c, index) => { columns.forEach((c, index) => {
if (c.dataIndex == 'showOrder') {
c.render = function (text, record) {
return <span>{record.showOrder.toFixed(2)}</span>
}
}
if (c.dataIndex == 'canceled') { if (c.dataIndex == 'canceled') {
c.render = function (text, record) { c.render = function (text, record) {
return <Switch checked={record.canceled == "0" ? true : false} onChange={checked => _this.updateForbiddenTag(checked, record.id)} /> return <Switch checked={record.canceled == "0" ? true : false} onChange={checked => _this.updateForbiddenTag(checked, record.id)} />

View File

@ -332,6 +332,11 @@ export default class Job extends React.Component {
} = this.props; } = this.props;
let _this = this; let _this = this;
columns.forEach((c, index) => { columns.forEach((c, index) => {
if (c.dataIndex == 'showOrder') {
c.render = function (text, record) {
return <span>{record.showOrder.toFixed(2)}</span>
}
}
if (c.dataIndex == 'forbiddenTag') { if (c.dataIndex == 'forbiddenTag') {
c.render = function (text, record) { c.render = function (text, record) {
return <Switch checked={record.forbiddenTag == "0" ? true : false} onChange={checked => _this.updateForbiddenTag(checked, record.id)} /> return <Switch checked={record.forbiddenTag == "0" ? true : false} onChange={checked => _this.updateForbiddenTag(checked, record.id)} />

View File

@ -148,7 +148,6 @@ export default class LogView extends React.Component {
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@218ju6`} onClick={() => form.reset()}>{i18n.button.reset()}</Button>), (<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@218ju6`} onClick={() => form.reset()}>{i18n.button.reset()}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@5u9mfz`} onClick={() => this.setState({ showSearchAd: false })}>{i18n.button.cancel()}</Button>), (<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@5u9mfz`} onClick={() => this.setState({ showSearchAd: false })}>{i18n.button.cancel()}</Button>),
]; ];
return btn; return btn;
} }

View File

@ -383,6 +383,7 @@ export default class Resource extends React.Component {
let _this = this; let _this = this;
columns.forEach((c, index) => { columns.forEach((c, index) => {
c.className = "wea-table-indent" c.className = "wea-table-indent"
c.oldWidth = (100 / columns.length).toFixed(2) + '%';
if (c.dataIndex == 'lastname') { if (c.dataIndex == 'lastname') {
c.render = function (text, record) { c.render = function (text, record) {
return <a href='javascript:void(0);' onClick={() => { return <a href='javascript:void(0);' onClick={() => {