key批次复制增加copy_key_batch_id,计算复制次数

This commit is contained in:
Apple 2022-08-09 11:50:51 +08:00
parent 78cc74e746
commit 2371b8d3eb
1 changed files with 5 additions and 5 deletions

View File

@ -124,7 +124,8 @@ export default class acclist extends React.Component {
newGoodsBtnLoading: false, newGoodsBtnLoading: false,
newGoldLoading: false, newGoldLoading: false,
product_title: '新建商品', product_title: '新建商品',
addIsType: '' addIsType: '',
keyCodeId:'',//key批次ID
} }
} }
@ -141,7 +142,7 @@ export default class acclist extends React.Component {
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) => {
@ -160,7 +161,6 @@ export default class acclist extends React.Component {
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,
@ -173,7 +173,7 @@ export default class acclist extends React.Component {
this.setState({ model: model }) this.setState({ model: model })
this.setState({ endtime: req.end_time }) this.setState({ endtime: req.end_time })
this.setState({ begintime: req.begin_time }) this.setState({ begintime: req.begin_time })
this.setState({ keyCodeId: req.id })
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) => {
let obj = {} let obj = {}
@ -226,7 +226,6 @@ export default class acclist extends React.Component {
productRange.push(item.product_name) productRange.push(item.product_name)
}) })
productRange = productRange.toString() productRange = productRange.toString()
console.log(255, productRange)
pr.range = productRange pr.range = productRange
pr.restrict = item.restrict pr.restrict = item.restrict
pr.title = item.title pr.title = item.title
@ -744,6 +743,7 @@ export default class acclist extends React.Component {
this.setState({ audit_visible: false }) this.setState({ audit_visible: false })
let id = sessionStorage.getItem('key_plan_id') let id = sessionStorage.getItem('key_plan_id')
data.copy_key_batch_id=this.state.keyCodeId;
addKeysBatchInfo(id, data).then((res) => { addKeysBatchInfo(id, data).then((res) => {
handelResponse( handelResponse(
res, res,