✨ feat: 新建计划增加防暴击
This commit is contained in:
parent
8ffd09c0ca
commit
0fe39b9cdf
|
@ -32,6 +32,7 @@ export default class accList extends React.Component {
|
||||||
settlementOptions: [],
|
settlementOptions: [],
|
||||||
reseller_option: [],
|
reseller_option: [],
|
||||||
lodshow: false,
|
lodshow: false,
|
||||||
|
loading: false,
|
||||||
isSettlement: 2
|
isSettlement: 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -140,6 +141,9 @@ export default class accList extends React.Component {
|
||||||
data.settlement_type = this.state.model.settlement_type.key
|
data.settlement_type = this.state.model.settlement_type.key
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.state.loading) return
|
||||||
|
this.setState({ loading: true })
|
||||||
|
|
||||||
if (id) {
|
if (id) {
|
||||||
let form = {
|
let form = {
|
||||||
title: data.title,
|
title: data.title,
|
||||||
|
@ -152,8 +156,8 @@ export default class accList extends React.Component {
|
||||||
if (this.state.isSettlement === 1 && this.state.model.settlement_type) {
|
if (this.state.isSettlement === 1 && this.state.model.settlement_type) {
|
||||||
form.settlement_type = data.settlement_type
|
form.settlement_type = data.settlement_type
|
||||||
}
|
}
|
||||||
|
|
||||||
await putPlanStep(id, form).then((res) => {
|
await putPlanStep(id, form).then((res) => {
|
||||||
|
this.setState({ loading: false })
|
||||||
handelResponse(
|
handelResponse(
|
||||||
res,
|
res,
|
||||||
(req, msg) => {
|
(req, msg) => {
|
||||||
|
@ -175,6 +179,7 @@ export default class accList extends React.Component {
|
||||||
formdata.info.copy_plan_id = sessionStorage.getItem("plan_id_copy")
|
formdata.info.copy_plan_id = sessionStorage.getItem("plan_id_copy")
|
||||||
if (plan_id == "") {
|
if (plan_id == "") {
|
||||||
await addPlanStep("", formdata).then((res) => {
|
await addPlanStep("", formdata).then((res) => {
|
||||||
|
this.setState({ loading: false })
|
||||||
handelResponse(
|
handelResponse(
|
||||||
res,
|
res,
|
||||||
(req, msg) => {
|
(req, msg) => {
|
||||||
|
|
Loading…
Reference in New Issue