fix(ui): 修复多个功能模块的验证和数据处理问题
- 在医生工作站退费功能中添加患者选择验证 - 统一药品管理中的仓库类型选择逻辑,移除重复代码 - 修复统计管理页面清空按钮的数据重置问题 - 修正西药管理页面处方打印按钮的功能绑定 - 完善库存报表查询的SQL过滤条件实现 - 更新多个控制器接口参数类型以支持业务流程 - 优化退费列表对话框的数据加载和错误处理
This commit is contained in:
@@ -66,7 +66,10 @@ public class OutpatientRefundController {
|
||||
* @return 患者账单列表
|
||||
*/
|
||||
@GetMapping(value = "/patient-payment")
|
||||
public R<?> getEncounterPatientPayment(@RequestParam Long encounterId) {
|
||||
public R<?> getEncounterPatientPayment(@RequestParam(required = false) Long encounterId) {
|
||||
if (encounterId == null) {
|
||||
return R.fail(null, "请先选择患者后再进行退费操作");
|
||||
}
|
||||
return outpatientRefundAppService.getEncounterPatientPayment(encounterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ package com.openhis.web.inventorymanage.controller;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.inventorymanage.appservice.ILossReportFormAppService;
|
||||
import com.openhis.web.inventorymanage.dto.BusNoRequest;
|
||||
import com.openhis.web.inventorymanage.dto.LossReportFormDto;
|
||||
import com.openhis.web.inventorymanage.dto.LossReportSearchParam;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -104,23 +105,23 @@ public class LossReportFormController {
|
||||
/**
|
||||
* 提交审批
|
||||
*
|
||||
* @param busNo 单据号
|
||||
* @param request 单据号请求
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PutMapping("/submit-approval")
|
||||
public R<?> submitApproval(@RequestBody String busNo) {
|
||||
return lossReportFormAppService.submitApproval(busNo);
|
||||
public R<?> submitApproval(@RequestBody BusNoRequest request) {
|
||||
return lossReportFormAppService.submitApproval(request.getBusNo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 撤回审批
|
||||
*
|
||||
* @param busNo 单据号
|
||||
* @param request 单据号请求
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PutMapping("/withdraw-approval")
|
||||
public R<?> withdrawApproval(@RequestBody String busNo) {
|
||||
return lossReportFormAppService.withdrawApproval(busNo);
|
||||
public R<?> withdrawApproval(@RequestBody BusNoRequest request) {
|
||||
return lossReportFormAppService.withdrawApproval(request.getBusNo());
|
||||
}
|
||||
|
||||
// /**
|
||||
|
||||
@@ -5,6 +5,7 @@ package com.openhis.web.inventorymanage.controller;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.inventorymanage.appservice.IProductStocktakingAppService;
|
||||
import com.openhis.web.inventorymanage.dto.BusNoRequest;
|
||||
import com.openhis.web.inventorymanage.dto.ProductStocktakingDto;
|
||||
import com.openhis.web.inventorymanage.dto.ProductStocktakingSearchParam;
|
||||
import com.openhis.web.inventorymanage.dto.StocktakingBatchSearchParam;
|
||||
@@ -140,23 +141,23 @@ public class ProductStocktakingController {
|
||||
/**
|
||||
* 提交审批
|
||||
*
|
||||
* @param busNo 单据号
|
||||
* @param request 单据号请求
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PutMapping("/submit-approval")
|
||||
public R<?> submitApproval(@RequestBody String busNo) {
|
||||
return productStocktakingAppService.submitApproval(busNo);
|
||||
public R<?> submitApproval(@RequestBody BusNoRequest request) {
|
||||
return productStocktakingAppService.submitApproval(request.getBusNo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 撤回审批
|
||||
*
|
||||
* @param busNo 单据号
|
||||
* @param request 单据号请求
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PutMapping("/withdraw-approval")
|
||||
public R<?> withdrawApproval(@RequestBody String busNo) {
|
||||
return productStocktakingAppService.withdrawApproval(busNo);
|
||||
public R<?> withdrawApproval(@RequestBody BusNoRequest request) {
|
||||
return productStocktakingAppService.withdrawApproval(request.getBusNo());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,7 @@ package com.openhis.web.inventorymanage.controller;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.inventorymanage.appservice.IProductTransferAppService;
|
||||
import com.openhis.web.inventorymanage.dto.BusNoRequest;
|
||||
import com.openhis.web.inventorymanage.dto.BatchTransferSearchParam;
|
||||
import com.openhis.web.inventorymanage.dto.ProductTransferDto;
|
||||
import com.openhis.web.inventorymanage.dto.SupplySearchParam;
|
||||
@@ -151,23 +152,23 @@ public class ProductTransferController {
|
||||
/**
|
||||
* 提交审批
|
||||
*
|
||||
* @param busNo 单据号
|
||||
* @param request 单据号请求
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PutMapping("/submit-approval")
|
||||
public R<?> submitApproval(@RequestBody String busNo) {
|
||||
return productTransferAppService.submitApproval(busNo);
|
||||
public R<?> submitApproval(@RequestBody BusNoRequest request) {
|
||||
return productTransferAppService.submitApproval(request.getBusNo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 撤回审批
|
||||
*
|
||||
* @param busNo 单据号
|
||||
* @param request 单据号请求
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PutMapping("/withdraw-approval")
|
||||
public R<?> withdrawApproval(@RequestBody String busNo) {
|
||||
return productTransferAppService.withdrawApproval(busNo);
|
||||
public R<?> withdrawApproval(@RequestBody BusNoRequest request) {
|
||||
return productTransferAppService.withdrawApproval(request.getBusNo());
|
||||
}
|
||||
|
||||
// /**
|
||||
|
||||
@@ -5,6 +5,7 @@ package com.openhis.web.inventorymanage.controller;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.inventorymanage.appservice.IPurchaseInventoryAppService;
|
||||
import com.openhis.web.inventorymanage.dto.BusNoRequest;
|
||||
import com.openhis.web.inventorymanage.dto.InventorySearchParam;
|
||||
import com.openhis.web.inventorymanage.dto.PurchaseInventoryDto;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -104,23 +105,23 @@ public class PurchaseInventoryController {
|
||||
/**
|
||||
* 提交审批
|
||||
*
|
||||
* @param busNo 单据号
|
||||
* @param request 单据号请求
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PutMapping("/submit-approval")
|
||||
public R<?> submitApproval(@RequestBody String busNo) {
|
||||
return purchaseInventoryAppService.submitApproval(busNo);
|
||||
public R<?> submitApproval(@RequestBody BusNoRequest request) {
|
||||
return purchaseInventoryAppService.submitApproval(request.getBusNo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 撤回审批
|
||||
*
|
||||
* @param busNo 单据号
|
||||
* @param request 单据号请求
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PutMapping("/withdraw-approval")
|
||||
public R<?> withdrawApproval(@RequestBody String busNo) {
|
||||
return purchaseInventoryAppService.withdrawApproval(busNo);
|
||||
public R<?> withdrawApproval(@RequestBody BusNoRequest request) {
|
||||
return purchaseInventoryAppService.withdrawApproval(request.getBusNo());
|
||||
}
|
||||
// /**
|
||||
// * 采购入库单据详情
|
||||
|
||||
@@ -5,6 +5,7 @@ package com.openhis.web.inventorymanage.controller;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.inventorymanage.appservice.IPurchaseReturnAppService;
|
||||
import com.openhis.web.inventorymanage.dto.BusNoRequest;
|
||||
import com.openhis.web.inventorymanage.dto.PurchaseReturnDetailDto;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -96,23 +97,23 @@ public class PurchaseReturnController {
|
||||
/**
|
||||
* 提交审批
|
||||
*
|
||||
* @param busNo 单据号
|
||||
* @param request 单据号请求
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PutMapping("/return-submit-approval")
|
||||
public R<?> submitApproval(@RequestBody String busNo) {
|
||||
return purchaseReturnAppService.submitApproval(busNo);
|
||||
public R<?> submitApproval(@RequestBody BusNoRequest request) {
|
||||
return purchaseReturnAppService.submitApproval(request.getBusNo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 撤回审批
|
||||
*
|
||||
* @param busNo 单据号
|
||||
* @param request 单据号请求
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PutMapping("/return-withdraw-approval")
|
||||
public R<?> withdrawApproval(@RequestBody String busNo) {
|
||||
return purchaseReturnAppService.withdrawApproval(busNo);
|
||||
public R<?> withdrawApproval(@RequestBody BusNoRequest request) {
|
||||
return purchaseReturnAppService.withdrawApproval(request.getBusNo());
|
||||
}
|
||||
|
||||
// /**
|
||||
|
||||
@@ -5,6 +5,7 @@ package com.openhis.web.inventorymanage.controller;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.inventorymanage.appservice.IRequisitionIssueAppService;
|
||||
import com.openhis.web.inventorymanage.dto.BusNoRequest;
|
||||
import com.openhis.web.inventorymanage.dto.IssueDto;
|
||||
import com.openhis.web.inventorymanage.dto.IssueSearchParam;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -104,23 +105,23 @@ public class RequisitionIssueController {
|
||||
/**
|
||||
* 提交审批
|
||||
*
|
||||
* @param busNo 单据号
|
||||
* @param request 单据号请求
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PutMapping("/submit-approval")
|
||||
public R<?> submitApproval(@RequestBody String busNo) {
|
||||
return requisitionIssueAppService.submitApproval(busNo);
|
||||
public R<?> submitApproval(@RequestBody BusNoRequest request) {
|
||||
return requisitionIssueAppService.submitApproval(request.getBusNo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 撤回审批
|
||||
*
|
||||
* @param busNo 单据号
|
||||
* @param request 单据号请求
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PutMapping("/withdraw-approval")
|
||||
public R<?> withdrawApproval(@RequestBody String busNo) {
|
||||
return requisitionIssueAppService.withdrawApproval(busNo);
|
||||
public R<?> withdrawApproval(@RequestBody BusNoRequest request) {
|
||||
return requisitionIssueAppService.withdrawApproval(request.getBusNo());
|
||||
}
|
||||
|
||||
// /**
|
||||
|
||||
@@ -5,6 +5,7 @@ package com.openhis.web.inventorymanage.controller;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.inventorymanage.appservice.IReturnIssueAppService;
|
||||
import com.openhis.web.inventorymanage.dto.BusNoRequest;
|
||||
import com.openhis.web.inventorymanage.dto.IssueDto;
|
||||
import com.openhis.web.inventorymanage.dto.IssueSearchParam;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -104,23 +105,23 @@ public class ReturnIssueController {
|
||||
/**
|
||||
* 提交审批
|
||||
*
|
||||
* @param busNo 单据号
|
||||
* @param request 单据号请求
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PutMapping("/submit-approval")
|
||||
public R<?> submitApproval(@RequestBody String busNo) {
|
||||
return returnIssueAppService.submitApproval(busNo);
|
||||
public R<?> submitApproval(@RequestBody BusNoRequest request) {
|
||||
return returnIssueAppService.submitApproval(request.getBusNo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 撤回审批
|
||||
*
|
||||
* @param busNo 单据号
|
||||
* @param request 单据号请求
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PutMapping("/withdraw-approval")
|
||||
public R<?> withdrawApproval(@RequestBody String busNo) {
|
||||
return returnIssueAppService.withdrawApproval(busNo);
|
||||
public R<?> withdrawApproval(@RequestBody BusNoRequest request) {
|
||||
return returnIssueAppService.withdrawApproval(request.getBusNo());
|
||||
}
|
||||
|
||||
// /**
|
||||
|
||||
@@ -4,130 +4,152 @@
|
||||
|
||||
<select id="selectProductReportPage"
|
||||
resultType="com.openhis.web.reportmanage.dto.InventoryProductReportPageDto">
|
||||
SELECT T8.id, --ID
|
||||
T8.bus_no, --药品编码
|
||||
T8.name, --药品名称
|
||||
T8.lot_number, --批次号
|
||||
T8.manufacturer_text, --厂家
|
||||
T8.item_table, --药品类型
|
||||
T8.item_quantity, --库存数量
|
||||
T8.unit_code, --计量单位
|
||||
T8.min_package_quantity, --小包装库存数
|
||||
T8.min_package_unit, --小包装单位
|
||||
T8.price, --进价
|
||||
T8.sale_price, --售价
|
||||
T8.price * T8.part_percent AS part_price, --拆零进价
|
||||
T8.sale_price * T8.part_percent AS part_sale_price, --拆零售价
|
||||
T8.price * T8.item_quantity AS total_price, --进价金额(总价)
|
||||
T8.sale_price * T8.item_quantity AS total_sale_price, --售价金额(总价)
|
||||
T8.purpose_type_enum, --仓库类型
|
||||
T8.location_name, --仓库名称
|
||||
T8.location_store_name, --货位名称
|
||||
T8.expiration_date, --有效期
|
||||
T8.yb_no, --医保编码
|
||||
T8.tenant_id -- 租户ID
|
||||
FROM (SELECT T1.id, --ID
|
||||
T2.bus_no, --药品编码
|
||||
T2.name, --药品名称
|
||||
T1.lot_number, --批次号
|
||||
T2.manufacturer_text, --厂家
|
||||
T2.category_code AS item_table, --药品类型
|
||||
T1.quantity AS item_quantity, --库存数量
|
||||
T2.unit_code, --计量单位
|
||||
T1.quantity AS min_package_quantity, --小包装库存数
|
||||
T2.min_unit_code AS min_package_unit, --小包装单位
|
||||
CASE
|
||||
WHEN T4.condition_code = #{lotNumber}
|
||||
AND T4.condition_value = T1.lot_number
|
||||
THEN T4.amount
|
||||
ELSE T3.price END AS sale_price, --售价
|
||||
T2.part_percent, --拆零比
|
||||
T6.form_enum AS purpose_type_enum, --仓库类型
|
||||
T6.name AS location_name, --仓库名称
|
||||
T7.name AS location_store_name, --货位名称
|
||||
T1.expiration_date, --有效期
|
||||
T2.yb_no, --医保编码
|
||||
T1.tenant_id -- 租户ID
|
||||
FROM wor_inventory_item AS T1
|
||||
INNER JOIN med_medication_definition AS T2
|
||||
ON T2.id = T1.item_id
|
||||
AND T2.delete_flag = '0'
|
||||
INNER JOIN adm_charge_item_definition AS T3
|
||||
ON T3.instance_id = T2.id
|
||||
AND T3.delete_flag = '0'
|
||||
LEFT JOIN adm_charge_item_def_detail AS T4
|
||||
ON T4.definition_id = T3.id
|
||||
AND T4.delete_flag = '0'
|
||||
LEFT JOIN adm_location T6
|
||||
ON T1.location_id = T6.id
|
||||
AND T6.delete_flag = '0'
|
||||
LEFT JOIN adm_location T7
|
||||
ON T1.location_store_id = T7.id
|
||||
AND T7.delete_flag = '0'
|
||||
WHERE T1.delete_flag = '0') AS T8
|
||||
UNION
|
||||
SELECT T10.id, --ID
|
||||
T10.bus_no, --器材编码
|
||||
T10.name, --器材名称
|
||||
T10.lot_number, --批次号
|
||||
T10.manufacturer_text, --厂家
|
||||
T10.item_table, --器材类型
|
||||
T10.item_quantity, --库存数量
|
||||
T10.unit_code, --计量单位
|
||||
T10.min_package_quantity, --小包装库存数
|
||||
T10.min_package_unit, --小包装单位
|
||||
T10.price, --进价
|
||||
T10.sale_price, --售价
|
||||
T10.price * T10.part_percent AS part_price, --拆零进价
|
||||
T10.sale_price * T10.part_percent AS part_sale_price, --拆零售价
|
||||
T10.price * T10.item_quantity AS total_price, --进价金额(总价)
|
||||
T10.sale_price * T10.item_quantity AS total_sale_price, --售价金额(总价)
|
||||
T10.purpose_type_enum, --仓库类型
|
||||
T10.location_name, --仓库名称
|
||||
T10.location_store_name, --货位名称
|
||||
T10.expiration_date, --有效期
|
||||
T10.yb_no, --医保编码
|
||||
T10.tenant_id -- 租户ID
|
||||
FROM (SELECT T1.id, --ID
|
||||
T9.bus_no, --药品编码
|
||||
T9.name, --药品名称
|
||||
T1.lot_number, --批次号
|
||||
T9.manufacturer_text, --厂家
|
||||
T9.category_code AS item_table, --药品类型
|
||||
T1.quantity AS item_quantity, --库存数量
|
||||
T9.unit_code, --计量单位
|
||||
T1.quantity AS min_package_quantity, --小包装库存数
|
||||
T9.min_unit_code AS min_package_unit, --小包装单位
|
||||
T1.price, --进价
|
||||
CASE
|
||||
WHEN T4.condition_code = #{lotNumber}
|
||||
AND T4.condition_value = T1.lot_number
|
||||
THEN T4.amount
|
||||
ELSE T3.price END AS sale_price, --售价
|
||||
T9.part_percent, --拆零比
|
||||
T6.form_enum AS purpose_type_enum, --仓库类型
|
||||
T6.name AS location_name, --仓库名称
|
||||
T7.name AS location_store_name, --货位名称
|
||||
T1.expiration_date, --有效期
|
||||
T9.yb_no, --医保编码
|
||||
T1.tenant_id -- 租户ID
|
||||
FROM wor_inventory_item AS T1
|
||||
INNER JOIN adm_device_definition AS T9
|
||||
ON T9.id = T1.item_id
|
||||
AND T9.delete_flag = '0'
|
||||
INNER JOIN adm_charge_item_definition AS T3
|
||||
ON T3.instance_id = T9.id
|
||||
AND T3.delete_flag = '0'
|
||||
LEFT JOIN adm_charge_item_def_detail AS T4
|
||||
ON T4.definition_id = T3.id
|
||||
AND T4.delete_flag = '0'
|
||||
LEFT JOIN adm_location T6
|
||||
ON T1.location_id = T6.id
|
||||
AND T6.delete_flag = '0'
|
||||
LEFT JOIN adm_location T7
|
||||
ON T1.location_store_id = T7.id
|
||||
AND T7.delete_flag = '0'
|
||||
WHERE T1.delete_flag = '0') AS T10
|
||||
${ew.customSqlSegment}
|
||||
SELECT * FROM (
|
||||
SELECT T8.id, --ID
|
||||
T8.bus_no, --药品编码
|
||||
T8.name, --药品名称
|
||||
T8.lot_number, --批次号
|
||||
T8.manufacturer_text, --厂家
|
||||
T8.item_table, --药品类型
|
||||
T8.item_quantity, --库存数量
|
||||
T8.unit_code, --计量单位
|
||||
T8.min_package_quantity, --小包装库存数
|
||||
T8.min_package_unit, --小包装单位
|
||||
T8.price, --进价
|
||||
T8.sale_price, --售价
|
||||
T8.price * T8.part_percent AS part_price, --拆零进价
|
||||
T8.sale_price * T8.part_percent AS part_sale_price, --拆零售价
|
||||
T8.price * T8.item_quantity AS total_price, --进价金额(总价)
|
||||
T8.sale_price * T8.item_quantity AS total_sale_price, --售价金额(总价)
|
||||
T8.purpose_type_enum, --仓库类型
|
||||
T8.location_name, --仓库名称
|
||||
T8.location_store_name, --货位名称
|
||||
T8.expiration_date, --有效期
|
||||
T8.yb_no, --医保编码
|
||||
T8.tenant_id -- 租户ID
|
||||
FROM (SELECT T1.id, --ID
|
||||
T2.bus_no, --药品编码
|
||||
T2.name, --药品名称
|
||||
T1.lot_number, --批次号
|
||||
T2.manufacturer_text, --厂家
|
||||
T2.category_code AS item_table, --药品类型
|
||||
T1.quantity AS item_quantity, --库存数量
|
||||
T2.unit_code, --计量单位
|
||||
T1.quantity AS min_package_quantity, --小包装库存数
|
||||
T2.min_unit_code AS min_package_unit, --小包装单位
|
||||
CASE
|
||||
WHEN T4.condition_code = #{lotNumber}
|
||||
AND T4.condition_value = T1.lot_number
|
||||
THEN T4.amount
|
||||
ELSE T3.price END AS sale_price, --售价
|
||||
T2.part_percent, --拆零比
|
||||
T6.form_enum AS purpose_type_enum, --仓库类型
|
||||
T6.name AS location_name, --仓库名称
|
||||
T7.name AS location_store_name, --货位名称
|
||||
T1.expiration_date, --有效期
|
||||
T2.yb_no, --医保编码
|
||||
T1.tenant_id -- 租户ID
|
||||
FROM wor_inventory_item AS T1
|
||||
INNER JOIN med_medication_definition AS T2
|
||||
ON T2.id = T1.item_id
|
||||
AND T2.delete_flag = '0'
|
||||
INNER JOIN adm_charge_item_definition AS T3
|
||||
ON T3.instance_id = T2.id
|
||||
AND T3.delete_flag = '0'
|
||||
LEFT JOIN adm_charge_item_def_detail AS T4
|
||||
ON T4.definition_id = T3.id
|
||||
AND T4.delete_flag = '0'
|
||||
LEFT JOIN adm_location T6
|
||||
ON T1.location_id = T6.id
|
||||
AND T6.delete_flag = '0'
|
||||
LEFT JOIN adm_location T7
|
||||
ON T1.location_store_id = T7.id
|
||||
AND T7.delete_flag = '0'
|
||||
WHERE T1.delete_flag = '0') AS T8
|
||||
UNION
|
||||
SELECT T10.id, --ID
|
||||
T10.bus_no, --器材编码
|
||||
T10.name, --器材名称
|
||||
T10.lot_number, --批次号
|
||||
T10.manufacturer_text, --厂家
|
||||
T10.item_table, --器材类型
|
||||
T10.item_quantity, --库存数量
|
||||
T10.unit_code, --计量单位
|
||||
T10.min_package_quantity, --小包装库存数
|
||||
T10.min_package_unit, --小包装单位
|
||||
T10.price, --进价
|
||||
T10.sale_price, --售价
|
||||
T10.price * T10.part_percent AS part_price, --拆零进价
|
||||
T10.sale_price * T10.part_percent AS part_sale_price, --拆零售价
|
||||
T10.price * T10.item_quantity AS total_price, --进价金额(总价)
|
||||
T10.sale_price * T10.item_quantity AS total_sale_price, --售价金额(总价)
|
||||
T10.purpose_type_enum, --仓库类型
|
||||
T10.location_name, --仓库名称
|
||||
T10.location_store_name, --货位名称
|
||||
T10.expiration_date, --有效期
|
||||
T10.yb_no, --医保编码
|
||||
T10.tenant_id -- 租户ID
|
||||
FROM (SELECT T1.id, --ID
|
||||
T9.bus_no, --药品编码
|
||||
T9.name, --药品名称
|
||||
T1.lot_number, --批次号
|
||||
T9.manufacturer_text, --厂家
|
||||
T9.category_code AS item_table, --药品类型
|
||||
T1.quantity AS item_quantity, --库存数量
|
||||
T9.unit_code, --计量单位
|
||||
T1.quantity AS min_package_quantity, --小包装库存数
|
||||
T9.min_unit_code AS min_package_unit, --小包装单位
|
||||
T1.price, --进价
|
||||
CASE
|
||||
WHEN T4.condition_code = #{lotNumber}
|
||||
AND T4.condition_value = T1.lot_number
|
||||
THEN T4.amount
|
||||
ELSE T3.price END AS sale_price, --售价
|
||||
T9.part_percent, --拆零比
|
||||
T6.form_enum AS purpose_type_enum, --仓库类型
|
||||
T6.name AS location_name, --仓库名称
|
||||
T7.name AS location_store_name, --货位名称
|
||||
T1.expiration_date, --有效期
|
||||
T9.yb_no, --医保编码
|
||||
T1.tenant_id -- 租户ID
|
||||
FROM wor_inventory_item AS T1
|
||||
INNER JOIN adm_device_definition AS T9
|
||||
ON T9.id = T1.item_id
|
||||
AND T9.delete_flag = '0'
|
||||
INNER JOIN adm_charge_item_definition AS T3
|
||||
ON T3.instance_id = T9.id
|
||||
AND T3.delete_flag = '0'
|
||||
LEFT JOIN adm_charge_item_def_detail AS T4
|
||||
ON T4.definition_id = T3.id
|
||||
AND T4.delete_flag = '0'
|
||||
LEFT JOIN adm_location T6
|
||||
ON T1.location_id = T6.id
|
||||
AND T6.delete_flag = '0'
|
||||
LEFT JOIN adm_location T7
|
||||
ON T1.location_store_id = T7.id
|
||||
AND T7.delete_flag = '0'
|
||||
WHERE T1.delete_flag = '0') AS T10
|
||||
) AS combined_result
|
||||
<where>
|
||||
<if test="inventoryScope != null">
|
||||
<choose>
|
||||
<when test="inventoryScope == 2">
|
||||
item_quantity = 0
|
||||
</when>
|
||||
<when test="inventoryScope == 3">
|
||||
item_quantity > 0
|
||||
</when>
|
||||
<when test="inventoryScope == 4">
|
||||
item_quantity <= 20
|
||||
</when>
|
||||
<when test="inventoryScope == 5">
|
||||
item_quantity <= 50
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
|
||||
AND ${ew.sqlSegment}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -123,15 +123,23 @@ function openDialog() {
|
||||
getList();
|
||||
}
|
||||
function getList() {
|
||||
// 检查 encounterId 是否为空
|
||||
if (!props.encounterId) {
|
||||
proxy.$modal.msgWarning('请先选择患者');
|
||||
refundList.value = [];
|
||||
total.value = 0;
|
||||
tableLoading.value = false;
|
||||
return;
|
||||
}
|
||||
refundList.value = [];
|
||||
tableLoading.value = true;
|
||||
getEncounterPatientPayment(props.encounterId).then((res) => {
|
||||
refundList.value = res.data;
|
||||
total.value = res.data ? res.data.length : 0;
|
||||
// expandOrder.value = refundList.value.map((item) => {
|
||||
// return item.paymentNo;
|
||||
// });
|
||||
tableLoading.value = false;
|
||||
}).catch((error) => {
|
||||
tableLoading.value = false;
|
||||
console.error('获取退费账单失败:', error);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -527,6 +527,11 @@ function getEnPrescription(encounterId) {
|
||||
}
|
||||
|
||||
function handleRefund(encounterId) {
|
||||
// 校验是否选择了患者
|
||||
if (!encounterId) {
|
||||
ElMessage.warning('请先选择患者后再进行退费操作');
|
||||
return;
|
||||
}
|
||||
currentEncounterId.value = encounterId;
|
||||
openRefundListDialog.value = true;
|
||||
}
|
||||
|
||||
@@ -857,15 +857,10 @@ function handleBlur(row, index) {
|
||||
row.applicantId = userStore.id;
|
||||
}
|
||||
function handleChangeSourceTypeEnum(value) {
|
||||
if (value == 16) {
|
||||
getPharmacyList().then((res) => {
|
||||
sourceTypeListOptions.value = res.data;
|
||||
});
|
||||
} else if (value == 11) {
|
||||
getDispensaryList().then((res) => {
|
||||
sourceTypeListOptions.value = res.data;
|
||||
});
|
||||
}
|
||||
// 无论选择哪种仓库类型,都显示药房、药库、耗材库的选项
|
||||
getPharmacyCabinetList().then((res) => {
|
||||
sourceTypeListOptions.value = res.data;
|
||||
});
|
||||
}
|
||||
// 获取详情
|
||||
function getTransferProductDetails() {
|
||||
@@ -1247,21 +1242,13 @@ function handleChangePurposeTypeEnum(value) {
|
||||
}
|
||||
// 源仓库切换
|
||||
function handleChangelossTypeEnum(value) {
|
||||
if (value == 16) {
|
||||
getPharmacyList().then((res) => {
|
||||
sourceTypeListOptions.value = res.data;
|
||||
if (!route.query.supplyBusNo) {
|
||||
receiptHeaderForm.lossLocationId = '';
|
||||
}
|
||||
});
|
||||
} else if (value == 11) {
|
||||
getDispensaryList().then((res) => {
|
||||
sourceTypeListOptions.value = res.data;
|
||||
if (!route.query.supplyBusNo) {
|
||||
receiptHeaderForm.lossLocationId = '';
|
||||
}
|
||||
});
|
||||
}
|
||||
// 无论选择哪种仓库类型,都显示药房、药库、耗材库的选项
|
||||
getPharmacyCabinetList().then((res) => {
|
||||
sourceTypeListOptions.value = res.data;
|
||||
if (!route.query.supplyBusNo) {
|
||||
receiptHeaderForm.lossLocationId = '';
|
||||
}
|
||||
});
|
||||
}
|
||||
// 单位处理
|
||||
function handleUnitCodeChange(row, index, value) {
|
||||
|
||||
@@ -734,6 +734,11 @@ function handleExport() {
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
proxy.resetForm('queryRef');
|
||||
// 清空不在 queryParams 中的字段
|
||||
locationId.value = [];
|
||||
supplierId.value = [];
|
||||
// 清空 prop 与 v-model 不匹配的字段
|
||||
queryParams.value.inventoryStatusEnum = undefined;
|
||||
getList();
|
||||
}
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
<el-button type="primary" @click="handleScan()" style="margin-left: 30px">
|
||||
扫码
|
||||
</el-button>
|
||||
<el-button type="primary" @click="previewAndPrint()" style="margin-left: 30px">
|
||||
<el-button type="primary" @click="printPrescription()" style="margin-left: 30px">
|
||||
处方打印
|
||||
</el-button>
|
||||
<div style="position: absolute; top: 30px; right: 25px">
|
||||
|
||||
Reference in New Issue
Block a user