diff --git a/src/components/customerOrg/customerOrgGroupAsbitem.vue b/src/components/customerOrg/customerOrgGroupAsbitem.vue index 1caf50e..76fec1f 100644 --- a/src/components/customerOrg/customerOrgGroupAsbitem.vue +++ b/src/components/customerOrg/customerOrgGroupAsbitem.vue @@ -472,8 +472,7 @@ export default { arrayReduce(asbItemChoosed, this.customerOrgGroupAsbitems, "id=asbitemId") for (let i = asbItemChoosed.length - 1; i > - 1; i--) { - if (this.customerOrgGroup.forSexId == 'A') break //未选性别时,无需判断组合项目性别限制 - console.log(`asbItemChoosed[${i}]`,asbItemChoosed[i]) + if (this.customerOrgGroup.forSexId == 'A') break //未选性别时,无需判断组合项目性别限制 if (asbItemChoosed[i].forSexId == 'A' || asbItemChoosed[i].forSexId == 'U') continue if (asbItemChoosed[i].forSexId != this.customerOrgGroup.forSexId) { message.push(asbItemChoosed[i].displayName) //.warning(`所选项目:${asbItemChoosed[i].displayName},不适合当前人员性别`) @@ -746,19 +745,24 @@ export default { //复制分组 btnCopyGroup(){ - if(!this.customerOrgGroup.id || this.customerOrgGroup.customerOrgId){ + if(!this.customerOrgGroup.id || !this.customerOrgGroup.customerOrgId){ this.$message.warning("请先选中单位分组") return } getapi( - `/api/app/customerorggroup/getlistinfilter?CustomerOrgId=${this.customerOrgGroup.customerOrgId}` + `/api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${this.customerOrgGroup.customerOrgRegisterId}` ).then((res) => { if (res.code != -1) { this.customerOrgGroups = res.data.items; + if(this.customerOrgGroups.length <2){ + this.$message.warning("暂无其他分组可供复制") + }else{ + this.groupVisble = true + } } }); - this.groupVisble = true + }, //选中分组 diff --git a/src/views/customerOrg/customerOrgGroup.vue b/src/views/customerOrg/customerOrgGroup.vue index b62f251..e64e085 100644 --- a/src/views/customerOrg/customerOrgGroup.vue +++ b/src/views/customerOrg/customerOrgGroup.vue @@ -436,6 +436,8 @@ export default { //获取体检次数下的分组 getCustomerOrgGroup(customerOrgRegisterId) { this.isDrag = false + objCopy(this.formInit,this.form) + this.form.customerOrgRegisterId = customerOrgRegisterId this.customerOrgGroups = []; getapi( `/api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${customerOrgRegisterId}` @@ -444,7 +446,6 @@ export default { this.customerOrgGroups = res.data.items; this.customerOrgGroups.forEach((e) => { e.customerOrgRegisterId = customerOrgRegisterId; - e.customerOrgId = this.customerOrgId; }); } }); @@ -568,6 +569,7 @@ export default { let body = deepCopy(this.form); delete body.id; + delete body.customerOrgId; if (this.form.id) { //编辑