解决合并冲突
This commit is contained in:
@@ -11,14 +11,8 @@
|
||||
</div>
|
||||
|
||||
<div>处方信息</div>
|
||||
<el-table
|
||||
max-height="650"
|
||||
ref="eprescriptionRef"
|
||||
:data="prescriptionList"
|
||||
row-key="prescriptionNo"
|
||||
border
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table max-height="650" ref="eprescriptionRef" :data="prescriptionList" row-key="prescriptionNo" border
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center" :selectable="selectable" />
|
||||
<el-table-column label="处方号" align="center" prop="prescriptionNo" width="200" sortable>
|
||||
<template #default="scope">
|
||||
@@ -46,16 +40,8 @@
|
||||
<span v-if="!scope.row.isEdit">
|
||||
{{ scope.row.validityDays }}
|
||||
</span>
|
||||
<el-input-number
|
||||
v-else
|
||||
:min="0"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
v-model="scope.row.validityDays"
|
||||
placeholder=""
|
||||
@input="handleValidityDaysChange(scope.$index, $event)"
|
||||
style="width: 90%"
|
||||
/>
|
||||
<el-input-number v-else :min="0" controls-position="right" :controls="false" v-model="scope.row.validityDays"
|
||||
placeholder="" @input="handleValidityDaysChange(scope.$index, $event)" style="width: 90%" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="statusEnum_enumText" width="80">
|
||||
@@ -65,13 +51,7 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="开方医师"
|
||||
align="center"
|
||||
prop="practitionerName"
|
||||
header-align="center"
|
||||
width="90"
|
||||
>
|
||||
<el-table-column label="开方医师" align="center" prop="practitionerName" header-align="center" width="90">
|
||||
<template #default="scope">
|
||||
<span v-if="!scope.row.isEdit">
|
||||
{{ scope.row.practitionerName }}
|
||||
@@ -138,44 +118,19 @@
|
||||
<el-table-column label="操作" align="center" width="220" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="View" @click="handleView(scope.row)">查看</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleEdit(scope.row)"
|
||||
:disabled="scope.row.statusEnum == 2 || scope.row.statusEnum == 3 || scope.row.statusEnum == 6"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Plus"
|
||||
@click="savePrescriptionData(scope.row, scope.$index)"
|
||||
:disabled="!scope.row.isEdit"
|
||||
>保存</el-button
|
||||
>
|
||||
<el-button link type="primary" icon="Edit" @click="handleEdit(scope.row)"
|
||||
:disabled="scope.row.statusEnum == 2 || scope.row.statusEnum == 3 || scope.row.statusEnum == 6">编辑</el-button>
|
||||
<el-button link type="primary" icon="Plus" @click="savePrescriptionData(scope.row, scope.$index)"
|
||||
:disabled="!scope.row.isEdit">保存</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
style="margin-bottom: 5px"
|
||||
/>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList" style="margin-bottom: 5px" />
|
||||
|
||||
<eprescriptiondialog
|
||||
ref="prescriptionDialogRef"
|
||||
:openPrescription="openPrescription"
|
||||
:patient="props.patientInfo"
|
||||
:prescriptionType="prescriptionTypeList"
|
||||
:medicationInfo="medicationInfoList"
|
||||
:prescriptionData="prescriptionInfo"
|
||||
:title="title"
|
||||
@close="closePrescriptionDialog"
|
||||
/>
|
||||
<eprescriptiondialog ref="prescriptionDialogRef" :openPrescription="openPrescription" :patient="props.patientInfo"
|
||||
:prescriptionType="prescriptionTypeList" :medicationInfo="medicationInfoList" :prescriptionData="prescriptionInfo"
|
||||
:title="title" @close="closePrescriptionDialog" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -285,20 +240,12 @@ getElepPrescriptionInit();
|
||||
|
||||
/** 处方信息取得 */
|
||||
function getList() {
|
||||
console.log(
|
||||
queryParams.value,
|
||||
'queryParams.value电子处方',
|
||||
props.patientInfo,
|
||||
'props.patientInfo'
|
||||
);
|
||||
prescriptionList.value = [];
|
||||
medicationInfoList.value = [];
|
||||
prescriptionNoTemp.value = undefined;
|
||||
queryParams.value.patientId = props.patientInfo.patientId;
|
||||
console.log(queryParams.value, 'queryParams.value电子处方');
|
||||
getPrescriptionInfo(queryParams.value).then((res) => {
|
||||
prescriptionList.value = res.data.records;
|
||||
console.log(res, '电子处方列表');
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
@@ -307,13 +254,11 @@ function getList() {
|
||||
function getElepPrescriptionInit() {
|
||||
elepPrescriptionInit().then((res) => {
|
||||
prescriptionTypeList.value = res.data.rxTypeCodeListOptions;
|
||||
console.log(res, '电子处方下拉框');
|
||||
});
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
console.log(selection, 'selection');
|
||||
selectDataList.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
|
||||
prescriptionNos.value = selection.map((item) => item.prescriptionNo);
|
||||
ids.value = selection
|
||||
@@ -341,7 +286,6 @@ function handleAddPrescription() {
|
||||
*/
|
||||
function selectable(row, index) {
|
||||
// 返回 true 表示该行可选,返回 false 表示该行不可选
|
||||
// console.log(row, 'selectable', rowIndex.value);
|
||||
return ![2, 3, 6].includes(row.statusEnum);
|
||||
}
|
||||
|
||||
@@ -359,7 +303,6 @@ function handleView(row) {
|
||||
prescriptionInfo.value.extensionReason = row.extensionReason;
|
||||
prescriptionInfo.value.rxTypeCode = row.rxTypeCode;
|
||||
prescriptionInfo.value.prescriptionNo = row.prescriptionNo;
|
||||
console.log(queryMedicationParams.value, '处方详细的药品信息参数', row.prescriptionNo);
|
||||
getMedicationInfo(queryMedicationParams.value).then((response) => {
|
||||
medicationInfoList.value = response.data.records;
|
||||
medicationInfoList.value.forEach((medicationInfo) => {
|
||||
@@ -369,7 +312,6 @@ function handleView(row) {
|
||||
prescriptionInfo.value.conditionId = response.data.records[0].conditionId;
|
||||
openPrescriptionDialog();
|
||||
|
||||
console.log(response, '处方详细的药品信息', medicationInfoList.value);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -385,7 +327,6 @@ function handleEdit(row) {
|
||||
prescriptionInfo.value.extensionReason = row.extensionReason;
|
||||
prescriptionInfo.value.rxTypeCode = row.rxTypeCode;
|
||||
prescriptionInfo.value.prescriptionNo = row.prescriptionNo;
|
||||
console.log(queryMedicationParams.value, '处方详细的药品信息参数', row.prescriptionNo);
|
||||
getMedicationInfo(queryMedicationParams.value).then((response) => {
|
||||
medicationInfoList.value = response.data.records;
|
||||
medicationInfoList.value.forEach((medicationInfo) => {
|
||||
@@ -393,7 +334,6 @@ function handleEdit(row) {
|
||||
});
|
||||
prescriptionInfo.value.conditionId = response.data.records[0].conditionId;
|
||||
openPrescriptionDialog();
|
||||
console.log(response, '处方详细的药品信息', medicationInfoList.value);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -419,7 +359,6 @@ function openPrescriptionDialog() {
|
||||
nextTick(() => {
|
||||
proxy.$refs['prescriptionDialogRef'].getPrescriptionNoInit();
|
||||
});
|
||||
console.log(openPrescription.value, '打开新增处方弹窗');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -456,10 +395,8 @@ async function savePrescriptionData(row, index) {
|
||||
rxTypeCode: row.rxTypeCode,
|
||||
};
|
||||
|
||||
console.log(updateParam, ' 保存处方updateParam');
|
||||
updatePrescriptionInfo(updateParam).then((response) => {
|
||||
if (response.code == 200) {
|
||||
console.log(response, '保存成功');
|
||||
proxy.$modal.msgSuccess('保存成功');
|
||||
getList();
|
||||
} else {
|
||||
@@ -467,7 +404,6 @@ async function savePrescriptionData(row, index) {
|
||||
}
|
||||
});
|
||||
// } catch (error) {
|
||||
// console.log('验证失败:', error);
|
||||
// // 验证失败,不执行保存
|
||||
// }
|
||||
}
|
||||
@@ -513,7 +449,6 @@ function deletePrescription(index) {
|
||||
idList: ids.value,
|
||||
prescriptionNoList: prescriptionNos.value,
|
||||
};
|
||||
console.log('deletePrescription删除', data);
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除以上数据!')
|
||||
.then(function () {
|
||||
@@ -530,13 +465,12 @@ function deletePrescription(index) {
|
||||
// form.value.medicationInfoList.forEach((medicationInfo) => {
|
||||
// medicationInfo.isEdit = false;
|
||||
// });
|
||||
// console.log(response, '处方详细的药品信息', form.value.medicationInfoList);
|
||||
// totalMedication.value = response.data.total;
|
||||
// });
|
||||
// }
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
}
|
||||
|
||||
defineExpose({ getList });
|
||||
|
||||
Reference in New Issue
Block a user