Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue-gjjs
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
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
fukai
vue-gjjs
Commits
8ec19730
Commit
8ec19730
authored
Oct 30, 2023
by
yangxiaolei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
节假日管理联调接口
parent
e319119e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
94 additions
and
33 deletions
+94
-33
Holiday.js
src/business/holiday/model/Holiday.js
+1
-1
index.vue
src/business/holiday/views/index.vue
+93
-32
No files found.
src/business/holiday/model/Holiday.js
View file @
8ec19730
...
...
@@ -3,7 +3,7 @@ export default class Holiday {
constructor
()
{
this
.
data
=
{
month
:
new
Date
(),
//月份
currCode
:
'
156
'
,
//币种代码
currCode
:
'
CHY
'
,
//币种代码
currSymbol
:
''
,
//币种符号
calendarDt
:
''
,
//日历日期
}
...
...
src/business/holiday/views/index.vue
View file @
8ec19730
...
...
@@ -5,8 +5,14 @@
@
submit
.
native
.
prevent
>
<el-form-item
label=
"币种"
prop=
"currCode"
>
<m-currency-list
v-model=
"model.currCode"
style=
"width:100%"
placeholder=
"请选择"
>
</m-currency-list>
<el-select
v-model=
"model.currCode"
style=
"width:100%"
placeholder=
"请选择"
>
<el-option
v-for=
"item in codes.curtxt1"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"月份"
prop=
"month"
>
<el-date-picker
v-model=
"model.month"
type=
"month"
size=
"small"
placeholder=
"请选择"
></el-date-picker>
...
...
@@ -39,12 +45,39 @@
<div
class=
"m-holiday-list"
>
<div
class=
"m-holiday-list-header"
>
<span
class=
"m-holiday-title"
>
节假日列表
</span>
<
c-button
type=
"primary"
size=
"small"
@
click=
"importDialog = true"
>
节假日导入
</c-button
>
<
!-- <c-button type="primary" size="small" @click="importDialog = true">节假日导入</c-button> --
>
</div>
<div
class=
"m-holiday-table"
>
<c-list-page
ref=
"cList"
:columnsConfig=
"columnsConfig"
:params=
"searchParams"
:pageSize=
"pageSize"
:multipleSelect=
"false"
:loadDataFirstRender=
"true"
url=
"v1/pm/hols"
@
update-list=
"handleUpdateList"
>
</c-list-page>
<el-table
:data=
"tableData"
style=
"width: 100%"
>
<el-table-column
prop=
"currCode"
label=
"币种"
sortable
>
</el-table-column>
<el-table-column
prop=
"calendarDt"
label=
"日期"
sortable
>
</el-table-column>
</el-table>
<div
class=
"pagination-box"
>
<el-pagination
style=
"margin-right: 30px;"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"pagination.pageIndex"
:page-sizes=
"[10, 20, 50, 100, 500]"
:page-size=
"pagination.pageSize"
layout=
"sizes, prev, pager, next"
:total=
"pagination.total"
>
</el-pagination>
</div>
</div>
</div>
<el-dialog
title=
"节假日导入"
:visible
.
sync=
"importDialog"
class=
"eContainer-dialog"
center
>
...
...
@@ -72,6 +105,7 @@
dateFormatFunc
}
from
"~/utils/format"
;
import
OperateParams
from
"../model/OperateParams"
import
CodeTable
from
"~/config/CodeTable"
;
// import {
// insertParaApv,
// importParaApvFile
...
...
@@ -84,6 +118,9 @@
},
data
:
function
()
{
return
{
codes
:
CodeTable
,
tableData
:[],
totalSize
:
0
,
month
:
moment
(
new
Date
()).
format
(
"YYYYMM"
),
holidayList
:
[],
model
:
new
Holiday
().
data
,
...
...
@@ -98,7 +135,7 @@
type
:
'selection'
,
width
:
"55"
},
{
prop
:
'curr
Symbol
'
,
prop
:
'curr
Code
'
,
label
:
'币种'
,
},
{
prop
:
'calendarDt'
,
...
...
@@ -107,6 +144,11 @@
return
dateFormatFunc
(
row
.
calendarDt
);
}
}],
pagination
:
{
pageIndex
:
1
,
pageSize
:
10
,
total
:
0
},
//查询条件
searchParams
:
{},
// 每页展示的数据 默认为20
...
...
@@ -139,6 +181,26 @@
this
.
handleSearch
();
},
methods
:
{
handleSizeChange
(
val
){
console
.
log
(
`每页
${
val
}
条`
);
this
.
pagination
.
pageIndex
=
1
;
this
.
pagination
.
pageSize
=
val
;
this
.
handleSearch
();
},
handleCurrentChange
(
val
)
{
console
.
log
(
`当前页:
${
val
}
`
);
this
.
pagination
.
pageIndex
=
val
;
this
.
handleSearch
();
},
async
getList
(){
const
res
=
await
this
.
$Api
.
post
(
'/service/hol/list'
,
{
...
this
.
searchParams
});
if
(
res
.
data
&&
res
.
data
.
length
)
{
this
.
tableData
=
res
.
data
this
.
pagination
.
total
=
res
.
data
.
length
}
},
httpRequest
(
params
)
{
this
.
formData
.
append
(
"file"
,
params
.
file
);
// this.formData.forEach((value, key) => {
...
...
@@ -195,7 +257,7 @@
handleSearch
()
{
var
params
=
new
QueryRequest
().
data
;
params
.
data
=
new
Holiday
().
data
;
params
.
data
.
month
=
moment
(
this
.
model
.
month
).
format
(
"YYYYMM"
);
params
.
data
.
calendarDt
=
moment
(
this
.
model
.
month
).
format
(
"YYYYMM"
);
params
.
data
.
currCode
=
this
.
model
.
currCode
;
//清空页面日历展示的节假日列表
...
...
@@ -204,6 +266,8 @@
this
.
searchParams
=
{
...
params
.
data
}
console
.
log
(
"this.searchParams=>"
,
this
.
searchParams
)
this
.
getList
()
},
handleReset
()
{
this
.
$refs
.
paramsForm
.
resetFields
()
...
...
@@ -257,35 +321,21 @@
//操作数据列表
var
operateDataList
=
[]
for
(
var
i
=
0
;
i
<
this
.
holidayList
.
length
;
i
++
)
{
var
holiday
=
new
Holiday
().
data
;
holiday
.
currCode
=
this
.
model
.
currCode
;
holiday
.
calendarDt
=
moment
(
this
.
holidayList
[
i
]).
format
(
'YYYYMMDD'
)
operateDataList
.
push
(
holiday
)
console
.
log
(
"holiday"
+
holiday
.
currCode
)
let
calendarDt
=
moment
(
this
.
holidayList
[
i
]).
format
(
'YYYYMMDD'
)
operateDataList
.
push
(
calendarDt
)
}
var
params
=
new
OperateParams
().
data
//操作人编号
params
.
operorNo
=
window
.
sessionStorage
.
getItem
(
'userId'
)
//操作人姓名
params
.
operorName
=
window
.
sessionStorage
.
getItem
(
'userName'
)
//交易代码
params
.
txCode
=
'010149'
//操作类型 U-修改
params
.
oprTypeCode
=
'U'
//操作数据
params
.
operateData
=
operateDataList
params
.
originData
=
this
.
originDataList
//操作记录主键列表 新增时无主键 传空数组 必传
params
.
oprRecordPrKey
=
[
this
.
model
.
currCode
+
this
.
month
];
//摘要
params
.
summary
=
value
let
params
=
{
currCode
:
this
.
model
.
currCode
,
calendarDtList
:
operateDataList
}
insertParaApv
(
params
)
this
.
$Api
.
post
(
'/service/hol/upd'
,{
...
params
})
.
then
(
res
=>
{
if
(
res
.
code
===
SUCCESS
)
{
if
(
res
.
respCode
===
"AAAAAA"
)
{
this
.
$message
(
'提交成功,请等待管理员审核'
)
this
.
$refs
[
'cList'
].
getList
();
this
.
handleSearch
();
}
})
...
...
@@ -336,6 +386,7 @@
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
margin-bottom
:
50px
;
}
.m-holiday-table
{
...
...
@@ -382,4 +433,14 @@
background-color
:
#f08080
;
text-align
:
center
;
}
.pagination-box
{
width
:
100%
;
height
:
30px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
flex-end
;
padding
:
0
10px
;
background
:
#fff
;
margin-top
:
5px
;
}
</
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