Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xichonght
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
zhangdishen
xichonght
Commits
92c9447b
Commit
92c9447b
authored
Oct 11, 2019
by
qddidi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://ops.weface.com.cn:8022/zhangdishen/xichonght
parents
12428907
21ba8ac0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
151 additions
and
0 deletions
+151
-0
index.js
xichongSys/src/router/index.js
+6
-0
importRightsRecordByExcel.vue
xichongSys/src/views/Myvue/importRightsRecordByExcel.vue
+145
-0
No files found.
xichongSys/src/router/index.js
View file @
92c9447b
...
...
@@ -52,6 +52,7 @@ import archivesAdministration from "@/views/Myvue/archivesAdministration";
import
filesOfArchive
from
"@/views/Myvue/filesOfArchive"
;
import
archivesExpect
from
"@/views/Myvue/archivesExpect"
;
import
noArchiveEventLog
from
"@/views/Myvue/noArchiveEventLog"
;
import
importRightsRecordByExcel
from
"@/views/Myvue/importRightsRecordByExcel"
;
Vue
.
use
(
Router
)
...
...
@@ -240,6 +241,11 @@ const router = new Router({
name
:
"未归档文件"
,
component
:
noArchiveEventLog
},
{
path
:
"/importRightsRecord"
,
name
:
"权益记录导入"
,
component
:
importRightsRecordByExcel
},
]
},
{
...
...
xichongSys/src/views/Myvue/importRightsRecordByExcel.vue
0 → 100644
View file @
92c9447b
<
template
>
<div>
<el-alert
align=
"left"
title=
"请上传格式完全相同的excel,格式如下:"
type=
"warning"
:closable=
"false"
show-icon
>
</el-alert>
<table
style=
"text-align: center;border-collapse: collapse"
cellspacing=
"0px"
cellpadding=
"0px"
>
<tr>
<td
style=
"border: 1px solid black"
>
户口所在地
</td>
<td
style=
"border: 1px solid black"
>
证件号码
</td>
<td
style=
"border: 1px solid black"
>
姓名
</td>
<td
style=
"border: 1px solid black"
>
首次参保年月
</td>
<td
style=
"border: 1px solid black"
>
个人累计缴费年数
</td>
<td
style=
"border: 1px solid black"
>
个人权益年度
</td>
<td
style=
"border: 1px solid black"
>
个人权益时间段
</td>
<td
style=
"border: 1px solid black"
>
个人缴费
</td>
<td
style=
"border: 1px solid black"
>
政府补贴
</td>
<td
style=
"border: 1px solid black"
>
集体补助
</td>
<td
style=
"border: 1px solid black"
>
月养老金
</td>
<td
style=
"border: 1px solid black"
>
截止上年末余额
</td>
<td
style=
"border: 1px solid black"
>
当年记账收入
</td>
<td
style=
"border: 1px solid black"
>
当年支出
</td>
<td
style=
"border: 1px solid black"
>
打印时间
</td>
<td
style=
"border: 1px solid black"
>
当年记账利息
</td>
<td
style=
"border: 1px solid black"
>
至本年末账户累计储存额
</td>
<td
style=
"border: 1px solid black"
>
至本年末个人账户中政府补贴累计本息
</td>
</tr>
</table>
<el-upload
style=
"margin-top: 10px"
class=
"upload-demo"
ref=
"upload1"
:action=
"baseInfoUrl"
multiple
drag
accept=
".xls,.xlsx"
:limit=
"1"
:headers=
"myHeader"
:before-upload=
"handleBeforeUpload"
:file-list=
"fileList"
:on-exceed=
"handleExceed"
:on-success=
"uploadSuccess"
:on-error=
"uploadError"
:auto-upload=
"false"
>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
slot=
"tip"
class=
"el-upload__tip"
>
只能上传xls/xlsx文件,一次最多只能上传1个文件
</div>
</el-upload>
<el-button
style=
"margin-top: 10px"
size=
"small"
type=
"success"
@
click=
"submitUpload1"
v-loading
.
fullscreen
.
lock=
"loading"
>
数据导入
</el-button>
<el-dialog
ref=
"dialog"
:title=
"dialogTitle"
width=
"30%"
:visible
.
sync=
"dialogVisible"
>
<span
v-text=
"dialogContent"
style=
"font-size: 16px"
></span>
</el-dialog>
</div>
</
template
>
<
script
>
import
{
baseUrl
}
from
"../../utils/global"
;
import
Cookies
from
"js-cookie"
;
let
uploadedList
=
[];
export
default
{
name
:
"importRightsRecordByExcel"
,
data
()
{
return
{
baseInfoUrl
:
baseUrl
+
"/rightsRecordInfo/importFromExcel"
,
myHeader
:
{
token
:
Cookies
.
get
(
"token"
)
},
fileList
:
[],
dialogTitle
:
""
,
dialogVisible
:
false
,
dialogContent
:
""
,
loading
:
false
};
},
methods
:
{
submitUpload1
()
{
this
.
$refs
.
upload1
.
submit
();
},
handleExceed
()
{
this
.
$message
.
warning
(
"当前限制选择 1 个文件,请删除后继续上传"
);
},
handleBeforeUpload
(
file
)
{
this
.
loading
=
true
;
if
(
!
file
.
name
.
endsWith
(
".xls"
)
&&
!
file
.
name
.
endsWith
(
".xlsx"
))
{
this
.
$message
.
warning
(
file
.
name
+
"不是excel文件"
);
this
.
loading
=
false
;
return
false
;
}
// if (uploadedList.includes(file.name)) {
// this.$message.warning(file.name + "已被选中过,请勿重复选择");
// return false;
// }
// uploadedList.push(file.name);
},
async
uploadSuccess
(
response
)
{
this
.
fileList
=
[];
this
.
dialogTitle
=
"导入结果"
;
this
.
dialogContent
=
response
.
data
;
// this.dialogVisible = true;
this
.
loading
=
false
;
// console.log("upload success");
this
.
$message
({
type
:
"success"
,
message
:
response
.
data
,
showClose
:
true
,
duration
:
0
});
},
async
uploadError
(
response
)
{
this
.
fileList
=
[];
this
.
dialogTitle
=
"导入结果"
;
this
.
dialogContent
=
"导入失败"
;
// this.dialogVisible = true;
this
.
loading
=
false
;
// console.log(response);
this
.
$alert
(
response
.
data
,
'导入结果'
,
{
confirmButtonText
:
'确定'
,
callback
:
action
=>
{
// this.$message({
// type: 'info',
// message: `action: ${ action }`
// });
}
});
},
}
}
</
script
>
<
style
scoped
>
</
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