Update index.js

This commit is contained in:
huxuejian 2026-08-04 16:56:53 +08:00
parent 9568bb51aa
commit 42d6a6d71b

View File

@ -1794,7 +1794,7 @@ async function customerRefundOrder(item) {
}
async function getPatientOrderList(ctx) {
const { patientId, startDate, endDate, isPres, orderStatus } = ctx;
const { patientId, startDate, endDate, isPres, orderStatus, feeType } = ctx;
if (typeof patientId !== "string" || patientId.trim() === "") {
return { success: false, message: "患者id不能为空" };
}
@ -1811,6 +1811,9 @@ async function getPatientOrderList(ctx) {
if (typeof orderStatus === "string" && orderStatus.trim() !== "") {
query.orderStatus = orderStatus.trim();
}
if (["YB", "ZF"].includes(feeType)) {
query.feeType = feeType;
}
if (typeof isPres === "boolean") {
query.preOrderId = { $exists: isPres };
}