|  |  |  | @ -9,16 +9,22 @@ | 
			
		
	
		
			
				
					|  |  |  |  |       <!--  </el-button>--> | 
			
		
	
		
			
				
					|  |  |  |  |       <!--</div>--> | 
			
		
	
		
			
				
					|  |  |  |  |       <el-descriptions title="产品信息" :column="2" border style="margin-top: 5px"> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-descriptions-item label="UDI码" v-if="destroyType == 2"> | 
			
		
	
		
			
				
					|  |  |  |  |           {{prescribeData.code}} | 
			
		
	
		
			
				
					|  |  |  |  |         </el-descriptions-item> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-descriptions-item label="产品名称" >{{ prescribeData.cpmctymc }}</el-descriptions-item> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-descriptions-item label="产品标识">{{ prescribeData.nameCode }}</el-descriptions-item> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-descriptions-item label="产品规格">{{ prescribeData.ggxh }}</el-descriptions-item> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-descriptions-item label="批次号">{{ prescribeData.batchNo }}</el-descriptions-item> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-descriptions-item label="计量单位">{{ prescribeData.measname }}</el-descriptions-item> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-descriptions-item label="剩余数量">{{ prescribeData.reCount }}</el-descriptions-item> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-descriptions-item label="剩余数量" custom-style class="custom-label"> | 
			
		
	
		
			
				
					|  |  |  |  |           <el-tag size="small">{{prescribeData.reCount}}</el-tag> | 
			
		
	
		
			
				
					|  |  |  |  |           <!--<el-tag type="danger">{{ prescribeData.reCount}}</el-tag>--> | 
			
		
	
		
			
				
					|  |  |  |  |         </el-descriptions-item> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-descriptions-item label="生产日期">{{ produceDate }}</el-descriptions-item> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-descriptions-item label="失效日期">{{ expireDate }}</el-descriptions-item> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-descriptions-item label="生产企业">{{ prescribeData.manufactory }}</el-descriptions-item> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-descriptions-item label="供应商">{{ prescribeData.supName }}</el-descriptions-item> | 
			
		
	
		
			
				
					|  |  |  |  |         <!--<el-descriptions-item label="供应商">{{ prescribeData.supName }}</el-descriptions-item>--> | 
			
		
	
		
			
				
					|  |  |  |  |         <el-descriptions-item label="医保编码">{{ prescribeData.ybbm }}</el-descriptions-item> | 
			
		
	
		
			
				
					|  |  |  |  |       </el-descriptions> | 
			
		
	
		
			
				
					|  |  |  |  |       <!--<el-button type="primary" icon="el-icon-plus" sty>提交</el-button>--> | 
			
		
	
	
		
			
				
					|  |  |  | @ -52,7 +58,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  | </template> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | <script> | 
			
		
	
		
			
				
					|  |  |  |  | import { destroyOut } from '@/api/collect/IoDestroy' | 
			
		
	
		
			
				
					|  |  |  |  | import { destroyOut, destroyOutByCode } from '@/api/collect/IoDestroy' | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | export default { | 
			
		
	
		
			
				
					|  |  |  |  |   name: 'destroyOutDialog', | 
			
		
	
	
		
			
				
					|  |  |  | @ -61,6 +67,10 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |       type: Object, | 
			
		
	
		
			
				
					|  |  |  |  |       required: true | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     destroyType: { | 
			
		
	
		
			
				
					|  |  |  |  |       type: Object, | 
			
		
	
		
			
				
					|  |  |  |  |       required: true | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     closeDialog: { | 
			
		
	
		
			
				
					|  |  |  |  |       type: Function, | 
			
		
	
		
			
				
					|  |  |  |  |       required: true | 
			
		
	
	
		
			
				
					|  |  |  | @ -105,13 +115,18 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     //损耗出库 | 
			
		
	
		
			
				
					|  |  |  |  |     destroyOutOrder(){ | 
			
		
	
		
			
				
					|  |  |  |  |       if ( this.formData.count == null){ | 
			
		
	
		
			
				
					|  |  |  |  |         return this.$message.error("请输入损耗数量") | 
			
		
	
		
			
				
					|  |  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |  |       let query = { | 
			
		
	
		
			
				
					|  |  |  |  |         outCount: this.formData.count, | 
			
		
	
		
			
				
					|  |  |  |  |         remark: this.formData.remark, | 
			
		
	
		
			
				
					|  |  |  |  |         updateUser: this.$store.getters.adminId, | 
			
		
	
		
			
				
					|  |  |  |  |         createUser: this.$store.getters.adminId, | 
			
		
	
		
			
				
					|  |  |  |  |         splitFifoInv : this.prescribeData | 
			
		
	
		
			
				
					|  |  |  |  |         splitFifoInv : this.prescribeData, | 
			
		
	
		
			
				
					|  |  |  |  |         code:this.prescribeData.code, | 
			
		
	
		
			
				
					|  |  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |  |       if (this.destroyType == 1){ | 
			
		
	
		
			
				
					|  |  |  |  |         destroyOut(query).then(res => { | 
			
		
	
		
			
				
					|  |  |  |  |           if (res.code == 20000){ | 
			
		
	
		
			
				
					|  |  |  |  |             this.closeDialog() | 
			
		
	
	
		
			
				
					|  |  |  | @ -120,7 +135,32 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |             return this.$message.error(res.message) | 
			
		
	
		
			
				
					|  |  |  |  |           } | 
			
		
	
		
			
				
					|  |  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |  |       }else { | 
			
		
	
		
			
				
					|  |  |  |  |         destroyOutByCode(query).then(res => { | 
			
		
	
		
			
				
					|  |  |  |  |           if (res.code == 20000){ | 
			
		
	
		
			
				
					|  |  |  |  |             this.closeDialog() | 
			
		
	
		
			
				
					|  |  |  |  |             return this.$message.success("yes") | 
			
		
	
		
			
				
					|  |  |  |  |           }else { | 
			
		
	
		
			
				
					|  |  |  |  |             return this.$message.error("no") | 
			
		
	
		
			
				
					|  |  |  |  |           } | 
			
		
	
		
			
				
					|  |  |  |  |         }) | 
			
		
	
		
			
				
					|  |  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     }, | 
			
		
	
		
			
				
					|  |  |  |  |     destroyOutByCodeOrder(){ | 
			
		
	
		
			
				
					|  |  |  |  |       if ( this.formData.count == null){ | 
			
		
	
		
			
				
					|  |  |  |  |         return this.$message.error("请输入损耗数量") | 
			
		
	
		
			
				
					|  |  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |  |       let query = { | 
			
		
	
		
			
				
					|  |  |  |  |         outCount: this.formData.count, | 
			
		
	
		
			
				
					|  |  |  |  |         remark: this.formData.remark, | 
			
		
	
		
			
				
					|  |  |  |  |         updateUser: this.$store.getters.adminId, | 
			
		
	
		
			
				
					|  |  |  |  |         createUser: this.$store.getters.adminId, | 
			
		
	
		
			
				
					|  |  |  |  |         splitFifoInv : this.prescribeData, | 
			
		
	
		
			
				
					|  |  |  |  |         code:this.formData.code, | 
			
		
	
		
			
				
					|  |  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |   }, | 
			
		
	
		
			
				
					|  |  |  |  |   created() { | 
			
		
	
	
		
			
				
					|  |  |  | @ -130,12 +170,21 @@ export default { | 
			
		
	
		
			
				
					|  |  |  |  |     if (this.prescribeData.expireDate != null){ | 
			
		
	
		
			
				
					|  |  |  |  |       this.expireDate = this.conversionDate(this.prescribeData.expireDate) | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  |     if (this.destroyType == 2){ | 
			
		
	
		
			
				
					|  |  |  |  |       this.prescribeData.reCount = this.prescribeData.totalCount | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  |   } | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | </script> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | <style scoped> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | /* 添加自定义样式 */ | 
			
		
	
		
			
				
					|  |  |  |  | .custom-label { | 
			
		
	
		
			
				
					|  |  |  |  |   background-color: #f56c6c; /* 选择你想要的背景色 */ | 
			
		
	
		
			
				
					|  |  |  |  |   color: white; /* 文字颜色,根据背景色调整 */ | 
			
		
	
		
			
				
					|  |  |  |  |   /*padding: 5px 10px; !* 内边距 *!*/ | 
			
		
	
		
			
				
					|  |  |  |  |   /*border-radius: 4px; !* 边框圆角 *!*/ | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | </style> | 
			
		
	
	
		
			
				
					|  |  |  | 
 |