Merge branch 'master' of https://codeup.aliyun.com/61c0318acd8b75daa5a125f7/medical/openhis
This commit is contained in:
		| @@ -41,7 +41,8 @@ public class MybatisPlusConfig { | |||||||
|     public PaginationInnerInterceptor paginationInnerInterceptor() { |     public PaginationInnerInterceptor paginationInnerInterceptor() { | ||||||
|         PaginationInnerInterceptor paginationInnerInterceptor = new PaginationInnerInterceptor(); |         PaginationInnerInterceptor paginationInnerInterceptor = new PaginationInnerInterceptor(); | ||||||
|         // 设置数据库类型为mysql |         // 设置数据库类型为mysql | ||||||
|         paginationInnerInterceptor.setDbType(DbType.MYSQL); |         //paginationInnerInterceptor.setDbType(DbType.MYSQL); | ||||||
|  |         paginationInnerInterceptor.setDbType(DbType.POSTGRE_SQL); | ||||||
|         // 设置最大单页限制数量,默认 500 条,-1 不受限制 |         // 设置最大单页限制数量,默认 500 条,-1 不受限制 | ||||||
|         paginationInnerInterceptor.setMaxLimit(-1L); |         paginationInnerInterceptor.setMaxLimit(-1L); | ||||||
|         return paginationInnerInterceptor; |         return paginationInnerInterceptor; | ||||||
|   | |||||||
| @@ -3,22 +3,34 @@ | |||||||
|  */ |  */ | ||||||
| package com.openhis.web.basicservice.controller; | package com.openhis.web.basicservice.controller; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||||
|  | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||||||
|  | import com.baomidou.mybatisplus.core.metadata.IPage; | ||||||
|  | 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.utils.MessageUtils; | ||||||
| import com.openhis.administration.domain.ChargeItemDefinition; | import com.openhis.administration.domain.ChargeItemDefinition; | ||||||
| import com.openhis.administration.domain.HealthcareService; | import com.openhis.administration.domain.HealthcareService; | ||||||
| import com.openhis.administration.mapper.LocationMapper; |  | ||||||
| import com.openhis.administration.service.IChargeItemDefinitionService; | import com.openhis.administration.service.IChargeItemDefinitionService; | ||||||
| import com.openhis.administration.service.IHealthcareServiceService; | import com.openhis.administration.service.IHealthcareServiceService; | ||||||
|  | import com.openhis.common.constant.CommonConstants; | ||||||
|  | import com.openhis.common.constant.PromptMsgConstant; | ||||||
| import com.openhis.common.enums.AccountStatus; | import com.openhis.common.enums.AccountStatus; | ||||||
| import com.openhis.common.enums.WhetherContainUnknown; | import com.openhis.common.enums.WhetherContainUnknown; | ||||||
|  | import com.openhis.common.utils.HisQueryUtils; | ||||||
| import com.openhis.web.basicservice.dto.HealthcareServiceAddOrUpdateParam; | import com.openhis.web.basicservice.dto.HealthcareServiceAddOrUpdateParam; | ||||||
|  | import com.openhis.web.basicservice.dto.HealthcareServiceDto; | ||||||
| import com.openhis.web.basicservice.dto.HealthcareServiceInitDto; | import com.openhis.web.basicservice.dto.HealthcareServiceInitDto; | ||||||
| import com.openhis.web.basicservice.mapper.HealthcareServiceBizMapper; | import com.openhis.web.basicservice.mapper.HealthcareServiceBizMapper; | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||||
|  | import org.springframework.transaction.annotation.Transactional; | ||||||
| import org.springframework.validation.annotation.Validated; | import org.springframework.validation.annotation.Validated; | ||||||
| import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||||
|  |  | ||||||
|  | import javax.servlet.http.HttpServletRequest; | ||||||
|  | import java.util.Arrays; | ||||||
|  | import java.util.HashSet; | ||||||
| import java.util.List; | import java.util.List; | ||||||
| import java.util.stream.Collectors; | import java.util.stream.Collectors; | ||||||
| import java.util.stream.Stream; | import java.util.stream.Stream; | ||||||
| @@ -35,34 +47,19 @@ public class HealthcareServiceController { | |||||||
|     private final IHealthcareServiceService iHealthcareServiceService; |     private final IHealthcareServiceService iHealthcareServiceService; | ||||||
|     private final IChargeItemDefinitionService iChargeItemDefinitionService; |     private final IChargeItemDefinitionService iChargeItemDefinitionService; | ||||||
|  |  | ||||||
|  |  | ||||||
|     private final HealthcareServiceBizMapper healthcareServiceBizMapper; |     private final HealthcareServiceBizMapper healthcareServiceBizMapper; | ||||||
|     private final LocationMapper locationMapper; |  | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 服务管理基础数据初始化 |      * 服务管理基础数据初始化 | ||||||
|      */ |      */ | ||||||
|     @GetMapping(value = "/init") |     @GetMapping(value = "/init") | ||||||
|     public R<?> init(@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, |     public R<?> init() { | ||||||
|                      @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, |  | ||||||
|                      @RequestParam(value = "searchKey", defaultValue = "") String searchKey) { |  | ||||||
|         HealthcareServiceInitDto healthcareServiceInitDto = new HealthcareServiceInitDto(); |         HealthcareServiceInitDto healthcareServiceInitDto = new HealthcareServiceInitDto(); | ||||||
|         // 活动标记 |         // 活动标记 | ||||||
|         List<HealthcareServiceInitDto.activeFlagOption> activeFlagOptions = Stream.of(AccountStatus.values()) |         List<HealthcareServiceInitDto.activeFlagOption> activeFlagOptions = Stream.of(AccountStatus.values()) | ||||||
|                 .map(status -> new HealthcareServiceInitDto.activeFlagOption(status.getValue(), status.getInfo())) |                 .map(status -> new HealthcareServiceInitDto.activeFlagOption(status.getValue(), status.getInfo())) | ||||||
|                 .collect(Collectors.toList()); |                 .collect(Collectors.toList()); | ||||||
|         healthcareServiceInitDto.setActiveFlagOptions(activeFlagOptions); |         healthcareServiceInitDto.setActiveFlagOptions(activeFlagOptions); | ||||||
|  /*       // 构建查询条件 |  | ||||||
|         QueryWrapper<Location> queryWrapper = HisQueryUtils.buildQueryWrapper(null, searchKey, |  | ||||||
|                 new HashSet<>(Arrays.asList("name")), null); |  | ||||||
|         Page<Location> LocationPage = HisPageUtils.selectPage( |  | ||||||
|                 locationMapper, queryWrapper, pageNo, pageSize, Location.class); |  | ||||||
|         List<Location> LocationList = LocationPage.getRecords(); |  | ||||||
|         // 位置信息 |  | ||||||
|         List<HealthcareServiceInitDto.locationIdOption> locationIdOptions = LocationList.stream() |  | ||||||
|                 .map(location -> new HealthcareServiceInitDto.locationIdOption(location.getId(), location.getName())) |  | ||||||
|                 .collect(Collectors.toList()); |  | ||||||
|         healthcareServiceInitDto.setLocationIdOptions(locationIdOptions);*/ |  | ||||||
|         // 是否需要预约 |         // 是否需要预约 | ||||||
|         List<HealthcareServiceInitDto.appointmentRequiredFlagOption> appointmentRequiredFlagOptions = Stream.of(WhetherContainUnknown.values()) |         List<HealthcareServiceInitDto.appointmentRequiredFlagOption> appointmentRequiredFlagOptions = Stream.of(WhetherContainUnknown.values()) | ||||||
|                 .map(wh -> new HealthcareServiceInitDto.appointmentRequiredFlagOption(wh.getValue(), wh.getInfo())) |                 .map(wh -> new HealthcareServiceInitDto.appointmentRequiredFlagOption(wh.getValue(), wh.getInfo())) | ||||||
| @@ -75,6 +72,7 @@ public class HealthcareServiceController { | |||||||
|      * 服务管理 新增 |      * 服务管理 新增 | ||||||
|      */ |      */ | ||||||
|     @PostMapping(value = "/healthcare-service") |     @PostMapping(value = "/healthcare-service") | ||||||
|  |     @Transactional(rollbackFor = Exception.class) | ||||||
|     public R<?> add(@Validated @RequestBody HealthcareServiceAddOrUpdateParam healthcareServiceAddOrUpdateParam) { |     public R<?> add(@Validated @RequestBody HealthcareServiceAddOrUpdateParam healthcareServiceAddOrUpdateParam) { | ||||||
|         // 服务管理-表单数据 |         // 服务管理-表单数据 | ||||||
|         HealthcareService healthcareServiceFormData = healthcareServiceAddOrUpdateParam.getHealthcareServiceFormData(); |         HealthcareService healthcareServiceFormData = healthcareServiceAddOrUpdateParam.getHealthcareServiceFormData(); | ||||||
| @@ -82,8 +80,68 @@ public class HealthcareServiceController { | |||||||
|         ChargeItemDefinition chargeItemDefinitionFormData = healthcareServiceAddOrUpdateParam.getChargeItemDefinitionFormData(); |         ChargeItemDefinition chargeItemDefinitionFormData = healthcareServiceAddOrUpdateParam.getChargeItemDefinitionFormData(); | ||||||
|         // 服务管理-新增 |         // 服务管理-新增 | ||||||
|         HealthcareService healthcareService = iHealthcareServiceService.addHealthcareService(healthcareServiceFormData); |         HealthcareService healthcareService = iHealthcareServiceService.addHealthcareService(healthcareServiceFormData); | ||||||
|  |         // 同时保存费用定价 | ||||||
|  |         boolean res = iChargeItemDefinitionService.addChargeItemDefinitionByHealthcareService(healthcareService, chargeItemDefinitionFormData); | ||||||
|  |         return res ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[]{"服务管理"})) : | ||||||
|  |                 R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00010, null)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|         return null; |     /** | ||||||
|  |      * 服务管理 分页查询 | ||||||
|  |      * | ||||||
|  |      * @param healthcareServiceDto 查询条件 | ||||||
|  |      * @param searchKey            模糊查询关键字 | ||||||
|  |      * @param pageNo               当前页码 | ||||||
|  |      * @param pageSize             查询条数 | ||||||
|  |      * @param request              请求数据 | ||||||
|  |      * @return 列表信息 | ||||||
|  |      */ | ||||||
|  |     @GetMapping(value = "/healthcare-service-page") | ||||||
|  |     public R<?> getHealthcareServicePage(@RequestBody HealthcareServiceDto healthcareServiceDto, | ||||||
|  |                                          @RequestParam(value = "searchKey", defaultValue = "") String searchKey, | ||||||
|  |                                          @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, | ||||||
|  |                                          @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) { | ||||||
|  |         // 构建查询条件 | ||||||
|  |         QueryWrapper<HealthcareServiceDto> queryWrapper = HisQueryUtils.buildQueryWrapper(healthcareServiceDto, searchKey, | ||||||
|  |                 new HashSet<>(Arrays.asList("name", "charge_name")), request); | ||||||
|  |         IPage<HealthcareServiceDto> healthcareServicePage = healthcareServiceBizMapper.getHealthcareServicePage( | ||||||
|  |                 new Page<>(pageNo, pageSize), CommonConstants.TableName.ADM_HEALTHCARE_SERVICE, queryWrapper); | ||||||
|  |         return R.ok(healthcareServicePage, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, null)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 服务管理 编辑 | ||||||
|  |      * | ||||||
|  |      * @param healthcareServiceAddOrUpdateParam 表单数据 | ||||||
|  |      * @return 编辑结果 | ||||||
|  |      */ | ||||||
|  |     @PutMapping(value = "/healthcare-service") | ||||||
|  |     public R<?> edit(@Validated @RequestBody HealthcareServiceAddOrUpdateParam healthcareServiceAddOrUpdateParam) { | ||||||
|  |         // 服务管理-表单数据 | ||||||
|  |         HealthcareService healthcareServiceFormData = healthcareServiceAddOrUpdateParam.getHealthcareServiceFormData(); | ||||||
|  |         boolean res = iHealthcareServiceService.updateHealthcareService(healthcareServiceFormData); | ||||||
|  |         return res ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[]{"服务管理"})) : | ||||||
|  |                 R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 服务管理 删除 | ||||||
|  |      * | ||||||
|  |      * @param id ID | ||||||
|  |      * @return 删除结果 | ||||||
|  |      */ | ||||||
|  |     @DeleteMapping(value = "/healthcare-service") | ||||||
|  |     @Transactional(rollbackFor = Exception.class) | ||||||
|  |     public R<?> delete(@RequestParam Long id) { | ||||||
|  |         boolean res = iHealthcareServiceService.removeById(id); | ||||||
|  |         // 同时删除非同定价 | ||||||
|  |         LambdaQueryWrapper<ChargeItemDefinition> QueryWrapper = new LambdaQueryWrapper<>(); | ||||||
|  |         QueryWrapper.eq(ChargeItemDefinition::getInstanceId, id). | ||||||
|  |                 eq(ChargeItemDefinition::getInstanceTable, CommonConstants.TableName.ADM_HEALTHCARE_SERVICE); | ||||||
|  |         iChargeItemDefinitionService.remove(QueryWrapper); | ||||||
|  |         return res ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[]{"服务管理"})) : | ||||||
|  |                 R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00006, null)); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -0,0 +1,95 @@ | |||||||
|  | package com.openhis.web.basicservice.dto; | ||||||
|  |  | ||||||
|  | import com.openhis.common.annotation.Dict; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.experimental.Accessors; | ||||||
|  |  | ||||||
|  | import java.math.BigDecimal; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 服务管理 Dto | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @Accessors(chain = true) | ||||||
|  | public class HealthcareServiceDto { | ||||||
|  |     /** | ||||||
|  |      * ID | ||||||
|  |      */ | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 活动标记 | ||||||
|  |      */ | ||||||
|  |     private Integer activeFlag; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 提供部门ID | ||||||
|  |      */ | ||||||
|  |     @Dict(dictTable = "adm_organization",dictCode = "id",dictText = "name") | ||||||
|  |     private Long offeredOrgId; | ||||||
|  |     private String offeredOrgId_dictText; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 服务分类 | ||||||
|  |      */ | ||||||
|  |     @Dict(dictCode = "category_code") | ||||||
|  |     private String categoryCode; | ||||||
|  |     private String categoryCode_dictText; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 服务类型 | ||||||
|  |      */ | ||||||
|  |     @Dict(dictCode = "service_type_code") | ||||||
|  |     private String typeCode; | ||||||
|  |     private String typeCode_dictText; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 服务专业 | ||||||
|  |      */ | ||||||
|  |     @Dict(dictCode = "specialty_code") | ||||||
|  |     private String specialtyCode; | ||||||
|  |     private String specialtyCode_dictText; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 地点 | ||||||
|  |      */ | ||||||
|  |     @Dict(dictTable = "adm_location",dictCode = "id",dictText = "name") | ||||||
|  |     private Long locationId; | ||||||
|  |     private String locationId_dictText; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 服务名称 | ||||||
|  |      */ | ||||||
|  |     private String name; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 说明 | ||||||
|  |      */ | ||||||
|  |     private String comment; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 额外细节 | ||||||
|  |      */ | ||||||
|  |     private String extraDetails; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 联系方式 | ||||||
|  |      */ | ||||||
|  |     private String contact; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 预约要求 | ||||||
|  |      */ | ||||||
|  |     private Integer appointmentRequiredFlag; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 名称 | ||||||
|  |      */ | ||||||
|  |     private String chargeName; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 基础价格 | ||||||
|  |      */ | ||||||
|  |     private BigDecimal price; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -6,7 +6,7 @@ import lombok.experimental.Accessors; | |||||||
| import java.util.List; | import java.util.List; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * 服务管理 基础数据 |  * 服务管理 init基础数据 | ||||||
|  */ |  */ | ||||||
| @Data | @Data | ||||||
| @Accessors(chain = true) | @Accessors(chain = true) | ||||||
| @@ -14,7 +14,6 @@ public class HealthcareServiceInitDto { | |||||||
|  |  | ||||||
|  |  | ||||||
|     private List<activeFlagOption> activeFlagOptions; |     private List<activeFlagOption> activeFlagOptions; | ||||||
|     //private List<locationIdOption> locationIdOptions; |  | ||||||
|     private List<appointmentRequiredFlagOption> appointmentRequiredFlagOptions; |     private List<appointmentRequiredFlagOption> appointmentRequiredFlagOptions; | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -32,20 +31,6 @@ public class HealthcareServiceInitDto { | |||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
| /*    *//** |  | ||||||
|      * 位置信息 |  | ||||||
|      *//* |  | ||||||
|     @Data |  | ||||||
|     public static class locationIdOption { |  | ||||||
|         private Long value; |  | ||||||
|         private String label; |  | ||||||
|  |  | ||||||
|         public locationIdOption(Long value, String label) { |  | ||||||
|             this.value = value; |  | ||||||
|             this.label = label; |  | ||||||
|         } |  | ||||||
|     }*/ |  | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 是否需要预约 |      * 是否需要预约 | ||||||
|      */ |      */ | ||||||
|   | |||||||
| @@ -1,5 +1,11 @@ | |||||||
| package com.openhis.web.basicservice.mapper; | package com.openhis.web.basicservice.mapper; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||||||
|  | import com.baomidou.mybatisplus.core.metadata.IPage; | ||||||
|  | import com.baomidou.mybatisplus.core.toolkit.Constants; | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
|  | import com.openhis.web.basicservice.dto.HealthcareServiceDto; | ||||||
|  | import org.apache.ibatis.annotations.Param; | ||||||
| import org.springframework.stereotype.Repository; | import org.springframework.stereotype.Repository; | ||||||
|  |  | ||||||
| /** | /** | ||||||
| @@ -7,4 +13,17 @@ import org.springframework.stereotype.Repository; | |||||||
|  */ |  */ | ||||||
| @Repository | @Repository | ||||||
| public interface HealthcareServiceBizMapper { | public interface HealthcareServiceBizMapper { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 服务管理 分页查询 | ||||||
|  |      * | ||||||
|  |      * @param page         分页参数 | ||||||
|  |      * @param tableName    定价表名 | ||||||
|  |      * @param queryWrapper 查询条件 | ||||||
|  |      * @return 列表信息 | ||||||
|  |      */ | ||||||
|  |     IPage<HealthcareServiceDto> getHealthcareServicePage(@Param("page") Page<HealthcareServiceDto> page, | ||||||
|  |                                                          @Param("tableName") String tableName, | ||||||
|  |                                                          @Param(Constants.WRAPPER) QueryWrapper<HealthcareServiceDto> queryWrapper); | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -3,25 +3,29 @@ | |||||||
|  */ |  */ | ||||||
| package com.openhis.web.datadictionary.controller; | package com.openhis.web.datadictionary.controller; | ||||||
|  |  | ||||||
|  | import java.util.Arrays; | ||||||
|  | import java.util.HashSet; | ||||||
| import java.util.List; | import java.util.List; | ||||||
|  | import java.util.concurrent.CopyOnWriteArrayList; | ||||||
| import java.util.stream.Collectors; | import java.util.stream.Collectors; | ||||||
|  | import java.util.stream.Stream; | ||||||
|  |  | ||||||
| import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||||||
| 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.utils.MessageUtils; | import com.core.common.utils.MessageUtils; | ||||||
| import com.core.common.utils.bean.BeanUtils; | import com.core.common.utils.bean.BeanUtils; | ||||||
| import com.openhis.administration.domain.Supplier; | import com.openhis.administration.domain.Supplier; | ||||||
|  | import com.openhis.administration.mapper.SupplierMapper; | ||||||
| import com.openhis.administration.service.ISupplierService; | import com.openhis.administration.service.ISupplierService; | ||||||
| import com.openhis.common.constant.PromptMsgConstant; | import com.openhis.common.constant.PromptMsgConstant; | ||||||
| import com.openhis.web.datadictionary.dto.SupplierDto; | import com.openhis.common.enums.SupplierType; | ||||||
| import com.openhis.web.datadictionary.dto.SupplierSearchParam; | import com.openhis.common.utils.HisPageUtils; | ||||||
|  | import com.openhis.common.utils.HisQueryUtils; | ||||||
|  | import com.openhis.web.datadictionary.dto.*; | ||||||
| import org.springframework.validation.annotation.Validated; | import org.springframework.validation.annotation.Validated; | ||||||
| import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||||
|  |  | ||||||
| import com.openhis.clinical.domain.ConditionDefinition; |  | ||||||
| import com.openhis.clinical.service.IConditionDefinitionService; |  | ||||||
|  |  | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||||
|  |  | ||||||
| @@ -34,81 +38,86 @@ import javax.servlet.http.HttpServletRequest; | |||||||
|  * @date 2025-02-21 |  * @date 2025-02-21 | ||||||
|  */ |  */ | ||||||
| @RestController | @RestController | ||||||
| @RequestMapping("/data-dictionary-supplier") | @RequestMapping("/data-dictionary/supplier") | ||||||
| @Slf4j | @Slf4j | ||||||
| @AllArgsConstructor | @AllArgsConstructor | ||||||
| public class SupplierManagementController { | public class SupplierManagementController { | ||||||
|     private final ISupplierService supplierService; |     private final ISupplierService supplierService; | ||||||
|  |     private final SupplierMapper supplierMapper; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 厂商/产地初始化 | ||||||
|  |      * | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @GetMapping("/information-init") | ||||||
|  |     public R<?> getSupplierInit() { | ||||||
|  |         SupplierInitDto supplierInitDto = new SupplierInitDto(); | ||||||
|  |         // 获取厂商/产地种类 | ||||||
|  |         List<SupplierInitDto.supplierTypeOption> supplierTypeOption = Stream.of(SupplierType.values()) | ||||||
|  |                 .map(status -> new SupplierInitDto.supplierTypeOption(status.getValue(), status.getInfo())) | ||||||
|  |                 .collect(Collectors.toList()); | ||||||
|  |         supplierInitDto.setSupplierTypeOptions(supplierTypeOption); | ||||||
|  |         return R.ok(supplierInitDto); | ||||||
|  |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 厂商/产地查询 |      * 厂商/产地查询 | ||||||
|      * |      * | ||||||
|      * @param supplierSearchParam 查询条件 |      * @param supplierSearchParam 查询条件 | ||||||
|  |      * @param searchKey 查询条件-模糊查询 | ||||||
|      * @param pageNo 查询条件 |      * @param pageNo 查询条件 | ||||||
|      * @param pageSize 查询条件 |      * @param pageSize 查询条件 | ||||||
|      * @return 厂商/产地查询结果 |      * @return 厂商/产地查询结果 | ||||||
|      */ |      */ | ||||||
|     @GetMapping(value = "/get-supplier-list") |     @GetMapping(value = "/get-supplier-list") | ||||||
|     public R<?> getSupplierList(SupplierSearchParam supplierSearchParam, |     public R<?> getSupplierList(SupplierSearchParam supplierSearchParam, | ||||||
|  |                                 @RequestParam(value = "searchKey", defaultValue = "") String searchKey, | ||||||
|                                 @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, |                                 @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, | ||||||
|                                 @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) { |                                 @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) { | ||||||
|  |  | ||||||
|         // 查询条件初始化 |         // 构建查询条件 | ||||||
|         Supplier supplier = new Supplier(); |         QueryWrapper<Supplier> queryWrapper = HisQueryUtils.buildQueryWrapper(supplierSearchParam, | ||||||
|         BeanUtils.copyProperties(supplierSearchParam, supplier); |                 searchKey, new HashSet<>(Arrays.asList("bus_no", "name", "py_str", "wb_str")), request); | ||||||
|  |         // 设置排序 | ||||||
|         // 查询 |         queryWrapper.orderByAsc("bus_no"); | ||||||
|         Page<Supplier> supplierPage = supplierService.getPage(supplier,pageNo,pageSize); |         // 分页查询 | ||||||
|         // 定义【入库单据分页列表DTO】的分页,传入【页码】、【行数】、及上面分页的【总数】 |         Page<SupplierDto> supplierPage = | ||||||
|         Page<SupplierDto> returnPage = |                 HisPageUtils.selectPage(supplierMapper, queryWrapper, pageNo, pageSize, SupplierDto.class); | ||||||
|                 new Page<>(supplierPage.getCurrent(), supplierPage.getSize(), supplierPage.getTotal()); |         // 返回【病种目录列表DTO】分页 | ||||||
| //        supplierPage |         return R.ok(supplierPage); | ||||||
| //        supplierPage.map(item -> { |  | ||||||
| //            SupplierDto supplierDto = new SupplierDto(); |  | ||||||
| //            BeanUtils.copyProperties(item, supplierDto); // 使用 BeanUtils 复制属性 |  | ||||||
| //            // 如果有特殊字段需要手动转换,可以在这里处理 |  | ||||||
| //            return supplierDto; |  | ||||||
| //        }); |  | ||||||
|  |  | ||||||
|         return R.ok(returnPage); |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 添加供应商信息 |      * 添加供应商信息 | ||||||
|      * |      * | ||||||
|      * @param supplierDto 供应商信息 |      * @param supplierUpDto 供应商信息 | ||||||
|      */ |      */ | ||||||
|     @PostMapping("/add-supplier") |     @PostMapping("/add-supplier") | ||||||
|     public R<?> addSupplyRequest(@Validated @RequestBody SupplierDto supplierDto) { |     public R<?> addSupplyRequest(@Validated @RequestBody SupplierUpDto supplierUpDto) { | ||||||
|         // 初始化参数 |  | ||||||
|         Supplier supplier = new Supplier(); |  | ||||||
|         BeanUtils.copyProperties(supplierDto, supplier); |  | ||||||
|         // 如果业务上不需要其它处理 直接调用service的保存方法 |  | ||||||
|         boolean saveSupplierSuccess = supplierService.save(supplier); |  | ||||||
|  |  | ||||||
|         if (!saveSupplierSuccess) { |         Supplier supplierInfo = new Supplier(); | ||||||
|             return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00006, null)); |         BeanUtils.copyProperties(supplierUpDto, supplierInfo); | ||||||
|         } |         return supplierService.addSupplier(supplierInfo) | ||||||
|  |                 ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"厂商/供应商信息"})) | ||||||
|         return saveSupplierSuccess |                 : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null)); | ||||||
|                 ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"厂商/供应商信息"})) |  | ||||||
|                 : R.fail(PromptMsgConstant.Common.M00007, null); |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 编辑供应商信息 |      * 编辑供应商信息 | ||||||
|      * |      * | ||||||
|      * @param supplierDto 供应商信息 |      * @param supplierUpDto 供应商信息 | ||||||
|      */ |      */ | ||||||
|     @PutMapping("/edit-supplier") |     @PutMapping("/edit-supplier") | ||||||
|     public R<?> editSupplyRequest(@Validated @RequestBody  SupplierDto supplierDto) { |     public R<?> editSupplyRequest(@Validated @RequestBody  SupplierUpDto supplierUpDto) { | ||||||
|         // 初始化参数 |  | ||||||
|         Supplier supplier = new Supplier(); |  | ||||||
|         BeanUtils.copyProperties(supplierDto, supplier); |  | ||||||
|  |  | ||||||
|         return supplierService.updateById(supplier) ? |         Supplier supplier = new Supplier(); | ||||||
|                 R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"厂商/供应商信息"})) |         BeanUtils.copyProperties(supplierUpDto, supplier); | ||||||
|             : R.fail(PromptMsgConstant.Common.M00007, null); |  | ||||||
|  |         // 更新供应商信息信息 | ||||||
|  |         return supplierService.updateById(supplier) | ||||||
|  |                 ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"厂商/供应商信息"})) | ||||||
|  |                 : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -120,10 +129,56 @@ public class SupplierManagementController { | |||||||
|      */ |      */ | ||||||
|     @GetMapping(value = "/get-supplier-detail") |     @GetMapping(value = "/get-supplier-detail") | ||||||
|     public R<?> getSupplierDetail(@RequestParam(name = "id", required = true) String supplierId) { |     public R<?> getSupplierDetail(@RequestParam(name = "id", required = true) String supplierId) { | ||||||
|  |         SupplierDto supplierDto = new SupplierDto(); | ||||||
|  |         // 根据ID查询【供应商信息】 | ||||||
|  |         Supplier supplier = supplierService.getById(supplierId); | ||||||
|  |         BeanUtils.copyProperties(supplier, supplierDto); | ||||||
|  |         return R.ok(supplierDto); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 厂商/产地停用 | ||||||
|  |      * | ||||||
|  |      * @param ids 厂商/产地ID列表 | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @PutMapping("/information-stop") | ||||||
|  |     public R<?> editSupplierStop(@RequestBody List<Long> ids) { | ||||||
|  |         List<Supplier> supplierList = new CopyOnWriteArrayList<>(); | ||||||
|  |  | ||||||
|         // 查询 |         // 取得更新值 | ||||||
|         Supplier supplierDetail = supplierService.getById(supplierId); |         for (Long detail : ids) { | ||||||
|         return R.ok(supplierDetail); |             Supplier supplier = new Supplier(); | ||||||
|  |             supplier.setId(detail); | ||||||
|  |             supplier.setActiveFlag(0); | ||||||
|  |             supplierList.add(supplier); | ||||||
|  |         } | ||||||
|  |         // 更新厂商/产地信息 | ||||||
|  |         return supplierService.updateBatchById(supplierList) | ||||||
|  |                 ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"疾病目录"})) | ||||||
|  |                 : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 厂商/产地启用 | ||||||
|  |      * | ||||||
|  |      * @param ids 厂商/产地ID列表 | ||||||
|  |      * @return | ||||||
|  |      */ | ||||||
|  |     @PutMapping("/information-start") | ||||||
|  |     public R<?> editSupplierStart(@RequestBody List<Long> ids) { | ||||||
|  |         List<Supplier> supplierList = new CopyOnWriteArrayList<>(); | ||||||
|  |  | ||||||
|  |         // 取得更新值 | ||||||
|  |         for (Long detail : ids) { | ||||||
|  |             Supplier supplier = new Supplier(); | ||||||
|  |             supplier.setId(detail); | ||||||
|  |             supplier.setActiveFlag(1); | ||||||
|  |             supplierList.add(supplier); | ||||||
|  |         } | ||||||
|  |         // 更新厂商/产地信息 | ||||||
|  |         return supplierService.updateBatchById(supplierList) | ||||||
|  |                 ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"疾病目录"})) | ||||||
|  |                 : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -5,6 +5,8 @@ package com.openhis.web.datadictionary.dto; | |||||||
|  |  | ||||||
| import com.baomidou.mybatisplus.annotation.IdType; | import com.baomidou.mybatisplus.annotation.IdType; | ||||||
| import com.baomidou.mybatisplus.annotation.TableId; | import com.baomidou.mybatisplus.annotation.TableId; | ||||||
|  | import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||||||
|  | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.experimental.Accessors; | import lombok.experimental.Accessors; | ||||||
|  |  | ||||||
| @@ -22,6 +24,7 @@ import java.util.Date; | |||||||
| public class SupplierDto { | public class SupplierDto { | ||||||
|  |  | ||||||
|     /** ID */ |     /** ID */ | ||||||
|  |     @JsonSerialize(using = ToStringSerializer.class) | ||||||
|     private Long id; |     private Long id; | ||||||
|  |  | ||||||
|     /** 编号 */ |     /** 编号 */ | ||||||
| @@ -52,5 +55,6 @@ public class SupplierDto { | |||||||
|     private Integer activeFlag; |     private Integer activeFlag; | ||||||
|  |  | ||||||
|     /** 机构编号 */ |     /** 机构编号 */ | ||||||
|  |     @JsonSerialize(using = ToStringSerializer.class) | ||||||
|     private Long orgId; |     private Long orgId; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -0,0 +1,33 @@ | |||||||
|  | package com.openhis.web.datadictionary.dto; | ||||||
|  |  | ||||||
|  | import java.util.ArrayList; | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.experimental.Accessors; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 厂商/产地初始dto | ||||||
|  |  * | ||||||
|  |  * @author dh | ||||||
|  |  * @date 2025-02-28 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @Accessors(chain = true) | ||||||
|  | public class SupplierInitDto { | ||||||
|  |     private List<supplierTypeOption> supplierTypeOptions; | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 状态 | ||||||
|  |      */ | ||||||
|  |     @Data | ||||||
|  |     public static class supplierTypeOption { | ||||||
|  |         private Integer value; | ||||||
|  |         private String info; | ||||||
|  |  | ||||||
|  |         public supplierTypeOption(Integer value, String info) { | ||||||
|  |             this.value = value; | ||||||
|  |             this.info = info; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @@ -24,16 +24,11 @@ public class SupplierSearchParam implements Serializable { | |||||||
|      */ |      */ | ||||||
|     @Schema(description = "编号") |     @Schema(description = "编号") | ||||||
|     private String busNo; |     private String busNo; | ||||||
|     /** |  | ||||||
|      * 名称* |  | ||||||
|      */ |  | ||||||
|     @Schema(description = "名称") |  | ||||||
|     private String name; |  | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * 名称* |      * 名称* | ||||||
|      */ |      */ | ||||||
|     @Schema(description = "供应商类型") |     @Schema(description = "供应商类型") | ||||||
|     private String typeEnum; |     private Integer typeEnum; | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -0,0 +1,71 @@ | |||||||
|  | /* | ||||||
|  |  * Copyright ©2023 CJB-CNIT Team. All rights reserved | ||||||
|  |  */ | ||||||
|  | package com.openhis.web.datadictionary.dto; | ||||||
|  |  | ||||||
|  | import com.baomidou.mybatisplus.annotation.IdType; | ||||||
|  | import com.baomidou.mybatisplus.annotation.TableId; | ||||||
|  | import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||||||
|  | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.experimental.Accessors; | ||||||
|  |  | ||||||
|  | import javax.validation.constraints.NotBlank; | ||||||
|  | import javax.validation.constraints.NotEmpty; | ||||||
|  | import javax.validation.constraints.NotNull; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | import java.util.Date; | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * 供应商保存dto | ||||||
|  |  * | ||||||
|  |  * @author dh | ||||||
|  |  * @date 2025-02-24 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @Accessors(chain = true) | ||||||
|  | public class SupplierUpDto { | ||||||
|  |  | ||||||
|  |     /** ID */ | ||||||
|  |     @JsonSerialize(using = ToStringSerializer.class) | ||||||
|  |     private Long id; | ||||||
|  |  | ||||||
|  |     /** 编号 */ | ||||||
|  |     @NotBlank(message = "编号不能为空") | ||||||
|  |     private String busNo; | ||||||
|  |  | ||||||
|  |     /** 名称 */ | ||||||
|  |     @NotBlank(message = "名称不能为空") | ||||||
|  |     private String name; | ||||||
|  |  | ||||||
|  |     /** 类型 */ | ||||||
|  |     @NotNull(message = "类型不能为空") | ||||||
|  |     private Integer typeEnum; | ||||||
|  |  | ||||||
|  |     /** 地址 */ | ||||||
|  |     @NotBlank(message = "地址不能为空") | ||||||
|  |     private String address; | ||||||
|  |  | ||||||
|  |     /** 拼音码 */ | ||||||
|  |     @NotBlank(message = "拼音码不能为空") | ||||||
|  |     private String pyStr; | ||||||
|  |  | ||||||
|  |     /** 五笔码 */ | ||||||
|  |     @NotBlank(message = "五笔码不能为空") | ||||||
|  |     private String wbStr; | ||||||
|  |  | ||||||
|  |     /** 联系人电话 */ | ||||||
|  |     @NotBlank(message = "联系人电话不能为空") | ||||||
|  |     private String phone; | ||||||
|  |  | ||||||
|  |     /** 联系人邮箱 */ | ||||||
|  |     @NotBlank(message = "联系人邮箱不能为空") | ||||||
|  |     private String email; | ||||||
|  |  | ||||||
|  |     /** 活动标识 */ | ||||||
|  |     private Integer activeFlag; | ||||||
|  |  | ||||||
|  |     /** 机构编号 */ | ||||||
|  |     @JsonSerialize(using = ToStringSerializer.class) | ||||||
|  |     private Long orgId; | ||||||
|  | } | ||||||
| @@ -223,7 +223,7 @@ public class PatientInformationController { | |||||||
|             return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); |             return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null)); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"病人信息"})); |         return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"病人信息"})); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
| @@ -249,11 +249,7 @@ public class PatientInformationController { | |||||||
|         Page<PatientInformationDto> patientInformationPage = new Page<>(pageNo, pageSize, total); |         Page<PatientInformationDto> patientInformationPage = new Page<>(pageNo, pageSize, total); | ||||||
|         patientInformationPage.setRecords(listPatients); |         patientInformationPage.setRecords(listPatients); | ||||||
|  |  | ||||||
|         if (patientInformationPage == null || patientInformationPage.getRecords().isEmpty()) { |         return R.ok(patientInformationPage); | ||||||
|             return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00006, null)); |  | ||||||
|         } |  | ||||||
|         return R.ok(patientInformationPage, |  | ||||||
|             MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[] {"病人信息"})); |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -43,3 +43,4 @@ apl.common.M00006=操作失败,该数据已被他人删除,请刷新后重试 | |||||||
| apl.common.M00007=操作失败,该数据已被他人更改,请刷新后重试 | apl.common.M00007=操作失败,该数据已被他人更改,请刷新后重试 | ||||||
| apl.common.M00008=请勿重复提交 | apl.common.M00008=请勿重复提交 | ||||||
| apl.common.M00009=查询成功 | apl.common.M00009=查询成功 | ||||||
|  | apl.common.M00010=操作失败,请联系管理员 | ||||||
| @@ -4,4 +4,49 @@ | |||||||
|         "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |         "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||||
| <mapper namespace="com.openhis.web.basicservice.mapper.HealthcareServiceBizMapper"> | <mapper namespace="com.openhis.web.basicservice.mapper.HealthcareServiceBizMapper"> | ||||||
|  |  | ||||||
|  |     <select id="getHealthcareServicePage" resultType="com.openhis.web.basicservice.dto.HealthcareServiceDto"> | ||||||
|  |         SELECT | ||||||
|  |             T3.id, | ||||||
|  |             T3.tenant_id, | ||||||
|  |             T3.active_flag, | ||||||
|  |             T3.offered_org_id, | ||||||
|  |             T3.category_code, | ||||||
|  |             T3.type_code, | ||||||
|  |             T3.specialty_code, | ||||||
|  |             T3.location_id, | ||||||
|  |             T3.NAME, | ||||||
|  |             T3.COMMENT, | ||||||
|  |             T3.extra_details, | ||||||
|  |             T3.contact, | ||||||
|  |             T3.appointment_required_flag, | ||||||
|  |             T3.charge_name, | ||||||
|  |             T3.price | ||||||
|  |         FROM | ||||||
|  |             ( | ||||||
|  |                 SELECT | ||||||
|  |                     T1.id, | ||||||
|  |                     T1.tenant_id, | ||||||
|  |                     T1.active_flag, | ||||||
|  |                     T1.offered_org_id, | ||||||
|  |                     T1.category_code, | ||||||
|  |                     T1.type_code, | ||||||
|  |                     T1.specialty_code, | ||||||
|  |                     T1.location_id, | ||||||
|  |                     T1.NAME, | ||||||
|  |                     T1.COMMENT, | ||||||
|  |                     T1.extra_details, | ||||||
|  |                     T1.contact, | ||||||
|  |                     T1.appointment_required_flag, | ||||||
|  |                     T2.charge_name, | ||||||
|  |                     T2.price | ||||||
|  |                 FROM | ||||||
|  |                     adm_healthcare_service AS T1 | ||||||
|  |                         LEFT JOIN adm_charge_item_definition AS T2 ON T2.instance_id = T1.ID | ||||||
|  |                         AND T2.instance_table = #{tableName} | ||||||
|  |                 ORDER BY | ||||||
|  |                     T1.create_time DESC | ||||||
|  |             ) AS T3 | ||||||
|  |             ${ew.customSqlSegment} | ||||||
|  |     </select> | ||||||
|  |  | ||||||
| </mapper> | </mapper> | ||||||
| @@ -42,12 +42,25 @@ | |||||||
|         <where> |         <where> | ||||||
|             <!-- 如果传入busNo参数,且不为空 --> |             <!-- 如果传入busNo参数,且不为空 --> | ||||||
|             <if test="busNo != null and busNo != ''"> |             <if test="busNo != null and busNo != ''"> | ||||||
|                 AND busNo LIKE CONCAT(#{busNo}, '%') |                 AND pt.bus_no LIKE CONCAT('%',#{busNo}, '%') | ||||||
|             </if> |             </if> | ||||||
|  |  | ||||||
|             <!-- 如果传入name参数,且不为空 --> |             <!-- 如果传入name参数,且不为空 --> | ||||||
|             <if test="name != null and name != ''"> |             <if test="name != null and name != ''"> | ||||||
|                 AND name LIKE CONCAT(#{name}, '%') |                 <choose> | ||||||
|  |                     <!-- 如果name参数中包含汉字 --> | ||||||
|  |                     <when test="name.matches('.*[\u4e00-\u9fa5].*')"> | ||||||
|  |                         AND pt.name LIKE CONCAT('%', #{name}, '%') | ||||||
|  |                     </when> | ||||||
|  |                     <!-- 如果name参数中只包含字母 --> | ||||||
|  |                     <when test="name.matches('^[a-zA-Z]+$')"> | ||||||
|  |                         AND pt.py_str LIKE CONCAT('%', #{name}, '%') | ||||||
|  |                     </when> | ||||||
|  |                     <!-- 如果name参数中既包含汉字又包含字母 --> | ||||||
|  |                     <otherwise> | ||||||
|  |                         AND (pt.name LIKE CONCAT('%', #{name}, '%') OR pt.py_str LIKE CONCAT('%', #{name}, '%')) | ||||||
|  |                     </otherwise> | ||||||
|  |                 </choose> | ||||||
|             </if> |             </if> | ||||||
|         </where> |         </where> | ||||||
|         ORDER BY pt.bus_no |         ORDER BY pt.bus_no | ||||||
| @@ -62,12 +75,25 @@ | |||||||
|         <where> |         <where> | ||||||
|             <!-- 如果传入busNo参数,且不为空 --> |             <!-- 如果传入busNo参数,且不为空 --> | ||||||
|             <if test="busNo != null and busNo != ''"> |             <if test="busNo != null and busNo != ''"> | ||||||
|                 AND busNo LIKE CONCAT(#{busNo}, '%') |                 AND pt.bus_no LIKE CONCAT('%',#{busNo}, '%') | ||||||
|             </if> |             </if> | ||||||
|  |  | ||||||
|             <!-- 如果传入name参数,且不为空 --> |             <!-- 如果传入name参数,且不为空 --> | ||||||
|             <if test="name != null and name != ''"> |             <if test="name != null and name != ''"> | ||||||
|                 AND name LIKE CONCAT(#{name}, '%') |                 <choose> | ||||||
|  |                     <!-- 如果name参数中包含汉字 --> | ||||||
|  |                     <when test="name.matches('.*[\u4e00-\u9fa5].*')"> | ||||||
|  |                         AND pt.name LIKE CONCAT('%', #{name}, '%') | ||||||
|  |                     </when> | ||||||
|  |                     <!-- 如果name参数中只包含字母 --> | ||||||
|  |                     <when test="name.matches('^[a-zA-Z]+$')"> | ||||||
|  |                         AND pt.py_str LIKE CONCAT('%', #{name}, '%') | ||||||
|  |                     </when> | ||||||
|  |                     <!-- 如果name参数中既包含汉字又包含字母 --> | ||||||
|  |                     <otherwise> | ||||||
|  |                         AND (pt.name LIKE CONCAT('%', #{name}, '%') OR pt.py_str LIKE CONCAT('%', #{name}, '%')) | ||||||
|  |                     </otherwise> | ||||||
|  |                 </choose> | ||||||
|             </if> |             </if> | ||||||
|         </where> |         </where> | ||||||
|     </select> |     </select> | ||||||
|   | |||||||
| @@ -52,5 +52,10 @@ public class PromptMsgConstant { | |||||||
|          */ |          */ | ||||||
|         String M00009 = "apl.common.M00009"; |         String M00009 = "apl.common.M00009"; | ||||||
|  |  | ||||||
|  |         /** | ||||||
|  |          * 操作失败,请联系管理员 | ||||||
|  |          */ | ||||||
|  |         String M00010 = "apl.common.M00010"; | ||||||
|  |  | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -38,8 +38,8 @@ public class ChargeItemDefinition extends HisBaseEntity { | |||||||
|     /** 状态 */ |     /** 状态 */ | ||||||
|     private PublicationStatus statusEnum; |     private PublicationStatus statusEnum; | ||||||
|  |  | ||||||
|     /** 机构编码 */ |     /** 机构ID */ | ||||||
|     private String orgCode; |     private Long orgId; | ||||||
|  |  | ||||||
|     /** 描述 */ |     /** 描述 */ | ||||||
|     private String description; |     private String description; | ||||||
| @@ -60,7 +60,7 @@ public class ChargeItemDefinition extends HisBaseEntity { | |||||||
|     private String typeCode; |     private String typeCode; | ||||||
|  |  | ||||||
|     /** 医保类别 */ |     /** 医保类别 */ | ||||||
|     private Integer ybType; |     private String ybType; | ||||||
|  |  | ||||||
|     /** 是否使用详细价格规则 */ |     /** 是否使用详细价格规则 */ | ||||||
|     private Integer conditionFlag; |     private Integer conditionFlag; | ||||||
|   | |||||||
| @@ -3,6 +3,7 @@ package com.openhis.administration.service; | |||||||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
| import com.baomidou.mybatisplus.extension.service.IService; | import com.baomidou.mybatisplus.extension.service.IService; | ||||||
| import com.openhis.administration.domain.ChargeItemDefinition; | import com.openhis.administration.domain.ChargeItemDefinition; | ||||||
|  | import com.openhis.administration.domain.HealthcareService; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * 费用定价管理Service接口 |  * 费用定价管理Service接口 | ||||||
| @@ -37,4 +38,15 @@ public interface IChargeItemDefinitionService extends IService<ChargeItemDefinit | |||||||
|      * @return 新增结果 |      * @return 新增结果 | ||||||
|      */ |      */ | ||||||
|     boolean deleteChargeItemDefinition(Long id); |     boolean deleteChargeItemDefinition(Long id); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 通过服务管理新增费用定价 | ||||||
|  |      * | ||||||
|  |      * @param healthcareService    服务管理 | ||||||
|  |      * @param chargeItemDefinition 费用定价 | ||||||
|  |      * @return 新增结果 | ||||||
|  |      */ | ||||||
|  |     boolean addChargeItemDefinitionByHealthcareService(HealthcareService healthcareService, ChargeItemDefinition chargeItemDefinition); | ||||||
|  |  | ||||||
|  |  | ||||||
| } | } | ||||||
| @@ -11,6 +11,18 @@ import com.openhis.administration.domain.HealthcareService; | |||||||
|  */ |  */ | ||||||
| public interface IHealthcareServiceService extends IService<HealthcareService> { | public interface IHealthcareServiceService extends IService<HealthcareService> { | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 服务管理 新增 | ||||||
|  |      * @param healthcareService 表单信息 | ||||||
|  |      * @return 入库后信息 | ||||||
|  |      */ | ||||||
|     HealthcareService addHealthcareService(HealthcareService healthcareService); |     HealthcareService addHealthcareService(HealthcareService healthcareService); | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 服务管理 编辑 | ||||||
|  |      * @param healthcareService 表单信息 | ||||||
|  |      * @return 编辑结果 | ||||||
|  |      */ | ||||||
|  |     boolean updateHealthcareService(HealthcareService healthcareService); | ||||||
|  |  | ||||||
| } | } | ||||||
| @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||||||
| import com.baomidou.mybatisplus.extension.service.IService; | import com.baomidou.mybatisplus.extension.service.IService; | ||||||
| import com.core.common.core.domain.R; | import com.core.common.core.domain.R; | ||||||
| import com.openhis.administration.domain.Supplier; | import com.openhis.administration.domain.Supplier; | ||||||
|  | import com.openhis.clinical.domain.ConditionDefinition; | ||||||
| import com.openhis.workflow.domain.SupplyRequest; | import com.openhis.workflow.domain.SupplyRequest; | ||||||
| import org.springframework.web.bind.annotation.RequestParam; | import org.springframework.web.bind.annotation.RequestParam; | ||||||
|  |  | ||||||
| @@ -17,15 +18,10 @@ import javax.servlet.http.HttpServletRequest; | |||||||
|  */ |  */ | ||||||
| public interface ISupplierService extends IService<Supplier> { | public interface ISupplierService extends IService<Supplier> { | ||||||
|     /** |     /** | ||||||
|      * 查询厂商/供应商分页列表 |      * 新增供应商 | ||||||
|      * |      * | ||||||
|      * @param supplier 查询条件 |      * @param supplier 病种目录实体 | ||||||
|      * @param pageNo 查询条件 |      * @return | ||||||
|      * @param pageSize 查询条件 |  | ||||||
|      * @return 供应申请列表 |  | ||||||
|      */ |      */ | ||||||
|     Page<Supplier> getPage(Supplier supplier, Integer pageNo, Integer pageSize); |     boolean addSupplier(Supplier supplier); | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| } | } | ||||||
| @@ -1,5 +1,7 @@ | |||||||
| package com.openhis.administration.service.impl; | package com.openhis.administration.service.impl; | ||||||
|  |  | ||||||
|  | import com.openhis.administration.domain.HealthcareService; | ||||||
|  | import com.openhis.common.constant.CommonConstants; | ||||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||||
|  |  | ||||||
| import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||||
| @@ -9,6 +11,7 @@ import com.openhis.administration.domain.ChargeItemDefinition; | |||||||
| import com.openhis.administration.mapper.ChargeItemDefinitionMapper; | import com.openhis.administration.mapper.ChargeItemDefinitionMapper; | ||||||
| import com.openhis.administration.service.IChargeItemDefinitionService; | import com.openhis.administration.service.IChargeItemDefinitionService; | ||||||
| import com.openhis.common.enums.DelFlag; | import com.openhis.common.enums.DelFlag; | ||||||
|  | import org.springframework.transaction.annotation.Transactional; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * 费用定价管理Service业务层处理 |  * 费用定价管理Service业务层处理 | ||||||
| @@ -73,4 +76,26 @@ public class ChargeItemDefinitionServiceImpl extends ServiceImpl<ChargeItemDefin | |||||||
|             return baseMapper.deleteById(id) > 0; |             return baseMapper.deleteById(id) > 0; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 通过服务管理新增费用定价 | ||||||
|  |      * | ||||||
|  |      * @param healthcareService    服务管理 | ||||||
|  |      * @param chargeItemDefinition 费用定价 | ||||||
|  |      * @return 新增结果 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     @Transactional(rollbackFor = Exception.class) | ||||||
|  |     public boolean addChargeItemDefinitionByHealthcareService(HealthcareService healthcareService, ChargeItemDefinition chargeItemDefinition) { | ||||||
|  |         // 服务管理主键id | ||||||
|  |         if (healthcareService.getId() != null) { | ||||||
|  |             chargeItemDefinition.setInstanceTable(CommonConstants.TableName.ADM_HEALTHCARE_SERVICE); | ||||||
|  |             chargeItemDefinition.setInstanceId(healthcareService.getId()); | ||||||
|  |             return baseMapper.insert(chargeItemDefinition) > 0; | ||||||
|  |         } else { | ||||||
|  |             return false; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
| } | } | ||||||
| @@ -1,11 +1,11 @@ | |||||||
| package com.openhis.administration.service.impl; | package com.openhis.administration.service.impl; | ||||||
|  |  | ||||||
| import org.springframework.stereotype.Service; |  | ||||||
|  |  | ||||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||||
| import com.openhis.administration.domain.HealthcareService; | import com.openhis.administration.domain.HealthcareService; | ||||||
| import com.openhis.administration.mapper.HealthcareServiceMapper; | import com.openhis.administration.mapper.HealthcareServiceMapper; | ||||||
| import com.openhis.administration.service.IHealthcareServiceService; | import com.openhis.administration.service.IHealthcareServiceService; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  | import org.springframework.transaction.annotation.Transactional; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * 服务项目管理Service业务层处理 |  * 服务项目管理Service业务层处理 | ||||||
| @@ -16,10 +16,34 @@ import com.openhis.administration.service.IHealthcareServiceService; | |||||||
| @Service | @Service | ||||||
| public class HealthcareServiceServiceImpl extends ServiceImpl<HealthcareServiceMapper, HealthcareService> implements IHealthcareServiceService { | public class HealthcareServiceServiceImpl extends ServiceImpl<HealthcareServiceMapper, HealthcareService> implements IHealthcareServiceService { | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 服务管理 新增 | ||||||
|  |      * | ||||||
|  |      * @param healthcareService 表单信息 | ||||||
|  |      * @return 入库后信息 | ||||||
|  |      */ | ||||||
|     @Override |     @Override | ||||||
|  |     @Transactional(rollbackFor = Exception.class) | ||||||
|     public HealthcareService addHealthcareService(HealthcareService healthcareService) { |     public HealthcareService addHealthcareService(HealthcareService healthcareService) { | ||||||
|         baseMapper.insert(healthcareService); |         baseMapper.insert(healthcareService); | ||||||
|         return healthcareService; |         return healthcareService; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * 服务管理 编辑 | ||||||
|  |      * | ||||||
|  |      * @param healthcareService 表单信息 | ||||||
|  |      * @return 编辑结果 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     @Transactional(rollbackFor = Exception.class) | ||||||
|  |     public boolean updateHealthcareService(HealthcareService healthcareService) { | ||||||
|  |         if (healthcareService.getId() == null) { | ||||||
|  |             return false; | ||||||
|  |         } else { | ||||||
|  |             return baseMapper.updateById(healthcareService) > 0; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
| } | } | ||||||
| @@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||||||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
| import com.core.common.utils.StringUtils; | import com.core.common.utils.StringUtils; | ||||||
| import com.core.common.utils.bean.BeanUtils; | import com.core.common.utils.bean.BeanUtils; | ||||||
|  | import com.openhis.clinical.domain.ConditionDefinition; | ||||||
|  | import com.openhis.clinical.mapper.ConditionDefinitionMapper; | ||||||
| import com.openhis.common.enums.DelFlag; | import com.openhis.common.enums.DelFlag; | ||||||
| import com.openhis.workflow.domain.SupplyRequest; | import com.openhis.workflow.domain.SupplyRequest; | ||||||
| import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||||
| @@ -14,6 +16,9 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||||||
| import com.openhis.administration.domain.Supplier; | import com.openhis.administration.domain.Supplier; | ||||||
| import com.openhis.administration.mapper.SupplierMapper; | import com.openhis.administration.mapper.SupplierMapper; | ||||||
| import com.openhis.administration.service.ISupplierService; | import com.openhis.administration.service.ISupplierService; | ||||||
|  | import org.springframework.transaction.annotation.Transactional; | ||||||
|  |  | ||||||
|  | import java.util.List; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * 供应商管理Service业务层处理 |  * 供应商管理Service业务层处理 | ||||||
| @@ -25,43 +30,28 @@ import com.openhis.administration.service.ISupplierService; | |||||||
| @Service | @Service | ||||||
| @AllArgsConstructor | @AllArgsConstructor | ||||||
| public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> implements ISupplierService { | public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> implements ISupplierService { | ||||||
|  |  | ||||||
|     private final SupplierMapper supplierMapper; |     private final SupplierMapper supplierMapper; | ||||||
|     /** |     /** | ||||||
|      * 查询厂商/产地列表 |      * 新增供应商 | ||||||
|      * |      * | ||||||
|      * @param supplier 查询条件 |      * @param supplier 厂商/产地实体 | ||||||
|      * @param pageNo 查询条件 |      * @return | ||||||
|      * @param pageSize 查询条件 |  | ||||||
|      * @return 厂商/产地列表 |  | ||||||
|      */ |      */ | ||||||
|     @Override |     @Override | ||||||
|     public Page<Supplier> getPage(Supplier supplier, Integer pageNo, Integer pageSize) { |     @Transactional(rollbackFor = Exception.class) | ||||||
|         Page<Supplier> supplierList = new Page<>(); |     public boolean addSupplier(Supplier supplier) { | ||||||
| //        // 判断入库数量 |         // 根据病种编码判断病种是否存在 | ||||||
| //        if (supplyRequest.getItemQuantity() != 0) { |         List<Supplier> suppliers = | ||||||
| //            // 查询供应申请信息列表 |                 supplierMapper.selectList(new LambdaQueryWrapper<Supplier>() | ||||||
| //            supplyRequestList = supplyRequestMapper.selectPage(new Page<>(pageNo, pageSize), |                         .eq(Supplier::getBusNo, supplier.getBusNo())); | ||||||
| //                    new LambdaQueryWrapper<SupplyRequest>().eq(SupplyRequest::getDeleteFlag, DelFlag.NO.getValue())); |         if (suppliers.size() > 0) { | ||||||
| //        } else { |             return false; | ||||||
| //            return null; |  | ||||||
| //        } |  | ||||||
|  |  | ||||||
|         // 设置查询条件 |  | ||||||
|         LambdaQueryWrapper<Supplier> lambdaQueryWrapper = new LambdaQueryWrapper<>(); |  | ||||||
|         if (StringUtils.isNotEmpty(supplier.getBusNo())) { |  | ||||||
|             lambdaQueryWrapper.eq(Supplier::getBusNo, supplier.getBusNo()); |  | ||||||
|         } |         } | ||||||
|         if (StringUtils.isNotEmpty(supplier.getName())) { |         // 新增供应商 | ||||||
|             lambdaQueryWrapper.eq(Supplier::getName, supplier.getName()); |         int insert = supplierMapper.insert(supplier); | ||||||
|  |         if (insert != 1) { | ||||||
|  |             return false; | ||||||
|         } |         } | ||||||
|         if (StringUtils.isNotNull(supplier.getTypeEnum())) { |         return true; | ||||||
|             lambdaQueryWrapper.eq(Supplier::getTypeEnum, supplier.getTypeEnum()); |  | ||||||
|         } |  | ||||||
|         lambdaQueryWrapper.eq(Supplier::getDeleteFlag, DelFlag.NO.getValue()); |  | ||||||
|  |  | ||||||
|         supplierList = supplierMapper.selectPage(new Page<>(pageNo, pageSize), lambdaQueryWrapper); |  | ||||||
|         // 返回入库信息列表 |  | ||||||
|         return supplierList; |  | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @@ -0,0 +1,63 @@ | |||||||
|  | import request from '@/utils/request' | ||||||
|  | import { parseStrEmpty } from "@/utils/openhis"; | ||||||
|  |  | ||||||
|  | // 查询病种目录列表 | ||||||
|  | export function getSupplierList(query) { | ||||||
|  |   return request({ | ||||||
|  |     url: '/data-dictionary/supplier/get-supplier-list', | ||||||
|  |     method: 'get', | ||||||
|  |     params: query | ||||||
|  |   }) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // 查询病种目录详细 | ||||||
|  | export function getSupplierOne(id) { | ||||||
|  |   return request({ | ||||||
|  |     url: '/data-dictionary/supplier/get-supplier-detail/' + parseStrEmpty(id), | ||||||
|  |     method: 'get' | ||||||
|  |   }) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // 新增病种目录 | ||||||
|  | export function addSupplier(data) { | ||||||
|  |   return request({ | ||||||
|  |     url: '/data-dictionary/supplier/add-supplier', | ||||||
|  |     method: 'post', | ||||||
|  |     data: data | ||||||
|  |   }) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // 修改病种目录 | ||||||
|  | export function editSupplier(data) { | ||||||
|  |   return request({ | ||||||
|  |     url: '/data-dictionary/supplier/edit-supplier', | ||||||
|  |     method: 'put', | ||||||
|  |     data: data | ||||||
|  |   }) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // // 删除病种目录 | ||||||
|  | // export function delUser(userId) { | ||||||
|  | //   return request({ | ||||||
|  | //     url: '/system/user/' + userId, | ||||||
|  | //     method: 'delete' | ||||||
|  | //   }) | ||||||
|  | // } | ||||||
|  |  | ||||||
|  | // 停用病种目录 | ||||||
|  | export function stopSupplier(ids) { | ||||||
|  |   return request({ | ||||||
|  |     url: '/data-dictionary/supplier/information-stop', | ||||||
|  |     method: 'put', | ||||||
|  |     data: ids | ||||||
|  |   }) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // 启用病种目录 | ||||||
|  | export function startSupplier(ids) { | ||||||
|  |   return request({ | ||||||
|  |     url: '/data-dictionary/supplier/information-start', | ||||||
|  |     method: 'put', | ||||||
|  |     data: ids | ||||||
|  |   }) | ||||||
|  | } | ||||||
							
								
								
									
										504
									
								
								openhis-ui-vue3/src/views/basicmanage/supplier/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										504
									
								
								openhis-ui-vue3/src/views/basicmanage/supplier/index.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,504 @@ | |||||||
|  | <template> | ||||||
|  |   <div class="app-container"> | ||||||
|  |     <el-form | ||||||
|  |       :model="queryParams" | ||||||
|  |       ref="queryRef" | ||||||
|  |       :inline="true" | ||||||
|  |       v-show="showSearch" | ||||||
|  |       label-width="90px" | ||||||
|  |     > | ||||||
|  |       <el-form-item label="厂家编码:" prop="busNo"> | ||||||
|  |         <el-input | ||||||
|  |           v-model="queryParams.busNo" | ||||||
|  |           placeholder="厂家编码" | ||||||
|  |           clearable | ||||||
|  |           style="width: 240px" | ||||||
|  |           @keyup.enter="handleQuery" | ||||||
|  |         /> | ||||||
|  |       </el-form-item> | ||||||
|  |       <el-form-item label="厂家名称:" prop="searchKey"> | ||||||
|  |         <el-input | ||||||
|  |           v-model="queryParams.searchKey" | ||||||
|  |           placeholder="厂家名称" | ||||||
|  |           clearable | ||||||
|  |           style="width: 240px" | ||||||
|  |           @keyup.enter="handleQuery" | ||||||
|  |         /> | ||||||
|  |       </el-form-item> | ||||||
|  |       <el-form-item label="厂商种类:" prop="status"> | ||||||
|  |         <el-select | ||||||
|  |           v-model="queryParams.status" | ||||||
|  |           placeholder="生产商/供应商" | ||||||
|  |           clearable | ||||||
|  |           style="width: 240px" | ||||||
|  |         > | ||||||
|  |           <el-option | ||||||
|  |             v-for="dict in sys_normal_disable" | ||||||
|  |             :key="dict.value" | ||||||
|  |             :label="dict.label" | ||||||
|  |             :value="dict.value" | ||||||
|  |           /> | ||||||
|  |         </el-select> | ||||||
|  |       </el-form-item> | ||||||
|  |     </el-form> | ||||||
|  |  | ||||||
|  |     <el-row :gutter="10" class="mb8"> | ||||||
|  |       <el-col :span="1.5"> | ||||||
|  |         <el-button | ||||||
|  |           type="primary" | ||||||
|  |           plain | ||||||
|  |           icon="Plus" | ||||||
|  |           @click="handleAdd" | ||||||
|  |           v-hasPermi="['system:user:add']" | ||||||
|  |           >添加</el-button | ||||||
|  |         > | ||||||
|  |       </el-col> | ||||||
|  |       <el-col :span="1.5"> | ||||||
|  |         <el-button | ||||||
|  |           type="danger" | ||||||
|  |           plain | ||||||
|  |           icon="Remove" | ||||||
|  |           :disabled="multiple" | ||||||
|  |           @click="handleClose" | ||||||
|  |           v-hasPermi="['system:user:edit']" | ||||||
|  |           >停用</el-button | ||||||
|  |         > | ||||||
|  |       </el-col> | ||||||
|  |       <el-col :span="1.5"> | ||||||
|  |         <el-button | ||||||
|  |           type="success" | ||||||
|  |           plain | ||||||
|  |           icon="CirclePlus" | ||||||
|  |           :disabled="multiple" | ||||||
|  |           @click="handleStart" | ||||||
|  |           v-hasPermi="['system:user:remove']" | ||||||
|  |           >启用</el-button | ||||||
|  |         > | ||||||
|  |       </el-col> | ||||||
|  |       <el-col :span="1.5"> | ||||||
|  |         <el-button | ||||||
|  |           type="primary" | ||||||
|  |           plain | ||||||
|  |           icon="Search" | ||||||
|  |           @click="getList" | ||||||
|  |           v-hasPermi="['system:user:import']" | ||||||
|  |           >查询</el-button | ||||||
|  |         > | ||||||
|  |       </el-col> | ||||||
|  |       <el-col :span="1.5"> | ||||||
|  |         <el-button | ||||||
|  |           type="warning" | ||||||
|  |           plain | ||||||
|  |           icon="Download" | ||||||
|  |           @click="handleExport" | ||||||
|  |           v-hasPermi="['system:user:export']" | ||||||
|  |           >清空条件</el-button | ||||||
|  |         > | ||||||
|  |       </el-col> | ||||||
|  |     </el-row> | ||||||
|  |  | ||||||
|  |     <el-table | ||||||
|  |       v-loading="loading" | ||||||
|  |       :data="supplierList" | ||||||
|  |       @selection-change="handleSelectionChange" | ||||||
|  |     > | ||||||
|  |       <el-table-column type="selection" width="50" align="center" /> | ||||||
|  |       <el-table-column label="编号" align="center" key="busNo" prop="busNo" /> | ||||||
|  |       <el-table-column | ||||||
|  |         label="名称" | ||||||
|  |         align="center" | ||||||
|  |         key="name" | ||||||
|  |         prop="name" | ||||||
|  |         :show-overflow-tooltip="true" | ||||||
|  |       /> | ||||||
|  |       <el-table-column | ||||||
|  |         label="拼音助记码" | ||||||
|  |         align="center" | ||||||
|  |         key="pyStr" | ||||||
|  |         prop="pyStr" | ||||||
|  |         :show-overflow-tooltip="true" | ||||||
|  |       /> | ||||||
|  |       <el-table-column | ||||||
|  |         label="类型 " | ||||||
|  |         align="center" | ||||||
|  |         key="typeEnum" | ||||||
|  |         prop="typeEnum" | ||||||
|  |         :show-overflow-tooltip="true" | ||||||
|  |       /> | ||||||
|  |       <el-table-column | ||||||
|  |         label="地址" | ||||||
|  |         align="center" | ||||||
|  |         key="address" | ||||||
|  |         prop="address" | ||||||
|  |         width="120" | ||||||
|  |       /> | ||||||
|  |       <el-table-column | ||||||
|  |         label="联系人电话" | ||||||
|  |         align="center" | ||||||
|  |         key="phone" | ||||||
|  |         prop="phone" | ||||||
|  |       /> | ||||||
|  |       <el-table-column | ||||||
|  |         label="联系人邮箱" | ||||||
|  |         align="center" | ||||||
|  |         key="email" | ||||||
|  |         prop="email" | ||||||
|  |         width="160" | ||||||
|  |       /> | ||||||
|  |       <el-table-column | ||||||
|  |         label="活动标识" | ||||||
|  |         align="center" | ||||||
|  |         key="activeFlag" | ||||||
|  |         prop="activeFlag" | ||||||
|  |         width="160" | ||||||
|  |       /> | ||||||
|  |       <el-table-column | ||||||
|  |         label="机构编号" | ||||||
|  |         align="center" | ||||||
|  |         key="orgId" | ||||||
|  |         prop="orgId" | ||||||
|  |         width="160" | ||||||
|  |       /> | ||||||
|  |       <el-table-column | ||||||
|  |         label="操作" | ||||||
|  |         align="center" | ||||||
|  |         width="150" | ||||||
|  |         class-name="small-padding fixed-width" | ||||||
|  |       > | ||||||
|  |         <template #default="scope"> | ||||||
|  |           <el-button | ||||||
|  |             link | ||||||
|  |             type="primary" | ||||||
|  |             icon="Edit" | ||||||
|  |             @click="handleUpdate(scope.row)" | ||||||
|  |             v-hasPermi="['system:user:edit']" | ||||||
|  |             >编辑</el-button | ||||||
|  |           > | ||||||
|  |           <el-button | ||||||
|  |             link | ||||||
|  |             type="primary" | ||||||
|  |             icon="View" | ||||||
|  |             @click="handleView(scope.row)" | ||||||
|  |             v-hasPermi="['system:user:remove']" | ||||||
|  |             >查看</el-button | ||||||
|  |           > | ||||||
|  |         </template> | ||||||
|  |       </el-table-column> | ||||||
|  |     </el-table> | ||||||
|  |     <pagination | ||||||
|  |       v-show="total > 0" | ||||||
|  |       :total="total" | ||||||
|  |       v-model:page="queryParams.pageNo" | ||||||
|  |       v-model:limit="queryParams.pageSize" | ||||||
|  |       @pagination="getList" | ||||||
|  |     /> | ||||||
|  |  | ||||||
|  |     <!-- 添加或修改用户配置对话框 --> | ||||||
|  |     <el-dialog :title="title" v-model="open" width="600px" append-to-body> | ||||||
|  |       <el-form :model="form" :rules="rules" ref="supplierRef" label-width="90px"> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="12"> | ||||||
|  |             <el-form-item label="名称" prop="name"> | ||||||
|  |               <el-input | ||||||
|  |                 v-model="form.name" | ||||||
|  |                 placeholder="请输入名称" | ||||||
|  |                 maxlength="30" | ||||||
|  |                 :disabled="form.id != undefined" | ||||||
|  |               /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="12"> | ||||||
|  |             <el-form-item label="编码" prop="busNo"> | ||||||
|  |               <el-input | ||||||
|  |                 v-model="form.busNo" | ||||||
|  |                 placeholder="请输入编码" | ||||||
|  |                 maxlength="30" | ||||||
|  |                 :disabled="form.id != undefined" | ||||||
|  |               /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="12"> | ||||||
|  |             <el-form-item label="拼音" prop="pyStr"> | ||||||
|  |               <el-input v-model="form.pyStr" maxlength="11" /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="12"> | ||||||
|  |             <el-form-item label="五笔码" prop="wbStr"> | ||||||
|  |               <el-input v-model="form.wbStr" maxlength="11" /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="12"> | ||||||
|  |             <el-form-item label="类型" prop="typeEnum"> | ||||||
|  |               <el-input v-model="form.typeEnum" maxlength="11" /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="12"> | ||||||
|  |             <el-form-item label="地址" prop="address"> | ||||||
|  |               <el-input v-model="form.address" maxlength="11" /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="12"> | ||||||
|  |             <el-form-item label="联系人电话" prop="phone"> | ||||||
|  |               <el-input v-model="form.phone" maxlength="11" /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="12"> | ||||||
|  |             <el-form-item label="联系人邮箱" prop="email"> | ||||||
|  |               <el-input v-model="form.email" maxlength="11" /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row> | ||||||
|  |           <el-col :span="12"> | ||||||
|  |             <el-form-item label="活动标识" prop="activeFlag"> | ||||||
|  |               <el-input v-model="form.activeFlag" maxlength="11" /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="12"> | ||||||
|  |             <el-form-item label="机构编号" prop="orgId"> | ||||||
|  |               <el-input v-model="form.orgId" maxlength="11" /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |       </el-form> | ||||||
|  |       <template #footer> | ||||||
|  |         <div class="dialog-footer"> | ||||||
|  |           <el-button type="primary" @click="submitForm">确 定</el-button> | ||||||
|  |           <el-button @click="cancel">取 消</el-button> | ||||||
|  |         </div> | ||||||
|  |       </template> | ||||||
|  |     </el-dialog> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <script setup name="Supplier"> | ||||||
|  | import { | ||||||
|  |   getSupplierList, | ||||||
|  |   editSupplier, | ||||||
|  |   addSupplier, | ||||||
|  |   getSupplierOne, | ||||||
|  |   stopSupplier, | ||||||
|  |   startSupplier, | ||||||
|  | } from "./components/supplier"; | ||||||
|  |  | ||||||
|  | const router = useRouter(); | ||||||
|  | const { proxy } = getCurrentInstance(); | ||||||
|  | const { sys_normal_disable, sys_user_sex } = proxy.useDict( | ||||||
|  |   "sys_normal_disable", | ||||||
|  |   "sys_user_sex" | ||||||
|  | ); | ||||||
|  |  | ||||||
|  | const supplierList = ref([]); | ||||||
|  | const open = ref(false); | ||||||
|  | const loading = ref(true); | ||||||
|  | const showSearch = ref(true); | ||||||
|  | const ids = ref([]); | ||||||
|  | const single = ref(true); | ||||||
|  | const multiple = ref(true); | ||||||
|  | const total = ref(0); | ||||||
|  | const title = ref(""); | ||||||
|  | const conditionDefinitionOptions = ref(undefined); | ||||||
|  | // 是否停用 | ||||||
|  | const statusFlagOptions = ref(undefined); | ||||||
|  | // const initPassword = ref(undefined); | ||||||
|  | // const postOptions = ref([]); | ||||||
|  | // const roleOptions = ref([]); | ||||||
|  |  | ||||||
|  | const data = reactive({ | ||||||
|  |   form: {}, | ||||||
|  |   queryParams: { | ||||||
|  |     pageNo: 1, | ||||||
|  |     pageSize: 50, | ||||||
|  |     searchKey: undefined, // 疾病名称 | ||||||
|  |     statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用) | ||||||
|  |     sourceEnum: undefined, // 来源(包括 1:厂商/产地目录分类,2:自定义) | ||||||
|  |   }, | ||||||
|  |   rules: { | ||||||
|  |     name: [{ required: true, message: "名称不能为空", trigger: "blur" }], | ||||||
|  |     conditionCode: [ | ||||||
|  |       { required: true, message: "编码不能为空", trigger: "blur" }, | ||||||
|  |     ], | ||||||
|  |   }, | ||||||
|  | }); | ||||||
|  |  | ||||||
|  | const { queryParams, form, rules } = toRefs(data); | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /** 查询厂商/产地目录列表 */ | ||||||
|  | function getList() { | ||||||
|  |   loading.value = true; | ||||||
|  |   // queryParams.value.statusEnum = +queryParams.value.statusEnum | ||||||
|  |   console.log(queryParams.value, "queryParams.value"); | ||||||
|  |   getSupplierList(queryParams.value).then((res) => { | ||||||
|  |     loading.value = false; | ||||||
|  |     console.log(res, "res"); | ||||||
|  |     supplierList.value = res.data.records; | ||||||
|  |     total.value = res.data.total; | ||||||
|  |     console.log(total.value, "total.value"); | ||||||
|  |   }); | ||||||
|  | } | ||||||
|  | /** 节点单击事件 */ | ||||||
|  | function handleNodeClick(data) { | ||||||
|  |   queryParams.value.sourceEnum = data.id; | ||||||
|  |   handleQuery(); | ||||||
|  | } | ||||||
|  | /** 搜索按钮操作 */ | ||||||
|  | function handleQuery() { | ||||||
|  |   queryParams.value.pageNo = 1; | ||||||
|  |   getList(); | ||||||
|  | } | ||||||
|  | // /** 重置按钮操作 */ | ||||||
|  | // function resetQuery() { | ||||||
|  | //    dateRange.value = []; | ||||||
|  | //    proxy.resetForm("queryRef"); | ||||||
|  | //    queryParams.value.deptId = undefined; | ||||||
|  | //    proxy.$refs.deptTreeRef.setCurrentKey(null); | ||||||
|  | //    handleQuery(); | ||||||
|  | // }; | ||||||
|  | /** 启用按钮操作 */ | ||||||
|  | function handleStart(row) { | ||||||
|  |   const stardIds = row.id || ids.value; | ||||||
|  |   proxy.$modal | ||||||
|  |     .confirm("是否确定启用数据!") | ||||||
|  |     .then(function () { | ||||||
|  |       return startSupplier(stardIds); | ||||||
|  |     }) | ||||||
|  |     .then(() => { | ||||||
|  |       getList(); | ||||||
|  |       proxy.$modal.msgSuccess("启用成功"); | ||||||
|  |     }) | ||||||
|  |     .catch(() => {}); | ||||||
|  | } | ||||||
|  | /** 停用按钮操作 */ | ||||||
|  | function handleClose(row) { | ||||||
|  |   const stopIds = row.id || ids.value; | ||||||
|  |   proxy.$modal | ||||||
|  |     .confirm("是否确认停用数据!") | ||||||
|  |     .then(function () { | ||||||
|  |       return stopSupplier(stopIds); | ||||||
|  |     }) | ||||||
|  |     .then(() => { | ||||||
|  |       getList(); | ||||||
|  |       proxy.$modal.msgSuccess("停用成功"); | ||||||
|  |     }) | ||||||
|  |     .catch(() => {}); | ||||||
|  | } | ||||||
|  | /** 导出按钮操作 */ | ||||||
|  | function handleExport() { | ||||||
|  |   proxy.download( | ||||||
|  |     "system/user/export", | ||||||
|  |     { | ||||||
|  |       ...queryParams.value, | ||||||
|  |     }, | ||||||
|  |     `user_${new Date().getTime()}.xlsx` | ||||||
|  |   ); | ||||||
|  | } | ||||||
|  | // /** 用户状态修改  */ | ||||||
|  | // function handleStatusChange(row) { | ||||||
|  | //    let text = row.status === "0" ? "启用" : "停用"; | ||||||
|  | //    proxy.$modal.confirm('确认要"' + text + '""' + row.userName + '"用户吗?').then(function () { | ||||||
|  | //       return changeUserStatus(row.userId, row.status); | ||||||
|  | //    }).then(() => { | ||||||
|  | //       proxy.$modal.msgSuccess(text + "成功"); | ||||||
|  | //    }).catch(function () { | ||||||
|  | //       row.status = row.status === "0" ? "1" : "0"; | ||||||
|  | //    }); | ||||||
|  | // }; | ||||||
|  |  | ||||||
|  | /** 选择条数  */ | ||||||
|  | function handleSelectionChange(selection) { | ||||||
|  |   console.log(selection, "selection"); | ||||||
|  |   // selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据 | ||||||
|  |   ids.value = selection.map((item) => item.id); | ||||||
|  |   single.value = selection.length != 1; | ||||||
|  |   multiple.value = !selection.length; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /** 下载模板操作 */ | ||||||
|  | function importTemplate() { | ||||||
|  |   proxy.download( | ||||||
|  |     "system/user/importTemplate", | ||||||
|  |     {}, | ||||||
|  |     `user_template_${new Date().getTime()}.xlsx` | ||||||
|  |   ); | ||||||
|  | } | ||||||
|  | /** 重置操作表单 */ | ||||||
|  | function reset() { | ||||||
|  |   form.value = { | ||||||
|  |     id: undefined, | ||||||
|  |     conditionCode: undefined, | ||||||
|  |     pyStr: undefined, | ||||||
|  |     status: undefined, | ||||||
|  |     statusEnum: undefined, | ||||||
|  |   }; | ||||||
|  |   proxy.resetForm("supplierRef"); | ||||||
|  | } | ||||||
|  | /** 取消按钮 */ | ||||||
|  | function cancel() { | ||||||
|  |   open.value = false; | ||||||
|  |   reset(); | ||||||
|  | } | ||||||
|  | /** 新增按钮操作 */ | ||||||
|  | function handleAdd() { | ||||||
|  |   reset(); | ||||||
|  |   open.value = true; | ||||||
|  |   title.value = "新增"; | ||||||
|  | } | ||||||
|  | /** 修改按钮操作 */ | ||||||
|  | function handleUpdate(row) { | ||||||
|  |   reset(); | ||||||
|  |   console.log(row, "row"); | ||||||
|  |   form.value = row; | ||||||
|  |   open.value = true; | ||||||
|  |   title.value = "厂商/产地编辑"; | ||||||
|  | } | ||||||
|  | /** 提交按钮 */ | ||||||
|  | function submitForm() { | ||||||
|  |   proxy.$refs["supplierRef"].validate((valid) => { | ||||||
|  |     if (valid) { | ||||||
|  |       if (form.value.id != undefined) { | ||||||
|  |         // form.value.status | ||||||
|  |         //   ? (form.value.statusEnum = "3") | ||||||
|  |         //   : (form.value.statusEnum = "2"); | ||||||
|  |         console.log(form.value, "editSupplier", form.value.statusEnum); | ||||||
|  |         editSupplier(form.value).then((response) => { | ||||||
|  |           proxy.$modal.msgSuccess("修改成功"); | ||||||
|  |           open.value = false; | ||||||
|  |           getList(); | ||||||
|  |         }); | ||||||
|  |       } else { | ||||||
|  |         addSupplier(form.value).then((response) => { | ||||||
|  |           proxy.$modal.msgSuccess("新增成功"); | ||||||
|  |           open.value = false; | ||||||
|  |           getList(); | ||||||
|  |         }); | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   }); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /** 详细按钮操作 */ | ||||||
|  | function handleView(row) { | ||||||
|  |   reset(); | ||||||
|  |   title.value = "查看"; | ||||||
|  |   open.value = true; | ||||||
|  |   getSupplierOne(row.id).then((response) => { | ||||||
|  |     console.log(response, "responsebbbb", row.id); | ||||||
|  |     form.value = response.data; | ||||||
|  |     //  getList(); | ||||||
|  |   }); | ||||||
|  | } | ||||||
|  | getList(); | ||||||
|  | </script> | ||||||
|  | <style scoped> | ||||||
|  | .custom-tree-node { | ||||||
|  |   display: flex; | ||||||
|  |   align-items: center; | ||||||
|  | } | ||||||
|  | </style> | ||||||
| @@ -3,6 +3,7 @@ import { parseStrEmpty } from "@/utils/openhis"; | |||||||
|  |  | ||||||
| // 查询器材目录列表 | // 查询器材目录列表 | ||||||
| export function getDeviceList(query) { | export function getDeviceList(query) { | ||||||
|  |   console.log(query,'aaaaa') | ||||||
|   return request({ |   return request({ | ||||||
|     url: '/datadictionary/device/information-page', |     url: '/datadictionary/device/information-page', | ||||||
|     method: 'get', |     method: 'get', | ||||||
|   | |||||||
| @@ -30,7 +30,11 @@ | |||||||
|             </el-form-item> |             </el-form-item> | ||||||
|           </el-col> |           </el-col> | ||||||
|           <el-col :span="8"> |           <el-col :span="8"> | ||||||
|             <el-form-item label="拼音码(器材名称)" prop="pyStr" class="custom-label-spacing"> |             <el-form-item | ||||||
|  |               label="拼音码(器材名称)" | ||||||
|  |               prop="pyStr" | ||||||
|  |               class="custom-label-spacing" | ||||||
|  |             > | ||||||
|               <el-input v-model="form.pyStr" placeholder="" maxlength="30" /> |               <el-input v-model="form.pyStr" placeholder="" maxlength="30" /> | ||||||
|             </el-form-item> |             </el-form-item> | ||||||
|           </el-col> |           </el-col> | ||||||
| @@ -106,12 +110,13 @@ | |||||||
|           </el-col> |           </el-col> | ||||||
|           <el-col :span="8"> |           <el-col :span="8"> | ||||||
|             <el-form-item label="高值器材标志" prop="hvcmFlag"> |             <el-form-item label="高值器材标志" prop="hvcmFlag"> | ||||||
|               <el-input |               <!-- <el-input | ||||||
|                 v-model="form.hvcmFlag" |                 v-model="form.hvcmFlag" | ||||||
|                 placeholder="" |                 placeholder="" | ||||||
|                 maxlength="30" |                 maxlength="30" | ||||||
|                 :disabled="form.id != undefined" |                 :disabled="form.id != undefined" | ||||||
|               /> |               /> --> | ||||||
|  |               <el-checkbox v-model="form.hvcmFlag"></el-checkbox> | ||||||
|             </el-form-item> |             </el-form-item> | ||||||
|           </el-col> |           </el-col> | ||||||
|         </el-row> |         </el-row> | ||||||
| @@ -137,13 +142,13 @@ | |||||||
|           <el-col :span="8"> |           <el-col :span="8"> | ||||||
|             <el-form-item label="医保标记" prop="ybFlag"> |             <el-form-item label="医保标记" prop="ybFlag"> | ||||||
|               <!-- <el-input v-model="form.ybFlag" placeholder="" maxlength="30" /> --> |               <!-- <el-input v-model="form.ybFlag" placeholder="" maxlength="30" /> --> | ||||||
|               <el-input v-model="form.ybFlag" placeholder="" maxlength="30" /> |               <el-checkbox v-model="form.ybFlag"></el-checkbox> | ||||||
|             </el-form-item> |             </el-form-item> | ||||||
|           </el-col> |           </el-col> | ||||||
|         </el-row> |         </el-row> | ||||||
|         <el-row :gutter="24"> |         <el-row :gutter="24"> | ||||||
|           <el-col :span="8"> |           <el-col :span="8"> | ||||||
|             <el-form-item label="医保编码" prop="conditionCode"> |             <el-form-item label="医保编码" prop="ybNo"> | ||||||
|               <el-input v-model="form.ybNo" placeholder="" maxlength="30" /> |               <el-input v-model="form.ybNo" placeholder="" maxlength="30" /> | ||||||
|             </el-form-item> |             </el-form-item> | ||||||
|           </el-col> |           </el-col> | ||||||
| @@ -153,7 +158,7 @@ | |||||||
|             </el-form-item> |             </el-form-item> | ||||||
|           </el-col> |           </el-col> | ||||||
|           <el-col :span="8"> |           <el-col :span="8"> | ||||||
|             <el-form-item label="状态" prop="injectFlag"> |             <el-form-item label="状态" prop="statusEnum"> | ||||||
|               <el-input |               <el-input | ||||||
|                 v-model="form.statusEnum" |                 v-model="form.statusEnum" | ||||||
|                 placeholder="" |                 placeholder="" | ||||||
| @@ -260,12 +265,6 @@ const emits = defineEmits(["submit"]); // 声明自定义事件 | |||||||
|  |  | ||||||
| const data = reactive({ | const data = reactive({ | ||||||
|   form: {}, |   form: {}, | ||||||
|   queryParams: { |  | ||||||
|     pageNum: 1, |  | ||||||
|     pageSize: 50, |  | ||||||
|     diseaseName: undefined, // 疾病名称 |  | ||||||
|     status: undefined, // 状态(包括 1:预置,2:启用,3:停用) |  | ||||||
|   }, |  | ||||||
|   rules: { |   rules: { | ||||||
|     // busNo: [{ required: true, message: "编码不能为空", trigger: "blur" }], |     // busNo: [{ required: true, message: "编码不能为空", trigger: "blur" }], | ||||||
|     // name: [{ required: true, message: "名称不能为空", trigger: "blur" }], |     // name: [{ required: true, message: "名称不能为空", trigger: "blur" }], | ||||||
| @@ -292,8 +291,8 @@ const props = defineProps({ | |||||||
| function show() { | function show() { | ||||||
|   // queryParams.roleId = props.roleId; |   // queryParams.roleId = props.roleId; | ||||||
|   // getList(); |   // getList(); | ||||||
|   title.value = '' |   title.value = ""; | ||||||
|   title.value = props.title |   title.value = props.title; | ||||||
|   console.log(props, "22222", title.value); |   console.log(props, "22222", title.value); | ||||||
|   visible.value = true; |   visible.value = true; | ||||||
| } | } | ||||||
| @@ -301,8 +300,8 @@ function show() { | |||||||
| function edit() { | function edit() { | ||||||
|   // queryParams.roleId = props.roleId; |   // queryParams.roleId = props.roleId; | ||||||
|   // getList(); |   // getList(); | ||||||
|   title.value = '' |   title.value = ""; | ||||||
|   title.value = props.title |   title.value = props.title; | ||||||
|   form.value = props.item; |   form.value = props.item; | ||||||
|   visible.value = true; |   visible.value = true; | ||||||
| } | } | ||||||
| @@ -348,6 +347,8 @@ function submitForm() { | |||||||
|     //   : (form.value.statusEnum = "2"); |     //   : (form.value.statusEnum = "2"); | ||||||
|     // console.log(form.value, "editDevice", form.value.statusEnum); |     // console.log(form.value, "editDevice", form.value.statusEnum); | ||||||
|     editDevice(form.value).then((response) => { |     editDevice(form.value).then((response) => { | ||||||
|  |       // 触发自定义事件,并传递数据给父组件 | ||||||
|  |       emits("submit"); | ||||||
|       proxy.$modal.msgSuccess("修改成功"); |       proxy.$modal.msgSuccess("修改成功"); | ||||||
|       visible.value = false; |       visible.value = false; | ||||||
|       reset(); // 重置表单数据 |       reset(); // 重置表单数据 | ||||||
| @@ -362,6 +363,12 @@ function submitForm() { | |||||||
|     }); |     }); | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | /** 取消按钮 */ | ||||||
|  | function cancel() { | ||||||
|  |   open.value = false; | ||||||
|  |   reset(); | ||||||
|  | } | ||||||
| defineExpose({ | defineExpose({ | ||||||
|   show, |   show, | ||||||
|   edit, |   edit, | ||||||
|   | |||||||
| @@ -304,12 +304,6 @@ const conditionDefinitionOptions = ref(undefined); | |||||||
|  |  | ||||||
| const data = reactive({ | const data = reactive({ | ||||||
|   form: {}, |   form: {}, | ||||||
|   queryParams: { |  | ||||||
|     pageNum: 1, |  | ||||||
|     pageSize: 50, |  | ||||||
|     diseaseName: undefined, // 疾病名称 |  | ||||||
|     status: undefined, // 状态(包括 1:预置,2:启用,3:停用) |  | ||||||
|   }, |  | ||||||
|   rules: { |   rules: { | ||||||
|     name: [{ required: true, message: "名称不能为空", trigger: "blur" }], |     name: [{ required: true, message: "名称不能为空", trigger: "blur" }], | ||||||
|     conditionCode: [ |     conditionCode: [ | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ | |||||||
|           label-width="68px" |           label-width="68px" | ||||||
|         > |         > | ||||||
|           <el-row :gutter="24"> |           <el-row :gutter="24"> | ||||||
|             <!-- <el-col :span="5"> |             <el-col :span="5"> | ||||||
|               <el-form-item label="项目名" prop="searchKey" label-width="55"> |               <el-form-item label="项目名" prop="searchKey" label-width="55"> | ||||||
|                 <el-input |                 <el-input | ||||||
|                   v-model="queryParams.searchKey" |                   v-model="queryParams.searchKey" | ||||||
| @@ -37,7 +37,7 @@ | |||||||
|                   @keyup.enter="handleQuery" |                   @keyup.enter="handleQuery" | ||||||
|                 /> |                 /> | ||||||
|               </el-form-item> |               </el-form-item> | ||||||
|             </el-col> --> |             </el-col> | ||||||
|             <el-col :span="4"> |             <el-col :span="4"> | ||||||
|               <el-form-item label="状态" prop="statusEnum" label-width="50"> |               <el-form-item label="状态" prop="statusEnum" label-width="50"> | ||||||
|                 <el-select v-model="queryParams.statusEnum" clearable> |                 <el-select v-model="queryParams.statusEnum" clearable> | ||||||
| @@ -377,7 +377,7 @@ | |||||||
|         <pagination |         <pagination | ||||||
|           v-show="total > 0" |           v-show="total > 0" | ||||||
|           :total="total" |           :total="total" | ||||||
|           v-model:page="queryParams.pageNum" |           v-model:page="queryParams.pageNo" | ||||||
|           v-model:limit="queryParams.pageSize" |           v-model:limit="queryParams.pageSize" | ||||||
|           @pagination="getList" |           @pagination="getList" | ||||||
|         /> |         /> | ||||||
| @@ -436,7 +436,7 @@ const viewData = ref({}); | |||||||
| const data = reactive({ | const data = reactive({ | ||||||
|   form: {}, |   form: {}, | ||||||
|   queryParams: { |   queryParams: { | ||||||
|     pageNum: 1, |     pageNo: 1, | ||||||
|     pageSize: 50, |     pageSize: 50, | ||||||
|     searchKey: undefined, // 品名/商品名/英文品名/编码/拼音 |     searchKey: undefined, // 品名/商品名/英文品名/编码/拼音 | ||||||
|     typeEnum: undefined, // 类型(包括 1:中药,2:成药) |     typeEnum: undefined, // 类型(包括 1:中药,2:成药) | ||||||
| @@ -461,7 +461,7 @@ const filterNode = (value, data) => { | |||||||
|   return data.label.indexOf(value) !== -1; |   return data.label.indexOf(value) !== -1; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /** 病种目录分类查询下拉树结构 */ | /** 器材目录分类查询下拉树结构 */ | ||||||
| function getDiseaseTreatmentList() { | function getDiseaseTreatmentList() { | ||||||
|   getDiseaseTreatmentInit().then((response) => { |   getDiseaseTreatmentInit().then((response) => { | ||||||
|     console.log(response, "response器材目录分类查询下拉树结构"); |     console.log(response, "response器材目录分类查询下拉树结构"); | ||||||
| @@ -470,8 +470,9 @@ function getDiseaseTreatmentList() { | |||||||
|     exeOrganizations.value = response.data.exeOrganizations; |     exeOrganizations.value = response.data.exeOrganizations; | ||||||
|   }); |   }); | ||||||
| } | } | ||||||
| /** 查询病种目录列表 */ | /** 查询器材目录列表 */ | ||||||
| function getList() { | function getList() { | ||||||
|  |   console.log(getList, "getList"); | ||||||
|   loading.value = true; |   loading.value = true; | ||||||
|   getDeviceList(queryParams.value).then((res) => { |   getDeviceList(queryParams.value).then((res) => { | ||||||
|     loading.value = false; |     loading.value = false; | ||||||
| @@ -486,7 +487,7 @@ function handleNodeClick(data) { | |||||||
| } | } | ||||||
| /** 搜索按钮操作 */ | /** 搜索按钮操作 */ | ||||||
| function handleQuery() { | function handleQuery() { | ||||||
|   queryParams.value.pageNum = 1; |   queryParams.value.pageNo = 1; | ||||||
|   getList(); |   getList(); | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -558,7 +559,8 @@ function openAddDevice() { | |||||||
| } | } | ||||||
| /** 打开编辑弹窗 */ | /** 打开编辑弹窗 */ | ||||||
| function openEditDevice(row) { | function openEditDevice(row) { | ||||||
|   console.log("打开新增弹窗"); |   currentData.value = {} | ||||||
|  |   console.log("打开编辑弹窗"); | ||||||
|   currentData.value = row; |   currentData.value = row; | ||||||
|   console.log(currentData.value, "currentData"); |   console.log(currentData.value, "currentData"); | ||||||
|   title.value = "编辑"; |   title.value = "编辑"; | ||||||
|   | |||||||
| @@ -0,0 +1,73 @@ | |||||||
|  | import request from '@/utils/request' | ||||||
|  | import { parseStrEmpty } from "@/utils/openhis"; | ||||||
|  |  | ||||||
|  | // 查询诊疗目录列表 | ||||||
|  | export function getDiagnosisTreatmentList(query) { | ||||||
|  |   return request({ | ||||||
|  |     url: '/datadictionary/diagnosistreatment/information-page', | ||||||
|  |     method: 'get', | ||||||
|  |     params: query | ||||||
|  |   }) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // 查询诊疗目录详细 | ||||||
|  | export function getDiagnosisTreatmentOne(id) { | ||||||
|  |   return request({ | ||||||
|  |     url: '/datadictionary/diagnosistreatment/information-one/' + parseStrEmpty(id), | ||||||
|  |     method: 'get' | ||||||
|  |   }) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // 新增诊疗目录 | ||||||
|  | export function addDiagnosisTreatment(data) { | ||||||
|  |   return request({ | ||||||
|  |     url: '/datadictionary/diagnosistreatment/information', | ||||||
|  |     method: 'post', | ||||||
|  |     data: data | ||||||
|  |   }) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // 修改诊疗目录 | ||||||
|  | export function editDiagnosisTreatment(data) { | ||||||
|  |   return request({ | ||||||
|  |     url: '/datadictionary/diagnosistreatment/information', | ||||||
|  |     method: 'put', | ||||||
|  |     data: data | ||||||
|  |   }) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // // 删除诊疗目录 | ||||||
|  | // export function delUser(userId) { | ||||||
|  | //   return request({ | ||||||
|  | //     url: '/system/user/' + userId, | ||||||
|  | //     method: 'delete' | ||||||
|  | //   }) | ||||||
|  | // } | ||||||
|  |  | ||||||
|  | // 诊疗目录分类查询 | ||||||
|  | export function getDiseaseTreatmentInit() { | ||||||
|  |   return request({ | ||||||
|  |     url: '/datadictionary/diagnosistreatment/init', | ||||||
|  |     method: 'get' | ||||||
|  |   }) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // 停用诊疗目录 | ||||||
|  | export function stopDiseaseTreatment(ids) { | ||||||
|  |   console.log(ids) | ||||||
|  |   return request({ | ||||||
|  |     url: '/datadictionary/diagnosistreatment/information-stop', | ||||||
|  |     method: 'put', | ||||||
|  |     data: ids | ||||||
|  |   }) | ||||||
|  | } | ||||||
|  |  | ||||||
|  | // 启用诊疗目录 | ||||||
|  | export function startDiseaseTreatment(ids) { | ||||||
|  |   console.log(ids) | ||||||
|  |   return request({ | ||||||
|  |     url: '/datadictionary/diagnosistreatment/information-start', | ||||||
|  |     method: 'put', | ||||||
|  |     data: ids | ||||||
|  |   }) | ||||||
|  | } | ||||||
| @@ -0,0 +1,279 @@ | |||||||
|  | <template> | ||||||
|  |   <div class="app-container"> | ||||||
|  |     <!-- 添加或修改用户配置对话框 --> | ||||||
|  |     <el-dialog :title="title" v-model="visible" width="800px" append-to-body> | ||||||
|  |       <el-form | ||||||
|  |         :model="form" | ||||||
|  |         :rules="rules" | ||||||
|  |         ref="medicationRef" | ||||||
|  |         label-width="110px" | ||||||
|  |         label-position="left" | ||||||
|  |       > | ||||||
|  |         <el-row :gutter="24"> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="编号" prop="busNo"> | ||||||
|  |               <el-input | ||||||
|  |                 v-model="form.busNo" | ||||||
|  |                 placeholder="请输入编码" | ||||||
|  |                 maxlength="30" | ||||||
|  |                 :disabled="form.id != undefined" | ||||||
|  |               /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="项目名称" prop="name"> | ||||||
|  |               <el-input | ||||||
|  |                 v-model="form.name" | ||||||
|  |                 placeholder="请输入器材名称" | ||||||
|  |                 maxlength="30" | ||||||
|  |               /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item | ||||||
|  |               label="拼音码(项目名称)" | ||||||
|  |               prop="pyStr" | ||||||
|  |               class="custom-label-spacing" | ||||||
|  |             > | ||||||
|  |               <el-input v-model="form.pyStr" placeholder="" maxlength="30" /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row :gutter="24"> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="五笔拼音" prop="wbStr"> | ||||||
|  |               <el-input v-model="form.wbStr" placeholder="" maxlength="30" /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="目录分类" prop="categoryEnum"> | ||||||
|  |               <el-input | ||||||
|  |                 v-model="form.categoryEnum" | ||||||
|  |                 placeholder="" | ||||||
|  |                 maxlength="30" | ||||||
|  |               /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="类型" prop="typeCode"> | ||||||
|  |               <el-input v-model="form.typeCode" placeholder="" maxlength="30" /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row :gutter="24"> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="使用单位" prop="permittedUnitCode"> | ||||||
|  |               <el-input | ||||||
|  |                 v-model="form.permittedUnitCode" | ||||||
|  |                 placeholder="" | ||||||
|  |                 maxlength="30" | ||||||
|  |               /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="医保标记" prop="ybFlag"> | ||||||
|  |               <!-- <el-input v-model="form.ybFlag" placeholder="" maxlength="30" /> --> | ||||||
|  |               <el-checkbox v-model="form.ybFlag"></el-checkbox> | ||||||
|  |               <!-- <el-input v-model="form.ybFlag" placeholder="" maxlength="30" /> --> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="医保编码" prop="conditionCode"> | ||||||
|  |               <el-input v-model="form.ybNo" placeholder="" maxlength="30" /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |  | ||||||
|  |         <el-row :gutter="24"> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="医保对码标记" prop="ybMatchFlag"> | ||||||
|  |               <el-checkbox v-model="form.ybMatchFlag"></el-checkbox> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="状态" prop="statusEnum"> | ||||||
|  |               <el-input | ||||||
|  |                 v-model="form.statusEnum" | ||||||
|  |                 placeholder="" | ||||||
|  |                 maxlength="30" | ||||||
|  |               /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="身体部位" prop="bodySiteCode"> | ||||||
|  |               <!-- <el-input v-model="form.ybFlag" placeholder="" maxlength="30" /> --> | ||||||
|  |               <el-input | ||||||
|  |                 v-model="form.bodySiteCode" | ||||||
|  |                 placeholder="" | ||||||
|  |                 maxlength="30" | ||||||
|  |               /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row :gutter="24"> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="所需标本" prop="specimenCode"> | ||||||
|  |               <el-input | ||||||
|  |                 v-model="form.specimenCode" | ||||||
|  |                 placeholder="" | ||||||
|  |                 maxlength="30" | ||||||
|  |               /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="规则id" prop="ruleId"> | ||||||
|  |               <el-checkbox v-model="form.ruleId"></el-checkbox> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row :gutter="24"> | ||||||
|  |           <el-col :span="16"> | ||||||
|  |             <el-form-item label="说明" prop="description"> | ||||||
|  |               <el-input | ||||||
|  |                 v-model="form.description" | ||||||
|  |                 :autosize="{ minRows: 4, maxRows: 10 }" | ||||||
|  |                 type="textarea" | ||||||
|  |                 placeholder="" | ||||||
|  |               /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |       </el-form> | ||||||
|  |       <template #footer v-if="title != '查看'"> | ||||||
|  |         <div class="dialog-footer"> | ||||||
|  |           <el-button type="primary" @click="submitForm">确 定</el-button> | ||||||
|  |           <el-button @click="cancel">取 消</el-button> | ||||||
|  |         </div> | ||||||
|  |       </template> | ||||||
|  |     </el-dialog> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <script setup name="MedicineDialog"> | ||||||
|  | import { | ||||||
|  |   getDiagnosisTreatmentList, | ||||||
|  |   editDiagnosisTreatment, | ||||||
|  |   addDiagnosisTreatment, | ||||||
|  |   getDiseaseTreatmentInit, | ||||||
|  |   getDiagnosisTreatmentOne, | ||||||
|  | } from "./diagnosisTreatment"; | ||||||
|  |  | ||||||
|  | const router = useRouter(); | ||||||
|  | const { proxy } = getCurrentInstance(); | ||||||
|  | const { sys_normal_disable, sys_user_sex } = proxy.useDict( | ||||||
|  |   "sys_normal_disable", | ||||||
|  |   "sys_user_sex" | ||||||
|  | ); | ||||||
|  |  | ||||||
|  | const title = ref(""); | ||||||
|  | const visible = ref(false); | ||||||
|  | const emits = defineEmits(["submit"]); // 声明自定义事件 | ||||||
|  |  | ||||||
|  | const data = reactive({ | ||||||
|  |   form: {}, | ||||||
|  |   rules: { | ||||||
|  |     // busNo: [{ required: true, message: "编码不能为空", trigger: "blur" }], | ||||||
|  |     // name: [{ required: true, message: "名称不能为空", trigger: "blur" }], | ||||||
|  |     // conditionCode: [ | ||||||
|  |     //   { required: true, message: "编码不能为空", trigger: "blur" }, | ||||||
|  |     // ], | ||||||
|  |   }, | ||||||
|  | }); | ||||||
|  |  | ||||||
|  | const { queryParams, form, rules } = toRefs(data); | ||||||
|  |  | ||||||
|  | const props = defineProps({ | ||||||
|  |   item: { | ||||||
|  |     type: Object, | ||||||
|  |     required: false, | ||||||
|  |   }, | ||||||
|  |   title: { | ||||||
|  |     type: String, | ||||||
|  |     required: false, | ||||||
|  |   }, | ||||||
|  | }); | ||||||
|  |  | ||||||
|  | // 显示弹框 | ||||||
|  | function show() { | ||||||
|  |   // queryParams.roleId = props.roleId; | ||||||
|  |   // getList(); | ||||||
|  |   title.value = ""; | ||||||
|  |   title.value = props.title; | ||||||
|  |   console.log(props, "22222", title.value); | ||||||
|  |   visible.value = true; | ||||||
|  | } | ||||||
|  | // 显示弹框 | ||||||
|  | function edit() { | ||||||
|  |   // queryParams.roleId = props.roleId; | ||||||
|  |   // getList(); | ||||||
|  |   title.value = ""; | ||||||
|  |   title.value = props.title; | ||||||
|  |   form.value = props.item; | ||||||
|  |   visible.value = true; | ||||||
|  | } | ||||||
|  | /** 重置操作表单 */ | ||||||
|  | function reset() { | ||||||
|  |   form.value = { | ||||||
|  |     id: undefined, | ||||||
|  |     busNo: undefined, // 编码 | ||||||
|  |     name: undefined, // 名称 | ||||||
|  |     pyStr: undefined, // 拼音码 | ||||||
|  |     wbStr: undefined, // 五笔码 | ||||||
|  |     categoryEnum: undefined, // 类别 | ||||||
|  |     typeCode: undefined, // 类型编码 | ||||||
|  |     permittedUnitCode: undefined, // 使用单位 | ||||||
|  |     ybFlag: undefined, // 医保标记 | ||||||
|  |     ybNo: undefined, // 医保编码 | ||||||
|  |     ybMatchFlag: undefined, // 医保对码标记 | ||||||
|  |     statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用) | ||||||
|  |     bodySiteCode: undefined, // 身体部位 | ||||||
|  |     specimenCode: undefined, // 所需标本 | ||||||
|  |     description: undefined, // 说明 | ||||||
|  |     ruleId: undefined, // 执行科室 | ||||||
|  |   }; | ||||||
|  |   proxy.resetForm("medicationRef"); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /** 提交按钮 */ | ||||||
|  | function submitForm() { | ||||||
|  |   if (form.value.id != undefined) { | ||||||
|  |     editDiagnosisTreatment(form.value).then((response) => { | ||||||
|  |       // 触发自定义事件,并传递数据给父组件 | ||||||
|  |       emits("submit"); | ||||||
|  |       proxy.$modal.msgSuccess("修改成功"); | ||||||
|  |       visible.value = false; | ||||||
|  |       reset(); // 重置表单数据 | ||||||
|  |     }); | ||||||
|  |   } else { | ||||||
|  |     addDiagnosisTreatment(form.value).then((response) => { | ||||||
|  |       // 触发自定义事件,并传递数据给父组件 | ||||||
|  |       emits("submit"); | ||||||
|  |       proxy.$modal.msgSuccess("新增成功"); | ||||||
|  |       visible.value = false; | ||||||
|  |       reset(); // 重置表单数据 | ||||||
|  |     }); | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | /** 取消按钮 */ | ||||||
|  | function cancel() { | ||||||
|  |   open.value = false; | ||||||
|  |   reset(); | ||||||
|  | } | ||||||
|  | defineExpose({ | ||||||
|  |   show, | ||||||
|  |   edit, | ||||||
|  | }); | ||||||
|  | </script> | ||||||
|  | <style scoped> | ||||||
|  | .el-form--inline .el-form-item { | ||||||
|  |   display: inline-flex; | ||||||
|  |   vertical-align: middle; | ||||||
|  |   margin-right: 10px !important; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /* 使用深度选择器 */ | ||||||
|  | .custom-label-spacing :deep(.el-form-item__label) { | ||||||
|  |   line-height: 1.2; /* 调整行间距 */ | ||||||
|  |   margin-bottom: 4px; /* 调整 label 和输入框之间的间距 */ | ||||||
|  | } | ||||||
|  | </style> | ||||||
| @@ -0,0 +1,357 @@ | |||||||
|  | <template> | ||||||
|  |   <div class="app-container"> | ||||||
|  |     <!-- 添加或修改用户配置对话框 --> | ||||||
|  |     <el-dialog :title="title" v-model="visible" width="800px" append-to-body> | ||||||
|  |       <el-form | ||||||
|  |         :model="form" | ||||||
|  |         :rules="rules" | ||||||
|  |         ref="diseaseRef" | ||||||
|  |         label-width="110px" | ||||||
|  |         label-position="left" | ||||||
|  |       > | ||||||
|  |         <el-row :gutter="24"> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="编号" prop="busNo"> | ||||||
|  |               <el-input | ||||||
|  |                 v-model="form.busNo" | ||||||
|  |                 placeholder="请输入编码" | ||||||
|  |                 maxlength="30" | ||||||
|  |                 :disabled="true" | ||||||
|  |               /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="品名" prop="name"> | ||||||
|  |               <el-input | ||||||
|  |                 v-model="form.name" | ||||||
|  |                 placeholder="请输入药品名" | ||||||
|  |                 maxlength="30" | ||||||
|  |                 :disabled="true" | ||||||
|  |               /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="拼音码(品名)" prop="name"> | ||||||
|  |               <el-input | ||||||
|  |                 v-model="form.name" | ||||||
|  |                 placeholder="" | ||||||
|  |                 maxlength="30" | ||||||
|  |                 :disabled="true" | ||||||
|  |               /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row :gutter="24"> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="厂家/产地" prop="conditionCode"> | ||||||
|  |               <el-select v-model="queryParams.status" clearable> | ||||||
|  |                 <el-option | ||||||
|  |                   v-for="dict in sys_normal_disable" | ||||||
|  |                   :key="dict.value" | ||||||
|  |                   :label="dict.label" | ||||||
|  |                   :value="dict.value" | ||||||
|  |                 /> | ||||||
|  |               </el-select> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="批准文号" prop="name"> | ||||||
|  |               <el-input | ||||||
|  |                 v-model="form.name" | ||||||
|  |                 placeholder="" | ||||||
|  |                 maxlength="30" | ||||||
|  |                 :disabled="true" | ||||||
|  |               /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="条形码" prop="name"> | ||||||
|  |               <el-input v-model="form.name" placeholder="" maxlength="30" /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row :gutter="24"> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="单位" prop="conditionCode"> | ||||||
|  |               <el-select | ||||||
|  |                 v-model="queryParams.status" | ||||||
|  |                 clearable | ||||||
|  |                 :disabled="true" | ||||||
|  |               > | ||||||
|  |                 <el-option | ||||||
|  |                   v-for="dict in sys_normal_disable" | ||||||
|  |                   :key="dict.value" | ||||||
|  |                   :label="dict.label" | ||||||
|  |                   :value="dict.value" | ||||||
|  |                 /> | ||||||
|  |               </el-select> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="零售价" prop="name"> | ||||||
|  |               <el-input | ||||||
|  |                 v-model="form.name" | ||||||
|  |                 placeholder="" | ||||||
|  |                 maxlength="30" | ||||||
|  |                 :disabled="true" | ||||||
|  |               /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="规格" prop="name"> | ||||||
|  |               <el-input | ||||||
|  |                 v-model="form.name" | ||||||
|  |                 placeholder="" | ||||||
|  |                 maxlength="30" | ||||||
|  |                 :disabled="true" | ||||||
|  |               /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row :gutter="24"> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item | ||||||
|  |               label="最小单位" | ||||||
|  |               prop="conditionCode" | ||||||
|  |             > | ||||||
|  |               <el-select v-model="queryParams.status" clearable :disabled="true"> | ||||||
|  |                 <el-option | ||||||
|  |                   v-for="dict in sys_normal_disable" | ||||||
|  |                   :key="dict.value" | ||||||
|  |                   :label="dict.label" | ||||||
|  |                   :value="dict.value" | ||||||
|  |                 /> | ||||||
|  |               </el-select> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="拆零比" prop="conditionCode"> | ||||||
|  |               <el-input | ||||||
|  |                 v-model="form.conditionCode" | ||||||
|  |                 placeholder="" | ||||||
|  |                 maxlength="30" | ||||||
|  |                 :disabled="true" | ||||||
|  |               /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="拆零零售价" prop="name"> | ||||||
|  |               <el-input | ||||||
|  |                 v-model="form.name" | ||||||
|  |                 placeholder="" | ||||||
|  |                 maxlength="30" | ||||||
|  |                 :disabled="true" | ||||||
|  |               /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row :gutter="24"> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="处方限量(最小单位)" prop="conditionCode" class="custom-label-spacing"> | ||||||
|  |               <el-input | ||||||
|  |                 v-model="form.conditionCode" | ||||||
|  |                 placeholder="" | ||||||
|  |                 maxlength="30" | ||||||
|  |                 :disabled="form.id != undefined" | ||||||
|  |               /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="皮试判别" prop="name"> | ||||||
|  |               <el-checkbox v-model="form.status" :disabled="true"></el-checkbox> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="注射药品" prop="name"> | ||||||
|  |               <el-checkbox v-model="form.status" :disabled="true"></el-checkbox> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row :gutter="24"> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="给药途径" prop="conditionCode"> | ||||||
|  |               <el-select | ||||||
|  |                 v-model="queryParams.status" | ||||||
|  |                 clearable | ||||||
|  |                 :disabled="true" | ||||||
|  |               > | ||||||
|  |                 <el-option | ||||||
|  |                   v-for="dict in sys_normal_disable" | ||||||
|  |                   :key="dict.value" | ||||||
|  |                   :label="dict.label" | ||||||
|  |                   :value="dict.value" | ||||||
|  |                 /> | ||||||
|  |               </el-select> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="用药频次" prop="name" :disabled="true"> | ||||||
|  |               <el-select v-model="queryParams.status" clearable :disabled="true"> | ||||||
|  |                 <el-option | ||||||
|  |                   v-for="dict in sys_normal_disable" | ||||||
|  |                   :key="dict.value" | ||||||
|  |                   :label="dict.label" | ||||||
|  |                   :value="dict.value" | ||||||
|  |                 /> | ||||||
|  |               </el-select> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="单次剂量" prop="name" inline :disabled="true"> | ||||||
|  |               <el-input | ||||||
|  |                 v-model="form.name" | ||||||
|  |                 placeholder="" | ||||||
|  |                 maxlength="30" | ||||||
|  |                 :disabled="form.id != undefined" | ||||||
|  |                 style="width: 49%" | ||||||
|  |               /> | ||||||
|  |               <el-select | ||||||
|  |                 v-model="queryParams.status" | ||||||
|  |                 clearable | ||||||
|  |                 style="width: 49%" | ||||||
|  |                 :disabled="true" | ||||||
|  |               > | ||||||
|  |                 <el-option | ||||||
|  |                   v-for="dict in sys_normal_disable" | ||||||
|  |                   :key="dict.value" | ||||||
|  |                   :label="dict.label" | ||||||
|  |                   :value="dict.value" | ||||||
|  |                 /> | ||||||
|  |               </el-select> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row :gutter="24"> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="剂型" prop="conditionCode"> | ||||||
|  |               <el-select v-model="queryParams.status" clearable :disabled="true"> | ||||||
|  |                 <el-option | ||||||
|  |                   v-for="dict in sys_normal_disable" | ||||||
|  |                   :key="dict.value" | ||||||
|  |                   :label="dict.label" | ||||||
|  |                   :value="dict.value" | ||||||
|  |                 /> | ||||||
|  |               </el-select> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="8"> | ||||||
|  |             <el-form-item label="结算项目" prop="name"> | ||||||
|  |               <el-select | ||||||
|  |                 v-model="queryParams.status" | ||||||
|  |                 clearable | ||||||
|  |                 :disabled="true" | ||||||
|  |               > | ||||||
|  |                 <el-option | ||||||
|  |                   v-for="dict in sys_normal_disable" | ||||||
|  |                   :key="dict.value" | ||||||
|  |                   :label="dict.label" | ||||||
|  |                   :value="dict.value" | ||||||
|  |                 /> | ||||||
|  |               </el-select> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |         <el-row :gutter="24"> | ||||||
|  |           <el-col :span="16"> | ||||||
|  |             <el-form-item label="说明" prop="status"> | ||||||
|  |               <el-input | ||||||
|  |                 v-model="textarea2" | ||||||
|  |                 :autosize="{ minRows: 4, maxRows: 10 }" | ||||||
|  |                 type="textarea" | ||||||
|  |                 placeholder="" | ||||||
|  |               /> | ||||||
|  |             </el-form-item> | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |       </el-form> | ||||||
|  |     </el-dialog> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <script setup name="MedicineDialog"> | ||||||
|  | // import { | ||||||
|  | //   getDiseaseList, | ||||||
|  | //   editDisease, | ||||||
|  | //   addDisease, | ||||||
|  | //   getDiseaseCategory, | ||||||
|  | //   getDiseaseOne, | ||||||
|  | // } from "./components/medicine"; | ||||||
|  |  | ||||||
|  | const router = useRouter(); | ||||||
|  | const { proxy } = getCurrentInstance(); | ||||||
|  | const { sys_normal_disable, sys_user_sex } = proxy.useDict( | ||||||
|  |   "sys_normal_disable", | ||||||
|  |   "sys_user_sex" | ||||||
|  | ); | ||||||
|  |  | ||||||
|  | const diseaseList = ref([]); | ||||||
|  | const open = ref(false); | ||||||
|  | const loading = ref(true); | ||||||
|  | const showSearch = ref(true); | ||||||
|  | const ids = ref([]); | ||||||
|  | const selectedData = ref([]); // 存储选择的行数据 | ||||||
|  | const single = ref(true); | ||||||
|  | const multiple = ref(true); | ||||||
|  | const total = ref(0); | ||||||
|  | const title = ref(""); | ||||||
|  | const dateRange = ref([]); | ||||||
|  | const deptName = ref(""); | ||||||
|  | const visible = ref(false); | ||||||
|  | const conditionDefinitionOptions = ref(undefined); | ||||||
|  | // const initPassword = ref(undefined); | ||||||
|  | // const postOptions = ref([]); | ||||||
|  | // const roleOptions = ref([]); | ||||||
|  |  | ||||||
|  | const data = reactive({ | ||||||
|  |   form: {}, | ||||||
|  |   rules: { | ||||||
|  |     name: [{ required: true, message: "名称不能为空", trigger: "blur" }], | ||||||
|  |     conditionCode: [ | ||||||
|  |       { required: true, message: "编码不能为空", trigger: "blur" }, | ||||||
|  |     ], | ||||||
|  |   }, | ||||||
|  | }); | ||||||
|  |  | ||||||
|  | const { queryParams, form, rules } = toRefs(data); | ||||||
|  |  | ||||||
|  | const props = defineProps({ | ||||||
|  |   item: { | ||||||
|  |     type: Object, | ||||||
|  |     required: false, | ||||||
|  |   }, | ||||||
|  | }); | ||||||
|  |  | ||||||
|  | // 显示弹框 | ||||||
|  | function show() { | ||||||
|  |   // queryParams.roleId = props.roleId; | ||||||
|  |   // getList(); | ||||||
|  |   visible.value = true; | ||||||
|  | } | ||||||
|  | // 显示弹框 | ||||||
|  | function edit() { | ||||||
|  |   // queryParams.roleId = props.roleId; | ||||||
|  |   // getList(); | ||||||
|  |   console.log(props, "22222"); | ||||||
|  |   console.log(props.item); | ||||||
|  |   console.log("props.item"); | ||||||
|  |   form.value = props.item; | ||||||
|  |   visible.value = true; | ||||||
|  | } | ||||||
|  | defineExpose({ | ||||||
|  |   show, | ||||||
|  |   edit, | ||||||
|  | }); | ||||||
|  | </script> | ||||||
|  | <style scoped> | ||||||
|  | .el-form--inline .el-form-item { | ||||||
|  |   display: inline-flex; | ||||||
|  |   vertical-align: middle; | ||||||
|  |   margin-right: 10px !important; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /* 使用深度选择器 */ | ||||||
|  | .custom-label-spacing :deep(.el-form-item__label) { | ||||||
|  |   line-height: 1.2; /* 调整行间距 */ | ||||||
|  |   margin-bottom: 4px; /* 调整 label 和输入框之间的间距 */ | ||||||
|  | } | ||||||
|  | </style> | ||||||
							
								
								
									
										533
									
								
								openhis-ui-vue3/src/views/catalog/diagnosisTreatment/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										533
									
								
								openhis-ui-vue3/src/views/catalog/diagnosisTreatment/index.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,533 @@ | |||||||
|  | <template> | ||||||
|  |   <div class="app-container"> | ||||||
|  |     <el-row :gutter="20"> | ||||||
|  |       <!--器材目录--> | ||||||
|  |       <el-col :span="4" :xs="24"> | ||||||
|  |         <div class="head-container"> | ||||||
|  |           <el-tree | ||||||
|  |             :data="diseaseTreatmentCategoryList" | ||||||
|  |             :props="{ label: 'info', children: 'children' }" | ||||||
|  |             :expand-on-click-node="false" | ||||||
|  |             :filter-node-method="filterNode" | ||||||
|  |             ref="treeRef" | ||||||
|  |             node-key="id" | ||||||
|  |             highlight-current | ||||||
|  |             default-expand-all | ||||||
|  |             @node-click="handleNodeClick" | ||||||
|  |           /> | ||||||
|  |         </div> | ||||||
|  |       </el-col> | ||||||
|  |       <!--器材目录--> | ||||||
|  |       <el-col :span="20" :xs="24"> | ||||||
|  |         <el-form | ||||||
|  |           :model="queryParams" | ||||||
|  |           ref="queryRef" | ||||||
|  |           :inline="true" | ||||||
|  |           v-show="showSearch" | ||||||
|  |           label-width="68px" | ||||||
|  |         > | ||||||
|  |           <el-row :gutter="24"> | ||||||
|  |             <el-col :span="5"> | ||||||
|  |               <el-form-item label="项目名" prop="searchKey" label-width="55"> | ||||||
|  |                 <el-input | ||||||
|  |                   v-model="queryParams.searchKey" | ||||||
|  |                   placeholder="品名/商品名/英文品名/编码/拼音" | ||||||
|  |                   clearable | ||||||
|  |                   style="width: 240px" | ||||||
|  |                   @keyup.enter="handleQuery" | ||||||
|  |                 /> | ||||||
|  |               </el-form-item> | ||||||
|  |             </el-col> | ||||||
|  |             <el-col :span="4"> | ||||||
|  |               <el-form-item label="状态" prop="statusEnum" label-width="50"> | ||||||
|  |                 <el-select v-model="queryParams.statusEnum" clearable> | ||||||
|  |                   <el-option | ||||||
|  |                     v-for="status in statusFlagOptions" | ||||||
|  |                     :key="status.value" | ||||||
|  |                     :label="status.info" | ||||||
|  |                     :value="status.value" | ||||||
|  |                   /> | ||||||
|  |                 </el-select> | ||||||
|  |               </el-form-item> | ||||||
|  |             </el-col> | ||||||
|  |             <el-col :span="4"> | ||||||
|  |               <el-form-item | ||||||
|  |                 label="医保是否对码" | ||||||
|  |                 prop="ybMatchFlag" | ||||||
|  |                 label-width="100" | ||||||
|  |               > | ||||||
|  |                 <el-select | ||||||
|  |                   v-model="queryParams.ybMatchFlag" | ||||||
|  |                   placeholder="" | ||||||
|  |                   clearable | ||||||
|  |                 > | ||||||
|  |                   <el-option | ||||||
|  |                     v-for="item in exeOrganizations" | ||||||
|  |                     :key="item.value" | ||||||
|  |                     :label="item.label" | ||||||
|  |                     :value="item.value" | ||||||
|  |                   /> | ||||||
|  |                 </el-select> | ||||||
|  |               </el-form-item> | ||||||
|  |             </el-col> | ||||||
|  |             <el-col :span="4"> | ||||||
|  |               <el-form-item label="执行科室" prop="ruleId" label-width="100"> | ||||||
|  |                 <el-select | ||||||
|  |                   v-model="queryParams.ruleId" | ||||||
|  |                   placeholder="" | ||||||
|  |                   clearable | ||||||
|  |                 > | ||||||
|  |                   <el-option | ||||||
|  |                     v-for="item in exeOrganizations" | ||||||
|  |                     :key="item.value" | ||||||
|  |                     :label="item.label" | ||||||
|  |                     :value="item.value" | ||||||
|  |                   /> | ||||||
|  |                 </el-select> | ||||||
|  |               </el-form-item> | ||||||
|  |             </el-col> | ||||||
|  |             <el-col :span="4"> | ||||||
|  |               <el-form-item label="类型" prop="typeCode" label-width="100"> | ||||||
|  |                 <el-select | ||||||
|  |                   v-model="queryParams.typeCode" | ||||||
|  |                   placeholder="" | ||||||
|  |                   clearable | ||||||
|  |                 > | ||||||
|  |                   <el-option | ||||||
|  |                     v-for="item in exeOrganizations" | ||||||
|  |                     :key="item.value" | ||||||
|  |                     :label="item.label" | ||||||
|  |                     :value="item.value" | ||||||
|  |                   /> | ||||||
|  |                 </el-select> | ||||||
|  |               </el-form-item> | ||||||
|  |             </el-col> | ||||||
|  |           </el-row> | ||||||
|  |         </el-form> | ||||||
|  |  | ||||||
|  |         <el-row :gutter="10" class="mb8"> | ||||||
|  |           <el-col :span="1.5"> | ||||||
|  |             <el-button | ||||||
|  |               type="primary" | ||||||
|  |               plain | ||||||
|  |               icon="Plus" | ||||||
|  |               @click="openAddDiagnosisTreatment" | ||||||
|  |               v-hasPermi="['system:user:add']" | ||||||
|  |               >添加新项目</el-button | ||||||
|  |             > | ||||||
|  |           </el-col> | ||||||
|  |           <!-- <el-col :span="1.5"> | ||||||
|  |                   <el-button | ||||||
|  |                      type="primary" | ||||||
|  |                      plain | ||||||
|  |                      icon="Plus" | ||||||
|  |                      @click="handleAdd" | ||||||
|  |                      v-hasPermi="['system:user:add']" | ||||||
|  |                   >添加为本机构项目</el-button> | ||||||
|  |                </el-col> --> | ||||||
|  |           <el-col :span="1.5"> | ||||||
|  |             <el-button | ||||||
|  |               type="danger" | ||||||
|  |               plain | ||||||
|  |               icon="Remove" | ||||||
|  |               :disabled="multiple" | ||||||
|  |               @click="handleClose" | ||||||
|  |               v-hasPermi="['system:user:edit']" | ||||||
|  |               >停用</el-button | ||||||
|  |             > | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="1.5"> | ||||||
|  |             <el-button | ||||||
|  |               type="success" | ||||||
|  |               plain | ||||||
|  |               icon="CirclePlus" | ||||||
|  |               :disabled="multiple" | ||||||
|  |               @click="handleStart" | ||||||
|  |               v-hasPermi="['system:user:remove']" | ||||||
|  |               >启用</el-button | ||||||
|  |             > | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="1.5"> | ||||||
|  |             <el-button | ||||||
|  |               type="primary" | ||||||
|  |               plain | ||||||
|  |               icon="Search" | ||||||
|  |               @click="getList" | ||||||
|  |               v-hasPermi="['system:user:import']" | ||||||
|  |               >查询</el-button | ||||||
|  |             > | ||||||
|  |           </el-col> | ||||||
|  |           <el-col :span="1.5"> | ||||||
|  |             <el-button | ||||||
|  |               type="warning" | ||||||
|  |               plain | ||||||
|  |               icon="Download" | ||||||
|  |               @click="handleExport" | ||||||
|  |               v-hasPermi="['system:user:export']" | ||||||
|  |               >导出Excel</el-button | ||||||
|  |             > | ||||||
|  |           </el-col> | ||||||
|  |         </el-row> | ||||||
|  |  | ||||||
|  |         <el-table | ||||||
|  |           v-loading="loading" | ||||||
|  |           :data="diagnosisTreatmentList" | ||||||
|  |           @selection-change="handleSelectionChange" | ||||||
|  |           width="90%" | ||||||
|  |         > | ||||||
|  |           <el-table-column type="selection" width="50" align="center" /> | ||||||
|  |           <el-table-column | ||||||
|  |             label="编码" | ||||||
|  |             align="center" | ||||||
|  |             key="busNo" | ||||||
|  |             prop="busNo" | ||||||
|  |             :show-overflow-tooltip="true" | ||||||
|  |           /> | ||||||
|  |           <el-table-column | ||||||
|  |             label="项目名称" | ||||||
|  |             align="center" | ||||||
|  |             key="name" | ||||||
|  |             prop="name" | ||||||
|  |             :show-overflow-tooltip="true" | ||||||
|  |           /> | ||||||
|  |           <el-table-column | ||||||
|  |             label="拼音" | ||||||
|  |             align="center" | ||||||
|  |             key="pyStr" | ||||||
|  |             prop="pyStr" | ||||||
|  |             :show-overflow-tooltip="true" | ||||||
|  |           /> | ||||||
|  |           <el-table-column | ||||||
|  |             label="目录类别" | ||||||
|  |             align="center" | ||||||
|  |             key="categoryEnum" | ||||||
|  |             prop="categoryEnum" | ||||||
|  |             :show-overflow-tooltip="true" | ||||||
|  |             width="100" | ||||||
|  |           /> | ||||||
|  |           <el-table-column | ||||||
|  |             label="类型" | ||||||
|  |             align="center" | ||||||
|  |             key="typeCode" | ||||||
|  |             prop="typeCode" | ||||||
|  |             :show-overflow-tooltip="true" | ||||||
|  |             width="50" | ||||||
|  |           /> | ||||||
|  |           <el-table-column | ||||||
|  |             label="使用单位" | ||||||
|  |             align="center" | ||||||
|  |             key="permittedUnitCode" | ||||||
|  |             prop="permittedUnitCode" | ||||||
|  |             :show-overflow-tooltip="true" | ||||||
|  |           /> | ||||||
|  |           <el-table-column | ||||||
|  |             label="医保标记" | ||||||
|  |             align="center" | ||||||
|  |             key="ybFlag" | ||||||
|  |             prop="ybFlag" | ||||||
|  |             :show-overflow-tooltip="true" | ||||||
|  |           /> | ||||||
|  |           <el-table-column | ||||||
|  |             label="医保编码" | ||||||
|  |             align="center" | ||||||
|  |             key="ybNo" | ||||||
|  |             prop="ybNo" | ||||||
|  |             :show-overflow-tooltip="true" | ||||||
|  |           /> | ||||||
|  |           <el-table-column | ||||||
|  |             label="医保对码标记" | ||||||
|  |             align="center" | ||||||
|  |             key="ybMatchFlag" | ||||||
|  |             prop="ybMatchFlag" | ||||||
|  |             :show-overflow-tooltip="true" | ||||||
|  |           /> | ||||||
|  |           <el-table-column | ||||||
|  |             label="状态" | ||||||
|  |             align="center" | ||||||
|  |             key="statusEnum" | ||||||
|  |             prop="statusEnum" | ||||||
|  |             :show-overflow-tooltip="true" | ||||||
|  |           /> | ||||||
|  |           <el-table-column | ||||||
|  |             label="身体部位" | ||||||
|  |             align="center" | ||||||
|  |             key="bodySiteCode" | ||||||
|  |             prop="bodySiteCode" | ||||||
|  |             :show-overflow-tooltip="true" | ||||||
|  |           /> | ||||||
|  |  | ||||||
|  |           <el-table-column | ||||||
|  |             label="所需标本" | ||||||
|  |             align="center" | ||||||
|  |             key="specimenCode" | ||||||
|  |             prop="specimenCode" | ||||||
|  |             :show-overflow-tooltip="true" | ||||||
|  |             width="100" | ||||||
|  |           /> | ||||||
|  |           <el-table-column | ||||||
|  |             label="说明" | ||||||
|  |             align="center" | ||||||
|  |             key="description" | ||||||
|  |             prop="description" | ||||||
|  |             :show-overflow-tooltip="true" | ||||||
|  |           /> | ||||||
|  |           <el-table-column | ||||||
|  |             label="规则id" | ||||||
|  |             align="center" | ||||||
|  |             key="ruleId" | ||||||
|  |             prop="ruleId" | ||||||
|  |             :show-overflow-tooltip="true" | ||||||
|  |             width="90" | ||||||
|  |           /> | ||||||
|  |           <el-table-column | ||||||
|  |             label="操作" | ||||||
|  |             align="center" | ||||||
|  |             width="150" | ||||||
|  |             class-name="small-padding fixed-width" | ||||||
|  |             fixed="right" | ||||||
|  |           > | ||||||
|  |             <template #default="scope"> | ||||||
|  |               <el-button | ||||||
|  |                 link | ||||||
|  |                 type="primary" | ||||||
|  |                 icon="Edit" | ||||||
|  |                 @click="openEditDiagnosisTreatment(scope.row)" | ||||||
|  |                 v-hasPermi="['system:user:edit']" | ||||||
|  |                 >编辑</el-button | ||||||
|  |               > | ||||||
|  |               <el-button | ||||||
|  |                 link | ||||||
|  |                 type="primary" | ||||||
|  |                 icon="View" | ||||||
|  |                 @click="openViewDiagnosisTreatment(scope.row)" | ||||||
|  |                 v-hasPermi="['system:user:remove']" | ||||||
|  |                 >查看</el-button | ||||||
|  |               > | ||||||
|  |             </template> | ||||||
|  |           </el-table-column> | ||||||
|  |         </el-table> | ||||||
|  |         <pagination | ||||||
|  |           v-show="total > 0" | ||||||
|  |           :total="total" | ||||||
|  |           v-model:page="queryParams.pageNo" | ||||||
|  |           v-model:limit="queryParams.pageSize" | ||||||
|  |           @pagination="getList" | ||||||
|  |         /> | ||||||
|  |       </el-col> | ||||||
|  |     </el-row> | ||||||
|  |     <diagnosis-treatment-dialog | ||||||
|  |       ref="diagnosisTreatmentRef" | ||||||
|  |       :title="title" | ||||||
|  |       :item="currentData" | ||||||
|  |       @submit="getList()" | ||||||
|  |     /> | ||||||
|  |     <diagnosis-treatment-view-dialog | ||||||
|  |       ref="diagnosisTreatmentViewRef" | ||||||
|  |       :item="viewData" | ||||||
|  |       :viewFlg="viewFlg" | ||||||
|  |     /> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  |  | ||||||
|  | <script setup name="DiagnosisTreatment"> | ||||||
|  | import { | ||||||
|  |   getDiagnosisTreatmentList, | ||||||
|  |   stopDiseaseTreatment, | ||||||
|  |   startDiseaseTreatment, | ||||||
|  |   getDiseaseTreatmentInit, | ||||||
|  |   getDiagnosisTreatmentOne, | ||||||
|  | } from "./components/diagnosisTreatment"; | ||||||
|  | import diagnosisTreatmentDialog from "./components/diagnosisTreatmentDialog"; | ||||||
|  | import diagnosisTreatmentViewDialog from "./components/diagnosisTreatmentViewDialog"; | ||||||
|  | import { nextTick } from "vue"; | ||||||
|  |  | ||||||
|  | const router = useRouter(); | ||||||
|  | const { proxy } = getCurrentInstance(); | ||||||
|  | const { sys_normal_disable, sys_user_sex } = proxy.useDict( | ||||||
|  |   "sys_normal_disable", | ||||||
|  |   "sys_user_sex" | ||||||
|  | ); | ||||||
|  |  | ||||||
|  | const diagnosisTreatmentList = ref([]); | ||||||
|  | const open = ref(false); | ||||||
|  | const loading = ref(true); | ||||||
|  | const showSearch = ref(true); | ||||||
|  | const ids = ref([]); // 存储选择的行数据 | ||||||
|  | const single = ref(true); | ||||||
|  | const multiple = ref(true); | ||||||
|  | const total = ref(0); | ||||||
|  | const title = ref(""); | ||||||
|  | const diseaseTreatmentCategoryList = ref(undefined); | ||||||
|  | const statusFlagOptions = ref(undefined); | ||||||
|  | const exeOrganizations = ref(undefined); | ||||||
|  | // 使用 ref 定义当前器材数据 | ||||||
|  | const currentData = ref({}); | ||||||
|  | // 使用 ref 定义当前查看器材数据 | ||||||
|  | const viewData = ref({}); | ||||||
|  |  | ||||||
|  | const data = reactive({ | ||||||
|  |   form: {}, | ||||||
|  |   queryParams: { | ||||||
|  |     pageNo: 1, | ||||||
|  |     pageSize: 50, | ||||||
|  |     searchKey: undefined, // 品名/商品名/英文品名/编码/拼音 | ||||||
|  |     typeCode: undefined, // 类型(包括 1:中药,2:成药) | ||||||
|  |     statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用) | ||||||
|  |     ybMatchFlag: undefined, // 是否医保匹配(包括 1:是,0:否) | ||||||
|  |     ruleId: undefined, // 执行科室 | ||||||
|  |     categoryEnum: undefined, // 目录分类 | ||||||
|  |   }, | ||||||
|  |   rules: { | ||||||
|  |     // name: [{ required: true, message: "名称不能为空", trigger: "blur" }], | ||||||
|  |     // conditionCode: [ | ||||||
|  |     //   { required: true, message: "编码不能为空", trigger: "blur" }, | ||||||
|  |     // ], | ||||||
|  |   }, | ||||||
|  | }); | ||||||
|  |  | ||||||
|  | const { queryParams, form, rules } = toRefs(data); | ||||||
|  |  | ||||||
|  | /** 通过条件过滤节点  */ | ||||||
|  | const filterNode = (value, data) => { | ||||||
|  |   if (!value) return true; | ||||||
|  |   return data.label.indexOf(value) !== -1; | ||||||
|  | }; | ||||||
|  |  | ||||||
|  | /** 诊断目录分类查询下拉树结构 */ | ||||||
|  | function getDiseaseTreatmentList() { | ||||||
|  |   getDiseaseTreatmentInit().then((response) => { | ||||||
|  |     console.log(response, "response器材目录分类查询下拉树结构"); | ||||||
|  |     diseaseTreatmentCategoryList.value = response.data.diseaseTreatmentCategoryList; | ||||||
|  |     statusFlagOptions.value = response.data.statusFlagOptions; | ||||||
|  |     exeOrganizations.value = response.data.exeOrganizations; | ||||||
|  |   }); | ||||||
|  | } | ||||||
|  | /** 查询诊断目录列表 */ | ||||||
|  | function getList() { | ||||||
|  |   loading.value = true; | ||||||
|  |   getDiagnosisTreatmentList(queryParams.value).then((res) => { | ||||||
|  |     loading.value = false; | ||||||
|  |     diagnosisTreatmentList.value = res.data.records; | ||||||
|  |     console.log(diagnosisTreatmentList, "res.data"); | ||||||
|  |     total.value = res.data.total; | ||||||
|  |   }); | ||||||
|  | } | ||||||
|  | /** 节点单击事件 */ | ||||||
|  | function handleNodeClick(data) { | ||||||
|  |   queryParams.value.categoryEnum = data.id; | ||||||
|  |   handleQuery(); | ||||||
|  | } | ||||||
|  | /** 搜索按钮操作 */ | ||||||
|  | function handleQuery() { | ||||||
|  |   queryParams.value.pageNo = 1; | ||||||
|  |   getList(); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /** 启用按钮操作 */ | ||||||
|  | function handleStart() { | ||||||
|  |   const stardIds =  ids.value; | ||||||
|  |   //   selectedData | ||||||
|  |   proxy.$modal | ||||||
|  |     .confirm("是否确定启用数据!") | ||||||
|  |     .then(function () { | ||||||
|  |       return startDiseaseTreatment(stardIds); | ||||||
|  |     }) | ||||||
|  |     .then(() => { | ||||||
|  |       getList(); | ||||||
|  |       proxy.$modal.msgSuccess("启用成功"); | ||||||
|  |     }) | ||||||
|  |     .catch(() => {}); | ||||||
|  | } | ||||||
|  | /** 停用按钮操作 */ | ||||||
|  | function handleClose() { | ||||||
|  |   const stopIds =  ids.value; | ||||||
|  |   proxy.$modal | ||||||
|  |     .confirm("是否确认停用数据!") | ||||||
|  |     .then(function () { | ||||||
|  |       return stopDiseaseTreatment(stopIds); | ||||||
|  |     }) | ||||||
|  |     .then(() => { | ||||||
|  |       getList(); | ||||||
|  |       proxy.$modal.msgSuccess("停用成功"); | ||||||
|  |     }) | ||||||
|  |     .catch(() => {}); | ||||||
|  | } | ||||||
|  | /** 导出按钮操作 */ | ||||||
|  | function handleExport() { | ||||||
|  |   proxy.download( | ||||||
|  |     "system/user/export", | ||||||
|  |     { | ||||||
|  |       ...queryParams.value, | ||||||
|  |     }, | ||||||
|  |     `user_${new Date().getTime()}.xlsx` | ||||||
|  |   ); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /** 选择条数  */ | ||||||
|  | function handleSelectionChange(selection) { | ||||||
|  |   console.log(selection, "selection"); | ||||||
|  |   // selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据 | ||||||
|  |   ids.value = selection.map(item => item.id); | ||||||
|  |   single.value = selection.length != 1; | ||||||
|  |   multiple.value = !selection.length; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /** 下载模板操作 */ | ||||||
|  | function importTemplate() { | ||||||
|  |   proxy.download( | ||||||
|  |     "system/user/importTemplate", | ||||||
|  |     {}, | ||||||
|  |     `user_template_${new Date().getTime()}.xlsx` | ||||||
|  |   ); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | /** 打开新增弹窗 */ | ||||||
|  | function openAddDiagnosisTreatment() { | ||||||
|  |   console.log("打开新增弹窗"); | ||||||
|  |   title.value = "新增"; | ||||||
|  |   nextTick(() => { | ||||||
|  |     proxy.$refs.diagnosisTreatmentRef.show(); | ||||||
|  |   }); | ||||||
|  | } | ||||||
|  | /** 打开编辑弹窗 */ | ||||||
|  | function openEditDiagnosisTreatment(row) { | ||||||
|  |   console.log("打开新增弹窗"); | ||||||
|  |   currentData.value = row; | ||||||
|  |   console.log(currentData.value, "currentData"); | ||||||
|  |   title.value = "编辑"; | ||||||
|  |   // 确保子组件已经接收到最新的 props | ||||||
|  |   nextTick(() => { | ||||||
|  |     proxy.$refs["diagnosisTreatmentRef"].edit(); | ||||||
|  |   }); | ||||||
|  |   // proxy.$refs["diagnosisTreatmentRef"].edit(); | ||||||
|  | } | ||||||
|  | /** 打开查看弹窗 */ | ||||||
|  | function openViewDiagnosisTreatment(row) { | ||||||
|  |   // viewData.value = row; | ||||||
|  |   getDiagnosisTreatmentOne(row.id).then((response) => { | ||||||
|  |     currentData.value = response.data; | ||||||
|  |     title.value = "查看"; | ||||||
|  |     nextTick(() => { | ||||||
|  |       proxy.$refs["diagnosisTreatmentRef"].edit(); | ||||||
|  |     }); | ||||||
|  |     getList(); | ||||||
|  |   }); | ||||||
|  |   // console.log(viewData.value, "currentData"); | ||||||
|  |   // // 确保子组件已经接收到最新的 props | ||||||
|  |   // nextTick(() => { | ||||||
|  |   //   proxy.$refs["diagnosisTreatmentViewRef"].edit(); | ||||||
|  |   // }); | ||||||
|  |   // proxy.$refs["diagnosisTreatmentRef"].edit(); | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | getDiseaseTreatmentList(); | ||||||
|  | getList(); | ||||||
|  | </script> | ||||||
|  | <style scoped> | ||||||
|  | .el-form--inline .el-form-item { | ||||||
|  |   display: inline-flex; | ||||||
|  |   vertical-align: middle; | ||||||
|  |   margin-right: 10px !important; | ||||||
|  | } | ||||||
|  | </style> | ||||||
| @@ -239,7 +239,7 @@ | |||||||
|         <pagination |         <pagination | ||||||
|           v-show="total > 0" |           v-show="total > 0" | ||||||
|           :total="total" |           :total="total" | ||||||
|           v-model:page="queryParams.pageNum" |           v-model:page="queryParams.pageNo" | ||||||
|           v-model:limit="queryParams.pageSize" |           v-model:limit="queryParams.pageSize" | ||||||
|           @pagination="getList" |           @pagination="getList" | ||||||
|         /> |         /> | ||||||
| @@ -331,7 +331,7 @@ const statusFlagOptions = ref(undefined); | |||||||
| const data = reactive({ | const data = reactive({ | ||||||
|   form: {}, |   form: {}, | ||||||
|   queryParams: { |   queryParams: { | ||||||
|     pageNum: 1, |     pageNo: 1, | ||||||
|     pageSize: 50, |     pageSize: 50, | ||||||
|     searchKey: undefined, // 疾病名称 |     searchKey: undefined, // 疾病名称 | ||||||
|     statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用) |     statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用) | ||||||
| @@ -385,7 +385,7 @@ function handleNodeClick(data) { | |||||||
| } | } | ||||||
| /** 搜索按钮操作 */ | /** 搜索按钮操作 */ | ||||||
| function handleQuery() { | function handleQuery() { | ||||||
|   queryParams.value.pageNum = 1; |   queryParams.value.pageNo = 1; | ||||||
|   getList(); |   getList(); | ||||||
| } | } | ||||||
| // /** 重置按钮操作 */ | // /** 重置按钮操作 */ | ||||||
| @@ -521,6 +521,7 @@ function submitForm() { | |||||||
| /** 详细按钮操作 */ | /** 详细按钮操作 */ | ||||||
| function handleView(row) { | function handleView(row) { | ||||||
|   reset(); |   reset(); | ||||||
|  |   title.value = "查看"; | ||||||
|   open.value = true; |   open.value = true; | ||||||
|   getDiseaseOne(row.id).then((response) => { |   getDiseaseOne(row.id).then((response) => { | ||||||
|     console.log(response, "responsebbbb", row.id); |     console.log(response, "responsebbbb", row.id); | ||||||
|   | |||||||
| @@ -541,12 +541,6 @@ const emits =  defineEmits(['submit']); // 声明自定义事件 | |||||||
|  |  | ||||||
| const data = reactive({ | const data = reactive({ | ||||||
|   form: {}, |   form: {}, | ||||||
|   queryParams: { |  | ||||||
|     pageNum: 1, |  | ||||||
|     pageSize: 50, |  | ||||||
|     diseaseName: undefined, // 疾病名称 |  | ||||||
|     status: undefined, // 状态(包括 1:预置,2:启用,3:停用) |  | ||||||
|   }, |  | ||||||
|   rules: { |   rules: { | ||||||
|     // busNo: [{ required: true, message: "编码不能为空", trigger: "blur" }], |     // busNo: [{ required: true, message: "编码不能为空", trigger: "blur" }], | ||||||
|     // name: [{ required: true, message: "名称不能为空", trigger: "blur" }], |     // name: [{ required: true, message: "名称不能为空", trigger: "blur" }], | ||||||
|   | |||||||
| @@ -304,12 +304,6 @@ const conditionDefinitionOptions = ref(undefined); | |||||||
|  |  | ||||||
| const data = reactive({ | const data = reactive({ | ||||||
|   form: {}, |   form: {}, | ||||||
|   queryParams: { |  | ||||||
|     pageNum: 1, |  | ||||||
|     pageSize: 50, |  | ||||||
|     diseaseName: undefined, // 疾病名称 |  | ||||||
|     status: undefined, // 状态(包括 1:预置,2:启用,3:停用) |  | ||||||
|   }, |  | ||||||
|   rules: { |   rules: { | ||||||
|     name: [{ required: true, message: "名称不能为空", trigger: "blur" }], |     name: [{ required: true, message: "名称不能为空", trigger: "blur" }], | ||||||
|     conditionCode: [ |     conditionCode: [ | ||||||
|   | |||||||
| @@ -417,7 +417,7 @@ | |||||||
|         <pagination |         <pagination | ||||||
|           v-show="total > 0" |           v-show="total > 0" | ||||||
|           :total="total" |           :total="total" | ||||||
|           v-model:page="queryParams.pageNum" |           v-model:page="queryParams.pageNo" | ||||||
|           v-model:limit="queryParams.pageSize" |           v-model:limit="queryParams.pageSize" | ||||||
|           @pagination="getList" |           @pagination="getList" | ||||||
|         /> |         /> | ||||||
| @@ -521,7 +521,7 @@ const viewData = ref({}); | |||||||
| const data = reactive({ | const data = reactive({ | ||||||
|   form: {}, |   form: {}, | ||||||
|   queryParams: { |   queryParams: { | ||||||
|     pageNum: 1, |     pageNo: 1, | ||||||
|     pageSize: 50, |     pageSize: 50, | ||||||
|     searchKey: undefined, // 品名/商品名/英文品名/编码/拼音 |     searchKey: undefined, // 品名/商品名/英文品名/编码/拼音 | ||||||
|     statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用) |     statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用) | ||||||
| @@ -571,7 +571,7 @@ function handleNodeClick(data) { | |||||||
| } | } | ||||||
| /** 搜索按钮操作 */ | /** 搜索按钮操作 */ | ||||||
| function handleQuery() { | function handleQuery() { | ||||||
|   queryParams.value.pageNum = 1; |   queryParams.value.pageNo = 1; | ||||||
|   getList(); |   getList(); | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -680,12 +680,6 @@ function openViewMedicine(row) { | |||||||
|     }); |     }); | ||||||
|     getList(); |     getList(); | ||||||
|   }); |   }); | ||||||
|   console.log(viewData.value, "currentData"); |  | ||||||
|   // 确保子组件已经接收到最新的 props |  | ||||||
|   nextTick(() => { |  | ||||||
|     proxy.$refs["medicineViewRef"].edit(); |  | ||||||
|   }); |  | ||||||
|   // proxy.$refs["medicineRef"].edit(); |  | ||||||
| } | } | ||||||
| /** 新增按钮操作 */ | /** 新增按钮操作 */ | ||||||
| function handleAdd() { | function handleAdd() { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 菲菲
					菲菲