diff --git a/src/components/customerOrg/customerOrgGroupAsbitem.vue b/src/components/customerOrg/customerOrgGroupAsbitem.vue
index 30ac94f..119f9ff 100644
--- a/src/components/customerOrg/customerOrgGroupAsbitem.vue
+++ b/src/components/customerOrg/customerOrgGroupAsbitem.vue
@@ -6,9 +6,9 @@
@@ -100,6 +100,12 @@
复制套餐
+
+ 复制
+
+
+ 粘贴
+
保存
@@ -337,7 +343,7 @@ export default {
this.dict.asbItemAll.forEach(e => {
e.choosed = false
})
- this.dict.asbItem = deepCopy(this.dict.asbItemAll);
+ this.dict.asbItem = [] //deepCopy(this.dict.asbItemAll);
this.dict.asbItemQuick = deepCopy(res.data);
this.quickAsb = deepCopy(res.data);
}
@@ -441,26 +447,25 @@ export default {
},
//项目类别过滤 组合项目,未过滤已选择的组合项目
- getAsbItemByItemTypeAll() {
- //console.log('getAsbItemByItemType', typeof this.itemTypeIds, this.itemTypeIds)
+ changeItemTypeIds(data) {
+ //console.log('refAsbItemByChoosed', typeof this.itemTypeIds, this.itemTypeIds)
let lv = "";
- if (typeof this.itemTypeIds === "object") {
+ if (typeof data === "object") {
lv = this.itemTypeIds[this.itemTypeIds.length - 1];
}
if (lv) {
this.dict.asbItem = arrayFilter(this.dict.asbItemAll, "itemTypeId", lv);
} else {
- this.dict.asbItem = deepCopy(this.dict.asbItemAll);
+ this.dict.asbItem = [] //deepCopy(this.dict.asbItemAll);
}
//console.log('lv,this.dict.asbItem', lv, this.dict.asbItem)
this.dict.asbItemQuick = deepCopy(this.dict.asbItemAll);
},
- //按项目类别显示组合项目,并过滤已选择的组合项目
- getAsbItemByItemType() {
- this.getAsbItemByItemTypeAll()
+ //按项目类别显示组合项目,并过滤已选择的组合项目 // 刷新快速选择数据集
+ refAsbItemByChoosed() {
//刷新显示 未选组合项目
arrayReduce(this.dict.asbItem, [...this.customerOrgGroupAsbitems], "id=asbitemId");
arrayReduce(this.dict.asbItemQuick, [...this.customerOrgGroupAsbitems], "id=asbitemId");
@@ -574,8 +579,8 @@ export default {
lfind = arrayExistObj(this.dict.asbItem, 'id', asbItemChoosed[i].id)
if (lfind > -1) this.dict.asbItem.splice(lfind, 1)
- lfind = arrayExistObj(this.dict.asbItemQuick, 'id', asbItemChoosed[i].id)
- if (lfind > -1) this.dict.asbItemQuick.splice(lfind, 1)
+ //按项目类别显示组合项目,并过滤已选择的组合项目 // 刷新快速选择数据集
+ this.refAsbItemByChoosed()
}
@@ -692,19 +697,23 @@ export default {
return
}
- for (let i = 0; i < absForDel.length; i++) {
+ for (let i = absForDel.length - 1; i > -1; i--) {
lfind = arrayExistObj(this.customerOrgGroupAsbitems, 'asbitemId', absForDel[i].asbitemId)
if (lfind > -1) this.customerOrgGroupAsbitems.splice(lfind, 1)
+ lfind = arrayExistObj(this.dict.asbItemAll,'id',absForDel[i].asbitemId)
+ if (lfind > -1) this.dict.asbItem.push(this.dict.asbItemAll[lfind])
+
absForDel.splice(i, 1)
- i--
continue
}
- //刷新
- this.getAsbItemByItemType()
+ if(Array.isArray(this.itemTypeIds) && this.itemTypeIds.length > 0 ) this.changeItemTypeIds(this.itemTypeIds)
+
+ //按项目类别显示组合项目,并过滤已选择的组合项目 // 刷新快速选择数据集
+ this.refAsbItemByChoosed()
},
@@ -1021,15 +1030,44 @@ export default {
).then((res) => {
if (res.code != -1) {
this.customerOrgGroupAsbitems = res.data;
- this.getAsbItemByItemType()
+ //按项目类别显示组合项目,并过滤已选择的组合项目 // 刷新快速选择数据集
+ this.refAsbItemByChoosed()
}
});
} else {
this.customerOrgGroupAsbitems = []
- this.getAsbItemByItemType()
+ //按项目类别显示组合项目,并过滤已选择的组合项目 // 刷新快速选择数据集
+ this.refAsbItemByChoosed()
+ }
+ },
+
+ // 快速复制/粘贴 分组项目
+ btnCopyGroupAsbitem(){
+ if(this.customerOrgGroupAsbitems.length == 0){
+ this.$message.warning({showClose:true,message:'没有可复制的项目,请先选择分组'})
+ return
}
+ this.dataTransOpts.copyGroupAsbitem = deepCopy(this.customerOrgGroupAsbitems)
+ this.$message.success({showClose:true,message:'操作成功!'})
},
+ // 快速复制/粘贴 分组项目
+ btnPastGroupAsbitem(){
+ let lfind = -1
+
+ this.dataTransOpts.copyGroupAsbitem.forEach(e => {
+ lfind = arrayExistObj(this.customerOrgGroupAsbitems,'asbitemId',e.asbitemId)
+ if(lfind == -1){
+ let pojo = Object.assign({},e,{id:Date.now(),})
+ this.customerOrgGroupAsbitems.push(pojo)
+ }
+ });
+ this.dataTransOpts.copyGroupAsbitem = []
+ this.refAsbItemByChoosed()
+ this.$message.success({showClose:true,message:'操作成功!'})
+ }
+
+
},
//监听事件
diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue
index afa5479..9edb723 100644
--- a/src/components/patientRegister/PatientRegisterEdit.vue
+++ b/src/components/patientRegister/PatientRegisterEdit.vue
@@ -636,7 +636,7 @@
:append-to-body="true">
+ filterable popper-class="example" :props="{ checkStrictly: true, expandTrigger: 'hover',...customerOrg.treeprops, leaf: 'isLeaf' }" size="small">