Merge branch 'master' of codeup.aliyun.com:61c0318acd8b75daa5a125f7/medical/openhis
This commit is contained in:
@@ -7,6 +7,7 @@ import javax.validation.constraints.Email;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
@@ -22,6 +23,7 @@ import com.core.common.xss.Xss;
|
||||
*
|
||||
* @author system
|
||||
*/
|
||||
@Data
|
||||
public class SysUser extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -91,6 +93,12 @@ public class SysUser extends BaseEntity {
|
||||
/** 角色ID */
|
||||
private Long roleId;
|
||||
|
||||
/** 租户ID */
|
||||
private Integer tenantId;
|
||||
|
||||
/** 删除标识 */
|
||||
private String deleteFlag;
|
||||
|
||||
public SysUser() {
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
package com.core.framework.config;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.DbType;
|
||||
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler;
|
||||
@@ -8,15 +20,9 @@ import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInt
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
|
||||
import net.sf.jsqlparser.expression.Expression;
|
||||
import net.sf.jsqlparser.expression.LongValue;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
@EnableTransactionManagement(proxyTargetClass = true)
|
||||
@Configuration
|
||||
@@ -41,7 +47,7 @@ public class MybatisPlusConfig {
|
||||
public PaginationInnerInterceptor paginationInnerInterceptor() {
|
||||
PaginationInnerInterceptor paginationInnerInterceptor = new PaginationInnerInterceptor();
|
||||
// 设置数据库类型为mysql
|
||||
//paginationInnerInterceptor.setDbType(DbType.MYSQL);
|
||||
// paginationInnerInterceptor.setDbType(DbType.MYSQL);
|
||||
paginationInnerInterceptor.setDbType(DbType.POSTGRE_SQL);
|
||||
// 设置最大单页限制数量,默认 500 条,-1 不受限制
|
||||
paginationInnerInterceptor.setMaxLimit(-1L);
|
||||
@@ -81,56 +87,19 @@ public class MybatisPlusConfig {
|
||||
}
|
||||
|
||||
// 配置需要租户隔离的表名集合
|
||||
private static final Set<String> TENANT_TABLES = new HashSet<>(Arrays.asList(
|
||||
"adm_account",
|
||||
"adm_charge_item",
|
||||
"adm_charge_item_def_detail",
|
||||
"adm_charge_item_definition",
|
||||
"adm_device",
|
||||
"adm_device_definition",
|
||||
"adm_encounter",
|
||||
"adm_encounter_diagnosis",
|
||||
"adm_encounter_location",
|
||||
"adm_encounter_participant",
|
||||
"adm_encounter_reason",
|
||||
"adm_healthcare_service",
|
||||
"adm_invoice",
|
||||
"adm_location",
|
||||
"adm_organization",
|
||||
"adm_organization_location",
|
||||
"adm_patient",
|
||||
"adm_patient_identifier",
|
||||
"adm_practitioner",
|
||||
"adm_practitioner_role",
|
||||
"adm_supplier",
|
||||
"cli_condition",
|
||||
"cli_condition_definition",
|
||||
"cli_diagnosis_belong_binding",
|
||||
"cli_procedure",
|
||||
"cli_procedure_performer",
|
||||
"doc_emr",
|
||||
"doc_emr_template",
|
||||
"doc_emr_detail",
|
||||
"doc_emr_dict",
|
||||
"fin_claim",
|
||||
"fin_claim_response",
|
||||
"fin_contract",
|
||||
"fin_payment_notice",
|
||||
"fin_payment_rec_detail",
|
||||
"fin_payment_reconciliation",
|
||||
"med_medication",
|
||||
"med_medication_definition",
|
||||
"med_medication_dispense",
|
||||
"med_medication_request",
|
||||
"wor_activity_definition",
|
||||
"wor_device_dispense",
|
||||
"wor_device_request",
|
||||
"wor_inventory_item",
|
||||
"wor_service_request",
|
||||
"wor_service_request_detail",
|
||||
"wor_supply_delivery",
|
||||
"wor_supply_request"
|
||||
));
|
||||
private static final Set<String> TENANT_TABLES = new HashSet<>(Arrays.asList("adm_account",
|
||||
"adm_charge_item", "adm_charge_item_def_detail", "adm_charge_item_definition", "adm_device",
|
||||
"adm_device_definition", "adm_encounter", "adm_encounter_diagnosis", "adm_encounter_location",
|
||||
"adm_encounter_participant", "adm_encounter_reason", "adm_healthcare_service", "adm_invoice",
|
||||
"adm_location", "adm_organization", "adm_organization_location", "adm_patient",
|
||||
"adm_patient_identifier", "sys_user", "adm_practitioner", "adm_practitioner_role", "adm_supplier",
|
||||
"cli_condition", "cli_condition_definition", "cli_diagnosis_belong_binding", "cli_procedure",
|
||||
"cli_procedure_performer", "doc_emr", "doc_emr_template", "doc_emr_detail", "doc_emr_dict", "fin_claim",
|
||||
"fin_claim_response", "fin_contract", "fin_payment_notice", "fin_payment_rec_detail",
|
||||
"fin_payment_reconciliation", "med_medication", "med_medication_definition", "med_medication_dispense",
|
||||
"med_medication_request", "wor_activity_definition", "wor_device_dispense", "wor_device_request",
|
||||
"wor_inventory_item", "wor_service_request", "wor_service_request_detail", "wor_supply_delivery",
|
||||
"wor_supply_request"));
|
||||
|
||||
@Override
|
||||
public boolean ignoreTable(String tableName) {
|
||||
@@ -147,10 +116,24 @@ public class MybatisPlusConfig {
|
||||
* 获取当前租户 ID
|
||||
*/
|
||||
private Integer getCurrentTenantId() {
|
||||
// // 尝试从请求头中获取租户ID
|
||||
ServletRequestAttributes attributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes();
|
||||
if (attributes != null) {
|
||||
HttpServletRequest request = attributes.getRequest();
|
||||
// 从请求头获取租户ID,假设header名称为"X-Tenant-ID" ; 登录接口前端把租户id放到请求头里
|
||||
String tenantIdHeader = request.getHeader("X-Tenant-ID");
|
||||
String requestMethodName = request.getHeader("Request-Method-Name");
|
||||
// 登录
|
||||
if ("login".equals(requestMethodName)) {
|
||||
if (tenantIdHeader != null && !tenantIdHeader.isEmpty()) {
|
||||
return Integer.parseInt(tenantIdHeader);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 获取当前登录用户的租户 ID
|
||||
if (SecurityUtils.getAuthentication() != null) {
|
||||
return SecurityUtils.getLoginUser().getTenantId();
|
||||
}
|
||||
return 0;
|
||||
return 0; // 默认租户ID
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.core.framework.web.service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.authentication.AuthenticationManager;
|
||||
@@ -8,6 +9,8 @@ import org.springframework.security.authentication.BadCredentialsException;
|
||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import com.core.common.constant.CacheConstants;
|
||||
import com.core.common.constant.Constants;
|
||||
@@ -60,7 +63,7 @@ public class SysLoginService {
|
||||
*/
|
||||
public String login(String username, String password, String code, String uuid) {
|
||||
// 验证码校验
|
||||
validateCaptcha(username, code, uuid);
|
||||
// validateCaptcha(username, code, uuid);
|
||||
// 登录前置校验
|
||||
loginPreCheck(username, password);
|
||||
// 用户验证
|
||||
@@ -89,9 +92,18 @@ public class SysLoginService {
|
||||
LoginUser loginUser = (LoginUser)authentication.getPrincipal();
|
||||
|
||||
// -----start-----登录时set租户id,正常应该从请求头获取,这行代码只是测试使用
|
||||
loginUser.setTenantId(1);
|
||||
Integer tenantId = 0;
|
||||
ServletRequestAttributes attributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes();
|
||||
if (attributes != null) {
|
||||
HttpServletRequest request = attributes.getRequest();
|
||||
// 从请求头获取租户ID,假设header名称为"X-Tenant-ID" ; 登录接口前端把租户id放到请求头里
|
||||
String tenantIdHeader = request.getHeader("X-Tenant-ID");
|
||||
if (tenantIdHeader != null && !tenantIdHeader.isEmpty()) {
|
||||
tenantId = Integer.parseInt(tenantIdHeader);
|
||||
}
|
||||
}
|
||||
loginUser.setTenantId(tenantId);
|
||||
// -----end-----登录时set租户id,正常应该从请求头获取,这行代码只是测试使用
|
||||
|
||||
recordLoginInfo(loginUser.getUserId());
|
||||
// 生成token
|
||||
return tokenService.createToken(loginUser);
|
||||
|
||||
@@ -121,8 +121,18 @@
|
||||
<if test="roleKey != null and roleKey != ''">#{roleKey},</if>
|
||||
<if test="roleSort != null">#{roleSort},</if>
|
||||
<if test="dataScope != null and dataScope != ''">#{dataScope},</if>
|
||||
<if test="menuCheckStrictly != null">#{menuCheckStrictly},</if>
|
||||
<if test="deptCheckStrictly != null">#{deptCheckStrictly},</if>
|
||||
<if test="menuCheckStrictly != null">
|
||||
<choose>
|
||||
<when test="menuCheckStrictly == true">1,</when>
|
||||
<otherwise>0,</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
<if test="deptCheckStrictly != null">
|
||||
<choose>
|
||||
<when test="deptCheckStrictly == true">1,</when>
|
||||
<otherwise>0,</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
@@ -137,8 +147,18 @@
|
||||
<if test="roleKey != null and roleKey != ''">role_key = #{roleKey},</if>
|
||||
<if test="roleSort != null">role_sort = #{roleSort},</if>
|
||||
<if test="dataScope != null and dataScope != ''">data_scope = #{dataScope},</if>
|
||||
<if test="menuCheckStrictly != null">menu_check_strictly = #{menuCheckStrictly},</if>
|
||||
<if test="deptCheckStrictly != null">dept_check_strictly = #{deptCheckStrictly},</if>
|
||||
<if test="menuCheckStrictly != null">
|
||||
<choose>
|
||||
<when test="menuCheckStrictly == true">1,</when>
|
||||
<otherwise>0,</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
<if test="deptCheckStrictly != null">
|
||||
<choose>
|
||||
<when test="deptCheckStrictly == true">1,</when>
|
||||
<otherwise>0,</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
|
||||
@@ -1,47 +1,8 @@
|
||||
package com.openhis.web.basedatamanage.appservice;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.basedatamanage.dto.PractSearchParam;
|
||||
import com.openhis.web.basedatamanage.dto.PractitionerDto;
|
||||
|
||||
/**
|
||||
* Practitioner 应该服务类
|
||||
* 参与者 应该服务类
|
||||
*/
|
||||
public interface IPractitionerAppService {
|
||||
/**
|
||||
* 查询员工信息
|
||||
*
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @param request 请求数据
|
||||
* @return 员工分页列表
|
||||
*/
|
||||
R<?> getPractitionerPage(PractSearchParam practSearchParam, String searchKey, Integer pageNo, Integer pageSize,
|
||||
HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* 员工信息详情
|
||||
*
|
||||
* @param practitionerId 员工信息id
|
||||
* @return 员工信息详情
|
||||
*/
|
||||
R<?> getPractitionerById(Long practitionerId);
|
||||
|
||||
/**
|
||||
* 添加/编辑员工信息
|
||||
*
|
||||
* @param practitionerDto 员工信息
|
||||
* @return 操作结果
|
||||
*/
|
||||
R<?> addOrEditPractitioner(PractitionerDto practitionerDto);
|
||||
|
||||
/**
|
||||
* 员工信息
|
||||
*
|
||||
* @param practitionerId 员工信息id
|
||||
* @return 操作结果
|
||||
*/
|
||||
R<?> deletePractitioner(Long practitionerId);
|
||||
}
|
||||
|
||||
@@ -1,117 +1,16 @@
|
||||
package com.openhis.web.basedatamanage.appservice.impl;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.openhis.administration.domain.Practitioner;
|
||||
import com.openhis.administration.domain.PractitionerRole;
|
||||
import com.openhis.administration.mapper.PractitionerMapper;
|
||||
import com.openhis.administration.service.IPractitionerRoleService;
|
||||
import com.openhis.administration.service.IPractitionerService;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.web.basedatamanage.appservice.IPractitionerAppService;
|
||||
import com.openhis.web.basedatamanage.dto.PractSearchParam;
|
||||
import com.openhis.web.basedatamanage.dto.PractitionerDto;
|
||||
import com.openhis.web.basedatamanage.mapper.PractitionerAppAppMapper;
|
||||
|
||||
@Service
|
||||
public class PractitionerAppServiceImpl implements IPractitionerAppService {
|
||||
|
||||
@Autowired
|
||||
private IPractitionerService practitionerService;
|
||||
@Resource
|
||||
PractitionerAppAppMapper practitionerAppAppMapper;
|
||||
|
||||
@Autowired
|
||||
private PractitionerMapper practitionerMapper;
|
||||
|
||||
@Autowired
|
||||
private IPractitionerRoleService practitionerRoleService;
|
||||
|
||||
@Override
|
||||
public R<?> getPractitionerPage(PractSearchParam practSearchParam, String searchKey, Integer pageNo,
|
||||
Integer pageSize, HttpServletRequest request) {
|
||||
|
||||
// 构建查询条件
|
||||
QueryWrapper<Practitioner> queryWrapper = HisQueryUtils.buildQueryWrapper(practSearchParam, searchKey,
|
||||
new HashSet<>(Arrays.asList("name", "py_str", "wb_str")), request);
|
||||
|
||||
// 查询员工分页列表
|
||||
Page<PractitionerDto> practitionerDtoPage =
|
||||
HisPageUtils.selectPage(practitionerMapper, queryWrapper, pageNo, pageSize, PractitionerDto.class);
|
||||
|
||||
return R.ok(practitionerDtoPage,
|
||||
MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[] {"员工信息"}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 员工信息详情
|
||||
*
|
||||
* @param practitionerId 员工信息id
|
||||
* @return 员工信息详情
|
||||
*/
|
||||
@Override
|
||||
public R<?> getPractitionerById(Long practitionerId) {
|
||||
Practitioner practitioner = practitionerService.getById(practitionerId);
|
||||
if (practitioner != null) {
|
||||
return R.ok(practitioner,
|
||||
MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[] {"员工信息"}));
|
||||
} else {
|
||||
return R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"员工信息查询失败"}));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加/编辑员工信息
|
||||
*
|
||||
* @param practitionerDto 员工信息
|
||||
* @return 操作结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> addOrEditPractitioner(PractitionerDto practitionerDto) {
|
||||
|
||||
Practitioner practitioner = new Practitioner();
|
||||
BeanUtils.copyProperties(practitionerDto, practitioner);
|
||||
PractitionerRole practitionerRole = new PractitionerRole();
|
||||
|
||||
if (practitionerDto.getId() != null) {
|
||||
// 更新员工信息
|
||||
practitionerService.updateById(practitioner);
|
||||
} else {
|
||||
// 新增员工信息
|
||||
practitionerService.save(practitioner);
|
||||
|
||||
// 新增员工岗位信息
|
||||
practitionerRole.setPractitionerId(practitioner.getId());
|
||||
practitionerRole.setName(practitioner.getName());
|
||||
practitionerRoleService.save(practitionerRole);
|
||||
}
|
||||
// 返回员工id
|
||||
return R.ok(practitioner.getId(),
|
||||
MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"员工信息更新添加"}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除员工
|
||||
*
|
||||
* @param practitionerId 员工信息id
|
||||
* @return 操作结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> deletePractitioner(Long practitionerId) {
|
||||
// 删除员工信息
|
||||
boolean deletepractitioner = practitionerService.removeById(practitionerId);
|
||||
return deletepractitioner
|
||||
? R.ok(practitionerId, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[] {"员工信息"}))
|
||||
: R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"员工信息"}));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,25 +3,16 @@
|
||||
*/
|
||||
package com.openhis.web.basedatamanage.controller;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.basedatamanage.appservice.IPractitionerAppService;
|
||||
import com.openhis.web.basedatamanage.dto.PractSearchParam;
|
||||
import com.openhis.web.basedatamanage.dto.PractitionerDto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 员工管理Controller业务层处理
|
||||
*
|
||||
* @author
|
||||
* @date 2025-02-21
|
||||
* 参与者 Controller业务层处理
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/base-data-manage/practitioner")
|
||||
@@ -29,54 +20,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
@AllArgsConstructor
|
||||
public class PractitionerController {
|
||||
|
||||
@Autowired
|
||||
private IPractitionerAppService practitionerAppService;
|
||||
|
||||
/**
|
||||
* 员工分页列表
|
||||
*
|
||||
* @param practSearchParam 查询条件
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @param request 请求数据
|
||||
* @return 员工分页列表
|
||||
*/
|
||||
@GetMapping(value = "/practitioner")
|
||||
public R<?> getPractitionerPage(PractSearchParam practSearchParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
return practitionerAppService.getPractitionerPage(practSearchParam, searchKey, pageNo, pageSize, request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取员工需要编辑的信息
|
||||
*
|
||||
* @param practitionerId 员工信息
|
||||
*/
|
||||
@GetMapping("/practitioner-getById")
|
||||
public R<?> getPractitionerById(@Validated @RequestParam Long practitionerId) {
|
||||
return practitionerAppService.getPractitionerById(practitionerId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑员工信息
|
||||
*
|
||||
* @param practitionerDto 员工信息
|
||||
*/
|
||||
@PutMapping("/practitioner")
|
||||
public R<?> addOrEditPractitioner(@Validated @RequestBody PractitionerDto practitionerDto) {
|
||||
return practitionerAppService.addOrEditPractitioner(practitionerDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除员工信息
|
||||
*
|
||||
* @param practitionerId 主表id
|
||||
*/
|
||||
@DeleteMapping("/practitioner")
|
||||
public R<?> deletePractitioner(@RequestParam Long practitionerId) {
|
||||
return practitionerAppService.deletePractitioner(practitionerId);
|
||||
}
|
||||
private final IPractitionerAppService practitionerAppService;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.openhis.web.basedatamanage.mapper;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 参与者 应用Mapper
|
||||
*/
|
||||
@Repository
|
||||
public interface PractitionerAppAppMapper {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.openhis.web.datadictionary.appservice;
|
||||
|
||||
import com.openhis.medication.domain.MedicationDetail;
|
||||
import com.openhis.web.datadictionary.dto.MedicationManageUpDto;
|
||||
|
||||
/**
|
||||
* 项目定价
|
||||
*
|
||||
* @author liuhr
|
||||
* @date 2025/3/25
|
||||
*/
|
||||
public interface IItemDefinitionService {
|
||||
|
||||
/**
|
||||
* 添加项目定价
|
||||
*
|
||||
* @param medicationManageUpDto 药品目录信息
|
||||
* @param medicationDetail 药品信息
|
||||
*/
|
||||
boolean addItem(MedicationManageUpDto medicationManageUpDto, MedicationDetail medicationDetail);
|
||||
|
||||
}
|
||||
@@ -35,11 +35,12 @@ public interface ISupplierManagementAppService {
|
||||
*
|
||||
* @param supplierSearchParam 查询条件
|
||||
* @param searchKey 查询条件-模糊查询
|
||||
* @param typeEnum 查询条件
|
||||
* @param pageNo 查询条件
|
||||
* @param pageSize 查询条件
|
||||
* @return 厂商/产地查询结果
|
||||
*/
|
||||
R<?> getSupplierList(SupplierSearchParam supplierSearchParam, String searchKey, Integer pageNo, Integer pageSize,
|
||||
R<?> getSupplierList(SupplierSearchParam supplierSearchParam, String searchKey,Integer typeEnum, Integer pageNo, Integer pageSize,
|
||||
HttpServletRequest request);
|
||||
|
||||
/**
|
||||
|
||||
@@ -125,6 +125,8 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
||||
e.setYbMatchFlag_enumText(EnumUtils.getInfoByValue(Whether.class, e.getYbMatchFlag()));
|
||||
// 过敏标记枚举类回显赋值
|
||||
e.setAllergenFlag_enumText(EnumUtils.getInfoByValue(Whether.class, e.getAllergenFlag()));
|
||||
//器材分类
|
||||
e.setCategoryEnum_enumText(EnumUtils.getInfoByValue(DeviceCategory.class, e.getCategoryEnum()));
|
||||
});
|
||||
|
||||
// 返回【器材目录列表DTO】分页
|
||||
@@ -219,12 +221,12 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
||||
@Override
|
||||
public R<?> addDevice(@Validated @RequestBody DeviceManageUpDto deviceManageUpDto) {
|
||||
|
||||
DeviceDefinition DeviceDefinition = new DeviceDefinition();
|
||||
BeanUtils.copyProperties(deviceManageUpDto, DeviceDefinition);
|
||||
DeviceDefinition deviceDefinition = new DeviceDefinition();
|
||||
BeanUtils.copyProperties(deviceManageUpDto, deviceDefinition);
|
||||
|
||||
// 新增外来器材目录
|
||||
DeviceDefinition.setStatusEnum(PublicationStatus.DRAFT);
|
||||
return deviceDefinitionService.addDevice(DeviceDefinition)
|
||||
deviceDefinition.setStatusEnum(PublicationStatus.DRAFT);
|
||||
return deviceDefinitionService.addDevice(deviceDefinition)
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"器材目录"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.openhis.web.datadictionary.appservice.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.core.common.utils.DateUtils;
|
||||
import com.openhis.administration.domain.ChargeItemDefDetail;
|
||||
import com.openhis.administration.domain.ChargeItemDefinition;
|
||||
import com.openhis.administration.service.IChargeItemDefDetailService;
|
||||
import com.openhis.administration.service.IChargeItemDefinitionService;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
import com.openhis.common.enums.Whether;
|
||||
import com.openhis.medication.domain.MedicationDetail;
|
||||
import com.openhis.web.datadictionary.appservice.IItemDefinitionService;
|
||||
import com.openhis.web.datadictionary.dto.MedicationManageUpDto;
|
||||
|
||||
/**
|
||||
* 项目定价 实现
|
||||
*
|
||||
* @author liuhr
|
||||
* @date 2025/3/25
|
||||
*/
|
||||
@Service
|
||||
public class ItemDefinitionServiceImpl implements IItemDefinitionService {
|
||||
|
||||
@Autowired
|
||||
IChargeItemDefinitionService chargeItemDefinitionService;
|
||||
|
||||
@Autowired
|
||||
IChargeItemDefDetailService chargeItemDefDetailService;
|
||||
|
||||
/**
|
||||
* 添加项目定价
|
||||
*
|
||||
* @param medicationManageUpDto 药品目录信息
|
||||
* @param medicationDetail 药品信息
|
||||
*/
|
||||
@Override
|
||||
public boolean addItem(MedicationManageUpDto medicationManageUpDto, MedicationDetail medicationDetail) {
|
||||
|
||||
ChargeItemDefinition chargeItemDefinition = new ChargeItemDefinition();
|
||||
chargeItemDefinition.setChargeName(medicationDetail.getName())
|
||||
.setStatusEnum(PublicationStatus.ACTIVE.getValue())
|
||||
.setInstanceTable(CommonConstants.TableName.MED_MEDICATION_DEFINITION)
|
||||
.setInstanceId(medicationDetail.getMedicationDefId()).setEffectiveStart(DateUtils.getNowDate())
|
||||
// todo 机构ID后续修改
|
||||
.setOrgId(1L)
|
||||
// 财务类别
|
||||
.setTypeCode(medicationManageUpDto.getMinimalFee())
|
||||
// 医保类别
|
||||
.setYbType(medicationManageUpDto.getYbType()).setConditionFlag(Whether.YES.getValue())
|
||||
.setPrice(medicationManageUpDto.getRetailPrice());
|
||||
boolean insertCIDSuccess = chargeItemDefinitionService.save(chargeItemDefinition);
|
||||
|
||||
if (insertCIDSuccess) {
|
||||
List<ChargeItemDefDetail> shargeItemDefDetails = new ArrayList<>();
|
||||
ChargeItemDefDetail chargeItemDefDetail1 = new ChargeItemDefDetail();
|
||||
chargeItemDefDetail1.setDefinitionId(chargeItemDefinition.getId())
|
||||
// 单位+批次(unit,pici) 用,符号拼装
|
||||
.setConditionCode(
|
||||
medicationManageUpDto.getDoseUnitCode_dictText() + "," + medicationManageUpDto.getLotNumber())
|
||||
// 购入价
|
||||
.setAmount(medicationManageUpDto.getPurchasePrice()).setPriority(0);
|
||||
|
||||
ChargeItemDefDetail chargeItemDefDetail2 = new ChargeItemDefDetail();
|
||||
chargeItemDefDetail1.setDefinitionId(chargeItemDefinition.getId())
|
||||
// 单位+批次(unit,pici) 用,符号拼装
|
||||
.setConditionCode(
|
||||
medicationManageUpDto.getDoseUnitCode_dictText() + "," + medicationManageUpDto.getLotNumber())
|
||||
// 零售价
|
||||
.setAmount(medicationManageUpDto.getRetailPrice()).setPriority(1);
|
||||
|
||||
shargeItemDefDetails.add(chargeItemDefDetail2);
|
||||
|
||||
ChargeItemDefDetail chargeItemDefDetail3 = new ChargeItemDefDetail();
|
||||
chargeItemDefDetail1.setDefinitionId(chargeItemDefinition.getId())
|
||||
// 单位+批次(unit,pici) 用,符号拼装
|
||||
.setConditionCode(
|
||||
medicationManageUpDto.getDoseUnitCode_dictText() + "," + medicationManageUpDto.getLotNumber())
|
||||
// 最高零售价
|
||||
.setAmount(medicationManageUpDto.getMaximumRetailPrice()).setPriority(2);
|
||||
|
||||
shargeItemDefDetails.add(chargeItemDefDetail3);
|
||||
|
||||
return chargeItemDefDetailService.saveBatch(shargeItemDefDetails);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -20,20 +20,27 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.core.domain.entity.SysDictData;
|
||||
import com.core.common.utils.ChineseConvertUtils;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.core.common.utils.bean.BeanUtils;
|
||||
import com.core.common.utils.poi.ExcelUtil;
|
||||
import com.core.system.service.ISysDictTypeService;
|
||||
import com.openhis.administration.domain.Supplier;
|
||||
import com.openhis.administration.service.ISupplierService;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.AccountStatus;
|
||||
import com.openhis.common.enums.ApplicableScope;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
import com.openhis.common.enums.Whether;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.medication.domain.Medication;
|
||||
import com.openhis.medication.domain.MedicationDefinition;
|
||||
import com.openhis.medication.domain.MedicationDetail;
|
||||
import com.openhis.medication.service.IMedicationDefinitionService;
|
||||
import com.openhis.medication.service.IMedicationService;
|
||||
import com.openhis.web.datadictionary.appservice.IItemDefinitionService;
|
||||
import com.openhis.web.datadictionary.appservice.IMedicationManageAppService;
|
||||
import com.openhis.web.datadictionary.dto.MedicationManageDto;
|
||||
import com.openhis.web.datadictionary.dto.MedicationManageInitDto;
|
||||
@@ -57,6 +64,14 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
||||
|
||||
@Autowired
|
||||
private MedicationManageSearchMapper medicationManageSearchMapper;
|
||||
@Autowired
|
||||
private ISupplierService supplierService;
|
||||
|
||||
@Autowired
|
||||
private ISysDictTypeService sysDictTypeService;
|
||||
|
||||
@Autowired
|
||||
private IItemDefinitionService itemDefinitionServic;
|
||||
|
||||
/**
|
||||
* 药品目录初始化
|
||||
@@ -75,9 +90,33 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
||||
List<MedicationManageInitDto.domainEnumOption> domainEnumOptions = Stream.of(ApplicableScope.values())
|
||||
.map(domain -> new MedicationManageInitDto.domainEnumOption(domain.getValue(), domain.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
// 查询供应商列表
|
||||
List<Supplier> supplierList = supplierService.getList();
|
||||
// 供应商信息
|
||||
List<MedicationManageInitDto.supplierListOption> supplierListOptions = supplierList.stream()
|
||||
.map(supplier -> new MedicationManageInitDto.supplierListOption(supplier.getId(), supplier.getName()))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 获取药品分类
|
||||
List<SysDictData> medicalList =
|
||||
sysDictTypeService.selectDictDataByType(CommonConstants.DictName.MED_CATEGORY_CODE);
|
||||
// 获取药品分类
|
||||
List<MedicationManageInitDto.dictCategoryCode> medicationCategories = medicalList.stream().map(
|
||||
category -> new MedicationManageInitDto.dictCategoryCode(category.getDictValue(), category.getDictLabel()))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 获取是/否 列表
|
||||
// 获取状态
|
||||
List<MedicationManageInitDto.statusEnumOption> statusWeatherOption = Stream.of(Whether.values())
|
||||
.map(status -> new MedicationManageInitDto.statusEnumOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
medicationManageInitDto.setStatusFlagOptions(statusEnumOptions);
|
||||
medicationManageInitDto.setDomainFlagOptions(domainEnumOptions);
|
||||
medicationManageInitDto.setSupplierListOptions(supplierListOptions);
|
||||
medicationManageInitDto.setMedicationCategoryCodeOptions(medicationCategories);
|
||||
medicationManageInitDto.setStatusWeatherOptions(statusWeatherOption);
|
||||
|
||||
return R.ok(medicationManageInitDto);
|
||||
}
|
||||
|
||||
@@ -117,9 +156,9 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
||||
// 药品状态
|
||||
e.setStatusEnum_enumText(EnumUtils.getInfoByValue(PublicationStatus.class, e.getStatusEnum()));
|
||||
// 活动标记
|
||||
// e.setActiveFlag_enumText(EnumUtils.getInfoByValue(AccountStatus.class, e.getActiveFlag()));
|
||||
// e.setActiveFlag_enumText(EnumUtils.getInfoByValue(AccountStatus.class, e.getActiveFlag()));
|
||||
// 适用范围
|
||||
// e.setDomainEnum_enumText(EnumUtils.getInfoByValue(ApplicableScope.class, e.getDomainEnum()));
|
||||
// e.setDomainEnum_enumText(EnumUtils.getInfoByValue(ApplicableScope.class, e.getDomainEnum()));
|
||||
});
|
||||
|
||||
// 返回【药品录列表DTO】分页
|
||||
@@ -138,6 +177,10 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
||||
Medication medication = new Medication();
|
||||
BeanUtils.copyProperties(medicationManageUpDto, medication); // 子表信息
|
||||
BeanUtils.copyProperties(medicationManageUpDto, medicationDefinition);// 主表信息
|
||||
// 拼音码
|
||||
medicationDefinition.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(medicationDefinition.getName()));
|
||||
// 五笔码
|
||||
medicationDefinition.setWbStr(ChineseConvertUtils.toWBFirstLetter(medicationDefinition.getName()));
|
||||
|
||||
// 更新子表药品信息
|
||||
if (medicationService.updateById(medication)) {
|
||||
@@ -223,10 +266,20 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
||||
|
||||
MedicationDetail medicationDetail = new MedicationDetail();
|
||||
BeanUtils.copyProperties(medicationManageUpDto, medicationDetail);
|
||||
// 拼音码
|
||||
medicationDetail.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(medicationDetail.getName()));
|
||||
// 五笔码
|
||||
medicationDetail.setWbStr(ChineseConvertUtils.toWBFirstLetter(medicationDetail.getName()));
|
||||
|
||||
// 新增主表外来药品目录
|
||||
if (medicationDefinitionService.addMedication(medicationDetail)) {
|
||||
|
||||
// 新增子表外来药品目录
|
||||
return medicationService.addMedication(medicationDetail)
|
||||
boolean insertMedicationSuccess = medicationService.addMedication(medicationDetail);
|
||||
// 添加药品成功后,添加相应的条件价格表信息
|
||||
boolean insertItemDefinitionSuccess = itemDefinitionServic.addItem(medicationManageUpDto, medicationDetail);
|
||||
|
||||
return (insertMedicationSuccess || insertItemDefinitionSuccess)
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"药品目录"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null));
|
||||
} else {
|
||||
|
||||
@@ -12,12 +12,16 @@ import java.util.stream.Stream;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.alibaba.druid.sql.visitor.functions.Isnull;
|
||||
import com.core.common.utils.ChineseConvertUtils;
|
||||
import com.core.common.utils.StringUtils;
|
||||
import com.openhis.administration.domain.Supplier;
|
||||
import com.openhis.administration.mapper.SupplierMapper;
|
||||
import com.openhis.administration.service.ISupplierService;
|
||||
import com.openhis.common.enums.AccountStatus;
|
||||
import com.openhis.common.enums.SupplierType;
|
||||
import com.openhis.common.enums.SupplyStatus;
|
||||
import com.openhis.common.enums.SupplyType;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.web.datadictionary.appservice.ISupplierManagementAppService;
|
||||
import com.openhis.web.datadictionary.dto.SupplierDto;
|
||||
@@ -73,27 +77,33 @@ public class SupplierManagementAppServiceImpl implements ISupplierManagementAppS
|
||||
*
|
||||
* @param supplierSearchParam 查询条件
|
||||
* @param searchKey 查询条件-模糊查询
|
||||
* @param typeEnum 查询条件
|
||||
* @param pageNo 查询条件
|
||||
* @param pageSize 查询条件
|
||||
* @return 厂商/产地查询结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> getSupplierList(SupplierSearchParam supplierSearchParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
public R<?> getSupplierList(SupplierSearchParam supplierSearchParam, String searchKey,
|
||||
Integer typeEnum, Integer pageNo, Integer pageSize, HttpServletRequest request) {
|
||||
|
||||
// 构建查询条件
|
||||
QueryWrapper<Supplier> queryWrapper = HisQueryUtils.buildQueryWrapper(supplierSearchParam, searchKey,
|
||||
new HashSet<>(Arrays.asList("bus_no", "name", "py_str", "wb_str")), request);
|
||||
if(StringUtils.isNotNull(typeEnum)){
|
||||
queryWrapper.eq("type_enum",typeEnum);
|
||||
}
|
||||
|
||||
// 设置排序
|
||||
queryWrapper.orderByAsc("bus_no");
|
||||
// 分页查询
|
||||
Page<SupplierDto> supplierPage =
|
||||
HisPageUtils.selectPage(supplierMapper, queryWrapper, pageNo, pageSize, SupplierDto.class);
|
||||
// 枚举类回显赋值
|
||||
supplierPage.getRecords()
|
||||
.forEach(e -> e.setActiveFlag_enumText(EnumUtils.getInfoByValue(AccountStatus.class, e.getActiveFlag())));
|
||||
supplierPage.getRecords().forEach(e -> {
|
||||
e.setActiveFlag_enumText(EnumUtils.getInfoByValue(AccountStatus.class, e.getActiveFlag()));
|
||||
// 厂商类型
|
||||
e.setTypeEnum_enumText(EnumUtils.getInfoByValue(SupplierType.class, e.getTypeEnum()));
|
||||
});
|
||||
// 返回【病种目录列表DTO】分页
|
||||
return R.ok(supplierPage);
|
||||
}
|
||||
@@ -104,7 +114,7 @@ public class SupplierManagementAppServiceImpl implements ISupplierManagementAppS
|
||||
* @param supplierUpDto 供应商信息
|
||||
*/
|
||||
@Override
|
||||
public R<?> addSupplyRequest(@Validated @RequestBody SupplierUpDto supplierUpDto) {
|
||||
public R<?> addSupplyRequest(SupplierUpDto supplierUpDto) {
|
||||
|
||||
Supplier supplierInfo = new Supplier();
|
||||
BeanUtils.copyProperties(supplierUpDto, supplierInfo);
|
||||
@@ -123,7 +133,7 @@ public class SupplierManagementAppServiceImpl implements ISupplierManagementAppS
|
||||
* @param supplierUpDto 供应商信息
|
||||
*/
|
||||
@Override
|
||||
public R<?> editSupplyRequest(@Validated @RequestBody SupplierUpDto supplierUpDto) {
|
||||
public R<?> editSupplyRequest(SupplierUpDto supplierUpDto) {
|
||||
|
||||
Supplier supplier = new Supplier();
|
||||
BeanUtils.copyProperties(supplierUpDto, supplier);
|
||||
|
||||
@@ -10,6 +10,7 @@ import java.util.stream.Stream;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.openhis.common.enums.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -24,10 +25,6 @@ import com.core.system.service.ISysDictTypeService;
|
||||
import com.openhis.administration.domain.Organization;
|
||||
import com.openhis.administration.service.IOrganizationService;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.ActivityDefCategory;
|
||||
import com.openhis.common.enums.OrganizationType;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
import com.openhis.common.enums.Whether;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
@@ -106,6 +103,7 @@ public class DiagnosisTreatmentController {
|
||||
.stream().map(status -> new DiagnosisTreatmentInitDto.diseaseTreatmentType(status.getDictValue(),
|
||||
status.getDictLabel()))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
DiagnosisTreatmentInitDto.diseaseTreatmentCategory diseaseTreatmentCategory2 =
|
||||
new DiagnosisTreatmentInitDto.diseaseTreatmentCategory(ActivityDefCategory.TREATMENT_SURGERY.getValue(),
|
||||
ActivityDefCategory.TREATMENT_SURGERY.getInfo());
|
||||
@@ -113,6 +111,13 @@ public class DiagnosisTreatmentController {
|
||||
diseaseTreatmentCategories.add(diseaseTreatmentCategory2);
|
||||
|
||||
diagnosisTreatmentInitDto.setDiseaseTreatmentCategoryList(diseaseTreatmentCategories);
|
||||
|
||||
// 获取类型
|
||||
List<DiagnosisTreatmentInitDto.statusEnumOption> typeEnumOptions = Stream.of(ActivityType.values())
|
||||
.map(status -> new DiagnosisTreatmentInitDto.statusEnumOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
diagnosisTreatmentInitDto.setTypeEnumOptions(typeEnumOptions);
|
||||
|
||||
return R.ok(diagnosisTreatmentInitDto);
|
||||
}
|
||||
|
||||
@@ -145,6 +150,12 @@ public class DiagnosisTreatmentController {
|
||||
e.setYbFlag_enumText(EnumUtils.getInfoByValue(Whether.class, e.getYbFlag()));
|
||||
// 医保对码标记枚举类回显赋值
|
||||
e.setYbMatchFlag_enumText(EnumUtils.getInfoByValue(Whether.class, e.getYbMatchFlag()));
|
||||
//类型举类回显赋值
|
||||
e.setTypeEnum_enumText(EnumUtils.getInfoByValue(ActivityType.class, e.getTypeEnum()));
|
||||
//目录类别举类回显赋值
|
||||
e.setCategory_enumText(EnumUtils.getInfoByValue(ActivityDefCategory.class, e.getCategoryEnum()));
|
||||
//状态举类回显赋值
|
||||
e.setStatusEnum_enumText(EnumUtils.getInfoByValue(PublicationStatus.class, e.getStatusEnum()));
|
||||
});
|
||||
|
||||
// 返回【诊疗目录列表DTO】分页
|
||||
|
||||
@@ -9,6 +9,8 @@ import java.util.stream.Stream;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.openhis.common.enums.*;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -21,8 +23,6 @@ import com.openhis.clinical.domain.ConditionDefinition;
|
||||
import com.openhis.clinical.mapper.ConditionDefinitionMapper;
|
||||
import com.openhis.clinical.service.IConditionDefinitionService;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.ConditionDefinitionSource;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.web.datadictionary.dto.DiseaseManageDto;
|
||||
@@ -54,6 +54,7 @@ public class DiseaseManageController {
|
||||
*/
|
||||
@GetMapping("/information-init")
|
||||
public R<?> getDiseaseInit() {
|
||||
|
||||
DiseaseManageInitDto diseaseManageInitDto = new DiseaseManageInitDto();
|
||||
// 获取疾病目录种类
|
||||
List<DiseaseManageInitDto.diseaseCategory> diseaseCategoryList = Stream.of(ConditionDefinitionSource.values())
|
||||
@@ -65,6 +66,7 @@ public class DiseaseManageController {
|
||||
.map(status -> new DiseaseManageInitDto.statusEnumOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
diseaseManageInitDto.setStatusFlagOptions(statusEnumOptions);
|
||||
|
||||
return R.ok(diseaseManageInitDto);
|
||||
}
|
||||
|
||||
@@ -91,6 +93,14 @@ public class DiseaseManageController {
|
||||
// 分页查询
|
||||
Page<DiseaseManageDto> diseasePage =
|
||||
HisPageUtils.selectPage(conditionDefinitionMapper, queryWrapper, pageNo, pageSize, DiseaseManageDto.class);
|
||||
|
||||
diseasePage.getRecords().forEach(e -> {
|
||||
// 医保对码枚举类回显赋值
|
||||
e.setYbMatchFlag_enumText(EnumUtils.getInfoByValue(Whether.class, e.getYbMatchFlag()));
|
||||
//状态
|
||||
e.setStatusEnum_enumText(EnumUtils.getInfoByValue(PublicationStatus.class, e.getStatusEnum()));
|
||||
});
|
||||
|
||||
// 返回【病种目录列表DTO】分页
|
||||
return R.ok(diseasePage);
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@ public class SupplierManagementController {
|
||||
*
|
||||
* @param supplierSearchParam 查询条件
|
||||
* @param searchKey 查询条件-模糊查询
|
||||
* @param typeEnum 查询条件
|
||||
* @param pageNo 查询条件
|
||||
* @param pageSize 查询条件
|
||||
* @return 厂商/产地查询结果
|
||||
@@ -53,11 +54,12 @@ public class SupplierManagementController {
|
||||
@GetMapping(value = "/get-supplier-list")
|
||||
public R<?> getSupplierList(SupplierSearchParam supplierSearchParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "typeEnum", defaultValue = "") Integer typeEnum,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
|
||||
// 返回分页
|
||||
return supplierManagementAppService.getSupplierList(supplierSearchParam, searchKey, pageNo, pageSize, request);
|
||||
return supplierManagementAppService.getSupplierList(supplierSearchParam, searchKey,typeEnum, pageNo, pageSize, request);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -36,7 +36,8 @@ public class DeviceManageDto {
|
||||
private String wbStr;
|
||||
|
||||
/** 器材分类 */
|
||||
private DeviceCategory categoryEnum;
|
||||
private Integer categoryEnum;
|
||||
private String categoryEnum_enumText;
|
||||
|
||||
/** 器材种类 */
|
||||
private String typeCode;
|
||||
|
||||
@@ -94,10 +94,12 @@ public class DeviceManageUpDto {
|
||||
|
||||
/** 生产厂家 */
|
||||
@NotNull(message = "生产厂家不能为空")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long manufacturerId;
|
||||
|
||||
/** 供应商 */
|
||||
@NotNull(message = "供应商不能为空")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long supplyId;
|
||||
|
||||
/** 说明 */
|
||||
@@ -109,8 +111,19 @@ public class DeviceManageUpDto {
|
||||
|
||||
/** 执行科室 */
|
||||
@NotNull(message = "执行科室不能为空")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long ruleId;
|
||||
|
||||
/** 归属科室 */
|
||||
@NotNull(message = "归属科室不能为空")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long orgId;
|
||||
|
||||
/** 所在位置 */
|
||||
@NotNull(message = "所在位置不能为空")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long locationId;
|
||||
|
||||
/** 器材版本 */
|
||||
private String version;
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ import com.openhis.common.enums.PublicationStatus;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 诊疗目录分页检索
|
||||
*
|
||||
@@ -22,7 +24,8 @@ public class DiagnosisTreatmentDto {
|
||||
private Long id;
|
||||
|
||||
/** 目录类别 */
|
||||
private ActivityDefCategory categoryEnum;
|
||||
private Integer categoryEnum;
|
||||
private String category_enumText;
|
||||
|
||||
/** 编码 */
|
||||
private String busNo;
|
||||
@@ -37,7 +40,8 @@ public class DiagnosisTreatmentDto {
|
||||
private String wbStr;
|
||||
|
||||
/** 类型 */
|
||||
private String typeCode;
|
||||
private Integer typeEnum;
|
||||
private String typeEnum_enumText;
|
||||
|
||||
/** 使用单位 */
|
||||
private String permittedUnitCode;
|
||||
@@ -54,7 +58,8 @@ public class DiagnosisTreatmentDto {
|
||||
private String ybMatchFlag_enumText;
|
||||
|
||||
/** 状态 */
|
||||
private PublicationStatus statusEnum;
|
||||
private Integer statusEnum;
|
||||
private String statusEnum_enumText;
|
||||
|
||||
/** 身体部位 */
|
||||
private String bodySiteCode;
|
||||
@@ -67,4 +72,12 @@ public class DiagnosisTreatmentDto {
|
||||
|
||||
/** 规则id */
|
||||
private Integer ruleId;
|
||||
|
||||
/** 归属科室 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long orgId;
|
||||
|
||||
/** 所在位置 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long locationId;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ public class DiagnosisTreatmentInitDto {
|
||||
private List<statusEnumOption> statusFlagOptions;
|
||||
private List<diseaseTreatmentCategory> diseaseTreatmentCategoryList;
|
||||
private List<exeOrganization> exeOrganizations;
|
||||
private List<statusEnumOption> typeEnumOptions;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
|
||||
@@ -50,8 +50,10 @@ public class DiseaseManageDto {
|
||||
|
||||
/** 医保对码标记 */
|
||||
private Integer ybMatchFlag;
|
||||
private String ybMatchFlag_enumText;
|
||||
|
||||
/** 状态 */
|
||||
private PublicationStatus statusEnum;
|
||||
private Integer statusEnum;
|
||||
private String statusEnum_enumText;
|
||||
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ public class MedicationManageDto {
|
||||
private String statusEnum_enumText;
|
||||
|
||||
/** 所属科室 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long orgId;
|
||||
|
||||
/** 剂型 */
|
||||
@@ -109,8 +110,9 @@ public class MedicationManageDto {
|
||||
private String wbStr;
|
||||
|
||||
/** 药品分类 */
|
||||
@Dict(dictCode = "medicine_category")
|
||||
@Dict(dictCode = "med_category_code")
|
||||
private Integer categoryCode;
|
||||
private String categoryCode_dictText;
|
||||
|
||||
/** 商品名称 */
|
||||
private String merchandiseName;
|
||||
@@ -125,7 +127,7 @@ public class MedicationManageDto {
|
||||
private String unitCode;
|
||||
|
||||
/** 最小单位 */
|
||||
// private String minUnitCode;
|
||||
private String minUnitCode;
|
||||
|
||||
/** 所含耗材 */
|
||||
private String comprisedText;
|
||||
@@ -143,7 +145,9 @@ public class MedicationManageDto {
|
||||
private String approvalNumber;
|
||||
|
||||
/** 医保是否对码 */
|
||||
@Dict(dictCode = "sys_yes_no")
|
||||
private Integer ybMatchFlag;
|
||||
private String ybMatchFlag_dictText;
|
||||
|
||||
/** 医保编码 */
|
||||
private String ybNo;
|
||||
@@ -154,20 +158,25 @@ public class MedicationManageDto {
|
||||
/** 是否皮试 */
|
||||
@Dict(dictCode = "sys_yes_no")
|
||||
private Integer skinTestFlag;
|
||||
private String skinTestFlag_dictText;
|
||||
|
||||
/** 是否为注射药物 */
|
||||
@Dict(dictCode = "sys_yes_no")
|
||||
private Integer injectFlag;
|
||||
private String injectFlag_dictText;
|
||||
|
||||
/** 生产厂家 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long manufacturerId;
|
||||
|
||||
/** 供应商 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long supplyId;
|
||||
|
||||
/** 是否限制使用 */
|
||||
@Dict(dictCode = "sys_yes_no")
|
||||
private Integer restrictedFlag;
|
||||
private String restrictedFlag_dictText;
|
||||
|
||||
/** 限制使用范围 */
|
||||
private String restrictedScope;
|
||||
@@ -175,6 +184,7 @@ public class MedicationManageDto {
|
||||
/** 儿童用药标志 */
|
||||
@Dict(dictCode = "sys_yes_no")
|
||||
private Integer childrenFlag;
|
||||
private String childrenFlag_dictText;
|
||||
|
||||
/** 产品特性 */
|
||||
private Integer characteristic;
|
||||
@@ -209,10 +219,8 @@ public class MedicationManageDto {
|
||||
/** 当前库存数量(常规单位) */
|
||||
private String baseQuantity;
|
||||
|
||||
/** 最小单位 */
|
||||
private String minUnitCode;
|
||||
|
||||
/** 当前库存数量(最小单位数量) */
|
||||
private String minQuantity;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
@@ -16,6 +17,15 @@ import lombok.experimental.Accessors;
|
||||
public class MedicationManageInitDto {
|
||||
private List<statusEnumOption> statusFlagOptions;
|
||||
private List<domainEnumOption> domainFlagOptions;
|
||||
// 供应商
|
||||
private List<MedicationManageInitDto.supplierListOption> supplierListOptions;
|
||||
// 药品类型
|
||||
private List<MedicationManageInitDto.dictCategoryCode> medicationCategoryCodeOptions;
|
||||
// 单位编码
|
||||
private List<MedicationManageInitDto.dictCategoryCode> unitCodeOptions;
|
||||
|
||||
// 是/否 状态
|
||||
private List<statusEnumOption> statusWeatherOptions;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
@@ -44,4 +54,34 @@ public class MedicationManageInitDto {
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 供应商
|
||||
*/
|
||||
@Data
|
||||
public static class supplierListOption {
|
||||
private Long value;
|
||||
private String label;
|
||||
|
||||
public supplierListOption(Long value, String label) {
|
||||
this.value = value;
|
||||
this.label = label;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 药品类型
|
||||
*/
|
||||
@Data
|
||||
public static class dictCategoryCode {
|
||||
private String value;
|
||||
private String info;
|
||||
private List<dictCategoryCode> children = new ArrayList<>();
|
||||
|
||||
public dictCategoryCode(String value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,9 +5,11 @@ import java.util.Date;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
import com.openhis.common.annotation.Dict;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@@ -30,8 +32,13 @@ public class MedicationManageUpDto {
|
||||
private Long medicationDefId;
|
||||
|
||||
/** 所属科室 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long orgId;
|
||||
|
||||
/** 所在位置 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long locationId;
|
||||
|
||||
/** 剂型 */
|
||||
private String doseFormCode;
|
||||
|
||||
@@ -48,9 +55,11 @@ public class MedicationManageUpDto {
|
||||
private String lotNumber;
|
||||
|
||||
/** 生效日期 */
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date effectiveDate;
|
||||
|
||||
/** 到期日期 */
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expirationDate;
|
||||
|
||||
/** 用法 */
|
||||
@@ -63,7 +72,9 @@ public class MedicationManageUpDto {
|
||||
private BigDecimal dose;
|
||||
|
||||
/** 剂量单位 */
|
||||
@Dict(dictCode = "unit_code")
|
||||
private String doseUnitCode;
|
||||
private String doseUnitCode_dictText;
|
||||
|
||||
/** 单次最大剂量 */
|
||||
private BigDecimal maxUnit;
|
||||
@@ -143,9 +154,11 @@ public class MedicationManageUpDto {
|
||||
private Integer injectFlag;
|
||||
|
||||
/** 生产厂家 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long manufacturerId;
|
||||
|
||||
/** 供应商 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long supplyId;
|
||||
|
||||
/** 是否限制使用 */
|
||||
@@ -160,4 +173,19 @@ public class MedicationManageUpDto {
|
||||
/** 产品特性 */
|
||||
private Integer characteristic;
|
||||
|
||||
/** 购入价 */
|
||||
private BigDecimal purchasePrice;
|
||||
|
||||
/** 零售价 */
|
||||
private BigDecimal retailPrice;
|
||||
|
||||
/** 最高零售价 */
|
||||
private BigDecimal maximumRetailPrice;
|
||||
|
||||
/** 医保类别 */
|
||||
private String ybType;
|
||||
|
||||
/** 最小费用 */
|
||||
private String minimalFee;
|
||||
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ 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 com.openhis.common.annotation.Dict;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@@ -35,6 +36,7 @@ public class SupplierDto {
|
||||
|
||||
/** 类型 */
|
||||
private Integer typeEnum;
|
||||
private String typeEnum_enumText;
|
||||
|
||||
/** 地址 */
|
||||
private String address;
|
||||
@@ -57,5 +59,7 @@ public class SupplierDto {
|
||||
|
||||
/** 机构编号 */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Dict(dictTable = "adm_organization",dictCode = "id",dictText = "name")
|
||||
private Long orgId;
|
||||
private String orgId_dictText;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ public class PurchaseInventoryController {
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PutMapping("/submit-approval")
|
||||
public R<?> submitApproval(@RequestParam String busNo) {
|
||||
public R<?> submitApproval(@RequestBody String busNo) {
|
||||
return purchaseInventoryAppService.submitApproval(busNo);
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ public class PurchaseInventoryController {
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PutMapping("/withdraw-approval")
|
||||
public R<?> withdrawApproval(@RequestParam String busNo) {
|
||||
public R<?> withdrawApproval(@RequestBody String busNo) {
|
||||
return purchaseInventoryAppService.withdrawApproval(busNo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ public class PurchaseInventoryDto {
|
||||
private Long purposeLocationStoreId;
|
||||
|
||||
/** 申请人 */
|
||||
@NotNull
|
||||
// @NotNull
|
||||
private Long applicantId;
|
||||
|
||||
/** 经手人 */
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.openhis.web.basedatamanage.mapper.PractitionerAppAppMapper">
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -53,13 +53,13 @@
|
||||
T1.characteristic,
|
||||
T1.national_drug_code,
|
||||
T1.part_attribute,
|
||||
T1.antibiotic_code
|
||||
T1.restricted_enum
|
||||
T1.self_flag
|
||||
T1.antibiotic_flag
|
||||
T1.basic_flag
|
||||
T1.antibiotic_code,
|
||||
T1.restricted_enum,
|
||||
T1.self_flag,
|
||||
T1.antibiotic_flag,
|
||||
T1.basic_flag,
|
||||
T1.remark,
|
||||
T3.manufacturer_name,
|
||||
T3.name AS manufacturer_name,
|
||||
T4.base_unit_code,
|
||||
T4.base_quantity,
|
||||
T4.min_unit_code,
|
||||
|
||||
@@ -184,6 +184,17 @@ public class CommonConstants {
|
||||
String TCM_DIAGNOSIS = "中医诊断";
|
||||
}
|
||||
|
||||
/**
|
||||
* 字典字段名常量
|
||||
*/
|
||||
public interface DictName {
|
||||
/**
|
||||
* 药品分类
|
||||
*/
|
||||
String MED_CATEGORY_CODE = "med_category_code";
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* sql条件常量
|
||||
*/
|
||||
|
||||
@@ -6,7 +6,7 @@ import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum DeviceCategory {
|
||||
public enum DeviceCategory implements HisEnumInterface {
|
||||
ACTIVE (1, "active", "有源的"),
|
||||
COMMUNICATING(2, "communicating", "通讯类"),
|
||||
HOMEUSE(3, "communicating", "非院内使用"),
|
||||
|
||||
@@ -6,11 +6,12 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 参与者角色
|
||||
* 参与者角色 : 对应 sys_role表的角色标识 ; 需要补充业务数据时在该枚举类添加
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum PractitionerRole implements HisEnumInterface {
|
||||
|
||||
DOCTOR(1, "doctor", "医生"),
|
||||
|
||||
NURSE(2, "nurse", "护士"),
|
||||
|
||||
@@ -6,7 +6,7 @@ import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum SupplierType {
|
||||
public enum SupplierType implements HisEnumInterface {
|
||||
DRAFT(1, "1", "生产商"),
|
||||
|
||||
ACTIVE(2, "2", "供应商");
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.openhis.administration.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 用户管理Entity实体
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
@TableName("sys_user")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BizUser extends HisBaseEntity {
|
||||
|
||||
/** 用户ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long userId;
|
||||
|
||||
/** 部门ID */
|
||||
private Long deptId;
|
||||
|
||||
/** 用户账号 */
|
||||
private String userName;
|
||||
|
||||
/** 用户昵称 */
|
||||
private String nickName;
|
||||
|
||||
/** 用户类型 */
|
||||
private String userType;
|
||||
|
||||
/** 用户邮箱 */
|
||||
private String email;
|
||||
|
||||
/** 手机号码 */
|
||||
private String phonenumber;
|
||||
|
||||
/** 用户性别 */
|
||||
private String sex;
|
||||
|
||||
/** 用户头像 */
|
||||
private String avatar;
|
||||
|
||||
/** 密码 */
|
||||
private String password;
|
||||
|
||||
/** 帐号状态(0正常 1停用) */
|
||||
private String status;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
/** 最后登录IP */
|
||||
private String loginIp;
|
||||
|
||||
/** 最后登录时间 */
|
||||
private Date loginDate;
|
||||
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.openhis.administration.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 用户角色Entity实体
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
@TableName("sys_user_role")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class BizUserRole {
|
||||
|
||||
/** 用户ID */
|
||||
private Long userId;
|
||||
|
||||
/** 角色ID */
|
||||
private Long roleId;
|
||||
|
||||
}
|
||||
@@ -36,7 +36,7 @@ public class ChargeItemDefinition extends HisBaseEntity {
|
||||
private String title;
|
||||
|
||||
/** 状态 */
|
||||
private PublicationStatus statusEnum;
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 机构ID */
|
||||
private Long orgId;
|
||||
|
||||
@@ -92,6 +92,9 @@ public class DeviceDefinition extends HisBaseEntity {
|
||||
/** 生产厂家 */
|
||||
private Long manufacturerId;
|
||||
|
||||
/** 生产厂家 */
|
||||
private String manufacturerText;
|
||||
|
||||
/** 供应商 */
|
||||
private Long supplyId;
|
||||
|
||||
@@ -101,9 +104,6 @@ public class DeviceDefinition extends HisBaseEntity {
|
||||
/** 适用范围 */
|
||||
private String jurisdiction;
|
||||
|
||||
/** 执行科室 */
|
||||
private Long ruleId;
|
||||
|
||||
/** 器材版本 */
|
||||
private String version;
|
||||
|
||||
|
||||
@@ -80,6 +80,9 @@ public class Practitioner extends HisBaseEntity {
|
||||
/** 医保码 */
|
||||
private String ybNo;
|
||||
|
||||
/** 机构id */
|
||||
private Long orgId;
|
||||
|
||||
/** 系统用户id */
|
||||
private Long userId;
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.openhis.administration.mapper;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.administration.domain.BizUser;
|
||||
|
||||
/**
|
||||
* 用户管理Mapper接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Repository
|
||||
public interface BizUserMapper extends BaseMapper<BizUser> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.openhis.administration.mapper;
|
||||
|
||||
import com.openhis.administration.domain.BizUserRole;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.administration.domain.BizUser;
|
||||
|
||||
/**
|
||||
* 用户角色Mapper接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Repository
|
||||
public interface BizUserRoleMapper extends BaseMapper<BizUserRole> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.openhis.administration.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.BizUserRole;
|
||||
|
||||
/**
|
||||
* 用户角色Service接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
public interface IBizUserRoleService extends IService<BizUserRole> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.openhis.administration.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.BizUser;
|
||||
|
||||
/**
|
||||
* 用户管理Service接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
public interface IBizUserService extends IService<BizUser> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.openhis.administration.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.administration.domain.BizUserRole;
|
||||
import com.openhis.administration.mapper.BizUserRoleMapper;
|
||||
import com.openhis.administration.service.IBizUserRoleService;
|
||||
|
||||
/**
|
||||
* 用户角色Service业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Service
|
||||
public class BizUserRoleServiceImpl extends ServiceImpl<BizUserRoleMapper, BizUserRole> implements IBizUserRoleService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.openhis.administration.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.administration.domain.BizUser;
|
||||
import com.openhis.administration.mapper.BizUserMapper;
|
||||
import com.openhis.administration.service.IBizUserService;
|
||||
|
||||
/**
|
||||
* 用户管理Service业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Service
|
||||
public class BizUserServiceImpl extends ServiceImpl<BizUserMapper, BizUser> implements IBizUserService {
|
||||
|
||||
}
|
||||
@@ -99,6 +99,9 @@ public class MedicationDefinition extends HisBaseEntity {
|
||||
/** 生产厂家 */
|
||||
private Long manufacturerId;
|
||||
|
||||
/** 生产厂商文本 */
|
||||
private String manufacturerText;
|
||||
|
||||
/** 供应商 */
|
||||
private Long supplyId;
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.openhis.administration.mapper.BizUserMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.openhis.administration.mapper.BizUserRoleMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -12,6 +12,8 @@ let downloadLoadingInstance;
|
||||
export let isRelogin = { show: false };
|
||||
|
||||
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
|
||||
axios.defaults.headers['X-Tenant-ID'] = '1'
|
||||
axios.defaults.headers['Request-Method-Name'] = 'login'
|
||||
// 创建axios实例
|
||||
const service = axios.create({
|
||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
|
||||
@@ -70,3 +70,12 @@ export function getSupplierInit() {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询部门树结构
|
||||
export function deptTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
@@ -7,27 +7,18 @@
|
||||
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="厂家名称"
|
||||
placeholder="品名/商品名/英文品名/编码/拼音"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="厂商种类:" prop="status">
|
||||
<el-form-item label="厂商种类:" prop="typeEnum">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
v-model="queryParams.typeEnum"
|
||||
placeholder="生产商/供应商"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@@ -121,8 +112,8 @@
|
||||
<el-table-column
|
||||
label="类型 "
|
||||
align="center"
|
||||
key="typeEnum"
|
||||
prop="typeEnum"
|
||||
key="typeEnum_enumText"
|
||||
prop="typeEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -153,10 +144,10 @@
|
||||
width="160"
|
||||
/>
|
||||
<el-table-column
|
||||
label="机构编号"
|
||||
label="机构"
|
||||
align="center"
|
||||
key="orgId"
|
||||
prop="orgId"
|
||||
key="orgId_dictText"
|
||||
prop="orgId_dictText"
|
||||
width="160"
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -236,7 +227,20 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="类型" prop="typeEnum">
|
||||
<el-input v-model="form.typeEnum" maxlength="11" />
|
||||
<!-- <el-input v-model="form.typeEnum" maxlength="11" /> -->
|
||||
<el-select
|
||||
v-model="form.typeEnum"
|
||||
placeholder="生产商/供应商"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in supplierTypeOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.info"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -260,12 +264,22 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动标识" prop="activeFlag">
|
||||
<el-input v-model="form.activeFlag" maxlength="11" />
|
||||
<el-checkbox v-model="form.activeFlag"></el-checkbox>
|
||||
</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 label="机构编号" prop="orgId"> -->
|
||||
<!-- <el-input v-model="form.orgId" maxlength="11" /> -->
|
||||
<el-form-item label="提供部门" prop="orgId">
|
||||
<el-tree-select
|
||||
v-model="form.orgId"
|
||||
:data="deptOptions"
|
||||
:props="{ value: 'id', label: 'name', children: 'children' }"
|
||||
value-key="id"
|
||||
placeholder="请选择提供部门"
|
||||
check-strictly
|
||||
/>
|
||||
<!-- </el-form-item> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -289,6 +303,7 @@ import {
|
||||
stopSupplier,
|
||||
startSupplier,
|
||||
getSupplierInit,
|
||||
deptTreeSelect,
|
||||
} from "./components/supplier";
|
||||
|
||||
const router = useRouter();
|
||||
@@ -308,6 +323,7 @@ const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const supplierTypeOptions = ref(undefined);
|
||||
const deptOptions = ref(undefined); // 部门树选项
|
||||
// 是否停用
|
||||
const statusFlagOptions = ref(undefined);
|
||||
// const initPassword = ref(undefined);
|
||||
@@ -320,9 +336,9 @@ const data = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined, // 供应商名称
|
||||
busNo: undefined, // 编码
|
||||
statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
sourceEnum: undefined, // 来源(包括 1:厂商/产地目录分类,2:自定义)
|
||||
// busNo: undefined, // 编码
|
||||
typeEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
// sourceEnum: undefined, // 来源(包括 1:厂商/产地目录分类,2:自定义)
|
||||
},
|
||||
rules: {
|
||||
busNo: [{ required: true, message: "编码不能为空", trigger: "blur" }],
|
||||
@@ -349,6 +365,16 @@ function getsupplierTypeList() {
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询部门下拉树结构 */
|
||||
function getDeptTree() {
|
||||
console.log("查询部门下拉树结构");
|
||||
deptTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
deptOptions.value = response.data.records;
|
||||
console.log(deptOptions.value, "部门下拉树结构");
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询厂商/产地目录列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
@@ -356,7 +382,7 @@ function getList() {
|
||||
console.log(queryParams.value, "queryParams.value");
|
||||
getSupplierList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
console.log(res, "res",res.data.records);
|
||||
console.log(res, "res", res.data.records);
|
||||
supplierList.value = res.data.records;
|
||||
console.log(supplierList.value, "supplierList.value");
|
||||
total.value = res.data.total;
|
||||
@@ -458,6 +484,8 @@ function handleUpdate(row) {
|
||||
reset();
|
||||
console.log(row, "row");
|
||||
form.value = JSON.parse(JSON.stringify(row));
|
||||
form.value.activeFlag == 1 ? (form.value.activeFlag = true) : (form.value.activeFlag = false); //是否为活性
|
||||
// console.log(form.value.ty, "form.value");
|
||||
open.value = true;
|
||||
title.value = "厂商/产地编辑";
|
||||
}
|
||||
@@ -465,6 +493,7 @@ function handleUpdate(row) {
|
||||
function submitForm() {
|
||||
proxy.$refs["supplierRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
form.activeFlag == true ? (form.activeFlag = 1) : (form.activeFlag = 0); //是否为活性
|
||||
if (form.value.id != undefined) {
|
||||
console.log(form.value, "editSupplier", form.value.statusEnum);
|
||||
editSupplier(form.value).then((response) => {
|
||||
@@ -495,6 +524,7 @@ function handleView(row) {
|
||||
}
|
||||
getsupplierTypeList();
|
||||
getList();
|
||||
getDeptTree();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
|
||||
@@ -381,7 +381,7 @@
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in med_chrgitm_type"
|
||||
v-for="dict in yb_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
@@ -449,13 +449,15 @@ const {
|
||||
specialty_code,
|
||||
med_chrgitm_type,
|
||||
financial_type_code,
|
||||
yb_type
|
||||
} = proxy.useDict(
|
||||
"adm_location",
|
||||
"category_code",
|
||||
"service_type_code",
|
||||
"specialty_code",
|
||||
"med_chrgitm_type",
|
||||
"financial_type_code"
|
||||
"financial_type_code",
|
||||
"yb_type"
|
||||
);
|
||||
|
||||
const registrationfeeList = ref([]);
|
||||
|
||||
@@ -71,4 +71,22 @@ export function startDevice(ids) {
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 查询部门树形数据
|
||||
export function deptTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 查询地点树形数据
|
||||
export function locationTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/cabinet-location/cabinet-location',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<el-input v-model="form.name" placeholder="请输入器材名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item
|
||||
label="拼音码(器材名称)"
|
||||
prop="pyStr"
|
||||
@@ -32,29 +32,74 @@
|
||||
>
|
||||
<el-input v-model="form.pyStr" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="地点" prop="locationId">
|
||||
<el-tree-select
|
||||
v-model="form.locationId"
|
||||
:data="locationOptions"
|
||||
:props="{ value: 'id', label: 'name', children: 'children' }"
|
||||
value-key="id"
|
||||
placeholder="请选择地点"
|
||||
check-strictly
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="器材五笔拼音" prop="wbStr">
|
||||
<el-input v-model="form.wbStr" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="器材分类" prop="categoryEnum">
|
||||
<el-input v-model="form.categoryEnum" placeholder="" />
|
||||
<el-tree-select
|
||||
v-model="form.categoryEnum"
|
||||
:data="deviceCategories"
|
||||
:props="{ value: 'value', label: 'info', children: 'children' }"
|
||||
value-key="value"
|
||||
placeholder=""
|
||||
check-strictly
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="器材种类" prop="typeCode">
|
||||
<el-input v-model="form.typeCode" placeholder="" />
|
||||
<el-select v-model="form.typeCode" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in device_type_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="提供部门" prop="orgId">
|
||||
<el-tree-select
|
||||
v-model="form.orgId"
|
||||
:data="deptOptions"
|
||||
:props="{ value: 'id', label: 'name', children: 'children' }"
|
||||
value-key="id"
|
||||
placeholder="请选择提供部门"
|
||||
check-strictly
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="包装单位" prop="unitCode">
|
||||
<el-input v-model="form.unitCode" placeholder="" />
|
||||
<el-select v-model="form.unitCode" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in unit_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -64,7 +109,14 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="最小单位" prop="minUnitCode">
|
||||
<el-input v-model="form.minUnitCode" placeholder="" />
|
||||
<el-select v-model="form.minUnitCode" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in unit_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -93,7 +145,14 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="销售单位" prop="salesUnitCode">
|
||||
<el-input v-model="form.salesUnitCode" placeholder="" />
|
||||
<el-select v-model="form.salesUnitCode" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in unit_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -121,19 +180,39 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="状态" prop="statusEnum">
|
||||
<el-input v-model="form.statusEnum" placeholder="" />
|
||||
<el-select v-model="form.statusEnum" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in statusFlagOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.info"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生产厂家" prop="manufacturerId">
|
||||
<el-input v-model="form.manufacturerId" placeholder="" />
|
||||
<el-form-item label="生产厂家" prop="manufacturerText">
|
||||
<el-input v-model="form.manufacturerText" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="供应商" prop="supplyId">
|
||||
<el-input v-model="form.supplyId" placeholder="" />
|
||||
<!-- <el-input v-model="form.supplyId" placeholder="" /> -->
|
||||
<el-select
|
||||
v-model="form.supplierId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="supplier in supplierListOptions"
|
||||
:key="supplier.value"
|
||||
:label="supplier.label"
|
||||
:value="supplier.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -143,11 +222,11 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="执行科室" prop="ruleId">
|
||||
<el-input v-model="form.ruleId" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="器材版本" prop="version">
|
||||
<el-input v-model="form.version" placeholder="" />
|
||||
@@ -196,18 +275,25 @@ import {
|
||||
addDevice,
|
||||
getDiseaseTreatmentInit,
|
||||
getDeviceOne,
|
||||
deptTreeSelect,
|
||||
locationTreeSelect,
|
||||
} from "./device";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_normal_disable, sys_user_sex } = proxy.useDict(
|
||||
"sys_normal_disable",
|
||||
"sys_user_sex"
|
||||
const { device_type_code, unit_code } = proxy.useDict(
|
||||
"device_type_code",
|
||||
"unit_code"
|
||||
);
|
||||
|
||||
const title = ref("");
|
||||
const visible = ref(false);
|
||||
const emits = defineEmits(["submit"]); // 声明自定义事件
|
||||
const deptOptions = ref(undefined); // 部门树选项
|
||||
const locationOptions = ref(undefined); // 地点树选项
|
||||
const deviceCategories = ref([]); // 器材分类
|
||||
const statusFlagOptions = ref([]); // 状态标记
|
||||
const supplierListOptions = ref([]); // 供应商列表
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
@@ -264,6 +350,8 @@ const data = reactive({
|
||||
allergenFlag: [
|
||||
{ required: true, message: "过敏标记不能为空", trigger: "blur" },
|
||||
],
|
||||
orgId: [{ required: true, message: "提供部门不能为空", trigger: "blur" }],
|
||||
locationId: [{ required: true, message: "地点不能为空", trigger: "blur" }],
|
||||
},
|
||||
});
|
||||
|
||||
@@ -278,6 +366,14 @@ const props = defineProps({
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
deviceCategories: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
statusFlagOptions: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
// 显示弹框
|
||||
@@ -287,9 +383,30 @@ function show() {
|
||||
// getList();
|
||||
title.value = "";
|
||||
title.value = props.title;
|
||||
console.log(props, "22222", title.value);
|
||||
deviceCategories.value = props.deviceCategories;
|
||||
statusFlagOptions.value = props.statusFlagOptions;
|
||||
console.log(props, "22222", title.value, props.deviceCategories);
|
||||
getDeptTree();
|
||||
getLocationTree();
|
||||
visible.value = true;
|
||||
}
|
||||
/** 查询部门下拉树结构 */
|
||||
function getDeptTree() {
|
||||
deptTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
deptOptions.value = response.data.records;
|
||||
console.log(deptOptions.value, "部门下拉树结构");
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询地点下拉树结构 */
|
||||
function getLocationTree() {
|
||||
locationTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
locationOptions.value = response.data.records;
|
||||
console.log(locationOptions.value, "部门下拉树结构");
|
||||
});
|
||||
}
|
||||
// 显示弹框
|
||||
function edit() {
|
||||
// queryParams.roleId = props.roleId;
|
||||
@@ -298,6 +415,10 @@ function edit() {
|
||||
title.value = "";
|
||||
title.value = props.title;
|
||||
form.value = props.item;
|
||||
deviceCategories.value = props.deviceCategories;
|
||||
statusFlagOptions.value = props.statusFlagOptions;
|
||||
getDeptTree();
|
||||
getLocationTree();
|
||||
visible.value = true;
|
||||
}
|
||||
/** 重置操作表单 */
|
||||
@@ -330,6 +451,8 @@ function reset() {
|
||||
version: undefined, // 器材版本
|
||||
substanceText: undefined, // 主要成分
|
||||
allergenFlag: undefined, // 过敏标记
|
||||
orgId: undefined, // 科室ID
|
||||
locationId: undefined, // 地点ID
|
||||
};
|
||||
proxy.resetForm("medicationRef");
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="品名/商品名/英文品名/编码/拼音"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
style="width: 220px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -231,8 +231,8 @@
|
||||
<el-table-column
|
||||
label="高值器材标志"
|
||||
align="center"
|
||||
key="hvcmFlag"
|
||||
prop="hvcmFlag"
|
||||
key="hvcmFlag_enumText"
|
||||
prop="hvcmFlag_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
@@ -254,8 +254,8 @@
|
||||
<el-table-column
|
||||
label="医保标记"
|
||||
align="center"
|
||||
key="ybFlag"
|
||||
prop="ybFlag"
|
||||
key="ybFlag_enumText"
|
||||
prop="ybFlag_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/>
|
||||
@@ -270,8 +270,8 @@
|
||||
<el-table-column
|
||||
label="医保对码标记"
|
||||
align="center"
|
||||
key="ybMatchFlag"
|
||||
prop="ybMatchFlag"
|
||||
key="ybMatchFlag_enumText"
|
||||
prop="ybMatchFlag_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -338,8 +338,8 @@
|
||||
<el-table-column
|
||||
label="过敏标记"
|
||||
align="center"
|
||||
key="allergenFlag"
|
||||
prop="allergenFlag"
|
||||
key="allergenFlag_enumText"
|
||||
prop="allergenFlag_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/>
|
||||
@@ -383,6 +383,8 @@
|
||||
ref="deviceRef"
|
||||
:title="title"
|
||||
:item="currentData"
|
||||
:deviceCategories="deviceCategories"
|
||||
:statusFlagOptions="statusFlagOptions"
|
||||
@submit="getList()"
|
||||
/>
|
||||
<!-- <device-view-dialog
|
||||
|
||||
@@ -59,10 +59,7 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否停用" prop="statusEnum">
|
||||
<el-select
|
||||
v-model="queryParams.statusEnum"
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-select v-model="queryParams.statusEnum" style="width: 240px">
|
||||
<el-option
|
||||
v-for="status in statusFlagOptions"
|
||||
:key="status.value"
|
||||
@@ -270,16 +267,76 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="医保编码" prop="ybNo">
|
||||
<el-input v-model="form.ybNo" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="医保标记" prop="ybFlag">
|
||||
<!-- <el-input v-model="form.ybFlag" placeholder="" /> -->
|
||||
<el-checkbox v-model="form.ybFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="类型" prop="ybNo">
|
||||
<el-select v-model="form.statusEnum" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in statusFlagOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.info"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="医保标记" prop="ybFlag">
|
||||
<el-select v-model="form.statusEnum" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="dict in statusFlagOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.info"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="医保对码标记"
|
||||
prop="ybMatchFlag"
|
||||
label-width="100"
|
||||
>
|
||||
<el-checkbox v-model="form.ybMatchFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <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> -->
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="停用" prop="status">
|
||||
<el-checkbox v-model="form.status"></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>
|
||||
<div class="dialog-footer">
|
||||
@@ -299,7 +356,7 @@ import {
|
||||
getDiseaseCategory,
|
||||
getDiseaseOne,
|
||||
stopDisease,
|
||||
startDisease
|
||||
startDisease,
|
||||
} from "./components/disease";
|
||||
|
||||
const router = useRouter();
|
||||
@@ -319,6 +376,7 @@ const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const conditionDefinitionOptions = ref(undefined);
|
||||
const conditionDefinition = ref(undefined);
|
||||
// 是否停用
|
||||
const statusFlagOptions = ref(undefined);
|
||||
// const initPassword = ref(undefined);
|
||||
@@ -339,6 +397,15 @@ const data = reactive({
|
||||
conditionCode: [
|
||||
{ required: true, message: "编码不能为空", trigger: "blur" },
|
||||
],
|
||||
// typeCode: [
|
||||
// { required: true, message: "编码不能为空", trigger: "blur" },
|
||||
// ],
|
||||
// description: [
|
||||
// { required: true, message: "编码不能为空", trigger: "blur" },
|
||||
// ],
|
||||
// conditionCode: [
|
||||
// { required: true, message: "编码不能为空", trigger: "blur" },
|
||||
// ],
|
||||
},
|
||||
});
|
||||
|
||||
@@ -359,7 +426,6 @@ function getDiseaseCategoryList() {
|
||||
console.log(response, "response病种目录分类查询下拉树结构");
|
||||
conditionDefinitionOptions.value = response.data.diseaseCategoryList;
|
||||
statusFlagOptions.value = response.data.statusFlagOptions;
|
||||
|
||||
});
|
||||
}
|
||||
/** 查询病种目录列表 */
|
||||
@@ -378,6 +444,7 @@ function getList() {
|
||||
/** 节点单击事件 */
|
||||
function handleNodeClick(data) {
|
||||
queryParams.value.sourceEnum = data.value;
|
||||
conditionDefinition.value = data.value;
|
||||
handleQuery();
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
@@ -447,7 +514,7 @@ function handleExport() {
|
||||
function handleSelectionChange(selection) {
|
||||
console.log(selection, "selection");
|
||||
// selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
|
||||
ids.value = selection.map(item => item.id);
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
@@ -468,6 +535,12 @@ function reset() {
|
||||
pyStr: undefined,
|
||||
status: undefined,
|
||||
statusEnum: undefined,
|
||||
sourceEnum: undefined,
|
||||
typeCode: undefined,
|
||||
description: undefined,
|
||||
ybFlag: undefined,
|
||||
ybNo: undefined,
|
||||
ybMatchFlag: undefined,
|
||||
};
|
||||
proxy.resetForm("diseaseRef");
|
||||
}
|
||||
@@ -478,6 +551,9 @@ function cancel() {
|
||||
}
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
if (conditionDefinition.value === undefined) {
|
||||
return proxy.$modal.msgError("请选择病种目录分类");
|
||||
}
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "新增";
|
||||
@@ -487,6 +563,12 @@ function handleUpdate(row) {
|
||||
reset();
|
||||
console.log(row, "row");
|
||||
form.value = JSON.parse(JSON.stringify(row));
|
||||
form.value.ybFlag == 1
|
||||
? (form.value.ybFlag = true)
|
||||
: (form.value.ybFlag = false);
|
||||
form.value.ybMatchFlag == 1
|
||||
? (form.value.ybMatchFlag = true)
|
||||
: (form.value.ybMatchFlag = false);
|
||||
open.value = true;
|
||||
title.value = "病种编辑";
|
||||
}
|
||||
@@ -494,6 +576,11 @@ function handleUpdate(row) {
|
||||
function submitForm() {
|
||||
proxy.$refs["diseaseRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
form.value.sourceEnum = conditionDefinition.value;
|
||||
form.value.ybFlag ? (form.value.ybFlag = 1) : (form.value.ybFlag = 0);
|
||||
form.value.ybMatchFlag
|
||||
? (form.value.ybMatchFlag = 1)
|
||||
: (form.value.ybMatchFlag = 0);
|
||||
if (form.value.id != undefined) {
|
||||
// form.value.status
|
||||
// ? (form.value.statusEnum = "3")
|
||||
|
||||
@@ -51,10 +51,7 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="通用名称" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
/>
|
||||
<el-input v-model="form.name" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@@ -125,7 +122,7 @@
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-option
|
||||
v-for="category in medicine_category"
|
||||
v-for="category in fin_type_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
@@ -173,7 +170,7 @@
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-option
|
||||
v-for="category in medicine_unit"
|
||||
v-for="category in unit_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
@@ -209,7 +206,7 @@
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-option
|
||||
v-for="category in medicine_unit"
|
||||
v-for="category in unit_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
@@ -241,7 +238,7 @@
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-option
|
||||
v-for="category in medicine_unit"
|
||||
v-for="category in unit_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
@@ -259,7 +256,7 @@
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-option
|
||||
v-for="category in medicine_unit"
|
||||
v-for="category in unit_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
@@ -425,6 +422,23 @@
|
||||
<el-input v-model="form.partPercent" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="医保类别" prop="ybType">
|
||||
<el-select
|
||||
v-model="form.ybType"
|
||||
placeholder="医保类别"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in yb_type"
|
||||
: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="6">
|
||||
@@ -653,28 +667,30 @@ const {
|
||||
medicine_category,
|
||||
system_categories,
|
||||
medicine_properties,
|
||||
medicine_unit,
|
||||
unit_code,
|
||||
medicine_formulation,
|
||||
medical_insurance_types,
|
||||
yb_type,
|
||||
medicine_default_usage,
|
||||
medicine_default_frequency,
|
||||
medicine_basic_flag,
|
||||
sys_normal_disable,
|
||||
rate_code,
|
||||
method_code,
|
||||
fin_type_code
|
||||
} = proxy.useDict(
|
||||
"medicine_category",
|
||||
"system_categories",
|
||||
"medicine_properties",
|
||||
"medicine_unit",
|
||||
"unit_code",
|
||||
"medicine_formulation",
|
||||
"medical_insurance_types",
|
||||
"yb_type",
|
||||
"medicine_default_usage",
|
||||
"medicine_default_frequency",
|
||||
"medicine_basic_flag",
|
||||
"sys_normal_disable",
|
||||
"rate_code",
|
||||
"method_code"
|
||||
"method_code",
|
||||
"fin_type_code"
|
||||
);
|
||||
|
||||
const title = ref("");
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
label-width="68px"
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-col :span="5">
|
||||
<el-form-item label="药品" prop="searchKey" label-width="40">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
@@ -47,70 +47,34 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-col :span="5">
|
||||
<el-form-item
|
||||
label="是否系统预置"
|
||||
prop="status"
|
||||
label="状态"
|
||||
prop="statusEnum"
|
||||
label-width="100"
|
||||
>
|
||||
<el-select v-model="queryParams.statusEnum" clearable>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
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="status"
|
||||
label-width="100"
|
||||
>
|
||||
<el-form-item label="医保对码" prop="ybMatchFlag" label-width="80">
|
||||
<el-select
|
||||
v-model="queryParams.ybMatchFlag"
|
||||
placeholder=""
|
||||
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="4">
|
||||
<el-form-item label="已发生业务" prop="status" label-width="100">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="用户状态"
|
||||
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="4">
|
||||
<el-form-item label="医保等级" prop="status" label-width="80">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="用户状态"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
v-for="domainEnum in domainEnumOptions"
|
||||
:key="domainEnum.value"
|
||||
:label="domainEnum.info"
|
||||
:value="domainEnum.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -630,6 +594,7 @@ const title = ref("");
|
||||
const medicationOptions = ref(undefined);
|
||||
const statusFlagOptions = ref(undefined);
|
||||
const domainEnumOptions = ref(undefined);
|
||||
const supplierListOptions = ref(undefined);
|
||||
// 使用 ref 定义当前药品数据
|
||||
const currentData = ref({});
|
||||
// 使用 ref 定义当前查看药品数据
|
||||
@@ -671,9 +636,10 @@ const filterNode = (value, data) => {
|
||||
function getMedicationCategoryList() {
|
||||
getMedicationCategory().then((response) => {
|
||||
console.log(response, "response药品目录分类查询下拉树结构");
|
||||
medicationOptions.value = response.data.medicationOptions;
|
||||
medicationOptions.value = response.data.medicationListOptions;
|
||||
statusFlagOptions.value = response.data.statusFlagOptions;
|
||||
domainEnumOptions.value = response.data.domainFlagOptions;
|
||||
supplierListOptions.value = response.data.supplierListOptions;
|
||||
});
|
||||
}
|
||||
/** 查询病种目录列表 */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="app-container-infusion">
|
||||
<div class="app-container">
|
||||
<div class="left">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
|
||||
<el-form-item label="医嘱执行时间">
|
||||
@@ -21,14 +21,14 @@
|
||||
</el-form>
|
||||
|
||||
<el-table :data="patientList" border style="width: 100%" highlight-current-row @current-change="handleCurrentChange" >
|
||||
<el-table-column prop="prescriptionNo" label="处方号" width="150" />
|
||||
<el-table-column prop="prescriptionNo" label="处方号" width="120" />
|
||||
<el-table-column prop="patientName" label="姓名" width="100" />
|
||||
<el-table-column prop="genderEnum_enumText" label="性别" width="80" />
|
||||
<el-table-column prop="ageString" label="年龄" width="80" />
|
||||
<el-table-column prop="status" label="身份证号" width="140" />
|
||||
<el-table-column prop="idCard" label="身份证号" width="140" />
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
v-model:limit="queryParams.pageSize" @pagination="getList"/>
|
||||
</div>
|
||||
|
||||
<div class="right">
|
||||
@@ -41,7 +41,6 @@
|
||||
<el-button type="primary" icon="Search" @click="handleQueryRight" style="margin-left: 10px;">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQueryRight">重置</el-button>
|
||||
<el-button type="primary" icon="SuccessFilled" @click="handleSubmit">确认执行</el-button>
|
||||
<!-- <el-button type="primary" icon="SuccessFilled" @click="handleSubmitCanel">取消执行</el-button> -->
|
||||
<el-button type="primary" plain icon="Printer" @click="resetQuery">打印患者卡</el-button>
|
||||
<el-button type="primary" plain icon="Printer" @click="resetQuery">打印瓶签</el-button>
|
||||
<el-button type="primary" plain icon="Printer" @click="resetQuery">打印输液单</el-button>
|
||||
@@ -49,10 +48,15 @@
|
||||
</el-form>
|
||||
<div>
|
||||
<p style="margin: 0px 0px 10px 0px;">院注医嘱</p>
|
||||
<el-table :data="infusionList" border style="width: 100%;height: 300px;" :row-class-name="rowClassName"
|
||||
<el-table :data="infusionList" border style="width: 100%;height: 300px;" :row-style="rowStyle"
|
||||
@selection-change="handleSelectionChange" ref="tableRef">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column prop="groupId" label="组" width="60" />
|
||||
<el-table-column label="组" width="50">
|
||||
<template #default="scope">
|
||||
<span>{{ markers[scope.$index] }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="groupId" label="组" width="60" /> -->
|
||||
<el-table-column prop="executeNum" label="总执行次数" width="90" />
|
||||
<el-table-column prop="doneNum" label="已执行次数" width="90" />
|
||||
<el-table-column prop="doctorId_dictText" label="开单医生" width="100" />
|
||||
@@ -72,7 +76,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<p style="margin: 13px 0px 10px 0px;">院注执行历史</p>
|
||||
<el-table :data="historyRecordsList" border style="width: 100%;height: 250px;">
|
||||
<el-table :data="historyRecordsList" border style="width: 100%;height: 300px;">
|
||||
<el-table-column prop="occurrenceEndTime" label="执行时间" width="180" >
|
||||
<template #default="scope">
|
||||
<el-date-picker v-model="scope.row.occurrenceEndTime" type="datetime"
|
||||
@@ -80,6 +84,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="performerId_dictText" label="执行人" width="80" />
|
||||
<el-table-column prop="patientName" label="患者姓名" width="100" />
|
||||
<el-table-column prop="prescriptionNo" label="处方号" width="100" />
|
||||
<el-table-column prop="doctorId_dictText" label="开单医生" width="100" />
|
||||
<el-table-column prop="medicationInformation" label="药品信息" width="180" />
|
||||
@@ -126,9 +131,11 @@ const dateRangeRight = ref([]);
|
||||
const historyRecordsList = ref([]);
|
||||
const patientList = ref([]);
|
||||
const infusionList = ref([]);
|
||||
// const timeRightStart = ref([]);
|
||||
// const timeRightEnd = ref([]);
|
||||
const ids = ref([]);
|
||||
const timeRightStart = ref([]);
|
||||
const timeRightEnd = ref([]);
|
||||
|
||||
const groupColors = ref(new Map());
|
||||
const markers = ref([]);
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
@@ -145,32 +152,30 @@ const { queryParams } = toRefs(data);
|
||||
/** 查询门诊输液列表 */
|
||||
function getList() {
|
||||
listInfusionRecord(queryParams.value).then(response => {
|
||||
console.log('Full response1:', response);
|
||||
infusionList.value = response.data;
|
||||
// 为每个 groupId 分配随机颜色
|
||||
groupColors.value = assignRandomColorsToGroups(infusionList.value);
|
||||
// 统计每个 groupId 的行数
|
||||
const groupCounts = countGroupRows(infusionList.value);
|
||||
// 设置每行的标记
|
||||
markers.value = getRowMarkers(groupCounts, infusionList.value);
|
||||
});
|
||||
listPatients().then(response => {
|
||||
console.log('Full response2:', response);
|
||||
patientList.value = response.data.records;
|
||||
});
|
||||
listPatientInfusionPerformRecord().then(response => {
|
||||
console.log('Full response3:', response);
|
||||
historyRecordsList.value = response.data;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
if (dateRange.value) {
|
||||
queryParams.value.createTimeSTime = dateRange.value[0];
|
||||
queryParams.value.createTimeETime = dateRange.value[1];
|
||||
} else {
|
||||
queryParams.value.createTimeSTime = null;
|
||||
queryParams.value.createTimeETime = null;
|
||||
}
|
||||
console.log("111",queryParams.value)
|
||||
queryParams.value.pageNo = 1;
|
||||
listPatients(queryParams.value).then(response => {
|
||||
console.log('Full response2:', response);
|
||||
queryParams.value.createTimeSTime = dateRange.value[0];
|
||||
queryParams.value.createTimeETime = dateRange.value[1];
|
||||
} else {
|
||||
queryParams.value.createTimeSTime = null;
|
||||
queryParams.value.createTimeETime = null;
|
||||
}
|
||||
queryParams.value.pageNo = 1;
|
||||
listPatients(queryParams.value).then(response => {
|
||||
patientList.value = response.data.records;
|
||||
});
|
||||
}
|
||||
@@ -178,15 +183,12 @@ function handleQuery() {
|
||||
function handleQueryRight() {
|
||||
const createTimeSTime = dateRangeRight.value[0];
|
||||
const createTimeETime = dateRangeRight.value[1];
|
||||
// timeRightStart.value = createTimeSTime;
|
||||
// timeRightEnd.value = createTimeETime;
|
||||
console.log("111",createTimeSTime,createTimeETime)
|
||||
timeRightStart.value = createTimeSTime;
|
||||
timeRightEnd.value = createTimeETime;
|
||||
listInfusionRecord(createTimeSTime,createTimeETime).then(response => {
|
||||
console.log('Full response1:', response);
|
||||
infusionList.value = response.data;
|
||||
});
|
||||
listPatientInfusionPerformRecord(createTimeSTime,createTimeETime).then(response => {
|
||||
console.log('Full response3:', response);
|
||||
historyRecordsList.value = response.data;
|
||||
});
|
||||
}
|
||||
@@ -195,35 +197,129 @@ function resetQuery() {
|
||||
dateRange.value = [];
|
||||
proxy.resetForm("queryRef");
|
||||
getList();
|
||||
// listPatients().then(response => {
|
||||
// console.log('Full response2:', response);
|
||||
// patientList.value = response.data.records;
|
||||
// });
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
/** 右边重置按钮操作 */
|
||||
function resetQueryRight() {
|
||||
dateRangeRight.value = [];
|
||||
if(historyRecordsList.value.length>0){
|
||||
dateRangeRight.value = [];
|
||||
listInfusionRecord().then(response => {
|
||||
console.log('Full response1:', response);
|
||||
infusionList.value = response.data;
|
||||
});
|
||||
listPatientInfusionPerformRecord().then(response => {
|
||||
console.log('Full response3:', response);
|
||||
historyRecordsList.value = response.data;
|
||||
});
|
||||
}else{
|
||||
// 清空选中状态
|
||||
selectedItems.value.clear();
|
||||
selectedGroupIds.value.clear();
|
||||
dateRangeRight.value = [];
|
||||
// 取消表格所有行的选中状态
|
||||
infusionList.value.forEach(row => {
|
||||
tableRef.value.toggleRowSelection(row, false);
|
||||
});
|
||||
listPatientInfusionRecord(currentRow.value).then(response => {
|
||||
infusionList.value = response.data;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function getRandomColor() {
|
||||
const letters = 'CDEF';
|
||||
let color = '#';
|
||||
for (let i = 0; i < 6; i++) {
|
||||
color += letters[Math.floor(Math.random() * letters.length)];
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
function assignRandomColorsToGroups(data) {
|
||||
const colors = new Map();
|
||||
data.forEach((item) => {
|
||||
if (!colors.has(item.groupId)) {
|
||||
colors.set(item.groupId, getRandomColor());
|
||||
}
|
||||
});
|
||||
return colors;
|
||||
}
|
||||
|
||||
// 计算颜色的亮度
|
||||
function calculateBrightness(color) {
|
||||
const r = parseInt(color.slice(1, 3), 16);
|
||||
const g = parseInt(color.slice(3, 5), 16);
|
||||
const b = parseInt(color.slice(5, 7), 16);
|
||||
const brightness = 0.299 * r + 0.587 * g + 0.114 * b;
|
||||
return brightness;
|
||||
}
|
||||
|
||||
// 根据亮度设置字体颜色
|
||||
function getTextColor(color) {
|
||||
const brightness = calculateBrightness(color);
|
||||
return brightness < 128 ? '#FFFFFF' : '#000000';
|
||||
}
|
||||
|
||||
function getRowMarkers(groupCounts, data) {
|
||||
const markers = new Array(data.length).fill('');
|
||||
|
||||
groupCounts.forEach((groupInfo, groupId) => {
|
||||
const { count, indices } = groupInfo;
|
||||
if (count === 1) {
|
||||
// 如果只有一行,不显示标记
|
||||
return;
|
||||
} else if (count === 2) {
|
||||
// 如果有两行,分别显示左右括号
|
||||
markers[indices[0]] = '﹁';
|
||||
markers[indices[1]] = '﹂';
|
||||
} else {
|
||||
// 如果有两行以上,第一条显示左括号,中间用竖线,最后一条显示右括号
|
||||
markers[indices[0]] = '﹁';
|
||||
for (let i = 1; i < indices.length - 1; i++) {
|
||||
markers[indices[i]] = '|';
|
||||
}
|
||||
markers[indices[indices.length - 1]] = '﹂';
|
||||
}
|
||||
});
|
||||
|
||||
return markers;
|
||||
}
|
||||
|
||||
function countGroupRows(data) {
|
||||
const groupCounts = new Map();
|
||||
data.forEach((item, index) => {
|
||||
if (!groupCounts.has(item.groupId)) {
|
||||
groupCounts.set(item.groupId, { count: 0, indices: [] });
|
||||
}
|
||||
const groupInfo = groupCounts.get(item.groupId);
|
||||
groupInfo.count++;
|
||||
groupInfo.indices.push(index);
|
||||
});
|
||||
return groupCounts;
|
||||
}
|
||||
|
||||
// 执行输液
|
||||
function handleSubmit(){
|
||||
// 将 Set 转换为数组
|
||||
const itemsList = Array.from(selectedItems.value);
|
||||
|
||||
// 如果没有有效数据,直接返回
|
||||
if (itemsList.length === 0) {
|
||||
console.error("No valid items to process");
|
||||
proxy.$modal.msgError("没有有效的数据可供提交");
|
||||
return;
|
||||
}
|
||||
const allCompleted = itemsList.every(item => item.medicationStatusEnum_enumText === "已完成");
|
||||
|
||||
if (!allCompleted) {
|
||||
// 如果存在未完成的药品,提示用户
|
||||
proxy.$modal.msgError("存在未完成的药品,请检查后再提交");
|
||||
return;
|
||||
}
|
||||
const allExecuted = itemsList.every(item => item.executeNum === item.doneNum);
|
||||
|
||||
if (allExecuted) {
|
||||
// 如果所有药品的 executeNum 和 doneNum 都相等,提示用户
|
||||
proxy.$modal.msgError("已执行完总次数");
|
||||
return;
|
||||
}
|
||||
updateInfusionRecord(itemsList).then(response => {
|
||||
proxy.$modal.msgSuccess("执行成功");
|
||||
clearSelections();
|
||||
@@ -241,52 +337,55 @@ function handleSelectionChange(selection) {
|
||||
selection.forEach(item => {
|
||||
const groupId = item.groupId;
|
||||
const prescriptionNo = item.prescriptionNo;
|
||||
// 检查 groupId 和 prescriptionNo 是否同时存在
|
||||
if ( selectedGroupIds.value.has(groupId)) { //selectedPrescriptionNos.value.has(prescriptionNo) &&
|
||||
// 检查 groupId 是否同时存在
|
||||
if ( selectedGroupIds.value.has(groupId)) {
|
||||
// 如果都存在,则移除它们
|
||||
selectedGroupIds.value.delete(groupId);
|
||||
selectedPrescriptionNos.value.delete(prescriptionNo);
|
||||
} else {
|
||||
// 否则添加它们
|
||||
selectedGroupIds.value.add(groupId);
|
||||
selectedPrescriptionNos.value.add(prescriptionNo);
|
||||
}
|
||||
});
|
||||
// 动态更新表格行的选中状态
|
||||
infusionList.value.forEach(row => {
|
||||
// 检查当前行的 groupId 和 prescriptionNo 是否同时在 selectedGroupIds 和 selectedPrescriptionNos 中
|
||||
// 检查当前行的 groupId 是否同时在 selectedGroupIds 中
|
||||
const isSelected = selectedGroupIds.value.has(row.groupId);
|
||||
tableRef.value.toggleRowSelection(row, isSelected);
|
||||
});
|
||||
console.log('Current selectedGroupIds:', selectedGroupIds.value);
|
||||
console.log('Current selectedPrescriptionNos:', selectedPrescriptionNos.value);
|
||||
console.log('Current selectedItems:', selectedItems.value);
|
||||
}
|
||||
function clearSelections() {
|
||||
// 清空选中状态
|
||||
selectedItems.value.clear();
|
||||
selectedGroupIds.value.clear();
|
||||
selectedPrescriptionNos.value.clear();
|
||||
|
||||
// 取消表格所有行的选中状态
|
||||
infusionList.value.forEach(row => {
|
||||
tableRef.value.toggleRowSelection(row, false);
|
||||
});
|
||||
dateRangeRight.value = [];
|
||||
listPatientInfusionRecord(currentRow.value).then(response => {
|
||||
infusionList.value = response.data;
|
||||
});
|
||||
listPatientInfusionPerformRecord().then(response => {
|
||||
console.log('Full response3:', response);
|
||||
historyRecordsList.value = response.data;
|
||||
});
|
||||
}
|
||||
|
||||
// 检查 currentRow.value 是否存在
|
||||
if (!currentRow.value) {
|
||||
const createTimeSTime = timeRightStart.value || null;
|
||||
const createTimeETime = timeRightEnd.value || null;
|
||||
listInfusionRecord(createTimeSTime,createTimeETime).then(response => {
|
||||
infusionList.value = response.data;
|
||||
})
|
||||
}else{
|
||||
listPatientInfusionRecord(currentRow.value).then(response => {
|
||||
infusionList.value = response.data;
|
||||
});
|
||||
}
|
||||
|
||||
function rowClassName({ row }) {
|
||||
if (selectedGroupIds.value.has(row.groupId)) {
|
||||
return 'selected-row';
|
||||
}
|
||||
return '';
|
||||
listPatientInfusionPerformRecord().then(response => {
|
||||
historyRecordsList.value = response.data;
|
||||
});
|
||||
}
|
||||
// 动态设置行的内联样式
|
||||
function rowStyle({ row }) {
|
||||
const color = groupColors.value.get(row.groupId);
|
||||
const textColor = getTextColor(color);
|
||||
return { backgroundColor: color, color: textColor };
|
||||
}
|
||||
function handleUpdateTime(row){
|
||||
console.log("row",row)
|
||||
@@ -301,7 +400,6 @@ function handleCurrentChange(row) {
|
||||
currentRow.value = row; // 更新当前选中行的数据
|
||||
console.log("当前选中行的数据:", currentRow.value);
|
||||
listPatientInfusionRecord(currentRow.value).then(response => {
|
||||
console.log('Full response4:', response);
|
||||
infusionList.value = response.data;
|
||||
});
|
||||
}
|
||||
@@ -310,8 +408,8 @@ getList();
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.app-container-infusion {
|
||||
<style scoped>
|
||||
.app-container{
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
}
|
||||
@@ -322,8 +420,5 @@ getList();
|
||||
margin-left: 2%;
|
||||
width: 70%;
|
||||
}
|
||||
.selected-row {
|
||||
background-color: #effae8 !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -205,6 +205,8 @@
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
@row-click="handleRowClick"
|
||||
ref="tableRef"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
@@ -591,8 +593,6 @@ import {
|
||||
getPurchaseinventoryList,
|
||||
addPurchaseinventory,
|
||||
getInit,
|
||||
deptTreeSelect,
|
||||
locationTreeSelect,
|
||||
delPurchaseinventory,
|
||||
} from "./purchaseinventory";
|
||||
|
||||
@@ -748,8 +748,21 @@ const practitionerListOptions = ref(undefined); // 查询经手人列表
|
||||
const supplierListOptions = ref(undefined); // 供应商列表
|
||||
const selectedRows = ref([]); // 用于存储选中的行
|
||||
const emit = defineEmits(["new-item-added"]);
|
||||
const tableRef = ref(undefined); // 表格引用
|
||||
const currentRow = ref(undefined); // 当前操作的行
|
||||
|
||||
const addNewRow = () => {
|
||||
|
||||
// 挂载时绑定事件
|
||||
onMounted(() => {
|
||||
document.addEventListener('click', handleClickOutside);
|
||||
});
|
||||
|
||||
// 卸载时移除事件
|
||||
onUnmounted(() => {
|
||||
document.removeEventListener('click', handleClickOutside);
|
||||
});
|
||||
|
||||
function addNewRow() {
|
||||
if (data.isAdding) {
|
||||
proxy.$message.warning("请先保存当前行后再新增!");
|
||||
return;
|
||||
@@ -778,8 +791,9 @@ const addNewRow = () => {
|
||||
error: false, // 新增 error 字段
|
||||
};
|
||||
purchaseinventoryList.value.push(newRow);
|
||||
total.value = purchaseinventoryList.value.length;
|
||||
data.isAdding = true; // 设置标志位为 true,表示有未保存的
|
||||
};
|
||||
}
|
||||
|
||||
function handleBlur(row, index) {
|
||||
let hasError = false;
|
||||
@@ -832,7 +846,22 @@ function handleBlur(row, index) {
|
||||
// }
|
||||
}
|
||||
|
||||
const saveRow = (row, index) => {
|
||||
// 点击行时记录当前行
|
||||
function handleRowClick(row) {
|
||||
currentRow.value = row;
|
||||
}
|
||||
|
||||
// 监听表格外的点击事件
|
||||
function handleClickOutside(event) {
|
||||
if (tableRef.value && !tableRef.value.$el.contains(event.target)) {
|
||||
if (currentRow.value) {
|
||||
handleSave(currentRow.value);
|
||||
currentRow.value = null; // 清空当前行
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function saveRow(row, index) {
|
||||
console.log(row, "saveRowsaveRowsaveRowsaveRowsaveRowsaveRow");
|
||||
// 保存当前行的逻辑...
|
||||
// 例如:调用 API 保存数据
|
||||
@@ -865,15 +894,15 @@ const saveRow = (row, index) => {
|
||||
}
|
||||
|
||||
// proxy.$message.success("保存成功!");
|
||||
};
|
||||
}
|
||||
|
||||
function handleSave( row , index ) {
|
||||
function handleSave(row, index) {
|
||||
let hasError = false;
|
||||
// this.purchaseinventoryList.forEach((row) => {
|
||||
handleBlur(row);
|
||||
if (row.error) {
|
||||
hasError = true;
|
||||
}
|
||||
handleBlur(row);
|
||||
if (row.error) {
|
||||
hasError = true;
|
||||
}
|
||||
// });
|
||||
|
||||
if (hasError) {
|
||||
@@ -918,7 +947,7 @@ function handleSelectionChange(selection) {
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
const deleteSelectedRows = () => {
|
||||
function deleteSelectedRows() {
|
||||
if (selectedRows.value.length === 0) {
|
||||
alert("请先选择要删除的行");
|
||||
return;
|
||||
@@ -929,7 +958,7 @@ const deleteSelectedRows = () => {
|
||||
);
|
||||
|
||||
selectedRows.value = []; // 清空选中行
|
||||
};
|
||||
}
|
||||
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
@@ -994,6 +1023,7 @@ function edit() {
|
||||
receiptHeaderForm.value = props.item.length > 0 ? props.item[0] : {};
|
||||
// receiptHeaderForm.value.busNo = props.item.supplyBusNo;
|
||||
purchaseinventoryList.value = props.item;
|
||||
total.value = purchaseinventoryList.value.length;
|
||||
console.log(purchaseinventoryList.value, "purchaseinventoryList.value");
|
||||
console.log(receiptHeaderForm.value, "receiptHeaderForm.value");
|
||||
loading.value = false;
|
||||
|
||||
@@ -29,7 +29,7 @@ export function addPurchaseinventory(data) {
|
||||
}
|
||||
|
||||
|
||||
// 查询厂商类型
|
||||
// 查询采购入库单据初始化数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/init',
|
||||
@@ -37,30 +37,31 @@ export function getInit() {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询部门树形数据
|
||||
export function deptTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 查询地点树形数据
|
||||
export function locationTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/cabinet-location/cabinet-location',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 删除收费挂号项目
|
||||
// 删除单据
|
||||
export function delPurchaseinventory(param) {
|
||||
console.log(param,'aaaa')
|
||||
return request({
|
||||
url: '/basic-service/healthcare/healthcare-service',
|
||||
url: '/inventory-manage/purchase/inventory-receipt',
|
||||
method: 'delete',
|
||||
params: param
|
||||
})
|
||||
}
|
||||
|
||||
// 提交审批
|
||||
export function submitApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/submit-approval',
|
||||
method: 'put',
|
||||
data: { busNo }
|
||||
})
|
||||
}
|
||||
|
||||
// 撤回审批
|
||||
export function withdrawApproval(busNo) {
|
||||
return request({
|
||||
url: '/inventory-manage/purchase/withdraw-approval',
|
||||
method: 'put',
|
||||
data: { busNo }
|
||||
})
|
||||
}
|
||||
@@ -186,7 +186,7 @@
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="140"
|
||||
width="180"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
@@ -202,9 +202,19 @@
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleView(scope.row)"
|
||||
@click="handleSubmitApproval(scope.row)"
|
||||
v-hasPermi="['system:user:remove']"
|
||||
>查看</el-button
|
||||
v-if="scope.row.statusEnum == '1'"
|
||||
>提交审批</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleWithdrawApproval(scope.row)"
|
||||
v-hasPermi="['system:user:remove']"
|
||||
v-if="scope.row.statusEnum == '2'"
|
||||
>撤销审批</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -234,8 +244,8 @@ import {
|
||||
addPurchaseinventory,
|
||||
getpurchaseInventoryDetail,
|
||||
getInit,
|
||||
deptTreeSelect,
|
||||
locationTreeSelect,
|
||||
submitApproval,
|
||||
withdrawApproval,
|
||||
delPurchaseinventory,
|
||||
} from "./components/purchaseinventory";
|
||||
|
||||
@@ -244,21 +254,6 @@ import inventoryReceiptDialog from "./components/inventoryReceiptDialog";
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const purchaseinventoryRef = ref(null); // 初始化 ref
|
||||
const {
|
||||
adm_location,
|
||||
category_code,
|
||||
service_type_code,
|
||||
specialty_code,
|
||||
med_chrgitm_type,
|
||||
financial_type_code,
|
||||
} = proxy.useDict(
|
||||
"adm_location",
|
||||
"category_code",
|
||||
"service_type_code",
|
||||
"specialty_code",
|
||||
"med_chrgitm_type",
|
||||
"financial_type_code"
|
||||
);
|
||||
|
||||
const purchaseinventoryList = ref([]);
|
||||
const open = ref(false);
|
||||
@@ -269,10 +264,6 @@ const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const activeFlagOptions = ref(undefined);
|
||||
const appointmentRequiredFlagOptions = ref(undefined);
|
||||
const deptOptions = ref(undefined); // 部门树选项
|
||||
const locationOptions = ref(undefined); // 地点树选项
|
||||
const dateRange = ref([]);
|
||||
const busNoAdd = ref(""); // 单据号新增
|
||||
const itemTypeOptions = ref(undefined); // 入库项目类型
|
||||
@@ -312,25 +303,6 @@ function getPurchaseinventoryTypeList() {
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询部门下拉树结构 */
|
||||
function getDeptTree() {
|
||||
deptTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
|
||||
deptOptions.value = response.data.records;
|
||||
console.log(deptOptions.value, "部门下拉树结构");
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询地点下拉树结构 */
|
||||
function getLocationTree() {
|
||||
locationTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
locationOptions.value = response.data.records;
|
||||
console.log(locationOptions.value, "部门下拉树结构");
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询采购入库项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
@@ -348,8 +320,14 @@ function getList() {
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.S_TIME = dateRange.value[0] + " 00:00:00";
|
||||
queryParams.value.E_TIME = dateRange.value[1] + " 23:59:59";
|
||||
queryParams.value.occurrenceTimeSTime =
|
||||
dateRange.value && dateRange.value.length == 2
|
||||
? dateRange.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.occurrenceTimeETime =
|
||||
dateRange.value && dateRange.value.length == 2
|
||||
? dateRange.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
@@ -363,8 +341,6 @@ function handleClear() {
|
||||
|
||||
/** 选择条数 */
|
||||
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;
|
||||
@@ -372,43 +348,16 @@ function handleSelectionChange(selection) {
|
||||
|
||||
/** 打开新增弹窗 */
|
||||
function openAddInventoryReceiptDialog() {
|
||||
proxy.$refs["inventoryReceiptRef"].show();
|
||||
}
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
categoryCode: undefined,
|
||||
cwTypeCode: undefined,
|
||||
fwTypeCode: undefined,
|
||||
specialtyCode: undefined,
|
||||
locationId: undefined,
|
||||
offeredOrgId: undefined,
|
||||
activeFlag: undefined,
|
||||
extraDetails: undefined,
|
||||
contact: undefined,
|
||||
appointmentRequiredFlag: undefined,
|
||||
chargeName: undefined,
|
||||
price: undefined,
|
||||
description: undefined,
|
||||
ybType: undefined,
|
||||
title: undefined,
|
||||
comment: undefined,
|
||||
};
|
||||
proxy.resetForm("purchaseinventoryRef");
|
||||
}
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
getPurchaseinventoryTypeList();
|
||||
nextTick(() => {
|
||||
proxy.$refs["inventoryReceiptRef"].show();
|
||||
});
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
console.log(typeof(row.supplyBusNo), "row",row);
|
||||
console.log(typeof row.supplyBusNo, "row", row);
|
||||
getpurchaseInventoryDetail(row.supplyBusNo).then((response) => {
|
||||
|
||||
currentData.value = response.data;
|
||||
console.log(response, "response采购入库编辑按钮", currentData.value);
|
||||
nextTick(() => {
|
||||
@@ -417,70 +366,23 @@ function handleUpdate(row) {
|
||||
getList();
|
||||
});
|
||||
}
|
||||
// /** 提交按钮 */
|
||||
// function submitForm() {
|
||||
// // // 调用转换函数
|
||||
// // const transformedData = transformFormData(form);
|
||||
// // console.log(transformedData, "transformedData");
|
||||
// // addPurchaseinventory(transformedData).then((response) => {
|
||||
// // proxy.$modal.msgSuccess("新增成功");
|
||||
// // open.value = false;
|
||||
// getList();
|
||||
// // });
|
||||
// }
|
||||
|
||||
// 获取完整地址字符串
|
||||
function getName() {
|
||||
console.log(service_type_code.value, "service_type_code.value");
|
||||
// 服务类型
|
||||
const serviceTypeText = proxy.selectDictLabel(
|
||||
service_type_code.value,
|
||||
form.value.fwTypeCode
|
||||
);
|
||||
// 服务分类
|
||||
const categoryCodeText = proxy.selectDictLabel(
|
||||
category_code.value,
|
||||
form.value.categoryCode
|
||||
);
|
||||
// 服务专业
|
||||
const specialtyCodeText = proxy.selectDictLabel(
|
||||
specialty_code.value,
|
||||
form.value.specialtyCode
|
||||
);
|
||||
console.log(
|
||||
serviceTypeText,
|
||||
"serviceTypeText",
|
||||
categoryCodeText,
|
||||
specialtyCodeText
|
||||
);
|
||||
const nameParts = [
|
||||
serviceTypeText,
|
||||
form.value.addressCity,
|
||||
categoryCodeText,
|
||||
specialtyCodeText,
|
||||
];
|
||||
|
||||
// 使用 reduce 方法拼接地址,非空字段之间用 '-' 连接
|
||||
return nameParts.reduce((acc, part) => {
|
||||
if (part) {
|
||||
if (acc) {
|
||||
acc += " - "; // 在非空字段之间添加 '-'
|
||||
}
|
||||
acc += part;
|
||||
}
|
||||
return acc;
|
||||
}, "");
|
||||
/** 提交审核按钮 */
|
||||
function handleSubmitApproval(row) {
|
||||
submitApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess("提交审批成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
/** 撤回审批按钮 */
|
||||
function handleWithdrawApproval(row) {
|
||||
withdrawApproval(row.supplyBusNo).then((response) => {
|
||||
proxy.$modal.msgSuccess("撤销审批成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
// /** 详细按钮操作 */
|
||||
// function handleView(row) {
|
||||
// reset();
|
||||
// title.value = "查看";
|
||||
// open.value = true;
|
||||
// getPurchaseinventoryOne(row.id).then((response) => {
|
||||
// console.log(response, "responsebbbb", row.id);
|
||||
// form.value = response.data;
|
||||
// });
|
||||
// }
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
@@ -496,102 +398,8 @@ function handleDelete(row) {
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
// 转换insert参数函数
|
||||
const transformFormData = (form) => {
|
||||
const {
|
||||
id,
|
||||
name,
|
||||
categoryCode,
|
||||
// typeCode,
|
||||
cwTypeCode,
|
||||
fwTypeCode,
|
||||
specialtyCode,
|
||||
locationId,
|
||||
offeredOrgId,
|
||||
activeFlag,
|
||||
extraDetails,
|
||||
contact,
|
||||
appointmentRequiredFlag,
|
||||
chargeName,
|
||||
price,
|
||||
description,
|
||||
ybType,
|
||||
title,
|
||||
comment,
|
||||
} = form.value;
|
||||
|
||||
return {
|
||||
healthcareServiceFormData: {
|
||||
id,
|
||||
activeFlag,
|
||||
offeredOrgId,
|
||||
categoryCode,
|
||||
typeCode: fwTypeCode,
|
||||
specialtyCode,
|
||||
locationId,
|
||||
name,
|
||||
contact,
|
||||
appointmentRequiredFlag,
|
||||
extraDetails,
|
||||
comment,
|
||||
},
|
||||
chargeItemDefinitionFormData: {
|
||||
id,
|
||||
chargeName,
|
||||
title,
|
||||
orgId: offeredOrgId,
|
||||
description,
|
||||
typeCode: cwTypeCode,
|
||||
ybType,
|
||||
price,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
// 转换insert参数函数
|
||||
const transformFormEditData = (form) => {
|
||||
const {
|
||||
id,
|
||||
name,
|
||||
categoryCode,
|
||||
// typeCode,
|
||||
cwTypeCode,
|
||||
fwTypeCode,
|
||||
specialtyCode,
|
||||
locationId,
|
||||
offeredOrgId,
|
||||
activeFlag,
|
||||
extraDetails,
|
||||
contact,
|
||||
appointmentRequiredFlag,
|
||||
chargeName,
|
||||
price,
|
||||
description,
|
||||
ybType,
|
||||
title,
|
||||
comment,
|
||||
} = form.value;
|
||||
|
||||
return {
|
||||
healthcareServiceFormData: {
|
||||
id,
|
||||
activeFlag,
|
||||
offeredOrgId,
|
||||
categoryCode,
|
||||
typeCode: fwTypeCode,
|
||||
specialtyCode,
|
||||
locationId,
|
||||
name,
|
||||
contact,
|
||||
appointmentRequiredFlag,
|
||||
extraDetails,
|
||||
comment,
|
||||
},
|
||||
};
|
||||
};
|
||||
getPurchaseinventoryTypeList();
|
||||
getDeptTree();
|
||||
getLocationTree();
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
@@ -32,7 +32,7 @@ export default defineConfig (({mode, command}) => {
|
||||
// https://cn.vitejs.dev/config/#server-proxy
|
||||
'/dev-api': {
|
||||
target: 'http://localhost:18080/openhis',
|
||||
// target: 'http://192.168.31.221:18080/openhis',
|
||||
// target: 'http://192.168.31.221:18081/openhis',
|
||||
changeOrigin: true,
|
||||
rewrite: p => p.replace (/^\/dev-api/, ''),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user