|
@@ -14,6 +14,7 @@ import {
|
|
|
D3_APIcreate,
|
|
|
D3_APIdel,
|
|
|
D3_APIgetInfo,
|
|
|
+ D3_APIrevocation,
|
|
|
D3_APIsaveApply,
|
|
|
D3_APIsaveAudit,
|
|
|
D3_APIsaveCreate,
|
|
@@ -184,7 +185,7 @@ function C21edit() {
|
|
|
|
|
|
// 查看的按钮创建-提交-撤回
|
|
|
const lookBtnFu = useCallback(
|
|
|
- async (val: '创建' | '提交') => {
|
|
|
+ async (val: '创建' | '提交' | '撤回') => {
|
|
|
const rtf1 = ZRichTextRef.current?.fatherBtnOkFu() || { flag: true }
|
|
|
// console.log('申请信息富文本', JSON.stringify(rtf1.val || ''))
|
|
|
|
|
@@ -193,7 +194,12 @@ function C21edit() {
|
|
|
rtf: JSON.stringify(rtf1.val || '')
|
|
|
}
|
|
|
|
|
|
- const res = val === '创建' ? await D3_APIsaveCreate(obj) : await D3_APIsaveApply(obj)
|
|
|
+ const res =
|
|
|
+ val === '创建'
|
|
|
+ ? await D3_APIsaveCreate(obj)
|
|
|
+ : val === '提交'
|
|
|
+ ? await D3_APIsaveApply(obj)
|
|
|
+ : await D3_APIrevocation(id)
|
|
|
|
|
|
if (res.code === 0) {
|
|
|
if (sollrDom.current) sollrDom.current.scrollTop = 0
|
|
@@ -201,7 +207,7 @@ function C21edit() {
|
|
|
getInfoFu()
|
|
|
}
|
|
|
},
|
|
|
- [getInfoFu, topInfo]
|
|
|
+ [getInfoFu, id, topInfo]
|
|
|
)
|
|
|
|
|
|
// 查看模式点击删除
|
|
@@ -237,6 +243,18 @@ function C21edit() {
|
|
|
</Button>
|
|
|
) : null}
|
|
|
|
|
|
+ {btnFlagFu2(topInfo)['撤回'] ? (
|
|
|
+ <MyPopconfirm
|
|
|
+ txtK='撤回'
|
|
|
+ onConfirm={() => lookBtnFu('撤回')}
|
|
|
+ Dom={
|
|
|
+ <Button type='primary' danger>
|
|
|
+ 撤回
|
|
|
+ </Button>
|
|
|
+ }
|
|
|
+ />
|
|
|
+ ) : null}
|
|
|
+
|
|
|
{btnFlagFu2(topInfo)['审批'] ? (
|
|
|
<Button type='primary' onClick={() => lookJumpFu('审批')}>
|
|
|
审批
|