修改门诊手术计费按钮位置更新readme新增静态资源放置及引用说明
This commit is contained in:
@@ -52,6 +52,9 @@
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd"> 新增手术安排 </el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Money" @click="handleChargeCharge(selectedRow)" :disabled="!selectedRow"> 计费 </el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Download" @click="handleExport">导出表格</el-button>
|
||||
</el-col>
|
||||
@@ -59,7 +62,7 @@
|
||||
</el-row>
|
||||
|
||||
<!-- 中部表格区 -->
|
||||
<el-table v-loading="loading" :data="surgeryList" row-key="scheduleId" :row-class-name="getRowClassName">
|
||||
<el-table v-loading="loading" :data="surgeryList" row-key="scheduleId" :row-class-name="getRowClassName" highlight-current-row @current-change="handleCurrentChange">
|
||||
<el-table-column label="ID" align="center" width="80">
|
||||
<template #default="{ $index }">
|
||||
{{ (applyQueryParams.pageNo - 1) * applyQueryParams.pageSize + $index + 1 }}
|
||||
@@ -97,7 +100,6 @@
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handleView(scope.row)">查看</el-button>
|
||||
<el-button link type="primary" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button link type="success" @click="handleChargeCharge(scope.row)">计费</el-button>
|
||||
<el-button link type="danger" @click="handleDelete(scope.row)" v-has="['surgicalSchedule:delete']">取消</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -835,6 +837,9 @@ const queryParams = reactive({
|
||||
const open = ref(false)
|
||||
const isEditMode = ref(false)
|
||||
const isViewMode = ref(false)
|
||||
// 选中行状态管理
|
||||
const selectedRow = ref(null)
|
||||
const selectedRowIndex = ref(-1)
|
||||
const form = reactive({
|
||||
scheduleId:undefined,
|
||||
applyId: undefined,
|
||||
@@ -1192,6 +1197,17 @@ function handleView(row) {
|
||||
open.value = true
|
||||
}
|
||||
|
||||
// 行选中事件处理
|
||||
function handleCurrentChange(currentRow, oldRow) {
|
||||
if (currentRow) {
|
||||
selectedRow.value = currentRow
|
||||
selectedRowIndex.value = surgeryList.value.findIndex(row => row.scheduleId === currentRow.scheduleId)
|
||||
} else {
|
||||
selectedRow.value = null
|
||||
selectedRowIndex.value = -1
|
||||
}
|
||||
}
|
||||
|
||||
// 删除手术安排
|
||||
function handleDelete(row) {
|
||||
proxy.$modal.confirm('是否确认取消手术安排"' + row.operName + '"?').then(() => {
|
||||
@@ -1205,6 +1221,17 @@ function handleDelete(row) {
|
||||
|
||||
// 手术计费
|
||||
async function handleChargeCharge(row) {
|
||||
// 如果没有传入行数据,使用选中的行
|
||||
if (!row && selectedRow.value) {
|
||||
row = selectedRow.value
|
||||
}
|
||||
|
||||
// 如果还是没有行数据,显示提示
|
||||
if (!row) {
|
||||
proxy.$modal.msgWarning('请先选择要计费的手术安排')
|
||||
return
|
||||
}
|
||||
|
||||
console.log('计费按钮被点击,行数据:', row)
|
||||
|
||||
// 检查用户信息中的机构信息
|
||||
@@ -1591,6 +1618,9 @@ function handleExport() {
|
||||
|
||||
// 获取行样式
|
||||
function getRowClassName({ row, rowIndex }) {
|
||||
if (selectedRow.value && row.scheduleId === selectedRow.value.scheduleId) {
|
||||
return 'selected-row'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user