缺少上传文件组件的完整代码,期待获取,完成签到页的全面优化
This commit is contained in:
@@ -5,6 +5,7 @@ import java.util.Date;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.oa.domain.LaborCostData;
|
import com.ruoyi.oa.domain.LaborCostData;
|
||||||
import com.ruoyi.oa.domain.vo.SysUserVo;
|
import com.ruoyi.oa.domain.vo.SysUserVo;
|
||||||
@@ -82,9 +83,9 @@ public class SysOaAttendanceController extends BaseController {
|
|||||||
* 查询人员考勤列表
|
* 查询人员考勤列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/worker/list")
|
@GetMapping("/worker/list")
|
||||||
public R<List<SysUserVo>> workerList(SysOaAttendanceBo bo) {
|
public TableDataInfo<SysUserVo> workerList(SysOaAttendanceBo bo, PageQuery pageQuery) {
|
||||||
|
|
||||||
return R.ok(iSysOaAttendanceService.workerList(bo));
|
return iSysOaAttendanceService.workerList(bo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -144,7 +145,7 @@ public class SysOaAttendanceController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 删除人员考勤
|
* 删除人员考勤
|
||||||
*
|
*
|
||||||
* @param ids 主键串
|
* @param day 主键串
|
||||||
*/
|
*/
|
||||||
@Log(title = "人员考勤", businessType = BusinessType.DELETE)
|
@Log(title = "人员考勤", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/all/{day}")
|
@DeleteMapping("/all/{day}")
|
||||||
|
|||||||
@@ -0,0 +1,108 @@
|
|||||||
|
package com.ruoyi.oa.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.validate.AddGroup;
|
||||||
|
import com.ruoyi.common.core.validate.EditGroup;
|
||||||
|
import com.ruoyi.common.core.validate.QueryGroup;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.oa.domain.vo.SysOaFileVo;
|
||||||
|
import com.ruoyi.oa.domain.bo.SysOaFileBo;
|
||||||
|
import com.ruoyi.oa.service.ISysOaFileService;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件存储
|
||||||
|
*
|
||||||
|
* @author hdka
|
||||||
|
* @date 2024-12-15
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/oaFile")
|
||||||
|
public class SysOaFileController extends BaseController {
|
||||||
|
|
||||||
|
private final ISysOaFileService iSysOaFileService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询文件存储列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:oaFile:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<SysOaFileVo> list(SysOaFileBo bo, PageQuery pageQuery) {
|
||||||
|
return iSysOaFileService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出文件存储列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:oaFile:export")
|
||||||
|
@Log(title = "文件存储", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(SysOaFileBo bo, HttpServletResponse response) {
|
||||||
|
List<SysOaFileVo> list = iSysOaFileService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "文件存储", SysOaFileVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取文件存储详细信息
|
||||||
|
*
|
||||||
|
* @param fileId 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:oaFile:query")
|
||||||
|
@GetMapping("/{fileId}")
|
||||||
|
public R<SysOaFileVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable Long fileId) {
|
||||||
|
return R.ok(iSysOaFileService.queryById(fileId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增文件存储
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:oaFile:add")
|
||||||
|
@Log(title = "文件存储", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody SysOaFileBo bo) {
|
||||||
|
return toAjax(iSysOaFileService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改文件存储
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:oaFile:edit")
|
||||||
|
@Log(title = "文件存储", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody SysOaFileBo bo) {
|
||||||
|
return toAjax(iSysOaFileService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除文件存储
|
||||||
|
*
|
||||||
|
* @param fileIds 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("system:oaFile:remove")
|
||||||
|
@Log(title = "文件存储", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{fileIds}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] fileIds) {
|
||||||
|
return toAjax(iSysOaFileService.deleteWithValidByIds(Arrays.asList(fileIds), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
48
ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SysOaFile.java
Normal file
48
ruoyi-oa/src/main/java/com/ruoyi/oa/domain/SysOaFile.java
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
package com.ruoyi.oa.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件存储对象 sys_oa_file
|
||||||
|
*
|
||||||
|
* @author hdka
|
||||||
|
* @date 2024-12-15
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("sys_oa_file")
|
||||||
|
public class SysOaFile extends BaseEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@TableId(value = "file_id")
|
||||||
|
private Long fileId;
|
||||||
|
/**
|
||||||
|
* 文件存储路径
|
||||||
|
*/
|
||||||
|
private String fileUrl;
|
||||||
|
/**
|
||||||
|
* 文件类型0打卡1出入库
|
||||||
|
*/
|
||||||
|
private Long status;
|
||||||
|
/**
|
||||||
|
* 删除标志
|
||||||
|
*/
|
||||||
|
@TableLogic
|
||||||
|
private Long delFlag;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -35,6 +35,13 @@ public class SysOaWarehouse extends BaseEntity {
|
|||||||
* 型号
|
* 型号
|
||||||
*/
|
*/
|
||||||
private String model;
|
private String model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单价
|
||||||
|
*/
|
||||||
|
private Double price;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单位
|
* 单位
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.oa.domain.bo;
|
package com.ruoyi.oa.domain.bo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.ruoyi.common.core.validate.AddGroup;
|
import com.ruoyi.common.core.validate.AddGroup;
|
||||||
import com.ruoyi.common.core.validate.EditGroup;
|
import com.ruoyi.common.core.validate.EditGroup;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -7,6 +8,9 @@ import lombok.EqualsAndHashCode;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 人员考勤业务对象 sys_oa_attendance
|
* 人员考勤业务对象 sys_oa_attendance
|
||||||
@@ -56,5 +60,12 @@ public class SysOaAttendanceBo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询月份
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date selectTime;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.ruoyi.oa.domain.bo;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.validate.AddGroup;
|
||||||
|
import com.ruoyi.common.core.validate.EditGroup;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件存储业务对象 sys_oa_file
|
||||||
|
*
|
||||||
|
* @author hdka
|
||||||
|
* @date 2024-12-15
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class SysOaFileBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键id不能为空", groups = { EditGroup.class })
|
||||||
|
private Long fileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件存储路径
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "文件存储路径不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件类型0打卡1出入库
|
||||||
|
*/
|
||||||
|
@NotNull(message = "文件类型0打卡1出入库不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -40,6 +40,11 @@ public class SysOaWarehouseBo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String model;
|
private String model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单价
|
||||||
|
*/
|
||||||
|
private Double price;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单位
|
* 单位
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package com.ruoyi.oa.domain.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||||
|
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件存储视图对象 sys_oa_file
|
||||||
|
*
|
||||||
|
* @author hdka
|
||||||
|
* @date 2024-12-15
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class SysOaFileVo {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "主键id")
|
||||||
|
private Long fileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件存储路径
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "文件存储路径")
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件类型0打卡1出入库
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "文件类型0打卡1出入库", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(dictType = "file_status")
|
||||||
|
private Long status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -47,6 +47,12 @@ public class SysOaWarehouseVo extends SysOaWarehouse {
|
|||||||
@ExcelProperty(value = "型号")
|
@ExcelProperty(value = "型号")
|
||||||
private String model;
|
private String model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单价
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "单价")
|
||||||
|
private Double price;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 库存数量
|
* 库存数量
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.ruoyi.oa.mapper;
|
|||||||
import com.ruoyi.oa.domain.SysOaAttendance;
|
import com.ruoyi.oa.domain.SysOaAttendance;
|
||||||
import com.ruoyi.oa.domain.vo.SysOaAttendanceVo;
|
import com.ruoyi.oa.domain.vo.SysOaAttendanceVo;
|
||||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||||
|
import com.ruoyi.oa.domain.vo.SysUserVo;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -19,4 +20,6 @@ public interface SysOaAttendanceMapper extends BaseMapperPlus<SysOaAttendanceMap
|
|||||||
List<SysOaAttendanceVo> selectVoListAndTime(@Param("userId") Long userId, @Param("firstDay") Date firstDay, @Param("lastDay") Date lastDay);
|
List<SysOaAttendanceVo> selectVoListAndTime(@Param("userId") Long userId, @Param("firstDay") Date firstDay, @Param("lastDay") Date lastDay);
|
||||||
|
|
||||||
int delOaAttendanceAll(@Param("firstDay") Date firstDay, @Param("lastDay")Date lastDay,@Param("day")Long day);
|
int delOaAttendanceAll(@Param("firstDay") Date firstDay, @Param("lastDay")Date lastDay,@Param("day")Long day);
|
||||||
|
|
||||||
|
List<SysUserVo> selectUserListAndAttendanceListAndProjectListByUserIds(@Param("userIds") List<Long> userIds, @Param("firstDay") Date firstDay,@Param("lastDay") Date lastDay);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.ruoyi.oa.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.oa.domain.SysOaFile;
|
||||||
|
import com.ruoyi.oa.domain.vo.SysOaFileVo;
|
||||||
|
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件存储Mapper接口
|
||||||
|
*
|
||||||
|
* @author hdka
|
||||||
|
* @date 2024-12-15
|
||||||
|
*/
|
||||||
|
public interface SysOaFileMapper extends BaseMapperPlus<SysOaFileMapper, SysOaFile, SysOaFileVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -51,10 +51,11 @@ public interface ISysOaAttendanceService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 工人列表
|
* 工人列表
|
||||||
|
*
|
||||||
* @param bo
|
* @param bo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<SysUserVo> workerList(SysOaAttendanceBo bo);
|
TableDataInfo<SysUserVo> workerList(SysOaAttendanceBo bo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量插入
|
* 批量插入
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.ruoyi.oa.service;
|
||||||
|
|
||||||
|
import com.ruoyi.oa.domain.SysOaFile;
|
||||||
|
import com.ruoyi.oa.domain.vo.SysOaFileVo;
|
||||||
|
import com.ruoyi.oa.domain.bo.SysOaFileBo;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件存储Service接口
|
||||||
|
*
|
||||||
|
* @author hdka
|
||||||
|
* @date 2024-12-15
|
||||||
|
*/
|
||||||
|
public interface ISysOaFileService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询文件存储
|
||||||
|
*/
|
||||||
|
SysOaFileVo queryById(Long fileId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询文件存储列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<SysOaFileVo> queryPageList(SysOaFileBo bo, PageQuery pageQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询文件存储列表
|
||||||
|
*/
|
||||||
|
List<SysOaFileVo> queryList(SysOaFileBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增文件存储
|
||||||
|
*/
|
||||||
|
Boolean insertByBo(SysOaFileBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改文件存储
|
||||||
|
*/
|
||||||
|
Boolean updateByBo(SysOaFileBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并批量删除文件存储信息
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
@@ -23,7 +23,6 @@ import com.ruoyi.oa.domain.SysOaAttendance;
|
|||||||
import com.ruoyi.oa.mapper.SysOaAttendanceMapper;
|
import com.ruoyi.oa.mapper.SysOaAttendanceMapper;
|
||||||
import com.ruoyi.oa.service.ISysOaAttendanceService;
|
import com.ruoyi.oa.service.ISysOaAttendanceService;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -146,38 +145,52 @@ public class SysOaAttendanceServiceImpl implements ISysOaAttendanceService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SysUserVo> workerList(SysOaAttendanceBo bo) {
|
public TableDataInfo<SysUserVo> workerList(SysOaAttendanceBo bo) {
|
||||||
List<Long> userIds = sysUserRoleMapper.selectUserIdsByRoleId(1852970465740505090L);
|
List<Long> userIds = sysUserRoleMapper.selectUserIdsByRoleId(1852970465740505090L);
|
||||||
LocalDate localDate = LocalDate.now();
|
// 如果这个时间为空,则默认查询当月记录
|
||||||
int year = localDate.getYear();
|
Date firstDay;
|
||||||
int month = localDate.getMonthValue();
|
Date lastDay;
|
||||||
List<SysUserVo> sysUserVos = new ArrayList<>();
|
if (Objects.isNull(bo.getSelectTime())){
|
||||||
for (Long userId : userIds) {
|
firstDay = getFirstDay(new Date());
|
||||||
SysUserVo sysUser = BeanUtil.toBean(sysUserService.selectUserById(userId), SysUserVo.class);
|
|
||||||
SysOaAttendanceVo sysOaAttendanceVo = new SysOaAttendanceVo();
|
|
||||||
sysOaAttendanceVo.setUserId(sysUser.getUserId());
|
|
||||||
LambdaQueryWrapper<SysOaAttendance> lqw = Wrappers.lambdaQuery();
|
|
||||||
|
|
||||||
// 查询当月记录
|
}else{
|
||||||
lqw.eq(SysOaAttendance::getUserId, userId)
|
firstDay = getFirstDay(bo.getSelectTime());
|
||||||
.ge(SysOaAttendance::getCreateTime,LocalDate.of(year,month,1))
|
}
|
||||||
.le(SysOaAttendance::getCreateTime,LocalDate.of(year,month,localDate.lengthOfMonth()));
|
lastDay = getLastDay(firstDay);
|
||||||
List<SysOaAttendanceVo> sysOaAttendanceVos = baseMapper.selectVoList(lqw);
|
Page<SysUserVo> result = new Page<>();
|
||||||
|
result.setRecords(baseMapper.selectUserListAndAttendanceListAndProjectListByUserIds(userIds,firstDay,lastDay));
|
||||||
|
|
||||||
List<SysOaProjectVo> projectVos = new ArrayList<>();
|
// 这个total写当月有多长时间
|
||||||
for (SysOaAttendanceVo oaAttendanceVo : sysOaAttendanceVos) {
|
Calendar calendar = Calendar.getInstance();
|
||||||
// 当projectId等于0时代表 当前为出差状态
|
calendar.setTime(firstDay);
|
||||||
if(oaAttendanceVo.getProjectId()!=0){
|
result.setTotal(calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||||
SysOaProjectVo sysOaProjectVo = projectService.queryById(oaAttendanceVo.getProjectId());
|
// for (Long userId : userIds) {
|
||||||
oaAttendanceVo.setColor(sysOaProjectVo.getColor());
|
// SysUserVo sysUser = BeanUtil.toBean(sysUserService.selectUserById(userId), SysUserVo.class);
|
||||||
projectVos.add(sysOaProjectVo);
|
// SysOaAttendanceVo sysOaAttendanceVo = new SysOaAttendanceVo();
|
||||||
}
|
// sysOaAttendanceVo.setUserId(sysUser.getUserId());
|
||||||
}
|
// LambdaQueryWrapper<SysOaAttendance> lqw = Wrappers.lambdaQuery();
|
||||||
sysUser.setProjects(projectVos);
|
//
|
||||||
sysUser.setAttendances(sysOaAttendanceVos);
|
// // 查询当月记录
|
||||||
sysUserVos.add(sysUser);
|
// lqw.eq(SysOaAttendance::getUserId, userId)
|
||||||
}
|
// .ge(SysOaAttendance::getCreateTime,)
|
||||||
return sysUserVos;
|
// .le(SysOaAttendance::getCreateTime,LocalDate.of(year,month,localDate.lengthOfMonth()));
|
||||||
|
// List<SysOaAttendanceVo> sysOaAttendanceVos = baseMapper.selectVoList(lqw);
|
||||||
|
//
|
||||||
|
// List<SysOaProjectVo> projectVos = new ArrayList<>();
|
||||||
|
// for (SysOaAttendanceVo oaAttendanceVo : sysOaAttendanceVos) {
|
||||||
|
// // 当projectId等于0时代表 当前为出差状态
|
||||||
|
// if(oaAttendanceVo.getProjectId()!=0){
|
||||||
|
// SysOaProjectVo sysOaProjectVo = projectService.queryById(oaAttendanceVo.getProjectId());
|
||||||
|
// oaAttendanceVo.setColor(sysOaProjectVo.getColor());
|
||||||
|
// projectVos.add(sysOaProjectVo);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// sysUser.setProjects(projectVos);
|
||||||
|
// sysUser.setAttendances(sysOaAttendanceVos);
|
||||||
|
// sysUserVos.add(sysUser);
|
||||||
|
// }
|
||||||
|
// 优化查询
|
||||||
|
return TableDataInfo.build(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -0,0 +1,110 @@
|
|||||||
|
package com.ruoyi.oa.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.core.domain.PageQuery;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.oa.domain.bo.SysOaFileBo;
|
||||||
|
import com.ruoyi.oa.domain.vo.SysOaFileVo;
|
||||||
|
import com.ruoyi.oa.domain.SysOaFile;
|
||||||
|
import com.ruoyi.oa.mapper.SysOaFileMapper;
|
||||||
|
import com.ruoyi.oa.service.ISysOaFileService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件存储Service业务层处理
|
||||||
|
*
|
||||||
|
* @author hdka
|
||||||
|
* @date 2024-12-15
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class SysOaFileServiceImpl implements ISysOaFileService {
|
||||||
|
|
||||||
|
private final SysOaFileMapper baseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询文件存储
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SysOaFileVo queryById(Long fileId){
|
||||||
|
return baseMapper.selectVoById(fileId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询文件存储列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableDataInfo<SysOaFileVo> queryPageList(SysOaFileBo bo, PageQuery pageQuery) {
|
||||||
|
LambdaQueryWrapper<SysOaFile> lqw = buildQueryWrapper(bo);
|
||||||
|
Page<SysOaFileVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
return TableDataInfo.build(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询文件存储列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SysOaFileVo> queryList(SysOaFileBo bo) {
|
||||||
|
LambdaQueryWrapper<SysOaFile> lqw = buildQueryWrapper(bo);
|
||||||
|
return baseMapper.selectVoList(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<SysOaFile> buildQueryWrapper(SysOaFileBo bo) {
|
||||||
|
Map<String, Object> params = bo.getParams();
|
||||||
|
LambdaQueryWrapper<SysOaFile> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getFileUrl()), SysOaFile::getFileUrl, bo.getFileUrl());
|
||||||
|
lqw.eq(bo.getStatus() != null, SysOaFile::getStatus, bo.getStatus());
|
||||||
|
return lqw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增文件存储
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean insertByBo(SysOaFileBo bo) {
|
||||||
|
SysOaFile add = BeanUtil.toBean(bo, SysOaFile.class);
|
||||||
|
validEntityBeforeSave(add);
|
||||||
|
boolean flag = baseMapper.insert(add) > 0;
|
||||||
|
if (flag) {
|
||||||
|
bo.setFileId(add.getFileId());
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改文件存储
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean updateByBo(SysOaFileBo bo) {
|
||||||
|
SysOaFile update = BeanUtil.toBean(bo, SysOaFile.class);
|
||||||
|
validEntityBeforeSave(update);
|
||||||
|
return baseMapper.updateById(update) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存前的数据校验
|
||||||
|
*/
|
||||||
|
private void validEntityBeforeSave(SysOaFile entity){
|
||||||
|
//TODO 做一些数据校验,如唯一约束
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除文件存储
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
|
if(isValid){
|
||||||
|
//TODO 做一些业务上的校验,判断是否需要校验
|
||||||
|
}
|
||||||
|
return baseMapper.deleteBatchIds(ids) > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -20,6 +20,62 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="count" column="count"/>
|
<result property="count" column="count"/>
|
||||||
<result property="workTimes" column="work_times"/>
|
<result property="workTimes" column="work_times"/>
|
||||||
<result property="hourWorkTimes" column="hour_work_times"/>
|
<result property="hourWorkTimes" column="hour_work_times"/>
|
||||||
|
<result property="color" column="color"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
<resultMap type="com.ruoyi.oa.domain.vo.SysUserVo" id="SysUserResult">
|
||||||
|
<id property="userId" column="user_id"/>
|
||||||
|
<result property="deptId" column="dept_id"/>
|
||||||
|
<result property="userName" column="user_name"/>
|
||||||
|
<result property="nickName" column="nick_name"/>
|
||||||
|
<result property="userType" column="user_type"/>
|
||||||
|
<result property="email" column="email"/>
|
||||||
|
<result property="phonenumber" column="phonenumber"/>
|
||||||
|
<result property="sex" column="sex"/>
|
||||||
|
<result property="avatar" column="avatar"/>
|
||||||
|
<result property="password" column="password"/>
|
||||||
|
<result property="status" column="status"/>
|
||||||
|
<result property="delFlag" column="del_flag"/>
|
||||||
|
<result property="loginIp" column="login_ip"/>
|
||||||
|
<result property="loginDate" column="login_date"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="updateBy" column="update_by"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
<result property="remark" column="remark"/>
|
||||||
|
<result property="idCard" column="id_card"/>
|
||||||
|
<result property="bankCard" column="bank_card"/>
|
||||||
|
<result property="laborCost" column="labor_cost"/>
|
||||||
|
<collection property="projects" javaType="java.util.List" resultMap="projectResult"/>
|
||||||
|
<collection property="attendances" javaType="java.util.List" resultMap="SysOaAttendanceResult"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="projectResult" type="com.ruoyi.oa.domain.vo.SysOaProjectVo">
|
||||||
|
<result property="projectId" column="project_id"/>
|
||||||
|
<result property="projectName" column="project_name"/>
|
||||||
|
<result property="projectNum" column="project_num"/>
|
||||||
|
<result property="projectType" column="project_type"/>
|
||||||
|
<result property="address" column="address"/>
|
||||||
|
<result property="funds" column="funds"/>
|
||||||
|
<result property="functionary" column="functionary"/>
|
||||||
|
<result property="beginTime" column="begin_time"/>
|
||||||
|
<result property="finishTime" column="finish_time"/>
|
||||||
|
<result property="delivery" column="delivery"/>
|
||||||
|
<result property="guarantee" column="guarantee"/>
|
||||||
|
<result property="introduction" column="introduction"/>
|
||||||
|
<result property="projectGrade" column="project_grade"/>
|
||||||
|
<result property="projectStatus" column="project_status"/>
|
||||||
|
<result property="contractId" column="contract_id"/>
|
||||||
|
<result property="invoiceName" column="invoice_name"/>
|
||||||
|
<result property="invoiceNumber" column="invoice_number"/>
|
||||||
|
<result property="invoiceAddress" column="invoice_address"/>
|
||||||
|
<result property="invoiceBank" column="invoice_bank"/>
|
||||||
|
<result property="accessory" column="accessory"/>
|
||||||
|
<result property="bail" column="bail"/>
|
||||||
|
<result property="remark" column="remark"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
@@ -48,6 +104,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
group by soa.project_id
|
group by soa.project_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectUserListAndAttendanceListAndProjectListByUserIds"
|
||||||
|
resultMap="SysUserResult">
|
||||||
|
SELECT su.user_id, su.dept_id, su.user_name, su.nick_name, su.user_type, su.email, su.phonenumber, su.sex,
|
||||||
|
su.avatar,
|
||||||
|
su.status,su.login_date, su.id_card,
|
||||||
|
su.bank_card, su.labor_cost,
|
||||||
|
soa.id,soa.attendance_day,soa.project_id,soa.day_length,soa.hour,
|
||||||
|
color,
|
||||||
|
sop.project_name, sop.project_num, sop.project_type, sop.address, sop.funds, sop.functionary, sop.begin_time,
|
||||||
|
sop.finish_time, sop.delivery, sop.guarantee, sop.introduction, sop.project_grade, sop.project_status, sop.contract_id, sop.invoice_name,
|
||||||
|
sop.invoice_number, sop.invoice_address, sop.invoice_bank, sop.accessory, sop.bail,sop.is_postpone, sop.postpone_reason,sop.postpone_time
|
||||||
|
FROM sys_user su
|
||||||
|
left join sys_oa_attendance soa on (su.user_id = soa.user_id and soa.del_flag='0' AND (soa.create_time BETWEEN #{firstDay} AND #{lastDay}))
|
||||||
|
left join sys_oa_project sop on soa.project_id = sop.project_id
|
||||||
|
WHERE su.user_id IN
|
||||||
|
<foreach item="userId" index="index" collection="userIds"
|
||||||
|
open="(" separator="," close=")">
|
||||||
|
#{userId}
|
||||||
|
</foreach>
|
||||||
|
and su.del_flag = '0'
|
||||||
|
</select>
|
||||||
|
|
||||||
<delete id="delOaAttendanceAll">
|
<delete id="delOaAttendanceAll">
|
||||||
delete from sys_oa_attendance where
|
delete from sys_oa_attendance where
|
||||||
attendance_day = #{day}
|
attendance_day = #{day}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="id" column="id"/>
|
<result property="id" column="id"/>
|
||||||
<result property="inventory" column="inventory"/>
|
<result property="inventory" column="inventory"/>
|
||||||
<result property="model" column="model"/>
|
<result property="model" column="model"/>
|
||||||
|
<result property="price" column="price"/>
|
||||||
<result property="unit" column="unit"/>
|
<result property="unit" column="unit"/>
|
||||||
<result property="name" column="name"/>
|
<result property="name" column="name"/>
|
||||||
<result property="brand" column="brand"/>
|
<result property="brand" column="brand"/>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.ruoyi.common.core.domain.PageQuery;
|
|||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<?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.ruoyi.oa.mapper.SysOaFileMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.ruoyi.oa.domain.SysOaFile" id="SysOaFileResult">
|
||||||
|
<result property="fileId" column="file_id"/>
|
||||||
|
<result property="fileUrl" column="file_url"/>
|
||||||
|
<result property="status" column="status"/>
|
||||||
|
<result property="createTime" column="create_time"/>
|
||||||
|
<result property="updateTime" column="update_time"/>
|
||||||
|
<result property="createBy" column="create_by"/>
|
||||||
|
<result property="updateBy" column="update_by"/>
|
||||||
|
<result property="delFlag" column="del_flag"/>
|
||||||
|
<result property="remark" column="remark"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
44
ruoyi-ui/src/api/oa/oaFile.js
Normal file
44
ruoyi-ui/src/api/oa/oaFile.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询文件存储列表
|
||||||
|
export function listOaFile(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/oaFile/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询文件存储详细
|
||||||
|
export function getOaFile(fileId) {
|
||||||
|
return request({
|
||||||
|
url: '/system/oaFile/' + fileId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增文件存储
|
||||||
|
export function addOaFile(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/oaFile',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改文件存储
|
||||||
|
export function updateOaFile(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/oaFile',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除文件存储
|
||||||
|
export function delOaFile(fileId) {
|
||||||
|
return request({
|
||||||
|
url: '/system/oaFile/' + fileId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -61,7 +61,7 @@ export default {
|
|||||||
// 文件类型, 例如['png', 'jpg', 'jpeg']
|
// 文件类型, 例如['png', 'jpg', 'jpeg']
|
||||||
fileType: {
|
fileType: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => ["doc", "docx", "xls", "ppt", "txt", "pdf"],
|
default: () => ["doc", "docx", "xls","pdf","xlsx"],
|
||||||
},
|
},
|
||||||
// 是否显示提示
|
// 是否显示提示
|
||||||
isShowTip: {
|
isShowTip: {
|
||||||
|
|||||||
58
ruoyi-ui/src/utils/currencyFormatter.js
Normal file
58
ruoyi-ui/src/utils/currencyFormatter.js
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
// currencyFormatter.js
|
||||||
|
|
||||||
|
export function numberToCNY(amount) {
|
||||||
|
if (amount === 0) return '零元整';
|
||||||
|
const CN_NUMS = ['', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
||||||
|
const CN_INT_UNITS = ['', '拾', '佰', '仟'];
|
||||||
|
const CN_INT_BASE = ['元', '萬', '億', '兆'];
|
||||||
|
const CN_DEC_UNITS = ['角', '分'];
|
||||||
|
const INT_MAX = Math.pow(10, 16) - 1;
|
||||||
|
|
||||||
|
if (amount >= INT_MAX || amount <= -INT_MAX) {
|
||||||
|
throw new Error('超出支持的金额范围');
|
||||||
|
}
|
||||||
|
|
||||||
|
let parts = amount.toString().split('.');
|
||||||
|
let integerPart = parts[0];
|
||||||
|
let decimalPart = parts[1] || '';
|
||||||
|
|
||||||
|
// 处理整数部分
|
||||||
|
function convertInteger(numStr) {
|
||||||
|
let result = '';
|
||||||
|
let zeros = 0;
|
||||||
|
let unitPos = 0;
|
||||||
|
for (let i = numStr.length - 1; i >= 0; i--) {
|
||||||
|
let num = parseInt(numStr.charAt(i));
|
||||||
|
if (num === 0) {
|
||||||
|
zeros++;
|
||||||
|
} else {
|
||||||
|
if (zeros > 0) {
|
||||||
|
result = '零' + result;
|
||||||
|
}
|
||||||
|
zeros = 0;
|
||||||
|
result = CN_NUMS[num] + CN_INT_UNITS[unitPos % 4] + result;
|
||||||
|
}
|
||||||
|
unitPos++;
|
||||||
|
if (unitPos % 4 === 0 && i > 0) {
|
||||||
|
result = CN_INT_BASE[Math.floor(unitPos / 4) - 1] + result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理小数部分
|
||||||
|
function convertDecimal(numStr) {
|
||||||
|
return numStr.split('').map((digit, index) => {
|
||||||
|
return digit !== '0' ? CN_NUMS[digit] + CN_DEC_UNITS[index] : '';
|
||||||
|
}).join('');
|
||||||
|
}
|
||||||
|
|
||||||
|
let integerResult = convertInteger(integerPart);
|
||||||
|
let decimalResult = decimalPart.length > 0 ? convertDecimal(decimalPart) : '整';
|
||||||
|
|
||||||
|
// 连接整数和小数部分,并确保格式正确
|
||||||
|
let finalResult = integerResult.replace(/零+$/, '') + '元' + decimalResult;
|
||||||
|
finalResult = finalResult.replace(/零+/g, '零');
|
||||||
|
|
||||||
|
return finalResult;
|
||||||
|
}
|
||||||
@@ -3,7 +3,20 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
|
|
||||||
<el-header> 签到表</el-header>
|
<el-header>
|
||||||
|
<div style="">
|
||||||
|
<span>签到表</span>
|
||||||
|
<span style="float:right;">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="queryParams.selectTime"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
type="month"
|
||||||
|
@change="getList()"
|
||||||
|
placeholder="选择月">
|
||||||
|
</el-date-picker>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -40,13 +53,15 @@
|
|||||||
<span><i class="el-icon-s-order"></i> 项目列表</span>
|
<span><i class="el-icon-s-order"></i> 项目列表</span>
|
||||||
<!-- <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>-->
|
<!-- <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>-->
|
||||||
</div>
|
</div>
|
||||||
<div v-for="(item,index) in projectList" style="display: flex;justify-content: space-between">
|
<div style="height: 250px;overflow: auto">
|
||||||
|
<div v-for="(item,index) in sortedProjects" style="display: flex;justify-content: space-between;">
|
||||||
<el-button class="text" :style="{backgroundColor:item.color===''?'':item.color}" @click="signIn(item)">
|
<el-button class="text" :style="{backgroundColor:item.color===''?'':item.color}" @click="signIn(item)">
|
||||||
{{ item.projectName }}
|
{{ item.projectName }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-color-picker class="color-picker" v-model="item.color"
|
<el-color-picker class="color-picker" v-model="item.color"
|
||||||
@change="changeItemColor(item)"></el-color-picker>
|
@change="changeItemColor(item)"></el-color-picker>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<div slot="" class="">
|
<div slot="" class="">
|
||||||
@@ -288,13 +303,14 @@ export default {
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 50,
|
pageSize: 50,
|
||||||
|
selectTime: new Date(),
|
||||||
},
|
},
|
||||||
selectArrayIndex: new Date().getDate(),
|
selectArrayIndex: new Date().getDate(),
|
||||||
timeFlag: 0,
|
timeFlag: 0,
|
||||||
// 项目查询参数
|
// 项目查询参数
|
||||||
projectQueryParams: {
|
projectQueryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 99,
|
||||||
projectStatus: 0,
|
projectStatus: 0,
|
||||||
projectName: undefined,
|
projectName: undefined,
|
||||||
projectNum: undefined,
|
projectNum: undefined,
|
||||||
@@ -310,6 +326,7 @@ export default {
|
|||||||
calcResultUser: {},
|
calcResultUser: {},
|
||||||
calcResultAttendances: [],
|
calcResultAttendances: [],
|
||||||
calcResultProject: {},
|
calcResultProject: {},
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -319,6 +336,17 @@ export default {
|
|||||||
this.getDate();
|
this.getDate();
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
|
computed:{
|
||||||
|
sortedProjects() {
|
||||||
|
let projectList = [...this.projectList];
|
||||||
|
projectList.sort((a, b) => {
|
||||||
|
if (a.color && !b.color) return -1;
|
||||||
|
if (!a.color && b.color) return 1;
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
|
return projectList;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
@@ -403,14 +431,14 @@ export default {
|
|||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listOaAttendance(this.queryParams).then(res => {
|
listOaAttendance(this.queryParams).then(res => {
|
||||||
this.userList = res.data;
|
this.userList = res.rows;
|
||||||
this.total = res.total;
|
console.log(this.userList);
|
||||||
|
this.dateLength = res.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
listProject(this.projectQueryParams).then(response => {
|
listProject(this.projectQueryParams).then(response => {
|
||||||
this.projectList = response.rows;
|
this.projectList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -259,7 +259,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="金额(单位:元)" prop="price">
|
<el-table-column label="金额(单位:元)" prop="price">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.price" placeholder="请输入金额" οnkeyup="value=value.replace(/[^\d]/g,'')"/>
|
<el-input v-model="scope.row.price" placeholder="请输入金额" οnkeyup="value=value.replace(/[^\d]/g,'')" @input="updateBigPrice(scope.$index, scope.row)"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="大写金额(零壹贰叁肆伍陆柒捌玖万仟佰拾亿元角分)" prop="bigPrice">
|
<el-table-column label="大写金额(零壹贰叁肆伍陆柒捌玖万仟佰拾亿元角分)" prop="bigPrice">
|
||||||
@@ -619,6 +619,7 @@ import {
|
|||||||
listFinancePro,
|
listFinancePro,
|
||||||
updateFinance, listFinance
|
updateFinance, listFinance
|
||||||
} from "@/api/oa/finance";
|
} from "@/api/oa/finance";
|
||||||
|
import {numberToCNY} from "../../../utils/currencyFormatter";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "list",
|
name: "list",
|
||||||
@@ -709,6 +710,15 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
updateBigPrice(index, row) {
|
||||||
|
console.log(index, row);
|
||||||
|
if (row.price !== '') {
|
||||||
|
row.bigPrice = numberToCNY(parseFloat(row.price) || 0);
|
||||||
|
} else {
|
||||||
|
row.bigPrice = ''; // 如果价格为空,则大写金额也清空
|
||||||
|
}
|
||||||
|
},
|
||||||
/** 查询项目管理列表 */
|
/** 查询项目管理列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
@node-click="handleNodeClick"
|
@node-click="handleNodeClick"
|
||||||
>
|
>
|
||||||
<span class="custom-tree-node" slot-scope="{ node, data }">
|
<span class="custom-tree-node" slot-scope="{ node, data }">
|
||||||
<span v-if="!data.isAdd">{{ node.label }}</span>
|
<span class="node-label" v-if="!data.isAdd">{{ node.label }}</span>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="newChildNode"
|
v-model="newChildNode"
|
||||||
v-if="data.isAdd"
|
v-if="data.isAdd"
|
||||||
@@ -579,7 +579,8 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="金额" prop="price">
|
<el-table-column label="金额" prop="price">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.price" placeholder="请输入金额"/>
|
<el-input v-model="scope.row.price" placeholder="请输入金额"
|
||||||
|
@input="updateBigPrice(scope.$index, scope.row)"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="大写金额(零壹贰叁肆伍陆柒捌玖万仟佰拾亿元角分)" prop="bigPrice">
|
<el-table-column label="大写金额(零壹贰叁肆伍陆柒捌玖万仟佰拾亿元角分)" prop="bigPrice">
|
||||||
@@ -619,6 +620,7 @@ import {
|
|||||||
listOaReceiveAccount,
|
listOaReceiveAccount,
|
||||||
updateOaReceiveAccount
|
updateOaReceiveAccount
|
||||||
} from "../../../api/oa/oaReceiveAccount";
|
} from "../../../api/oa/oaReceiveAccount";
|
||||||
|
import {numberToCNY} from "../../../utils/currencyFormatter";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Finance",
|
name: "Finance",
|
||||||
@@ -729,6 +731,7 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
/*this.getListOut();*/
|
/*this.getListOut();*/
|
||||||
// this.getListEnter();
|
// this.getListEnter();
|
||||||
@@ -741,8 +744,23 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
updateBigPrice(index, row) {
|
||||||
|
|
||||||
|
if (row.price !== '') {
|
||||||
|
row.bigPrice = numberToCNY(parseFloat(row.price) || 0);
|
||||||
|
} else {
|
||||||
|
row.bigPrice = ''; // 如果价格为空,则大写金额也清空
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
append(data) {
|
append(data) {
|
||||||
let newChild = { id: this.receiveAccountList[this.receiveAccountList.length-1].id++, label: '输入名称', children: [],receiveAccountName:"",isAdd:true };
|
let newChild = {
|
||||||
|
id: this.receiveAccountList[this.receiveAccountList.length - 1].id++,
|
||||||
|
label: '输入名称',
|
||||||
|
children: [],
|
||||||
|
receiveAccountName: "",
|
||||||
|
isAdd: true
|
||||||
|
};
|
||||||
if (!data.children) {
|
if (!data.children) {
|
||||||
this.$set(data, 'children', []);
|
this.$set(data, 'children', []);
|
||||||
}
|
}
|
||||||
@@ -1412,11 +1430,18 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.custom-tree-node {
|
.custom-tree-node {
|
||||||
|
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
padding-right: 8px;
|
padding-right: 8px;
|
||||||
}
|
}
|
||||||
|
.node-label{
|
||||||
|
width: 130px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
299
ruoyi-ui/src/views/oa/oaFile/index.vue
Normal file
299
ruoyi-ui/src/views/oa/oaFile/index.vue
Normal file
@@ -0,0 +1,299 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<el-form-item label="文件类型" prop="status">
|
||||||
|
<el-select v-model="queryParams.status" placeholder="请选择文件类型" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.file_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['system:oaFile:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['system:oaFile:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['system:oaFile:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['system:oaFile:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="oaFileList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="文件名称" align="center" prop="fileUrl" />
|
||||||
|
<el-table-column label="文件来源" align="center" prop="status">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.file_status" :value="scope.row.status"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['system:oaFile:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:oaFile:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改文件存储对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="上传文件" prop="fileUrl">
|
||||||
|
<file-upload v-model="form.fileUrl"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="文件类型" prop="status">
|
||||||
|
<el-select v-model="form.status" placeholder="请选择文件类型" disabled>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.file_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="parseInt(dict.value)"
|
||||||
|
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listOaFile, getOaFile, delOaFile, addOaFile, updateOaFile } from "@/api/oa/oaFile";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "OaFile",
|
||||||
|
dicts: ['file_status'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 按钮loading
|
||||||
|
buttonLoading: false,
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 文件存储表格数据
|
||||||
|
oaFileList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
fileUrl: undefined,
|
||||||
|
status: undefined,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 截断最后一个斜杠的数字
|
||||||
|
lastStr(str){
|
||||||
|
let index = str.lastIndexOf("\/");
|
||||||
|
str = parseInt(str.substring(index + 1, str .length));
|
||||||
|
this.queryParams.status= str
|
||||||
|
this.form.status = str
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 查询文件存储列表 */
|
||||||
|
getList() {
|
||||||
|
this.lastStr(this.$route.path)
|
||||||
|
this.loading = true;
|
||||||
|
listOaFile(this.queryParams).then(response => {
|
||||||
|
this.oaFileList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
fileId: undefined,
|
||||||
|
fileUrl: undefined,
|
||||||
|
status: undefined,
|
||||||
|
createTime: undefined,
|
||||||
|
updateTime: undefined,
|
||||||
|
createBy: undefined,
|
||||||
|
updateBy: undefined,
|
||||||
|
delFlag: undefined,
|
||||||
|
remark: undefined
|
||||||
|
};
|
||||||
|
this.lastStr(this.$route.path)
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.fileId)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加文件存储";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.loading = true;
|
||||||
|
this.reset();
|
||||||
|
const fileId = row.fileId || this.ids
|
||||||
|
getOaFile(fileId).then(response => {
|
||||||
|
this.loading = false;
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改文件存储";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.buttonLoading = true;
|
||||||
|
if (this.form.fileId != null) {
|
||||||
|
updateOaFile(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
}).finally(() => {
|
||||||
|
this.buttonLoading = false;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addOaFile(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
}).finally(() => {
|
||||||
|
this.buttonLoading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const fileIds = row.fileId || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除文件存储编号为"' + fileIds + '"的数据项?').then(() => {
|
||||||
|
this.loading = true;
|
||||||
|
return delOaFile(fileIds);
|
||||||
|
}).then(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('system/oaFile/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `oaFile_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -101,6 +101,7 @@
|
|||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="型号" align="center" prop="model" />
|
<el-table-column label="型号" align="center" prop="model" />
|
||||||
|
<el-table-column label="单价" align="center" prop="price" />
|
||||||
<el-table-column label="库存数量" align="center" prop="inventory" />
|
<el-table-column label="库存数量" align="center" prop="inventory" />
|
||||||
<el-table-column label="单位" align="center" prop="unit" />
|
<el-table-column label="单位" align="center" prop="unit" />
|
||||||
<el-table-column label="品牌" align="center" prop="brand" />
|
<el-table-column label="品牌" align="center" prop="brand" />
|
||||||
@@ -143,6 +144,10 @@
|
|||||||
<el-form-item label="型号" prop="model">
|
<el-form-item label="型号" prop="model">
|
||||||
<el-input v-model="form.model" placeholder="请输入型号" />
|
<el-input v-model="form.model" placeholder="请输入型号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="单价" prop="price">
|
||||||
|
<el-input v-model="form.price" placeholder="请输入单价" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="库存数量" prop="inventory">
|
<el-form-item label="库存数量" prop="inventory">
|
||||||
<el-input v-model="form.inventory" placeholder="请输入库存数量" />
|
<el-input v-model="form.inventory" placeholder="请输入库存数量" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|||||||
Reference in New Issue
Block a user