Commit c2f90aeb6d68b3a7fe619e87cf30ad67d49e0f18
1 parent
37b067c4
审核
Showing
1 changed file
with
49 additions
and
1 deletions
src/mes/common/commonOperationBarComponent/MesToolbar.js
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | import { message } from "antd"; | 2 | import { message } from "antd"; |
| 3 | import * as commonUtils from "@/utils/utils"; | 3 | import * as commonUtils from "@/utils/utils"; |
| 4 | import * as commonFunc from "@/components/Common/commonFunc"; | 4 | import * as commonFunc from "@/components/Common/commonFunc"; |
| 5 | -const ToolbarFun = (props) => { | 5 | +const ToolbarFun = async (props) => { |
| 6 | const { btnConfig, bMesBill } = props; | 6 | const { btnConfig, bMesBill } = props; |
| 7 | const currentMesPane = commonUtils.getAppData("currentMesPane"); | 7 | const currentMesPane = commonUtils.getAppData("currentMesPane"); |
| 8 | const { sModelType = '' } = currentMesPane; | 8 | const { sModelType = '' } = currentMesPane; |
| @@ -29,6 +29,54 @@ const ToolbarFun = (props) => { | @@ -29,6 +29,54 @@ const ToolbarFun = (props) => { | ||
| 29 | props.onCancel() | 29 | props.onCancel() |
| 30 | } else if (btnName === 'btndel') { | 30 | } else if (btnName === 'btndel') { |
| 31 | props.onDel(props) | 31 | props.onDel(props) |
| 32 | + } else if (btnName.includes('btnexamine')) { | ||
| 33 | + let flag = 0; | ||
| 34 | + console.log(props, 'asdasdadsww'); | ||
| 35 | + | ||
| 36 | + // let interfaceArr = config.interface; | ||
| 37 | + // if (commonUtils.isNotEmptyArr(interfaceArr)) { | ||
| 38 | + // const beforeInterfaceArr = interfaceArr.filter(item => item.sInterfaceCallMethod === "1"); | ||
| 39 | + // const afterInterfaceArr = interfaceArr.filter(item => item.sInterfaceCallMethod === "2"); | ||
| 40 | + // if (commonUtils.isNotEmptyArr(beforeInterfaceArr)) { | ||
| 41 | + // /* 之前调用 */ | ||
| 42 | + | ||
| 43 | + // const asyncFunc = async () => { | ||
| 44 | + // for (let i = 0; i < beforeInterfaceArr.length; i++) { | ||
| 45 | + // const data = await handleInterfaceCall(beforeInterfaceArr[i]); | ||
| 46 | + // if (!data) { | ||
| 47 | + // flag += 1; | ||
| 48 | + // return; | ||
| 49 | + // } | ||
| 50 | + // } | ||
| 51 | + // }; | ||
| 52 | + // await asyncFunc(); | ||
| 53 | + // } | ||
| 54 | + // let result; | ||
| 55 | + // if (flag == 0) { | ||
| 56 | + // result = await props.onBtnExamine(); | ||
| 57 | + // } else { | ||
| 58 | + // props.onSaveState({ | ||
| 59 | + // loading: false, | ||
| 60 | + // }); | ||
| 61 | + // } | ||
| 62 | + | ||
| 63 | + // if (commonUtils.isNotEmptyArr(afterInterfaceArr)) { | ||
| 64 | + // /* 之后调用 */ | ||
| 65 | + // // const result = await this.props.onBtnExamine(); | ||
| 66 | + // if (result) { | ||
| 67 | + // /* 只有审核成功 才能调用接口 -5代表审核失败 */ | ||
| 68 | + // const asyncFunc = async () => { | ||
| 69 | + // for (let i = 0; i < afterInterfaceArr.length; i++) { | ||
| 70 | + // await handleInterfaceCall(afterInterfaceArr[i], true); | ||
| 71 | + // } | ||
| 72 | + // }; | ||
| 73 | + // await asyncFunc(); | ||
| 74 | + | ||
| 75 | + // } | ||
| 76 | + // } | ||
| 77 | + // } else { | ||
| 78 | + // props.onBtnExamine(); | ||
| 79 | + // } | ||
| 32 | } | 80 | } |
| 33 | 81 | ||
| 34 | 82 |