版本更新
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<el-drawer v-model="drawer" title="组套信息" direction="ltr">
|
||||
<div style="margin: 10px 0px">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入组套信息"
|
||||
clearable
|
||||
style="width: 45%; margin-bottom: -6px; margin-right: 50px"
|
||||
@keyup.enter="getList"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="getList" />
|
||||
</template>
|
||||
</el-input>
|
||||
<el-radio-group v-model="queryParams.rangeCode" @change="getList">
|
||||
<el-radio-button :label="1">个人</el-radio-button>
|
||||
<el-radio-button :label="2">科室</el-radio-button>
|
||||
<el-radio-button :label="3">全院</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<el-table :data="orderList">
|
||||
<el-table-column label="组套名称" align="center" prop="name" />
|
||||
<!-- <el-table-column label="组套类型" align="center" prop="typeEnum_enumText" /> -->
|
||||
<el-table-column label="使用范围" align="center" prop="rangeCode_dictText" />
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link @click="handleUseOrderGroup(scope.row)">选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getOrderGroupList } from '../api';
|
||||
|
||||
const props = defineProps({
|
||||
diagnosis: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const drawer = ref(false);
|
||||
const orderList = ref([]);
|
||||
const emit = defineEmits(['useOrderGroup']);
|
||||
const queryParams = ref({
|
||||
typeEnum: 1,
|
||||
rangeCode: 3,
|
||||
});
|
||||
|
||||
function handleOpen() {
|
||||
drawer.value = true;
|
||||
getList();
|
||||
}
|
||||
|
||||
function handleUseOrderGroup(row) {
|
||||
let value = JSON.parse(row.groupJson);
|
||||
value = value.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
conditionId: props.diagnosis.conditionId,
|
||||
conditionDefinitionId: props.diagnosis.definitionId,
|
||||
};
|
||||
});
|
||||
// value.conditionId = props.diagnosis.conditionId;
|
||||
// value.conditionDefinitionId = props.diagnosis.definitionId;
|
||||
emit('useOrderGroup', value);
|
||||
drawer.value = false;
|
||||
}
|
||||
|
||||
function getList() {
|
||||
getOrderGroupList(queryParams.value).then((res) => {
|
||||
orderList.value = res.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
handleOpen,
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<el-drawer v-model="drawer" title="历史医嘱" direction="ltr">
|
||||
<div style="margin: 10px 0px">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入医嘱信息"
|
||||
clearable
|
||||
style="width: 50%; margin-bottom: 10px"
|
||||
@keyup.enter="getList"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="getList" />
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<el-table :data="orderList">
|
||||
<el-table-column label="医嘱项" align="center" prop="adviceName" width="150" />
|
||||
<!-- <el-table-column label="组套类型" align="center" prop="typeEnum_enumText" /> -->
|
||||
<el-table-column label="单次剂量" align="center" prop="rangeCode_dictText">
|
||||
<template #default="scope">
|
||||
{{
|
||||
scope.row.dose
|
||||
? formatNumber(scope.row.dose) + ' ' + scope.row.doseUnitCode_dictText
|
||||
: ''
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总量" align="center" prop="rangeCode_dictText">
|
||||
<template #default="scope">
|
||||
{{ scope.row.quantity ? scope.row.quantity + ' ' + scope.row.unitCode_dictText : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="频次/用法" align="center" prop="rangeCode_dictText" width="200">
|
||||
<template #default="scope">
|
||||
{{
|
||||
scope.row.rateCode_dictText
|
||||
? scope.row.rateCode_dictText +
|
||||
' ' +
|
||||
scope.row.dispensePerDuration +
|
||||
'天' +
|
||||
' ' +
|
||||
scope.row.methodCode_dictText
|
||||
: ''
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="注射药品" align="center" prop="rangeCode_dictText">
|
||||
<template #default="scope">
|
||||
{{ scope.row.injectFlag_enumText || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="皮试" align="center" prop="rangeCode_dictText">
|
||||
<template #default="scope">
|
||||
{{ scope.row.skinTestFlag_enumText || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="诊断" align="center" prop="rangeCode_dictText">
|
||||
<template #default="scope">
|
||||
{{ scope.row.diagnosisName || scope.row.conditionDefinitionName }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link @click="handleUseOrderGroup(scope.row)">选择</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getAdviceHistoryInfo } from '../api';
|
||||
import { formatNumber } from '@/utils/his';
|
||||
|
||||
const props = defineProps({
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
diagnosis: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
const drawer = ref(false);
|
||||
const orderList = ref([]);
|
||||
const emit = defineEmits(['userPrescriptionHistory']);
|
||||
const queryParams = ref({
|
||||
typeEnum: 1,
|
||||
});
|
||||
|
||||
function handleOpen() {
|
||||
drawer.value = true;
|
||||
getList();
|
||||
}
|
||||
|
||||
function handleUseOrderGroup(row) {
|
||||
row = {
|
||||
...row,
|
||||
conditionId: props.diagnosis.conditionId,
|
||||
conditionDefinitionId: props.diagnosis.definitionId,
|
||||
};
|
||||
// value.conditionId = props.diagnosis.conditionId;
|
||||
// value.conditionDefinitionId = props.diagnosis.definitionId;
|
||||
emit('userPrescriptionHistory', row);
|
||||
drawer.value = false;
|
||||
}
|
||||
|
||||
function getList() {
|
||||
getAdviceHistoryInfo({ patientId: props.patientInfo.patientId, encounterId: props.patientInfo.encounterId }).then((res) => {
|
||||
orderList.value = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
handleOpen,
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,205 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="处方单"
|
||||
v-model="props.open"
|
||||
width="1600px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
@open="openDialog"
|
||||
>
|
||||
<div class="prescription-dialog-wrapper">
|
||||
<div
|
||||
class="prescription-container"
|
||||
v-for="item in precriptionInfo"
|
||||
:key="item.prescriptionNo"
|
||||
>
|
||||
<div>
|
||||
<span>处方号:</span>
|
||||
<span>{{ item.prescriptionNo }}</span>
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<h2>长春大学医院</h2>
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<h3>处方单</h3>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div>
|
||||
<span class="item-label">姓名:</span>
|
||||
<span class="item-value">{{ item.patientName }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="item-label">年龄:</span>
|
||||
<span class="item-value">20岁</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="item-label">性别:</span>
|
||||
<span class="item-value">男</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div>
|
||||
<span class="item-label">科室:</span>
|
||||
<span class="item-value">门诊内科</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="item-label">费用性质:</span>
|
||||
<span class="item-value">自费</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="item-label">日期:</span>
|
||||
<span class="item-value">{{ formatDateStr(item.requestTime, 'YYYY-MM-DD') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div>
|
||||
<span class="item-label">门诊号:</span>
|
||||
<span class="item-value">M0000000001</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="item-label">开单医生:</span>
|
||||
<span class="item-value">徐丹</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div>
|
||||
<span class="item-label">诊断:</span>
|
||||
<span class="item-value">{{ item.conditionDefinitionName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div style="font-size: 16px; font-weight: 700; margin-bottom: 3px">Rp</div>
|
||||
<div class="medicen-list">
|
||||
<div
|
||||
style="margin-bottom: 3px"
|
||||
v-for="(medItem, index) in item.prescriptionInfoDetail"
|
||||
:key="medItem.requestId"
|
||||
>
|
||||
<span>{{ index + 1 + '. ' }}</span>
|
||||
<span>{{ medItem.adviceName }}</span>
|
||||
<span>{{ '(' + medItem.volume + ')' }}</span>
|
||||
<span>{{ medItem.quantity + ' ' + medItem.unitCode_dictText }}</span>
|
||||
<span>{{ '批次号:' + medItem.lotNumber }}</span>
|
||||
<div>
|
||||
<span>用法用量:</span>
|
||||
<span>
|
||||
{{
|
||||
medItem?.methodCode_dictText +
|
||||
' / ' +
|
||||
medItem?.dose +
|
||||
+' ' +
|
||||
medItem?.doseUnitCode_dictText +
|
||||
' / ' +
|
||||
medItem?.rateCode_dictText
|
||||
}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div>
|
||||
<span class="item-label">医师:</span>
|
||||
<span class="item-value"></span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="item-label">收费:</span>
|
||||
<span class="item-value"></span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="item-label">合计:</span>
|
||||
<span class="item-value"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div>
|
||||
<span class="item-label">调配:</span>
|
||||
<span class="item-value"></span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="item-label">核对:</span>
|
||||
<span class="item-value"></span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="item-label">发药:</span>
|
||||
<span class="item-value"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
<el-button @click="close">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { formatDateStr } from '@/utils/index';
|
||||
const props = defineProps({
|
||||
open: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
precriptionInfo: {
|
||||
type: [],
|
||||
default: [],
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(['close']);
|
||||
|
||||
function close() {
|
||||
emit('close');
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
selectRow.value = row;
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.prescription-dialog-wrapper {
|
||||
height: 700px;
|
||||
display: flex;
|
||||
overflow-x: auto;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
// background-color: #d7d7d7;
|
||||
// padding: 10px
|
||||
}
|
||||
.prescription-container {
|
||||
height: 660px;
|
||||
width: 500px;
|
||||
border: solid 2px #757575;
|
||||
font-size: 13px;
|
||||
color: #000000;
|
||||
background-color: #f3f3f3;
|
||||
padding: 10px;
|
||||
}
|
||||
.divider {
|
||||
height: 2px;
|
||||
background-color: #757575;
|
||||
margin: 5px 0 5px 0;
|
||||
}
|
||||
.medicen-list {
|
||||
height: 330px;
|
||||
}
|
||||
.item-label {
|
||||
width: 70px;
|
||||
text-align: left;
|
||||
font-weight: 700;
|
||||
color: #000000;
|
||||
display: inline-block;
|
||||
}
|
||||
.item-value {
|
||||
color: #393a3b;
|
||||
font-weight: 500;
|
||||
width: 87px;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,100 @@
|
||||
<template>
|
||||
<div style="height: 500px;padding-bottom: 120px">
|
||||
<el-table ref="medicineRef" height="400" :data="medicineList" @cell-click="clickRow">
|
||||
<el-table-column label="药品名称" align="center" prop="registeredName" width="300" />
|
||||
<el-table-column label="药品规格" align="center" prop="drugSpecification" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturerName" />
|
||||
<el-table-column label="国药准字号" align="center" prop="approvalNo"/>
|
||||
<el-table-column label="包装单位" align="center" prop="minPackageUnit" />
|
||||
<el-table-column label="剂量单位" align="center" prop="minPreparationUnit" />
|
||||
<!-- <el-table-column
|
||||
label="最小单位"
|
||||
align="center"
|
||||
prop="minUnitCode_dictText"
|
||||
/>
|
||||
<el-table-column label="规格" align="center" prop="volume" /> -->
|
||||
<!-- <el-table-column label="用法" align="center" prop="methodCode_dictText" />
|
||||
<el-table-column label="单次剂量" align="center" prop="dose" />
|
||||
<<<<<<< HEAD
|
||||
<el-table-column
|
||||
label="剂量单位"
|
||||
align="center"
|
||||
prop="doseUnitCode_dictText"
|
||||
/> -->
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getAllMedicationInfo,getAllMedicationUsualInfo} from '../api';
|
||||
import { watch } from 'vue';
|
||||
import { throttle } from 'lodash-es';
|
||||
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
itemType: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(['selectRow']);
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
});
|
||||
const medicineList = ref([]);
|
||||
const total = ref(0);
|
||||
|
||||
// 节流函数
|
||||
const throttledGetList = throttle(
|
||||
() => {
|
||||
console.log('节流执行了', queryParams.value);
|
||||
getList();
|
||||
},
|
||||
300,
|
||||
{ leading: true, trailing: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props.searchKey,
|
||||
(newValue) => {
|
||||
queryParams.value.searchKey = newValue;
|
||||
throttledGetList();
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
getAllMedicationUsualInfo(queryParams.value).then((res) => {
|
||||
console.log(res, '药品列表', queryParams.value, 'queryParams.value');
|
||||
if(res.data&&res.data.records&&res.data.records.length>0){
|
||||
medicineList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
}else{
|
||||
getAllMedicationInfo(queryParams.value).then((res) => {
|
||||
console.log(res, 'wwwwwwwwwwwwwwwww药品列表', queryParams.value, 'queryParams.value');
|
||||
medicineList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
emit('selectRow', row);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -0,0 +1,276 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="退费单"
|
||||
v-model="props.open"
|
||||
width="1300px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
@open="openDialog"
|
||||
>
|
||||
<div class="footer">
|
||||
<div class="statistics">
|
||||
<span>共 {{ total }} 个项目</span>
|
||||
<!-- <span class="total">合计金额:¥ {{ totalAmount.toFixed(2) }}</span> -->
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<!-- <el-row :gutter="24" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="诊断名称/拼音码"
|
||||
clearable
|
||||
style="width: 100%; margin-bottom: 10px"
|
||||
@keyup.enter="queryDiagnosisUse"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="queryDiagnosisUse" />
|
||||
</template>
|
||||
</el-input>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
<el-table
|
||||
ref="refundListRef"
|
||||
:data="refundList"
|
||||
row-key="paymentId"
|
||||
row-class-name="parent-row"
|
||||
v-loading="tableLoading"
|
||||
border
|
||||
height="600"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
align="center"
|
||||
class-name="selection-column"
|
||||
:selectable="
|
||||
(row) => {
|
||||
return row.refundStatus == 5;
|
||||
}
|
||||
"
|
||||
/>
|
||||
<el-table-column label="处方号" align="center" prop="prescriptionNo" />
|
||||
<el-table-column label="项目名" align="center" prop="itemName" />
|
||||
<el-table-column label="数量" align="center" prop="quantity" />
|
||||
<el-table-column label="单位" align="center" prop="unitCode_dictText" />
|
||||
<el-table-column label="收款金额" align="center" prop="totalPrice" />
|
||||
<el-table-column label="发放状态" align="center">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.dispenseStatus != 0" type="default">
|
||||
{{ scope.row.dispenseStatus_enumText }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="default">{{ scope.row.serviceStatus_enumText }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="支付状态" align="center" prop="refundStatus_enumText">
|
||||
<template #default="scope">
|
||||
<el-tag
|
||||
:type="
|
||||
handleColor(
|
||||
[1, 2, 3, 4, 5, 8, 9],
|
||||
['success', 'info', 'warning', 'warning', 'success', 'info', 'error'],
|
||||
scope.row.refundStatus
|
||||
)
|
||||
"
|
||||
>
|
||||
{{ scope.row.refundStatus_enumText }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/> -->
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
<el-button @click="close">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getEncounterPatientPayment, refundPayment } from '../api';
|
||||
import { handleColor } from '@/utils/his';
|
||||
|
||||
const props = defineProps({
|
||||
open: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
encounterId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(['close']);
|
||||
const total = ref(0);
|
||||
const tableLoading = ref(false);
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
});
|
||||
const refundList = ref([]);
|
||||
const expandOrder = ref([]);
|
||||
const selectRow = ref({});
|
||||
const { proxy } = getCurrentInstance();
|
||||
const selectedMedicines = ref(0);
|
||||
const totalAmount = ref(0);
|
||||
function openDialog() {
|
||||
getList();
|
||||
}
|
||||
|
||||
function getList() {
|
||||
refundList.value = [];
|
||||
tableLoading.value = true;
|
||||
getEncounterPatientPayment(props.encounterId).then((res) => {
|
||||
refundList.value = res.data;
|
||||
total.value = res.data ? res.data.length : 0;
|
||||
// expandOrder.value = refundList.value.map((item) => {
|
||||
// return item.paymentNo;
|
||||
// });
|
||||
tableLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
function submit() {
|
||||
// 1. 获取当前选中行并提取去重的 paymentId 列表
|
||||
const selectedRows = proxy.$refs['refundListRef'].getSelectionRows();
|
||||
const selectedPaymentIds = [...new Set(selectedRows.map((row) => row.paymentId))];
|
||||
|
||||
// 2. 遍历 refundList,筛选出符合条件的数据并设置 refundFlag
|
||||
const result = refundList.value
|
||||
.filter((row) => selectedPaymentIds.includes(row.paymentId)) // 筛选出选中的 paymentId 对应的原始数据
|
||||
.map((row) => ({
|
||||
paymentId: row.paymentId,
|
||||
chargeItemId: row.chargeItemId,
|
||||
// refundFlg: selectedRows.some((selectedRow) => selectedRow.chargeItemId === row.chargeItemId), // 是否选中
|
||||
refundFlg: true, // todo 半退暂时不处理 此处先写死,等需要用半退的时候再放开上边的代码
|
||||
}));
|
||||
|
||||
console.log('组装后的数据:', result);
|
||||
|
||||
// 3. 调用接口提交
|
||||
refundPayment(result).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
getList();
|
||||
}
|
||||
});
|
||||
|
||||
// refundList.value.forEach((item, index) => {
|
||||
// // proxy.$refs['itemRef' + index].getSelectionRows().forEach((row) => {
|
||||
// // saveList.push({ paymentId: item.paymentId, chargeItemId: row.chargeItemId, refundFlg: true });
|
||||
// // });
|
||||
// const selectedIds = proxy.$refs['refundListRef'].getSelectionRows().map((row) => {
|
||||
// return row.busNo;
|
||||
// });
|
||||
// console.log(selectedIds);
|
||||
// item.chargeItemList.forEach((item) => {
|
||||
// saveList.push({
|
||||
// paymentId: item.paymentId,
|
||||
// chargeItemId: item.chargeItemId,
|
||||
// refundFlg: selectedIds.has(item.busNo),
|
||||
// });
|
||||
// });
|
||||
// });
|
||||
// refundPayment({
|
||||
// definitionId: selectRow.value.id,
|
||||
// definitionName: selectRow.value.name,
|
||||
// bindingEnum: props.radio == '个人' ? 1 : 2,
|
||||
// }).then((res) => {
|
||||
// if (res.code == 200) {
|
||||
// emit('close', 'success');
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
function handleSelectAll(selection) {
|
||||
if (selection.length > 0) {
|
||||
selection.forEach((item, index) => {
|
||||
proxy.$refs['itemRef' + index].toggleAllSelection();
|
||||
});
|
||||
} else {
|
||||
for (let i = 0; i < refundList.value.length; i++) {
|
||||
proxy.$refs['itemRef' + i].clearSelection();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleSelectionChange(value, row) {
|
||||
let selectIndex = refundList.value.findIndex((item) => {
|
||||
return item.paymentNo === row.paymentNo;
|
||||
});
|
||||
if (value.includes(row)) {
|
||||
proxy.$refs['itemRef' + selectIndex].toggleAllSelection();
|
||||
} else {
|
||||
proxy.$refs['itemRef' + selectIndex].clearSelection();
|
||||
}
|
||||
}
|
||||
|
||||
// 处理外层列表选中状态
|
||||
function handleItemSelectionChange(parentRow, selection, index) {
|
||||
// 子列表全选中,自动选中父级列表
|
||||
proxy.$refs['refundListRef'].toggleRowSelection(
|
||||
parentRow,
|
||||
selection.length == parentRow.chargeItemList.length
|
||||
);
|
||||
}
|
||||
|
||||
function queryDiagnosisUse() {
|
||||
getList();
|
||||
}
|
||||
|
||||
function close() {
|
||||
emit('close');
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
selectRow.value = row;
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.sub-table-wrapper {
|
||||
padding: 16px 55px;
|
||||
background: #f9fafe;
|
||||
|
||||
.nested-sub-table {
|
||||
border: 1px solid #e8e8f3;
|
||||
border-radius: 2px;
|
||||
|
||||
// :deep(.sub-cell) {
|
||||
// background: #ffffff !important;
|
||||
// padding: 12px 16px;
|
||||
// }
|
||||
}
|
||||
}
|
||||
:deep(.parent-row) {
|
||||
td {
|
||||
// background: #e8ece6 !important; /* 浅蓝色背景 */
|
||||
// border-color: #e4e7ed !important;
|
||||
height: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 16px;
|
||||
border-top: 1px solid #ebeef5;
|
||||
|
||||
.total {
|
||||
margin-left: 20px;
|
||||
color: #f56c6c;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user