Merge branch 'couponV2.0' of https://codeup.aliyun.com/5f9118049cffa29cfdd3be1c/marketing/frontend into couponV2.0
This commit is contained in:
commit
0318356dfa
|
@ -60,7 +60,9 @@ export default class exchangeAdd extends React.Component {
|
|||
/* 编辑和复制时才调用 */
|
||||
if (isState) {
|
||||
this.getDetailFunction(isState)
|
||||
} else {
|
||||
}
|
||||
|
||||
if (isState !== 2) {
|
||||
sessionStorage.setItem("productData", [])
|
||||
sessionStorage.setItem("knockGoldData", [])
|
||||
this.getPlanSelect()
|
||||
|
@ -258,7 +260,6 @@ export default class exchangeAdd extends React.Component {
|
|||
handelResponse(
|
||||
res,
|
||||
(req, msg) => {
|
||||
console.log("兑换码详情: =>", req)
|
||||
let reqCopy = _.cloneDeep(req)
|
||||
const resData = this.transFormData(reqCopy)
|
||||
reqCopy.goods = resData
|
||||
|
@ -272,11 +273,16 @@ export default class exchangeAdd extends React.Component {
|
|||
range: reqCopy.goods
|
||||
}
|
||||
|
||||
/* 复制状态改变code_name */
|
||||
/* 复制状态改变code_name、回显计划、批次 */
|
||||
if (this.state.isState === 1) {
|
||||
codeInfo.code_name = `${reqCopy.title}_${
|
||||
reqCopy.copy_count + 1
|
||||
}`
|
||||
codeInfo.planSelect = { key: req.plan.id, text: req.plan.title }
|
||||
codeInfo.keyBatchSelect = {
|
||||
key: req.key_batch_id,
|
||||
text: req.key_batch.batch_name
|
||||
}
|
||||
}
|
||||
|
||||
this.setState({
|
||||
|
@ -1101,7 +1107,7 @@ export default class exchangeAdd extends React.Component {
|
|||
rules={codeInfo}
|
||||
ref='code_info'
|
||||
className='addform'>
|
||||
{!this.state.isState ? (
|
||||
{this.state.isState !== 2 ? (
|
||||
<FormItem
|
||||
labelname='归属计划'
|
||||
prop='planSelect'
|
||||
|
@ -1124,7 +1130,7 @@ export default class exchangeAdd extends React.Component {
|
|||
</FormItem>
|
||||
) : null}
|
||||
|
||||
{!this.state.isState ? (
|
||||
{this.state.isState !== 2 ? (
|
||||
<FormItem
|
||||
labelname='归属key'
|
||||
prop='keyBatchSelect'
|
||||
|
|
|
@ -218,11 +218,12 @@ export default class acclist extends React.Component {
|
|||
条件一 如果兑换码状态为1(进行中)、2(暂停中)、3(未开始)可直接复制
|
||||
条件二 如果兑换码状态为4(已完结)、5(已作废)则判断key批次是否是 生效中、暂停中、审核驳回状态且营销计划是待生效、进行中、暂停中
|
||||
*/
|
||||
console.log(params)
|
||||
const isCopy =
|
||||
[1, 2, 3].includes(params.status) ||
|
||||
([4, 5].includes(params.status) &&
|
||||
[4, 5, 8].includes(params.keyBatch.status) &&
|
||||
[3, 5, 4].includes(params.keyBatch.plan.status))
|
||||
[1, 2, 3].includes(params?.status) ||
|
||||
([4, 5].includes(params?.status) &&
|
||||
[4, 5, 8].includes(params.keyBatch?.status) &&
|
||||
[3, 5, 4].includes(params.keyBatch.plan?.status))
|
||||
|
||||
if (isCopy) {
|
||||
element = (
|
||||
|
|
Loading…
Reference in New Issue