|
@@ -85,7 +85,7 @@
|
|
|
给药方式:
|
|
|
<select-v4
|
|
|
key="supplyCode"
|
|
|
- :disabled="supplyDisabled()"
|
|
|
+ :disabled="supplyDisabled"
|
|
|
style="width: 120px"
|
|
|
v-model="yiZhuData.supplyCode"
|
|
|
:data="geiYaoFangShiData"
|
|
@@ -142,7 +142,7 @@
|
|
|
style="width: 120px;"
|
|
|
placeholder="父医嘱"
|
|
|
clearable
|
|
|
- :disabled="supplyDisabled()"
|
|
|
+ :disabled="supplyDisabled"
|
|
|
@clear="clearDoctorSOrder"
|
|
|
@focus="fuYiZhuClick"
|
|
|
@rowClick="({row}) => modifyDosingMethod(row)"
|
|
@@ -184,7 +184,7 @@
|
|
|
<div>
|
|
|
费用标志:
|
|
|
<el-select v-model="yiZhuData.selfBuy"
|
|
|
- :disabled="supplyDisabled()"
|
|
|
+ :disabled="supplyDisabled"
|
|
|
clearable style="width: 120px"
|
|
|
@clear="yiZhuData.selfBuy = null">
|
|
|
<el-option label="自备" value="1"/>
|
|
@@ -635,23 +635,34 @@ const disabledDate = (time) => {
|
|
|
}
|
|
|
|
|
|
/* 父医嘱 */
|
|
|
-const fuYiZhuData = ref([])
|
|
|
+const fuYiZhuData = ref<any[]>([])
|
|
|
const fuYiZhuClick = () => {
|
|
|
fuYiZhuData.value = [];
|
|
|
|
|
|
- XEUtils.lastArrayEach(yzData.value, (item) => {
|
|
|
- let {statusFlag, serial, parentNo, drugFlag, actOrderNo} = item
|
|
|
- if (statusFlag === '1') {
|
|
|
- if (serial !== '00' && stringIsBlank(parentNo) && drugFlag !== 'd') {
|
|
|
- if (yiZhuData.value.actOrderNo !== actOrderNo) {
|
|
|
- const tempData = XEUtils.clone(item, true)
|
|
|
- tempData.value = actOrderNo
|
|
|
- tempData.label = item.orderName
|
|
|
- fuYiZhuData.value.push(item)
|
|
|
- }
|
|
|
+ const eachName = queryParam.value.sort === 'asc' ? 'lastArrayEach' : 'arrayEach'
|
|
|
+ const eachFunction = XEUtils[eachName]
|
|
|
+
|
|
|
+ let hasParentNo = false
|
|
|
+
|
|
|
+ // @ts-ignore
|
|
|
+ eachFunction(yzData.value, (item) => {
|
|
|
+ const {statusFlag, serial, parentNo, drugFlag, actOrderNo} = item
|
|
|
+ if (statusFlag !== '1') {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (parentNo === yiZhuData.value.actOrderNo) {
|
|
|
+ hasParentNo = true
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (serial !== '00' && stringIsBlank(parentNo) && drugFlag !== 'd') {
|
|
|
+ if (yiZhuData.value.actOrderNo !== actOrderNo) {
|
|
|
+ fuYiZhuData.value.push(item)
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
+ if (hasParentNo) {
|
|
|
+ fuYiZhuData.value = []
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
const modifyDosingMethod = (val) => {
|
|
@@ -910,15 +921,13 @@ let shortcutKeyRegistration = {
|
|
|
}
|
|
|
|
|
|
|
|
|
-/**
|
|
|
- * 给药方式是否可以用
|
|
|
- */
|
|
|
-const supplyDisabled = () => {
|
|
|
+const supplyDisabled = computed(() => {
|
|
|
if (yiZhuData.value.orderCode === '06054') {
|
|
|
return false
|
|
|
}
|
|
|
return yiZhuData.value.serial === '00';
|
|
|
-}
|
|
|
+})
|
|
|
+
|
|
|
|
|
|
onMounted(() => {
|
|
|
yzMitt.on('toAddAnOrder', toAddAnOrder)
|