diff --git a/jeecg-boot/db/mes-xsl-rubber-small-lock-log-menu-permission.sql b/jeecg-boot/db/mes-xsl-rubber-small-lock-log-menu-permission.sql new file mode 100644 index 0000000..58cb508 --- /dev/null +++ b/jeecg-boot/db/mes-xsl-rubber-small-lock-log-menu-permission.sql @@ -0,0 +1,85 @@ +-- MES 胶料小料锁定日志 + 锁定原因字段 reason_desc:可整文件一次执行 +-- 若已执行 V3.9.2_119 Flyway 可只跑本脚本补菜单/字段(幂等) +-- 权限前缀:mes:mes_xsl_rubber_small_lock_log:* +SET NAMES utf8mb4; + +SET @reason_desc_exists := ( + SELECT COUNT(1) + FROM information_schema.COLUMNS + WHERE TABLE_SCHEMA = DATABASE() + AND TABLE_NAME = 'mes_xsl_rubber_small_lock_reason' + AND COLUMN_NAME = 'reason_desc' +); +SET @ddl_reason_desc := IF( + @reason_desc_exists = 0, + 'ALTER TABLE `mes_xsl_rubber_small_lock_reason` ADD COLUMN `reason_desc` varchar(500) NOT NULL DEFAULT '''' COMMENT ''原因(手动输入,必填)'' AFTER `barcode_type`', + 'SELECT 1' +); +PREPARE stmt_reason_desc FROM @ddl_reason_desc; +EXECUTE stmt_reason_desc; +DEALLOCATE PREPARE stmt_reason_desc; + +UPDATE `mes_xsl_rubber_small_lock_reason` SET `reason_desc` = CONCAT('原因', `reason_code`) WHERE `reason_desc` = '' OR `reason_desc` IS NULL; + +CREATE TABLE IF NOT EXISTS `mes_xsl_rubber_small_lock_log` ( + `id` varchar(32) NOT NULL COMMENT '主键', + `lock_reason_id` varchar(32) NOT NULL COMMENT '锁定原因ID', + `barcode_type` varchar(16) NOT NULL COMMENT '条码类型', + `barcode` varchar(128) NOT NULL COMMENT '条码', + `lock_type` varchar(16) NOT NULL COMMENT '状态', + `reason_desc` varchar(500) NOT NULL COMMENT '原因', + `log_date` date NOT NULL COMMENT '日期', + `tenant_id` int DEFAULT NULL COMMENT '租户', + `sys_org_code` varchar(64) DEFAULT NULL COMMENT '部门', + `create_by` varchar(32) DEFAULT NULL COMMENT '创建人', + `create_time` datetime DEFAULT NULL COMMENT '创建时间', + `update_by` varchar(32) DEFAULT NULL COMMENT '修改人', + `update_time` datetime DEFAULT NULL COMMENT '修改时间', + `del_flag` int DEFAULT '0' COMMENT '删除标记(0正常1删除)', + PRIMARY KEY (`id`), + KEY `idx_mrsl_log_tenant_date` (`tenant_id`, `log_date`), + KEY `idx_mrsl_log_barcode` (`tenant_id`, `barcode_type`, `barcode`), + KEY `idx_mrsl_log_reason` (`lock_reason_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='MES胶料小料锁定日志'; + +SET @mes_tenant_id = 1002; + +SET @mes_quality_pid = IFNULL( + (SELECT `id` FROM `sys_permission` WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = '质量管理' LIMIT 1), + '1860000000000000162' +); + +INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`) +VALUES ('1860000000000000215', @mes_quality_pid, '胶料小料锁定日志', '/xslmes/mesXslRubberSmallLockLog', 'xslmes/mesXslRubberSmallLockLog/MesXslRubberSmallLockLogList', 'MesXslRubberSmallLockLogList', 1, NULL, '1', 7, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW()) +ON DUPLICATE KEY UPDATE +`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`), `component_name` = VALUES(`component_name`), +`sort_no` = VALUES(`sort_no`), `is_leaf` = 0, `status` = '1', `del_flag` = 0, `keep_alive` = VALUES(`keep_alive`); + +UPDATE `sys_permission` SET `icon` = 'ant-design:file-text-outlined' WHERE `id` = '1860000000000000215' AND `del_flag` = 0; + +INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `is_leaf`, `status`, `del_flag`, `create_by`, `create_time`) VALUES +('1860000000000000216', '1860000000000000215', '新增', 2, 'mes:mes_xsl_rubber_small_lock_log:add', '1', 1, '1', 0, 'admin', NOW()), +('1860000000000000217', '1860000000000000215', '编辑', 2, 'mes:mes_xsl_rubber_small_lock_log:edit', '1', 1, '1', 0, 'admin', NOW()), +('1860000000000000218', '1860000000000000215', '删除', 2, 'mes:mes_xsl_rubber_small_lock_log:delete', '1', 1, '1', 0, 'admin', NOW()), +('1860000000000000219', '1860000000000000215', '批量删除', 2, 'mes:mes_xsl_rubber_small_lock_log:deleteBatch', '1', 1, '1', 0, 'admin', NOW()), +('1860000000000000220', '1860000000000000215', '导出', 2, 'mes:mes_xsl_rubber_small_lock_log:exportXls', '1', 1, '1', 0, 'admin', NOW()), +('1860000000000000221', '1860000000000000215', '导入', 2, 'mes:mes_xsl_rubber_small_lock_log:importExcel', '1', 1, '1', 0, 'admin', NOW()) +ON DUPLICATE KEY UPDATE +`parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `menu_type` = VALUES(`menu_type`), `perms` = VALUES(`perms`), `perms_type` = VALUES(`perms_type`), +`is_leaf` = 1, `status` = '1', `del_flag` = 0; + +INSERT INTO `sys_role_permission`(`id`, `role_id`, `permission_id`, `operate_date`, `operate_ip`) +SELECT REPLACE(UUID(), '-', ''), r.`id`, p.`id`, NOW(), '127.0.0.1' +FROM `sys_role` r +CROSS JOIN `sys_permission` p +WHERE r.`tenant_id` = @mes_tenant_id + AND r.`role_code` = 'admin' + AND p.`id` IN ( + '1860000000000000215', + '1860000000000000216', '1860000000000000217', '1860000000000000218', '1860000000000000219', + '1860000000000000220', '1860000000000000221' + ) + AND NOT EXISTS ( + SELECT 1 FROM `sys_role_permission` rp + WHERE rp.`role_id` = r.`id` AND rp.`permission_id` = p.`id` + ); diff --git a/jeecg-boot/db/mes-xsl-rubber-small-lock-reason-menu-permission.sql b/jeecg-boot/db/mes-xsl-rubber-small-lock-reason-menu-permission.sql index 0517c94..de8526f 100644 --- a/jeecg-boot/db/mes-xsl-rubber-small-lock-reason-menu-permission.sql +++ b/jeecg-boot/db/mes-xsl-rubber-small-lock-reason-menu-permission.sql @@ -31,6 +31,7 @@ CREATE TABLE IF NOT EXISTS `mes_xsl_rubber_small_lock_reason` ( `reason_code` varchar(16) NOT NULL COMMENT '编号(租户内从001递增自动生成,只读)', `lock_type` varchar(16) NOT NULL COMMENT '类型(字典xslmes_rubber_small_lock_type:lock锁定unlock解锁)', `barcode_type` varchar(16) NOT NULL COMMENT '条码类型(字典xslmes_rubber_small_lock_barcode_type:small小料rubber胶料)', + `reason_desc` varchar(500) NOT NULL COMMENT '原因(手动输入,必填)', `tenant_id` int DEFAULT NULL COMMENT '租户', `sys_org_code` varchar(64) DEFAULT NULL COMMENT '部门', `create_by` varchar(32) DEFAULT NULL COMMENT '创建人', diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/doc/代码修改日志 b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/doc/代码修改日志 index a23be79..ca6fd1f 100644 --- a/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/doc/代码修改日志 +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/doc/代码修改日志 @@ -594,3 +594,22 @@ jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockReason/MesXslRubberSmallLoc jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockReason/MesXslRubberSmallLockReason.api.ts jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockReason/MesXslRubberSmallLockReasonList.vue jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockReason/components/MesXslRubberSmallLockReasonModal.vue + +-- author:jiangxh---date:20250602--for: 【MES】锁定原因增加原因字段、新增胶料小料锁定日志 --- +jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_119__mes_xsl_rubber_small_lock_reason_desc_and_log.sql +jeecg-boot/db/mes-xsl-rubber-small-lock-log-menu-permission.sql +jeecg-boot/db/mes-xsl-rubber-small-lock-reason-menu-permission.sql +jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslRubberSmallLockReason.java +jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslRubberSmallLockReasonServiceImpl.java +jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslRubberSmallLockReasonController.java +jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslRubberSmallLockLog.java +jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslRubberSmallLockLogMapper.java +jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslRubberSmallLockLogService.java +jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslRubberSmallLockLogServiceImpl.java +jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslRubberSmallLockLogController.java +jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockReason/MesXslRubberSmallLockReason.data.ts +jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockReason/MesXslRubberSmallLockReason.api.ts +jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockLog/MesXslRubberSmallLockLog.data.ts +jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockLog/MesXslRubberSmallLockLog.api.ts +jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockLog/MesXslRubberSmallLockLogList.vue +jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockLog/components/MesXslRubberSmallLockLogModal.vue diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslRubberSmallLockLogController.java b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslRubberSmallLockLogController.java new file mode 100644 index 0000000..e4cfb03 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslRubberSmallLockLogController.java @@ -0,0 +1,117 @@ +package org.jeecg.modules.xslmes.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import java.util.Arrays; +import lombok.extern.slf4j.Slf4j; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.common.exception.JeecgBootException; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.xslmes.entity.MesXslRubberSmallLockLog; +import org.jeecg.modules.xslmes.service.IMesXslRubberSmallLockLogService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +/** + * MES 胶料小料锁定日志 + */ +@Tag(name = "MES胶料小料锁定日志") +@RestController +@RequestMapping("/xslmes/mesXslRubberSmallLockLog") +@Slf4j +public class MesXslRubberSmallLockLogController + extends JeecgController { + + @Autowired + private IMesXslRubberSmallLockLogService mesXslRubberSmallLockLogService; + + @Operation(summary = "MES胶料小料锁定日志-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList( + MesXslRubberSmallLockLog model, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = + QueryGenerator.initQueryWrapper(model, req.getParameterMap()); + Page page = new Page<>(pageNo, pageSize); + IPage pageList = mesXslRubberSmallLockLogService.page(page, queryWrapper); + return Result.OK(pageList); + } + + @AutoLog(value = "MES胶料小料锁定日志-添加") + @Operation(summary = "MES胶料小料锁定日志-添加") + @RequiresPermissions("mes:mes_xsl_rubber_small_lock_log:add") + @PostMapping(value = "/add") + public Result add(@RequestBody MesXslRubberSmallLockLog model) { + try { + mesXslRubberSmallLockLogService.save(model); + } catch (JeecgBootException e) { + return Result.error(e.getMessage()); + } + return Result.OK("添加成功!"); + } + + @AutoLog(value = "MES胶料小料锁定日志-编辑") + @Operation(summary = "MES胶料小料锁定日志-编辑") + @RequiresPermissions("mes:mes_xsl_rubber_small_lock_log:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) + public Result edit(@RequestBody MesXslRubberSmallLockLog model) { + try { + mesXslRubberSmallLockLogService.updateById(model); + } catch (JeecgBootException e) { + return Result.error(e.getMessage()); + } + return Result.OK("编辑成功!"); + } + + @AutoLog(value = "MES胶料小料锁定日志-删除") + @Operation(summary = "MES胶料小料锁定日志-通过id删除") + @RequiresPermissions("mes:mes_xsl_rubber_small_lock_log:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name = "id", required = true) String id) { + mesXslRubberSmallLockLogService.removeById(id); + return Result.OK("删除成功!"); + } + + @AutoLog(value = "MES胶料小料锁定日志-批量删除") + @Operation(summary = "MES胶料小料锁定日志-批量删除") + @RequiresPermissions("mes:mes_xsl_rubber_small_lock_log:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name = "ids", required = true) String ids) { + mesXslRubberSmallLockLogService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + @Operation(summary = "MES胶料小料锁定日志-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name = "id", required = true) String id) { + MesXslRubberSmallLockLog entity = mesXslRubberSmallLockLogService.getById(id); + if (entity == null) { + return Result.error("未找到对应数据"); + } + return Result.OK(entity); + } + + @RequiresPermissions("mes:mes_xsl_rubber_small_lock_log:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, MesXslRubberSmallLockLog model) { + return super.exportXls(request, model, MesXslRubberSmallLockLog.class, "MES胶料小料锁定日志"); + } + + @RequiresPermissions("mes:mes_xsl_rubber_small_lock_log:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, MesXslRubberSmallLockLog.class); + } +} diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslRubberSmallLockReasonController.java b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslRubberSmallLockReasonController.java index ebb2034..26409a4 100644 --- a/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslRubberSmallLockReasonController.java +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/controller/MesXslRubberSmallLockReasonController.java @@ -1,5 +1,6 @@ package org.jeecg.modules.xslmes.controller; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -18,6 +19,7 @@ import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.exception.JeecgBootException; import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.constant.CommonConstant; import org.jeecg.common.util.oConvertUtils; import org.jeecg.modules.xslmes.entity.MesXslRubberSmallLockReason; import org.jeecg.modules.xslmes.service.IMesXslRubberSmallLockReasonService; @@ -68,6 +70,9 @@ public class MesXslRubberSmallLockReasonController if (oConvertUtils.isEmpty(model.getBarcodeType())) { return Result.error("条码类型不能为空"); } + if (oConvertUtils.isEmpty(model.getReasonDesc()) || model.getReasonDesc().trim().isEmpty()) { + return Result.error("原因不能为空"); + } model.setReasonCode(null); try { mesXslRubberSmallLockReasonService.save(model); @@ -93,12 +98,16 @@ public class MesXslRubberSmallLockReasonController if (oConvertUtils.isEmpty(model.getBarcodeType())) { return Result.error("条码类型不能为空"); } + if (oConvertUtils.isEmpty(model.getReasonDesc()) || model.getReasonDesc().trim().isEmpty()) { + return Result.error("原因不能为空"); + } MesXslRubberSmallLockReason old = mesXslRubberSmallLockReasonService.getById(model.getId()); if (old == null) { return Result.error("未找到对应数据"); } old.setLockType(model.getLockType()); old.setBarcodeType(model.getBarcodeType()); + old.setReasonDesc(model.getReasonDesc().trim()); try { mesXslRubberSmallLockReasonService.updateById(old); } catch (JeecgBootException e) { @@ -143,6 +152,26 @@ public class MesXslRubberSmallLockReasonController return Result.OK(mesXslRubberSmallLockReasonService.generateNextReasonCode(ctx)); } + @Operation(summary = "按条码类型查询锁定原因选项(日志表单联动)") + @GetMapping(value = "/optionsByBarcodeType") + public Result> optionsByBarcodeType( + @RequestParam(name = "barcodeType", required = true) String barcodeType) { + //update-begin---author:jiangxh ---date:20250602 for:【MES】锁定日志按条码类型加载原因选项----------- + if (oConvertUtils.isEmpty(barcodeType)) { + return Result.error("条码类型不能为空"); + } + LambdaQueryWrapper w = new LambdaQueryWrapper<>(); + w.eq(MesXslRubberSmallLockReason::getBarcodeType, barcodeType.trim()); + w.and( + q -> + q.eq(MesXslRubberSmallLockReason::getDelFlag, CommonConstant.DEL_FLAG_0) + .or() + .isNull(MesXslRubberSmallLockReason::getDelFlag)); + w.orderByAsc(MesXslRubberSmallLockReason::getReasonCode); + return Result.OK(mesXslRubberSmallLockReasonService.list(w)); + //update-end---author:jiangxh ---date:20250602 for:【MES】锁定日志按条码类型加载原因选项----------- + } + @RequiresPermissions("mes:mes_xsl_rubber_small_lock_reason:exportXls") @RequestMapping(value = "/exportXls") public ModelAndView exportXls(HttpServletRequest request, MesXslRubberSmallLockReason model) { @@ -179,6 +208,9 @@ public class MesXslRubberSmallLockReasonController if (oConvertUtils.isEmpty(row.getBarcodeType())) { return Result.error("文件导入失败:第 " + rowNo + " 条条码类型不能为空"); } + if (oConvertUtils.isEmpty(row.getReasonDesc()) || row.getReasonDesc().trim().isEmpty()) { + return Result.error("文件导入失败:第 " + rowNo + " 条原因不能为空"); + } if (oConvertUtils.isNotEmpty(row.getReasonCode())) { row.setReasonCode(row.getReasonCode().trim()); } else { diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslRubberSmallLockLog.java b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslRubberSmallLockLog.java new file mode 100644 index 0000000..2473f59 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslRubberSmallLockLog.java @@ -0,0 +1,79 @@ +package org.jeecg.modules.xslmes.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.Serializable; +import java.util.Date; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecg.common.aspect.annotation.Dict; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * MES 胶料小料锁定日志 + */ +@Data +@TableName("mes_xsl_rubber_small_lock_log") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@Schema(description = "MES胶料小料锁定日志") +public class MesXslRubberSmallLockLog implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(type = IdType.ASSIGN_ID) + private String id; + + @Schema(description = "锁定原因ID") + private String lockReasonId; + + @Excel(name = "类型", width = 12, dicCode = "xslmes_rubber_small_lock_barcode_type") + @Dict(dicCode = "xslmes_rubber_small_lock_barcode_type") + @Schema(description = "条码类型") + private String barcodeType; + + @Excel(name = "条码", width = 20) + @Schema(description = "条码") + private String barcode; + + @Excel(name = "状态", width = 12, dicCode = "xslmes_rubber_small_lock_type") + @Dict(dicCode = "xslmes_rubber_small_lock_type") + @Schema(description = "状态(来自锁定原因类型)") + private String lockType; + + @Excel(name = "原因", width = 40) + @Schema(description = "原因(来自锁定原因)") + private String reasonDesc; + + @Excel(name = "日期", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @Schema(description = "日期") + private Date logDate; + + private Integer tenantId; + private String sysOrgCode; + + @Excel(name = "创建人", width = 12) + private String createBy; + + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + + @Excel(name = "修改人", width = 12) + private String updateBy; + + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + + @TableLogic + private Integer delFlag; +} diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslRubberSmallLockReason.java b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslRubberSmallLockReason.java index 136f30f..d7af472 100644 --- a/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslRubberSmallLockReason.java +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/entity/MesXslRubberSmallLockReason.java @@ -44,6 +44,10 @@ public class MesXslRubberSmallLockReason implements Serializable { @Schema(description = "条码类型(字典:small小料 rubber胶料)") private String barcodeType; + @Excel(name = "原因", width = 40) + @Schema(description = "原因(手动输入,必填)") + private String reasonDesc; + private Integer tenantId; private String sysOrgCode; diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslRubberSmallLockLogMapper.java b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslRubberSmallLockLogMapper.java new file mode 100644 index 0000000..ee1e7b6 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/mapper/MesXslRubberSmallLockLogMapper.java @@ -0,0 +1,8 @@ +package org.jeecg.modules.xslmes.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.jeecg.modules.xslmes.entity.MesXslRubberSmallLockLog; + +@Mapper +public interface MesXslRubberSmallLockLogMapper extends BaseMapper {} diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslRubberSmallLockLogService.java b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslRubberSmallLockLogService.java new file mode 100644 index 0000000..041edbd --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/IMesXslRubberSmallLockLogService.java @@ -0,0 +1,6 @@ +package org.jeecg.modules.xslmes.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.xslmes.entity.MesXslRubberSmallLockLog; + +public interface IMesXslRubberSmallLockLogService extends IService {} diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslRubberSmallLockLogServiceImpl.java b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslRubberSmallLockLogServiceImpl.java new file mode 100644 index 0000000..925012e --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslRubberSmallLockLogServiceImpl.java @@ -0,0 +1,72 @@ +package org.jeecg.modules.xslmes.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.jeecg.common.exception.JeecgBootException; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.xslmes.entity.MesXslRubberSmallLockLog; +import org.jeecg.modules.xslmes.entity.MesXslRubberSmallLockReason; +import org.jeecg.modules.xslmes.mapper.MesXslRubberSmallLockLogMapper; +import org.jeecg.modules.xslmes.service.IMesXslRubberSmallLockLogService; +import org.jeecg.modules.xslmes.service.IMesXslRubberSmallLockReasonService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +@Service +public class MesXslRubberSmallLockLogServiceImpl + extends ServiceImpl + implements IMesXslRubberSmallLockLogService { + + @Autowired + private IMesXslRubberSmallLockReasonService mesXslRubberSmallLockReasonService; + + //update-begin---author:jiangxh ---date:20250602 for:【MES】胶料小料锁定日志保存时从原因主数据带出状态与原因----------- + @Override + @Transactional(rollbackFor = Exception.class) + public boolean save(MesXslRubberSmallLockLog entity) { + fillAndValidate(entity); + return super.save(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public boolean updateById(MesXslRubberSmallLockLog entity) { + if (oConvertUtils.isEmpty(entity.getId())) { + throw new JeecgBootException("缺少主键"); + } + fillAndValidate(entity); + return super.updateById(entity); + } + + private void fillAndValidate(MesXslRubberSmallLockLog entity) { + if (entity == null) { + throw new JeecgBootException("数据不能为空"); + } + if (oConvertUtils.isEmpty(entity.getBarcodeType())) { + throw new JeecgBootException("类型(条码类型)不能为空"); + } + if (oConvertUtils.isEmpty(entity.getBarcode()) || entity.getBarcode().trim().isEmpty()) { + throw new JeecgBootException("条码不能为空"); + } + entity.setBarcode(entity.getBarcode().trim()); + if (entity.getBarcode().length() > 128) { + throw new JeecgBootException("条码长度不能超过128个字符"); + } + if (oConvertUtils.isEmpty(entity.getLockReasonId())) { + throw new JeecgBootException("请选择锁定原因"); + } + if (entity.getLogDate() == null) { + throw new JeecgBootException("日期不能为空"); + } + MesXslRubberSmallLockReason reason = mesXslRubberSmallLockReasonService.getById(entity.getLockReasonId()); + if (reason == null) { + throw new JeecgBootException("锁定原因不存在或已删除"); + } + if (!entity.getBarcodeType().equals(reason.getBarcodeType())) { + throw new JeecgBootException("所选锁定原因与条码类型不一致"); + } + entity.setLockType(reason.getLockType()); + entity.setReasonDesc(reason.getReasonDesc()); + } + //update-end---author:jiangxh ---date:20250602 for:【MES】胶料小料锁定日志保存时从原因主数据带出状态与原因----------- +} diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslRubberSmallLockReasonServiceImpl.java b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslRubberSmallLockReasonServiceImpl.java index aab3b02..16738b1 100644 --- a/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslRubberSmallLockReasonServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-xslmes/src/main/java/org/jeecg/modules/xslmes/service/impl/MesXslRubberSmallLockReasonServiceImpl.java @@ -57,6 +57,14 @@ public class MesXslRubberSmallLockReasonServiceImpl if (oConvertUtils.isEmpty(entity.getBarcodeType())) { throw new JeecgBootException("条码类型不能为空"); } + if (oConvertUtils.isEmpty(entity.getReasonDesc()) || entity.getReasonDesc().trim().isEmpty()) { + throw new JeecgBootException("原因不能为空"); + } + String desc = entity.getReasonDesc().trim(); + if (desc.length() > 500) { + throw new JeecgBootException("原因长度不能超过500个字符"); + } + entity.setReasonDesc(desc); } //update-end---author:jiangxh ---date:20250602 for:【MES】胶料小料锁定原因编号001递增、类型与条码类型必填----------- } diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_119__mes_xsl_rubber_small_lock_reason_desc_and_log.sql b/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_119__mes_xsl_rubber_small_lock_reason_desc_and_log.sql new file mode 100644 index 0000000..f895731 --- /dev/null +++ b/jeecg-boot/jeecg-module-system/jeecg-system-start/src/main/resources/flyway/sql/mysql/V3.9.2_119__mes_xsl_rubber_small_lock_reason_desc_and_log.sql @@ -0,0 +1,82 @@ +-- MES 胶料小料锁定原因增加原因字段 + 胶料小料锁定日志(质量管理菜单) +-- 权限前缀:mes:mes_xsl_rubber_small_lock_log:* +SET NAMES utf8mb4; + +SET @reason_desc_exists := ( + SELECT COUNT(1) + FROM information_schema.COLUMNS + WHERE TABLE_SCHEMA = DATABASE() + AND TABLE_NAME = 'mes_xsl_rubber_small_lock_reason' + AND COLUMN_NAME = 'reason_desc' +); +SET @ddl_reason_desc := IF( + @reason_desc_exists = 0, + 'ALTER TABLE `mes_xsl_rubber_small_lock_reason` ADD COLUMN `reason_desc` varchar(500) NOT NULL DEFAULT '''' COMMENT ''原因(手动输入,必填)'' AFTER `barcode_type`', + 'SELECT 1' +); +PREPARE stmt_reason_desc FROM @ddl_reason_desc; +EXECUTE stmt_reason_desc; +DEALLOCATE PREPARE stmt_reason_desc; + +UPDATE `mes_xsl_rubber_small_lock_reason` SET `reason_desc` = CONCAT('原因', `reason_code`) WHERE `reason_desc` = '' OR `reason_desc` IS NULL; + +CREATE TABLE IF NOT EXISTS `mes_xsl_rubber_small_lock_log` ( + `id` varchar(32) NOT NULL COMMENT '主键', + `lock_reason_id` varchar(32) NOT NULL COMMENT '锁定原因ID mes_xsl_rubber_small_lock_reason.id', + `barcode_type` varchar(16) NOT NULL COMMENT '条码类型(字典xslmes_rubber_small_lock_barcode_type)', + `barcode` varchar(128) NOT NULL COMMENT '条码', + `lock_type` varchar(16) NOT NULL COMMENT '状态(字典xslmes_rubber_small_lock_type,来自锁定原因)', + `reason_desc` varchar(500) NOT NULL COMMENT '原因(来自锁定原因冗余)', + `log_date` date NOT NULL COMMENT '日期', + `tenant_id` int DEFAULT NULL COMMENT '租户', + `sys_org_code` varchar(64) DEFAULT NULL COMMENT '部门', + `create_by` varchar(32) DEFAULT NULL COMMENT '创建人', + `create_time` datetime DEFAULT NULL COMMENT '创建时间', + `update_by` varchar(32) DEFAULT NULL COMMENT '修改人', + `update_time` datetime DEFAULT NULL COMMENT '修改时间', + `del_flag` int DEFAULT '0' COMMENT '删除标记(0正常1删除)', + PRIMARY KEY (`id`), + KEY `idx_mrsl_log_tenant_date` (`tenant_id`, `log_date`), + KEY `idx_mrsl_log_barcode` (`tenant_id`, `barcode_type`, `barcode`), + KEY `idx_mrsl_log_reason` (`lock_reason_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='MES胶料小料锁定日志'; + +SET @mes_tenant_id = 1002; + +SET @mes_quality_pid = IFNULL( + (SELECT `id` FROM `sys_permission` WHERE `del_flag` = 0 AND `menu_type` = 0 AND `name` = '质量管理' LIMIT 1), + '1860000000000000162' +); + +INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `menu_type`, `perms`, `perms_type`, `sort_no`, `is_route`, `is_leaf`, `hidden`, `status`, `del_flag`, `keep_alive`, `internal_or_external`, `create_by`, `create_time`) +VALUES ('1860000000000000215', @mes_quality_pid, '胶料小料锁定日志', '/xslmes/mesXslRubberSmallLockLog', 'xslmes/mesXslRubberSmallLockLog/MesXslRubberSmallLockLogList', 'MesXslRubberSmallLockLogList', 1, NULL, '1', 7, 1, 0, 0, '1', 0, 1, 0, 'admin', NOW()) +ON DUPLICATE KEY UPDATE + `parent_id` = VALUES(`parent_id`), `name` = VALUES(`name`), `url` = VALUES(`url`), `component` = VALUES(`component`), + `component_name` = VALUES(`component_name`), `sort_no` = VALUES(`sort_no`), `is_leaf` = 0, `keep_alive` = VALUES(`keep_alive`); + +UPDATE `sys_permission` SET `icon` = 'ant-design:file-text-outlined' WHERE `id` = '1860000000000000215' AND `del_flag` = 0; + +INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `menu_type`, `perms`, `perms_type`, `status`, `del_flag`, `create_by`, `create_time`) VALUES +('1860000000000000216', '1860000000000000215', '新增', 2, 'mes:mes_xsl_rubber_small_lock_log:add', '1', '1', 0, 'admin', NOW()), +('1860000000000000217', '1860000000000000215', '编辑', 2, 'mes:mes_xsl_rubber_small_lock_log:edit', '1', '1', 0, 'admin', NOW()), +('1860000000000000218', '1860000000000000215', '删除', 2, 'mes:mes_xsl_rubber_small_lock_log:delete', '1', '1', 0, 'admin', NOW()), +('1860000000000000219', '1860000000000000215', '批量删除', 2, 'mes:mes_xsl_rubber_small_lock_log:deleteBatch', '1', '1', 0, 'admin', NOW()), +('1860000000000000220', '1860000000000000215', '导出', 2, 'mes:mes_xsl_rubber_small_lock_log:exportXls', '1', '1', 0, 'admin', NOW()), +('1860000000000000221', '1860000000000000215', '导入', 2, 'mes:mes_xsl_rubber_small_lock_log:importExcel', '1', '1', 0, 'admin', NOW()) +ON DUPLICATE KEY UPDATE `perms` = VALUES(`perms`), `name` = VALUES(`name`); + +INSERT INTO `sys_role_permission`(`id`, `role_id`, `permission_id`, `operate_date`, `operate_ip`) +SELECT REPLACE(UUID(), '-', ''), r.id, p.id, NOW(), '127.0.0.1' +FROM sys_role r +CROSS JOIN sys_permission p +WHERE r.tenant_id = @mes_tenant_id + AND r.role_code = 'admin' + AND p.id IN ( + '1860000000000000215', + '1860000000000000216', '1860000000000000217', '1860000000000000218', '1860000000000000219', + '1860000000000000220', '1860000000000000221' + ) + AND NOT EXISTS ( + SELECT 1 FROM sys_role_permission rp + WHERE rp.role_id = r.id AND rp.permission_id = p.id + ); diff --git a/jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockLog/MesXslRubberSmallLockLog.api.ts b/jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockLog/MesXslRubberSmallLockLog.api.ts new file mode 100644 index 0000000..34fae54 --- /dev/null +++ b/jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockLog/MesXslRubberSmallLockLog.api.ts @@ -0,0 +1,48 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from '/@/hooks/web/useMessage'; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/xslmes/mesXslRubberSmallLockLog/list', + save = '/xslmes/mesXslRubberSmallLockLog/add', + edit = '/xslmes/mesXslRubberSmallLockLog/edit', + deleteOne = '/xslmes/mesXslRubberSmallLockLog/delete', + deleteBatch = '/xslmes/mesXslRubberSmallLockLog/deleteBatch', + importExcel = '/xslmes/mesXslRubberSmallLockLog/importExcel', + exportXls = '/xslmes/mesXslRubberSmallLockLog/exportXls', + queryById = '/xslmes/mesXslRubberSmallLockLog/queryById', +} + +export const getExportUrl = Api.exportXls; +export const getImportUrl = Api.importExcel; + +export const list = (params) => defHttp.get({ url: Api.list, params }); + +export const queryById = (params: { id: string }) => defHttp.get({ url: Api.queryById, params }); + +export const deleteOne = (params, handleSuccess) => { + return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); +}; + +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => { + handleSuccess(); + }); + }, + }); +}; + +export const saveOrUpdate = (params, isUpdate) => { + const url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url, params }); +}; diff --git a/jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockLog/MesXslRubberSmallLockLog.data.ts b/jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockLog/MesXslRubberSmallLockLog.data.ts new file mode 100644 index 0000000..7214c0e --- /dev/null +++ b/jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockLog/MesXslRubberSmallLockLog.data.ts @@ -0,0 +1,110 @@ +import { BasicColumn, FormSchema } from '/@/components/Table'; +import dayjs from 'dayjs'; + +export const columns: BasicColumn[] = [ + { title: '类型', align: 'center', dataIndex: 'barcodeType_dictText', width: 90 }, + { title: '条码', align: 'center', dataIndex: 'barcode', width: 140 }, + { title: '状态', align: 'center', dataIndex: 'lockType_dictText', width: 90 }, + { title: '原因', align: 'center', dataIndex: 'reasonDesc', width: 200, ellipsis: true }, + { title: '日期', align: 'center', dataIndex: 'logDate', width: 110 }, + { title: '创建人', align: 'center', dataIndex: 'createBy', width: 100 }, + { title: '修改人', align: 'center', dataIndex: 'updateBy', width: 100 }, + { + title: '修改日期', + align: 'center', + dataIndex: 'updateTime', + width: 165, + customRender: ({ text }) => (!text ? '' : String(text).length > 19 ? String(text).substring(0, 19) : text), + }, +]; + +export const searchFormSchema: FormSchema[] = [ + { + label: '类型', + field: 'barcodeType', + component: 'JDictSelectTag', + componentProps: { dictCode: 'xslmes_rubber_small_lock_barcode_type', placeholder: '请选择类型' }, + colProps: { span: 6 }, + }, + { label: '条码', field: 'barcode', component: 'Input', colProps: { span: 6 } }, + { + label: '状态', + field: 'lockType', + component: 'JDictSelectTag', + componentProps: { dictCode: 'xslmes_rubber_small_lock_type', placeholder: '请选择状态' }, + colProps: { span: 6 }, + }, + { + label: '日期', + field: 'logDate', + component: 'DatePicker', + componentProps: { valueFormat: 'YYYY-MM-DD', style: { width: '100%' } }, + colProps: { span: 6 }, + }, +]; + +export const formSchema: FormSchema[] = [ + { label: '', field: 'id', component: 'Input', show: false }, + { + label: '类型', + field: 'barcodeType', + component: 'JDictSelectTag', + required: true, + componentProps: { dictCode: 'xslmes_rubber_small_lock_barcode_type', placeholder: '请选择条码类型' }, + }, + { + label: '条码', + field: 'barcode', + component: 'Input', + required: true, + componentProps: { placeholder: '请输入条码', maxlength: 128 }, + }, + { + label: '锁定原因', + field: 'lockReasonId', + component: 'Input', + required: true, + slot: 'lockReasonSelect', + }, + { + label: '状态', + field: 'lockType', + component: 'JDictSelectTag', + componentProps: { dictCode: 'xslmes_rubber_small_lock_type', disabled: true, placeholder: '选择锁定原因后自动带出' }, + }, + { + label: '原因', + field: 'reasonDesc', + component: 'InputTextArea', + componentProps: { rows: 2, readonly: true, placeholder: '选择锁定原因后自动带出' }, + }, + { + label: '日期', + field: 'logDate', + component: 'DatePicker', + required: true, + defaultValue: dayjs().format('YYYY-MM-DD'), + componentProps: { valueFormat: 'YYYY-MM-DD', style: { width: '100%' } }, + }, + { + label: '创建人', + field: 'createBy', + component: 'Input', + componentProps: { readonly: true }, + ifShow: ({ values }) => !!values?.id, + }, + { + label: '修改人', + field: 'updateBy', + component: 'Input', + componentProps: { readonly: true }, + ifShow: ({ values }) => !!values?.id, + }, + { + label: '修改日期', + field: 'updateTime', + component: 'Input', + componentProps: { readonly: true }, + ifShow: ({ values }) => !!values?.id, + }, +]; diff --git a/jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockLog/MesXslRubberSmallLockLogList.vue b/jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockLog/MesXslRubberSmallLockLogList.vue new file mode 100644 index 0000000..b4420a2 --- /dev/null +++ b/jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockLog/MesXslRubberSmallLockLogList.vue @@ -0,0 +1,136 @@ + + + diff --git a/jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockLog/components/MesXslRubberSmallLockLogModal.vue b/jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockLog/components/MesXslRubberSmallLockLogModal.vue new file mode 100644 index 0000000..3315a6d --- /dev/null +++ b/jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockLog/components/MesXslRubberSmallLockLogModal.vue @@ -0,0 +1,121 @@ + + + diff --git a/jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockReason/MesXslRubberSmallLockReason.api.ts b/jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockReason/MesXslRubberSmallLockReason.api.ts index d4ebd58..4426045 100644 --- a/jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockReason/MesXslRubberSmallLockReason.api.ts +++ b/jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockReason/MesXslRubberSmallLockReason.api.ts @@ -13,6 +13,7 @@ enum Api { importExcel = '/xslmes/mesXslRubberSmallLockReason/importExcel', exportXls = '/xslmes/mesXslRubberSmallLockReason/exportXls', queryById = '/xslmes/mesXslRubberSmallLockReason/queryById', + optionsByBarcodeType = '/xslmes/mesXslRubberSmallLockReason/optionsByBarcodeType', } export const getExportUrl = Api.exportXls; @@ -24,6 +25,9 @@ export const queryById = (params: { id: string }) => defHttp.get({ url: Api.quer export const fetchNextReasonCode = () => defHttp.get({ url: Api.nextReasonCode }, { successMessageMode: 'none' }); +export const optionsByBarcodeType = (params: { barcodeType: string }) => + defHttp.get({ url: Api.optionsByBarcodeType, params }, { successMessageMode: 'none' }); + export const deleteOne = (params, handleSuccess) => { return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => { handleSuccess(); diff --git a/jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockReason/MesXslRubberSmallLockReason.data.ts b/jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockReason/MesXslRubberSmallLockReason.data.ts index 0f53f81..b720c81 100644 --- a/jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockReason/MesXslRubberSmallLockReason.data.ts +++ b/jeecgboot-vue3/src/views/xslmes/mesXslRubberSmallLockReason/MesXslRubberSmallLockReason.data.ts @@ -4,6 +4,7 @@ export const columns: BasicColumn[] = [ { title: '编号', align: 'center', dataIndex: 'reasonCode', width: 100 }, { title: '类型', align: 'center', dataIndex: 'lockType_dictText', width: 100 }, { title: '条码类型', align: 'center', dataIndex: 'barcodeType_dictText', width: 100 }, + { title: '原因', align: 'center', dataIndex: 'reasonDesc', width: 220, ellipsis: true }, { title: '创建人', align: 'center', dataIndex: 'createBy', width: 100 }, { title: '创建日期', @@ -16,6 +17,7 @@ export const columns: BasicColumn[] = [ export const searchFormSchema: FormSchema[] = [ { label: '编号', field: 'reasonCode', component: 'Input', colProps: { span: 6 } }, + { label: '原因', field: 'reasonDesc', component: 'Input', colProps: { span: 6 } }, { label: '类型', field: 'lockType', @@ -54,6 +56,14 @@ export const formSchema: FormSchema[] = [ required: true, componentProps: { dictCode: 'xslmes_rubber_small_lock_barcode_type', placeholder: '请选择条码类型' }, }, + { + label: '原因', + field: 'reasonDesc', + component: 'InputTextArea', + required: true, + colProps: { span: 24 }, + componentProps: { rows: 3, maxlength: 500, showCount: true, placeholder: '请输入原因' }, + }, { label: '创建人', field: 'createBy',