兑换码管理增加 创建中 审批中 审批驳回三种状态

This commit is contained in:
姜棚 2022-01-06 11:14:56 +08:00
parent 360f15f7c4
commit ce1c2cbf42
9 changed files with 54 additions and 35 deletions

View File

@ -62,8 +62,11 @@ import classNames from 'classnames'
this.setState({'errshow':false});
}
}
componentWillMount(){
componentDidMount(){
let val=this.props.value?this.props.value:'';
console.log("当前的值",val)
if(val!=''){
this.setState({iptVal:val});
this.setState({'iptVallength':String(val).length});

View File

@ -12,6 +12,7 @@ import classnames from 'classnames'
this.state = {
activeIndex:0,
tabList:props.tabs,
width: props.width ? props.width : 220,
}
}
@ -53,7 +54,7 @@ import classnames from 'classnames'
{
this.state.tabList.map((item, index) => {
return(
<div className={item.className} onClick={()=>{this.tabChange(index)}} key={index}>
<div className={item.className} style={{width:this.state.width}} onClick={()=>{this.tabChange(index)}} key={index}>
<div className="tabbar-title"> {item.title} </div>
</div>
)

View File

@ -88,6 +88,19 @@ export default class acclist extends React.Component{
getKeyBatchDetail(batch_id).then((res)=>{
handelResponse(res,(req,msg)=>{
this.setState({pagetitle:"复制key"})
console.log("key批次详情",req)
getReseller(req.reseller_id).then((res)=>{
handelResponse(res,(req,msg)=>{
this.setState({reseller:req})
this.setState({phone_list:req.contact_phone})
this.setState({email_list:req.contact_email})
})
})
let model = {
title:req.plan_title,
batch_name:'',
@ -472,6 +485,9 @@ export default class acclist extends React.Component{
data.allow_loss = this.state.model.allow_loss;
data.merge_stock = this.state.model.merge_stock;
data.code_batch = this.refs.bindObj.getSelectData();
console.log("分销商")
console.log(this.state.reseller)
data.reseller_id=this.state.reseller.id
data.reseller_name=this.state.reseller.name
@ -1113,7 +1129,7 @@ export default class acclist extends React.Component{
}
if(com=="quantity")
{
return <Input width={140} placeholder="请输入数量" type="number" value={rowData.quantity} onChange={(e)=>{this.onQuantityChange(e,rowData,rowIndex)}} />
return <Input width={140} placeholder="请输入数量" value={rowData.quantity} onChange={(e)=>{this.onQuantityChange(e,rowData,rowIndex)}} />
}
if(com =="contract_price" )
{
@ -1198,7 +1214,7 @@ export default class acclist extends React.Component{
</div>
<div className="audit-btn-group">
<Button onClick={(e)=>{this.onReturn(e)}}>取消</Button>
<Button onClick={(e)=>{this.setState({audit_visible:false})}}>取消</Button>
<Button type="primary" onClick={(e)=>{this.onAudit(e)}} >确定</Button>
</div>
</div>

View File

@ -898,7 +898,7 @@ export default class exchangedit extends React.Component{
}
if(com=="quantity")
{
return <Input width={100} placeholder="请输入数量" type="number" value={rowData.quantity} onChange={(e)=>{this.onQuantityChange(e,rowData)}} />
return <Input width={100} placeholder="请输入数量" value={rowData.quantity} onChange={(e)=>{this.onQuantityChange(e,rowData)}} />
}
if(com =="contract_price" )
{

View File

@ -117,7 +117,7 @@ export default class acclist extends React.Component{
total:0,
page:1,
limit:10,
tabList:[{title:"全部",index:0},{title:"未开始",index:3},{title:"进行中",index:1},{title:"暂停中",index:2},{title:"已完结",index:4},{title:"已作废",index:5}],
tabList:[{title:"全部",index:0},{title:"未开始",index:3},{title:"进行中",index:1},{title:"暂停中",index:2},{title:"已完结",index:4},{title:"已作废",index:5},{title:"创建中",index:-1},{title:"审核中",index:6},{title:"审核驳回",index:7}],
combinedValue:[],
DateTime:'',//数据更新时间
key_word:'',
@ -354,7 +354,7 @@ componentDidUpdate(prevProps,prevState){
const { current, pageSize } = this.state;
return(
<div id="exchangecodelist">
<TabPage slot={date} tabs={this.state.tabList} tabChange={this.tabFn.bind(this)}>
<TabPage slot={date} tabs={this.state.tabList} tabChange={this.tabFn.bind(this)} width={150}>
<p className="codetable dflexajce">
{/* <Button type="primary" icon="plus" onClick={this.clickFn.bind(this)}>新建兑换码</Button> */}
{/* <Button type="info">批量操作</Button> */}

View File

@ -34,7 +34,8 @@ export default class add extends React.Component{
step1:null,
paytype:3,
reseller:"",
payment_direction:["对私账户","对公账户","预付款扣除"]
payment_direction:["对私账户","对公账户","预付款扣除"],
isload:false,
}
}
@ -97,9 +98,9 @@ export default class add extends React.Component{
{
if( await this.refs.step1.submit() == true)
{
this.setState({isload:true})
this.setState({curstep:2})
}
else{
return;
@ -207,6 +208,7 @@ export default class add extends React.Component{
let step = "step2-" + this.state.keys.length
this.state.keys.push(step)
this.setState({keys:this.state.keys})
this.setState({isload:true})
console.log(this.state.keys)
}
@ -338,7 +340,7 @@ export default class add extends React.Component{
}>
<Step2 ref={item} addNewkey ={()=>{this.addNewkey()}} />
<Step2 ref={item} addNewkey ={()=>{this.addNewkey()}} isload={this.state.isload} />
</Card>
) : null
})

View File

@ -42,8 +42,8 @@ export default class add extends React.Component{
payment_direction:["对私账户","对公账户","预付款扣除"],
approvalLoading:false,
timer:3,
theme_options:[]
theme_options:[],
isload:false,
}
}
@ -197,7 +197,7 @@ export default class add extends React.Component{
{
if( await this.refs.step1.submit() == true)
{
this.setState({isload:true})
this.setState({curstep:2})
}
@ -326,6 +326,7 @@ export default class add extends React.Component{
let step = "step2-" + this.state.keys.length
this.state.keys.push(step)
this.setState({keys:this.state.keys})
this.setState({isload:true})
}
onPhoneChange(e){
@ -548,7 +549,7 @@ export default class add extends React.Component{
}>
<Step2 ref={"step2-"+ index} addNewkey ={()=>{this.addNewkey()}} data={item} disabled={this.state.disabled} />
<Step2 ref={"step2-"+ index} addNewkey ={()=>{this.addNewkey()}} isload={this.state.isload} data={item} disabled={this.state.disabled} />
</Card>
) : null
})

View File

@ -55,7 +55,7 @@ export default class acclist extends React.Component{
oldData:null,
uploading:false,
rowIndex:-1,
isload:props.isload ? props.isload : false,
}
}
@ -68,7 +68,6 @@ export default class acclist extends React.Component{
input.focus();
}
submit(){
@ -217,15 +216,7 @@ export default class acclist extends React.Component{
{
let productlist = _.filter(this.state.tempdata,(item)=>{return item.checked == true})
let sum = 0;
console.log(this.state.rank)
_.forEach(productlist,(o)=>{
sum += parseInt( o.quantity);
@ -306,6 +297,7 @@ export default class acclist extends React.Component{
}
addNewKey(){
this.props.addNewkey()
}
onRestrict(e,rowdata,index){
@ -385,6 +377,7 @@ export default class acclist extends React.Component{
})
this.setState({distdata: temp})
this.setState({isload:true})
}
@ -436,11 +429,7 @@ export default class acclist extends React.Component{
onNameChange(){
}
onUploadError = (type, data) => {
if (type === 'overMaxAmount') {
Notify.error(`最多可上传 ${data.maxAmount} 张图片`);
@ -725,6 +714,9 @@ export default class acclist extends React.Component{
</FormItem>
{
this.state.isload ? (
<FormItem labelname="key批次名称" prop="batch_name" id="batch_name" >
<Ipt onChange={(e)=>{
let model2 = this.state.model;
@ -741,9 +733,12 @@ export default class acclist extends React.Component{
value={this.state.model.batch_name} placeholder={"请输入"} labelWidth={'0px'} maxLength={12} height={'36px'} width={'400px'} alignment={'left'}/>
</FormItem>
</FormItem>) : null
}
{
this.state.isload ? (
<FormItem labelname="key数量" prop="quantity" id="quantity" >
<Ipt onChange={(e)=>{
let model2 = this.state.model;
@ -761,8 +756,9 @@ export default class acclist extends React.Component{
value={this.state.model.quantity} placeholder={"请输入"} labelWidth={'0px'} maxLength={5} height={'36px'} width={'400px'} alignment={'left'}/>
</FormItem>
) :null
}
<FormItem labelname="绑定类型" prop="bind_object" id="bind_object" >
<Checkbox.Group value={this.state.checkedList} onChange={(e)=>{this.onCheckChange(e)}}>
<Checkbox value={1}>兑换码</Checkbox>
@ -960,7 +956,7 @@ export default class acclist extends React.Component{
}
if(com=="quantity")
{
return <Input width={100} placeholder="请输入数量" type="number" value={rowData.quantity} onChange={(e)=>{this.onQuantityChange(e,rowData,rowIndex)}} />
return <Input width={100} placeholder="请输入数量" value={rowData.quantity} onChange={(e)=>{this.onQuantityChange(e,rowData,rowIndex)}} />
}
if(com =="contract_price" )
{

View File

@ -1222,7 +1222,7 @@ export default class acclist extends React.Component{
}
if(com=="quantity")
{
return <Input width={100} placeholder="请输入数量" type="number" value={rowData.quantity} onChange={(e)=>{this.onQuantityChange(e,rowData,rowIndex)}} />
return <Input width={100} placeholder="请输入数量" value={rowData.quantity} onChange={(e)=>{this.onQuantityChange(e,rowData,rowIndex)}} />
}
if(com =="contract_price" )
{