Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
weiqiao-vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
金民
weiqiao-vue
Commits
ac0c5a6d
Commit
ac0c5a6d
authored
Mar 06, 2026
by
董晓奇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG修复:
基础数据->业务伙伴->客户管理,在新增时,点击取消不生效。
parent
4263c1d5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
22 deletions
+20
-22
xjrsoft-vue3/src/views/jcsj/khgl/components/KhglModal.vue
+19
-22
xjrsoft-vue3/src/views/jcsj/khgl/components/config.ts
+1
-0
No files found.
xjrsoft-vue3/src/views/jcsj/khgl/components/KhglModal.vue
View file @
ac0c5a6d
<
template
>
<BasicModal
:height=
"500"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
@
cancel=
"handleClose"
>
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
@
cancel=
"handleClose"
>
<ModalForm
ref=
"formRef"
v-model:value=
"state.formModel"
:fromPage=
"FromPageType.MENU"
/>
<template
#
footer
v-if=
"
!state.isView"
>
<template
#
footer
v-if=
"
!state.isView"
>
<template
v-for=
"(item, index) in sortBy(formButtons, 'index')"
:key=
"item.key"
>
<template
v-if=
"item.isShow"
>
<CustomButtonModal
v-if=
"item.type == CustomButtonModalType.Modal"
:info=
"item"
/>
...
...
@@ -23,7 +24,6 @@
</template>
</template>
</BasicModal>
</template>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
reactive
,
provide
,
Ref
}
from
'vue'
;
...
...
@@ -33,7 +33,7 @@
import
CustomButtonModal
from
'/@/components/Form/src/components/CustomButtonModal.vue'
;
import
{
useMessage
}
from
'/@/hooks/web/useMessage'
;
import
{
useI18n
}
from
'/@/hooks/web/useI18n'
;
import
{
formProps
,
formButtons
}
from
'./config'
;
import
{
formProps
,
formButtons
}
from
'./config'
;
import
ModalForm
from
'./Form.vue'
;
import
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
...
...
@@ -44,7 +44,7 @@
const
{
notification
}
=
useMessage
();
const
formRef
=
ref
();
const
isCopy
=
ref
<
boolean
>
(
false
)
const
isCopy
=
ref
<
boolean
>
(
false
)
;
const
state
=
reactive
({
formModel
:
{},
isUpdate
:
true
,
...
...
@@ -58,10 +58,11 @@
await
handleInner
(
data
);
});
const
getTitle
=
computed
(()
=>
(
state
.
isView
?
'查看'
:
state
.
isUpdate
?
'编辑'
:
isCopy
.
value
?
'复制数据'
:
'新增'
));
const
getTitle
=
computed
(()
=>
state
.
isView
?
'查看'
:
state
.
isUpdate
?
'编辑'
:
isCopy
.
value
?
'复制数据'
:
'新增'
,
);
async
function
handleInner
(
data
){
async
function
handleInner
(
data
)
{
state
.
isUpdate
=
!!
data
?.
isUpdate
;
state
.
isView
=
!!
data
?.
isView
;
isCopy
.
value
=
!!
data
?.
isCopy
;
...
...
@@ -73,7 +74,8 @@
showOkBtn
:
false
,
canFullscreen
:
true
,
width
:
900
,
footer
:
state
.
isView
?
null
:
undefined
,
defaultFullscreen
:
true
,
footer
:
state
.
isView
?
null
:
undefined
,
defaultFullscreen
:
true
,
});
if
(
state
.
isUpdate
||
state
.
isView
||
isCopy
.
value
)
{
...
...
@@ -85,10 +87,9 @@
await
formRef
.
value
.
setFormDataFromId
(
state
.
rowId
);
}
else
{
formRef
.
value
.
resetFields
();
}
}
async
function
saveModal
()
{
let
saveSuccess
=
false
;
try
{
...
...
@@ -140,15 +141,14 @@
emit
(
'success'
);
}
}
finally
{
setModalProps
({
confirmLoading
:
false
});
}
}
function
customClick
(
item
)
{
if
(
item
.
key
==
'confirm'
)
{
handleSubmit
();
}
else
if
(
item
.
key
==
'cancel'
&&
props
.
formType
!==
'normal'
)
{
}
else
if
(
item
.
key
==
'cancel'
)
{
handleClose
();
closeModal
();
}
else
if
(
item
.
key
==
'reset'
)
{
...
...
@@ -157,10 +157,8 @@
executeCurFormEvent
(
item
.
event
,
state
.
formModel
,
true
);
}
}
function
handleClose
()
{
formRef
.
value
.
resetFields
();
}
</
script
>
\ No newline at end of file
xjrsoft-vue3/src/views/jcsj/khgl/components/config.ts
View file @
ac0c5a6d
...
...
@@ -760,6 +760,7 @@ export const formProps: FormProps = {
showResetButton
:
false
,
showSubmitButton
:
false
,
hiddenComponent
:
[],
buttonList
:
[],
};
export
const
formButtons
=
[
...
...
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