feat(i18n): migrate drug, medicineStorage, pharmacystockalert modules to vue-i18n (402+ keys)
This commit is contained in:
@@ -646,7 +646,16 @@
|
||||
"medicalRecordManagementDev": "Case Management (Dev)",
|
||||
"locationManagementDev": "Location Mgmt (Dev)",
|
||||
"autoCalculationDev": "Auto Calculation (Dev)",
|
||||
"medicalInstitutionFeeSettlementLedger": "Medical Institution Fee Settlement Ledger"
|
||||
"medicalInstitutionFeeSettlementLedger": "Medical Institution Fee Settlement Ledger",
|
||||
"maintenanceSystem": "Maintenance System",
|
||||
"packageManagement": "Package Management",
|
||||
"pharmacyWarehouseManagement2": "Pharmacy Warehouse Mgmt",
|
||||
"outpatientRegistration2": "OPD Registration",
|
||||
"inpatientDailySettlement": "IPD Daily Settlement",
|
||||
"checkProjectManagement": "Check Project Management",
|
||||
"inspectionPackageManagement": "Inspection Package Mgmt",
|
||||
"checkProjectPackageManagement": "Check Project Package Mgmt",
|
||||
"chargeConfig": "Charge Config"
|
||||
},
|
||||
"login": {
|
||||
"title": "Login",
|
||||
@@ -6170,6 +6179,14 @@
|
||||
"important": "Important",
|
||||
"training": "Training"
|
||||
},
|
||||
"todoFallback": "To-Do Item",
|
||||
"noDescription": "No description",
|
||||
"schedule": {
|
||||
"doctorSchedule": "{name}'s Schedule",
|
||||
"defaultTitle": "Doctor Schedule",
|
||||
"unknownTime": "Unknown Time",
|
||||
"tag": "Scheduled"
|
||||
},
|
||||
"featuresDesc": "Here are your configured quick function modules",
|
||||
"featureDescNotSet": "Function description not set",
|
||||
"noFeaturesHint": {
|
||||
@@ -6190,6 +6207,40 @@
|
||||
"saveToDbFailed": "Failed to save to database",
|
||||
"saveConfigFailed": "Failed to save configuration"
|
||||
},
|
||||
"todo": {
|
||||
"allTodos": "All To-Do Items",
|
||||
"allTodosDesc": "All your to-do items are displayed here",
|
||||
"priority": "Priority",
|
||||
"selectPriority": "Select priority",
|
||||
"high": "High",
|
||||
"medium": "Medium",
|
||||
"low": "Low",
|
||||
"status": "Status",
|
||||
"selectStatus": "Select status",
|
||||
"pending": "Pending",
|
||||
"processing": "Processing",
|
||||
"completed": "Completed",
|
||||
"prioritySuffix": " priority",
|
||||
"processNow": "Process Now",
|
||||
"viewDetails": "View Details",
|
||||
"noTodos": "No to-do items",
|
||||
"fallbackTitle": "To-Do Item",
|
||||
"noDescription": "No description",
|
||||
"justNow": "Just now",
|
||||
"minsAgo": "{n} min ago",
|
||||
"hoursAgo": "{n} hours ago",
|
||||
"daysAgo": "{n} days ago"
|
||||
},
|
||||
"error": {
|
||||
"back": "Go Back",
|
||||
"backHome": "Back to Home",
|
||||
"404Title": "404 Error!",
|
||||
"404Message": "Page Not Found!",
|
||||
"404Info": "Sorry, the page you are looking for does not exist. Try checking the URL for errors, then press the refresh button on your browser or try finding something else in our application.",
|
||||
"401Title": "401 Error!",
|
||||
"401Heading": "You don't have access!",
|
||||
"401Info": "Sorry, you don't have access. Please don't perform unauthorized operations. You can return to the main page."
|
||||
},
|
||||
"basic": {
|
||||
"warehouse": {
|
||||
"name": "Warehouse Name",
|
||||
@@ -6930,5 +6981,427 @@
|
||||
"ackSuccess": "Acknowledged successfully",
|
||||
"ackFailed": "Acknowledgement failed"
|
||||
}
|
||||
},
|
||||
"drug": {
|
||||
"inHospital": {
|
||||
"window": "Window",
|
||||
"windowWest": "West Pharmacy",
|
||||
"windowEast": "East Pharmacy",
|
||||
"windowNorth": "North Pharmacy",
|
||||
"windowSouth": "South Pharmacy",
|
||||
"orderType": "Order Type",
|
||||
"all": "All",
|
||||
"longTerm": "Long-term",
|
||||
"temporary": "Temporary",
|
||||
"rangeSeparator": "to",
|
||||
"startDate": "Start Date",
|
||||
"endDate": "End Date",
|
||||
"query": "Query",
|
||||
"dispense": "Dispense",
|
||||
"name": "Name",
|
||||
"spec": "Spec",
|
||||
"totalQty": "Total Qty",
|
||||
"location": "Location",
|
||||
"manufacturer": "Manufacturer",
|
||||
"code": "Code",
|
||||
"dosageForm": "Dosage Form",
|
||||
"packageQty": "Package Qty",
|
||||
"packageUnit": "Package Unit",
|
||||
"department": "Department",
|
||||
"bedNo": "Bed No.",
|
||||
"patientName": "Name",
|
||||
"quantity": "Quantity",
|
||||
"dosagePerTime": "Dose per Time",
|
||||
"usage": "Usage",
|
||||
"unitPrice": "Unit Price",
|
||||
"amount": "Amount",
|
||||
"purchasePrice": "Purchase Price"
|
||||
},
|
||||
"inpatient": {
|
||||
"summaryTab": "Dispensing Summary",
|
||||
"detailTab": "Dispensing Details",
|
||||
"returnTab": "Drug Return",
|
||||
"summaryCard": "Summary",
|
||||
"summaryDetail": "Summary Details",
|
||||
"patientList": "Patient List",
|
||||
"drugDetail": "Drug Details",
|
||||
"docNo": "Document No.",
|
||||
"applicant": "Applicant",
|
||||
"dispensePharmacy": "Dispensing Pharmacy",
|
||||
"status": "Status",
|
||||
"summaryDate": "Summary Date",
|
||||
"operation": "Action",
|
||||
"dispense": "Dispense",
|
||||
"pendingDispense": "Pending",
|
||||
"dispensed": "Dispensed",
|
||||
"all": "All",
|
||||
"longTerm": "Long-term",
|
||||
"temporary": "Temporary",
|
||||
"startDate": "Start Date",
|
||||
"endDate": "End Date",
|
||||
"search": "Search",
|
||||
"reset": "Reset",
|
||||
"batchDispense": "Batch Dispense",
|
||||
"batchVoid": "Batch Void",
|
||||
"confirmReturn": "Confirm Return",
|
||||
"scan": "Scan",
|
||||
"name": "Name",
|
||||
"spec": "Spec",
|
||||
"totalQty": "Total Qty",
|
||||
"location": "Location",
|
||||
"manufacturer": "Manufacturer",
|
||||
"code": "Code",
|
||||
"dosageForm": "Dosage Form",
|
||||
"packageQty": "Package Qty",
|
||||
"packageUnit": "Package Unit",
|
||||
"department": "Department",
|
||||
"bedNo": "Bed No.",
|
||||
"patientName": "Name",
|
||||
"quantity": "Quantity",
|
||||
"dosagePerTime": "Dose per Time",
|
||||
"usage": "Usage",
|
||||
"unitPrice": "Unit Price",
|
||||
"amount": "Amount",
|
||||
"purchasePrice": "Purchase Price",
|
||||
"seqNo": "No.",
|
||||
"itemName": "Item Name",
|
||||
"batchNo": "Batch No.",
|
||||
"dispenseLocation": "Dispense Location",
|
||||
"drugType": "Drug Type",
|
||||
"export": "Export",
|
||||
"returnDrug": "Return",
|
||||
"encounterNo": "Encounter No.",
|
||||
"gender": "Gender",
|
||||
"age": "Age",
|
||||
"totalCount": "{count} records",
|
||||
"nameOrId": "Name/ID No.",
|
||||
"dispenseStatus": "Dispense Status",
|
||||
"dispenseStatusFilter": "Dispense Status",
|
||||
"start": "Start",
|
||||
"end": "End",
|
||||
"preparingPharmacist": "Pharmacist",
|
||||
"drugCategory": "Drug Category",
|
||||
"westernAndPatent": "Western & Patent",
|
||||
"chineseMedicine": "TCM",
|
||||
"prescriptionPrint": "Print Rx",
|
||||
"prescriptionNo": "Rx No.",
|
||||
"dispenseQty": "Dispense Qty",
|
||||
"orderDoctor": "Ordering Doctor",
|
||||
"diagnosis": "Diagnosis",
|
||||
"frequency": "Frequency",
|
||||
"days": "Days",
|
||||
"void": "Void",
|
||||
"selectVoidReason": "Select Void Reason",
|
||||
"selectVoidReasonPlaceholder": "Please select void reason",
|
||||
"confirm": "OK",
|
||||
"cancel": "Cancel",
|
||||
"searchPatient": "Search Patient",
|
||||
"chargeStatus": "Charge Status",
|
||||
"visitDate": "Visit Date",
|
||||
"returnDrugOrder": "Return Order",
|
||||
"drugName": "Drug Name",
|
||||
"totalPrice": "Total Price",
|
||||
"lotNo": "Lot No.",
|
||||
"traceNo": "Trace No.",
|
||||
"enterTraceNo": "Enter trace number",
|
||||
"returnStatus": "Return Status",
|
||||
"returnQty": "Return Qty",
|
||||
"operationConfirm": "Confirm",
|
||||
"selectedCount": "{count} drug(s) selected",
|
||||
"totalAmountLabel": "Total: ",
|
||||
"totalAmount": "Total Amount: ",
|
||||
"dispenseDoctor": "Dispensing Doctor",
|
||||
"itemType": "Item Type",
|
||||
"dispenseStatusCol": "Dispense Status",
|
||||
"diagnosisName": "Diagnosis",
|
||||
"dosePerTime": "Dose per Time",
|
||||
"doseUnit": "Dose Unit",
|
||||
"unit": "Unit",
|
||||
"dispensePerTime": "Dispense per Time",
|
||||
"dispenseDuration": "Dispense Duration (Days)",
|
||||
"visitNo": "Visit NO",
|
||||
"prescribeDate": "Prescribe Date",
|
||||
"skinTestFlag": "Skin Test",
|
||||
"tcmFlag": "TCM Flag",
|
||||
"sourceTable": "Source Table",
|
||||
"yes": "Yes",
|
||||
"no": "No",
|
||||
"prompt": "Prompt",
|
||||
"selectDocNoFirst": "Please select a document number first",
|
||||
"confirmDispense": "Are you sure to dispense?",
|
||||
"confirmReturnDrug": "Are you sure to return?",
|
||||
"operationSuccess": "Operation successful",
|
||||
"dispenseSuccess": "Dispensed successfully",
|
||||
"dispenseFailed": "Dispensing failed",
|
||||
"returnSuccess": "Return successful",
|
||||
"returnFailed": "Return failed",
|
||||
"voidSuccess": "Voided successfully",
|
||||
"selectVoidReasonError": "Please select a void reason",
|
||||
"noOperableItems": "No dispensable items",
|
||||
"stockInsufficient": "Current batch stock insufficient",
|
||||
"qtyExceedsTotal": "Dispense quantity cannot exceed total",
|
||||
"qtyBelowTotal": "Dispense quantity cannot be less than total",
|
||||
"noDispenseSelected": "No items selected for dispensing, please reselect, dispensing failed",
|
||||
"traceNoNotMatched": "Trace number not matched in inventory, please scan individually in the dispensing list",
|
||||
"operationFailed": "Operation failed",
|
||||
"noPrintItems": "No items selected for printing, please reselect, printing failed",
|
||||
"getDataFailed": "Failed to get data",
|
||||
"getSummaryDetailFailed": "Failed to get summary details: ",
|
||||
"getDetailFailed": "Failed to get detail data: ",
|
||||
"unknownError": "Unknown error",
|
||||
"selectPatientFirst": "Please select a patient first",
|
||||
"selectDispenseData": "Please select data to dispense",
|
||||
"noDataToExport": "No data to export",
|
||||
"selectExportData": "Please select data to export",
|
||||
"selectReturnData": "Please select data to return",
|
||||
"exportSuccess": "Export successful",
|
||||
"yuan": "",
|
||||
"statusExecuted": "Executed",
|
||||
"statusSubmitted": "Submitted",
|
||||
"statusDispensed": "Dispensed",
|
||||
"statusPending": "Pending",
|
||||
"deviceDispenseFailed": "Device dispensing failed",
|
||||
"drugDispenseFailed": "Drug dispensing failed",
|
||||
"window1": "Window 1",
|
||||
"window2": "Window 2",
|
||||
"window3": "Window 3",
|
||||
"medicationList1": "Med List 1",
|
||||
"medicationList2": "Med List 2",
|
||||
"medicationList3": "Med List 3"
|
||||
}
|
||||
},
|
||||
"pharmacy": {
|
||||
"title": "Pharmacy Stock Alert Management",
|
||||
"refresh": "Refresh",
|
||||
"addAlert": "Add Alert",
|
||||
"exportReport": "Export Report",
|
||||
"totalAlerts": "Total Alerts",
|
||||
"outOfStock": "Out of Stock",
|
||||
"lowStock": "Low Stock",
|
||||
"expiring": "Expiring Soon",
|
||||
"supplierCount": "Supplier Count",
|
||||
"pendingRestock": "Pending Restock",
|
||||
"alertLevel": "Alert Level",
|
||||
"drugCategory": "Drug Category",
|
||||
"query": "Query",
|
||||
"reset": "Reset",
|
||||
"western": "Western Medicine",
|
||||
"chineseMedicine": "Chinese Medicine",
|
||||
"herbal": "Herbal Medicine",
|
||||
"biological": "Biological Product",
|
||||
"drugCode": "Drug Code",
|
||||
"drugName": "Drug Name",
|
||||
"spec": "Specification",
|
||||
"currentStock": "Current Stock",
|
||||
"minStock": "Min Stock",
|
||||
"maxStock": "Max Stock",
|
||||
"supplier": "Supplier",
|
||||
"lastRestock": "Last Restock",
|
||||
"expiryDate": "Expiry Date",
|
||||
"action": "Action",
|
||||
"restockApply": "Restock Request",
|
||||
"addDialogTitle": "Add Drug Stock Alert",
|
||||
"enterDrugCode": "Enter drug code",
|
||||
"enterDrugName": "Enter drug name",
|
||||
"specExample": "e.g. 0.5g*24 tablets",
|
||||
"pleaseSelect": "Please select",
|
||||
"enterSupplier": "Enter supplier name",
|
||||
"cancel": "Cancel",
|
||||
"confirm": "Confirm",
|
||||
"normal": "Normal",
|
||||
"addSuccess": "Added successfully",
|
||||
"exportWip": "Export feature in development"
|
||||
},
|
||||
"medicineStorage": {
|
||||
"common": {
|
||||
"add": "Add",
|
||||
"delete": "Delete",
|
||||
"cancel": "Cancel",
|
||||
"audit": "Audit",
|
||||
"save": "Save",
|
||||
"edit": "Edit",
|
||||
"confirm": "Confirm",
|
||||
"search": "Search",
|
||||
"reset": "Reset",
|
||||
"view": "View",
|
||||
"warehouse": "Warehouse:",
|
||||
"selectWarehouse": "Please select warehouse",
|
||||
"documentSearch": "Document Search",
|
||||
"enterDocumentNo": "Enter document number",
|
||||
"addDocument": "Add Document",
|
||||
"noDocuments": "No documents",
|
||||
"purchaser": "Purchaser:",
|
||||
"supplier": "Supplier:",
|
||||
"auditStatus": "Audit Status:",
|
||||
"documentType": "Document Type:",
|
||||
"documentDate": "Document Date:",
|
||||
"pleaseSelectWarehouse": "Please select warehouse before adding document",
|
||||
"pleaseSelectEdit": "Please select a document to edit",
|
||||
"pleaseSelectDelete": "Please select a document to delete",
|
||||
"approvedCannotDelete": "Approved documents cannot be deleted",
|
||||
"approvedCannotAudit": "This document is already approved, cannot approve again",
|
||||
"confirmDelete": "Are you sure to delete this purchase order?",
|
||||
"confirmAudit": "Are you sure to approve this purchase order?",
|
||||
"tip": "Tip",
|
||||
"deleteSuccess": "Deleted successfully",
|
||||
"deleteFailed": "Delete failed",
|
||||
"auditSuccess": "Approved successfully",
|
||||
"auditFailed": "Approval failed",
|
||||
"pleaseSelectAudit": "Please select a document to audit",
|
||||
"agreed": "Agreed",
|
||||
"none": "None",
|
||||
"addRow": "Add Row",
|
||||
"deleteRow": "Delete Row",
|
||||
"alertOrder": "Alert Order",
|
||||
"documentNo": "Document No.",
|
||||
"orderDate": "Order Date",
|
||||
"selectOrderDate": "Please select order date",
|
||||
"supplierLabel": "Supplier",
|
||||
"selectSupplier": "Please select supplier",
|
||||
"purchaserLabel": "Purchaser",
|
||||
"selectPurchaser": "Enter purchaser",
|
||||
"categoryLabel": "Category",
|
||||
"selectCategory": "Select category",
|
||||
"summary": "Summary(A)",
|
||||
"enterSummary": "Enter summary",
|
||||
"auditor": "Auditor",
|
||||
"auditDate": "Audit Date",
|
||||
"auditStatusLabel": "Audit Status:",
|
||||
"pleaseFillComplete": "Please fill in complete information",
|
||||
"pleaseSelectSupplierAndWarehouse": "Please select supplier and warehouse",
|
||||
"noMedicineFound": "No medicine found for this warehouse and supplier",
|
||||
"confirmSave": "Are you sure to save the data?",
|
||||
"addSuccess": "Added successfully",
|
||||
"saveSuccess": "Saved successfully",
|
||||
"saveFailed": "Save failed",
|
||||
"pleaseSelectDeleteRow": "Please select rows to delete",
|
||||
"confirmDeleteRow": "Are you sure to delete selected rows?",
|
||||
"itemCode": "Code",
|
||||
"itemName": "Name",
|
||||
"spec": "Spec",
|
||||
"unit": "Unit",
|
||||
"quantity": "Qty",
|
||||
"purchasePrice": "Purchase Price",
|
||||
"purchaseAmount": "Purchase Amount",
|
||||
"retailPrice": "Retail Price",
|
||||
"retailAmount": "Retail Amount",
|
||||
"manufacturer": "Manufacturer",
|
||||
"specStock": "Spec Stock",
|
||||
"approvalNo": "Approval No.",
|
||||
"remark": "Remark",
|
||||
"warehouseType": "Warehouse Type",
|
||||
"selectWarehouseType": "Select warehouse type",
|
||||
"orderMaker": "Order Maker",
|
||||
"selectOrderMaker": "Select order maker",
|
||||
"requestDept": "Request Dept",
|
||||
"selectRequestDept": "Select request dept",
|
||||
"requester": "Requester",
|
||||
"selectRequester": "Select requester",
|
||||
"supplierContact": "Supplier Contact",
|
||||
"enterSupplierContact": "Enter supplier contact",
|
||||
"inventoryPerson": "Inventory Person",
|
||||
"selectInventoryPerson": "Select inventory person",
|
||||
"applicationDept": "Application Dept",
|
||||
"applicant": "Applicant",
|
||||
"applicationTime": "Application Time",
|
||||
"approvalTime": "Approval Time",
|
||||
"approver": "Approver",
|
||||
"warehouse2": "Warehouse",
|
||||
"status": "Status",
|
||||
"operation": "Operation",
|
||||
"orderNo": "Order No.",
|
||||
"orderList": "Order List",
|
||||
"invoiceNo": "Invoice No.",
|
||||
"packagingCondition": "Packaging",
|
||||
"selectPackagingCondition": "Select packaging",
|
||||
"acceptanceResult": "Acceptance",
|
||||
"selectAcceptanceResult": "Select acceptance",
|
||||
"dateRangeSeparator": "to",
|
||||
"startDate": "Start Date",
|
||||
"endDate": "End Date",
|
||||
"orderMakingDate": "Order Date",
|
||||
"documentStatus": "Document Status",
|
||||
"selectDocumentStatus": "Select document status",
|
||||
"lotNumber": "Lot Number",
|
||||
"pleaseSelect": "Please select",
|
||||
"scan": "Scan"
|
||||
},
|
||||
"purchaseOrder": {
|
||||
"itemCode": "Item Code",
|
||||
"itemName": "Item Name",
|
||||
"purchasePrice": "Purchase Price",
|
||||
"retailPrice": "Retail Price",
|
||||
"packUnit": "Pack Unit",
|
||||
"minUnit": "Min Unit",
|
||||
"spec": "Spec",
|
||||
"specStock": "Spec Stock",
|
||||
"manufacturer": "Manufacturer",
|
||||
"approvalNo": "Approval No.",
|
||||
"batchStock": "Batch Stock"
|
||||
},
|
||||
"stockOutOrder": {
|
||||
"importRequestOrder": "Import Request Order",
|
||||
"lotNumber": "Lot Number",
|
||||
"enterLotNumber": "Enter lot number",
|
||||
"productionDate": "Production Date",
|
||||
"enterProductionDate": "Enter production date",
|
||||
"expirationDate": "Expiration Date",
|
||||
"enterExpirationDate": "Enter expiration date",
|
||||
"selectExpirationDate": "Select expiration date",
|
||||
"batchInventory": "Batch Inventory",
|
||||
"enterBatchInventory": "Enter batch inventory",
|
||||
"traceNo": "Trace No.",
|
||||
"enterTraceNo": "Enter trace number",
|
||||
"traceNoUnit": "Trace No. Unit",
|
||||
"enterTraceNoUnit": "Enter trace unit",
|
||||
"selectTraceNoUnit": "Select trace unit",
|
||||
"scan": "Scan",
|
||||
"packagingUnit": "Packaging Unit",
|
||||
"minUnit": "Min Unit",
|
||||
"enterOrderMaker": "Select order maker",
|
||||
"enterDocumentType": "Select document type",
|
||||
"enterOrderDate": "Select order date",
|
||||
"enterItemCode": "Enter item code",
|
||||
"enterItemName": "Enter item name",
|
||||
"enterSpec": "Enter specification",
|
||||
"enterUnit": "Enter unit",
|
||||
"enterQuantity": "Enter quantity",
|
||||
"enterManufacturer": "Enter manufacturer",
|
||||
"enterSpecStock": "Enter spec stock",
|
||||
"enterApprovalNo": "Enter approval number",
|
||||
"enterInvoiceNo": "Enter invoice number",
|
||||
"enterPackagingCondition": "Select packaging condition",
|
||||
"selectAcceptanceResult": "Select acceptance result",
|
||||
"enterSupplierContact": "Enter supplier contact",
|
||||
"pleaseEnterLotNumberFirst": "Please enter lot number first",
|
||||
"productionDateExceedExpiration": "Production date cannot be after expiration date",
|
||||
"expirationDateBeforeProduction": "Expiration date cannot be before production date",
|
||||
"getOrderListFailed": "Failed to get order list",
|
||||
"approvedCannotAudit": "This document is already approved, cannot approve again",
|
||||
"confirmAudit": "Are you sure to approve this order?",
|
||||
"auditSuccess": "Approved successfully",
|
||||
"auditFailed": "Approval failed"
|
||||
},
|
||||
"returnOrder": {
|
||||
"importStockInOrder": "Import Stock In Order",
|
||||
"disableDate": "Disable Date",
|
||||
"enterDisableDate": "Enter disable date",
|
||||
"disableDateBeforeExpiration": "Disable date cannot be before expiration date"
|
||||
},
|
||||
"documentManagement": {
|
||||
"purchaseOrder": "Purchase Order",
|
||||
"purchaseStockIn": "Purchase Stock In",
|
||||
"purchaseReturn": "Purchase Return",
|
||||
"stockOut": "Stock Out",
|
||||
"returnToWarehouse": "Return to Warehouse",
|
||||
"profitLoss": "Profit/Loss",
|
||||
"stocktaking": "Stocktaking",
|
||||
"pendingAudit": "Pending Audit",
|
||||
"auditing": "Auditing",
|
||||
"agreed": "Agreed",
|
||||
"rejected": "Rejected",
|
||||
"withdrawn": "Withdrawn",
|
||||
"pendingApply": "Pending Apply"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -646,7 +646,16 @@
|
||||
"medicalRecordManagementDev": "Case Management (Dev)",
|
||||
"locationManagementDev": "Location Mgmt (Dev)",
|
||||
"autoCalculationDev": "Auto Calculation (Dev)",
|
||||
"medicalInstitutionFeeSettlementLedger": "Medical Institution Fee Settlement Ledger"
|
||||
"medicalInstitutionFeeSettlementLedger": "Medical Institution Fee Settlement Ledger",
|
||||
"maintenanceSystem": "Hệ thống bảo trì",
|
||||
"packageManagement": "Quản lý gói khám",
|
||||
"pharmacyWarehouseManagement2": "Quản lý kho dược",
|
||||
"outpatientRegistration2": "Đăng ký ngoại trú",
|
||||
"inpatientDailySettlement": "Đối chiếu hàng ngày nội trú",
|
||||
"checkProjectManagement": "Quản lý dự án kiểm tra",
|
||||
"inspectionPackageManagement": "Quản lý gói xét nghiệm",
|
||||
"checkProjectPackageManagement": "Quản lý gói dự án kiểm tra",
|
||||
"chargeConfig": "Cấu hình phí"
|
||||
},
|
||||
"login": {
|
||||
"title": "Đăng Nhập",
|
||||
@@ -6170,6 +6179,14 @@
|
||||
"important": "Quan trọng",
|
||||
"training": "Đào tạo"
|
||||
},
|
||||
"todoFallback": "Mục việc cần làm",
|
||||
"noDescription": "Chưa có mô tả",
|
||||
"schedule": {
|
||||
"doctorSchedule": "Lịch bác sĩ {name}",
|
||||
"defaultTitle": "Lịch bác sĩ",
|
||||
"unknownTime": "Chưa rõ thời gian",
|
||||
"tag": "Lịch trực"
|
||||
},
|
||||
"featuresDesc": "Đây là các module chức năng nhanh bạn đã cấu hình",
|
||||
"featureDescNotSet": "Chưa đặt mô tả chức năng",
|
||||
"noFeaturesHint": {
|
||||
@@ -6190,6 +6207,40 @@
|
||||
"saveToDbFailed": "Lưu vào cơ sở dữ liệu thất bại",
|
||||
"saveConfigFailed": "Lưu cấu hình thất bại"
|
||||
},
|
||||
"todo": {
|
||||
"allTodos": "Tất cả việc cần làm",
|
||||
"allTodosDesc": "Tất cả các mục việc cần làm của bạn được hiển thị tại đây",
|
||||
"priority": "Ưu tiên",
|
||||
"selectPriority": "Chọn mức ưu tiên",
|
||||
"high": "Cao",
|
||||
"medium": "Trung bình",
|
||||
"low": "Thấp",
|
||||
"status": "Trạng thái",
|
||||
"selectStatus": "Chọn trạng thái",
|
||||
"pending": "Chưa xử lý",
|
||||
"processing": "Đang xử lý",
|
||||
"completed": "Hoàn thành",
|
||||
"prioritySuffix": " ưu tiên",
|
||||
"processNow": "Xử lý ngay",
|
||||
"viewDetails": "Xem chi tiết",
|
||||
"noTodos": "Không có việc cần làm",
|
||||
"fallbackTitle": "Việc cần làm",
|
||||
"noDescription": "Chưa có mô tả",
|
||||
"justNow": "Vừa xong",
|
||||
"minsAgo": "{n} phút trước",
|
||||
"hoursAgo": "{n} giờ trước",
|
||||
"daysAgo": "{n} ngày trước"
|
||||
},
|
||||
"error": {
|
||||
"back": "Quay lại",
|
||||
"backHome": "Về trang chủ",
|
||||
"404Title": "Lỗi 404!",
|
||||
"404Message": "Không tìm thấy trang!",
|
||||
"404Info": "Xin lỗi, trang bạn tìm kiếm không tồn tại. Hãy kiểm tra URL, nhấn nút làm mới trình duyệt hoặc tìm nội dung khác trong ứng dụng.",
|
||||
"401Title": "Lỗi 401!",
|
||||
"401Heading": "Bạn không có quyền truy cập!",
|
||||
"401Info": "Xin lỗi, bạn không có quyền truy cập. Vui lòng không thực hiện thao tác trái phép. Bạn có thể quay về trang chủ."
|
||||
},
|
||||
"basic": {
|
||||
"warehouse": {
|
||||
"name": "Tên kho",
|
||||
@@ -6930,5 +6981,427 @@
|
||||
"ackSuccess": "Xác nhận thành công",
|
||||
"ackFailed": "Xác nhận thất bại"
|
||||
}
|
||||
},
|
||||
"drug": {
|
||||
"inHospital": {
|
||||
"window": "Cửa sổ",
|
||||
"windowWest": "Nhà thuốc nội trú Tây",
|
||||
"windowEast": "Nhà thuốc nội trú Đông",
|
||||
"windowNorth": "Nhà thuốc nội trú Bắc",
|
||||
"windowSouth": "Nhà thuốc nội trú Nam",
|
||||
"orderType": "Loại y lệnh",
|
||||
"all": "Tất cả",
|
||||
"longTerm": "Dài hạn",
|
||||
"temporary": "Tạm thời",
|
||||
"rangeSeparator": "đến",
|
||||
"startDate": "Ngày bắt đầu",
|
||||
"endDate": "Ngày kết thúc",
|
||||
"query": "Tìm kiếm",
|
||||
"dispense": "Cấp phát",
|
||||
"name": "Tên",
|
||||
"spec": "Quy cách",
|
||||
"totalQty": "Tổng số lượng",
|
||||
"location": "Vị trí",
|
||||
"manufacturer": "Nhà sản xuất",
|
||||
"code": "Mã",
|
||||
"dosageForm": "Dạng bào chế",
|
||||
"packageQty": "Số lượng đóng gói",
|
||||
"packageUnit": "Đơn vị đóng gói",
|
||||
"department": "Khoa",
|
||||
"bedNo": "Số giường",
|
||||
"patientName": "Họ tên",
|
||||
"quantity": "Số lượng",
|
||||
"dosagePerTime": "Liều mỗi lần",
|
||||
"usage": "Cách dùng",
|
||||
"unitPrice": "Đơn giá",
|
||||
"amount": "Thành tiền",
|
||||
"purchasePrice": "Giá mua"
|
||||
},
|
||||
"inpatient": {
|
||||
"summaryTab": "Tổng hợp cấp phát",
|
||||
"detailTab": "Chi tiết cấp phát",
|
||||
"returnTab": "Trả thuốc nội trú",
|
||||
"summaryCard": "Tổng hợp",
|
||||
"summaryDetail": "Chi tiết tổng hợp",
|
||||
"patientList": "Danh sách bệnh nhân",
|
||||
"drugDetail": "Chi tiết thuốc",
|
||||
"docNo": "Số chứng từ",
|
||||
"applicant": "Người yêu cầu",
|
||||
"dispensePharmacy": "Nhà thuốc cấp phát",
|
||||
"status": "Trạng thái",
|
||||
"summaryDate": "Ngày tổng hợp",
|
||||
"operation": "Thao tác",
|
||||
"dispense": "Cấp phát",
|
||||
"pendingDispense": "Chờ cấp phát",
|
||||
"dispensed": "Đã cấp phát",
|
||||
"all": "Tất cả",
|
||||
"longTerm": "Dài hạn",
|
||||
"temporary": "Tạm thời",
|
||||
"startDate": "Ngày bắt đầu",
|
||||
"endDate": "Ngày kết thúc",
|
||||
"search": "Tìm kiếm",
|
||||
"reset": "Đặt lại",
|
||||
"batchDispense": "Cấp phát hàng loạt",
|
||||
"batchVoid": "Hủy hàng loạt",
|
||||
"confirmReturn": "Xác nhận trả thuốc",
|
||||
"scan": "Quét mã",
|
||||
"name": "Họ tên",
|
||||
"spec": "Quy cách",
|
||||
"totalQty": "Tổng số lượng",
|
||||
"location": "Vị trí",
|
||||
"manufacturer": "Nhà sản xuất",
|
||||
"code": "Mã",
|
||||
"dosageForm": "Dạng bào chế",
|
||||
"packageQty": "Số lượng đóng gói",
|
||||
"packageUnit": "Đơn vị đóng gói",
|
||||
"department": "Khoa",
|
||||
"bedNo": "Số giường",
|
||||
"patientName": "Họ tên",
|
||||
"quantity": "Số lượng",
|
||||
"dosagePerTime": "Liều mỗi lần",
|
||||
"usage": "Cách dùng",
|
||||
"unitPrice": "Đơn giá",
|
||||
"amount": "Thành tiền",
|
||||
"purchasePrice": "Giá mua",
|
||||
"seqNo": "STT",
|
||||
"itemName": "Tên mục",
|
||||
"batchNo": "Số lô",
|
||||
"dispenseLocation": "Địa điểm cấp phát",
|
||||
"drugType": "Loại thuốc",
|
||||
"export": "Xuất",
|
||||
"returnDrug": "Trả thuốc",
|
||||
"encounterNo": "Số nội trú",
|
||||
"gender": "Giới tính",
|
||||
"age": "Tuổi",
|
||||
"totalCount": "{count} bản ghi",
|
||||
"nameOrId": "Họ tên/Số CMND",
|
||||
"dispenseStatus": "Trạng thái cấp phát",
|
||||
"dispenseStatusFilter": "Trạng thái cấp phát",
|
||||
"start": "Bắt đầu",
|
||||
"end": "Kết thúc",
|
||||
"preparingPharmacist": "Dược sĩ điều phối",
|
||||
"drugCategory": "Phân loại thuốc",
|
||||
"westernAndPatent": "Tây y & Thuốc thành phẩm",
|
||||
"chineseMedicine": "Y học cổ truyền",
|
||||
"prescriptionPrint": "In đơn thuốc",
|
||||
"prescriptionNo": "Số đơn thuốc",
|
||||
"dispenseQty": "Số lượng cấp phát",
|
||||
"orderDoctor": "Bác sĩ kê đơn",
|
||||
"diagnosis": "Chẩn đoán",
|
||||
"frequency": "Tần suất",
|
||||
"days": "Số ngày",
|
||||
"void": "Hủy",
|
||||
"selectVoidReason": "Chọn lý do hủy",
|
||||
"selectVoidReasonPlaceholder": "Vui lòng chọn lý do hủy",
|
||||
"confirm": "Xác nhận",
|
||||
"cancel": "Hủy",
|
||||
"searchPatient": "Tìm bệnh nhân",
|
||||
"chargeStatus": "Trạng thái thanh toán",
|
||||
"visitDate": "Ngày khám",
|
||||
"returnDrugOrder": "Phiếu trả thuốc",
|
||||
"drugName": "Tên thuốc",
|
||||
"totalPrice": "Tổng giá",
|
||||
"lotNo": "Số lô",
|
||||
"traceNo": "Mã truy xuất",
|
||||
"enterTraceNo": "Nhập mã truy xuất",
|
||||
"returnStatus": "Trạng thái trả",
|
||||
"returnQty": "Số lượng trả",
|
||||
"operationConfirm": "Xác nhận thao tác",
|
||||
"selectedCount": "Đã chọn {count} loại thuốc",
|
||||
"totalAmountLabel": "Tổng cộng: ",
|
||||
"totalAmount": "Tổng tiền: ",
|
||||
"dispenseDoctor": "Bác sĩ cấp phát",
|
||||
"itemType": "Loại mục",
|
||||
"dispenseStatusCol": "Trạng thái cấp phát",
|
||||
"diagnosisName": "Tên chẩn đoán",
|
||||
"dosePerTime": "Liều mỗi lần",
|
||||
"doseUnit": "Đơn vị liều",
|
||||
"unit": "Đơn vị",
|
||||
"dispensePerTime": "SL cấp phát mỗi lần",
|
||||
"dispenseDuration": "Số ngày cấp phát",
|
||||
"visitNo": "Số khám",
|
||||
"prescribeDate": "Ngày kê đơn",
|
||||
"skinTestFlag": "Test da",
|
||||
"tcmFlag": "Cờ YHCT",
|
||||
"sourceTable": "Bảng nguồn",
|
||||
"yes": "Có",
|
||||
"no": "Không",
|
||||
"prompt": "Thông báo",
|
||||
"selectDocNoFirst": "Vui lòng chọn số chứng từ trước",
|
||||
"confirmDispense": "Bạn có chắc chắn muốn cấp phát?",
|
||||
"confirmReturnDrug": "Bạn có chắc chắn muốn trả thuốc?",
|
||||
"operationSuccess": "Thao tác thành công",
|
||||
"dispenseSuccess": "Cấp phát thành công",
|
||||
"dispenseFailed": "Cấp phát thất bại",
|
||||
"returnSuccess": "Trả thuốc thành công",
|
||||
"returnFailed": "Trả thuốc thất bại",
|
||||
"voidSuccess": "Hủy thành công",
|
||||
"selectVoidReasonError": "Vui lòng chọn lý do hủy",
|
||||
"noOperableItems": "Không có mục nào để cấp phát",
|
||||
"stockInsufficient": "Tồn kho lô hiện tại không đủ",
|
||||
"qtyExceedsTotal": "Số lượng cấp phát không được lớn hơn tổng",
|
||||
"qtyBelowTotal": "Số lượng cấp phát không được nhỏ hơn tổng",
|
||||
"noDispenseSelected": "Chưa chọn mục để cấp phát, vui lòng chọn lại, cấp phát thất bại",
|
||||
"traceNoNotMatched": "Không tìm thấy mã truy xuất trong kho, vui lòng quét riêng trong danh sách cấp phát",
|
||||
"operationFailed": "Thao tác thất bại",
|
||||
"noPrintItems": "Chưa chọn mục để in, vui lòng chọn lại, in thất bại",
|
||||
"getDataFailed": "Lấy dữ liệu thất bại",
|
||||
"getSummaryDetailFailed": "Lấy chi tiết tổng hợp thất bại: ",
|
||||
"getDetailFailed": "Lấy dữ liệu chi tiết thất bại: ",
|
||||
"unknownError": "Lỗi không xác định",
|
||||
"selectPatientFirst": "Vui lòng chọn bệnh nhân trước",
|
||||
"selectDispenseData": "Vui lòng chọn dữ liệu để cấp phát",
|
||||
"noDataToExport": "Không có dữ liệu để xuất",
|
||||
"selectExportData": "Vui lòng chọn dữ liệu để xuất",
|
||||
"selectReturnData": "Vui lòng chọn dữ liệu để trả",
|
||||
"exportSuccess": "Xuất thành công",
|
||||
"yuan": "",
|
||||
"statusExecuted": "Đã thực hiện",
|
||||
"statusSubmitted": "Đã gửi",
|
||||
"statusDispensed": "Đã cấp phát",
|
||||
"statusPending": "Chờ điều phối",
|
||||
"deviceDispenseFailed": "Cấp phát vật tư thất bại",
|
||||
"drugDispenseFailed": "Cấp phát thuốc thất bại",
|
||||
"window1": "Cửa sổ 1",
|
||||
"window2": "Cửa sổ 2",
|
||||
"window3": "Cửa sổ 3",
|
||||
"medicationList1": "Đơn thuốc 1",
|
||||
"medicationList2": "Đơn thuốc 2",
|
||||
"medicationList3": "Đơn thuốc 3"
|
||||
}
|
||||
},
|
||||
"pharmacy": {
|
||||
"title": "Quản Lý Cảnh Báo Tồn Kho Dược Phẩm",
|
||||
"refresh": "Làm mới",
|
||||
"addAlert": "Thêm cảnh báo",
|
||||
"exportReport": "Xuất báo cáo",
|
||||
"totalAlerts": "Tổng cảnh báo",
|
||||
"outOfStock": "Hết hàng",
|
||||
"lowStock": "Tồn kho thấp",
|
||||
"expiring": "Sắp hết hạn",
|
||||
"supplierCount": "Số nhà cung cấp",
|
||||
"pendingRestock": "Chờ nhập hàng",
|
||||
"alertLevel": "Mức cảnh báo",
|
||||
"drugCategory": "Loại dược phẩm",
|
||||
"query": "Tìm kiếm",
|
||||
"reset": "Đặt lại",
|
||||
"western": "Tây dược",
|
||||
"chineseMedicine": "Trung dược",
|
||||
"herbal": "Thảo dược",
|
||||
"biological": "Sinh phẩm",
|
||||
"drugCode": "Mã dược phẩm",
|
||||
"drugName": "Tên dược phẩm",
|
||||
"spec": "Quy cách",
|
||||
"currentStock": "Tồn kho hiện tại",
|
||||
"minStock": "Tồn kho tối thiểu",
|
||||
"maxStock": "Tồn kho tối đa",
|
||||
"supplier": "Nhà cung cấp",
|
||||
"lastRestock": "Lần nhập cuối",
|
||||
"expiryDate": "Ngày hết hạn",
|
||||
"action": "Thao tác",
|
||||
"restockApply": "Yêu cầu nhập hàng",
|
||||
"addDialogTitle": "Thêm cảnh báo tồn kho dược phẩm",
|
||||
"enterDrugCode": "Nhập mã dược phẩm",
|
||||
"enterDrugName": "Nhập tên dược phẩm",
|
||||
"specExample": "VD: 0.5g*24 viên",
|
||||
"pleaseSelect": "Vui lòng chọn",
|
||||
"enterSupplier": "Nhập tên nhà cung cấp",
|
||||
"cancel": "Hủy",
|
||||
"confirm": "Xác nhận",
|
||||
"normal": "Bình thường",
|
||||
"addSuccess": "Thêm thành công",
|
||||
"exportWip": "Tính năng xuất đang được phát triển"
|
||||
},
|
||||
"medicineStorage": {
|
||||
"common": {
|
||||
"add": "Thêm",
|
||||
"delete": "Xóa",
|
||||
"cancel": "Hủy",
|
||||
"audit": "Duyệt",
|
||||
"save": "Lưu",
|
||||
"edit": "Sửa",
|
||||
"confirm": "Xác nhận",
|
||||
"search": "Tìm kiếm",
|
||||
"reset": "Đặt lại",
|
||||
"view": "Xem",
|
||||
"warehouse": "Kho:",
|
||||
"selectWarehouse": "Vui lòng chọn kho",
|
||||
"documentSearch": "Tìm kiếm chứng từ",
|
||||
"enterDocumentNo": "Nhập số chứng từ",
|
||||
"addDocument": "Thêm chứng từ",
|
||||
"noDocuments": "Không có chứng từ",
|
||||
"purchaser": "Người mua:",
|
||||
"supplier": "Nhà cung cấp:",
|
||||
"auditStatus": "Trạng thái duyệt:",
|
||||
"documentType": "Loại chứng từ:",
|
||||
"documentDate": "Ngày chứng từ:",
|
||||
"pleaseSelectWarehouse": "Vui lòng chọn kho trước khi thêm chứng từ",
|
||||
"pleaseSelectEdit": "Vui lòng chọn chứng từ để sửa",
|
||||
"pleaseSelectDelete": "Vui lòng chọn chứng từ để xóa",
|
||||
"approvedCannotDelete": "Không thể xóa chứng từ đã duyệt",
|
||||
"approvedCannotAudit": "Chứng từ đã được duyệt, không thể duyệt lại",
|
||||
"confirmDelete": "Bạn có chắc chắn muốn xóa đơn đặt hàng này?",
|
||||
"confirmAudit": "Bạn có chắc chắn muốn duyệt đơn đặt hàng này?",
|
||||
"tip": "Thông báo",
|
||||
"deleteSuccess": "Xóa thành công",
|
||||
"deleteFailed": "Xóa thất bại",
|
||||
"auditSuccess": "Duyệt thành công",
|
||||
"auditFailed": "Duyệt thất bại",
|
||||
"pleaseSelectAudit": "Vui lòng chọn chứng từ để duyệt",
|
||||
"agreed": "Đã duyệt",
|
||||
"none": "Không có",
|
||||
"addRow": "Thêm dòng",
|
||||
"deleteRow": "Xóa dòng",
|
||||
"alertOrder": "Đặt hàng cảnh báo",
|
||||
"documentNo": "Số chứng từ",
|
||||
"orderDate": "Ngày lập",
|
||||
"selectOrderDate": "Vui lòng chọn ngày lập",
|
||||
"supplierLabel": "Nhà cung cấp",
|
||||
"selectSupplier": "Vui lòng chọn nhà cung cấp",
|
||||
"purchaserLabel": "Người mua",
|
||||
"selectPurchaser": "Nhập người mua",
|
||||
"categoryLabel": "Phân loại",
|
||||
"selectCategory": "Chọn phân loại",
|
||||
"summary": "Tóm tắt(A)",
|
||||
"enterSummary": "Nhập tóm tắt",
|
||||
"auditor": "Người duyệt",
|
||||
"auditDate": "Ngày duyệt",
|
||||
"auditStatusLabel": "Trạng thái duyệt:",
|
||||
"pleaseFillComplete": "Vui lòng điền đầy đủ thông tin",
|
||||
"pleaseSelectSupplierAndWarehouse": "Vui lòng chọn nhà cung cấp và kho",
|
||||
"noMedicineFound": "Không tìm thấy thuốc cho kho và nhà cung cấp này",
|
||||
"confirmSave": "Bạn có chắc chắn muốn lưu dữ liệu?",
|
||||
"addSuccess": "Thêm thành công",
|
||||
"saveSuccess": "Lưu thành công",
|
||||
"saveFailed": "Lưu thất bại",
|
||||
"pleaseSelectDeleteRow": "Vui lòng chọn dòng để xóa",
|
||||
"confirmDeleteRow": "Bạn có chắc chắn muốn xóa các dòng đã chọn?",
|
||||
"itemCode": "Mã",
|
||||
"itemName": "Tên",
|
||||
"spec": "Quy cách",
|
||||
"unit": "Đơn vị",
|
||||
"quantity": "SL",
|
||||
"purchasePrice": "Giá nhập",
|
||||
"purchaseAmount": "Thành tiền nhập",
|
||||
"retailPrice": "Giá bán",
|
||||
"retailAmount": "Thành tiền bán",
|
||||
"manufacturer": "Nhà sản xuất",
|
||||
"specStock": "Tồn kho quy cách",
|
||||
"approvalNo": "Số phê duyệt",
|
||||
"remark": "Ghi chú",
|
||||
"warehouseType": "Loại kho",
|
||||
"selectWarehouseType": "Chọn loại kho",
|
||||
"orderMaker": "Người lập",
|
||||
"selectOrderMaker": "Chọn người lập",
|
||||
"requestDept": "Bộ phận yêu cầu",
|
||||
"selectRequestDept": "Chọn bộ phận yêu cầu",
|
||||
"requester": "Người yêu cầu",
|
||||
"selectRequester": "Chọn người yêu cầu",
|
||||
"supplierContact": "Liên hệ NCC",
|
||||
"enterSupplierContact": "Nhập liên hệ NCC",
|
||||
"inventoryPerson": "Người kiểm kê",
|
||||
"selectInventoryPerson": "Chọn người kiểm kê",
|
||||
"applicationDept": "Bộ phận đề xuất",
|
||||
"applicant": "Người đề xuất",
|
||||
"applicationTime": "Thời gian đề xuất",
|
||||
"approvalTime": "Thời gian duyệt",
|
||||
"approver": "Người duyệt",
|
||||
"warehouse2": "Kho",
|
||||
"status": "Trạng thái",
|
||||
"operation": "Thao tác",
|
||||
"orderNo": "Số đơn hàng",
|
||||
"orderList": "Danh sách đơn hàng",
|
||||
"invoiceNo": "Số hóa đơn",
|
||||
"packagingCondition": "Tình trạng đóng gói",
|
||||
"selectPackagingCondition": "Chọn tình trạng đóng gói",
|
||||
"acceptanceResult": "Kết quả nghiệm thu",
|
||||
"selectAcceptanceResult": "Chọn kết quả nghiệm thu",
|
||||
"dateRangeSeparator": "đến",
|
||||
"startDate": "Ngày bắt đầu",
|
||||
"endDate": "Ngày kết thúc",
|
||||
"orderMakingDate": "Ngày lập chứng từ",
|
||||
"documentStatus": "Trạng thái chứng từ",
|
||||
"selectDocumentStatus": "Chọn trạng thái chứng từ",
|
||||
"lotNumber": "Số lô",
|
||||
"pleaseSelect": "Vui lòng chọn",
|
||||
"scan": "Quét mã"
|
||||
},
|
||||
"purchaseOrder": {
|
||||
"itemCode": "Mã hàng",
|
||||
"itemName": "Tên hàng",
|
||||
"purchasePrice": "Giá nhập",
|
||||
"retailPrice": "Giá bán lẻ",
|
||||
"packUnit": "Đơn vị đóng gói",
|
||||
"minUnit": "Đơn vị nhỏ nhất",
|
||||
"spec": "Quy cách",
|
||||
"specStock": "Tồn kho quy cách",
|
||||
"manufacturer": "Nhà sản xuất",
|
||||
"approvalNo": "Số phê duyệt",
|
||||
"batchStock": "Tồn kho lô"
|
||||
},
|
||||
"stockOutOrder": {
|
||||
"importRequestOrder": "Nhập đơn yêu cầu",
|
||||
"lotNumber": "Số lô",
|
||||
"enterLotNumber": "Nhập số lô",
|
||||
"productionDate": "Ngày sản xuất",
|
||||
"enterProductionDate": "Nhập ngày sản xuất",
|
||||
"expirationDate": "Ngày hết hạn",
|
||||
"enterExpirationDate": "Nhập ngày hết hạn",
|
||||
"selectExpirationDate": "Chọn ngày hết hạn",
|
||||
"batchInventory": "Tồn kho lô",
|
||||
"enterBatchInventory": "Nhập tồn kho lô",
|
||||
"traceNo": "Mã truy xuất",
|
||||
"enterTraceNo": "Nhập mã truy xuất",
|
||||
"traceNoUnit": "Đơn vị mã truy xuất",
|
||||
"enterTraceNoUnit": "Nhập đơn vị mã truy xuất",
|
||||
"selectTraceNoUnit": "Chọn đơn vị mã truy xuất",
|
||||
"scan": "Quét mã",
|
||||
"packagingUnit": "Đơn vị đóng gói",
|
||||
"minUnit": "Đơn vị nhỏ nhất",
|
||||
"enterOrderMaker": "Chọn người lập",
|
||||
"enterDocumentType": "Chọn loại chứng từ",
|
||||
"enterOrderDate": "Chọn ngày lập",
|
||||
"enterItemCode": "Nhập mã hàng",
|
||||
"enterItemName": "Nhập tên hàng",
|
||||
"enterSpec": "Nhập quy cách",
|
||||
"enterUnit": "Nhập đơn vị",
|
||||
"enterQuantity": "Nhập số lượng",
|
||||
"enterManufacturer": "Nhập nhà sản xuất",
|
||||
"enterSpecStock": "Nhập tồn kho quy cách",
|
||||
"enterApprovalNo": "Nhập số phê duyệt",
|
||||
"enterInvoiceNo": "Nhập số hóa đơn",
|
||||
"enterPackagingCondition": "Chọn tình trạng đóng gói",
|
||||
"selectAcceptanceResult": "Chọn kết quả nghiệm thu",
|
||||
"enterSupplierContact": "Nhập liên hệ NCC",
|
||||
"pleaseEnterLotNumberFirst": "Vui lòng nhập số lô trước",
|
||||
"productionDateExceedExpiration": "Ngày sản xuất không được sau ngày hết hạn",
|
||||
"expirationDateBeforeProduction": "Ngày hết hạn không được trước ngày sản xuất",
|
||||
"getOrderListFailed": "Lấy danh sách đơn hàng thất bại",
|
||||
"approvedCannotAudit": "Chứng từ đã được duyệt, không thể duyệt lại",
|
||||
"confirmAudit": "Bạn có chắc chắn muốn duyệt đơn này?",
|
||||
"auditSuccess": "Duyệt thành công",
|
||||
"auditFailed": "Duyệt thất bại"
|
||||
},
|
||||
"returnOrder": {
|
||||
"importStockInOrder": "Nhập đơn nhập kho",
|
||||
"disableDate": "Ngày ngừng sử dụng",
|
||||
"enterDisableDate": "Nhập ngày ngừng sử dụng",
|
||||
"disableDateBeforeExpiration": "Ngày ngừng sử dụng không được trước ngày hết hạn"
|
||||
},
|
||||
"documentManagement": {
|
||||
"purchaseOrder": "Đặt hàng mua",
|
||||
"purchaseStockIn": "Nhập kho mua",
|
||||
"purchaseReturn": "Trả hàng mua",
|
||||
"stockOut": "Xuất kho",
|
||||
"returnToWarehouse": "Trả lại kho",
|
||||
"profitLoss": "Lãi/Lỗ",
|
||||
"stocktaking": "Kiểm kê",
|
||||
"pendingAudit": "Chờ duyệt",
|
||||
"auditing": "Đang duyệt",
|
||||
"agreed": "Đã duyệt",
|
||||
"rejected": "Từ chối",
|
||||
"withdrawn": "Đã rút",
|
||||
"pendingApply": "Chờ nộp"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6186,6 +6186,14 @@
|
||||
"important": "重要",
|
||||
"training": "培训"
|
||||
},
|
||||
"todoFallback": "待办事项",
|
||||
"noDescription": "暂无描述",
|
||||
"schedule": {
|
||||
"doctorSchedule": "{name}医生排班",
|
||||
"defaultTitle": "医生排班",
|
||||
"unknownTime": "未知时间",
|
||||
"tag": "排班"
|
||||
},
|
||||
"featuresDesc": "这里展示了您配置的快捷功能模块",
|
||||
"featureDescNotSet": "功能描述未设置",
|
||||
"noFeaturesHint": {
|
||||
@@ -6206,6 +6214,40 @@
|
||||
"saveToDbFailed": "保存到数据库失败",
|
||||
"saveConfigFailed": "保存配置失败"
|
||||
},
|
||||
"todo": {
|
||||
"allTodos": "全部待办事项",
|
||||
"allTodosDesc": "这里展示了您的所有待办事项",
|
||||
"priority": "优先级",
|
||||
"selectPriority": "请选择优先级",
|
||||
"high": "高",
|
||||
"medium": "中",
|
||||
"low": "低",
|
||||
"status": "状态",
|
||||
"selectStatus": "请选择状态",
|
||||
"pending": "未处理",
|
||||
"processing": "处理中",
|
||||
"completed": "已完成",
|
||||
"prioritySuffix": "优先级",
|
||||
"processNow": "立即处理",
|
||||
"viewDetails": "查看详情",
|
||||
"noTodos": "暂无待办事项",
|
||||
"fallbackTitle": "待办事项",
|
||||
"noDescription": "暂无描述",
|
||||
"justNow": "刚刚",
|
||||
"minsAgo": "{n}分钟前",
|
||||
"hoursAgo": "{n}小时前",
|
||||
"daysAgo": "{n}天前"
|
||||
},
|
||||
"error": {
|
||||
"back": "返回",
|
||||
"backHome": "返回首页",
|
||||
"404Title": "404错误!",
|
||||
"404Message": "找不到网页!",
|
||||
"404Info": "对不起,您正在寻找的页面不存在。尝试检查URL的错误,然后按浏览器上的刷新按钮或尝试在我们的应用程序中找到其他内容。",
|
||||
"401Title": "401错误!",
|
||||
"401Heading": "您没有访问权限!",
|
||||
"401Info": "对不起,您没有访问权限,请不要进行非法操作!您可以返回主页面。"
|
||||
},
|
||||
"basic": {
|
||||
"warehouse": {
|
||||
"name": "仓库名称",
|
||||
@@ -6946,5 +6988,427 @@
|
||||
"ackSuccess": "确认成功",
|
||||
"ackFailed": "确认失败"
|
||||
}
|
||||
},
|
||||
"drug": {
|
||||
"inHospital": {
|
||||
"window": "窗口",
|
||||
"windowWest": "住院西药房",
|
||||
"windowEast": "住院东药房",
|
||||
"windowNorth": "住院北药房",
|
||||
"windowSouth": "住院南药房",
|
||||
"orderType": "医嘱类型",
|
||||
"all": "全部",
|
||||
"longTerm": "长期",
|
||||
"temporary": "临时",
|
||||
"rangeSeparator": "至",
|
||||
"startDate": "开始日期",
|
||||
"endDate": "结束日期",
|
||||
"query": "查询",
|
||||
"dispense": "发药",
|
||||
"name": "名称",
|
||||
"spec": "规格",
|
||||
"totalQty": "总量",
|
||||
"location": "位置",
|
||||
"manufacturer": "厂家",
|
||||
"code": "编码",
|
||||
"dosageForm": "剂型",
|
||||
"packageQty": "包装数量",
|
||||
"packageUnit": "包装单位",
|
||||
"department": "科室",
|
||||
"bedNo": "床号",
|
||||
"patientName": "姓名",
|
||||
"quantity": "数量",
|
||||
"dosagePerTime": "每次剂量",
|
||||
"usage": "用法",
|
||||
"unitPrice": "单价",
|
||||
"amount": "金额",
|
||||
"purchasePrice": "购入价"
|
||||
},
|
||||
"inpatient": {
|
||||
"summaryTab": "发药汇总单",
|
||||
"detailTab": "发药明细单",
|
||||
"returnTab": "住院退药",
|
||||
"summaryCard": "汇总单",
|
||||
"summaryDetail": "汇总单详情",
|
||||
"patientList": "患者列表",
|
||||
"drugDetail": "药品明细",
|
||||
"docNo": "单据号",
|
||||
"applicant": "申请人",
|
||||
"dispensePharmacy": "发药药房",
|
||||
"status": "状态",
|
||||
"summaryDate": "汇总日期",
|
||||
"operation": "操作",
|
||||
"dispense": "发药",
|
||||
"pendingDispense": "待发药",
|
||||
"dispensed": "已发药",
|
||||
"all": "全部",
|
||||
"longTerm": "长期",
|
||||
"temporary": "临时",
|
||||
"startDate": "开始日期",
|
||||
"endDate": "结束日期",
|
||||
"search": "搜索",
|
||||
"reset": "重置",
|
||||
"batchDispense": "批量发药",
|
||||
"batchVoid": "批量作废",
|
||||
"confirmReturn": "确认退药",
|
||||
"scan": "扫码",
|
||||
"name": "姓名",
|
||||
"spec": "规格",
|
||||
"totalQty": "总量",
|
||||
"location": "位置",
|
||||
"manufacturer": "生产厂家",
|
||||
"code": "编码",
|
||||
"dosageForm": "剂型",
|
||||
"packageQty": "包装数量",
|
||||
"packageUnit": "包装单位",
|
||||
"department": "科室",
|
||||
"bedNo": "床号",
|
||||
"patientName": "姓名",
|
||||
"quantity": "数量",
|
||||
"dosagePerTime": "每次剂量",
|
||||
"usage": "用法",
|
||||
"unitPrice": "单价",
|
||||
"amount": "金额",
|
||||
"purchasePrice": "购入价",
|
||||
"seqNo": "序号",
|
||||
"itemName": "项目名称",
|
||||
"batchNo": "批次号",
|
||||
"dispenseLocation": "发放地点",
|
||||
"drugType": "药品类型",
|
||||
"export": "导出",
|
||||
"returnDrug": "退药",
|
||||
"encounterNo": "住院号",
|
||||
"gender": "性别",
|
||||
"age": "年龄",
|
||||
"totalCount": "共 {count} 条",
|
||||
"nameOrId": "姓名/证件号",
|
||||
"dispenseStatus": "发放状态",
|
||||
"dispenseStatusFilter": "发药状态",
|
||||
"start": "开始",
|
||||
"end": "结束",
|
||||
"preparingPharmacist": "调配药师",
|
||||
"drugCategory": "药品分类",
|
||||
"westernAndPatent": "西药中成药",
|
||||
"chineseMedicine": "中药",
|
||||
"prescriptionPrint": "处方打印",
|
||||
"prescriptionNo": "处方号",
|
||||
"dispenseQty": "发药数量",
|
||||
"orderDoctor": "开单医生",
|
||||
"diagnosis": "诊断",
|
||||
"frequency": "频次",
|
||||
"days": "天数",
|
||||
"void": "作废",
|
||||
"selectVoidReason": "选择作废原因",
|
||||
"selectVoidReasonPlaceholder": "请选择作废原因",
|
||||
"confirm": "确 定",
|
||||
"cancel": "取 消",
|
||||
"searchPatient": "搜索患者",
|
||||
"chargeStatus": "收费状态",
|
||||
"visitDate": "就诊日期",
|
||||
"returnDrugOrder": "退药单",
|
||||
"drugName": "药品名称",
|
||||
"totalPrice": "总价",
|
||||
"lotNo": "批号",
|
||||
"traceNo": "追溯码",
|
||||
"enterTraceNo": "请输入追溯码",
|
||||
"returnStatus": "退药状态",
|
||||
"returnQty": "退药数量",
|
||||
"operationConfirm": "操作确认",
|
||||
"selectedCount": "已选 {count} 种药品",
|
||||
"totalAmountLabel": "合计金额:",
|
||||
"totalAmount": "总金额:",
|
||||
"dispenseDoctor": "发药医生",
|
||||
"itemType": "项目类型",
|
||||
"dispenseStatusCol": "发药状态",
|
||||
"diagnosisName": "诊断名称",
|
||||
"dosePerTime": "单次剂量",
|
||||
"doseUnit": "剂量单位",
|
||||
"unit": "单位",
|
||||
"dispensePerTime": "单次发药数",
|
||||
"dispenseDuration": "每次发药供应天数",
|
||||
"visitNo": "就诊NO",
|
||||
"prescribeDate": "开具日期",
|
||||
"skinTestFlag": "皮试标志",
|
||||
"tcmFlag": "中药标识",
|
||||
"sourceTable": "所在表",
|
||||
"yes": "是",
|
||||
"no": "否",
|
||||
"prompt": "提示",
|
||||
"selectDocNoFirst": "请先选择单据号",
|
||||
"confirmDispense": "确定要发药吗?",
|
||||
"confirmReturnDrug": "确定要退药吗?",
|
||||
"operationSuccess": "操作成功",
|
||||
"dispenseSuccess": "发药成功",
|
||||
"dispenseFailed": "发药失败",
|
||||
"returnSuccess": "退药成功",
|
||||
"returnFailed": "退药失败",
|
||||
"voidSuccess": "作废成功",
|
||||
"selectVoidReasonError": "请选择作废原因",
|
||||
"noOperableItems": "没有可操作的发药项目",
|
||||
"stockInsufficient": "当前批次库存不足",
|
||||
"qtyExceedsTotal": "发药数量不能大于总数量",
|
||||
"qtyBelowTotal": "发药数量不能小于总数量",
|
||||
"noDispenseSelected": "未选择要发药的项目,请重新选择,发药失败",
|
||||
"traceNoNotMatched": "未在库存中匹配到追溯码,请在发药列表中单独扫描",
|
||||
"operationFailed": "操作失败",
|
||||
"noPrintItems": "未选择要打印的项目,请重新选择,打印失败",
|
||||
"getDataFailed": "获取数据失败",
|
||||
"getSummaryDetailFailed": "获取药品汇总详情失败:",
|
||||
"getDetailFailed": "获取汇总药品详情失败:",
|
||||
"unknownError": "未知错误",
|
||||
"selectPatientFirst": "请先选择患者",
|
||||
"selectDispenseData": "请先选择需要发药的数据",
|
||||
"noDataToExport": "暂无数据可导出",
|
||||
"selectExportData": "请先选择要导出的数据",
|
||||
"selectReturnData": "请先选择需要退药的数据",
|
||||
"exportSuccess": "导出成功",
|
||||
"yuan": "元",
|
||||
"statusExecuted": "已执行",
|
||||
"statusSubmitted": "已提交",
|
||||
"statusDispensed": "已发药",
|
||||
"statusPending": "待配药",
|
||||
"deviceDispenseFailed": "耗材发药失败",
|
||||
"drugDispenseFailed": "药品发药失败",
|
||||
"window1": "窗口1",
|
||||
"window2": "窗口2",
|
||||
"window3": "窗口3",
|
||||
"medicationList1": "药单1",
|
||||
"medicationList2": "药单2",
|
||||
"medicationList3": "药单3"
|
||||
}
|
||||
},
|
||||
"pharmacy": {
|
||||
"title": "药品库存预警管理",
|
||||
"refresh": "刷新",
|
||||
"addAlert": "新增预警",
|
||||
"exportReport": "导出报告",
|
||||
"totalAlerts": "总预警数",
|
||||
"outOfStock": "缺货",
|
||||
"lowStock": "低库存",
|
||||
"expiring": "近效期",
|
||||
"supplierCount": "供应商数",
|
||||
"pendingRestock": "待补货",
|
||||
"alertLevel": "预警级别",
|
||||
"drugCategory": "药品类别",
|
||||
"query": "查询",
|
||||
"reset": "重置",
|
||||
"western": "西药",
|
||||
"chineseMedicine": "中成药",
|
||||
"herbal": "中草药",
|
||||
"biological": "生物制品",
|
||||
"drugCode": "药品编码",
|
||||
"drugName": "药品名称",
|
||||
"spec": "规格",
|
||||
"currentStock": "当前库存",
|
||||
"minStock": "最低库存",
|
||||
"maxStock": "最高库存",
|
||||
"supplier": "供应商",
|
||||
"lastRestock": "上次进货",
|
||||
"expiryDate": "有效期至",
|
||||
"action": "操作",
|
||||
"restockApply": "补货申请",
|
||||
"addDialogTitle": "新增药品库存预警",
|
||||
"enterDrugCode": "请输入药品编码",
|
||||
"enterDrugName": "请输入药品名称",
|
||||
"specExample": "如: 0.5g*24片",
|
||||
"pleaseSelect": "请选择",
|
||||
"enterSupplier": "请输入供应商",
|
||||
"cancel": "取消",
|
||||
"confirm": "确定",
|
||||
"normal": "正常",
|
||||
"addSuccess": "新增成功",
|
||||
"exportWip": "导出功能开发中"
|
||||
},
|
||||
"medicineStorage": {
|
||||
"common": {
|
||||
"add": "新增",
|
||||
"delete": "删除",
|
||||
"cancel": "取消",
|
||||
"audit": "审核",
|
||||
"save": "保存",
|
||||
"edit": "编辑",
|
||||
"confirm": "确定",
|
||||
"search": "搜索",
|
||||
"reset": "重置",
|
||||
"view": "查看",
|
||||
"warehouse": "库房:",
|
||||
"selectWarehouse": "请选择库房",
|
||||
"documentSearch": "单据搜索",
|
||||
"enterDocumentNo": "请输入单据号",
|
||||
"addDocument": "新增单据",
|
||||
"noDocuments": "暂无单据",
|
||||
"purchaser": "采购员:",
|
||||
"supplier": "供应商:",
|
||||
"auditStatus": "审核状态:",
|
||||
"documentType": "单据类型:",
|
||||
"documentDate": "单据日期:",
|
||||
"pleaseSelectWarehouse": "新增单据前,请选择库房",
|
||||
"pleaseSelectEdit": "请选择要编辑的单据",
|
||||
"pleaseSelectDelete": "请选择要删除的单据",
|
||||
"approvedCannotDelete": "已审批的单据不能删除",
|
||||
"approvedCannotAudit": "该单据已审批,不能重复审批",
|
||||
"confirmDelete": "确认删除该采购单吗?",
|
||||
"confirmAudit": "确认同意该采购单吗?",
|
||||
"tip": "提示",
|
||||
"deleteSuccess": "删除成功",
|
||||
"deleteFailed": "删除失败",
|
||||
"auditSuccess": "同意审批成功",
|
||||
"auditFailed": "同意审批失败",
|
||||
"pleaseSelectAudit": "请选择要审核的单据",
|
||||
"agreed": "同意",
|
||||
"none": "暂无",
|
||||
"addRow": "添加行",
|
||||
"deleteRow": "删除行",
|
||||
"alertOrder": "警戒订货",
|
||||
"documentNo": "单据号",
|
||||
"orderDate": "开单日期",
|
||||
"selectOrderDate": "请选择开单日期",
|
||||
"supplierLabel": "供应商",
|
||||
"selectSupplier": "请选择供应商",
|
||||
"purchaserLabel": "采购员",
|
||||
"selectPurchaser": "请输入采购员",
|
||||
"categoryLabel": "单据分类",
|
||||
"selectCategory": "请选择单据分类",
|
||||
"summary": "摘要(A)",
|
||||
"enterSummary": "请输入摘要",
|
||||
"auditor": "审核人",
|
||||
"auditDate": "审核日期",
|
||||
"auditStatusLabel": "审核状态:",
|
||||
"pleaseFillComplete": "请填写完整信息",
|
||||
"pleaseSelectSupplierAndWarehouse": "请选择供应商和仓库",
|
||||
"noMedicineFound": "本仓库和供应商没有找到药品信息",
|
||||
"confirmSave": "确认保存数据吗?",
|
||||
"addSuccess": "新增成功",
|
||||
"saveSuccess": "保存成功",
|
||||
"saveFailed": "保存失败",
|
||||
"pleaseSelectDeleteRow": "请选择要删除的行",
|
||||
"confirmDeleteRow": "确认删除选中的行吗?",
|
||||
"itemCode": "编号",
|
||||
"itemName": "品名",
|
||||
"spec": "规格",
|
||||
"unit": "单位",
|
||||
"quantity": "数量",
|
||||
"purchasePrice": "进货价",
|
||||
"purchaseAmount": "进价金额",
|
||||
"retailPrice": "销售价",
|
||||
"retailAmount": "销售金额",
|
||||
"manufacturer": "厂家/产地",
|
||||
"specStock": "规格库存",
|
||||
"approvalNo": "批注文号",
|
||||
"remark": "备注",
|
||||
"warehouseType": "库房类型",
|
||||
"selectWarehouseType": "请选择库房类型",
|
||||
"orderMaker": "开单人",
|
||||
"selectOrderMaker": "请选择开单人",
|
||||
"requestDept": "请领部门",
|
||||
"selectRequestDept": "请选择请领部门",
|
||||
"requester": "请领人",
|
||||
"selectRequester": "请选择请领人",
|
||||
"supplierContact": "供应商联系人",
|
||||
"enterSupplierContact": "请输入供应商联系人",
|
||||
"inventoryPerson": "盘点人",
|
||||
"selectInventoryPerson": "请选择盘点人",
|
||||
"applicationDept": "申请部门",
|
||||
"applicant": "申请人",
|
||||
"applicationTime": "申请时间",
|
||||
"approvalTime": "批准时间",
|
||||
"approver": "批准人",
|
||||
"warehouse2": "仓库",
|
||||
"status": "状态",
|
||||
"operation": "操作",
|
||||
"orderNo": "订单编号",
|
||||
"orderList": "订单列表",
|
||||
"invoiceNo": "发票号",
|
||||
"packagingCondition": "包装情况",
|
||||
"selectPackagingCondition": "请选择包装情况",
|
||||
"acceptanceResult": "验收结果",
|
||||
"selectAcceptanceResult": "请选择验收结果",
|
||||
"dateRangeSeparator": "至",
|
||||
"startDate": "开始日期",
|
||||
"endDate": "结束日期",
|
||||
"orderMakingDate": "制单日期",
|
||||
"documentStatus": "单据状态",
|
||||
"selectDocumentStatus": "请选择单据类型",
|
||||
"lotNumber": "批次号",
|
||||
"pleaseSelect": "请选择",
|
||||
"scan": "扫码"
|
||||
},
|
||||
"purchaseOrder": {
|
||||
"itemCode": "项目编码",
|
||||
"itemName": "项目名称",
|
||||
"purchasePrice": "进货价",
|
||||
"retailPrice": "零售价",
|
||||
"packUnit": "包装单位",
|
||||
"minUnit": "最小单位",
|
||||
"spec": "规格",
|
||||
"specStock": "规格库存",
|
||||
"manufacturer": "生产厂家",
|
||||
"approvalNo": "批准文号",
|
||||
"batchStock": "批次库存"
|
||||
},
|
||||
"stockOutOrder": {
|
||||
"importRequestOrder": "引入请领单",
|
||||
"lotNumber": "产品批号",
|
||||
"enterLotNumber": "请输入产品批号",
|
||||
"productionDate": "生产日期",
|
||||
"enterProductionDate": "请输入生产日期",
|
||||
"expirationDate": "失效日期",
|
||||
"enterExpirationDate": "请输入失效日期",
|
||||
"selectExpirationDate": "请选择失效日期",
|
||||
"batchInventory": "批次库存",
|
||||
"enterBatchInventory": "请输入批次库存",
|
||||
"traceNo": "药品追溯码",
|
||||
"enterTraceNo": "请输入追溯码",
|
||||
"traceNoUnit": "追溯码单位",
|
||||
"enterTraceNoUnit": "请输入追溯码单位",
|
||||
"selectTraceNoUnit": "请选择追溯码单位",
|
||||
"scan": "扫码",
|
||||
"packagingUnit": "包装单位",
|
||||
"minUnit": "最小单位",
|
||||
"enterOrderMaker": "请选择开单人",
|
||||
"enterDocumentType": "请选择单据类型",
|
||||
"enterOrderDate": "请选择开单日期",
|
||||
"enterItemCode": "请输入编号",
|
||||
"enterItemName": "请输入品名",
|
||||
"enterSpec": "请输入规格",
|
||||
"enterUnit": "请输入单位",
|
||||
"enterQuantity": "请输入数量",
|
||||
"enterManufacturer": "请输入厂家/产地",
|
||||
"enterSpecStock": "请输入规格库存",
|
||||
"enterApprovalNo": "请输入批注文号",
|
||||
"enterInvoiceNo": "请输入发票号",
|
||||
"enterPackagingCondition": "请选择包装情况",
|
||||
"selectAcceptanceResult": "请选择验收结果",
|
||||
"enterSupplierContact": "请输入供应商联系人",
|
||||
"pleaseEnterLotNumberFirst": "请先输入产品批号",
|
||||
"productionDateExceedExpiration": "生产日期不能大于失效日期",
|
||||
"expirationDateBeforeProduction": "失效日期不能小于生产日期",
|
||||
"getOrderListFailed": "获取订货单列表失败",
|
||||
"approvedCannotAudit": "该单据已审批,不能重复审批",
|
||||
"confirmAudit": "确认同意该单据吗?",
|
||||
"auditSuccess": "同意审批成功",
|
||||
"auditFailed": "同意审批失败"
|
||||
},
|
||||
"returnOrder": {
|
||||
"importStockInOrder": "引入入库单",
|
||||
"disableDate": "停用日期",
|
||||
"enterDisableDate": "请输入停用日期",
|
||||
"disableDateBeforeExpiration": "停用日期不能小于失效日期"
|
||||
},
|
||||
"documentManagement": {
|
||||
"purchaseOrder": "采购订货",
|
||||
"purchaseStockIn": "采购入库",
|
||||
"purchaseReturn": "采购退货",
|
||||
"stockOut": "领用出库",
|
||||
"returnToWarehouse": "领用退货",
|
||||
"profitLoss": "报损单",
|
||||
"stocktaking": "商品盘点",
|
||||
"pendingAudit": "待审核",
|
||||
"auditing": "审核中",
|
||||
"agreed": "同意",
|
||||
"rejected": "驳回",
|
||||
"withdrawn": "已撤回",
|
||||
"pendingApply": "待审请"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,63 +15,63 @@
|
||||
</el-radio-group>
|
||||
<el-select
|
||||
v-model="searchForm.window"
|
||||
placeholder="窗口"
|
||||
:placeholder="$t('drug.inHospital.window')"
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
key="0"
|
||||
label="住院西药房"
|
||||
:label="$t('drug.inHospital.windowWest')"
|
||||
value="0"
|
||||
/>
|
||||
<el-option
|
||||
key="1"
|
||||
label="住院东药房"
|
||||
:label="$t('drug.inHospital.windowEast')"
|
||||
value="1"
|
||||
/>
|
||||
<el-option
|
||||
key="2"
|
||||
label="住院北药房"
|
||||
:label="$t('drug.inHospital.windowNorth')"
|
||||
value="2"
|
||||
/>
|
||||
<el-option
|
||||
key="3"
|
||||
label="住院南药房"
|
||||
:label="$t('drug.inHospital.windowSouth')"
|
||||
value="3"
|
||||
/>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="searchForm.type"
|
||||
placeholder="医嘱类型"
|
||||
:placeholder="$t('drug.inHospital.orderType')"
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
key="0"
|
||||
label="全部"
|
||||
:label="$t('drug.inHospital.all')"
|
||||
value="0"
|
||||
/>
|
||||
<el-option
|
||||
key="1"
|
||||
label="长期"
|
||||
:label="$t('drug.inHospital.longTerm')"
|
||||
value="1"
|
||||
/>
|
||||
<el-option
|
||||
key="2"
|
||||
label="临时"
|
||||
:label="$t('drug.inHospital.temporary')"
|
||||
value="2"
|
||||
/>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="searchForm.dateRange"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:range-separator="$t('drug.inHospital.rangeSeparator')"
|
||||
:start-placeholder="$t('drug.inHospital.startDate')"
|
||||
:end-placeholder="$t('drug.inHospital.endDate')"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleSearch"
|
||||
>
|
||||
查询
|
||||
{{ $t('drug.inHospital.query') }}
|
||||
</el-button>
|
||||
</el-space>
|
||||
</div>
|
||||
@@ -101,7 +101,7 @@
|
||||
type="primary"
|
||||
@click="handleSearch"
|
||||
>
|
||||
发药
|
||||
{{ $t('drug.inHospital.dispense') }}
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="inHospitalDispensing-container-bottom-right-bottom">
|
||||
@@ -113,47 +113,47 @@
|
||||
>
|
||||
<vxe-column
|
||||
field="drugGoodsName"
|
||||
title="名称"
|
||||
:title="$t('drug.inHospital.name')"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
field="drugSpec"
|
||||
title="规格"
|
||||
:title="$t('drug.inHospital.spec')"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
field="drugSpec"
|
||||
title="总量"
|
||||
:title="$t('drug.inHospital.totalQty')"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
field="stockPlaceName"
|
||||
title="位置"
|
||||
:title="$t('drug.inHospital.location')"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
field="manufactureName"
|
||||
title="厂家"
|
||||
:title="$t('drug.inHospital.manufacturer')"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
field="drugGoodsCode"
|
||||
title="编码"
|
||||
:title="$t('drug.inHospital.code')"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
field="drugFormName"
|
||||
title="剂型"
|
||||
:title="$t('drug.inHospital.dosageForm')"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
field="packageNum"
|
||||
title="包装数量"
|
||||
:title="$t('drug.inHospital.packageQty')"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
field="maxUnit"
|
||||
title="包装单位"
|
||||
:title="$t('drug.inHospital.packageUnit')"
|
||||
width="180"
|
||||
/>
|
||||
</vxe-table>
|
||||
@@ -165,87 +165,87 @@
|
||||
>
|
||||
<vxe-column
|
||||
field="receiveOrgName"
|
||||
title="科室"
|
||||
:title="$t('drug.inHospital.department')"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
field="patBed"
|
||||
title="床号"
|
||||
:title="$t('drug.inHospital.bedNo')"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
field="patName"
|
||||
title="姓名"
|
||||
:title="$t('drug.inHospital.patientName')"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
field="drugGoodsName"
|
||||
title="名称"
|
||||
:title="$t('drug.inHospital.name')"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
field="drugSpec"
|
||||
title="规格"
|
||||
:title="$t('drug.inHospital.spec')"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
field="applyNumStr"
|
||||
title="数量"
|
||||
:title="$t('drug.inHospital.quantity')"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
field="manufactureName"
|
||||
title="厂家"
|
||||
:title="$t('drug.inHospital.manufacturer')"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
field="dosageAndUnit"
|
||||
title="每次剂量"
|
||||
:title="$t('drug.inHospital.dosagePerTime')"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
field="usageName"
|
||||
title="用法"
|
||||
:title="$t('drug.inHospital.usage')"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
field="salePrice"
|
||||
title="单价"
|
||||
:title="$t('drug.inHospital.unitPrice')"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
field="salePriceAmount"
|
||||
title="金额"
|
||||
:title="$t('drug.inHospital.amount')"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
field="stockPlaceName"
|
||||
title="位置"
|
||||
:title="$t('drug.inHospital.location')"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
field="drugGoodsCode"
|
||||
title="编码"
|
||||
:title="$t('drug.inHospital.code')"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
field="drugFormName"
|
||||
title="剂型"
|
||||
:title="$t('drug.inHospital.dosageForm')"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
field="packageNum"
|
||||
title="包装数量"
|
||||
:title="$t('drug.inHospital.packageQty')"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
field="maxUnit"
|
||||
title="包装单位"
|
||||
:title="$t('drug.inHospital.packageUnit')"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
field="purchasePrice"
|
||||
title="购入价"
|
||||
:title="$t('drug.inHospital.purchasePrice')"
|
||||
width="180"
|
||||
/>
|
||||
</vxe-table>
|
||||
@@ -256,6 +256,9 @@
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
import {onBeforeMount, onMounted, reactive, ref} from 'vue'
|
||||
import {useI18n} from 'vue-i18n'
|
||||
|
||||
const {t} = useI18n()
|
||||
// const { proxy } = getCurrentInstance();
|
||||
const emits = defineEmits([])
|
||||
const props = defineProps({
|
||||
@@ -444,4 +447,4 @@ defineExpose({ state })
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div
|
||||
class="app-container"
|
||||
style="border: 1px solid #e0e0e0; border-radius: 4px; box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.1)"
|
||||
@@ -16,7 +16,7 @@
|
||||
:disabled="!encounterId"
|
||||
@click="handleSendDrug"
|
||||
>
|
||||
发药
|
||||
{{ $t('drug.inpatient.dispense') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@@ -25,7 +25,7 @@
|
||||
:disabled="!encounterId"
|
||||
@click="handleExport"
|
||||
>
|
||||
导出
|
||||
{{ $t('drug.inpatient.export') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
@@ -34,7 +34,7 @@
|
||||
:disabled="!encounterId"
|
||||
@click="handleDispense"
|
||||
>
|
||||
退药
|
||||
{{ $t('drug.inpatient.returnDrug') }}
|
||||
</el-button>
|
||||
</el-row>
|
||||
<div class="tableContainer">
|
||||
@@ -57,42 +57,42 @@
|
||||
<!-- 基础信息 -->
|
||||
<vxe-column
|
||||
field="itemName"
|
||||
title="项目名称"
|
||||
:title="$t('drug.inpatient.itemName')"
|
||||
min-width="120"
|
||||
/>
|
||||
<vxe-column
|
||||
field="totalVolume"
|
||||
title="规格"
|
||||
:title="$t('drug.inpatient.spec')"
|
||||
min-width="100"
|
||||
/>
|
||||
<vxe-column
|
||||
field="locationName"
|
||||
title="发放药房"
|
||||
:title="$t('drug.inpatient.dispensePharmacy')"
|
||||
min-width="100"
|
||||
/>
|
||||
<vxe-column
|
||||
field="lotNumber"
|
||||
title="批次号"
|
||||
:title="$t('drug.inpatient.batchNo')"
|
||||
min-width="100"
|
||||
/>
|
||||
<vxe-column
|
||||
field="departmentName"
|
||||
title="科室"
|
||||
:title="$t('drug.inpatient.department')"
|
||||
min-width="100"
|
||||
/>
|
||||
<vxe-column
|
||||
field="doctorName"
|
||||
title="开单医生"
|
||||
:title="$t('drug.inpatient.orderDoctor')"
|
||||
min-width="100"
|
||||
/>
|
||||
<vxe-column
|
||||
field="dispenseDoctorName"
|
||||
title="发药医生"
|
||||
:title="$t('drug.inpatient.dispenseDoctor')"
|
||||
min-width="100"
|
||||
/>
|
||||
<vxe-column
|
||||
field="itemType_dictText"
|
||||
title="项目类型"
|
||||
:title="$t('drug.inpatient.itemType')"
|
||||
min-width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -101,7 +101,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="statusEnum_enumText"
|
||||
title="发药状态"
|
||||
:title="$t('drug.inpatient.dispenseStatusCol')"
|
||||
min-width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -110,24 +110,24 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="conditionName"
|
||||
title="诊断名称"
|
||||
:title="$t('drug.inpatient.diagnosisName')"
|
||||
min-width="100"
|
||||
/>
|
||||
<vxe-column
|
||||
field="prescriptionNo"
|
||||
title="处方号"
|
||||
:title="$t('drug.inpatient.prescriptionNo')"
|
||||
min-width="120"
|
||||
/>
|
||||
|
||||
<!-- 用药信息 -->
|
||||
<vxe-column
|
||||
field="dose"
|
||||
title="单次剂量"
|
||||
:title="$t('drug.inpatient.dosePerTime')"
|
||||
min-width="100"
|
||||
/>
|
||||
<vxe-column
|
||||
field="rateCode_dictText"
|
||||
title="用药频次"
|
||||
:title="$t('drug.inpatient.frequency')"
|
||||
min-width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -136,7 +136,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="methodCode_dictText"
|
||||
title="用法"
|
||||
:title="$t('drug.inpatient.usage')"
|
||||
min-width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -145,7 +145,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="doseUnitCode_dictText"
|
||||
title="剂量单位"
|
||||
:title="$t('drug.inpatient.doseUnit')"
|
||||
min-width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -154,7 +154,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="unitCode_dictText"
|
||||
title="单位"
|
||||
:title="$t('drug.inpatient.unit')"
|
||||
min-width="80"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -163,49 +163,49 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="dispensePerQuantity"
|
||||
title="单次发药数"
|
||||
:title="$t('drug.inpatient.dispensePerTime')"
|
||||
min-width="100"
|
||||
/>
|
||||
<vxe-column
|
||||
field="dispensePerDuration"
|
||||
title="每次发药供应天数"
|
||||
:title="$t('drug.inpatient.dispenseDuration')"
|
||||
min-width="150"
|
||||
/>
|
||||
<vxe-column
|
||||
field="quantity"
|
||||
title="数量"
|
||||
:title="$t('drug.inpatient.quantity')"
|
||||
min-width="80"
|
||||
/>
|
||||
<vxe-column
|
||||
field="unitPrice"
|
||||
title="单价"
|
||||
:title="$t('drug.inpatient.unitPrice')"
|
||||
min-width="80"
|
||||
/>
|
||||
<vxe-column
|
||||
field="totalPrice"
|
||||
title="金额"
|
||||
:title="$t('drug.inpatient.amount')"
|
||||
min-width="80"
|
||||
/>
|
||||
|
||||
<!-- 其他信息 -->
|
||||
<vxe-column
|
||||
field="manufacturerText"
|
||||
title="生产厂家"
|
||||
:title="$t('drug.inpatient.manufacturer')"
|
||||
min-width="150"
|
||||
/>
|
||||
<vxe-column
|
||||
field="traceNo"
|
||||
title="追溯码"
|
||||
:title="$t('drug.inpatient.traceNo')"
|
||||
min-width="120"
|
||||
/>
|
||||
<vxe-column
|
||||
field="encounterBusNo"
|
||||
title="就诊NO"
|
||||
:title="$t('drug.inpatient.visitNo')"
|
||||
min-width="120"
|
||||
/>
|
||||
<vxe-column
|
||||
field="reqAuthoredTime"
|
||||
title="开具日期"
|
||||
:title="$t('drug.inpatient.prescribeDate')"
|
||||
min-width="150"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -214,25 +214,25 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="skinTestFlag"
|
||||
title="皮试标志"
|
||||
:title="$t('drug.inpatient.skinTestFlag')"
|
||||
min-width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.skinTestFlag === 1 ? '是' : scope.row.skinTestFlag === 0 ? '否' : '-' }}
|
||||
{{ scope.row.skinTestFlag === 1 ? $t('drug.inpatient.yes') : scope.row.skinTestFlag === 0 ? $t('drug.inpatient.no') : '-' }}
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="tcmFlag"
|
||||
title="中药标识"
|
||||
:title="$t('drug.inpatient.tcmFlag')"
|
||||
min-width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.tcmFlag === 1 ? '是' : scope.row.tcmFlag === 0 ? '否' : '-' }}
|
||||
{{ scope.row.tcmFlag === 1 ? $t('drug.inpatient.yes') : scope.row.tcmFlag === 0 ? $t('drug.inpatient.no') : '-' }}
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="itemTable"
|
||||
title="所在表"
|
||||
:title="$t('drug.inpatient.sourceTable')"
|
||||
min-width="100"
|
||||
/>
|
||||
</vxe-table>
|
||||
@@ -241,23 +241,26 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {useI18n} from 'vue-i18n';
|
||||
|
||||
const {t} = useI18n();
|
||||
|
||||
/** 发药状态 → 规范状态名称映射(与《药品医嘱状态映射表》保持一致) */
|
||||
const DETAIL_DRUG_STATUS_DISPLAY = {
|
||||
11: '已执行',
|
||||
18: '已提交',
|
||||
4: '已发药',
|
||||
};
|
||||
const DETAIL_DRUG_STATUS_DISPLAY = computed(() => ({
|
||||
11: t('drug.inpatient.statusExecuted'),
|
||||
18: t('drug.inpatient.statusSubmitted'),
|
||||
4: t('drug.inpatient.statusDispensed'),
|
||||
}));
|
||||
const DETAIL_LEGACY_STATUS_TEXT = {
|
||||
已提交: '待配药',
|
||||
已发放: '已发药',
|
||||
已完成: '已发药',
|
||||
'已提交': t('drug.inpatient.statusPending'),
|
||||
'已发放': t('drug.inpatient.statusDispensed'),
|
||||
'已完成': t('drug.inpatient.statusDispensed'),
|
||||
};
|
||||
|
||||
function formatDetailDrugStatus(row) {
|
||||
const code = Number(row?.statusEnum);
|
||||
if (DETAIL_DRUG_STATUS_DISPLAY[code]) {
|
||||
return DETAIL_DRUG_STATUS_DISPLAY[code];
|
||||
if (DETAIL_DRUG_STATUS_DISPLAY.value[code]) {
|
||||
return DETAIL_DRUG_STATUS_DISPLAY.value[code];
|
||||
}
|
||||
return DETAIL_LEGACY_STATUS_TEXT[row?.statusEnum_enumText] || row?.statusEnum_enumText || '-';
|
||||
}
|
||||
@@ -336,11 +339,11 @@ const rowStyle = {
|
||||
// 发药功能
|
||||
const handleSendDrug = () => {
|
||||
if (!props.encounterId) {
|
||||
ElMessage.warning('请先选择患者');
|
||||
ElMessage.warning(t('drug.inpatient.selectPatientFirst'));
|
||||
return;
|
||||
}
|
||||
if (selectedRows.value.length === 0) {
|
||||
ElMessage.warning('请先选择需要发药的数据');
|
||||
ElMessage.warning(t('drug.inpatient.selectDispenseData'));
|
||||
return;
|
||||
}
|
||||
let data = [];
|
||||
@@ -351,15 +354,15 @@ const handleSendDrug = () => {
|
||||
});
|
||||
loading.value = true;
|
||||
proxy.$modal
|
||||
.confirm('确定要发药吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
.confirm(t('drug.inpatient.confirmDispense'), t('drug.inpatient.prompt'), {
|
||||
confirmButtonText: t('drug.inpatient.confirm'),
|
||||
cancelButtonText: t('drug.inpatient.cancel'),
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
const response = await totalSendDrug(data);
|
||||
if (response.code === 200) {
|
||||
ElMessage.success('发药成功');
|
||||
ElMessage.success(t('drug.inpatient.dispenseSuccess'));
|
||||
loading.value = false;
|
||||
}
|
||||
})
|
||||
@@ -370,32 +373,32 @@ const handleSendDrug = () => {
|
||||
// 导出功能
|
||||
const handleExport = () => {
|
||||
if (!props.encounterId) {
|
||||
ElMessage.warning('请先选择患者');
|
||||
ElMessage.warning(t('drug.inpatient.selectPatientFirst'));
|
||||
return;
|
||||
}
|
||||
if (displayTableData.value.length === 0) {
|
||||
ElMessage.warning('暂无数据可导出');
|
||||
ElMessage.warning(t('drug.inpatient.noDataToExport'));
|
||||
return;
|
||||
}
|
||||
|
||||
if (selectedRows.value.length === 0) {
|
||||
ElMessage.warning('请先选择要导出的数据');
|
||||
ElMessage.warning(t('drug.inpatient.selectExportData'));
|
||||
return;
|
||||
}
|
||||
|
||||
// 这里可以实现导出逻辑
|
||||
console.log('导出数据:', selectedRows.value);
|
||||
ElMessage.success('导出成功');
|
||||
ElMessage.success(t('drug.inpatient.exportSuccess'));
|
||||
};
|
||||
|
||||
// 退药功能
|
||||
const handleDispense = () => {
|
||||
if (!props.encounterId) {
|
||||
ElMessage.warning('请先选择患者');
|
||||
ElMessage.warning(t('drug.inpatient.selectPatientFirst'));
|
||||
return;
|
||||
}
|
||||
if (selectedRows.value.length === 0) {
|
||||
ElMessage.warning('请先选择需要退药的数据');
|
||||
ElMessage.warning(t('drug.inpatient.selectReturnData'));
|
||||
return;
|
||||
}
|
||||
let data = [];
|
||||
@@ -406,9 +409,9 @@ const handleDispense = () => {
|
||||
});
|
||||
loading.value = true;
|
||||
proxy.$modal
|
||||
.confirm('确定要退药吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
.confirm(t('drug.inpatient.confirmReturnDrug'), t('drug.inpatient.prompt'), {
|
||||
confirmButtonText: t('drug.inpatient.confirm'),
|
||||
cancelButtonText: t('drug.inpatient.cancel'),
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
@@ -416,13 +419,13 @@ const handleDispense = () => {
|
||||
emit('call-medication-summary-detail', props.encounterId);
|
||||
console.log(response);
|
||||
if (response.code === 200) {
|
||||
ElMessage.success('退药成功');
|
||||
ElMessage.success(t('drug.inpatient.returnSuccess'));
|
||||
loading.value = false;
|
||||
// 通知父组件刷新明细数据
|
||||
emit('call-medication-summary-detail', props.encounterId);
|
||||
} else {
|
||||
console.log(response.message);
|
||||
ElMessage.error('退药失败');
|
||||
ElMessage.error(t('drug.inpatient.returnFailed'));
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
<el-card style="width: 38%">
|
||||
<template #header>
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<span>患者列表</span>
|
||||
<span style="font-size: 12px; color: #909399; font-weight: 400">共 {{ total }} 条</span>
|
||||
<span>{{ $t('drug.inpatient.patientList') }}</span>
|
||||
<span style="font-size: 12px; color: #909399; font-weight: 400">{{ $t('drug.inpatient.totalCount', { count: total }) }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<div style="display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
style="width: 180px"
|
||||
placeholder="姓名/证件号"
|
||||
:placeholder="$t('drug.inpatient.nameOrId')"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
>
|
||||
@@ -21,7 +21,7 @@
|
||||
</el-input>
|
||||
<el-select
|
||||
v-model="queryParams.statusEnum"
|
||||
placeholder="发药状态"
|
||||
:placeholder="$t('drug.inpatient.dispenseStatusFilter')"
|
||||
style="width: 140px"
|
||||
clearable
|
||||
@change="handleQuery"
|
||||
@@ -36,14 +36,14 @@
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
type="daterange"
|
||||
start-placeholder="开始"
|
||||
end-placeholder="结束"
|
||||
:start-placeholder="$t('drug.inpatient.start')"
|
||||
:end-placeholder="$t('drug.inpatient.end')"
|
||||
style="width: 240px"
|
||||
value-format="YYYY-MM-DD"
|
||||
@change="handleQuery"
|
||||
/>
|
||||
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||
<el-button @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" @click="handleQuery">{{ $t('drug.inpatient.search') }}</el-button>
|
||||
<el-button @click="resetQuery">{{ $t('drug.inpatient.reset') }}</el-button>
|
||||
</div>
|
||||
<vxe-table
|
||||
ref="patientListRef"
|
||||
@@ -53,10 +53,10 @@
|
||||
auto-resize
|
||||
@cell-click="handleCurrentChange"
|
||||
>
|
||||
<vxe-column field="encounterNo" title="住院号" min-width="90" align="center" show-overflow="title" />
|
||||
<vxe-column field="patientName" title="姓名" min-width="60" align="center" />
|
||||
<vxe-column field="genderEnum_enumText" title="性别" min-width="50" align="center" />
|
||||
<vxe-column field="age" title="年龄" min-width="50" align="center" />
|
||||
<vxe-column field="encounterNo" :title="$t('drug.inpatient.encounterNo')" min-width="90" align="center" show-overflow="title" />
|
||||
<vxe-column field="patientName" :title="$t('drug.inpatient.name')" min-width="60" align="center" />
|
||||
<vxe-column field="genderEnum_enumText" :title="$t('drug.inpatient.gender')" min-width="50" align="center" />
|
||||
<vxe-column field="age" :title="$t('drug.inpatient.age')" min-width="50" align="center" />
|
||||
</vxe-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
@@ -70,9 +70,9 @@
|
||||
<el-card style="width: 61%">
|
||||
<template #header>
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<span>药品明细</span>
|
||||
<span>{{ $t('drug.inpatient.drugDetail') }}</span>
|
||||
<span style="font-size: 15px; color: #e6a23c">
|
||||
总金额:
|
||||
{{ $t('drug.inpatient.totalAmount') }}
|
||||
<strong style="font-size: 18px">
|
||||
¥{{ medicineTotalPrice ? medicineTotalPrice.toFixed(2) : '0.00' }}
|
||||
</strong>
|
||||
@@ -80,8 +80,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<div style="display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px">
|
||||
<span style="color: #606266; font-size: 14px; font-weight: 700">调配药师</span>
|
||||
<el-select v-model="preparerDoctor" placeholder="调配药师" style="width: 140px">
|
||||
<span style="color: #606266; font-size: 14px; font-weight: 700">{{ $t('drug.inpatient.preparingPharmacist') }}</span>
|
||||
<el-select v-model="preparerDoctor" :placeholder="$t('drug.inpatient.preparingPharmacist')" style="width: 140px">
|
||||
<el-option
|
||||
v-for="item in preparerDoctorOptions"
|
||||
:key="item.value"
|
||||
@@ -89,10 +89,10 @@
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<span style="color: #606266; font-size: 14px; font-weight: 700; margin-left: 16px">药品分类</span>
|
||||
<span style="color: #606266; font-size: 14px; font-weight: 700; margin-left: 16px">{{ $t('drug.inpatient.drugCategory') }}</span>
|
||||
<el-select
|
||||
v-model="tcmFlag"
|
||||
placeholder="药品分类"
|
||||
:placeholder="$t('drug.inpatient.drugCategory')"
|
||||
style="width: 140px"
|
||||
@change="() => { if (currentRow.encounterId) { getMedicineList(currentRow.encounterId) } }"
|
||||
>
|
||||
@@ -109,10 +109,10 @@
|
||||
style="margin-left: 16px"
|
||||
@click="handleBatch()"
|
||||
>
|
||||
批量发药
|
||||
{{ $t('drug.inpatient.batchDispense') }}
|
||||
</el-button>
|
||||
<el-button type="primary" style="margin-left: 8px" @click="printPrescription()">
|
||||
处方打印
|
||||
{{ $t('drug.inpatient.prescriptionPrint') }}
|
||||
</el-button>
|
||||
</div>
|
||||
<vxe-table
|
||||
@@ -126,35 +126,35 @@
|
||||
@cell-dblclick="handleCellDbClick"
|
||||
>
|
||||
<vxe-column type="checkbox" width="55" align="center" fixed="left" />
|
||||
<vxe-column field="prescriptionNo" title="处方号" min-width="110" align="center" />
|
||||
<vxe-column field="itemName" title="项目名称" min-width="140" align="center" show-overflow="title" />
|
||||
<vxe-column field="statusEnum_enumText" title="发药状态" min-width="90" align="center">
|
||||
<vxe-column field="prescriptionNo" :title="$t('drug.inpatient.prescriptionNo')" min-width="110" align="center" />
|
||||
<vxe-column field="itemName" :title="$t('drug.inpatient.itemName')" min-width="140" align="center" show-overflow="title" />
|
||||
<vxe-column field="statusEnum_enumText" :title="$t('drug.inpatient.dispenseStatusCol')" min-width="90" align="center">
|
||||
<template #default="scope">
|
||||
<el-tag :type="tagType(scope.row.statusEnum)" size="small" effect="light">
|
||||
{{ formatDrugStatusText(scope.row) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="quantity" title="发药数量" min-width="110" align="center">
|
||||
<vxe-column field="quantity" :title="$t('drug.inpatient.dispenseQty')" min-width="110" align="center">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.quantity }}{{ scope.row.unitCode_dictText }}</span>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="totalVolume" title="规格" min-width="100" align="center" />
|
||||
<vxe-column field="lotNumber" title="批次号" min-width="140" align="center" show-overflow="title">
|
||||
<vxe-column field="totalVolume" :title="$t('drug.inpatient.spec')" min-width="100" align="center" />
|
||||
<vxe-column field="lotNumber" :title="$t('drug.inpatient.batchNo')" min-width="140" align="center" show-overflow="title">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.lotNumber }}</span>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="totalPrice" title="金额" min-width="90" :formatter="formatPrice" align="right" header-align="center" />
|
||||
<vxe-column field="locationName" title="发药药房" min-width="80" align="center" />
|
||||
<vxe-column field="manufacturerText" title="生产厂家" min-width="150" align="center" show-overflow="title" />
|
||||
<vxe-column field="doctorName" title="开单医生" min-width="80" align="center" />
|
||||
<vxe-column field="conditionName" title="诊断" min-width="100" align="center" show-overflow="title" />
|
||||
<vxe-column field="rateCode" title="频次" min-width="70" align="center" />
|
||||
<vxe-column field="methodCode_dictText" title="用法" min-width="70" align="center" />
|
||||
<vxe-column field="dispensePerDuration" title="天数" min-width="60" align="center" />
|
||||
<vxe-column title="操作" align="center" width="150" fixed="right">
|
||||
<vxe-column field="totalPrice" :title="$t('drug.inpatient.amount')" min-width="90" :formatter="formatPrice" align="right" header-align="center" />
|
||||
<vxe-column field="locationName" :title="$t('drug.inpatient.dispensePharmacy')" min-width="80" align="center" />
|
||||
<vxe-column field="manufacturerText" :title="$t('drug.inpatient.manufacturer')" min-width="150" align="center" show-overflow="title" />
|
||||
<vxe-column field="doctorName" :title="$t('drug.inpatient.orderDoctor')" min-width="80" align="center" />
|
||||
<vxe-column field="conditionName" :title="$t('drug.inpatient.diagnosis')" min-width="100" align="center" show-overflow="title" />
|
||||
<vxe-column field="rateCode" :title="$t('drug.inpatient.frequency')" min-width="70" align="center" />
|
||||
<vxe-column field="methodCode_dictText" :title="$t('drug.inpatient.usage')" min-width="70" align="center" />
|
||||
<vxe-column field="dispensePerDuration" :title="$t('drug.inpatient.days')" min-width="60" align="center" />
|
||||
<vxe-column :title="$t('drug.inpatient.operation')" align="center" width="150" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link type="primary"
|
||||
@@ -162,7 +162,7 @@
|
||||
icon="SuccessFilled"
|
||||
@click="handleBatch(scope.row)"
|
||||
>
|
||||
发药
|
||||
{{ $t('drug.inpatient.dispense') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
link type="primary"
|
||||
@@ -170,15 +170,15 @@
|
||||
icon="CircleClose"
|
||||
@click="backMedicine(scope.row)"
|
||||
>
|
||||
作废
|
||||
{{ $t('drug.inpatient.void') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
</el-card>
|
||||
|
||||
<el-dialog v-model="showDialog" title="选择作废原因" width="30%">
|
||||
<el-select v-model="notPerformedReasonEnum" placeholder="请选择作废原因">
|
||||
<el-dialog v-model="showDialog" :title="$t('drug.inpatient.selectVoidReason')" width="30%">
|
||||
<el-select v-model="notPerformedReasonEnum" :placeholder="$t('drug.inpatient.selectVoidReasonPlaceholder')">
|
||||
<el-option
|
||||
v-for="item in backReason"
|
||||
:key="item.value"
|
||||
@@ -188,8 +188,8 @@
|
||||
</el-select>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" @click="handleConfirm">确 定</el-button>
|
||||
<el-button @click="handleCancel">取 消</el-button>
|
||||
<el-button type="primary" @click="handleConfirm">{{ $t('drug.inpatient.confirm') }}</el-button>
|
||||
<el-button @click="handleCancel">{{ $t('drug.inpatient.cancel') }}</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@@ -203,8 +203,9 @@
|
||||
</template>
|
||||
|
||||
<script setup name="westernmedicine">
|
||||
import {onMounted, ref} from 'vue';
|
||||
import {computed, onMounted, ref} from 'vue';
|
||||
import {ElMessage} from 'element-plus';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import {
|
||||
backMedicion,
|
||||
deviceDispense,
|
||||
@@ -228,6 +229,7 @@ import {formatInventory} from '@/utils/his.js';
|
||||
|
||||
import useUserStore from '@/store/modules/user';
|
||||
|
||||
const {t} = useI18n();
|
||||
const userStore = useUserStore();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const showSearch = ref(true);
|
||||
@@ -268,13 +270,13 @@ const ypName = ref('');
|
||||
const medicineTotalPrice = ref(0);
|
||||
const projectTypeCode = ref('2');
|
||||
const selectedRow = ref(null);
|
||||
const medCategoryCode = ref([
|
||||
const medCategoryCode = computed(() => [
|
||||
{
|
||||
label: '西药中成药',
|
||||
label: t('drug.inpatient.westernAndPatent'),
|
||||
value: '0',
|
||||
},
|
||||
{
|
||||
label: '中药',
|
||||
label: t('drug.inpatient.chineseMedicine'),
|
||||
value: '1',
|
||||
},
|
||||
]);
|
||||
@@ -308,14 +310,14 @@ function submit(value) {
|
||||
itemTraceNo(list).then((res) => {
|
||||
if (res.code === 200) {
|
||||
if (!res.data) {
|
||||
proxy.$modal.msgWarning('未在库存中匹配到追溯码,请在发药列表中单独扫描');
|
||||
proxy.$modal.msgWarning(t('drug.inpatient.traceNoNotMatched'));
|
||||
openTraceNoDialog.value = false;
|
||||
proxy.$refs['traceNoRef0'].focus();
|
||||
return;
|
||||
}
|
||||
medicineInfoList.value.forEach((item, index) => {
|
||||
if (res.data[item.medicineId] && res.data[item.medicineId].split(',') > item.quantity) {
|
||||
proxy.$modal.msgWarning('操作失败');
|
||||
proxy.$modal.msgWarning(t('drug.inpatient.operationFailed'));
|
||||
return;
|
||||
}
|
||||
medicineInfoList.value[index].traceNo = res.data[item.medicineId];
|
||||
@@ -357,7 +359,7 @@ function getList() {
|
||||
);
|
||||
}
|
||||
listInit().then((response) => {
|
||||
departmentList.value = [{ value: null, label: '全部' }, ...response.data.departmentOptions];
|
||||
departmentList.value = [{ value: null, label: t('drug.inpatient.all') }, ...response.data.departmentOptions];
|
||||
backReason.value = response.data.notPerformedReasonOptions;
|
||||
dispenseStatusOptions.value = response.data.dispenseStatusOptions;
|
||||
preparerDoctorOptions.value = response.data.preparerDoctorOptions;
|
||||
@@ -368,7 +370,7 @@ function getList() {
|
||||
async function printPrescription() {
|
||||
const selectedRows = tableRef.value.getCheckboxRecords();
|
||||
if (selectedRows.length === 0) {
|
||||
proxy.$modal.msgWarning('未选择要打印的项目,请重新选择,打印失败');
|
||||
proxy.$modal.msgWarning(t('drug.inpatient.noPrintItems'));
|
||||
return;
|
||||
}
|
||||
let requestIds = selectedRows.map((item) => item.requestId).join(',');
|
||||
@@ -565,28 +567,28 @@ function handleCellDbClick(row, column, cellValue, event) {
|
||||
|
||||
function formatPrice(row, column, cellValue) {
|
||||
if (cellValue === null || cellValue === undefined) {
|
||||
return '0.00 元'; // 如果值为空,返回0.00
|
||||
return '0.00 ' + t('drug.inpatient.yuan');
|
||||
}
|
||||
return cellValue.toFixed(2) + ' 元'; // 保留两位小数
|
||||
return cellValue.toFixed(2) + ' ' + t('drug.inpatient.yuan');
|
||||
}
|
||||
|
||||
/** 发药状态 → 规范状态名称映射(与《药品医嘱状态映射表》保持一致) */
|
||||
const DRUG_STATUS_DISPLAY = {
|
||||
11: '已执行',
|
||||
18: '已提交',
|
||||
4: '已发药',
|
||||
};
|
||||
const DRUG_STATUS_DISPLAY = computed(() => ({
|
||||
11: t('drug.inpatient.statusExecuted'),
|
||||
18: t('drug.inpatient.statusSubmitted'),
|
||||
4: t('drug.inpatient.statusDispensed'),
|
||||
}));
|
||||
|
||||
const LEGACY_DRUG_STATUS_TEXT = {
|
||||
已提交: '待配药',
|
||||
已发放: '已发药',
|
||||
已完成: '已发药',
|
||||
'已提交': t('drug.inpatient.statusPending'),
|
||||
'已发放': t('drug.inpatient.statusDispensed'),
|
||||
'已完成': t('drug.inpatient.statusDispensed'),
|
||||
};
|
||||
|
||||
function formatDrugStatusText(row) {
|
||||
const code = Number(row?.statusEnum);
|
||||
if (DRUG_STATUS_DISPLAY[code]) {
|
||||
return DRUG_STATUS_DISPLAY[code];
|
||||
if (DRUG_STATUS_DISPLAY.value[code]) {
|
||||
return DRUG_STATUS_DISPLAY.value[code];
|
||||
}
|
||||
return LEGACY_DRUG_STATUS_TEXT[row?.statusEnum_enumText] || row?.statusEnum_enumText || '-';
|
||||
}
|
||||
@@ -664,7 +666,7 @@ function getMedicineList(encounterId) {
|
||||
loading.value = false;
|
||||
})
|
||||
.catch((error) => {
|
||||
proxy.$modal.msgError('获取数据失败');
|
||||
proxy.$modal.msgError(t('drug.inpatient.getDataFailed'));
|
||||
});
|
||||
} else if (projectTypeCode.value == 2) {
|
||||
// 只调用listWesternmedicine接口
|
||||
@@ -758,7 +760,7 @@ function submitMedicine(saveList) {
|
||||
promises.push(
|
||||
deviceDispense(deviceList).then((res) => {
|
||||
if (res.code != 200) {
|
||||
throw new Error('耗材发药失败');
|
||||
throw new Error(t('drug.inpatient.deviceDispenseFailed'));
|
||||
}
|
||||
return res;
|
||||
})
|
||||
@@ -777,7 +779,7 @@ function submitMedicine(saveList) {
|
||||
promises.push(
|
||||
prepareMedicion(preparationList).then((res) => {
|
||||
if (res.code != 200) {
|
||||
throw new Error('药品发药失败');
|
||||
throw new Error(t('drug.inpatient.drugDispenseFailed'));
|
||||
}
|
||||
return res;
|
||||
})
|
||||
@@ -787,7 +789,7 @@ function submitMedicine(saveList) {
|
||||
promises.push(
|
||||
updateMedicion(preparedList).then((res) => {
|
||||
if (res.code != 200) {
|
||||
throw new Error('药品发药失败');
|
||||
throw new Error(t('drug.inpatient.drugDispenseFailed'));
|
||||
}
|
||||
return res;
|
||||
})
|
||||
@@ -803,31 +805,31 @@ function submitMedicine(saveList) {
|
||||
}
|
||||
})
|
||||
.then((response) => {
|
||||
proxy.$modal.msgSuccess('发药成功');
|
||||
proxy.$modal.msgSuccess(t('drug.inpatient.dispenseSuccess'));
|
||||
// 重新获取数据
|
||||
getMedicineList(currentRow.value.encounterId);
|
||||
})
|
||||
.catch((error) => {
|
||||
proxy.$modal.msgError('发药失败: ' + error.message);
|
||||
proxy.$modal.msgError(t('drug.inpatient.dispenseFailed') + ': ' + error.message);
|
||||
});
|
||||
} else if (projectTypeCode.value == 2) {
|
||||
let submittedList = saveList.filter((item) => {
|
||||
return item.statusEnum == 18;
|
||||
}); // 已提交列表
|
||||
if (submittedList.length === 0) {
|
||||
proxy.$modal.msgWarning('没有可操作的发药项目');
|
||||
proxy.$modal.msgWarning(t('drug.inpatient.noOperableItems'));
|
||||
return;
|
||||
}
|
||||
updateMedicion(submittedList).then((response) => {
|
||||
if (response.code == 200) {
|
||||
proxy.$modal.msgSuccess('发药成功');
|
||||
proxy.$modal.msgSuccess(t('drug.inpatient.dispenseSuccess'));
|
||||
getMedicineList(currentRow.value.encounterId);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
deviceDispense(saveList).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('发药成功');
|
||||
proxy.$modal.msgSuccess(t('drug.inpatient.dispenseSuccess'));
|
||||
getMedicineList(currentRow.value.encounterId);
|
||||
}
|
||||
});
|
||||
@@ -842,7 +844,7 @@ function validInventory(row, item) {
|
||||
quantity = quantity * item.partPercent;
|
||||
}
|
||||
if (quantity > item.inventoryQuantity) {
|
||||
proxy.$modal.msgError('当前批次库存不足');
|
||||
proxy.$modal.msgError(t('drug.inpatient.stockInsufficient'));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -858,10 +860,10 @@ function handleQuantity(row) {
|
||||
});
|
||||
if (totalQuantity > row.requestQuantity) {
|
||||
couldSave.value = false;
|
||||
proxy.$modal.msgError('发药数量不能大于总数量');
|
||||
proxy.$modal.msgError(t('drug.inpatient.qtyExceedsTotal'));
|
||||
} else if (totalQuantity < row.requestQuantity) {
|
||||
couldSave.value = false;
|
||||
proxy.$modal.msgError('发药数量不能小于总数量');
|
||||
proxy.$modal.msgError(t('drug.inpatient.qtyBelowTotal'));
|
||||
} else {
|
||||
couldSave.value = true;
|
||||
}
|
||||
@@ -947,7 +949,7 @@ function handleBatch(row) {
|
||||
};
|
||||
});
|
||||
} else {
|
||||
proxy.$modal.msgWarning('未选择要发药的项目,请重新选择,发药失败');
|
||||
proxy.$modal.msgWarning(t('drug.inpatient.noDispenseSelected'));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -963,7 +965,7 @@ function backMedicine(row) {
|
||||
|
||||
function handleConfirm() {
|
||||
if (!notPerformedReasonEnum.value) {
|
||||
ElMessage.error('请选择作废原因');
|
||||
ElMessage.error(t('drug.inpatient.selectVoidReasonError'));
|
||||
return;
|
||||
}
|
||||
if (selectedRow.value.itemTable != 'adm_device_definition') {
|
||||
@@ -973,7 +975,7 @@ function handleConfirm() {
|
||||
notPerformedReasonEnum: notPerformedReasonEnum.value,
|
||||
},
|
||||
]).then((response) => {
|
||||
proxy.$modal.msgSuccess('作废成功');
|
||||
proxy.$modal.msgSuccess(t('drug.inpatient.voidSuccess'));
|
||||
});
|
||||
} else {
|
||||
deviceInvalid([
|
||||
@@ -982,7 +984,7 @@ function handleConfirm() {
|
||||
notPerformedReasonEnum: notPerformedReasonEnum.value,
|
||||
},
|
||||
]).then((response) => {
|
||||
proxy.$modal.msgSuccess('作废成功');
|
||||
proxy.$modal.msgSuccess(t('drug.inpatient.voidSuccess'));
|
||||
});
|
||||
}
|
||||
getMedicineList(currentRow.value.encounterId);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
style="width: 44%; height: 80vh"
|
||||
>
|
||||
<div class="summary-card-header">
|
||||
{{ '汇总单' }}
|
||||
{{ $t('drug.inpatient.summaryCard') }}
|
||||
</div>
|
||||
<div class="summary-card-body">
|
||||
<div style="display: flex; justify-content: space-between; margin-bottom: 10px">
|
||||
@@ -13,7 +13,7 @@
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
style="width: 250px"
|
||||
placeholder="单据号"
|
||||
:placeholder="$t('drug.inpatient.docNo')"
|
||||
>
|
||||
<template #append>
|
||||
<el-button
|
||||
@@ -24,7 +24,7 @@
|
||||
</el-input>
|
||||
<el-select
|
||||
v-model="queryParams.statusEnum"
|
||||
placeholder="发放状态"
|
||||
:placeholder="$t('drug.inpatient.dispenseStatus')"
|
||||
style="width: 250px; margin-left: 10px"
|
||||
@change="getSummaryList"
|
||||
>
|
||||
@@ -42,8 +42,8 @@
|
||||
<el-date-picker
|
||||
v-model="queryParams.applyTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:start-placeholder="$t('drug.inpatient.startDate')"
|
||||
:end-placeholder="$t('drug.inpatient.endDate')"
|
||||
style="width: 300px"
|
||||
value-format="YYYY-MM-DD"
|
||||
:clearable="false"
|
||||
@@ -52,10 +52,10 @@
|
||||
type="primary"
|
||||
@click="getSummaryList"
|
||||
>
|
||||
搜索
|
||||
{{ $t('drug.inpatient.search') }}
|
||||
</el-button>
|
||||
<el-button @click="resetQuery">
|
||||
重置
|
||||
{{ $t('drug.inpatient.reset') }}
|
||||
</el-button>
|
||||
</div>
|
||||
<div style="display: flex; gap: 8px; flex-shrink: 0">
|
||||
@@ -64,13 +64,13 @@
|
||||
plain
|
||||
@click="handleSend"
|
||||
>
|
||||
批量发药
|
||||
{{ $t('drug.inpatient.batchDispense') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
>
|
||||
批量作废
|
||||
{{ $t('drug.inpatient.batchVoid') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -90,28 +90,28 @@
|
||||
/>
|
||||
<vxe-column
|
||||
field="busNo"
|
||||
title="单据号"
|
||||
:title="$t('drug.inpatient.docNo')"
|
||||
align="center"
|
||||
min-width="130"
|
||||
show-overflow="title"
|
||||
/>
|
||||
<vxe-column
|
||||
field="applicantName"
|
||||
title="申请人"
|
||||
:title="$t('drug.inpatient.applicant')"
|
||||
align="center"
|
||||
min-width="65"
|
||||
show-overflow="title"
|
||||
/>
|
||||
<vxe-column
|
||||
field="locationName"
|
||||
title="发药药房"
|
||||
:title="$t('drug.inpatient.dispensePharmacy')"
|
||||
align="center"
|
||||
min-width="75"
|
||||
show-overflow="title"
|
||||
/>
|
||||
<vxe-column
|
||||
field="statusEnum_enumText"
|
||||
title="状态"
|
||||
:title="$t('drug.inpatient.status')"
|
||||
align="center"
|
||||
min-width="80"
|
||||
>
|
||||
@@ -127,7 +127,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="applyTime"
|
||||
title="汇总日期"
|
||||
:title="$t('drug.inpatient.summaryDate')"
|
||||
align="center"
|
||||
min-width="75"
|
||||
>
|
||||
@@ -136,7 +136,7 @@
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
title="操作"
|
||||
:title="$t('drug.inpatient.operation')"
|
||||
align="center"
|
||||
min-width="50"
|
||||
>
|
||||
@@ -146,7 +146,7 @@
|
||||
link
|
||||
@click="handleSend(scope.row)"
|
||||
>
|
||||
发药
|
||||
{{ $t('drug.inpatient.dispense') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</vxe-column>
|
||||
@@ -163,7 +163,7 @@
|
||||
</el-row> -->
|
||||
<el-card style="width: 59%; height: 80vh">
|
||||
<template #header>
|
||||
{{ '汇总单详情' }}
|
||||
{{ $t('drug.inpatient.summaryDetail') }}
|
||||
</template>
|
||||
<vxe-table
|
||||
v-loading="loading"
|
||||
@@ -174,12 +174,12 @@
|
||||
>
|
||||
<vxe-column
|
||||
type="seq"
|
||||
title="序号"
|
||||
:title="$t('drug.inpatient.seqNo')"
|
||||
min-width="50"
|
||||
/>
|
||||
<vxe-column
|
||||
field="itemName"
|
||||
title="项目名称"
|
||||
:title="$t('drug.inpatient.itemName')"
|
||||
min-width="150"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -188,7 +188,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="totalVolume"
|
||||
title="规格"
|
||||
:title="$t('drug.inpatient.spec')"
|
||||
min-width="120"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -197,7 +197,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="lotNumber"
|
||||
title="批次号"
|
||||
:title="$t('drug.inpatient.batchNo')"
|
||||
min-width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -206,7 +206,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="quantity"
|
||||
title="数量"
|
||||
:title="$t('drug.inpatient.quantity')"
|
||||
min-width="80"
|
||||
align="center"
|
||||
>
|
||||
@@ -216,7 +216,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="categoryCode_dictText"
|
||||
title="药品类型"
|
||||
:title="$t('drug.inpatient.drugType')"
|
||||
min-width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -225,7 +225,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="manufacturerText"
|
||||
title="生产厂家"
|
||||
:title="$t('drug.inpatient.manufacturer')"
|
||||
min-width="120"
|
||||
show-overflow="title"
|
||||
>
|
||||
@@ -239,20 +239,22 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {getCurrentInstance, ref} from 'vue';
|
||||
import {computed, getCurrentInstance, ref} from 'vue';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import {getFromSummaryDetails, getFromSummaryInit, getFromSummaryList, totalSendDrug,} from './api.js';
|
||||
|
||||
const {t} = useI18n();
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
/** 发药汇总单状态展示(汇总申请→待发药(2),发药→已发药(4)) */
|
||||
const SUMMARY_STATUS_DISPLAY = {
|
||||
2: '待发药',
|
||||
4: '已发药',
|
||||
};
|
||||
const SUMMARY_STATUS_DISPLAY = computed(() => ({
|
||||
2: t('drug.inpatient.pendingDispense'),
|
||||
4: t('drug.inpatient.dispensed'),
|
||||
}));
|
||||
|
||||
function formatSummaryStatusText(row) {
|
||||
const code = Number(row?.statusEnum);
|
||||
return SUMMARY_STATUS_DISPLAY[code] || row?.statusEnum_enumText || '-';
|
||||
return SUMMARY_STATUS_DISPLAY.value[code] || row?.statusEnum_enumText || '-';
|
||||
}
|
||||
|
||||
/** 状态标签颜色 */
|
||||
@@ -267,7 +269,7 @@ function getStatusTagType(row) {
|
||||
function mapSummaryStatusOptions(options = []) {
|
||||
return options.map((item) => ({
|
||||
...item,
|
||||
label: SUMMARY_STATUS_DISPLAY[item.value] ?? item.label,
|
||||
label: SUMMARY_STATUS_DISPLAY.value[item.value] ?? item.label,
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -355,7 +357,7 @@ function handleSend(row) {
|
||||
|
||||
totalSendDrug(sendList).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
proxy.$modal.msgSuccess(t('drug.inpatient.operationSuccess'));
|
||||
getSummaryList();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
:disabled="!busNo"
|
||||
@click="handleSendDrug"
|
||||
>
|
||||
发药
|
||||
{{ $t('drug.inpatient.dispense') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@@ -25,7 +25,7 @@
|
||||
:disabled="!busNo"
|
||||
@click="handleExport"
|
||||
>
|
||||
导出
|
||||
{{ $t('drug.inpatient.export') }}
|
||||
</el-button>
|
||||
</el-row>
|
||||
<div class="tableContainer">
|
||||
@@ -38,12 +38,12 @@
|
||||
>
|
||||
<vxe-column
|
||||
field="currentIndex"
|
||||
title="序号"
|
||||
:title="$t('drug.inpatient.seqNo')"
|
||||
min-width="60"
|
||||
/>
|
||||
<vxe-column
|
||||
field="itemName"
|
||||
title="项目名称"
|
||||
:title="$t('drug.inpatient.itemName')"
|
||||
min-width="150"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -52,7 +52,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="totalVolume"
|
||||
title="规格"
|
||||
:title="$t('drug.inpatient.spec')"
|
||||
min-width="120"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -61,7 +61,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="lotNumber"
|
||||
title="批次号"
|
||||
:title="$t('drug.inpatient.batchNo')"
|
||||
min-width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -70,7 +70,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="quantity"
|
||||
title="数量"
|
||||
:title="$t('drug.inpatient.quantity')"
|
||||
min-width="80"
|
||||
align="center"
|
||||
>
|
||||
@@ -92,7 +92,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="sourceLocationName"
|
||||
title="发放地点"
|
||||
:title="$t('drug.inpatient.dispenseLocation')"
|
||||
min-width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -101,7 +101,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="manufacturerText"
|
||||
title="生产厂家"
|
||||
:title="$t('drug.inpatient.manufacturer')"
|
||||
min-width="120"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -110,7 +110,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="busNo"
|
||||
title="单据号"
|
||||
:title="$t('drug.inpatient.docNo')"
|
||||
min-width="150"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -125,8 +125,10 @@
|
||||
<script setup>
|
||||
import {getCurrentInstance, ref} from 'vue';
|
||||
import {ElMessage} from 'element-plus';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import {totalSendDrug} from './api.js';
|
||||
|
||||
const {t} = useI18n();
|
||||
const { proxy } = getCurrentInstance();
|
||||
// 定义组件属性
|
||||
const props = defineProps({
|
||||
@@ -168,21 +170,21 @@ const rowStyle = {
|
||||
// 发药功能
|
||||
const handleSendDrug = () => {
|
||||
if (!props.busNo) {
|
||||
ElMessage.warning('请先选择单据号');
|
||||
ElMessage.warning(t('drug.inpatient.selectDocNoFirst'));
|
||||
return;
|
||||
}
|
||||
let data = [{ busNo: props.busNo }];
|
||||
loading.value = true;
|
||||
proxy.$modal
|
||||
.confirm('确定要发药吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
.confirm(t('drug.inpatient.confirmDispense'), t('drug.inpatient.prompt'), {
|
||||
confirmButtonText: t('drug.inpatient.confirm'),
|
||||
cancelButtonText: t('drug.inpatient.cancel'),
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
const response = await totalSendDrug(data);
|
||||
if (response.code === 200) {
|
||||
ElMessage.success('发药成功');
|
||||
ElMessage.success(t('drug.inpatient.dispenseSuccess'));
|
||||
loading.value = false;
|
||||
}
|
||||
})
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
<el-card class="patient-list">
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>患者列表</span>
|
||||
<span>{{ $t('drug.inpatient.patientList') }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<div style="width: 100%">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="搜索患者"
|
||||
:placeholder="$t('drug.inpatient.searchPatient')"
|
||||
style="width: 48%; margin-bottom: 10px; margin-right: 15px"
|
||||
@keyup.enter="getEncounterList"
|
||||
>
|
||||
@@ -24,7 +24,7 @@
|
||||
<el-select
|
||||
v-model="queryParams.refundEnum"
|
||||
style="width: 48%; margin-bottom: 10px"
|
||||
placeholder="收费状态"
|
||||
:placeholder="$t('drug.inpatient.chargeStatus')"
|
||||
@change="getEncounterList"
|
||||
>
|
||||
<el-option
|
||||
@@ -37,8 +37,8 @@
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:start-placeholder="$t('drug.inpatient.startDate')"
|
||||
:end-placeholder="$t('drug.inpatient.endDate')"
|
||||
style="width: 85%; margin-bottom: 10px"
|
||||
value-format="YYYY-MM-DD"
|
||||
placement="bottom"
|
||||
@@ -49,7 +49,7 @@
|
||||
style="margin-bottom: 10px; margin-left: 18px"
|
||||
@click="getEncounterList"
|
||||
>
|
||||
搜索
|
||||
{{ $t('drug.inpatient.search') }}
|
||||
</el-button>
|
||||
</div>
|
||||
<div style="flex: 1; overflow: hidden; margin-top: 10px;">
|
||||
@@ -64,20 +64,20 @@
|
||||
<vxe-column
|
||||
field="patientName"
|
||||
align="center"
|
||||
title="姓名"
|
||||
:title="$t('drug.inpatient.name')"
|
||||
width="130"
|
||||
show-overflow="title"
|
||||
/>
|
||||
<vxe-column
|
||||
field="genderEnum_enumText"
|
||||
align="center"
|
||||
title="性别"
|
||||
:title="$t('drug.inpatient.gender')"
|
||||
show-overflow="title"
|
||||
/>
|
||||
<vxe-column
|
||||
align="center"
|
||||
width="140"
|
||||
title="就诊日期"
|
||||
:title="$t('drug.inpatient.visitDate')"
|
||||
show-overflow="title"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -95,7 +95,7 @@
|
||||
<el-card class="refund-list">
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>退药单</span>
|
||||
<span>{{ $t('drug.inpatient.returnDrugOrder') }}</span>
|
||||
<!-- <div v-if="selectedPatient">
|
||||
<span class="patient-info">{{ selectedPatient.name }}</span>
|
||||
<el-tag type="info">{{ selectedPatient.visitNo }}</el-tag>
|
||||
@@ -109,13 +109,13 @@
|
||||
:disabled="!selectedMedicines.length"
|
||||
@click="handleReturnDrug(undefined)"
|
||||
>
|
||||
确认退药
|
||||
{{ $t('drug.inpatient.confirmReturn') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleScan()"
|
||||
>
|
||||
扫码
|
||||
{{ $t('drug.inpatient.scan') }}
|
||||
</el-button>
|
||||
</div>
|
||||
<div style="flex: 1; overflow: hidden; margin-bottom: 10px;">
|
||||
@@ -137,43 +137,43 @@
|
||||
/>
|
||||
<vxe-column
|
||||
field="itemName"
|
||||
title="药品名称"
|
||||
:title="$t('drug.inpatient.drugName')"
|
||||
show-overflow="title"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
field="totalPrice"
|
||||
title="总价"
|
||||
:title="$t('drug.inpatient.totalPrice')"
|
||||
width="100"
|
||||
align="right"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.totalPrice ? scope.row.totalPrice.toFixed(2) + ' 元' : '-' }}
|
||||
{{ scope.row.totalPrice ? scope.row.totalPrice.toFixed(2) + ' ' + $t('drug.inpatient.yuan') : '-' }}
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="lotNumber"
|
||||
title="批号"
|
||||
:title="$t('drug.inpatient.lotNo')"
|
||||
width="180"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
field="traceNo"
|
||||
title="追溯码"
|
||||
:title="$t('drug.inpatient.traceNo')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
v-model="scope.row.traceNo"
|
||||
placeholder="请输入追溯码"
|
||||
:placeholder="$t('drug.inpatient.enterTraceNo')"
|
||||
/>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="reqStatus_enumText"
|
||||
title="退药状态"
|
||||
:title="$t('drug.inpatient.returnStatus')"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
@@ -183,7 +183,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="waitingQuantity"
|
||||
title="退药数量"
|
||||
:title="$t('drug.inpatient.returnQty')"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
@@ -197,12 +197,12 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="doctorName"
|
||||
title="开单医生"
|
||||
:title="$t('drug.inpatient.orderDoctor')"
|
||||
align="center"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
title="操作"
|
||||
:title="$t('drug.inpatient.operation')"
|
||||
width="100"
|
||||
align="center"
|
||||
fixed="right"
|
||||
@@ -211,7 +211,7 @@
|
||||
<el-popconfirm
|
||||
width="150"
|
||||
hide-after="10"
|
||||
title="操作确认"
|
||||
:title="$t('drug.inpatient.operationConfirm')"
|
||||
placement="top-start"
|
||||
@confirm="handleReturnDrug(scope.row)"
|
||||
>
|
||||
@@ -221,7 +221,7 @@
|
||||
link
|
||||
:disabled="scope.row.refundEnum != 16"
|
||||
>
|
||||
退药
|
||||
{{ $t('drug.inpatient.returnDrug') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
@@ -233,8 +233,8 @@
|
||||
<!-- 底部操作栏 -->
|
||||
<div class="footer">
|
||||
<div class="statistics">
|
||||
<span>已选 {{ selectedMedicines.length }} 种药品</span>
|
||||
<span class="total">合计金额:¥ {{ totalAmount.toFixed(2) }}</span>
|
||||
<span>{{ $t('drug.inpatient.selectedCount', { count: selectedMedicines.length }) }}</span>
|
||||
<span class="total">{{ $t('drug.inpatient.totalAmountLabel') }}¥ {{ totalAmount.toFixed(2) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -249,11 +249,13 @@
|
||||
|
||||
<script setup name="ReturnDrug">
|
||||
import {getCurrentInstance, nextTick} from 'vue';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import {getList, getReturnDrugList, init, itemTraceNo, returnDrug} from './api';
|
||||
import {formatDateStr} from '@/utils/index';
|
||||
import {debounce} from 'lodash-es';
|
||||
import TraceNoDialog from '@/components/HealthLinkHis/TraceNoDialog/index.vue';
|
||||
|
||||
const {t} = useI18n();
|
||||
const queryParams = ref({
|
||||
pageSize: 50,
|
||||
pageNum: 1,
|
||||
@@ -315,7 +317,7 @@ function submit(value) {
|
||||
if (res.code === 200) {
|
||||
returDrugList.value.forEach((item, index) => {
|
||||
if (res.data[item.itemId] && res.data[item.itemId].split(',') > item.quantity) {
|
||||
proxy.$modal.msgWarning('操作失败');
|
||||
proxy.$modal.msgWarning(t('drug.inpatient.operationFailed'));
|
||||
return;
|
||||
}
|
||||
returDrugList.value[index].traceNo = res.data[item.itemId];
|
||||
@@ -381,7 +383,7 @@ function handleReturnDrug(row) {
|
||||
}
|
||||
returnDrug(saveList).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$modal.msgSuccess('退药成功');
|
||||
proxy.$modal.msgSuccess(t('drug.inpatient.returnSuccess'));
|
||||
getEncounterList();
|
||||
getReturnDrugList({
|
||||
encounterId: encounterId.value,
|
||||
|
||||
@@ -9,19 +9,19 @@
|
||||
@tab-click="handleClick"
|
||||
>
|
||||
<el-tab-pane
|
||||
label="发药汇总单"
|
||||
:label="$t('drug.inpatient.summaryTab')"
|
||||
name="summary"
|
||||
>
|
||||
<MedicationSummary />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane
|
||||
label="发药明细单"
|
||||
:label="$t('drug.inpatient.detailTab')"
|
||||
name="detail"
|
||||
>
|
||||
<MedicationDetails />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane
|
||||
label="住院退药"
|
||||
:label="$t('drug.inpatient.returnTab')"
|
||||
name="return"
|
||||
>
|
||||
<ReturnDrug />
|
||||
@@ -33,11 +33,13 @@
|
||||
<script setup>
|
||||
import {getCurrentInstance, onMounted, reactive, ref} from 'vue';
|
||||
import {ElMessage} from 'element-plus';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import MedicationSummary from './components/MedicationSummary.vue';
|
||||
import MedicationDetails from './components/MedicationDetails.vue';
|
||||
import ReturnDrug from './components/ReturnDrug.vue';
|
||||
import {getEncounterList, getFromDetailList, getFromSummaryList, getMedicationSummaryDetail,} from './components/api';
|
||||
|
||||
const {t} = useI18n();
|
||||
const activeName = ref('summary');
|
||||
const loading = ref(false);
|
||||
const patientList = ref([]);
|
||||
@@ -67,16 +69,16 @@ const dateRange = ref([
|
||||
]);
|
||||
|
||||
// 发药状态选项
|
||||
const dispenseStatusOptions = ref([
|
||||
{ label: '待发药', value: '1' },
|
||||
{ label: '已发药', value: '2' },
|
||||
{ label: '全部', value: '0' },
|
||||
const dispenseStatusOptions = computed(() => [
|
||||
{ label: t('drug.inpatient.pendingDispense'), value: '1' },
|
||||
{ label: t('drug.inpatient.dispensed'), value: '2' },
|
||||
{ label: t('drug.inpatient.all'), value: '0' },
|
||||
]);
|
||||
|
||||
// 加载患者列表数据
|
||||
async function getList() {
|
||||
if (dateRange.value == null) {
|
||||
proxy.$message.warning('请选择日期');
|
||||
proxy.$message.warning(t('drug.inpatient.selectDate'));
|
||||
return;
|
||||
}
|
||||
loading.value = true;
|
||||
@@ -145,7 +147,7 @@ async function callMedicationSummaryDetail(encounterId) {
|
||||
// 处理药品汇总详情数据
|
||||
handleMedicationSummaryDetail(response.data);
|
||||
} catch (error) {
|
||||
ElMessage.error('获取药品汇总详情失败:' + (error.message || '未知错误'));
|
||||
ElMessage.error(t('drug.inpatient.getSummaryDetailFailed') + (error.message || t('drug.inpatient.unknownError')));
|
||||
// 发生错误时清空数据
|
||||
handleMedicationSummaryDetail([]);
|
||||
} finally {
|
||||
@@ -168,7 +170,7 @@ async function callSummaryMedicationDetail(busNo) {
|
||||
// 处理汇总药品详情数据
|
||||
handleMedicationSummaryDetail(response.data);
|
||||
} catch (error) {
|
||||
ElMessage.error('获取汇总药品详情失败:' + (error.message || '未知错误'));
|
||||
ElMessage.error(t('drug.inpatient.getDetailFailed') + (error.message || t('drug.inpatient.unknownError')));
|
||||
// 发生错误时清空数据
|
||||
handleMedicationSummaryDetail([]);
|
||||
} finally {
|
||||
@@ -178,52 +180,52 @@ async function callSummaryMedicationDetail(busNo) {
|
||||
}
|
||||
|
||||
// 窗口数据
|
||||
const windowData = reactive([
|
||||
const windowData = computed(() => [
|
||||
{
|
||||
label: '窗口1',
|
||||
label: t('drug.inpatient.window1'),
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '窗口2',
|
||||
label: t('drug.inpatient.window2'),
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
label: '窗口3',
|
||||
label: t('drug.inpatient.window3'),
|
||||
value: 3,
|
||||
},
|
||||
]);
|
||||
|
||||
// 摆药单数据
|
||||
const medicationList = reactive([
|
||||
const medicationList = computed(() => [
|
||||
{
|
||||
label: '药单1',
|
||||
label: t('drug.inpatient.medicationList1'),
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '药单2',
|
||||
label: t('drug.inpatient.medicationList2'),
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
label: '药单3',
|
||||
label: t('drug.inpatient.medicationList3'),
|
||||
value: 3,
|
||||
},
|
||||
]);
|
||||
|
||||
// 时间范围选项
|
||||
const timeRangeList = [
|
||||
const timeRangeList = computed(() => [
|
||||
{
|
||||
label: '全部',
|
||||
label: t('drug.inpatient.all'),
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
label: '长期',
|
||||
label: t('drug.inpatient.longTerm'),
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
label: '临时',
|
||||
label: t('drug.inpatient.temporary'),
|
||||
value: 3,
|
||||
},
|
||||
];
|
||||
]);
|
||||
|
||||
// 表格类型
|
||||
const selectType = ref('total');
|
||||
@@ -311,4 +313,4 @@ onMounted(() => {
|
||||
font-size: 16px !important;
|
||||
padding: 0 60px !important;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
>
|
||||
<!-- 库房类型 -->
|
||||
<el-form-item
|
||||
label="库房类型"
|
||||
:label="$t('medicineStorage.common.warehouseType')"
|
||||
prop="locationTypeEnum"
|
||||
>
|
||||
<el-select
|
||||
v-model="queryParams.locationTypeEnum"
|
||||
placeholder="请选择库房类型"
|
||||
:placeholder="$t('medicineStorage.common.selectWarehouseType')"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
filterable
|
||||
@@ -31,12 +31,12 @@
|
||||
|
||||
<!-- 库房 -->
|
||||
<el-form-item
|
||||
label="库房"
|
||||
:label="$t('medicineStorage.common.warehouse')"
|
||||
prop="locationId"
|
||||
>
|
||||
<el-select
|
||||
v-model="queryParams.locationId"
|
||||
placeholder="请选择库房"
|
||||
:placeholder="$t('medicineStorage.common.pleaseSelectWarehouse')"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
:disabled="!queryParams.locationTypeEnum"
|
||||
@@ -52,12 +52,12 @@
|
||||
</el-form-item>
|
||||
<!-- 单据类型 -->
|
||||
<el-form-item
|
||||
label="单据类型"
|
||||
:label="$t('medicineStorage.common.documentType')"
|
||||
prop="typeEnum"
|
||||
>
|
||||
<el-select
|
||||
v-model="queryParams.typeEnum"
|
||||
placeholder="请选择单据类型"
|
||||
:placeholder="$t('medicineStorage.common.selectDocumentStatus')"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
:disabled="!queryParams.locationTypeEnum"
|
||||
@@ -72,12 +72,12 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="单据状态"
|
||||
:label="$t('medicineStorage.common.documentStatus')"
|
||||
prop="statusEnum"
|
||||
>
|
||||
<el-select
|
||||
v-model="queryParams.statusEnum"
|
||||
placeholder="请选择单据类型"
|
||||
:placeholder="$t('medicineStorage.common.selectDocumentStatus')"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@change="getList"
|
||||
@@ -92,31 +92,31 @@
|
||||
</el-form-item>
|
||||
<!-- 制单日期 -->
|
||||
<el-form-item
|
||||
label="制单日期"
|
||||
:label="$t('medicineStorage.common.orderMakingDate')"
|
||||
prop="orderDate"
|
||||
>
|
||||
<el-date-picker
|
||||
v-model="orderDateRange"
|
||||
type="daterange"
|
||||
clearable
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:range-separator="$t('medicineStorage.common.dateRangeSeparator')"
|
||||
:start-placeholder="$t('medicineStorage.common.startDate')"
|
||||
:end-placeholder="$t('medicineStorage.common.endDate')"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 审核日期 -->
|
||||
<el-form-item
|
||||
label="审核日期"
|
||||
:label="$t('medicineStorage.common.auditDate')"
|
||||
prop="approvalDate"
|
||||
>
|
||||
<el-date-picker
|
||||
v-model="auditDateRange"
|
||||
type="daterange"
|
||||
clearable
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:range-separator="$t('medicineStorage.common.dateRangeSeparator')"
|
||||
:start-placeholder="$t('medicineStorage.common.startDate')"
|
||||
:end-placeholder="$t('medicineStorage.common.endDate')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@@ -125,13 +125,13 @@
|
||||
icon="Search"
|
||||
@click="handleQuery"
|
||||
>
|
||||
搜索
|
||||
{{ $t('medicineStorage.common.search') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
icon="Refresh"
|
||||
@click="resetQuery"
|
||||
>
|
||||
重置
|
||||
{{ $t('medicineStorage.common.reset') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -142,37 +142,37 @@
|
||||
style="width: 100%"
|
||||
>
|
||||
<vxe-column
|
||||
title="订单编号"
|
||||
:title="$t('medicineStorage.common.orderNo')"
|
||||
field="supplyBusNo"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="申请人"
|
||||
:title="$t('medicineStorage.common.applicant')"
|
||||
field="applicantId_dictText"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="申请时间"
|
||||
:title="$t('medicineStorage.common.applicationTime')"
|
||||
field="applyTime"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="批准时间"
|
||||
:title="$t('medicineStorage.common.approvalTime')"
|
||||
field="approvalTime"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="批准人"
|
||||
:title="$t('medicineStorage.common.approver')"
|
||||
field="approverId_dictText"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="仓库"
|
||||
:title="$t('medicineStorage.common.warehouse2')"
|
||||
field="locationId_dictText"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="状态"
|
||||
:title="$t('medicineStorage.common.status')"
|
||||
field="statusEnum_enumText"
|
||||
align="center"
|
||||
>
|
||||
@@ -183,12 +183,12 @@
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
title="供应商"
|
||||
:title="$t('medicineStorage.common.supplier')"
|
||||
field="supplierId_dictText"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="单据类型"
|
||||
:title="$t('medicineStorage.common.documentType')"
|
||||
field="typeEnum_enumText"
|
||||
align="center"
|
||||
>
|
||||
@@ -199,7 +199,7 @@
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
title="操作"
|
||||
:title="$t('medicineStorage.common.operation')"
|
||||
align="center"
|
||||
width="180"
|
||||
>
|
||||
@@ -211,7 +211,7 @@
|
||||
icon="View"
|
||||
@click="handleView(scope.row)"
|
||||
>
|
||||
查看
|
||||
{{ $t('medicineStorage.common.view') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</vxe-column>
|
||||
@@ -229,9 +229,11 @@
|
||||
<script setup>
|
||||
import {computed, ref, watch} from 'vue';
|
||||
import {useRouter} from 'vue-router';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import {getInit, getOrderList} from './components/api';
|
||||
import {parseTime} from '@/utils/his';
|
||||
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
// 制单日期
|
||||
const orderDateRange = ref([]);
|
||||
@@ -246,25 +248,25 @@ const queryParams = ref({
|
||||
locationId: null,
|
||||
});
|
||||
// tag列表
|
||||
const typeEnumTagOptions = ref({
|
||||
13: { value: 13, label: '采购订货', type: 'primary' },
|
||||
1: { value: 1, label: '采购入库', type: 'success' },
|
||||
5: { value: 5, label: '采购退货', type: 'danger' },
|
||||
7: { value: 7, label: '领用出库', type: 'warning' },
|
||||
9: { value: 9, label: '领用退货', type: 'success' },
|
||||
6: { value: 6, label: '报损单', type: 'info' },
|
||||
4: { value: 4, label: '商品盘点', type: 'warning' },
|
||||
const typeEnumTagOptions = computed(() => ({
|
||||
13: { value: 13, label: t('medicineStorage.documentManagement.purchaseOrder'), type: 'primary' },
|
||||
1: { value: 1, label: t('medicineStorage.documentManagement.purchaseStockIn'), type: 'success' },
|
||||
5: { value: 5, label: t('medicineStorage.documentManagement.purchaseReturn'), type: 'danger' },
|
||||
7: { value: 7, label: t('medicineStorage.documentManagement.stockOut'), type: 'warning' },
|
||||
9: { value: 9, label: t('medicineStorage.documentManagement.returnToWarehouse'), type: 'success' },
|
||||
6: { value: 6, label: t('medicineStorage.documentManagement.profitLoss'), type: 'info' },
|
||||
4: { value: 4, label: t('medicineStorage.documentManagement.stocktaking'), type: 'warning' },
|
||||
// 2: { value: 2, label: '商品调拨', type: 'info' },
|
||||
});
|
||||
}));
|
||||
// tag列表
|
||||
const statusEnumTagOptions = ref({
|
||||
1: { value: 1, label: '待审核', type: 'warning' },
|
||||
2: { value: 2, label: '审核中', type: 'primary' },
|
||||
3: { value: 3, label: '同意', type: 'success' },
|
||||
4: { value: 4, label: '驳回', type: 'danger' },
|
||||
9: { value: 9, label: '已撤回', type: 'info' },
|
||||
10: { value: 10, label: '待审请', type: 'warning' },
|
||||
});
|
||||
const statusEnumTagOptions = computed(() => ({
|
||||
1: { value: 1, label: t('medicineStorage.documentManagement.pendingAudit'), type: 'warning' },
|
||||
2: { value: 2, label: t('medicineStorage.documentManagement.auditing'), type: 'primary' },
|
||||
3: { value: 3, label: t('medicineStorage.documentManagement.agreed'), type: 'success' },
|
||||
4: { value: 4, label: t('medicineStorage.documentManagement.rejected'), type: 'danger' },
|
||||
9: { value: 9, label: t('medicineStorage.documentManagement.withdrawn'), type: 'info' },
|
||||
10: { value: 10, label: t('medicineStorage.documentManagement.pendingApply'), type: 'warning' },
|
||||
}));
|
||||
// 判断单据类型是否在 typeEnumTagOptions 中
|
||||
const isTypeEnumTagOptions = (type) => {
|
||||
return Number(type) in typeEnumTagOptions.value;
|
||||
@@ -413,4 +415,4 @@ watch(
|
||||
|
||||
init();
|
||||
getList();
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div>
|
||||
<vxe-table
|
||||
ref="medicineRef"
|
||||
@@ -7,24 +7,24 @@
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<vxe-column
|
||||
title="项目编码"
|
||||
:title="$t('medicineStorage.common.itemCode')"
|
||||
align="center"
|
||||
field="busNo"
|
||||
width="150"
|
||||
/>
|
||||
<vxe-column
|
||||
title="项目名称"
|
||||
:title="$t('medicineStorage.common.itemName')"
|
||||
align="center"
|
||||
field="name"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
title="进货价"
|
||||
:title="$t('medicineStorage.common.purchasePrice')"
|
||||
align="center"
|
||||
field="price"
|
||||
/>
|
||||
<vxe-column
|
||||
title="零售价"
|
||||
:title="$t('medicineStorage.common.retailPrice')"
|
||||
align="center"
|
||||
field="retailPrice"
|
||||
/>
|
||||
@@ -39,12 +39,12 @@
|
||||
field="minUnitCode_dictText"
|
||||
/>
|
||||
<vxe-column
|
||||
title="规格"
|
||||
:title="$t('medicineStorage.common.spec')"
|
||||
align="center"
|
||||
field="totalVolume"
|
||||
/>
|
||||
<vxe-column
|
||||
title="规格库存"
|
||||
:title="$t('medicineStorage.common.specStock')"
|
||||
align="center"
|
||||
field="specificationInventory"
|
||||
/>
|
||||
@@ -54,17 +54,17 @@
|
||||
field="batchInventory"
|
||||
/>
|
||||
<vxe-column
|
||||
title="供应商"
|
||||
:title="$t('medicineStorage.common.supplier')"
|
||||
align="center"
|
||||
field="supplierId_dictText"
|
||||
/>
|
||||
<vxe-column
|
||||
title="生产厂家"
|
||||
:title="$t('medicineStorage.common.manufacturer')"
|
||||
align="center"
|
||||
field="manufacturerText"
|
||||
/>
|
||||
<vxe-column
|
||||
title="批准文号"
|
||||
:title="$t('medicineStorage.common.approvalNo')"
|
||||
align="center"
|
||||
field="approvalNumber"
|
||||
/>
|
||||
@@ -75,8 +75,10 @@
|
||||
<script setup>
|
||||
import {getMedicineList} from './api';
|
||||
import {watch} from 'vue';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import {throttle} from 'lodash-es';
|
||||
|
||||
const { t } = useI18n();
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
type: String,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<el-dialog
|
||||
v-model="localDialogVisible"
|
||||
title="订单列表"
|
||||
:title="$t('medicineStorage.common.orderList')"
|
||||
width="960px"
|
||||
teleported
|
||||
@close="resetAllData"
|
||||
@@ -17,25 +17,25 @@
|
||||
@cell-click="handleRowClick"
|
||||
>
|
||||
<vxe-column
|
||||
title="订单编号"
|
||||
:title="$t('medicineStorage.common.orderNo')"
|
||||
field="supplyBusNo"
|
||||
width="200"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="采购员"
|
||||
:title="$t('medicineStorage.common.purchaser')"
|
||||
field="applicantId_dictText"
|
||||
width="100"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="供应商"
|
||||
:title="$t('medicineStorage.common.supplier')"
|
||||
field="supplierId_dictText"
|
||||
width="220"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="审核状态"
|
||||
:title="$t('medicineStorage.common.auditStatus')"
|
||||
field="statusEnum_enumText"
|
||||
width="100"
|
||||
align="center"
|
||||
@@ -56,13 +56,13 @@
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
title="单据类型"
|
||||
:title="$t('medicineStorage.common.documentType')"
|
||||
field="typeEnum_enumText"
|
||||
width="100"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="单据日期"
|
||||
:title="$t('medicineStorage.common.documentDate')"
|
||||
field="applyTime"
|
||||
width="200"
|
||||
align="center"
|
||||
@@ -90,13 +90,13 @@
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="handleCancel">
|
||||
取消
|
||||
{{ $t('medicineStorage.common.cancel') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleSubmit"
|
||||
>
|
||||
确认
|
||||
{{ $t('medicineStorage.common.confirm') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -107,7 +107,10 @@
|
||||
<script setup>
|
||||
import {getPurchaseOrderDetail, getPurchaseOrderList} from './api';
|
||||
import {getCurrentInstance, ref, watch} from 'vue';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import {parseTime} from '@/utils/his';
|
||||
|
||||
const { t } = useI18n();
|
||||
// 调用父组件方法
|
||||
const emit = defineEmits(['dialogSubmit', 'dialogCancel', 'updateTableData']);
|
||||
// 获取当前实例
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div>
|
||||
<el-row :gutter="10">
|
||||
<el-form
|
||||
@@ -10,7 +10,7 @@
|
||||
>
|
||||
<el-row :gutter="10">
|
||||
<el-form-item
|
||||
label="单据号"
|
||||
:label="$t('medicineStorage.common.documentNo')"
|
||||
prop="busNo"
|
||||
>
|
||||
<el-input
|
||||
@@ -21,12 +21,12 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="开单日期"
|
||||
:label="$t('medicineStorage.common.orderDate')"
|
||||
prop="applyTime"
|
||||
>
|
||||
<el-date-picker
|
||||
v-model="localForm.applyTime"
|
||||
placeholder="请选择开单日期"
|
||||
:placeholder="$t('medicineStorage.common.selectOrderDate')"
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
@@ -34,12 +34,12 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="开单人"
|
||||
:label="$t('medicineStorage.common.orderMaker')"
|
||||
prop="applicantId"
|
||||
>
|
||||
<el-select
|
||||
v-model="localForm.applicantId"
|
||||
placeholder="请选择开单人"
|
||||
:placeholder="$t('medicineStorage.common.selectOrderMaker')"
|
||||
style="width: 140px"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
clearable
|
||||
@@ -53,12 +53,12 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="单据分类"
|
||||
:label="$t('medicineStorage.common.categoryLabel')"
|
||||
prop="categoryEnum"
|
||||
>
|
||||
<el-select
|
||||
v-model="localForm.categoryEnum"
|
||||
placeholder="请选择单据分类"
|
||||
:placeholder="$t('medicineStorage.common.selectCategory')"
|
||||
style="width: 180px"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
clearable
|
||||
@@ -73,13 +73,13 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
label="摘要(A)"
|
||||
:label="$t('medicineStorage.common.summary') + '(A)'"
|
||||
prop="reason"
|
||||
>
|
||||
<el-input
|
||||
v-model="localForm.reason"
|
||||
type="textarea"
|
||||
placeholder="请输入摘要"
|
||||
:placeholder="$t('medicineStorage.common.enterSummary')"
|
||||
style="width: 300px"
|
||||
:rows="1"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
@@ -93,7 +93,7 @@
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<div class="form-item">
|
||||
<label class="form-label">审核人</label>
|
||||
<label class="form-label">{{ $t('medicineStorage.common.auditor') }}</label>
|
||||
<el-tag
|
||||
type="warning"
|
||||
plain
|
||||
@@ -101,30 +101,30 @@
|
||||
{{
|
||||
(props.practitionerOption || []).find(
|
||||
(item) => item.value === localAuditForm.approverId
|
||||
)?.label || '暂无'
|
||||
)?.label || t('medicineStorage.common.none')
|
||||
}}
|
||||
</el-tag>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="form-item">
|
||||
<label class="form-label">审核日期</label>
|
||||
<label class="form-label">{{ $t('medicineStorage.common.auditDate') }}</label>
|
||||
<el-tag
|
||||
type="primary"
|
||||
plain
|
||||
>
|
||||
{{ parseTime(localAuditForm.approvalTime, '{y}-{m}-{d} {h}:{i}:{s}') || '暂无' }}
|
||||
{{ parseTime(localAuditForm.approvalTime, '{y}-{m}-{d} {h}:{i}:{s}') || t('medicineStorage.common.none') }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="form-item">
|
||||
<label class="form-label">审核状态:</label>
|
||||
<label class="form-label">{{ $t('medicineStorage.common.auditStatusLabel') }}</label>
|
||||
<el-tag
|
||||
:type="localAuditForm.statusEnum_enumText === '同意' ? 'success' : 'danger'"
|
||||
plain
|
||||
>
|
||||
{{ localAuditForm.statusEnum_enumText || '暂无' }}
|
||||
{{ localAuditForm.statusEnum_enumText || t('medicineStorage.common.none') }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</el-col>
|
||||
@@ -141,7 +141,7 @@
|
||||
icon="Plus"
|
||||
@click="handleAddRow"
|
||||
>
|
||||
添加行
|
||||
{{ $t('medicineStorage.common.addRow') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -152,7 +152,7 @@
|
||||
icon="Delete"
|
||||
@click="handleDeleteRow"
|
||||
>
|
||||
删除行
|
||||
{{ $t('medicineStorage.common.deleteRow') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -163,7 +163,7 @@
|
||||
icon="Check"
|
||||
@click="handleSave"
|
||||
>
|
||||
保存
|
||||
{{ $t('medicineStorage.common.save') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -193,7 +193,7 @@
|
||||
/>
|
||||
<vxe-column
|
||||
field="itemBusNo"
|
||||
title="编号"
|
||||
:title="$t('medicineStorage.common.itemCode')"
|
||||
fixed
|
||||
width="180"
|
||||
align="center"
|
||||
@@ -211,7 +211,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="itemName"
|
||||
title="品名"
|
||||
:title="$t('medicineStorage.common.itemName')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -243,7 +243,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="totalVolume"
|
||||
title="规格"
|
||||
:title="$t('medicineStorage.common.spec')"
|
||||
width="140"
|
||||
align="center"
|
||||
>
|
||||
@@ -285,7 +285,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="unitCode"
|
||||
title="单位"
|
||||
:title="$t('medicineStorage.common.unit')"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
@@ -315,7 +315,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="itemQuantity"
|
||||
title="现存数量"
|
||||
:title="$t('medicineStorage.common.quantity')"
|
||||
width="120"
|
||||
:rules="rules.itemQuantity"
|
||||
align="center"
|
||||
@@ -340,7 +340,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="price"
|
||||
title="进货价"
|
||||
:title="$t('medicineStorage.common.purchasePrice')"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
@@ -354,7 +354,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="totalPrice"
|
||||
title="进价金额"
|
||||
:title="$t('medicineStorage.common.purchaseAmount')"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
@@ -368,7 +368,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="retailPrice"
|
||||
title="当前销售价"
|
||||
:title="$t('medicineStorage.common.retailPrice')"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
@@ -385,7 +385,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="totalRetailPrice"
|
||||
title="当前销售金额"
|
||||
:title="$t('medicineStorage.common.retailAmount')"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
@@ -438,7 +438,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="supplierId_dictText"
|
||||
title="供应商"
|
||||
:title="$t('medicineStorage.common.supplier')"
|
||||
width="220"
|
||||
align="center"
|
||||
>
|
||||
@@ -455,7 +455,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="manufacturerText"
|
||||
title="厂家/产地"
|
||||
:title="$t('medicineStorage.common.manufacturer')"
|
||||
width="220"
|
||||
align="center"
|
||||
>
|
||||
@@ -472,7 +472,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="specificationInventory"
|
||||
title="规格库存"
|
||||
:title="$t('medicineStorage.common.specStock')"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
@@ -622,7 +622,7 @@
|
||||
<!-- 备注 -->
|
||||
<vxe-column
|
||||
field="remake"
|
||||
title="备注"
|
||||
:title="$t('medicineStorage.common.remark')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -640,7 +640,7 @@
|
||||
</vxe-column>
|
||||
<!-- 操作 -->
|
||||
<vxe-column
|
||||
title="操作"
|
||||
:title="$t('medicineStorage.common.operation')"
|
||||
width="100"
|
||||
fixed="right"
|
||||
>
|
||||
@@ -692,13 +692,15 @@
|
||||
|
||||
<script setup>
|
||||
import {addOrEditOrder, getBusNo} from './api';
|
||||
import {nextTick, ref, watch} from 'vue';
|
||||
import {computed, nextTick, ref, watch} from 'vue';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import medicineList from './medicineList.vue';
|
||||
import orderDialog from './orderDialog.vue';
|
||||
import PopoverList from '@/components/HealthLinkHis/popoverList/index.vue';
|
||||
import {parseTime} from '@/utils/his';
|
||||
import TraceNoDialog from '@/components/HealthLinkHis/TraceNoDialog/index.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
// 获取当前实例
|
||||
const { proxy } = getCurrentInstance();
|
||||
// 调用父组件方法
|
||||
@@ -840,17 +842,17 @@ const localIsAddOrEditOrder = ref({
|
||||
isEditOrder: false,
|
||||
});
|
||||
// 验证规则
|
||||
const rules = {
|
||||
// busNo: [{ required: true, message: '请输入单据号', trigger: 'blur' }],
|
||||
supplierId: [{ required: true, message: '请输入供应商', trigger: 'blur' }],
|
||||
applicantId: [{ required: true, message: '请输入采购员', trigger: 'blur' }],
|
||||
categoryEnum: [{ required: true, message: '请输入单据类型', trigger: 'blur' }],
|
||||
applyTime: [{ required: true, message: '请输入开单日期', trigger: 'blur' }],
|
||||
itemBusNo: [{ required: true, message: '请输入编号', trigger: ['blur', 'change'] }],
|
||||
itemName: [{ required: true, message: '请输入品名', trigger: 'blur' }],
|
||||
totalVolume: [{ required: true, message: '请输入规格', trigger: 'blur' }],
|
||||
unitCode: [{ required: true, message: '请输入单位', trigger: 'blur' }],
|
||||
itemQuantity: [{ required: true, message: '请输入现存数量', trigger: 'blur' }],
|
||||
const rules = computed(() => ({
|
||||
// busNo: [{ required: true, message: t('medicineStorage.common.documentNo'), trigger: 'blur' }],
|
||||
supplierId: [{ required: true, message: t('medicineStorage.common.supplierLabel'), trigger: 'blur' }],
|
||||
applicantId: [{ required: true, message: t('medicineStorage.common.purchaserLabel'), trigger: 'blur' }],
|
||||
categoryEnum: [{ required: true, message: t('medicineStorage.common.documentType'), trigger: 'blur' }],
|
||||
applyTime: [{ required: true, message: t('medicineStorage.common.orderDate'), trigger: 'blur' }],
|
||||
itemBusNo: [{ required: true, message: t('medicineStorage.common.itemCode'), trigger: ['blur', 'change'] }],
|
||||
itemName: [{ required: true, message: t('medicineStorage.common.itemName'), trigger: 'blur' }],
|
||||
totalVolume: [{ required: true, message: t('medicineStorage.common.spec'), trigger: 'blur' }],
|
||||
unitCode: [{ required: true, message: t('medicineStorage.common.unit'), trigger: 'blur' }],
|
||||
itemQuantity: [{ required: true, message: t('medicineStorage.common.quantity'), trigger: 'blur' }],
|
||||
lotNumber: [{ required: true, message: '请输入产品批号', trigger: 'blur' }],
|
||||
purposeLocationId: [{ required: true, message: '请选择', trigger: 'blur' }],
|
||||
startTime: [
|
||||
@@ -895,22 +897,22 @@ const rules = {
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
packagingConditionEnum: [{ required: true, message: '请输入包装情况', trigger: 'blur' }],
|
||||
acceptanceResultEnum: [{ required: true, message: '请选择验收结果', trigger: 'blur' }],
|
||||
packagingConditionEnum: [{ required: true, message: t('medicineStorage.common.packagingCondition'), trigger: 'blur' }],
|
||||
acceptanceResultEnum: [{ required: true, message: t('medicineStorage.common.acceptanceResult'), trigger: 'blur' }],
|
||||
batchInventory: [{ required: true, message: '请输入批次库存', trigger: 'blur' }],
|
||||
traceNo: [{ required: true, message: '请输入药品追溯码', trigger: 'blur' }],
|
||||
traceNoUnitCode: [{ required: true, message: '请输入药品追溯码单位', trigger: 'blur' }],
|
||||
phone: [{ required: true, message: '请输入供应商联系人', trigger: 'blur' }],
|
||||
practitionerId: [{ required: true, message: '请输入开单人', trigger: 'blur' }],
|
||||
invoiceNo: [{ required: true, message: '请输入发票号', trigger: 'blur' }],
|
||||
// price: [{ required: true, message: '请输入进货价', trigger: 'blur' }],
|
||||
// totalPrice: [{ required: true, message: '请输入进价金额', trigger: 'blur' }],
|
||||
// retailPrice: [{ required: true, message: '请输入销售价', trigger: 'blur' }],
|
||||
// totalRetailPrice: [{ required: true, message: '请输入销售金额', trigger: 'blur' }],
|
||||
manufacturerText: [{ required: true, message: '请输入厂家/产地', trigger: 'blur' }],
|
||||
specificationInventory: [{ required: true, message: '请输入规格库存', trigger: 'blur' }],
|
||||
approvalNumber: [{ required: true, message: '请输入批注文号', trigger: 'blur' }],
|
||||
};
|
||||
phone: [{ required: true, message: t('medicineStorage.common.supplierContact'), trigger: 'blur' }],
|
||||
practitionerId: [{ required: true, message: t('medicineStorage.common.orderMaker'), trigger: 'blur' }],
|
||||
invoiceNo: [{ required: true, message: t('medicineStorage.common.invoiceNo'), trigger: 'blur' }],
|
||||
// price: [{ required: true, message: t('medicineStorage.common.purchasePrice'), trigger: 'blur' }],
|
||||
// totalPrice: [{ required: true, message: t('medicineStorage.common.purchaseAmount'), trigger: 'blur' }],
|
||||
// retailPrice: [{ required: true, message: t('medicineStorage.common.retailPrice'), trigger: 'blur' }],
|
||||
// totalRetailPrice: [{ required: true, message: t('medicineStorage.common.retailAmount'), trigger: 'blur' }],
|
||||
manufacturerText: [{ required: true, message: t('medicineStorage.common.manufacturer'), trigger: 'blur' }],
|
||||
specificationInventory: [{ required: true, message: t('medicineStorage.common.specStock'), trigger: 'blur' }],
|
||||
approvalNumber: [{ required: true, message: t('medicineStorage.common.approvalNo'), trigger: 'blur' }],
|
||||
}));
|
||||
// 药品名称
|
||||
const ypName = ref('');
|
||||
// 药品追溯码
|
||||
@@ -1441,7 +1443,7 @@ const handleAddRow = async () => {
|
||||
|
||||
// 如果有数据,检查是否有空行
|
||||
if (isEmptyRow()) {
|
||||
proxy.$message.error('请填写完整信息');
|
||||
proxy.$message.error(t('medicineStorage.common.pleaseFillComplete'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1493,9 +1495,9 @@ const handleSave = async () => {
|
||||
const currentFormData = JSON.parse(JSON.stringify(localForm.value));
|
||||
|
||||
// 是否确认保存数据
|
||||
const isConfirm = await proxy.$modal.confirm('确认保存数据吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
const isConfirm = await proxy.$modal.confirm(t('medicineStorage.common.confirmSave'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
});
|
||||
if (!isConfirm) {
|
||||
@@ -1511,7 +1513,7 @@ const handleSave = async () => {
|
||||
if (localIsAddOrEditOrder.value.isAddOrder) {
|
||||
addOrEditOrder(editData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$message.success('新增成功');
|
||||
proxy.$message.success(t('medicineStorage.common.addSuccess'));
|
||||
// 调用父组件的 getList 方法
|
||||
emit('getList');
|
||||
// 清空表单
|
||||
@@ -1523,13 +1525,13 @@ const handleSave = async () => {
|
||||
} else if (localIsAddOrEditOrder.value.isEditOrder) {
|
||||
addOrEditOrder(editData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$message.success('保存成功');
|
||||
proxy.$message.success(t('medicineStorage.common.saveSuccess'));
|
||||
// 调用父组件的 getList 方法
|
||||
emit('getList');
|
||||
// 清空表单
|
||||
resetAllData();
|
||||
} else {
|
||||
proxy.$message.error('保存失败');
|
||||
proxy.$message.error(t('medicineStorage.common.saveFailed'));
|
||||
}
|
||||
// 关闭加载
|
||||
loading.value = false;
|
||||
@@ -1616,14 +1618,14 @@ const resetAllData = () => {
|
||||
// 删除行
|
||||
const handleDeleteRow = () => {
|
||||
if (selectedRows.value.length === 0) {
|
||||
proxy.$message.warning('请选择要删除的行');
|
||||
proxy.$message.warning(t('medicineStorage.common.pleaseSelectDeleteRow'));
|
||||
return;
|
||||
}
|
||||
|
||||
proxy
|
||||
.$confirm('确认删除选中的行吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
.$confirm(t('medicineStorage.common.confirmDeleteRow'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
@@ -1678,7 +1680,7 @@ const handleDeleteRow = () => {
|
||||
});
|
||||
}
|
||||
|
||||
proxy.$message.success('删除成功');
|
||||
proxy.$message.success(t('medicineStorage.common.deleteSuccess'));
|
||||
})
|
||||
.catch(() => {
|
||||
// 用户取消删除
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
:disabled="isAddDisabled"
|
||||
@click="handleAdd"
|
||||
>
|
||||
新增
|
||||
{{ $t('medicineStorage.common.add') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
@@ -38,7 +38,7 @@
|
||||
:disabled="isDeleteDisabled"
|
||||
@click="handleDelete"
|
||||
>
|
||||
删除
|
||||
{{ $t('medicineStorage.common.delete') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -50,7 +50,7 @@
|
||||
:disabled="isCancelDisabled"
|
||||
@click="handleCancel"
|
||||
>
|
||||
取消
|
||||
{{ $t('medicineStorage.common.cancel') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -62,7 +62,7 @@
|
||||
:disabled="isAuditDisabled"
|
||||
@click="handleAudit"
|
||||
>
|
||||
审核
|
||||
{{ $t('medicineStorage.common.audit') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -84,12 +84,12 @@
|
||||
:rules="rules"
|
||||
>
|
||||
<el-form-item
|
||||
label="库房:"
|
||||
:label="$t('medicineStorage.common.warehouse') + ':'"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-select
|
||||
v-model="tableForm.locationId"
|
||||
placeholder="请选择库房"
|
||||
:placeholder="$t('medicineStorage.common.pleaseSelectWarehouse')"
|
||||
clearable
|
||||
filterable
|
||||
@change="handleLocationChange(tableForm.locationId)"
|
||||
@@ -114,12 +114,12 @@
|
||||
@submit.prevent
|
||||
>
|
||||
<el-form-item
|
||||
label="单据搜索"
|
||||
:label="$t('medicineStorage.common.documentSearch')"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入单据号"
|
||||
:placeholder="$t('medicineStorage.common.enterDocumentNo')"
|
||||
clearable
|
||||
@keyup.enter="getList"
|
||||
>
|
||||
@@ -162,14 +162,14 @@
|
||||
<el-icon class="info-icon">
|
||||
<User />
|
||||
</el-icon>
|
||||
<span class="label">采购员:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.purchaser') }}:</span>
|
||||
<span class="value">{{ item.applicantId_dictText }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<el-icon class="info-icon">
|
||||
<User />
|
||||
</el-icon>
|
||||
<span class="label">审核状态:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.auditStatus') }}:</span>
|
||||
<el-tag
|
||||
v-if="item.statusEnum_enumText === '同意'"
|
||||
type="success"
|
||||
@@ -187,14 +187,14 @@
|
||||
<el-icon class="info-icon">
|
||||
<Files />
|
||||
</el-icon>
|
||||
<span class="label">单据类型:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.documentType') }}:</span>
|
||||
<span class="value">{{ item.typeEnum_enumText }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<el-icon class="info-icon">
|
||||
<Calendar />
|
||||
</el-icon>
|
||||
<span class="label">单据日期:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.documentDate') }}:</span>
|
||||
<span class="value">{{
|
||||
parseTime(item.applyTime, '{y}-{m}-{d} {h}:{i}:{s}')
|
||||
}}</span>
|
||||
@@ -210,14 +210,14 @@
|
||||
class="empty-state"
|
||||
>
|
||||
<el-empty
|
||||
description="暂无单据"
|
||||
:description="$t('medicineStorage.common.noDocuments')"
|
||||
:image-size="80"
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleAdd"
|
||||
>
|
||||
新增单据
|
||||
{{ $t('medicineStorage.common.addDocument') }}
|
||||
</el-button>
|
||||
</el-empty>
|
||||
</div>
|
||||
@@ -258,13 +258,15 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {ref} from 'vue';
|
||||
import {computed, ref} from 'vue';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import {useRoute, useRouter} from 'vue-router';
|
||||
import orderTable from './components/orderTable.vue';
|
||||
import {agreeApproval, deleteOrder, getInit, getOrderDetail, getOrderList,} from './components/api';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import {parseTime} from '@/utils/his';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
@@ -343,9 +345,9 @@ const buttonShow = ref({
|
||||
isSaveShow: false,
|
||||
isEditShow: false,
|
||||
});
|
||||
const rules = ref({
|
||||
locationId: [{ required: true, message: '请选择库房', trigger: 'blur' }],
|
||||
});
|
||||
const rules = computed(() => ({
|
||||
locationId: [{ required: true, message: t('medicineStorage.common.pleaseSelectWarehouse'), trigger: 'blur' }],
|
||||
}));
|
||||
|
||||
// 初始化 获取下拉列表
|
||||
const init = async () => {
|
||||
@@ -383,7 +385,7 @@ const handleAdd = async () => {
|
||||
resetFormAndTableData();
|
||||
// 校验库房ID
|
||||
if (!tableForm.value.locationId) {
|
||||
proxy.$modal.msgWarning('新增单据前,请选择库房');
|
||||
proxy.$modal.msgWarning(t('medicineStorage.common.pleaseSelectWarehouse'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -448,7 +450,7 @@ const handleEdit = async (order) => {
|
||||
resetFormAndTableData();
|
||||
|
||||
if (!selectedOrder.value) {
|
||||
proxy.$modal.msgError('请选择要编辑的单据');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.pleaseSelectEdit'));
|
||||
return;
|
||||
}
|
||||
const res = await getOrderDetail({
|
||||
@@ -754,26 +756,26 @@ const clearForm = () => {
|
||||
// 删除按钮
|
||||
const handleDelete = async () => {
|
||||
if (!selectedOrder.value) {
|
||||
proxy.$modal.msgError('请选择要删除的单据');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.pleaseSelectDelete'));
|
||||
return;
|
||||
}
|
||||
|
||||
// 校验是否可以删除(已审批的单据不能删除)
|
||||
if (selectedOrder.value.statusEnum_enumText === '同意' || selectedOrder.value.statusEnum === 3) {
|
||||
proxy.$modal.msgError('已审批的单据不能删除');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.approvedCannotDelete'));
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await proxy.$modal.confirm('确认删除该采购单吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
await proxy.$modal.confirm(t('medicineStorage.common.confirmDelete'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
});
|
||||
|
||||
// 删除单据
|
||||
await deleteOrder(selectedOrder.value.supplyBusNo);
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
proxy.$modal.msgSuccess(t('medicineStorage.common.deleteSuccess'));
|
||||
// 清空右侧表格数据
|
||||
clearForm();
|
||||
// 重新获取列表 库房ID
|
||||
@@ -806,7 +808,7 @@ const handleDelete = async () => {
|
||||
});
|
||||
} catch (error) {
|
||||
if (error !== 'cancel') {
|
||||
proxy.$modal.msgError('删除失败');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.deleteFailed'));
|
||||
console.error('删除失败:', error);
|
||||
}
|
||||
}
|
||||
@@ -814,26 +816,26 @@ const handleDelete = async () => {
|
||||
// 审核按钮
|
||||
const handleAudit = async () => {
|
||||
if (!selectedOrder.value) {
|
||||
proxy.$modal.msgError('请选择要审核的单据');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.pleaseSelectAudit'));
|
||||
return;
|
||||
}
|
||||
|
||||
// 校验是否是已审批状态
|
||||
if (selectedOrder.value.statusEnum_enumText === '同意' || selectedOrder.value.statusEnum === 3) {
|
||||
proxy.$modal.msgError('该单据已审批,不能重复审批');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.approvedCannotAudit'));
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await proxy.$modal.confirm('确认同意该采购单吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
await proxy.$modal.confirm(t('medicineStorage.common.confirmAudit'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
});
|
||||
|
||||
// 同意审批
|
||||
await agreeApproval(selectedOrder.value.supplyBusNo);
|
||||
proxy.$modal.msgSuccess('同意审批成功');
|
||||
proxy.$modal.msgSuccess(t('medicineStorage.common.auditSuccess'));
|
||||
// 编辑
|
||||
handleEdit(selectedOrder.value);
|
||||
// 重新获取列表
|
||||
@@ -866,7 +868,7 @@ const handleAudit = async () => {
|
||||
});
|
||||
} catch (error) {
|
||||
if (error !== 'cancel') {
|
||||
proxy.$modal.msgError('同意审批失败');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.auditFailed'));
|
||||
console.error('同意审批失败:', error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div>
|
||||
<vxe-table
|
||||
ref="medicineRef"
|
||||
@@ -7,54 +7,54 @@
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<vxe-column
|
||||
title="项目编码"
|
||||
:title="$t('medicineStorage.purchaseOrder.itemCode')"
|
||||
align="center"
|
||||
field="busNo"
|
||||
width="150"
|
||||
/>
|
||||
<vxe-column
|
||||
title="项目名称"
|
||||
:title="$t('medicineStorage.purchaseOrder.itemName')"
|
||||
align="center"
|
||||
field="name"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
title="进货价"
|
||||
:title="$t('medicineStorage.purchaseOrder.purchasePrice')"
|
||||
align="center"
|
||||
field="price"
|
||||
/>
|
||||
<vxe-column
|
||||
title="零售价"
|
||||
:title="$t('medicineStorage.purchaseOrder.retailPrice')"
|
||||
align="center"
|
||||
field="retailPrice"
|
||||
/>
|
||||
<vxe-column
|
||||
title="包装单位"
|
||||
:title="$t('medicineStorage.purchaseOrder.packUnit')"
|
||||
align="center"
|
||||
field="unitCode_dictText"
|
||||
/>
|
||||
<vxe-column
|
||||
title="最小单位"
|
||||
:title="$t('medicineStorage.purchaseOrder.minUnit')"
|
||||
align="center"
|
||||
field="minUnitCode_dictText"
|
||||
/>
|
||||
<vxe-column
|
||||
title="规格"
|
||||
:title="$t('medicineStorage.purchaseOrder.spec')"
|
||||
align="center"
|
||||
field="totalVolume"
|
||||
/>
|
||||
<vxe-column
|
||||
title="规格库存"
|
||||
:title="$t('medicineStorage.purchaseOrder.specStock')"
|
||||
align="center"
|
||||
field="specificationInventory"
|
||||
/>
|
||||
<vxe-column
|
||||
title="生产厂家"
|
||||
:title="$t('medicineStorage.purchaseOrder.manufacturer')"
|
||||
align="center"
|
||||
field="manufacturerText"
|
||||
/>
|
||||
<vxe-column
|
||||
title="批准文号"
|
||||
:title="$t('medicineStorage.purchaseOrder.approvalNo')"
|
||||
align="center"
|
||||
field="approvalNumber"
|
||||
/>
|
||||
@@ -65,8 +65,11 @@
|
||||
<script setup>
|
||||
import {getMedicineList} from './api';
|
||||
import {watch} from 'vue';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import {throttle} from 'lodash-es';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
type: String,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div>
|
||||
<el-row :gutter="10">
|
||||
<el-form
|
||||
@@ -10,7 +10,7 @@
|
||||
>
|
||||
<el-row :gutter="10">
|
||||
<el-form-item
|
||||
label="单据号"
|
||||
:label="$t('medicineStorage.common.documentNo')"
|
||||
prop="busNo"
|
||||
>
|
||||
<el-input
|
||||
@@ -21,12 +21,12 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="开单日期"
|
||||
:label="$t('medicineStorage.common.orderDate')"
|
||||
prop="applyTime"
|
||||
>
|
||||
<el-date-picker
|
||||
v-model="localForm.applyTime"
|
||||
placeholder="请选择开单日期"
|
||||
:placeholder="$t('medicineStorage.common.selectOrderDate')"
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
@@ -35,12 +35,12 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
label="供应商"
|
||||
:label="$t('medicineStorage.common.supplierLabel')"
|
||||
prop="supplierId"
|
||||
>
|
||||
<el-select
|
||||
v-model="localForm.supplierId"
|
||||
placeholder="请输入供应商"
|
||||
:placeholder="$t('medicineStorage.common.selectSupplier')"
|
||||
style="width: 180px"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
clearable
|
||||
@@ -54,12 +54,12 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="采购员"
|
||||
:label="$t('medicineStorage.common.purchaserLabel')"
|
||||
prop="applicantId"
|
||||
>
|
||||
<el-select
|
||||
v-model="localForm.applicantId"
|
||||
placeholder="请输入采购员"
|
||||
:placeholder="$t('medicineStorage.common.selectPurchaser')"
|
||||
style="width: 140px"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
clearable
|
||||
@@ -73,12 +73,12 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="单据分类"
|
||||
:label="$t('medicineStorage.common.categoryLabel')"
|
||||
prop="categoryEnum"
|
||||
>
|
||||
<el-select
|
||||
v-model="localForm.categoryEnum"
|
||||
placeholder="请输入单据分类"
|
||||
:placeholder="$t('medicineStorage.common.selectCategory')"
|
||||
style="width: 140px"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
clearable
|
||||
@@ -92,13 +92,13 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="摘要(A)"
|
||||
:label="$t('medicineStorage.common.summary') + '(A)'"
|
||||
prop="reason"
|
||||
>
|
||||
<el-input
|
||||
v-model="localForm.reason"
|
||||
type="textarea"
|
||||
placeholder="请输入摘要"
|
||||
:placeholder="$t('medicineStorage.common.enterSummary')"
|
||||
style="width: 300px"
|
||||
:rows="1"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
@@ -112,7 +112,7 @@
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<div class="form-item">
|
||||
<label class="form-label">审核人</label>
|
||||
<label class="form-label">{{ $t('medicineStorage.common.auditor') }}</label>
|
||||
<el-tag
|
||||
type="warning"
|
||||
plain
|
||||
@@ -120,25 +120,25 @@
|
||||
{{
|
||||
(props.practitionerOption || []).find(
|
||||
(item) => item.value === localAuditForm.approverId
|
||||
)?.label || '暂无'
|
||||
)?.label || $t('medicineStorage.common.none')
|
||||
}}
|
||||
</el-tag>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="form-item">
|
||||
<label class="form-label">审核日期</label>
|
||||
<label class="form-label">{{ $t('medicineStorage.common.auditDate') }}</label>
|
||||
<el-tag
|
||||
type="primary"
|
||||
plain
|
||||
>
|
||||
{{ parseTime(localAuditForm.approvalTime, '{y}-{m}-{d} {h}:{i}:{s}') || '暂无' }}
|
||||
{{ parseTime(localAuditForm.approvalTime, '{y}-{m}-{d} {h}:{i}:{s}') || $t('medicineStorage.common.none') }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="form-item">
|
||||
<label class="form-label">审核状态:</label>
|
||||
<label class="form-label">{{ $t('medicineStorage.common.auditStatusLabel') }}:</label>
|
||||
<el-tag
|
||||
:type="localAuditForm.statusEnum_enumText === '同意' ? 'success' : 'danger'"
|
||||
plain
|
||||
@@ -160,7 +160,7 @@
|
||||
icon="Plus"
|
||||
@click="handleAddRow"
|
||||
>
|
||||
添加行
|
||||
{{ $t('medicineStorage.common.addRow') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -171,7 +171,7 @@
|
||||
icon="Delete"
|
||||
@click="handleDeleteRow"
|
||||
>
|
||||
删除行
|
||||
{{ $t('medicineStorage.common.deleteRow') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -182,7 +182,7 @@
|
||||
icon="Check"
|
||||
@click="handleSave"
|
||||
>
|
||||
保存
|
||||
{{ $t('medicineStorage.common.save') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -193,7 +193,7 @@
|
||||
icon="Warning"
|
||||
@click="handleAlertOrder"
|
||||
>
|
||||
警戒订货
|
||||
{{ $t('medicineStorage.common.alertOrder') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -222,7 +222,7 @@
|
||||
/>
|
||||
<vxe-column
|
||||
field="itemBusNo"
|
||||
title="编号"
|
||||
:title="$t('medicineStorage.common.itemCode')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -239,7 +239,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="itemName"
|
||||
title="品名"
|
||||
:title="$t('medicineStorage.common.itemName')"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -269,7 +269,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="totalVolume"
|
||||
title="规格"
|
||||
:title="$t('medicineStorage.common.spec')"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -285,7 +285,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="unitCode"
|
||||
title="单位"
|
||||
:title="$t('medicineStorage.common.unit')"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -314,7 +314,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="itemQuantity"
|
||||
title="数量"
|
||||
:title="$t('medicineStorage.common.quantity')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -338,7 +338,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="price"
|
||||
title="进货价"
|
||||
:title="$t('medicineStorage.common.purchasePrice')"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -351,7 +351,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="totalPrice"
|
||||
title="进价金额"
|
||||
:title="$t('medicineStorage.common.purchaseAmount')"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -364,7 +364,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="retailPrice"
|
||||
title="销售价"
|
||||
:title="$t('medicineStorage.common.retailPrice')"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -380,7 +380,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="totalRetailPrice"
|
||||
title="销售金额"
|
||||
:title="$t('medicineStorage.common.retailAmount')"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -396,7 +396,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="manufacturerText"
|
||||
title="厂家/产地"
|
||||
:title="$t('medicineStorage.common.manufacturer')"
|
||||
width="200"
|
||||
align="center"
|
||||
>
|
||||
@@ -413,7 +413,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="specificationInventory"
|
||||
title="规格库存"
|
||||
:title="$t('medicineStorage.common.specStock')"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -448,7 +448,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="approvalNumber"
|
||||
title="批注文号"
|
||||
:title="$t('medicineStorage.common.approvalNo')"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -464,7 +464,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="remake"
|
||||
title="备注"
|
||||
:title="$t('medicineStorage.common.remark')"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -503,11 +503,14 @@
|
||||
|
||||
<script setup>
|
||||
import {addOrEditOrder, getBusNo, getMedicineList} from './api';
|
||||
import {nextTick, ref, watch} from 'vue';
|
||||
import {computed, nextTick, ref, watch} from 'vue';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import medicineList from './medicineList.vue';
|
||||
import PopoverList from '@/components/HealthLinkHis/popoverList/index.vue';
|
||||
import {parseTime} from '@/utils/his';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
// 获取当前实例
|
||||
const { proxy } = getCurrentInstance();
|
||||
// 调用父组件方法
|
||||
@@ -687,25 +690,25 @@ const localIsAddOrEditOrder = ref({
|
||||
isEditOrder: false,
|
||||
});
|
||||
// 验证规则
|
||||
const rules = {
|
||||
// busNo: [{ required: true, message: '请输入单据号', trigger: 'blur' }],
|
||||
supplierId: [{ required: true, message: '请输入供应商', trigger: 'blur' }],
|
||||
applicantId: [{ required: true, message: '请输入采购员', trigger: 'blur' }],
|
||||
categoryEnum: [{ required: true, message: '请输入单据类型', trigger: 'blur' }],
|
||||
applyTime: [{ required: true, message: '请输入开单日期', trigger: 'blur' }],
|
||||
itemBusNo: [{ required: true, message: '请输入编号', trigger: ['blur', 'change'] }],
|
||||
itemName: [{ required: true, message: '请输入品名', trigger: 'blur' }],
|
||||
totalVolume: [{ required: true, message: '请输入规格', trigger: 'blur' }],
|
||||
unitCode: [{ required: true, message: '请输入单位', trigger: 'blur' }],
|
||||
itemQuantity: [{ required: true, message: '请输入数量', trigger: 'blur' }],
|
||||
// price: [{ required: true, message: '请输入进货价', trigger: 'blur' }],
|
||||
// totalPrice: [{ required: true, message: '请输入进价金额', trigger: 'blur' }],
|
||||
// retailPrice: [{ required: true, message: '请输入销售价', trigger: 'blur' }],
|
||||
// totalRetailPrice: [{ required: true, message: '请输入销售金额', trigger: 'blur' }],
|
||||
manufacturerText: [{ required: true, message: '请输入厂家/产地', trigger: 'blur' }],
|
||||
specificationInventory: [{ required: true, message: '请输入规格库存', trigger: 'blur' }],
|
||||
approvalNumber: [{ required: true, message: '请输入批注文号', trigger: 'blur' }],
|
||||
};
|
||||
const rules = computed(() => ({
|
||||
// busNo: [{ required: true, message: t('medicineStorage.common.pleaseFillComplete'), trigger: 'blur' }],
|
||||
supplierId: [{ required: true, message: t('medicineStorage.common.selectSupplier'), trigger: 'blur' }],
|
||||
applicantId: [{ required: true, message: t('medicineStorage.common.selectPurchaser'), trigger: 'blur' }],
|
||||
categoryEnum: [{ required: true, message: t('medicineStorage.common.selectCategory'), trigger: 'blur' }],
|
||||
applyTime: [{ required: true, message: t('medicineStorage.common.selectOrderDate'), trigger: 'blur' }],
|
||||
itemBusNo: [{ required: true, message: t('medicineStorage.common.pleaseFillComplete'), trigger: ['blur', 'change'] }],
|
||||
itemName: [{ required: true, message: t('medicineStorage.common.pleaseFillComplete'), trigger: 'blur' }],
|
||||
totalVolume: [{ required: true, message: t('medicineStorage.common.pleaseFillComplete'), trigger: 'blur' }],
|
||||
unitCode: [{ required: true, message: t('medicineStorage.common.pleaseFillComplete'), trigger: 'blur' }],
|
||||
itemQuantity: [{ required: true, message: t('medicineStorage.common.pleaseFillComplete'), trigger: 'blur' }],
|
||||
// price: [{ required: true, message: t('medicineStorage.common.pleaseFillComplete'), trigger: 'blur' }],
|
||||
// totalPrice: [{ required: true, message: t('medicineStorage.common.pleaseFillComplete'), trigger: 'blur' }],
|
||||
// retailPrice: [{ required: true, message: t('medicineStorage.common.pleaseFillComplete'), trigger: 'blur' }],
|
||||
// totalRetailPrice: [{ required: true, message: t('medicineStorage.common.pleaseFillComplete'), trigger: 'blur' }],
|
||||
manufacturerText: [{ required: true, message: t('medicineStorage.common.pleaseFillComplete'), trigger: 'blur' }],
|
||||
specificationInventory: [{ required: true, message: t('medicineStorage.common.pleaseFillComplete'), trigger: 'blur' }],
|
||||
approvalNumber: [{ required: true, message: t('medicineStorage.common.pleaseFillComplete'), trigger: 'blur' }],
|
||||
}));
|
||||
// 监听 props.isAddOrEditOrder 的变化
|
||||
watch(
|
||||
() => props.isAddOrEditOrder,
|
||||
@@ -1016,7 +1019,7 @@ const handleAddRow = async () => {
|
||||
|
||||
// 如果有数据,检查是否有空行
|
||||
if (isEmptyRow()) {
|
||||
proxy.$message.error('请填写完整信息');
|
||||
proxy.$message.error(t('medicineStorage.common.pleaseFillComplete'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1050,7 +1053,7 @@ const handleAlertOrder = async () => {
|
||||
localTableData.value = [];
|
||||
// 验证表单
|
||||
if (!localForm.value.supplierId || !localForm.value.locationId) {
|
||||
proxy.$message.warning('请选择供应商和仓库');
|
||||
proxy.$message.warning(t('medicineStorage.common.pleaseSelectSupplierAndWarehouse'));
|
||||
return;
|
||||
}
|
||||
// 获取药品列表
|
||||
@@ -1181,7 +1184,7 @@ const getMedicineListData = async () => {
|
||||
});
|
||||
// 如果 res.data?.records 为空,则返回空数组
|
||||
if (res.data.records.length === 0) {
|
||||
proxy.$message.warning('本仓库和供应商没有找到药品信息');
|
||||
proxy.$message.warning(t('medicineStorage.common.noMedicineFound'));
|
||||
return [];
|
||||
}
|
||||
// 更新分页数据
|
||||
@@ -1212,9 +1215,9 @@ const handleSave = async () => {
|
||||
const currentFormData = JSON.parse(JSON.stringify(localForm.value));
|
||||
|
||||
// 是否确认保存数据
|
||||
const isConfirm = await proxy.$modal.confirm('确认保存数据吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
const isConfirm = await proxy.$modal.confirm(t('medicineStorage.common.confirmSave'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
});
|
||||
if (!isConfirm) {
|
||||
@@ -1230,7 +1233,7 @@ const handleSave = async () => {
|
||||
if (localIsAddOrEditOrder.value.isAddOrder) {
|
||||
addOrEditOrder(editData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$message.success('新增成功');
|
||||
proxy.$message.success(t('medicineStorage.common.addSuccess'));
|
||||
// 调用父组件的 getList 方法
|
||||
emit('getList');
|
||||
// 清空表单
|
||||
@@ -1244,7 +1247,7 @@ const handleSave = async () => {
|
||||
} else if (localIsAddOrEditOrder.value.isEditOrder) {
|
||||
addOrEditOrder(editData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$message.success('保存成功');
|
||||
proxy.$message.success(t('medicineStorage.common.saveSuccess'));
|
||||
// 调用父组件的 getList 方法
|
||||
emit('getList');
|
||||
// 清空表单
|
||||
@@ -1252,7 +1255,7 @@ const handleSave = async () => {
|
||||
// 清空 父组件 tableFormRef 表单数据
|
||||
emit('clearForm');
|
||||
} else {
|
||||
proxy.$message.error('保存失败');
|
||||
proxy.$message.error(t('medicineStorage.common.saveFailed'));
|
||||
}
|
||||
// 关闭加载
|
||||
loading.value = false;
|
||||
@@ -1337,14 +1340,14 @@ const resetAllData = () => {
|
||||
// 删除行
|
||||
const handleDeleteRow = () => {
|
||||
if (selectedRows.value.length === 0) {
|
||||
proxy.$message.warning('请选择要删除的行');
|
||||
proxy.$message.warning(t('medicineStorage.common.pleaseSelectDeleteRow'));
|
||||
return;
|
||||
}
|
||||
|
||||
proxy
|
||||
.$confirm('确认删除选中的行吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
.$confirm(t('medicineStorage.common.confirmDeleteRow'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
@@ -1399,7 +1402,7 @@ const handleDeleteRow = () => {
|
||||
});
|
||||
}
|
||||
|
||||
proxy.$message.success('删除成功');
|
||||
proxy.$message.success(t('medicineStorage.common.deleteSuccess'));
|
||||
})
|
||||
.catch(() => {
|
||||
// 用户取消删除
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
:disabled="isAddDisabled"
|
||||
@click="handleAdd"
|
||||
>
|
||||
新增
|
||||
{{ $t('medicineStorage.common.add') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
@@ -38,7 +38,7 @@
|
||||
:disabled="isDeleteDisabled"
|
||||
@click="handleDelete"
|
||||
>
|
||||
删除
|
||||
{{ $t('medicineStorage.common.delete') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -50,7 +50,7 @@
|
||||
:disabled="isCancelDisabled"
|
||||
@click="handleCancel"
|
||||
>
|
||||
取消
|
||||
{{ $t('medicineStorage.common.cancel') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -62,7 +62,7 @@
|
||||
:disabled="isAuditDisabled"
|
||||
@click="handleAudit"
|
||||
>
|
||||
审核
|
||||
{{ $t('medicineStorage.common.audit') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -84,12 +84,12 @@
|
||||
:rules="rules"
|
||||
>
|
||||
<el-form-item
|
||||
label="库房:"
|
||||
:label="$t('medicineStorage.common.warehouse') + ':'"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-select
|
||||
v-model="tableForm.locationId"
|
||||
placeholder="请选择库房"
|
||||
:placeholder="$t('medicineStorage.common.pleaseSelectWarehouse')"
|
||||
clearable
|
||||
filterable
|
||||
@change="handleLocationChange(tableForm.locationId)"
|
||||
@@ -114,12 +114,12 @@
|
||||
@submit.prevent
|
||||
>
|
||||
<el-form-item
|
||||
label="单据搜索"
|
||||
:label="$t('medicineStorage.common.documentSearch')"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入单据号"
|
||||
:placeholder="$t('medicineStorage.common.enterDocumentNo')"
|
||||
clearable
|
||||
@keyup.enter="getList"
|
||||
>
|
||||
@@ -144,7 +144,7 @@
|
||||
:disabled="isAddDisabled"
|
||||
@click="handleAdd"
|
||||
>
|
||||
新增单据
|
||||
{{ $t('medicineStorage.common.addDocument') }}
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
@@ -176,21 +176,21 @@
|
||||
<el-icon class="info-icon">
|
||||
<User />
|
||||
</el-icon>
|
||||
<span class="label">采购员:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.purchaser') }}:</span>
|
||||
<span class="value">{{ item.applicantId_dictText }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<el-icon class="info-icon">
|
||||
<Shop />
|
||||
</el-icon>
|
||||
<span class="label">供应商:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.supplier') }}:</span>
|
||||
<span class="value">{{ item.supplierId_dictText }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<el-icon class="info-icon">
|
||||
<User />
|
||||
</el-icon>
|
||||
<span class="label">审核状态:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.auditStatus') }}:</span>
|
||||
<el-tag
|
||||
v-if="item.statusEnum_enumText === '同意'"
|
||||
type="success"
|
||||
@@ -208,14 +208,14 @@
|
||||
<el-icon class="info-icon">
|
||||
<Files />
|
||||
</el-icon>
|
||||
<span class="label">单据类型:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.documentType') }}:</span>
|
||||
<span class="value">{{ item.typeEnum_enumText }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<el-icon class="info-icon">
|
||||
<Calendar />
|
||||
</el-icon>
|
||||
<span class="label">单据日期:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.documentDate') }}:</span>
|
||||
<span class="value">{{
|
||||
parseTime(item.applyTime, '{y}-{m}-{d} {h}:{i}:{s}')
|
||||
}}</span>
|
||||
@@ -231,7 +231,7 @@
|
||||
class="empty-state"
|
||||
>
|
||||
<el-empty
|
||||
description="暂无单据"
|
||||
:description="$t('medicineStorage.common.noDocuments')"
|
||||
:image-size="80"
|
||||
>
|
||||
<!-- 空状态下不再显示新增单据按钮,因为已在上方固定位置显示 -->
|
||||
@@ -272,13 +272,16 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {ref, watch} from 'vue';
|
||||
import {computed, ref, watch} from 'vue';
|
||||
import {useRoute, useRouter} from 'vue-router';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import orderTable from './components/orderTable.vue';
|
||||
import {agreeApproval, deleteOrder, getInit, getOrderDetail, getOrderList,} from './components/api';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import {parseTime} from '@/utils/his';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
@@ -351,9 +354,9 @@ const buttonShow = ref({
|
||||
isSaveShow: false,
|
||||
isEditShow: false,
|
||||
});
|
||||
const rules = ref({
|
||||
locationId: [{ required: true, message: '请选择库房', trigger: 'blur' }],
|
||||
});
|
||||
const rules = computed(() => ({
|
||||
locationId: [{ required: true, message: t('medicineStorage.common.pleaseSelectWarehouse'), trigger: 'blur' }],
|
||||
}));
|
||||
|
||||
// 初始化 获取下拉列表
|
||||
const init = async () => {
|
||||
@@ -385,7 +388,7 @@ const handleAdd = async () => {
|
||||
resetFormAndTableData();
|
||||
// 校验库房ID
|
||||
if (!tableForm.value.locationId) {
|
||||
proxy.$modal.msgWarning('新增单据前,请选择库房');
|
||||
proxy.$modal.msgWarning(t('medicineStorage.common.pleaseSelectWarehouse'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -448,7 +451,7 @@ const handleEdit = async (order) => {
|
||||
resetFormAndTableData();
|
||||
|
||||
if (!selectedOrder.value) {
|
||||
proxy.$modal.msgError('请选择要编辑的单据');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.pleaseSelectEdit'));
|
||||
return;
|
||||
}
|
||||
const res = await getOrderDetail({
|
||||
@@ -682,26 +685,26 @@ const clearForm = () => {
|
||||
// 删除按钮
|
||||
const handleDelete = async () => {
|
||||
if (!selectedOrder.value) {
|
||||
proxy.$modal.msgError('请选择要删除的单据');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.pleaseSelectDelete'));
|
||||
return;
|
||||
}
|
||||
|
||||
// 校验是否可以删除(已审批的单据不能删除)
|
||||
if (selectedOrder.value.statusEnum_enumText === '同意' || selectedOrder.value.statusEnum === 3) {
|
||||
proxy.$modal.msgError('已审批的单据不能删除');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.approvedCannotDelete'));
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await proxy.$modal.confirm('确认删除该采购单吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
await proxy.$modal.confirm(t('medicineStorage.common.confirmDelete'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
});
|
||||
|
||||
// 删除单据
|
||||
await deleteOrder(selectedOrder.value.supplyBusNo);
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
proxy.$modal.msgSuccess(t('medicineStorage.common.deleteSuccess'));
|
||||
|
||||
// 编辑
|
||||
handleEdit(selectedOrder.value);
|
||||
@@ -737,7 +740,7 @@ const handleDelete = async () => {
|
||||
});
|
||||
} catch (error) {
|
||||
if (error !== 'cancel') {
|
||||
proxy.$modal.msgError('删除失败');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.deleteFailed'));
|
||||
console.error('删除失败:', error);
|
||||
}
|
||||
}
|
||||
@@ -745,26 +748,26 @@ const handleDelete = async () => {
|
||||
// 审核按钮
|
||||
const handleAudit = async () => {
|
||||
if (!selectedOrder.value) {
|
||||
proxy.$modal.msgError('请选择要审核的单据');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.pleaseSelectAudit'));
|
||||
return;
|
||||
}
|
||||
|
||||
// 校验是否是已审批状态
|
||||
if (selectedOrder.value.statusEnum_enumText === '同意' || selectedOrder.value.statusEnum === 3) {
|
||||
proxy.$modal.msgError('该单据已审批,不能重复审批');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.approvedCannotAudit'));
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await proxy.$modal.confirm('确认同意该采购单吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
await proxy.$modal.confirm(t('medicineStorage.common.confirmAudit'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
});
|
||||
|
||||
// 同意审批
|
||||
await agreeApproval(selectedOrder.value.supplyBusNo);
|
||||
proxy.$modal.msgSuccess('同意审批成功');
|
||||
proxy.$modal.msgSuccess(t('medicineStorage.common.auditSuccess'));
|
||||
|
||||
// 编辑
|
||||
handleEdit(selectedOrder.value);
|
||||
@@ -804,7 +807,7 @@ const handleAudit = async () => {
|
||||
};
|
||||
} catch (error) {
|
||||
if (error !== 'cancel') {
|
||||
proxy.$modal.msgError('同意审批失败');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.auditFailed'));
|
||||
console.error('同意审批失败:', error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div>
|
||||
<vxe-table
|
||||
ref="medicineRef"
|
||||
@@ -7,59 +7,59 @@
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<vxe-column
|
||||
title="项目编码"
|
||||
:title="$t('medicineStorage.common.itemCode')"
|
||||
align="center"
|
||||
field="busNo"
|
||||
width="150"
|
||||
/>
|
||||
<vxe-column
|
||||
title="项目名称"
|
||||
:title="$t('medicineStorage.common.itemName')"
|
||||
align="center"
|
||||
field="name"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
title="进货价"
|
||||
:title="$t('medicineStorage.common.purchasePrice')"
|
||||
align="center"
|
||||
field="price"
|
||||
/>
|
||||
<vxe-column
|
||||
title="零售价"
|
||||
:title="$t('medicineStorage.common.retailPrice')"
|
||||
align="center"
|
||||
field="retailPrice"
|
||||
/>
|
||||
<vxe-column
|
||||
title="包装单位"
|
||||
:title="$t('medicineStorage.stockOutOrder.packagingUnit')"
|
||||
align="center"
|
||||
field="unitCode_dictText"
|
||||
/>
|
||||
<vxe-column
|
||||
title="最小单位"
|
||||
:title="$t('medicineStorage.stockOutOrder.minUnit')"
|
||||
align="center"
|
||||
field="minUnitCode_dictText"
|
||||
/>
|
||||
<vxe-column
|
||||
title="规格"
|
||||
:title="$t('medicineStorage.common.spec')"
|
||||
align="center"
|
||||
field="totalVolume"
|
||||
/>
|
||||
<vxe-column
|
||||
title="规格库存"
|
||||
:title="$t('medicineStorage.common.specStock')"
|
||||
align="center"
|
||||
field="specificationInventory"
|
||||
/>
|
||||
<vxe-column
|
||||
title="供应商"
|
||||
:title="$t('medicineStorage.common.supplierLabel')"
|
||||
align="center"
|
||||
field="supplierId_dictText"
|
||||
/>
|
||||
<vxe-column
|
||||
title="生产厂家"
|
||||
:title="$t('medicineStorage.common.manufacturer')"
|
||||
align="center"
|
||||
field="manufacturerText"
|
||||
/>
|
||||
<vxe-column
|
||||
title="批准文号"
|
||||
:title="$t('medicineStorage.common.approvalNo')"
|
||||
align="center"
|
||||
field="approvalNumber"
|
||||
/>
|
||||
@@ -71,6 +71,9 @@
|
||||
import {getMedicineList} from './api';
|
||||
import {watch} from 'vue';
|
||||
import {throttle} from 'lodash-es';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
|
||||
const {t} = useI18n();
|
||||
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-model="localDialogVisible"
|
||||
title="订单列表"
|
||||
:title="$t('medicineStorage.common.orderList')"
|
||||
width="960px"
|
||||
teleported
|
||||
@close="resetAllData"
|
||||
@@ -17,25 +17,25 @@
|
||||
@cell-click="handleRowClick"
|
||||
>
|
||||
<vxe-column
|
||||
title="订单编号"
|
||||
:title="$t('medicineStorage.common.orderNo')"
|
||||
field="supplyBusNo"
|
||||
width="200"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="采购员"
|
||||
:title="$t('medicineStorage.common.purchaser')"
|
||||
field="applicantId_dictText"
|
||||
width="100"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="供应商"
|
||||
:title="$t('medicineStorage.common.supplierLabel')"
|
||||
field="supplierId_dictText"
|
||||
width="220"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="审核状态"
|
||||
:title="$t('medicineStorage.common.auditStatusLabel')"
|
||||
field="statusEnum_enumText"
|
||||
width="100"
|
||||
align="center"
|
||||
@@ -56,13 +56,13 @@
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
title="单据类型"
|
||||
:title="$t('medicineStorage.common.documentType')"
|
||||
field="typeEnum_enumText"
|
||||
width="100"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="单据日期"
|
||||
:title="$t('medicineStorage.common.documentDate')"
|
||||
field="applyTime"
|
||||
width="200"
|
||||
align="center"
|
||||
@@ -90,13 +90,13 @@
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="handleCancel">
|
||||
取消
|
||||
{{ $t('medicineStorage.common.cancel') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleSubmit"
|
||||
>
|
||||
确认
|
||||
{{ $t('medicineStorage.common.confirm') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -108,6 +108,9 @@
|
||||
import {getStockInOrderDetail, getStockInOrderList} from './api';
|
||||
import {getCurrentInstance, ref, watch} from 'vue';
|
||||
import {parseTime} from '@/utils/his';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
|
||||
const {t} = useI18n();
|
||||
// 调用父组件方法
|
||||
const emit = defineEmits(['dialogSubmit', 'dialogCancel', 'updateTableData']);
|
||||
// 获取当前实例
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div>
|
||||
<el-row :gutter="10">
|
||||
<el-form
|
||||
@@ -10,7 +10,7 @@
|
||||
>
|
||||
<el-row :gutter="10">
|
||||
<el-form-item
|
||||
label="单据号"
|
||||
:label="$t('medicineStorage.common.documentNo')"
|
||||
prop="busNo"
|
||||
>
|
||||
<el-input
|
||||
@@ -21,12 +21,12 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="开单日期"
|
||||
:label="$t('medicineStorage.common.orderDate')"
|
||||
prop="applyTime"
|
||||
>
|
||||
<el-date-picker
|
||||
v-model="localForm.applyTime"
|
||||
placeholder="请选择开单日期"
|
||||
:placeholder="$t('medicineStorage.common.selectOrderDate')"
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
@@ -35,12 +35,12 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
label="供应商"
|
||||
:label="$t('medicineStorage.common.supplierLabel')"
|
||||
prop="supplierId"
|
||||
>
|
||||
<el-select
|
||||
v-model="localForm.supplierId"
|
||||
placeholder="请选择供应商"
|
||||
:placeholder="$t('medicineStorage.common.selectSupplier')"
|
||||
style="width: 180px"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
clearable
|
||||
@@ -56,23 +56,23 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
label="供应商联系人"
|
||||
:label="$t('medicineStorage.common.supplierContact')"
|
||||
prop="phone"
|
||||
>
|
||||
<el-input
|
||||
v-model="localForm.phone"
|
||||
placeholder="请输入供应商联系人"
|
||||
:placeholder="$t('medicineStorage.stockOutOrder.enterSupplierContact')"
|
||||
style="width: 220px"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="开单人"
|
||||
:label="$t('medicineStorage.common.orderMaker')"
|
||||
prop="applicantId"
|
||||
>
|
||||
<el-select
|
||||
v-model="localForm.applicantId"
|
||||
placeholder="请选择开单人"
|
||||
:placeholder="$t('medicineStorage.common.selectOrderMaker')"
|
||||
style="width: 140px"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
clearable
|
||||
@@ -86,12 +86,12 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="单据分类"
|
||||
:label="$t('medicineStorage.common.categoryLabel')"
|
||||
prop="categoryEnum"
|
||||
>
|
||||
<el-select
|
||||
v-model="localForm.categoryEnum"
|
||||
placeholder="请选择单据分类"
|
||||
:placeholder="$t('medicineStorage.common.selectCategory')"
|
||||
style="width: 180px"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
clearable
|
||||
@@ -105,25 +105,25 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="发票号"
|
||||
:label="$t('medicineStorage.common.invoiceNo')"
|
||||
prop="invoiceNo"
|
||||
>
|
||||
<el-input
|
||||
v-model="localForm.invoiceNo"
|
||||
placeholder="请输入发票号"
|
||||
:placeholder="$t('medicineStorage.stockOutOrder.enterInvoiceNo')"
|
||||
clearable
|
||||
style="width: 180px"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="摘要(A)"
|
||||
:label="$t('medicineStorage.common.summary') + '(A)'"
|
||||
prop="reason"
|
||||
>
|
||||
<el-input
|
||||
v-model="localForm.reason"
|
||||
type="textarea"
|
||||
placeholder="请输入摘要"
|
||||
:placeholder="$t('medicineStorage.common.enterSummary')"
|
||||
style="width: 300px"
|
||||
:rows="1"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
@@ -137,7 +137,7 @@
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<div class="form-item">
|
||||
<label class="form-label">审核人</label>
|
||||
<label class="form-label">{{ $t('medicineStorage.common.auditor') }}</label>
|
||||
<el-tag
|
||||
type="warning"
|
||||
plain
|
||||
@@ -145,30 +145,30 @@
|
||||
{{
|
||||
(props.practitionerOption || []).find(
|
||||
(item) => item.value === localAuditForm.approverId
|
||||
)?.label || '暂无'
|
||||
)?.label || $t('medicineStorage.common.none')
|
||||
}}
|
||||
</el-tag>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="form-item">
|
||||
<label class="form-label">审核日期</label>
|
||||
<label class="form-label">{{ $t('medicineStorage.common.auditDate') }}</label>
|
||||
<el-tag
|
||||
type="primary"
|
||||
plain
|
||||
>
|
||||
{{ parseTime(localAuditForm.approvalTime, '{y}-{m}-{d} {h}:{i}:{s}') || '暂无' }}
|
||||
{{ parseTime(localAuditForm.approvalTime, '{y}-{m}-{d} {h}:{i}:{s}') || $t('medicineStorage.common.none') }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="form-item">
|
||||
<label class="form-label">审核状态:</label>
|
||||
<label class="form-label">{{ $t('medicineStorage.common.auditStatusLabel') }}:</label>
|
||||
<el-tag
|
||||
:type="localAuditForm.statusEnum_enumText === '同意' ? 'success' : 'danger'"
|
||||
plain
|
||||
>
|
||||
{{ localAuditForm.statusEnum_enumText || '暂无' }}
|
||||
{{ localAuditForm.statusEnum_enumText || $t('medicineStorage.common.none') }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</el-col>
|
||||
@@ -185,7 +185,7 @@
|
||||
icon="Plus"
|
||||
@click="handleAddRow"
|
||||
>
|
||||
添加行
|
||||
{{ $t('medicineStorage.common.addRow') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -196,7 +196,7 @@
|
||||
icon="Delete"
|
||||
@click="handleDeleteRow"
|
||||
>
|
||||
删除行
|
||||
{{ $t('medicineStorage.common.deleteRow') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -207,7 +207,7 @@
|
||||
icon="Check"
|
||||
@click="handleSave"
|
||||
>
|
||||
保存
|
||||
{{ $t('medicineStorage.common.save') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -218,7 +218,7 @@
|
||||
icon="Upload"
|
||||
@click="handleOrderImport"
|
||||
>
|
||||
进货单导入
|
||||
{{ $t('medicineStorage.returnOrder.importStockInOrder') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -247,7 +247,7 @@
|
||||
/>
|
||||
<vxe-column
|
||||
field="itemBusNo"
|
||||
title="编号"
|
||||
:title="$t('medicineStorage.common.itemCode')"
|
||||
fixed
|
||||
width="180"
|
||||
align="center"
|
||||
@@ -265,7 +265,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="itemName"
|
||||
title="品名"
|
||||
:title="$t('medicineStorage.common.itemName')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -298,7 +298,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="totalVolume"
|
||||
title="规格"
|
||||
:title="$t('medicineStorage.common.spec')"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
@@ -316,7 +316,7 @@
|
||||
<!-- 产品批号 -->
|
||||
<vxe-column
|
||||
field="lotNumber"
|
||||
title="产品批号"
|
||||
:title="$t('medicineStorage.stockOutOrder.lotNumber')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -329,7 +329,7 @@
|
||||
v-if="localTableData[scope.rowIndex].isEditing"
|
||||
v-model="localTableData[scope.rowIndex].lotNumber"
|
||||
clearable
|
||||
placeholder="请输入产品批号"
|
||||
:placeholder="$t('medicineStorage.stockOutOrder.enterLotNumber')"
|
||||
style="width: 180px"
|
||||
/>
|
||||
<span v-else-if="localTableData[scope.rowIndex].isViewing">
|
||||
@@ -340,7 +340,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="unitCode"
|
||||
title="单位"
|
||||
:title="$t('medicineStorage.common.unit')"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
@@ -370,7 +370,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="itemQuantity"
|
||||
title="数量"
|
||||
:title="$t('medicineStorage.common.quantity')"
|
||||
width="120"
|
||||
:rules="rules.itemQuantity"
|
||||
align="center"
|
||||
@@ -395,7 +395,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="price"
|
||||
title="进货价"
|
||||
:title="$t('medicineStorage.common.purchasePrice')"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
@@ -409,7 +409,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="totalPrice"
|
||||
title="进价金额"
|
||||
:title="$t('medicineStorage.common.purchaseAmount')"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
@@ -423,7 +423,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="retailPrice"
|
||||
title="当前销售价"
|
||||
:title="$t('medicineStorage.common.retailPrice')"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
@@ -440,7 +440,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="totalRetailPrice"
|
||||
title="当前销售金额"
|
||||
:title="$t('medicineStorage.common.retailAmount')"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
@@ -458,7 +458,7 @@
|
||||
<!-- 失效日期 -->
|
||||
<vxe-column
|
||||
field="endTime"
|
||||
title="失效日期"
|
||||
:title="$t('medicineStorage.stockOutOrder.expirationDate')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -476,7 +476,7 @@
|
||||
<!-- 禁用日期 -->
|
||||
<vxe-column
|
||||
field="occurrenceTime"
|
||||
title="禁用日期"
|
||||
:title="$t('medicineStorage.returnOrder.disableDate')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -489,7 +489,7 @@
|
||||
v-if="localTableData[scope.rowIndex].isEditing"
|
||||
v-model="localTableData[scope.rowIndex].occurrenceTime"
|
||||
type="date"
|
||||
placeholder="请选择失效日期"
|
||||
:placeholder="$t('medicineStorage.stockOutOrder.selectExpirationDate')"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
style="width: 180px"
|
||||
@@ -502,7 +502,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="manufacturerText"
|
||||
title="厂家/产地"
|
||||
:title="$t('medicineStorage.common.manufacturer')"
|
||||
width="220"
|
||||
align="center"
|
||||
>
|
||||
@@ -521,7 +521,7 @@
|
||||
<!-- 批次库存 -->
|
||||
<vxe-column
|
||||
field="batchInventory"
|
||||
title="批次库存"
|
||||
:title="$t('medicineStorage.stockOutOrder.batchInventory')"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
@@ -554,7 +554,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="approvalNumber"
|
||||
title="批注文号"
|
||||
:title="$t('medicineStorage.common.approvalNo')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -573,7 +573,7 @@
|
||||
<!-- 药品追溯码 -->
|
||||
<vxe-column
|
||||
field="traceNo"
|
||||
title="药品追溯码"
|
||||
:title="$t('medicineStorage.stockOutOrder.traceNo')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -586,7 +586,7 @@
|
||||
v-if="localTableData[scope.rowIndex].isEditing"
|
||||
v-model="localTableData[scope.rowIndex].traceNo"
|
||||
clearable
|
||||
placeholder="请输入药品追溯码"
|
||||
:placeholder="$t('medicineStorage.stockOutOrder.enterTraceNo')"
|
||||
style="width: 180px"
|
||||
/>
|
||||
<span v-else-if="localTableData[scope.rowIndex].isViewing">
|
||||
@@ -598,7 +598,7 @@
|
||||
<!-- 药品追溯码单位 -->
|
||||
<vxe-column
|
||||
field="traceNoUnitCode"
|
||||
title="药品追溯码单位"
|
||||
:title="$t('medicineStorage.stockOutOrder.traceNoUnit')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -610,7 +610,7 @@
|
||||
<el-select
|
||||
v-if="localTableData[scope.rowIndex].isEditing"
|
||||
v-model="localTableData[scope.rowIndex].traceNoUnitCode"
|
||||
placeholder="请选择药品追溯码单位"
|
||||
:placeholder="$t('medicineStorage.stockOutOrder.selectTraceNoUnit')"
|
||||
style="width: 180px"
|
||||
>
|
||||
<el-option
|
||||
@@ -629,7 +629,7 @@
|
||||
<!-- 备注 -->
|
||||
<vxe-column
|
||||
field="remake"
|
||||
title="备注"
|
||||
:title="$t('medicineStorage.common.remark')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -647,7 +647,7 @@
|
||||
</vxe-column>
|
||||
<!-- 操作 -->
|
||||
<vxe-column
|
||||
title="操作"
|
||||
:title="$t('medicineStorage.common.operation')"
|
||||
width="100"
|
||||
fixed="right"
|
||||
>
|
||||
@@ -658,7 +658,7 @@
|
||||
icon="Edit"
|
||||
@click="handleScan(scope.row, scope.rowIndex)"
|
||||
>
|
||||
扫码
|
||||
{{ $t('medicineStorage.stockOutOrder.scan') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</vxe-column>
|
||||
@@ -699,13 +699,16 @@
|
||||
|
||||
<script setup>
|
||||
import {addOrEditOrder, getBusNo} from './api';
|
||||
import {nextTick, ref, watch} from 'vue';
|
||||
import {computed, nextTick, ref, watch} from 'vue';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import medicineList from './medicineList.vue';
|
||||
import orderDialog from './orderDialog.vue';
|
||||
import PopoverList from '@/components/HealthLinkHis/popoverList/index.vue';
|
||||
import {parseTime} from '@/utils/his';
|
||||
import TraceNoDialog from '@/components/HealthLinkHis/TraceNoDialog/index.vue';
|
||||
|
||||
const {t} = useI18n();
|
||||
|
||||
// 获取当前实例
|
||||
const { proxy } = getCurrentInstance();
|
||||
// 调用父组件方法
|
||||
@@ -842,36 +845,31 @@ const localIsAddOrEditOrder = ref({
|
||||
isEditOrder: false,
|
||||
});
|
||||
// 验证规则
|
||||
const rules = {
|
||||
// busNo: [{ required: true, message: '请输入单据号', trigger: 'blur' }],
|
||||
supplierId: [{ required: true, message: '请输入供应商', trigger: 'blur' }],
|
||||
applicantId: [{ required: true, message: '请输入开单人', trigger: 'blur' }],
|
||||
categoryEnum: [{ required: true, message: '请输入单据类型', trigger: 'blur' }],
|
||||
applyTime: [{ required: true, message: '请输入开单日期', trigger: 'blur' }],
|
||||
itemBusNo: [{ required: true, message: '请输入编号', trigger: ['blur', 'change'] }],
|
||||
itemName: [{ required: true, message: '请输入品名', trigger: 'blur' }],
|
||||
totalVolume: [{ required: true, message: '请输入规格', trigger: 'blur' }],
|
||||
unitCode: [{ required: true, message: '请输入单位', trigger: 'blur' }],
|
||||
itemQuantity: [{ required: true, message: '请输入数量', trigger: 'blur' }],
|
||||
lotNumber: [{ required: true, message: '请输入产品批号', trigger: 'blur' }],
|
||||
endTime: [{ required: true, message: '请输入失效日期', trigger: 'blur' }],
|
||||
occurrenceTime: [{ required: true, message: '请输入禁用日期', trigger: 'blur' }],
|
||||
packagingConditionEnum: [{ required: true, message: '请输入包装情况', trigger: 'blur' }],
|
||||
acceptanceResultEnum: [{ required: true, message: '请选择验收结果', trigger: 'blur' }],
|
||||
batchInventory: [{ required: true, message: '请输入批次库存', trigger: 'blur' }],
|
||||
traceNo: [{ required: true, message: '请输入药品追溯码', trigger: 'blur' }],
|
||||
traceNoUnitCode: [{ required: true, message: '请输入药品追溯码单位', trigger: 'blur' }],
|
||||
phone: [{ required: true, message: '请输入供应商联系人', trigger: 'blur' }],
|
||||
practitionerId: [{ required: true, message: '请输入开单人', trigger: 'blur' }],
|
||||
invoiceNo: [{ required: true, message: '请输入发票号', trigger: 'blur' }],
|
||||
// price: [{ required: true, message: '请输入进货价', trigger: 'blur' }],
|
||||
// totalPrice: [{ required: true, message: '请输入进价金额', trigger: 'blur' }],
|
||||
// retailPrice: [{ required: true, message: '请输入销售价', trigger: 'blur' }],
|
||||
// totalRetailPrice: [{ required: true, message: '请输入销售金额', trigger: 'blur' }],
|
||||
manufacturerText: [{ required: true, message: '请输入厂家/产地', trigger: 'blur' }],
|
||||
specificationInventory: [{ required: true, message: '请输入规格库存', trigger: 'blur' }],
|
||||
approvalNumber: [{ required: true, message: '请输入批注文号', trigger: 'blur' }],
|
||||
};
|
||||
const rules = computed(() => ({
|
||||
supplierId: [{ required: true, message: t('medicineStorage.common.pleaseSelectSupplierAndWarehouse'), trigger: 'blur' }],
|
||||
applicantId: [{ required: true, message: t('medicineStorage.stockOutOrder.enterOrderMaker'), trigger: 'blur' }],
|
||||
categoryEnum: [{ required: true, message: t('medicineStorage.stockOutOrder.enterDocumentType'), trigger: 'blur' }],
|
||||
applyTime: [{ required: true, message: t('medicineStorage.stockOutOrder.enterOrderDate'), trigger: 'blur' }],
|
||||
itemBusNo: [{ required: true, message: t('medicineStorage.stockOutOrder.enterItemCode'), trigger: ['blur', 'change'] }],
|
||||
itemName: [{ required: true, message: t('medicineStorage.stockOutOrder.enterItemName'), trigger: 'blur' }],
|
||||
totalVolume: [{ required: true, message: t('medicineStorage.stockOutOrder.enterSpec'), trigger: 'blur' }],
|
||||
unitCode: [{ required: true, message: t('medicineStorage.stockOutOrder.enterUnit'), trigger: 'blur' }],
|
||||
itemQuantity: [{ required: true, message: t('medicineStorage.stockOutOrder.enterQuantity'), trigger: 'blur' }],
|
||||
lotNumber: [{ required: true, message: t('medicineStorage.stockOutOrder.enterLotNumber'), trigger: 'blur' }],
|
||||
endTime: [{ required: true, message: t('medicineStorage.stockOutOrder.enterExpirationDate'), trigger: 'blur' }],
|
||||
occurrenceTime: [{ required: true, message: t('medicineStorage.returnOrder.enterDisableDate'), trigger: 'blur' }],
|
||||
packagingConditionEnum: [{ required: true, message: t('medicineStorage.stockOutOrder.enterPackagingCondition'), trigger: 'blur' }],
|
||||
acceptanceResultEnum: [{ required: true, message: t('medicineStorage.stockOutOrder.selectAcceptanceResult'), trigger: 'blur' }],
|
||||
batchInventory: [{ required: true, message: t('medicineStorage.stockOutOrder.enterBatchInventory'), trigger: 'blur' }],
|
||||
traceNo: [{ required: true, message: t('medicineStorage.stockOutOrder.enterTraceNo'), trigger: 'blur' }],
|
||||
traceNoUnitCode: [{ required: true, message: t('medicineStorage.stockOutOrder.enterTraceNoUnit'), trigger: 'blur' }],
|
||||
phone: [{ required: true, message: t('medicineStorage.common.supplierContact'), trigger: 'blur' }],
|
||||
practitionerId: [{ required: true, message: t('medicineStorage.stockOutOrder.enterOrderMaker'), trigger: 'blur' }],
|
||||
invoiceNo: [{ required: true, message: t('medicineStorage.stockOutOrder.enterInvoiceNo'), trigger: 'blur' }],
|
||||
manufacturerText: [{ required: true, message: t('medicineStorage.stockOutOrder.enterManufacturer'), trigger: 'blur' }],
|
||||
specificationInventory: [{ required: true, message: t('medicineStorage.stockOutOrder.enterSpecStock'), trigger: 'blur' }],
|
||||
approvalNumber: [{ required: true, message: t('medicineStorage.stockOutOrder.enterApprovalNo'), trigger: 'blur' }],
|
||||
}));
|
||||
// 药品名称
|
||||
const ypName = ref('');
|
||||
// 药品追溯码
|
||||
@@ -1012,7 +1010,7 @@ const handleScan = (row, index) => {
|
||||
// 设置当前索引
|
||||
currentIndex.value = index;
|
||||
} else {
|
||||
proxy.$message.warning('请先输入产品批号!');
|
||||
proxy.$message.warning(t('medicineStorage.stockOutOrder.pleaseEnterLotNumberFirst'));
|
||||
}
|
||||
};
|
||||
// 药品追溯码提交
|
||||
@@ -1376,7 +1374,7 @@ const handleAddRow = async () => {
|
||||
|
||||
// 如果有数据,检查是否有空行
|
||||
if (isEmptyRow()) {
|
||||
proxy.$message.error('请填写完整信息');
|
||||
proxy.$message.error(t('medicineStorage.common.pleaseFillComplete'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1437,9 +1435,9 @@ const handleSave = async () => {
|
||||
const currentFormData = JSON.parse(JSON.stringify(localForm.value));
|
||||
|
||||
// 是否确认保存数据
|
||||
const isConfirm = await proxy.$modal.confirm('确认保存数据吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
const isConfirm = await proxy.$modal.confirm(t('medicineStorage.common.confirmSave'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
});
|
||||
if (!isConfirm) {
|
||||
@@ -1455,7 +1453,7 @@ const handleSave = async () => {
|
||||
if (localIsAddOrEditOrder.value.isAddOrder) {
|
||||
addOrEditOrder(editData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$message.success('新增成功');
|
||||
proxy.$message.success(t('medicineStorage.common.addSuccess'));
|
||||
// 调用父组件的 getList 方法
|
||||
emit('getList');
|
||||
// 清空表单
|
||||
@@ -1467,13 +1465,13 @@ const handleSave = async () => {
|
||||
} else if (localIsAddOrEditOrder.value.isEditOrder) {
|
||||
addOrEditOrder(editData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$message.success('保存成功');
|
||||
proxy.$message.success(t('medicineStorage.common.saveSuccess'));
|
||||
// 调用父组件的 getList 方法
|
||||
emit('getList');
|
||||
// 清空表单
|
||||
resetAllData();
|
||||
} else {
|
||||
proxy.$message.error('保存失败');
|
||||
proxy.$message.error(t('medicineStorage.common.saveFailed'));
|
||||
}
|
||||
// 关闭加载
|
||||
loading.value = false;
|
||||
@@ -1566,14 +1564,14 @@ const resetAllData = () => {
|
||||
// 删除行
|
||||
const handleDeleteRow = () => {
|
||||
if (selectedRows.value.length === 0) {
|
||||
proxy.$message.warning('请选择要删除的行');
|
||||
proxy.$message.warning(t('medicineStorage.common.pleaseSelectDeleteRow'));
|
||||
return;
|
||||
}
|
||||
|
||||
proxy
|
||||
.$confirm('确认删除选中的行吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
.$confirm(t('medicineStorage.common.confirmDeleteRow'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
@@ -1628,7 +1626,7 @@ const handleDeleteRow = () => {
|
||||
});
|
||||
}
|
||||
|
||||
proxy.$message.success('删除成功');
|
||||
proxy.$message.success(t('medicineStorage.common.deleteSuccess'));
|
||||
})
|
||||
.catch(() => {
|
||||
// 用户取消删除
|
||||
@@ -1640,7 +1638,7 @@ const validateDateRange = (rowIndex) => {
|
||||
const row = localTableData.value[rowIndex];
|
||||
if (row && row.endTime && row.occurrenceTime) {
|
||||
if (row.occurrenceTime < row.endTime) {
|
||||
proxy.$message.error('失效日期不能小于禁用日期');
|
||||
proxy.$message.error(t('medicineStorage.returnOrder.disableDateBeforeExpiration'));
|
||||
// 清空失效日期
|
||||
row.occurrenceTime = '';
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
:disabled="isAddDisabled"
|
||||
@click="handleAdd"
|
||||
>
|
||||
新增
|
||||
{{ $t('medicineStorage.common.add') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
@@ -38,7 +38,7 @@
|
||||
:disabled="isDeleteDisabled"
|
||||
@click="handleDelete"
|
||||
>
|
||||
删除
|
||||
{{ $t('medicineStorage.common.delete') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -50,7 +50,7 @@
|
||||
:disabled="isCancelDisabled"
|
||||
@click="handleCancel"
|
||||
>
|
||||
取消
|
||||
{{ $t('medicineStorage.common.cancel') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -62,7 +62,7 @@
|
||||
:disabled="isAuditDisabled"
|
||||
@click="handleAudit"
|
||||
>
|
||||
审核
|
||||
{{ $t('medicineStorage.common.audit') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -84,12 +84,12 @@
|
||||
:rules="rules"
|
||||
>
|
||||
<el-form-item
|
||||
label="库房:"
|
||||
:label="$t('medicineStorage.common.warehouse') + ':'"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-select
|
||||
v-model="tableForm.locationId"
|
||||
placeholder="请选择库房"
|
||||
:placeholder="$t('medicineStorage.common.pleaseSelectWarehouse')"
|
||||
clearable
|
||||
filterable
|
||||
@change="handleLocationChange(tableForm.locationId)"
|
||||
@@ -114,12 +114,12 @@
|
||||
@submit.prevent
|
||||
>
|
||||
<el-form-item
|
||||
label="单据搜索"
|
||||
:label="$t('medicineStorage.common.documentSearch')"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入单据号"
|
||||
:placeholder="$t('medicineStorage.common.enterDocumentNo')"
|
||||
clearable
|
||||
@keyup.enter="getList"
|
||||
>
|
||||
@@ -162,21 +162,21 @@
|
||||
<el-icon class="info-icon">
|
||||
<User />
|
||||
</el-icon>
|
||||
<span class="label">采购员:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.purchaser') }}:</span>
|
||||
<span class="value">{{ item.applicantId_dictText }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<el-icon class="info-icon">
|
||||
<Shop />
|
||||
</el-icon>
|
||||
<span class="label">供应商:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.supplierLabel') }}:</span>
|
||||
<span class="value">{{ item.supplierId_dictText }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<el-icon class="info-icon">
|
||||
<User />
|
||||
</el-icon>
|
||||
<span class="label">审核状态:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.auditStatusLabel') }}:</span>
|
||||
<el-tag
|
||||
v-if="item.statusEnum_enumText === '同意'"
|
||||
type="success"
|
||||
@@ -194,14 +194,14 @@
|
||||
<el-icon class="info-icon">
|
||||
<Files />
|
||||
</el-icon>
|
||||
<span class="label">单据类型:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.documentType') }}:</span>
|
||||
<span class="value">{{ item.typeEnum_enumText }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<el-icon class="info-icon">
|
||||
<Calendar />
|
||||
</el-icon>
|
||||
<span class="label">单据日期:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.documentDate') }}:</span>
|
||||
<span class="value">{{
|
||||
parseTime(item.applyTime, '{y}-{m}-{d} {h}:{i}:{s}')
|
||||
}}</span>
|
||||
@@ -217,14 +217,14 @@
|
||||
class="empty-state"
|
||||
>
|
||||
<el-empty
|
||||
description="暂无单据"
|
||||
:description="$t('medicineStorage.common.noDocuments')"
|
||||
:image-size="80"
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleAdd"
|
||||
>
|
||||
新增单据
|
||||
{{ $t('medicineStorage.common.addDocument') }}
|
||||
</el-button>
|
||||
</el-empty>
|
||||
</div>
|
||||
@@ -264,13 +264,16 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {ref} from 'vue';
|
||||
import {computed, ref} from 'vue';
|
||||
import {useRoute, useRouter} from 'vue-router';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import orderTable from './components/orderTable.vue';
|
||||
import {agreeApproval, deleteOrder, getInit, getOrderDetail, getOrderList,} from './components/api';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import {parseTime} from '@/utils/his';
|
||||
|
||||
const {t} = useI18n();
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
@@ -347,9 +350,9 @@ const buttonShow = ref({
|
||||
isSaveShow: false,
|
||||
isEditShow: false,
|
||||
});
|
||||
const rules = ref({
|
||||
locationId: [{ required: true, message: '请选择库房', trigger: 'blur' }],
|
||||
});
|
||||
const rules = computed(() => ({
|
||||
locationId: [{ required: true, message: t('medicineStorage.common.pleaseSelectWarehouse'), trigger: 'blur' }],
|
||||
}));
|
||||
|
||||
// 初始化 获取下拉列表
|
||||
const init = async () => {
|
||||
@@ -385,7 +388,7 @@ const handleAdd = async () => {
|
||||
resetFormAndTableData();
|
||||
// 校验库房ID
|
||||
if (!tableForm.value.locationId) {
|
||||
proxy.$modal.msgWarning('新增单据前,请选择库房');
|
||||
proxy.$modal.msgWarning(t('medicineStorage.common.pleaseSelectWarehouse'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -450,7 +453,7 @@ const handleEdit = async (order) => {
|
||||
resetFormAndTableData();
|
||||
|
||||
if (!selectedOrder.value) {
|
||||
proxy.$modal.msgError('请选择要编辑的单据');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.pleaseSelectEdit'));
|
||||
return;
|
||||
}
|
||||
const res = await getOrderDetail({
|
||||
@@ -733,26 +736,26 @@ const clearForm = () => {
|
||||
// 删除按钮
|
||||
const handleDelete = async () => {
|
||||
if (!selectedOrder.value) {
|
||||
proxy.$modal.msgError('请选择要删除的单据');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.pleaseSelectDelete'));
|
||||
return;
|
||||
}
|
||||
|
||||
// 校验是否可以删除(已审批的单据不能删除)
|
||||
if (selectedOrder.value.statusEnum_enumText === '同意' || selectedOrder.value.statusEnum === 3) {
|
||||
proxy.$modal.msgError('已审批的单据不能删除');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.approvedCannotDelete'));
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await proxy.$modal.confirm('确认删除该采购单吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
await proxy.$modal.confirm(t('medicineStorage.common.confirmDelete'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
});
|
||||
|
||||
// 删除单据
|
||||
await deleteOrder(selectedOrder.value.supplyBusNo);
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
proxy.$modal.msgSuccess(t('medicineStorage.common.deleteSuccess'));
|
||||
// 清空右侧表格数据
|
||||
clearForm();
|
||||
// 重新获取列表 库房ID
|
||||
@@ -785,7 +788,7 @@ const handleDelete = async () => {
|
||||
});
|
||||
} catch (error) {
|
||||
if (error !== 'cancel') {
|
||||
proxy.$modal.msgError('删除失败');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.deleteFailed'));
|
||||
console.error('删除失败:', error);
|
||||
}
|
||||
}
|
||||
@@ -793,26 +796,26 @@ const handleDelete = async () => {
|
||||
// 审核按钮
|
||||
const handleAudit = async () => {
|
||||
if (!selectedOrder.value) {
|
||||
proxy.$modal.msgError('请选择要审核的单据');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.pleaseSelectAudit'));
|
||||
return;
|
||||
}
|
||||
|
||||
// 校验是否是已审批状态
|
||||
if (selectedOrder.value.statusEnum_enumText === '同意' || selectedOrder.value.statusEnum === 3) {
|
||||
proxy.$modal.msgError('该单据已审批,不能重复审批');
|
||||
proxy.$modal.msgError(t('medicineStorage.stockOutOrder.approvedCannotAudit'));
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await proxy.$modal.confirm('确认同意该采购单吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
await proxy.$modal.confirm(t('medicineStorage.stockOutOrder.confirmAudit'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
});
|
||||
|
||||
// 同意审批
|
||||
await agreeApproval(selectedOrder.value.supplyBusNo);
|
||||
proxy.$modal.msgSuccess('同意审批成功');
|
||||
proxy.$modal.msgSuccess(t('medicineStorage.stockOutOrder.auditSuccess'));
|
||||
// 编辑
|
||||
handleEdit(selectedOrder);
|
||||
// 重新获取列表
|
||||
@@ -845,7 +848,7 @@ const handleAudit = async () => {
|
||||
});
|
||||
} catch (error) {
|
||||
if (error !== 'cancel') {
|
||||
proxy.$modal.msgError('同意审批失败');
|
||||
proxy.$modal.msgError(t('medicineStorage.stockOutOrder.auditFailed'));
|
||||
console.error('同意审批失败:', error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,24 +7,24 @@
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<vxe-column
|
||||
title="项目编码"
|
||||
:title="$t('medicineStorage.common.itemCode')"
|
||||
align="center"
|
||||
field="busNo"
|
||||
width="150"
|
||||
/>
|
||||
<vxe-column
|
||||
title="项目名称"
|
||||
:title="$t('medicineStorage.common.itemName')"
|
||||
align="center"
|
||||
field="name"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
title="进货价"
|
||||
:title="$t('medicineStorage.common.purchasePrice')"
|
||||
align="center"
|
||||
field="price"
|
||||
/>
|
||||
<vxe-column
|
||||
title="零售价"
|
||||
:title="$t('medicineStorage.common.retailPrice')"
|
||||
align="center"
|
||||
field="retailPrice"
|
||||
/>
|
||||
@@ -39,27 +39,27 @@
|
||||
field="minUnitCode_dictText"
|
||||
/>
|
||||
<vxe-column
|
||||
title="规格"
|
||||
:title="$t('medicineStorage.common.spec')"
|
||||
align="center"
|
||||
field="totalVolume"
|
||||
/>
|
||||
<vxe-column
|
||||
title="规格库存"
|
||||
:title="$t('medicineStorage.common.specStock')"
|
||||
align="center"
|
||||
field="specificationInventory"
|
||||
/>
|
||||
<vxe-column
|
||||
title="供应商"
|
||||
:title="$t('medicineStorage.common.supplier')"
|
||||
align="center"
|
||||
field="supplierId_dictText"
|
||||
/>
|
||||
<vxe-column
|
||||
title="生产厂家"
|
||||
:title="$t('medicineStorage.common.manufacturer')"
|
||||
align="center"
|
||||
field="manufacturerText"
|
||||
/>
|
||||
<vxe-column
|
||||
title="批准文号"
|
||||
:title="$t('medicineStorage.common.approvalNo')"
|
||||
align="center"
|
||||
field="approvalNumber"
|
||||
/>
|
||||
@@ -70,8 +70,10 @@
|
||||
<script setup>
|
||||
import {getMedicineList} from './api';
|
||||
import {watch} from 'vue';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import {throttle} from 'lodash-es';
|
||||
|
||||
const { t } = useI18n();
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
type: String,
|
||||
@@ -135,4 +137,4 @@ getList();
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<el-dialog
|
||||
v-model="localDialogVisible"
|
||||
title="订单列表"
|
||||
:title="$t('medicineStorage.common.orderList')"
|
||||
width="960px"
|
||||
teleported
|
||||
@close="resetAllData"
|
||||
@@ -17,25 +17,25 @@
|
||||
@cell-click="handleRowClick"
|
||||
>
|
||||
<vxe-column
|
||||
title="订单编号"
|
||||
:title="$t('medicineStorage.common.orderNo')"
|
||||
field="supplyBusNo"
|
||||
width="200"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="采购员"
|
||||
:title="$t('medicineStorage.common.purchaser')"
|
||||
field="applicantId_dictText"
|
||||
width="100"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="供应商"
|
||||
:title="$t('medicineStorage.common.supplier')"
|
||||
field="supplierId_dictText"
|
||||
width="220"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="审核状态"
|
||||
:title="$t('medicineStorage.common.auditStatus')"
|
||||
field="statusEnum_enumText"
|
||||
width="100"
|
||||
align="center"
|
||||
@@ -56,13 +56,13 @@
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
title="单据类型"
|
||||
:title="$t('medicineStorage.common.documentType')"
|
||||
field="typeEnum_enumText"
|
||||
width="100"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="单据日期"
|
||||
:title="$t('medicineStorage.common.documentDate')"
|
||||
field="applyTime"
|
||||
width="200"
|
||||
align="center"
|
||||
@@ -90,13 +90,13 @@
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="handleCancel">
|
||||
取消
|
||||
{{ $t('medicineStorage.common.cancel') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleSubmit"
|
||||
>
|
||||
确认
|
||||
{{ $t('medicineStorage.common.confirm') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -107,7 +107,10 @@
|
||||
<script setup>
|
||||
import {getPurchaseOrderDetail, getPurchaseOrderList} from './api';
|
||||
import {getCurrentInstance, ref, watch} from 'vue';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import {parseTime} from '@/utils/his';
|
||||
|
||||
const { t } = useI18n();
|
||||
// 调用父组件方法
|
||||
const emit = defineEmits(['dialogSubmit', 'dialogCancel', 'updateTableData']);
|
||||
// 获取当前实例
|
||||
@@ -383,4 +386,4 @@ defineExpose({
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
>
|
||||
<el-row :gutter="10">
|
||||
<el-form-item
|
||||
label="单据号"
|
||||
:label="$t('medicineStorage.common.documentNo')"
|
||||
prop="busNo"
|
||||
>
|
||||
<el-input
|
||||
@@ -21,7 +21,7 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="开单日期"
|
||||
:label="$t('medicineStorage.common.orderDate')"
|
||||
prop="applyTime"
|
||||
>
|
||||
<el-date-picker
|
||||
@@ -34,7 +34,7 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="开单人"
|
||||
:label="$t('medicineStorage.common.orderMaker')"
|
||||
prop="applicantId"
|
||||
>
|
||||
<el-select
|
||||
@@ -53,7 +53,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="申请部门"
|
||||
:label="$t('medicineStorage.common.applicationDept')"
|
||||
prop="sourceLocationId"
|
||||
>
|
||||
<el-select
|
||||
@@ -72,7 +72,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="申请人"
|
||||
:label="$t('medicineStorage.common.applicant')"
|
||||
prop="practitionerId"
|
||||
>
|
||||
<el-select
|
||||
@@ -91,7 +91,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="单据分类"
|
||||
:label="$t('medicineStorage.common.categoryLabel')"
|
||||
prop="categoryEnum"
|
||||
>
|
||||
<el-select
|
||||
@@ -111,7 +111,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
label="摘要(A)"
|
||||
:label="$t('medicineStorage.common.summary')"
|
||||
prop="reason"
|
||||
>
|
||||
<el-input
|
||||
@@ -131,7 +131,7 @@
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<div class="form-item">
|
||||
<label class="form-label">审核人</label>
|
||||
<label class="form-label">{{ $t('medicineStorage.common.auditor') }}</label>
|
||||
<el-tag
|
||||
type="warning"
|
||||
plain
|
||||
@@ -139,30 +139,30 @@
|
||||
{{
|
||||
(props.practitionerOption || []).find(
|
||||
(item) => item.value === localAuditForm.approverId
|
||||
)?.label || '暂无'
|
||||
)?.label || $t('medicineStorage.common.none')
|
||||
}}
|
||||
</el-tag>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="form-item">
|
||||
<label class="form-label">审核日期</label>
|
||||
<label class="form-label">{{ $t('medicineStorage.common.auditDate') }}</label>
|
||||
<el-tag
|
||||
type="primary"
|
||||
plain
|
||||
>
|
||||
{{ parseTime(localAuditForm.approvalTime, '{y}-{m}-{d} {h}:{i}:{s}') || '暂无' }}
|
||||
{{ parseTime(localAuditForm.approvalTime, '{y}-{m}-{d} {h}:{i}:{s}') || $t('medicineStorage.common.none') }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="form-item">
|
||||
<label class="form-label">审核状态:</label>
|
||||
<label class="form-label">{{ $t('medicineStorage.common.auditStatusLabel') }}</label>
|
||||
<el-tag
|
||||
:type="localAuditForm.statusEnum_enumText === '同意' ? 'success' : 'danger'"
|
||||
plain
|
||||
>
|
||||
{{ localAuditForm.statusEnum_enumText || '暂无' }}
|
||||
{{ localAuditForm.statusEnum_enumText || $t('medicineStorage.common.none') }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</el-col>
|
||||
@@ -179,7 +179,7 @@
|
||||
icon="Plus"
|
||||
@click="handleAddRow"
|
||||
>
|
||||
添加行
|
||||
{{ $t('medicineStorage.common.addRow') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -190,7 +190,7 @@
|
||||
icon="Delete"
|
||||
@click="handleDeleteRow"
|
||||
>
|
||||
删除行
|
||||
{{ $t('medicineStorage.common.deleteRow') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -201,7 +201,7 @@
|
||||
icon="Check"
|
||||
@click="handleSave"
|
||||
>
|
||||
保存
|
||||
{{ $t('medicineStorage.common.save') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -212,7 +212,7 @@
|
||||
icon="Upload"
|
||||
@click="handleOrderImport"
|
||||
>
|
||||
药房退货单导入
|
||||
{{ $t('medicineStorage.common.alertOrder') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -241,7 +241,7 @@
|
||||
/>
|
||||
<vxe-column
|
||||
field="itemBusNo"
|
||||
title="编号"
|
||||
:title="$t('medicineStorage.common.itemCode')"
|
||||
fixed
|
||||
width="180"
|
||||
align="center"
|
||||
@@ -259,7 +259,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="itemName"
|
||||
title="品名"
|
||||
:title="$t('medicineStorage.common.itemName')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -291,7 +291,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="totalVolume"
|
||||
title="规格"
|
||||
:title="$t('medicineStorage.common.spec')"
|
||||
width="140"
|
||||
align="center"
|
||||
>
|
||||
@@ -333,7 +333,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="unitCode"
|
||||
title="单位"
|
||||
:title="$t('medicineStorage.common.unit')"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
@@ -363,7 +363,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="itemQuantity"
|
||||
title="数量"
|
||||
:title="$t('medicineStorage.common.quantity')"
|
||||
width="120"
|
||||
:rules="rules.itemQuantity"
|
||||
align="center"
|
||||
@@ -388,7 +388,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="price"
|
||||
title="进货价"
|
||||
:title="$t('medicineStorage.common.purchasePrice')"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
@@ -402,7 +402,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="totalPrice"
|
||||
title="进价金额"
|
||||
:title="$t('medicineStorage.common.purchaseAmount')"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
@@ -416,7 +416,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="retailPrice"
|
||||
title="当前销售价"
|
||||
:title="$t('medicineStorage.common.retailPrice')"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
@@ -433,7 +433,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="totalRetailPrice"
|
||||
title="当前销售金额"
|
||||
:title="$t('medicineStorage.common.retailAmount')"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
@@ -486,7 +486,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="supplierId_dictText"
|
||||
title="供应商"
|
||||
:title="$t('medicineStorage.common.supplier')"
|
||||
width="220"
|
||||
align="center"
|
||||
>
|
||||
@@ -503,7 +503,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="manufacturerText"
|
||||
title="厂家/产地"
|
||||
:title="$t('medicineStorage.common.manufacturer')"
|
||||
width="220"
|
||||
align="center"
|
||||
>
|
||||
@@ -520,7 +520,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="specificationInventory"
|
||||
title="规格库存"
|
||||
:title="$t('medicineStorage.common.specStock')"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
@@ -647,7 +647,7 @@
|
||||
<!-- 备注 -->
|
||||
<vxe-column
|
||||
field="remake"
|
||||
title="备注"
|
||||
:title="$t('medicineStorage.common.remark')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -665,7 +665,7 @@
|
||||
</vxe-column>
|
||||
<!-- 操作 -->
|
||||
<vxe-column
|
||||
title="操作"
|
||||
:title="$t('medicineStorage.common.operation')"
|
||||
width="100"
|
||||
fixed="right"
|
||||
>
|
||||
@@ -717,13 +717,15 @@
|
||||
|
||||
<script setup>
|
||||
import {addOrEditOrder, getBusNo} from './api';
|
||||
import {nextTick, ref, watch} from 'vue';
|
||||
import {computed, nextTick, ref, watch} from 'vue';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import medicineList from './medicineList.vue';
|
||||
import orderDialog from './orderDialog.vue';
|
||||
import PopoverList from '@/components/HealthLinkHis/popoverList/index.vue';
|
||||
import {parseTime} from '@/utils/his';
|
||||
import TraceNoDialog from '@/components/HealthLinkHis/TraceNoDialog/index.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
// 获取当前实例
|
||||
const { proxy } = getCurrentInstance();
|
||||
// 调用父组件方法
|
||||
@@ -865,17 +867,17 @@ const localIsAddOrEditOrder = ref({
|
||||
isEditOrder: false,
|
||||
});
|
||||
// 验证规则
|
||||
const rules = {
|
||||
// busNo: [{ required: true, message: '请输入单据号', trigger: 'blur' }],
|
||||
supplierId: [{ required: true, message: '请输入供应商', trigger: 'blur' }],
|
||||
applicantId: [{ required: true, message: '请输入采购员', trigger: 'blur' }],
|
||||
categoryEnum: [{ required: true, message: '请输入单据类型', trigger: 'blur' }],
|
||||
applyTime: [{ required: true, message: '请输入开单日期', trigger: 'blur' }],
|
||||
itemBusNo: [{ required: true, message: '请输入编号', trigger: ['blur', 'change'] }],
|
||||
itemName: [{ required: true, message: '请输入品名', trigger: 'blur' }],
|
||||
totalVolume: [{ required: true, message: '请输入规格', trigger: 'blur' }],
|
||||
unitCode: [{ required: true, message: '请输入单位', trigger: 'blur' }],
|
||||
itemQuantity: [{ required: true, message: '请输入数量', trigger: 'blur' }],
|
||||
const rules = computed(() => ({
|
||||
// busNo: [{ required: true, message: t('medicineStorage.common.documentNo'), trigger: 'blur' }],
|
||||
supplierId: [{ required: true, message: t('medicineStorage.common.supplierLabel'), trigger: 'blur' }],
|
||||
applicantId: [{ required: true, message: t('medicineStorage.common.purchaserLabel'), trigger: 'blur' }],
|
||||
categoryEnum: [{ required: true, message: t('medicineStorage.common.documentType'), trigger: 'blur' }],
|
||||
applyTime: [{ required: true, message: t('medicineStorage.common.orderDate'), trigger: 'blur' }],
|
||||
itemBusNo: [{ required: true, message: t('medicineStorage.common.itemCode'), trigger: ['blur', 'change'] }],
|
||||
itemName: [{ required: true, message: t('medicineStorage.common.itemName'), trigger: 'blur' }],
|
||||
totalVolume: [{ required: true, message: t('medicineStorage.common.spec'), trigger: 'blur' }],
|
||||
unitCode: [{ required: true, message: t('medicineStorage.common.unit'), trigger: 'blur' }],
|
||||
itemQuantity: [{ required: true, message: t('medicineStorage.common.quantity'), trigger: 'blur' }],
|
||||
lotNumber: [{ required: true, message: '请输入产品批号', trigger: 'blur' }],
|
||||
sourceLocationId: [{ required: true, message: '请选择', trigger: 'blur' }],
|
||||
startTime: [
|
||||
@@ -920,22 +922,22 @@ const rules = {
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
packagingConditionEnum: [{ required: true, message: '请输入包装情况', trigger: 'blur' }],
|
||||
acceptanceResultEnum: [{ required: true, message: '请选择验收结果', trigger: 'blur' }],
|
||||
packagingConditionEnum: [{ required: true, message: t('medicineStorage.common.packagingCondition'), trigger: 'blur' }],
|
||||
acceptanceResultEnum: [{ required: true, message: t('medicineStorage.common.acceptanceResult'), trigger: 'blur' }],
|
||||
batchInventory: [{ required: true, message: '请输入批次库存', trigger: 'blur' }],
|
||||
traceNo: [{ required: true, message: '请输入药品追溯码', trigger: 'blur' }],
|
||||
traceNoUnitCode: [{ required: true, message: '请输入药品追溯码单位', trigger: 'blur' }],
|
||||
phone: [{ required: true, message: '请输入供应商联系人', trigger: 'blur' }],
|
||||
practitionerId: [{ required: true, message: '请输入申请人', trigger: 'blur' }],
|
||||
invoiceNo: [{ required: true, message: '请输入发票号', trigger: 'blur' }],
|
||||
// price: [{ required: true, message: '请输入进货价', trigger: 'blur' }],
|
||||
// totalPrice: [{ required: true, message: '请输入进价金额', trigger: 'blur' }],
|
||||
// retailPrice: [{ required: true, message: '请输入销售价', trigger: 'blur' }],
|
||||
// totalRetailPrice: [{ required: true, message: '请输入销售金额', trigger: 'blur' }],
|
||||
manufacturerText: [{ required: true, message: '请输入厂家/产地', trigger: 'blur' }],
|
||||
specificationInventory: [{ required: true, message: '请输入规格库存', trigger: 'blur' }],
|
||||
approvalNumber: [{ required: true, message: '请输入批注文号', trigger: 'blur' }],
|
||||
};
|
||||
phone: [{ required: true, message: t('medicineStorage.common.supplierContact'), trigger: 'blur' }],
|
||||
practitionerId: [{ required: true, message: t('medicineStorage.common.applicant'), trigger: 'blur' }],
|
||||
invoiceNo: [{ required: true, message: t('medicineStorage.common.invoiceNo'), trigger: 'blur' }],
|
||||
// price: [{ required: true, message: t('medicineStorage.common.purchasePrice'), trigger: 'blur' }],
|
||||
// totalPrice: [{ required: true, message: t('medicineStorage.common.purchaseAmount'), trigger: 'blur' }],
|
||||
// retailPrice: [{ required: true, message: t('medicineStorage.common.retailPrice'), trigger: 'blur' }],
|
||||
// totalRetailPrice: [{ required: true, message: t('medicineStorage.common.retailAmount'), trigger: 'blur' }],
|
||||
manufacturerText: [{ required: true, message: t('medicineStorage.common.manufacturer'), trigger: 'blur' }],
|
||||
specificationInventory: [{ required: true, message: t('medicineStorage.common.specStock'), trigger: 'blur' }],
|
||||
approvalNumber: [{ required: true, message: t('medicineStorage.common.approvalNo'), trigger: 'blur' }],
|
||||
}));
|
||||
// 药品名称
|
||||
const ypName = ref('');
|
||||
// 药品追溯码
|
||||
@@ -1440,7 +1442,7 @@ const handleAddRow = async () => {
|
||||
|
||||
// 如果有数据,检查是否有空行
|
||||
if (isEmptyRow()) {
|
||||
proxy.$message.error('请填写完整信息');
|
||||
proxy.$message.error(t('medicineStorage.common.pleaseFillComplete'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1492,9 +1494,9 @@ const handleSave = async () => {
|
||||
const currentFormData = JSON.parse(JSON.stringify(localForm.value));
|
||||
|
||||
// 是否确认保存数据
|
||||
const isConfirm = await proxy.$modal.confirm('确认保存数据吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
const isConfirm = await proxy.$modal.confirm(t('medicineStorage.common.confirmSave'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
});
|
||||
if (!isConfirm) {
|
||||
@@ -1510,7 +1512,7 @@ const handleSave = async () => {
|
||||
if (localIsAddOrEditOrder.value.isAddOrder) {
|
||||
addOrEditOrder(editData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$message.success('新增成功');
|
||||
proxy.$message.success(t('medicineStorage.common.addSuccess'));
|
||||
// 调用父组件的 getList 方法
|
||||
emit('getList');
|
||||
// 清空表单
|
||||
@@ -1522,13 +1524,13 @@ const handleSave = async () => {
|
||||
} else if (localIsAddOrEditOrder.value.isEditOrder) {
|
||||
addOrEditOrder(editData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$message.success('保存成功');
|
||||
proxy.$message.success(t('medicineStorage.common.saveSuccess'));
|
||||
// 调用父组件的 getList 方法
|
||||
emit('getList');
|
||||
// 清空表单
|
||||
resetAllData();
|
||||
} else {
|
||||
proxy.$message.error('保存失败');
|
||||
proxy.$message.error(t('medicineStorage.common.saveFailed'));
|
||||
}
|
||||
// 关闭加载
|
||||
loading.value = false;
|
||||
@@ -1615,14 +1617,14 @@ const resetAllData = () => {
|
||||
// 删除行
|
||||
const handleDeleteRow = () => {
|
||||
if (selectedRows.value.length === 0) {
|
||||
proxy.$message.warning('请选择要删除的行');
|
||||
proxy.$message.warning(t('medicineStorage.common.pleaseSelectDeleteRow'));
|
||||
return;
|
||||
}
|
||||
|
||||
proxy
|
||||
.$confirm('确认删除选中的行吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
.$confirm(t('medicineStorage.common.confirmDeleteRow'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
@@ -1677,7 +1679,7 @@ const handleDeleteRow = () => {
|
||||
});
|
||||
}
|
||||
|
||||
proxy.$message.success('删除成功');
|
||||
proxy.$message.success(t('medicineStorage.common.deleteSuccess'));
|
||||
})
|
||||
.catch(() => {
|
||||
// 用户取消删除
|
||||
@@ -1840,4 +1842,4 @@ defineExpose({
|
||||
.table-container {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
:disabled="isAddDisabled"
|
||||
@click="handleAdd"
|
||||
>
|
||||
新增
|
||||
{{ $t('medicineStorage.common.add') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
@@ -38,7 +38,7 @@
|
||||
:disabled="isDeleteDisabled"
|
||||
@click="handleDelete"
|
||||
>
|
||||
删除
|
||||
{{ $t('medicineStorage.common.delete') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -50,7 +50,7 @@
|
||||
:disabled="isCancelDisabled"
|
||||
@click="handleCancel"
|
||||
>
|
||||
取消
|
||||
{{ $t('medicineStorage.common.cancel') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -62,7 +62,7 @@
|
||||
:disabled="isAuditDisabled"
|
||||
@click="handleAudit"
|
||||
>
|
||||
审核
|
||||
{{ $t('medicineStorage.common.audit') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -84,12 +84,12 @@
|
||||
:rules="rules"
|
||||
>
|
||||
<el-form-item
|
||||
label="库房:"
|
||||
:label="$t('medicineStorage.common.warehouse') + ':'"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-select
|
||||
v-model="tableForm.locationId"
|
||||
placeholder="请选择库房"
|
||||
:placeholder="$t('medicineStorage.common.pleaseSelectWarehouse')"
|
||||
clearable
|
||||
filterable
|
||||
@change="handleLocationChange(tableForm.locationId)"
|
||||
@@ -114,12 +114,12 @@
|
||||
@submit.prevent
|
||||
>
|
||||
<el-form-item
|
||||
label="单据搜索"
|
||||
:label="$t('medicineStorage.common.documentSearch')"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入单据号"
|
||||
:placeholder="$t('medicineStorage.common.enterDocumentNo')"
|
||||
clearable
|
||||
@keyup.enter="getList"
|
||||
>
|
||||
@@ -162,14 +162,14 @@
|
||||
<el-icon class="info-icon">
|
||||
<User />
|
||||
</el-icon>
|
||||
<span class="label">采购员:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.purchaser') }}:</span>
|
||||
<span class="value">{{ item.applicantId_dictText }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<el-icon class="info-icon">
|
||||
<User />
|
||||
</el-icon>
|
||||
<span class="label">审核状态:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.auditStatus') }}:</span>
|
||||
<el-tag
|
||||
v-if="item.statusEnum_enumText === '同意'"
|
||||
type="success"
|
||||
@@ -187,14 +187,14 @@
|
||||
<el-icon class="info-icon">
|
||||
<Files />
|
||||
</el-icon>
|
||||
<span class="label">单据类型:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.documentType') }}:</span>
|
||||
<span class="value">{{ item.typeEnum_enumText }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<el-icon class="info-icon">
|
||||
<Calendar />
|
||||
</el-icon>
|
||||
<span class="label">单据日期:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.documentDate') }}:</span>
|
||||
<span class="value">{{
|
||||
parseTime(item.applyTime, '{y}-{m}-{d} {h}:{i}:{s}')
|
||||
}}</span>
|
||||
@@ -210,14 +210,14 @@
|
||||
class="empty-state"
|
||||
>
|
||||
<el-empty
|
||||
description="暂无单据"
|
||||
:description="$t('medicineStorage.common.noDocuments')"
|
||||
:image-size="80"
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleAdd"
|
||||
>
|
||||
新增单据
|
||||
{{ $t('medicineStorage.common.addDocument') }}
|
||||
</el-button>
|
||||
</el-empty>
|
||||
</div>
|
||||
@@ -258,13 +258,15 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {ref} from 'vue';
|
||||
import {computed, ref} from 'vue';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import {useRoute, useRouter} from 'vue-router';
|
||||
import orderTable from './components/orderTable.vue';
|
||||
import {agreeApproval, deleteOrder, getInit, getOrderDetail, getOrderList,} from './components/api';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import {parseTime} from '@/utils/his';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
@@ -343,9 +345,9 @@ const buttonShow = ref({
|
||||
isSaveShow: false,
|
||||
isEditShow: false,
|
||||
});
|
||||
const rules = ref({
|
||||
locationId: [{ required: true, message: '请选择库房', trigger: 'blur' }],
|
||||
});
|
||||
const rules = computed(() => ({
|
||||
locationId: [{ required: true, message: t('medicineStorage.common.pleaseSelectWarehouse'), trigger: 'blur' }],
|
||||
}));
|
||||
|
||||
// 初始化 获取下拉列表
|
||||
const init = async () => {
|
||||
@@ -383,7 +385,7 @@ const handleAdd = async () => {
|
||||
resetFormAndTableData();
|
||||
// 校验库房ID
|
||||
if (!tableForm.value.locationId) {
|
||||
proxy.$modal.msgWarning('新增单据前,请选择库房');
|
||||
proxy.$modal.msgWarning(t('medicineStorage.common.pleaseSelectWarehouse'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -448,7 +450,7 @@ const handleEdit = async (order) => {
|
||||
resetFormAndTableData();
|
||||
|
||||
if (!selectedOrder.value) {
|
||||
proxy.$modal.msgError('请选择要编辑的单据');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.pleaseSelectEdit'));
|
||||
return;
|
||||
}
|
||||
const res = await getOrderDetail({
|
||||
@@ -731,26 +733,26 @@ const clearForm = () => {
|
||||
// 删除按钮
|
||||
const handleDelete = async () => {
|
||||
if (!selectedOrder.value) {
|
||||
proxy.$modal.msgError('请选择要删除的单据');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.pleaseSelectDelete'));
|
||||
return;
|
||||
}
|
||||
|
||||
// 校验是否可以删除(已审批的单据不能删除)
|
||||
if (selectedOrder.value.statusEnum_enumText === '同意' || selectedOrder.value.statusEnum === 3) {
|
||||
proxy.$modal.msgError('已审批的单据不能删除');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.approvedCannotDelete'));
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await proxy.$modal.confirm('确认删除该采购单吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
await proxy.$modal.confirm(t('medicineStorage.common.confirmDelete'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
});
|
||||
|
||||
// 删除单据
|
||||
await deleteOrder(selectedOrder.value.supplyBusNo);
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
proxy.$modal.msgSuccess(t('medicineStorage.common.deleteSuccess'));
|
||||
// 清空右侧表格数据
|
||||
clearForm();
|
||||
// 重新获取列表 库房ID
|
||||
@@ -783,7 +785,7 @@ const handleDelete = async () => {
|
||||
});
|
||||
} catch (error) {
|
||||
if (error !== 'cancel') {
|
||||
proxy.$modal.msgError('删除失败');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.deleteFailed'));
|
||||
console.error('删除失败:', error);
|
||||
}
|
||||
}
|
||||
@@ -791,26 +793,26 @@ const handleDelete = async () => {
|
||||
// 审核按钮
|
||||
const handleAudit = async () => {
|
||||
if (!selectedOrder.value) {
|
||||
proxy.$modal.msgError('请选择要审核的单据');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.pleaseSelectAudit'));
|
||||
return;
|
||||
}
|
||||
|
||||
// 校验是否是已审批状态
|
||||
if (selectedOrder.value.statusEnum_enumText === '同意' || selectedOrder.value.statusEnum === 3) {
|
||||
proxy.$modal.msgError('该单据已审批,不能重复审批');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.approvedCannotAudit'));
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await proxy.$modal.confirm('确认同意该采购单吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
await proxy.$modal.confirm(t('medicineStorage.common.confirmAudit'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
});
|
||||
|
||||
// 同意审批
|
||||
await agreeApproval(selectedOrder.value.supplyBusNo);
|
||||
proxy.$modal.msgSuccess('同意审批成功');
|
||||
proxy.$modal.msgSuccess(t('medicineStorage.common.auditSuccess'));
|
||||
// 编辑
|
||||
handleEdit(selectedOrder);
|
||||
// 重新获取列表
|
||||
@@ -843,7 +845,7 @@ const handleAudit = async () => {
|
||||
});
|
||||
} catch (error) {
|
||||
if (error !== 'cancel') {
|
||||
proxy.$modal.msgError('同意审批失败');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.auditFailed'));
|
||||
console.error('同意审批失败:', error);
|
||||
}
|
||||
}
|
||||
@@ -1102,4 +1104,4 @@ init();
|
||||
height: 150px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div>
|
||||
<vxe-table
|
||||
ref="medicineRef"
|
||||
@@ -7,55 +7,55 @@
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<vxe-column
|
||||
title="项目编码"
|
||||
:title="$t('medicineStorage.common.itemCode')"
|
||||
align="center"
|
||||
field="busNo"
|
||||
width="150"
|
||||
/>
|
||||
<vxe-column
|
||||
title="项目名称"
|
||||
:title="$t('medicineStorage.common.itemName')"
|
||||
align="center"
|
||||
field="name"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
title="进货价"
|
||||
:title="$t('medicineStorage.common.purchasePrice')"
|
||||
align="center"
|
||||
field="price"
|
||||
/>
|
||||
<vxe-column
|
||||
title="零售价"
|
||||
:title="$t('medicineStorage.common.retailPrice')"
|
||||
align="center"
|
||||
field="retailPrice"
|
||||
/>
|
||||
<vxe-column
|
||||
title="包装单位"
|
||||
:title="$t('medicineStorage.common.unit')"
|
||||
align="center"
|
||||
field="unitCode_dictText"
|
||||
/>
|
||||
<vxe-column
|
||||
title="最小单位"
|
||||
:title="$t('medicineStorage.common.unit')"
|
||||
align="center"
|
||||
field="minUnitCode_dictText"
|
||||
/>
|
||||
<vxe-column
|
||||
title="规格"
|
||||
:title="$t('medicineStorage.common.spec')"
|
||||
align="center"
|
||||
field="totalVolume"
|
||||
/>
|
||||
<vxe-column
|
||||
title="规格库存"
|
||||
:title="$t('medicineStorage.common.specStock')"
|
||||
align="center"
|
||||
field="specificationInventory"
|
||||
/>
|
||||
<!-- <vxe-column title="批次库存" align="center" field="batchInventory" /> -->
|
||||
<!-- <vxe-column :title="$t('medicineStorage.common.specStock')" align="center" field="batchInventory" /> -->
|
||||
<vxe-column
|
||||
title="生产厂家"
|
||||
:title="$t('medicineStorage.common.manufacturer')"
|
||||
align="center"
|
||||
field="manufacturerText"
|
||||
/>
|
||||
<vxe-column
|
||||
title="批准文号"
|
||||
:title="$t('medicineStorage.common.approvalNo')"
|
||||
align="center"
|
||||
field="approvalNumber"
|
||||
/>
|
||||
@@ -66,8 +66,11 @@
|
||||
<script setup>
|
||||
import {getMedicineList} from './api';
|
||||
import {watch} from 'vue';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import {throttle} from 'lodash-es';
|
||||
|
||||
const {t} = useI18n();
|
||||
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
type: String,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-model="localDialogVisible"
|
||||
title="订单列表"
|
||||
:title="$t('medicineStorage.common.orderList')"
|
||||
width="960px"
|
||||
teleported
|
||||
@close="resetAllData"
|
||||
@@ -17,25 +17,25 @@
|
||||
@cell-click="handleRowClick"
|
||||
>
|
||||
<vxe-column
|
||||
title="订单编号"
|
||||
:title="$t('medicineStorage.common.orderNo')"
|
||||
field="supplyBusNo"
|
||||
width="200"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="采购员"
|
||||
:title="$t('medicineStorage.common.purchaser')"
|
||||
field="applicantId_dictText"
|
||||
width="100"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="供应商"
|
||||
:title="$t('medicineStorage.common.supplier')"
|
||||
field="supplierId_dictText"
|
||||
width="220"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="审核状态"
|
||||
:title="$t('medicineStorage.common.auditStatus')"
|
||||
field="statusEnum_enumText"
|
||||
width="100"
|
||||
align="center"
|
||||
@@ -56,13 +56,13 @@
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
title="单据类型"
|
||||
:title="$t('medicineStorage.common.documentType')"
|
||||
field="typeEnum_enumText"
|
||||
width="100"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="单据日期"
|
||||
:title="$t('medicineStorage.common.documentDate')"
|
||||
field="applyTime"
|
||||
width="200"
|
||||
align="center"
|
||||
@@ -90,13 +90,13 @@
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="handleCancel">
|
||||
取消
|
||||
{{ $t('medicineStorage.common.cancel') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleSubmit"
|
||||
>
|
||||
确认
|
||||
{{ $t('medicineStorage.common.confirm') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -107,7 +107,10 @@
|
||||
<script setup>
|
||||
import {getPurchaseOrderDetail, getPurchaseOrderList} from './api';
|
||||
import {getCurrentInstance, ref, watch} from 'vue';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import {parseTime} from '@/utils/his';
|
||||
|
||||
const {t} = useI18n();
|
||||
// 调用父组件方法
|
||||
const emit = defineEmits(['dialogSubmit', 'dialogCancel', 'updateTableData']);
|
||||
// 获取当前实例
|
||||
@@ -200,7 +203,7 @@ const getOrderList = async (locationId) => {
|
||||
// 订货单列表总条数
|
||||
localTableDataTotal.value = res.data.total;
|
||||
} else {
|
||||
proxy.$message.error('获取订货单列表失败');
|
||||
proxy.$message.error(t('medicineStorage.common.noMedicineFound'));
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取订货单列表失败:', error);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div>
|
||||
<el-row :gutter="10">
|
||||
<el-form
|
||||
@@ -10,7 +10,7 @@
|
||||
>
|
||||
<el-row :gutter="10">
|
||||
<el-form-item
|
||||
label="单据号"
|
||||
:label="$t('medicineStorage.common.documentNo')"
|
||||
prop="busNo"
|
||||
>
|
||||
<el-input
|
||||
@@ -21,12 +21,12 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="开单日期"
|
||||
:label="$t('medicineStorage.common.orderDate')"
|
||||
prop="applyTime"
|
||||
>
|
||||
<el-date-picker
|
||||
v-model="localForm.applyTime"
|
||||
placeholder="请选择开单日期"
|
||||
:placeholder="$t('medicineStorage.common.selectOrderDate')"
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
@@ -35,12 +35,12 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
label="供应商"
|
||||
:label="$t('medicineStorage.common.supplierLabel')"
|
||||
prop="supplierId"
|
||||
>
|
||||
<el-select
|
||||
v-model="localForm.supplierId"
|
||||
placeholder="请选择供应商"
|
||||
:placeholder="$t('medicineStorage.common.selectSupplier')"
|
||||
style="width: 180px"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
clearable
|
||||
@@ -56,23 +56,23 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
label="供应商联系人"
|
||||
:label="$t('medicineStorage.common.supplierContact')"
|
||||
prop="phone"
|
||||
>
|
||||
<el-input
|
||||
v-model="localForm.phone"
|
||||
placeholder="请输入供应商联系人"
|
||||
:placeholder="$t('medicineStorage.common.enterSupplierContact')"
|
||||
style="width: 220px"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="采购员"
|
||||
:label="$t('medicineStorage.common.purchaserLabel')"
|
||||
prop="practitionerId"
|
||||
>
|
||||
<el-select
|
||||
v-model="localForm.practitionerId"
|
||||
placeholder="请输入采购员"
|
||||
:placeholder="$t('medicineStorage.common.selectPurchaser')"
|
||||
style="width: 140px"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
clearable
|
||||
@@ -86,12 +86,12 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="开单人"
|
||||
:label="$t('medicineStorage.common.orderMaker')"
|
||||
prop="applicantId"
|
||||
>
|
||||
<el-select
|
||||
v-model="localForm.applicantId"
|
||||
placeholder="请选择开单人"
|
||||
:placeholder="$t('medicineStorage.common.selectOrderMaker')"
|
||||
style="width: 140px"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
clearable
|
||||
@@ -105,12 +105,12 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="单据分类"
|
||||
:label="$t('medicineStorage.common.categoryLabel')"
|
||||
prop="categoryEnum"
|
||||
>
|
||||
<el-select
|
||||
v-model="localForm.categoryEnum"
|
||||
placeholder="请选择单据分类"
|
||||
:placeholder="$t('medicineStorage.common.selectCategory')"
|
||||
style="width: 180px"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
clearable
|
||||
@@ -124,25 +124,25 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="发票号"
|
||||
:label="$t('medicineStorage.common.invoiceNo')"
|
||||
prop="invoiceNo"
|
||||
>
|
||||
<el-input
|
||||
v-model="localForm.invoiceNo"
|
||||
placeholder="请输入发票号"
|
||||
:placeholder="$t('medicineStorage.common.invoiceNo')"
|
||||
clearable
|
||||
style="width: 180px"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="摘要(A)"
|
||||
:label="$t('medicineStorage.common.summary') + '(A)'"
|
||||
prop="reason"
|
||||
>
|
||||
<el-input
|
||||
v-model="localForm.reason"
|
||||
type="textarea"
|
||||
placeholder="请输入摘要"
|
||||
:placeholder="$t('medicineStorage.common.enterSummary')"
|
||||
style="width: 300px"
|
||||
:rows="1"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
@@ -156,7 +156,7 @@
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<div class="form-item">
|
||||
<label class="form-label">审核人</label>
|
||||
<label class="form-label">{{ $t('medicineStorage.common.auditor') }}</label>
|
||||
<el-tag
|
||||
type="warning"
|
||||
plain
|
||||
@@ -164,30 +164,30 @@
|
||||
{{
|
||||
(props.practitionerOption || []).find(
|
||||
(item) => item.value === localAuditForm.approverId
|
||||
)?.label || '暂无'
|
||||
)?.label || $t('medicineStorage.common.none')
|
||||
}}
|
||||
</el-tag>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="form-item">
|
||||
<label class="form-label">审核日期</label>
|
||||
<label class="form-label">{{ $t('medicineStorage.common.auditDate') }}</label>
|
||||
<el-tag
|
||||
type="primary"
|
||||
plain
|
||||
>
|
||||
{{ parseTime(localAuditForm.approvalTime, '{y}-{m}-{d} {h}:{i}:{s}') || '暂无' }}
|
||||
{{ parseTime(localAuditForm.approvalTime, '{y}-{m}-{d} {h}:{i}:{s}') || $t('medicineStorage.common.none') }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="form-item">
|
||||
<label class="form-label">审核状态:</label>
|
||||
<label class="form-label">{{ $t('medicineStorage.common.auditStatusLabel') }}:</label>
|
||||
<el-tag
|
||||
:type="localAuditForm.statusEnum_enumText === '同意' ? 'success' : 'danger'"
|
||||
plain
|
||||
>
|
||||
{{ localAuditForm.statusEnum_enumText || '暂无' }}
|
||||
{{ localAuditForm.statusEnum_enumText || $t('medicineStorage.common.none') }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</el-col>
|
||||
@@ -204,7 +204,7 @@
|
||||
icon="Plus"
|
||||
@click="handleAddRow"
|
||||
>
|
||||
添加行
|
||||
{{ $t('medicineStorage.common.addRow') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -215,7 +215,7 @@
|
||||
icon="Delete"
|
||||
@click="handleDeleteRow"
|
||||
>
|
||||
删除行
|
||||
{{ $t('medicineStorage.common.deleteRow') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -226,7 +226,7 @@
|
||||
icon="Check"
|
||||
@click="handleSave"
|
||||
>
|
||||
保存
|
||||
{{ $t('medicineStorage.common.save') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -237,7 +237,7 @@
|
||||
icon="Upload"
|
||||
@click="handleOrderImport"
|
||||
>
|
||||
订货单导入
|
||||
{{ $t('medicineStorage.common.alertOrder') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -267,7 +267,7 @@
|
||||
/>
|
||||
<vxe-column
|
||||
field="itemBusNo"
|
||||
title="编号"
|
||||
:title="$t('medicineStorage.common.itemCode')"
|
||||
fixed
|
||||
width="180"
|
||||
align="center"
|
||||
@@ -285,7 +285,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="itemName"
|
||||
title="品名"
|
||||
:title="$t('medicineStorage.common.itemName')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -316,7 +316,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="totalVolume"
|
||||
title="规格"
|
||||
:title="$t('medicineStorage.common.spec')"
|
||||
width="140"
|
||||
align="center"
|
||||
>
|
||||
@@ -334,7 +334,7 @@
|
||||
<!-- 产品批号 -->
|
||||
<vxe-column
|
||||
field="lotNumber"
|
||||
title="产品批号"
|
||||
:title="$t('medicineStorage.common.itemCode')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -347,7 +347,7 @@
|
||||
v-if="localTableData[scope.rowIndex].isEditing"
|
||||
v-model="localTableData[scope.rowIndex].lotNumber"
|
||||
clearable
|
||||
placeholder="请输入产品批号"
|
||||
:placeholder="$t('medicineStorage.common.itemCode')"
|
||||
style="width: 180px"
|
||||
/>
|
||||
<span v-else-if="localTableData[scope.rowIndex].isViewing">
|
||||
@@ -358,7 +358,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="unitCode"
|
||||
title="单位"
|
||||
:title="$t('medicineStorage.common.unit')"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
@@ -388,7 +388,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="itemQuantity"
|
||||
title="数量"
|
||||
:title="$t('medicineStorage.common.quantity')"
|
||||
width="120"
|
||||
:rules="rules.itemQuantity"
|
||||
align="center"
|
||||
@@ -413,7 +413,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="price"
|
||||
title="进货价"
|
||||
:title="$t('medicineStorage.common.purchasePrice')"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
@@ -423,7 +423,7 @@
|
||||
v-if="localTableData[scope.rowIndex].isEditing"
|
||||
v-model="localTableData[scope.rowIndex].price"
|
||||
clearable
|
||||
placeholder="请输入进货价"
|
||||
:placeholder="$t('medicineStorage.common.purchasePrice')"
|
||||
style="width: 180px"
|
||||
@change="handleItemPriceChange(localTableData[scope.rowIndex])"
|
||||
/>
|
||||
@@ -435,7 +435,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="totalPrice"
|
||||
title="进价金额"
|
||||
:title="$t('medicineStorage.common.purchaseAmount')"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
@@ -449,7 +449,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="retailPrice"
|
||||
title="当前销售价"
|
||||
:title="$t('medicineStorage.common.retailPrice')"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
@@ -462,7 +462,7 @@
|
||||
v-if="localTableData[scope.rowIndex].isEditing"
|
||||
v-model="localTableData[scope.rowIndex].retailPrice"
|
||||
clearable
|
||||
placeholder="请输入当前销售价"
|
||||
:placeholder="$t('medicineStorage.common.retailPrice')"
|
||||
style="width: 180px"
|
||||
@change="handleItemRetailPriceChange(localTableData[scope.rowIndex])"
|
||||
/>
|
||||
@@ -474,7 +474,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="totalRetailPrice"
|
||||
title="当前销售金额"
|
||||
:title="$t('medicineStorage.common.retailAmount')"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
@@ -492,7 +492,7 @@
|
||||
<!-- 生产日期 -->
|
||||
<vxe-column
|
||||
field="startTime"
|
||||
title="生产日期"
|
||||
:title="$t('medicineStorage.common.orderDate')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -505,7 +505,7 @@
|
||||
v-if="localTableData[scope.rowIndex].isEditing"
|
||||
v-model="localTableData[scope.rowIndex].startTime"
|
||||
type="date"
|
||||
placeholder="请选择生产日期"
|
||||
:placeholder="$t('medicineStorage.common.selectOrderDate')"
|
||||
style="width: 180px"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
@@ -518,7 +518,7 @@
|
||||
<!-- 失效日期 -->
|
||||
<vxe-column
|
||||
field="endTime"
|
||||
title="失效日期"
|
||||
:title="$t('medicineStorage.common.orderDate')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -531,7 +531,7 @@
|
||||
v-if="localTableData[scope.rowIndex].isEditing"
|
||||
v-model="localTableData[scope.rowIndex].endTime"
|
||||
type="date"
|
||||
placeholder="请选择失效日期"
|
||||
:placeholder="$t('medicineStorage.common.selectOrderDate')"
|
||||
style="width: 180px"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
@@ -543,7 +543,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="manufacturerText"
|
||||
title="厂家/产地"
|
||||
:title="$t('medicineStorage.common.manufacturer')"
|
||||
width="220"
|
||||
align="center"
|
||||
>
|
||||
@@ -560,7 +560,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="specificationInventory"
|
||||
title="规格库存"
|
||||
:title="$t('medicineStorage.common.specStock')"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
@@ -597,7 +597,7 @@
|
||||
<!-- 批次库存 -->
|
||||
<vxe-column
|
||||
field="batchInventory"
|
||||
title="批次库存"
|
||||
:title="$t('medicineStorage.common.specStock')"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
@@ -630,7 +630,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="approvalNumber"
|
||||
title="批注文号"
|
||||
:title="$t('medicineStorage.common.approvalNo')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -648,7 +648,7 @@
|
||||
<!-- 包装情况 -->
|
||||
<vxe-column
|
||||
field="packagingConditionEnum"
|
||||
title="包装情况"
|
||||
:title="$t('medicineStorage.common.packagingCondition')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -660,7 +660,7 @@
|
||||
<el-select
|
||||
v-if="localTableData[scope.rowIndex].isEditing"
|
||||
v-model="localTableData[scope.rowIndex].packagingConditionEnum"
|
||||
placeholder="请选择包装情况"
|
||||
:placeholder="$t('medicineStorage.common.selectPackagingCondition')"
|
||||
style="width: 180px"
|
||||
>
|
||||
<el-option
|
||||
@@ -679,7 +679,7 @@
|
||||
<!-- 验收结果 -->
|
||||
<vxe-column
|
||||
field="acceptanceResultEnum"
|
||||
title="验收结果"
|
||||
:title="$t('medicineStorage.common.acceptanceResult')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -691,7 +691,7 @@
|
||||
<el-select
|
||||
v-if="localTableData[scope.rowIndex].isEditing"
|
||||
v-model="localTableData[scope.rowIndex].acceptanceResultEnum"
|
||||
placeholder="请选择验收结果"
|
||||
:placeholder="$t('medicineStorage.common.selectAcceptanceResult')"
|
||||
style="width: 180px"
|
||||
>
|
||||
<el-option
|
||||
@@ -711,7 +711,7 @@
|
||||
<!-- 药品追溯码 -->
|
||||
<vxe-column
|
||||
field="traceNo"
|
||||
title="药品追溯码"
|
||||
:title="$t('medicineStorage.common.approvalNo')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -724,7 +724,7 @@
|
||||
v-if="localTableData[scope.rowIndex].isEditing"
|
||||
v-model="localTableData[scope.rowIndex].traceNo"
|
||||
clearable
|
||||
placeholder="请输入药品追溯码"
|
||||
:placeholder="$t('medicineStorage.common.approvalNo')"
|
||||
style="width: 180px"
|
||||
/>
|
||||
<span v-else-if="localTableData[scope.rowIndex].isViewing">
|
||||
@@ -736,7 +736,7 @@
|
||||
<!-- 药品追溯码单位 -->
|
||||
<vxe-column
|
||||
field="traceNoUnitCode"
|
||||
title="药品追溯码单位"
|
||||
:title="$t('medicineStorage.common.unit')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -748,7 +748,7 @@
|
||||
<el-select
|
||||
v-if="localTableData[scope.rowIndex].isEditing"
|
||||
v-model="localTableData[scope.rowIndex].traceNoUnitCode"
|
||||
placeholder="请选择药品追溯码单位"
|
||||
:placeholder="$t('medicineStorage.common.unit')"
|
||||
style="width: 180px"
|
||||
>
|
||||
<el-option
|
||||
@@ -767,7 +767,7 @@
|
||||
<!-- 备注 -->
|
||||
<vxe-column
|
||||
field="remake"
|
||||
title="备注"
|
||||
:title="$t('medicineStorage.common.remark')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -785,7 +785,7 @@
|
||||
</vxe-column>
|
||||
<!-- 操作 -->
|
||||
<vxe-column
|
||||
title="操作"
|
||||
:title="$t('medicineStorage.common.remark')"
|
||||
width="100"
|
||||
fixed="right"
|
||||
>
|
||||
@@ -796,7 +796,7 @@
|
||||
icon="Edit"
|
||||
@click="handleScan(scope.row, scope.rowIndex)"
|
||||
>
|
||||
扫码
|
||||
{{ $t('medicineStorage.common.view') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</vxe-column>
|
||||
@@ -837,13 +837,16 @@
|
||||
|
||||
<script setup>
|
||||
import {addOrEditOrder, getBusNo} from './api';
|
||||
import {nextTick, ref, watch} from 'vue';
|
||||
import {computed, nextTick, ref, watch} from 'vue';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import medicineList from './medicineList.vue';
|
||||
import orderDialog from './orderDialog.vue';
|
||||
import PopoverList from '@/components/HealthLinkHis/popoverList/index.vue';
|
||||
import {parseTime} from '@/utils/his';
|
||||
import TraceNoDialog from '@/components/HealthLinkHis/TraceNoDialog/index.vue';
|
||||
|
||||
const {t} = useI18n();
|
||||
|
||||
// 获取当前实例
|
||||
const { proxy } = getCurrentInstance();
|
||||
// 调用父组件方法
|
||||
@@ -980,29 +983,29 @@ const localIsAddOrEditOrder = ref({
|
||||
isEditOrder: false,
|
||||
});
|
||||
// 验证规则
|
||||
const rules = {
|
||||
// busNo: [{ required: true, message: '请输入单据号', trigger: 'blur' }],
|
||||
supplierId: [{ required: true, message: '请输入供应商', trigger: 'blur' }],
|
||||
applicantId: [{ required: true, message: '请输入采购员', trigger: 'blur' }],
|
||||
categoryEnum: [{ required: true, message: '请输入单据类型', trigger: 'blur' }],
|
||||
applyTime: [{ required: true, message: '请输入开单日期', trigger: 'blur' }],
|
||||
itemBusNo: [{ required: true, message: '请输入编号', trigger: ['blur', 'change'] }],
|
||||
itemName: [{ required: true, message: '请输入品名', trigger: 'blur' }],
|
||||
totalVolume: [{ required: true, message: '请输入规格', trigger: 'blur' }],
|
||||
unitCode: [{ required: true, message: '请输入单位', trigger: 'blur' }],
|
||||
itemQuantity: [{ required: true, message: '请输入数量', trigger: 'blur' }],
|
||||
lotNumber: [{ required: true, message: '请输入产品批号', trigger: 'blur' }],
|
||||
const rules = computed(() => ({
|
||||
// busNo: [{ required: true, message: t('medicineStorage.common.documentNo'), trigger: 'blur' }],
|
||||
supplierId: [{ required: true, message: t('medicineStorage.common.supplierLabel'), trigger: 'blur' }],
|
||||
applicantId: [{ required: true, message: t('medicineStorage.common.purchaserLabel'), trigger: 'blur' }],
|
||||
categoryEnum: [{ required: true, message: t('medicineStorage.common.categoryLabel'), trigger: 'blur' }],
|
||||
applyTime: [{ required: true, message: t('medicineStorage.common.orderDate'), trigger: 'blur' }],
|
||||
itemBusNo: [{ required: true, message: t('medicineStorage.common.itemCode'), trigger: ['blur', 'change'] }],
|
||||
itemName: [{ required: true, message: t('medicineStorage.common.itemName'), trigger: 'blur' }],
|
||||
totalVolume: [{ required: true, message: t('medicineStorage.common.spec'), trigger: 'blur' }],
|
||||
unitCode: [{ required: true, message: t('medicineStorage.common.unit'), trigger: 'blur' }],
|
||||
itemQuantity: [{ required: true, message: t('medicineStorage.common.quantity'), trigger: 'blur' }],
|
||||
lotNumber: [{ required: true, message: t('medicineStorage.common.itemCode'), trigger: 'blur' }],
|
||||
startTime: [
|
||||
{ required: true, message: '请输入生产日期', trigger: 'blur' },
|
||||
{ required: true, message: t('medicineStorage.common.orderDate'), trigger: 'blur' },
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (value) {
|
||||
const currentRow = rule.field.split('.')[1]; // 获取当前行索引
|
||||
const currentRow = rule.field.split('.')[1];
|
||||
const rowIndex = parseInt(currentRow);
|
||||
const endTime = localTableData.value[rowIndex]?.endTime;
|
||||
|
||||
if (endTime && value > endTime) {
|
||||
callback(new Error('生产日期不能大于失效日期'));
|
||||
callback(new Error(t('medicineStorage.common.pleaseFillComplete')));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
@@ -1014,16 +1017,16 @@ const rules = {
|
||||
},
|
||||
],
|
||||
endTime: [
|
||||
{ required: true, message: '请输入失效日期', trigger: 'blur' },
|
||||
{ required: true, message: t('medicineStorage.common.orderDate'), trigger: 'blur' },
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (value) {
|
||||
const currentRow = rule.field.split('.')[1]; // 获取当前行索引
|
||||
const currentRow = rule.field.split('.')[1];
|
||||
const rowIndex = parseInt(currentRow);
|
||||
const startTime = localTableData.value[rowIndex]?.startTime;
|
||||
|
||||
if (startTime && value < startTime) {
|
||||
callback(new Error('失效日期不能小于生产日期'));
|
||||
callback(new Error(t('medicineStorage.common.pleaseFillComplete')));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
@@ -1034,22 +1037,18 @@ const rules = {
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
packagingConditionEnum: [{ required: true, message: '请输入包装情况', trigger: 'blur' }],
|
||||
acceptanceResultEnum: [{ required: true, message: '请选择验收结果', trigger: 'blur' }],
|
||||
batchInventory: [{ required: true, message: '请输入批次库存', trigger: 'blur' }],
|
||||
traceNo: [{ required: true, message: '请输入药品追溯码', trigger: 'blur' }],
|
||||
traceNoUnitCode: [{ required: true, message: '请输入药品追溯码单位', trigger: 'blur' }],
|
||||
phone: [{ required: true, message: '请输入供应商联系人', trigger: 'blur' }],
|
||||
practitionerId: [{ required: true, message: '请输入开单人', trigger: 'blur' }],
|
||||
invoiceNo: [{ required: true, message: '请输入发票号', trigger: 'blur' }],
|
||||
// price: [{ required: true, message: '请输入进货价', trigger: 'blur' }],
|
||||
// totalPrice: [{ required: true, message: '请输入进价金额', trigger: 'blur' }],
|
||||
// retailPrice: [{ required: true, message: '请输入销售价', trigger: 'blur' }],
|
||||
// totalRetailPrice: [{ required: true, message: '请输入销售金额', trigger: 'blur' }],
|
||||
manufacturerText: [{ required: true, message: '请输入厂家/产地', trigger: 'blur' }],
|
||||
specificationInventory: [{ required: true, message: '请输入规格库存', trigger: 'blur' }],
|
||||
approvalNumber: [{ required: true, message: '请输入批注文号', trigger: 'blur' }],
|
||||
};
|
||||
packagingConditionEnum: [{ required: true, message: t('medicineStorage.common.packagingCondition'), trigger: 'blur' }],
|
||||
acceptanceResultEnum: [{ required: true, message: t('medicineStorage.common.acceptanceResult'), trigger: 'blur' }],
|
||||
batchInventory: [{ required: true, message: t('medicineStorage.common.specStock'), trigger: 'blur' }],
|
||||
traceNo: [{ required: true, message: t('medicineStorage.common.approvalNo'), trigger: 'blur' }],
|
||||
traceNoUnitCode: [{ required: true, message: t('medicineStorage.common.unit'), trigger: 'blur' }],
|
||||
phone: [{ required: true, message: t('medicineStorage.common.supplierContact'), trigger: 'blur' }],
|
||||
practitionerId: [{ required: true, message: t('medicineStorage.common.orderMaker'), trigger: 'blur' }],
|
||||
invoiceNo: [{ required: true, message: t('medicineStorage.common.invoiceNo'), trigger: 'blur' }],
|
||||
manufacturerText: [{ required: true, message: t('medicineStorage.common.manufacturer'), trigger: 'blur' }],
|
||||
specificationInventory: [{ required: true, message: t('medicineStorage.common.specStock'), trigger: 'blur' }],
|
||||
approvalNumber: [{ required: true, message: t('medicineStorage.common.approvalNo'), trigger: 'blur' }],
|
||||
}));
|
||||
// 药品名称
|
||||
const ypName = ref('');
|
||||
// 药品追溯码
|
||||
@@ -1190,7 +1189,7 @@ const handleScan = (row, index) => {
|
||||
// 设置当前索引
|
||||
currentIndex.value = index;
|
||||
} else {
|
||||
proxy.$message.warning('请先输入产品批号!');
|
||||
proxy.$message.warning(t('medicineStorage.common.itemCode'));
|
||||
}
|
||||
};
|
||||
// 药品追溯码提交
|
||||
@@ -1554,7 +1553,7 @@ const handleAddRow = async () => {
|
||||
|
||||
// 如果有数据,检查是否有空行
|
||||
if (isEmptyRow()) {
|
||||
proxy.$message.error('请填写完整信息');
|
||||
proxy.$message.error(t('medicineStorage.common.pleaseFillComplete'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1615,9 +1614,9 @@ const handleSave = async () => {
|
||||
const currentFormData = JSON.parse(JSON.stringify(localForm.value));
|
||||
|
||||
// 是否确认保存数据
|
||||
const isConfirm = await proxy.$modal.confirm('确认保存数据吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
const isConfirm = await proxy.$modal.confirm(t('medicineStorage.common.confirmSave'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
});
|
||||
if (!isConfirm) {
|
||||
@@ -1633,7 +1632,7 @@ const handleSave = async () => {
|
||||
if (localIsAddOrEditOrder.value.isAddOrder) {
|
||||
addOrEditOrder(editData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$message.success('新增成功');
|
||||
proxy.$message.success(t('medicineStorage.common.addSuccess'));
|
||||
// 调用父组件的 getList 方法
|
||||
emit('getList');
|
||||
// 清空表单
|
||||
@@ -1645,13 +1644,13 @@ const handleSave = async () => {
|
||||
} else if (localIsAddOrEditOrder.value.isEditOrder) {
|
||||
addOrEditOrder(editData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$message.success('保存成功');
|
||||
proxy.$message.success(t('medicineStorage.common.saveSuccess'));
|
||||
// 调用父组件的 getList 方法
|
||||
emit('getList');
|
||||
// 清空表单
|
||||
resetAllData();
|
||||
} else {
|
||||
proxy.$message.error('保存失败');
|
||||
proxy.$message.error(t('medicineStorage.common.saveFailed'));
|
||||
}
|
||||
// 关闭加载
|
||||
loading.value = false;
|
||||
@@ -1744,14 +1743,14 @@ const resetAllData = () => {
|
||||
// 删除行
|
||||
const handleDeleteRow = () => {
|
||||
if (selectedRows.value.length === 0) {
|
||||
proxy.$message.warning('请选择要删除的行');
|
||||
proxy.$message.warning(t('medicineStorage.common.pleaseSelectDeleteRow'));
|
||||
return;
|
||||
}
|
||||
|
||||
proxy
|
||||
.$confirm('确认删除选中的行吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
.$confirm(t('medicineStorage.common.confirmDeleteRow'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
@@ -1806,7 +1805,7 @@ const handleDeleteRow = () => {
|
||||
});
|
||||
}
|
||||
|
||||
proxy.$message.success('删除成功');
|
||||
proxy.$message.success(t('medicineStorage.common.deleteSuccess'));
|
||||
})
|
||||
.catch(() => {
|
||||
// 用户取消删除
|
||||
@@ -1818,7 +1817,7 @@ const validateDateRange = (rowIndex) => {
|
||||
const row = localTableData.value[rowIndex];
|
||||
if (row && row.startTime && row.endTime) {
|
||||
if (row.endTime < row.startTime) {
|
||||
proxy.$message.error('失效日期不能小于生产日期');
|
||||
proxy.$message.error(t('medicineStorage.common.pleaseFillComplete'));
|
||||
// 清空失效日期
|
||||
row.endTime = '';
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
:disabled="isAddDisabled"
|
||||
@click="handleAdd"
|
||||
>
|
||||
新增
|
||||
{{ $t('medicineStorage.common.add') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
@@ -38,7 +38,7 @@
|
||||
:disabled="isDeleteDisabled"
|
||||
@click="handleDelete"
|
||||
>
|
||||
删除
|
||||
{{ $t('medicineStorage.common.delete') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -50,7 +50,7 @@
|
||||
:disabled="isCancelDisabled"
|
||||
@click="handleCancel"
|
||||
>
|
||||
取消
|
||||
{{ $t('medicineStorage.common.cancel') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -62,7 +62,7 @@
|
||||
:disabled="isAuditDisabled"
|
||||
@click="handleAudit"
|
||||
>
|
||||
审核
|
||||
{{ $t('medicineStorage.common.audit') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -84,12 +84,12 @@
|
||||
:rules="rules"
|
||||
>
|
||||
<el-form-item
|
||||
label="库房:"
|
||||
:label="$t('medicineStorage.common.warehouse') + ':'"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-select
|
||||
v-model="tableForm.locationId"
|
||||
placeholder="请选择库房"
|
||||
:placeholder="$t('medicineStorage.common.selectWarehouse')"
|
||||
clearable
|
||||
filterable
|
||||
@change="handleLocationChange(tableForm.locationId)"
|
||||
@@ -114,12 +114,12 @@
|
||||
@submit.prevent
|
||||
>
|
||||
<el-form-item
|
||||
label="单据搜索"
|
||||
:label="$t('medicineStorage.common.documentSearch')"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入单据号"
|
||||
:placeholder="$t('medicineStorage.common.enterDocumentNo')"
|
||||
clearable
|
||||
@keyup.enter="getList"
|
||||
>
|
||||
@@ -144,7 +144,7 @@
|
||||
:disabled="isAddDisabled"
|
||||
@click="handleAdd"
|
||||
>
|
||||
新增单据
|
||||
{{ $t('medicineStorage.common.addDocument') }}
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
@@ -176,21 +176,21 @@
|
||||
<el-icon class="info-icon">
|
||||
<User />
|
||||
</el-icon>
|
||||
<span class="label">采购员:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.purchaser') }}:</span>
|
||||
<span class="value">{{ item.applicantId_dictText }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<el-icon class="info-icon">
|
||||
<Shop />
|
||||
</el-icon>
|
||||
<span class="label">供应商:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.supplier') }}:</span>
|
||||
<span class="value">{{ item.supplierId_dictText }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<el-icon class="info-icon">
|
||||
<User />
|
||||
</el-icon>
|
||||
<span class="label">审核状态:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.auditStatus') }}:</span>
|
||||
<el-tag
|
||||
v-if="item.statusEnum_enumText === '同意'"
|
||||
type="success"
|
||||
@@ -208,14 +208,14 @@
|
||||
<el-icon class="info-icon">
|
||||
<Files />
|
||||
</el-icon>
|
||||
<span class="label">单据类型:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.documentType') }}:</span>
|
||||
<span class="value">{{ item.typeEnum_enumText }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<el-icon class="info-icon">
|
||||
<Calendar />
|
||||
</el-icon>
|
||||
<span class="label">单据日期:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.documentDate') }}:</span>
|
||||
<span class="value">{{
|
||||
parseTime(item.applyTime, '{y}-{m}-{d} {h}:{i}:{s}')
|
||||
}}</span>
|
||||
@@ -231,7 +231,7 @@
|
||||
class="empty-state"
|
||||
>
|
||||
<el-empty
|
||||
description="暂无单据"
|
||||
:description="$t('medicineStorage.common.noDocuments')"
|
||||
:image-size="80"
|
||||
>
|
||||
<!-- 空状态下不再显示新增单据按钮,因为已在上方固定位置显示 -->
|
||||
@@ -273,13 +273,16 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {ref} from 'vue';
|
||||
import {ref, computed} from 'vue';
|
||||
import {useRoute, useRouter} from 'vue-router';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import orderTable from './components/orderTable.vue';
|
||||
import {agreeApproval, deleteOrder, getInit, getOrderDetail, getOrderList,} from './components/api';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import {parseTime} from '@/utils/his';
|
||||
|
||||
const {t} = useI18n();
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
@@ -356,9 +359,9 @@ const buttonShow = ref({
|
||||
isSaveShow: false,
|
||||
isEditShow: false,
|
||||
});
|
||||
const rules = ref({
|
||||
locationId: [{ required: true, message: '请选择库房', trigger: 'blur' }],
|
||||
});
|
||||
const rules = computed(() => ({
|
||||
locationId: [{ required: true, message: t('medicineStorage.common.pleaseSelectWarehouse'), trigger: 'blur' }],
|
||||
}));
|
||||
|
||||
// 初始化 获取下拉列表
|
||||
const init = async () => {
|
||||
@@ -394,7 +397,7 @@ const handleAdd = async () => {
|
||||
resetFormAndTableData();
|
||||
// 校验库房ID
|
||||
if (!tableForm.value.locationId) {
|
||||
proxy.$modal.msgWarning('新增单据前,请选择库房');
|
||||
proxy.$modal.msgWarning(t('medicineStorage.common.pleaseSelectWarehouse'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -459,7 +462,7 @@ const handleEdit = async (order) => {
|
||||
resetFormAndTableData();
|
||||
|
||||
if (!selectedOrder.value) {
|
||||
proxy.$modal.msgError('请选择要编辑的单据');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.pleaseSelectEdit'));
|
||||
return;
|
||||
}
|
||||
const res = await getOrderDetail({
|
||||
@@ -740,26 +743,26 @@ const clearForm = () => {
|
||||
// 删除按钮
|
||||
const handleDelete = async () => {
|
||||
if (!selectedOrder.value) {
|
||||
proxy.$modal.msgError('请选择要删除的单据');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.pleaseSelectDelete'));
|
||||
return;
|
||||
}
|
||||
|
||||
// 校验是否可以删除(已审批的单据不能删除)
|
||||
if (selectedOrder.value.statusEnum_enumText === '同意' || selectedOrder.value.statusEnum === 3) {
|
||||
proxy.$modal.msgError('已审批的单据不能删除');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.approvedCannotDelete'));
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await proxy.$modal.confirm('确认删除该采购单吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
await proxy.$modal.confirm(t('medicineStorage.common.confirmDelete'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
});
|
||||
|
||||
// 删除单据
|
||||
await deleteOrder(selectedOrder.value.supplyBusNo);
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
proxy.$modal.msgSuccess(t('medicineStorage.common.deleteSuccess'));
|
||||
// 清空右侧表格数据
|
||||
clearForm();
|
||||
// 重新获取列表 库房ID
|
||||
@@ -792,7 +795,7 @@ const handleDelete = async () => {
|
||||
});
|
||||
} catch (error) {
|
||||
if (error !== 'cancel') {
|
||||
proxy.$modal.msgError('删除失败');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.deleteFailed'));
|
||||
console.error('删除失败:', error);
|
||||
}
|
||||
}
|
||||
@@ -800,26 +803,26 @@ const handleDelete = async () => {
|
||||
// 审核按钮
|
||||
const handleAudit = async () => {
|
||||
if (!selectedOrder.value) {
|
||||
proxy.$modal.msgError('请选择要审核的单据');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.pleaseSelectAudit'));
|
||||
return;
|
||||
}
|
||||
|
||||
// 校验是否是已审批状态
|
||||
if (selectedOrder.value.statusEnum_enumText === '同意' || selectedOrder.value.statusEnum === 3) {
|
||||
proxy.$modal.msgError('该单据已审批,不能重复审批');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.approvedCannotAudit'));
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await proxy.$modal.confirm('确认同意该采购单吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
await proxy.$modal.confirm(t('medicineStorage.common.confirmAudit'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
});
|
||||
|
||||
// 同意审批
|
||||
await agreeApproval(selectedOrder.value.supplyBusNo);
|
||||
proxy.$modal.msgSuccess('同意审批成功');
|
||||
proxy.$modal.msgSuccess(t('medicineStorage.common.auditSuccess'));
|
||||
// 编辑
|
||||
handleEdit(selectedOrder);
|
||||
// 重新获取列表
|
||||
@@ -852,7 +855,7 @@ const handleAudit = async () => {
|
||||
});
|
||||
} catch (error) {
|
||||
if (error !== 'cancel') {
|
||||
proxy.$modal.msgError('同意审批失败');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.auditFailed'));
|
||||
console.error('同意审批失败:', error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div>
|
||||
<vxe-table
|
||||
ref="medicineRef"
|
||||
@@ -7,59 +7,59 @@
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<vxe-column
|
||||
title="项目编码"
|
||||
:title="$t('medicineStorage.common.itemCode')"
|
||||
align="center"
|
||||
field="busNo"
|
||||
width="150"
|
||||
/>
|
||||
<vxe-column
|
||||
title="项目名称"
|
||||
:title="$t('medicineStorage.common.itemName')"
|
||||
align="center"
|
||||
field="name"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
title="进货价"
|
||||
:title="$t('medicineStorage.common.purchasePrice')"
|
||||
align="center"
|
||||
field="price"
|
||||
/>
|
||||
<vxe-column
|
||||
title="零售价"
|
||||
:title="$t('medicineStorage.common.retailPrice')"
|
||||
align="center"
|
||||
field="retailPrice"
|
||||
/>
|
||||
<vxe-column
|
||||
title="包装单位"
|
||||
:title="$t('medicineStorage.stockOutOrder.packagingUnit')"
|
||||
align="center"
|
||||
field="unitCode_dictText"
|
||||
/>
|
||||
<vxe-column
|
||||
title="最小单位"
|
||||
:title="$t('medicineStorage.stockOutOrder.minUnit')"
|
||||
align="center"
|
||||
field="minUnitCode_dictText"
|
||||
/>
|
||||
<vxe-column
|
||||
title="规格"
|
||||
:title="$t('medicineStorage.common.spec')"
|
||||
align="center"
|
||||
field="totalVolume"
|
||||
/>
|
||||
<vxe-column
|
||||
title="规格库存"
|
||||
:title="$t('medicineStorage.common.specStock')"
|
||||
align="center"
|
||||
field="specificationInventory"
|
||||
/>
|
||||
<vxe-column
|
||||
title="供应商"
|
||||
:title="$t('medicineStorage.common.supplierLabel')"
|
||||
align="center"
|
||||
field="supplierId_dictText"
|
||||
/>
|
||||
<vxe-column
|
||||
title="生产厂家"
|
||||
:title="$t('medicineStorage.common.manufacturer')"
|
||||
align="center"
|
||||
field="manufacturerText"
|
||||
/>
|
||||
<vxe-column
|
||||
title="批准文号"
|
||||
:title="$t('medicineStorage.common.approvalNo')"
|
||||
align="center"
|
||||
field="approvalNumber"
|
||||
/>
|
||||
@@ -71,6 +71,9 @@
|
||||
import {getMedicineList} from './api';
|
||||
import {watch} from 'vue';
|
||||
import {throttle} from 'lodash-es';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
|
||||
const {t} = useI18n();
|
||||
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-model="localDialogVisible"
|
||||
title="订单列表"
|
||||
:title="$t('medicineStorage.common.orderList')"
|
||||
width="960px"
|
||||
teleported
|
||||
@close="resetAllData"
|
||||
@@ -17,25 +17,25 @@
|
||||
@cell-click="handleRowClick"
|
||||
>
|
||||
<vxe-column
|
||||
title="订单编号"
|
||||
:title="$t('medicineStorage.common.orderNo')"
|
||||
field="supplyBusNo"
|
||||
width="200"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="采购员"
|
||||
:title="$t('medicineStorage.common.purchaser')"
|
||||
field="applicantId_dictText"
|
||||
width="100"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="供应商"
|
||||
:title="$t('medicineStorage.common.supplierLabel')"
|
||||
field="supplierId_dictText"
|
||||
width="220"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="审核状态"
|
||||
:title="$t('medicineStorage.common.auditStatusLabel')"
|
||||
field="statusEnum_enumText"
|
||||
width="100"
|
||||
align="center"
|
||||
@@ -56,13 +56,13 @@
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
title="单据类型"
|
||||
:title="$t('medicineStorage.common.documentType')"
|
||||
field="typeEnum_enumText"
|
||||
width="100"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="单据日期"
|
||||
:title="$t('medicineStorage.common.documentDate')"
|
||||
field="applyTime"
|
||||
width="200"
|
||||
align="center"
|
||||
@@ -90,13 +90,13 @@
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="handleCancel">
|
||||
取消
|
||||
{{ $t('medicineStorage.common.cancel') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleSubmit"
|
||||
>
|
||||
确认
|
||||
{{ $t('medicineStorage.common.confirm') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -108,6 +108,9 @@
|
||||
import {getPurchaseOrderDetail, getPurchaseOrderList} from './api';
|
||||
import {getCurrentInstance, ref, watch} from 'vue';
|
||||
import {parseTime} from '@/utils/his';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
|
||||
const {t} = useI18n();
|
||||
// 调用父组件方法
|
||||
const emit = defineEmits(['dialogSubmit', 'dialogCancel', 'updateTableData']);
|
||||
// 获取当前实例
|
||||
@@ -198,7 +201,7 @@ const getOrderList = async (locationId) => {
|
||||
// 订货单列表总条数
|
||||
localTableDataTotal.value = res.data.total;
|
||||
} else {
|
||||
proxy.$message.error('获取订货单列表失败');
|
||||
proxy.$message.error(t('medicineStorage.stockOutOrder.getOrderListFailed'));
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取订货单列表失败:', error);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div>
|
||||
<el-row :gutter="10">
|
||||
<el-form
|
||||
@@ -10,7 +10,7 @@
|
||||
>
|
||||
<el-row :gutter="10">
|
||||
<el-form-item
|
||||
label="单据号"
|
||||
:label="$t('medicineStorage.common.documentNo')"
|
||||
prop="busNo"
|
||||
>
|
||||
<el-input
|
||||
@@ -21,12 +21,12 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="开单日期"
|
||||
:label="$t('medicineStorage.common.orderDate')"
|
||||
prop="applyTime"
|
||||
>
|
||||
<el-date-picker
|
||||
v-model="localForm.applyTime"
|
||||
placeholder="请选择开单日期"
|
||||
:placeholder="$t('medicineStorage.common.selectOrderDate')"
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
@@ -34,12 +34,12 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="开单人"
|
||||
:label="$t('medicineStorage.common.orderMaker')"
|
||||
prop="applicantId"
|
||||
>
|
||||
<el-select
|
||||
v-model="localForm.applicantId"
|
||||
placeholder="请选择开单人"
|
||||
:placeholder="$t('medicineStorage.common.selectOrderMaker')"
|
||||
style="width: 140px"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
clearable
|
||||
@@ -53,12 +53,12 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="请领部门"
|
||||
:label="$t('medicineStorage.common.requestDept')"
|
||||
prop="purposeLocationId"
|
||||
>
|
||||
<el-select
|
||||
v-model="localForm.purposeLocationId"
|
||||
placeholder="请选择请领部门"
|
||||
:placeholder="$t('medicineStorage.common.selectRequestDept')"
|
||||
style="width: 140px"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
clearable
|
||||
@@ -72,12 +72,12 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="请领人"
|
||||
:label="$t('medicineStorage.common.requester')"
|
||||
prop="practitionerId"
|
||||
>
|
||||
<el-select
|
||||
v-model="localForm.practitionerId"
|
||||
placeholder="请选择开单人"
|
||||
:placeholder="$t('medicineStorage.common.selectRequester')"
|
||||
style="width: 140px"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
clearable
|
||||
@@ -91,12 +91,12 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="单据分类"
|
||||
:label="$t('medicineStorage.common.categoryLabel')"
|
||||
prop="categoryEnum"
|
||||
>
|
||||
<el-select
|
||||
v-model="localForm.categoryEnum"
|
||||
placeholder="请选择单据分类"
|
||||
:placeholder="$t('medicineStorage.common.selectCategory')"
|
||||
style="width: 180px"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
clearable
|
||||
@@ -111,13 +111,13 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
label="摘要(A)"
|
||||
:label="$t('medicineStorage.common.summary') + '(A)'"
|
||||
prop="reason"
|
||||
>
|
||||
<el-input
|
||||
v-model="localForm.reason"
|
||||
type="textarea"
|
||||
placeholder="请输入摘要"
|
||||
:placeholder="$t('medicineStorage.common.enterSummary')"
|
||||
style="width: 300px"
|
||||
:rows="1"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
@@ -131,7 +131,7 @@
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<div class="form-item">
|
||||
<label class="form-label">审核人</label>
|
||||
<label class="form-label">{{ $t('medicineStorage.common.auditor') }}</label>
|
||||
<el-tag
|
||||
type="warning"
|
||||
plain
|
||||
@@ -139,30 +139,30 @@
|
||||
{{
|
||||
(props.practitionerOption || []).find(
|
||||
(item) => item.value === localAuditForm.approverId
|
||||
)?.label || '暂无'
|
||||
)?.label || $t('medicineStorage.common.none')
|
||||
}}
|
||||
</el-tag>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="form-item">
|
||||
<label class="form-label">审核日期</label>
|
||||
<label class="form-label">{{ $t('medicineStorage.common.auditDate') }}</label>
|
||||
<el-tag
|
||||
type="primary"
|
||||
plain
|
||||
>
|
||||
{{ parseTime(localAuditForm.approvalTime, '{y}-{m}-{d} {h}:{i}:{s}') || '暂无' }}
|
||||
{{ parseTime(localAuditForm.approvalTime, '{y}-{m}-{d} {h}:{i}:{s}') || $t('medicineStorage.common.none') }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="form-item">
|
||||
<label class="form-label">审核状态:</label>
|
||||
<label class="form-label">{{ $t('medicineStorage.common.auditStatusLabel') }}:</label>
|
||||
<el-tag
|
||||
:type="localAuditForm.statusEnum_enumText === '同意' ? 'success' : 'danger'"
|
||||
plain
|
||||
>
|
||||
{{ localAuditForm.statusEnum_enumText || '暂无' }}
|
||||
{{ localAuditForm.statusEnum_enumText || $t('medicineStorage.common.none') }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</el-col>
|
||||
@@ -179,7 +179,7 @@
|
||||
icon="Plus"
|
||||
@click="handleAddRow"
|
||||
>
|
||||
添加行
|
||||
{{ $t('medicineStorage.common.addRow') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -190,7 +190,7 @@
|
||||
icon="Delete"
|
||||
@click="handleDeleteRow"
|
||||
>
|
||||
删除行
|
||||
{{ $t('medicineStorage.common.deleteRow') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -201,7 +201,7 @@
|
||||
icon="Check"
|
||||
@click="handleSave"
|
||||
>
|
||||
保存
|
||||
{{ $t('medicineStorage.common.save') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -212,7 +212,7 @@
|
||||
icon="Upload"
|
||||
@click="handleOrderImport"
|
||||
>
|
||||
药房请领单导入
|
||||
{{ $t('medicineStorage.stockOutOrder.importRequestOrder') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -241,7 +241,7 @@
|
||||
/>
|
||||
<vxe-column
|
||||
field="itemBusNo"
|
||||
title="编号"
|
||||
:title="$t('medicineStorage.common.itemCode')"
|
||||
fixed
|
||||
width="180"
|
||||
align="center"
|
||||
@@ -259,7 +259,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="itemName"
|
||||
title="品名"
|
||||
:title="$t('medicineStorage.common.itemName')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -291,7 +291,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="totalVolume"
|
||||
title="规格"
|
||||
:title="$t('medicineStorage.common.spec')"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
@@ -309,7 +309,7 @@
|
||||
<!-- 产品批号 -->
|
||||
<vxe-column
|
||||
field="lotNumber"
|
||||
title="产品批号"
|
||||
:title="$t('medicineStorage.common.lotNumber')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -322,7 +322,7 @@
|
||||
v-if="localTableData[scope.rowIndex].isEditing"
|
||||
v-model="localTableData[scope.rowIndex].lotNumber"
|
||||
clearable
|
||||
placeholder="请输入产品批号"
|
||||
:placeholder="$t('medicineStorage.stockOutOrder.enterLotNumber')"
|
||||
style="width: 180px"
|
||||
/>
|
||||
<span v-else-if="localTableData[scope.rowIndex].isViewing">
|
||||
@@ -333,7 +333,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="unitCode"
|
||||
title="单位"
|
||||
:title="$t('medicineStorage.common.unit')"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
@@ -363,7 +363,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="itemQuantity"
|
||||
title="数量"
|
||||
:title="$t('medicineStorage.common.quantity')"
|
||||
width="120"
|
||||
:rules="rules.itemQuantity"
|
||||
align="center"
|
||||
@@ -388,7 +388,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="price"
|
||||
title="进货价"
|
||||
:title="$t('medicineStorage.common.purchasePrice')"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
@@ -402,7 +402,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="totalPrice"
|
||||
title="进价金额"
|
||||
:title="$t('medicineStorage.common.purchaseAmount')"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
@@ -416,7 +416,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="retailPrice"
|
||||
title="当前销售价"
|
||||
:title="$t('medicineStorage.common.retailPrice')"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
@@ -433,7 +433,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="totalRetailPrice"
|
||||
title="当前销售金额"
|
||||
:title="$t('medicineStorage.common.retailAmount')"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
@@ -451,7 +451,7 @@
|
||||
<!-- 生产日期 -->
|
||||
<vxe-column
|
||||
field="startTime"
|
||||
title="生产日期"
|
||||
:title="$t('medicineStorage.stockOutOrder.productionDate')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -469,7 +469,7 @@
|
||||
<!-- 失效日期 -->
|
||||
<vxe-column
|
||||
field="endTime"
|
||||
title="失效日期"
|
||||
:title="$t('medicineStorage.stockOutOrder.expirationDate')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -486,7 +486,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="supplierId_dictText"
|
||||
title="供应商"
|
||||
:title="$t('medicineStorage.common.supplierLabel')"
|
||||
width="220"
|
||||
align="center"
|
||||
>
|
||||
@@ -503,7 +503,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="manufacturerText"
|
||||
title="厂家/产地"
|
||||
:title="$t('medicineStorage.common.manufacturer')"
|
||||
width="220"
|
||||
align="center"
|
||||
>
|
||||
@@ -520,7 +520,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="specificationInventory"
|
||||
title="规格库存"
|
||||
:title="$t('medicineStorage.common.specStock')"
|
||||
width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -556,7 +556,7 @@
|
||||
<!-- 批次库存 -->
|
||||
<vxe-column
|
||||
field="batchInventory"
|
||||
title="批次库存"
|
||||
:title="$t('medicineStorage.stockOutOrder.batchInventory')"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
@@ -590,7 +590,7 @@
|
||||
<!-- 药品追溯码 -->
|
||||
<vxe-column
|
||||
field="traceNo"
|
||||
title="药品追溯码"
|
||||
:title="$t('medicineStorage.stockOutOrder.traceNo')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -603,7 +603,7 @@
|
||||
v-if="localTableData[scope.rowIndex].isEditing"
|
||||
v-model="localTableData[scope.rowIndex].traceNo"
|
||||
clearable
|
||||
placeholder="请输入药品追溯码"
|
||||
:placeholder="$t('medicineStorage.stockOutOrder.enterTraceNo')"
|
||||
style="width: 180px"
|
||||
/>
|
||||
<span v-else-if="localTableData[scope.rowIndex].isViewing">
|
||||
@@ -615,7 +615,7 @@
|
||||
<!-- 药品追溯码单位 -->
|
||||
<vxe-column
|
||||
field="traceNoUnitCode"
|
||||
title="药品追溯码单位"
|
||||
:title="$t('medicineStorage.stockOutOrder.traceNoUnit')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -627,7 +627,7 @@
|
||||
<el-select
|
||||
v-if="localTableData[scope.rowIndex].isEditing"
|
||||
v-model="localTableData[scope.rowIndex].traceNoUnitCode"
|
||||
placeholder="请选择药品追溯码单位"
|
||||
:placeholder="$t('medicineStorage.stockOutOrder.selectTraceNoUnit')"
|
||||
style="width: 180px"
|
||||
>
|
||||
<el-option
|
||||
@@ -646,7 +646,7 @@
|
||||
<!-- 备注 -->
|
||||
<vxe-column
|
||||
field="remake"
|
||||
title="备注"
|
||||
:title="$t('medicineStorage.common.remark')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -664,7 +664,7 @@
|
||||
</vxe-column>
|
||||
<!-- 操作 -->
|
||||
<vxe-column
|
||||
title="操作"
|
||||
:title="$t('medicineStorage.common.operation')"
|
||||
width="100"
|
||||
fixed="right"
|
||||
>
|
||||
@@ -675,7 +675,7 @@
|
||||
icon="Edit"
|
||||
@click="handleScan(scope.row, scope.rowIndex)"
|
||||
>
|
||||
扫码
|
||||
{{ $t('medicineStorage.stockOutOrder.scan') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</vxe-column>
|
||||
@@ -716,13 +716,16 @@
|
||||
|
||||
<script setup>
|
||||
import {addOrEditOrder, getBusNo} from './api';
|
||||
import {nextTick, ref, watch} from 'vue';
|
||||
import {computed, nextTick, ref, watch} from 'vue';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import medicineList from './medicineList.vue';
|
||||
import orderDialog from './orderDialog.vue';
|
||||
import PopoverList from '@/components/HealthLinkHis/popoverList/index.vue';
|
||||
import {parseTime} from '@/utils/his';
|
||||
import TraceNoDialog from '@/components/HealthLinkHis/TraceNoDialog/index.vue';
|
||||
|
||||
const {t} = useI18n();
|
||||
|
||||
// 获取当前实例
|
||||
const { proxy } = getCurrentInstance();
|
||||
// 调用父组件方法
|
||||
@@ -864,30 +867,29 @@ const localIsAddOrEditOrder = ref({
|
||||
isEditOrder: false,
|
||||
});
|
||||
// 验证规则
|
||||
const rules = {
|
||||
// busNo: [{ required: true, message: '请输入单据号', trigger: 'blur' }],
|
||||
supplierId: [{ required: true, message: '请输入供应商', trigger: 'blur' }],
|
||||
applicantId: [{ required: true, message: '请输入采购员', trigger: 'blur' }],
|
||||
categoryEnum: [{ required: true, message: '请输入单据类型', trigger: 'blur' }],
|
||||
applyTime: [{ required: true, message: '请输入开单日期', trigger: 'blur' }],
|
||||
itemBusNo: [{ required: true, message: '请输入编号', trigger: ['blur', 'change'] }],
|
||||
itemName: [{ required: true, message: '请输入品名', trigger: 'blur' }],
|
||||
totalVolume: [{ required: true, message: '请输入规格', trigger: 'blur' }],
|
||||
unitCode: [{ required: true, message: '请输入单位', trigger: 'blur' }],
|
||||
itemQuantity: [{ required: true, message: '请输入数量', trigger: 'blur' }],
|
||||
lotNumber: [{ required: true, message: '请输入产品批号', trigger: 'blur' }],
|
||||
purposeLocationId: [{ required: true, message: '请选择', trigger: 'blur' }],
|
||||
const rules = computed(() => ({
|
||||
supplierId: [{ required: true, message: t('medicineStorage.common.pleaseSelectSupplierAndWarehouse'), trigger: 'blur' }],
|
||||
applicantId: [{ required: true, message: t('medicineStorage.stockOutOrder.enterOrderMaker'), trigger: 'blur' }],
|
||||
categoryEnum: [{ required: true, message: t('medicineStorage.stockOutOrder.enterDocumentType'), trigger: 'blur' }],
|
||||
applyTime: [{ required: true, message: t('medicineStorage.stockOutOrder.enterOrderDate'), trigger: 'blur' }],
|
||||
itemBusNo: [{ required: true, message: t('medicineStorage.stockOutOrder.enterItemCode'), trigger: ['blur', 'change'] }],
|
||||
itemName: [{ required: true, message: t('medicineStorage.stockOutOrder.enterItemName'), trigger: 'blur' }],
|
||||
totalVolume: [{ required: true, message: t('medicineStorage.stockOutOrder.enterSpec'), trigger: 'blur' }],
|
||||
unitCode: [{ required: true, message: t('medicineStorage.stockOutOrder.enterUnit'), trigger: 'blur' }],
|
||||
itemQuantity: [{ required: true, message: t('medicineStorage.stockOutOrder.enterQuantity'), trigger: 'blur' }],
|
||||
lotNumber: [{ required: true, message: t('medicineStorage.stockOutOrder.enterLotNumber'), trigger: 'blur' }],
|
||||
purposeLocationId: [{ required: true, message: t('medicineStorage.common.pleaseSelectWarehouse'), trigger: 'blur' }],
|
||||
startTime: [
|
||||
{ required: true, message: '请输入生产日期', trigger: 'blur' },
|
||||
{ required: true, message: t('medicineStorage.stockOutOrder.enterProductionDate'), trigger: 'blur' },
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (value) {
|
||||
const currentRow = rule.field.split('.')[1]; // 获取当前行索引
|
||||
const currentRow = rule.field.split('.')[1];
|
||||
const rowIndex = parseInt(currentRow);
|
||||
const endTime = localTableData.value[rowIndex]?.endTime;
|
||||
|
||||
if (endTime && value > endTime) {
|
||||
callback(new Error('生产日期不能大于失效日期'));
|
||||
callback(new Error(t('medicineStorage.stockOutOrder.productionDateExceedExpiration')));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
@@ -899,16 +901,16 @@ const rules = {
|
||||
},
|
||||
],
|
||||
endTime: [
|
||||
{ required: true, message: '请输入失效日期', trigger: 'blur' },
|
||||
{ required: true, message: t('medicineStorage.stockOutOrder.enterExpirationDate'), trigger: 'blur' },
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (value) {
|
||||
const currentRow = rule.field.split('.')[1]; // 获取当前行索引
|
||||
const currentRow = rule.field.split('.')[1];
|
||||
const rowIndex = parseInt(currentRow);
|
||||
const startTime = localTableData.value[rowIndex]?.startTime;
|
||||
|
||||
if (startTime && value < startTime) {
|
||||
callback(new Error('失效日期不能小于生产日期'));
|
||||
callback(new Error(t('medicineStorage.stockOutOrder.expirationDateBeforeProduction')));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
@@ -919,22 +921,18 @@ const rules = {
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
packagingConditionEnum: [{ required: true, message: '请输入包装情况', trigger: 'blur' }],
|
||||
acceptanceResultEnum: [{ required: true, message: '请选择验收结果', trigger: 'blur' }],
|
||||
batchInventory: [{ required: true, message: '请输入批次库存', trigger: 'blur' }],
|
||||
traceNo: [{ required: true, message: '请输入药品追溯码', trigger: 'blur' }],
|
||||
traceNoUnitCode: [{ required: true, message: '请输入药品追溯码单位', trigger: 'blur' }],
|
||||
phone: [{ required: true, message: '请输入供应商联系人', trigger: 'blur' }],
|
||||
practitionerId: [{ required: true, message: '请输入开单人', trigger: 'blur' }],
|
||||
invoiceNo: [{ required: true, message: '请输入发票号', trigger: 'blur' }],
|
||||
// price: [{ required: true, message: '请输入进货价', trigger: 'blur' }],
|
||||
// totalPrice: [{ required: true, message: '请输入进价金额', trigger: 'blur' }],
|
||||
// retailPrice: [{ required: true, message: '请输入销售价', trigger: 'blur' }],
|
||||
// totalRetailPrice: [{ required: true, message: '请输入销售金额', trigger: 'blur' }],
|
||||
manufacturerText: [{ required: true, message: '请输入厂家/产地', trigger: 'blur' }],
|
||||
specificationInventory: [{ required: true, message: '请输入规格库存', trigger: 'blur' }],
|
||||
approvalNumber: [{ required: true, message: '请输入批注文号', trigger: 'blur' }],
|
||||
};
|
||||
packagingConditionEnum: [{ required: true, message: t('medicineStorage.stockOutOrder.enterPackagingCondition'), trigger: 'blur' }],
|
||||
acceptanceResultEnum: [{ required: true, message: t('medicineStorage.stockOutOrder.selectAcceptanceResult'), trigger: 'blur' }],
|
||||
batchInventory: [{ required: true, message: t('medicineStorage.stockOutOrder.enterBatchInventory'), trigger: 'blur' }],
|
||||
traceNo: [{ required: true, message: t('medicineStorage.stockOutOrder.enterTraceNo'), trigger: 'blur' }],
|
||||
traceNoUnitCode: [{ required: true, message: t('medicineStorage.stockOutOrder.enterTraceNoUnit'), trigger: 'blur' }],
|
||||
phone: [{ required: true, message: t('medicineStorage.common.supplierContact'), trigger: 'blur' }],
|
||||
practitionerId: [{ required: true, message: t('medicineStorage.stockOutOrder.enterOrderMaker'), trigger: 'blur' }],
|
||||
invoiceNo: [{ required: true, message: t('medicineStorage.stockOutOrder.enterInvoiceNo'), trigger: 'blur' }],
|
||||
manufacturerText: [{ required: true, message: t('medicineStorage.stockOutOrder.enterManufacturer'), trigger: 'blur' }],
|
||||
specificationInventory: [{ required: true, message: t('medicineStorage.stockOutOrder.enterSpecStock'), trigger: 'blur' }],
|
||||
approvalNumber: [{ required: true, message: t('medicineStorage.stockOutOrder.enterApprovalNo'), trigger: 'blur' }],
|
||||
}));
|
||||
// 药品名称
|
||||
const ypName = ref('');
|
||||
// 药品追溯码
|
||||
@@ -1075,7 +1073,7 @@ const handleScan = (row, index) => {
|
||||
// 设置当前索引
|
||||
currentIndex.value = index;
|
||||
} else {
|
||||
proxy.$message.warning('请先输入产品批号!');
|
||||
proxy.$message.warning(t('medicineStorage.stockOutOrder.pleaseEnterLotNumberFirst'));
|
||||
}
|
||||
};
|
||||
// 药品追溯码提交
|
||||
@@ -1439,7 +1437,7 @@ const handleAddRow = async () => {
|
||||
|
||||
// 如果有数据,检查是否有空行
|
||||
if (isEmptyRow()) {
|
||||
proxy.$message.error('请填写完整信息');
|
||||
proxy.$message.error(t('medicineStorage.common.pleaseFillComplete'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1491,9 +1489,9 @@ const handleSave = async () => {
|
||||
const currentFormData = JSON.parse(JSON.stringify(localForm.value));
|
||||
|
||||
// 是否确认保存数据
|
||||
const isConfirm = await proxy.$modal.confirm('确认保存数据吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
const isConfirm = await proxy.$modal.confirm(t('medicineStorage.common.confirmSave'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
});
|
||||
if (!isConfirm) {
|
||||
@@ -1509,7 +1507,7 @@ const handleSave = async () => {
|
||||
if (localIsAddOrEditOrder.value.isAddOrder) {
|
||||
addOrEditOrder(editData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$message.success('新增成功');
|
||||
proxy.$message.success(t('medicineStorage.common.addSuccess'));
|
||||
// 调用父组件的 getList 方法,传递 true 清除临时订单
|
||||
emit('getList', true);
|
||||
// 清空表单
|
||||
@@ -1517,28 +1515,28 @@ const handleSave = async () => {
|
||||
// 关闭加载
|
||||
loading.value = false;
|
||||
} else {
|
||||
proxy.$message.error(res.msg || '新增失败');
|
||||
proxy.$message.error(res.msg || t('medicineStorage.common.saveFailed'));
|
||||
loading.value = false;
|
||||
}
|
||||
}).catch((error) => {
|
||||
proxy.$message.error(error.message || '新增失败,请检查网络或联系管理员');
|
||||
proxy.$message.error(error.message || t('medicineStorage.common.saveFailed'));
|
||||
loading.value = false;
|
||||
});
|
||||
} else if (localIsAddOrEditOrder.value.isEditOrder) {
|
||||
addOrEditOrder(editData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$message.success('保存成功');
|
||||
proxy.$message.success(t('medicineStorage.common.saveSuccess'));
|
||||
// 调用父组件的 getList 方法,传递 true 清除临时订单
|
||||
emit('getList', true);
|
||||
// 清空表单
|
||||
resetAllData();
|
||||
} else {
|
||||
proxy.$message.error(res.msg || '保存失败');
|
||||
proxy.$message.error(res.msg || t('medicineStorage.common.saveFailed'));
|
||||
}
|
||||
// 关闭加载
|
||||
loading.value = false;
|
||||
}).catch((error) => {
|
||||
proxy.$message.error(error.message || '保存失败,请检查网络或联系管理员');
|
||||
proxy.$message.error(error.message || t('medicineStorage.common.saveFailed'));
|
||||
// 关闭加载
|
||||
loading.value = false;
|
||||
});
|
||||
@@ -1624,14 +1622,14 @@ const resetAllData = () => {
|
||||
// 删除行
|
||||
const handleDeleteRow = () => {
|
||||
if (selectedRows.value.length === 0) {
|
||||
proxy.$message.warning('请选择要删除的行');
|
||||
proxy.$message.warning(t('medicineStorage.common.pleaseSelectDeleteRow'));
|
||||
return;
|
||||
}
|
||||
|
||||
proxy
|
||||
.$confirm('确认删除选中的行吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
.$confirm(t('medicineStorage.common.confirmDeleteRow'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
@@ -1686,7 +1684,7 @@ const handleDeleteRow = () => {
|
||||
});
|
||||
}
|
||||
|
||||
proxy.$message.success('删除成功');
|
||||
proxy.$message.success(t('medicineStorage.common.deleteSuccess'));
|
||||
})
|
||||
.catch(() => {
|
||||
// 用户取消删除
|
||||
@@ -1698,7 +1696,7 @@ const validateDateRange = (rowIndex) => {
|
||||
const row = localTableData.value[rowIndex];
|
||||
if (row && row.startTime && row.endTime) {
|
||||
if (row.endTime < row.startTime) {
|
||||
proxy.$message.error('失效日期不能小于生产日期');
|
||||
proxy.$message.error(t('medicineStorage.stockOutOrder.expirationDateBeforeProduction'));
|
||||
// 清空失效日期
|
||||
row.endTime = '';
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
:disabled="isAddDisabled"
|
||||
@click="handleAdd"
|
||||
>
|
||||
新增
|
||||
{{ $t('medicineStorage.common.add') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
@@ -38,7 +38,7 @@
|
||||
:disabled="isDeleteDisabled"
|
||||
@click="handleDelete"
|
||||
>
|
||||
删除
|
||||
{{ $t('medicineStorage.common.delete') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -50,7 +50,7 @@
|
||||
:disabled="isCancelDisabled"
|
||||
@click="handleCancel"
|
||||
>
|
||||
取消
|
||||
{{ $t('medicineStorage.common.cancel') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -62,7 +62,7 @@
|
||||
:disabled="isAuditDisabled"
|
||||
@click="handleAudit"
|
||||
>
|
||||
审核
|
||||
{{ $t('medicineStorage.common.audit') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -84,12 +84,12 @@
|
||||
:rules="rules"
|
||||
>
|
||||
<el-form-item
|
||||
label="库房:"
|
||||
:label="$t('medicineStorage.common.warehouse') + ':'"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-select
|
||||
v-model="tableForm.locationId"
|
||||
placeholder="请选择库房"
|
||||
:placeholder="$t('medicineStorage.common.pleaseSelectWarehouse')"
|
||||
clearable
|
||||
filterable
|
||||
@change="handleLocationChange(tableForm.locationId)"
|
||||
@@ -114,12 +114,12 @@
|
||||
@submit.prevent
|
||||
>
|
||||
<el-form-item
|
||||
label="单据搜索"
|
||||
:label="$t('medicineStorage.common.documentSearch')"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入单据号"
|
||||
:placeholder="$t('medicineStorage.common.enterDocumentNo')"
|
||||
clearable
|
||||
@keyup.enter="getList"
|
||||
>
|
||||
@@ -148,7 +148,7 @@
|
||||
@click="handleAdd"
|
||||
>
|
||||
<el-icon><Plus /></el-icon>
|
||||
新增单据
|
||||
{{ $t('medicineStorage.common.addDocument') }}
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
@@ -175,14 +175,14 @@
|
||||
<el-icon class="info-icon">
|
||||
<User />
|
||||
</el-icon>
|
||||
<span class="label">采购员:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.purchaser') }}:</span>
|
||||
<span class="value">{{ item.applicantId_dictText }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<el-icon class="info-icon">
|
||||
<User />
|
||||
</el-icon>
|
||||
<span class="label">审核状态:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.auditStatusLabel') }}:</span>
|
||||
<el-tag
|
||||
v-if="item.statusEnum_enumText === '同意'"
|
||||
type="success"
|
||||
@@ -200,14 +200,14 @@
|
||||
<el-icon class="info-icon">
|
||||
<Files />
|
||||
</el-icon>
|
||||
<span class="label">单据类型:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.documentType') }}:</span>
|
||||
<span class="value">{{ item.typeEnum_enumText }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<el-icon class="info-icon">
|
||||
<Calendar />
|
||||
</el-icon>
|
||||
<span class="label">单据日期:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.documentDate') }}:</span>
|
||||
<span class="value">{{
|
||||
parseTime(item.applyTime, '{y}-{m}-{d} {h}:{i}:{s}')
|
||||
}}</span>
|
||||
@@ -223,7 +223,7 @@
|
||||
class="empty-state"
|
||||
>
|
||||
<el-empty
|
||||
description="暂无单据"
|
||||
:description="$t('medicineStorage.common.noDocuments')"
|
||||
:image-size="80"
|
||||
/>
|
||||
</div>
|
||||
@@ -264,13 +264,16 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {nextTick, ref} from 'vue';
|
||||
import {computed, nextTick, ref} from 'vue';
|
||||
import {useRoute, useRouter} from 'vue-router';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import orderTable from './components/orderTable.vue';
|
||||
import {agreeApproval, deleteOrder, getInit, getOrderDetail, getOrderList,} from './components/api';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import {parseTime} from '@/utils/his';
|
||||
|
||||
const {t} = useI18n();
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
@@ -351,9 +354,9 @@ const buttonShow = ref({
|
||||
isSaveShow: false,
|
||||
isEditShow: false,
|
||||
});
|
||||
const rules = ref({
|
||||
locationId: [{ required: true, message: '请选择库房', trigger: 'blur' }],
|
||||
});
|
||||
const rules = computed(() => ({
|
||||
locationId: [{ required: true, message: t('medicineStorage.common.pleaseSelectWarehouse'), trigger: 'blur' }],
|
||||
}));
|
||||
|
||||
// 初始化 获取下拉列表
|
||||
const init = async () => {
|
||||
@@ -410,7 +413,7 @@ const handleAdd = async () => {
|
||||
resetFormAndTableData();
|
||||
// 校验库房ID
|
||||
if (!tableForm.value.locationId) {
|
||||
proxy.$modal.msgWarning('新增单据前,请选择库房');
|
||||
proxy.$modal.msgWarning(t('medicineStorage.common.pleaseSelectWarehouse'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -495,7 +498,7 @@ const handleEdit = async (order) => {
|
||||
resetFormAndTableData();
|
||||
|
||||
if (!selectedOrder.value) {
|
||||
proxy.$modal.msgError('请选择要编辑的单据');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.pleaseSelectEdit'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -811,26 +814,26 @@ const clearForm = () => {
|
||||
// 删除按钮
|
||||
const handleDelete = async () => {
|
||||
if (!selectedOrder.value) {
|
||||
proxy.$modal.msgError('请选择要删除的单据');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.pleaseSelectDelete'));
|
||||
return;
|
||||
}
|
||||
|
||||
// 校验是否可以删除(已审批的单据不能删除)
|
||||
if (selectedOrder.value.statusEnum_enumText === '同意' || selectedOrder.value.statusEnum === 3) {
|
||||
proxy.$modal.msgError('已审批的单据不能删除');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.approvedCannotDelete'));
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await proxy.$modal.confirm('确认删除该采购单吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
await proxy.$modal.confirm(t('medicineStorage.common.confirmDelete'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
});
|
||||
|
||||
// 删除单据
|
||||
await deleteOrder(selectedOrder.value.supplyBusNo);
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
proxy.$modal.msgSuccess(t('medicineStorage.common.deleteSuccess'));
|
||||
// 清空右侧表格数据
|
||||
clearForm();
|
||||
// 重新获取列表 库房ID
|
||||
@@ -863,7 +866,7 @@ const handleDelete = async () => {
|
||||
});
|
||||
} catch (error) {
|
||||
if (error !== 'cancel') {
|
||||
proxy.$modal.msgError('删除失败');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.deleteFailed'));
|
||||
console.error('删除失败:', error);
|
||||
}
|
||||
}
|
||||
@@ -871,26 +874,26 @@ const handleDelete = async () => {
|
||||
// 审核按钮
|
||||
const handleAudit = async () => {
|
||||
if (!selectedOrder.value) {
|
||||
proxy.$modal.msgError('请选择要审核的单据');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.pleaseSelectAudit'));
|
||||
return;
|
||||
}
|
||||
|
||||
// 校验是否是已审批状态
|
||||
if (selectedOrder.value.statusEnum_enumText === '同意' || selectedOrder.value.statusEnum === 3) {
|
||||
proxy.$modal.msgError('该单据已审批,不能重复审批');
|
||||
proxy.$modal.msgError(t('medicineStorage.stockOutOrder.approvedCannotAudit'));
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await proxy.$modal.confirm('确认同意该采购单吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
await proxy.$modal.confirm(t('medicineStorage.stockOutOrder.confirmAudit'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
});
|
||||
|
||||
// 同意审批
|
||||
await agreeApproval(selectedOrder.value.supplyBusNo);
|
||||
proxy.$modal.msgSuccess('同意审批成功');
|
||||
proxy.$modal.msgSuccess(t('medicineStorage.stockOutOrder.auditSuccess'));
|
||||
// 编辑
|
||||
handleEdit(selectedOrder);
|
||||
// 重新获取列表
|
||||
@@ -923,7 +926,7 @@ const handleAudit = async () => {
|
||||
});
|
||||
} catch (error) {
|
||||
if (error !== 'cancel') {
|
||||
proxy.$modal.msgError('同意审批失败');
|
||||
proxy.$modal.msgError(t('medicineStorage.stockOutOrder.auditFailed'));
|
||||
console.error('同意审批失败:', error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div>
|
||||
<vxe-table
|
||||
ref="medicineRef"
|
||||
@@ -7,29 +7,29 @@
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<vxe-column
|
||||
title="项目编码"
|
||||
:title="$t('medicineStorage.common.itemCode')"
|
||||
align="center"
|
||||
field="busNo"
|
||||
width="150"
|
||||
/>
|
||||
<vxe-column
|
||||
title="项目名称"
|
||||
:title="$t('medicineStorage.common.itemName')"
|
||||
align="center"
|
||||
field="name"
|
||||
width="180"
|
||||
/>
|
||||
<vxe-column
|
||||
title="进货价"
|
||||
:title="$t('medicineStorage.common.purchasePrice')"
|
||||
align="center"
|
||||
field="price"
|
||||
/>
|
||||
<vxe-column
|
||||
title="零售价"
|
||||
:title="$t('medicineStorage.common.retailPrice')"
|
||||
align="center"
|
||||
field="retailPrice"
|
||||
/>
|
||||
<vxe-column
|
||||
title="包装单位"
|
||||
title="包装单位/最小单位"
|
||||
align="center"
|
||||
field="unitCode_dictText"
|
||||
/>
|
||||
@@ -39,12 +39,12 @@
|
||||
field="minUnitCode_dictText"
|
||||
/>
|
||||
<vxe-column
|
||||
title="规格"
|
||||
:title="$t('medicineStorage.common.spec')"
|
||||
align="center"
|
||||
field="totalVolume"
|
||||
/>
|
||||
<vxe-column
|
||||
title="规格库存"
|
||||
:title="$t('medicineStorage.common.specStock')"
|
||||
align="center"
|
||||
field="specificationInventory"
|
||||
/>
|
||||
@@ -54,17 +54,17 @@
|
||||
field="batchInventory"
|
||||
/>
|
||||
<vxe-column
|
||||
title="供应商"
|
||||
:title="$t('medicineStorage.common.supplier')"
|
||||
align="center"
|
||||
field="supplierId_dictText"
|
||||
/>
|
||||
<vxe-column
|
||||
title="生产厂家"
|
||||
:title="$t('medicineStorage.common.manufacturer')"
|
||||
align="center"
|
||||
field="manufacturerText"
|
||||
/>
|
||||
<vxe-column
|
||||
title="批准文号"
|
||||
:title="$t('medicineStorage.common.approvalNo')"
|
||||
align="center"
|
||||
field="approvalNumber"
|
||||
/>
|
||||
@@ -75,8 +75,11 @@
|
||||
<script setup>
|
||||
import {getMedicineList} from './api';
|
||||
import {watch} from 'vue';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import {throttle} from 'lodash-es';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
type: String,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-model="localDialogVisible"
|
||||
title="订单列表"
|
||||
:title="$t('medicineStorage.common.orderList')"
|
||||
width="960px"
|
||||
teleported
|
||||
@close="resetAllData"
|
||||
@@ -17,25 +17,25 @@
|
||||
@cell-click="handleRowClick"
|
||||
>
|
||||
<vxe-column
|
||||
title="订单编号"
|
||||
:title="$t('medicineStorage.common.orderNo')"
|
||||
field="supplyBusNo"
|
||||
width="200"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="采购员"
|
||||
:title="$t('medicineStorage.common.purchaser')"
|
||||
field="applicantId_dictText"
|
||||
width="100"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="供应商"
|
||||
:title="$t('medicineStorage.common.supplier')"
|
||||
field="supplierId_dictText"
|
||||
width="220"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="审核状态"
|
||||
:title="$t('medicineStorage.common.auditStatus')"
|
||||
field="statusEnum_enumText"
|
||||
width="100"
|
||||
align="center"
|
||||
@@ -56,13 +56,13 @@
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
title="单据类型"
|
||||
:title="$t('medicineStorage.common.documentType')"
|
||||
field="typeEnum_enumText"
|
||||
width="100"
|
||||
align="center"
|
||||
/>
|
||||
<vxe-column
|
||||
title="单据日期"
|
||||
:title="$t('medicineStorage.common.documentDate')"
|
||||
field="applyTime"
|
||||
width="200"
|
||||
align="center"
|
||||
@@ -90,13 +90,13 @@
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="handleCancel">
|
||||
取消
|
||||
{{ $t('medicineStorage.common.cancel') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleSubmit"
|
||||
>
|
||||
确认
|
||||
{{ $t('medicineStorage.common.confirm') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -107,7 +107,11 @@
|
||||
<script setup>
|
||||
import {getPurchaseOrderDetail, getPurchaseOrderList} from './api';
|
||||
import {getCurrentInstance, ref, watch} from 'vue';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import {parseTime} from '@/utils/his';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
// 调用父组件方法
|
||||
const emit = defineEmits(['dialogSubmit', 'dialogCancel', 'updateTableData']);
|
||||
// 获取当前实例
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div>
|
||||
<el-row :gutter="10">
|
||||
<el-form
|
||||
@@ -10,7 +10,7 @@
|
||||
>
|
||||
<el-row :gutter="10">
|
||||
<el-form-item
|
||||
label="单据号"
|
||||
:label="$t('medicineStorage.common.documentNo')"
|
||||
prop="busNo"
|
||||
>
|
||||
<el-input
|
||||
@@ -21,12 +21,12 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="开单日期"
|
||||
:label="$t('medicineStorage.common.orderDate')"
|
||||
prop="applyTime"
|
||||
>
|
||||
<el-date-picker
|
||||
v-model="localForm.applyTime"
|
||||
placeholder="请选择开单日期"
|
||||
:placeholder="$t('medicineStorage.common.selectOrderDate')"
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
@@ -34,12 +34,12 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="盘点人"
|
||||
:label="$t('medicineStorage.common.inventoryPerson')"
|
||||
prop="applicantId"
|
||||
>
|
||||
<el-select
|
||||
v-model="localForm.applicantId"
|
||||
placeholder="请选择盘点人"
|
||||
:placeholder="$t('medicineStorage.common.selectInventoryPerson')"
|
||||
style="width: 140px"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
clearable
|
||||
@@ -53,12 +53,12 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="单据分类"
|
||||
:label="$t('medicineStorage.common.categoryLabel')"
|
||||
prop="categoryEnum"
|
||||
>
|
||||
<el-select
|
||||
v-model="localForm.categoryEnum"
|
||||
placeholder="请选择单据分类"
|
||||
:placeholder="$t('medicineStorage.common.selectCategory')"
|
||||
style="width: 180px"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
clearable
|
||||
@@ -73,13 +73,13 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
label="摘要(A)"
|
||||
:label="$t('medicineStorage.common.summary')"
|
||||
prop="reason"
|
||||
>
|
||||
<el-input
|
||||
v-model="localForm.reason"
|
||||
type="textarea"
|
||||
placeholder="请输入摘要"
|
||||
:placeholder="$t('medicineStorage.common.enterSummary')"
|
||||
style="width: 300px"
|
||||
:rows="1"
|
||||
:disabled="!localIsAddOrEditOrder.isAddOrder && !localIsAddOrEditOrder.isEditOrder"
|
||||
@@ -93,7 +93,7 @@
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<div class="form-item">
|
||||
<label class="form-label">审核人</label>
|
||||
<label class="form-label">{{ $t('medicineStorage.common.auditor') }}</label>
|
||||
<el-tag
|
||||
type="warning"
|
||||
plain
|
||||
@@ -101,30 +101,30 @@
|
||||
{{
|
||||
(props.practitionerOption || []).find(
|
||||
(item) => item.value === localAuditForm.approverId
|
||||
)?.label || '暂无'
|
||||
)?.label || $t('medicineStorage.common.none')
|
||||
}}
|
||||
</el-tag>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="form-item">
|
||||
<label class="form-label">审核日期</label>
|
||||
<label class="form-label">{{ $t('medicineStorage.common.auditDate') }}</label>
|
||||
<el-tag
|
||||
type="primary"
|
||||
plain
|
||||
>
|
||||
{{ parseTime(localAuditForm.approvalTime, '{y}-{m}-{d} {h}:{i}:{s}') || '暂无' }}
|
||||
{{ parseTime(localAuditForm.approvalTime, '{y}-{m}-{d} {h}:{i}:{s}') || $t('medicineStorage.common.none') }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="form-item">
|
||||
<label class="form-label">审核状态:</label>
|
||||
<label class="form-label">{{ $t('medicineStorage.common.auditStatusLabel') }}</label>
|
||||
<el-tag
|
||||
:type="localAuditForm.statusEnum_enumText === '同意' ? 'success' : 'danger'"
|
||||
plain
|
||||
>
|
||||
{{ localAuditForm.statusEnum_enumText || '暂无' }}
|
||||
{{ localAuditForm.statusEnum_enumText || $t('medicineStorage.common.none') }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</el-col>
|
||||
@@ -141,7 +141,7 @@
|
||||
icon="Plus"
|
||||
@click="handleAddRow"
|
||||
>
|
||||
添加行
|
||||
{{ $t('medicineStorage.common.addRow') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -152,7 +152,7 @@
|
||||
icon="Delete"
|
||||
@click="handleDeleteRow"
|
||||
>
|
||||
删除行
|
||||
{{ $t('medicineStorage.common.deleteRow') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -163,7 +163,7 @@
|
||||
icon="Check"
|
||||
@click="handleSave"
|
||||
>
|
||||
保存
|
||||
{{ $t('medicineStorage.common.save') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -192,7 +192,7 @@
|
||||
/>
|
||||
<vxe-column
|
||||
field="itemBusNo"
|
||||
title="编号"
|
||||
:title="$t('medicineStorage.common.itemCode')"
|
||||
fixed
|
||||
width="180"
|
||||
align="center"
|
||||
@@ -210,7 +210,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="itemName"
|
||||
title="品名"
|
||||
:title="$t('medicineStorage.common.itemName')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -242,7 +242,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="totalVolume"
|
||||
title="规格"
|
||||
:title="$t('medicineStorage.common.spec')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -284,7 +284,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="unitCode"
|
||||
title="单位"
|
||||
:title="$t('medicineStorage.common.unit')"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
@@ -507,7 +507,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="price"
|
||||
title="进货价"
|
||||
:title="$t('medicineStorage.common.purchasePrice')"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
@@ -522,7 +522,7 @@
|
||||
<!-- 药品追溯码 -->
|
||||
<vxe-column
|
||||
field="retailPrice"
|
||||
title="当前销售价"
|
||||
:title="$t('medicineStorage.common.retailPrice')"
|
||||
width="120"
|
||||
align="center"
|
||||
>
|
||||
@@ -595,7 +595,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="supplierId_dictText"
|
||||
title="供应商"
|
||||
:title="$t('medicineStorage.common.supplier')"
|
||||
width="220"
|
||||
align="center"
|
||||
>
|
||||
@@ -612,7 +612,7 @@
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="manufacturerText"
|
||||
title="厂家/产地"
|
||||
:title="$t('medicineStorage.common.manufacturer')"
|
||||
width="220"
|
||||
align="center"
|
||||
>
|
||||
@@ -630,7 +630,7 @@
|
||||
<!-- 备注 -->
|
||||
<vxe-column
|
||||
field="remake"
|
||||
title="备注"
|
||||
:title="$t('medicineStorage.common.remark')"
|
||||
width="180"
|
||||
align="center"
|
||||
>
|
||||
@@ -648,7 +648,7 @@
|
||||
</vxe-column>
|
||||
<!-- 操作 -->
|
||||
<vxe-column
|
||||
title="操作"
|
||||
:title="$t('medicineStorage.common.operation')"
|
||||
width="100"
|
||||
fixed="right"
|
||||
>
|
||||
@@ -700,13 +700,16 @@
|
||||
|
||||
<script setup>
|
||||
import {addOrEditOrder, getBusNo} from './api';
|
||||
import {nextTick, ref, watch} from 'vue';
|
||||
import {computed, nextTick, ref, watch} from 'vue';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import medicineList from './medicineList.vue';
|
||||
import orderDialog from './orderDialog.vue';
|
||||
import PopoverList from '@/components/HealthLinkHis/popoverList/index.vue';
|
||||
import {parseTime} from '@/utils/his';
|
||||
import TraceNoDialog from '@/components/HealthLinkHis/TraceNoDialog/index.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
// 获取当前实例
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
@@ -851,37 +854,37 @@ const localIsAddOrEditOrder = ref({
|
||||
isEditOrder: false,
|
||||
});
|
||||
// 验证规则
|
||||
const rules = {
|
||||
// busNo: [{ required: true, message: '请输入单据号', trigger: 'blur' }],
|
||||
supplierId: [{ required: true, message: '请输入供应商', trigger: 'blur' }],
|
||||
applicantId: [{ required: true, message: '请输入采购员', trigger: 'blur' }],
|
||||
categoryEnum: [{ required: true, message: '请输入单据类型', trigger: 'blur' }],
|
||||
applyTime: [{ required: true, message: '请输入开单日期', trigger: 'blur' }],
|
||||
itemBusNo: [{ required: true, message: '请输入编号', trigger: ['blur', 'change'] }],
|
||||
itemName: [{ required: true, message: '请输入品名', trigger: 'blur' }],
|
||||
totalVolume: [{ required: true, message: '请输入规格', trigger: 'blur' }],
|
||||
unitCode: [{ required: true, message: '请输入单位', trigger: 'blur' }],
|
||||
totalQuantity: [{ required: true, message: '请输入数量', trigger: 'blur' }],
|
||||
itemQuantity: [{ required: true, message: '请输入数量', trigger: 'blur' }],
|
||||
const rules = computed(() => ({
|
||||
// busNo: [{ required: true, message: t('medicineStorage.common.enterDocumentNo'), trigger: 'blur' }],
|
||||
supplierId: [{ required: true, message: t('medicineStorage.common.supplier'), trigger: 'blur' }],
|
||||
applicantId: [{ required: true, message: t('medicineStorage.common.purchaser'), trigger: 'blur' }],
|
||||
categoryEnum: [{ required: true, message: t('medicineStorage.common.documentType'), trigger: 'blur' }],
|
||||
applyTime: [{ required: true, message: t('medicineStorage.common.orderDate'), trigger: 'blur' }],
|
||||
itemBusNo: [{ required: true, message: t('medicineStorage.common.itemCode'), trigger: ['blur', 'change'] }],
|
||||
itemName: [{ required: true, message: t('medicineStorage.common.itemName'), trigger: 'blur' }],
|
||||
totalVolume: [{ required: true, message: t('medicineStorage.common.spec'), trigger: 'blur' }],
|
||||
unitCode: [{ required: true, message: t('medicineStorage.common.unit'), trigger: 'blur' }],
|
||||
totalQuantity: [{ required: true, message: t('medicineStorage.common.quantity'), trigger: 'blur' }],
|
||||
itemQuantity: [{ required: true, message: t('medicineStorage.common.quantity'), trigger: 'blur' }],
|
||||
lotNumber: [{ required: true, message: '请输入产品批号', trigger: 'blur' }],
|
||||
purposeLocationId: [{ required: true, message: '请选择', trigger: 'blur' }],
|
||||
purposeLocationId: [{ required: true, message: t('medicineStorage.common.pleaseSelect'), trigger: 'blur' }],
|
||||
reasonCode: [{ required: true, message: '请选择盈亏类型', trigger: 'blur' }],
|
||||
packagingConditionEnum: [{ required: true, message: '请输入包装情况', trigger: 'blur' }],
|
||||
acceptanceResultEnum: [{ required: true, message: '请选择验收结果', trigger: 'blur' }],
|
||||
batchInventory: [{ required: true, message: '请输入批次库存', trigger: 'blur' }],
|
||||
traceNo: [{ required: true, message: '请输入药品追溯码', trigger: 'blur' }],
|
||||
traceNoUnitCode: [{ required: true, message: '请输入药品追溯码单位', trigger: 'blur' }],
|
||||
phone: [{ required: true, message: '请输入供应商联系人', trigger: 'blur' }],
|
||||
practitionerId: [{ required: true, message: '请输入开单人', trigger: 'blur' }],
|
||||
phone: [{ required: true, message: t('medicineStorage.common.supplierContact'), trigger: 'blur' }],
|
||||
practitionerId: [{ required: true, message: t('medicineStorage.common.orderMaker'), trigger: 'blur' }],
|
||||
invoiceNo: [{ required: true, message: '请输入发票号', trigger: 'blur' }],
|
||||
// price: [{ required: true, message: '请输入进货价', trigger: 'blur' }],
|
||||
// price: [{ required: true, message: t('medicineStorage.common.purchasePrice'), trigger: 'blur' }],
|
||||
// totalPrice: [{ required: true, message: '请输入进价金额', trigger: 'blur' }],
|
||||
// retailPrice: [{ required: true, message: '请输入销售价', trigger: 'blur' }],
|
||||
// retailPrice: [{ required: true, message: t('medicineStorage.common.retailPrice'), trigger: 'blur' }],
|
||||
// totalRetailPrice: [{ required: true, message: '请输入销售金额', trigger: 'blur' }],
|
||||
manufacturerText: [{ required: true, message: '请输入厂家/产地', trigger: 'blur' }],
|
||||
specificationInventory: [{ required: true, message: '请输入规格库存', trigger: 'blur' }],
|
||||
approvalNumber: [{ required: true, message: '请输入批注文号', trigger: 'blur' }],
|
||||
};
|
||||
manufacturerText: [{ required: true, message: t('medicineStorage.common.manufacturer'), trigger: 'blur' }],
|
||||
specificationInventory: [{ required: true, message: t('medicineStorage.common.specStock'), trigger: 'blur' }],
|
||||
approvalNumber: [{ required: true, message: t('medicineStorage.common.approvalNo'), trigger: 'blur' }],
|
||||
}));
|
||||
// 药品名称
|
||||
const ypName = ref('');
|
||||
// 药品追溯码
|
||||
@@ -1437,7 +1440,7 @@ const handleAddRow = async () => {
|
||||
|
||||
// 如果有数据,检查是否有空行
|
||||
if (isEmptyRow()) {
|
||||
proxy.$message.error('请填写完整信息');
|
||||
proxy.$message.error(t('medicineStorage.common.pleaseFillComplete'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1489,9 +1492,9 @@ const handleSave = async () => {
|
||||
const currentFormData = JSON.parse(JSON.stringify(localForm.value));
|
||||
|
||||
// 是否确认保存数据
|
||||
const isConfirm = await proxy.$modal.confirm('确认保存数据吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
const isConfirm = await proxy.$modal.confirm(t('medicineStorage.common.confirmSave'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
});
|
||||
if (!isConfirm) {
|
||||
@@ -1507,7 +1510,7 @@ const handleSave = async () => {
|
||||
if (localIsAddOrEditOrder.value.isAddOrder) {
|
||||
addOrEditOrder(editData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$message.success('新增成功');
|
||||
proxy.$message.success(t('medicineStorage.common.addSuccess'));
|
||||
// 调用父组件的 getList 方法
|
||||
emit('getList');
|
||||
// 清空表单
|
||||
@@ -1519,13 +1522,13 @@ const handleSave = async () => {
|
||||
} else if (localIsAddOrEditOrder.value.isEditOrder) {
|
||||
addOrEditOrder(editData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$message.success('保存成功');
|
||||
proxy.$message.success(t('medicineStorage.common.saveSuccess'));
|
||||
// 调用父组件的 getList 方法
|
||||
emit('getList');
|
||||
// 清空表单
|
||||
resetAllData();
|
||||
} else {
|
||||
proxy.$message.error('保存失败');
|
||||
proxy.$message.error(t('medicineStorage.common.saveFailed'));
|
||||
}
|
||||
// 关闭加载
|
||||
loading.value = false;
|
||||
@@ -1612,14 +1615,14 @@ const resetAllData = () => {
|
||||
// 删除行
|
||||
const handleDeleteRow = () => {
|
||||
if (selectedRows.value.length === 0) {
|
||||
proxy.$message.warning('请选择要删除的行');
|
||||
proxy.$message.warning(t('medicineStorage.common.pleaseSelectDeleteRow'));
|
||||
return;
|
||||
}
|
||||
|
||||
proxy
|
||||
.$confirm('确认删除选中的行吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
.$confirm(t('medicineStorage.common.confirmDeleteRow'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => {
|
||||
@@ -1674,7 +1677,7 @@ const handleDeleteRow = () => {
|
||||
});
|
||||
}
|
||||
|
||||
proxy.$message.success('删除成功');
|
||||
proxy.$message.success(t('medicineStorage.common.deleteSuccess'));
|
||||
})
|
||||
.catch(() => {
|
||||
// 用户取消删除
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
:disabled="isAddDisabled"
|
||||
@click="handleAdd"
|
||||
>
|
||||
新增
|
||||
{{ $t('medicineStorage.common.add') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
@@ -38,7 +38,7 @@
|
||||
:disabled="isDeleteDisabled"
|
||||
@click="handleDelete"
|
||||
>
|
||||
删除
|
||||
{{ $t('medicineStorage.common.delete') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -50,7 +50,7 @@
|
||||
:disabled="isCancelDisabled"
|
||||
@click="handleCancel"
|
||||
>
|
||||
取消
|
||||
{{ $t('medicineStorage.common.cancel') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -62,7 +62,7 @@
|
||||
:disabled="isAuditDisabled"
|
||||
@click="handleAudit"
|
||||
>
|
||||
审核
|
||||
{{ $t('medicineStorage.common.audit') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -84,12 +84,12 @@
|
||||
:rules="rules"
|
||||
>
|
||||
<el-form-item
|
||||
label="库房:"
|
||||
:label="$t('medicineStorage.common.warehouse') + ':'"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-select
|
||||
v-model="tableForm.locationId"
|
||||
placeholder="请选择库房"
|
||||
:placeholder="$t('medicineStorage.common.pleaseSelectWarehouse')"
|
||||
clearable
|
||||
filterable
|
||||
@change="handleLocationChange(tableForm.locationId)"
|
||||
@@ -114,12 +114,12 @@
|
||||
@submit.prevent
|
||||
>
|
||||
<el-form-item
|
||||
label="单据搜索"
|
||||
:label="$t('medicineStorage.common.documentSearch')"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入单据号"
|
||||
:placeholder="$t('medicineStorage.common.enterDocumentNo')"
|
||||
clearable
|
||||
@keyup.enter="getList"
|
||||
>
|
||||
@@ -162,14 +162,14 @@
|
||||
<el-icon class="info-icon">
|
||||
<User />
|
||||
</el-icon>
|
||||
<span class="label">采购员:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.purchaser') }}:</span>
|
||||
<span class="value">{{ item.applicantId_dictText }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<el-icon class="info-icon">
|
||||
<User />
|
||||
</el-icon>
|
||||
<span class="label">审核状态:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.auditStatus') }}:</span>
|
||||
<el-tag
|
||||
v-if="item.statusEnum_enumText === '同意'"
|
||||
type="success"
|
||||
@@ -187,14 +187,14 @@
|
||||
<el-icon class="info-icon">
|
||||
<Files />
|
||||
</el-icon>
|
||||
<span class="label">单据类型:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.documentType') }}:</span>
|
||||
<span class="value">{{ item.typeEnum_enumText }}</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<el-icon class="info-icon">
|
||||
<Calendar />
|
||||
</el-icon>
|
||||
<span class="label">单据日期:</span>
|
||||
<span class="label">{{ $t('medicineStorage.common.documentDate') }}:</span>
|
||||
<span class="value">{{
|
||||
parseTime(item.applyTime, '{y}-{m}-{d} {h}:{i}:{s}')
|
||||
}}</span>
|
||||
@@ -210,14 +210,14 @@
|
||||
class="empty-state"
|
||||
>
|
||||
<el-empty
|
||||
description="暂无单据"
|
||||
:description="$t('medicineStorage.common.noDocuments')"
|
||||
:image-size="80"
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleAdd"
|
||||
>
|
||||
新增单据
|
||||
{{ $t('medicineStorage.common.addDocument') }}
|
||||
</el-button>
|
||||
</el-empty>
|
||||
</div>
|
||||
@@ -258,13 +258,16 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {ref} from 'vue';
|
||||
import {computed, ref, watch} from 'vue';
|
||||
import {useRoute, useRouter} from 'vue-router';
|
||||
import {useI18n} from 'vue-i18n';
|
||||
import orderTable from './components/orderTable.vue';
|
||||
import {agreeApproval, deleteOrder, getInit, getOrderDetail, getOrderList,} from './components/api';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import {parseTime} from '@/utils/his';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
@@ -343,9 +346,9 @@ const buttonShow = ref({
|
||||
isSaveShow: false,
|
||||
isEditShow: false,
|
||||
});
|
||||
const rules = ref({
|
||||
locationId: [{ required: true, message: '请选择库房', trigger: 'blur' }],
|
||||
});
|
||||
const rules = computed(() => ({
|
||||
locationId: [{ required: true, message: t('medicineStorage.common.pleaseSelectWarehouse'), trigger: 'blur' }],
|
||||
}));
|
||||
|
||||
// 初始化 获取下拉列表
|
||||
const init = async () => {
|
||||
@@ -383,7 +386,7 @@ const handleAdd = async () => {
|
||||
resetFormAndTableData();
|
||||
// 校验库房ID
|
||||
if (!tableForm.value.locationId) {
|
||||
proxy.$modal.msgWarning('新增单据前,请选择库房');
|
||||
proxy.$modal.msgWarning(t('medicineStorage.common.pleaseSelectWarehouse'));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -448,7 +451,7 @@ const handleEdit = async (order) => {
|
||||
resetFormAndTableData();
|
||||
|
||||
if (!selectedOrder.value) {
|
||||
proxy.$modal.msgError('请选择要编辑的单据');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.pleaseSelectEdit'));
|
||||
return;
|
||||
}
|
||||
const res = await getOrderDetail({
|
||||
@@ -744,26 +747,26 @@ const clearForm = () => {
|
||||
// 删除按钮
|
||||
const handleDelete = async () => {
|
||||
if (!selectedOrder.value) {
|
||||
proxy.$modal.msgError('请选择要删除的单据');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.pleaseSelectDelete'));
|
||||
return;
|
||||
}
|
||||
|
||||
// 校验是否可以删除(已审批的单据不能删除)
|
||||
if (selectedOrder.value.statusEnum_enumText === '同意' || selectedOrder.value.statusEnum === 3) {
|
||||
proxy.$modal.msgError('已审批的单据不能删除');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.approvedCannotDelete'));
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await proxy.$modal.confirm('确认删除该采购单吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
await proxy.$modal.confirm(t('medicineStorage.common.confirmDelete'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
});
|
||||
|
||||
// 删除单据
|
||||
await deleteOrder(selectedOrder.value.supplyBusNo);
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
proxy.$modal.msgSuccess(t('medicineStorage.common.deleteSuccess'));
|
||||
// 清空右侧表格数据
|
||||
clearForm();
|
||||
// 重新获取列表 库房ID
|
||||
@@ -796,7 +799,7 @@ const handleDelete = async () => {
|
||||
});
|
||||
} catch (error) {
|
||||
if (error !== 'cancel') {
|
||||
proxy.$modal.msgError('删除失败');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.deleteFailed'));
|
||||
console.error('删除失败:', error);
|
||||
}
|
||||
}
|
||||
@@ -804,26 +807,26 @@ const handleDelete = async () => {
|
||||
// 审核按钮
|
||||
const handleAudit = async () => {
|
||||
if (!selectedOrder.value) {
|
||||
proxy.$modal.msgError('请选择要审核的单据');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.pleaseSelectAudit'));
|
||||
return;
|
||||
}
|
||||
|
||||
// 校验是否是已审批状态
|
||||
if (selectedOrder.value.statusEnum_enumText === '同意' || selectedOrder.value.statusEnum === 3) {
|
||||
proxy.$modal.msgError('该单据已审批,不能重复审批');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.approvedCannotAudit'));
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await proxy.$modal.confirm('确认同意该采购单吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
await proxy.$modal.confirm(t('medicineStorage.common.confirmAudit'), t('medicineStorage.common.tip'), {
|
||||
confirmButtonText: t('medicineStorage.common.confirm'),
|
||||
cancelButtonText: t('medicineStorage.common.cancel'),
|
||||
type: 'warning',
|
||||
});
|
||||
|
||||
// 同意审批
|
||||
await agreeApproval(selectedOrder.value.supplyBusNo);
|
||||
proxy.$modal.msgSuccess('同意审批成功');
|
||||
proxy.$modal.msgSuccess(t('medicineStorage.common.auditSuccess'));
|
||||
// 编辑
|
||||
handleEdit(selectedOrder);
|
||||
// 重新获取列表
|
||||
@@ -856,7 +859,7 @@ const handleAudit = async () => {
|
||||
});
|
||||
} catch (error) {
|
||||
if (error !== 'cancel') {
|
||||
proxy.$modal.msgError('同意审批失败');
|
||||
proxy.$modal.msgError(t('medicineStorage.common.auditFailed'));
|
||||
console.error('同意审批失败:', error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
<template>
|
||||
<div style="padding:16px">
|
||||
<div style="margin-bottom:16px;display:flex;justify-content:space-between;align-items:center">
|
||||
<span style="font-size:18px;font-weight:bold">药品库存预警管理</span>
|
||||
<span style="font-size:18px;font-weight:bold">{{ $t('pharmacy.title') }}</span>
|
||||
<div>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="loadData"
|
||||
>
|
||||
刷新
|
||||
{{ $t('pharmacy.refresh') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="success"
|
||||
@click="showAdd = true"
|
||||
>
|
||||
新增预警
|
||||
{{ $t('pharmacy.addAlert') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
@click="exportReport"
|
||||
>
|
||||
导出报告
|
||||
{{ $t('pharmacy.exportReport') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -57,43 +57,43 @@
|
||||
<div style="margin-bottom:12px;display:flex;gap:8px;flex-wrap:wrap">
|
||||
<el-select
|
||||
v-model="q.alertLevel"
|
||||
placeholder="预警级别"
|
||||
:placeholder="$t('pharmacy.alertLevel')"
|
||||
clearable
|
||||
style="width:120px"
|
||||
>
|
||||
<el-option
|
||||
label="缺货"
|
||||
:label="$t('pharmacy.outOfStock')"
|
||||
value="OUT"
|
||||
/>
|
||||
<el-option
|
||||
label="低库存"
|
||||
:label="$t('pharmacy.lowStock')"
|
||||
value="LOW"
|
||||
/>
|
||||
<el-option
|
||||
label="近效期"
|
||||
:label="$t('pharmacy.expiring')"
|
||||
value="EXPIRING"
|
||||
/>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="q.drugCategory"
|
||||
placeholder="药品类别"
|
||||
:placeholder="$t('pharmacy.drugCategory')"
|
||||
clearable
|
||||
style="width:140px"
|
||||
>
|
||||
<el-option
|
||||
label="西药"
|
||||
:label="$t('pharmacy.western')"
|
||||
value="WESTERN"
|
||||
/>
|
||||
<el-option
|
||||
label="中成药"
|
||||
:label="$t('pharmacy.chineseMedicine')"
|
||||
value="CHINESE"
|
||||
/>
|
||||
<el-option
|
||||
label="中草药"
|
||||
:label="$t('pharmacy.herbal')"
|
||||
value="HERBAL"
|
||||
/>
|
||||
<el-option
|
||||
label="生物制品"
|
||||
:label="$t('pharmacy.biological')"
|
||||
value="BIOLOGICAL"
|
||||
/>
|
||||
</el-select>
|
||||
@@ -101,10 +101,10 @@
|
||||
type="primary"
|
||||
@click="loadData"
|
||||
>
|
||||
查询
|
||||
{{ $t('pharmacy.query') }}
|
||||
</el-button>
|
||||
<el-button @click="resetQuery">
|
||||
重置
|
||||
{{ $t('pharmacy.reset') }}
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
@@ -117,23 +117,23 @@
|
||||
>
|
||||
<el-table-column
|
||||
prop="drugCode"
|
||||
label="药品编码"
|
||||
:label="$t('pharmacy.drugCode')"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="drugName"
|
||||
label="药品名称"
|
||||
:label="$t('pharmacy.drugName')"
|
||||
min-width="160"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="drugSpec"
|
||||
label="规格"
|
||||
:label="$t('pharmacy.spec')"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="currentStock"
|
||||
label="当前库存"
|
||||
:label="$t('pharmacy.currentStock')"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
@@ -145,19 +145,19 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="minStock"
|
||||
label="最低库存"
|
||||
:label="$t('pharmacy.minStock')"
|
||||
width="100"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="maxStock"
|
||||
label="最高库存"
|
||||
:label="$t('pharmacy.maxStock')"
|
||||
width="100"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="alertLevel"
|
||||
label="预警级别"
|
||||
:label="$t('pharmacy.alertLevel')"
|
||||
width="100"
|
||||
align="center"
|
||||
>
|
||||
@@ -166,27 +166,27 @@
|
||||
:type="row.alertLevel==='OUT'?'danger':row.alertLevel==='LOW'?'warning':'info'"
|
||||
size="small"
|
||||
>
|
||||
{{ row.alertLevel==='OUT'?'缺货':row.alertLevel==='LOW'?'低库存':row.alertLevel==='EXPIRING'?'近效期':'正常' }}
|
||||
{{ row.alertLevel==='OUT'?$t('pharmacy.outOfStock'):row.alertLevel==='LOW'?$t('pharmacy.lowStock'):row.alertLevel==='EXPIRING'?$t('pharmacy.expiring'):$t('pharmacy.normal') }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="supplierName"
|
||||
label="供应商"
|
||||
:label="$t('pharmacy.supplier')"
|
||||
width="140"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="lastRestockDate"
|
||||
label="上次进货"
|
||||
:label="$t('pharmacy.lastRestock')"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="expiryDate"
|
||||
label="有效期至"
|
||||
:label="$t('pharmacy.expiryDate')"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
:label="$t('pharmacy.action')"
|
||||
width="120"
|
||||
fixed="right"
|
||||
>
|
||||
@@ -196,7 +196,7 @@
|
||||
type="primary"
|
||||
@click="handleOrder(row)"
|
||||
>
|
||||
补货申请
|
||||
{{ $t('pharmacy.restockApply') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -215,7 +215,7 @@
|
||||
<!-- 新增弹窗 -->
|
||||
<el-dialog
|
||||
v-model="showAdd"
|
||||
title="新增药品库存预警"
|
||||
:title="$t('pharmacy.addDialogTitle')"
|
||||
width="600px"
|
||||
append-to-body
|
||||
>
|
||||
@@ -224,82 +224,82 @@
|
||||
label-width="110px"
|
||||
>
|
||||
<el-form-item
|
||||
label="药品编码"
|
||||
:label="$t('pharmacy.drugCode')"
|
||||
required
|
||||
>
|
||||
<el-input
|
||||
v-model="formData.drugCode"
|
||||
placeholder="请输入药品编码"
|
||||
:placeholder="$t('pharmacy.enterDrugCode')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="药品名称"
|
||||
:label="$t('pharmacy.drugName')"
|
||||
required
|
||||
>
|
||||
<el-input
|
||||
v-model="formData.drugName"
|
||||
placeholder="请输入药品名称"
|
||||
:placeholder="$t('pharmacy.enterDrugName')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格">
|
||||
<el-form-item :label="$t('pharmacy.spec')">
|
||||
<el-input
|
||||
v-model="formData.drugSpec"
|
||||
placeholder="如: 0.5g*24片"
|
||||
:placeholder="$t('pharmacy.specExample')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="当前库存">
|
||||
<el-form-item :label="$t('pharmacy.currentStock')">
|
||||
<el-input-number
|
||||
v-model="formData.currentStock"
|
||||
:min="0"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="最低库存">
|
||||
<el-form-item :label="$t('pharmacy.minStock')">
|
||||
<el-input-number
|
||||
v-model="formData.minStock"
|
||||
:min="0"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="最高库存">
|
||||
<el-form-item :label="$t('pharmacy.maxStock')">
|
||||
<el-input-number
|
||||
v-model="formData.maxStock"
|
||||
:min="0"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预警级别">
|
||||
<el-form-item :label="$t('pharmacy.alertLevel')">
|
||||
<el-select
|
||||
v-model="formData.alertLevel"
|
||||
placeholder="请选择"
|
||||
:placeholder="$t('pharmacy.pleaseSelect')"
|
||||
>
|
||||
<el-option
|
||||
label="缺货"
|
||||
:label="$t('pharmacy.outOfStock')"
|
||||
value="OUT"
|
||||
/>
|
||||
<el-option
|
||||
label="低库存"
|
||||
:label="$t('pharmacy.lowStock')"
|
||||
value="LOW"
|
||||
/>
|
||||
<el-option
|
||||
label="近效期"
|
||||
:label="$t('pharmacy.expiring')"
|
||||
value="EXPIRING"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商">
|
||||
<el-form-item :label="$t('pharmacy.supplier')">
|
||||
<el-input
|
||||
v-model="formData.supplierName"
|
||||
placeholder="请输入供应商"
|
||||
:placeholder="$t('pharmacy.enterSupplier')"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="showAdd = false">
|
||||
取消
|
||||
{{ $t('pharmacy.cancel') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="submitForm"
|
||||
>
|
||||
确定
|
||||
{{ $t('pharmacy.confirm') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@@ -307,22 +307,26 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {ref, reactive, onMounted} from 'vue'
|
||||
import {ref, reactive, computed, onMounted} from 'vue'
|
||||
import {ElMessage} from 'element-plus'
|
||||
import {useI18n} from 'vue-i18n'
|
||||
import {getAlertPage, addAlert, getAlertStats} from './api'
|
||||
|
||||
const {t} = useI18n()
|
||||
|
||||
const loading = ref(false)
|
||||
const alertData = ref([])
|
||||
const total = ref(0)
|
||||
const showAdd = ref(false)
|
||||
|
||||
const statCards = ref([
|
||||
{label:'总预警数', value:0, color:'#409eff'},
|
||||
{label:'缺货', value:0, color:'#f56c6c'},
|
||||
{label:'低库存', value:0, color:'#e6a23c'},
|
||||
{label:'近效期', value:0, color:'#909399'},
|
||||
{label:'供应商数', value:0, color:'#67c23a'},
|
||||
{label:'待补货', value:0, color:'#409eff'}
|
||||
const stats = ref({total:0, out:0, low:0, expiring:0, suppliers:0, pending:0})
|
||||
const statCards = computed(() => [
|
||||
{label:t('pharmacy.totalAlerts'), value:stats.value.total, color:'#409eff'},
|
||||
{label:t('pharmacy.outOfStock'), value:stats.value.out, color:'#f56c6c'},
|
||||
{label:t('pharmacy.lowStock'), value:stats.value.low, color:'#e6a23c'},
|
||||
{label:t('pharmacy.expiring'), value:stats.value.expiring, color:'#909399'},
|
||||
{label:t('pharmacy.supplierCount'), value:stats.value.suppliers, color:'#67c23a'},
|
||||
{label:t('pharmacy.pendingRestock'), value:stats.value.pending, color:'#409eff'}
|
||||
])
|
||||
|
||||
const q = ref({pageNo:1, pageSize: 10, alertLevel:'', drugCategory:''})
|
||||
@@ -345,12 +349,7 @@ async function loadData() {
|
||||
else if (row.alertLevel === 'EXPIRING') expiring++
|
||||
supplierSet.add(row.supplierName)
|
||||
})
|
||||
statCards.value[0].value = total.value
|
||||
statCards.value[1].value = out
|
||||
statCards.value[2].value = low
|
||||
statCards.value[3].value = expiring
|
||||
statCards.value[4].value = supplierSet.size
|
||||
statCards.value[5].value = s.data?.pendingOrders || 0
|
||||
stats.value = {total:total.value, out, low, expiring, suppliers:supplierSet.size, pending:s.data?.pendingOrders || 0}
|
||||
} finally { loading.value = false }
|
||||
}
|
||||
|
||||
@@ -361,16 +360,16 @@ function resetQuery() {
|
||||
|
||||
async function submitForm() {
|
||||
await addAlert(formData)
|
||||
ElMessage.success('新增成功')
|
||||
ElMessage.success(t('pharmacy.addSuccess'))
|
||||
showAdd.value = false
|
||||
loadData()
|
||||
}
|
||||
|
||||
function handleOrder(row) {
|
||||
ElMessage.info('补货申请: ' + row.drugName)
|
||||
ElMessage.info(t('pharmacy.restockApply') + ': ' + row.drugName)
|
||||
}
|
||||
|
||||
function exportReport() { ElMessage.info('导出功能开发中') }
|
||||
function exportReport() { ElMessage.info(t('pharmacy.exportWip')) }
|
||||
|
||||
onMounted(() => loadData())
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user