修复 立减金生效时间限制范围
This commit is contained in:
parent
30bd46c9d5
commit
52a1450b35
|
@ -537,13 +537,6 @@ export default class exchangedit extends React.Component {
|
|||
addProduct.map((item) => {
|
||||
if (item.type === 2) {
|
||||
if (item.origin) {
|
||||
const is = this.compareDate(
|
||||
this.state.codeInfo.date_time[1],
|
||||
item.origin.time_limit.effect_time.end_time
|
||||
)
|
||||
if (!is)
|
||||
item.origin.time_limit.effect_time.end_time =
|
||||
this.state.codeInfo.date_time[1]
|
||||
addProductCopy.reduce.push(item.origin)
|
||||
}
|
||||
} else {
|
||||
|
@ -555,13 +548,6 @@ export default class exchangedit extends React.Component {
|
|||
const updateProductCopy = { legal: [], reduce: [] }
|
||||
updateProduct.map((item) => {
|
||||
if (item.type === 2) {
|
||||
const is = this.compareDate(
|
||||
this.state.codeInfo.date_time[1],
|
||||
item.time_limit.effect_time.end_time
|
||||
)
|
||||
if (!is)
|
||||
item.time_limit.effect_time.end_time =
|
||||
this.state.codeInfo.date_time[1]
|
||||
updateProductCopy.reduce.push(item)
|
||||
} else {
|
||||
updateProductCopy.legal.push(item)
|
||||
|
@ -588,11 +574,6 @@ export default class exchangedit extends React.Component {
|
|||
return { data, addProduct, updateProduct }
|
||||
}
|
||||
|
||||
//比较时间
|
||||
compareDate(d1, d2) {
|
||||
return new Date(d1.replace(/-/g, '/')) > new Date(d2.replace(/-/g, '/'))
|
||||
}
|
||||
|
||||
submitCodeData() {
|
||||
if (!this.state.reseller) {
|
||||
Notify.error('该兑换码对应分销商不存在')
|
||||
|
|
Loading…
Reference in New Issue