fix:修复兑换码复制时回显计划和批次
This commit is contained in:
parent
9756c22b35
commit
d46f2cf858
|
@ -60,7 +60,9 @@ export default class exchangeAdd extends React.Component {
|
||||||
/* 编辑和复制时才调用 */
|
/* 编辑和复制时才调用 */
|
||||||
if (isState) {
|
if (isState) {
|
||||||
this.getDetailFunction(isState)
|
this.getDetailFunction(isState)
|
||||||
} else {
|
}
|
||||||
|
|
||||||
|
if (isState !== 2) {
|
||||||
sessionStorage.setItem("productData", [])
|
sessionStorage.setItem("productData", [])
|
||||||
sessionStorage.setItem("knockGoldData", [])
|
sessionStorage.setItem("knockGoldData", [])
|
||||||
this.getPlanSelect()
|
this.getPlanSelect()
|
||||||
|
@ -258,7 +260,6 @@ export default class exchangeAdd extends React.Component {
|
||||||
handelResponse(
|
handelResponse(
|
||||||
res,
|
res,
|
||||||
(req, msg) => {
|
(req, msg) => {
|
||||||
console.log("兑换码详情: =>", req)
|
|
||||||
let reqCopy = _.cloneDeep(req)
|
let reqCopy = _.cloneDeep(req)
|
||||||
const resData = this.transFormData(reqCopy)
|
const resData = this.transFormData(reqCopy)
|
||||||
reqCopy.goods = resData
|
reqCopy.goods = resData
|
||||||
|
@ -272,11 +273,16 @@ export default class exchangeAdd extends React.Component {
|
||||||
range: reqCopy.goods
|
range: reqCopy.goods
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 复制状态改变code_name */
|
/* 复制状态改变code_name、回显计划、批次 */
|
||||||
if (this.state.isState === 1) {
|
if (this.state.isState === 1) {
|
||||||
codeInfo.code_name = `${reqCopy.title}_${
|
codeInfo.code_name = `${reqCopy.title}_${
|
||||||
reqCopy.copy_count + 1
|
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({
|
this.setState({
|
||||||
|
@ -1101,7 +1107,7 @@ export default class exchangeAdd extends React.Component {
|
||||||
rules={codeInfo}
|
rules={codeInfo}
|
||||||
ref='code_info'
|
ref='code_info'
|
||||||
className='addform'>
|
className='addform'>
|
||||||
{!this.state.isState ? (
|
{this.state.isState !== 2 ? (
|
||||||
<FormItem
|
<FormItem
|
||||||
labelname='归属计划'
|
labelname='归属计划'
|
||||||
prop='planSelect'
|
prop='planSelect'
|
||||||
|
@ -1124,7 +1130,7 @@ export default class exchangeAdd extends React.Component {
|
||||||
</FormItem>
|
</FormItem>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
{!this.state.isState ? (
|
{this.state.isState !== 2 ? (
|
||||||
<FormItem
|
<FormItem
|
||||||
labelname='归属key'
|
labelname='归属key'
|
||||||
prop='keyBatchSelect'
|
prop='keyBatchSelect'
|
||||||
|
|
Loading…
Reference in New Issue