回款明细查询
This commit is contained in:
parent
7f720de18d
commit
e4d80d0c06
@ -1,6 +1,10 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.controller.admin.orderys;
|
package com.chanko.yunxi.mes.module.heli.controller.admin.orderys;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo.QualityStatistics;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo.UnqualifiedNotificationPageReqVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderyf.OrderYfDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderyf.OrderYfDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.unqualifiednotificationfile.UnqualifiedNotificationFileDO;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@ -127,5 +131,23 @@ public class OrderYsController {
|
|||||||
ExcelUtils.write(response, "应收记录.xlsx", "数据", OrderYsExportVO.class,
|
ExcelUtils.write(response, "应收记录.xlsx", "数据", OrderYsExportVO.class,
|
||||||
BeanUtils.toBean(list, OrderYsExportVO.class));
|
BeanUtils.toBean(list, OrderYsExportVO.class));
|
||||||
}
|
}
|
||||||
|
@GetMapping("/getDetails")
|
||||||
|
@Operation(summary = "获得明细")
|
||||||
|
public CommonResult<PageResult<OrderYsDOVo>> getDetails(@Valid OrderYsPageReqVO pageReqVO) {
|
||||||
|
PageResult<OrderYsDOVo> pageResult = orderYsService.getDetails(pageReqVO);
|
||||||
|
return success(pageResult);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@GetMapping("/exportDetails")
|
||||||
|
@Operation(summary = "导出应收记录 Excel")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:order-ys:export')")
|
||||||
|
@OperateLog(type = EXPORT)
|
||||||
|
public void exportDetails(@Valid OrderYsPageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<OrderYsDOVo> list = orderYsService.getDetails(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "回款明细查询.xlsx", "数据", OrderYsDOVo.class,
|
||||||
|
BeanUtils.toBean(list, OrderYsDOVo.class));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.orderys.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.chanko.yunxi.mes.framework.excel.core.annotations.DictFormat;
|
||||||
|
import com.chanko.yunxi.mes.framework.excel.core.convert.DictConvert;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class OrderYsDOVo {
|
||||||
|
@ExcelProperty("日期")
|
||||||
|
private String time;
|
||||||
|
@ExcelProperty("客户名称")
|
||||||
|
private String customerName;
|
||||||
|
@ExcelProperty("项目名称")
|
||||||
|
private String projectName;
|
||||||
|
@ExcelProperty(value = "类型", converter = DictConvert.class)
|
||||||
|
@DictFormat("heli_ys_type")
|
||||||
|
private Integer type;
|
||||||
|
@ExcelProperty("金额")
|
||||||
|
private BigDecimal amount;
|
||||||
|
|
||||||
|
}
|
@ -46,5 +46,8 @@ public class OrderYsPageReqVO extends PageParam {
|
|||||||
|
|
||||||
@Schema(description = "备注")
|
@Schema(description = "备注")
|
||||||
private String rem;
|
private String rem;
|
||||||
|
@Schema(description = "客户名称")
|
||||||
|
private String customerName;
|
||||||
|
@Schema(description = "类型")
|
||||||
|
private Integer type;
|
||||||
}
|
}
|
@ -3,9 +3,11 @@ package com.chanko.yunxi.mes.module.heli.dal.mysql.orderys;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
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.query.LambdaQueryWrapperX;
|
||||||
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo.QualityStatistics;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.customer.CustomerDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.customer.CustomerDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.invoice.InvoiceDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.invoice.InvoiceDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderys.OrderYsDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderys.OrderYsDO;
|
||||||
@ -16,6 +18,7 @@ import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
|
|||||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.orderys.vo.*;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.orderys.vo.*;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -32,6 +35,7 @@ public interface OrderYsMapper extends BaseMapperX<OrderYsDO> {
|
|||||||
query.selectAll(OrderYsDO.class)
|
query.selectAll(OrderYsDO.class)
|
||||||
.select("sum(i.amount) as amount")
|
.select("sum(i.amount) as amount")
|
||||||
.select("p.delivery_status as deliveryStatus")
|
.select("p.delivery_status as deliveryStatus")
|
||||||
|
.select("p.id as projectId","p.code as projectCode")
|
||||||
.leftJoin(
|
.leftJoin(
|
||||||
"finance_invoice i ON i.order_code = t.code AND i.deleted=0 and i.tenant_id=2 and i.business_type = 'FINANCE_MAKE_INVOICE' AND i.status !='3'")
|
"finance_invoice i ON i.order_code = t.code AND i.deleted=0 and i.tenant_id=2 and i.business_type = 'FINANCE_MAKE_INVOICE' AND i.status !='3'")
|
||||||
.leftJoin(ProjectOrderDO.class,"p", ProjectOrderDO::getCode, OrderYsDO::getCode)
|
.leftJoin(ProjectOrderDO.class,"p", ProjectOrderDO::getCode, OrderYsDO::getCode)
|
||||||
@ -66,4 +70,6 @@ public interface OrderYsMapper extends BaseMapperX<OrderYsDO> {
|
|||||||
|
|
||||||
return selectOne(query);
|
return selectOne(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<OrderYsDOVo> getDetails(@Param("page") Page<OrderYsDOVo> page, @Param("pageReqVO") OrderYsPageReqVO pageReqVO);
|
||||||
}
|
}
|
@ -152,7 +152,7 @@ public class DeliverOrderServiceImpl implements DeliverOrderService {
|
|||||||
updateReqVO.setDeliverStatus(updateObj.getDeliverStatus());
|
updateReqVO.setDeliverStatus(updateObj.getDeliverStatus());
|
||||||
|
|
||||||
// 更新子表
|
// 更新子表
|
||||||
updateDeliverOrderSubList(updateReqVO.getId(), updateReqVO.getDeliverOrderSubs(), updateReqVO.getDeliverOrderOtherSubs());
|
updateDeliverOrderSubList(updateReqVO.getId(), updateReqVO.getDeliverOrderSubs(), updateReqVO.getDeliverOrderOtherSubs(), updateReqVO.getActive());
|
||||||
|
|
||||||
if(updateObj.getDeliverStatus().intValue() == DeliverOrderStatusEnum.DELIVER.getCode()) {
|
if(updateObj.getDeliverStatus().intValue() == DeliverOrderStatusEnum.DELIVER.getCode()) {
|
||||||
// crossOrderManager.refreshProjectOrderDeliverStatus(updateReqVO.getSaleOrderIds().split(","),updateReqVO.getDeliverDate());
|
// crossOrderManager.refreshProjectOrderDeliverStatus(updateReqVO.getSaleOrderIds().split(","),updateReqVO.getDeliverDate());
|
||||||
@ -414,9 +414,10 @@ public class DeliverOrderServiceImpl implements DeliverOrderService {
|
|||||||
deliverOrderSubMapper.insertBatch(list);
|
deliverOrderSubMapper.insertBatch(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateDeliverOrderSubList(Long deliveryOrderId, List<DeliverOrderSubDO> list, @Valid List<DeliverOrderSubDO> deliverOrderOtherSubs) {
|
private void updateDeliverOrderSubList(Long deliveryOrderId, List<DeliverOrderSubDO> list, @Valid List<DeliverOrderSubDO> deliverOrderOtherSubs,String type) {
|
||||||
deleteDeliverOrderSubByDeliveryOrderId(deliveryOrderId);
|
deleteDeliverOrderSubByDeliveryOrderId(deliveryOrderId);
|
||||||
list.forEach(o -> o.setId(null).setUpdater(null).setUpdateTime(null)); // 解决更新情况下:1)id 冲突;2)updateTime 不更新
|
list.forEach(o -> o.setId(null).setUpdater(null).setUpdateTime(null)); // 解决更新情况下:1)id 冲突;2)updateTime 不更新
|
||||||
|
if ("DELIVER".equals(type)){
|
||||||
//计算分摊运费
|
//计算分摊运费
|
||||||
for (DeliverOrderSubDO deliverOrderOtherSub : list) {
|
for (DeliverOrderSubDO deliverOrderOtherSub : list) {
|
||||||
ProjectOrderSubDO projectOrderSubDO = projectOrderSubMapper.selectById(deliverOrderOtherSub.getSaleOrderSubId());
|
ProjectOrderSubDO projectOrderSubDO = projectOrderSubMapper.selectById(deliverOrderOtherSub.getSaleOrderSubId());
|
||||||
@ -428,7 +429,7 @@ public class DeliverOrderServiceImpl implements DeliverOrderService {
|
|||||||
projectOrderSubMapper.updateById(projectOrderSubDO);
|
projectOrderSubMapper.updateById(projectOrderSubDO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
createDeliverOrderSubList(deliveryOrderId, list);
|
createDeliverOrderSubList(deliveryOrderId, list);
|
||||||
if(deliverOrderOtherSubs != null && !deliverOrderOtherSubs.isEmpty()){
|
if(deliverOrderOtherSubs != null && !deliverOrderOtherSubs.isEmpty()){
|
||||||
deliverOrderOtherSubs.forEach(o -> o.setId(null).setUpdater(null).setUpdateTime(null)); // 解决更新情况下:1)id 冲突;2)updateTime 不更新
|
deliverOrderOtherSubs.forEach(o -> o.setId(null).setUpdater(null).setUpdateTime(null)); // 解决更新情况下:1)id 冲突;2)updateTime 不更新
|
||||||
|
@ -56,4 +56,6 @@ public interface OrderYsService {
|
|||||||
void createOrUpdate(ProjectOrderSaveReqVO operateReqVO);
|
void createOrUpdate(ProjectOrderSaveReqVO operateReqVO);
|
||||||
|
|
||||||
void delete(ProjectOrderSaveReqVO operateReqVO);
|
void delete(ProjectOrderSaveReqVO operateReqVO);
|
||||||
|
|
||||||
|
PageResult<OrderYsDOVo> getDetails(OrderYsPageReqVO pageReqVO);
|
||||||
}
|
}
|
||||||
|
@ -4,8 +4,10 @@ import cn.hutool.core.util.ObjectUtil;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.orderysdetail.vo.OrderYsDetailSaveReqVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.orderysdetail.vo.OrderYsDetailSaveReqVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo.ProjectOrderSaveReqVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo.ProjectOrderSaveReqVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo.QualityStatistics;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderysdetail.OrderYsDetailDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderysdetail.OrderYsDetailDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderSubDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderSubDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.orderysdetail.OrderYsDetailMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.orderysdetail.OrderYsDetailMapper;
|
||||||
@ -160,4 +162,11 @@ public class OrderYsServiceImpl implements OrderYsService {
|
|||||||
orderYsMapper.delete(eq);
|
orderYsMapper.delete(eq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<OrderYsDOVo> getDetails(OrderYsPageReqVO pageReqVO) {
|
||||||
|
Page<OrderYsDOVo> page = new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize());
|
||||||
|
List<OrderYsDOVo> list = orderYsMapper.getDetails(page, pageReqVO);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,7 @@ package com.chanko.yunxi.mes.module.heli.service.processbom;
|
|||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.generator.IFill;
|
|
||||||
import com.chanko.yunxi.mes.framework.common.enums.BomEditStatusEnum;
|
import com.chanko.yunxi.mes.framework.common.enums.BomEditStatusEnum;
|
||||||
import com.chanko.yunxi.mes.framework.common.enums.StatusEnum;
|
import com.chanko.yunxi.mes.framework.common.enums.StatusEnum;
|
||||||
import com.chanko.yunxi.mes.framework.common.exception.ErrorCode;
|
import com.chanko.yunxi.mes.framework.common.exception.ErrorCode;
|
||||||
@ -13,7 +11,6 @@ import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
|||||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
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.PageResult;
|
||||||
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||||
import com.chanko.yunxi.mes.framework.dict.core.util.DictFrameworkUtils;
|
|
||||||
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
||||||
import com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum;
|
import com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum;
|
||||||
import com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils;
|
import com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
@ -23,7 +20,6 @@ import com.chanko.yunxi.mes.module.heli.controller.admin.processbom.vo.ProcessBo
|
|||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskPlanJDBaoBiaoPageReqVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskPlanJDBaoBiaoPageReqVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.attentiontodo.AttentiontodoDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.attentiontodo.AttentiontodoDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.bdgzsomthing.bdgzsomthingDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.bdgzsomthing.bdgzsomthingDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.bgmasterline.BgMasterLineDO;
|
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.composition.CompositionDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.composition.CompositionDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplan.MaterialPlanDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplan.MaterialPlanDO;
|
||||||
@ -33,7 +29,6 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.plantask.PlanTaskDO;
|
|||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plantaskbom.PlanTaskBomDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plantaskbom.PlanTaskBomDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordermakedetail.PurchaseOrderMakeDetailDO;
|
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.serialnumber.SerialNumberDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.serialnumber.SerialNumberDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.shenhe.ShenheDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.shenhe.ShenheDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO;
|
||||||
@ -41,7 +36,6 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatch
|
|||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskreport.TaskReportDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskreport.TaskReportDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.attentiontodo.AttentiontodoMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.attentiontodo.AttentiontodoMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMapper;
|
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.bgmasterline.BgMasterLineMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.bgmasterline.BgMasterLineMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.materialplan.MaterialPlanMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.materialplan.MaterialPlanMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.materialplanboom.MaterialPlanBoomMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.materialplanboom.MaterialPlanBoomMapper;
|
||||||
@ -70,7 +64,6 @@ import com.chanko.yunxi.mes.module.system.dal.dataobject.dict.DictDataDO;
|
|||||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
|
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
|
||||||
import com.chanko.yunxi.mes.module.system.dal.mysql.dict.DictDataMapper;
|
import com.chanko.yunxi.mes.module.system.dal.mysql.dict.DictDataMapper;
|
||||||
import com.chanko.yunxi.mes.module.system.service.user.AdminUserService;
|
import com.chanko.yunxi.mes.module.system.service.user.AdminUserService;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@ -78,17 +71,16 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
|
|
||||||
import com.chanko.yunxi.mes.module.heli.service.shenhe.SerarchUser;
|
import com.chanko.yunxi.mes.module.heli.service.shenhe.SerarchUser;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.thymeleaf.expression.Ids;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.Serializable;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.rmi.RemoteException;
|
import java.rmi.RemoteException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static com.chanko.yunxi.mes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
import static com.chanko.yunxi.mes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
@ -223,21 +215,31 @@ public class ProcessBomServiceImpl implements ProcessBomService {
|
|||||||
// list.forEach(item->{
|
// list.forEach(item->{
|
||||||
// blueprintNoList.add(item.getBlueprintNo());
|
// blueprintNoList.add(item.getBlueprintNo());
|
||||||
// });
|
// });
|
||||||
|
List<String> errorMessages = new ArrayList<>();
|
||||||
|
|
||||||
//确保本次传过来的图号没有重复的后看数据库的有没有重复的
|
//确保本次传过来的图号没有重复的后看数据库的有没有重复的
|
||||||
groupedByCode.forEach((code, listtemp) -> {
|
groupedByCode.forEach((code, listtemp) -> {
|
||||||
//同一个编码下按图号分组,如果有某个图号的list大小大于二就是重复图号,报错
|
//同一个编码下按图号分组,如果有某个图号的list大小大于二就是重复图号,报错
|
||||||
Map<String, List<ProcessBomImportExcelVO>> bluePrintNoList = listtemp.stream().collect(Collectors.groupingBy(vo -> vo.getBlueprintNo() == null ? "NULL" : vo.getBlueprintNo()));
|
Map<String, List<ProcessBomImportExcelVO>> bluePrintNoList = listtemp.stream().collect(Collectors.groupingBy(vo -> vo.getBlueprintNo() == null ? "NULL" : vo.getBlueprintNo()));
|
||||||
bluePrintNoList.forEach((printNo, listTemp1) -> {
|
bluePrintNoList.forEach((printNo, listTemp1) -> {
|
||||||
if (listTemp1.size() > 1) {
|
if (listTemp1.size() > 1) {
|
||||||
throw new RuntimeException("图号:" + printNo + "重复!");
|
// throw new RuntimeException("图号:" + printNo + "重复!");
|
||||||
|
errorMessages.add("图号:" + printNo + "重复!");
|
||||||
} else {
|
} else {
|
||||||
Long bomDetailByBluePrintNoAndBomId = processBomDetailMapper.getBomDetailByBluePrintNoAndBomId(Long.valueOf(bomId), printNo);
|
Long bomDetailByBluePrintNoAndBomId = processBomDetailMapper.getBomDetailByBluePrintNoAndBomId(Long.valueOf(bomId), printNo);
|
||||||
if (bomDetailByBluePrintNoAndBomId > 0) {
|
if (bomDetailByBluePrintNoAndBomId > 0) {
|
||||||
throw new RuntimeException("图号:" + printNo + "已存在,勿重复添加!");
|
// throw new RuntimeException("图号:" + printNo + "已存在,勿重复添加!");
|
||||||
|
errorMessages.add("图号:" + printNo + "已存在,勿重复添加!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
if (!errorMessages.isEmpty()) {
|
||||||
|
// String joinedErrors = String.join("\n", errorMessages);
|
||||||
|
// 此处可根据实际需求返回或处理错误信息
|
||||||
|
String joinedErrors = String.join(System.lineSeparator(), errorMessages);
|
||||||
|
throw new RuntimeException(joinedErrors); // 若仍需抛异常可改用此方式
|
||||||
|
}
|
||||||
//确保本次传过来的非标准件,物料名称不能重复
|
//确保本次传过来的非标准件,物料名称不能重复
|
||||||
groupedByCode.forEach((code, listtemp) -> {
|
groupedByCode.forEach((code, listtemp) -> {
|
||||||
//同一个编码下按物料名称分组,如果有某个物料名称的list大小大于1就是重复名称,报错
|
//同一个编码下按物料名称分组,如果有某个物料名称的list大小大于1就是重复名称,报错
|
||||||
|
@ -183,7 +183,7 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
|
|||||||
throw exception(PROCESS_BOM_DETAIL_NOT_EXISTS);
|
throw exception(PROCESS_BOM_DETAIL_NOT_EXISTS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(operateTypeEnum == OperateTypeEnum.SUBMIT||operateTypeEnum == OperateTypeEnum.SAVE){
|
if("PRODUCTION".equals(updateReqVO.getDispatchType())&&(operateTypeEnum == OperateTypeEnum.SUBMIT||operateTypeEnum == OperateTypeEnum.SAVE)){
|
||||||
ProcessBomDetailDO bomDetailDO = processBomDetailMapper.selectById(updateReqVO.getBomDetailId());
|
ProcessBomDetailDO bomDetailDO = processBomDetailMapper.selectById(updateReqVO.getBomDetailId());
|
||||||
if (ObjectUtil.isNotEmpty(bomDetailDO)){
|
if (ObjectUtil.isNotEmpty(bomDetailDO)){
|
||||||
ProcessBomDO processBomDO = processBomMapper.selectById(bomDetailDO.getBomId());
|
ProcessBomDO processBomDO = processBomMapper.selectById(bomDetailDO.getBomId());
|
||||||
|
@ -0,0 +1,57 @@
|
|||||||
|
<?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.orderys.OrderYsMapper">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||||
|
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||||
|
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||||
|
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||||
|
-->
|
||||||
|
|
||||||
|
<select id="getDetails"
|
||||||
|
resultType="com.chanko.yunxi.mes.module.heli.controller.admin.orderys.vo.OrderYsDOVo">
|
||||||
|
SELECT
|
||||||
|
t.*
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
1 AS type,
|
||||||
|
DATE_FORMAT(t.payment_date, '%Y-%m-%d') AS time,
|
||||||
|
t.cg_yishou as amount,
|
||||||
|
ys.project_name as projectName,
|
||||||
|
ys.cg_khname as customerName
|
||||||
|
FROM
|
||||||
|
cg_order_ys_detail t
|
||||||
|
left join cg_order_ys ys on t.cg_id=ys.id and ys.deleted=0
|
||||||
|
WHERE
|
||||||
|
t.deleted = 0
|
||||||
|
group by t.id
|
||||||
|
UNION ALL
|
||||||
|
SELECT
|
||||||
|
2 AS type,
|
||||||
|
DATE_FORMAT(t.billing_date, '%Y-%m-%d') AS time,
|
||||||
|
t.amount as amount,
|
||||||
|
p.project_name as projectName,
|
||||||
|
c.name as customerName
|
||||||
|
FROM
|
||||||
|
finance_invoice t
|
||||||
|
LEFT JOIN project_sale_order p ON t.order_id = p.id and p.deleted=0
|
||||||
|
LEFT JOIN base_customer c ON p.customer_id = c.id and c.deleted=0
|
||||||
|
WHERE
|
||||||
|
t.deleted = 0 and t.business_type='FINANCE_MAKE_INVOICE'
|
||||||
|
group by t.id
|
||||||
|
) t
|
||||||
|
where 1=1
|
||||||
|
<if test="pageReqVO.customerName!=null and pageReqVO.customerName!=''">
|
||||||
|
and t.customerName LIKE CONCAT('%',#{pageReqVO.customerName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="pageReqVO.type!=null and pageReqVO.type!=''">
|
||||||
|
and t.type =#{pageReqVO.type}
|
||||||
|
</if>
|
||||||
|
<if test="pageReqVO.createTime!=null and pageReqVO.createTime!=''">
|
||||||
|
and t.time BETWEEN DATE_FORMAT(#{pageReqVO.createTime[0]}, '%Y-%m-%d') and DATE_FORMAT(#{pageReqVO.createTime[1]}, '%Y-%m-%d')
|
||||||
|
</if>
|
||||||
|
order by t.type, t.time desc
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -42,4 +42,10 @@ export const deleteOrderYs = async (id: number) => {
|
|||||||
export const exportOrderYs = async (params) => {
|
export const exportOrderYs = async (params) => {
|
||||||
return await request.download({ url: `/heli/order-ys/export-excel`, params })
|
return await request.download({ url: `/heli/order-ys/export-excel`, params })
|
||||||
}
|
}
|
||||||
|
export const getDetails = async (params) => {
|
||||||
|
return await request.get({ url: `/heli/order-ys/getDetails`, params })
|
||||||
|
}
|
||||||
|
// 导出应收记录 Excel
|
||||||
|
export const exportDetails = async (params) => {
|
||||||
|
return await request.download({ url: `/heli/order-ys/exportDetails`, params })
|
||||||
|
}
|
||||||
|
@ -299,5 +299,7 @@ export enum DICT_TYPE {
|
|||||||
HELI_STORAGE_IN_STATUS = 'heli_storage_in_status',//入库出库状态
|
HELI_STORAGE_IN_STATUS = 'heli_storage_in_status',//入库出库状态
|
||||||
HELI_STOCK_MODE = 'heli_stock_mode',//库存变动日志类型
|
HELI_STOCK_MODE = 'heli_stock_mode',//库存变动日志类型
|
||||||
HELI_PROCESS_TYPE="heli_process_type",
|
HELI_PROCESS_TYPE="heli_process_type",
|
||||||
HELI_RECEIVING_STATUS="heli_receiving_status"
|
HELI_RECEIVING_STATUS="heli_receiving_status",
|
||||||
|
HELI_YS_TYPE = 'heli_ys_type', // 质检类型
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="发货日期" prop="deliverDate">
|
<el-form-item label="发货日期" prop="deliverDate">
|
||||||
<el-date-picker :disabled="detailDisabled" v-model="formData.deliverDate" type="date" value-format="x" placeholder="选择发货日期" class="!w-250px" />
|
<el-date-picker :disabled="detailDisabled || active!='create'" v-model="formData.deliverDate" type="date" value-format="x" placeholder="选择发货日期" class="!w-250px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
@ -68,7 +68,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="发货备注" prop="remark">
|
<el-form-item label="发货备注" prop="remark">
|
||||||
<el-input :disabled="detailDisabled" type="textarea" v-model="formData.remark" show-word-limit maxlength="200" />
|
<el-input :disabled="detailDisabled || active!='create'" type="textarea" v-model="formData.remark" show-word-limit maxlength="200" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -194,7 +194,7 @@
|
|||||||
<el-table-column label="子项目图号" min-width="200" align="center">
|
<el-table-column label="子项目图号" min-width="200" align="center">
|
||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-form-item :prop="`${$index}.blueprintNo`" :rules="subFormRules.blueprintNo" class="mb-0px!">
|
<el-form-item :prop="`${$index}.blueprintNo`" :rules="subFormRules.blueprintNo" class="mb-0px!">
|
||||||
<el-input :disabled="detailDisabled" v-model="row.blueprintNo" placeholder="请输入子项目图号" />
|
<el-input :disabled="detailDisabled || flag" v-model="row.blueprintNo" placeholder="请输入子项目图号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -203,7 +203,7 @@
|
|||||||
<template #header> <span class="hl-table_header">*</span>本次发货数量 </template>
|
<template #header> <span class="hl-table_header">*</span>本次发货数量 </template>
|
||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-form-item :prop="`${$index}.amount`" :rules="subFormRules.amount" class="mb-0px!">
|
<el-form-item :prop="`${$index}.amount`" :rules="subFormRules.amount" class="mb-0px!">
|
||||||
<el-input-number :disabled="detailDisabled" v-model="row.amount" placeholder="请输入本次发货数量" style="width: 100%" :min="1" /><!-- :precision="0" -->
|
<el-input-number :disabled="detailDisabled || flag" v-model="row.amount" placeholder="请输入本次发货数量" style="width: 100%" :min="1" /><!-- :precision="0" -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -218,7 +218,7 @@
|
|||||||
<template #header> <span class="hl-table_header">*</span>重量(T)</template>
|
<template #header> <span class="hl-table_header">*</span>重量(T)</template>
|
||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-form-item :prop="`${$index}.weight`" :rules="subFormRules.weight" class="mb-0px!">
|
<el-form-item :prop="`${$index}.weight`" :rules="subFormRules.weight" class="mb-0px!">
|
||||||
<el-input :disabled="detailDisabled" v-model="row.weight" @blur="yunFei()" placeholder="请输入重量(T)" />
|
<el-input :disabled="detailDisabled || flag" v-model="row.weight" @blur="yunFei()" placeholder="请输入重量(T)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -230,14 +230,14 @@
|
|||||||
<el-table-column label="尺寸(米)" min-width="150" align="center">
|
<el-table-column label="尺寸(米)" min-width="150" align="center">
|
||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-form-item :prop="`${$index}.size`" class="mb-0px!">
|
<el-form-item :prop="`${$index}.size`" class="mb-0px!">
|
||||||
<el-input :disabled="detailDisabled" v-model="row.size" placeholder="请输入尺寸(米)" />
|
<el-input :disabled="detailDisabled || flag" v-model="row.size" placeholder="请输入尺寸(米)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" min-width="180" align="center">
|
<el-table-column label="备注" min-width="180" align="center">
|
||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-form-item :prop="`${$index}.remark`" class="mb-0px!">
|
<el-form-item :prop="`${$index}.remark`" class="mb-0px!">
|
||||||
<el-input :disabled="detailDisabled" v-model="row.remark" placeholder="请输入备注" />
|
<el-input :disabled="detailDisabled || flag" v-model="row.remark" placeholder="请输入备注" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -261,7 +261,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col v-if="active != 'detail'">
|
<el-col v-if="active != 'detail'">
|
||||||
<el-button class="hl-addbutton" type="primary" size="large" @click="onAddItem2">新增</el-button>
|
<el-button class="hl-addbutton" type="primary" size="large" @click="onAddItem2" :disabled="flag">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col>
|
<el-col>
|
||||||
<el-card class="hl-incard">
|
<el-card class="hl-incard">
|
||||||
@ -272,7 +272,7 @@
|
|||||||
<template #header> <span class="hl-table_header">*</span>名称 </template>
|
<template #header> <span class="hl-table_header">*</span>名称 </template>
|
||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-form-item :prop="`${$index}.name`" :rules="subFormRules.name" class="mb-0px!">
|
<el-form-item :prop="`${$index}.name`" :rules="subFormRules.name" class="mb-0px!">
|
||||||
<el-input :disabled="detailDisabled" v-model="row.name" />
|
<el-input :disabled="detailDisabled || flag" v-model="row.name" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -280,7 +280,7 @@
|
|||||||
<template #header> <span class="hl-table_header">*</span>所属类型 </template>
|
<template #header> <span class="hl-table_header">*</span>所属类型 </template>
|
||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-form-item :prop="`${$index}.subType`" :rules="subFormRules.subType" class="mb-0px!">
|
<el-form-item :prop="`${$index}.subType`" :rules="subFormRules.subType" class="mb-0px!">
|
||||||
<el-select :disabled="detailDisabled" v-model="row.subType" placeholder="请选择子项类型">
|
<el-select :disabled="detailDisabled || flag" v-model="row.subType" placeholder="请选择子项类型">
|
||||||
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.HELI_DELIVER_MATERIAL_TYPE)" :key="dict.value" :label="dict.label" :value="dict.value" />
|
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.HELI_DELIVER_MATERIAL_TYPE)" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -290,7 +290,7 @@
|
|||||||
<template #header> <span class="hl-table_header">*</span>本次发货数量 </template>
|
<template #header> <span class="hl-table_header">*</span>本次发货数量 </template>
|
||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-form-item :prop="`${$index}.amount`" :rules="subFormRules.amount" class="mb-0px!">
|
<el-form-item :prop="`${$index}.amount`" :rules="subFormRules.amount" class="mb-0px!">
|
||||||
<el-input-number :disabled="detailDisabled || row.id" v-model="row.amount" placeholder="请输入本次发货数量" style="width: 100%" :min="1" :precision="0"/><!-- :precision="0" -->
|
<el-input-number :disabled="detailDisabled || row.id || flag" v-model="row.amount" placeholder="请输入本次发货数量" style="width: 100%" :min="1" :precision="0"/><!-- :precision="0" -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -298,7 +298,7 @@
|
|||||||
<template #header> <span class="hl-table_header">*</span>单位 </template>
|
<template #header> <span class="hl-table_header">*</span>单位 </template>
|
||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-form-item :prop="`${$index}.unit`" :rules="subFormRules.unit" class="mb-0px!">
|
<el-form-item :prop="`${$index}.unit`" :rules="subFormRules.unit" class="mb-0px!">
|
||||||
<el-select :disabled="detailDisabled" v-model="row.unit" placeholder="请选择单位">
|
<el-select :disabled="detailDisabled || flag" v-model="row.unit" placeholder="请选择单位">
|
||||||
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.HELI_MATERIAL_UNIT)" :key="dict.value" :label="dict.label" :value="dict.value" />
|
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.HELI_MATERIAL_UNIT)" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -307,7 +307,7 @@
|
|||||||
<el-table-column label="备注" min-width="150" align="center">
|
<el-table-column label="备注" min-width="150" align="center">
|
||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-form-item :prop="`${$index}.remark`" class="mb-0px!">
|
<el-form-item :prop="`${$index}.remark`" class="mb-0px!">
|
||||||
<el-input :disabled="detailDisabled" v-model="row.remark" placeholder="请输入备注" />
|
<el-input :disabled="detailDisabled || flag" v-model="row.remark" placeholder="请输入备注" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -362,7 +362,7 @@
|
|||||||
<template #header>
|
<template #header>
|
||||||
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">操作日志</span>
|
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">操作日志</span>
|
||||||
<el-button @click="goback" size="large" style="margin-left: 5rem">取 消</el-button>
|
<el-button @click="goback" size="large" style="margin-left: 5rem">取 消</el-button>
|
||||||
<!-- <el-button v-if="active != 'detail' && formData.deliverStatus == 1" @click="submitForm('SAVE')" type="success" :disabled="formLoading" size="large">保 存</el-button>-->
|
<el-button v-if="active != 'detail' && formData.deliverStatus == 1" @click="submitForm('SAVE')" type="success" :disabled="formLoading" size="large">保 存</el-button>
|
||||||
<el-button v-if="(((active != 'detail' && formData.id) || active == 'deliver') && formData.deliverStatus == 1)" @click="submitForm('DELIVER')" type="primary" :disabled="formLoading" size="large">发 货</el-button>
|
<el-button v-if="(((active != 'detail' && formData.id) || active == 'deliver') && formData.deliverStatus == 1)" @click="submitForm('DELIVER')" type="primary" :disabled="formLoading" size="large">发 货</el-button>
|
||||||
<el-button v-if="active == 'detail' && formData.deliverStatus == 2 && formData.id" type="primary" @click="printHandle" :disabled="formLoading" size="large">打印发货单</el-button>
|
<el-button v-if="active == 'detail' && formData.deliverStatus == 2 && formData.id" type="primary" @click="printHandle" :disabled="formLoading" size="large">打印发货单</el-button>
|
||||||
</template>
|
</template>
|
||||||
@ -435,7 +435,7 @@ import Decimal from 'decimal.js';
|
|||||||
defineOptions({ name: 'DeliverOrderDetail' })
|
defineOptions({ name: 'DeliverOrderDetail' })
|
||||||
|
|
||||||
const reload: any = inject('reload')
|
const reload: any = inject('reload')
|
||||||
|
const flag = ref(false)
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
@ -945,6 +945,7 @@ const queryData = async (type: string, id?: number) => {
|
|||||||
formData.value.deliverOrderSubs = formData.value.deliverOrderSubs.concat(
|
formData.value.deliverOrderSubs = formData.value.deliverOrderSubs.concat(
|
||||||
subList
|
subList
|
||||||
)
|
)
|
||||||
|
|
||||||
// formData.value.deliverOrderSubs.forEach((sub) => {
|
// formData.value.deliverOrderSubs.forEach((sub) => {
|
||||||
// sub.saleOrderId = saleOrderIdArr[i];
|
// sub.saleOrderId = saleOrderIdArr[i];
|
||||||
// sub.remark = ''
|
// sub.remark = ''
|
||||||
@ -956,6 +957,7 @@ const queryData = async (type: string, id?: number) => {
|
|||||||
}
|
}
|
||||||
// console.log(formData.value.deliverOrderSubs )
|
// console.log(formData.value.deliverOrderSubs )
|
||||||
} else {
|
} else {
|
||||||
|
flag.value=true
|
||||||
// 分类发货清单与其他物料清单
|
// 分类发货清单与其他物料清单
|
||||||
formData.value.deliverOrderSubs = subArr.filter((sub) => sub.category == 'DELIVER_LIST')
|
formData.value.deliverOrderSubs = subArr.filter((sub) => sub.category == 'DELIVER_LIST')
|
||||||
formData.value.deliverOrderOtherSubs = subArr.filter((sub) => sub.category == 'OTHER_LIST')
|
formData.value.deliverOrderOtherSubs = subArr.filter((sub) => sub.category == 'OTHER_LIST')
|
||||||
@ -1103,6 +1105,7 @@ const initData = async () => {
|
|||||||
if ('detail' == active.value) {
|
if ('detail' == active.value) {
|
||||||
detailDisabled.value = true
|
detailDisabled.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('deliver' == active.value && query.projectOrderId) {
|
if ('deliver' == active.value && query.projectOrderId) {
|
||||||
await initDeliverData(query.projectOrderId)
|
await initDeliverData(query.projectOrderId)
|
||||||
}
|
}
|
||||||
@ -1110,7 +1113,6 @@ const initData = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const detailDisabled = ref(false)
|
const detailDisabled = ref(false)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
initData()
|
initData()
|
||||||
})
|
})
|
||||||
|
@ -151,7 +151,6 @@
|
|||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.deliverStatus == 1"
|
|
||||||
link
|
link
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="openDetail('update', scope.row.id)"
|
@click="openDetail('update', scope.row.id)"
|
||||||
|
@ -441,6 +441,7 @@ onMounted(() => {
|
|||||||
if ('detail' == active.value) {
|
if ('detail' == active.value) {
|
||||||
detailDisabled.value = true
|
detailDisabled.value = true
|
||||||
}
|
}
|
||||||
|
console.log(uploadUrl.value)
|
||||||
queryData(currentId.value)
|
queryData(currentId.value)
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
@ -200,7 +200,7 @@ const getList = async () => {
|
|||||||
const data = await MaterialPlanApi.getPartPage(queryParams)
|
const data = await MaterialPlanApi.getPartPage(queryParams)
|
||||||
list.value = data.list
|
list.value = data.list
|
||||||
list.value.forEach(item=> {
|
list.value.forEach(item=> {
|
||||||
if (item.status==true){
|
if (item.status==false|| item.duEmpId==null||item.duEmpId==''){
|
||||||
item.boomArriveDate=item.endTime
|
item.boomArriveDate=item.endTime
|
||||||
if (item.owner!=null&&item.owner!=''){
|
if (item.owner!=null&&item.owner!=''){
|
||||||
item.duEmpId=item.owner;
|
item.duEmpId=item.owner;
|
||||||
@ -271,7 +271,6 @@ const handleSelectionChange = (val) => {
|
|||||||
break
|
break
|
||||||
}else {
|
}else {
|
||||||
bomDetails[i].chkboxEnable=false
|
bomDetails[i].chkboxEnable=false
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -351,84 +351,89 @@ const submitForm = async () => {
|
|||||||
// 校验表单
|
// 校验表单
|
||||||
// await formRef.value.validate()
|
// await formRef.value.validate()
|
||||||
// await OrderYsDetailSubFormRef.value.validate()
|
// await OrderYsDetailSubFormRef.value.validate()
|
||||||
for (let i = 0; i < formData.value.orderYsDetails.length; i++) {
|
// for (let i = 0; i < formData.value.orderYsDetails.length; i++) {
|
||||||
if (formData.value.orderYsDetails[i].paymentDate==null){
|
// if (formData.value.orderYsDetails[i].paymentDate==null){
|
||||||
message.error('第'+(i+1)+'行回款日期不能为空')
|
// message.error('第'+(i+1)+'行回款日期不能为空')
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
if (formData.value.orderYsDetails[i].cgType==null){
|
// if (formData.value.orderYsDetails[i].cgType==null){
|
||||||
message.error('第'+(i+1)+'行回款类型不能为空')
|
// message.error('第'+(i+1)+'行回款类型不能为空')
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
if (formData.value.orderYsDetails[i].cgYishou==null){
|
// if (formData.value.orderYsDetails[i].cgYishou==null){
|
||||||
message.error('第'+(i+1)+'行回款金额不能为空')
|
// message.error('第'+(i+1)+'行回款金额不能为空')
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (formData.value.orderYsDetails[i].cgType==1&&formData.value.shouFuKuan==null){
|
// if (formData.value.orderYsDetails[i].cgType==1&&formData.value.shouFuKuan==null){
|
||||||
message.error('付款类型跟订单不一致,不允许添加')
|
// message.error('付款类型跟订单不一致,不允许添加')
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
if (formData.value.orderYsDetails[i].cgType==2&&formData.value.twoFuKuan==null){
|
// if (formData.value.orderYsDetails[i].cgType==2&&formData.value.twoFuKuan==null){
|
||||||
message.error('付款类型跟订单不一致,不允许添加')
|
// message.error('付款类型跟订单不一致,不允许添加')
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
if (formData.value.orderYsDetails[i].cgType==3&&formData.value.threeFuKuan==null){
|
// if (formData.value.orderYsDetails[i].cgType==3&&formData.value.threeFuKuan==null){
|
||||||
message.error('付款类型跟订单不一致,不允许添加')
|
// message.error('付款类型跟订单不一致,不允许添加')
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
if (formData.value.orderYsDetails[i].cgType==4&&formData.value.fourFuKuan==null){
|
// if (formData.value.orderYsDetails[i].cgType==4&&formData.value.fourFuKuan==null){
|
||||||
message.error('付款类型跟订单不一致,不允许添加')
|
// message.error('付款类型跟订单不一致,不允许添加')
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
if (formData.value.orderYsDetails[i].cgType==5&&formData.value.fiveFuKuan==null){
|
// if (formData.value.orderYsDetails[i].cgType==5&&formData.value.fiveFuKuan==null){
|
||||||
message.error('付款类型跟订单不一致,不允许添加')
|
// message.error('付款类型跟订单不一致,不允许添加')
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
if (formData.value.orderYsDetails[i].cgType==6&&formData.value.sixFuKuan==null){
|
// if (formData.value.orderYsDetails[i].cgType==6&&formData.value.sixFuKuan==null){
|
||||||
message.error('付款类型跟订单不一致,不允许添加')
|
// message.error('付款类型跟订单不一致,不允许添加')
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
if (formData.value.orderYsDetails[i].cgType==1&&formData.value.orderYsDetails[i].cgYishou>formData.value.shouFuKuan){
|
// if (formData.value.orderYsDetails[i].cgType==1&&formData.value.orderYsDetails[i].cgYishou>formData.value.shouFuKuan){
|
||||||
message.error('首付款回款金额'+formData.value.orderYsDetails[i].cgYishou+">首付款应收金额"+formData.value.shouFuKuan+",请确认");
|
// message.error('首付款回款金额'+formData.value.orderYsDetails[i].cgYishou+">首付款应收金额"+formData.value.shouFuKuan+",请确认");
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
if (formData.value.orderYsDetails[i].cgType==2&&formData.value.orderYsDetails[i].cgYishou>formData.value.twoFuKuan){
|
// if (formData.value.orderYsDetails[i].cgType==2&&formData.value.orderYsDetails[i].cgYishou>formData.value.twoFuKuan){
|
||||||
message.error('第二笔款回款金额'+formData.value.orderYsDetails[i].cgYishou+">第二笔款应收金额"+formData.value.twoFuKuan+",请确认")
|
// message.error('第二笔款回款金额'+formData.value.orderYsDetails[i].cgYishou+">第二笔款应收金额"+formData.value.twoFuKuan+",请确认")
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
if (formData.value.orderYsDetails[i].cgType==3&&formData.value.orderYsDetails[i].cgYishou>formData.value.threeFuKuan){
|
// if (formData.value.orderYsDetails[i].cgType==3&&formData.value.orderYsDetails[i].cgYishou>formData.value.threeFuKuan){
|
||||||
message.error('第三笔款回款金额'+formData.value.orderYsDetails[i].cgYishou+">第三笔款应收金额"+formData.value.threeFuKuan+",请确认")
|
// message.error('第三笔款回款金额'+formData.value.orderYsDetails[i].cgYishou+">第三笔款应收金额"+formData.value.threeFuKuan+",请确认")
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
if (formData.value.orderYsDetails[i].cgType==4&&formData.value.orderYsDetails[i].cgYishou>formData.value.fourFuKuan){
|
// if (formData.value.orderYsDetails[i].cgType==4&&formData.value.orderYsDetails[i].cgYishou>formData.value.fourFuKuan){
|
||||||
message.error('第四笔款回款金额'+formData.value.orderYsDetails[i].cgYishou+">第四笔款应收金额"+formData.value.fourFuKuan+",请确认")
|
// message.error('第四笔款回款金额'+formData.value.orderYsDetails[i].cgYishou+">第四笔款应收金额"+formData.value.fourFuKuan+",请确认")
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
if (formData.value.orderYsDetails[i].cgType==5&&formData.value.orderYsDetails[i].cgYishou>formData.value.fiveFuKuan){
|
// if (formData.value.orderYsDetails[i].cgType==5&&formData.value.orderYsDetails[i].cgYishou>formData.value.fiveFuKuan){
|
||||||
message.error('第五笔款回款金额'+formData.value.orderYsDetails[i].cgYishou+">第五笔款应收金额"+formData.value.fiveFuKuan+",请确认")
|
// message.error('第五笔款回款金额'+formData.value.orderYsDetails[i].cgYishou+">第五笔款应收金额"+formData.value.fiveFuKuan+",请确认")
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
if (formData.value.orderYsDetails[i].cgType==6&&formData.value.orderYsDetails[i].cgYishou>formData.value.sixFuKuan){
|
// if (formData.value.orderYsDetails[i].cgType==6&&formData.value.orderYsDetails[i].cgYishou>formData.value.sixFuKuan){
|
||||||
message.error('第六笔款回款金额'+formData.value.orderYsDetails[i].cgYishou+">第六笔款应收金额"+formData.value.sixFuKuan+",请确认")
|
// message.error('第六笔款回款金额'+formData.value.orderYsDetails[i].cgYishou+">第六笔款应收金额"+formData.value.sixFuKuan+",请确认")
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (formData.value.cgYishou!=''&&formData.value.cgYishou!=undefined&&formData.value.cgYishou!=null){
|
if (formData.value.cgYishou!=''&&formData.value.cgYishou!=undefined&&formData.value.cgYishou!=null){
|
||||||
if (formData.value.cgYishou<formData.value.cgYs&&formData.value.cgTypee==1){
|
// if (formData.value.cgYishou<formData.value.cgYs&&formData.value.cgTypee==1){
|
||||||
await message.confirm("已收金额小于应收金额,回款未全部完成,请确认")
|
// await message.confirm("已收金额小于应收金额,回款未全部完成,请确认")
|
||||||
}else if (formData.value.cgYishou>=formData.value.cgYs&&formData.value.cgTypee==2){
|
// }else if (formData.value.cgYishou>=formData.value.cgYs&&formData.value.cgTypee==2){
|
||||||
await message.confirm("已收金额大于等于应收金额,回款已完成,请确认")
|
// await message.confirm("已收金额大于等于应收金额,回款已完成,请确认")
|
||||||
}else if (formData.value.cgTypee==3){
|
// }else if (formData.value.cgTypee==3){
|
||||||
await message.confirm("已收金额不为0,不能选择未付款,请确认")
|
// await message.confirm("已收金额不为0,不能选择未付款,请确认")
|
||||||
|
// }
|
||||||
|
if (formData.value.cgYishou>formData.value.cgYs){
|
||||||
|
message.error("已收金额大于应收金额,请确认")
|
||||||
|
return false
|
||||||
|
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
if (formData.value.cgTypee==2||formData.value.cgTypee==1){
|
// if (formData.value.cgTypee==2||formData.value.cgTypee==1){
|
||||||
await message.confirm("未输入已收金额,回款未完成,请确认")
|
// await message.confirm("未输入已收金额,回款未完成,请确认")
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
// 提交请求
|
// 提交请求
|
||||||
formLoading.value = true
|
formLoading.value = true
|
||||||
|
226
mes-ui/mes-ui-admin-vue3/src/views/heli/orderys/details.vue
Normal file
226
mes-ui/mes-ui-admin-vue3/src/views/heli/orderys/details.vue
Normal file
@ -0,0 +1,226 @@
|
|||||||
|
<template>
|
||||||
|
<el-card class="hl-card">
|
||||||
|
<template #header>
|
||||||
|
<span>回款明细查询</span>
|
||||||
|
</template>
|
||||||
|
<ContentWrap class="borderxx">
|
||||||
|
<!-- 搜索工作栏 -->
|
||||||
|
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="80px">
|
||||||
|
<el-form-item label="日期" prop="endTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="queryParams.createTime"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
type="daterange"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
class="!w-255px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户" prop="customerName">
|
||||||
|
<el-input v-model="queryParams.customerName" placeholder="请输入客户" clearable @keyup.enter="handleQuery"
|
||||||
|
class="!w-255px" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="类型" prop="type">
|
||||||
|
<el-select v-model="queryParams.type" placeholder="请选择类型" clearable class="!w-255px">
|
||||||
|
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.HELI_YS_TYPE)" :key="dict.value"
|
||||||
|
:label="dict.label" :value="dict.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item style="margin-left: 20px">
|
||||||
|
<el-button @click="handleQuery" type="primary">
|
||||||
|
<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="success"
|
||||||
|
plain
|
||||||
|
@click="handleExportDetail"
|
||||||
|
:loading="exportLoading"
|
||||||
|
>
|
||||||
|
<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" class="hl-table" show-summary :summary-method="getSummaries" border>
|
||||||
|
<el-table-column fixed type="index" width="100" label="序号" align="center" />
|
||||||
|
<el-table-column label="日期" align="center" prop="time" />
|
||||||
|
<el-table-column label="客户名称" align="center" prop="customerName" />
|
||||||
|
<el-table-column label="项目名称" align="center" prop="projectName" />
|
||||||
|
<el-table-column label="类型" align="center" prop="type" >
|
||||||
|
<template #default="scope">
|
||||||
|
<!-- <dict-tag :type="DICT_TYPE.HELI_INSPECTION_TYPE" :value="scope.row.type" />-->
|
||||||
|
{{ getDictLabel(DICT_TYPE.HELI_YS_TYPE,scope.row.type) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="金额" align="center" prop="amount"/>
|
||||||
|
</el-table>
|
||||||
|
<!-- 分页 -->
|
||||||
|
<Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
|
||||||
|
@pagination="getList" />
|
||||||
|
</ContentWrap>
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { getIntDictOptions, getStrDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||||
|
import * as UnqualifiedNotificationApi from '@/api/heli/unqualifiednotification'
|
||||||
|
import { useCommonStore } from "@/store/modules/common";
|
||||||
|
|
||||||
|
import download from "@/utils/download";
|
||||||
|
import from from "@/views/heli/unqualifiednotification/from.vue";
|
||||||
|
import {ref} from "vue";
|
||||||
|
import * as OrderYsApi from "@/api/heli/orderys";
|
||||||
|
import {dateFormatter2, dateFormatter3} from "@/utils/formatTime";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
|
defineOptions({ name: 'UnqualifiedNotificationStatistic' })
|
||||||
|
|
||||||
|
const message = useMessage() // 消息弹窗
|
||||||
|
const { t } = useI18n() // 国际化
|
||||||
|
const commonStore = useCommonStore()
|
||||||
|
const router = useRouter()
|
||||||
|
|
||||||
|
const loading = ref(true) // 列表的加载中
|
||||||
|
const list = ref([]) // 列表的数据
|
||||||
|
const fileUrlList = ref([]) // 列表的数据
|
||||||
|
const total = ref(0) // 列表的总页数
|
||||||
|
const queryParams = reactive({
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
code: undefined,
|
||||||
|
type: undefined,
|
||||||
|
customerName: undefined,
|
||||||
|
createTime: [],
|
||||||
|
})
|
||||||
|
const dialogVisible = ref(false)
|
||||||
|
|
||||||
|
const queryFormRef = ref() // 搜索的表单
|
||||||
|
const exportLoading = ref(false) // 导出的加载中
|
||||||
|
/** 添加/修改操作 */
|
||||||
|
const formRef = ref()
|
||||||
|
/** 查询列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
const data = await OrderYsApi.getDetails(queryParams)
|
||||||
|
list.value = data.list
|
||||||
|
total.value = data.total
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const getSummaries = (param: SummaryMethodProps) => {
|
||||||
|
const summaryField = ["amount"];
|
||||||
|
const { columns, data } = param;
|
||||||
|
const sums = [];
|
||||||
|
columns.forEach((column, index) => {
|
||||||
|
if (index === 0) {
|
||||||
|
sums[index] = '合计';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!summaryField.includes(column.property)) {
|
||||||
|
sums[index] = '';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const values = data.map(item => Number(item[column.property]));
|
||||||
|
if (!values.every(value => isNaN(value))) {
|
||||||
|
sums[index] = values.reduce((prev, curr) => {
|
||||||
|
const value = Number(curr);
|
||||||
|
if (!isNaN(value)) {
|
||||||
|
return floatAdd(prev, curr);
|
||||||
|
} else {
|
||||||
|
return prev;
|
||||||
|
}
|
||||||
|
}, 0);
|
||||||
|
const thousandsField = [];
|
||||||
|
if (thousandsField.includes(column.property)) {
|
||||||
|
sums[index] = thousandsFormat(sums[index]);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
sums[index] = '';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// const sumValue = computed(() => {
|
||||||
|
// return list.value.reduce((sum, item) => sum + item.quantityLent, 0);
|
||||||
|
// });
|
||||||
|
// const sums = ['合计','','','','','','','',sumValue];
|
||||||
|
return sums;
|
||||||
|
}
|
||||||
|
const floatAdd = (a, b) => {
|
||||||
|
var c, d, e;
|
||||||
|
if (undefined === a || null === a || "" === a || isNaN(a)) { a = 0; }
|
||||||
|
if (undefined === b || null === b || "" === b || isNaN(b)) { b = 0; }
|
||||||
|
try {
|
||||||
|
c = a.toString().split(".")[1].length;
|
||||||
|
} catch (f) {
|
||||||
|
c = 0;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
d = b.toString().split(".")[1].length;
|
||||||
|
} catch (f) {
|
||||||
|
d = 0;
|
||||||
|
}
|
||||||
|
e = Math.pow(10, Math.max(c, d));
|
||||||
|
return (floatMul(a, e) + floatMul(b, e)) / e;
|
||||||
|
};
|
||||||
|
const floatMul = (a, b) => {
|
||||||
|
var c = 0,
|
||||||
|
d = a.toString(),
|
||||||
|
e = b.toString();
|
||||||
|
try {
|
||||||
|
c += d.split(".")[1].length;
|
||||||
|
} catch (f) {}
|
||||||
|
try {
|
||||||
|
c += e.split(".")[1].length;
|
||||||
|
} catch (f) {}
|
||||||
|
return Number(d.replace(".", "")) * Number(e.replace(".", "")) / Math.pow(10, c);
|
||||||
|
}
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.pageNo = 1
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
const getDictLabel = (dictType, value) => {
|
||||||
|
var intDictOptions = getIntDictOptions(dictType);
|
||||||
|
const dict = intDictOptions.find(item => item.value == value)
|
||||||
|
return dict?.label || value // 找不到时显示原始值
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
const handleExportDetail = async () => {
|
||||||
|
try {
|
||||||
|
// 导出的二次确认
|
||||||
|
await message.exportConfirm()
|
||||||
|
// 发起导出
|
||||||
|
exportLoading.value = true
|
||||||
|
const data = await OrderYsApi.exportDetails(queryParams)
|
||||||
|
download.excel(data, '回款明细查询.xlsx')
|
||||||
|
} catch {
|
||||||
|
} finally {
|
||||||
|
exportLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const setDefaultDate = () => {
|
||||||
|
queryParams.createTime = [
|
||||||
|
dayjs().startOf('day').format('YYYY-MM-DD HH:mm:ss'),
|
||||||
|
dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss')
|
||||||
|
]
|
||||||
|
}
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
const resetQuery = () => {
|
||||||
|
queryFormRef.value.resetFields()
|
||||||
|
handleQuery()
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 初始化 **/
|
||||||
|
onMounted(() => {
|
||||||
|
setDefaultDate()
|
||||||
|
getList()
|
||||||
|
})
|
||||||
|
</script>
|
@ -94,7 +94,7 @@
|
|||||||
<!-- :formatter="dateFormatter"-->
|
<!-- :formatter="dateFormatter"-->
|
||||||
<!-- width="250px"-->
|
<!-- width="250px"-->
|
||||||
<!-- />-->
|
<!-- />-->
|
||||||
<el-table-column label="客户名称" align="center" prop="cgKhname"/>
|
<el-table-column label="客户名称" align="center" prop="cgKhname" width="200px"/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="预计回款日期"
|
label="预计回款日期"
|
||||||
align="center"
|
align="center"
|
||||||
@ -102,9 +102,9 @@
|
|||||||
:formatter="dateFormatter1"
|
:formatter="dateFormatter1"
|
||||||
width="200px"
|
width="200px"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="应收金额(元)" align="center" prop="cgYs" />
|
<el-table-column label="应收金额(元)" align="center" prop="cgYs" width="160px"/>
|
||||||
<el-table-column label="已收金额(元)" align="center" prop="cgYishou" />
|
<el-table-column label="已收金额(元)" align="center" prop="cgYishou" width="160px"/>
|
||||||
<el-table-column label="已收款比例" align="center" >
|
<el-table-column label="已收款比例" align="center" width="180px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{
|
{{
|
||||||
scope.row.cgYishou&&scope.row.cgYs
|
scope.row.cgYishou&&scope.row.cgYs
|
||||||
@ -113,8 +113,8 @@
|
|||||||
}}%
|
}}%
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="已开票金额(元)" align="center" prop="amount" />
|
<el-table-column label="已开票金额(元)" align="center" prop="amount" width="160px"/>
|
||||||
<el-table-column label="已开票比例" align="center" >
|
<el-table-column label="已开票比例" align="center" width="160px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{
|
{{
|
||||||
scope.row.cgYs&&scope.row.cgYs
|
scope.row.cgYs&&scope.row.cgYs
|
||||||
@ -123,7 +123,7 @@
|
|||||||
}}%
|
}}%
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="回款状态" align="center" prop="cgTypee" >
|
<el-table-column label="回款状态" align="center" prop="cgTypee" width="120px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :type="DICT_TYPE.HELI_YINGFU_MONEY" :value="scope.row.cgTypee" />
|
<dict-tag :type="DICT_TYPE.HELI_YINGFU_MONEY" :value="scope.row.cgTypee" />
|
||||||
</template>
|
</template>
|
||||||
@ -134,8 +134,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="项目编号" align="center" prop="code" width="180"/>-->
|
<!-- <el-table-column label="项目编号" align="center" prop="code" width="180"/>-->
|
||||||
<el-table-column label="备注" align="center" prop="rem" />
|
<el-table-column label="备注" align="center" prop="rem" width="200px"/>
|
||||||
<el-table-column label="操作" align="center" >
|
<el-table-column label="操作" align="center" width="150px" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
@ -143,7 +143,10 @@
|
|||||||
@click="openForm('update', scope.row.id)"
|
@click="openForm('update', scope.row.id)"
|
||||||
v-hasPermi="['heli:order-ys:update']"
|
v-hasPermi="['heli:order-ys:update']"
|
||||||
>
|
>
|
||||||
编辑
|
应收
|
||||||
|
</el-button>
|
||||||
|
<el-button link type="primary" size="small" @click.prevent="invoices(scope.row.id,scope.row.projectId,scope.row.projectCode)">
|
||||||
|
开票
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button v-if=" scope.row.cgYishou==null"-->
|
<!-- <el-button v-if=" scope.row.cgYishou==null"-->
|
||||||
<!-- link-->
|
<!-- link-->
|
||||||
@ -167,6 +170,8 @@
|
|||||||
|
|
||||||
<!-- 表单弹窗:添加/修改 -->
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
<OrderYsForm ref="formRef" @success="getList" />
|
<OrderYsForm ref="formRef" @success="getList" />
|
||||||
|
<Invoivce ref="formRefs" @success="getList" />
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@ -175,11 +180,14 @@ import download from '@/utils/download'
|
|||||||
import * as OrderYsApi from '@/api/heli/orderys'
|
import * as OrderYsApi from '@/api/heli/orderys'
|
||||||
import OrderYsForm from './OrderYsForm.vue'
|
import OrderYsForm from './OrderYsForm.vue'
|
||||||
import {DICT_TYPE, getIntDictOptions} from "@/utils/dict";
|
import {DICT_TYPE, getIntDictOptions} from "@/utils/dict";
|
||||||
|
import Invoivce from "@/views/heli/orderys/invoivce.vue";
|
||||||
|
import {ref} from "vue";
|
||||||
|
|
||||||
defineOptions({ name: 'OrderYs' })
|
defineOptions({ name: 'OrderYs' })
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
|
const formRefs = ref()
|
||||||
|
|
||||||
const loading = ref(true) // 列表的加载中
|
const loading = ref(true) // 列表的加载中
|
||||||
const list = ref([]) // 列表的数据
|
const list = ref([]) // 列表的数据
|
||||||
@ -229,7 +237,9 @@ const formRef = ref()
|
|||||||
const openForm = (type: string, id?: number) => {
|
const openForm = (type: string, id?: number) => {
|
||||||
formRef.value.open(type, id)
|
formRef.value.open(type, id)
|
||||||
}
|
}
|
||||||
|
const invoices = async (id,projectId,projectCode) => {
|
||||||
|
formRefs.value.open(id,projectId,projectCode)
|
||||||
|
}
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
const handleDelete = async (id: number) => {
|
const handleDelete = async (id: number) => {
|
||||||
try {
|
try {
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="对应订单" prop="orderId">
|
<el-form-item label="对应项目" prop="orderId">
|
||||||
<el-input disabledclass="!w-260px" v-model="formData.orderCode" readonly>
|
<el-input disabledclass="!w-260px" v-model="formData.orderCode" readonly>
|
||||||
<!-- <template #append><el-button disabled :icon="Search" /></template>-->
|
<!-- <template #append><el-button disabled :icon="Search" /></template>-->
|
||||||
</el-input>
|
</el-input>
|
||||||
@ -274,6 +274,7 @@ const resetForm = () => {
|
|||||||
|
|
||||||
// formRef.value?.resetFields()
|
// formRef.value?.resetFields()
|
||||||
}
|
}
|
||||||
|
|
||||||
const getList = async (id) => {
|
const getList = async (id) => {
|
||||||
queryParams.id=id
|
queryParams.id=id
|
||||||
queryParams.type="FINANCE_MAKE_INVOICE"
|
queryParams.type="FINANCE_MAKE_INVOICE"
|
||||||
|
@ -14,45 +14,43 @@
|
|||||||
<span style="font-size: 20px; font-weight: 700">模具生产计划单</span>
|
<span style="font-size: 20px; font-weight: 700">模具生产计划单</span>
|
||||||
</td>
|
</td>
|
||||||
<td colspan="2" style="padding: 5px 0">
|
<td colspan="2" style="padding: 5px 0">
|
||||||
<div style="border-bottom: 1px solid #666; padding-bottom: 5px">项目编号</div>
|
<div style="border-bottom: 1px solid #666; padding-bottom: 5px;font-size: 16px" >项目编号</div>
|
||||||
<div style="padding-top: 5px">{{ formData.code }}</div>
|
<div style="padding-top: 5px; font-size: 16px" >{{ formData.code }}</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"> 客户名称 </td>
|
<td colspan="2" style="font-size: 16px"> 客户名称 </td>
|
||||||
<td colspan="5">
|
<td colspan="5">
|
||||||
<span>{{ formData.customerName }}</span>
|
<span style="font-size: 16px">{{ formData.customerName }}</span>
|
||||||
</td>
|
</td>
|
||||||
<td colspan="1">{{ formData.customer.brief }}</td>
|
<td colspan="1" style="font-size: 16px">{{ formData.customer.brief }}</td>
|
||||||
<td> 编码: </td>
|
<td style="font-size: 16px"> 编码: </td>
|
||||||
<td>{{ formData.customer.code }} </td>
|
<td style="font-size: 16px">{{ formData.customer.code }} </td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"> 项目名称 </td>
|
<td colspan="2" style="font-size: 16px"> 项目名称 </td>
|
||||||
<td colspan="6">
|
<td colspan="6" style="font-size: 16px">
|
||||||
{{ formData.projectName }}
|
{{ formData.projectName }}
|
||||||
</td>
|
</td>
|
||||||
<td> 业务员: </td>
|
<td style="font-size: 16px"> 业务员: </td>
|
||||||
<td>{{ formData.businessManName }} </td>
|
<td style="font-size: 16px">{{ formData.businessManName }} </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"> 项目工期 </td>
|
<td colspan="2" style="font-size: 16px"> 项目工期 </td>
|
||||||
<td style="padding: 0 5px"> 起 </td>
|
<td colspan="1" style="padding: 0 5px"> 起 </td>
|
||||||
<td colspan="1">
|
<td colspan="1" style="min-width: 70px;">{{ formatDate(new Date(formData.projectStartTime), 'YYYY-MM-DD') }}</td>
|
||||||
<span>{{ formatDate(new Date(formData.projectStartTime), 'YYYY-MM-DD') }}</span>
|
|
||||||
</td>
|
|
||||||
<td colspan="1">至</td>
|
<td colspan="1">至</td>
|
||||||
<td colspan="1">{{ formatDate(new Date(formData.projectEndTime), 'YYYY-MM-DD') }}</td>
|
<td colspan="1">{{ formatDate(new Date(formData.projectEndTime), 'YYYY-MM-DD') }}</td>
|
||||||
<td>天数</td>
|
<td>天数</td>
|
||||||
<td colspan="1">{{ betweenDay(new Date(formData.projectStartTime), new Date(formData.projectEndTime)) +1 }}</td>
|
<td colspan="1">{{ betweenDay(new Date(formData.projectStartTime), new Date(formData.projectEndTime)) +1 }}</td>
|
||||||
<td colspan="1"> 是否紧急: </td>
|
<td colspan="1"> 是否有价格: </td>
|
||||||
<td colspan="1">{{ getDictLabel(DICT_TYPE.HELI_COMMON_IS_OR_NOT, formData.isUrgency) }} </td>
|
<td colspan="1">{{ getDictLabel(DICT_TYPE.HELI_COMMON_IS_OR_NOT, formData.hasPrice) }} </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"> 项目负责人: </td>
|
<td colspan="2" style="font-size: 16px"> 项目负责人: </td>
|
||||||
<td colspan="2">{{ userInit.find((user) => user.id == planData.projectOwner)?.nickname }} </td>
|
<td colspan="2">{{ userInit.find((user) => user.id == planData.projectOwner)?.nickname }} </td>
|
||||||
<td colspan="1">
|
<td colspan="1">
|
||||||
<!-- <div style="width: 100%; display: flex; justify-content: center; font-size: 12px"> -->
|
<!-- <div style="width: 100%; display: flex; justify-content: center; font-size: 12px"> -->
|
||||||
@ -70,7 +68,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td colspan="4">
|
<td colspan="4">
|
||||||
<div style="display: flex; justify-content: space-between">
|
<div style="display: flex; justify-content: space-between">
|
||||||
<div style="width: 100%; font-size: 12px; display: flex; flex-direction: column">
|
<div style="width: 100%; font-size: 10px; display: flex; flex-direction: column">
|
||||||
<div style="text-align: left; width: 100; margin-left: 10px">自客户提供资料:</div>
|
<div style="text-align: left; width: 100; margin-left: 10px">自客户提供资料:</div>
|
||||||
<div id="fruitForm" style="display: flex; justify-content: flex-start; align-items: center">
|
<div id="fruitForm" style="display: flex; justify-content: flex-start; align-items: center">
|
||||||
<span class="checkbox" v-if="formData.hasContract == 0"></span>
|
<span class="checkbox" v-if="formData.hasContract == 0"></span>
|
||||||
@ -89,7 +87,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">是否要工艺:</td>
|
<td colspan="2" style="font-size: 16px">是否要工艺:</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
{{ getDictLabel(DICT_TYPE.HELI_COMMON_IS_OR_NOT, planData.hasCraft) }}
|
{{ getDictLabel(DICT_TYPE.HELI_COMMON_IS_OR_NOT, planData.hasCraft) }}
|
||||||
@ -128,9 +126,10 @@
|
|||||||
<td class="xh"> {{ idx+1 }} </td>
|
<td class="xh"> {{ idx+1 }} </td>
|
||||||
<td colspan="3" style="padding: 0 0">
|
<td colspan="3" style="padding: 0 0">
|
||||||
<div style="display: flex; flex-direction: column; justify-content: space-between">
|
<div style="display: flex; flex-direction: column; justify-content: space-between">
|
||||||
<span style="border-bottom: 1px solid #666"> {{item.name}} </span>
|
<span> {{item.name}} </span>
|
||||||
<span v-if="!item.projectSubShortName"> </span>
|
<!-- <span style="border-bottom: 1px solid #666"> {{item.name}} </span>-->
|
||||||
<span v-else style="font-size: 12px">{{ formData.code+'-'+formData.customer.code+'-'+ item.projectSubShortName}}</span>
|
<!-- <span v-if="!item.projectSubShortName"> </span>-->
|
||||||
|
<!-- <span v-else style="font-size: 10px">{{ formData.code+'-'+formData.customer.code+'-'+ item.projectSubShortName}}</span>-->
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>{{equipInit.find((equip) => equip.id == item.equipId)?.name}} </td>
|
<td>{{equipInit.find((equip) => equip.id == item.equipId)?.name}} </td>
|
||||||
@ -271,46 +270,46 @@ style="
|
|||||||
<span style="font-size: 20px; font-weight: 700">模具生产计划单-附页</span>
|
<span style="font-size: 20px; font-weight: 700">模具生产计划单-附页</span>
|
||||||
</td>
|
</td>
|
||||||
<td colspan="2" style="padding: 5px 0">
|
<td colspan="2" style="padding: 5px 0">
|
||||||
<div style="border-bottom: 1px solid #666; padding-bottom: 5px">项目编号</div>
|
<div style="border-bottom: 1px solid #666; padding-bottom: 5px;font-size: 16px">项目编号</div>
|
||||||
<div style="padding-top: 5px">{{ formData.code }}</div>
|
<div style="padding-top: 5px; font-size: 16px">{{ formData.code }}</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"> 客户名称 </td>
|
<td colspan="2" style="font-size: 16px"> 客户名称 </td>
|
||||||
<td colspan="5">
|
<td colspan="5" style="font-size: 16px">
|
||||||
<span>{{ formData.customerName }}</span>
|
<span>{{ formData.customerName }}</span>
|
||||||
</td>
|
</td>
|
||||||
<td colspan="1">{{ formData.customer.brief }}</td>
|
<td colspan="1" style="font-size: 16px">{{ formData.customer.brief }}</td>
|
||||||
<td> 编码: </td>
|
<td style="font-size: 16px"> 编码: </td>
|
||||||
<td>{{ formData.customer.code }} </td>
|
<td style="font-size: 16px">{{ formData.customer.code }} </td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"> 项目名称 </td>
|
<td colspan="2" style="font-size: 16px"> 项目名称 </td>
|
||||||
<td colspan="6">
|
<td colspan="6" style="font-size: 16px">
|
||||||
{{ formData.projectName }}
|
{{ formData.projectName }}
|
||||||
</td>
|
</td>
|
||||||
<td> 业务员: </td>
|
<td style="font-size: 16px"> 业务员: </td>
|
||||||
<td>{{ formData.businessManName }} </td>
|
<td>{{ formData.businessManName }} </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"> 项目工期 </td>
|
<td colspan="2" style="font-size: 16px"> 项目工期 </td>
|
||||||
<td style="padding: 0 5px"> 起 </td>
|
<td colspan="1" style="padding: 0 5px"> 起 </td>
|
||||||
<td colspan="1">
|
<td colspan="1" style="min-width: 70px;">
|
||||||
<span>{{ formatDate(new Date(formData.projectStartTime), 'YYYY-MM-DD') }}</span>
|
{{ formatDate(new Date(formData.projectStartTime), 'YYYY-MM-DD') }}
|
||||||
</td>
|
</td>
|
||||||
<td colspan="1">至</td>
|
<td colspan="1">至</td>
|
||||||
<td colspan="1">{{ formatDate(new Date(formData.projectEndTime), 'YYYY-MM-DD') }}</td>
|
<td colspan="1">{{ formatDate(new Date(formData.projectEndTime), 'YYYY-MM-DD') }}</td>
|
||||||
<td>天数</td>
|
<td>天数</td>
|
||||||
<td colspan="1">{{ betweenDay(new Date(formData.projectStartTime), new Date(formData.projectEndTime)) }}</td>
|
<td colspan="1">{{ betweenDay(new Date(formData.projectStartTime), new Date(formData.projectEndTime)) }}</td>
|
||||||
<td colspan="1"> 是否紧急: </td>
|
<td colspan="1"> 是否有价格: </td>
|
||||||
<td colspan="1">{{ getDictLabel(DICT_TYPE.HELI_COMMON_IS_OR_NOT, formData.isUrgency) }} </td>
|
<td colspan="1">{{ getDictLabel(DICT_TYPE.HELI_COMMON_IS_OR_NOT, formData.hasPrice) }} </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="10">
|
<td colspan="10">
|
||||||
<div style="font-size: 12px; height: 50px; line-height: 50px">
|
<div style="font-size: 10px; height: 50px; line-height: 50px">
|
||||||
<span>接上页</span>
|
<span>接上页</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@ -338,9 +337,10 @@ style="
|
|||||||
<td class="xh"> {{ idx+5 }} </td>
|
<td class="xh"> {{ idx+5 }} </td>
|
||||||
<td colspan="3" style="padding: 0 0">
|
<td colspan="3" style="padding: 0 0">
|
||||||
<div style="display: flex; flex-direction: column; justify-content: space-between">
|
<div style="display: flex; flex-direction: column; justify-content: space-between">
|
||||||
<span style="border-bottom: 1px solid #666"> {{item.name}} </span>
|
<span > {{item.name}} </span>
|
||||||
<span v-if="!item.projectSubShortName"> </span>
|
<!-- <span style="border-bottom: 1px solid #666"> {{item.name}} </span>-->
|
||||||
<span v-else style="font-size: 12px">{{ formData.code+'-'+formData.customer.code+'-'+ item.projectSubShortName}}</span>
|
<!-- <span v-if="!item.projectSubShortName"> </span>-->
|
||||||
|
<!-- <span v-else style="font-size: 10px">{{ formData.code+'-'+formData.customer.code+'-'+ item.projectSubShortName}}</span>-->
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>{{equipInit.find((equip) => equip.id == item.equipId)?.name}} </td>
|
<td>{{equipInit.find((equip) => equip.id == item.equipId)?.name}} </td>
|
||||||
@ -493,7 +493,7 @@ const onPrint = () => {
|
|||||||
background: white;
|
background: white;
|
||||||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
|
||||||
position: relative;
|
position: relative;
|
||||||
font-size: 12px !important;
|
font-size: 10px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@page {
|
@page {
|
||||||
@ -515,7 +515,7 @@ const onPrint = () => {
|
|||||||
table {
|
table {
|
||||||
width: 100%; /* 让表格宽度100%占满其父元素宽度 */
|
width: 100%; /* 让表格宽度100%占满其父元素宽度 */
|
||||||
height: auto; /* 高度根据内容自适应 */
|
height: auto; /* 高度根据内容自适应 */
|
||||||
font-size: 12px;
|
font-size: 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
margin-top: 5mm; /* 添加顶部外边距,替代原先的页内边距 */
|
margin-top: 5mm; /* 添加顶部外边距,替代原先的页内边距 */
|
||||||
@ -816,7 +816,7 @@ const resetForm = () => {
|
|||||||
table {
|
table {
|
||||||
width: 100%; /* 让表格宽度100%占满其父元素宽度 */
|
width: 100%; /* 让表格宽度100%占满其父元素宽度 */
|
||||||
height: auto; /* 高度根据内容自适应 */
|
height: auto; /* 高度根据内容自适应 */
|
||||||
font-size: 12px;
|
font-size: 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
margin-top: 5mm; /* 添加顶部外边距,替代原先的页内边距 */
|
margin-top: 5mm; /* 添加顶部外边距,替代原先的页内边距 */
|
||||||
|
@ -152,11 +152,7 @@
|
|||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column label="序号" type="index" min-width="50px" />
|
<el-table-column label="序号" type="index" min-width="50px" />
|
||||||
<el-table-column label="变更次数" prop="bomEditStatus" max-width="60px" align="center">
|
<el-table-column label="图号" prop="blueprintNo" max-width="50px"/>
|
||||||
<template #default="{ row}">
|
|
||||||
<el-text class="mx-1" max-width="60px">{{row.bomOperateCount==0?'无':'第'+row.bomOperateCount+'次'}}</el-text>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<!-- <el-table-column v-if="formData.bomStatus == 2|| formData.bomStatus == 7" style="text-align: center" label="库存" prop="amount" min-width="150"> -->
|
<!-- <el-table-column v-if="formData.bomStatus == 2|| formData.bomStatus == 7" style="text-align: center" label="库存" prop="amount" min-width="150"> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
style="text-align: center"
|
style="text-align: center"
|
||||||
@ -183,7 +179,6 @@
|
|||||||
<el-table-column label="是否标准件" prop="typeName" max-width="100px" />
|
<el-table-column label="是否标准件" prop="typeName" max-width="100px" />
|
||||||
<el-table-column label="材质" prop="compositionName" max-width="80px"/>
|
<el-table-column label="材质" prop="compositionName" max-width="80px"/>
|
||||||
<el-table-column label="规格型号" prop="spec" max-width="80px"/>
|
<el-table-column label="规格型号" prop="spec" max-width="80px"/>
|
||||||
<el-table-column label="图号" prop="blueprintNo" max-width="50px"/>
|
|
||||||
<el-table-column label="数量" prop="amount" max-width="50px"/>
|
<el-table-column label="数量" prop="amount" max-width="50px"/>
|
||||||
|
|
||||||
<el-table-column label="BOM状态" prop="bomEditStatus">
|
<el-table-column label="BOM状态" prop="bomEditStatus">
|
||||||
@ -236,6 +231,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="变更次数" prop="bomEditStatus" max-width="60px" align="center" fixed="right">
|
||||||
|
<template #default="{ row}">
|
||||||
|
<el-text class="mx-1" max-width="60px">{{row.bomOperateCount==0?'无':'第'+row.bomOperateCount+'次'}}</el-text>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -277,15 +277,12 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {inject, ref} from 'vue'
|
import {inject, ref} from 'vue'
|
||||||
import { Search, Plus } from '@element-plus/icons-vue'
|
|
||||||
import { getIntDictOptions, getStrDictOptions, getDictLabel, DICT_TYPE } from '@/utils/dict'
|
import { getIntDictOptions, getStrDictOptions, getDictLabel, DICT_TYPE } from '@/utils/dict'
|
||||||
import { betweenDay, formatDate, dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
import { getOperateLogPage } from '@/api/system/operatelog'
|
import { getOperateLogPage } from '@/api/system/operatelog'
|
||||||
import * as PlanTaskApi from '@/api/heli/plantask'
|
import * as PlanTaskApi from '@/api/heli/plantask'
|
||||||
import * as PlanTaskBomApi from '@/api/heli/plantaskbom'
|
import * as PlanTaskBomApi from '@/api/heli/plantaskbom'
|
||||||
import UserSelect from '@/views/heli/hlvuestyle/userSelect.vue'
|
|
||||||
import * as TaskDispatchApi from '@/api/heli/taskdispatch'
|
import * as TaskDispatchApi from '@/api/heli/taskdispatch'
|
||||||
import { get } from 'sortablejs'
|
|
||||||
import {useTagsViewStore} from "@/store/modules/tagsView";
|
import {useTagsViewStore} from "@/store/modules/tagsView";
|
||||||
const reload: any = inject('reload')
|
const reload: any = inject('reload')
|
||||||
const tagsViewStore = useTagsViewStore()
|
const tagsViewStore = useTagsViewStore()
|
||||||
|
@ -65,7 +65,8 @@
|
|||||||
<el-table-column fixed label="序号" align="center" type="index" width="60" />
|
<el-table-column fixed label="序号" align="center" type="index" width="60" />
|
||||||
<el-table-column fixed label="BOM编号" align="center" prop="bomCode" min-width="430" >
|
<el-table-column fixed label="BOM编号" align="center" prop="bomCode" min-width="430" >
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="primary" plain link @click="openDetail('detail', scope.row.id)">{{ scope.row.bomCode }}</el-button>
|
<!-- <el-button type="primary" plain link @click="openDetail('detail', scope.row.id)">{{ scope.row.bomCode }}</el-button>-->
|
||||||
|
<span type="primary" @click="openDetail('detail', scope.row.id)">{{ scope.row.bomCode }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column fixed label="计划单号" align="center" prop="planCode" min-width="180" >
|
<el-table-column fixed label="计划单号" align="center" prop="planCode" min-width="180" >
|
||||||
|
@ -164,7 +164,7 @@ v-for="dict in getIntDictOptions(DICT_TYPE.HELI_DISPATCH_STATUS)" :key="dict.val
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="子项目名称" prop="projectSubName">
|
<el-form-item label="子项目名称" prop="projectSubName">
|
||||||
<el-input class="!w-260px" v-model="formData.projectSubName" :disabled="true" />
|
<el-input class="!w-380px" v-model="formData.projectSubName" :disabled="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
|
@ -1695,17 +1695,21 @@ const getStartTime = ( element : string) =>{
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
// 1. 检查 craftInfos 及其 value 是否存在
|
||||||
|
if (craftInfos.value==null ) {
|
||||||
|
return ''; // 如果为空,直接返回空字符串
|
||||||
|
}
|
||||||
|
|
||||||
if(element == '下料' || element == '电焊'|| element =='泡沫'){
|
if(element == '下料' || element == '电焊'|| element =='泡沫'){
|
||||||
return craftInfos.value[0].startDate;
|
return craftInfos.value[0]?.startDate || '';
|
||||||
}else if(element == '编程' || element == '开粗' || element == '铣床' || element == '车床' || element == '磨床' || element == '数控1' || element == '数控2' ||element == '刻字' ||
|
}else if(element == '编程' || element == '开粗' || element == '铣床' || element == '车床' || element == '磨床' || element == '数控1' || element == '数控2' ||element == '刻字' ||
|
||||||
element == '网格' || element == '深钻孔' || element == '钻孔'
|
element == '网格' || element == '深钻孔' || element == '钻孔'
|
||||||
){
|
){
|
||||||
return craftInfos.value[1].startDate
|
return craftInfos.value[1]?.startDate || '';
|
||||||
}else if(element == '热处理'){
|
}else if(element == '热处理'){
|
||||||
return craftInfos.value[2].startDate
|
return craftInfos.value[2]?.startDate|| '';
|
||||||
}else if(element == '火花'|| element =='电极'){
|
}else if(element == '火花'|| element =='电极'){
|
||||||
return craftInfos.value[3].startDate
|
return craftInfos.value[3]?.startDate|| '';
|
||||||
}else{
|
}else{
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
@ -1724,17 +1728,20 @@ const getEndTime = ( element : string) =>{
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
if (craftInfos.value==null ) {
|
||||||
|
return ''; // 如果为空,直接返回空字符串
|
||||||
|
}
|
||||||
|
|
||||||
if(element == '下料' || element == '电焊'|| element =='泡沫'){
|
if(element == '下料' || element == '电焊'|| element =='泡沫'){
|
||||||
return craftInfos.value[0].endDate;
|
return craftInfos.value[0]?.endDate || '';
|
||||||
}else if(element == '编程' || element == '开粗' || element == '铣床' || element == '车床' || element == '磨床' || element == '数控1' || element == '数控2' ||element == '刻字' ||
|
}else if(element == '编程' || element == '开粗' || element == '铣床' || element == '车床' || element == '磨床' || element == '数控1' || element == '数控2' ||element == '刻字' ||
|
||||||
element == '网格' || element == '深钻孔' || element == '钻孔'
|
element == '网格' || element == '深钻孔' || element == '钻孔'
|
||||||
){
|
){
|
||||||
return craftInfos.value[1].endDate
|
return craftInfos.value[0]?.endDate || '';
|
||||||
}else if(element == '热处理'){
|
}else if(element == '热处理'){
|
||||||
return craftInfos.value[2].endDate
|
return craftInfos.value[0]?.endDate || '';
|
||||||
}else if(element == '火花'|| element =='电极'){
|
}else if(element == '火花'|| element =='电极'){
|
||||||
return craftInfos.value[3].endDate
|
return craftInfos.value[0]?.endDate || '';
|
||||||
}else{
|
}else{
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user