调整兑换码新增审批不选中
This commit is contained in:
parent
873108bab7
commit
47fa7a359d
|
@ -101,8 +101,7 @@ export default class exchangedit extends React.Component{
|
|||
if(req.new_product.length > 0)
|
||||
{
|
||||
|
||||
if(approval_status == 7)
|
||||
{
|
||||
|
||||
req.new_product = _.map(req.new_product,(item)=>{
|
||||
item.checked = false
|
||||
return item
|
||||
|
@ -110,7 +109,7 @@ export default class exchangedit extends React.Component{
|
|||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
codeInfo.range = codeInfo.range.concat(req.new_product);
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import Grid from "../../../components/gird/main.js"
|
|||
import TabPage from "../../../components/tabPage/main.js"
|
||||
import Filterbar from "../../../components/filterbar/main.js"
|
||||
import menu from "../../../assets/enum.js"
|
||||
import {getKeyList,handelResponse,planSend,startOrStopKeybatch,resKeyEmail,planResend,putKeyEmail,cancelKey,keysIsSend,getReseller,postKeyEmail} from "../../../assets/api.js"
|
||||
import {terminateApprovals,getKeyList,handelResponse,planSend,startOrStopKeybatch,resKeyEmail,planResend,putKeyEmail,cancelKey,keysIsSend,getReseller,postKeyEmail} from "../../../assets/api.js"
|
||||
import _ from "lodash";
|
||||
const Column = [
|
||||
{
|
||||
|
@ -556,6 +556,33 @@ linkTo(row){
|
|||
onEmailChange(e){
|
||||
this.setState({email_radio:e.target.value})
|
||||
}
|
||||
onReCall(e,rowData){
|
||||
|
||||
let self = this;
|
||||
let approval_id = rowData.approval_id
|
||||
Sweetalert.confirm({
|
||||
type:'warning',
|
||||
closeBtn:true,
|
||||
title:'确认操作',
|
||||
content: <p>该数据正在审批中,是否确认撤销审批?</p>,
|
||||
onConfirm:()=>{
|
||||
terminateApprovals(approval_id).then((res)=>{
|
||||
handelResponse(res,(req,msg)=>{
|
||||
Notify.success("撤销审批成功")
|
||||
setTimeout(()=>{
|
||||
this.getKeyList();
|
||||
},3000)
|
||||
|
||||
},(err)=>{
|
||||
Notify.error(err)
|
||||
})
|
||||
})
|
||||
},
|
||||
onCancel: this.onCancel,
|
||||
className:'questModal',
|
||||
parentComponent: this
|
||||
});
|
||||
}
|
||||
|
||||
render(){
|
||||
|
||||
|
@ -626,12 +653,11 @@ linkTo(row){
|
|||
if(com == "edit")
|
||||
{
|
||||
|
||||
let str=""
|
||||
|
||||
|
||||
|
||||
|
||||
let str = ""
|
||||
let str2 = <span>
|
||||
if(rowData.status == 6 || rowData.status == 7)
|
||||
{
|
||||
let str = <span>
|
||||
<a className="grid-link disabled" >编辑</a>
|
||||
|
||||
|
||||
|
@ -656,14 +682,14 @@ linkTo(row){
|
|||
</DropdownContent>
|
||||
</Dropdown>
|
||||
</span>
|
||||
}
|
||||
|
||||
|
||||
if(rowData.status == 2)
|
||||
else if(rowData.status == 2)
|
||||
{
|
||||
<span>
|
||||
<a className="grid-link disabled" >编辑</a>
|
||||
<span className="grid-link" onClick={(e)=>this.onReCall(e,rowData)} >撤销审批</span>):
|
||||
<a className="grid-link disabled" >复制</a>
|
||||
str = <span>
|
||||
<a className="grid-link" onClick={(e)=>{this.onEditRow(e,rowData)}}>编辑</a>
|
||||
<span className="grid-link" onClick={(e)=>this.onReCall(e,rowData)} >撤销审批</span>
|
||||
<a className="grid-link" onClick={(e)=>{this.onCopyRow(e,rowData)}}>复制</a>
|
||||
<Dropdown position={DropdownPosition.RightTop } onVisibleChange={(e)=>{
|
||||
keysIsSend(rowData.id).then((res)=>{
|
||||
handelResponse(res,(req,msg)=>{
|
||||
|
@ -675,17 +701,21 @@ linkTo(row){
|
|||
})
|
||||
}}>
|
||||
<DropdownClickTrigger>
|
||||
<div className="linkmore disabled"> 更多 <Icon type={"down"} /> </div>
|
||||
<div className="linkmore"> 更多 <Icon type={"down"} /> </div>
|
||||
</DropdownClickTrigger>
|
||||
<DropdownContent>
|
||||
<DropdownContent>
|
||||
<Menu onClick={(e,key)=>this.menuItemClick(e,key,rowData)} >
|
||||
<MenuItem key="1">发送密码及压缩包</MenuItem>
|
||||
<MenuItem key="2" disabled>日志</MenuItem>
|
||||
<MenuItem key="5" >作废</MenuItem>
|
||||
</Menu>
|
||||
</DropdownContent>
|
||||
</DropdownContent>
|
||||
</Dropdown>
|
||||
</span>
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
else{
|
||||
|
||||
|
||||
str = <span>
|
||||
|
@ -719,8 +749,8 @@ linkTo(row){
|
|||
</Dropdown>
|
||||
</span>
|
||||
|
||||
|
||||
return rowData.status == 7 || rowData.status == 6 ? str2 : str
|
||||
}
|
||||
return str
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue