From 47fa7a359d56ef14747753d1f3c60d5c3e2f814f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E6=A3=9A?= <849005670@qq.com> Date: Fri, 7 Jan 2022 11:41:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=85=91=E6=8D=A2=E7=A0=81?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AE=A1=E6=89=B9=E4=B8=8D=E9=80=89=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/exchangecode/edit/edit.js | 5 +-- src/pages/plan/key/list.js | 68 +++++++++++++++++++++-------- 2 files changed, 51 insertions(+), 22 deletions(-) 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)}}>复制