From bf356f3c17fc50c745cb2ebe23f2e6b11903fecf Mon Sep 17 00:00:00 2001 From: Apple <> Date: Mon, 8 Aug 2022 11:32:26 +0800 Subject: [PATCH] =?UTF-8?q?key=E6=89=B9=E6=AC=A1=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E4=B8=80=E9=94=AE=E5=A4=8D=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/exchangecode/add/add.js | 10 ++++++++-- src/pages/plan/key/list.js | 25 +++++++++++++++++++++++-- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/pages/exchangecode/add/add.js b/src/pages/exchangecode/add/add.js index badedf4e..65268608 100644 --- a/src/pages/exchangecode/add/add.js +++ b/src/pages/exchangecode/add/add.js @@ -245,7 +245,13 @@ export default class acclist extends React.Component { return obj }) let pr = {} - pr.range = item.range + let productRange = [] + item.product.forEach(item=>{ + productRange.push(item.product_name); + }); + productRange = productRange.toString() + console.log(255,productRange); + pr.range = productRange pr.restrict = item.restrict pr.title = item.title pr.begin_time = item.begin_time @@ -1034,7 +1040,6 @@ export default class acclist extends React.Component { let success = req.count - req.errorCount this.setState({ success_count: success }) this.setState({ exceldata: req.validationFailed }) - this.setState({ success_visible: true }) }, (err) => { @@ -1576,6 +1581,7 @@ export default class acclist extends React.Component { width={'520px'} alignment={'left'} /> + { this.setState({ distdata: req.data }) + this.setState({ planStatus: req.plan.status })//计划状态 this.setState({ dataCount: req.total }) sessionStorage.setItem('key_plan_status', req.plan.status) }, @@ -388,13 +390,14 @@ export default class acclist extends React.Component { }, { path: '/home/exchangecode-add', - name: '复制key' + name: '复制key:'+row.batch_name } ] } ] sessionStorage.setItem('keybatch_id', row.id) sessionStorage.setItem('copyOpearo', 1) + sessionStorage.setItem('key_reseller_id', row.reseller_id) sessionStorage.setItem('breakchangenav', JSON.stringify(activerou)) } //page @@ -861,11 +864,19 @@ export default class acclist extends React.Component { } if (com == 'edit') { let str = '' + /*计划已完结6,未通过2,已作废8 不可复制 + key创建中1,未通过2 不可复制 + */ if (rowData.status == 6 || rowData.status == 7) { str = ( 编辑 - + { + [1,2,8].includes(rowData.status)||[2,6,8,7].includes(this.state.planStatus)?(复制):( + {this.onCopyRow(e, rowData)}}>复制 + ) + } + 撤销审批 编辑 + { + [1,2,8].includes(rowData.status)||[2,6,8,7].includes(this.state.planStatus)?(复制):( + {this.onCopyRow(e, rowData)}}>复制 + ) + } this.onReCall(e, rowData)}> @@ -934,6 +950,11 @@ export default class acclist extends React.Component { }}> 编辑 + { + [1,2,8].includes(rowData.status)||[2,6,8,7].includes(this.state.planStatus)?(复制):( + {this.onCopyRow(e, rowData)}}>复制 + ) + } 撤销审批