合并冲突

This commit is contained in:
wangsongsole 2022-08-09 11:26:28 +08:00
commit 78cc74e746
1 changed files with 14 additions and 36 deletions

View File

@ -140,7 +140,8 @@ export default class acclist extends React.Component {
this.setState({ model: model }) this.setState({ model: model })
this.setState({ white_visible: true }) this.setState({ white_visible: true })
} }
//复制
//编辑
if (batch_id > 0 || copyOpearo == 2) { if (batch_id > 0 || copyOpearo == 2) {
// this.setState({isEdit:true}) // this.setState({isEdit:true})
getKeyBatchDetail(batch_id).then((res) => { getKeyBatchDetail(batch_id).then((res) => {
@ -150,26 +151,16 @@ export default class acclist extends React.Component {
this.setState({ pagetitle: '复制key' }) this.setState({ pagetitle: '复制key' })
getReseller(req.reseller_id).then((res) => { getReseller(req.reseller_id).then((res) => {
handelResponse(res, (req, msg) => { handelResponse(res, (req, msg) => {
this.setState({ this.setState({ reseller: req })
phone_list: req.contact_phone,
direct_reseller_id: req.direct_reseller_id, this.setState({ phone_list: req.contact_phone })
email_list: req.contact_email, this.setState({ email_list: req.contact_email })
reseller: req
})
getProductInfoSelect({
reseller_id: req.direct_reseller_id
}).then((res) => {
if (res.code === 200) {
sessionStorage.setItem(
'productsList',
JSON.stringify(res.data.data)
)
}
})
}) })
}) })
let model = { let model = {
title: req.plan_title, title: req.plan_title,
batch_name: '',
style: req.style, style: req.style,
quantity: req.quantity, quantity: req.quantity,
allow_repetition: req.allow_repetition, allow_repetition: req.allow_repetition,
@ -178,24 +169,10 @@ export default class acclist extends React.Component {
code_batch: req.code_batch, code_batch: req.code_batch,
batch_name: `${req.batch_name}_${++req.copy_count}` batch_name: `${req.batch_name}_${++req.copy_count}`
} }
let codeInfo = { this.setState({ checkedList: req.bind_object })
//数据模型不可少 this.setState({ model: model })
date_time: [req.begin_time, req.end_time] this.setState({ endtime: req.end_time })
} this.setState({ begintime: req.begin_time })
sessionStorage.setItem(
'plan_item',
JSON.stringify({
begin_time: req.begin_time,
end_time: req.end_time
})
)
this.setState({
checkedList: req.bind_object,
model: model,
endtime: req.end_time,
begintime: req.begin_time,
codeInfo: codeInfo
})
let list = _.map(req.code_batch, (item) => { let list = _.map(req.code_batch, (item) => {
item.product = item.product.map((item1) => { item.product = item.product.map((item1) => {
@ -266,7 +243,6 @@ export default class acclist extends React.Component {
(err) => {} (err) => {}
) )
}) })
/* 新增 */
} else { } else {
let plan_item = sessionStorage.getItem('plan_item') let plan_item = sessionStorage.getItem('plan_item')
if (plan_item) { if (plan_item) {
@ -283,6 +259,7 @@ export default class acclist extends React.Component {
getReseller(id).then((res) => { getReseller(id).then((res) => {
handelResponse(res, (req, msg) => { handelResponse(res, (req, msg) => {
this.setState({ reseller: req }) this.setState({ reseller: req })
this.setState({ phone_list: req.contact_phone }) this.setState({ phone_list: req.contact_phone })
this.setState({ email_list: req.contact_email }) this.setState({ email_list: req.contact_email })
this.setState({ this.setState({
@ -1038,6 +1015,7 @@ export default class acclist extends React.Component {
let success = req.count - req.errorCount let success = req.count - req.errorCount
this.setState({ success_count: success }) this.setState({ success_count: success })
this.setState({ exceldata: req.validationFailed }) this.setState({ exceldata: req.validationFailed })
this.setState({ success_visible: true }) this.setState({ success_visible: true })
}, },
(err) => { (err) => {