fix: 修复计划编辑时间无法修改

This commit is contained in:
zhangds 2022-09-29 16:37:53 +08:00
parent 2dba919238
commit 8a6709a1ff
5 changed files with 11 additions and 2021 deletions

View File

@ -1080,7 +1080,7 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
defaultTime: [moment().format("HH:mm:ss"), "23:59:59"],
}}
format="YYYY-MM-DD HH:mm:ss"
disabled={[state.isState === "2" ? true : false, false]}
disabled={[false, false]}
value={form_info_data.date_time}
onChange={(e) => {
onChangeCombinedDate(e);

View File

@ -127,8 +127,8 @@ export default class acclist extends React.Component {
product_title: "新建商品",
addIsType: "",
keyCodeId: "", //key批次ID
keyType: sessionStorage.getItem("isKeyAdd")
? Number(sessionStorage.getItem("isKeyAdd"))
keyType: sessionStorage.getItem("bind_object")
? Number(sessionStorage.getItem("bind_object"))
: 1,
couponData: [],
Column: [
@ -242,9 +242,11 @@ export default class acclist extends React.Component {
componentDidMount(e) {
let batch_id = sessionStorage.getItem("keybatch_id");
let copyOpearo = sessionStorage.getItem("copyOpearo");
let bind_object_gold = sessionStorage.getItem("bind_object");
console.log("绑定类型 优惠券-兑换码 =>", bind_object_gold);
//key样式
let keystyle = sessionStorage.getItem("keyStyle");
if (keystyle == 1) {
let model = this.state.model;
model.style = 6;
@ -1557,7 +1559,7 @@ export default class acclist extends React.Component {
<Radio.Group
value={this.state.keyType}
disabled={
this.state.isEdit || sessionStorage.getItem("isKeyAdd")
this.state.isEdit || sessionStorage.getItem("bind_object")
? true
: false
}

File diff suppressed because it is too large Load Diff

View File

@ -264,6 +264,8 @@ export default class acclist extends React.Component {
let batch_id = sessionStorage.getItem("keybatch_id");
let reseller_id = sessionStorage.getItem("key_reseller_id");
let approval_id = sessionStorage.getItem("approval_id");
let bind_object_gold = sessionStorage.getItem("bind_object");
console.log("绑定类型 优惠券-兑换码 =>", bind_object_gold);
//编辑
if (batch_id > 0) {
getReseller(reseller_id).then((res) => {
@ -304,7 +306,7 @@ export default class acclist extends React.Component {
coupon: req.coupon,
plan_title: req.plan_title,
};
this.setState({ keyType: req.bind_object[0] });
this.setState({ keyType: Number(req.bind_object[0]) });
this.setState({ model: model });
this.setState({ endtime: req.end_time });
this.setState({ begintime: req.begin_time });

View File

@ -308,7 +308,7 @@ export default class acclist extends React.Component {
(req, msg) => {
console.log("req =>", req);
if (req.data.length > 0) {
sessionStorage.setItem("isKeyAdd", req.data[0].bind_object[0]);
sessionStorage.setItem("bind_object", req.data[0].bind_object[0]);
}
const newData = req.data.map((item) => {
if (![4, 5].includes(item.status)) {
@ -419,7 +419,6 @@ export default class acclist extends React.Component {
}, 200);
}
tabFn(index) {
console.log(index);
this.setState({ activepage: index, key_word: "" });
switch (index) {
case 1: