Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gavel-hafms-vue
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李苏
gavel-hafms-vue
Commits
7428ef53
Commit
7428ef53
authored
Aug 22, 2023
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预算调整功能,以及detail组件示例注释
parent
65d0e54e
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
488 additions
and
14 deletions
+488
-14
yssqtz.js
src/api/sbysjsp/yssqtz.js
+67
-0
index.js
src/router/index.js
+24
-11
edit.vue
src/views/sbysjsp/mxsx/edit.vue
+1
-2
edit.vue
src/views/sbysjsp/yssq/edit.vue
+1
-1
index.vue
src/views/sbysjsp/yssq/index.vue
+6
-0
edit.vue
src/views/sbysjsp/yssqtz/edit.vue
+204
-0
index.vue
src/views/sbysjsp/yssqtz/index.vue
+185
-0
No files found.
src/api/sbysjsp/yssqtz.js
0 → 100644
View file @
7428ef53
import
request
from
'common/src/utils/request'
/* query */
export
function
doQuery
(
query
)
{
return
request
({
url
:
'/hafms/ystz/query'
,
method
:
'post'
,
data
:
query
||
{}
})
}
export
function
doAdd
(
query
)
{
return
request
({
url
:
'/hafms/ystz/add'
,
method
:
'post'
,
data
:
query
||
{}
})
}
export
function
doUpdate
(
query
)
{
return
request
({
url
:
'/hafms/ystz/update'
,
method
:
'post'
,
data
:
query
||
{}
})
}
export
function
doDelete
(
query
)
{
return
request
({
url
:
'/hafms/ystz/delete'
,
method
:
'post'
,
data
:
query
||
{}
})
}
/* 导入 */
export
function
qt
(
query
)
{
return
request
({
url
:
'hafms/ystz/record/qt'
,
method
:
'post'
,
data
:
query
||
{}
})
}
export
function
ystzmx
(
query
)
{
return
request
({
url
:
'hafms/yssqmx/query'
,
method
:
'post'
,
data
:
query
||
{}
})
}
export
function
queryroot
(
query
)
{
return
request
({
url
:
'hafms/xmfl/queryroot'
,
method
:
'post'
,
data
:
query
||
{}
})
}
export
function
query
(
query
)
{
return
request
({
url
:
'hafms/fysx/query'
,
method
:
'post'
,
data
:
query
||
{}
})
}
export
function
submit
(
query
)
{
return
request
({
url
:
'hafms/ystz/submit'
,
method
:
'post'
,
data
:
query
||
{}
})
}
src/router/index.js
View file @
7428ef53
...
...
@@ -177,18 +177,31 @@ export const powerRoutes=[
meta
:
{
title
:
"预算申报及审批"
,
icon
:
"fa-cog"
,
noCache
:
false
,
link
:
null
,
mkid
:
901030000
},
children
:
[
{
component
:
'sbysjsp/yssbkfs
z/index'
,
component
:
'sbysjsp/yssqt
z/index'
,
hidden
:
false
,
meta
:{
"title"
:
"预算申报开放设置
"
,
"title"
:
"预算申请调整
"
,
"icon"
:
""
,
"noCache"
:
false
,
"link"
:
null
,
"mkid"
:
901030300
,
},
name
:
'yssbkfsz'
,
path
:
"yssbkfsz"
},
name
:
'yssqtz'
,
path
:
"yssqtz"
},
// {
// component:'sbysjsp/yssbkfsz/index',
// hidden:false,
// meta:{
// "title": "预算申报开放设置",
// "icon": "",
// "noCache": false,
// "link": null,
// "mkid": 901030300,
// },
// name:'yssbkfsz',
// path:"yssbkfsz"
// },
{
component
:
'sbysjsp/yssq/index'
,
hidden
:
false
,
...
...
src/views/sbysjsp/mxsx/edit.vue
View file @
7428ef53
...
...
@@ -21,7 +21,7 @@
required:true,
rules:rules,
}" >
<RelSelect
linkage
:linkParams=
"
{pid:form.sjbmid}" :readonly="readonly" filterable style="width: 100%;" src='hafms/common/bm/query' :match="{value:'
id',label:'bmmc'}" v-model='form.bmid' >
</RelSelect>
<RelSelect
linkage
:linkParams=
"
{pid:form.sjbmid}" :readonly="readonly" filterable style="width: 100%;" src='hafms/common/bm/query' :match="{value:'bm
id',label:'bmmc'}" v-model='form.bmid' >
</RelSelect>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
...
...
@@ -161,7 +161,6 @@
return
cur
},
{})
/* reduce开始控制row col*/
console
.
log
(
'触发computed'
)
this
.
formDetail
=
sxList
return
this
.
formDetail
...
...
src/views/sbysjsp/yssq/edit.vue
View file @
7428ef53
...
...
@@ -18,7 +18,7 @@
required:true,
rules:rules,
}">
<RelSelect
noContrast
linkage
:linkParams=
"
{pid:form.sjbmid}" :readonly="readonly" filterable style="width: 100%;"
<RelSelect
linkage
:linkParams=
"
{pid:form.sjbmid}" :readonly="readonly" filterable style="width: 100%;"
src='hafms/common/bm/query' :match="{value:'bmid',label:'bmmc'}" v-model='form.bmid'>
</RelSelect>
</el-form-item>
</el-col>
...
...
src/views/sbysjsp/yssq/index.vue
View file @
7428ef53
...
...
@@ -65,6 +65,7 @@
<CopyButton
ref=
"copy"
:app=
'app'
></CopyButton>
<EditButton
ref=
"edit"
:app=
'app'
></EditButton>
<el-button
size=
'mini'
@
click=
"yssqsp()"
type=
"primary"
>
预算申请审批
</el-button>
<!--
<PageDetail
@
created=
'created'
:page=
'page'
style=
"margin-left: 10px;"
/>
-->
<!--
<AttachFileButton
:app=
'app'
></AttachFileButton>
-->
<!-- 额外按钮-->
<!-- 表头设置 -->
...
...
@@ -95,6 +96,7 @@
import
{
tableMixin
}
from
'common'
import
yssqtz
from
'../yssqtz/index.vue'
export
default
{
mixins
:
[
tableMixin
],
name
:
'yssq'
,
...
...
@@ -105,6 +107,7 @@
},
data
()
{
return
{
page
:
yssqtz
,
/*需要的额外参数 */
showDialog
:
false
,
DialogName
:
''
,
...
...
@@ -145,6 +148,9 @@
}
},
methods
:
{
created
(
vdom
){
vdom
.
queryParams
.
djid
=
123
},
yssqsp
(){
if
(
this
.
app
.
selectOne
||
this
.
app
.
clickOne
)
{
submit
(
this
.
singleItem
).
then
(
res
=>
{
...
...
src/views/sbysjsp/yssqtz/edit.vue
0 → 100644
View file @
7428ef53
<
template
>
<RelDialog
width=
'70%'
:type=
'type'
:editApp=
'editApp'
:app=
'app'
:buttonApp=
'buttonApp'
>
<!-- 填写表单内容,slot=form必写-->
<el-form
slot=
"form"
ref=
"form"
:model=
"form"
label-width=
"80px"
:rules=
"rules"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"申请公司"
ref=
"sjbmid"
prop=
"sjbmid"
v-rule=
"
{
required:true,
rules:rules,
}">
<RelSelect
:readonly=
"readonly"
filterable
style=
"width: 100%;"
src=
'hafms/common/sjbm/query'
:match=
"
{value:'id',label:'bmmc'}" v-model='form.sjbmid'>
</RelSelect>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"申请部门"
ref=
"bmid"
prop=
"bmid"
v-rule=
"
{
required:true,
rules:rules,
}">
<RelSelect
linkage
:linkParams=
"
{pid:form.sjbmid}" :readonly="readonly" filterable style="width: 100%;"
src='hafms/common/bm/query' :match="{value:'bmid',label:'bmmc'}" v-model='form.bmid'>
</RelSelect>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"填报日期"
ref=
"tbrq"
prop=
"tbrq"
v-rule=
"
{
required:true,
rules:rules,
}">
<el-date-picker
:readonly=
"readonly"
style=
"width: 100%;"
value-format=
"timestamp"
v-model=
'form.tbrq'
></el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"年度"
ref=
"year"
prop=
"year"
>
<RelYearSelect
:readonly=
"readonly"
v-model=
"form.year"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"填报人"
ref=
"tbr"
prop=
"tbr"
>
<el-input
:readonly=
"true"
:value=
"form.tbr||localUser"
></el-input>
</el-form-item>
</el-col>
</el-row>
<div
class=
""
>
<div
class=
"edit_table"
>
<el-row
class=
"tool-bar"
style=
"padding-left: 0px;padding-bottom: 3px;"
>
<el-button
style=
"margin-right: 10px;"
v-if=
"type!='view'"
@
click=
"add"
size=
'mini'
type=
"primary"
>
新增
</el-button>
</el-row>
<div
style=
"height: calc(100% - 40px);"
>
<EditTable
:delButton=
" type!='view' "
:allowEdit=
'type!="view"'
ref=
"editTable"
:editTableData=
'formDetail'
:app=
'this'
></EditTable>
</div>
</div>
<span
class=
"jehj"
>
合计总金额:
{{
jehj
}}
</span>
<!-- 可编辑表格组件 -->
</div>
<!-- 底部信息-->
</el-form>
</RelDialog>
</
template
>
<
script
>
/* 映入额外弹框 */
import
{
editMixin
}
from
'common'
import
{
toFixed
}
from
'common/src/utils/blur.js'
export
default
{
mixins
:
[
editMixin
],
/* 存放index页面传递的额外参数*/
mounted
()
{
this
.
localUser
=
localStorage
.
getItem
(
'username'
)
if
(
this
.
form
.
tbr
==
''
)
{
this
.
form
.
tbr
=
this
.
localUser
}
/* 构建新的明细表数据*/
this
.
$post
(
'hafms/xmfl/queryAllRoot'
,
{}).
then
(
res
=>
{
this
.
editTableTitle
[
0
].
options
=
res
.
data
.
records
.
map
(
item
=>
{
let
obj
=
{
label
:
item
.
name
,
value
:
item
.
id
}
return
obj
})
})
},
computed
:
{
jehj
()
{
let
hj
=
0
this
.
formDetail
.
forEach
(
item
=>
{
hj
=
hj
+
Number
(
item
.
xqje
||
0
)
})
return
hj
},
newFormDetail
()
{
}
},
watch
:
{
},
/* 组件名称*/
data
()
{
return
{
/* */
finalList
:
[],
spanArr
:
[],
baseUrl
:
'hafms/ystz/edit'
,
localUser
:
''
,
/* 弹框管理 */
/* 额外初始化,根据需求*/
/* editTableData: [{}], */
editTableTitle
:
[
/* */
// {label: "序号", prop: "xh",width:50,align:"center"},
{
label
:
"总事项"
,
prop
:
"fyxmid"
,
show
:
true
,
width
:
300
,
type
:
'select'
,
options
:[]
},
{
label
:
"预算数额"
,
prop
:
"xqje"
,
fieldType
:
"ftString"
,
width
:
250
,
type
:
'inputNumber'
,
blur
:
toFixed
(
4
),
},
{
label
:
"具体事由及测算依据"
,
prop
:
"csyj"
,
fieldType
:
"ftString"
,
width
:
500
,
type
:
'inputText'
},
],
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form
:
{
yslx
:
'TZ'
,
year
:
new
Date
().
getFullYear
(),
table
:
"YSSQMX"
,
sjbmid
:
''
,
bmid
:
''
,
tbrq
:
''
,
tbr
:
''
,
lxfs1
:
''
,
lxfs2
:
''
,
ysflid
:
''
},
/* form提交时的规则,具体规则参考官网*/
}
},
created
()
{
/* tag遍历 */
},
methods
:
{
add
(){
this
.
formDetail
.
push
({
fyxmid
:
''
,
xqje
:
0
,
csyj
:
''
})
}
},
components
:
{
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.jehj
{
line-height
:
30px
;
font-size
:
14px
;
}
.edit_table
{
height
:
350px
;
overflow
:
auto
;
}
</
style
>
src/views/sbysjsp/yssqtz/index.vue
0 → 100644
View file @
7428ef53
<
template
>
<div
class=
"min_full"
>
<!-- 查询条件-->
<div
class=
"search"
v-condition
>
<SearchButton
:app=
'app'
></SearchButton>
<el-row
:gutter=
"20"
class=
"search-row-1"
>
<el-col
:span=
"6"
class=
"search-col"
>
<div
class=
"search-item"
>
<span
class=
"search-span"
>
开始日期:
</span>
<el-date-picker
value-format=
"timestamp"
v-model=
'queryParams.start'
></el-date-picker>
</div>
</el-col>
<el-col
:span=
"6"
class=
"search-col"
>
<div
class=
"search-item"
>
<span
class=
"search-span"
>
截止日期:
</span>
<el-date-picker
value-format=
"timestamp"
v-model=
'queryParams.end'
></el-date-picker>
</div>
</el-col>
<el-col
:span=
"6"
class=
"search-col"
>
<div
class=
"search-item"
>
<span
class=
"search-span"
>
预算任务:
</span>
<RelSelect
style=
"width: 100%;"
src=
'hafms/ysfl/query'
filterable
clearable
:match=
"
{value:'id',label:'name'}" v-model='queryParams.flid'>
</RelSelect>
</div>
</el-col>
<el-col
:span=
"6"
class=
"search-col"
>
<div
class=
"search-item"
>
<span
class=
"search-span"
>
状态:
</span>
<RelSelect
style=
"width: 100%;"
src=
'hafms/yssq/init/zt'
filterable
clearable
:match=
"
{value:'id',label:'name'}" v-model='queryParams.zt'>
</RelSelect>
</div>
</el-col>
</el-row>
<el-row
:gutter=
"20"
class=
"search-row-1"
>
<el-col
:span=
"8"
class=
"search-col"
>
<div
class=
"search-item"
>
<span
class=
"search-span"
>
申请订单:
</span>
<el-input
v-model=
"queryParams.djid"
></el-input>
</div>
</el-col>
<el-col
:span=
"8"
class=
"search-col"
>
<div
class=
"search-item"
>
<span
class=
"search-span"
>
申请公司:
</span>
<RelSelect
collapse-tags
multiple
style=
"width: 100%;"
src=
'hafms/common/sjbm/query'
filterable
clearable
:match=
"
{value:'id',label:'bmmc'}" v-model='queryParams.sjbmids'>
</RelSelect>
</div>
</el-col>
<el-col
:span=
"8"
class=
"search-col"
>
<div
class=
"search-item"
>
<span
class=
"search-span"
>
申请部门:
</span>
<RelSelect
linkage
:linkParams=
"
{sjbmids:queryParams.sjbmids}" :params="{
pids:queryParams.sjbmids.join()
}" collapse-tags multiple style="width: 100%;" src='hafms/common/bm/query' filterable clearable
:match="{value:'id',label:'bmmc'}" v-model='queryParams.chooseBmids'>
</RelSelect>
</div>
</el-col>
</el-row>
</div>
<!-- 按钮操作-->
<el-row
class=
"tool-bar"
>
<ToolButton
:app=
'app'
></ToolButton>
<ViewButton
ref=
"view"
:app=
'app'
></ViewButton>
<AddButton
ref=
"add"
:app=
'app'
></AddButton>
<CopyButton
ref=
"copy"
:app=
'app'
></CopyButton>
<EditButton
ref=
"edit"
:app=
'app'
></EditButton>
<AttachFileButton
:app=
'this'
/>
<!--
<el-button
size=
'mini'
@
click=
"yssqsp()"
type=
"primary"
>
预算申请审批
</el-button>
-->
<!--
<AttachFileButton
:app=
'app'
></AttachFileButton>
-->
<!-- 额外按钮-->
<!-- 表头设置 -->
<!-- 权限-->
</el-row>
<!-- 表格-->
<div
class=
"tablePagers"
>
<!-- 多选数组转 -->
<TablePager
:multipleTrans=
"[
'sjbmids','chooseBmids'
]"
@
getData=
'getData'
:ref=
"'TablePager'"
:app=
'app'
:query=
'query'
@
selectItem=
'selectItem'
@
getRow=
'getRow'
>
</TablePager>
</div>
</div>
</
template
>
<
script
>
import
{
doQuery
,
doAdd
,
doUpdate
,
doDelete
,
ystzmx
,
submit
}
from
'@/api/sbysjsp/yssqtz.js'
;
/* edit页面*/
import
Edit
from
'./edit'
import
{
tableMixin
}
from
'common'
import
cycle
from
'common/src/mixin/cycle.js'
export
default
{
mixins
:
[
tableMixin
,
cycle
],
/* 初始额外赋值*/
async
mounted
()
{
console
.
log
(
'pageQuery'
)
this
.
$refs
[
'TablePager'
].
pageQuery
()
},
data
()
{
return
{
/*需要的额外参数 */
showDialog
:
false
,
DialogName
:
''
,
type
:
''
,
DialogTitle
:
''
,
/* 基础url*/
baseUrl
:
'hafms/ystz'
,
/* 查询参数*/
queryParams
:
{
start
:
new
Date
().
getTime
()
-
1000
*
60
*
60
*
24
*
30
,
end
:
new
Date
().
getTime
(),
flid
:
''
,
zt
:
''
,
djid
:
''
,
sjbmids
:[],
chooseBmids
:[]
},
/* 表格标题对应参数*/
tableTitle
:
[
// {title: "预算任务", field: "ysflName", fieldType: "ftString",width:200},
{
title
:
"状态"
,
field
:
"zt"
,
fieldType
:
"ftString"
,
align
:
'center'
,
width
:
70
,
transform
:
{
url
:
'hafms/yssq/init/zt'
,
label
:
'name'
,
value
:
'id'
}},
{
title
:
"申请单号"
,
field
:
"djid"
,
fieldType
:
"ftString"
,
width
:
100
},
{
title
:
"公司编码"
,
field
:
"sjbmcode"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"公司名称"
,
field
:
"sjbmName"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"部门编码"
,
field
:
"bmcode"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"部门名称"
,
field
:
"bmName"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"填报日期"
,
field
:
"tbrq"
,
fieldType
:
"ftDate"
},
// {title: "填报人编码", field: "tbrid", fieldType: "ftString",width:192},
{
title
:
"填报人"
,
field
:
"tbr"
,
fieldType
:
"ftString"
,
width
:
180
},
{
title
:
"申请金额"
,
field
:
"sqje"
,
fieldType
:
"float"
},
{
title
:
"联系电话"
,
field
:
"lxfs1"
,
fieldType
:
"ftString"
,
width
:
200
},
{
title
:
"内部短号"
,
field
:
"lxfs2"
,
fieldType
:
"ftString"
,
width
:
120
}
]
}
},
methods
:
{
yssqsp
(){
if
(
this
.
app
.
selectOne
||
this
.
app
.
clickOne
)
{
submit
(
this
.
singleItem
).
then
(
res
=>
{
if
(
res
.
success
){
this
.
$success
(
'操作成功'
);
this
.
$refs
[
'TablePager'
].
pageQuery
()
}
})
}
else
{
this
.
$warning
(
'请选中一行操作'
);
}
},
/* 基础查询*/
query
:
doQuery
,
/* 基础增*/
apiAdd
:
doAdd
,
/* 基础更新*/
apiUpdate
:
doUpdate
,
/* 删除操作*/
apiDelete
:
doDelete
,
/* 初始化赋值操作*/
queryDetail
:
ystzmx
},
components
:
{
Edit
,
}
}
</
script
>
<
style
scoped
>
.search-col
{
max-width
:
350px
;
}
</
style
>
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