fix: 修复 兑换码包码
This commit is contained in:
parent
5c7547f2ce
commit
d1c9bacb95
|
@ -204,7 +204,8 @@ export default class exchangeAdd extends React.Component {
|
||||||
tempdata: reqCopy.goods || [],
|
tempdata: reqCopy.goods || [],
|
||||||
plan_time: [reqCopy.plan.begin_time, reqCopy.plan.end_time],
|
plan_time: [reqCopy.plan.begin_time, reqCopy.plan.end_time],
|
||||||
rank: checkedArray,
|
rank: checkedArray,
|
||||||
rankoptions: arr
|
rankoptions: arr,
|
||||||
|
settlement_type: reqCopy.plan.settlement_type
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
(err) => {}
|
(err) => {}
|
||||||
|
@ -586,8 +587,17 @@ export default class exchangeAdd extends React.Component {
|
||||||
return Notify.error("请绑定对象")
|
return Notify.error("请绑定对象")
|
||||||
}
|
}
|
||||||
|
|
||||||
let approval_id = sessionStorage.getItem("approval_id")
|
// 判断是否是 包码
|
||||||
|
if (this.state.settlement_type > 0) {
|
||||||
|
// 包码 合并数组
|
||||||
|
let all_arr = [...updateProduct, ...addProduct]
|
||||||
|
if (all_arr.length > 1) {
|
||||||
|
Notify.error("包码只能创建一个商品")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let approval_id = sessionStorage.getItem("approval_id")
|
||||||
if (Number(approval_id) <= 0) {
|
if (Number(approval_id) <= 0) {
|
||||||
//非审核中状态
|
//非审核中状态
|
||||||
getIsRequireApproval(code_batch_id, data).then((res) => {
|
getIsRequireApproval(code_batch_id, data).then((res) => {
|
||||||
|
|
|
@ -183,7 +183,8 @@ export const init = () => {
|
||||||
planSelectData: [] /* 归属计划数据 */,
|
planSelectData: [] /* 归属计划数据 */,
|
||||||
keyBatchSelectData: [] /* 归属key数据 */,
|
keyBatchSelectData: [] /* 归属key数据 */,
|
||||||
codeStatus: "" /* 兑换码状态 */,
|
codeStatus: "" /* 兑换码状态 */,
|
||||||
productData: null
|
productData: null,
|
||||||
|
settlement_type: 0 // 大于0是包码
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -292,7 +292,6 @@ const UseKeyAddEdit = () => {
|
||||||
})
|
})
|
||||||
getResellerFun(planObj.reseller_id)
|
getResellerFun(planObj.reseller_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
// KeyPcType 1编辑 2复制 3新增
|
// KeyPcType 1编辑 2复制 3新增
|
||||||
if (state.KeyPcType === "3") {
|
if (state.KeyPcType === "3") {
|
||||||
setState({
|
setState({
|
||||||
|
@ -658,7 +657,7 @@ const UseKeyAddEdit = () => {
|
||||||
if (validator) {
|
if (validator) {
|
||||||
let param = addEditExchangeEl.current.getModel()
|
let param = addEditExchangeEl.current.getModel()
|
||||||
if (state.isSettlement >= 1) {
|
if (state.isSettlement >= 1) {
|
||||||
// 合并数组
|
// 包码 合并数组
|
||||||
let all_arr = [...param.product.legal, ...param.product.reduce, ...param.product.cash]
|
let all_arr = [...param.product.legal, ...param.product.reduce, ...param.product.cash]
|
||||||
if (all_arr.length > 1) {
|
if (all_arr.length > 1) {
|
||||||
Notify.error("包码只能创建一个商品")
|
Notify.error("包码只能创建一个商品")
|
||||||
|
|
Loading…
Reference in New Issue