| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -160,10 +160,10 @@ import { arrayFilter, arrayReduce, arrayExistObj, dddw, deepCopy, tcdate} from " | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import proApi from "../../utlis/proApi"; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  props: ["prForm","prAsbOpraOpts","triggerHeadSave"], | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  props: ["prForm","prAsbOpraOpts","triggerHeadSave","refreshFormId"], | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  data() { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    return { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      oldFormId:'',     //配合登记人员复制新增使用 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      itemType: [],     //项目类别 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      itemTypeIds: '', //被选中的项目类别ID | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      asbItem:[],      //左侧显示的未选组合项目 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -241,6 +241,7 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    async getPrAsb(id){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      // debugger | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      // 清空待删除、分组、套餐 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      console.log('getPrAsb(id)',`getPrAsb(${id})`) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.prAsbDels = [] | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.groupAsbs = [] | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.packageAsbs = [] | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -250,16 +251,31 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.refreshAsbitem()   | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    // 复制新增 拷贝明细项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    async copyNew(){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if(this.oldFormId){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        let result = await proApi.getPrAsb(this.oldFormId) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.prAsb = result.data | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.prAsb.forEach(e => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          e.id = ''; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          e.patientRegisterId = ''; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          e.isCharge = 'N'; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          e.checkCompleteFlag = '0' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          e.isLock = 'N' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.refreshAsbitem() | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    // 刷新未选组合项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    refreshAsbitem(){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      arrayReduce(this.asbItemAll, this.prAsb, "id=asbitemId"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.changeItemType(); // arrayReduce(this.asbItem, this.prAsb, "id=asbitemId"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.asbItemQuick = deepCopy(this.asbItemAll);       | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.quickAsb = deepCopy(this.asbItemQuick); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let asbItemAll = deepCopy(this.asbItemAll) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      arrayReduce(asbItemAll, this.prAsb, "id=asbitemId"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.changeItemType();        | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.asbItemQuick = deepCopy(asbItemAll);       | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.quickAsb = deepCopy(asbItemAll); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    handleRowClassName({ row, rowIndex }) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (row.choosed) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return 'current-row'; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -372,90 +388,36 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //保存按钮 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    // [ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //   { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //     "registerAsbitemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //     "input": { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //       "chargePrice": 0, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //       "payTypeFlag": "string", | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //       "isCharge": "string", | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //       "amount": 0, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //       "groupPackageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //     } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //   } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    // ] | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //批量更新组合项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    async batchEditAsb(body, msg) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      console.log(`/api/app/registerasbitem/updatemany`, body) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      await postapi(`/api/app/registerasbitem/updatemany`, body) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        .then((res) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          console.log("batchEditAsb", res); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          if (res.code == 1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (msg) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              //未选项目中移除,已选项中添加 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              this.getPatientRegisterAbs(this.prForm.id) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              this.$message.success(`${msg}操作成功`); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        .catch((err) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          this.$message({ type: "error", message: `${msg}操作失败,原因:${err}` }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //更新所选组合项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    async onSubmit(msg) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let body = [], insBody = [] | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (!this.prForm.id) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //this.$message.warning("请先保存人员体检基本信息!") | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let ret = false | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      ret = await this.batchAddAsb() | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if(!ret){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(msg) this.$message.warning(`组合项目 ${msg} 失败!`) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (this.prAsb.length < 1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //this.$message.warning("暂无可操作的数据") | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      ret = await this.batchDelAsb() | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if(!ret){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(msg) this.$message.warning(`组合项目 ${msg} 失败!`) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      for (let i = 0; i < this.prAsb.length; i++) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (this.prAsb[i].id) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          body.push({ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            registerAsbitemId: this.prAsb[i].id, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            input: { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              chargePrice: this.prAsb[i].chargePrice, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              payTypeFlag: this.prAsb[i].payTypeFlag, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              isCharge: this.prAsb[i].isCharge, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              amount: this.prAsb[i].amount, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              groupPackageId: this.prAsb[i].groupPackageId | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          insBody.push({ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            asbitemId: this.prAsb[i].asbitemId, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            patientRegisterId: this.prForm.id, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            standardPrice: this.prAsb[i].standardPrice, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            chargePrice: this.prAsb[i].chargePrice, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            payTypeFlag: this.prAsb[i].payTypeFlag, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            isCharge: this.prAsb[i].isCharge, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            amount: this.prAsb[i].amount, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            groupPackageId: this.prAsb[i].groupPackageId | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      //if (body.length > 0 ) await this.batchEditAsb(body, msg); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      //console.log('111111', msg, body.length, body, insBody.length, insBody); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (body.length > 0 && insBody.length > 0) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        await this.batchEditAsb(body, ''); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        await this.batchAddAsb(insBody, msg); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } else if (body.length > 0 && insBody.length < 1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        await this.batchEditAsb(body, msg); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } else if (body.length < 1 && insBody.length > 0) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        await this.batchAddAsb(insBody, msg); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      ret = await this.batchEditAsb() | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if(!ret){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(msg) this.$message.warning(`组合项目 ${msg} 失败!`) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					       | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      console.log('this.prAsbOpraOpts.formId',this.prAsbOpraOpts.formId) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if(this.prAsbOpraOpts.formId){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.refreshFormId()         | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }else{  | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //触发保存人员基本信息         | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.triggerHeadSave() | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.getPrAsb(this.prForm.id) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //未选组合项目 勾选情况 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -465,39 +427,14 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      //console.log(this.asbItemChoosed); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //批量添加组合项目     | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    async batchAddAsb(registerAsbitems, msg) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let body = { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        organizationUnitId:this.prForm.organizationUnitId, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        registerAsbitems | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if(this.prForm.organizationUnitId.id){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        body.isAutoMerger = 'N' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      //console.log(`/api/app/registerasbitem/createregisterasbitemmany`, body) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      await postapi('/api/app/registerasbitem/createregisterasbitemmany', body) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        .then((res) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          console.log("batchAddAsb", res); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          if (res.code == 1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //未选项目中移除,已选项中添加 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            this.getPatientRegisterAbs(this.prForm.id) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (msg) this.$message.success(`${msg}操作成功`); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        .catch((err) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          this.$message({ type: "error", message: `${msg}操作失败,原因:${err}` }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    // 添加组合项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    ///api/app/register-asbitem/many/3fa85f64-5717-4562-b3fc-2c963f66afa6' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    async addAbs(asbItemChoosed,oprType) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let body = [] | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    addAbs(asbItemChoosed,oprType) {       | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let checked = true | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let payTypeFlag = '0' //默认个人支付 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let lfind = -1 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					       | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      //勾选时不需要此操作  start | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if(oprType && oprType == 'all'){ | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -541,6 +478,7 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      for (let i = 0; i < asbItemChoosed.length; i++) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        let pojo = { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          asbitemId: asbItemChoosed[i].id, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          asbitemName: asbItemChoosed[i].displayName, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          patientRegisterId: this.prForm.id, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          standardPrice: asbItemChoosed[i].price, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          chargePrice: asbItemChoosed[i].price, | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -550,18 +488,10 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          amount: 1, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          total: asbItemChoosed[i].price, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }         | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        body.push(pojo) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.prAsb.push({ ...pojo, asbitemName: asbItemChoosed[i].displayName }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        lfind = arrayExistObj(this.asbItem, 'id', asbItemChoosed[i].id) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (lfind > -1) this.asbItem.splice(lfind, 1) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        lfind = arrayExistObj(this.asbItemQuick, 'id', asbItemChoosed[i].id) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (lfind > -1) this.asbItemQuick.splice(lfind, 1) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.quickAsb = deepCopy(this.asbItemQuick) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.prAsb.push(pojo) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (this.prForm.id) await this.batchAddAsb(body, '添加组合项目'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.refreshAsbitem() | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -570,36 +500,111 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.patientRegisterAbsChoosed = val | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //批量删除组合项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    async batchDelAsb(body, msg) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      console.log(`/api/app/registerasbitem/deletemany`, body) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      await postapi(`/api/app/registerasbitem/deletemany`, body) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        .then((res) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          console.log("delAbs", res); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          if (res.code != -1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //项目类别过滤 组合项目,未过滤已选择的组合项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            this.refreshAsbitem() | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //批量提交添加组合项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    async batchAddAsb() { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let ret = false | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let patientRegisterId = this.prForm.id || this.prAsbOpraOpts.formId | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if(!patientRegisterId){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.$message.warning("人员基本信息未保存"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return ret | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let registerAsbitems = [] | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (msg) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              //未选项目中移除,已选项中添加 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              this.getPatientRegisterAbs(this.prForm.id) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              this.$message.success(`${msg}操作成功`); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.prAsb.forEach(e => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(!e.id){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          registerAsbitems.push({ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            asbitemId: e.asbitemId, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            patientRegisterId, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            standardPrice: e.standardPrice, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            chargePrice: e.chargePrice, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            payTypeFlag: e.payTypeFlag, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            isCharge: e.isCharge, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            amount: e.amount, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            groupPackageId: e.groupPackageId | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if(registerAsbitems.length == 0) return true | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let body = { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        organizationUnitId:this.prForm.organizationUnitId, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        registerAsbitems, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        isAutoMerger:'Y' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      try { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        let res = await postapi('/api/app/registerasbitem/createregisterasbitemmany', body) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(res.code != -1) ret = true | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } catch (error) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        console.log('批量添加组合项目失败',error) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      return ret | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					       | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //批量提交更新组合项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    async batchEditAsb() { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let ret = false | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let body = [] | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.prAsb.forEach(e => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(e.id){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          body.push({ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            registerAsbitemId:e.id, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            input: { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              chargePrice: e.chargePrice, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              payTypeFlag: e.payTypeFlag, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              isCharge: e.isCharge, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              amount: e.amount, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              groupPackageId: e.groupPackageId | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          })           | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        .catch((err) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          this.$message({ type: "error", message: `${msg}操作失败,原因:${err}` }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if(body.length == 0) return true | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      try { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        let res = await postapi(`/api/app/registerasbitem/updatemany`, body) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(res.code != -1) ret = true | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } catch (error) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        console.log('批量提交更新组合项目失败',error) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      return ret | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //批量提交删除组合项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    async batchDelAsb() { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let ret = false | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if(this.prAsbDels.length == 0) return true | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let registerAsbitemIds=[] | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.prAsbDels.forEach(e => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        registerAsbitemIds.push(e.id) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      console.log(`/api/app/registerasbitem/deletemany`, {registerAsbitemIds}) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      try { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        let res = await postapi(`/api/app/registerasbitem/deletemany`, {registerAsbitemIds}) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(res.code != -1) ret = true | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } catch (error) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        console.log('批量删除组合项目失败',error) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      return ret | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //删除 人员已选中的组合项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    ///api/app/register-asbitem/many?RegisterAsbitemIds=3fa85f64-5717-4562-b3fc-2c963f66afa6 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    delAbs(absForDel,oprType) {       | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let body = {} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let registerAsbitemIds = [] | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let chargeComplete = '' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let lfind = -1 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let tempRd = {} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      //勾选时不需要此操作  start | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if(oprType && oprType == 'all'){ | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -620,39 +625,26 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        return | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      for (let i = 0; i < absForDel.length; i++) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //未在数据库中,直接删除 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (!absForDel[i].id) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          lfind = arrayExistObj(this.prAsb, 'asbitemId', absForDel[i].asbitemId) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          if (lfind > -1) this.prAsb.splice(lfind, 1) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          absForDel.splice(i, 1) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          i-- | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          continue | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (absForDel[i].isCharge == 'Y' || absForDel[i].checkCompleteFlag != '0') { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          chargeComplete += absForDel[i].asbitemName + ',' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          absForDel.splice(i, 1) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          i-- | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      absForDel.forEach(e => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 如果已经收费 或 体检,则不允许删除 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (e.isCharge == 'Y' || (e.checkCompleteFlag && e.checkCompleteFlag != '0')) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          chargeComplete += e.asbitemName + ','    | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }else{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          lfind = arrayExistObj(this.prAsb, 'asbitemId', e.asbitemId) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          if(lfind > -1){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            tempRd = Object.assign({},this.prAsb.splice(lfind,1)[0]) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if(e.id) this.prAsbDels.push(tempRd) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          }     | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }             | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      //刷新 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.refreshAsbitem() | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (chargeComplete) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.$message({ type: "info", message: `所选项目:${chargeComplete}已收费或已检,不可删除!` }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (absForDel.length < 1) return | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      for (let i = 0; i < absForDel.length; i++) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        registerAsbitemIds.push(absForDel[i].id) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      body = { registerAsbitemIds } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (registerAsbitemIds.length > 0 && this.prForm.id) this.batchDelAsb(body, '删除组合项目'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //双击删除已选项目 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -663,52 +655,22 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //项目类别过滤 组合项目,未过滤已选择的组合项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    changeItemType() { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      //console.log('getAsbItemByItemType', typeof this.itemTypeIds, this.itemTypeIds) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let asbItemAll = deepCopy(this.asbItemAll) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let lv = ""; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (typeof this.itemTypeIds == "object") { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(this.itemTypeIds.length > 0) lv = this.itemTypeIds[this.itemTypeIds.length - 1]; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (lv) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.asbItem = arrayFilter(this.asbItemAll, "itemTypeId", lv); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.asbItem = arrayFilter(asbItemAll, "itemTypeId", lv); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.asbItem = deepCopy(this.asbItemAll); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.asbItem = deepCopy(asbItemAll); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					       | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      arrayReduce(this.asbItem, this.prAsb, "id=asbitemId"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //体检登记的组合项目创建 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    // registerAsbitem(body) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //   console.log("registerAsbitem"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //   postapi( | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //     `/api/app/register-asbitem?CustomerOrgId=${this.prForm.customerOrgId}`, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //     body | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //   ).then((res) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //     console.log("medicalPackageAsb", res); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //     if (res.code == 1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //       //未选项目中移除,已选项中添加 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //     } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //   }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    // }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //选中分组所包含的组合项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    // async getCustomerOrgGroupAsb(customerOrgGroupId) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //   console.log(`getCustomerOrgGroupAsb /api/app/customer-org-group-detail/customer-org-group-detail-in-asbitem/${customerOrgGroupId}`); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //   getapi(`/api/app/customer-org-group-detail/customer-org-group-detail-in-asbitem/${customerOrgGroupId}`) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //     .then((res) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //       console.log("getCustomerOrgGroupAsb", res); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //       if (res.code == 1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //         this.patientRegister.customerOrgGroupAsb = res.data; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //         //移除旧分组或套餐的组合项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //         this.removeGroupPackageAsb(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //         //添加新分组的组合项目; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //         this.addCustomerOrgGroupAsb(customerOrgGroupId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //       } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //     }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    // }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //选中 分组 所包含的组合项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    getGroupAsbs(id){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if(!id){ | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -773,7 +735,7 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }else{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          //没找到则移除此项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          if(this.prAsb[i].isCharge == 'Y'){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          if(this.prAsb[i].isCharge == 'Y' || (this.prAsb[i].checkCompleteFlag && this.prAsb[i].checkCompleteFlag != '0')){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            this.prAsb[i].groupPackageId = null | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          }else{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            tempRd = Object.assign({},this.prAsb.splice(i,1)[0]) | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -789,6 +751,7 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(lfind > -1){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          tempRd = Object.assign(this.prAsbDels.splice(lfind,1)[0], | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              groupPackageId:newId, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              standardPrice:e.price, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              chargePrice:e.customerOrgGroupDetailPrice, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              payTypeFlag, | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -848,7 +811,7 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }else{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          //没找到则移除此项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          if(this.prAsb[i].isCharge == 'Y'){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          if(this.prAsb[i].isCharge == 'Y' || (this.prAsb[i].checkCompleteFlag && this.prAsb[i].checkCompleteFlag != '0')){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            this.prAsb[i].groupPackageId = null | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          }else{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            tempRd = Object.assign({},this.prAsb.splice(i,1)[0]) | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -863,6 +826,7 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(lfind > -1){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          tempRd = Object.assign(this.prAsbDels.splice(lfind,1)[0], | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              groupPackageId:newId, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              standardPrice:e.price, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              chargePrice:e.medicalPackageDetailPrice, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              payTypeFlag, | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -874,7 +838,9 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          ) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }else{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          tempRd = { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            groupPackageId:newId, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            asbitemId:e.id, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            asbitemName:e.displayName, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            patientRegisterId:this.prForm.id, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            standardPrice:e.price, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            chargePrice:e.medicalPackageDetailPrice, | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -902,6 +868,7 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    dbClickChoosedAsb(row) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.addAbs([row]); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //快速选择组合项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    quickChoosedAsb(v) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      //远程查询时,设置了 value-key 也不管用,只能取到value console.log('quickChoosedAsb',v) | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -940,80 +907,6 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    },     | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //修改 套餐/分组 所包含的组合项目 获取 套餐/分组 的组合项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    getGroupPackageAsb(typeFlag, groupPackageId) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      let delBody = {};       | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					       | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      console.log(`${url}${groupPackageId}`); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if(typeFlag == 'group'){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        getapi(`/api/app/customerorggroupdetail/getcustomerorggroupdetailinasbitem?CustomerOrgGroupId=${groupPackageId}`) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          .then((res) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            console.log("getGroupPackageAsb", res); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (res.code != -1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					               | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              //移除旧分组或套餐的组合项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              delBody = this.removeGroupPackageAsb(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              //添加或更新已选组合项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              this.addGroupPackageAsb(res.data, typeFlag,groupPackageId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              arrayReduce(this.dict.asbItem, [...this.patientRegister.patientRegisterAbs], "id=asbitemId"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              arrayReduce(this.dict.asbItemQuick, [...this.patientRegister.patientRegisterAbs], "id=asbitemId"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              //console.log('delBody', delBody,delBody['registerAsbitemIds'].length); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              if (delBody['registerAsbitemIds'].length > 0) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                return postapi(`/api/app/registerasbitem/deletemany`, delBody) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              } else {               | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                typeFlag == 'group' ? this.patientRegister.customerOrgGroupChange++ : this.patientRegister.medicalPackageChange++;       | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                if (this.form.id) this.btnSubmit('form', false); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          .then(res => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //console.log('res', res); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (res && res.code != -1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              //添加新套餐的组合项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              typeFlag == 'group' ? this.patientRegister.customerOrgGroupChange++ : this.patientRegister.medicalPackageChange++;       | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              if (this.form.id) this.btnSubmit('form', false); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }else{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        postapi('/api/app/medicalpackagedetail/getmedicalpackageinasbitem',{medicalPackageId:groupPackageId}) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          .then((res) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            console.log("getGroupPackageAsb", res); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (res.code != -1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					               | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              //移除旧分组或套餐的组合项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              delBody = this.removeGroupPackageAsb(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              //添加或更新已选组合项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              this.addGroupPackageAsb(res.data, typeFlag,groupPackageId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              arrayReduce(this.dict.asbItem, [...this.patientRegister.patientRegisterAbs], "id=asbitemId"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              arrayReduce(this.dict.asbItemQuick, [...this.patientRegister.patientRegisterAbs], "id=asbitemId"); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              //console.log('delBody', delBody,delBody['registerAsbitemIds'].length); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              if (delBody['registerAsbitemIds'].length > 0) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                return postapi(`/api/app/registerasbitem/deletemany`, delBody) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              } else {               | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                typeFlag == 'group' ? this.patientRegister.customerOrgGroupChange++ : this.patientRegister.medicalPackageChange++;       | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                if (this.form.id) this.btnSubmit('form', false); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          }) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          .then(res => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            //console.log('res', res); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (res && res.code != -1) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              //添加新套餐的组合项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              typeFlag == 'group' ? this.patientRegister.customerOrgGroupChange++ : this.patientRegister.medicalPackageChange++;       | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					              if (this.form.id) this.btnSubmit('form', false); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //修改总折扣 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    changeAllDiscount() { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -1025,7 +918,7 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        e.chargePrice = Math.round(e.standardPrice * this.discount) / 100 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        e.total = Math.round(e.standardPrice * this.discount * e.amount) / 100 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.onSubmit('') | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      // this.onSubmit('') | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -1073,7 +966,7 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      //console.log(this.prAsb[index].chargePrice,this.prAsb[index].standardPrice) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.prAsb[index].chargePrice = Math.round(this.prAsb[index].standardPrice * this.prAsb[index].discount)/100 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.prAsb[index].total = this.prAsb[index].chargePrice * this.prAsb[index].amount | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.onSubmit('') | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      // this.onSubmit('') | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //修改单价 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -1083,7 +976,7 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (!this.prAsb[index].chargePrice) return | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      //console.log(this.prAsb[index].chargePrice,this.prAsb[index].standardPrice) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.prAsb[index].discount = Math.round(this.prAsb[index].chargePrice * 10000 / this.prAsb[index].standardPrice)/100 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      this.onSubmit('') | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      // this.onSubmit('') | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //自定义计算列 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -1145,24 +1038,30 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  //监听事件 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  watch: { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //体检信息保存,触发已选组合项目保存 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    "patientRegister.saveTimes"(newVal, oldVal) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      console.log("patientRegister.saveTimes newVal:", newVal, " oldVal:", oldVal); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //配合复制新增使用 查询人员下的组合项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    "prForm.id":{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      immediate: true, // 立即执行 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      deep: true, // 深度监听复杂类型内变化 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      handler(newVal,oldVal){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.oldFormId = oldVal    | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(newVal != oldVal){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.onSubmit(''); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          if(newVal == ''){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            this.getPrAsb(newVal) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          }else if(newVal != this.prAsbOpraOpts.formId){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            this.getPrAsb(newVal) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          }           | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }      | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //查询人员下的组合项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    "prForm.id":{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      immediate: true, // 立即执行 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //人员 id 未变的情况下,触发刷新,主要针对收费 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    "prAsbOpraOpts.prAsbQuery":{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      // immediate: true, // 立即执行 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      deep: true, // 深度监听复杂类型内变化 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      handler(newVal,oldVal){         | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        console.log('watch:prForm.id:',newVal,oldVal) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        console.log('watch:prAsbOpraOpts.prAsbQuery:',newVal,oldVal) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if(newVal != oldVal){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          this.getPrAsb(newVal) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          this.getPrAsb(this.prForm.id) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -1204,7 +1103,24 @@ export default { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //复制新增 拷贝明细项目 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    "prAsbOpraOpts.copyNew":{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      // immediate: true, // 立即执行 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      deep: true, // 深度监听复杂类型内变化 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      handler(newVal, oldVal) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (newVal != oldVal) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					          this.copyNew() | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    //体检信息保存,触发已选组合项目保存 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    "prAsbOpraOpts.prAsbSave"(newVal, oldVal) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      console.log("patientRegister.saveTimes newVal:", newVal, " oldVal:", oldVal); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      if (newVal != oldVal) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        this.onSubmit(''); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					      } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					  }, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					}; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |