-
+
@@ -378,12 +380,30 @@
-
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -398,20 +418,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -635,16 +642,23 @@ const dictList = ref([
{ label: '字典', prop: 'label' }
])
-const formData = ref({
- apply_date: '',
-}) //申请单信息
+
const xkPatientInfo = ref({}) //病人信息
const xkTransfuseApply = ref({
agreement_ink: 'Y',
bill_type: '正常',
- apply_type: '001'
+ apply_type: '001',
+ apply_date: '',
+ apply_medic: userInfo.name
}) //输血申请信息
+const formRef = useTemplateRef('formRef')
+const formRules = reactive({
+ assess_bill_no: [{ required: true, message: '请选择评估单', trigger: 'change' }],
+ apply_type: [{ required: true, message: '请选择申请类型', trigger: 'change' }],
+ use1_date: [{ required: true, message: '请选择预定输血日期', trigger: 'change' }],
+ dept_Type: [{ required: true, message: '请选择科室类型', trigger: 'change' }],
+})
// 根据单据状态获取单元格样式(背景色+白色文字)
const cellStyle = ({ row, column, rowIndex, columnIndex }) => {
if (column.label == '单据状态') {
@@ -687,13 +701,19 @@ const bloodFormRules = reactive({
validator: (rule: any, value: number, callback: Function) => {
if (value <= 0) {
callback(new Error('申请血量必须大于0'))
+ } else if (bloodForm.unit == 'ml' && value < 25) {
+ callback(new Error('申请血量必须大于等于25ml'))
+ } else if (bloodForm.unit == 'u' && value > 25) {
+ callback(new Error('申请血量必须小于25'))
} else {
callback()
}
},
trigger: 'blur'
}
- ]
+ ],
+ intent: [{ required: true, message: '请选择输血目的', trigger: 'change' }],
+ causalis: [{ required: true, message: '请选择输血指征', trigger: 'change' }],
})
//流程节点
@@ -804,14 +824,17 @@ const addHandle = () => {
xkTransfuseApply.value = {
agreement_ink: 'Y',
bill_type: '正常',
- apply_type: '001'
- }
- bloodList.value = []
- formData.value = {
+ apply_type: '001',
assess_bill_no: ''
}
+ bloodList.value = []
+
getServerTime().then(time => {
- formData.value.apply_date = time
+ xkTransfuseApply.value.apply_date = time
+ xkTransfuseApply.value.use1_date = time
+ nextTick(() => {
+ formRef.value?.clearValidate()
+ })
})
getLisProject()
}
@@ -955,6 +978,7 @@ const goHistoryBlood = () => {
const openBloodDialog = () => {
editIndex.value = -1
resetBloodForm()
+ bloodForm.apply_bloodtype = xkPatientInfo.value.abo
bloodDialogVisible.value = true
}
@@ -1023,70 +1047,75 @@ const blHandle = () => {
//保存申请单
const handleSubmit = async () => {
- if (!bloodList.value.length) return ElMessage.error('请添加血液品种')
- // 申请类型 003 || 002 手术信息必填校验
- if (xkTransfuseApply.value.apply_type === '003' || xkTransfuseApply.value.apply_type === '002') {
- if (!xkTransfuseApply.value.operation_name || !xkTransfuseApply.value.operation_level) {
- return ElMessage.error('请完善手术名称、级别信息')
- }
- }
- saveLoading.value = true
- const tempPatient = { ...xkPatientInfo.value, beinhos_id: xkTransfuseApply.value.beinhos_id }
+ formRef.value.validate((valid) => {
+ if (valid) {
+ if (!bloodList.value.length) return ElMessage.error('请添加血液品种')
+ // 申请类型 003 || 002 手术信息必填校验
+ if (xkTransfuseApply.value.apply_type === '003' || xkTransfuseApply.value.apply_type === '002') {
+ if (!xkTransfuseApply.value.operation_name || !xkTransfuseApply.value.operation_level) {
+ return ElMessage.error('请完善手术名称、级别信息')
+ }
+ }
+ saveLoading.value = true
+ const tempPatient = { ...xkPatientInfo.value, beinhos_id: xkTransfuseApply.value.beinhos_id }
- const data = {
- transfuseApplyInfoOne: {
- xkPatientInfo: tempPatient,
- xkTransfuseApply: xkTransfuseApply.value
- },
- xkTransfuseApplyBloodbreedList: bloodList.value,
- xkTransfuseApplyTestitemList: lisProject.value,
- }
+ const data = {
+ transfuseApplyInfoOne: {
+ xkPatientInfo: tempPatient,
+ xkTransfuseApply: xkTransfuseApply.value
+ },
+ xkTransfuseApplyBloodbreedList: bloodList.value,
+ xkTransfuseApplyTestitemList: lisProject.value,
+ }
- checkSelfBlood({ beinhos_id: xkTransfuseApply.value.beinhos_id }).then((res) => {
- if (res.code == 0) {
- checkCausalis(data).then((res1) => {
- if (res1.code == 0) {
- savePreApplyInfo(data).then((res2) => {
- if (res2.code == 0) {
- saveApplyInfo(data).then((res3) => {
- if (res3.code == 0) {
- ElMessage.success('保存成功')
+ checkSelfBlood({ beinhos_id: xkTransfuseApply.value.beinhos_id }).then((res) => {
+ if (res.code == 0) {
+ checkCausalis(data).then((res1) => {
+ if (res1.code == 0) {
+ savePreApplyInfo(data).then((res2) => {
+ if (res2.code == 0) {
+ saveApplyInfo(data).then((res3) => {
+ if (res3.code == 0) {
+ ElMessage.success('保存成功')
+ getSqdList()
+ }
+ })
+ } else if (res2.code == 1) {
getSqdList()
+ ElMessage.success(res2.msg)
+ } else if (res2.code == 2) {
+ //2 弹窗提示
+ ElMessageBox.confirm(res2.msg, '提示',
+ {
+ confirmButtonText: '是',
+ cancelButtonText: '否',
+ type: 'warning',
+ showClose: false,
+ closeOnClickModal: false,
+ closeOnPressEscape: false,
+ }
+ ).then(() => {
+ getQueryOneInfo(res2.data)
+ }).catch(() => {
+ saveApplyInfo(data).then((res3) => {
+ if (res3.code == 0) {
+ getSqdList()
+ ElMessage.success('保存成功')
+ }
+ })
+ })
}
})
- } else if (res2.code == 1) {
- getSqdList()
- ElMessage.success(res2.msg)
- } else if (res2.code == 2) {
- //2 弹窗提示
- ElMessageBox.confirm(res2.msg, '提示',
- {
- confirmButtonText: '是',
- cancelButtonText: '否',
- type: 'warning',
- showClose: false,
- closeOnClickModal: false,
- closeOnPressEscape: false,
- }
- ).then(() => {
- getQueryOneInfo(res2.data)
- }).catch(() => {
- saveApplyInfo(data).then((res3) => {
- if (res3.code == 0) {
- getSqdList()
- ElMessage.success('保存成功')
- }
- })
- })
}
})
}
+ }).finally(() => {
+ saveLoading.value = false
})
+ } else {
+ ElMessage.error('请完善必填信息')
}
- }).finally(() => {
- saveLoading.value = false
})
-
}
//获取申请单信息
const getQueryOneInfo = (bill_no: string) => {
@@ -1094,7 +1123,6 @@ const getQueryOneInfo = (bill_no: string) => {
xkPatientInfo.value = res.data.transfuseApplyInfoOne.xkPatientInfo
xkTransfuseApply.value = res.data.transfuseApplyInfoOne.xkTransfuseApply
bloodList.value = res.data.xkTransfuseApplyBloodbreedList
- formData.value = res.data.transfuseApplyInfoOne.xkTransfuseApply
lisProject.value = res.data.xkTransfuseApplyTestitemList.map(item => {
return {
bill_no: item.bill_no,
@@ -1115,7 +1143,6 @@ const getInfo = (billNo) => {
xkPatientInfo.value = res.data.transfuseApplyInfoOne.xkPatientInfo
xkTransfuseApply.value = res.data.transfuseApplyInfoOne.xkTransfuseApply
bloodList.value = res.data.xkTransfuseApplyBloodbreedList || []
- formData.value = res.data.transfuseApplyInfoOne.xkTransfuseApply
lisProject.value = res.data.xkTransfuseApplyTestitemList.map(item => {
return {
bill_no: item.bill_no,
@@ -1210,7 +1237,8 @@ const getSxList = () => {
onMounted(() => {
loadAllDict()
getServerTime().then(time => {
- formData.value.apply_date = time
+ xkTransfuseApply.value.apply_date = time
+ xkTransfuseApply.value.use1_date = time
})
getSxList()
getDictData('sqdzfyy', 'rhtype', 'abotype', 'nldw', 'billApplyStatus', 'sd', 'ks', 'depttype', 'bq', 'sxmd', 'sxzz', 'test_result', 'sqlx', 'lczd', 'xylx', 'operatype', 'nooperatype')
diff --git a/src/views/doctor/autologous/index copy.vue b/src/views/doctor/autologous/index copy.vue
new file mode 100644
index 0000000..f36be29
--- /dev/null
+++ b/src/views/doctor/autologous/index copy.vue
@@ -0,0 +1,373 @@
+/**
+* @file index.vue
+* @description: 储存室自体血登记
+* @author: w
+* @since: 2026-07-08
+*/
+
+
@@ -102,9 +103,17 @@
+
+
+
+ {{ v.label }}
+
+
+
+
-
@@ -114,24 +123,24 @@
placeholder="" :disabled="xkTransfuseApply.bill_stasus && xkTransfuseApply.bill_stasus != 'A'" />
-
+
-
-
-
- {{ v.label }}
-
-
-
+
病人/病人家属是否签署输血同意书
+
+
+
+
+
@@ -140,12 +149,6 @@
-
-
-
-
-
-
-
-
+
有
无
-
+
有
无
-
+
有
无
@@ -215,7 +216,7 @@
-
有
无
@@ -223,7 +224,7 @@
-
有
无
@@ -366,7 +367,8 @@
-
+ {{ bloodForm.unit }}
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
+ 检索
+ 新增单据
+ 删除单据
+ 作废
+ 保存
+ 审核
+ 打印
+ 反审核
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 输血史
+
+
+ 配型史
+
+
+ 妊娠史
+
+
+ 分娩史
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 患者信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 治疗项目
+ 未审核
+
+
+
+ ml
+
+
+
+ ml
+
+
+
+ 病人最近检查结果
+
+
+
+