File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,10 @@ export interface ContractVO {
15
15
price : number
16
16
discountPercent : number
17
17
productPrice : number
18
- roUserIds : string
19
- rwUserIds : string
20
18
contactId : number
21
19
signUserId : number
22
20
contactLastTime : Date
21
+ status : number
23
22
remark : string
24
23
productItems : ProductExpandVO [ ]
25
24
}
Original file line number Diff line number Diff line change 5
5
v-loading =" formLoading"
6
6
:model =" formData"
7
7
:rules =" formRules"
8
- label-width =" 100px "
8
+ label-width =" 110px "
9
9
>
10
10
<el-row >
11
11
<el-col :span =" 24" class =" mb-10px" >
152
152
</el-row >
153
153
</el-form >
154
154
<template #footer >
155
- <el-button :disabled =" formLoading" type =" primary" @click =" submitForm" >确 定</el-button >
155
+ <el-button :disabled =" formLoading" type =" primary" @click =" submitForm(1)" >提交审核</el-button >
156
+ <el-button :disabled =" formLoading" type =" primary" @click =" submitForm(2)" >保存草稿</el-button >
156
157
<el-button @click =" dialogVisible = false" >取 消</el-button >
157
158
</template >
158
159
</Dialog >
@@ -164,6 +165,7 @@ import * as UserApi from '@/api/system/user'
164
165
import * as ContactApi from ' @/api/crm/contact'
165
166
import * as BusinessApi from ' @/api/crm/business'
166
167
import ProductList from ' ./components/ProductList.vue'
168
+ import { cloneDeep } from ' lodash-es'
167
169
168
170
const { t } = useI18n () // 国际化
169
171
const message = useMessage () // 消息弹窗
@@ -217,15 +219,16 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
217
219
218
220
/** 提交表单 */
219
221
const emit = defineEmits ([' success' ]) // 定义 success 事件,用于操作成功后的回调
220
- const submitForm = async () => {
222
+ const submitForm = async (status : number ) => {
221
223
// 校验表单
222
224
if (! formRef ) return
223
225
const valid = await formRef .value .validate ()
224
226
if (! valid ) return
225
227
// 提交请求
226
228
formLoading .value = true
227
229
try {
228
- const data = formData .value as unknown as ContractApi .ContractVO
230
+ const data = cloneDeep (unref (formData .value )) as unknown as ContractApi .ContractVO
231
+ data .status = status
229
232
if (formType .value === ' create' ) {
230
233
await ContractApi .createContract (data )
231
234
message .success (t (' common.createSuccess' ))
You can’t perform that action at this time.
0 commit comments