| 
					
				 | 
			
			
				@@ -12,6 +12,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-button type="danger" icon="Remove" @click="drugBarRepeat" style="margin-left: 5px">去重</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-button type="warning" icon="Filter" @click="matchCodgData" style="margin-left: 5px">匹配</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-button type="success" icon="Select" @click="saveMatchCodgData" style="margin-left: 5px" v-if="confirmFlag !== 1">保存</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <el-button type="success" icon="Select" @click="saveMatchCodgData" style="margin-left: 5px" v-if="chargeFlag === 1">变更</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-button type="danger" v-show="setlText" disabled :icon="Star"><span style="font-size: 14px">医保病人</span></el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </header> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <div class="layout_display_flex_y"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -39,11 +40,11 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-row :gutter="5"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <el-col :span="3"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-divider content-position="left">追溯码采集信息</el-divider> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <el-input v-model="codgLine" type="textarea" rows="36"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-input v-model="codgLine" type="textarea" :rows="36"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <el-col :span="3"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-divider content-position="left">追溯码检查信息</el-divider> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <el-input v-model="drugTracCodgAt" type="textarea" rows="36"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-input v-model="drugTracCodgAt" type="textarea" :rows="36"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <el-col :span="18"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-divider content-position="left">追溯码匹配信息</el-divider> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -82,7 +83,8 @@ import { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   selectMatchCodgInfo, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   selectMzCfDetail, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   selectMzDrugTracCodgData, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  updateMzDrugCodgData 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  updateMzDrugCodgData, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  updateMzDrugCodgDataNew 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } from "@/api/yp-codg/yp-codg-match.js"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import {isEmpty} from "xe-utils"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import {ElMessage, ElMessageBox} from "element-plus"; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -96,6 +98,8 @@ const codgTotal = ref(0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 // 处方匹配的追溯码信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const codgInfo = ref([]) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const confirmFlag = ref(0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// 已经发药了,变更追溯码信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+const chargeFlag = ref(0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const emit = defineEmits(['close', 'closeYpMzCodgMatch']) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const props = defineProps({ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -108,6 +112,7 @@ onMounted( () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   nextTick(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     mzCfData.value = props.ypMzCfData 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     confirmFlag.value = props.ypMzCfData.confirmFlag 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    chargeFlag.value = props.ypMzCfData.flag 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     setlText.value = props.ypMzCfData.setlId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     queryMzCfDetail() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     queryMzDrugCodgMatch() 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -116,6 +121,7 @@ onMounted( () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 watch(() => props.ypMzCfData, () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   mzCfData.value = props.ypMzCfData 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   confirmFlag.value = props.ypMzCfData.confirmFlag 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  chargeFlag.value = props.ypMzCfData.flag 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   setlText.value = props.ypMzCfData.setlId 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -279,25 +285,42 @@ const saveMatchCodgData = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  ElMessageBox.confirm('确定保存药品匹配信息?', { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  let tips = "确定保存药品匹配信息?" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  if(chargeFlag.value === 1){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    tips = "确定变更药品匹配信息?【友情提示:已经上传医保的追溯码,请取消上传再变更追溯码信息!】" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  ElMessageBox.confirm(tips, { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     cancelButtonText: '取消', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     confirmButtonText: '确定', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     type: 'warning', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     distinguishCancelAndClose: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     dangerouslyUseHTMLString: true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }).then(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    updateMzDrugCodgData(codgInfo.value).then((res) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      if(res.code === 0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ElMessage({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          type: "success", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          message: res.message, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          duration: 2500, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          showClose: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        emit('closeYpMzCodgMatch', true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    if(chargeFlag.value === 1){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      updateMzDrugCodgDataNew(codgInfo.value).then((res) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(res.code === 0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          ElMessage({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            type: "success", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            message: res.message, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            duration: 2500, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            showClose: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          emit('closeYpMzCodgMatch', true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      updateMzDrugCodgData(codgInfo.value).then((res) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(res.code === 0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          ElMessage({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            type: "success", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            message: res.message, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            duration: 2500, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            showClose: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          emit('closeYpMzCodgMatch', true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }).catch((action) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if (action === 'cancel') { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       console.log("已取消。。。") 
			 |