diff --git a/src/pages/plan/add/step2.js b/src/pages/plan/add/step2.js index d0f761fe..f3c4044c 100644 --- a/src/pages/plan/add/step2.js +++ b/src/pages/plan/add/step2.js @@ -283,8 +283,12 @@ export default class acclist extends React.Component { data.mobile_repeat = this.state.mobile_repeat data.key_official_price = this.state.model.key_official_price data.key_cost_price = this.state.model.key_cost_price - data.expiration_type = this.state.model.expiration_type - data.expiration_value = this.state.model.expiration_value + // data.expiration_type = this.state.model.expiration_type + // data.expiration_value = this.state.model.expiration_value + data.expiration_conf = { + expiration_type: this.state.model.expiration_type, + expiration_value: this.state.model.expiration_value + } return data } } else { @@ -302,8 +306,12 @@ export default class acclist extends React.Component { data.coupon = param data.mobile_excel = this.state.mobile_excel data.mobile_repeat = this.state.mobile_repeat - data.expiration_type = this.state.model.expiration_type - data.expiration_value = this.state.model.expiration_value + // data.expiration_type = this.state.model.expiration_type + // data.expiration_value = this.state.model.expiration_value + data.expiration_conf = { + expiration_type: this.state.model.expiration_type, + expiration_value: this.state.model.expiration_value + } // 校验 卡密时间判断 for (let i = 0; i < param.length; i++) { if (submitIsKm(param[i].product.legal) === false) { @@ -716,8 +724,8 @@ export default class acclist extends React.Component { draw_title: data.draw_title, key_official_price: data.key_official_price, key_cost_price: data.key_cost_price, - expiration_type: data.expiration_type, - expiration_value: data.expiration_value + expiration_type: data.expiration_conf.expiration_type, + expiration_value: data.expiration_conf.expiration_value } // 是否是包码 @@ -1362,7 +1370,7 @@ export default class acclist extends React.Component { - + { @@ -1426,10 +1434,9 @@ export default class acclist extends React.Component { model2.expiration_value = e.target.value this.setState({ model: model2 }) } else { - Notify.error(`输入的天数必须小于等于计划天数`) + Notify.error(`key码有效期不能超过计划有效期(${daysDiff}天)`) return } - console.log("日期间的天数差异为:" + daysDiff + " 天") } }} />