Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
c1450025
Commit
c1450025
authored
Jan 31, 2023
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pref:修改项目是否收费
parent
7533a921
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
43 deletions
+47
-43
base-manager-ui/admin/src/pages/basicset/addmatter/components/rates.vue
...i/admin/src/pages/basicset/addmatter/components/rates.vue
+39
-43
base-manager-ui/admin/src/services/matter.js
base-manager-ui/admin/src/services/matter.js
+8
-0
No files found.
base-manager-ui/admin/src/pages/basicset/addmatter/components/rates.vue
View file @
c1450025
...
...
@@ -10,33 +10,13 @@
<a-row
:gutter=
"[8, 20]"
type=
"flex"
justify=
"start"
>
<a-col
:span=
"24"
>
<a-form-model-item
label=
"是否收费"
>
<a-radio-group
v-model=
"isRates"
>
<a-radio-group
v-model=
"isRates"
@
change=
"chagneRates"
>
<a-radio
:value=
"false"
>
有
</a-radio>
<a-radio
:value=
"true"
>
无
</a-radio>
</a-radio-group>
</a-form-model-item>
</a-col>
</a-row>
<!--
<a-row
:gutter=
"[8, 20]"
type=
"flex"
justify=
"start"
>
<a-col
:span=
"24"
>
<a-form-model-item
label=
"所属事项"
prop=
"matterId"
>
<a-select
:disabled=
"isRates"
allowClear
@
select=
"handleSelect"
v-model=
"formData.matterId"
placeholder=
"请选择所属事项"
>
<a-select-option
v-for=
"v in matterList"
:key=
"v.id"
:value=
"v.matterId"
>
{{
v
.
matterName
}}
</a-select-option
>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
-->
<a-row
:gutter=
"[8, 20]"
type=
"flex"
justify=
"start"
>
<a-col
:span=
"24"
>
<a-form-model-item
label=
"费用(元)"
prop=
"content"
>
...
...
@@ -71,17 +51,19 @@
</
template
>
<
script
>
import
{
addMattercharges
}
from
"
@/services/matter
"
;
import
{
addMattercharges
,
getMattercharges
,
delMattercharges
,
}
from
"
@/services/matter
"
;
import
local
from
"
@/utils/local
"
;
export
default
{
data
()
{
return
{
isRates
:
tru
e
,
isRates
:
fals
e
,
siteId
:
""
,
matterList
:
[],
formData
:
{
matterId
:
undefined
,
// 事项id
matterName
:
""
,
// 事项名称
content
:
""
,
// 收费标准
source
:
1
,
// 事项来源(0.政务网,1.自定义)
},
...
...
@@ -89,27 +71,31 @@ export default {
content
:
[
{
required
:
true
,
message
:
"
费用不能为空
"
,
trigger
:
"
change
"
},
],
matterId
:
[
{
required
:
true
,
message
:
"
所属事项不能为空
"
,
trigger
:
"
change
"
},
],
},
};
},
created
()
{
// this.getSiteMatterList
();
this
.
getMattercharges
();
},
methods
:
{
// 获取站点事项列表
// async getSiteMatterList() {
// this.siteId = this.$route.query.siteId;
// let res = await getSiteMatterList({ siteId: this.siteId });
// this.matterList = res.data.data.data;
// },
// // 事项下拉选择
// handleSelect(val, node) {
// let { text } = node.componentOptions.children[0];
// this.formData.matterName = text;
// },
// 获取收费列表
async
getMattercharges
()
{
if
(
!
local
.
getLocal
(
"
matter
"
))
return
;
let
res
=
await
getMattercharges
({
page
:
1
,
size
:
-
1
,
matterId
:
local
.
getLocal
(
"
matter
"
).
id
,
matterName
:
local
.
getLocal
(
"
matter
"
).
matterName
,
});
if
(
res
.
data
.
code
===
1
&&
res
.
data
.
data
.
data
.
length
)
{
this
.
formData
=
res
.
data
.
data
.
data
[
0
];
this
.
isRates
=
false
;
}
else
{
Object
.
assign
(
this
.
formData
,
this
.
$options
.
data
().
formData
);
this
.
isRates
=
true
;
}
},
// 获取收费标准
onSubmit
()
{
if
(
local
.
getLocal
(
"
matter
"
))
{
this
.
$refs
.
formData
.
validate
(
async
(
valid
)
=>
{
...
...
@@ -122,9 +108,7 @@ export default {
let
{
code
,
msg
}
=
res
.
data
;
if
(
code
===
1
)
{
this
.
$message
.
success
(
msg
);
this
.
isRates
=
true
;
}
else
{
this
.
$message
.
error
(
msg
);
this
.
getMattercharges
();
}
}
});
...
...
@@ -132,6 +116,18 @@ export default {
this
.
$message
.
warning
(
"
请先新增基本信息
"
);
}
},
async
chagneRates
()
{
if
(
this
.
isRates
&&
this
.
formData
.
id
)
{
let
res
=
await
delMattercharges
({
id
:
this
.
formData
.
id
});
let
{
code
,
msg
}
=
res
.
data
;
if
(
code
===
1
)
{
this
.
$message
.
success
(
msg
);
this
.
getMattercharges
();
}
}
else
if
(
this
.
isRates
)
{
this
.
$refs
.
formData
.
resetFields
();
}
},
handleReset
()
{
this
.
$refs
.
formData
.
resetFields
();
},
...
...
base-manager-ui/admin/src/services/matter.js
View file @
c1450025
...
...
@@ -161,3 +161,11 @@ export async function delMatterflowlimit(data) {
export
async
function
addMattercharges
(
data
)
{
return
request
(
mattercharges
.
save
,
METHOD
.
POST
,
data
);
}
// 获取收费标准
export
async
function
getMattercharges
(
data
)
{
return
request
(
mattercharges
.
list
,
METHOD
.
POST
,
data
);
}
// 删除收费标准
export
async
function
delMattercharges
(
data
)
{
return
request
(
mattercharges
.
delete
,
METHOD
.
GET
,
data
);
}
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