薪资账套bug修复
This commit is contained in:
parent
28a23e3cb1
commit
24f1d6ddd0
|
|
@ -44,7 +44,7 @@ class LedgerSalaryItemNormal extends Component {
|
|||
}
|
||||
|
||||
handleEditFormnul = (field, record) => {
|
||||
const { valueType, formulaId, dateType: dataType, id } = record;
|
||||
const { valueType, formulaId, dateType: dataType, id, key } = record;
|
||||
const { editFormulModal } = this.state;
|
||||
this.setState({
|
||||
editFormulModal: {
|
||||
|
|
@ -53,7 +53,7 @@ class LedgerSalaryItemNormal extends Component {
|
|||
valueType, formulaId, dataType
|
||||
},
|
||||
formnulField: field,
|
||||
formnulId: id
|
||||
formnulId: id || key
|
||||
});
|
||||
};
|
||||
handleSaveFormnul = (data) => {
|
||||
|
|
@ -61,7 +61,7 @@ class LedgerSalaryItemNormal extends Component {
|
|||
const { formnulField, formnulId } = this.state;
|
||||
const tmpV = _.cloneDeep(formnulField.items);
|
||||
const formnulData = _.map(tmpV, it => {
|
||||
if (it.id === formnulId) {
|
||||
if (it.id === formnulId || it.key === formnulId) {
|
||||
return { ...it, formulaId: data.id, formulaContent: data.formula };
|
||||
}
|
||||
return { ...it };
|
||||
|
|
|
|||
|
|
@ -296,16 +296,17 @@ export default class FormalFormModal extends React.Component {
|
|||
});
|
||||
this.parameters = result;
|
||||
let params = {
|
||||
name: "公式1",
|
||||
description: "备注",
|
||||
module: "salary",
|
||||
useFor: "salaryitem",
|
||||
returnType: this.props.dataType || this.state.returnType,
|
||||
validateType: this.props.dataType || this.state.returnType,
|
||||
extendParam: JSON.stringify(this.state.extendParam),
|
||||
formula: this.state.value,
|
||||
// name: "公式1",
|
||||
// description: "备注",
|
||||
// module: "salary",
|
||||
// useFor: "salaryitem",
|
||||
// returnType: this.props.dataType || this.state.returnType,
|
||||
// validateType: this.props.dataType || this.state.returnType,
|
||||
// extendParam: JSON.stringify(this.state.extendParam),
|
||||
// formula: this.state.value,
|
||||
parameters: this.parameters,
|
||||
referenceType: this.referenceType == "" ? this.props.valueType == "2" ? "formula" : this.props.valueType == "3" ? "sql" : "" : this.referenceType
|
||||
id: this.props.formulaId
|
||||
// referenceType: this.referenceType == "" ? this.props.valueType == "2" ? "formula" : this.props.valueType == "3" ? "sql" : "" : this.referenceType
|
||||
};
|
||||
testFormual(params).then(({ status, data, errormsg }) => {
|
||||
if (status) {
|
||||
|
|
|
|||
|
|
@ -366,6 +366,14 @@ export default class NormalIndex extends Component {
|
|||
this.timer = setInterval(() => {
|
||||
getCalculateProgress(billMonth).then(({ status, data }) => {
|
||||
if (status) {
|
||||
if (!data.status) {
|
||||
clearInterval(this.timer);
|
||||
this.setState({
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
});
|
||||
message.error(data.message);
|
||||
}
|
||||
if (this.state.progress !== 100) {
|
||||
this.setState({
|
||||
progress: (Number(data.progress).toFixed(2)) * 100
|
||||
|
|
|
|||
Loading…
Reference in New Issue