Merge branch 'develop' of https://gitea.gentronhealth.com/wangyizhe/his into develop

This commit is contained in:
huhuihua
2026-01-23 13:58:25 +08:00
20 changed files with 400 additions and 439 deletions

View File

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.common.core.domain.R; import com.core.common.core.domain.R;
import com.core.common.core.domain.entity.SysDictData; import com.core.common.core.domain.entity.SysDictData;
import com.core.common.core.domain.model.LoginUser;
import com.core.common.utils.*; import com.core.common.utils.*;
import com.core.common.utils.bean.BeanUtils; import com.core.common.utils.bean.BeanUtils;
import com.core.common.utils.poi.ExcelUtil; import com.core.common.utils.poi.ExcelUtil;
@@ -400,6 +401,21 @@ public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
// 新增外来诊疗目录 // 新增外来诊疗目录
activityDefinition.setStatusEnum(PublicationStatus.ACTIVE.getValue()); activityDefinition.setStatusEnum(PublicationStatus.ACTIVE.getValue());
// 显式设置创建者和租户ID确保插入时不为null
String createBy = "system";
Integer tenantId = null;
try {
LoginUser loginUser = SecurityUtils.getLoginUser();
if (loginUser != null) {
createBy = loginUser.getUsername();
tenantId = loginUser.getTenantId();
}
} catch (Exception e) {
// 如果获取失败,使用默认值
}
activityDefinition.setCreateBy(createBy);
activityDefinition.setTenantId(tenantId != null ? tenantId : 1); // 默认租户ID为1
// 检查编码是否已存在 // 检查编码是否已存在
List<ActivityDefinition> existingDefinitions = activityDefinitionMapper.selectList( List<ActivityDefinition> existingDefinitions = activityDefinitionMapper.selectList(
new LambdaQueryWrapper<ActivityDefinition>() new LambdaQueryWrapper<ActivityDefinition>()
@@ -624,6 +640,20 @@ public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
.setYbMatchFlag(CommonUtil.tryParseInt(importDto.getYbMatchFlag())) .setYbMatchFlag(CommonUtil.tryParseInt(importDto.getYbMatchFlag()))
.setStatusEnum(PublicationStatus.ACTIVE.getValue()) .setStatusEnum(PublicationStatus.ACTIVE.getValue())
.setChrgitmLv(CommonUtil.tryParseInt(importDto.getChrgitmLv())); .setChrgitmLv(CommonUtil.tryParseInt(importDto.getChrgitmLv()));
// 显式设置创建者和租户ID确保插入时不为null
String createBy = "system";
Integer tenantId = null;
try {
LoginUser loginUser = SecurityUtils.getLoginUser();
if (loginUser != null) {
createBy = loginUser.getUsername();
tenantId = loginUser.getTenantId();
}
} catch (Exception e) {
// 如果获取失败,使用默认值
}
activityDefinition.setCreateBy(createBy);
activityDefinition.setTenantId(tenantId != null ? tenantId : 1); // 默认租户ID为1
return activityDefinition; return activityDefinition;
} }
} }

View File

@@ -123,6 +123,8 @@ public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppSer
*/ */
@Override @Override
public R<?> receiveEncounter(Long encounterId) { public R<?> receiveEncounter(Long encounterId) {
Integer tenantId = SecurityUtils.getLoginUser().getTenantId();
String currentUsername = SecurityUtils.getUsername();
int update = encounterMapper.update(null, int update = encounterMapper.update(null,
new LambdaUpdateWrapper<Encounter>().eq(Encounter::getId, encounterId) new LambdaUpdateWrapper<Encounter>().eq(Encounter::getId, encounterId)
.set(Encounter::getReceptionTime, new Date()) .set(Encounter::getReceptionTime, new Date())
@@ -140,6 +142,9 @@ public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppSer
encounterParticipant.setTypeCode(ParticipantType.ADMITTER.getCode());// 接诊医生 encounterParticipant.setTypeCode(ParticipantType.ADMITTER.getCode());// 接诊医生
encounterParticipant.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId()); encounterParticipant.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId());
encounterParticipant.setStatusEnum(EncounterActivityStatus.ACTIVE.getValue()); // 状态 encounterParticipant.setStatusEnum(EncounterActivityStatus.ACTIVE.getValue()); // 状态
encounterParticipant.setTenantId(tenantId);
encounterParticipant.setCreateBy(currentUsername);
encounterParticipant.setCreateTime(new Date());
iEncounterParticipantService.save(encounterParticipant); iEncounterParticipantService.save(encounterParticipant);
return update > 0 ? R.ok() : R.fail(); return update > 0 ? R.ok() : R.fail();
} }

View File

@@ -25,6 +25,7 @@ import com.openhis.web.inventorymanage.dto.*;
import com.openhis.web.inventorymanage.mapper.PurchaseInventoryMapper; import com.openhis.web.inventorymanage.mapper.PurchaseInventoryMapper;
import com.openhis.workflow.domain.SupplyRequest; import com.openhis.workflow.domain.SupplyRequest;
import com.openhis.workflow.service.ISupplyRequestService; import com.openhis.workflow.service.ISupplyRequestService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
@@ -40,6 +41,7 @@ import java.util.stream.Stream;
* @author zwh * @author zwh
* @date 2025-03-08 * @date 2025-03-08
*/ */
@Slf4j
@Service @Service
public class PurchaseInventoryAppServiceImpl implements IPurchaseInventoryAppService { public class PurchaseInventoryAppServiceImpl implements IPurchaseInventoryAppService {
@@ -159,6 +161,7 @@ public class PurchaseInventoryAppServiceImpl implements IPurchaseInventoryAppSer
@Override @Override
public R<List<ReceiptDetailDto>> getDetail(String busNo) { public R<List<ReceiptDetailDto>> getDetail(String busNo) {
List<ReceiptDetailDto> receiptDetailList = purchaseInventoryMapper.selectDetail(busNo); List<ReceiptDetailDto> receiptDetailList = purchaseInventoryMapper.selectDetail(busNo);
log.debug("返回查询结果,receiptDetailList:{}", receiptDetailList);
if (receiptDetailList.isEmpty()) { if (receiptDetailList.isEmpty()) {
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00006, null)); return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00006, null));
} }
@@ -182,7 +185,7 @@ public class PurchaseInventoryAppServiceImpl implements IPurchaseInventoryAppSer
} }
}); });
} }
log.debug("返回查询结果,receiptDetailList:{}", receiptDetailList);
return R.ok(receiptDetailList); return R.ok(receiptDetailList);
} }
@@ -194,7 +197,6 @@ public class PurchaseInventoryAppServiceImpl implements IPurchaseInventoryAppSer
*/ */
@Override @Override
public R<?> addOrEditInventoryReceipt(List<PurchaseInventoryDto> purchaseInventoryDtoList) { public R<?> addOrEditInventoryReceipt(List<PurchaseInventoryDto> purchaseInventoryDtoList) {
// 校验(已经审批通过的单号(请求状态是同意),不能再重复编辑请求) // 校验(已经审批通过的单号(请求状态是同意),不能再重复编辑请求)
boolean validation = supplyRequestService.supplyRequestValidation(purchaseInventoryDtoList.get(0).getBusNo()); boolean validation = supplyRequestService.supplyRequestValidation(purchaseInventoryDtoList.get(0).getBusNo());
if (validation) { if (validation) {
@@ -232,11 +234,14 @@ public class PurchaseInventoryAppServiceImpl implements IPurchaseInventoryAppSer
// 制单人 // 制单人
.setApplicantId(SecurityUtils.getLoginUser().getPractitionerId()) .setApplicantId(SecurityUtils.getLoginUser().getPractitionerId())
// 申请时间 // 申请时间
.setApplyTime(DateUtils.getNowDate()); .setApplyTime(DateUtils.getNowDate())
.setCreateBy(SecurityUtils.getLoginUser().getUsername())
.setCreateTime(DateUtils.getNowDate())
.setTenantId(SecurityUtils.getLoginUser().getTenantId());
supplyRequestList.add(supplyRequest); supplyRequestList.add(supplyRequest);
} }
// 保存 // 保存
supplyRequestService.saveOrUpdateBatch(supplyRequestList); supplyRequestService.saveOrUpdateBatch(supplyRequestList);

View File

@@ -57,15 +57,15 @@ public class PharmacyWarehouseProfitLossOrderServiceImpl implements IPharmacyWar
// 单据分类 // 单据分类
List<PharmacyWarehouseInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>(); List<PharmacyWarehouseInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>();
// supplyCategoryOption.add(new supplyCategoryOption.add(new
// PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.GENERAL_PROFIT_AND_LOSS.getValue(), PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.GENERAL_PROFIT_AND_LOSS.getValue(),
// SupplyCategory.GENERAL_PROFIT_AND_LOSS.getInfo())); SupplyCategory.GENERAL_PROFIT_AND_LOSS.getInfo()));
// supplyCategoryOption.add(new supplyCategoryOption.add(new
// PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.STOCKTAKING_PROFIT_AND_LOSS.getValue(), PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.STOCKTAKING_PROFIT_AND_LOSS.getValue(),
// SupplyCategory.STOCKTAKING_PROFIT_AND_LOSS.getInfo())); SupplyCategory.STOCKTAKING_PROFIT_AND_LOSS.getInfo()));
// supplyCategoryOption.add(new supplyCategoryOption.add(new
// PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.PREPARATION_CONSUMPTION.getValue(), PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.PREPARATION_CONSUMPTION.getValue(),
// SupplyCategory.PREPARATION_CONSUMPTION.getInfo())); SupplyCategory.PREPARATION_CONSUMPTION.getInfo()));
purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption); purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption);

View File

@@ -56,11 +56,11 @@ public class PharmacyWarehousePurchaseOrderServiceImpl implements IPharmacyWareh
// 单据分类 // 单据分类
List<PharmacyWarehouseInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>(); List<PharmacyWarehouseInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>();
// supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.NORMAL.getValue(), supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.STOCK_SUPPLY.getValue(),
// SupplyCategory.NORMAL.getInfo())); SupplyCategory.STOCK_SUPPLY.getInfo()));
// supplyCategoryOption.add(new supplyCategoryOption.add(new
// PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.PURCHASE_PLAN_GENERATION.getValue(), PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.NON_STOCK.getValue(),
// SupplyCategory.PURCHASE_PLAN_GENERATION.getInfo())); SupplyCategory.NON_STOCK.getInfo()));
purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption); purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption);

View File

@@ -56,8 +56,8 @@ public class PharmacyWarehouseReturnOrderServiceImpl implements IPharmacyWarehou
// 单据分类 // 单据分类
List<PharmacyWarehouseInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>(); List<PharmacyWarehouseInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>();
// supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.NORMAL.getValue(), supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.NORMAL.getValue(),
// SupplyCategory.NORMAL.getInfo())); SupplyCategory.NORMAL.getInfo()));
purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption); purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption);

View File

@@ -56,8 +56,8 @@ public class PharmacyWarehouseReturnToWarehouseOrderServiceImpl implements IPhar
// 单据分类 // 单据分类
List<PharmacyWarehouseInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>(); List<PharmacyWarehouseInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>();
// supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.NORMAL.getValue(), supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.NORMAL.getValue(),
// SupplyCategory.NORMAL.getInfo())); SupplyCategory.NORMAL.getInfo()));
purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption); purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption);

View File

@@ -57,18 +57,16 @@ public class PharmacyWarehouseStockInOrderServiceImpl implements IPharmacyWareho
// 单据分类 // 单据分类
List<PharmacyWarehouseInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>(); List<PharmacyWarehouseInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>();
// supplyCategoryOption supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.PURCHASED_DRUGS_WAREHOUSING.getValue(),
// .add(new PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.PURCHASED_DRUGS_WAREHOUSING.getValue(), SupplyCategory.PURCHASED_DRUGS_WAREHOUSING.getInfo()));
// SupplyCategory.PURCHASED_DRUGS_WAREHOUSING.getInfo())); supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(
// supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption( SupplyCategory.HOMEMADE_DRUGS_WAREHOUSING.getValue(), SupplyCategory.HOMEMADE_DRUGS_WAREHOUSING.getInfo()));
// SupplyCategory.HOMEMADE_DRUGS_WAREHOUSING.getValue(), SupplyCategory.HOMEMADE_DRUGS_WAREHOUSING.getInfo())); supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.CONSIGNMENT_DRUGS_WAREHOUSING.getValue(),
// supplyCategoryOption SupplyCategory.CONSIGNMENT_DRUGS_WAREHOUSING.getInfo()));
// .add(new PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.CONSIGNMENT_DRUGS_WAREHOUSING.getValue(), supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(
// SupplyCategory.CONSIGNMENT_DRUGS_WAREHOUSING.getInfo())); SupplyCategory.OTHER_DRUGS_WAREHOUSING.getValue(), SupplyCategory.OTHER_DRUGS_WAREHOUSING.getInfo()));
// supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption( supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(
// SupplyCategory.OTHER_DRUGS_WAREHOUSING.getValue(), SupplyCategory.OTHER_DRUGS_WAREHOUSING.getInfo())); SupplyCategory.DONATED_DRUGS_WAREHOUSING.getValue(), SupplyCategory.DONATED_DRUGS_WAREHOUSING.getInfo()));
// supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(
// SupplyCategory.DONATED_DRUGS_WAREHOUSING.getValue(), SupplyCategory.DONATED_DRUGS_WAREHOUSING.getInfo()));
purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption); purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption);

View File

@@ -56,12 +56,12 @@ public class PharmacyWarehouseStockOutOrderServiceImpl implements IPharmacyWareh
// 单据分类 // 单据分类
List<PharmacyWarehouseInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>(); List<PharmacyWarehouseInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>();
// supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.IN_HOSPITAL_OUTBOUND.getValue(), supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.IN_HOSPITAL_OUTBOUND.getValue(),
// SupplyCategory.IN_HOSPITAL_OUTBOUND.getInfo())); SupplyCategory.IN_HOSPITAL_OUTBOUND.getInfo()));
// supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.OUT_OF_HOSPITAL_OUTBOUND.getValue(), supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.OUT_OF_HOSPITAL_OUTBOUND.getValue(),
// SupplyCategory.OUT_OF_HOSPITAL_OUTBOUND.getInfo())); SupplyCategory.OUT_OF_HOSPITAL_OUTBOUND.getInfo()));
// supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.OTHER_OUTBOUND.getValue(), supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(SupplyCategory.OTHER_OUTBOUND.getValue(),
// SupplyCategory.OTHER_OUTBOUND.getInfo())); SupplyCategory.OTHER_OUTBOUND.getInfo()));
purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption); purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption);

View File

@@ -57,10 +57,10 @@ public class PharmacyWarehouseStocktakingOrderServiceImpl implements IPharmacyWa
// 单据分类 // 单据分类
List<PharmacyWarehouseInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>(); List<PharmacyWarehouseInitDto.IntegerOption> supplyCategoryOption = new ArrayList<>();
// supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption( supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(
// SupplyCategory.GENERAL_STOCKTAKING.getValue(), SupplyCategory.GENERAL_STOCKTAKING.getInfo())); SupplyCategory.GENERAL_STOCKTAKING.getValue(), SupplyCategory.GENERAL_STOCKTAKING.getInfo()));
// supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption( supplyCategoryOption.add(new PharmacyWarehouseInitDto.IntegerOption(
// SupplyCategory.MONTHLY_STOCKTAKING.getValue(), SupplyCategory.MONTHLY_STOCKTAKING.getInfo())); SupplyCategory.MONTHLY_STOCKTAKING.getValue(), SupplyCategory.MONTHLY_STOCKTAKING.getInfo()));
purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption); purchaseOrderInitDto.setSupplyCategoryOptions(supplyCategoryOption);

View File

@@ -86,7 +86,7 @@
T3.total_volume, T3.total_volume,
T5."name" AS practitioner_name, T5."name" AS practitioner_name,
T6."name" AS purpose_location_name, T6."name" AS purpose_location_name,
T6."id" AS purpose_location_id, T1.purpose_location_id AS purpose_location_id,
T7."name" AS purpose_location_store_name, T7."name" AS purpose_location_store_name,
T1.occurrence_time, T1.occurrence_time,
(SELECT SUM(T9.quantity) (SELECT SUM(T9.quantity)
@@ -119,7 +119,7 @@
ON T1.supplier_id = T10.id ON T1.supplier_id = T10.id
AND T10.delete_flag = '0' AND T10.delete_flag = '0'
LEFT JOIN sys_dict_data sdt LEFT JOIN sys_dict_data sdt
ON sdt.dict_value = T1.unit_code AND dict_type = 'unit_code' ON sdt.dict_value = T1.unit_code AND sdt.dict_type = 'unit_code'
WHERE T1.bus_no = #{busNo} WHERE T1.bus_no = #{busNo}
AND T1.delete_flag = '0' AND T1.delete_flag = '0'
UNION UNION
@@ -145,7 +145,7 @@
T8."size" AS total_volume, T8."size" AS total_volume,
T5."name" AS practitioner_name, T5."name" AS practitioner_name,
T6."name" AS purpose_location_name, T6."name" AS purpose_location_name,
T6."id" AS purpose_location_id, T1.purpose_location_id AS purpose_location_id,
T7."name" AS purpose_location_store_name, T7."name" AS purpose_location_store_name,
T1.occurrence_time, T1.occurrence_time,
(SELECT SUM(T9.quantity) (SELECT SUM(T9.quantity)
@@ -175,7 +175,7 @@
ON T1.supplier_id = T10.id ON T1.supplier_id = T10.id
AND T10.delete_flag = '0' AND T10.delete_flag = '0'
LEFT JOIN sys_dict_data sdt LEFT JOIN sys_dict_data sdt
ON sdt.dict_value = T1.unit_code AND dict_type = 'unit_code' ON sdt.dict_value = T1.unit_code AND sdt.dict_type = 'unit_code'
WHERE T1.bus_no = #{busNo} WHERE T1.bus_no = #{busNo}
AND T1.delete_flag = '0' AND T1.delete_flag = '0'
</select> </select>

View File

@@ -112,7 +112,6 @@
ON T1.context_enum = #{activity} ON T1.context_enum = #{activity}
AND T1.product_id = T2.id AND T1.product_id = T2.id
AND T2.delete_flag = '0' AND T2.delete_flag = '0'
AND T2.status_enum = 1
LEFT JOIN med_medication_definition AS T3 LEFT JOIN med_medication_definition AS T3
ON T1.context_enum = #{medication} ON T1.context_enum = #{medication}
AND T1.product_id = T3.id AND T1.product_id = T3.id
@@ -206,7 +205,6 @@
ON T1.context_enum = #{activity} ON T1.context_enum = #{activity}
AND T1.product_id = T2.id AND T1.product_id = T2.id
AND T2.delete_flag = '0' AND T2.delete_flag = '0'
AND T2.status_enum = 1
LEFT JOIN med_medication_definition AS T3 LEFT JOIN med_medication_definition AS T3
ON T1.context_enum = #{medication} ON T1.context_enum = #{medication}
AND T1.product_id = T3.id AND T1.product_id = T3.id

View File

@@ -231,16 +231,13 @@
AND T3.organization_id = #{organizationId} AND T3.organization_id = #{organizationId}
</if> </if>
WHERE T1.delete_flag = '0' WHERE T1.delete_flag = '0'
<if test="pricingFlag != null and pricingFlag == 1"> AND (T1.pricing_flag = 1 OR T1.pricing_flag IS NULL)
AND (T1.pricing_flag = #{pricingFlag} OR T1.pricing_flag IS NULL)
</if>
<if test="adviceDefinitionIdParamList != null and !adviceDefinitionIdParamList.isEmpty()"> <if test="adviceDefinitionIdParamList != null and !adviceDefinitionIdParamList.isEmpty()">
AND T1.id IN AND T1.id IN
<foreach collection="adviceDefinitionIdParamList" item="itemId" open="(" separator="," close=")"> <foreach collection="adviceDefinitionIdParamList" item="itemId" open="(" separator="," close=")">
#{itemId} #{itemId}
</foreach> </foreach>
</if> </if>
AND T1.status_enum = #{statusEnum}
) )
</if> </if>
</if> </if>

View File

@@ -23,120 +23,120 @@ public enum SupplyCategory implements HisEnumInterface {
/** /**
* 非库存供应 * 非库存供应
*/ */
NON_STOCK(2, "2", "非库存供应"); NON_STOCK(2, "2", "非库存供应"),
// /** /**
// * 普通 * 普通
// */ */
// NORMAL(3, "3","0.普通"), NORMAL(3, "3", "0.普通"),
// /** /**
// * 采购计划生成 * 采购计划生成
// */ */
// PURCHASE_PLAN_GENERATION(4, "4","1.采购计划生成"), PURCHASE_PLAN_GENERATION(4, "4", "1.采购计划生成"),
// /** /**
// * 外购药品入库 * 外购药品入库
// */ */
// PURCHASED_DRUGS_WAREHOUSING(5, "5","0.外购药品入库"), PURCHASED_DRUGS_WAREHOUSING(5, "5", "0.外购药品入库"),
// /** /**
// * 自制药品入库 * 自制药品入库
// */ */
// HOMEMADE_DRUGS_WAREHOUSING(6, "6","1.自制药品入库"), HOMEMADE_DRUGS_WAREHOUSING(6, "6", "1.自制药品入库"),
// /** /**
// * 代销药品入库 * 代销药品入库
// */ */
// CONSIGNMENT_DRUGS_WAREHOUSING(7, "7","2.代销药品入库"), CONSIGNMENT_DRUGS_WAREHOUSING(7, "7", "2.代销药品入库"),
// /** /**
// * 其他药品入库 * 其他药品入库
// */ */
// OTHER_DRUGS_WAREHOUSING(8, "8","3.其他药品入库"), OTHER_DRUGS_WAREHOUSING(8, "8", "3.其他药品入库"),
// /** /**
// * 赠送药品入库 * 赠送药品入库
// */ */
// DONATED_DRUGS_WAREHOUSING(9, "9","4.赠送药品入库"), DONATED_DRUGS_WAREHOUSING(9, "9", "4.赠送药品入库"),
// /** /**
// * 申请采购 * 申请采购
// */ */
// PURCHASE_APPLICATION(10, "10","1.申请采购"), PURCHASE_APPLICATION(10, "10", "1.申请采购"),
// /** /**
// * 院内出库 * 院内出库
// */ */
// IN_HOSPITAL_OUTBOUND(11, "11","0.院内出库"), IN_HOSPITAL_OUTBOUND(11, "11", "0.院内出库"),
// /** /**
// * 院外出库 * 院外出库
// */ */
// OUT_OF_HOSPITAL_OUTBOUND(12, "12","1.院外出库"), OUT_OF_HOSPITAL_OUTBOUND(12, "12", "1.院外出库"),
// /** /**
// * 其他出库 * 其他出库
// */ */
// OTHER_OUTBOUND(13, "13","2.其他出库"), OTHER_OUTBOUND(13, "13", "2.其他出库"),
// /** /**
// * 普通损益 * 普通损益
// */ */
// GENERAL_PROFIT_AND_LOSS(14, "14","0.普通损益"), GENERAL_PROFIT_AND_LOSS(14, "14", "0.普通损益"),
// /** /**
// * 盘点损益 * 盘点损益
// */ */
// STOCKTAKING_PROFIT_AND_LOSS(15, "15","1.盘点损益"), STOCKTAKING_PROFIT_AND_LOSS(15, "15", "1.盘点损益"),
// /** /**
// * 制剂消耗 * 制剂消耗
// */ */
// PREPARATION_CONSUMPTION(16, "16","2.制剂消耗"), PREPARATION_CONSUMPTION(16, "16", "2.制剂消耗"),
// /** /**
// * 常备抢救药品 * 常备抢救药品
// */ */
// STANDBY_RESCUE_MEDICINES(16, "16","2.常备抢救药品"), STANDBY_RESCUE_MEDICINES(17, "17", "2.常备抢救药品"),
// /** /**
// * 破损过期药品 * 破损过期药品
// */ */
// DAMAGED_EXPIRED_MEDICINES(16, "16","3.破损过期药品"), DAMAGED_EXPIRED_MEDICINES(18, "18", "3.破损过期药品"),
// /** /**
// * 捐赠药品 * 捐赠药品
// */ */
// DONATED_MEDICINES(16, "16","4.捐赠药品"), DONATED_MEDICINES(19, "19", "4.捐赠药品"),
// /** /**
// * 普通盘点 * 普通盘点
// */ */
// GENERAL_STOCKTAKING(17, "17","0.普通盘点"), GENERAL_STOCKTAKING(20, "20", "0.普通盘点"),
// /** /**
// * 月度盘点 * 月度盘点
// */ */
// MONTHLY_STOCKTAKING(18, "18","1.月度盘点"), MONTHLY_STOCKTAKING(21, "21", "1.月度盘点"),
// /** /**
// * 门诊病人发药 * 门诊病人发药
// */ */
// OUTPATIENT_PATIENT_DISPENSING(19, "19","0.门诊病人发药"), OUTPATIENT_PATIENT_DISPENSING(22, "22", "0.门诊病人发药"),
// /** /**
// * 住院病人发药 * 住院病人发药
// */ */
// INPATIENT_PATIENT_DISPENSING(20, "20","1.住院病人发药"), INPATIENT_PATIENT_DISPENSING(23, "23", "1.住院病人发药"),
// /** /**
// * 住院病人汇总发药 * 住院病人汇总发药
// */ */
// INPATIENT_PATIENT_SUMMARY_DISPENSING(21, "21","2.住院病人汇总发药"), INPATIENT_PATIENT_SUMMARY_DISPENSING(24, "24", "2.住院病人汇总发药"),
// /** /**
// * 赠送 * 赠送
// */ */
// PRESENT(22, "22","1.赠送"), PRESENT(25, "25", "1.赠送"),
// /** /**
// * 视光材料 * 视光材料
// */ */
// OPTICAL_MATERIALS(23, "23","2.视光材料"), OPTICAL_MATERIALS(26, "26", "2.视光材料"),
// /** /**
// * 调价分类 药品 * 调价分类 药品
// */ */
// REQUEST_CATEGORY_CHANGE_PRICE_MEDICATION(24, "24","药品调价单"), REQUEST_CATEGORY_CHANGE_PRICE_MEDICATION(27, "27", "药品调价单"),
// /** /**
// * 调价分类 耗材 * 调价分类 耗材
// */ */
// REQUEST_CATEGORY_CHANGE_PRICE_DEVICE(25, "25","耗材调价单"), REQUEST_CATEGORY_CHANGE_PRICE_DEVICE(28, "28", "耗材调价单"),
// /** /**
// * 调价分类 诊疗 * 调价分类 诊疗
// */ */
// REQUEST_CATEGORY_CHANGE_PRICE_ACTIVITY(26, "26","诊疗调价单"), REQUEST_CATEGORY_CHANGE_PRICE_ACTIVITY(29, "29", "诊疗调价单"),
// /** /**
// * 调价分类 挂号 * 调价分类 挂号
// */ */
// REQUEST_CATEGORY_CHANGE_PRICE_HEALTH(27, "27","挂号调价单"); REQUEST_CATEGORY_CHANGE_PRICE_HEALTH(30, "30", "挂号调价单");
private Integer value; private Integer value;
private String code; private String code;
private String info; private String info;

View File

@@ -1,6 +1,7 @@
package com.openhis.administration.domain; package com.openhis.administration.domain;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.core.common.core.domain.HisBaseEntity; import com.core.common.core.domain.HisBaseEntity;
@@ -43,4 +44,9 @@ public class EncounterParticipant extends HisBaseEntity {
/** 状态 */ /** 状态 */
private Integer statusEnum; private Integer statusEnum;
/**
* 租户ID新增字段和数据库的tenant_id对应
*/
@TableField("tenant_id") // 显式映射数据库字段名避免MyBatis-Plus自动转换出错
private Integer tenantId;
} }

View File

@@ -90,3 +90,5 @@ WHERE aci.context_enum = 'ACTIVITY'

View File

@@ -167,8 +167,29 @@ const handleNodeClick = (data, node) => {
if (node.isLeaf) { if (node.isLeaf) {
// 存储当前节点数据 // 存储当前节点数据
currentSelectTemplate.value = data.document; currentSelectTemplate.value = data.document;
// 在切换组件前先重置表单数据,避免显示之前的数据
editForm.value = {
id: '',
definitionId: '',
definitionBusNo: '',
contentJson: '',
statusEnum: 1,
organizationId: 0,
encounterId: '',
patientId: '',
recordTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
createBy: '',
source: '',
};
// 先清空当前组件,再设置新组件,确保组件完全重新渲染
currentComponent.value = '';
// 使用 nextTick 确保 DOM 更新后再设置新组件
nextTick(() => {
currentComponent.value = currentSelectTemplate.value.vueRouter || ''; currentComponent.value = currentSelectTemplate.value.vueRouter || '';
// currentComponent.value = data.document.vueRouter || ''; });
} else { } else {
currentSelectTemplate.value = { currentSelectTemplate.value = {
id: '', id: '',
@@ -426,8 +447,21 @@ const loadLatestMedicalRecord = async () => {
// 自动回显最新病历数据到模板 // 自动回显最新病历数据到模板
editForm.value = latestRecord; editForm.value = latestRecord;
nextTick(() => { nextTick(() => {
if (emrComponentRef.value && latestRecord.contentJson) { if (emrComponentRef.value) {
emrComponentRef.value.setFormData(JSON.parse(latestRecord.contentJson)); // 确保动态组件已加载完成后再设置数据
if (latestRecord.contentJson) {
try {
const parsedData = JSON.parse(latestRecord.contentJson);
emrComponentRef.value.setFormData(parsedData);
} catch (parseError) {
console.error('解析病历数据失败:', parseError);
// 解析失败时仍然尝试设置空数据以清空之前的残留数据
emrComponentRef.value.setFormData({});
}
} else {
// 如果没有内容数据,也要清空组件中的数据
emrComponentRef.value.setFormData({});
}
} }
// 通知History组件更新选中状态 // 通知History组件更新选中状态
@@ -438,11 +472,51 @@ const loadLatestMedicalRecord = async () => {
} else { } else {
// 清空选中状态 // 清空选中状态
selectedHistoryRecordId.value = ''; selectedHistoryRecordId.value = '';
// 当没有历史记录时,也要清空当前表单数据,避免显示之前患者的数据
editForm.value = {
id: '',
definitionId: '',
definitionBusNo: '',
contentJson: '',
statusEnum: 1,
organizationId: 0,
encounterId: '',
patientId: '',
recordTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
createBy: '',
source: '',
};
nextTick(() => {
if (emrComponentRef.value) {
emrComponentRef.value.setFormData({});
}
});
} }
} catch (error) { } catch (error) {
ElMessage.error('加载最新病历数据失败'); ElMessage.error('加载最新病历数据失败');
// 出错时也清空选中状态 // 出错时也清空选中状态
selectedHistoryRecordId.value = ''; selectedHistoryRecordId.value = '';
// 出错时也要清空表单数据,避免显示之前患者的数据
editForm.value = {
id: '',
definitionId: '',
definitionBusNo: '',
contentJson: '',
statusEnum: 1,
organizationId: 0,
encounterId: '',
patientId: '',
recordTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
createBy: '',
source: '',
};
nextTick(() => {
if (emrComponentRef.value) {
emrComponentRef.value.setFormData({});
}
});
} finally { } finally {
loading.value = false; loading.value = false;
} }
@@ -689,6 +763,22 @@ watch(
(newPatientInfo) => { (newPatientInfo) => {
// 当患者信息变化时,默认选中门诊病历模板并加载最新病历数据 // 当患者信息变化时,默认选中门诊病历模板并加载最新病历数据
if (newPatientInfo && newPatientInfo.patientId && Object.keys(newPatientInfo).length > 0) { if (newPatientInfo && newPatientInfo.patientId && Object.keys(newPatientInfo).length > 0) {
// 重置当前组件和表单数据,确保不会显示之前患者的数据
currentComponent.value = '';
editForm.value = {
id: '',
definitionId: '',
definitionBusNo: '',
contentJson: '',
statusEnum: 1,
organizationId: 0,
encounterId: '',
patientId: '',
recordTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
createBy: '',
source: '',
};
// 确保模板树已经加载 // 确保模板树已经加载
if (templateData.value && templateData.value.length > 0) { if (templateData.value && templateData.value.length > 0) {
// 优先尝试使用更精确的selectDefaultTemplate函数 // 优先尝试使用更精确的selectDefaultTemplate函数
@@ -702,6 +792,22 @@ watch(
}); });
}); });
} }
} else {
// 如果没有患者信息,也要重置组件和表单数据
currentComponent.value = '';
editForm.value = {
id: '',
definitionId: '',
definitionBusNo: '',
contentJson: '',
statusEnum: 1,
organizationId: 0,
encounterId: '',
patientId: '',
recordTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
createBy: '',
source: '',
};
} }
}, },
{ deep: true, immediate: true } { deep: true, immediate: true }

View File

@@ -355,161 +355,6 @@
/> />
</template> </template>
</el-select> </el-select>
</el-form-item>
<!-- 剂量单位 -->
<el-select
v-model="scope.row.unitCode"
style="width: 70px; margin-right: 20px"
placeholder=" "
>
<template
v-for="item in scope.row.unitCodeList"
:key="item.value"
>
<el-option
v-if="item.type == unitMap['minUnit']"
:value="item.value"
:label="item.label"
/>
</template>
</el-select>
<span>=</span>
<!-- 单次剂量 -->
<el-form-item prop="dose" class="required-field" data-prop="dose">
<el-input-number
v-model="scope.row.dose"
controls-position="right"
:controls="false"
style="width: 70px; margin: 0 20px"
:ref="
(el) => {
if (!inputRefs[scope.$index])
inputRefs[scope.$index] = {};
inputRefs[scope.$index].dose = el;
}
"
@input="convertDoseValues(scope.row, scope.$index)"
@keyup.enter.prevent="
handleEnter(
'dose',
scope.row,
scope.$index,
prescription.id
)
"
/>
</el-form-item>
<!-- 全部单位 -->
<el-select
v-model="scope.row.doseUnitCode"
style="width: 70px"
placeholder=" "
@change="convertValues(scope.row, scope.$index)"
>
<el-option
v-for="item in scope.row.unitCodeList"
:value="item.value"
:label="item.label"
:key="item.value"
/>
</el-select>
</div>
<div class="form-group">
<el-form-item
label="给药途径:"
prop="methodCode"
class="required-field"
data-prop="methodCode"
>
<el-select
v-model="scope.row.methodCode"
placeholder="给药途径"
clearable
filterable
:ref="
(el) => {
if (!inputRefs[scope.$index])
inputRefs[scope.$index] = {};
inputRefs[scope.$index].methodCode = el;
}
"
@keyup.enter.prevent="
() => {
inputRefs[scope.$index]?.methodCode?.blur();
}
"
@visible-change="
(value) => {
if (!value) {
handleEnter('methodCode', scope.row, scope.$index);
}
}
"
>
<el-option
v-for="dict in method_code"
@click="() => (scope.row.methodCode_dictText = dict.label)"
@keyup="handleEnter('methodCode', scope.row, scope.$index)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item
label="用药频次"
prop="rateCode"
class="required-field"
data-prop="rateCode"
>
<el-select
v-model="scope.row.rateCode"
placeholder="频次"
style="width: 120px"
filterable
@keyup.enter.prevent="
() => {
inputRefs[scope.$index]?.rateCode?.blur();
}
"
@change="calculateTotalAmount(scope.row, scope.$index)"
@visible-change="
(value) => {
if (!value) {
handleEnter('rateCode', scope.row, scope.$index);
}
// inputRefs.rateCode.blur();
}
"
:ref="
(el) => {
if (!inputRefs[scope.$index])
inputRefs[scope.$index] = {};
inputRefs[scope.$index].rateCode = el;
}
"
>
<el-option
v-for="dict in rate_code"
@click="() => (scope.row.rateCode_dictText = dict.label)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item
label="备注"
prop="remarks"
style="margin: 0; margin-right: 20px"
>
<el-input
v-model="scope.row.remarks"
placeholder="请输入备注"
maxlength="100"
show-word-limit
style="width: 200px"
/>
</el-form-item> </el-form-item>
</div> </div>
</div> </div>
@@ -524,93 +369,22 @@
> >
<div class="form-group"> <div class="form-group">
<el-form-item <el-form-item
label="用药天数" label="备注:"
prop="dispensePerDuration" prop="remarks"
class="required-field" style="margin: 0; margin-right: 20px"
data-prop="dispensePerDuration"
> >
<el-input-number <el-input
v-model="scope.row.dispensePerDuration" v-model="scope.row.remarks"
style="width: 80px" placeholder="请输入备注"
:min="1" maxlength="100"
controls-position="right" show-word-limit
:controls="false" style="width: 500px"
:ref="
(el) => {
if (!inputRefs[scope.$index])
inputRefs[scope.$index] = {};
inputRefs[scope.$index].dispensePerDuration = el;
}
"
@keyup.enter.prevent="
handleEnter('dispensePerDuration', scope.row, scope.$index)
"
@input="calculateTotalAmount(scope.row, scope.$index)"
>
<template #suffix>天</template>
</el-input-number>
</el-form-item>
<el-form-item
label="总量"
prop="quantity"
class="required-field"
data-prop="quantity"
>
<el-input-number
v-model="scope.row.quantity"
style="width: 70px"
controls-position="right"
:controls="false"
:ref="
(el) => {
if (!inputRefs[scope.$index])
inputRefs[scope.$index] = {};
inputRefs[scope.$index].quantity = el;
}
"
@keyup.enter.prevent="
handleEnter(
'quantity',
scope.row,
scope.$index,
prescription.id
)
"
@input="calculateTotalPrice(scope.row, scope.$index)"
/> />
</el-form-item> </el-form-item>
<el-select
v-model="scope.row.unitCode"
style="width: 70px; margin-right: 20px"
placeholder=" "
@change="calculateTotalAmount(scope.row, scope.$index)"
>
<template
v-for="item in scope.row.unitCodeList"
:key="item.value"
>
<el-option
v-if="checkUnit(item, scope.row)"
:value="item.value"
:label="item.label"
@click="
() => {
if (item.type == unitMap['minUnit']) {
scope.row.unitPrice = scope.row.minUnitPrice;
} else {
scope.row.unitPrice = scope.row.unitTempPrice;
}
scope.row.unitCode_dictText = item.label;
}
"
/>
</template>
</el-select>
</div> </div>
<el-button <el-button
type="primary" type="primary"
@click="handleSaveSign(scope.row, scope.$index, prescription.id)" @click="handleSaveSign(scope.row, scope.$index)"
> >
确定 确定
</el-button> </el-button>
@@ -693,7 +467,7 @@
}} }}
</span> </span>
</div> </div>
<el-button type="primary" @click="handleSaveSign(scope.row, scope.$index, prescription.id)"> <el-button type="primary" @click="handleSaveSign(scope.row, scope.$index)">
确定 确定
</el-button> </el-button>
</template> </template>
@@ -1152,6 +926,12 @@ const adviceTypeList = ref([
}, },
]); ]);
// 根据类型值获取显示标签,避免非编辑态出现空标签
const mapAdviceTypeLabel = (type) => {
const found = adviceTypeList.value.find((item) => item.value === type);
return found ? found.label : '';
};
// 西药处方管理相关变量 // 西药处方管理相关变量
const westernPrescriptions = ref([]); // 西药处方列表 const westernPrescriptions = ref([]); // 西药处方列表
const currentPrescriptionId = ref(null); // 当前活跃的处方ID const currentPrescriptionId = ref(null); // 当前活跃的处方ID
@@ -2321,6 +2101,8 @@ function handleSaveSign(row, index, prescriptionId) {
row.patientId = props.patientInfo.patientId; row.patientId = props.patientInfo.patientId;
row.encounterId = props.patientInfo.encounterId; row.encounterId = props.patientInfo.encounterId;
row.accountId = accountId.value; row.accountId = accountId.value;
// 确保非编辑态显示正确的医嘱类型标签
row.adviceType_dictText = mapAdviceTypeLabel(row.adviceType);
if (row.adviceType == 1 || row.adviceType == 2) { if (row.adviceType == 1 || row.adviceType == 2) {
row.minUnitQuantity = row.minUnitQuantity =
row.minUnitCode == row.unitCode ? row.quantity : row.quantity * row.partPercent; row.minUnitCode == row.unitCode ? row.quantity : row.quantity * row.partPercent;

View File

@@ -24,9 +24,9 @@
</el-row> </el-row>
<el-row :gutter="10" class="mb8" v-else> <el-row :gutter="10" class="mb8" v-else>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="submitAudit" <el-button type="primary" plain icon="Plus" @click="submitAudit">
>提交审核</el-button 提交审核
> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="EditPen" @click="handleTotalAmount"> <el-button type="primary" plain icon="EditPen" @click="handleTotalAmount">
@@ -35,7 +35,8 @@
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleSave" <el-button type="primary" plain icon="Plus" @click="handleSave"
>批量保存</el-button >批量保存
</el-button
> >
</el-col> </el-col>
</el-row> </el-row>
@@ -271,11 +272,11 @@
> >
<div class="select_wrapper_div"> <div class="select_wrapper_div">
<el-select <el-select
v-if="viewStatus !== 'view'"
v-model="scope.row.purposeLocationId" v-model="scope.row.purposeLocationId"
placeholder="请选择仓库" placeholder="请选择仓库"
:class="{ 'error-border': scope.row.error }" :class="{ 'error-border': scope.row.error }"
clearable clearable
:disabled="viewStatus == 'view'"
> >
<el-option <el-option
v-for="(item, index) in locationList" v-for="(item, index) in locationList"
@@ -285,8 +286,19 @@
@click="handleLocationClick(item, scope.row, scope.$index)" @click="handleLocationClick(item, scope.row, scope.$index)"
/> />
</el-select> </el-select>
<!-- 非编辑状态下显示为只读输入框 -->
<el-input
v-else
:model-value="getLocationNameById(scope.row.purposeLocationId)"
readonly
disabled
:placeholder="'-'"
class="readonly-input" style="pointer-events: none;"
/>
</div> </div>
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@@ -724,7 +736,27 @@ const {
"specialty_code", "specialty_code",
"purchase_type" "purchase_type"
); );
//
// // 监听locationList变化重新处理已存在的数据
// watch(locationList, (newList) => {
// if (newList && newList.length > 0) {
// // 可以触发表格重新渲染或更新相关数据
// }
// }, { immediate: true });
const getLocationNameById = (id) => {
// 检查locationList是否已加载
if (!locationList.value || !Array.isArray(locationList.value) || locationList.value.length === 0) {
return '仓库列表未加载';
}
// 使用严格相等比较,处理类型转换
const location = locationList.value.find(item => {
return item.id == id; // 使用 == 而不是 === 以处理字符串和数字之间的比较
});
return location ? location.name : '仓库不存在';
};
const viewStatus = ref(""); const viewStatus = ref("");
const startTimeOld = ref(""); const startTimeOld = ref("");
const endTimeOld = ref(""); const endTimeOld = ref("");

View File

@@ -205,9 +205,9 @@
> >
<template #default="scope"> <template #default="scope">
<!-- v-hasPermi="['system:user:edit']" --> <!-- v-hasPermi="['system:user:edit']" -->
<el-button link type="primary" icon="View" @click.stop="handleUpdate(scope.row, 'view')" <el-button link type="primary" icon="View" @click.stop="handleUpdate(scope.row, 'view')">
>详情</el-button 详情
> </el-button>
<el-button <el-button
link link
type="primary" type="primary"
@@ -588,6 +588,7 @@ function handleUpdate(row, view) {
// 采购入库 // 采购入库
editRow.value = row; editRow.value = row;
getpurchaseInventoryDetail(row.supplyBusNo).then((response) => { getpurchaseInventoryDetail(row.supplyBusNo).then((response) => {
console.log('返回的数据,response:', response.data)
currentData.value = response.data; currentData.value = response.data;
// nextTick(() => { // nextTick(() => {
// proxy.$refs['inventoryReceiptRef'].edit(); // proxy.$refs['inventoryReceiptRef'].edit();
@@ -604,7 +605,6 @@ function handleUpdate(row, view) {
path: 'purchaseDocument', path: 'purchaseDocument',
}); });
} }
getList(); getList();
}); });
} }