From 8a266df75e912cc4ff49bc504db5b6b26f152892 Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期五, 07 六月 2024 17:34:31 +0800 Subject: [PATCH] 提交一把 --- company/src/components/enterprise/selectEmployees.vue | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 56 insertions(+), 2 deletions(-) diff --git a/company/src/components/enterprise/selectEmployees.vue b/company/src/components/enterprise/selectEmployees.vue index b5b98a9..db719bb 100644 --- a/company/src/components/enterprise/selectEmployees.vue +++ b/company/src/components/enterprise/selectEmployees.vue @@ -6,7 +6,26 @@ :confirm-working="isWorking" @confirm="confirm" > - <el-input v-model="val" placeholder="鏌ヨ鍛樺伐濮撳悕" @keypress.enter.native="getList" style="margin-bottom: 15px;"></el-input> + <el-select + v-model="memberIds" + filterable + multiple + remote + style="margin-bottom: 15px;width: 50%;margin-right: 10px" + placeholder="璇疯緭鍏ュ憳宸ュ鍚嶆垨韬唤璇佸彿" + :remote-method="searchSelData" + :loading="loading"> + <el-option + v-for="item in memberList" + :key="item.id" + :label="item.name+' ' +(item.idcardNo||'')" + :value="item.id"> + </el-option> + </el-select> +<!-- + <el-input v-model="val" placeholder="璇疯緭鍏ュ憳宸ュ鍚嶅悗锛岀偣鍑绘悳绱㈡寜閽垨鑰呮寜涓媏nter閿繘琛屾煡璇�" @keypress.enter.native="getList" style="margin-bottom: 15px;width: 50%;margin-right: 10px"></el-input> +--> + <el-button type="primary" @click="getList" style="width: 100px;">鎼滅储</el-button> <el-table :data="list" border @@ -38,6 +57,10 @@ label="鎵�灞炲伐绉�"> </el-table-column> </el-table> + <template v-slot:footer> + <el-button type="primary" :loading="confirming" @click="confirm">纭畾</el-button> + <el-button @click="visible=false">杩斿洖</el-button> + </template> </GlobalWindow> </template> @@ -51,8 +74,12 @@ components: { GlobalWindow }, data () { return { + confirming:false, type: '', val: '', + memberIds:[], + loading:false, + memberList:[], list: [], price: '', insuranceApplyId: '', @@ -74,6 +101,7 @@ this.notInInsuranceApplyId = '' this.val = '' this.price = obj.price + this.confirming=false this.oldList = obj.arr if (obj.type) { this.type = obj.type @@ -90,9 +118,13 @@ } this.title = title this.visible = true - this.getList() + // this.getList() }, confirm () { + if(this.confirming){ + return + } + this.confirming=true if (this.seleData.length === 0) { this.$message.warning('鑷冲皯閫夋嫨涓�椤瑰唴瀹�') return @@ -119,14 +151,20 @@ item.fee = this.price }) this.$emit('result', this.seleData) + this.confirming=false this.visible = false }, handleSelectionChange (e) { this.seleData = e }, getList () { + if(this.memberIds ==null || !this.memberIds.length){ + this.$message.error('璇锋悳绱㈡妫�鏌ヤ汉鍛樹俊鎭悗杩涜鎼滅储锛�') + return; + } findListByDTO({ name: this.val, + subtractMemberIds:this.memberIds, insuranceApplyId: this.insuranceApplyId, notInInsuranceApplyId: this.notInInsuranceApplyId, validTime: this.validTime @@ -137,6 +175,22 @@ }) this.list = res }) + }, + searchSelData (query) { + if (query !== '') { + this.loading = true; + findListByDTO({ + name: query, + insuranceApplyId: this.insuranceApplyId, + notInInsuranceApplyId: this.notInInsuranceApplyId, + validTime: this.validTime + }).then(res => { + this.loading = false + this.memberList = res + }).finally(() => { + this.loading = false + }) + } } } } -- Gitblit v1.9.3