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/selectEmployees.vue | 84 ++++++++++++++++++++++++++++++++++++++----
1 files changed, 76 insertions(+), 8 deletions(-)
diff --git a/company/src/components/enterprise/selectEmployees.vue b/company/src/components/enterprise/selectEmployees.vue
index c25116c..1e7e5b3 100644
--- a/company/src/components/enterprise/selectEmployees.vue
+++ b/company/src/components/enterprise/selectEmployees.vue
@@ -10,26 +10,31 @@
<el-table
:data="list"
border
+ @selection-change="handleSelectionChange"
style="width: 100%">
+ <el-table-column
+ type="selection"
+ width="55">
+ </el-table-column>
<el-table-column label="搴忓彿" width="80px">
<template slot-scope="scope">
<span>{{scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column
- prop="date"
+ prop="name"
label="濮撳悕">
</el-table-column>
<el-table-column
- prop="name"
+ prop="idcardNo"
label="韬唤璇佸彿">
</el-table-column>
<el-table-column
- prop="address"
+ prop="duName"
label="娲鹃仯鍗曚綅">
</el-table-column>
<el-table-column
- prop="address"
+ prop="workTypeName"
label="鎵�灞炲伐绉�">
</el-table-column>
</el-table>
@@ -46,8 +51,15 @@
components: { GlobalWindow },
data () {
return {
+ type: '',
val: '',
- list: []
+ list: [],
+ price: '',
+ insuranceApplyId: '',
+ notInInsuranceApplyId: '',
+ validTime: '',
+ seleData: [],
+ oldList: []
}
},
created () {
@@ -57,16 +69,72 @@
})
},
methods: {
- open (title) {
+ open (title, obj) {
+ this.insuranceApplyId = ''
+ this.notInInsuranceApplyId = ''
+ this.val = ''
+ this.price = obj.price
+ this.oldList = obj.arr
+ if (obj.type) {
+ this.type = obj.type
+ }
+ this.list = []
+ if (obj.insuranceApplyId) {
+ this.insuranceApplyId = obj.insuranceApplyId
+ }
+ if (obj.notInInsuranceApplyId) {
+ this.notInInsuranceApplyId = obj.notInInsuranceApplyId
+ }
+ if (obj.validTime) {
+ this.validTime = obj.validTime
+ }
this.title = title
this.visible = true
this.getList()
},
+ confirm() {
+ if (this.seleData.length === 0) {
+ this.$message.warning('鑷冲皯閫夋嫨涓�椤瑰唴瀹�')
+ return
+ }
+ for (let i = 0; i < this.seleData.length; i++) {
+ for (let a = 0; a < this.oldList.length; a++) {
+ // this.seleData[i].name === this.oldList[a].memberName ||
+ if (this.seleData[i].idCard === this.oldList[a].idcardNo) {
+ this.$message.warning(`[${this.seleData[i].name}]鍛樺伐閲嶅`)
+ return
+ }
+ }
+ }
+ this.seleData.forEach(item => {
+ item.idCard = item.idcardNo
+ item.memberName = item.name
+ item.memberId = item.id
+ if (this.notInInsuranceApplyId || this.type == 1) {
+ item.workTypeName = ''
+ item.worktypeId = ''
+ item.duId = ''
+ item.duName = ''
+ }
+ item.fee = this.price
+ })
+ this.$emit('result', this.seleData)
+ this.visible = false
+ },
+ handleSelectionChange (e) {
+ this.seleData = e
+ },
getList() {
findListByDTO({
- name: this.val
+ name: this.val,
+ insuranceApplyId: this.insuranceApplyId,
+ notInInsuranceApplyId: this.notInInsuranceApplyId,
+ validTime: this.validTime
}).then(res => {
- this.list = []
+ res.forEach(item => {
+ item.fee = ''
+ })
+ this.list = res
})
}
}
--
Gitblit v1.9.3