Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
admin
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
华润手术跟台
admin
Commits
1045aa75
提交
1045aa75
authored
2月 03, 2023
作者:
leon
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
手术订单审核
上级
ba5f3dd7
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
81 行增加
和
13 行删除
+81
-13
operationOrderApi.ts
src/api/order/operationOrderApi.ts
+6
-0
index.vue
src/views/order/operation-order/index.vue
+46
-13
schema.ts
src/views/order/operation-order/schema.ts
+29
-0
没有找到文件。
src/api/order/operationOrderApi.ts
浏览文件 @
1045aa75
...
@@ -10,6 +10,7 @@ import {
...
@@ -10,6 +10,7 @@ import {
OperationOrderParams
,
OperationOrderParams
,
OperationOrderPageResult
,
OperationOrderPageResult
,
}
from
'../model/operationOrder'
;
}
from
'../model/operationOrder'
;
import
{
User
}
from
'/@/api/model/user'
;
const
baseApi
=
'/v1/order/operation-order'
;
const
baseApi
=
'/v1/order/operation-order'
;
/**
/**
...
@@ -68,3 +69,8 @@ export const batchUpdate = (entityList: Array<OperationOrder>) => defHttp.post<b
...
@@ -68,3 +69,8 @@ export const batchUpdate = (entityList: Array<OperationOrder>) => defHttp.post<b
export
const
count
=
(
params
?:
OperationOrderParams
)
=>
defHttp
.
get
<
Number
>
({
url
:
`
${
baseApi
}
/count`
,
params
});
export
const
count
=
(
params
?:
OperationOrderParams
)
=>
defHttp
.
get
<
Number
>
({
url
:
`
${
baseApi
}
/count`
,
params
});
/**
* 审核
*/
export
const
batchVerify
=
(
data
:
any
)
=>
defHttp
.
post
<
User
>
({
url
:
`
${
baseApi
}
/verify`
,
data
});
src/views/order/operation-order/index.vue
浏览文件 @
1045aa75
...
@@ -34,28 +34,48 @@
...
@@ -34,28 +34,48 @@
<
template
v-if=
"column.dataIndex === 'action'"
>
<
template
v-if=
"column.dataIndex === 'action'"
>
<TableAction
<TableAction
:actions=
"[
:actions=
"[
{
//
{
tooltip: '编辑',
//
tooltip: '编辑',
icon: 'clarity:note-edit-line',
//
icon: 'clarity:note-edit-line',
onClick: handleEdit.bind(null, record),
//
onClick: handleEdit.bind(null, record),
ifShow: hasPermission('AUTH_ORDER_OPERATION_ORDER:EDIT'),
//
ifShow: hasPermission('AUTH_ORDER_OPERATION_ORDER:EDIT'),
},
//
},
{
{
tooltip: '详情',
tooltip: '详情',
icon: 'ant-design:eye-outlined',
icon: 'ant-design:eye-outlined',
onClick: handleView.bind(null, record),
onClick: handleView.bind(null, record),
ifShow: hasPermission('AUTH_ORDER_OPERATION_ORDER:QUERY'),
ifShow: hasPermission('AUTH_ORDER_OPERATION_ORDER:QUERY'),
},
},
//待审核 才能 通过
{
label: record.status === StatusValEnum.FORBIDDEN ? '启用' : '通过',
color: 'success',
popConfirm: {
title: '是否确认通过',
confirm: handleVerify.bind(null, record, StatusValEnum.PASSED),
},
ifShow: isShowHandlePassed(record.status),
},
//待审核 才能 拒绝
{
{
tooltip: '删除',
label: '拒绝',
icon: 'ant-design:delete-outlined',
color: 'error',
color: 'error',
popConfirm: {
popConfirm: {
title: '是否确认
删除
',
title: '是否确认
拒绝
',
confirm: handle
Delete.bind(null, record
),
confirm: handle
Verify.bind(null, record, StatusValEnum.REJECT
),
},
},
ifShow:
hasPermission('AUTH_ORDER_OPERATION_ORDER:DELETE'
),
ifShow:
isShowHandleReject(record.status
),
},
},
// {
// tooltip: '删除',
// icon: 'ant-design:delete-outlined',
// color: 'error',
// popConfirm: {
// title: '是否确认删除',
// confirm: handleDelete.bind(null, record),
// },
// ifShow: hasPermission('AUTH_ORDER_OPERATION_ORDER:DELETE'),
// },
]"
]"
/>
/>
</
template
>
</
template
>
...
@@ -75,8 +95,10 @@
...
@@ -75,8 +95,10 @@
import
{
useDrawer
}
from
'/@/components/Drawer'
;
import
{
useDrawer
}
from
'/@/components/Drawer'
;
import
componentSetting
from
'/@/settings/componentSetting'
;
import
componentSetting
from
'/@/settings/componentSetting'
;
import
OperationOrderDrawer
from
'./drawer.vue'
;
import
OperationOrderDrawer
from
'./drawer.vue'
;
import
{
columns
,
searchFormSchema
}
from
'./schema'
;
import
{
getVerifyParams
,
columns
,
searchFormSchema
,
StatusValEnum
,
isShowHandlePassed
,
isShowHandleReject
}
from
'./schema'
;
import
{
useUserStore
}
from
'/@/store/modules/user'
;
import
{
useUserStore
}
from
'/@/store/modules/user'
;
import
*
as
UserApi
from
'/@/api/system/userApi'
;
import
{
batchVerify
}
from
'/@/api/order/operationOrderApi'
;
const
userStore
=
useUserStore
();
const
userStore
=
useUserStore
();
const
{
hasPermission
}
=
usePermission
();
const
{
hasPermission
}
=
usePermission
();
const
go
=
useGo
();
const
go
=
useGo
();
...
@@ -110,7 +132,7 @@
...
@@ -110,7 +132,7 @@
canResize
:
false
,
canResize
:
false
,
rowKey
:
(
record
:
any
)
=>
record
.
id
,
rowKey
:
(
record
:
any
)
=>
record
.
id
,
actionColumn
:
{
actionColumn
:
{
width
:
12
0
,
width
:
20
0
,
title
:
'操作'
,
title
:
'操作'
,
dataIndex
:
'action'
,
dataIndex
:
'action'
,
fixed
:
'right'
,
fixed
:
'right'
,
...
@@ -180,6 +202,17 @@
...
@@ -180,6 +202,17 @@
});
});
};
};
const
handleVerify
=
(
record
:
Recordable
,
status
:
string
)
=>
{
setLoading
(
true
);
OperationOrderApi
.
batchVerify
(
getVerifyParams
(
record
,
status
))
.
then
((
_
)
=>
{
reload
();
})
.
catch
(()
=>
{
setLoading
(
false
);
});
};
const
handleSuccess
=
()
=>
{
const
handleSuccess
=
()
=>
{
reload
();
reload
();
};
};
...
...
src/views/order/operation-order/schema.ts
浏览文件 @
1045aa75
...
@@ -17,6 +17,8 @@ import {
...
@@ -17,6 +17,8 @@ import {
getReceiverId
,
getReceiverId
,
}
from
'/@/commonSchemaProperty'
;
}
from
'/@/commonSchemaProperty'
;
import
{
logisticsEnumOptions
}
from
'/@/views/order/enum'
;
import
{
logisticsEnumOptions
}
from
'/@/views/order/enum'
;
import
{
usePermission
}
from
'/@/hooks/web/usePermission'
;
import
{
BatchVerifyParams
}
from
'/@/views/system/user/schema'
;
export
enum
YesNoEnum
{
export
enum
YesNoEnum
{
YES
=
'是'
,
YES
=
'是'
,
...
@@ -35,6 +37,21 @@ export enum StatusEnum {
...
@@ -35,6 +37,21 @@ export enum StatusEnum {
REJECT
=
'拒绝'
,
REJECT
=
'拒绝'
,
FORBIDDEN
=
'禁用'
,
FORBIDDEN
=
'禁用'
,
}
}
export
enum
StatusValEnum
{
PENDING_REVIEW
=
'PENDING_REVIEW'
,
PASSED
=
'PASSED'
,
REJECT
=
'REJECT'
,
FORBIDDEN
=
'FORBIDDEN'
}
const
{
hasPermission
}
=
usePermission
();
export
const
isShowHandlePassed
=
(
status
:
string
):
boolean
=>
{
return
(
(
hasPermission
(
'AUTH_ORDER_OPERATION_ORDER:PASSED'
)
&&
status
===
'PENDING_REVIEW'
)
||
status
===
StatusValEnum
.
FORBIDDEN
);
};
export
const
isShowHandleReject
=
(
status
:
string
):
boolean
=>
{
return
hasPermission
(
'AUTH_ORDER_OPERATION_ORDER:REJECT'
)
&&
status
===
StatusValEnum
.
PENDING_REVIEW
;
};
export
const
StatusEnumOptions
:
any
[]
=
[];
export
const
StatusEnumOptions
:
any
[]
=
[];
for
(
const
key
in
StatusEnum
)
{
for
(
const
key
in
StatusEnum
)
{
StatusEnumOptions
.
push
({
StatusEnumOptions
.
push
({
...
@@ -42,6 +59,18 @@ for (const key in StatusEnum) {
...
@@ -42,6 +59,18 @@ for (const key in StatusEnum) {
label
:
StatusEnum
[
key
],
label
:
StatusEnum
[
key
],
});
});
}
}
/**
* @description: 返回审核所需参数
* @param record
* @param status
*/
export
const
getVerifyParams
=
(
record
:
Recordable
,
status
:
string
):
BatchVerifyParams
=>
{
const
params
:
BatchVerifyParams
=
{
idList
:
[
record
.
id
],
status
,
};
return
params
;
};
const
colProps
=
{
xs
:
{
span
:
24
},
sm
:
{
span
:
24
},
lg
:
{
span
:
8
}
};
const
colProps
=
{
xs
:
{
span
:
24
},
sm
:
{
span
:
24
},
lg
:
{
span
:
8
}
};
const
colPropsInDrawer
=
{
span
:
24
};
const
colPropsInDrawer
=
{
span
:
24
};
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论