Merge remote-tracking branch 'gitee/0.8.X' into 0.8.X
This commit is contained in:
@@ -79,6 +79,12 @@ public class CrmOrder extends BaseEntity {
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 合同号
|
||||
*/
|
||||
private String contractCode;
|
||||
|
||||
/**
|
||||
* 删除标识 0正常 2删除
|
||||
*/
|
||||
|
||||
@@ -34,9 +34,9 @@ public class CrmOrderItem extends BaseEntity {
|
||||
*/
|
||||
private String productType;
|
||||
/**
|
||||
* 规格要求
|
||||
* 原料规格
|
||||
*/
|
||||
private String specRequire;
|
||||
private String rawMaterialSpec;
|
||||
/**
|
||||
* 产品数量
|
||||
*/
|
||||
@@ -53,10 +53,42 @@ public class CrmOrderItem extends BaseEntity {
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 成品规格
|
||||
*/
|
||||
private String finishedProductSpec;
|
||||
/**
|
||||
* 材质
|
||||
*/
|
||||
private String material;
|
||||
/**
|
||||
* 等级
|
||||
*/
|
||||
private String grade;
|
||||
/**
|
||||
* 重量
|
||||
*/
|
||||
private BigDecimal weight;
|
||||
/**
|
||||
* 合同定价
|
||||
*/
|
||||
private BigDecimal contractPrice;
|
||||
/**
|
||||
* 定制人
|
||||
*/
|
||||
private String customizer;
|
||||
/**
|
||||
* 发货人
|
||||
*/
|
||||
private String shipper;
|
||||
/**
|
||||
* 排产批次
|
||||
*/
|
||||
private String productionBatch;
|
||||
/**
|
||||
* 删除标识 0正常 2删除
|
||||
*/
|
||||
@TableLogic
|
||||
private Long delFlag;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -90,5 +90,10 @@ public class CrmOrderBo extends BaseEntity {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 合同号
|
||||
*/
|
||||
private String contractCode;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -34,9 +34,9 @@ public class CrmOrderItemBo extends BaseEntity {
|
||||
private String productType;
|
||||
|
||||
/**
|
||||
* 规格要求
|
||||
* 原料规格
|
||||
*/
|
||||
private String specRequire;
|
||||
private String rawMaterialSpec;
|
||||
|
||||
/**
|
||||
* 产品数量
|
||||
@@ -57,6 +57,46 @@ public class CrmOrderItemBo extends BaseEntity {
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 成品规格
|
||||
*/
|
||||
private String finishedProductSpec;
|
||||
|
||||
/**
|
||||
* 材质
|
||||
*/
|
||||
private String material;
|
||||
|
||||
/**
|
||||
* 等级
|
||||
*/
|
||||
private String grade;
|
||||
|
||||
/**
|
||||
* 重量
|
||||
*/
|
||||
private BigDecimal weight;
|
||||
|
||||
/**
|
||||
* 合同定价
|
||||
*/
|
||||
private BigDecimal contractPrice;
|
||||
|
||||
/**
|
||||
* 定制人
|
||||
*/
|
||||
private String customizer;
|
||||
|
||||
/**
|
||||
* 发货人
|
||||
*/
|
||||
private String shipper;
|
||||
|
||||
/**
|
||||
* 排产批次
|
||||
*/
|
||||
private String productionBatch;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -41,10 +41,10 @@ public class CrmOrderItemVo {
|
||||
private String productType;
|
||||
|
||||
/**
|
||||
* 规格要求
|
||||
* 原料规格
|
||||
*/
|
||||
@ExcelProperty(value = "规格要求")
|
||||
private String specRequire;
|
||||
@ExcelProperty(value = "原料规格")
|
||||
private String rawMaterialSpec;
|
||||
|
||||
/**
|
||||
* 产品数量
|
||||
@@ -71,5 +71,53 @@ public class CrmOrderItemVo {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 成品规格
|
||||
*/
|
||||
@ExcelProperty(value = "成品规格")
|
||||
private String finishedProductSpec;
|
||||
|
||||
}
|
||||
/**
|
||||
* 材质
|
||||
*/
|
||||
@ExcelProperty(value = "材质")
|
||||
private String material;
|
||||
|
||||
/**
|
||||
* 等级
|
||||
*/
|
||||
@ExcelProperty(value = "等级")
|
||||
private String grade;
|
||||
|
||||
/**
|
||||
* 重量
|
||||
*/
|
||||
@ExcelProperty(value = "重量")
|
||||
private BigDecimal weight;
|
||||
|
||||
/**
|
||||
* 合同定价
|
||||
*/
|
||||
@ExcelProperty(value = "合同定价")
|
||||
private BigDecimal contractPrice;
|
||||
|
||||
/**
|
||||
* 定制人
|
||||
*/
|
||||
@ExcelProperty(value = "定制人")
|
||||
private String customizer;
|
||||
|
||||
/**
|
||||
* 发货人
|
||||
*/
|
||||
@ExcelProperty(value = "发货人")
|
||||
private String shipper;
|
||||
|
||||
/**
|
||||
* 排产批次
|
||||
*/
|
||||
@ExcelProperty(value = "排产批次")
|
||||
private String productionBatch;
|
||||
|
||||
|
||||
}
|
||||
@@ -108,6 +108,12 @@ public class CrmOrderVo extends BaseEntity {
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 合同号
|
||||
*/
|
||||
@ExcelProperty(value = "合同号")
|
||||
private String contractCode;
|
||||
|
||||
|
||||
// @ExcelProperty(value = "客户编号")
|
||||
private String customerCode;
|
||||
@@ -116,6 +122,10 @@ public class CrmOrderVo extends BaseEntity {
|
||||
// @ExcelProperty(value = "地址")
|
||||
private String address;
|
||||
|
||||
private String contactWay;
|
||||
|
||||
private String companyName;
|
||||
|
||||
//创建人
|
||||
private String createByName;
|
||||
//更新人
|
||||
|
||||
@@ -16,4 +16,6 @@ import org.apache.ibatis.annotations.Param;
|
||||
public interface CrmOrderMapper extends BaseMapperPlus<CrmOrderMapper, CrmOrder, CrmOrderVo> {
|
||||
|
||||
Page<CrmOrderVo> selectVoPagePlus(Page<Object> build,@Param("ew") QueryWrapper<CrmOrder> lqw);
|
||||
|
||||
CrmOrderVo selectVoById(@Param("orderId") String orderId);
|
||||
}
|
||||
|
||||
@@ -63,10 +63,18 @@ public class CrmOrderItemServiceImpl implements ICrmOrderItemService {
|
||||
LambdaQueryWrapper<CrmOrderItem> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getOrderId()), CrmOrderItem::getOrderId, bo.getOrderId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProductType()), CrmOrderItem::getProductType, bo.getProductType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSpecRequire()), CrmOrderItem::getSpecRequire, bo.getSpecRequire());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getRawMaterialSpec()), CrmOrderItem::getRawMaterialSpec, bo.getRawMaterialSpec());
|
||||
lqw.eq(bo.getProductNum() != null, CrmOrderItem::getProductNum, bo.getProductNum());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSpecialRequire()), CrmOrderItem::getSpecialRequire, bo.getSpecialRequire());
|
||||
lqw.eq(bo.getItemAmount() != null, CrmOrderItem::getItemAmount, bo.getItemAmount());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFinishedProductSpec()), CrmOrderItem::getFinishedProductSpec, bo.getFinishedProductSpec());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getMaterial()), CrmOrderItem::getMaterial, bo.getMaterial());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getGrade()), CrmOrderItem::getGrade, bo.getGrade());
|
||||
lqw.eq(bo.getWeight() != null, CrmOrderItem::getWeight, bo.getWeight());
|
||||
lqw.eq(bo.getContractPrice() != null, CrmOrderItem::getContractPrice, bo.getContractPrice());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCustomizer()), CrmOrderItem::getCustomizer, bo.getCustomizer());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getShipper()), CrmOrderItem::getShipper, bo.getShipper());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProductionBatch()), CrmOrderItem::getProductionBatch, bo.getProductionBatch());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@@ -112,4 +120,4 @@ public class CrmOrderItemServiceImpl implements ICrmOrderItemService {
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -94,6 +94,7 @@ public class CrmOrderServiceImpl implements ICrmOrderService {
|
||||
qw.eq(bo.getOrderStatus() != null, "co.order_status", bo.getOrderStatus());
|
||||
qw.eq(bo.getFinanceStatus() != null, "co.finance_status", bo.getFinanceStatus());
|
||||
qw.eq(bo.getUnpaidAmount() != null, "co.unpaid_amount", bo.getUnpaidAmount());
|
||||
qw.like(StringUtils.isNotBlank(bo.getContractCode()), "co.contract_code", bo.getContractCode());
|
||||
//逻辑删除
|
||||
qw.eq("co.del_flag", 0);
|
||||
//根据orderType排序预订单是0 正是订单是1 0排在前面 1排在后面 升序
|
||||
@@ -126,6 +127,7 @@ public class CrmOrderServiceImpl implements ICrmOrderService {
|
||||
lqw.eq(bo.getOrderStatus() != null, CrmOrder::getOrderStatus, bo.getOrderStatus());
|
||||
lqw.eq(bo.getFinanceStatus() != null, CrmOrder::getFinanceStatus, bo.getFinanceStatus());
|
||||
lqw.eq(bo.getUnpaidAmount() != null, CrmOrder::getUnpaidAmount, bo.getUnpaidAmount());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getContractCode()), CrmOrder::getContractCode, bo.getContractCode());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,11 +8,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="itemId" column="item_id"/>
|
||||
<result property="orderId" column="order_id"/>
|
||||
<result property="productType" column="product_type"/>
|
||||
<result property="specRequire" column="spec_require"/>
|
||||
<result property="rawMaterialSpec" column="raw_material_spec"/>
|
||||
<result property="productNum" column="product_num"/>
|
||||
<result property="specialRequire" column="special_require"/>
|
||||
<result property="itemAmount" column="item_amount"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="finishedProductSpec" column="finished_product_spec"/>
|
||||
<result property="material" column="material"/>
|
||||
<result property="grade" column="grade"/>
|
||||
<result property="weight" column="weight"/>
|
||||
<result property="contractPrice" column="contract_price"/>
|
||||
<result property="customizer" column="customizer"/>
|
||||
<result property="shipper" column="shipper"/>
|
||||
<result property="productionBatch" column="production_batch"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
@@ -25,11 +33,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
item_id,
|
||||
order_id,
|
||||
product_type,
|
||||
spec_require,
|
||||
raw_material_spec,
|
||||
product_num,
|
||||
special_require,
|
||||
item_amount,
|
||||
remark,
|
||||
finished_product_spec,
|
||||
material,
|
||||
grade,
|
||||
weight,
|
||||
contract_price,
|
||||
customizer,
|
||||
shipper,
|
||||
production_batch,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
@@ -45,4 +61,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
@@ -19,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="financeStatus" column="finance_status"/>
|
||||
<result property="unpaidAmount" column="unpaid_amount"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="contractCode" column="contract_code"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
@@ -41,12 +42,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
co.finance_status AS financeStatus,
|
||||
co.unpaid_amount AS unpaidAmount,
|
||||
co.remark,
|
||||
co.contract_code AS contractCode,
|
||||
co.create_by AS createBy,
|
||||
co.create_time AS createTime,
|
||||
co.update_by AS updateBy,
|
||||
co.update_time AS updateTime,
|
||||
cu.customer_code AS customerCode,
|
||||
cu.contact_person AS contactPerson,
|
||||
cu.contact_way AS contactWay,
|
||||
cu.company_name AS companyName,
|
||||
cu.address AS address
|
||||
FROM crm_order co
|
||||
LEFT JOIN crm_customer cu ON co.customer_id = cu.customer_id
|
||||
@@ -54,4 +58,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectVoById" resultType="com.klp.crm.domain.vo.CrmOrderVo">
|
||||
SELECT
|
||||
co.order_id AS orderId,
|
||||
co.order_code AS orderCode,
|
||||
co.order_type AS orderType,
|
||||
co.customer_id AS customerId,
|
||||
co.order_amount AS orderAmount,
|
||||
co.salesman,
|
||||
co.delivery_date AS deliveryDate,
|
||||
co.pre_order_status AS preOrderStatus,
|
||||
co.audit_user AS auditUser,
|
||||
co.audit_time AS auditTime,
|
||||
co.order_status AS orderStatus,
|
||||
co.finance_status AS financeStatus,
|
||||
co.unpaid_amount AS unpaidAmount,
|
||||
co.remark,
|
||||
co.contract_code AS contractCode,
|
||||
co.create_by AS createBy,
|
||||
co.create_time AS createTime,
|
||||
co.update_by AS updateBy,
|
||||
co.update_time AS updateTime,
|
||||
cu.customer_code AS customerCode,
|
||||
cu.contact_person AS contactPerson,
|
||||
cu.contact_way AS contactWay,
|
||||
cu.company_name AS companyName,
|
||||
cu.address AS address
|
||||
FROM crm_order co
|
||||
LEFT JOIN crm_customer cu ON co.customer_id = cu.customer_id
|
||||
WHERE co.order_id = #{orderId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -24,5 +24,9 @@
|
||||
<artifactId>klp-system</artifactId>
|
||||
<version>0.8.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.klp</groupId>
|
||||
<artifactId>klp-wms</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.klp.mes.qc.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.klp.common.annotation.RepeatSubmit;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.mes.qc.domain.vo.WmsCheckTaskCoilRelationVo;
|
||||
import com.klp.mes.qc.domain.bo.WmsCheckTaskCoilRelationBo;
|
||||
import com.klp.mes.qc.service.IWmsCheckTaskCoilRelationService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 检查任务与钢卷关联
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-02-03
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/wms/checkTaskCoilRelation")
|
||||
public class WmsCheckTaskCoilRelationController extends BaseController {
|
||||
|
||||
private final IWmsCheckTaskCoilRelationService iWmsCheckTaskCoilRelationService;
|
||||
|
||||
/**
|
||||
* 查询检查任务与钢卷关联列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<WmsCheckTaskCoilRelationVo> list(WmsCheckTaskCoilRelationBo bo, PageQuery pageQuery) {
|
||||
return iWmsCheckTaskCoilRelationService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出检查任务与钢卷关联列表
|
||||
*/
|
||||
@Log(title = "检查任务与钢卷关联", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(WmsCheckTaskCoilRelationBo bo, HttpServletResponse response) {
|
||||
List<WmsCheckTaskCoilRelationVo> list = iWmsCheckTaskCoilRelationService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "检查任务与钢卷关联", WmsCheckTaskCoilRelationVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取检查任务与钢卷关联详细信息
|
||||
*
|
||||
* @param relationId 主键
|
||||
*/
|
||||
@GetMapping("/{relationId}")
|
||||
public R<WmsCheckTaskCoilRelationVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long relationId) {
|
||||
return R.ok(iWmsCheckTaskCoilRelationService.queryById(relationId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检查任务与钢卷关联
|
||||
*/
|
||||
@Log(title = "检查任务与钢卷关联", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsCheckTaskCoilRelationBo bo) {
|
||||
return toAjax(iWmsCheckTaskCoilRelationService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检查任务与钢卷关联
|
||||
*/
|
||||
@Log(title = "检查任务与钢卷关联", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsCheckTaskCoilRelationBo bo) {
|
||||
return toAjax(iWmsCheckTaskCoilRelationService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除检查任务与钢卷关联
|
||||
*
|
||||
* @param relationIds 主键串
|
||||
*/
|
||||
@Log(title = "检查任务与钢卷关联", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{relationIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] relationIds) {
|
||||
return toAjax(iWmsCheckTaskCoilRelationService.deleteWithValidByIds(Arrays.asList(relationIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.klp.mes.qc.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
/**
|
||||
* 检查任务与钢卷关联对象 wms_check_task_coil_relation
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-02-03
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("wms_check_task_coil_relation")
|
||||
public class WmsCheckTaskCoilRelation extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 关联表主键
|
||||
*/
|
||||
@TableId(value = "relation_id")
|
||||
private Long relationId;
|
||||
/**
|
||||
* 检查任务ID,关联wms_check_task.task_id
|
||||
*/
|
||||
private Long taskId;
|
||||
/**
|
||||
* 钢卷ID
|
||||
*/
|
||||
private String coilId;
|
||||
/**
|
||||
* 逻辑删除标识:0=正常,1=已删
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
}
|
||||
@@ -52,5 +52,7 @@ public class WmsCheckTaskBo extends BaseEntity {
|
||||
// 检验类型
|
||||
private String inspectionType;
|
||||
|
||||
// 绑定的钢卷ID(逗号分隔)
|
||||
private String coilIds;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.klp.mes.qc.domain.bo;
|
||||
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
/**
|
||||
* 检查任务与钢卷关联业务对象 wms_check_task_coil_relation
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-02-03
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class WmsCheckTaskCoilRelationBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 关联表主键
|
||||
*/
|
||||
private Long relationId;
|
||||
|
||||
/**
|
||||
* 检查任务ID,关联wms_check_task.task_id
|
||||
*/
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 钢卷ID
|
||||
*/
|
||||
private String coilId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.klp.mes.qc.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 检查任务与钢卷关联视图对象 wms_check_task_coil_relation
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-02-03
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class WmsCheckTaskCoilRelationVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 关联表主键
|
||||
*/
|
||||
@ExcelProperty(value = "关联表主键")
|
||||
private Long relationId;
|
||||
|
||||
/**
|
||||
* 检查任务ID,关联wms_check_task.task_id
|
||||
*/
|
||||
@ExcelProperty(value = "检查任务ID,关联wms_check_task.task_id")
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 钢卷ID
|
||||
*/
|
||||
@ExcelProperty(value = "钢卷ID")
|
||||
private String coilId;
|
||||
|
||||
|
||||
}
|
||||
@@ -2,8 +2,7 @@ package com.klp.mes.qc.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import com.klp.domain.vo.WmsMaterialCoilVo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@@ -90,4 +89,7 @@ public class WmsCheckTaskVo {
|
||||
private String actualMeasures;
|
||||
|
||||
private String checkTaskItemIds;
|
||||
|
||||
// 绑定的钢卷ID列表
|
||||
private List<WmsMaterialCoilVo> coilList;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.klp.mes.qc.mapper;
|
||||
|
||||
import com.klp.mes.qc.domain.WmsCheckTaskCoilRelation;
|
||||
import com.klp.mes.qc.domain.vo.WmsCheckTaskCoilRelationVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 检查任务与钢卷关联Mapper接口
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-02-03
|
||||
*/
|
||||
public interface WmsCheckTaskCoilRelationMapper extends BaseMapperPlus<WmsCheckTaskCoilRelationMapper, WmsCheckTaskCoilRelation, WmsCheckTaskCoilRelationVo> {
|
||||
|
||||
void deleteByTaskIds(Collection<Long> taskIds);
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.klp.mes.qc.service;
|
||||
|
||||
import com.klp.mes.qc.domain.vo.WmsCheckTaskCoilRelationVo;
|
||||
import com.klp.mes.qc.domain.bo.WmsCheckTaskCoilRelationBo;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 检查任务与钢卷关联Service接口
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-02-03
|
||||
*/
|
||||
public interface IWmsCheckTaskCoilRelationService {
|
||||
|
||||
/**
|
||||
* 查询检查任务与钢卷关联
|
||||
*/
|
||||
WmsCheckTaskCoilRelationVo queryById(Long relationId);
|
||||
|
||||
/**
|
||||
* 查询检查任务与钢卷关联列表
|
||||
*/
|
||||
TableDataInfo<WmsCheckTaskCoilRelationVo> queryPageList(WmsCheckTaskCoilRelationBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询检查任务与钢卷关联列表
|
||||
*/
|
||||
List<WmsCheckTaskCoilRelationVo> queryList(WmsCheckTaskCoilRelationBo bo);
|
||||
|
||||
/**
|
||||
* 新增检查任务与钢卷关联
|
||||
*/
|
||||
Boolean insertByBo(WmsCheckTaskCoilRelationBo bo);
|
||||
|
||||
/**
|
||||
* 修改检查任务与钢卷关联
|
||||
*/
|
||||
Boolean updateByBo(WmsCheckTaskCoilRelationBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除检查任务与钢卷关联信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.klp.mes.qc.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.klp.common.utils.StringUtils;
|
||||
import com.klp.mes.qc.domain.vo.WmsCheckTaskCoilRelationVo;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.klp.mes.qc.domain.bo.WmsCheckTaskCoilRelationBo;
|
||||
import com.klp.mes.qc.domain.vo.WmsCheckTaskCoilRelationVo;
|
||||
import com.klp.mes.qc.domain.WmsCheckTaskCoilRelation;
|
||||
import com.klp.mes.qc.mapper.WmsCheckTaskCoilRelationMapper;
|
||||
import com.klp.mes.qc.service.IWmsCheckTaskCoilRelationService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 检查任务与钢卷关联Service业务层处理
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-02-03
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class WmsCheckTaskCoilRelationServiceImpl implements IWmsCheckTaskCoilRelationService {
|
||||
|
||||
private final WmsCheckTaskCoilRelationMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询检查任务与钢卷关联
|
||||
*/
|
||||
@Override
|
||||
public WmsCheckTaskCoilRelationVo queryById(Long relationId){
|
||||
return baseMapper.selectVoById(relationId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询检查任务与钢卷关联列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<WmsCheckTaskCoilRelationVo> queryPageList(WmsCheckTaskCoilRelationBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<WmsCheckTaskCoilRelation> lqw = buildQueryWrapper(bo);
|
||||
Page<WmsCheckTaskCoilRelationVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询检查任务与钢卷关联列表
|
||||
*/
|
||||
@Override
|
||||
public List<WmsCheckTaskCoilRelationVo> queryList(WmsCheckTaskCoilRelationBo bo) {
|
||||
LambdaQueryWrapper<WmsCheckTaskCoilRelation> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<WmsCheckTaskCoilRelation> buildQueryWrapper(WmsCheckTaskCoilRelationBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<WmsCheckTaskCoilRelation> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getTaskId() != null, WmsCheckTaskCoilRelation::getTaskId, bo.getTaskId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCoilId()), WmsCheckTaskCoilRelation::getCoilId, bo.getCoilId());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检查任务与钢卷关联
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(WmsCheckTaskCoilRelationBo bo) {
|
||||
WmsCheckTaskCoilRelation add = BeanUtil.toBean(bo, WmsCheckTaskCoilRelation.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setRelationId(add.getRelationId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检查任务与钢卷关联
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(WmsCheckTaskCoilRelationBo bo) {
|
||||
WmsCheckTaskCoilRelation update = BeanUtil.toBean(bo, WmsCheckTaskCoilRelation.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(WmsCheckTaskCoilRelation entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除检查任务与钢卷关联
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -8,11 +8,16 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.klp.common.utils.StringUtils;
|
||||
import com.klp.domain.WmsMaterialCoil;
|
||||
import com.klp.domain.vo.WmsMaterialCoilVo;
|
||||
import com.klp.mapper.WmsMaterialCoilMapper;
|
||||
import com.klp.mes.qc.domain.WmsCheckItem;
|
||||
import com.klp.mes.qc.domain.WmsCheckTaskItem;
|
||||
import com.klp.mes.qc.domain.WmsCheckTaskCoilRelation;
|
||||
import com.klp.mes.qc.domain.vo.WmsCheckItemVo;
|
||||
import com.klp.mes.qc.mapper.WmsCheckItemMapper;
|
||||
import com.klp.mes.qc.mapper.WmsCheckTaskItemMapper;
|
||||
import com.klp.mes.qc.mapper.WmsCheckTaskCoilRelationMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.klp.mes.qc.domain.bo.WmsCheckTaskBo;
|
||||
@@ -38,62 +43,98 @@ public class WmsCheckTaskServiceImpl implements IWmsCheckTaskService {
|
||||
private final WmsCheckTaskMapper baseMapper;
|
||||
private final WmsCheckItemMapper wmsCheckItemMapper;
|
||||
private final WmsCheckTaskItemMapper wmsCheckTaskItemMapper;
|
||||
private final WmsCheckTaskCoilRelationMapper wmsCheckTaskCoilRelationMapper;
|
||||
private final WmsMaterialCoilMapper wmsMaterialCoilMapper;
|
||||
|
||||
/**
|
||||
* 查询检查任务
|
||||
*/
|
||||
@Override
|
||||
public WmsCheckTaskVo queryById(Long taskId) {
|
||||
WmsCheckTaskVo vo = baseMapper.selectVoByIdPlus(taskId);
|
||||
if (vo != null && vo.getItemIds() != null) {
|
||||
// 1. 拆分所有聚合字段(新增 checkTaskItemIds 的处理)
|
||||
String[] ids = vo.getItemIds().split(","); // 检查项表的 item_id
|
||||
String[] checkTaskItemIds = vo.getCheckTaskItemIds() != null ? vo.getCheckTaskItemIds().split(",") : new String[ids.length]; // 关联表的 item_id(新增)
|
||||
String[] names = vo.getItemNames() != null ? vo.getItemNames().split(",") : new String[ids.length];
|
||||
String[] statusArr = vo.getItemStatus() != null ? vo.getItemStatus().split(",") : new String[ids.length];
|
||||
String[] targetUppers = vo.getTargetUppers() != null ? vo.getTargetUppers().split(",") : new String[ids.length];
|
||||
String[] targetLowers = vo.getTargetLowers() != null ? vo.getTargetLowers().split(",") : new String[ids.length];
|
||||
String[] standardTargets = vo.getStandardTargets() != null ? vo.getStandardTargets().split(",") : new String[ids.length];
|
||||
String[] units = vo.getUnits() != null ? vo.getUnits().split(",") : new String[ids.length];
|
||||
String[] qualitativeQuantitatives = vo.getQualitativeQuantitatives() != null ? vo.getQualitativeQuantitatives().split(",") : new String[ids.length];
|
||||
String[] actualMeasures = vo.getActualMeasures() != null ? vo.getActualMeasures().split(",") : new String[ids.length];
|
||||
WmsCheckTaskVo vo = baseMapper.selectVoById(taskId);
|
||||
if (vo == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 查询检查任务与检查项关联关系
|
||||
List<WmsCheckTaskItem> taskItems = wmsCheckTaskItemMapper.selectList(
|
||||
Wrappers.<WmsCheckTaskItem>lambdaQuery()
|
||||
.eq(WmsCheckTaskItem::getCheckTaskId, taskId)
|
||||
.eq(WmsCheckTaskItem::getDelFlag, 0)
|
||||
);
|
||||
|
||||
if (!taskItems.isEmpty()) {
|
||||
Set<Long> itemIds = new HashSet<>();
|
||||
for (WmsCheckTaskItem taskItem : taskItems) {
|
||||
itemIds.add(taskItem.getCheckItemId());
|
||||
}
|
||||
|
||||
// 查询检查项基础信息
|
||||
List<WmsCheckItem> checkItems = wmsCheckItemMapper.selectBatchIds(itemIds);
|
||||
Map<Long, WmsCheckItem> itemMap = new HashMap<>();
|
||||
for (WmsCheckItem item : checkItems) {
|
||||
itemMap.put(item.getItemId(), item);
|
||||
}
|
||||
|
||||
// 组装检查项列表
|
||||
List<WmsCheckItemVo> itemList = new ArrayList<>();
|
||||
for (int i = 0; i < ids.length; i++) {
|
||||
if (!ids[i].isEmpty()) { // 跳过空字符串(避免拆分后出现空元素)
|
||||
WmsCheckItemVo item = new WmsCheckItemVo();
|
||||
// 2. 赋值检查项 ID(原逻辑保留)
|
||||
item.setItemId(Long.valueOf(ids[i]));
|
||||
// 3. 新增:赋值关联表的 item_id
|
||||
if (checkTaskItemIds.length > i && !checkTaskItemIds[i].isEmpty()) {
|
||||
item.setCheckTaskItemId(Long.valueOf(checkTaskItemIds[i])); // 假设 WmsCheckItemVo 有这个字段
|
||||
}
|
||||
// 4. 其他字段赋值(保持原逻辑,补充判空)
|
||||
if (names.length > i) item.setItemName(names[i]);
|
||||
if (statusArr.length > i) item.setStatus(statusArr[i]);
|
||||
// 处理数值类型时,先判空再转换,避免 NumberFormatException
|
||||
if (targetUppers.length > i && StringUtils.isNotBlank(targetUppers[i])) {
|
||||
item.setTargetUpper(new BigDecimal(targetUppers[i])); // 推荐用 new BigDecimal,避免 Double 精度问题
|
||||
}
|
||||
if (targetLowers.length > i && StringUtils.isNotBlank(targetLowers[i])) {
|
||||
item.setTargetLower(new BigDecimal(targetLowers[i]));
|
||||
}
|
||||
if (standardTargets.length > i && StringUtils.isNotBlank(standardTargets[i])) {
|
||||
item.setStandardTarget(new BigDecimal(standardTargets[i]));
|
||||
}
|
||||
if (units.length > i) item.setUnit(units[i]);
|
||||
if (qualitativeQuantitatives.length > i && StringUtils.isNotBlank(qualitativeQuantitatives[i])) {
|
||||
item.setQualitativeQuantitative(Integer.parseInt(qualitativeQuantitatives[i]));
|
||||
}
|
||||
if (actualMeasures.length > i) item.setActualMeasure(actualMeasures[i]);
|
||||
itemList.add(item);
|
||||
for (WmsCheckTaskItem taskItem : taskItems) {
|
||||
WmsCheckItemVo itemVo = new WmsCheckItemVo();
|
||||
WmsCheckItem checkItem = itemMap.get(taskItem.getCheckItemId());
|
||||
|
||||
if (checkItem != null) {
|
||||
itemVo.setItemId(checkItem.getItemId());
|
||||
itemVo.setItemName(checkItem.getItemName());
|
||||
}
|
||||
|
||||
itemVo.setCheckTaskItemId(taskItem.getItemId());
|
||||
itemVo.setStatus(taskItem.getStatus().toString());
|
||||
itemVo.setTargetUpper(taskItem.getTargetUpper());
|
||||
itemVo.setTargetLower(taskItem.getTargetLower());
|
||||
itemVo.setStandardTarget(taskItem.getStandardTarget());
|
||||
itemVo.setUnit(taskItem.getUnit());
|
||||
itemVo.setQualitativeQuantitative(taskItem.getQualitativeQuantitative());
|
||||
itemVo.setActualMeasure(taskItem.getActualMeasure() != null ? taskItem.getActualMeasure().toString() : null);
|
||||
|
||||
itemList.add(itemVo);
|
||||
}
|
||||
vo.setItemList(itemList);
|
||||
}
|
||||
|
||||
// 查询关联的钢卷信息
|
||||
List<WmsCheckTaskCoilRelation> coilRelations = wmsCheckTaskCoilRelationMapper.selectList(
|
||||
Wrappers.<WmsCheckTaskCoilRelation>lambdaQuery()
|
||||
.eq(WmsCheckTaskCoilRelation::getTaskId, taskId)
|
||||
.eq(WmsCheckTaskCoilRelation::getDelFlag, 0)
|
||||
);
|
||||
|
||||
if (!coilRelations.isEmpty()) {
|
||||
Set<String> coilIdSet = new HashSet<>();
|
||||
for (WmsCheckTaskCoilRelation relation : coilRelations) {
|
||||
coilIdSet.add(relation.getCoilId());
|
||||
}
|
||||
|
||||
List<WmsMaterialCoilVo> coilList = queryCoilsByIds(coilIdSet);
|
||||
vo.setCoilList(coilList);
|
||||
}
|
||||
|
||||
return vo;
|
||||
}
|
||||
|
||||
private List<WmsMaterialCoilVo> queryCoilsByIds(Set<String> coilIds) {
|
||||
if (coilIds == null || coilIds.isEmpty()) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
QueryWrapper<WmsMaterialCoil> qw = new QueryWrapper<>();
|
||||
qw.in("mc.coil_id", coilIds);
|
||||
qw.eq("mc.del_flag", 0);
|
||||
// 根据创建时间倒序
|
||||
qw.orderByDesc("mc.create_time");
|
||||
|
||||
return wmsMaterialCoilMapper.selectVoListWithDynamicJoin(qw);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询检查任务列表
|
||||
@@ -102,8 +143,34 @@ public class WmsCheckTaskServiceImpl implements IWmsCheckTaskService {
|
||||
public TableDataInfo<WmsCheckTaskVo> queryPageList(WmsCheckTaskBo bo, PageQuery pageQuery) {
|
||||
QueryWrapper<WmsCheckTask> qw = buildQueryWrapperPlus(bo);
|
||||
Page<WmsCheckTaskVo> result = baseMapper.selectVoPagePlus(pageQuery.build(), qw);
|
||||
additionalInformation(result);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
private void additionalInformation(Page<WmsCheckTaskVo> result) {
|
||||
// 处理结果中的钢卷信息
|
||||
List<WmsCheckTaskVo> records = result.getRecords();
|
||||
for (WmsCheckTaskVo vo : records) {
|
||||
// 查询关联的钢卷信息
|
||||
List<WmsCheckTaskCoilRelation> coilRelations = wmsCheckTaskCoilRelationMapper.selectList(
|
||||
Wrappers.<WmsCheckTaskCoilRelation>lambdaQuery()
|
||||
.eq(WmsCheckTaskCoilRelation::getTaskId, vo.getTaskId())
|
||||
.eq(WmsCheckTaskCoilRelation::getDelFlag, 0)
|
||||
);
|
||||
|
||||
if (!coilRelations.isEmpty()) {
|
||||
Set<String> coilIdSet = new HashSet<>();
|
||||
for (WmsCheckTaskCoilRelation relation : coilRelations) {
|
||||
coilIdSet.add(relation.getCoilId());
|
||||
}
|
||||
|
||||
// 查询钢卷基础信息
|
||||
List<WmsMaterialCoilVo> coilList = queryCoilsByIds(coilIdSet);
|
||||
vo.setCoilList(coilList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private QueryWrapper<WmsCheckTask> buildQueryWrapperPlus(WmsCheckTaskBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper<WmsCheckTask> qw = Wrappers.query();
|
||||
@@ -126,6 +193,7 @@ public class WmsCheckTaskServiceImpl implements IWmsCheckTaskService {
|
||||
public TableDataInfo<WmsCheckTaskVo> queryPageListHistory(WmsCheckTaskBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<WmsCheckTask> lqw = buildQueryWrapper(bo);
|
||||
Page<WmsCheckTaskVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
additionalInformation(result);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@@ -137,7 +205,30 @@ public class WmsCheckTaskServiceImpl implements IWmsCheckTaskService {
|
||||
@Override
|
||||
public List<WmsCheckTaskVo> queryList(WmsCheckTaskBo bo) {
|
||||
LambdaQueryWrapper<WmsCheckTask> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
List<WmsCheckTaskVo> result = baseMapper.selectVoList(lqw);
|
||||
|
||||
// 处理结果中的钢卷信息
|
||||
for (WmsCheckTaskVo vo : result) {
|
||||
// 查询关联的钢卷信息
|
||||
List<WmsCheckTaskCoilRelation> coilRelations = wmsCheckTaskCoilRelationMapper.selectList(
|
||||
Wrappers.<WmsCheckTaskCoilRelation>lambdaQuery()
|
||||
.eq(WmsCheckTaskCoilRelation::getTaskId, vo.getTaskId())
|
||||
.eq(WmsCheckTaskCoilRelation::getDelFlag, 0)
|
||||
);
|
||||
|
||||
if (!coilRelations.isEmpty()) {
|
||||
Set<String> coilIdSet = new HashSet<>();
|
||||
for (WmsCheckTaskCoilRelation relation : coilRelations) {
|
||||
coilIdSet.add(relation.getCoilId());
|
||||
}
|
||||
|
||||
// 查询钢卷基础信息
|
||||
List<WmsMaterialCoilVo> coilList = queryCoilsByIds(coilIdSet);
|
||||
vo.setCoilList(coilList);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<WmsCheckTask> buildQueryWrapper(WmsCheckTaskBo bo) {
|
||||
@@ -151,6 +242,8 @@ public class WmsCheckTaskServiceImpl implements IWmsCheckTaskService {
|
||||
lqw.like(StringUtils.isNotBlank(bo.getUnitGroup()), WmsCheckTask::getUnitGroup, bo.getUnitGroup());
|
||||
lqw.eq(bo.getInspectionResult() != null, WmsCheckTask::getInspectionResult, bo.getInspectionResult());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getInspectionType()), WmsCheckTask::getInspectionType, bo.getInspectionType());
|
||||
// 倒叙
|
||||
lqw.orderByDesc(WmsCheckTask::getCreateTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
@@ -201,6 +294,22 @@ public class WmsCheckTaskServiceImpl implements IWmsCheckTaskService {
|
||||
}
|
||||
}
|
||||
|
||||
// 处理钢卷关联关系
|
||||
if (StringUtils.isNotBlank(bo.getCoilIds())) {
|
||||
String[] coilIds = bo.getCoilIds().split(",");
|
||||
for (String coilId : coilIds) {
|
||||
if (StringUtils.isNotBlank(coilId)) {
|
||||
WmsCheckTaskCoilRelation relation = new WmsCheckTaskCoilRelation();
|
||||
relation.setTaskId(add.getTaskId());
|
||||
relation.setCoilId(coilId.trim());
|
||||
int insertCount = wmsCheckTaskCoilRelationMapper.insert(relation);
|
||||
if (insertCount <= 0) {
|
||||
throw new RuntimeException("新增检查任务钢卷关联失败,钢卷ID:" + coilId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mainFlag) {
|
||||
bo.setTaskId(add.getTaskId());
|
||||
}
|
||||
@@ -228,10 +337,15 @@ public class WmsCheckTaskServiceImpl implements IWmsCheckTaskService {
|
||||
* 批量删除检查任务
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
|
||||
// 删除检查任务前,先删除相关的钢卷关联记录
|
||||
wmsCheckTaskCoilRelationMapper.deleteByTaskIds(ids);
|
||||
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.klp.mes.qc.mapper.WmsCheckTaskCoilRelationMapper">
|
||||
|
||||
<resultMap type="com.klp.mes.qc.domain.WmsCheckTaskCoilRelation" id="WmsCheckTaskCoilRelationResult">
|
||||
<result property="relationId" column="relation_id"/>
|
||||
<result property="taskId" column="task_id"/>
|
||||
<result property="coilId" column="coil_id"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
</resultMap>
|
||||
|
||||
<delete id="deleteByTaskIds" parameterType="java.util.Collection">
|
||||
UPDATE wms_check_task_coil_relation SET del_flag = 2
|
||||
WHERE task_id IN
|
||||
<foreach collection="list" item="taskId" open="(" close=")" separator=",">
|
||||
#{taskId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -49,4 +49,10 @@ export const defaultColumns = [
|
||||
width: '120',
|
||||
showOverflowTooltip: true
|
||||
},
|
||||
{
|
||||
label: '备注',
|
||||
align: 'center',
|
||||
prop: 'remark',
|
||||
showOverflowTooltip: true
|
||||
}
|
||||
]
|
||||
157
klp-ui/src/views/crm/bind/index.vue
Normal file
157
klp-ui/src/views/crm/bind/index.vue
Normal file
@@ -0,0 +1,157 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="发货单名称" prop="waybillName">
|
||||
<el-input v-model="queryParams.waybillName" placeholder="请输入发货单名称" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="收货单位" prop="consigneeUnit">
|
||||
<el-input v-model="queryParams.consigneeUnit" placeholder="请输入收货单位" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
<!-- <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" :disabled="!selectedPlan"
|
||||
title="请先选择发货计划">新增</el-button> -->
|
||||
<el-button type="success" plain icon="el-icon-refresh" size="mini" @click="handleQuery">刷新</el-button>
|
||||
<!-- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" border :data="deliveryWaybillList" highlight-current-row>
|
||||
<el-table-column label="发货单唯一ID" align="center" prop="waybillId" v-if="false" />
|
||||
<el-table-column label="发货单名称" align="center" prop="waybillName" />
|
||||
<el-table-column label="车牌" align="center" prop="licensePlate" width="100" />
|
||||
<el-table-column label="发货单位" align="center" prop="senderUnit" />
|
||||
<el-table-column label="发货时间" align="center" prop="deliveryTime" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.deliveryTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="负责人" align="center" prop="principal" />
|
||||
<el-table-column label="负责人电话" align="center" prop="principalPhone" width="100" />
|
||||
<el-table-column label="完成状态" align="center" prop="status" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="mini" type="success" v-if="scope.row.status === 1">已发货</el-tag>
|
||||
<el-tag size="mini" type="info" v-else>未发货</el-tag>
|
||||
<!-- <el-select v-model="scope.row.status" placeholder="请选择完成状态" @change="handleStatusChange(scope.row)">
|
||||
<el-option label="已发货" :value="1" />
|
||||
<el-option label="未发货" :value="0" />
|
||||
</el-select> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单合同号" align="center" prop="contractCode" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-paperclip" @click.stop="handleBind(scope.row)">绑定订单</el-button>
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-edit" :disabled="scope.row.status === 1" title="已发货的发货单不能修改"
|
||||
@click.stop="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" :disabled="scope.row.status === 1"
|
||||
title="已发货的发货单不能删除" @click.stop="handleDelete(scope.row)">删除</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<el-dialog title="选择订单" :visible.sync="dialogVisible" width="80%">
|
||||
<order-table ref="orderTable" @row-click="submitBind" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listDeliveryWaybill, updateDeliveryWaybill } from "@/api/wms/deliveryWaybill";
|
||||
import OrderTable from "../components/OrderTable.vue";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
deliveryWaybillList: [],
|
||||
total: 0,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
waybillName: '',
|
||||
consigneeUnit: ''
|
||||
},
|
||||
dialogVisible: false,
|
||||
currentWaybill: {},
|
||||
currentWaybillDetails: [],
|
||||
loading: false,
|
||||
showSearch: true,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
OrderTable,
|
||||
},
|
||||
mounted() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 完成状态改变时的处理 */
|
||||
handleStatusChange(row) {
|
||||
// 确保在更新状态时包含waybillId
|
||||
updateDeliveryWaybillStatus({
|
||||
waybillId: row.waybillId,
|
||||
status: row.status
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess("状态更新成功");
|
||||
this.getList(); // 刷新列表
|
||||
});
|
||||
},
|
||||
/** 查询发货单列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
// 确保查询参数包含planId
|
||||
const params = {
|
||||
...this.queryParams,
|
||||
// 如果选中了计划,传递planId,否则不传递该参数
|
||||
planId: this.selectedPlan ? this.selectedPlan.planId : undefined
|
||||
};
|
||||
listDeliveryWaybill(params).then(response => {
|
||||
this.deliveryWaybillList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handleBind(row) {
|
||||
this.dialogVisible = true;
|
||||
this.currentWaybill = row;
|
||||
},
|
||||
submitBind(order) {
|
||||
this.loading = true;
|
||||
this.dialogVisible = false;
|
||||
updateDeliveryWaybill({
|
||||
...this.currentWaybill,
|
||||
orderId: order.orderId,
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.$modal.msgSuccess("绑定成功");
|
||||
this.getList();
|
||||
}).catch(() => {
|
||||
this.$modal.msgError("绑定失败");
|
||||
this.dialogVisible = true;
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('wms/deliveryWaybill/export', {
|
||||
...this.queryParams
|
||||
}, `deliveryWaybill_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -2,22 +2,35 @@
|
||||
<div>
|
||||
<el-empty v-if="!orderId || orderId == ''" description="未选中订单" />
|
||||
|
||||
<!-- <el-empty v-else-if="!orderItemList.length" description="暂无订单明细" /> -->
|
||||
|
||||
<div v-else>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-if="editable">新增</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||
v-if="editable">新增</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-printer" size="mini" @click="handlePrint">打印</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-refresh" size="mini" @click="getList">刷新</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="orderItemList">
|
||||
<el-table-column label="产品类型" align="center" prop="productType" />
|
||||
<el-table-column label="规格要求" align="center" prop="specRequire" />
|
||||
<el-table-column label="产品数量" align="center" prop="productNum" />
|
||||
<el-table-column label="特殊要求" align="center" prop="specialRequire" />
|
||||
<el-table-column label="明细金额" align="center" prop="itemAmount" />
|
||||
<el-table-column label="原料规格" align="center" prop="rawMaterialSpec" />
|
||||
<el-table-column label="成品规格" align="center" prop="finishedProductSpec" />
|
||||
<el-table-column label="材质" align="center" prop="material" />
|
||||
<el-table-column label="等级" align="center" prop="grade" />
|
||||
<el-table-column label="重量" align="center" prop="weight" />
|
||||
<el-table-column label="合同定价" align="center" prop="contractPrice" />
|
||||
<el-table-column label="金额(元)" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.weight * scope.row.contractPrice }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="定制人" align="center" prop="customizer" />
|
||||
<el-table-column label="发货人" align="center" prop="shipper" />
|
||||
<el-table-column label="排产批次" align="center" prop="productionBatch" />
|
||||
<!-- <el-table-column label="产品数量" align="center" prop="productNum" /> -->
|
||||
<!-- <el-table-column label="特殊要求" align="center" prop="specialRequire" /> -->
|
||||
<!-- <el-table-column label="明细金额" align="center" prop="itemAmount" /> -->
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="editable">
|
||||
<template slot-scope="scope">
|
||||
@@ -37,19 +50,40 @@
|
||||
<el-form-item label="产品类型" prop="productType">
|
||||
<el-input v-model="form.productType" placeholder="请输入产品类型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产品数量" prop="productNum">
|
||||
<!-- <el-form-item label="产品数量" prop="productNum">
|
||||
<el-input v-model="form.productNum" placeholder="请输入产品数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="明细金额" prop="itemAmount">
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="明细金额" prop="itemAmount">
|
||||
<el-input size="mini" v-model="form.itemAmount" placeholder="请输入明细金额" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="原料规格" prop="rawMaterialSpec">
|
||||
<el-input v-model="form.rawMaterialSpec" placeholder="请输入原料规格" />
|
||||
</el-form-item>
|
||||
<el-form-item label="规格要求" prop="specRequire">
|
||||
<el-input v-model="form.specRequire" placeholder="请输入规格要求" />
|
||||
<el-form-item label="成品规格" prop="finishedProductSpec">
|
||||
<el-input v-model="form.finishedProductSpec" placeholder="请输入成品规格" />
|
||||
</el-form-item>
|
||||
<el-form-item label="特殊要求" prop="specialRequire">
|
||||
<el-input v-model="form.specialRequire" type="textarea" placeholder="请输入内容" />
|
||||
<el-form-item label="材质" prop="material">
|
||||
<el-input v-model="form.material" placeholder="请输入材质" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="等级" prop="grade">
|
||||
<el-input v-model="form.grade" placeholder="请输入等级" />
|
||||
</el-form-item>
|
||||
<el-form-item label="重量" prop="weight">
|
||||
<el-input v-model="form.weight" placeholder="请输入重量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同定价" prop="contractPrice">
|
||||
<el-input v-model="form.contractPrice" placeholder="请输入合同定价" />
|
||||
</el-form-item>
|
||||
<el-form-item label="定制人" prop="customizer">
|
||||
<el-input v-model="form.customizer" placeholder="请输入定制人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发货人" prop="shipper">
|
||||
<el-input v-model="form.shipper" placeholder="请输入发货人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="排产批次" prop="productionBatch">
|
||||
<el-input v-model="form.productionBatch" placeholder="请输入排产批次" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
@@ -59,12 +93,22 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="打印结算单" :loading="orderLoading" :visible.sync="orderOpen" width="1000px" append-to-body>
|
||||
<OrderPrinter ref="printer" :orderContent="orderContent" :orderList="orderItemList" />
|
||||
|
||||
<el-button slot="footer">
|
||||
<el-button :loading="buttonLoading" @click="printOrder">打印</el-button>
|
||||
</el-button>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listOrderItem, getOrderItem, delOrderItem, addOrderItem, updateOrderItem } from "@/api/crm/orderItem";
|
||||
import { actions, ORDER_ACTIONS } from "../js/actions";
|
||||
import { getOrder } from "@/api/crm/order";
|
||||
import OrderPrinter from "./OrderPrinter.vue";
|
||||
|
||||
export default {
|
||||
name: "OrderItem",
|
||||
@@ -77,6 +121,9 @@ export default {
|
||||
default: true
|
||||
},
|
||||
},
|
||||
components: {
|
||||
OrderPrinter
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 按钮loading
|
||||
@@ -120,26 +167,51 @@ export default {
|
||||
productNum: [
|
||||
{ required: true, message: "请输入产品数量", trigger: "blur" }
|
||||
],
|
||||
itemAmount: [
|
||||
{ required: true, message: "请输入明细金额", trigger: "blur" },
|
||||
// 必须是数字,最多两位小数,使用自定义的校验规则
|
||||
{ validator: (rule, value, callback) => {
|
||||
if (!/^\d+(\.\d{1,2})?$/.test(value)) {
|
||||
callback(new Error("请输入最多两位小数的数字"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}, trigger: "input" }
|
||||
rawMaterialSpec: [
|
||||
{ required: true, message: "请输入原料规格", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
finishedProductSpec: [
|
||||
{ required: true, message: "请输入成品规格", trigger: "blur" }
|
||||
],
|
||||
// 重量和合同定价不能为空,且必须是数字,最多两位小数
|
||||
weight: [
|
||||
{ required: true, message: "请输入重量", trigger: "blur" },
|
||||
// 必须是数字,最多两位小数,使用自定义的校验规则
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (!/^\d+(\.\d{1,2,3})?$/.test(value)) {
|
||||
callback(new Error("请输入最多三位小数的数字"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}, trigger: "change"
|
||||
}
|
||||
],
|
||||
contractPrice: [
|
||||
{ required: true, message: "请输入合同定价", trigger: "blur" },
|
||||
// 必须是数字,最多两位小数,使用自定义的校验规则
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (!/^\d+(\.\d{1,2,3})?$/.test(value)) {
|
||||
callback(new Error("请输入最多三位小数的数字"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}, trigger: "change"
|
||||
}
|
||||
],
|
||||
},
|
||||
orderContent: {},
|
||||
orderLoading: false,
|
||||
orderOpen: false,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
orderId: {
|
||||
handler(newVal, oldVal) {
|
||||
// if (newVal !== oldVal) {
|
||||
this.queryParams.orderId = newVal;
|
||||
this.getList();
|
||||
this.queryParams.orderId = newVal;
|
||||
this.getList();
|
||||
// }
|
||||
},
|
||||
immediate: true
|
||||
@@ -147,7 +219,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
/** 查询正式订单明细列表 */
|
||||
getList() {
|
||||
getList() {
|
||||
if (!this.queryParams.orderId) {
|
||||
this.orderItemList = [];
|
||||
this.total = 0;
|
||||
@@ -171,7 +243,15 @@ export default {
|
||||
itemId: undefined,
|
||||
orderId: this.orderId,
|
||||
productType: undefined,
|
||||
specRequire: undefined,
|
||||
rawMaterialSpec: undefined,
|
||||
finishedProductSpec: undefined,
|
||||
material: undefined,
|
||||
grade: undefined,
|
||||
weight: undefined,
|
||||
contractPrice: undefined,
|
||||
customizer: undefined,
|
||||
shipper: undefined,
|
||||
productionBatch: undefined,
|
||||
productNum: undefined,
|
||||
specialRequire: undefined,
|
||||
itemAmount: undefined,
|
||||
@@ -189,6 +269,20 @@ export default {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 打印按钮操作 */
|
||||
handlePrint() {
|
||||
// 正在准备打印内容
|
||||
this.orderLoading = true;
|
||||
this.orderOpen = true;
|
||||
getOrder(this.orderId).then(response => {
|
||||
this.orderContent = response.data;
|
||||
this.orderLoading = false;
|
||||
});
|
||||
},
|
||||
printOrder() {
|
||||
this.$refs["printer"].print();
|
||||
this.orderOpen = false;
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
|
||||
@@ -48,6 +48,12 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="合同号" prop="contractCode">
|
||||
<el-input v-model="form.contractCode" placeholder="请输入合同号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" type="textarea" :rows="4" />
|
||||
|
||||
365
klp-ui/src/views/crm/components/OrderPrinter.vue
Normal file
365
klp-ui/src/views/crm/components/OrderPrinter.vue
Normal file
@@ -0,0 +1,365 @@
|
||||
<template>
|
||||
<div ref="printContainer" class="printContainer">
|
||||
<div class="waybill-content">
|
||||
<!-- 单据标题 -->
|
||||
<div class="title">销售合同 - 业务结算单</div>
|
||||
|
||||
<!-- 订单主信息头部 -->
|
||||
<div class="waybill-header">
|
||||
<div class="header-left">
|
||||
<div class="header-item"><span class="label-sm">订单编号:</span>{{ orderContent.orderCode || '' }}</div>
|
||||
<div class="header-item"><span class="label-sm">业务员:</span>{{ orderContent.salesman || '' }}</div>
|
||||
<div class="header-item"><span class="label-sm">制单人:</span>{{ orderContent.createBy || '' }}</div>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<!-- <div class="header-item"><span class="label-sm">客户公司:</span>{{ orderContent.companyName || '' }}</div> -->
|
||||
<!-- <div class="header-item"><span class="label-sm">联系人:</span>{{ orderContent.contactName || '' }}</div> -->
|
||||
<div class="header-item"><span class="label-sm">交货日期:</span>{{ orderContent.deliveryDate ? orderContent.deliveryDate.split(' ')[0] : '' }}</div>
|
||||
<div class="header-item"><span class="label-sm">订单金额:</span>¥{{ orderContent.orderAmount || '0.00' }}</div>
|
||||
<div class="header-item"><span class="label-sm">制单时间:</span>{{ orderContent.createTime || '' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 订单明细表格 -->
|
||||
<table class="waybill-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>产品类型</th>
|
||||
<th>原料规格</th>
|
||||
<th>成品规格</th>
|
||||
<th>材质</th>
|
||||
<th>等级</th>
|
||||
<th>重量(吨)</th>
|
||||
<th>合同单价(元)</th>
|
||||
<th>金额(元)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in orderList" :key="item.itemId || index">
|
||||
<td>{{ item.productType || '' }}</td>
|
||||
<td>{{ item.rawMaterialSpec || '' }}</td>
|
||||
<td>{{ item.finishedProductSpec || '' }}</td>
|
||||
<td>{{ item.material || '' }}</td>
|
||||
<td>{{ item.level || '' || '' }}</td>
|
||||
<td>{{ item.weight || '0.000' }}</td>
|
||||
<td>¥{{ item.contractPrice || '0.00' }}</td>
|
||||
<td>¥{{ item.amount || '0.00' }}</td>
|
||||
</tr>
|
||||
<!-- 无明细数据占位 -->
|
||||
<tr v-if="orderList.length === 0">
|
||||
<td colspan="6" class="no-data">暂无订单明细</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- 合计区域 -->
|
||||
<div class="total-area">
|
||||
<div class="total-item">
|
||||
<span class="total-label">明细总重量:</span>
|
||||
<span>{{ calcTotalWeight() }} kg</span>
|
||||
</div>
|
||||
<div class="total-item">
|
||||
<span class="total-label">明细总金额:</span>
|
||||
<span>¥{{ calcTotalAmount() }}</span>
|
||||
</div>
|
||||
<div class="total-item">
|
||||
<span class="total-label">订单未付金额:</span>
|
||||
<span>¥{{ orderContent.unpaidAmount || '0.00' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 底部备注/状态信息 -->
|
||||
<div class="footer-info">
|
||||
<div class="info-item"><span class="label-sm">更新人:</span>{{ orderContent.updateBy || '' }}</div>
|
||||
<div class="info-item"><span class="label-sm">更新时间:</span>{{ orderContent.updateTime || '' }}</div>
|
||||
<div class="info-item"><span class="label-sm">订单状态:</span>{{ getOrderStatusText(orderContent.orderStatus) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import html2canvas from 'html2canvas'
|
||||
import { PDFDocument } from 'pdf-lib';
|
||||
|
||||
export default {
|
||||
name: "OrderPrinter",
|
||||
props: {
|
||||
// 订单主数据
|
||||
orderContent: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
// 订单明细列表
|
||||
orderList: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 计算明细总重量(保留3位小数)
|
||||
calcTotalWeight() {
|
||||
if (!this.orderList.length) return '0.000';
|
||||
const total = this.orderList.reduce((sum, item) => {
|
||||
const weight = Number(item.weight) || 0;
|
||||
return sum + weight;
|
||||
}, 0);
|
||||
return total.toFixed(3);
|
||||
},
|
||||
// 计算明细总金额(重量×单价,保留2位小数)
|
||||
calcTotalAmount() {
|
||||
if (!this.orderList.length) return '0.00';
|
||||
const total = this.orderList.reduce((sum, item) => {
|
||||
const weight = Number(item.weight) || 0;
|
||||
const price = Number(item.contractPrice) || 0;
|
||||
return sum + (weight * price);
|
||||
}, 0);
|
||||
return total.toFixed(2);
|
||||
},
|
||||
// 订单状态转文本(0-未处理/1-已审核/2-已发货/3-已完成,可根据业务扩展)
|
||||
getOrderStatusText(status) {
|
||||
const statusMap = {
|
||||
0: '未处理',
|
||||
1: '已审核',
|
||||
2: '已发货',
|
||||
3: '已完成'
|
||||
};
|
||||
return statusMap[status] || '未知状态';
|
||||
},
|
||||
// 打印订单(生成PDF后打印/下载)
|
||||
async print() {
|
||||
const node = this.$refs.printContainer;
|
||||
// 241mm热敏纸规格(宽×高)
|
||||
const paperWidthMm = 241;
|
||||
const paperHeightMm = 140;
|
||||
// 打印机安全边距(避免内容被裁剪)
|
||||
const safeRightMarginMm = 45;
|
||||
const safeLeftPaddingMm = 6;
|
||||
const safeTopShiftMm = 15;
|
||||
const safeContentWidthMm = paperWidthMm - safeRightMarginMm - safeLeftPaddingMm;
|
||||
|
||||
// 单位转换:mm → px/pt(96DPI/72DPI)
|
||||
const mmToPx = (mm) => (mm * 96) / 25.4;
|
||||
const mmToPt = 72 / 25.4;
|
||||
const pageWidthPt = paperWidthMm * mmToPt;
|
||||
const pageHeightPt = paperHeightMm * mmToPt;
|
||||
const pageWidthPx = Math.round(mmToPx(paperWidthMm));
|
||||
const pageHeightPx = Math.round(mmToPx(paperHeightMm));
|
||||
|
||||
// 创建PDF文档
|
||||
const pdfDoc = await PDFDocument.create();
|
||||
// 保存原样式,避免修改影响页面展示
|
||||
const originalStyle = { width: node.style.width, overflow: node.style.overflow };
|
||||
const contentEl = node.querySelector('.waybill-content');
|
||||
const originalContentCssText = contentEl ? contentEl.style.cssText : '';
|
||||
|
||||
// 强制容器完整展示内容,方便html2canvas截图
|
||||
node.style.width = 'auto';
|
||||
node.style.overflow = 'visible';
|
||||
// 设置内容缩放和边距,适配打印机不可打印区
|
||||
if (contentEl) {
|
||||
contentEl.style.setProperty('--content-width-mm', String(safeContentWidthMm));
|
||||
contentEl.style.setProperty('--offset-x-mm', String(safeLeftPaddingMm));
|
||||
contentEl.style.setProperty('--offset-y-mm', String(safeTopShiftMm));
|
||||
}
|
||||
|
||||
try {
|
||||
await this.$nextTick(); // 等待DOM更新
|
||||
// 生成截图(3倍缩放保证打印清晰度)
|
||||
const canvas = await html2canvas(node, {
|
||||
backgroundColor: '#ffffff',
|
||||
scale: 3,
|
||||
useCORS: true,
|
||||
willReadFrequently: true,
|
||||
width: pageWidthPx,
|
||||
height: pageHeightPx,
|
||||
windowWidth: pageWidthPx,
|
||||
windowHeight: pageHeightPx,
|
||||
scrollX: 0,
|
||||
scrollY: 0
|
||||
});
|
||||
// 将截图嵌入PDF
|
||||
const png = canvas.toDataURL('image/png');
|
||||
const imgPng = await pdfDoc.embedPng(png);
|
||||
const pdfPage = pdfDoc.addPage([pageWidthPt, pageHeightPt]);
|
||||
pdfPage.drawImage(imgPng, {
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: pageWidthPt,
|
||||
height: pageHeightPt
|
||||
});
|
||||
} finally {
|
||||
// 恢复原样式
|
||||
node.style.width = originalStyle.width;
|
||||
node.style.overflow = originalStyle.overflow;
|
||||
if (contentEl) contentEl.style.cssText = originalContentCssText;
|
||||
}
|
||||
|
||||
// 生成PDF并处理打印/下载
|
||||
const pdfBytes = await pdfDoc.save();
|
||||
const blob = new Blob([pdfBytes], { type: 'application/pdf' });
|
||||
const url = URL.createObjectURL(blob);
|
||||
// 优先新窗口打开打印
|
||||
const win = window.open(url, '_blank');
|
||||
if (!win) {
|
||||
// 新窗口被拦截则触发下载
|
||||
const a = document.createElement('a');
|
||||
a.href = url;
|
||||
a.download = `订单打印单_${this.orderContent.orderCode || this.orderContent.orderId || new Date().getTime()}.pdf`;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
document.body.removeChild(a);
|
||||
}
|
||||
// 释放URL对象
|
||||
setTimeout(() => URL.revokeObjectURL(url), 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 主容器:适配241mm热敏纸 */
|
||||
.printContainer {
|
||||
width: 241mm;
|
||||
height: 140mm;
|
||||
margin: 0 auto;
|
||||
background: #fff;
|
||||
font-family: SimSun, "宋体", monospace;
|
||||
color: #000;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 单据标题 */
|
||||
.title {
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 3mm;
|
||||
padding-bottom: 1mm;
|
||||
border-bottom: 1px solid #000;
|
||||
}
|
||||
|
||||
/* 内容容器:适配打印机边距,自动缩放 */
|
||||
.waybill-content {
|
||||
--paper-width-mm: 241;
|
||||
--content-width-mm: 241;
|
||||
--offset-x-mm: 0;
|
||||
--offset-y-mm: 0;
|
||||
--scale: calc(var(--content-width-mm) / var(--paper-width-mm));
|
||||
width: calc(var(--paper-width-mm) * 1mm);
|
||||
transform-origin: top left;
|
||||
transform: translate(calc(var(--offset-x-mm) * 1mm), calc(var(--offset-y-mm) * 1mm)) scale(var(--scale));
|
||||
}
|
||||
|
||||
/* 订单头部信息 */
|
||||
.waybill-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 12px;
|
||||
margin-bottom: 3mm;
|
||||
line-height: 4mm;
|
||||
}
|
||||
.header-left, .header-right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.header-item {
|
||||
display: flex;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.label-sm {
|
||||
font-weight: bold;
|
||||
margin-right: 2mm;
|
||||
min-width: 60px;
|
||||
}
|
||||
|
||||
/* 明细表格:边框合并,固定布局 */
|
||||
.waybill-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 3mm;
|
||||
font-size: 11px;
|
||||
table-layout: fixed;
|
||||
}
|
||||
.waybill-table th, .waybill-table td {
|
||||
border: 0.5px solid #000;
|
||||
padding: 0.5mm;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
line-height: 3.5mm;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.waybill-table th {
|
||||
background-color: #f5f5f5;
|
||||
font-weight: bold;
|
||||
}
|
||||
.no-data {
|
||||
height: 20mm;
|
||||
line-height: 20mm;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/* 合计区域 */
|
||||
.total-area {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 5mm;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 3mm;
|
||||
padding-right: 2mm;
|
||||
line-height: 4mm;
|
||||
}
|
||||
.total-label {
|
||||
margin-right: 1mm;
|
||||
}
|
||||
|
||||
/* 底部信息 */
|
||||
.footer-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 12px;
|
||||
line-height: 4mm;
|
||||
padding-top: 1mm;
|
||||
border-top: 1px dashed #ccc;
|
||||
}
|
||||
.info-item {
|
||||
display: flex;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* 打印样式适配:打印机不可打印区处理 */
|
||||
@page {
|
||||
size: 241mm 140mm;
|
||||
margin: 0;
|
||||
}
|
||||
@media print {
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: #fff;
|
||||
}
|
||||
.printContainer {
|
||||
width: 241mm;
|
||||
height: 140mm;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
.waybill-content {
|
||||
--content-width-mm: 196; /* 右侧预留45mm不可打印区 */
|
||||
--offset-x-mm: 6; /* 左侧内边距6mm */
|
||||
--offset-y-mm: 15; /* 顶部偏移15mm */
|
||||
}
|
||||
/* 打印时允许表格内容换行,避免裁剪 */
|
||||
.waybill-table th, .waybill-table td {
|
||||
white-space: normal !important;
|
||||
overflow: visible !important;
|
||||
text-overflow: clip !important;
|
||||
height: auto !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
64
klp-ui/src/views/crm/components/OrderTable.vue
Normal file
64
klp-ui/src/views/crm/components/OrderTable.vue
Normal file
@@ -0,0 +1,64 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table v-loading="loading" :data="orderList" height="400px" highlight-current-row @row-click="handleRowClick">
|
||||
<el-table-column label="订单编号" align="center" prop="orderCode" />
|
||||
<el-table-column label="客户" align="center" prop="companyName" />
|
||||
<el-table-column label="总金额" align="center" prop="orderAmount" />
|
||||
<el-table-column label="销售员" align="center" prop="salesman" />
|
||||
<el-table-column label="合同号" align="center" prop="contractCode" />
|
||||
|
||||
<el-table-column label="交货日期" align="center" prop="deliveryDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.deliveryDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="orderType">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.orderType === 0" class="text-primary">未审核</span>
|
||||
<span v-else-if="scope.row.orderType === 1">已审核</span>
|
||||
<span v-else>未知状态</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listOrder } from "@/api/crm/order";
|
||||
|
||||
export default {
|
||||
name: 'OrderTable',
|
||||
data() {
|
||||
return {
|
||||
orderList: [],
|
||||
total: 0,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderNo: '',
|
||||
customerName: '',
|
||||
},
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true
|
||||
listOrder(this.queryParams).then(res => {
|
||||
this.orderList = res.rows
|
||||
this.total = res.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleRowClick(row) {
|
||||
this.$emit('row-click', row)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -70,14 +70,14 @@
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="应收ID" align="center" prop="receivableId" v-if="false"/>
|
||||
<!-- <el-table-column label="客户" align="center" prop="customerName" /> -->
|
||||
<el-table-column label="到期日" align="center" prop="dueDate" width="180">
|
||||
<el-table-column label="收款日期" align="center" prop="dueDate" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.dueDate, '{y}-{m}-{d}') }}</span>
|
||||
<el-tag v-if="new Date(scope.row.dueDate) < new Date()" type="danger">过期</el-tag>
|
||||
<el-tag v-else-if="new Date(scope.row.dueDate) > new Date()" type="success">还剩{{ parseInt((new Date(scope.row.dueDate) - new Date()) / (1000 * 60 * 60 * 24)) }}天</el-tag>
|
||||
<!-- <el-tag v-if="new Date(scope.row.dueDate) < new Date()" type="danger">过期</el-tag>
|
||||
<el-tag v-else-if="new Date(scope.row.dueDate) > new Date()" type="success">还剩{{ parseInt((new Date(scope.row.dueDate) - new Date()) / (1000 * 60 * 60 * 24)) }}天</el-tag> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="应收金额" align="center" prop="amount" />
|
||||
<el-table-column label="收款金额" align="center" prop="amount" />
|
||||
<!-- <el-table-column label="已收金额" align="center" prop="paidAmount" /> -->
|
||||
<!-- <el-table-column label="未收金额" align="center" prop="balanceAmount" /> -->
|
||||
<!-- <el-table-column label="状态" align="center" prop="status" /> -->
|
||||
@@ -122,7 +122,7 @@
|
||||
v-model="form.dueDate"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择到期日">
|
||||
placeholder="请选择收款日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="收款金额" prop="amount">
|
||||
@@ -247,7 +247,8 @@ export default {
|
||||
// 收款表单参数
|
||||
receiveForm: {},
|
||||
// 是否显示收款弹出层
|
||||
receiveOpen: false
|
||||
receiveOpen: false,
|
||||
isFirst: true,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -258,6 +259,10 @@ export default {
|
||||
this.receivableList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
if (this.isFirst) {
|
||||
this.isFirst = false;
|
||||
return;
|
||||
}
|
||||
updateOrder({
|
||||
orderId: this.orderId,
|
||||
unpaidAmount: this.unreceivedAmount,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!-- 客户列表区域 -->
|
||||
<el-col :span="5" style="border-right: 1px solid #e4e7ed;">
|
||||
<el-col :span="6" style="border-right: 1px solid #e4e7ed;">
|
||||
<div style="font-weight: 900;">客户列表</div>
|
||||
<!-- 搜索区域 -->
|
||||
<div style="display: flex; align-items: center; gap: 5px; margin-top: 10px;">
|
||||
@@ -55,7 +55,9 @@
|
||||
listKey="customerId"
|
||||
:loading="customerLoading"
|
||||
field1="customerCode"
|
||||
field4="companyName"
|
||||
field2="companyName"
|
||||
field4="contactPerson"
|
||||
field5="contactWay"
|
||||
@item-click="handleItemClick"
|
||||
>
|
||||
<template slot="actions" slot-scope="{ item }">
|
||||
@@ -66,7 +68,7 @@
|
||||
</el-col>
|
||||
|
||||
<!-- 右侧内容区域 -->
|
||||
<el-col :span="19">
|
||||
<el-col :span="18">
|
||||
<el-tabs v-model="activeTab" type="border-card" v-if="currentCustomer && currentCustomer.customerId">
|
||||
<!-- 客户详情标签页 -->
|
||||
<el-tab-pane label="客户详情" name="detail">
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
<el-input style="flex: 1;" prefix-icon="el-icon-search" placeholder="输入订单编号搜索"
|
||||
v-model="queryParams.orderCode"></el-input>
|
||||
<el-button icon="el-icon-search" @click="toggleQuery"></el-button>
|
||||
<el-button type="primary" icon="el-icon-plus" style="margin-left: 0;" @click="handleAdd" v-hasPermi="['crm:order:add']"></el-button>
|
||||
<el-button type="primary" icon="el-icon-plus" style="margin-left: 0;" @click="handleAdd"
|
||||
v-hasPermi="['crm:order:add']"></el-button>
|
||||
</div>
|
||||
<div v-show="showQuery"
|
||||
style="display: flex; align-items: center; gap: 5px; margin-top: 10px; flex-wrap: wrap;">
|
||||
@@ -29,10 +30,11 @@
|
||||
</div>
|
||||
<div>
|
||||
<!-- 列表区域 -->
|
||||
<KLPList :listData="orderList" listKey="orderId" :loading="orderLoading" field1="orderCode" field4="salesman"
|
||||
@item-click="handleOrderClick">
|
||||
<KLPList :listData="orderList" listKey="orderId" :loading="orderLoading" field1="orderCode" field2="salesman"
|
||||
field4="companyName" field5="contactPerson" @item-click="handleOrderClick">
|
||||
<template slot="actions" slot-scope="{ item }">
|
||||
<el-button type="danger" size="mini" @click="handleDelete(item)" icon="el-icon-delete" v-hasPermi="['crm:order:add']"></el-button>
|
||||
<el-button type="danger" size="mini" @click="handleDelete(item)" icon="el-icon-delete"
|
||||
v-hasPermi="['crm:order:add']"></el-button>
|
||||
</template>
|
||||
</KLPList>
|
||||
</div>
|
||||
@@ -46,8 +48,12 @@
|
||||
<!-- 订单详情内容 -->
|
||||
<el-descriptions :column="2" :border="true" title="订单基本信息" style="margin-bottom: 20px;">
|
||||
<el-descriptions-item label="订单编号">{{ form.orderCode }}</el-descriptions-item>
|
||||
<el-descriptions-item label="客户">{{ form.customerId }}</el-descriptions-item>
|
||||
<el-descriptions-item label="销售员">{{ form.salesman }}</el-descriptions-item>
|
||||
<el-descriptions-item label="交货日期">{{ form.deliveryDate }}</el-descriptions-item>
|
||||
<el-descriptions-item label="合同号">{{ form.contractCode }}</el-descriptions-item>
|
||||
<el-descriptions-item label="客户公司">{{ form.companyName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系人">{{ form.contactPerson }}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系电话">{{ form.contactWay }}</el-descriptions-item>
|
||||
<el-descriptions-item label="备注" :span="2">{{ form.remark }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
@@ -107,6 +113,9 @@
|
||||
<el-form-item label="销售员" prop="salesman">
|
||||
<el-input v-model="form.salesman" placeholder="请输入销售员" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同号" prop="contractCode">
|
||||
<el-input v-model="form.contractCode" placeholder="请输入合同号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="交货日期" prop="deliveryDate">
|
||||
<el-date-picker clearable v-model="form.deliveryDate" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择交货日期">
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
<el-table v-loading="loading" :data="orderList" height="400px" highlight-current-row @row-click="handleRowClick">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="订单编号" align="center" prop="orderCode" />
|
||||
<el-table-column label="客户" align="center" prop="customerId" />
|
||||
<el-table-column label="客户" align="center" prop="companyName" />
|
||||
<el-table-column label="总金额" align="center" prop="orderAmount" />
|
||||
<el-table-column label="销售员" align="center" prop="salesman" />
|
||||
<el-table-column label="交货日期" align="center" prop="deliveryDate" width="180">
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
<div class="table-title">检验历史列表</div>
|
||||
<KLPTable ref="historyTable" height="300px" highlight-current-row v-loading="loading" :data="checkTaskList" @row-click="handleRowClick" row-class-name="tableRowClassName">
|
||||
<el-table-column label="任务名称" align="center" prop="taskName" />
|
||||
<el-table-column label="钢卷号" align="center" prop="currentCoilNo" />
|
||||
<el-table-column label="工段" align="center" prop="workshopSection" />
|
||||
<el-table-column label="工序" align="center" prop="process" />
|
||||
<el-table-column label="机组" align="center" prop="unitGroup" />
|
||||
@@ -144,7 +145,13 @@ export default {
|
||||
getList() {
|
||||
this.loading = true
|
||||
listHistoryCheckTask(this.queryParams).then(response => {
|
||||
this.checkTaskList = response.rows
|
||||
this.checkTaskList = response.rows.map(item => ({
|
||||
...item,
|
||||
verifyTarget: JSON.parse(item.verifyTarget),
|
||||
entryCoilNo: item.coilList?.[0]?.entryCoilNo || '',
|
||||
currentCoilNo: item.coilList?.[0]?.currentCoilNo || '',
|
||||
weight: item.coilList?.[0]?.netWeight || 0,
|
||||
}))
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
|
||||
@@ -39,16 +39,16 @@
|
||||
<KLPTable ref="checkTaskTable" height="300px" highlight-current-row v-loading="loading" :data="checkTaskList"
|
||||
@row-click="handleRowClick">
|
||||
<el-table-column label="任务名称" align="center" prop="taskName" />
|
||||
<el-table-column label="钢卷号" align="center" prop="verifyTarget.coilId" />
|
||||
<el-table-column label="钢卷号" align="center" prop="currentCoilNo" />
|
||||
<el-table-column label="工段" align="center" prop="workshopSection" />
|
||||
<el-table-column label="工序" align="center" prop="process" />
|
||||
<el-table-column label="机组" align="center" prop="unitGroup" />
|
||||
<el-table-column label="钢卷号" align="center" prop="verifyTarget.coilId" />
|
||||
<el-table-column label="原料卷号" align="center" prop="verifyTarget.rawCoilId" />
|
||||
<!-- <el-table-column label="钢卷号" align="center" prop="verifyTarget.coilId" /> -->
|
||||
<el-table-column label="原料卷号" align="center" prop="entryCoilNo" />
|
||||
<el-table-column label="厂家" align="center" prop="verifyTarget.vendor" />
|
||||
<el-table-column label="宽度" align="center" prop="verifyTarget.width" />
|
||||
<el-table-column label="厚度" align="center" prop="verifyTarget.thickness" />
|
||||
<el-table-column label="重量" align="center" prop="verifyTarget.weight" />
|
||||
<el-table-column label="重量" align="center" prop="weight" />
|
||||
<el-table-column label="检验结果" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>
|
||||
@@ -136,13 +136,11 @@
|
||||
<el-form-item label="检查项" prop="itemId" v-if="!form.taskId">
|
||||
<CheckItemSelect v-model="form.itemId" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="钢卷号">
|
||||
<el-input v-model="form.verifyTarget.coilId" placeholder="请输入钢卷号" />
|
||||
<coil-selector v-model="form.coilIds" @select="handleCoilChange" :filters="{ selectType: 'raw_material', itemType: 'raw_material' }"></coil-selector>
|
||||
<!-- <el-input v-model="form.verifyTarget.coilId" placeholder="请输入钢卷号" /> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="原料卷号">
|
||||
<!-- <el-form-item label="原料卷号">
|
||||
<el-input v-model="form.verifyTarget.rawCoilId" placeholder="请输入原料卷号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="厂家">
|
||||
@@ -156,7 +154,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="重量">
|
||||
<el-input v-model="form.verifyTarget.weight" placeholder="请输入重量" />
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="工段" prop="workshopSection">
|
||||
<el-input v-model="form.workshopSection" placeholder="请输入工段" />
|
||||
</el-form-item>
|
||||
@@ -166,13 +164,16 @@
|
||||
<el-form-item label="机组" prop="unitGroup">
|
||||
<el-input v-model="form.unitGroup" placeholder="请输入机组" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检验结果" prop="inspectionResult">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="检验结果" prop="inspectionResult">
|
||||
<el-select v-model="form.inspectionResult" placeholder="请选择检验结果">
|
||||
<el-option label="未检验" :value="0" />
|
||||
<el-option label="合格" :value="1" />
|
||||
<el-option label="不合格" :value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
@@ -187,6 +188,7 @@
|
||||
import { listCheckTask, getCheckTask, delCheckTask, addCheckTask, updateCheckTask } from '@/api/mes/qc/checkTask'
|
||||
import { updateCheckTaskItemStatus, updateCheckTaskItem } from '@/api/mes/qc/checkTaskItem'
|
||||
import CheckItemSelect from '@/components/KLPService/CheckItemSelect/index'
|
||||
import CoilSelector from '@/components/CoilSelector/index.vue'
|
||||
|
||||
export default {
|
||||
name: 'CheckTask',
|
||||
@@ -245,7 +247,8 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
components: {
|
||||
CheckItemSelect
|
||||
CheckItemSelect,
|
||||
CoilSelector
|
||||
},
|
||||
methods: {
|
||||
/** 查询检查任务列表 */
|
||||
@@ -254,12 +257,27 @@ export default {
|
||||
listCheckTask(this.queryParams).then(response => {
|
||||
this.checkTaskList = response.rows.map(item => ({
|
||||
...item,
|
||||
verifyTarget: JSON.parse(item.verifyTarget)
|
||||
verifyTarget: JSON.parse(item.verifyTarget),
|
||||
entryCoilNo: item.coilList?.[0]?.entryCoilNo || '',
|
||||
currentCoilNo: item.coilList?.[0]?.currentCoilNo || '',
|
||||
weight: item.coilList?.[0]?.netWeight || 0,
|
||||
}));
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handleCoilChange(coil) {
|
||||
const [thickness, width] = coil.specification.split('*')
|
||||
console.log(thickness, width, coil.netWeight)
|
||||
this.form.verifyTarget = {
|
||||
coilId: coil.coilId,
|
||||
rawCoilId: coil.rawCoilId,
|
||||
factory: coil.manufacturer,
|
||||
thickness: thickness,
|
||||
width: width,
|
||||
weight: coil.netWeight,
|
||||
}
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
@@ -383,6 +401,7 @@ export default {
|
||||
// 对象转json
|
||||
const payload = {
|
||||
...this.form,
|
||||
itemId: this.form.itemId.split(','),
|
||||
verifyTarget: JSON.stringify(this.form.verifyTarget)
|
||||
}
|
||||
if (this.form.taskId != null) {
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<KLPTable ref="checkTaskTable" height="300px" highlight-current-row v-loading="loading" :data="checkTaskList"
|
||||
@row-click="handleRowClick">
|
||||
<el-table-column label="任务名称" align="center" prop="taskName" />
|
||||
<el-table-column label="钢卷号" align="center" prop="verifyTarget.coilId" />
|
||||
<el-table-column label="钢卷号" align="center" prop="coilList[0].currentCoilNo" />
|
||||
<el-table-column label="工段" align="center" prop="workshopSection" />
|
||||
<el-table-column label="工序" align="center" prop="process" />
|
||||
<el-table-column label="机组" align="center" prop="unitGroup" />
|
||||
@@ -127,15 +127,13 @@
|
||||
<el-form-item label="任务名称" prop="taskName">
|
||||
<el-input v-model="form.taskName" placeholder="请输入任务名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="钢卷号">
|
||||
<!-- <el-input v-model="form.verifyTarget.coilId" placeholder="请输入钢卷号" /> -->
|
||||
<coil-selector v-model="form.coilIds" @select="handleCoilChange"></coil-selector>
|
||||
</el-form-item>
|
||||
<el-form-item label="检查项" prop="itemId" v-if="!form.taskId">
|
||||
<CheckItemSelect v-model="form.itemId" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="钢卷号">
|
||||
<el-input v-model="form.verifyTarget.coilId" placeholder="请输入钢卷号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工段" prop="workshopSection">
|
||||
<el-input v-model="form.workshopSection" placeholder="请输入工段" />
|
||||
</el-form-item>
|
||||
@@ -145,13 +143,16 @@
|
||||
<el-form-item label="机组" prop="unitGroup">
|
||||
<el-input v-model="form.unitGroup" placeholder="请输入机组" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检验结果" prop="inspectionResult">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="检验结果" prop="inspectionResult">
|
||||
<el-select v-model="form.inspectionResult" placeholder="请选择检验结果">
|
||||
<el-option label="未检验" :value="0" />
|
||||
<el-option label="合格" :value="1" />
|
||||
<el-option label="不合格" :value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
@@ -166,6 +167,8 @@
|
||||
import { listCheckTask, getCheckTask, delCheckTask, addCheckTask, updateCheckTask } from '@/api/mes/qc/checkTask'
|
||||
import { updateCheckTaskItemStatus, updateCheckTaskItem } from '@/api/mes/qc/checkTaskItem'
|
||||
import CheckItemSelect from '@/components/KLPService/CheckItemSelect/index'
|
||||
import CoilSelector from '@/components/CoilSelector/index.vue'
|
||||
|
||||
|
||||
export default {
|
||||
name: 'CheckTask',
|
||||
@@ -219,7 +222,8 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
components: {
|
||||
CheckItemSelect
|
||||
CheckItemSelect,
|
||||
CoilSelector
|
||||
},
|
||||
methods: {
|
||||
/** 查询检查任务列表 */
|
||||
@@ -234,13 +238,16 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handleCoilChange(coil) {
|
||||
this.form.verifyTarget.coilId = coil.coilId
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
handleBlur(row) {
|
||||
updateCheckTaskItem({...row, itemId: row.checkTaskItemId}).then(response => {
|
||||
handleBlur(row) {
|
||||
updateCheckTaskItem({ ...row, itemId: row.checkTaskItemId }).then(response => {
|
||||
this.$message({
|
||||
message: '更新成功',
|
||||
type: 'success'
|
||||
@@ -352,6 +359,7 @@ export default {
|
||||
// 对象转json
|
||||
const payload = {
|
||||
...this.form,
|
||||
itemId: this.form.itemId.split(','),
|
||||
verifyTarget: JSON.stringify(this.form.verifyTarget)
|
||||
}
|
||||
if (this.form.taskId != null) {
|
||||
|
||||
@@ -180,6 +180,7 @@
|
||||
<!-- <el-tag type="info" size="small">{{ scope.row.currentCoilNo }}</el-tag> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="厂家卷号" align="center" prop="supplierCoilNo" />
|
||||
|
||||
<el-table-column label="新增时间" align="center" prop="createTime" width="150" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
|
||||
@@ -119,11 +119,11 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="更新人" v-if="!showExportTime" align="center" prop="updateByName" />
|
||||
<el-table-column label="二维码" v-if="qrcode">
|
||||
<!-- <el-table-column label="二维码">
|
||||
<template slot-scope="scope">
|
||||
<QRCode :content="scope.row.qrcodeRecordId" :size="50" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="关联信息" align="center" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.parentCoilNos && scope.row.hasMergeSplit === 1 && scope.row.dataType === 1">
|
||||
@@ -146,6 +146,7 @@
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip/> -->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<el-table-column label="数量" align="center" prop="quantity" />
|
||||
<el-table-column label="重量" align="center" prop="weight" />
|
||||
<!-- <el-table-column label="单价" align="center" prop="unitPrice" /> -->
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
@@ -106,7 +106,7 @@
|
||||
<el-form-item label="单价" prop="unitPrice">
|
||||
<el-input v-model="form.unitPrice" placeholder="请输入单价" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-form-item label="备注" prop="remark" >
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -4,37 +4,43 @@
|
||||
<div class="waybill-container" ref="waybillRef">
|
||||
<div class="waybill-content">
|
||||
<!-- 头部信息 -->
|
||||
<!-- 标题信息 -->
|
||||
<div class="title">科伦普发货单</div>
|
||||
<div class="waybill-header">
|
||||
<div class="header-left">
|
||||
<span class="label">收货单位:</span>
|
||||
<input type="text" class="editable-input transparent-input" v-model="localWaybill.consigneeUnit" />
|
||||
<div class="editable-input transparent-input" contenteditable>{{ localWaybill.consigneeUnit }}</div>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<input type="text" class="editable-input date-input transparent-input" v-model="localWaybill.deliveryYear" />
|
||||
<div class="editable-input date-input transparent-input" contenteditable>{{ localWaybill.deliveryYear }}</div>
|
||||
<span class="label date-label">年</span>
|
||||
<input type="text" class="editable-input date-input transparent-input" v-model="localWaybill.deliveryMonth" />
|
||||
<div class="editable-input date-input transparent-input" contenteditable>{{ localWaybill.deliveryMonth }}</div>
|
||||
<span class="label date-label">月</span>
|
||||
<input type="text" class="editable-input date-input transparent-input" v-model="localWaybill.deliveryDay" />
|
||||
<div class="editable-input date-input transparent-input" contenteditable>{{ localWaybill.deliveryDay }}</div>
|
||||
<span class="label date-label">日</span>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<span class="label">发货单位:</span>
|
||||
<input type="text" class="editable-input transparent-input" v-model="localWaybill.senderUnit" />
|
||||
<div class="editable-input transparent-input" contenteditable>{{ localWaybill.senderUnit }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="waybill-header">
|
||||
<div class="header-left">
|
||||
<span class="label">负责人:</span>
|
||||
<input type="text" class="editable-input transparent-input" v-model="localWaybill.principal" />
|
||||
<div class="editable-input transparent-input" contenteditable>{{ localWaybill.principal }}</div>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<span class="label">电话:</span>
|
||||
<input type="text" class="editable-input transparent-input" v-model="localWaybill.principalPhone" />
|
||||
<div class="editable-input transparent-input" contenteditable>{{ localWaybill.principalPhone }}</div>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<span class="label">合同号:</span>
|
||||
<div class="editable-input transparent-input" contenteditable>{{ localWaybill.contractCode }}</div>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<span class="label">车牌:</span>
|
||||
<input type="text" class="editable-input transparent-input" v-model="localWaybill.licensePlate" />
|
||||
<div class="editable-input transparent-input" contenteditable>{{ localWaybill.licensePlate }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -51,10 +57,10 @@
|
||||
<th>卷号</th>
|
||||
<th>规格</th>
|
||||
<th>材质</th>
|
||||
<th>数量(件)</th>
|
||||
<th>重量(T)</th>
|
||||
<!-- <th>数量(件)</th> -->
|
||||
<th>重量(t)</th>
|
||||
<th>单价</th>
|
||||
|
||||
<th>备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -68,27 +74,38 @@
|
||||
</tr>
|
||||
<!-- 明细数据 -->
|
||||
<tr v-for="(item, index) in displayWaybillDetails" :key="index">
|
||||
<td><input type="text" class="transparent-input" v-model="item.productName" /></td>
|
||||
<td><input type="text" class="table-input transparent-input" v-model="item.edgeType" />
|
||||
</td>
|
||||
<td><input type="text" class="table-input transparent-input" v-model="item.packageType" />
|
||||
</td>
|
||||
<td><input type="text" class="table-input transparent-input" v-model="item.actualWarehouseName" />
|
||||
</td>
|
||||
<td><input type="text" class="table-input transparent-input" v-model="item.settlementType" />
|
||||
</td>
|
||||
<td><input type="text" class="table-input transparent-input" v-model="item.rawMaterialFactory" />
|
||||
</td>
|
||||
<td><input type="text" class="table-input transparent-input" v-model="item.coilNumber" /></td>
|
||||
<td><input type="text" class="table-input transparent-input" v-model="item.specification" /></td>
|
||||
<td><input type="text" class="table-input transparent-input" v-model="item.material" />
|
||||
</td>
|
||||
<td><input type="number" class="table-input transparent-input" v-model.number="item.quantity"
|
||||
placeholder="0" /></td>
|
||||
<td><div class="table-input transparent-input" contenteditable>{{ item.productName }}</div></td>
|
||||
<td><div class="table-input transparent-input" contenteditable>{{ item.edgeType }}</div></td>
|
||||
<td><div class="table-input transparent-input" contenteditable>{{ item.packageType }}</div></td>
|
||||
<td><div class="table-input transparent-input" contenteditable>{{ item.actualWarehouseName }}</div></td>
|
||||
<td><div class="table-input transparent-input" contenteditable>{{ item.settlementType }}</div></td>
|
||||
<td><div class="table-input transparent-input" contenteditable>{{ item.rawMaterialFactory }}</div></td>
|
||||
<td><div class="table-input transparent-input" contenteditable>{{ item.coilNumber }}</div></td>
|
||||
<td><div class="table-input transparent-input" contenteditable>{{ item.specification }}</div></td>
|
||||
<td><div class="table-input transparent-input" contenteditable>{{ item.material }}</div></td>
|
||||
<!-- <td><input type="number" class="table-input transparent-input" v-model.number="item.quantity"
|
||||
placeholder="0" /></td> -->
|
||||
<td><input type="number" class="table-input transparent-input" v-model.number="item.weight"
|
||||
placeholder="0.00" /></td>
|
||||
<td><input type="text" class="table-input transparent-input" v-model="item.unitPrice" /></td>
|
||||
|
||||
<td><div class="table-input transparent-input" contenteditable>{{ item.unitPrice }}</div></td>
|
||||
<td><div class="table-input transparent-input" contenteditable>{{ item.remark }}</div></td>
|
||||
</tr>
|
||||
<!-- 加粗最后一行的线 -->
|
||||
<tr style="height: 0;">
|
||||
<td style="height: 0;"></td>
|
||||
<td style="height: 0;"></td>
|
||||
<td style="height: 0;"></td>
|
||||
<td style="height: 0;"></td>
|
||||
<td style="height: 0;"></td>
|
||||
<td style="height: 0;"></td>
|
||||
<td style="height: 0;"></td>
|
||||
<td style="height: 0;"></td>
|
||||
<td style="height: 0;"></td>
|
||||
<!-- <td><input type="number" class="table-input transparent-input" v-model.number="item.quantity"
|
||||
placeholder="0" /></td> -->
|
||||
<td style="height: 0;"></td>
|
||||
<td style="height: 0;"></td>
|
||||
<td style="height: 0;"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -104,7 +121,7 @@
|
||||
|
||||
<div class="waybill-pickup-location">
|
||||
<!-- <div class="pickup-location-item inline"> -->
|
||||
<span class="label">取货地点:</span>
|
||||
<span style="font-size: 18px; font-weight: bold;">取货地点:</span>
|
||||
<input type="text" class="editable-input full-input transparent-input" v-model="localWaybill.pickupLocation" />
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
@@ -113,15 +130,19 @@
|
||||
<div class="waybill-footer">
|
||||
<div class="footer-item inline">
|
||||
<span class="label">销售:</span>
|
||||
<input type="text" class="editable-input signature-input transparent-input" />
|
||||
<div class="editable-input signature-input transparent-input" contenteditable>{{ localWaybill.salesman }}</div>
|
||||
</div>
|
||||
<div class="footer-item inline">
|
||||
<span class="label">发货:</span>
|
||||
<input type="text" class="editable-input signature-input transparent-input" />
|
||||
<div class="editable-input signature-input transparent-input" contenteditable>{{ localWaybill.deliveryman }}</div>
|
||||
</div>
|
||||
<div class="footer-item inline">
|
||||
<span class="label">司机:</span>
|
||||
<div class="editable-input signature-input transparent-input" contenteditable>{{ localWaybill.driver }}</div>
|
||||
</div>
|
||||
<div class="footer-item inline">
|
||||
<span class="label">磅房:</span>
|
||||
<input type="text" class="editable-input signature-input transparent-input" />
|
||||
<div class="editable-input signature-input transparent-input" contenteditable>{{ localWaybill.weightRoom }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -159,7 +180,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
currentPage: 1,
|
||||
perPage: 10,
|
||||
perPage: 7,
|
||||
totalPages: 1,
|
||||
// 本地可编辑的发货单数据
|
||||
localWaybill: {
|
||||
@@ -193,7 +214,8 @@ export default {
|
||||
principal: newVal.principal || '',
|
||||
principalPhone: newVal.principalPhone || '',
|
||||
licensePlate: newVal.licensePlate || '',
|
||||
pickupLocation: newVal.pickupLocation || ''
|
||||
pickupLocation: newVal.pickupLocation || '',
|
||||
contractCode: newVal.contractCode || ''
|
||||
};
|
||||
}
|
||||
},
|
||||
@@ -423,9 +445,18 @@ export default {
|
||||
box-shadow: none;
|
||||
font-family: SimSun, "Courier New", monospace;
|
||||
overflow: hidden;
|
||||
color: #000 !important;
|
||||
font-weight: 900 !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.waybill-content {
|
||||
--paper-width-mm: 241;
|
||||
--content-width-mm: 241;
|
||||
@@ -466,7 +497,8 @@ export default {
|
||||
.label {
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
width: 80px;
|
||||
width: 100px;
|
||||
font-size: 18px;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
}
|
||||
@@ -480,10 +512,12 @@ export default {
|
||||
padding: 4px 8px;
|
||||
border: 1px solid #dcdfe6;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
font-family: SimSun, serif;
|
||||
outline: none;
|
||||
transition: all 0.2s;
|
||||
line-height: 18px;
|
||||
border-bottom: 1px dashed #dcdfe6;
|
||||
}
|
||||
|
||||
@@ -492,7 +526,7 @@ export default {
|
||||
}
|
||||
|
||||
.date-input {
|
||||
width: 30px;
|
||||
width: 40px;
|
||||
text-align: center;
|
||||
margin-right: 5px;
|
||||
}
|
||||
@@ -525,6 +559,8 @@ export default {
|
||||
line-height: 6mm;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
font-size: 16px;
|
||||
font-weight: 900;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
@@ -533,7 +569,7 @@ export default {
|
||||
/* 表格列宽设置 */
|
||||
.waybill-table th:nth-child(1),
|
||||
.waybill-table td:nth-child(1) {
|
||||
width: 80px;
|
||||
width: 70px;
|
||||
/* 品名 */
|
||||
}
|
||||
|
||||
@@ -545,62 +581,70 @@ export default {
|
||||
|
||||
.waybill-table th:nth-child(3),
|
||||
.waybill-table td:nth-child(3) {
|
||||
width: 40px;
|
||||
width: 50px;
|
||||
/* 包装 */
|
||||
}
|
||||
|
||||
.waybill-table th:nth-child(4),
|
||||
.waybill-table td:nth-child(4) {
|
||||
width: 80px;
|
||||
width: 90px;
|
||||
/* 仓库位置 */
|
||||
}
|
||||
|
||||
.waybill-table th:nth-child(5),
|
||||
.waybill-table td:nth-child(5) {
|
||||
width: 40px;
|
||||
width: 60px;
|
||||
/* 结算 */
|
||||
}
|
||||
|
||||
.waybill-table th:nth-child(6),
|
||||
.waybill-table td:nth-child(6) {
|
||||
width: 80px;
|
||||
width: 70px;
|
||||
/* 原料厂家 */
|
||||
}
|
||||
|
||||
.waybill-table th:nth-child(7),
|
||||
.waybill-table td:nth-child(7) {
|
||||
width: 100px;
|
||||
width: 110px;
|
||||
/* 卷号 */
|
||||
}
|
||||
|
||||
.waybill-table th:nth-child(8),
|
||||
.waybill-table td:nth-child(8) {
|
||||
width: 80px;
|
||||
width: 90px;
|
||||
/* 规格 */
|
||||
}
|
||||
|
||||
.waybill-table th:nth-child(9),
|
||||
.waybill-table td:nth-child(9) {
|
||||
width: 40px;
|
||||
width: 80px;
|
||||
/* 材质 */
|
||||
}
|
||||
|
||||
.waybill-table th:nth-child(10),
|
||||
/* 数量(件) */
|
||||
/* .waybill-table th:nth-child(10),
|
||||
.waybill-table td:nth-child(10) {
|
||||
width: 60px;
|
||||
/* 数量(件) */
|
||||
|
||||
} */
|
||||
|
||||
/* 重量(kg) */
|
||||
.waybill-table th:nth-child(10),
|
||||
.waybill-table td:nth-child(10) {
|
||||
width: 70px;
|
||||
|
||||
}
|
||||
|
||||
/* 单价 */
|
||||
.waybill-table th:nth-child(11),
|
||||
.waybill-table td:nth-child(11) {
|
||||
width: 80px;
|
||||
/* 重量(kg) */
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
/* 备注 */
|
||||
.waybill-table th:nth-child(12),
|
||||
.waybill-table td:nth-child(12) {
|
||||
width: 40px;
|
||||
/* 单价 */
|
||||
/* width: 40px; */
|
||||
}
|
||||
|
||||
|
||||
@@ -623,10 +667,10 @@ export default {
|
||||
border: none;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
/* font-family: inherit; */
|
||||
font-size: 16px;
|
||||
line-height: 6mm;
|
||||
text-align: inherit;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
@@ -645,7 +689,7 @@ export default {
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
line-height: 6mm !important;
|
||||
height: 6mm !important;
|
||||
height: 6mm;
|
||||
vertical-align: middle !important;
|
||||
}
|
||||
|
||||
@@ -695,8 +739,10 @@ export default {
|
||||
/* 备注样式 */
|
||||
.waybill-remarks {
|
||||
margin-bottom: 30px;
|
||||
font-size: 14px;
|
||||
font-size: 18px;
|
||||
line-height: 1.5;
|
||||
/* font-weight: 600; */
|
||||
font-weight: bold;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
@@ -710,20 +756,23 @@ export default {
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
font-size: 16px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.waybill-pickup-location {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
font-size: 16px;
|
||||
margin-bottom: 10px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.waybill-pickup-location label {
|
||||
font-size: 14px;
|
||||
margin-right: 10px;
|
||||
font-size: 18px;
|
||||
/* margin-right: 10px; */
|
||||
text-align: left !important;
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
@@ -742,7 +791,7 @@ export default {
|
||||
}
|
||||
|
||||
.footer-item .label {
|
||||
font-size: 14px;
|
||||
font-size: 18px;
|
||||
margin-right: 10px;
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
229
klp-ui/src/views/wms/report/zha_.vue
Normal file
229
klp-ui/src/views/wms/report/zha_.vue
Normal file
@@ -0,0 +1,229 @@
|
||||
<template>
|
||||
<div class="app-container" v-loading="loading">
|
||||
<el-row>
|
||||
<el-form label-width="80px" inline>
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<el-date-picker style="width: 200px;" v-model="queryParams.byCreateTimeStart" type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择开始时间"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束时间" prop="endTime">
|
||||
<el-date-picker style="width: 200px;" v-model="queryParams.byCreateTimeEnd" type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择结束时间"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="入场钢卷号" prop="endTime">
|
||||
<el-input style="width: 200px; display: inline-block;" v-model="queryParams.enterCoilNo"
|
||||
placeholder="请输入入场钢卷号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="当前钢卷号" prop="endTime">
|
||||
<el-input style="width: 200px;" v-model="queryParams.currentCoilNo" placeholder="请输入当前钢卷号" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="逻辑库位" prop="endTime">
|
||||
<warehouse-select v-model="queryParams.warehouseId" placeholder="请选择仓库/库区/库位"
|
||||
style="width: 100%; display: inline-block; width: 200px;" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="产品名称" prop="endTime">
|
||||
<el-input style="width: 200px;" v-model="queryParams.itemName" placeholder="请输入产品名称" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="规格" prop="endTime">
|
||||
<memo-input style="width: 200px;" v-model="queryParams.itemSpecification" storageKey="coilSpec"
|
||||
placeholder="请选择规格" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="材质" prop="endTime">
|
||||
<muti-select style="width: 200px;" v-model="queryParams.itemMaterial" :options="dict.type.coil_material"
|
||||
placeholder="请选择材质" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="厂家" prop="endTime">
|
||||
<muti-select style="width: 200px;" v-model="queryParams.itemManufacturer"
|
||||
:options="dict.type.coil_manufacturer" placeholder="请选择厂家" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="收货计划" prop="planId">
|
||||
<el-select style="width: 200px;" v-model="queryParams.planId" placeholder="请输入计划名称搜索收货计划" filterable remote
|
||||
:remote-method="remoteMethod">
|
||||
<el-option v-for="item in planList" :key="item.planId" :label="item.planName" :value="item.planId" />
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item prop="endTime">
|
||||
<el-button type="primary" @click="getList">查询</el-button>
|
||||
<el-button type="primary" @click="exportData">导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
<el-descriptions title="统计信息" :column="3" border>
|
||||
<el-descriptions-item label="总钢卷数量">{{ summary.totalCount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="总重">{{ summary.totalWeight }}t</el-descriptions-item>
|
||||
<el-descriptions-item label="均重">{{ summary.avgWeight }}t</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions title="明细信息" :column="3" border>
|
||||
</el-descriptions>
|
||||
<el-table :data="list" border height="calc(100vh - 320px)">
|
||||
<el-table-column label="入场钢卷号" align="center" prop="enterCoilNo">
|
||||
<template slot-scope="scope">
|
||||
<coil-no :coil-no="scope.row.enterCoilNo"></coil-no>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前钢卷号" align="center" prop="currentCoilNo">
|
||||
<template slot-scope="scope">
|
||||
<coil-no :coil-no="scope.row.currentCoilNo"></coil-no>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||
<el-table-column label="逻辑库位" align="center" prop="warehouseName" />
|
||||
<!-- <el-table-column label="实际库区" align="center" prop="actualWarehouseName" /> -->
|
||||
<el-table-column label="产品类型" align="center" width="250">
|
||||
<template slot-scope="scope">
|
||||
<ProductInfo v-if="scope.row.itemType == 'product'" :product="scope.row.product" />
|
||||
<RawMaterialInfo v-else-if="scope.row.itemType === 'raw_material'" :material="scope.row.rawMaterial" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="重量 (吨)" align="center" prop="netWeight" />
|
||||
<el-table-column label="长度 (米)" align="center" prop="length" />
|
||||
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="出库状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.status === 0 ? '在库' : '已出库' }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="更新人" align="center" prop="updateByName" />
|
||||
<el-table-column label="更新时间" align="center" prop="updateTime" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listCoilWithIds } from "@/api/wms/coil";
|
||||
import {
|
||||
listPendingAction,
|
||||
} from '@/api/wms/pendingAction';
|
||||
import ProductInfo from "@/components/KLPService/Renderer/ProductInfo";
|
||||
import RawMaterialInfo from "@/components/KLPService/Renderer/RawMaterialInfo";
|
||||
import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue";
|
||||
import MemoInput from "@/components/MemoInput";
|
||||
import MutiSelect from "@/components/MutiSelect";
|
||||
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
||||
import { listDeliveryPlan } from '@/api/wms/deliveryPlan'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ProductInfo,
|
||||
RawMaterialInfo,
|
||||
CoilNo,
|
||||
MemoInput,
|
||||
MutiSelect,
|
||||
WarehouseSelect,
|
||||
},
|
||||
dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer'],
|
||||
data() {
|
||||
// 工具函数:个位数补零,保证格式统一(比如 9 → 09,5 → 05)
|
||||
const addZero = (num) => num.toString().padStart(2, '0')
|
||||
|
||||
const now = new Date() // 当前本地北京时间
|
||||
// 核心:获取【昨天】的日期对象(自动处理跨月/跨年,无边界问题)
|
||||
const yesterday = new Date(now)
|
||||
yesterday.setDate(yesterday.getDate() - 1)
|
||||
|
||||
// 昨天的年、月、日(补零格式化)
|
||||
const yesYear = yesterday.getFullYear()
|
||||
const yesMonth = addZero(yesterday.getMonth() + 1)
|
||||
const yesDay = addZero(yesterday.getDate())
|
||||
|
||||
// 今天的年、月、日(补零格式化)
|
||||
const nowYear = now.getFullYear()
|
||||
const nowMonth = addZero(now.getMonth() + 1)
|
||||
const nowDay = addZero(now.getDate())
|
||||
|
||||
// ✅ 目标时间区间:昨天早上6点 至 今天早上6点
|
||||
const startTime = `${yesYear}-${yesMonth}-${yesDay} 07:00:00`
|
||||
const endTime = `${nowYear}-${nowMonth}-${nowDay} 07:00:00`
|
||||
return {
|
||||
list: [],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 9999,
|
||||
// status: 1,
|
||||
byCreateTimeStart: startTime,
|
||||
byCreateTimeEnd: endTime,
|
||||
selectType: 'raw_material',
|
||||
enterCoilNo: '',
|
||||
currentCoilNo: '',
|
||||
warehouseId: '',
|
||||
productName: '',
|
||||
itemSpecification: '',
|
||||
itemMaterial: '',
|
||||
itemManufacturer: '',
|
||||
planId: '',
|
||||
},
|
||||
planList: [],
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
summary() {
|
||||
// 总钢卷数量、总重、均重
|
||||
const totalCount = this.list.length
|
||||
const totalWeight = this.list.reduce((acc, cur) => acc + parseFloat(cur.netWeight), 0)
|
||||
const avgWeight = totalCount > 0 ? (totalWeight / totalCount).toFixed(2) : 0
|
||||
return {
|
||||
totalCount,
|
||||
totalWeight: totalWeight.toFixed(2),
|
||||
avgWeight,
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
remoteMethod(query) {
|
||||
listDeliveryPlan({ planName: query, pageNum: 1, pageSize: 5, planType: 1 }).then(res => {
|
||||
this.planList = res.rows
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
this.loading = true
|
||||
listPendingAction({
|
||||
// actionStatus: 2,
|
||||
warehouseId: this.queryParams.planId,
|
||||
// actionType: 401,
|
||||
actionType: 11, // 酸轧工序
|
||||
pageSize: 999,
|
||||
pageNum: 1,
|
||||
startTime: this.queryParams.byCreateTimeStart,
|
||||
endTime: this.queryParams.byCreateTimeEnd,
|
||||
}).then(res => {
|
||||
const actions = res.rows
|
||||
const coilIds = actions.map(item => item.coilId).join(',')
|
||||
console.log(coilIds)
|
||||
if (!coilIds) {
|
||||
this.$message({
|
||||
message: '暂无数据',
|
||||
type: 'warning',
|
||||
})
|
||||
this.list = []
|
||||
this.loading = false
|
||||
return
|
||||
}
|
||||
listCoilWithIds({
|
||||
...this.queryParams,
|
||||
coilIds: coilIds,
|
||||
}).then(res => {
|
||||
this.list = res.rows
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
// 导出
|
||||
exportData() {
|
||||
this.download('wms/materialCoil/export', {
|
||||
coilIds: this.list.map(item => item.coilId).join(',')
|
||||
}, `materialCoil_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.remoteMethod('')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
229
klp-ui/src/views/wms/report/zinc_.vue
Normal file
229
klp-ui/src/views/wms/report/zinc_.vue
Normal file
@@ -0,0 +1,229 @@
|
||||
<template>
|
||||
<div class="app-container" v-loading="loading">
|
||||
<el-row>
|
||||
<el-form label-width="80px" inline>
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<el-date-picker style="width: 200px;" v-model="queryParams.byCreateTimeStart" type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择开始时间"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束时间" prop="endTime">
|
||||
<el-date-picker style="width: 200px;" v-model="queryParams.byCreateTimeEnd" type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择结束时间"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="入场钢卷号" prop="endTime">
|
||||
<el-input style="width: 200px; display: inline-block;" v-model="queryParams.enterCoilNo"
|
||||
placeholder="请输入入场钢卷号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="当前钢卷号" prop="endTime">
|
||||
<el-input style="width: 200px;" v-model="queryParams.currentCoilNo" placeholder="请输入当前钢卷号" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="逻辑库位" prop="endTime">
|
||||
<warehouse-select v-model="queryParams.warehouseId" placeholder="请选择仓库/库区/库位"
|
||||
style="width: 100%; display: inline-block; width: 200px;" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="产品名称" prop="endTime">
|
||||
<el-input style="width: 200px;" v-model="queryParams.itemName" placeholder="请输入产品名称" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="规格" prop="endTime">
|
||||
<memo-input style="width: 200px;" v-model="queryParams.itemSpecification" storageKey="coilSpec"
|
||||
placeholder="请选择规格" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="材质" prop="endTime">
|
||||
<muti-select style="width: 200px;" v-model="queryParams.itemMaterial" :options="dict.type.coil_material"
|
||||
placeholder="请选择材质" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="厂家" prop="endTime">
|
||||
<muti-select style="width: 200px;" v-model="queryParams.itemManufacturer"
|
||||
:options="dict.type.coil_manufacturer" placeholder="请选择厂家" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="收货计划" prop="planId">
|
||||
<el-select style="width: 200px;" v-model="queryParams.planId" placeholder="请输入计划名称搜索收货计划" filterable remote
|
||||
:remote-method="remoteMethod">
|
||||
<el-option v-for="item in planList" :key="item.planId" :label="item.planName" :value="item.planId" />
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item prop="endTime">
|
||||
<el-button type="primary" @click="getList">查询</el-button>
|
||||
<el-button type="primary" @click="exportData">导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
<el-descriptions title="统计信息" :column="3" border>
|
||||
<el-descriptions-item label="总钢卷数量">{{ summary.totalCount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="总重">{{ summary.totalWeight }}t</el-descriptions-item>
|
||||
<el-descriptions-item label="均重">{{ summary.avgWeight }}t</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions title="明细信息" :column="3" border>
|
||||
</el-descriptions>
|
||||
<el-table :data="list" border height="calc(100vh - 320px)">
|
||||
<el-table-column label="入场钢卷号" align="center" prop="enterCoilNo">
|
||||
<template slot-scope="scope">
|
||||
<coil-no :coil-no="scope.row.enterCoilNo"></coil-no>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前钢卷号" align="center" prop="currentCoilNo">
|
||||
<template slot-scope="scope">
|
||||
<coil-no :coil-no="scope.row.currentCoilNo"></coil-no>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||
<el-table-column label="逻辑库位" align="center" prop="warehouseName" />
|
||||
<!-- <el-table-column label="实际库区" align="center" prop="actualWarehouseName" /> -->
|
||||
<el-table-column label="产品类型" align="center" width="250">
|
||||
<template slot-scope="scope">
|
||||
<ProductInfo v-if="scope.row.itemType == 'product'" :product="scope.row.product" />
|
||||
<RawMaterialInfo v-else-if="scope.row.itemType === 'raw_material'" :material="scope.row.rawMaterial" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="重量 (吨)" align="center" prop="netWeight" />
|
||||
<el-table-column label="长度 (米)" align="center" prop="length" />
|
||||
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="出库状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.status === 0 ? '在库' : '已出库' }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="更新人" align="center" prop="updateByName" />
|
||||
<el-table-column label="更新时间" align="center" prop="updateTime" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listCoilWithIds } from "@/api/wms/coil";
|
||||
import {
|
||||
listPendingAction,
|
||||
} from '@/api/wms/pendingAction';
|
||||
import ProductInfo from "@/components/KLPService/Renderer/ProductInfo";
|
||||
import RawMaterialInfo from "@/components/KLPService/Renderer/RawMaterialInfo";
|
||||
import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue";
|
||||
import MemoInput from "@/components/MemoInput";
|
||||
import MutiSelect from "@/components/MutiSelect";
|
||||
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
||||
import { listDeliveryPlan } from '@/api/wms/deliveryPlan'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ProductInfo,
|
||||
RawMaterialInfo,
|
||||
CoilNo,
|
||||
MemoInput,
|
||||
MutiSelect,
|
||||
WarehouseSelect,
|
||||
},
|
||||
dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer'],
|
||||
data() {
|
||||
// 工具函数:个位数补零,保证格式统一(比如 9 → 09,5 → 05)
|
||||
const addZero = (num) => num.toString().padStart(2, '0')
|
||||
|
||||
const now = new Date() // 当前本地北京时间
|
||||
// 核心:获取【昨天】的日期对象(自动处理跨月/跨年,无边界问题)
|
||||
const yesterday = new Date(now)
|
||||
yesterday.setDate(yesterday.getDate() - 1)
|
||||
|
||||
// 昨天的年、月、日(补零格式化)
|
||||
const yesYear = yesterday.getFullYear()
|
||||
const yesMonth = addZero(yesterday.getMonth() + 1)
|
||||
const yesDay = addZero(yesterday.getDate())
|
||||
|
||||
// 今天的年、月、日(补零格式化)
|
||||
const nowYear = now.getFullYear()
|
||||
const nowMonth = addZero(now.getMonth() + 1)
|
||||
const nowDay = addZero(now.getDate())
|
||||
|
||||
// ✅ 目标时间区间:昨天早上6点 至 今天早上6点
|
||||
const startTime = `${yesYear}-${yesMonth}-${yesDay} 07:00:00`
|
||||
const endTime = `${nowYear}-${nowMonth}-${nowDay} 07:00:00`
|
||||
return {
|
||||
list: [],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 9999,
|
||||
// status: 1,
|
||||
byCreateTimeStart: startTime,
|
||||
byCreateTimeEnd: endTime,
|
||||
selectType: 'raw_material',
|
||||
enterCoilNo: '',
|
||||
currentCoilNo: '',
|
||||
warehouseId: '',
|
||||
productName: '',
|
||||
itemSpecification: '',
|
||||
itemMaterial: '',
|
||||
itemManufacturer: '',
|
||||
planId: '',
|
||||
},
|
||||
planList: [],
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
summary() {
|
||||
// 总钢卷数量、总重、均重
|
||||
const totalCount = this.list.length
|
||||
const totalWeight = this.list.reduce((acc, cur) => acc + parseFloat(cur.netWeight), 0)
|
||||
const avgWeight = totalCount > 0 ? (totalWeight / totalCount).toFixed(2) : 0
|
||||
return {
|
||||
totalCount,
|
||||
totalWeight: totalWeight.toFixed(2),
|
||||
avgWeight,
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
remoteMethod(query) {
|
||||
listDeliveryPlan({ planName: query, pageNum: 1, pageSize: 5, planType: 1 }).then(res => {
|
||||
this.planList = res.rows
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
this.loading = true
|
||||
listPendingAction({
|
||||
// actionStatus: 2,
|
||||
warehouseId: this.queryParams.planId,
|
||||
// actionType: 401,
|
||||
actionType: 501, // 镀锌工序
|
||||
pageSize: 999,
|
||||
pageNum: 1,
|
||||
startTime: this.queryParams.byCreateTimeStart,
|
||||
endTime: this.queryParams.byCreateTimeEnd,
|
||||
}).then(res => {
|
||||
const actions = res.rows
|
||||
const coilIds = actions.map(item => item.coilId).join(',')
|
||||
console.log(coilIds)
|
||||
if (!coilIds) {
|
||||
this.$message({
|
||||
message: '暂无数据',
|
||||
type: 'warning',
|
||||
})
|
||||
this.list = []
|
||||
this.loading = false
|
||||
return
|
||||
}
|
||||
listCoilWithIds({
|
||||
...this.queryParams,
|
||||
coilIds: coilIds,
|
||||
}).then(res => {
|
||||
this.list = res.rows
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
// 导出
|
||||
exportData() {
|
||||
this.download('wms/materialCoil/export', {
|
||||
coilIds: this.list.map(item => item.coilId).join(',')
|
||||
}, `materialCoil_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.remoteMethod('')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
@@ -38,6 +38,12 @@ public class WmsDeliveryWaybill extends BaseEntity {
|
||||
* 关联发货计划ID
|
||||
*/
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 关联订单ID(关联crm_order.order_id)
|
||||
*/
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 车牌(支持新能源车牌)
|
||||
*/
|
||||
|
||||
@@ -41,6 +41,11 @@ public class WmsDeliveryWaybillBo extends BaseEntity {
|
||||
*/
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 关联订单ID(关联crm_order.order_id)
|
||||
*/
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 车牌(支持新能源车牌)
|
||||
*/
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@@ -15,7 +16,7 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class WmsDeliveryPlanDetailVo {
|
||||
public class WmsDeliveryPlanDetailVo extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@@ -47,6 +47,21 @@ public class WmsDeliveryWaybillVo extends BaseEntity {
|
||||
@ExcelProperty(value = "关联发货计划ID")
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 关联订单ID(关联crm_order.order_id)
|
||||
*/
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderCode;
|
||||
|
||||
/**
|
||||
* 合同号
|
||||
*/
|
||||
private String contractCode;
|
||||
|
||||
/**
|
||||
* 车牌(支持新能源车牌)
|
||||
*/
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
package com.klp.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.klp.domain.WmsDeliveryWaybill;
|
||||
import com.klp.domain.vo.WmsDeliveryWaybillVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 发货单主Mapper接口
|
||||
@@ -12,4 +17,7 @@ import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
*/
|
||||
public interface WmsDeliveryWaybillMapper extends BaseMapperPlus<WmsDeliveryWaybillMapper, WmsDeliveryWaybill, WmsDeliveryWaybillVo> {
|
||||
|
||||
Page<WmsDeliveryWaybillVo> selectVoPagePlus(Page<Object> build,@Param("ew") QueryWrapper<WmsDeliveryWaybill> lqw);
|
||||
|
||||
List<WmsDeliveryWaybillVo> selectVoListPlus(@Param("ew") QueryWrapper<WmsDeliveryWaybill> lqw);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.klp.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
@@ -49,8 +50,8 @@ public class WmsDeliveryWaybillServiceImpl implements IWmsDeliveryWaybillService
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<WmsDeliveryWaybillVo> queryPageList(WmsDeliveryWaybillBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<WmsDeliveryWaybill> lqw = buildQueryWrapper(bo);
|
||||
Page<WmsDeliveryWaybillVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
QueryWrapper<WmsDeliveryWaybill> lqw = buildQueryWrapperPlus(bo);
|
||||
Page<WmsDeliveryWaybillVo> result = baseMapper.selectVoPagePlus(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@@ -59,8 +60,29 @@ public class WmsDeliveryWaybillServiceImpl implements IWmsDeliveryWaybillService
|
||||
*/
|
||||
@Override
|
||||
public List<WmsDeliveryWaybillVo> queryList(WmsDeliveryWaybillBo bo) {
|
||||
LambdaQueryWrapper<WmsDeliveryWaybill> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper<WmsDeliveryWaybill> lqw = buildQueryWrapperPlus(bo);
|
||||
return baseMapper.selectVoListPlus(lqw);
|
||||
}
|
||||
|
||||
private com.baomidou.mybatisplus.core.conditions.query.QueryWrapper<WmsDeliveryWaybill> buildQueryWrapperPlus(WmsDeliveryWaybillBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper<WmsDeliveryWaybill> qw = Wrappers.query();
|
||||
qw.eq(StringUtils.isNotBlank(bo.getWaybillNo()), "wd.waybill_no", bo.getWaybillNo());
|
||||
qw.like(StringUtils.isNotBlank(bo.getWaybillName()), "wd.waybill_name", bo.getWaybillName());
|
||||
qw.eq(bo.getPlanId() != null, "wd.plan_id", bo.getPlanId());
|
||||
qw.eq(bo.getOrderId() != null, "wd.order_id", bo.getOrderId());
|
||||
qw.eq(StringUtils.isNotBlank(bo.getLicensePlate()), "wd.license_plate", bo.getLicensePlate());
|
||||
qw.eq(StringUtils.isNotBlank(bo.getConsigneeUnit()), "wd.consignee_unit", bo.getConsigneeUnit());
|
||||
qw.eq(StringUtils.isNotBlank(bo.getSenderUnit()), "wd.sender_unit", bo.getSenderUnit());
|
||||
qw.eq(bo.getDeliveryTime() != null, "wd.delivery_time", bo.getDeliveryTime());
|
||||
qw.eq(StringUtils.isNotBlank(bo.getWeighbridge()), "wd.weighbridge", bo.getWeighbridge());
|
||||
qw.eq(StringUtils.isNotBlank(bo.getSalesPerson()), "wd.sales_person", bo.getSalesPerson());
|
||||
qw.eq(StringUtils.isNotBlank(bo.getPrincipal()), "wd.principal", bo.getPrincipal());
|
||||
qw.eq(StringUtils.isNotBlank(bo.getPrincipalPhone()), "wd.principal_phone", bo.getPrincipalPhone());
|
||||
qw.eq(bo.getStatus() != null, "wd.status", bo.getStatus());
|
||||
// 逻辑删除
|
||||
qw.eq("wd.del_flag", 0);
|
||||
return qw;
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<WmsDeliveryWaybill> buildQueryWrapper(WmsDeliveryWaybillBo bo) {
|
||||
@@ -78,6 +100,7 @@ public class WmsDeliveryWaybillServiceImpl implements IWmsDeliveryWaybillService
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPrincipal()), WmsDeliveryWaybill::getPrincipal, bo.getPrincipal());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPrincipalPhone()), WmsDeliveryWaybill::getPrincipalPhone, bo.getPrincipalPhone());
|
||||
lqw.eq(bo.getStatus() != null, WmsDeliveryWaybill::getStatus, bo.getStatus());
|
||||
lqw.eq(bo.getOrderId() != null, WmsDeliveryWaybill::getOrderId, bo.getOrderId());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
|
||||
@@ -401,6 +401,8 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
qw.eq(StringUtils.isNotBlank(bo.getItemType()), "mc.item_type", bo.getItemType());
|
||||
qw.eq(StringUtils.isNotBlank(bo.getCreateBy()), "mc.create_by", bo.getCreateBy());
|
||||
qw.eq(StringUtils.isNotBlank(bo.getUpdateBy()), "mc.update_by", bo.getUpdateBy());
|
||||
//逻辑删除
|
||||
qw.eq("mc.del_flag", 0);
|
||||
// 切边要求
|
||||
qw.eq(StringUtils.isNotBlank(bo.getTrimmingRequirement()), "mc.trimming_requirement", bo.getTrimmingRequirement());
|
||||
// 打包状态
|
||||
@@ -582,8 +584,6 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
// "WHERE dp.del_flag = 0 AND dp.coil IS NOT NULL AND dp.coil <> '' " +
|
||||
// "AND FIND_IN_SET(CAST(mc.coil_id AS CHAR), dp.coil))");
|
||||
// }
|
||||
//逻辑删除
|
||||
qw.eq("mc.del_flag", 0);
|
||||
//把team字段作为筛选条件
|
||||
qw.eq(StringUtils.isNotBlank(bo.getTeam()), "mc.team", bo.getTeam());
|
||||
//根据开始时间和结束时间筛选修改时间
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<result property="waybillNo" column="waybill_no"/>
|
||||
<result property="waybillName" column="waybill_name"/>
|
||||
<result property="planId" column="plan_id"/>
|
||||
<result property="orderId" column="order_id"/>
|
||||
<result property="licensePlate" column="license_plate"/>
|
||||
<result property="consigneeUnit" column="consignee_unit"/>
|
||||
<result property="senderUnit" column="sender_unit"/>
|
||||
@@ -26,5 +27,84 @@
|
||||
<result property="updateBy" column="update_by"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.klp.domain.vo.WmsDeliveryWaybillVo" id="WmsDeliveryWaybillVoResult">
|
||||
<result property="waybillId" column="waybill_id"/>
|
||||
<result property="waybillNo" column="waybill_no"/>
|
||||
<result property="waybillName" column="waybill_name"/>
|
||||
<result property="planId" column="plan_id"/>
|
||||
<result property="orderId" column="order_id"/>
|
||||
<result property="orderCode" column="order_code"/>
|
||||
<result property="contractCode" column="contract_code"/>
|
||||
<result property="licensePlate" column="license_plate"/>
|
||||
<result property="consigneeUnit" column="consignee_unit"/>
|
||||
<result property="senderUnit" column="sender_unit"/>
|
||||
<result property="deliveryTime" column="delivery_time"/>
|
||||
<result property="weighbridge" column="weighbridge"/>
|
||||
<result property="salesPerson" column="sales_person"/>
|
||||
<result property="principal" column="principal"/>
|
||||
<result property="principalPhone" column="principal_phone"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectVoPagePlus" resultMap="WmsDeliveryWaybillVoResult">
|
||||
SELECT
|
||||
wd.waybill_id AS waybill_id,
|
||||
wd.waybill_no AS waybill_no,
|
||||
wd.waybill_name AS waybill_name,
|
||||
wd.plan_id AS plan_id,
|
||||
wd.order_id AS order_id,
|
||||
co.order_code AS order_code,
|
||||
co.contract_code AS contract_code,
|
||||
wd.license_plate AS license_plate,
|
||||
wd.consignee_unit AS consignee_unit,
|
||||
wd.sender_unit AS sender_unit,
|
||||
wd.delivery_time AS delivery_time,
|
||||
wd.weighbridge AS weighbridge,
|
||||
wd.sales_person AS sales_person,
|
||||
wd.principal AS principal,
|
||||
wd.principal_phone AS principal_phone,
|
||||
wd.status AS status,
|
||||
wd.remark AS remark,
|
||||
wd.create_time AS create_time,
|
||||
wd.create_by AS create_by,
|
||||
wd.update_time AS update_time,
|
||||
wd.update_by AS update_by
|
||||
FROM wms_delivery_waybill wd
|
||||
LEFT JOIN crm_order co ON wd.order_id = co.order_id and co.del_flag = 0
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<select id="selectVoListPlus" resultMap="WmsDeliveryWaybillVoResult">
|
||||
SELECT
|
||||
wd.waybill_id AS waybill_id,
|
||||
wd.waybill_no AS waybill_no,
|
||||
wd.waybill_name AS waybill_name,
|
||||
wd.plan_id AS plan_id,
|
||||
wd.order_id AS order_id,
|
||||
co.order_code AS order_code,
|
||||
co.contract_code AS contract_code,
|
||||
wd.license_plate AS license_plate,
|
||||
wd.consignee_unit AS consignee_unit,
|
||||
wd.sender_unit AS sender_unit,
|
||||
wd.delivery_time AS delivery_time,
|
||||
wd.weighbridge AS weighbridge,
|
||||
wd.sales_person AS sales_person,
|
||||
wd.principal AS principal,
|
||||
wd.principal_phone AS principal_phone,
|
||||
wd.status AS status,
|
||||
wd.remark AS remark,
|
||||
wd.create_time AS create_time,
|
||||
wd.create_by AS create_by,
|
||||
wd.update_time AS update_time,
|
||||
wd.update_by AS update_by
|
||||
FROM wms_delivery_waybill wd
|
||||
LEFT JOIN crm_order co ON wd.order_id = co.order_id and co.del_flag = 0
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user