|  |  | @ -698,17 +698,22 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |       <el-form :model="filterQueryDrugLevel" class="query-form" label-width="100px"> |  |  |  |       <el-form :model="filterQueryDrugLevel" class="query-form" label-width="100px"> | 
			
		
	
		
		
			
				
					
					|  |  |  |         <el-row> |  |  |  |         <el-row> | 
			
		
	
		
		
			
				
					
					|  |  |  |           <el-col :span="8"> |  |  |  |           <el-col :span="6"> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             <el-form-item label="层级标识:"> |  |  |  |             <el-form-item label="层级标识:"> | 
			
		
	
		
		
			
				
					
					|  |  |  |               <el-input v-model="filterQueryDrugLevel.nameCode" placeholder="请输入层级标识" clearable></el-input> |  |  |  |               <el-input v-model="filterQueryDrugLevel.nameCode" placeholder="请输入层级标识" clearable></el-input> | 
			
		
	
		
		
			
				
					
					|  |  |  |             </el-form-item> |  |  |  |             </el-form-item> | 
			
		
	
		
		
			
				
					
					|  |  |  |           </el-col> |  |  |  |           </el-col> | 
			
		
	
		
		
			
				
					
					|  |  |  |           <el-col :span="8"> |  |  |  |           <el-col :span="6"> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |             <el-form-item label="通用名称:"> |  |  |  |             <el-form-item label="通用名称:"> | 
			
		
	
		
		
			
				
					
					|  |  |  |               <el-input v-model="filterQueryDrugLevel.cpmctymc" placeholder="请输入通用名称" clearable></el-input> |  |  |  |               <el-input v-model="filterQueryDrugLevel.cpmctymc" placeholder="请输入通用名称" clearable></el-input> | 
			
		
	
		
		
			
				
					
					|  |  |  |             </el-form-item> |  |  |  |             </el-form-item> | 
			
		
	
		
		
			
				
					
					|  |  |  |           </el-col> |  |  |  |           </el-col> | 
			
		
	
		
		
			
				
					
					|  |  |  |           <el-col :span="8"> |  |  |  |           <el-col :span="6"> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             <el-form-item label="批准文号:"> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               <el-input v-model="filterQueryDrugLevel.approvalNum" placeholder="请输入批准文号" clearable></el-input> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             </el-form-item> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           </el-col> | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |           <el-col :span="6"> | 
			
		
	
		
		
			
				
					
					|  |  |  |             <div style=" float: right; |  |  |  |             <div style=" float: right; | 
			
		
	
		
		
			
				
					
					|  |  |  |                         text-align: right; |  |  |  |                         text-align: right; | 
			
		
	
		
		
			
				
					
					|  |  |  |                         margin-bottom: 8px; |  |  |  |                         margin-bottom: 8px; | 
			
		
	
	
		
		
			
				
					|  |  | @ -769,7 +774,7 @@ import { | 
			
		
	
		
		
			
				
					
					|  |  |  |   updatetDrug, |  |  |  |   updatetDrug, | 
			
		
	
		
		
			
				
					
					|  |  |  |   delDrugLevel, |  |  |  |   delDrugLevel, | 
			
		
	
		
		
			
				
					
					|  |  |  |   updateLevelDrug, calculateDistCount, calculateUseCount, |  |  |  |   updateLevelDrug, calculateDistCount, calculateUseCount, | 
			
		
	
		
		
			
				
					
					|  |  |  |   getDrugLevelList, getDrugLevelListBycode |  |  |  |   getDrugLevelList,getDrugLevelListBycode,updateLevelDrugAli | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | } from '@/api/basic/product/drugUdiinfos' |  |  |  | } from '@/api/basic/product/drugUdiinfos' | 
			
		
	
		
		
			
				
					
					|  |  |  | import { isBlank } from '@/utils/strUtil' |  |  |  | import { isBlank } from '@/utils/strUtil' | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | @ -1180,73 +1185,26 @@ export default { | 
			
		
	
		
		
			
				
					
					|  |  |  |       }).catch(() => { |  |  |  |       }).catch(() => { | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  |     }, |  |  |  |     }, | 
			
		
	
		
		
			
				
					
					|  |  |  |     selectDrugLevelItem(row) { |  |  |  |     selectDrugLevelItem(row){ | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       getDrugLevelListBycode({nameCode: row.nameCode}).then((response) => { |  |  |  |       var drug = { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         if (response.code == 20000) { |  |  |  |         "nameCode":row.nameCode, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           if (response.data.length > 0) { |  |  |  |         "uuid":this.newProductData.uuid, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             response.data.forEach(item => { |  |  |  |         "ybbm":this.newProductData.ybbm, | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |               let parts = item.bzgg.split('/'); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               const levels = item.packRatio.split(":").map(Number); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               const calculatedLevels = [levels[0]]; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               for (let i = levels.length - 1; i > 0; i--) { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 const ratio = levels[i] / levels[i - 1]; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 calculatedLevels.unshift(ratio); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               calculatedLevels.reverse(); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               let selectedValue = calculatedLevels[item.packLevel - 1]; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               if (item.packLevel == 1) { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 selectedValue = this.extractNumber(this.newProductData.bzgg) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 item.xjdw = this.extractUnitAfterNumber(this.newProductData.bzgg) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               // const ratioParts = item.packRatio.split(':'); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               // let selectedValue; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               // if (item.packLevel >= 0 && item.packLevel < ratioParts.length) { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               //   selectedValue = ratioParts[item.packLevel]; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               // } else { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               //   selectedValue = 1; // 或者你可以设置一个默认值 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               // } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               let editQuery = { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 nameCode: item.nameCode, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 packLevel: item.packLevel, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 packUnit: parts[1] || '', |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 bhxjsl: selectedValue, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 relId: this.newProductData.rlId, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 uuid: this.newProductData.uuid, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 productId: item.productId, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 diType: item.packLevel == 1 ? 1 : 4, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 xjdw: item.xjdw |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       } |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |               updateLevelDrug(editQuery).then(res => { |  |  |  |       // console.log('drug',drug) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 this.saveLoading = false |  |  |  |       updateLevelDrugAli(drug).then((response) => { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 if (res.code == 20000) { |  |  |  |         if (response.code == 20000) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                   this.detailList.push({ |  |  |  |           // this.selectedIndex = this.detailList.length - 1 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     nameCode: item.nameCode, |  |  |  |           // this.isSave = false | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     packLevel: item.packLevel, |  |  |  |           this.selectDrugLevelVisible = false | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     packUnit: parts[1] || '', |  |  |  |           this.getDiLevel() | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     bhxjsl: selectedValue, |  |  |  |           this.getDetailList() | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     diType: item.packLevel == 1 ? 1 : 4, |  |  |  |           this.getThirdSysDetail() | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     isDisabled: false, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     rowDisabled: false, |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                     isUpDisabled: true |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                   }) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |               }) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |             }) |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |           } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |       }).catch(() => { |  |  |  |       }).catch(() => { | 
			
		
	
		
		
			
				
					
					|  |  |  |       }) |  |  |  |       }) | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |       this.newProductData.productId = null |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       this.selectedIndex = this.detailList.length - 1 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       this.isSave = false |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       this.selectDrugLevelVisible = false |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |       this.getDetailList() |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |     , |  |  |  |     , | 
			
		
	
		
		
			
				
					
					|  |  |  |     addDrugLevel() { |  |  |  |     addDrugLevel() { | 
			
		
	
	
		
		
			
				
					|  |  | 
 |