From a4945c89ee72aa8b6f2c0a75653a3256a2b30b4f Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 16 五月 2024 19:02:57 +0800
Subject: [PATCH] 提交一把
---
company/src/components/enterprise/selectEmployees.vue | 182 ++++++++++++++++++++++++---------------------
1 files changed, 97 insertions(+), 85 deletions(-)
diff --git a/company/src/components/enterprise/selectEmployees.vue b/company/src/components/enterprise/selectEmployees.vue
index 365c51c..b5b98a9 100644
--- a/company/src/components/enterprise/selectEmployees.vue
+++ b/company/src/components/enterprise/selectEmployees.vue
@@ -42,92 +42,104 @@
</template>
<script>
- import BaseOpera from '@/components/base/BaseOpera'
- import GlobalWindow from '@/components/common/GlobalWindow'
- import { findListByDTO } from '@/api/business/member'
- export default {
- name: 'selectEmployees',
- extends: BaseOpera,
- components: { GlobalWindow },
- data () {
- return {
- val: '',
- list: [],
- price: '',
- insuranceApplyId: '',
- notInInsuranceApplyId: '',
- seleData: [],
- oldList: []
- }
- },
- created () {
- this.config({
- api: '/business/dispatchUnit',
- 'field.id': 'id'
- })
- },
- methods: {
- open (title, obj) {
- this.insuranceApplyId = ''
- this.notInInsuranceApplyId = ''
- this.price = obj.price
- this.oldList = obj.arr
- this.list = []
- if (obj.insuranceApplyId) {
- this.insuranceApplyId = obj.insuranceApplyId
- }
- if (obj.notInInsuranceApplyId) {
- this.notInInsuranceApplyId = obj.notInInsuranceApplyId
- }
- 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++) {
- if (this.seleData[i].name === this.oldList[a].memberName || 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) {
- 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,
- insuranceApplyId: this.insuranceApplyId,
- notInInsuranceApplyId: this.notInInsuranceApplyId
- }).then(res => {
- res.forEach(item => {
- item.fee = ''
- })
- this.list = res
- })
- }
- }
+import BaseOpera from '@/components/base/BaseOpera'
+import GlobalWindow from '@/components/common/GlobalWindow'
+import { findListByDTO } from '@/api/business/member'
+export default {
+ name: 'selectEmployees',
+ extends: BaseOpera,
+ components: { GlobalWindow },
+ data () {
+ return {
+ type: '',
+ val: '',
+ list: [],
+ price: '',
+ insuranceApplyId: '',
+ notInInsuranceApplyId: '',
+ validTime: '',
+ seleData: [],
+ oldList: []
}
+ },
+ created () {
+ this.config({
+ api: '/business/dispatchUnit',
+ 'field.id': 'id'
+ })
+ },
+ methods: {
+ 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,
+ insuranceApplyId: this.insuranceApplyId,
+ notInInsuranceApplyId: this.notInInsuranceApplyId,
+ validTime: this.validTime
+ }).then(res => {
+ res.forEach(item => {
+ item.reducePrice = item.fee
+ item.fee = ''
+ })
+ this.list = res
+ })
+ }
+ }
+}
</script>
<style lang="scss" scoped>
--
Gitblit v1.9.3