Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
fcfec653
authored
Oct 22, 2025
by
Jony.L
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
算力资源订单管理 隐藏无用的搜索栏、调整字段、开票功能
parent
c43550c0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
96 additions
and
0 deletions
+96
-0
src/api/compute/resourceorder/index.ts
+6
-0
src/views/compute/resourceorder/form/ResourceOrderIssueInvoiceForm.vue
+90
-0
src/views/compute/resourceorder/index.vue
+0
-0
No files found.
src/api/compute/resourceorder/index.ts
View file @
fcfec653
...
@@ -60,5 +60,10 @@ export const ResourceOrderApi = {
...
@@ -60,5 +60,10 @@ export const ResourceOrderApi = {
// 导出算力资源订单 Excel
// 导出算力资源订单 Excel
exportResourceOrder
:
async
(
params
)
=>
{
exportResourceOrder
:
async
(
params
)
=>
{
return
await
request
.
download
({
url
:
`/compute/resource-order/export-excel`
,
params
})
return
await
request
.
download
({
url
:
`/compute/resource-order/export-excel`
,
params
})
},
// 开具发票
issueInvoice
:
async
(
data
:
any
)
=>
{
return
await
request
.
put
({
url
:
`/compute/resource-order/issue-invoice`
,
data
})
}
}
}
}
\ No newline at end of file
src/views/compute/resourceorder/form/ResourceOrderIssueInvoiceForm.vue
0 → 100644
View file @
fcfec653
<
template
>
<Dialog
v-model=
"dialogVisible"
title=
"上传发票"
width=
"45%"
>
<el-form
ref=
"formRef"
:model=
"formData"
label-width=
"100px"
>
<el-form-item
label=
"发票地址"
prop=
"invoiceUrl"
>
<UploadFile
v-model=
"formData.invoiceUrl"
:file-type=
"['pdf']"
:limit=
"1"
/>
<p
class=
"upload-tips"
>
请上传 大小不超过
<span
class=
"red-text"
>
5MB
</span>
格式为
<span
class=
"red-text"
>
pdf
</span>
的文件
</p>
</el-form-item>
</el-form>
<template
#
footer
>
<el-button
:disabled=
"formLoading"
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
</
template
>
</Dialog>
</template>
<
script
setup
lang=
"ts"
>
import
{
ResourceOrderApi
}
from
"@/api/compute/resourceorder"
;
import
{
UploadFile
}
from
'@/components/UploadFile'
;
const
{
t
}
=
useI18n
()
// 国际化
const
message
=
useMessage
()
// 消息弹窗
const
dialogVisible
=
ref
(
false
)
// 弹窗是否展示
const
formRef
=
ref
()
// 表单 Ref
const
formLoading
=
ref
(
false
)
// 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
/** 提交表单 */
const
emit
=
defineEmits
([
'success'
])
// 定义 success 事件,用于操作成功后的回调
const
submitForm
=
async
()
=>
{
// 提交请求
formLoading
.
value
=
true
try
{
const
data
=
unref
(
formData
)
await
ResourceOrderApi
.
issueInvoice
(
data
)
message
.
success
(
t
(
'common.updateSuccess'
))
dialogVisible
.
value
=
false
// 发送操作成功的事件
emit
(
'success'
,
true
)
}
catch
(
error
)
{
console
.
error
(
error
);
}
finally
{
formLoading
.
value
=
false
}
}
const
formData
=
ref
({
id
:
undefined
,
// 订单编号
invoiceStatus
:
undefined
,
invoiceUrl
:
''
})
const
open
=
async
(
row
:
any
)
=>
{
resetForm
()
// 设置数据
formData
.
value
.
id
=
row
.
id
formData
.
value
.
invoiceStatus
=
row
.
invoiceStatus
formData
.
value
.
invoiceUrl
=
row
.
invoiceUrl
dialogVisible
.
value
=
true
}
defineExpose
({
open
})
// 提供 open 方法,用于打开弹窗
/** 重置表单 */
const
resetForm
=
()
=>
{
formData
.
value
=
{
id
:
undefined
,
// 订单编号
invoiceStatus
:
undefined
,
invoiceUrl
:
''
}
formRef
.
value
?.
resetFields
()
}
</
script
>
<
style
scoped
lang=
"scss"
>
.red-text
{
color
:
red
;
}
.upload-tips
{
font-size
:
12px
;
color
:
#666
;
margin-top
:
5px
;
}
</
style
>
\ No newline at end of file
src/views/compute/resourceorder/index.vue
View file @
fcfec653
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment