| 
					
					
						
							
						
					
					
				 | 
				@ -92,7 +92,7 @@ | 
			
		
		
	
		
			
				 | 
				 | 
				          <div style="display: flex;flex-wrap: wrap;"> | 
				 | 
				 | 
				          <div style="display: flex;flex-wrap: wrap;"> | 
			
		
		
	
		
			
				 | 
				 | 
				            <span style="margin-top: 6px;">未填检查时间时起始检查时间:</span> | 
				 | 
				 | 
				            <span style="margin-top: 6px;">未填检查时间时起始检查时间:</span> | 
			
		
		
	
		
			
				 | 
				 | 
				            <el-date-picker v-model="dataImportOpts.startCheckDate" type="datetime" placeholder="选择起始检查时间" align="right" | 
				 | 
				 | 
				            <el-date-picker v-model="dataImportOpts.startCheckDate" type="datetime" placeholder="选择起始检查时间" align="right" | 
			
		
		
	
		
			
				 | 
				 | 
				              :picker-options="pickerOptions" value-format="yyyy-MM-dd HH:mm:ss"> | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				              :picker-options="pickerOptions" value-format="yyyy-MM-dd HH:mm:ss" style="width:160px;" size="small"> | 
			
		
		
	
		
			
				 | 
				 | 
				            </el-date-picker> | 
				 | 
				 | 
				            </el-date-picker> | 
			
		
		
	
		
			
				 | 
				 | 
				            <span style="margin-top: 6px;">标本间隔时间:</span> | 
				 | 
				 | 
				            <span style="margin-top: 6px;">标本间隔时间:</span> | 
			
		
		
	
		
			
				 | 
				 | 
				            <el-input type="number" v-model="dataImportOpts.checkInterval" size="small" style="width:60px;margin: 0 5px;"> | 
				 | 
				 | 
				            <el-input type="number" v-model="dataImportOpts.checkInterval" size="small" style="width:60px;margin: 0 5px;"> | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
						
							
						
					
					
				 | 
				@ -274,16 +274,6 @@ export default { | 
			
		
		
	
		
			
				 | 
				 | 
				    dddw, moment, checkPagePriv, | 
				 | 
				 | 
				    dddw, moment, checkPagePriv, | 
			
		
		
	
		
			
				 | 
				 | 
				    dictInit() { | 
				 | 
				 | 
				    dictInit() { | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				      // 获取单位列表树   | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      this.getCustomerOrgTree() | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //性别(查询 仅档案用) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      getapi("/api/app/sex").then((res) => { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        if (res.code == 1) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          this.dict.sex = res.data; | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      }); | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    }, | 
				 | 
				 | 
				    }, | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				    //清空进度数据数据 | 
				 | 
				 | 
				    //清空进度数据数据 | 
			
		
		
	
	
		
			
				| 
					
					
					
						
							
						
					
				 | 
				@ -307,65 +297,6 @@ export default { | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				    }, | 
				 | 
				 | 
				    }, | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				    // 获取单位列表树 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    getCustomerOrgTree() { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      getapi("/api/app/customerorg/getbycodeall?IsHidePerson=1").then((res) => { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        // console.log("res.data", res.data); | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        if (res.code != -1) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          this.customerOrgTree = res.data; | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          let lfind = arrayExistObj(this.customerOrgTree, 'id', this.dict.personOrgId) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          if (lfind > -1) this.customerOrgTree.splice(lfind, 1) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          tcdate(this.customerOrgTree) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      }); | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    }, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    //选择单位 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    changeCustomerOrg(v) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      this.chooseCustomerOrg(v) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    }, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    //选择单位查询条件 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    changeQueryCustomerOrg(v) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      this.chooseCustomerOrg(v, 'query') | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    }, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    chooseCustomerOrg(v, obj) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      let id = '' | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      if (typeof v == 'string') { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        id = v | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } else { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        id = v[0] | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      getapi( | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        `/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${id}` | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      ).then((res) => { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        if (res.code != -1) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          if (obj == 'query') { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            this.query.customerOrgRegisterList = res.data | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            if (this.query.customerOrgRegisterList.length > 0) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				              this.query.customerOrgRegister = this.query.customerOrgRegisterList[this.query.customerOrgRegisterList.length - 1]; | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            } else { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				              this.query.customerOrgRegister = {}; | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				              // this.customerOrgGroups = []; | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          this.customerOrgRegisterList = arrayFilter(res.data, 'isComplete', 'N')  //不显示已完成的体检次数 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          if (this.customerOrgRegisterList.length > 0) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            this.customerOrgRegister = this.customerOrgRegisterList[this.customerOrgRegisterList.length - 1]; | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            // this.getCustomerOrgGroup(this.customerOrgRegister.id); | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          } else { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            this.customerOrgRegister = {}; | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            // this.customerOrgGroups = []; | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      }); | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    }, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    //第一次点下一步 | 
				 | 
				 | 
				    //第一次点下一步 | 
			
		
		
	
		
			
				 | 
				 | 
				    btnFirst() { | 
				 | 
				 | 
				    btnFirst() { | 
			
		
		
	
		
			
				 | 
				 | 
				      if (!this.peisid || this.peisid == 'null') { | 
				 | 
				 | 
				      if (!this.peisid || this.peisid == 'null') { | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
						
							
						
					
					
				 | 
				@ -764,15 +695,6 @@ export default { | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				    // 确定导入数据库 | 
				 | 
				 | 
				    // 确定导入数据库 | 
			
		
		
	
		
			
				 | 
				 | 
				    btnImport() { | 
				 | 
				 | 
				    btnImport() { | 
			
		
		
	
		
			
				 | 
				 | 
				      if (!this.customerOrgIds || this.customerOrgIds.length == 0) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        this.$message.warning("请选择单位") | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        return | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      if (!this.customerOrgRegister || !this.customerOrgRegister.id) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        this.$message.warning("请选择单位体检次数") | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        return | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				       | 
				 | 
				 | 
				       | 
			
		
		
	
		
			
				 | 
				 | 
				      this.elProgress.display = true; | 
				 | 
				 | 
				      this.elProgress.display = true; | 
			
		
		
	
		
			
				 | 
				 | 
				      this.elProgress.percentage = 0; | 
				 | 
				 | 
				      this.elProgress.percentage = 0; | 
			
		
		
	
	
		
			
				| 
					
					
					
						
							
						
					
				 | 
				@ -790,63 +712,34 @@ export default { | 
			
		
		
	
		
			
				 | 
				 | 
				      }); | 
				 | 
				 | 
				      }); | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				      //导入进行中 | 
				 | 
				 | 
				      //导入进行中 | 
			
		
		
	
		
			
				 | 
				 | 
				      this.importing(this.dataImportOpts.startRow, this.dataImportOpts.nameType) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				      this.importing(this.dataImportOpts.startRow) | 
			
		
		
	
		
			
				 | 
				 | 
				      // 开始导入时,清除选择的 文件 | 
				 | 
				 | 
				      // 开始导入时,清除选择的 文件 | 
			
		
		
	
		
			
				 | 
				 | 
				      document.getElementById('fileNames').value = ''; | 
				 | 
				 | 
				      document.getElementById('fileNames').value = ''; | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				    }, | 
				 | 
				 | 
				    }, | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				    //导入进行时 | 
				 | 
				 | 
				    //导入进行时 | 
			
		
		
	
		
			
				 | 
				 | 
				    // startRow : 从第几行开始导入,同名判断交互时,续接导入 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    // startRowNameType : 续接导入的第1行,执行 同名判断模式, 3.不提示,按新人导入(前端不用管) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    async importing(startRow, startRowNameType) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				    // startRow : 从第几行开始导入 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				    async importing(startRow) { | 
			
		
		
	
		
			
				 | 
				 | 
				      let body = {} | 
				 | 
				 | 
				      let body = {} | 
			
		
		
	
		
			
				 | 
				 | 
				      for (let i = startRow; i < this.choosedData.length; i++) { | 
				 | 
				 | 
				      for (let i = startRow; i < this.choosedData.length; i++) { | 
			
		
		
	
		
			
				 | 
				 | 
				        this.elProgress.percentage = Math.floor( | 
				 | 
				 | 
				        this.elProgress.percentage = Math.floor( | 
			
		
		
	
		
			
				 | 
				 | 
				          ((i + 1) * 100) / this.choosedData.length | 
				 | 
				 | 
				          ((i + 1) * 100) / this.choosedData.length | 
			
		
		
	
		
			
				 | 
				 | 
				        ); | 
				 | 
				 | 
				        ); | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        // 将Excel的数据转换成接口的数据 | 
				 | 
				 | 
				        // 将Excel的数据转换成接口的数据 | 
			
		
		
	
		
			
				 | 
				 | 
				        body = this.excelDataToApiBody(this.choosedData[i]) | 
				 | 
				 | 
				        body = this.excelDataToApiBody(this.choosedData[i]) | 
			
		
		
	
		
			
				 | 
				 | 
				        if (i == startRow) body.nameType = startRowNameType | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        console.log(`this.choosedData[${i}],startRowNameType,body`) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        try { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          // 同一人判断 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          if (this.choosedSameMan.patientNo) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            // 上一次循环已经判断是否同一人,此次循环不需再判断了 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            if (this.choosedSameMan.patientNo == '$newPatient$') { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				              body.nameType = '3' | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            } else { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				              body.patientNo = this.choosedSameMan.patientNo | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          } else if (startRowNameType != '3') { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            let result = await this.isSamePatient(startRowNameType, body) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            if (result.isContinue) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				              if (result.err) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				                this.tableData.push(Object.assign({ importState: '导入失败', importDes: result.err }, this.choosedData[i])) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				                continue | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				              } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            } else { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				              this.dataImportOpts.startRow = i | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				              break; // 跳出循环,重新从 i 开执行 this.importing | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				        console.log(`this.choosedData[${i}],body`,this.choosedData[i],body) | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				          // 旧接口:/api/app/patientregister/createpatientregisterexcel                                  | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          let res = await postapi('/api/app/patientregister/CreatePatientRegisterFromExcel', body) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          this.choosedSameMan = {}  // 清除选择同一人员的记录 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          if (res.code >= 0) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            this.tableData.push(Object.assign({ importState: '导入成功' }, this.choosedData[i])) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          } else { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            this.tableData.push(Object.assign({ importState: '导入失败', importDes: res.message }, this.choosedData[i])) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        } catch (error) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          this.tableData.push(Object.assign({ importState: '导入失败', importDes: `${error}` }, this.choosedData[i])) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				        // 旧接口:/api/app/patientregister/createpatientregisterexcel                                  | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				        let res = await postapi('/api/app/patientregister/CreatePatientRegisterFromExcel', body) | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				        this.choosedSameMan = {}  // 清除选择同一人员的记录 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				        if (res.code >= 0) { | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				          this.tableData.push(Object.assign({ importState: '导入成功' }, this.choosedData[i])) | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				        } else { | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				          this.tableData.push(Object.assign({ importState: '导入失败', importDes: res.message }, this.choosedData[i])) | 
			
		
		
	
		
			
				 | 
				 | 
				        } | 
				 | 
				 | 
				        } | 
			
		
		
	
		
			
				 | 
				 | 
				         | 
				 | 
				 | 
				         | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        // 结束导入 | 
				 | 
				 | 
				        // 结束导入 | 
			
		
		
	
		
			
				 | 
				 | 
				        if (i == this.choosedData.length - 1) { | 
				 | 
				 | 
				        if (i == this.choosedData.length - 1) { | 
			
		
		
	
		
			
				 | 
				 | 
				          this.elProgress.display = false; | 
				 | 
				 | 
				          this.elProgress.display = false; | 
			
		
		
	
	
		
			
				| 
					
					
					
						
							
						
					
				 | 
				@ -855,81 +748,6 @@ export default { | 
			
		
		
	
		
			
				 | 
				 | 
				      } | 
				 | 
				 | 
				      } | 
			
		
		
	
		
			
				 | 
				 | 
				    }, | 
				 | 
				 | 
				    }, | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				    // 同一人判断 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    async isSamePatient(startRowNameType, body) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      console.log('isSamePatient', startRowNameType, body) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      let result = { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        isContinue: true, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        err: '' | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      let res | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      if (body.idNo) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        try { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          res = await postapi('/api/app/patient/GetByIdNo', { idNo: body.idNo }) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          if (res.code < 0) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            result.err = `身份证号查重错误,原因:${res.message}` | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            return result | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          } else if (res.code == 1) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            body.patientNo = res.data.patientNo | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            return result | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        } catch (error) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          result.err = `身份证号查重错误,原因:${error}` | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          return result | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      // 没有身份证号或身份证号未找到同名人员时,按姓名查重 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      let url, localBody = { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        customerOrgId: body.customerOrgId, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        name: body.patientName | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      switch (startRowNameType) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        case '1': | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        case '2': | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          if (startRowNameType == '1') url = '/api/app/patientregister/GetSameNamePatient' | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          if (startRowNameType == '2') url = '/api/app/patientregister/GetCustomerOrgSameNamePatient' | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          res = await postapi(url, localBody) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          if (res.code >= 0) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            if (res.data.length > 0) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				              result.isContinue = false | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				              this.sameMans = res.data | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				              this.dialogSameMan = true | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          } else { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            result.err = `${startRowNameType == '2' ? '同单位内' : ''}同名查重错误,原因:${res.message}` | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          break; | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        default: | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          break; | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      return result | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      // if (this.choosedSameMan.patientNo) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //   body.patientNo = this.choosedSameMan.patientNo | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //   // body.patientId = this.choosedSameMan.patientId | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //   this.choosedSameMan = {} // 清除选择人员 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      // } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      // try { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //   switch (key) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //     case value: | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //       break; | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //     default: | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //       break; | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //   } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //   { dispLabel: '姓名', val: 'patientName' }, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //   { dispLabel: '性别', val: 'sexName' }, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //   { dispLabel: '年龄', val: 'age' }, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //   { dispLabel: '出生日期', val: 'birthDate' }, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //   { dispLabel: '婚姻状况', val: 'maritalStatusName' }, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //   { dispLabel: '民族', val: 'nationName' }, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //   { dispLabel: '身份证号', val: 'idNo' }, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    }, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				  | 
				 | 
				 | 
				  | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				    //将Excel的数据转换成接口的数据 | 
				 | 
				 | 
				    //将Excel的数据转换成接口的数据 | 
			
		
		
	
	
		
			
				| 
					
					
					
						
							
						
					
				 | 
				@ -938,133 +756,13 @@ export default { | 
			
		
		
	
		
			
				 | 
				 | 
				        customerOrgId: this.customerOrgIds[this.customerOrgIds.length - 1], | 
				 | 
				 | 
				        customerOrgId: this.customerOrgIds[this.customerOrgIds.length - 1], | 
			
		
		
	
		
			
				 | 
				 | 
				        customerOrgRegisterId: this.customerOrgRegister.id, | 
				 | 
				 | 
				        customerOrgRegisterId: this.customerOrgRegister.id, | 
			
		
		
	
		
			
				 | 
				 | 
				        medicalCenterId: this.peisid, | 
				 | 
				 | 
				        medicalCenterId: this.peisid, | 
			
		
		
	
		
			
				 | 
				 | 
				        nameType: this.dataImportOpts.nameType, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        completeFlag: this.dataImportOpts.completeFlag,         | 
				 | 
				 | 
				        completeFlag: this.dataImportOpts.completeFlag,         | 
			
		
		
	
		
			
				 | 
				 | 
				        isAutoCreateDepartment: this.dataImportOpts.isAutoCreateDepartment ? 'Y' : 'N', | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        isAutoCreatePatientNo: this.dataImportOpts.isAutoCreatePatientNo ? 'Y' : 'N', | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        cardStartNum: this.dataImportOpts.cardStartNum, | 
				 | 
				 | 
				        cardStartNum: this.dataImportOpts.cardStartNum, | 
			
		
		
	
		
			
				 | 
				 | 
				        cardLength: this.dataImportOpts.cardLength | 
				 | 
				 | 
				        cardLength: this.dataImportOpts.cardLength | 
			
		
		
	
		
			
				 | 
				 | 
				      } | 
				 | 
				 | 
				      } | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				      this.excelCols.forEach(e => { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        if (e.val) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          switch (e.val) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            case 'age': | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				              if (ExcelData[e.dispLabel]) body[e.val] = parseInt(ExcelData[e.dispLabel]) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				              break; | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            // case 'birthDate': | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            //   if(ExcelData[e.dispLabel]) body[e.val] = moment(new Date(ExcelData[e.dispLabel])).format('yyyy-MM-DD') | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            //   break; | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            case 'poisons': | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				              if (ExcelData[e.dispLabel]) body[e.val] = ExcelData[e.dispLabel].replaceAll(",", ",").split(",") | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				              break; | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            default: | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				              body[e.val] = ExcelData[e.dispLabel] | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				              break; | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      }) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      if (this.seq > 30) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        body.isOccupationalDisease = 'Y' | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        body.isDefaultMedicalType = 'Y' | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      return body | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    }, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    //选中同名人员档案 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    rowClickSameMan(row) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      this.choosedSameMan = deepCopy(row) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    }, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    // 同名人员,按档案人员导入 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    btnOldMan() { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      if (!this.choosedSameMan.patientNo) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        this.$message.warning("请选择要导入的档案人员") | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        return | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      this.importing(this.dataImportOpts.startRow, this.dataImportOpts.nameType) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      this.dialogSameMan = false | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    }, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    // 同名人员,按新人方式导入 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    btnNewMan() { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      this.choosedSameMan = { patientNo: '$newPatient$' } // 约定按新人导入  | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      this.importing(this.dataImportOpts.startRow, this.dataImportOpts.nameType) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      this.dialogSameMan = false | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    }, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    // 查询档案人员  | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    async getPrList() { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      let ret = false | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      if (!this.query.customerOrgIds || this.query.customerOrgIds.length == 0) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        this.$message.warning("请选择单位或部门") | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        return false | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      if (!this.query.customerOrgRegister || !this.query.customerOrgRegister.id) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        this.$message.warning("请选择单位体检次数") | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        return false | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      this.query.customerOrgId = this.query.customerOrgIds[this.query.customerOrgIds.length - 1] | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      this.query.customerOrgRegisterId = this.query.customerOrgRegister.id | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      let body = Object.assign({}, this.query) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      delete body.customerOrgIds | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      delete body.customerOrgRegister | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      delete body.customerOrgRegisterList | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      if (!body.completeFlag) delete body.completeFlag | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      if (!body.patientName) delete body.patientName | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      if (!body.startPatientNo && !body.endPatientNo) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        delete body.startPatientNo | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        delete body.endPatientNo | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } else if (!body.startPatientNo) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        this.$message.warning("请填写起始档案号") | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        return false | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } else if (!body.endPatientNo) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        this.$message.warning("请填写截止档案号") | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        return false | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      if (!body.startDate && !body.endDate) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        delete body.startDate | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        delete body.endDate | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } else if (!body.startDate) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        this.$message.warning("请填写起始登记日期") | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        return false | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } else if (!body.endDate) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        this.$message.warning("请填写截止登记日期") | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        return false | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } else { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        body.startDate = moment(new Date(body.startDate)).format('yyyy-MM-DD') | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        body.endDate = moment(new Date(body.endDate)).format('yyyy-MM-DD') | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      const loading = this.$loading({ | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        lock: true, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        text: "Loading", | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        spinner: "el-icon-loading", | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        background: "rgba(0, 0, 0, 0.7)", | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      }); | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      try { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        let res = await postapi('/api/patientregister/getpatientregisterimportlist', body) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        if (res.code != -1) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          this.prList = res.data | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          if (res.data.length == 0) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            this.$message.warning("没有符合条件的数据") | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          } else { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            ret = true | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } catch (error) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        // | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      loading.close() | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      return ret | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				       | 
				 | 
				 | 
				       | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				      return body | 
			
		
		
	
		
			
				 | 
				 | 
				    }, | 
				 | 
				 | 
				    }, | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				   | 
				 | 
				 | 
				   | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
						
							
						
					
					
				 | 
				@ -1115,82 +813,6 @@ export default { | 
			
		
		
	
		
			
				 | 
				 | 
				      } | 
				 | 
				 | 
				      } | 
			
		
		
	
		
			
				 | 
				 | 
				    }, | 
				 | 
				 | 
				    }, | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				    //获取分组 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    getGroups(customerOrgRegisterId) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      ///api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=3fa85f64-5717-4562-b3fc-2c963f66afa6 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      getapi(`/api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${customerOrgRegisterId}`).then(res => { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        if (res.code != - 1) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          this.groups = res.data; | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          this.curGroup = null  //清除已选分组 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      }) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    }, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    //确定从档案中导入数据 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    async btnImportFromDataBase() { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      let customerOrgIds = [] | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      let customerOrgId = "" | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      if (this.newCustomerOrgFlag) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        customerOrgIds = this.customerOrgIds | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } else { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        customerOrgIds = this.query.customerOrgIds | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      if (customerOrgIds && customerOrgIds.length > 0) customerOrgId = customerOrgIds[customerOrgIds.length - 1] | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      if (!customerOrgId) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        this.$message.warning("请选择新导入的体检单位或部门") | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        return | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      if (!this.curGroup || !this.customerOrgRegister) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        this.$message.warning("请选择新导入的体检次数与分组") | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        return | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      let body = { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        customerOrgRegisterId: this.customerOrgRegister.id, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        customerOrgGroupId: this.curGroup.id, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        completeFlag: this.dataImportOpts.completeFlag, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        payTypeFlag: this.payTypeFlag, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        medicalCenterId: this.peisid, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //{ | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //   "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //   "customerOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //   "customerOrgRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //   "customerOrgGroupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //   "completeFlag": "string", | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //   "payTypeFlag": "string", | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      //   "medicalCenterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      // } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      this.elProgress.display = true | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      this.elProgress.percentage = 0 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      for (let i = 0; i < this.prList.length; i++) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        this.elProgress.percentage = Math.floor(((i + 1) * 100) / this.prList.length); | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        if (!this.prList[i].choosed) continue | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        body.patientRegisterId = this.prList[i].id | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        body.customerOrgId = this.newCustomerOrgFlag ? customerOrgId : this.prList[i].customerOrgId | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        try { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          // 旧接口:/api/app/patientregister/createpatientregisterhistory | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          let res = await postapi('/api/app/patientregister/CreatePatientRegisterFromHistory', body) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          if (res.code >= 0) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            this.tableData.push(Object.assign({ importState: '导入成功' }, this.prList[i])) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          } else { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				            this.tableData.push(Object.assign({ importState: '导入失败', importDes: res.message }, this.prList[i])) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        } catch (error) { | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				          this.tableData.push(Object.assign({ importState: '导入失败', importDes: res.message }, this.prList[i])) | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				        } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      } | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      this.elProgress.display = false | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				      this.seq = -1 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    }, | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				    //通用导出 | 
				 | 
				 | 
				    //通用导出 | 
			
		
		
	
		
			
				 | 
				 | 
				    btnExport(elId) { | 
				 | 
				 | 
				    btnExport(elId) { | 
			
		
		
	
		
			
				 | 
				 | 
				      let table = document.getElementById(elId); | 
				 | 
				 | 
				      let table = document.getElementById(elId); | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
					
				 | 
				
  |