移动端下料报工

This commit is contained in:
z 2026-01-15 09:22:53 +08:00
parent a261418458
commit f34167b876
30 changed files with 1382 additions and 268 deletions

View File

@ -0,0 +1,95 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.formal;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.formal.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.formal.FormalDO;
import com.chanko.yunxi.mes.module.heli.service.formal.FormalService;
@Tag(name = "管理后台 - 重量计算公式维护")
@RestController
@RequestMapping("/heli/formal")
@Validated
public class FormalController {
@Resource
private FormalService formalService;
@PostMapping("/create")
@Operation(summary = "创建重量计算公式维护")
@PreAuthorize("@ss.hasPermission('heli:formal:create')")
public CommonResult<Long> createFormal(@Valid @RequestBody FormalSaveReqVO createReqVO) {
return success(formalService.createFormal(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新重量计算公式维护")
@PreAuthorize("@ss.hasPermission('heli:formal:update')")
public CommonResult<Boolean> updateFormal(@Valid @RequestBody FormalSaveReqVO updateReqVO) {
formalService.updateFormal(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除重量计算公式维护")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('heli:formal:delete')")
public CommonResult<Boolean> deleteFormal(@RequestParam("id") Long id) {
formalService.deleteFormal(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得重量计算公式维护")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('heli:formal:query')")
public CommonResult<FormalRespVO> getFormal(@RequestParam("id") Long id) {
FormalDO formal = formalService.getFormal(id);
return success(BeanUtils.toBean(formal, FormalRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得重量计算公式维护分页")
@PreAuthorize("@ss.hasPermission('heli:formal:query')")
public CommonResult<PageResult<FormalRespVO>> getFormalPage(@Valid FormalPageReqVO pageReqVO) {
PageResult<FormalDO> pageResult = formalService.getFormalPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, FormalRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出重量计算公式维护 Excel")
@PreAuthorize("@ss.hasPermission('heli:formal:export')")
@OperateLog(type = EXPORT)
public void exportFormalExcel(@Valid FormalPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<FormalDO> list = formalService.getFormalPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "重量计算公式维护.xls", "数据", FormalRespVO.class,
BeanUtils.toBean(list, FormalRespVO.class));
}
}

View File

@ -0,0 +1,34 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.formal.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 重量计算公式维护分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class FormalPageReqVO extends PageParam {
@Schema(description = "物料类型(1、块料 2、棒料 3、方料)", example = "1")
private String matType;
@Schema(description = "计算公式")
private String formal;
@Schema(description = "描述", example = "你猜")
private String description;
@Schema(description = "状态,1表示正常2表示禁用", example = "1")
private Boolean status;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}

View File

@ -0,0 +1,40 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.formal.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 重量计算公式维护 Response VO")
@Data
@ExcelIgnoreUnannotated
public class FormalRespVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "16843")
@ExcelProperty("自增字段,唯一")
private Long id;
@Schema(description = "物料类型(1、块料 2、棒料 3、方料)", example = "1")
@ExcelProperty("物料类型(1、块料 2、棒料 3、方料)")
private String matType;
@Schema(description = "计算公式", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("计算公式")
private String formal;
@Schema(description = "描述", example = "你猜")
@ExcelProperty("描述")
private String description;
@Schema(description = "状态,1表示正常2表示禁用", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty("状态,1表示正常2表示禁用")
private Boolean status;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}

View File

@ -0,0 +1,30 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.formal.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import java.util.*;
@Schema(description = "管理后台 - 重量计算公式维护新增/修改 Request VO")
@Data
public class FormalSaveReqVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "16843")
private Long id;
@Schema(description = "物料类型(1、块料 2、棒料 3、方料)", example = "1")
private String matType;
@Schema(description = "计算公式", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "计算公式不能为空")
private String formal;
@Schema(description = "描述", example = "你猜")
private String description;
@Schema(description = "状态,1表示正常2表示禁用", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "状态,1表示正常2表示禁用不能为空")
private Boolean status;
}

View File

@ -299,4 +299,23 @@ public class TaskDispatchController {
PageResult<TaskDispatchDetailDO> pageResult = taskDispatchService.getTaskDispatchPageDetailXl(pageReqVO);
return success(pageResult);
}
@GetMapping("/task-dispatch-detail/getXl")
@Operation(summary = "获得派工明细分页")
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:query')")
public CommonResult<TaskDispatchDetailDO> getXLTaskDetail(@Valid TaskDispatchDetailPageReqVO pageReqVO) {
TaskDispatchDetailDO pageResult = taskDispatchService.getXLTaskDetail(pageReqVO);
return success(pageResult);
}
@PostMapping("/task-dispatch-detail/verification")
@Operation(summary = "校验下料报工")
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:query')")
public CommonResult<Boolean> verification(@RequestBody TaskDispatchDetailPageReqVO pageReqVO) {
return taskDispatchService.verification(pageReqVO);
}
@PostMapping("/task-dispatch-detail/productionCompleted")
@Operation(summary = "下料报工完成")
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:query')")
public CommonResult<Boolean> productionCompleted(@RequestBody TaskDispatchDetailPageReqVO pageReqVO) {
return taskDispatchService.productionCompleted(pageReqVO);
}
}

View File

@ -37,9 +37,11 @@ public class TaskDispatchDetailPageReqVO extends PageParam {
@Schema(description = "bom明细id")
private Long bomDetailId;
@Schema(description = "项目或子项目id")
@Schema(description = "扫码查询")
private String subOrDetailName;
@Schema(description = "工序集合")
Set<String> procedureIds;
@Schema(description = "材质")
private String compositionName;
}

View File

@ -99,5 +99,18 @@ public class TaskInReportController {
ExcelUtils.write(response, "下料报工.xls", "数据", TaskInReportRespVO.class,
BeanUtils.toBean(list, TaskInReportRespVO.class));
}
@GetMapping("/getList")
@Operation(summary = "获得下料报工历史记录")
@PreAuthorize("@ss.hasPermission('heli:task-in-report:query')")
public CommonResult<List<TaskInReportDO>> getList(@Valid TaskInReportPageReqVO pageReqVO) {
List<TaskInReportDO> list = taskInReportService.getList(pageReqVO);
return success(list);
}
@PostMapping("/add")
@Operation(summary = "小程序下料报工")
@PreAuthorize("@ss.hasPermission('heli:task-in-report:create')")
public CommonResult<Long> addTaskInReport(@Valid @RequestBody TaskInReportSaveReqVO createReqVO) {
return success(taskInReportService.addTaskInReport(createReqVO));
}
}

View File

@ -21,9 +21,7 @@ public class TaskInReportSaveReqVO {
private Long dispatchDetailId;
@Schema(description = "负责人", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "负责人不能为空")
private Long owner;
@Schema(description = "数量")
private Integer amount;
@ -34,11 +32,9 @@ public class TaskInReportSaveReqVO {
private BigDecimal length;
@Schema(description = "是否已报工 0 默认否 1 是", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "是否已报工 0 默认否 1 是不能为空")
private Boolean hasReport;
@Schema(description = "状态,1表示正常2表示禁用", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "状态,1表示正常2表示禁用不能为空")
private Boolean status;
@Schema(description = "报工类型1、工时 2、价格", example = "2")
@ -73,5 +69,6 @@ public class TaskInReportSaveReqVO {
@Schema(description = "计算公式")
private String calFormal;
@Schema(description = "计算公式")
private String compositionName;
}

View File

@ -0,0 +1,47 @@
package com.chanko.yunxi.mes.module.heli.dal.dataobject.formal;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO;
/**
* 重量计算公式维护 DO
*
* @author 管理员
*/
@TableName("base_formal")
@KeySequence("base_formal_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class FormalDO extends BaseDO {
/**
* 自增字段唯一
*/
@TableId
private Long id;
/**
* 物料类型(1块料 2棒料 3方料)
*/
private String matType;
/**
* 计算公式
*/
private String formal;
/**
* 描述
*/
private String description;
/**
* 状态,1表示正常2表示禁用
*/
private Boolean status;
}

View File

@ -308,4 +308,10 @@ public class TaskDispatchDetailDO extends BaseDO {
private BigDecimal weight;
@TableField(exist = false)
private BigDecimal purchaseAmounts;
@TableField(exist = false)
private Integer totalAmount;
@TableField(exist = false)
private BigDecimal reportPrice;
@TableField(exist = false)
private BigDecimal price;
}

View File

@ -0,0 +1,30 @@
package com.chanko.yunxi.mes.module.heli.dal.mysql.formal;
import java.util.*;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.formal.FormalDO;
import org.apache.ibatis.annotations.Mapper;
import com.chanko.yunxi.mes.module.heli.controller.admin.formal.vo.*;
/**
* 重量计算公式维护 Mapper
*
* @author 管理员
*/
@Mapper
public interface FormalMapper extends BaseMapperX<FormalDO> {
default PageResult<FormalDO> selectPage(FormalPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<FormalDO>()
.eqIfPresent(FormalDO::getMatType, reqVO.getMatType())
.eqIfPresent(FormalDO::getFormal, reqVO.getFormal())
.eqIfPresent(FormalDO::getDescription, reqVO.getDescription())
.eqIfPresent(FormalDO::getStatus, reqVO.getStatus())
.betweenIfPresent(FormalDO::getCreateTime, reqVO.getCreateTime())
.orderByDesc(FormalDO::getId));
}
}

View File

@ -907,7 +907,7 @@ public interface TaskDispatchDetailMapper extends BaseMapperX<TaskDispatchDetail
query.selectAll(TaskDispatchDetailDO.class)
.select("a.bom_detail_id as bomDetailId")
.select("b.material_name as materialName","c.name as projectSubName")
.select("d.name as procedureName","u.nickname as ownerName")
.select("d.name as procedureName","CASE WHEN t.dispatch_type = 1 THEN u.nickname ELSE t.post_id END as ownerName")
.select("COALESCE(f.purchase_amount, e.boom_amount) AS purchaseAmounts")
.leftJoin(TaskDispatchDO.class,"a",TaskDispatchDO::getId,TaskDispatchDetailDO::getDispatchId)
.leftJoin(ProcessBomDetailDO.class,"b",ProcessBomDetailDO::getId,TaskDispatchDO::getBomDetailId)
@ -1013,4 +1013,27 @@ public interface TaskDispatchDetailMapper extends BaseMapperX<TaskDispatchDetail
return selectPage(reqVO, query);
}
default TaskDispatchDetailDO getXLTaskDetail(TaskDispatchDetailPageReqVO reqVO) {
MPJLambdaWrapper<TaskDispatchDetailDO> query = new MPJLambdaWrapper<>();
query.selectAll(TaskDispatchDetailDO.class)
.select("b.code as projectCode", "b.project_name as projectName", "c.name as projectSubName")
.select("d.material_name as materialName")
.select("e.name as procedureName")
.select("g.name as compositionName","g.density as density")
.select("g.price as price")
.selectSum(TaskInReportDO::getWeight, "weight")
.selectSum(TaskInReportDO::getReportPrice, "reportPrice")
.leftJoin(TaskDispatchDO.class, "a", TaskDispatchDO::getId, TaskDispatchDetailDO::getDispatchId)
.leftJoin(ProjectOrderDO.class, "b", ProjectOrderDO::getId, TaskDispatchDO::getProjectId)
.leftJoin(ProjectOrderSubDO.class, "c", ProjectOrderSubDO::getId, TaskDispatchDO::getProjectSubId)
.leftJoin(ProcessBomDetailDO.class, "d", ProcessBomDetailDO::getId, TaskDispatchDO::getBomDetailId)
.leftJoin(ProcedureDO.class, "e", ProcedureDO::getId, TaskDispatchDetailDO::getProcedureId)
.leftJoin(TaskInReportDO.class, "f", TaskInReportDO::getDispatchDetailId, TaskDispatchDetailDO::getId)
.leftJoin(CompositionDO.class, "g", CompositionDO::getId, ProcessBomDetailDO::getCompositionId)
.groupBy(TaskDispatchDetailDO::getId)
.disableSubLogicDel();
query.eq(TaskDispatchDetailDO::getId,reqVO.getId());
return selectOne(query);
}
}

View File

@ -73,4 +73,14 @@ public interface TaskInReportMapper extends BaseMapperX<TaskInReportDO> {
.ne(TaskInReportDO::getId, id)
.disableSubLogicDel());
}
default List<TaskInReportDO> getList(TaskInReportPageReqVO pageReqVO){
MPJLambdaWrapper<TaskInReportDO> query = new MPJLambdaWrapper<>();
query.selectAll(TaskInReportDO.class)
.select("u1.nickname as ownerName")
.leftJoin(AdminUserDO.class, "u1", AdminUserDO::getId, TaskInReportDO::getOwner);
query.orderByDesc(TaskInReportDO::getCreateTime);
query.eq(TaskInReportDO::getDispatchDetailId, pageReqVO.getDispatchDetailId());
return selectList(query);
}
}

View File

@ -0,0 +1,55 @@
package com.chanko.yunxi.mes.module.heli.service.formal;
import java.util.*;
import javax.validation.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.formal.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.formal.FormalDO;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
/**
* 重量计算公式维护 Service 接口
*
* @author 管理员
*/
public interface FormalService {
/**
* 创建重量计算公式维护
*
* @param createReqVO 创建信息
* @return 编号
*/
Long createFormal(@Valid FormalSaveReqVO createReqVO);
/**
* 更新重量计算公式维护
*
* @param updateReqVO 更新信息
*/
void updateFormal(@Valid FormalSaveReqVO updateReqVO);
/**
* 删除重量计算公式维护
*
* @param id 编号
*/
void deleteFormal(Long id);
/**
* 获得重量计算公式维护
*
* @param id 编号
* @return 重量计算公式维护
*/
FormalDO getFormal(Long id);
/**
* 获得重量计算公式维护分页
*
* @param pageReqVO 分页查询
* @return 重量计算公式维护分页
*/
PageResult<FormalDO> getFormalPage(FormalPageReqVO pageReqVO);
}

View File

@ -0,0 +1,74 @@
package com.chanko.yunxi.mes.module.heli.service.formal;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.formal.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.formal.FormalDO;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import com.chanko.yunxi.mes.module.heli.dal.mysql.formal.FormalMapper;
import static com.chanko.yunxi.mes.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*;
/**
* 重量计算公式维护 Service 实现类
*
* @author 管理员
*/
@Service
@Validated
public class FormalServiceImpl implements FormalService {
@Resource
private FormalMapper formalMapper;
@Override
public Long createFormal(FormalSaveReqVO createReqVO) {
// 插入
FormalDO formal = BeanUtils.toBean(createReqVO, FormalDO.class);
formalMapper.insert(formal);
// 返回
return formal.getId();
}
@Override
public void updateFormal(FormalSaveReqVO updateReqVO) {
// 校验存在
validateFormalExists(updateReqVO.getId());
// 更新
FormalDO updateObj = BeanUtils.toBean(updateReqVO, FormalDO.class);
formalMapper.updateById(updateObj);
}
@Override
public void deleteFormal(Long id) {
// 校验存在
validateFormalExists(id);
// 删除
formalMapper.deleteById(id);
}
private void validateFormalExists(Long id) {
if (formalMapper.selectById(id) == null) {
// throw exception(FORMAL_NOT_EXISTS);
}
}
@Override
public FormalDO getFormal(Long id) {
return formalMapper.selectById(id);
}
@Override
public PageResult<FormalDO> getFormalPage(FormalPageReqVO pageReqVO) {
return formalMapper.selectPage(pageReqVO);
}
}

View File

@ -2270,7 +2270,7 @@ public class PlanSubDetailServiceImpl implements PlanSubDetailService {
// 模拟 limit 1 的效果取第一条记录
PgMasterLineDO pgMasterLineDO = pgMasterLines.get(0);
dispatchDetailDO.setEndTime(pgMasterLineDO.getEntTime());
dispatchDetailDO.setReportTime(pgMasterLineDO.getEntTime());
if ("END".equals(pgMasterLineDO.getActive())) {
dispatchDetailDO.setReport("已完成");

View File

@ -1,5 +1,6 @@
package com.chanko.yunxi.mes.module.heli.service.taskdispatch;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.ygjx.vo.YgjxPageReqVO;
@ -114,4 +115,10 @@ public interface TaskDispatchService {
PageResult<TaskDispatchDetailDO> taskBbPage(TaskPlanJDBaoBiaoPageReqVO pageReqVO);
PageResult<TaskDispatchDetailDO> getTaskDispatchPageDetailXl(TaskDispatchDetailPageReqVO pageReqVO);
TaskDispatchDetailDO getXLTaskDetail(TaskDispatchDetailPageReqVO pageReqVO);
CommonResult<Boolean> verification(TaskDispatchDetailPageReqVO pageReqVO);
CommonResult<Boolean> productionCompleted(TaskDispatchDetailPageReqVO pageReqVO);
}

View File

@ -7,6 +7,7 @@ import com.alibaba.fastjson.TypeReference;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.chanko.yunxi.mes.framework.common.exception.ErrorCode;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
@ -14,6 +15,7 @@ import com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum;
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.ygjx.vo.YgjxPageReqVO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.bdgzsomthing.bdgzsomthingDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.composition.CompositionDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.customer.CustomerDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.equipmanufacture.EquipManufactureDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.fpuserdetail.FpUserDetailDO;
@ -34,6 +36,7 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatch
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatchdetailowner.TaskDispatchDetailOwnerDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskreport.TaskReportDO;
import com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.composition.CompositionMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.customer.CustomerMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.equipmanufacture.EquipManufactureMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.fpuserdetail.FpUserDetailMapper;
@ -144,6 +147,8 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
private MaterialPlanMapper materialPlanMapper;
@Resource
private CustomerMapper customerMapper;
@Resource
private CompositionMapper compositionMapper;
@Override
@Transactional(rollbackFor = Exception.class)
public Long createTaskDispatch(TaskDispatchSaveReqVO createReqVO) {
@ -272,11 +277,11 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
}
}
}else{
// if (taskDispatchDetailDO.getInReportProcess()!=0){
// if (ObjectUtil.isNotEmpty(procedureDO)) {
// throw exception(new ErrorCode(400, "该工序" + procedureDO.getName() + "已做下料,不允许修改外协!"));
// }
// }
if (taskDispatchDetailDO.getInReportProcess()!=0){
if (ObjectUtil.isNotEmpty(procedureDO)) {
throw exception(new ErrorCode(400, "该工序" + procedureDO.getName() + "已做下料,不允许修改外协!"));
}
}
}
// if (isDetailChanged(taskDispatchDetailDO, dispatchDetailDO)) {
// if (taskDispatchDetailDO.getPlanStatus()==1){
@ -694,9 +699,9 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
}
}
}
// if (ObjectUtil.isNotEmpty(taskDispatchDetailDO)&&taskDispatchDetailDO.getReportProcess()!=0){
// throw exception(new ErrorCode(400,"该工序已做下料报工,不允许删除"));
// }
if (ObjectUtil.isNotEmpty(taskDispatchDetailDO)&&taskDispatchDetailDO.getInReportProcess()!=0){
throw exception(new ErrorCode(400,"该工序已做下料报工,不允许删除"));
}
LambdaQueryWrapper<TaskDispatchDO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TaskDispatchDO::getId, taskDispatchDetailDO.getDispatchId());
TaskDispatchDO taskDispatchDO = taskDispatchMapper.selectOne(queryWrapper);
@ -1596,6 +1601,37 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
return taskDispatchDetailMapper.selectPageXl(pageReqVO, postIds);
}
@Override
public TaskDispatchDetailDO getXLTaskDetail(TaskDispatchDetailPageReqVO pageReqVO) {
return taskDispatchDetailMapper.getXLTaskDetail(pageReqVO);
}
@Override
public CommonResult<Boolean> verification(TaskDispatchDetailPageReqVO pageReqVO) {
TaskDispatchDetailDO taskDispatchDetailDO = taskDispatchDetailMapper.selectOne(TaskDispatchDetailDO::getId, pageReqVO.getId());
if (ObjectUtil.isEmpty(taskDispatchDetailDO)) return CommonResult.error(400,"当前数据不存在,请刷新界面");
if (2==taskDispatchDetailDO.getInReportProcess()) return CommonResult.error(400,"当前数据已报工完成,请刷新界面");
LambdaQueryWrapper<CompositionDO> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(CompositionDO::getName, pageReqVO.getCompositionName());
wrapper.last("limit 1");
CompositionDO compositionDO = compositionMapper.selectOne(wrapper);
if (ObjectUtil.isNotEmpty(compositionDO)){
if (ObjectUtil.isEmpty(compositionDO.getDensity())||BigDecimal.ZERO.compareTo(compositionDO.getDensity())==0) return CommonResult.error(400,"当前材质"+compositionDO.getName()+"没有密度,请维护。");
if (ObjectUtil.isEmpty(compositionDO.getPrice())||BigDecimal.ZERO.compareTo(compositionDO.getPrice())==0) return CommonResult.error(400,"当前材质"+compositionDO.getName()+"没有单价,请维护。");
}
return CommonResult.success( true);
}
@Override
public CommonResult<Boolean> productionCompleted(TaskDispatchDetailPageReqVO pageReqVO) {
TaskDispatchDetailDO taskDispatchDetailDO = taskDispatchDetailMapper.selectById(pageReqVO.getId());
if (ObjectUtil.isEmpty(taskDispatchDetailDO)) return CommonResult.error(400,"该派工单不存在,请退出刷新界面!");
if (2==taskDispatchDetailDO.getInReportProcess()) return CommonResult.error(400,"该派工单已报工完成,请刷新界面!");
taskDispatchDetailDO.setInReportProcess(2);
taskDispatchDetailMapper.updateById(taskDispatchDetailDO);
return CommonResult.success( true);
}
private void updateAssembleDetail(OperateTypeEnum operateTypeEnum,Long dispatchId, List<TaskDispatchDetailOwnerDO> list) {
list.forEach(o -> o.setDispatchId(dispatchId));
@ -1715,18 +1751,18 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
// 外协处理逻辑
item.setIsOutsourcing("Y");
item.setIsReport(0);
// if (ObjectUtil.isNotEmpty(procedureDO)) {
// if ("下料1".equals(procedureDO.getName())||"下料2".equals(procedureDO.getName())) {
// item.setIsInProcess("N");
// }
// }
if (ObjectUtil.isNotEmpty(procedureDO)) {
if ("下料1".equals(procedureDO.getName())||"下料2".equals(procedureDO.getName())) {
item.setIsInProcess("N");
}
}
}else {
item.setIsOutsourcing("N");
if (ObjectUtil.isNotEmpty(procedureDO)){
item.setIsReport(procedureDO.getIsReport());
// if ("下料1".equals(procedureDO.getName())||"下料2".equals(procedureDO.getName())) {
// item.setIsInProcess("Y");
// }
if ("下料1".equals(procedureDO.getName())||"下料2".equals(procedureDO.getName())) {
item.setIsInProcess("Y");
}
}
}
if ("true".equals(item.getIsFoam())) {

View File

@ -59,4 +59,7 @@ public interface TaskInReportService {
*/
PageResult<TaskInReportDO> getTaskInReportPage(TaskInReportPageReqVO pageReqVO);
List<TaskInReportDO> getList(TaskInReportPageReqVO pageReqVO);
Long addTaskInReport(TaskInReportSaveReqVO createReqVO);
}

View File

@ -1,7 +1,15 @@
package com.chanko.yunxi.mes.module.heli.service.taskinreport;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.composition.CompositionDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.formal.FormalDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
import com.chanko.yunxi.mes.module.heli.dal.mysql.composition.CompositionMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.formal.FormalMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchDetailMapper;
import com.chanko.yunxi.mes.module.heli.service.formal.FormalService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@ -16,9 +24,11 @@ import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskinreport.TaskInReportMapper;
import java.time.LocalDateTime;
import java.util.List;
import static com.chanko.yunxi.mes.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils.getLoginUser;
import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*;
/**
@ -35,6 +45,10 @@ public class TaskInReportServiceImpl implements TaskInReportService {
@Resource
private TaskDispatchDetailMapper taskDispatchDetailMapper;
@Resource
private CompositionMapper compositionMapper;
@Resource
private FormalMapper formalMapper;
@Override
public Long createTaskInReport(TaskInReportSaveReqVO createReqVO) {
@ -69,7 +83,6 @@ public class TaskInReportServiceImpl implements TaskInReportService {
taskDispatchDetailDO.setReturnRemark(remark);
taskDispatchDetailMapper.updateById(taskDispatchDetailDO);
}
}
@Override
@ -113,4 +126,39 @@ public class TaskInReportServiceImpl implements TaskInReportService {
return taskInReportMapper.selectPage(pageReqVO);
}
@Override
public List<TaskInReportDO> getList(TaskInReportPageReqVO pageReqVO) {
return taskInReportMapper.getList(pageReqVO);
}
@Override
public Long addTaskInReport(TaskInReportSaveReqVO createReqVO) {
TaskInReportDO taskInReport = BeanUtils.toBean(createReqVO, TaskInReportDO.class);
taskInReport.setOwner(getLoginUser().getId());
taskInReport.setReportTime(LocalDateTime.now());
taskInReport.setHasReport(true);
taskInReport.setWorkType("2");
LambdaQueryWrapper<CompositionDO> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(CompositionDO::getName, createReqVO.getCompositionName());
wrapper.last("limit 1");
CompositionDO compositionDO = compositionMapper.selectOne(wrapper);
if (ObjectUtil.isNotEmpty(compositionDO)){
taskInReport.setDensity(compositionDO.getDensity());
taskInReport.setPrice(compositionDO.getPrice());
}
LambdaQueryWrapper<FormalDO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(FormalDO::getMatType, taskInReport.getMatType());
queryWrapper.last("limit 1");
FormalDO formalDO = formalMapper.selectOne(queryWrapper);
if (ObjectUtil.isNotEmpty(formalDO)){
taskInReport.setCalFormal(formalDO.getFormal());
taskInReport.setFormalId(formalDO.getId());
}
taskInReportMapper.insert(taskInReport);
LambdaUpdateWrapper<TaskDispatchDetailDO> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(TaskDispatchDetailDO::getId, taskInReport.getDispatchDetailId());
updateWrapper.set(TaskDispatchDetailDO::getInReportProcess, 1);
taskDispatchDetailMapper.update(updateWrapper);
return null;
}
}

View File

@ -0,0 +1,12 @@
<?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.chanko.yunxi.mes.module.heli.dal.mysql.formal.FormalMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>

View File

@ -0,0 +1,39 @@
import request from '@/config/axios'
export interface FormalVO {
id: number
matType: string
formal: string
description: string
status: boolean
}
// 查询重量计算公式维护分页
export const getFormalPage = async (params) => {
return await request.get({ url: `/heli/formal/page`, params })
}
// 查询重量计算公式维护详情
export const getFormal = async (id: number) => {
return await request.get({ url: `/heli/formal/get?id=` + id })
}
// 新增重量计算公式维护
export const createFormal = async (data: FormalVO) => {
return await request.post({ url: `/heli/formal/create`, data })
}
// 修改重量计算公式维护
export const updateFormal = async (data: FormalVO) => {
return await request.put({ url: `/heli/formal/update`, data })
}
// 删除重量计算公式维护
export const deleteFormal = async (id: number) => {
return await request.delete({ url: `/heli/formal/delete?id=` + id })
}
// 导出重量计算公式维护 Excel
export const exportFormal = async (params) => {
return await request.download({ url: `/heli/formal/export-excel`, params })
}

View File

@ -0,0 +1,109 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible">
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="100px"
v-loading="formLoading"
>
<el-form-item label="物料类型(1、块料 2、棒料 3、方料)" prop="matType">
<el-select v-model="formData.matType" placeholder="请选择物料类型(1、块料 2、棒料 3、方料)">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
<el-form-item label="计算公式" prop="formal">
<el-input v-model="formData.formal" placeholder="请输入计算公式" />
</el-form-item>
<el-form-item label="描述" prop="description">
<Editor v-model="formData.description" height="150px" />
</el-form-item>
<el-form-item label="状态,1表示正常2表示禁用" prop="status">
<el-radio-group v-model="formData.status">
<el-radio label="1">请选择字典生成</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
</template>
<script setup lang="ts">
import * as FormalApi from '@/api/heli/formal'
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
matType: undefined,
formal: undefined,
description: undefined,
status: undefined,
})
const formRules = reactive({
formal: [{ required: true, message: '计算公式不能为空', trigger: 'blur' }],
status: [{ required: true, message: '状态,1表示正常2表示禁用不能为空', trigger: 'blur' }],
})
const formRef = ref() // Ref
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
//
if (id) {
formLoading.value = true
try {
formData.value = await FormalApi.getFormal(id)
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
await formRef.value.validate()
//
formLoading.value = true
try {
const data = formData.value as unknown as FormalApi.FormalVO
if (formType.value === 'create') {
await FormalApi.createFormal(data)
message.success(t('common.createSuccess'))
} else {
await FormalApi.updateFormal(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
matType: undefined,
formal: undefined,
description: undefined,
status: undefined,
}
formRef.value?.resetFields()
}
</script>

View File

@ -0,0 +1,212 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class="-mb-15px"
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="68px"
>
<el-form-item label="物料类型(1、块料 2、棒料 3、方料)" prop="matType">
<el-select
v-model="queryParams.matType"
placeholder="请选择物料类型(1、块料 2、棒料 3、方料)"
clearable
class="!w-240px"
>
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
<el-form-item label="计算公式" prop="formal">
<el-input
v-model="queryParams.formal"
placeholder="请输入计算公式"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="状态,1表示正常2表示禁用" prop="status">
<el-select
v-model="queryParams.status"
placeholder="请选择状态,1表示正常2表示禁用"
clearable
class="!w-240px"
>
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker
v-model="queryParams.createTime"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
/>
</el-form-item>
<el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
<el-button
type="primary"
plain
@click="openForm('create')"
v-hasPermi="['heli:formal:create']"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
<el-button
type="success"
plain
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['heli:formal:export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="自增字段,唯一" align="center" prop="id" />
<el-table-column label="物料类型(1、块料 2、棒料 3、方料)" align="center" prop="matType" />
<el-table-column label="计算公式" align="center" prop="formal" />
<el-table-column label="描述" align="center" prop="description" />
<el-table-column label="状态,1表示正常2表示禁用" align="center" prop="status" />
<el-table-column
label="创建时间"
align="center"
prop="createTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="操作" align="center">
<template #default="scope">
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['heli:formal:update']"
>
编辑
</el-button>
<el-button
link
type="danger"
@click="handleDelete(scope.row.id)"
v-hasPermi="['heli:formal:delete']"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<FormalForm ref="formRef" @success="getList" />
</template>
<script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import * as FormalApi from '@/api/heli/formal'
import FormalForm from './FormalForm.vue'
defineOptions({ name: 'Formal' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const list = ref([]) //
const total = ref(0) //
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
matType: undefined,
formal: undefined,
description: undefined,
status: undefined,
createTime: [],
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await FormalApi.getFormalPage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await FormalApi.deleteFormal(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await FormalApi.exportFormal(queryParams)
download.excel(data, '重量计算公式维护.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
getList()
})
</script>

View File

@ -103,7 +103,7 @@
</el-table-column>
<el-table-column label="过程检状态" align="center" prop="report" />
<el-table-column label="负责人" align="center" prop="ownerName" />
<el-table-column label="报工时间" align="center" prop="endTime" :formatter="dateFormatter2"/>
<el-table-column label="报工时间" align="center" prop="reportTime" :formatter="dateFormatter2"/>
</el-table>
</ContentWrap>
<ContentWrap v-if="type=='zhuangpei'">

View File

@ -267,8 +267,8 @@ class="!w-260px" v-model="formData.requiredCompletedDate" type="date" value-form
<el-table-column fixed label="外协" align="center" width="60">
<template #default="{ row }">
<!-- <el-checkbox class="large-checkbox" v-model="row.isOutsourcing" @change="handleOutsourcingChange(row)" :disabled="getDisabledState2(row)||flag"/>-->
<el-checkbox class="large-checkbox" v-model="row.isOutsourcing" @change="handleOutsourcingChange(row)" :disabled="getDisabledState2(row)"/>
<el-checkbox class="large-checkbox" v-model="row.isOutsourcing" @change="handleOutsourcingChange(row)" :disabled="getDisabledState2(row)||row.flag"/>
<!-- <el-checkbox class="large-checkbox" v-model="row.isOutsourcing" @change="handleOutsourcingChange(row)" :disabled="getDisabledState2(row)"/>-->
</template>
</el-table-column>
<el-table-column fixed label="顺序号" align="center" prop="sort" width="120px" >
@ -482,7 +482,7 @@ v-model="row.deviceModel"
<!-- v-if="'detail' != active && ((scope.row.purchaseNo ==null || scope.row.purchaseNo=='') && scope.row.reportProcess == 0&&formData.dispatchStatus != 2)&&!flag" link type="danger"-->
<el-button
v-if="'detail' != active && ((scope.row.purchaseNo ==null || scope.row.purchaseNo=='') && scope.row.reportProcess == 0&&formData.dispatchStatus != 2)" link type="danger"
v-if="'detail' != active && ((scope.row.purchaseNo ==null || scope.row.purchaseNo=='') && scope.row.reportProcess == 0&&formData.dispatchStatus != 2)&&!scope.row.flag" link type="danger"
size="small" @click.prevent="onDeleteItem(scope.row,scope.$index)">
删除
</el-button>
@ -1398,9 +1398,9 @@ const queryData = async (id?: number) => {
if(items.id == item.procedureId){
checkList.value.push(items.name)
disabledLabels.value.push(items.name)
// if ((items.name=='1'||items.name=='2')&&item.inReportProcess!=0&& !item.isOutsourcing){
// flag.value=true
// }
if ((items.name=='下料1'||items.name=='下料2')&&item.inReportProcess!=0&& !item.isOutsourcing){
item.flag=true
}
}
})
dispatchListTemp.value.push(JSON.parse(JSON.stringify(item)));

View File

@ -66,7 +66,7 @@ const loginSuccess = async (data: LoginResult) => {
//
loginStore.setInfo(data)
const dictArr = [
'heli_inspection_type,system_operate_type,heli_business_file_type,heli_project_order_status,heli_delivery_status,heli_business_line,heli_currency,heli_project_property, heli_material_unit','heli_unqualified_notification_opinion']
'heli_inspection_type,system_operate_type,heli_business_file_type,heli_project_order_status,heli_delivery_status,heli_business_line,heli_currency,heli_project_property, heli_material_unit','heli_unqualified_notification_opinion','heli_materials_type']
const params = {
dictTypeList: dictArr.join(','),
}

View File

@ -2,10 +2,11 @@
import {onMounted, computed, ref, onUnmounted} from "vue";
import {
getListWxAPI,
getTaskDetailAPI,
getTaskDetailAPI, getXLWxAPI,
} from "@/services/productionReport";
import { useLoginStore } from "@/stores/modules/login";
import { formatDate } from "@/utils/index";
import {onShow} from "@dcloudio/uni-app";
const userStore = useLoginStore();
const userId = userStore.userInfo.userId;
@ -65,14 +66,19 @@ const getListData = async () => {
}
isLoading.value = true;
//
const data = await getListWxAPI(queryParams);
const data = await getXLWxAPI(queryParams);
isLoading.value = false;
//
dataList.value.push(...data.list);
data.list.forEach((e) => {
e.startTime = formatDate(e.startTime, "YYYY-MM-DD");
e.endTime = formatDate(e.endTime, "YYYY-MM-DD");
});
//
if (queryParams.pageNo < data.total) {
//
queryParams.pageNo++;
isFinish.value = true;
} else {
//
isFinish.value = true;
@ -97,8 +103,7 @@ onMounted(async () => {
const isScanning = ref(false)
const handleDetail = async (item) => {
const url = `/pages/productionReport/productionReport-detail?id=${item.id}`;
const url = `/pages/productionInReport/productionInReport-detail?id=${item.id}`;
uni.navigateTo({ url });
};
@ -258,7 +263,7 @@ const handleSearch = async (e) => {
<!-- <view class="val">{{ item.compositionName }}</view>-->
</view>
<view class="row-item">
<view class="label">密度{{ item.density }}t/</view>
<view class="label">密度{{ item.density }} t/</view>
<!-- <view class="val high-color">{{ item.density }}t/</view>-->
</view>
</view>
@ -268,7 +273,7 @@ const handleSearch = async (e) => {
<!-- <view class="val">{{ item.amount }}</view>-->
</view>
<view class="row-item">
<view class="label">报工重量{{ item.weight }}Kg</view>
<view class="label">报工重量{{ item.weight }} Kg</view>
<!-- <view class="val high-color">{{ item.weight }}Kg</view>-->
</view>
</view>

View File

@ -3,49 +3,39 @@
import { formatDate } from '@/utils/index'
import { onLoad, onShow } from '@dcloudio/uni-app'
import { useLoginStore } from '@/stores/modules/login'
import { getTaskRepotPageAPI, getTaskDetailAPI, postOperateAPI, getListWxAPI } from '@/services/productionReport'
import {
getTaskRepotPageAPI,
getTaskDetailAPI,
postOperateAPI,
getListWxAPI,
getXLTaskDetailAPI, getTaskInRepotPageAPI, verificationAPI, handleOkAPI, productionCompletedAPI
} from '@/services/productionReport'
const popup = ref<UniHelper.UniPopupInstance>()
const userStore = useLoginStore()
const dictInfo = userStore?.dictInfo || []
const unitDictData = dictInfo.filter(e => e.dictType == 'heli_material_unit') || []
const userId = userStore.userInfo.userId
const unitDictData = dictInfo.filter(e => e.dictType == 'heli_materials_type') || []
const unitDict = dictInfo.filter(e => e.dictType == 'heli_materials_type').map(item => ({
value: item.value,
text: item.label
}))
const userId = userStore.userInfo.userId
const isShowStart = ref(false)
const isCancel = ref(true)
const isShowEnd = ref(false)
// const isShowStart = computed(() => {
// let flag = true
// if (historyList.value.length) {
// const obj = historyList.value[0]
// if (!obj?.endTime) {
// flag = false
// }
// }
// // //
// // if (detailInfo.value.amount == detailInfo.value.totalReportAmount) {
// // flag = false
// // }
// return flag
// })
// const isShowEnd = computed(() => {
// let flag = true
// if (historyList.value.length) {
// const obj = historyList.value[0]
// if (obj?.endTime) {
// flag = false
// }
// } else {
// flag = false
// }
// return flag
// })
const amount = ref('')
const workTime = ref('')
const length = ref()
const widht = ref()
const hight = ref()
const weight = ref()
const reportPrice = ref()
const matType = ref('1')
//
const detailInfo = ref({})
let isLoading = ref(false)
let isLoading = ref(false)
const historyList = ref([])
const formObj = ref({})
//
@ -53,69 +43,18 @@
//
isLoading.value = true
const params = {
pageNo: 1,
integerpageSize: 5,
owner: userId,
dispatchDetailId: detailInfo.value.id,
}
const data = await getTaskRepotPageAPI(params)
data.list.forEach((e) => {
e.startTimeStr = e.startTime && formatDate(e.startTime, 'YYYY-MM-DD HH:mm')
e.endTimeStr = e.endTime && formatDate(e.endTime, 'YYYY-MM-DD HH:mm')
// e.endTimeStr = '2025-01-13 00:00'
})
if (data.list[0]) {
// Date
formObj.value = data.list[0]
const endTime = new Date(formObj.value.endTimeStr);
const startTime = new Date(formObj.value.startTimeStr);
//
const timeDifferenceInMs = endTime - startTime;
//
const timeDifferenceInHours = timeDifferenceInMs / (3600 * 1000);
const roundedTimeDifference = parseFloat(timeDifferenceInHours.toFixed(2));
if ("Y" == detailInfo.value.isOutsourcing) {
} else {
workTime.value = roundedTimeDifference;
}
}
historyList.value = data.list
isShowEnd.value = true;
isShowStart.value = true
if (historyList.value.length) {
const obj = historyList.value[0]
if (obj.amount !=null && obj.amount >= 0 ) {
isShowStart.value = true
}else{
isShowStart.value = false
}
}
if (historyList.value.length) {
const obj = historyList.value[0]
if (obj.amount !=null && obj.amount >= 0 ) {
isShowEnd.value = false
}else{
isShowEnd.value = true
}
} else {
isShowEnd.value = false
}
if (historyList.value != null && historyList.value.length > 0) {
var totalAmount = detailInfo.value.amount;
var beforeAmount = detailInfo.value.totalReportAmount
if (totalAmount >= beforeAmount) {
amount.value = totalAmount - beforeAmount
} else {
amount.value = 0
}
}
const data = await getTaskInRepotPageAPI(params)
data.forEach((e) => {
e.reportTimeStr = e.reportTime && formatDate(e.reportTime, 'YYYY-MM-DD')
//
const lineObj = unitDictData.find((q) => q.value == e.matType) || {}
e.matType = lineObj.label
})
historyList.value = data
isLoading.value = false
}
const isOverBeforeProcedure = ref(true)
//
const getDetailData = async (id) => {
//
@ -123,20 +62,10 @@
const params = {
id,
}
const data = await getTaskDetailAPI(params)
// if (data.beforeProcedureStatus == 0) {
// //
// isOverBeforeProcedure.value = true;
// }
if ("Y"==data.isOutsourcing){
workTime.value=data.estimatedPrice
}
const data = await getXLTaskDetailAPI(params)
data.startTime = formatDate(data.startTime, 'YYYY-MM-DD')
data.endTime = formatDate(data.endTime, 'YYYY-MM-DD')
//
const lineObj = unitDictData.find((q) => q.value == data.unit) || {}
data.unit = lineObj.label
detailInfo.value = data || {}
isLoading.value = false
}
@ -155,10 +84,9 @@
isLoading.value = true;
const params = {
id: detailInfo.value?.id,
active: 'FINISH',
}
try {
const data = await postOperateAPI(params);
await productionCompletedAPI(params);
} catch (error) {
uni.showToast({
icon: 'none',
@ -166,90 +94,206 @@
title: error.data.msg,
})
} finally {
await getDetailData(detailInfo.value.id)
await getData()
const obj = historyList.value[0]
//
if (obj && obj?.workTime == null && obj.endTime) {
popupShow.value = true
}
isLoading.value = false;
await getDetailData(detailInfo.value.id)
await getData()
}
// const url = `/pages/productionReport/productionReport-detail?id=${detailInfo.value.id}`
// uni.redirectTo({
// url,
// })
}
//
const handleOk = async (active) => {
const handleOk = async () => {
if (length.value==null||length.value==''){
uni.showToast({
icon: 'none',
duration: 3000,
title: '请输入长度',
})
return
}
if (widht.value==null||widht.value==''){
uni.showToast({
icon: 'none',
duration: 3000,
title: '请输入宽度',
})
return
}
if (hight.value==null||hight.value==''){
uni.showToast({
icon: 'none',
duration: 3000,
title: '请输入高度',
})
return
}
if (weight.value==null||weight.value==''){
uni.showToast({
icon: 'none',
duration: 3000,
title: '请输入重量',
})
return
}
if (reportPrice.value==null||reportPrice.value==''){
uni.showToast({
icon: 'none',
duration: 3000,
title: '请输入总价',
})
return
}
if (matType.value==null||matType.value==''){
uni.showToast({
icon: 'none',
duration: 3000,
title: '请选择物料类型',
})
return
}
const params = {
id: detailInfo.value?.id,
active: 'SUBMIT',
amount: amount.value,
workTime: workTime.value,
}
const data = await postOperateAPI(params)
const pages = getCurrentPages(); //
const currentPage = pages[pages.length - 1]; //
const url = `/${currentPage.route}?${Object.entries(currentPage.options).map(([key, val]) => `${key}=${val}`).join('&')}`;
uni.reLaunch({ url }); //
dispatchDetailId: detailInfo.value?.id,
length: length.value,
widht: widht.value,
hight: hight.value,
weight: weight.value,
reportPrice: reportPrice.value,
matType: matType.value,
compositionName:detailInfo.value?.compositionName,
}
const data = await handleOkAPI(params)
// const url = `/pages/productionReport/productionReport-detail?id=${detailInfo.value.id}`
// uni.redirectTo({
// url,
// })
popup.value?.close()
length.value = ''
widht.value = ''
hight.value = ''
weight.value = ''
reportPrice.value = ''
matType.value = '1'
await getDetailData(detailInfo.value.id)
await getData()
}
//
const handleStart = async () => {
const params = {
id: detailInfo.value.id,
active: 'START',
ownerId: userId
}
productionTitle.value = '生产中';
const data = await postOperateAPI(params)
const pages = getCurrentPages(); //
const currentPage = pages[pages.length - 1]; //
const url = `/${currentPage.route}?${Object.entries(currentPage.options).map(([key, val]) => `${key}=${val}`).join('&')}`;
uni.reLaunch({ url }); //
// const url = `/pages/productionReport/productionReport-detail?id=${detailInfo.value.id}`
// uni.redirectTo({
// url,
// })
// const pages = getCurrentPages(); //
// const currentPage = pages[pages.length - 1]; //
// const url = `/${currentPage.route}?${Object.entries(currentPage.options).map(([key, val]) => `${key}=${val}`).join('&')}`;
// uni.reLaunch({ url }); //
}
const popupShow = ref(false)
const productionTitle = ref('开始生产')
const cancel = () => {
isLoading.value = false;
const pages = getCurrentPages(); //
if (pages.length>1){
// const pages = getCurrentPages(); //
// if (pages.length>1){
// uni.navigateBack({
// delta: 1 // 1
// });
// }else {
// const url = `/pages/productionInReport/productionInReport`
// uni.redirectTo({
// url,
// })
// }
uni.navigateBack({
delta: 1 // 1
});
}else {
const url = `/pages/productionReport/productionReport`
uni.redirectTo({
url,
})
}
}
//
const handleStop = async () => {
const handleLengthChange =async (val) => {
console.log(val)
if (val) {
length.value = parseFloat(val).toFixed(2)
if (matType.value == '1' || matType.value == '3') {
if (widht.value > 0 && hight.value > 0) {
var rawResult = length.value * widht.value * hight.value * detailInfo.value.density / 1000000;
weight.value = rawResult.toFixed(2)
var price = weight.value * detailInfo.value.price;
reportPrice.value = price.toFixed(2)
}
} else {
if (hight.value > 0) {
const radius = length.value / 2;
const radiusSquared = radius * radius;
// π × r² × h × ρ ÷ 10
//
const CONSTANT_FACTOR = 3.14 / 1000000;
var rawResult = CONSTANT_FACTOR * radiusSquared * hight.value * detailInfo.value.density;
weight.value = rawResult.toFixed(2)
var price = weight.value * detailInfo.value.price;
reportPrice.value = price.toFixed(2)
}
}
}else {
weight.value=0.00
reportPrice.value=0.00
}
}
const handleWidhtChange =async (val) => {
widht.value=parseFloat(val).toFixed(2)
if (matType.value=='1'||matType.value=='3'){
if (length.value>0&&hight.value>0){
var rawResult = length.value*widht.value*hight.value*detailInfo.value.density/1000000;
weight.value= rawResult.toFixed(2)
var price = weight.value * detailInfo.value.price;
reportPrice.value= price.toFixed(2)
}
}
}
const handleHightChange =async (val) => {
hight.value=parseFloat(val).toFixed(2)
if (matType.value=='1'||matType.value=='3'){
if (widht.value>0&&length.value>0){
var rawResult = length.value*widht.value*hight.value*detailInfo.value.density/1000000;
weight.value= rawResult.toFixed(2)
var price = weight.value * detailInfo.value.price;
reportPrice.value= price.toFixed(2)
}
}else {
if (length.value>0){
const radius = length.value / 2;
const radiusSquared = radius * radius;
// π × r² × h × ρ ÷ 10
//
const CONSTANT_FACTOR = 3.14 / 1000000;
var rawResult = CONSTANT_FACTOR * radiusSquared * hight.value * detailInfo.value.density;
weight.value= rawResult.toFixed(2)
var price = weight.value * detailInfo.value.price;
reportPrice.value= price.toFixed(2)
}
}
}
const handleWeightChange =async (val) => {
weight.value=parseFloat(val).toFixed(2)
var price = weight.value * detailInfo.value.price;
reportPrice.value= price.toFixed(2)
}
const onClear= async (type)=>{
console.log(type)
uni.hideKeyboard()
weight.value=0.00
reportPrice.value= 0.00
}
//
const handleAdd = async () => {
const params = {
id: detailInfo.value?.id,
active: 'END',
compositionName:detailInfo.value?.compositionName,
}
console.log(detailInfo.value)
const data = await postOperateAPI(params)
await getData()
// const url = `/pages/productionReport/productionReport-detail?id=${detailInfo.value.id}`
// uni.redirectTo({
// url,
// })
await verificationAPI(params)
popup.value?.open()
}
const handleClose =async ()=>{
// uni.hideKeyboard() //
length.value = ''
widht.value = ''
hight.value = ''
weight.value = ''
reportPrice.value = ''
matType.value = '1'
popup.value?.close()
await getDetailData(detailInfo.value.id)
await getData()
}
</script>
<template>
<view>
@ -257,12 +301,18 @@
<template v-if="!isLoading">
<view class="module">
<view class="module-info">
<view class="product-item product-name">项目{{ detailInfo.projectCode }}
{{ detailInfo.projectName }}</view>
<image src="/static/images/productionReport-page.png" class="product-img" mode="scaleToFill">
</image>
<view :class="[detailInfo.procedureStatus == 2 ? 'had' : 'unhad', 'product-status']">{{
detailInfo.procedureStatus == 2 ? '已完成' : '未完成' }}</view>
<!-- <view class="product-item product-name">项目{{ detailInfo.projectCode }}-->
<!-- {{ detailInfo.projectName }}</view>-->
<!-- <image src="/static/images/productionReport-page.png" class="product-img" mode="scaleToFill">-->
<!-- </image>-->
<!-- <view :class="[detailInfo.procedureStatus == 2 ? 'had' : 'unhad', 'product-status']">{{-->
<!-- detailInfo.procedureStatus == 2 ? '已完成' : '未完成' }}</view>-->
<view class="product-item1">
<view class="product-name">项目{{ detailInfo.projectCode }} {{ detailInfo.projectName }}</view>
<view :class="[detailInfo.inReportProcess == 0 ? 'had' : detailInfo.inReportProcess == 1 ?'unhad':'whad', 'product-status']">
{{ detailInfo.inReportProcess == 0 ? '未报工' : detailInfo.inReportProcess == 1 ?'已报工':'报工完成' }}
</view>
</view>
<view class="product-item">子项目{{ detailInfo.projectSubCode || '' }}
{{' ' + detailInfo.projectSubName }}
</view>
@ -276,73 +326,97 @@
</view>
<view class="product-row">
<view class="row-item">
<view class="label">派工数量</view>
<view class="val">{{ detailInfo.amount }}</view>
<view class="label">派工数量: {{ detailInfo.amount }}</view>
</view>
<view class="row-item">
<view class="label">总报工数量</view>
<view class="val high-color">{{ detailInfo.totalReportAmount }}</view>
<view class="label">报工重量: {{ detailInfo.weight }} Kg</view>
</view>
</view>
<view class="product-row">
<view class="row-item">
<view class="label">预计工时</view>
<view class="val">{{ detailInfo.workTime }}</view>
<view class="label">材质: {{ detailInfo.compositionName }}</view>
</view>
<view class="row-item">
<view class="label">总报工工时</view>
<view class="val high-color">{{ detailInfo.totalWorkTime }}</view>
<view class="label">密度: {{ detailInfo.density }} t/</view>
</view>
</view>
<view class="product-item">预计生产日期{{ detailInfo.startTime }} {{ detailInfo.endTime }}</view>
<view class="finish"
v-if="isShowStart && detailInfo.procedureStatus !== 2 && detailInfo.totalWorkTime"
v-if="detailInfo.inReportProcess !== 2 "
@click="handleComplate">
<image class="complate-img" src="/static/images/productionReport-detail-complate.png"
mode="scaleToFill" />
生产结束
报工结束
</view>
</view>
</view>
<view class="module-list">
<view class="module-title">历史报工明细</view>
<view class="module-header">
<view class="module-title">报工历史</view>
<view class="total-price">总价(): {{detailInfo.reportPrice}}</view>
</view>
<view class="history-list">
<view class="no-data" v-if="!historyList.length">
无数据...
</view>
<template v-else>
<view class="item" v-for="(item, index) in historyList" :key="item.id">
<view class="product-item">生产开始时间{{ item.startTimeStr }}</view>
<view class="product-item">生产结束时间{{ item.endTimeStr }}</view>
<view class="product-row">
<view class="row-item">
<view class="label">报工日期</view>
<view class="val high-color">{{ item.reportTimeStr }}</view>
</view>
<view class="row-item">
<view class="label">报工人</view>
<view class="val high-color">{{ item.ownerName }}</view>
</view>
</view>
<view class="product-row">
<view class="row-item">
<view class="label">报工工时</view>
<view class="val high-color">{{ item.workTime }}</view>
<view class="label">物料类型</view>
<view class="val high-color">{{ item.matType }}</view>
</view>
<view class="row-item">
<view class="label">报工数量</view>
<view class="val high-color">{{ item.amount }}</view>
<view class="label">(直径)</view>
<view class="val high-color">{{ item.length }} mm</view>
</view>
</view>
<view class="product-row">
<view class="row-item">
<view class="label">宽度</view>
<view class="val high-color">{{ item.widht }} mm</view>
</view>
<view class="row-item">
<view class="label">高度</view>
<view class="val high-color">{{ item.hight }} mm</view>
</view>
</view>
<view class="product-row">
<view class="row-item">
<view class="label">重量</view>
<view class="val high-color">{{ item.weight }} Kg</view>
</view>
<view class="row-item">
<view class="label">总价</view>
<view class="val high-color">{{ item.reportPrice }} </view>
</view>
</view>
<view class="tip-index">
<image src="/static/images/productionReport-detail-index.png" class="icon-status"
mode="scaleToFit">
</image>
<view class="text">{{historyList.length - index}}</view>
</view>
</view>
</template>
</view>
</view>
<view class="action" v-if="detailInfo.procedureStatus !== 2">
<view class="action" v-if="detailInfo.inReportProcess != 2">
<view class="action-item start" @click="handleAdd">新增</view>
<view class="action-item info" v-if="isCancel" @click="cancel()">取消</view>
<view class="action-item start" v-if="isShowStart" @click="handleStart">开始生产</view>
<view class="action-item stop" v-if="isShowEnd" @click="handleStop">结束生产</view>
</view>
<view class="action" v-if="detailInfo.procedureStatus == 2">
<view class="action" v-if="detailInfo.inReportProcess == 2">
<view class="action-item info" v-if="isCancel" @click="cancel()">取消</view>
</view>
@ -351,37 +425,52 @@
<view class="loading-text" v-else>加载中..</view>
<uni-popup class="popup" ref="popup" :mask-click="false" type="bottom" background-color="#fff">
<view class="title">
<view class="text">填写信息</view>
<!-- <view class="close" @click="handleClose">X</view> -->
<view class="text">输入信息</view>
<view class="close" @click="handleClose">X</view>
</view>
<view class="cont">
<view class="item">
<view class="label"><span class="star">*</span>物料类型</view>
<uni-data-select class="val" v-model="matType" :clearable="false"
:localdata="unitDict" placeholder="请选择物料类型">
</uni-data-select>
<view class="unit" ></view>
</view>
<view class="item">
<view class="label">开始生产时间</view>
<view class="val">{{ formObj.startTimeStr }}</view>
<view class="label"><span class="star">*</span>(直径)</view>
<uni-easyinput class="val" type="digit" v-model="length" clearable @change="handleLengthChange" @clear="onClear('length')"
placeholder="请输入长(直径)"></uni-easyinput>
<view class="unit" >mm</view>
</view>
<view class="item">
<view class="label">结束生产时间</view>
<view class="val">{{ formObj.endTimeStr }}</view>
</view>
<view class="item">
<view class="label"><span class="star">*</span>本次报工工时</view>
<uni-easyinput class="val" type="digit" v-model="workTime" disabled
placeholder="请输入本次报工工时"></uni-easyinput>
<view class="unit" >{{ detailInfo.isOutsourcing=='Y'?"元":"小时" }}</view>
</view>
<view class="item">
<view class="label"><span class="star">*</span>本次报工数量</view>
<uni-easyinput class="val" type="number" v-model="amount"
placeholder="请输入本次报工数量"></uni-easyinput>
<view class="unit"> {{ detailInfo.unit }}</view>
</view>
<view class="label"><span class="star">*</span>宽度</view>
<uni-easyinput class="val" type="number" v-model="widht" clearable @change="handleWidhtChange" @clear="onClear('widht')"
placeholder="请输入宽度"></uni-easyinput>
<view class="unit" >mm</view>
</view>
<view class="item">
<view class="label"><span class="star">*</span>高度</view>
<uni-easyinput class="val" type="number" v-model="hight" clearable @change="handleHightChange" @clear="onClear('hight')"
placeholder="请输入高度" :disabled="matType=='2'"></uni-easyinput>
<view class="unit" >mm</view>
</view>
<view class="item">
<view class="label"><span class="star">*</span>重量</view>
<uni-easyinput class="val" type="number" v-model="weight" clearable @change="handleWeightChange"
placeholder="请输入重量"></uni-easyinput>
<view class="unit" >Kg</view>
</view>
<view class="item">
<view class="label"><span class="star">*</span>总价</view>
<uni-easyinput class="val" type="number" v-model="reportPrice" clearable
placeholder="请输入总价"></uni-easyinput>
<view class="unit" ></view>
</view>
</view>
<view class="ok" @click="handleOk">确定</view>
</uni-popup>
</view>
<view v-if="isOverBeforeProcedure==false">
<p>上一道工序尚未完工请等待上一道工序完工后进行报工</p>
</view>
</view>
</template>
@ -419,18 +508,35 @@
border-raduis: 10rpx;
text-align: center;
padding: 8rpx 12rpx;
flex-shrink: 0; /* 防止状态被压缩 */
&.had {
background: #E8FFEA;
color: #00B42A;
color: #FF7D00;
}
&.unhad {
background: #FFF7E8;
color: #FF7D00;
color: #40baf0;
}
&.whad {
color: #88bb46;
}
}
.product-item1 {
margin: 20rpx 0;
display: flex;
align-items: center;
justify-content: space-between; /* 两端对齐,使项目名称在左,状态在右 */
color: #737D88;
}
.product-name {
flex: 1; /* 占据剩余空间 */
overflow: hidden; /* 防止文字溢出 */
white-space: nowrap; /* 不换行 */
text-overflow: ellipsis; /* 超出部分显示省略号 */
margin-right: 20rpx; /* 右侧留出间距 */
}
.product-item {
margin: 20rpx 0;
display: flex;
@ -491,12 +597,27 @@
padding: 20rpx 20rpx;
// box-shadow: 0px 0px 8px 0px rgba(161, 161, 177, 0.12);
.module-title {
color: #0D0D26;
font-size: 36rpx;
margin: 20rpx 0;
font-weight: 500;
}
.module-header {
display: flex;
justify-content: space-between; /* 两端对齐 */
align-items: center; /* 垂直居中 */
margin: 20rpx 0;
}
.module-title {
color: #0D0D26;
font-size: 36rpx;
font-weight: 500;
/* 如果需要,可以添加一些右边距 */
/* margin-right: 20rpx; */
}
.total-price {
color: #0D0D26; /* 根据你的设计调整颜色 */
font-size: 32rpx; /* 可以调整字体大小,比标题小一点 */
/* 如果需要,可以添加一些左边距 */
/* margin-left: 20rpx; */
}
.history-list {
display: flex;
@ -557,8 +678,8 @@
.tip-index {
position: absolute;
top: 0rpx;
right: 0rpx;
bottom: 0rpx;
right: 0rpx;
.icon-status {
width: 100rpx;

View File

@ -71,3 +71,50 @@ export const receiveGoods = (data: Object) => {
data,
})
}
export const getXLWxAPI = (data: Object) => {
return http<any[]>({
method: 'GET',
url: '/heli/task-dispatch/task-dispatch-detail/pagexl',
data,
})
}
// 派工任务详情
export const getXLTaskDetailAPI = (data: Object) => {
return http<any[]>({
method: 'GET',
url: '/heli/task-dispatch/task-dispatch-detail/getXl',
data,
})
}
// 报工记录分页查询
export const getTaskInRepotPageAPI = (data: Object) => {
return http<any[]>({
method: 'GET',
url: '/heli/task-in-report/getList',
data,
})
}
/**
* ///
*/
export const verificationAPI = (data: Object) => {
return http<any[]>({
method: 'POST',
url: '/heli/task-dispatch/task-dispatch-detail/verification',
data,
})
}
export const handleOkAPI = (data: Object) => {
return http<any[]>({
method: 'POST',
url: '/heli/task-in-report/add',
data,
})
}
export const productionCompletedAPI = (data: Object) => {
return http<any[]>({
method: 'POST',
url: '/heli/task-dispatch/task-dispatch-detail/productionCompleted',
data,
})
}