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
331b6c56
authored
Jan 27, 2024
by
puhui999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CRM-合同:完善合同表单
parent
ed94205f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
src/api/crm/contract/index.ts
+1
-2
src/views/crm/contract/ContractForm.vue
+7
-4
No files found.
src/api/crm/contract/index.ts
View file @
331b6c56
...
...
@@ -15,11 +15,10 @@ export interface ContractVO {
price
:
number
discountPercent
:
number
productPrice
:
number
roUserIds
:
string
rwUserIds
:
string
contactId
:
number
signUserId
:
number
contactLastTime
:
Date
status
:
number
remark
:
string
productItems
:
ProductExpandVO
[]
}
...
...
src/views/crm/contract/ContractForm.vue
View file @
331b6c56
...
...
@@ -5,7 +5,7 @@
v-loading=
"formLoading"
:model=
"formData"
:rules=
"formRules"
label-width=
"1
0
0px"
label-width=
"1
1
0px"
>
<el-row>
<el-col
:span=
"24"
class=
"mb-10px"
>
...
...
@@ -152,7 +152,8 @@
</el-row>
</el-form>
<template
#
footer
>
<el-button
:disabled=
"formLoading"
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
:disabled=
"formLoading"
type=
"primary"
@
click=
"submitForm(1)"
>
提交审核
</el-button>
<el-button
:disabled=
"formLoading"
type=
"primary"
@
click=
"submitForm(2)"
>
保存草稿
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
</
template
>
</Dialog>
...
...
@@ -164,6 +165,7 @@ import * as UserApi from '@/api/system/user'
import
*
as
ContactApi
from
'@/api/crm/contact'
import
*
as
BusinessApi
from
'@/api/crm/business'
import
ProductList
from
'./components/ProductList.vue'
import
{
cloneDeep
}
from
'lodash-es'
const
{
t
}
=
useI18n
()
// 国际化
const
message
=
useMessage
()
// 消息弹窗
...
...
@@ -217,7 +219,7 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
/** 提交表单 */
const
emit
=
defineEmits
([
'success'
])
// 定义 success 事件,用于操作成功后的回调
const
submitForm
=
async
()
=>
{
const
submitForm
=
async
(
status
:
number
)
=>
{
// 校验表单
if
(
!
formRef
)
return
const
valid
=
await
formRef
.
value
.
validate
()
...
...
@@ -225,7 +227,8 @@ const submitForm = async () => {
// 提交请求
formLoading
.
value
=
true
try
{
const
data
=
formData
.
value
as
unknown
as
ContractApi
.
ContractVO
const
data
=
cloneDeep
(
unref
(
formData
.
value
))
as
unknown
as
ContractApi
.
ContractVO
data
.
status
=
status
if
(
formType
.
value
===
'create'
)
{
await
ContractApi
.
createContract
(
data
)
message
.
success
(
t
(
'common.createSuccess'
))
...
...
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