Merge branch 'exchangecode'
This commit is contained in:
commit
7fd1bf0a69
|
@ -21,3 +21,5 @@
|
||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
|
src/pages/exchangecode/contenttaggedwith/add.js
|
||||||
|
src/pages/exchangecode/contenttaggedwith/add.less
|
||||||
|
|
|
@ -77,18 +77,17 @@ export default class acclist extends React.Component{
|
||||||
|
|
||||||
componentDidMount(e){
|
componentDidMount(e){
|
||||||
let batch_id=sessionStorage.getItem("keybatch_id")
|
let batch_id=sessionStorage.getItem("keybatch_id")
|
||||||
|
let copyOpearo=sessionStorage.getItem("copyOpearo")
|
||||||
//编辑
|
//编辑
|
||||||
if(batch_id > 0)
|
if(batch_id > 0||copyOpearo==2)
|
||||||
{
|
{
|
||||||
this.setState({isEdit:true})
|
// this.setState({isEdit:true})
|
||||||
getKeyBatchDetail(batch_id).then((res)=>{
|
getKeyBatchDetail(batch_id).then((res)=>{
|
||||||
handelResponse(res,(req,msg)=>{
|
handelResponse(res,(req,msg)=>{
|
||||||
|
this.setState({pagetitle:"复制key"})
|
||||||
console.log("和编辑",req)
|
|
||||||
this.setState({pagetitle:"编辑key"})
|
|
||||||
let model = {
|
let model = {
|
||||||
batch_name:req.batch_name,
|
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,
|
||||||
|
@ -102,8 +101,8 @@ export default class acclist extends React.Component{
|
||||||
this.setState({begintime:req.begin_time})
|
this.setState({begintime:req.begin_time})
|
||||||
|
|
||||||
let list = _.map(req.code_batch,(item)=>{
|
let list = _.map(req.code_batch,(item)=>{
|
||||||
item.disabled = true;
|
// item.disabled = true;
|
||||||
item.checked = true;
|
// item.checked = true;
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
console.log(list)
|
console.log(list)
|
||||||
|
@ -895,7 +894,7 @@ export default class acclist extends React.Component{
|
||||||
|
|
||||||
<Card style={{ width:'98%',height:"auto" ,"margin":"10px auto"}} title={this.state.pagetitle}>
|
<Card style={{ width:'98%',height:"auto" ,"margin":"10px auto"}} title={this.state.pagetitle}>
|
||||||
<Form model={this.state.model} rules={rules} ref="form1">
|
<Form model={this.state.model} rules={rules} ref="form1">
|
||||||
<FormItem labelname=" key归属" prop="title" id="title">
|
<FormItem labelname=" key归属计划" prop="title" id="title">
|
||||||
<div className="line-value">{this.state.model.title}</div>
|
<div className="line-value">{this.state.model.title}</div>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem labelname="key批次名称" prop="batch_name" id="batch_name" >
|
<FormItem labelname="key批次名称" prop="batch_name" id="batch_name" >
|
||||||
|
@ -940,7 +939,7 @@ export default class acclist extends React.Component{
|
||||||
<Checkbox.Group value={this.state.checkedList} onChange={(e)=>{this.onCheckChange(e)}} disabled={this.state.isEdit} >
|
<Checkbox.Group value={this.state.checkedList} onChange={(e)=>{this.onCheckChange(e)}} disabled={this.state.isEdit} >
|
||||||
<Checkbox value={1}>兑换码</Checkbox>
|
<Checkbox value={1}>兑换码</Checkbox>
|
||||||
<Checkbox value={2} disabled>优惠券</Checkbox>
|
<Checkbox value={2} disabled>优惠券</Checkbox>
|
||||||
<Checkbox value={4} disabled>立减金</Checkbox>
|
{/* <Checkbox value={4} disabled>立减金</Checkbox> */}
|
||||||
</Checkbox.Group>
|
</Checkbox.Group>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
{
|
{
|
||||||
|
|
|
@ -767,7 +767,7 @@ export default class acclist extends React.Component{
|
||||||
<Checkbox.Group value={this.state.checkedList} onChange={(e)=>{this.onCheckChange(e)}}>
|
<Checkbox.Group value={this.state.checkedList} onChange={(e)=>{this.onCheckChange(e)}}>
|
||||||
<Checkbox value={1}>兑换码</Checkbox>
|
<Checkbox value={1}>兑换码</Checkbox>
|
||||||
<Checkbox value={2} disabled>优惠券</Checkbox>
|
<Checkbox value={2} disabled>优惠券</Checkbox>
|
||||||
<Checkbox value={4} disabled>立减金</Checkbox>
|
{/* <Checkbox value={4} disabled>立减金</Checkbox> */}
|
||||||
</Checkbox.Group>
|
</Checkbox.Group>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
{
|
{
|
||||||
|
|
|
@ -832,7 +832,7 @@ export default class acclist extends React.Component{
|
||||||
|
|
||||||
<Card style={{ width:'98%',height:"auto" ,"margin":"10px auto"}} title={this.state.pagetitle}>
|
<Card style={{ width:'98%',height:"auto" ,"margin":"10px auto"}} title={this.state.pagetitle}>
|
||||||
<Form model={this.state.model} rules={rules} ref="form1">
|
<Form model={this.state.model} rules={rules} ref="form1">
|
||||||
<FormItem labelname=" key归属" prop="plan_title" id="plan_title">
|
<FormItem labelname=" key归属计划" prop="plan_title" id="plan_title">
|
||||||
<div className="line-value">{this.state.model.plan_title}</div>
|
<div className="line-value">{this.state.model.plan_title}</div>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
|
@ -867,7 +867,7 @@ export default class acclist extends React.Component{
|
||||||
<Checkbox.Group value={this.state.checkedList} onChange={(e)=>{this.onCheckChange(e)}} disabled={this.state.isEdit} >
|
<Checkbox.Group value={this.state.checkedList} onChange={(e)=>{this.onCheckChange(e)}} disabled={this.state.isEdit} >
|
||||||
<Checkbox value={1}>兑换码</Checkbox>
|
<Checkbox value={1}>兑换码</Checkbox>
|
||||||
<Checkbox value={2} disabled>优惠券</Checkbox>
|
<Checkbox value={2} disabled>优惠券</Checkbox>
|
||||||
<Checkbox value={4} disabled>立减金</Checkbox>
|
{/* <Checkbox value={4} disabled>立减金</Checkbox> */}
|
||||||
</Checkbox.Group>
|
</Checkbox.Group>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
{
|
{
|
||||||
|
|
|
@ -46,7 +46,7 @@ const Column = [
|
||||||
name: 'plan',
|
name: 'plan',
|
||||||
type: "slot",
|
type: "slot",
|
||||||
prop:'edit',
|
prop:'edit',
|
||||||
width:'90px'
|
width:'120px'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '状态',
|
||||||
|
@ -266,7 +266,7 @@ export default class acclist extends React.Component{
|
||||||
}
|
}
|
||||||
]}]
|
]}]
|
||||||
sessionStorage.setItem("keybatch_id","")
|
sessionStorage.setItem("keybatch_id","")
|
||||||
|
sessionStorage.setItem("copyOpearo",0)
|
||||||
sessionStorage.setItem('breakchangenav',JSON.stringify(activerou));
|
sessionStorage.setItem('breakchangenav',JSON.stringify(activerou));
|
||||||
}
|
}
|
||||||
aboutFn(e,row){
|
aboutFn(e,row){
|
||||||
|
@ -283,7 +283,25 @@ export default class acclist extends React.Component{
|
||||||
}
|
}
|
||||||
]}]
|
]}]
|
||||||
sessionStorage.setItem('breaknav',JSON.stringify(activerou));
|
sessionStorage.setItem('breaknav',JSON.stringify(activerou));
|
||||||
}
|
}
|
||||||
|
//复制
|
||||||
|
onCopyRow(status,row){
|
||||||
|
this.props.history.push('/home/exchangecode-add');
|
||||||
|
sessionStorage.setItem('pathname2','/home/exchangecode-add')
|
||||||
|
let activerou=[{pagetitle:'复制',items:[
|
||||||
|
{
|
||||||
|
"path": "/home/exchangecode-list",
|
||||||
|
"name": "key列表管理"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/home/exchangecode-add",
|
||||||
|
"name": "复制key"
|
||||||
|
}
|
||||||
|
]}]
|
||||||
|
sessionStorage.setItem("keybatch_id",row.id)
|
||||||
|
sessionStorage.setItem("copyOpearo",1)
|
||||||
|
sessionStorage.setItem('breakchangenav',JSON.stringify(activerou));
|
||||||
|
}
|
||||||
//page
|
//page
|
||||||
pageChange(e){
|
pageChange(e){
|
||||||
this.setState({page:e});
|
this.setState({page:e});
|
||||||
|
@ -397,6 +415,7 @@ onEditRow(status,row){
|
||||||
sessionStorage.setItem("keybatch_id",row.id)
|
sessionStorage.setItem("keybatch_id",row.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//敲回车查询
|
//敲回车查询
|
||||||
iptsureFn(){
|
iptsureFn(){
|
||||||
this.setState({page:1})
|
this.setState({page:1})
|
||||||
|
@ -621,6 +640,7 @@ linkTo(row){
|
||||||
|
|
||||||
str = <span>
|
str = <span>
|
||||||
<a className="grid-link" onClick={(e)=>{this.onEditRow(e,rowData)}} >编辑</a>
|
<a className="grid-link" onClick={(e)=>{this.onEditRow(e,rowData)}} >编辑</a>
|
||||||
|
<a className="grid-link" onClick={(e)=>{this.onCopyRow(e,rowData)}} >复制</a>
|
||||||
<Dropdown position={DropdownPosition.RightTop } onVisibleChange={(e)=>{
|
<Dropdown position={DropdownPosition.RightTop } onVisibleChange={(e)=>{
|
||||||
|
|
||||||
keysIsSend(rowData.id).then((res)=>{
|
keysIsSend(rowData.id).then((res)=>{
|
||||||
|
|
Loading…
Reference in New Issue