fix: 修复计划编辑的时候,包码切换报错问题

This commit is contained in:
zhangds 2024-03-20 15:39:12 +08:00
parent 242c743d62
commit 53f47e1ca3
1 changed files with 8 additions and 2 deletions

View File

@ -234,13 +234,19 @@ export default class add extends React.Component {
setTlementType = (type) => { setTlementType = (type) => {
this.setState({ isSettlement: type }) this.setState({ isSettlement: type })
this.setState({ keys: ["step2-0"] }) this.setState({ keys: ["step2-0"] })
this.refs["step2-0"].clearTableData()
if (this.refs["step2-0"]) {
this.refs["step2-0"].clearTableData()
}
} }
// 设置 包码数据 // 设置 包码数据
setTlementData = (data) => { setTlementData = (data) => {
this.setState({ settlementData: data }) this.setState({ settlementData: data })
this.setState({ keys: ["step2-0"] }) this.setState({ keys: ["step2-0"] })
this.refs["step2-0"].clearTableData() if (this.refs["step2-0"]) {
this.refs["step2-0"].clearTableData()
}
} }
async onNextStep() { async onNextStep() {