Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
package com.ruoyi.index.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.ruoyi.index.domain.ViewIndexJob;
|
||||
import com.ruoyi.index.mapper.ViewIndexJobMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.index.domain.BillStatusCount;
|
||||
import com.ruoyi.index.domain.CargoSpaceCount;
|
||||
import com.ruoyi.index.domain.IndexCount;
|
||||
import com.ruoyi.index.service.IBillStatusCountService;
|
||||
import com.ruoyi.index.service.ICargoSpaceCountService;
|
||||
import com.ruoyi.index.service.IIndexCountService;
|
||||
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||
import com.ruoyi.job.mydojob.service.IMydoJobService;
|
||||
import com.ruoyi.system.service.ISysDictDataService;
|
||||
|
||||
/**
|
||||
* 首页统计信息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/index")
|
||||
public class IndexController extends BaseController {
|
||||
@Autowired
|
||||
private IBillStatusCountService billStatusCountService;
|
||||
|
||||
@Autowired
|
||||
private ICargoSpaceCountService cargoSpaceCountService;
|
||||
|
||||
@Autowired
|
||||
private IIndexCountService indexCountService;
|
||||
|
||||
@Autowired
|
||||
private IMydoJobService mydoJobService;
|
||||
|
||||
@Autowired
|
||||
private ISysDictDataService dictDataService;
|
||||
|
||||
/**
|
||||
* 查询单据状态统计
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('index:bill:list')")
|
||||
@GetMapping("/bill/status")
|
||||
public AjaxResult getBillStatusCount() {
|
||||
List<BillStatusCount> list = billStatusCountService.selectAllBillStatusCount();
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询各状态货位数量
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('index:cargospace:list')")
|
||||
@GetMapping("/cargospace/count")
|
||||
public AjaxResult getCargoSpaceCount() {
|
||||
CargoSpaceCount cargoSpaceCount = cargoSpaceCountService.selectStatusCount();
|
||||
return success(cargoSpaceCount);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询已完成单据数量统计
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('index:count:list')")
|
||||
@GetMapping("/finishCount")
|
||||
public AjaxResult getFinishCount() {
|
||||
IndexCount indexCount = indexCountService.selectFinishCount();
|
||||
return success(indexCount);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private ViewIndexJobMapper viewIndexJobMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 获取任务状态统计
|
||||
*/
|
||||
@GetMapping("/job/status")
|
||||
public AjaxResult getJobStatusCount() {
|
||||
List<ViewIndexJob> allJobs = viewIndexJobMapper.selectViewIndexJobByStatus(null);
|
||||
Map<String, List<ViewIndexJob>> result = new HashMap<>();
|
||||
result.put("status2", allJobs.stream().filter(job -> "2".equals(job.getStatus())).collect(Collectors.toList()));
|
||||
result.put("status3", allJobs.stream().filter(job -> "3".equals(job.getStatus())).collect(Collectors.toList()));
|
||||
return AjaxResult.success(result);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.ruoyi.index.controller;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.index.domain.WeekJobCount;
|
||||
import com.ruoyi.index.service.IWeekJobCountService;
|
||||
|
||||
/**
|
||||
* 每周作业数量统计Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/index/weekjob")
|
||||
public class WeekJobCountController
|
||||
{
|
||||
@Autowired
|
||||
private IWeekJobCountService weekJobCountService;
|
||||
|
||||
/**
|
||||
* 获取近一周的入库和出库作业数量统计
|
||||
*/
|
||||
@GetMapping("/count")
|
||||
public AjaxResult getWeekJobCount()
|
||||
{
|
||||
WeekJobCount weekJobCount = weekJobCountService.getWeekJobCount();
|
||||
return AjaxResult.success(weekJobCount);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ruoyi.index.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 单据状态统计对象
|
||||
*/
|
||||
@Data
|
||||
public class BillStatusCount {
|
||||
/** 单据ID */
|
||||
private String id;
|
||||
|
||||
/** 单据状态(1:未执行,2:审核中,3:正执行) */
|
||||
private String status;
|
||||
|
||||
/** 单据类型(1:入库,2:出库,3:盘点) */
|
||||
private String type;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.ruoyi.index.domain;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 货位状态统计对象
|
||||
*/
|
||||
public class CargoSpaceCount {
|
||||
/** 各状态货位数量 */
|
||||
private List<Integer> statusCounts;
|
||||
|
||||
public List<Integer> getStatusCounts() {
|
||||
return statusCounts;
|
||||
}
|
||||
|
||||
public void setStatusCounts(List<Integer> statusCounts) {
|
||||
this.statusCounts = statusCounts;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.ruoyi.index.domain;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 首页统计信息对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-29
|
||||
*/
|
||||
public class IndexCount extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 入库单数量 */
|
||||
private Integer stockinCount;
|
||||
|
||||
/** 出库单数量 */
|
||||
private Integer stockoutCount;
|
||||
|
||||
/** 盘点单数量 */
|
||||
private Integer stockcheckCount;
|
||||
|
||||
public void setStockinCount(Integer stockinCount)
|
||||
{
|
||||
this.stockinCount = stockinCount;
|
||||
}
|
||||
|
||||
public Integer getStockinCount()
|
||||
{
|
||||
return stockinCount;
|
||||
}
|
||||
|
||||
public void setStockoutCount(Integer stockoutCount)
|
||||
{
|
||||
this.stockoutCount = stockoutCount;
|
||||
}
|
||||
|
||||
public Integer getStockoutCount()
|
||||
{
|
||||
return stockoutCount;
|
||||
}
|
||||
|
||||
public void setStockcheckCount(Integer stockcheckCount)
|
||||
{
|
||||
this.stockcheckCount = stockcheckCount;
|
||||
}
|
||||
|
||||
public Integer getStockcheckCount()
|
||||
{
|
||||
return stockcheckCount;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.ruoyi.index.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 首页任务视图对象 view_index_job
|
||||
*/
|
||||
public class ViewIndexJob extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 作业ID */
|
||||
@Excel(name = "作业ID")
|
||||
private String jobId;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
/** 状态标签 */
|
||||
@Excel(name = "状态标签")
|
||||
private String statusLabel;
|
||||
|
||||
/** 任务类型 */
|
||||
@Excel(name = "任务类型")
|
||||
private String inOrOut;
|
||||
|
||||
/** 任务类型标签 */
|
||||
@Excel(name = "任务类型标签")
|
||||
private String inOrOutLabel;
|
||||
|
||||
/** 优先级 */
|
||||
@Excel(name = "优先级")
|
||||
private Integer priority;
|
||||
|
||||
public String getJobId() {
|
||||
return jobId;
|
||||
}
|
||||
|
||||
public void setJobId(String jobId) {
|
||||
this.jobId = jobId;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatusLabel() {
|
||||
return statusLabel;
|
||||
}
|
||||
|
||||
public void setStatusLabel(String statusLabel) {
|
||||
this.statusLabel = statusLabel;
|
||||
}
|
||||
|
||||
public String getInOrOut() {
|
||||
return inOrOut;
|
||||
}
|
||||
|
||||
public void setInOrOut(String inOrOut) {
|
||||
this.inOrOut = inOrOut;
|
||||
}
|
||||
|
||||
public String getInOrOutLabel() {
|
||||
return inOrOutLabel;
|
||||
}
|
||||
|
||||
public void setInOrOutLabel(String inOrOutLabel) {
|
||||
this.inOrOutLabel = inOrOutLabel;
|
||||
}
|
||||
|
||||
public Integer getPriority() {
|
||||
return priority;
|
||||
}
|
||||
|
||||
public void setPriority(Integer priority) {
|
||||
this.priority = priority;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.ruoyi.index.domain;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 每周作业数量统计对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-05
|
||||
*/
|
||||
public class WeekJobCount
|
||||
{
|
||||
/** 入库作业数量列表 */
|
||||
private List<Integer> inJobCounts;
|
||||
|
||||
/** 出库作业数量列表 */
|
||||
private List<Integer> outJobCounts;
|
||||
|
||||
public List<Integer> getInJobCounts()
|
||||
{
|
||||
return inJobCounts;
|
||||
}
|
||||
|
||||
public void setInJobCounts(List<Integer> inJobCounts)
|
||||
{
|
||||
this.inJobCounts = inJobCounts;
|
||||
}
|
||||
|
||||
public List<Integer> getOutJobCounts()
|
||||
{
|
||||
return outJobCounts;
|
||||
}
|
||||
|
||||
public void setOutJobCounts(List<Integer> outJobCounts)
|
||||
{
|
||||
this.outJobCounts = outJobCounts;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ruoyi.index.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.index.domain.BillStatusCount;
|
||||
|
||||
/**
|
||||
* 单据状态统计Mapper接口
|
||||
*/
|
||||
public interface BillStatusCountMapper {
|
||||
/**
|
||||
* 查询入库单据状态统计
|
||||
*
|
||||
* @return 入库单据状态统计列表
|
||||
*/
|
||||
public List<BillStatusCount> selectStockinStatusCount();
|
||||
|
||||
/**
|
||||
* 查询出库单据状态统计
|
||||
*
|
||||
* @return 出库单据状态统计列表
|
||||
*/
|
||||
public List<BillStatusCount> selectStockoutStatusCount();
|
||||
|
||||
/**
|
||||
* 查询盘点单据状态统计
|
||||
*
|
||||
* @return 盘点单据状态统计列表
|
||||
*/
|
||||
public List<BillStatusCount> selectStockcheckStatusCount();
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.ruoyi.index.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 货位状态统计Mapper接口
|
||||
*/
|
||||
@Mapper
|
||||
public interface CargoSpaceCountMapper {
|
||||
/**
|
||||
* 查询各状态货位数量
|
||||
*
|
||||
* @return 各状态货位数量列表
|
||||
*/
|
||||
public List<Map<String, Object>> selectStatusCount();
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.ruoyi.index.mapper;
|
||||
|
||||
/**
|
||||
* 首页统计信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-29
|
||||
*/
|
||||
public interface IndexCountMapper
|
||||
{
|
||||
/**
|
||||
* 查询已完成入库单数量
|
||||
*
|
||||
* @return 入库单数量
|
||||
*/
|
||||
public Integer selectStockinFinishCount();
|
||||
|
||||
/**
|
||||
* 查询已完成出库单数量
|
||||
*
|
||||
* @return 出库单数量
|
||||
*/
|
||||
public Integer selectStockoutFinishCount();
|
||||
|
||||
/**
|
||||
* 查询已完成盘点单数量
|
||||
*
|
||||
* @return 盘点单数量
|
||||
*/
|
||||
public Integer selectStockcheckFinishCount();
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ruoyi.index.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.index.domain.ViewIndexJob;
|
||||
|
||||
/**
|
||||
* 首页任务视图Mapper接口
|
||||
*/
|
||||
public interface ViewIndexJobMapper {
|
||||
/**
|
||||
* 根据状态查询任务列表
|
||||
*
|
||||
* @param status 任务状态
|
||||
* @return 任务列表
|
||||
*/
|
||||
public List<ViewIndexJob> selectViewIndexJobByStatus(String status);
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.ruoyi.index.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 每周作业数量统计Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-05
|
||||
*/
|
||||
public interface WeekJobCountMapper
|
||||
{
|
||||
/**
|
||||
* 查询指定日期范围内每天的入库作业数量
|
||||
*
|
||||
* @param startDate 开始日期
|
||||
* @param endDate 结束日期
|
||||
* @return 每天的入库作业数量列表
|
||||
*/
|
||||
public List<Integer> selectInJobCounts(@Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||
|
||||
/**
|
||||
* 查询指定日期范围内每天的出库作业数量
|
||||
*
|
||||
* @param startDate 开始日期
|
||||
* @param endDate 结束日期
|
||||
* @return 每天的出库作业数量列表
|
||||
*/
|
||||
public List<Integer> selectOutJobCounts(@Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.ruoyi.index.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.index.domain.BillStatusCount;
|
||||
|
||||
/**
|
||||
* 单据状态统计Service接口
|
||||
*/
|
||||
public interface IBillStatusCountService {
|
||||
/**
|
||||
* 查询所有类型单据的状态统计
|
||||
*
|
||||
* @return 单据状态统计列表
|
||||
*/
|
||||
public List<BillStatusCount> selectAllBillStatusCount();
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.ruoyi.index.service;
|
||||
|
||||
import com.ruoyi.index.domain.CargoSpaceCount;
|
||||
|
||||
/**
|
||||
* 货位状态统计Service接口
|
||||
*/
|
||||
public interface ICargoSpaceCountService {
|
||||
/**
|
||||
* 查询各状态货位数量
|
||||
*
|
||||
* @return 货位状态统计对象
|
||||
*/
|
||||
public CargoSpaceCount selectStatusCount();
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.ruoyi.index.service;
|
||||
|
||||
import com.ruoyi.index.domain.IndexCount;
|
||||
|
||||
/**
|
||||
* 首页统计信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-29
|
||||
*/
|
||||
public interface IIndexCountService
|
||||
{
|
||||
/**
|
||||
* 查询已完成单据数量统计
|
||||
*
|
||||
* @return 统计结果
|
||||
*/
|
||||
public IndexCount selectFinishCount();
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.ruoyi.index.service;
|
||||
|
||||
import com.ruoyi.index.domain.WeekJobCount;
|
||||
|
||||
/**
|
||||
* 每周作业数量统计Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-05
|
||||
*/
|
||||
public interface IWeekJobCountService
|
||||
{
|
||||
/**
|
||||
* 获取近一周的入库和出库作业数量统计
|
||||
*
|
||||
* @return 近一周的入库和出库作业数量统计
|
||||
*/
|
||||
public WeekJobCount getWeekJobCount();
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.ruoyi.index.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.index.mapper.BillStatusCountMapper;
|
||||
import com.ruoyi.index.domain.BillStatusCount;
|
||||
import com.ruoyi.index.service.IBillStatusCountService;
|
||||
|
||||
/**
|
||||
* 单据状态统计Service实现
|
||||
*/
|
||||
@Service
|
||||
public class BillStatusCountServiceImpl implements IBillStatusCountService {
|
||||
@Autowired
|
||||
private BillStatusCountMapper billStatusCountMapper;
|
||||
|
||||
/**
|
||||
* 查询所有类型单据的状态统计
|
||||
*
|
||||
* @return 单据状态统计列表
|
||||
*/
|
||||
@Override
|
||||
public List<BillStatusCount> selectAllBillStatusCount() {
|
||||
List<BillStatusCount> resultList = new ArrayList<>();
|
||||
|
||||
// 查询入库单据状态统计
|
||||
List<BillStatusCount> stockinList = billStatusCountMapper.selectStockinStatusCount();
|
||||
if (stockinList != null) {
|
||||
resultList.addAll(stockinList);
|
||||
}
|
||||
|
||||
// 查询出库单据状态统计
|
||||
List<BillStatusCount> stockoutList = billStatusCountMapper.selectStockoutStatusCount();
|
||||
if (stockoutList != null) {
|
||||
resultList.addAll(stockoutList);
|
||||
}
|
||||
|
||||
// 查询盘点单据状态统计
|
||||
List<BillStatusCount> stockcheckList = billStatusCountMapper.selectStockcheckStatusCount();
|
||||
if (stockcheckList != null) {
|
||||
resultList.addAll(stockcheckList);
|
||||
}
|
||||
|
||||
// 按照status降序排序(3、2、1)
|
||||
resultList.sort((a, b) -> b.getStatus().compareTo(a.getStatus()));
|
||||
|
||||
return resultList;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.ruoyi.index.service.impl;
|
||||
|
||||
import com.ruoyi.index.domain.CargoSpaceCount;
|
||||
import com.ruoyi.index.mapper.CargoSpaceCountMapper;
|
||||
import com.ruoyi.index.service.ICargoSpaceCountService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 货位状态统计Service实现
|
||||
*/
|
||||
@Service
|
||||
public class CargoSpaceCountServiceImpl implements ICargoSpaceCountService {
|
||||
@Autowired
|
||||
private CargoSpaceCountMapper cargoSpaceCountMapper;
|
||||
|
||||
/**
|
||||
* 查询各状态货位数量
|
||||
*
|
||||
* @return 货位状态统计对象
|
||||
*/
|
||||
@Override
|
||||
public CargoSpaceCount selectStatusCount() {
|
||||
// 查询各状态货位数量
|
||||
List<Map<String, Object>> statusCounts = cargoSpaceCountMapper.selectStatusCount();
|
||||
|
||||
// 初始化结果数组,默认所有状态数量为0
|
||||
List<Integer> counts = new ArrayList<>();
|
||||
for (int i = 0; i < 6; i++) {
|
||||
counts.add(0);
|
||||
}
|
||||
|
||||
// 填充实际统计数量
|
||||
for (Map<String, Object> count : statusCounts) {
|
||||
int status = Integer.parseInt(count.get("status").toString());
|
||||
long countValue = Long.parseLong(count.get("count").toString());
|
||||
counts.set(status - 1, (int)countValue);
|
||||
}
|
||||
|
||||
// 封装结果
|
||||
CargoSpaceCount result = new CargoSpaceCount();
|
||||
result.setStatusCounts(counts);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.ruoyi.index.service.impl;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.index.mapper.IndexCountMapper;
|
||||
import com.ruoyi.index.domain.IndexCount;
|
||||
import com.ruoyi.index.service.IIndexCountService;
|
||||
|
||||
/**
|
||||
* 首页统计信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-29
|
||||
*/
|
||||
@Service
|
||||
public class IndexCountServiceImpl implements IIndexCountService
|
||||
{
|
||||
@Autowired
|
||||
private IndexCountMapper indexCountMapper;
|
||||
|
||||
/**
|
||||
* 查询已完成单据数量统计
|
||||
*
|
||||
* @return 统计结果
|
||||
*/
|
||||
@Override
|
||||
public IndexCount selectFinishCount()
|
||||
{
|
||||
IndexCount indexCount = new IndexCount();
|
||||
indexCount.setStockinCount(indexCountMapper.selectStockinFinishCount());
|
||||
indexCount.setStockoutCount(indexCountMapper.selectStockoutFinishCount());
|
||||
indexCount.setStockcheckCount(indexCountMapper.selectStockcheckFinishCount());
|
||||
return indexCount;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.ruoyi.index.service.impl;
|
||||
|
||||
import java.time.DayOfWeek;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.ruoyi.index.domain.WeekJobCount;
|
||||
import com.ruoyi.index.mapper.WeekJobCountMapper;
|
||||
import com.ruoyi.index.service.IWeekJobCountService;
|
||||
|
||||
/**
|
||||
* 每周作业数量统计Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-05
|
||||
*/
|
||||
@Service
|
||||
public class WeekJobCountServiceImpl implements IWeekJobCountService
|
||||
{
|
||||
@Autowired
|
||||
private WeekJobCountMapper weekJobCountMapper;
|
||||
|
||||
/**
|
||||
* 获取近一周的入库和出库作业数量统计
|
||||
*
|
||||
* @return 近一周的入库和出库作业数量统计
|
||||
*/
|
||||
@Override
|
||||
public WeekJobCount getWeekJobCount()
|
||||
{
|
||||
// 获取当前日期
|
||||
LocalDate now = LocalDate.now();
|
||||
|
||||
// 获取本周一的日期
|
||||
LocalDate monday = now.with(DayOfWeek.MONDAY);
|
||||
|
||||
// 获取本周日的日期
|
||||
LocalDate sunday = now.with(DayOfWeek.SUNDAY);
|
||||
|
||||
// 格式化日期
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
String startDate = monday.format(formatter);
|
||||
String endDate = sunday.format(formatter);
|
||||
|
||||
// 初始化一周的数组,默认值为0
|
||||
List<Integer> inJobCounts = Arrays.asList(0, 0, 0, 0, 0, 0, 0);
|
||||
List<Integer> outJobCounts = Arrays.asList(0, 0, 0, 0, 0, 0, 0);
|
||||
|
||||
// 查询近一周的入库和出库作业数量
|
||||
List<Integer> queryInCounts = weekJobCountMapper.selectInJobCounts(startDate, endDate);
|
||||
List<Integer> queryOutCounts = weekJobCountMapper.selectOutJobCounts(startDate, endDate);
|
||||
|
||||
// 如果查询结果不为空,更新对应日期的数量
|
||||
if (queryInCounts != null && !queryInCounts.isEmpty()) {
|
||||
inJobCounts = new ArrayList<>(inJobCounts);
|
||||
for (int i = 0; i < queryInCounts.size(); i++) {
|
||||
inJobCounts.set(i, queryInCounts.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
if (queryOutCounts != null && !queryOutCounts.isEmpty()) {
|
||||
outJobCounts = new ArrayList<>(outJobCounts);
|
||||
for (int i = 0; i < queryOutCounts.size(); i++) {
|
||||
outJobCounts.set(i, queryOutCounts.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
// 封装结果
|
||||
WeekJobCount weekJobCount = new WeekJobCount();
|
||||
weekJobCount.setInJobCounts(inJobCounts);
|
||||
weekJobCount.setOutJobCounts(outJobCounts);
|
||||
|
||||
return weekJobCount;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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.index.mapper.BillStatusCountMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.index.domain.BillStatusCount" id="BillStatusCountResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="type" column="type"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectStockinStatusCount" resultMap="BillStatusCountResult">
|
||||
select stockin_id as id, status, '1' as type
|
||||
from in_stockin
|
||||
where status in ('1', '2', '3')
|
||||
</select>
|
||||
|
||||
<select id="selectStockoutStatusCount" resultMap="BillStatusCountResult">
|
||||
select stockout_id as id, status, '2' as type
|
||||
from out_stockout
|
||||
where status in ('1', '2', '3')
|
||||
</select>
|
||||
|
||||
<select id="selectStockcheckStatusCount" resultMap="BillStatusCountResult">
|
||||
select stock_check_id as id, status, '3' as type
|
||||
from check_stockin
|
||||
where status in ('1', '2', '3')
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?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.index.mapper.CargoSpaceCountMapper">
|
||||
|
||||
<select id="selectStatusCount" resultType="java.util.Map">
|
||||
SELECT status, COUNT(*) as count
|
||||
FROM bas_cargo_space
|
||||
WHERE status IN ('1', '2', '3', '4', '5', '6')
|
||||
GROUP BY status
|
||||
ORDER BY status
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?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.index.mapper.IndexCountMapper">
|
||||
|
||||
<!-- 查询已完成入库单数量 -->
|
||||
<select id="selectStockinFinishCount" resultType="Integer">
|
||||
select count(1) from in_stockin_finish
|
||||
</select>
|
||||
|
||||
<!-- 查询已完成出库单数量 -->
|
||||
<select id="selectStockoutFinishCount" resultType="Integer">
|
||||
select count(1) from out_stockout_finish
|
||||
</select>
|
||||
|
||||
<!-- 查询已完成盘点单数量 -->
|
||||
<select id="selectStockcheckFinishCount" resultType="Integer">
|
||||
select count(1) from check_stockin_finish
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?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.index.mapper.ViewIndexJobMapper">
|
||||
|
||||
<resultMap type="ViewIndexJob" id="ViewIndexJobResult">
|
||||
<result property="jobId" column="job_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="statusLabel" column="status_label" />
|
||||
<result property="inOrOut" column="in_or_out" />
|
||||
<result property="priority" column="priority" />
|
||||
</resultMap>
|
||||
|
||||
<select id="selectViewIndexJobByStatus" parameterType="String" resultMap="ViewIndexJobResult">
|
||||
select
|
||||
job_id,
|
||||
status,
|
||||
status_label,
|
||||
in_or_out,
|
||||
priority
|
||||
from view_index_job
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?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.index.mapper.WeekJobCountMapper">
|
||||
|
||||
<!-- 查询指定日期范围内每天的入库作业数量 -->
|
||||
<select id="selectInJobCounts" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(*) as count
|
||||
FROM
|
||||
mydo_job_finish
|
||||
WHERE
|
||||
in_or_out < 20
|
||||
AND CAST(create_time AS DATE) BETWEEN #{startDate} AND #{endDate}
|
||||
GROUP BY
|
||||
CAST(create_time AS DATE)
|
||||
ORDER BY
|
||||
CAST(create_time AS DATE)
|
||||
</select>
|
||||
|
||||
<!-- 查询指定日期范围内每天的出库作业数量 -->
|
||||
<select id="selectOutJobCounts" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(*) as count
|
||||
FROM
|
||||
mydo_job_finish
|
||||
WHERE
|
||||
in_or_out >= 20
|
||||
AND CAST(create_time AS DATE) BETWEEN #{startDate} AND #{endDate}
|
||||
GROUP BY
|
||||
CAST(create_time AS DATE)
|
||||
ORDER BY
|
||||
CAST(create_time AS DATE)
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +1,5 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = ForTucky WMS system
|
||||
VUE_APP_TITLE = "ForTucky WMS system"
|
||||
|
||||
# 开发环境配置
|
||||
ENV = 'development'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# 页面标题
|
||||
VUE_APP_TITLE = 若依管理系统
|
||||
VUE_APP_TITLE = "ForTucky WMS system"
|
||||
|
||||
# 生产环境配置
|
||||
ENV = 'production'
|
||||
|
||||
42
ruoyi-ui/src/api/index.js
Normal file
42
ruoyi-ui/src/api/index.js
Normal file
@@ -0,0 +1,42 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 所有的单据数量
|
||||
export function finishCount(query) {
|
||||
return request({
|
||||
url: '/index/finishCount',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
//周出库入库作业数量
|
||||
export function weekjob(query) {
|
||||
return request({
|
||||
url: '/index/weekjob/count',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 库位统计
|
||||
export function cargospace(query) {
|
||||
return request({
|
||||
url: '/index/cargospace/count',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 单据列表
|
||||
export function billStatus(query) {
|
||||
return request({
|
||||
url: '/index/bill/status',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
//正执行待执行任务
|
||||
export function jobStatus(query) {
|
||||
return request({
|
||||
url: '/index/job/status',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
@@ -90,16 +90,15 @@ export default {
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
data: ['expected', 'actual']
|
||||
data: ['入库', '出库']
|
||||
},
|
||||
series: [{
|
||||
name: 'expected', itemStyle: {
|
||||
normal: {
|
||||
color: '#FF005A',
|
||||
lineStyle: {
|
||||
color: '#FF005A',
|
||||
width: 2
|
||||
}
|
||||
name: '入库',
|
||||
itemStyle: {
|
||||
color: '#ff4d00',
|
||||
lineStyle: {
|
||||
color: '#ff4d00',
|
||||
width: 2
|
||||
}
|
||||
},
|
||||
smooth: true,
|
||||
@@ -109,21 +108,19 @@ export default {
|
||||
animationEasing: 'cubicInOut'
|
||||
},
|
||||
{
|
||||
name: 'actual',
|
||||
name: '出库',
|
||||
smooth: true,
|
||||
type: 'line',
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: '#3888fa',
|
||||
lineStyle: {
|
||||
color: '#3888fa',
|
||||
width: 2
|
||||
},
|
||||
areaStyle: {
|
||||
color: '#f3f8ff'
|
||||
}
|
||||
color: '#3f9dfd',
|
||||
lineStyle: {
|
||||
color: '#3f9dfd',
|
||||
width: 2
|
||||
}
|
||||
},
|
||||
areaStyle: {
|
||||
color: '#f3f8ff'
|
||||
},
|
||||
data: actualData,
|
||||
animationDuration: 2800,
|
||||
animationEasing: 'quadraticOut'
|
||||
|
||||
@@ -1,38 +1,68 @@
|
||||
<template>
|
||||
<!-- 图表容器,使用传入的类名和样式 -->
|
||||
<div :class="className" :style="{height:height,width:width}" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// 导入 echarts 库
|
||||
import * as echarts from 'echarts'
|
||||
// 导入 macarons 主题
|
||||
require('echarts/theme/macarons') // echarts theme
|
||||
// 导入 resize 混入,用于处理图表大小调整
|
||||
import resize from './mixins/resize'
|
||||
|
||||
export default {
|
||||
// 混入 resize 处理逻辑
|
||||
mixins: [resize],
|
||||
// 组件属性定义
|
||||
props: {
|
||||
// 图表容器的类名
|
||||
className: {
|
||||
type: String,
|
||||
default: 'chart'
|
||||
},
|
||||
// 图表容器的宽度
|
||||
width: {
|
||||
type: String,
|
||||
default: '100%'
|
||||
},
|
||||
// 图表容器的高度
|
||||
height: {
|
||||
type: String,
|
||||
default: '300px'
|
||||
default: '350px'
|
||||
},
|
||||
// 图表数据对象,包含标签和数据集
|
||||
chartData: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
// 组件数据
|
||||
data() {
|
||||
return {
|
||||
// echarts 实例
|
||||
chart: null
|
||||
}
|
||||
},
|
||||
// 监听器
|
||||
watch: {
|
||||
// 监听图表数据变化
|
||||
chartData: {
|
||||
// 深度监听对象变化
|
||||
deep: true,
|
||||
// 数据变化时更新图表
|
||||
handler(val) {
|
||||
this.setOptions(val)
|
||||
}
|
||||
}
|
||||
},
|
||||
// 组件挂载后初始化图表
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.initChart()
|
||||
})
|
||||
},
|
||||
// 组件销毁前清理图表实例
|
||||
beforeDestroy() {
|
||||
if (!this.chart) {
|
||||
return
|
||||
@@ -40,36 +70,61 @@ export default {
|
||||
this.chart.dispose()
|
||||
this.chart = null
|
||||
},
|
||||
// 组件方法
|
||||
methods: {
|
||||
// 初始化图表
|
||||
initChart() {
|
||||
// 创建 echarts 实例,使用 macarons 主题
|
||||
this.chart = echarts.init(this.$el, 'macarons')
|
||||
// 设置图表配置项
|
||||
this.setOptions(this.chartData)
|
||||
},
|
||||
// 设置图表配置项
|
||||
setOptions({ labels = [], datasets = [] } = {}) {
|
||||
// 将标签和数据转换为 echarts 所需的数据格式
|
||||
const data = labels.map((name, index) => ({
|
||||
name,
|
||||
value: datasets[0]?.data[index] || 0,
|
||||
itemStyle: {
|
||||
color: datasets[0]?.backgroundColor[index]
|
||||
}
|
||||
}))
|
||||
|
||||
// 设置图表配置
|
||||
this.chart.setOption({
|
||||
// 提示框配置
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '{a} <br/>{b} : {c} ({d}%)'
|
||||
trigger: 'item', // 触发类型:数据项
|
||||
formatter: '{b} : {c} ({d}%)' // 提示框内容格式
|
||||
},
|
||||
// 图例配置
|
||||
legend: {
|
||||
left: 'center',
|
||||
bottom: '10',
|
||||
data: ['Industries', 'Technology', 'Forex', 'Gold', 'Forecasts']
|
||||
left: 'center', // 水平居中
|
||||
bottom: '10', // 距底部距离
|
||||
data: labels // 图例数据
|
||||
},
|
||||
// 系列列表配置
|
||||
series: [
|
||||
{
|
||||
name: 'WEEKLY WRITE ARTICLES',
|
||||
type: 'pie',
|
||||
roseType: 'radius',
|
||||
radius: [15, 95],
|
||||
center: ['50%', '38%'],
|
||||
data: [
|
||||
{ value: 320, name: 'Industries' },
|
||||
{ value: 240, name: 'Technology' },
|
||||
{ value: 149, name: 'Forex' },
|
||||
{ value: 100, name: 'Gold' },
|
||||
{ value: 59, name: 'Forecasts' }
|
||||
],
|
||||
animationEasing: 'cubicInOut',
|
||||
animationDuration: 2600
|
||||
name: '库位统计', // 系列名称
|
||||
type: 'pie', // 图表类型:饼图
|
||||
roseType: 'radius', // 南丁格尔玫瑰图
|
||||
radius: ['20%', '70%'], // 内外半径,形成环形图
|
||||
center: ['50%', '38%'], // 中心点位置
|
||||
data, // 系列数据
|
||||
animationEasing: 'cubicInOut', // 动画缓动效果
|
||||
animationDuration: 2600, // 动画持续时间
|
||||
label: {
|
||||
show: true,
|
||||
formatter: '{b}: {d}%'
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: true,
|
||||
fontSize: '14',
|
||||
fontWeight: 'bold'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
@@ -1,198 +1,375 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="row">
|
||||
<!-- 未完成入库任务概览 -->
|
||||
<div class="col-sm-6" style="height: 45vh; padding: 10px;">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{$t('viewsMain.unfinishedInboundTask')}}</span>
|
||||
<!-- 顶部统计面板 -->
|
||||
<el-row :gutter="40" class="panel-group">
|
||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
||||
<div class="card-panel">
|
||||
<div class="card-panel-icon-wrapper icon-people">
|
||||
<svg-icon icon-class="clipboard" class-name="card-panel-icon"/>
|
||||
</div>
|
||||
<el-table
|
||||
:data="table1Data"
|
||||
style="width: 100%"
|
||||
:height="tableHeight"
|
||||
v-loading="loading1">
|
||||
<el-table-column prop="workValue" :label="$t('viewsMain.taskKey')" /> <!-- 任务键值 -->
|
||||
<el-table-column prop="workName" :label="$t('viewsMain.unfinishedInboundTaskName')" /><!-- 未完成入库任务 -->
|
||||
<el-table-column prop="workNum" :label="$t('viewsMain.totalUnfinishedCount')" ><!-- 全部未完成数量 -->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ Number(scope.row.workNum).toFixed(6) }}-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column prop="by1" :label="$t('viewsMain.todayUnfinishedCount')"> <!-- 今日未完成数量 -->
|
||||
<!-- <template slot-scope="scope">
|
||||
{{ Number(scope.row.by1).toFixed(6) }}
|
||||
</template>-->
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div class="card-panel-text">入库单数</div>
|
||||
<count-to :start-val="0" :end-val="Number(quantity.inbound_order) || 0" :duration="2600" class="card-panel-num"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
||||
<div class="card-panel">
|
||||
<div class="card-panel-icon-wrapper icon-message">
|
||||
<svg-icon icon-class="documentation" class-name="card-panel-icon"/>
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div class="card-panel-text">出库单数</div>
|
||||
<count-to :start-val="0" :end-val="Number(quantity.outbound_order) || 0" :duration="3000" class="card-panel-num"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
||||
<div class="card-panel">
|
||||
<div class="card-panel-icon-wrapper icon-money">
|
||||
<svg-icon icon-class="chart" class-name="card-panel-icon"/>
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div class="card-panel-text">盘点单数</div>
|
||||
<count-to :start-val="0" :end-val="Number(quantity.inbound_order)|| 0" :duration="3200" class="card-panel-num"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
||||
<div class="card-panel">
|
||||
<div class="card-panel-icon-wrapper icon-shopping">
|
||||
<svg-icon icon-class="excel" class-name="card-panel-icon"/>
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div class="card-panel-text">总单据数</div>
|
||||
<count-to :start-val="0" :end-val="Number(quantity.total_documents)|| 0" :duration="3600" class="card-panel-num"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 已完成入库任务概览 -->
|
||||
<div class="col-sm-6" style="height: 45vh; padding: 10px;">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{$t('viewsMain.finishedInboundTask')}}</span>
|
||||
<!-- 中间图表区域 -->
|
||||
<el-row :gutter="32" style="margin-bottom: 32px;">
|
||||
<el-col :xs="24" :sm="24" :lg="16">
|
||||
<div class="chart-wrapper">
|
||||
<div class="chart-header">
|
||||
<span>近一周入库出库统计</span>
|
||||
</div>
|
||||
<el-table
|
||||
:data="table2Data"
|
||||
style="width: 100%"
|
||||
:height="tableHeight"
|
||||
v-loading="loading2">
|
||||
<el-table-column prop="workValue" :label="$t('viewsMain.taskKey')" /><!-- 任务键值 -->
|
||||
<el-table-column prop="workName" :label="$t('viewsMain.finishedInboundTaskName')" /><!-- 已完成入库任务 -->
|
||||
<el-table-column prop="workNum" :label="$t('viewsMain.totalFinishedCount')" ><!-- 全部已完成数量 -->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ Number(scope.row.workNum).toFixed(6) }}-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column prop="by1" :label="$t('viewsMain.todayFinishedCount')"> <!-- 今日已完成数量 -->
|
||||
<!-- <template slot-scope="scope">
|
||||
{{ Number(scope.row.by1).toFixed(6) }}-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
<line-chart :chart-data="lineChartData"/>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :lg="8">
|
||||
<div class="chart-wrapper">
|
||||
<div class="chart-header">
|
||||
<span>库位统计</span>
|
||||
</div>
|
||||
<pie-chart :chart-data="pieChartData"/>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 未完成出库任务概览 -->
|
||||
<div class="col-sm-6" style="height: 45vh; padding: 10px;">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{$t('viewsMain.unfinishedOutboundTask')}}</span>
|
||||
<!-- 底部列表区域 -->
|
||||
<el-row :gutter="32">
|
||||
<el-col :xs="24" :sm="24" :lg="8">
|
||||
<div class="list-wrapper">
|
||||
<div class="list-header">
|
||||
<span>单据列表</span>
|
||||
</div>
|
||||
<el-table
|
||||
:data="table3Data"
|
||||
style="width: 100%"
|
||||
:height="tableHeight"
|
||||
v-loading="loading3">
|
||||
<el-table-column prop="workValue" :label="$t('viewsMain.taskKey')" /><!-- 任务键值 -->
|
||||
<el-table-column prop="workName" :label="$t('viewsMain.unfinishedOutboundTaskName')" /><!-- 未完成出库任务 -->
|
||||
<el-table-column prop="workNum" :label="$t('viewsMain.totalUnfinishedCount')"><!-- 全部未完成数量 -->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ Number(scope.row.workNum).toFixed(6) }}-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column prop="by1" :label="$t('viewsMain.todayUnfinishedCount')"> <!-- 今日未完成数量 -->
|
||||
<!-- <template slot-scope="scope">
|
||||
{{ Number(scope.row.by1).toFixed(6) }}-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table :data="documentList" style="width: 100%" size="mini" height="300"
|
||||
:header-cell-style="{backgroundColor: '#f5f7fa'}">
|
||||
<el-table-column prop="id" label="单据编号"/>
|
||||
<el-table-column prop="type" :formatter="type_" label="类型" width="80"/>
|
||||
<el-table-column prop="status" :formatter="status_" label="状态" width="80"/>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<!-- 已完成出库任务概览 -->
|
||||
<div class="col-sm-6" style="height: 45vh; padding: 10px;">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{$t('viewsMain.finishedOutboundTask')}}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :lg="8">
|
||||
<div class="list-wrapper">
|
||||
<div class="list-header">
|
||||
<span>正执行任务</span>
|
||||
</div>
|
||||
<el-table
|
||||
:data="table4Data"
|
||||
style="width: 100%"
|
||||
:height="tableHeight"
|
||||
v-loading="loading4">
|
||||
<el-table-column prop="workValue" :label="$t('viewsMain.taskKey')" /><!-- 任务键值 -->
|
||||
<el-table-column prop="workName" :label="$t('viewsMain.finishedOutboundTaskName')" /><!-- 已完成出库任务 -->
|
||||
<el-table-column prop="workNum" :label="$t('viewsMain.totalFinishedCount')" ><!-- 全部已完成数量 -->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ Number(scope.row.workNum).toFixed(6) }}-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column prop="by1" :label="$t('viewsMain.todayFinishedCount')"> <!-- 今日已完成数量 -->
|
||||
<!-- <template slot-scope="scope">
|
||||
{{ Number(scope.row.by1).toFixed(6) }}-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table :data="executingTasks" style="width: 100%" size="mini" height="300"
|
||||
:header-cell-style="{backgroundColor: '#f5f7fa'}">
|
||||
<el-table-column prop="jobId" label="任务编号"/>
|
||||
<el-table-column prop="inOrOut" label="类型" width="80"/>
|
||||
<el-table-column prop="statusLabel" label="状态" width="80"/>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :lg="8">
|
||||
<div class="list-wrapper">
|
||||
<div class="list-header">
|
||||
<span>待执行任务</span>
|
||||
</div>
|
||||
<el-table :data="pendingTasks" style="width: 100%" size="mini" height="300"
|
||||
:header-cell-style="{backgroundColor: '#f5f7fa'}">
|
||||
<el-table-column prop="jobId" label="任务编号"/>
|
||||
<el-table-column prop="inOrOut" label="类型" width="80"/>
|
||||
<el-table-column prop="priority" label="优先级" width="80"/>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listWork1, listWork2, listWork3, listWork4 } from '@/api/work'
|
||||
import CountTo from 'vue-count-to'
|
||||
import LineChart from './dashboard/LineChart'
|
||||
import PieChart from './dashboard/PieChart'
|
||||
import {finishCount, weekjob, cargospace, billStatus, jobStatus} from "@/api/index";
|
||||
|
||||
export default {
|
||||
name: 'Index',
|
||||
components: {
|
||||
CountTo,
|
||||
LineChart,
|
||||
PieChart
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 表格数据
|
||||
table1Data: [],
|
||||
table2Data: [],
|
||||
table3Data: [],
|
||||
table4Data: [],
|
||||
// 加载状态
|
||||
loading1: false,
|
||||
loading2: false,
|
||||
loading3: false,
|
||||
loading4: false,
|
||||
// 表格高度
|
||||
tableHeight: '35vh',
|
||||
// 定时器
|
||||
quantity: {
|
||||
inbound_order: '',
|
||||
outbound_order: '',
|
||||
inventory_sheet: '',
|
||||
total_documents: ''
|
||||
},
|
||||
chartType: '入库',
|
||||
lineChartData: {
|
||||
expectedData: [],
|
||||
actualData: []
|
||||
},
|
||||
pieChartData: {
|
||||
labels: ['空货位', '满货位', '入库已分配', '出库已分配', '入库需盘点', '出库需盘点'],
|
||||
datasets: [{
|
||||
data: [],
|
||||
backgroundColor: ['#36f7c4', '#ffc240', '#34bfa3', '#ff5f5f', '#ffd700', '#c669cd']
|
||||
}]
|
||||
},
|
||||
documentList: [],
|
||||
executingTasks: [],
|
||||
pendingTasks: [],
|
||||
timer: null
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
// 开启定时刷新
|
||||
this.timer = setInterval(this.getList, 10000)
|
||||
this.getListData()
|
||||
this.timer = setInterval(() => {
|
||||
this.getListData()
|
||||
}, 5000)
|
||||
},
|
||||
beforeDestroy() {
|
||||
// 组件销毁前清除定时器
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer)
|
||||
this.timer = null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 获取数据列表 */
|
||||
getList() {
|
||||
this.loading1 = true
|
||||
this.loading2 = true
|
||||
this.loading3 = true
|
||||
this.loading4 = true
|
||||
|
||||
// 获取未完成入库任务
|
||||
listWork3().then(response => {
|
||||
this.table1Data = response.rows
|
||||
this.loading1 = false
|
||||
getListData() {
|
||||
// 所有单据数量
|
||||
finishCount().then(response => {
|
||||
this.quantity.inbound_order = response.data.stockinCount
|
||||
this.quantity.outbound_order = response.data.stockoutCount
|
||||
this.quantity.inventory_sheet = response.data.stockcheckCount
|
||||
this.quantity.total_documents = response.data.stockinCount + response.data.stockoutCount + response.data.stockcheckCount
|
||||
})
|
||||
// 周入库出库作业
|
||||
weekjob().then(response => {
|
||||
this.lineChartData.expectedData = response.data.inJobCounts
|
||||
this.lineChartData.actualData = response.data.outJobCounts
|
||||
})
|
||||
// 库位统计
|
||||
cargospace().then(response => {
|
||||
this.pieChartData.datasets[0].data = response.data.statusCounts
|
||||
})
|
||||
// 单据列表
|
||||
billStatus().then(response => {
|
||||
this.documentList = response.data
|
||||
})
|
||||
// 正执行待执行作业
|
||||
jobStatus().then(response => {
|
||||
this.executingTasks = response.data.status3
|
||||
this.pendingTasks = response.data.status2
|
||||
})
|
||||
|
||||
// 获取已完成入库任务
|
||||
listWork1().then(response => {
|
||||
this.table2Data = response.rows
|
||||
this.loading2 = false
|
||||
})
|
||||
|
||||
// 获取未完成出库任务
|
||||
listWork4().then(response => {
|
||||
this.table3Data = response.rows
|
||||
this.loading3 = false
|
||||
})
|
||||
|
||||
// 获取已完成出库任务
|
||||
listWork2().then(response => {
|
||||
this.table4Data = response.rows
|
||||
this.loading4 = false
|
||||
})
|
||||
},
|
||||
type_(row, column) {
|
||||
const type = row.type
|
||||
if (type == 1) {
|
||||
return "入库"
|
||||
} else if (type == 2) {
|
||||
return "出库"
|
||||
} else if (type == 3) {
|
||||
return "盘点"
|
||||
}
|
||||
return ""
|
||||
},
|
||||
status_(row, column) {
|
||||
const status = row.status
|
||||
if (status == 1) {
|
||||
return "未执行"
|
||||
} else if (status == 2) {
|
||||
return "审核中"
|
||||
} else if (status == 3) {
|
||||
return "正执行"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.row {
|
||||
<style lang="scss" scoped>
|
||||
.panel-group {
|
||||
margin-top: 18px;
|
||||
|
||||
.card-panel-col {
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.card-panel {
|
||||
height: 108px;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #666;
|
||||
background: #fff;
|
||||
box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
|
||||
border-color: rgba(0, 0, 0, .05);
|
||||
|
||||
&:hover {
|
||||
.card-panel-icon-wrapper {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.icon-people {
|
||||
background: #40c9c6;
|
||||
}
|
||||
|
||||
.icon-message {
|
||||
background: #36a3f7;
|
||||
}
|
||||
|
||||
.icon-money {
|
||||
background: #f4516c;
|
||||
}
|
||||
|
||||
.icon-shopping {
|
||||
background: #34bfa3;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-people {
|
||||
color: #40c9c6;
|
||||
}
|
||||
|
||||
.icon-message {
|
||||
color: #36a3f7;
|
||||
}
|
||||
|
||||
.icon-money {
|
||||
color: #f4516c;
|
||||
}
|
||||
|
||||
.icon-shopping {
|
||||
color: #34bfa3;
|
||||
}
|
||||
|
||||
.card-panel-icon-wrapper {
|
||||
float: left;
|
||||
margin: 14px 0 0 14px;
|
||||
padding: 16px;
|
||||
transition: all 0.38s ease-out;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.card-panel-icon {
|
||||
float: left;
|
||||
font-size: 48px;
|
||||
}
|
||||
|
||||
.card-panel-description {
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
margin: 26px;
|
||||
margin-left: 0px;
|
||||
|
||||
.card-panel-text {
|
||||
line-height: 18px;
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
font-size: 16px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.card-panel-num {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.chart-wrapper {
|
||||
background: #fff;
|
||||
padding: 16px;
|
||||
margin-bottom: 32px;
|
||||
border-radius: 4px;
|
||||
box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
|
||||
}
|
||||
|
||||
.chart-header {
|
||||
border-bottom: 1px solid #eee;
|
||||
padding-bottom: 16px;
|
||||
margin-bottom: 16px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: 0 -10px;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #303133;
|
||||
}
|
||||
}
|
||||
.col-sm-6 {
|
||||
width: 50%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.box-card {
|
||||
height: 100%;
|
||||
|
||||
.list-wrapper {
|
||||
background: #fff;
|
||||
padding: 16px;
|
||||
margin-bottom: 32px;
|
||||
border-radius: 4px;
|
||||
box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
|
||||
height: 380px;
|
||||
|
||||
.list-header {
|
||||
border-bottom: 1px solid #eee;
|
||||
padding-bottom: 16px;
|
||||
margin-bottom: 16px;
|
||||
|
||||
span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #303133;
|
||||
}
|
||||
}
|
||||
|
||||
.el-table {
|
||||
::v-deep .el-table__body-wrapper {
|
||||
&::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
border-radius: 3px;
|
||||
background: #e0e0e0;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-track {
|
||||
border-radius: 3px;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
198
ruoyi-ui/src/views/index_old.vue
Normal file
198
ruoyi-ui/src/views/index_old.vue
Normal file
@@ -0,0 +1,198 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="row">
|
||||
<!-- 未完成入库任务概览 -->
|
||||
<div class="col-sm-6" style="height: 45vh; padding: 10px;">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{$t('viewsMain.unfinishedInboundTask')}}</span>
|
||||
</div>
|
||||
<el-table
|
||||
:data="table1Data"
|
||||
style="width: 100%"
|
||||
:height="tableHeight"
|
||||
v-loading="loading1">
|
||||
<el-table-column prop="workValue" :label="$t('viewsMain.taskKey')" /> <!-- 任务键值 -->
|
||||
<el-table-column prop="workName" :label="$t('viewsMain.unfinishedInboundTaskName')" /><!-- 未完成入库任务 -->
|
||||
<el-table-column prop="workNum" :label="$t('viewsMain.totalUnfinishedCount')" ><!-- 全部未完成数量 -->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ Number(scope.row.workNum).toFixed(6) }}-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column prop="by1" :label="$t('viewsMain.todayUnfinishedCount')"> <!-- 今日未完成数量 -->
|
||||
<!-- <template slot-scope="scope">
|
||||
{{ Number(scope.row.by1).toFixed(6) }}
|
||||
</template>-->
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<!-- 已完成入库任务概览 -->
|
||||
<div class="col-sm-6" style="height: 45vh; padding: 10px;">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{$t('viewsMain.finishedInboundTask')}}</span>
|
||||
</div>
|
||||
<el-table
|
||||
:data="table2Data"
|
||||
style="width: 100%"
|
||||
:height="tableHeight"
|
||||
v-loading="loading2">
|
||||
<el-table-column prop="workValue" :label="$t('viewsMain.taskKey')" /><!-- 任务键值 -->
|
||||
<el-table-column prop="workName" :label="$t('viewsMain.finishedInboundTaskName')" /><!-- 已完成入库任务 -->
|
||||
<el-table-column prop="workNum" :label="$t('viewsMain.totalFinishedCount')" ><!-- 全部已完成数量 -->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ Number(scope.row.workNum).toFixed(6) }}-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column prop="by1" :label="$t('viewsMain.todayFinishedCount')"> <!-- 今日已完成数量 -->
|
||||
<!-- <template slot-scope="scope">
|
||||
{{ Number(scope.row.by1).toFixed(6) }}-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<!-- 未完成出库任务概览 -->
|
||||
<div class="col-sm-6" style="height: 45vh; padding: 10px;">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{$t('viewsMain.unfinishedOutboundTask')}}</span>
|
||||
</div>
|
||||
<el-table
|
||||
:data="table3Data"
|
||||
style="width: 100%"
|
||||
:height="tableHeight"
|
||||
v-loading="loading3">
|
||||
<el-table-column prop="workValue" :label="$t('viewsMain.taskKey')" /><!-- 任务键值 -->
|
||||
<el-table-column prop="workName" :label="$t('viewsMain.unfinishedOutboundTaskName')" /><!-- 未完成出库任务 -->
|
||||
<el-table-column prop="workNum" :label="$t('viewsMain.totalUnfinishedCount')"><!-- 全部未完成数量 -->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ Number(scope.row.workNum).toFixed(6) }}-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column prop="by1" :label="$t('viewsMain.todayUnfinishedCount')"> <!-- 今日未完成数量 -->
|
||||
<!-- <template slot-scope="scope">
|
||||
{{ Number(scope.row.by1).toFixed(6) }}-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<!-- 已完成出库任务概览 -->
|
||||
<div class="col-sm-6" style="height: 45vh; padding: 10px;">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{$t('viewsMain.finishedOutboundTask')}}</span>
|
||||
</div>
|
||||
<el-table
|
||||
:data="table4Data"
|
||||
style="width: 100%"
|
||||
:height="tableHeight"
|
||||
v-loading="loading4">
|
||||
<el-table-column prop="workValue" :label="$t('viewsMain.taskKey')" /><!-- 任务键值 -->
|
||||
<el-table-column prop="workName" :label="$t('viewsMain.finishedOutboundTaskName')" /><!-- 已完成出库任务 -->
|
||||
<el-table-column prop="workNum" :label="$t('viewsMain.totalFinishedCount')" ><!-- 全部已完成数量 -->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ Number(scope.row.workNum).toFixed(6) }}-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column prop="by1" :label="$t('viewsMain.todayFinishedCount')"> <!-- 今日已完成数量 -->
|
||||
<!-- <template slot-scope="scope">
|
||||
{{ Number(scope.row.by1).toFixed(6) }}-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listWork1, listWork2, listWork3, listWork4 } from '@/api/work'
|
||||
|
||||
export default {
|
||||
name: 'Index',
|
||||
data() {
|
||||
return {
|
||||
// 表格数据
|
||||
table1Data: [],
|
||||
table2Data: [],
|
||||
table3Data: [],
|
||||
table4Data: [],
|
||||
// 加载状态
|
||||
loading1: false,
|
||||
loading2: false,
|
||||
loading3: false,
|
||||
loading4: false,
|
||||
// 表格高度
|
||||
tableHeight: '35vh',
|
||||
// 定时器
|
||||
timer: null
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
// 开启定时刷新
|
||||
this.timer = setInterval(this.getList, 10000)
|
||||
},
|
||||
beforeDestroy() {
|
||||
// 组件销毁前清除定时器
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 获取数据列表 */
|
||||
getList() {
|
||||
this.loading1 = true
|
||||
this.loading2 = true
|
||||
this.loading3 = true
|
||||
this.loading4 = true
|
||||
|
||||
// 获取未完成入库任务
|
||||
listWork3().then(response => {
|
||||
this.table1Data = response.rows
|
||||
this.loading1 = false
|
||||
})
|
||||
|
||||
// 获取已完成入库任务
|
||||
listWork1().then(response => {
|
||||
this.table2Data = response.rows
|
||||
this.loading2 = false
|
||||
})
|
||||
|
||||
// 获取未完成出库任务
|
||||
listWork4().then(response => {
|
||||
this.table3Data = response.rows
|
||||
this.loading3 = false
|
||||
})
|
||||
|
||||
// 获取已完成出库任务
|
||||
listWork2().then(response => {
|
||||
this.table4Data = response.rows
|
||||
this.loading4 = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: 0 -10px;
|
||||
}
|
||||
.col-sm-6 {
|
||||
width: 50%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.box-card {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -97,7 +97,11 @@ this.getWarehouseList()
|
||||
/** 查询仓库列表 */
|
||||
getWarehouseList() {
|
||||
// TODO: 调用获取仓库列表接口
|
||||
listWarehouse().then(response => {
|
||||
var quaryParam = {
|
||||
pageNum:1,
|
||||
pageSize:99
|
||||
}
|
||||
listWarehouse(quaryParam).then(response => {
|
||||
this.warehouseOptions = response.rows;
|
||||
});
|
||||
// this.warehouseOptions = [{warehouseId: "01", warehouseName: "仓库1"}, {warehouseId: "02", warehouseName: "仓库2"}];
|
||||
@@ -321,13 +325,13 @@ this.getWarehouseList()
|
||||
formatTooltip(params) {
|
||||
if (params.seriesName !== '满位') {
|
||||
// 排
|
||||
if (this.$i18n.locale ==='zh-cn') {
|
||||
if (this.$i18n.locale ==='zh-cn') {
|
||||
return params.seriesName + '<br>' + this.queryParams.thePlatoon + '排' + (params.data[0] + 1) + '列' + (params.data[1] + 1) + '层';
|
||||
}
|
||||
else{
|
||||
return params.seriesName + '<br>' + this.$t('KPIAnalysis_CargoPlan.row') + ':' + this.queryParams.thePlatoon + ' ' + this.$t('KPIAnalysis_CargoPlan.column') + ':' + (params.data[0] + 1) + ' ' + this.$t('KPIAnalysis_CargoPlan.floor') + ': ' + (params.data[1] + 1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
const returnData = {
|
||||
|
||||
Reference in New Issue
Block a user