修复 【兑换码-复制】复制已完结兑换码,兑换码生效时间无法修改。

This commit is contained in:
wangsongsole 2022-08-15 10:43:56 +08:00
parent 8bb93a7308
commit c8e183d658
1 changed files with 3 additions and 43 deletions

View File

@ -389,39 +389,6 @@ export default class acclist extends React.Component {
this.setState({ model: model2 }) 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) { addProduct(type) {
this.setState({ addIsType: type }) /* 类型 */ this.setState({ addIsType: type }) /* 类型 */
/* type: 立减金/商品 */ /* type: 立减金/商品 */
@ -954,7 +921,6 @@ export default class acclist extends React.Component {
range: row.range, range: row.range,
restrict: row.restrict restrict: row.restrict
} }
this.setState({ codeInfo: codeInfo }) this.setState({ codeInfo: codeInfo })
let arr = _.map(row.product, (res) => { let arr = _.map(row.product, (res) => {
@ -1003,8 +969,8 @@ export default class acclist extends React.Component {
onDisabledRange = (date, type) => { onDisabledRange = (date, type) => {
let isdisabled = false let isdisabled = false
let str = moment(date).format('YYYY-MM-DD HH:mm:ss') let str = moment(date).format('YYYY-MM-DD HH:mm:ss')
let beign_time = this.state.codeInfo.date_time[0] let beign_time = this.state.begintime
let end_time = this.state.codeInfo.date_time[1] let end_time = this.state.endtime
if (type == 'start') { if (type == 'start') {
isdisabled = isdisabled =
moment(str).isBefore(beign_time) || moment(str).isAfter(end_time) 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.length > 0 ? (
<FormItem labelname='' prop='btn' required={false}> <FormItem labelname='' prop='btn' required={false}>
{this.state.checkedList.indexOf(1) > -1 ? ( {this.state.checkedList.indexOf(1) > -1 ? (
<Button <Button disabled>新建兑换码</Button>
disabled
onClick={(e) => {
this.checkIndex(0)
}}>
新建兑换码
</Button>
) : null} ) : null}
</FormItem> </FormItem>
) : null} ) : null}