diff --git a/src/pages/exchangecode/edit/edit.js b/src/pages/exchangecode/edit/edit.js index dd7d8022..11929c6c 100644 --- a/src/pages/exchangecode/edit/edit.js +++ b/src/pages/exchangecode/edit/edit.js @@ -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); diff --git a/src/pages/plan/key/list.js b/src/pages/plan/key/list.js index 72f0a088..4aa9125f 100644 --- a/src/pages/plan/key/list.js +++ b/src/pages/plan/key/list.js @@ -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:

该数据正在审批中,是否确认撤销审批?

, + 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 = + if(rowData.status == 6 || rowData.status == 7) + { + let str = 编辑 @@ -656,14 +682,14 @@ linkTo(row){ + } - - if(rowData.status == 2) + else if(rowData.status == 2) { - - 编辑 - this.onReCall(e,rowData)} >撤销审批): - 复制 + str = + {this.onEditRow(e,rowData)}}>编辑 + this.onReCall(e,rowData)} >撤销审批 + {this.onCopyRow(e,rowData)}}>复制 { keysIsSend(rowData.id).then((res)=>{ handelResponse(res,(req,msg)=>{ @@ -675,17 +701,21 @@ linkTo(row){ }) }}> -
更多
+
更多
+ + this.menuItemClick(e,key,rowData)} > + 发送密码及压缩包 + 日志 + 作废 + +
} - - - - + else{ str = @@ -719,8 +749,8 @@ linkTo(row){ - - return rowData.status == 7 || rowData.status == 6 ? str2 : str + } + return str } }} />