|
|
@@ -29,6 +29,11 @@
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <showDialog
|
|
|
+ v-if="showDialogRef"
|
|
|
+ @select="handlePaymentSelect"
|
|
|
+ @closed="showDialogRef = false"
|
|
|
+ />
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
@@ -46,6 +51,7 @@ import {
|
|
|
jcProxy,
|
|
|
jyJcRestriction,
|
|
|
} from "@/views/hospitalization/zhu-yuan-yi-sheng/public-js/zhu-yuan-yi-sheng";
|
|
|
+import ShowDialog from "@/components/zhu-yuan-yi-sheng/yi-zhu-lu-ru/showDialog/ShowDialog";
|
|
|
import JcJyTemplate from "@/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/components/public/JcJyTemplate.vue";
|
|
|
import JianChaJianYanTable from "@/views/hospitalization/zhu-yuan-yi-sheng/jian-cha-jian-yan-shen-qing/components/public/JianChaJianYanTable.vue";
|
|
|
import { getServerDate } from "@/utils/moment-utils";
|
|
|
@@ -72,8 +78,32 @@ const rowClick = data => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+
|
|
|
+let sval = 0;
|
|
|
+const showDialogRef = ref(false);
|
|
|
+let tempData: AddJcParams | null = null;
|
|
|
+const handlePaymentSelect = (type: string) => {
|
|
|
+ if (type === 'self') {
|
|
|
+ sval = 1; // 自费
|
|
|
+ } else {
|
|
|
+ sval = 0; // 非自费
|
|
|
+ }
|
|
|
+};
|
|
|
+const waitForDialogClose = () => {
|
|
|
+ return new Promise<void>((resolve) => {
|
|
|
+ const checkDialogStatus = () => {
|
|
|
+ // 对话框关闭时结束轮询
|
|
|
+ if (!showDialogRef.value) {
|
|
|
+ resolve();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ setTimeout(checkDialogStatus, 100);
|
|
|
+ };
|
|
|
+ checkDialogStatus();
|
|
|
+ });
|
|
|
+};
|
|
|
const nodeClick = async (data: any) => {
|
|
|
- let temp: AddJcParams = {
|
|
|
+ const temp: AddJcParams = {
|
|
|
execDept: data.execUnit,
|
|
|
execDeptName: data.execUnitName,
|
|
|
orderCode: data.code,
|
|
|
@@ -85,10 +115,23 @@ const nodeClick = async (data: any) => {
|
|
|
minAgeRestriction: data.minAgeRestriction,
|
|
|
maxAgeRestriction: data.maxAgeRestriction,
|
|
|
startTime: await getServerDate(),
|
|
|
+ ybSelfFlag: 0,
|
|
|
inspectParts: [],
|
|
|
};
|
|
|
+
|
|
|
jyJcRestriction(temp);
|
|
|
- jcProxy.push(temp);
|
|
|
+ if (data.jcDialog === "1") {
|
|
|
+ tempData = temp;
|
|
|
+ showDialogRef.value = true;
|
|
|
+ await waitForDialogClose();
|
|
|
+ if (tempData) {
|
|
|
+ tempData.ybSelfFlag = sval;
|
|
|
+ jcProxy.push(tempData);
|
|
|
+ tempData = null;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ jcProxy.push(temp);
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const deleteTemplate = val => {
|