diff --git a/src/pages/exchangecode/copyCode/index.jsx b/src/pages/exchangecode/copyCode/index.jsx index 3ca2e3fb..31fb324c 100644 --- a/src/pages/exchangecode/copyCode/index.jsx +++ b/src/pages/exchangecode/copyCode/index.jsx @@ -389,39 +389,6 @@ export default class acclist extends React.Component { this.setState({ model: model2 }) } - checkIndex(e) { - switch (e) { - case 0: - this.setState({ draw_title: '新建兑换码' }) - break - case 1: - this.setState({ draw_title: '新建优惠券' }) - break - case 2: - this.setState({ draw_title: '新建立减金' }) - break - default: - return - } - this.setState({ drawerVisible: false }) - let codeInfo = { - //数据模型不可少 - code_name: '', - issued: '', //发放总量 - describe: '', - date_time: [this.state.begintime, this.state.endtime], - range: '' - } - - this.setState({ codeInfo: codeInfo }) - this.setState({ tempdata: [] }) - this.setState({ rank: null }) - this.setState({ rankoptions: [] }) - this.setState({ drawerVisible: true }) - sessionStorage.setItem('productData', '') - sessionStorage.setItem('knockGoldData', '') - } - addProduct(type) { this.setState({ addIsType: type }) /* 类型 */ /* type: 立减金/商品 */ @@ -954,7 +921,6 @@ export default class acclist extends React.Component { range: row.range, restrict: row.restrict } - this.setState({ codeInfo: codeInfo }) let arr = _.map(row.product, (res) => { @@ -1003,8 +969,8 @@ export default class acclist extends React.Component { onDisabledRange = (date, type) => { let isdisabled = false let str = moment(date).format('YYYY-MM-DD HH:mm:ss') - let beign_time = this.state.codeInfo.date_time[0] - let end_time = this.state.codeInfo.date_time[1] + let beign_time = this.state.begintime + let end_time = this.state.endtime if (type == 'start') { isdisabled = moment(str).isBefore(beign_time) || moment(str).isAfter(end_time) @@ -1104,13 +1070,7 @@ export default class acclist extends React.Component { {this.state.checkedList.length > 0 ? ( {this.state.checkedList.indexOf(1) > -1 ? ( - + ) : null} ) : null}