From 3011b9800d6c5bee031d87bc4e225b5b1fb52571 Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期六, 23 十一月 2024 09:19:21 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/2.0.1' into 2.0.1 --- company/src/components/enterprise/addEmployeeWithDu.vue | 51 ++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 38 insertions(+), 13 deletions(-) diff --git a/company/src/components/enterprise/addEmployeeWithDu.vue b/company/src/components/enterprise/addEmployeeWithDu.vue index 7565552..80b00ca 100644 --- a/company/src/components/enterprise/addEmployeeWithDu.vue +++ b/company/src/components/enterprise/addEmployeeWithDu.vue @@ -14,7 +14,7 @@ <el-form-item label="韬唤璇佸彿" required> <el-input v-model="item.idCard" maxlength="18" placeholder="璇疯緭鍏�"></el-input> </el-form-item> - <el-form-item label="娲鹃仯鍗曚綅" > + <el-form-item label="娲鹃仯鍗曚綅" v-if="hasDispatchUnit !== 1"> <el-select v-model="item.duId" @change="selectChange(index)" placeholder="璇烽�夋嫨" clearable> <el-option v-for="item in dispatching" @@ -57,6 +57,8 @@ tempIndex: -1, dispatching: [], solutionId: null, + companyId: null, + hasDispatchUnit: null, list: [ { memberName: '', @@ -79,6 +81,8 @@ this.visible = true this.tempIndex = tempIndex this.solutionId = obj.solutionId + this.companyId = obj.companyId + this.hasDispatchUnit = obj.hasDispatchUnit this.dispatching = [] this.list = [ { @@ -94,7 +98,14 @@ ] this.arr = obj.arr this.price = obj.price - this.getFindListByDTO() + if (obj.hasDispatchUnit === 1) { + this.getFindListByDTO() + } else { + worktype({ id: obj.solutionId, queryType: 0 }) + .then(res => { + this.list[0].options = res + }) + } }, getFindListByDTO () { findListByDTO({ @@ -128,17 +139,31 @@ }) }, add () { - this.list.push({ - memberName: '', - idCard: '', - workTypeName: '', - worktypeId: '', - duName: '', - duId: '', - options: [], - fee: '', - id: this.tempIndex - 1 - }) + if (!this.companyId) { + this.list.push({ + memberName: '', + idCard: '', + workTypeName: '', + worktypeId: '', + duName: '', + duId: '', + options: [], + fee: '', + id: this.tempIndex - 1 + }) + } else { + this.list.push({ + memberName: '', + idCard: '', + workTypeName: '', + worktypeId: '', + duName: '', + duId: '', + options: JSON.parse(JSON.stringify(this.list[0].options)), + fee: '', + id: this.tempIndex - 1 + }) + } }, dele (index) { this.list.splice(index, 1) -- Gitblit v1.9.3