|
@@ -449,16 +449,23 @@ const xuanZhongFeiYong = async (row, laiyuan = 1) => {
|
|
|
if (!yiZhuData.value.startTime) {
|
|
|
yiZhuData.value.startTime = serverDate
|
|
|
}
|
|
|
- // 用来加载默认的执行科室
|
|
|
- if (stringIsBlank(row.execUnit)) {
|
|
|
- if (stringNotBlank(props.patientInfo.zkWard)) {
|
|
|
+ // 用来加载默认的执行科室 加载项目的执行科室
|
|
|
+ if (laiyuan === 1) {
|
|
|
+ if (stringNotBlank(row.execDept)) {
|
|
|
+ yiZhuData.value.execUnit = row.execDept
|
|
|
+ yiZhuData.value.execUnitName = row.execDeptName
|
|
|
+ } else {
|
|
|
+ yiZhuData.value.execUnit = props.patientInfo.zkWard
|
|
|
+ yiZhuData.value.execUnitName = props.patientInfo.zkWardName
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (stringIsBlank(row.execUnit)) {
|
|
|
yiZhuData.value.execUnit = props.patientInfo.zkWard
|
|
|
yiZhuData.value.execUnitName = props.patientInfo.zkWardName
|
|
|
}
|
|
|
- } else if (props.patientInfo.zkWard && row.execUnit.startsWith("8")) {
|
|
|
- yiZhuData.value.execUnit = props.patientInfo.zkWard
|
|
|
- yiZhuData.value.execUnitName = props.patientInfo.zkWardName
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
if (!yiZhuData.value.frequCode) {
|
|
|
yiZhuData.value.frequCode = 'ONCE'
|
|
|
yiZhuData.value.frequCodeName = '一次'
|
|
@@ -468,10 +475,7 @@ const xuanZhongFeiYong = async (row, laiyuan = 1) => {
|
|
|
} catch (e) {
|
|
|
console.log(e)
|
|
|
}
|
|
|
- if (queryParam.value.frequCode === frequCodeEnum.temporary) {
|
|
|
- yiZhuData.value.frequCode = 'ONCE'
|
|
|
- yiZhuData.value.frequCodeName = '一次'
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
if (queryParam.value.frequCode === 'takeMedicine') {
|
|
|
yiZhuData.value.selfBuy = '4'
|
|
@@ -487,13 +491,14 @@ const xuanZhongFeiYong = async (row, laiyuan = 1) => {
|
|
|
})
|
|
|
}
|
|
|
// 如果搜索了医嘱那么 这里就需要 重新赋值,不认表格就没办法变化了,把原来的换掉
|
|
|
- for (let i = 0, len = yzData.value.length; i < len; i++) {
|
|
|
+ for (let i = yzData.value.length - 1; i >= 0; i--) {
|
|
|
let item = yzData.value[i];
|
|
|
if (yiZhuData.value.actOrderNo === item.actOrderNo) {
|
|
|
yzData.value[i] = yiZhuData.value
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
if (laiyuan === 1) {
|
|
|
if (queryParam.value.frequCode === frequCodeEnum.temporary && yiZhuData.value.frequCode !== 'ONCE') {
|
|
|
yiZhuData.value.frequCode = 'ONCE'
|