From d2bc6e096f0806b78ea92d4b90a21d3627d406c7 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 08 三月 2024 18:28:42 +0800
Subject: [PATCH] mrshi
---
company/src/components/enterprise/importEmployees.vue | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/company/src/components/enterprise/importEmployees.vue b/company/src/components/enterprise/importEmployees.vue
index dc04b87..72e8cb1 100644
--- a/company/src/components/enterprise/importEmployees.vue
+++ b/company/src/components/enterprise/importEmployees.vue
@@ -10,7 +10,7 @@
<el-form-item label="涓婁紶鍚嶅崟" required>
<div style="width: 100%;display: flex;align-items: center;">
<el-button type="primary" @click="clickRef">鐐瑰嚮涓婁紶</el-button>
- <el-button type="text">鍚嶅崟妯℃澘.EXCEL</el-button>
+ <el-button type="text" @click="exportTemplate">鍚嶅崟妯℃澘.EXCEL</el-button>
</div>
<div style="font-size: 14px; color: black;" v-if="fileName">{{fileName}}</div>
</el-form-item>
@@ -31,6 +31,8 @@
return {
list: [],
price: 0,
+ type: null,
+ solutionId: null,
addList: [],
fileName: ''
}
@@ -40,9 +42,20 @@
this.title = title
this.addList = []
this.fileName = ''
+ this.type = obj.type
this.visible = true
+ this.solutionId = obj.solutionId
this.list = obj.arr
this.price = obj.price
+ },
+ // 瀵煎嚭妯℃澘
+ exportTemplate () {
+ // 鎶曚繚鐢宠
+ if (this.type === 1) {
+ window.open(process.env.VUE_APP_MEMBER1_URL)
+ } else {
+ window.open(process.env.VUE_APP_MEMBER_URL)
+ }
},
clickRef () {
this.$refs.fileExcel.click()
@@ -50,6 +63,7 @@
result (e) {
const data = new FormData()
data.append('file', e.target.files[0])
+ data.append('solutionId', this.solutionId)
importExcel(data)
.then(res => {
res.forEach(item => {
@@ -70,7 +84,7 @@
confirm () {
for (let i = 0; i < this.addList.length; i++) {
for (let a = 0; a < this.list.length; a++) {
- if (this.addList[i].name === this.list[a].memberName || this.addList[i].idCard === this.list[a].idcardNo) {
+ if (this.addList[i].idCard === this.list[a].idcardNo) {
this.$message.warning(`[${this.addList[i].name}]鍛樺伐閲嶅`)
return
}
--
Gitblit v1.9.3