1) 修复计划复制、编辑、新增绑定类型切换落地页切换

This commit is contained in:
zhangds 2022-09-29 10:23:50 +08:00
parent 623cf6b926
commit df8b667bf8
6 changed files with 17 additions and 5 deletions

View File

@ -57,8 +57,8 @@ const tableColumn = [
title: "归属key批次名称", title: "归属key批次名称",
width: "auto", width: "auto",
type: "normal", type: "normal",
prop: "keyBatch.plan.title", prop: "keyBatch.batch_name",
name: "keyBatch.plan.title", name: "keyBatch.batch_name",
}, },
{ {
title: "启用/暂停", title: "启用/暂停",
@ -285,6 +285,7 @@ const UseCouponList = () => {
sessionStorage.setItem("isState", type); sessionStorage.setItem("isState", type);
sessionStorage.setItem("breaknav", JSON.stringify(activerou)); sessionStorage.setItem("breaknav", JSON.stringify(activerou));
sessionStorage.setItem("pathname2", "/home/coupon-add-edit"); sessionStorage.setItem("pathname2", "/home/coupon-add-edit");
sessionStorage.setItem("datetime", "");
history.push("/home/coupon-add-edit"); history.push("/home/coupon-add-edit");
}; };

View File

@ -414,6 +414,7 @@ export default class add extends React.Component {
keyType={this.state.keyType} keyType={this.state.keyType}
keyStyle={this.state.keyStyle} keyStyle={this.state.keyStyle}
isload={this.state.isload} isload={this.state.isload}
curstep={this.state.curstep}
direct_reseller_id={this.state.direct_reseller_id} direct_reseller_id={this.state.direct_reseller_id}
name={index} name={index}
whiteStyle={this.state.whiteStyle} whiteStyle={this.state.whiteStyle}

View File

@ -684,6 +684,7 @@ export default class add extends React.Component {
this.setState({ keyType: e }); this.setState({ keyType: e });
}} }}
getStep3Theme={() => this.getStep3Theme()} getStep3Theme={() => this.getStep3Theme()}
curstep={this.state.curstep}
keyType={this.state.keyType} keyType={this.state.keyType}
whiteStyle={this.state.whiteStyle} whiteStyle={this.state.whiteStyle}
keyStyle={this.state.keyStyle} keyStyle={this.state.keyStyle}

View File

@ -145,6 +145,7 @@ export default class add extends React.Component {
this.refs["step2-" + i].submit(); this.refs["step2-" + i].submit();
} }
}, 500); }, 500);
console.log("详情 =>", req);
} else { } else {
this.addNewkey(); this.addNewkey();
} }
@ -213,6 +214,11 @@ export default class add extends React.Component {
} }
} }
// 获取落地页
getStep3Theme() {
this.refs.step3.getThemeData();
}
onConfirm(e) { onConfirm(e) {
let plan_id = sessionStorage.getItem("plan_id"); let plan_id = sessionStorage.getItem("plan_id");
this.setState({ is_audit: true }); this.setState({ is_audit: true });
@ -521,6 +527,8 @@ export default class add extends React.Component {
this.setState({ keyType: e }); this.setState({ keyType: e });
}} }}
keyType={this.state.keyType} keyType={this.state.keyType}
getStep3Theme={() => this.getStep3Theme()}
curstep={this.state.curstep}
isCopy={true} isCopy={true}
isload={this.state.isload} isload={this.state.isload}
direct_reseller_id={this.state.direct_reseller_id} direct_reseller_id={this.state.direct_reseller_id}

View File

@ -294,7 +294,7 @@ export default class acclist extends React.Component {
onCheckChange = ({ target }) => { onCheckChange = ({ target }) => {
this.props.changeKeyType(target.value); this.props.changeKeyType(target.value);
sessionStorage.setItem("keyType", target.value); sessionStorage.setItem("keyType", target.value);
if (this.props.getStep3Theme) { if (this.props.getStep3Theme && this.props.curstep === 3) {
this.props.getStep3Theme(); this.props.getStep3Theme();
} }
}; };
@ -310,7 +310,8 @@ export default class acclist extends React.Component {
this.setState({ model: model2 }); this.setState({ model: model2 });
if (e.target.value == 6) { if (e.target.value == 6) {
sessionStorage.setItem("white", 1); sessionStorage.setItem("white", 1);
if (this.props.getStep3Theme) { console.log("this.props.curstep =>", this.props.curstep);
if (this.props.getStep3Theme && this.props.curstep === 3) {
this.props.getStep3Theme(); this.props.getStep3Theme();
} }
this.setState({ white_visible: true }); this.setState({ white_visible: true });

View File

@ -45,6 +45,7 @@ export default class acclist extends React.Component {
} }
getThemeData() { getThemeData() {
console.log("编辑 -1");
let params = {}; let params = {};
// 第一步:判断是否优惠券 // 第一步:判断是否优惠券
@ -82,7 +83,6 @@ export default class acclist extends React.Component {
let model = this.state.model; let model = this.state.model;
model.theme_id = ""; model.theme_id = "";
this.setState({ model: model }); this.setState({ model: model });
if (this.props.data && this.props.data.theme_id) { if (this.props.data && this.props.data.theme_id) {
this.setState({ theme_id: this.props.data.theme_id }); this.setState({ theme_id: this.props.data.theme_id });