Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -307,6 +307,18 @@
|
||||
<version>5.23</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||
<version>1.2.12</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>eu.bitwalker</groupId>
|
||||
<artifactId>UserAgentUtils</artifactId>
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package org.nl.wms.pdm.subpackage.controller;
|
||||
|
||||
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.nl.wms.pdm.subpackage.service.IPdmBiSubpackagerelationService;
|
||||
import org.nl.wms.pdm.subpackage.service.dto.SubPackageQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 子卷包装关系表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-11-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/pdmBiSubpackagerelation")
|
||||
public class PdmBiSubpackagerelationController {
|
||||
|
||||
@Autowired
|
||||
private IPdmBiSubpackagerelationService iPdmBiSubpackagerelationService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询子卷包装关系")
|
||||
public ResponseEntity<Object> query(SubPackageQuery query, PageQuery page){
|
||||
return new ResponseEntity<>(iPdmBiSubpackagerelationService.pageQuery(query,page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.nl.wms.pdm.subpackage.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.pdm.subpackage.service.dao.PdmBiSubpackagerelation;
|
||||
import org.nl.wms.pdm.subpackage.service.dto.SubPackageQuery;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 子卷包装关系表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-11-14
|
||||
*/
|
||||
public interface IPdmBiSubpackagerelationService extends IService<PdmBiSubpackagerelation> {
|
||||
|
||||
/**
|
||||
* @param query /
|
||||
* @param page /
|
||||
* @return /
|
||||
*/
|
||||
Object pageQuery(SubPackageQuery query, PageQuery page);
|
||||
}
|
||||
@@ -0,0 +1,256 @@
|
||||
package org.nl.wms.pdm.subpackage.service.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 子卷包装关系表
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-11-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("pdm_bi_subpackagerelation")
|
||||
public class PdmBiSubpackagerelation implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 子卷包装标识
|
||||
*/
|
||||
private String workorder_id;
|
||||
|
||||
/**
|
||||
* 木箱唯一码
|
||||
*/
|
||||
private String package_box_sn;
|
||||
|
||||
/**
|
||||
* 箱内子卷数量
|
||||
*/
|
||||
private BigDecimal quanlity_in_box;
|
||||
|
||||
/**
|
||||
* 木箱自身重量
|
||||
*/
|
||||
private BigDecimal box_weight;
|
||||
|
||||
/**
|
||||
* 保质期
|
||||
*/
|
||||
private String quality_guaran_period;
|
||||
|
||||
/**
|
||||
* 销售订单及行号
|
||||
*/
|
||||
private String sale_order_name;
|
||||
|
||||
/**
|
||||
* 客户编号
|
||||
*/
|
||||
private String customer_name;
|
||||
|
||||
/**
|
||||
* 客户名称
|
||||
*/
|
||||
private String customer_description;
|
||||
|
||||
/**
|
||||
* 产品编码
|
||||
*/
|
||||
private String product_name;
|
||||
|
||||
/**
|
||||
* 产品描述
|
||||
*/
|
||||
private String product_description;
|
||||
|
||||
/**
|
||||
* 入库日期
|
||||
*/
|
||||
private String date_of_FG_inbound;
|
||||
|
||||
/**
|
||||
* 子卷号
|
||||
*/
|
||||
private String container_name;
|
||||
|
||||
/**
|
||||
* 产品规格(幅宽)
|
||||
*/
|
||||
private String width;
|
||||
|
||||
/**
|
||||
* 产品厚度
|
||||
*/
|
||||
private String thickness;
|
||||
|
||||
/**
|
||||
* 单位面积质量
|
||||
*/
|
||||
private BigDecimal mass_per_unit_area;
|
||||
|
||||
/**
|
||||
* 净重
|
||||
*/
|
||||
private BigDecimal net_weight;
|
||||
|
||||
/**
|
||||
* 长度
|
||||
*/
|
||||
private BigDecimal length;
|
||||
|
||||
/**
|
||||
* 制造完成日期
|
||||
*/
|
||||
private String date_of_production;
|
||||
|
||||
/**
|
||||
* 计划外分切的子卷
|
||||
*/
|
||||
private Boolean is_un_plan_production;
|
||||
|
||||
/**
|
||||
* 子卷的物性值1
|
||||
*/
|
||||
private String un_plan_product_property1;
|
||||
|
||||
/**
|
||||
* 子卷的物性值2
|
||||
*/
|
||||
private String un_plan_product_property2;
|
||||
|
||||
/**
|
||||
* 子卷的物性值3
|
||||
*/
|
||||
private String un_plan_product_property3;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String create_id;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String create_name;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String create_time;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 是否需要重打外包装标签
|
||||
*/
|
||||
private Boolean isRePrintPackageBoxLabel;
|
||||
|
||||
/**
|
||||
* 是否需要拆包重打子卷标签
|
||||
*/
|
||||
private Boolean isUnPackBox;
|
||||
|
||||
/**
|
||||
* 木箱料号
|
||||
*/
|
||||
private String box_type;
|
||||
|
||||
/**
|
||||
* SAP批次
|
||||
*/
|
||||
private String sap_pcsn;
|
||||
|
||||
/**
|
||||
* 交货单号
|
||||
*/
|
||||
private String vbeln;
|
||||
|
||||
/**
|
||||
* 交货单行号
|
||||
*/
|
||||
private String posnr;
|
||||
|
||||
/**
|
||||
* 木箱长度
|
||||
*/
|
||||
private String box_length;
|
||||
|
||||
/**
|
||||
* 木箱宽度
|
||||
*/
|
||||
private String box_width;
|
||||
|
||||
/**
|
||||
* 木箱高度
|
||||
*/
|
||||
private String box_high;
|
||||
|
||||
/**
|
||||
* 销售订单描述
|
||||
*/
|
||||
private String sale_order_description;
|
||||
|
||||
/**
|
||||
* 客户要求规格幅宽
|
||||
*/
|
||||
private String width_standard;
|
||||
|
||||
/**
|
||||
* 物料标准厚度
|
||||
*/
|
||||
private String thickness_request;
|
||||
|
||||
/**
|
||||
* 实际木箱自身重量
|
||||
*/
|
||||
private BigDecimal real_weight;
|
||||
|
||||
/**
|
||||
* 包装关系类型
|
||||
*/
|
||||
private String sub_type;
|
||||
|
||||
/**
|
||||
* 客户需求抗拉下限
|
||||
*/
|
||||
private String demand_limit;
|
||||
|
||||
/**
|
||||
* 内控标准抗拉下限
|
||||
*/
|
||||
private String standard_limit;
|
||||
|
||||
/**
|
||||
* 生产实际抗拉值
|
||||
*/
|
||||
private String actual_value;
|
||||
|
||||
/**
|
||||
* 解绑删除标识
|
||||
*/
|
||||
private Boolean need_delete;
|
||||
|
||||
/**
|
||||
* 储存地点
|
||||
*/
|
||||
private String ext_code;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package org.nl.wms.pdm.subpackage.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.pdm.subpackage.service.dao.PdmBiSubpackagerelation;
|
||||
import org.nl.wms.pdm.subpackage.service.dto.SubPackageQuery;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 子卷包装关系表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-11-14
|
||||
*/
|
||||
public interface PdmBiSubpackagerelationMapper extends BaseMapper<PdmBiSubpackagerelation> {
|
||||
|
||||
List<Map> getPageQuery(@Param("query") SubPackageQuery query, @Param("pageQuery") PageQuery pageQuery);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?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="org.nl.wms.pdm.subpackage.service.dao.mapper.PdmBiSubpackagerelationMapper">
|
||||
|
||||
<select id="getPageQuery" resultType="java.util.Map">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
pdm_bi_subpackagerelation
|
||||
<where>
|
||||
1 = 1
|
||||
|
||||
<if test="query.start_time != null">
|
||||
and create_time >= #{query.start_time}
|
||||
</if>
|
||||
|
||||
<if test="query.end_time != null">
|
||||
and #{query.end_time} >= create_time
|
||||
</if>
|
||||
|
||||
<if test="query.status != null and query.status != ''">
|
||||
and status = #{query.status}
|
||||
</if>
|
||||
|
||||
<if test="query.package_box_sn != null and query.package_box_sn != ''">
|
||||
and package_box_sn LIKE '%${query.package_box_sn}%'
|
||||
</if>
|
||||
|
||||
<if test="query.container_name != null and query.container_name != ''">
|
||||
and container_name LIKE '%${query.container_name}%'
|
||||
</if>
|
||||
|
||||
<if test="query.sap_pcsn != null and query.sap_pcsn != ''">
|
||||
and sap_pcsn LIKE '%${query.sap_pcsn}%'
|
||||
</if>
|
||||
|
||||
<if test="query.customer_name != null and query.customer_name != ''">
|
||||
and customer_name LIKE '%${query.customer_name}%'
|
||||
</if>
|
||||
|
||||
<if test="query.sale_order_name != null and query.sale_order_name != ''">
|
||||
and sale_order_name LIKE '%${query.sale_order_name}%'
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,36 @@
|
||||
package org.nl.wms.pdm.subpackage.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nl.common.domain.query.BaseQuery;
|
||||
import org.nl.common.domain.query.QParam;
|
||||
import org.nl.common.enums.QueryTEnum;
|
||||
import org.nl.wms.pdm.subpackage.service.dao.PdmBiSubpackagerelation;
|
||||
|
||||
/*
|
||||
* @author LXY
|
||||
* @Date 2023/11/10 14:49
|
||||
*/
|
||||
@Data
|
||||
public class SubPackageQuery extends BaseQuery<PdmBiSubpackagerelation> {
|
||||
|
||||
|
||||
private String package_box_sn;
|
||||
|
||||
private String sale_order_name;
|
||||
|
||||
private String customer_name;
|
||||
|
||||
private String container_name;
|
||||
|
||||
private String status;
|
||||
|
||||
private String sap_pcsn;
|
||||
|
||||
|
||||
@Override
|
||||
public void paramMapping() {
|
||||
super.doP.put("package_box_sn", QParam.builder().k(new String[]{"package_box_sn"}).type(QueryTEnum.LK).build());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package org.nl.wms.pdm.subpackage.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import org.nl.common.base.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.pdm.subpackage.service.IPdmBiSubpackagerelationService;
|
||||
import org.nl.wms.pdm.subpackage.service.dao.PdmBiSubpackagerelation;
|
||||
import org.nl.wms.pdm.subpackage.service.dao.mapper.PdmBiSubpackagerelationMapper;
|
||||
import org.nl.wms.pdm.subpackage.service.dto.SubPackageQuery;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 子卷包装关系表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-11-14
|
||||
*/
|
||||
@Service
|
||||
public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpackagerelationMapper, PdmBiSubpackagerelation> implements IPdmBiSubpackagerelationService {
|
||||
|
||||
@Override
|
||||
public Object pageQuery(SubPackageQuery query, PageQuery pageQuery) {
|
||||
Page<Object> page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
page.setOrderBy("package_box_sn DESC");
|
||||
List<Map> mst_detail = this.baseMapper.getPageQuery(query, pageQuery);
|
||||
|
||||
TableDataInfo<Map> build = TableDataInfo.build(mst_detail);
|
||||
build.setTotalElements(page.getTotal());
|
||||
return build;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package org.nl.wms.storage_manage.ios.controller.iostorInv;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.nl.wms.storage_manage.ios.service.iostorInv.IStIvtIostorinvService;
|
||||
import org.nl.wms.storage_manage.ios.service.iostorInv.dto.IostorInvQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 入库单主表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-11-10
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/stIvtIostorinv/inBill")
|
||||
public class StIvtIostorinvController {
|
||||
|
||||
@Autowired
|
||||
private IStIvtIostorinvService iStIvtIostorinvService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询入库单")
|
||||
public ResponseEntity<Object> query(IostorInvQuery query, PageQuery page){
|
||||
return new ResponseEntity<>(iStIvtIostorinvService.pageQuery(query,page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/queryBoxMater")
|
||||
@Log("查询入库单")
|
||||
public ResponseEntity<Object> queryBoxMater(@RequestBody JSONObject whereJson){
|
||||
return new ResponseEntity<>(iStIvtIostorinvService.queryBoxMater(whereJson), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package org.nl.wms.storage_manage.ios.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.config.MapOf;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/*
|
||||
* @author lxy
|
||||
* @Date 2023/11/14 20:11
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum IOSEnum {
|
||||
//出入库类型
|
||||
IO_TYPE(MapOf.of("入库", "0", "出库", "1","移库", "2")),
|
||||
|
||||
//出入单据状态
|
||||
BILL_STATUS(MapOf.of("生成", "10", "提交", "20","分配中", "30","分配完","40","完成","99")),
|
||||
|
||||
//出入单创建方式
|
||||
CREATE_MODE(MapOf.of("PC产生", "10", "终端产生", "20","外部接口产生", "30")),
|
||||
|
||||
//出入任务执行状态
|
||||
WORK_STATUS(MapOf.of("未生成", "10", "生成", "20","执行中", "30","完成","99")),
|
||||
|
||||
//入库单据类型
|
||||
IN_TYPE(MapOf.of("手工入库", "99")),
|
||||
|
||||
//出库单据类型
|
||||
OUT_TYPE(MapOf.of("手工出库", "99")),
|
||||
;
|
||||
|
||||
private Map<String, String> code;
|
||||
|
||||
public String code(String desc) {
|
||||
String code = this.getCode().get(desc);
|
||||
if (StringUtils.isNotEmpty(code)) {
|
||||
return code;
|
||||
}
|
||||
throw new BadRequestException(this.name() + "对应类型" + desc + "未定义");
|
||||
}
|
||||
|
||||
public String check(String code) {
|
||||
for (Map.Entry<String, String> entry : this.getCode().entrySet()) {
|
||||
if (entry.getValue().equals("code")) {
|
||||
return entry.getValue();
|
||||
}
|
||||
}
|
||||
throw new BadRequestException(this.name() + "对应类型" + code + "未定义");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package org.nl.wms.storage_manage.ios.service.iostorInv;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinv;
|
||||
import org.nl.wms.storage_manage.ios.service.iostorInv.dto.IostorInvQuery;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 入库单主表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-11-10
|
||||
*/
|
||||
public interface IStIvtIostorinvService extends IService<StIvtIostorinv> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param query,page /
|
||||
* @return Object
|
||||
*/
|
||||
Object pageQuery(IostorInvQuery query, PageQuery page);
|
||||
|
||||
/**
|
||||
* 根据箱号查询子卷
|
||||
* @param whereJson 、
|
||||
* @return 、
|
||||
*/
|
||||
JSONArray queryBoxMater(JSONObject whereJson);
|
||||
}
|
||||
@@ -0,0 +1,345 @@
|
||||
package org.nl.wms.storage_manage.ios.service.iostorInv.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 出入库单主表
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-11-10
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("st_ivt_iostorinv")
|
||||
public class StIvtIostorinv implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 出入单标识
|
||||
*/
|
||||
@TableId
|
||||
private String iostorinv_id;
|
||||
|
||||
/**
|
||||
* 单据编号
|
||||
*/
|
||||
private String bill_code;
|
||||
|
||||
/**
|
||||
* 出入类型
|
||||
*/
|
||||
private String io_type;
|
||||
|
||||
/**
|
||||
* 业务类型
|
||||
*/
|
||||
private String buss_type;
|
||||
|
||||
/**
|
||||
* 单据类型
|
||||
*/
|
||||
private String bill_type;
|
||||
|
||||
/**
|
||||
* 业务日期
|
||||
*/
|
||||
private String biz_date;
|
||||
|
||||
/**
|
||||
* 仓库标识
|
||||
*/
|
||||
private String stor_id;
|
||||
|
||||
/**
|
||||
* 仓库编码
|
||||
*/
|
||||
private String stor_code;
|
||||
|
||||
/**
|
||||
* 仓库名称
|
||||
*/
|
||||
private String stor_name;
|
||||
|
||||
/**
|
||||
* 来源方标识
|
||||
*/
|
||||
private String source_id;
|
||||
|
||||
/**
|
||||
* 来源方名称
|
||||
*/
|
||||
private String source_name;
|
||||
|
||||
/**
|
||||
* 来源方类型
|
||||
*/
|
||||
private String source_type;
|
||||
|
||||
/**
|
||||
* 总数量
|
||||
*/
|
||||
private BigDecimal total_qty;
|
||||
|
||||
/**
|
||||
* 总重量
|
||||
*/
|
||||
private BigDecimal total_weight;
|
||||
|
||||
/**
|
||||
* 明细数
|
||||
*/
|
||||
private BigDecimal detail_count;
|
||||
|
||||
/**
|
||||
* 单据状态
|
||||
*/
|
||||
private String bill_status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 生成方式
|
||||
*/
|
||||
private String create_mode;
|
||||
|
||||
/**
|
||||
* 制单人
|
||||
*/
|
||||
private String input_optid;
|
||||
|
||||
/**
|
||||
* 制单人姓名
|
||||
*/
|
||||
private String input_optname;
|
||||
|
||||
/**
|
||||
* 制单时间
|
||||
*/
|
||||
private String input_time;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String update_optid;
|
||||
|
||||
/**
|
||||
* 修改人姓名
|
||||
*/
|
||||
private String update_optname;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String update_time;
|
||||
|
||||
/**
|
||||
* 分配人
|
||||
*/
|
||||
private String dis_optid;
|
||||
|
||||
/**
|
||||
* 分配人姓名
|
||||
*/
|
||||
private String dis_optname;
|
||||
|
||||
/**
|
||||
* 分配时间
|
||||
*/
|
||||
private String dis_time;
|
||||
|
||||
/**
|
||||
* 确认人
|
||||
*/
|
||||
private String confirm_optid;
|
||||
|
||||
/**
|
||||
* 确认人姓名
|
||||
*/
|
||||
private String confirm_optname;
|
||||
|
||||
/**
|
||||
* 确认时间
|
||||
*/
|
||||
private String confirm_time;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
private String sysdeptid;
|
||||
|
||||
/**
|
||||
* 公司ID
|
||||
*/
|
||||
private String syscompanyid;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Boolean is_delete;
|
||||
|
||||
/**
|
||||
* 是否已上传
|
||||
*/
|
||||
private Boolean is_upload;
|
||||
|
||||
/**
|
||||
* 回传人
|
||||
*/
|
||||
private String upload_optid;
|
||||
|
||||
/**
|
||||
* 回传时间
|
||||
*/
|
||||
private String upload_time;
|
||||
|
||||
/**
|
||||
* 是否冲销
|
||||
*/
|
||||
private Boolean is_writeoff;
|
||||
|
||||
/**
|
||||
* 冲销人
|
||||
*/
|
||||
private String writeoff_optid;
|
||||
|
||||
/**
|
||||
* 冲销时间
|
||||
*/
|
||||
private String writeoff_time;
|
||||
|
||||
/**
|
||||
* 收货单位
|
||||
*/
|
||||
private String consignee;
|
||||
|
||||
/**
|
||||
* 收货人
|
||||
*/
|
||||
private String receiver;
|
||||
|
||||
/**
|
||||
* 收货地址
|
||||
*/
|
||||
private String receiptaddress;
|
||||
|
||||
/**
|
||||
* 收货人联系电话
|
||||
*/
|
||||
private String receiptphone;
|
||||
|
||||
/**
|
||||
* 物流公司
|
||||
*/
|
||||
private String logisticscompany;
|
||||
|
||||
/**
|
||||
* 司机
|
||||
*/
|
||||
private String drivername;
|
||||
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String carno;
|
||||
|
||||
/**
|
||||
* 司机联系电话
|
||||
*/
|
||||
private String driverphone;
|
||||
|
||||
/**
|
||||
* 合同号
|
||||
*/
|
||||
private String contractno;
|
||||
|
||||
/**
|
||||
* 送货单位
|
||||
*/
|
||||
private String deliveryunit;
|
||||
|
||||
/**
|
||||
* 送货方地址
|
||||
*/
|
||||
private String deliveryaddress;
|
||||
|
||||
/**
|
||||
* 送货方联系人
|
||||
*/
|
||||
private String deliveryname;
|
||||
|
||||
/**
|
||||
* 送货联系电话
|
||||
*/
|
||||
private String deliveryphone;
|
||||
|
||||
/**
|
||||
* 物流公司编码
|
||||
*/
|
||||
private String trans_code;
|
||||
|
||||
/**
|
||||
* 预估运费
|
||||
*/
|
||||
private BigDecimal estimated_freight;
|
||||
|
||||
/**
|
||||
* 客户编码
|
||||
*/
|
||||
private String cust_code;
|
||||
|
||||
/**
|
||||
* 移入仓库标识
|
||||
*/
|
||||
private String out_stor_id;
|
||||
|
||||
/**
|
||||
* 回传MES
|
||||
*/
|
||||
private Boolean upload_mes;
|
||||
|
||||
/**
|
||||
* 回传SAP
|
||||
*/
|
||||
private Boolean upload_sap;
|
||||
|
||||
/**
|
||||
* 运转费
|
||||
*/
|
||||
private BigDecimal run_freight;
|
||||
|
||||
/**
|
||||
* 卸车费
|
||||
*/
|
||||
private BigDecimal unload_freight;
|
||||
|
||||
/**
|
||||
* 其他费用
|
||||
*/
|
||||
private BigDecimal other_freight;
|
||||
|
||||
/**
|
||||
* 运单号
|
||||
*/
|
||||
private String order_number;
|
||||
|
||||
/**
|
||||
* 车型
|
||||
*/
|
||||
private String car_type;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package org.nl.wms.storage_manage.ios.service.iostorInv.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinv;
|
||||
import org.nl.wms.storage_manage.ios.service.iostorInv.dto.IostorInvQuery;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 出入库单主表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-11-10
|
||||
*/
|
||||
public interface StIvtIostorinvMapper extends BaseMapper<StIvtIostorinv> {
|
||||
|
||||
List<Map> getPageQuery(@Param("query") IostorInvQuery query, @Param("pageQuery") PageQuery pageQuery);
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.wms.storage_manage.ios.service.iostorInv.dao.mapper.StIvtIostorinvMapper">
|
||||
|
||||
<select id="getPageQuery" resultType="java.util.Map">
|
||||
SELECT
|
||||
mst.*
|
||||
FROM
|
||||
st_ivt_iostorinv mst
|
||||
<where>
|
||||
mst.is_delete = '0'
|
||||
AND
|
||||
io_type = '0'
|
||||
|
||||
<if test="query.start_time != null">
|
||||
and mst.create_time >= #{query.start_time}
|
||||
</if>
|
||||
<if test="query.end_time != null">
|
||||
and #{query.end_time} >= mst.create_time
|
||||
</if>
|
||||
<if test="query.stor_id != null and query.stor_id != ''">
|
||||
and mst.stor_id = #{query.stor_id}
|
||||
</if>
|
||||
<if test="query.bill_status != null and query.bill_status != ''">
|
||||
and mst.bill_status = #{query.bill_status}
|
||||
</if>
|
||||
<if test="query.bill_type != null and query.bill_type != ''">
|
||||
and mst.bill_type = #{query.bill_type}
|
||||
</if>
|
||||
<if test="query.bill_code != null and query.bill_code != ''">
|
||||
and mst.bill_code = #{query.bill_code}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,36 @@
|
||||
package org.nl.wms.storage_manage.ios.service.iostorInv.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nl.common.domain.query.BaseQuery;
|
||||
import org.nl.common.domain.query.QParam;
|
||||
import org.nl.common.enums.QueryTEnum;
|
||||
import org.nl.wms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinv;
|
||||
|
||||
/*
|
||||
* @author LXY
|
||||
* @Date 2023/11/10 14:49
|
||||
*/
|
||||
@Data
|
||||
public class IostorInvQuery extends BaseQuery<StIvtIostorinv> {
|
||||
|
||||
|
||||
private String stor_id;
|
||||
|
||||
private String bill_status;
|
||||
|
||||
private String bill_type;
|
||||
|
||||
private String bill_code;
|
||||
|
||||
private String io_type;
|
||||
|
||||
private Boolean is_delete = false;
|
||||
|
||||
|
||||
@Override
|
||||
public void paramMapping() {
|
||||
super.doP.put("bill_code", QParam.builder().k(new String[]{"bill_code"}).type(QueryTEnum.LK).build());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package org.nl.wms.storage_manage.ios.service.iostorInv.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import oracle.sql.ROWID;
|
||||
import org.nl.common.base.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.pdm.subpackage.service.IPdmBiSubpackagerelationService;
|
||||
import org.nl.wms.pdm.subpackage.service.dao.PdmBiSubpackagerelation;
|
||||
import org.nl.wms.storage_manage.ios.service.iostorInv.IStIvtIostorinvService;
|
||||
import org.nl.wms.storage_manage.ios.service.iostorInv.dao.StIvtIostorinv;
|
||||
import org.nl.wms.storage_manage.ios.service.iostorInv.dao.mapper.StIvtIostorinvMapper;
|
||||
import org.nl.wms.storage_manage.ios.service.iostorInv.dto.IostorInvQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 出入库单主表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-11-10
|
||||
*/
|
||||
@Service
|
||||
public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper, StIvtIostorinv> implements IStIvtIostorinvService {
|
||||
|
||||
@Autowired
|
||||
private IPdmBiSubpackagerelationService iPdmBiSubpackagerelationService; // 子卷包装关系服务
|
||||
|
||||
@Override
|
||||
public Object pageQuery(IostorInvQuery query, PageQuery pageQuery) {
|
||||
Page<Object> page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
page.setOrderBy("create_time DESC");
|
||||
List<Map> mst_detail = this.baseMapper.getPageQuery(query, pageQuery);
|
||||
|
||||
TableDataInfo<Map> build = TableDataInfo.build(mst_detail);
|
||||
build.setTotalElements(page.getTotal());
|
||||
return build;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray queryBoxMater(JSONObject whereJson) {
|
||||
JSONArray data = whereJson.getJSONArray("data");
|
||||
|
||||
List<PdmBiSubpackagerelation> resultList = iPdmBiSubpackagerelationService.list(
|
||||
new QueryWrapper<PdmBiSubpackagerelation>().lambda()
|
||||
.in(PdmBiSubpackagerelation::getPackage_box_sn,
|
||||
data.stream()
|
||||
.map(row -> JSON.parseObject(JSONObject.toJSONString(row)))
|
||||
.map(row -> row.getString("package_box_sn"))
|
||||
.collect(Collectors.toSet())
|
||||
)
|
||||
.orderByAsc(PdmBiSubpackagerelation::getPackage_box_sn)
|
||||
);
|
||||
|
||||
return JSONArray.parseArray(JSONObject.toJSONString(resultList));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,340 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="crud.status.title"
|
||||
append-to-body
|
||||
fullscreen
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0 || crud.status.view > 0"
|
||||
width="1200px"
|
||||
@open="open"
|
||||
@close="close"
|
||||
>
|
||||
<el-row v-show="crud.status.cu > 0" :gutter="20">
|
||||
<el-col :span="20" style="border: 1px solid white">
|
||||
<span />
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span>
|
||||
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary" @click="crud.submitCU">保存</el-button>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" size="mini" label-width="85px" label-suffix=":">
|
||||
<el-form-item label="单据号" prop="bill_code">
|
||||
<label slot="label">单 据 号:</label>
|
||||
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库" prop="stor_id">
|
||||
<label slot="label">仓 库:</label>
|
||||
<el-select
|
||||
v-model="form.stor_id"
|
||||
clearable
|
||||
placeholder="仓库"
|
||||
class="filter-item"
|
||||
style="width: 210px"
|
||||
:disabled="crud.status.view > 0"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in storlist"
|
||||
:key="item.stor_id"
|
||||
:label="item.stor_name"
|
||||
:value="item.stor_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务类型" prop="bill_type">
|
||||
<el-select
|
||||
v-model="form.bill_type"
|
||||
clearable
|
||||
placeholder="业务类型"
|
||||
style="width: 210px"
|
||||
class="filter-item"
|
||||
:disabled="crud.status.view > 0"
|
||||
@change="billTypeChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_INV_IN_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="bill_status">
|
||||
<el-select
|
||||
v-model="form.bill_status"
|
||||
clearable
|
||||
style="width: 210px"
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.IO_BILL_STATUS"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="明细数" prop="detail_count">
|
||||
<label slot="label">明 细 数:</label>
|
||||
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总重量" prop="total_qty">
|
||||
<label slot="label">总 重 量:</label>
|
||||
<el-input-number
|
||||
v-model="form.total_qty"
|
||||
:controls="false"
|
||||
:precision="3"
|
||||
:min="0"
|
||||
disabled
|
||||
style="width: 210px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务日期" prop="biz_date">
|
||||
<el-date-picker v-model="form.biz_date" type="date" placeholder="选择日期" style="width: 210px" value-format="yyyy-MM-dd" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<div class="crud-opts2" style="margin-bottom: 5px;">
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="insertEvent()"
|
||||
>
|
||||
添加箱号物料
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="form.tableData"
|
||||
style="width: 100%;"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="sale_order_name" label="订单号" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="customer_name" label="客户编号" />
|
||||
<el-table-column prop="customer_name" label="客户名称" />
|
||||
<el-table-column show-overflow-tooltip prop="package_box_sn" width="250" label="箱号" />
|
||||
<el-table-column show-overflow-tooltip width="100" prop="quanlity_in_box" label="箱内子卷数" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="container_name" label="子卷号" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="sap_pcsn" label="sap批次" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="product_name" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="product_description" label="物料描述" />
|
||||
<el-table-column show-overflow-tooltip prop="width" label="幅宽" />
|
||||
<el-table-column show-overflow-tooltip prop="thickness" label="产品厚度" />
|
||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="170" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
@click.native.prevent="deleteRow(scope.$index, form.tableData)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<AddDtl :dialog-show.sync="dtlShow" :open-param="opendtlParam" @tableChanged="tableChanged" />
|
||||
<!-- <MaterDtl
|
||||
:dialog-show.sync="materShow"
|
||||
:is-single="true"
|
||||
:mater-opt-code="materType"
|
||||
@tableChanged2="tableChanged2"
|
||||
/>-->
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud, form } from '@crud/crud'
|
||||
import AddDtl from '@/views/wms/storage_manage/ios/inbill/AddDtl'
|
||||
import inBill from '@/views/wms/storage_manage/ios/inbill/inbill'
|
||||
// import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||
// import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||
|
||||
const defaultForm = {
|
||||
bill_code: '',
|
||||
stor_id: '',
|
||||
bill_status: '10',
|
||||
total_qty: '0',
|
||||
detail_count: '0',
|
||||
bill_type: '',
|
||||
remark: '',
|
||||
biz_date: new Date(),
|
||||
create_mode: '',
|
||||
tableData: []
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'AddDialog',
|
||||
components: { AddDtl },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
dicts: ['IO_BILL_STATUS', 'ST_INV_IN_TYPE'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
materShow: false,
|
||||
dtlShow: false,
|
||||
opendtlParam: null,
|
||||
bill_btn: false,
|
||||
mater_btn: false,
|
||||
materType: '',
|
||||
storlist: [],
|
||||
rules: {
|
||||
stor_id: [
|
||||
{ required: true, message: '仓库不能为空', trigger: 'blur' }
|
||||
],
|
||||
bill_type: [
|
||||
{ required: true, message: '业务类型不能为空', trigger: 'blur' }
|
||||
],
|
||||
biz_date: [
|
||||
{ required: true, message: '业务日期不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
/* crudUserStor.getUserStor().then(res => {
|
||||
this.storlist = res
|
||||
})*/
|
||||
},
|
||||
close() {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
[CRUD.HOOK.afterToEdit]() {
|
||||
// 获取入库单明细
|
||||
},
|
||||
[CRUD.HOOK.afterToAdd]() {
|
||||
this.bill_btn = false
|
||||
this.mater_btn = false
|
||||
},
|
||||
[CRUD.HOOK.afterToView]() {
|
||||
this.bill_btn = true
|
||||
this.mater_btn = true
|
||||
},
|
||||
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
// 提交前校验
|
||||
if (this.form.tableData.length === 0) {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
},
|
||||
billTypeChange(val) {
|
||||
if (val === '000101') {
|
||||
this.bill_btn = false
|
||||
this.mater_btn = true
|
||||
} else if (val === '000102') {
|
||||
this.bill_btn = true
|
||||
this.mater_btn = false
|
||||
} else {
|
||||
this.bill_btn = true
|
||||
this.mater_btn = true
|
||||
}
|
||||
this.form.tableData = []
|
||||
this.form.total_qty = 0
|
||||
this.form.detail_count = 0
|
||||
},
|
||||
tableChanged2(row) {
|
||||
// 新增一行物料时,给行进行赋值
|
||||
this.nowrow.material_code = row.material_code
|
||||
this.nowrow.material_id = row.material_id
|
||||
this.nowrow.material_name = row.material_name
|
||||
this.nowrow.qty_unit_id = row.base_unit_id
|
||||
this.nowrow.qty_unit_name = row.unit_name
|
||||
this.form.tableData.splice(this.nowindex, 1, this.nowrow) // 通过splice 替换数据 触发视图更新
|
||||
},
|
||||
deleteRow(index, rows) {
|
||||
const package_box_sn = rows[index].package_box_sn
|
||||
let len = rows.length
|
||||
while (len--) {
|
||||
const obj = rows[len]
|
||||
if (package_box_sn === obj.package_box_sn) {
|
||||
const index = rows.indexOf(obj)
|
||||
if (index > -1) { // 移除找到的指定元素
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) - parseFloat(rows[index].net_weight)
|
||||
rows.splice(index, 1)
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
tableChanged(rows) {
|
||||
// 对新增的行进行校验不能存在相同物料批次
|
||||
rows.forEach((item) => {
|
||||
let same_mater = true
|
||||
this.form.tableData.forEach((row) => {
|
||||
if (row.container_name === item.container_name) {
|
||||
same_mater = false
|
||||
}
|
||||
})
|
||||
if (same_mater) {
|
||||
item.quality_scode = '01'
|
||||
item.ivt_level = '01'
|
||||
item.is_active = '1'
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.net_weight)
|
||||
this.form.tableData.splice(-1, 0, item)
|
||||
}
|
||||
})
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
},
|
||||
insertEvent(row) {
|
||||
if (this.form.bill_type === '') {
|
||||
this.crud.notify('请选择业务类型!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.opendtlParam = {
|
||||
optType: 'add'
|
||||
}
|
||||
this.dtlShow = true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 4px 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .crud-opts-right2 {
|
||||
margin-left: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,169 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="物料新增"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="1000px"
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="创建时间">
|
||||
<date-range-picker v-model="query.createTime" class="date-item" value-format="yyyy-MM-dd" />
|
||||
</el-form-item>
|
||||
<el-form-item label="木箱号">
|
||||
<el-input
|
||||
v-model="query.package_box_sn"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="箱号"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="子卷号">
|
||||
<el-input
|
||||
v-model="query.container_name"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="子卷号"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码">
|
||||
<el-input
|
||||
v-model="query.material_search"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="物料编码"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="sap批次">
|
||||
<el-input
|
||||
v-model="query.sap_pcsn"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="sap批次"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<rrOperation />
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation />
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="sale_order_name" label="订单号" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="customer_name" label="客户编号" />
|
||||
<el-table-column width="200" show-overflow-tooltip prop="customer_description" label="客户名称" />
|
||||
<el-table-column show-overflow-tooltip prop="package_box_sn" width="250" label="箱号" />
|
||||
<el-table-column show-overflow-tooltip width="100" prop="quanlity_in_box" label="箱内子卷数" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="container_name" label="子卷号" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="sap_pcsn" label="sap批次" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="product_name" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip width="170" prop="product_description" label="物料描述" />
|
||||
<el-table-column show-overflow-tooltip prop="width" label="幅宽" />
|
||||
<el-table-column show-overflow-tooltip prop="thickness" label="产品厚度" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
import inBill from '@/views/wms/storage_manage/ios/inbill/inbill'
|
||||
|
||||
export default {
|
||||
name: 'AddDtl',
|
||||
components: { crudOperation, rrOperation, pagination, DateRangePicker },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '子卷包装关系',
|
||||
url: '/api/pdmBiSubpackagerelation',
|
||||
crudMethod: {},
|
||||
optShow: {
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
rows: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
this.crud.query.status = '10'
|
||||
return true
|
||||
},
|
||||
open() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
submit() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.rows = this.$refs.multipleTable.selection
|
||||
inBill.queryBoxMater({ 'data': this.rows }).then(res => {
|
||||
this.rows = res
|
||||
this.$emit('tableChanged', this.rows)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,342 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
:show-close="false"
|
||||
fullscreen
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
|
||||
<span slot="title" class="dialog-footer">
|
||||
<div class="crud-opts2">
|
||||
<span class="el-dialog__title2">入库分配</span>
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left">
|
||||
<el-button
|
||||
:loading="allDivBtn"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="allDivStruct()"
|
||||
>
|
||||
全部分配
|
||||
</el-button>
|
||||
</slot>
|
||||
<el-button slot="left" type="info" @click="dialogVisible = false">关闭</el-button>
|
||||
</span>
|
||||
</div>
|
||||
</span>
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">入库明细项</span>
|
||||
</div>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="dtl_table"
|
||||
:data="this.openParam"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
border
|
||||
highlight-current-row
|
||||
:row-class-name="tableRowClassName"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@row-click="clcikRow"
|
||||
>
|
||||
<el-table-column prop="bill_status" label="状态" align="center" width="110px">
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
v-model="scope.row.bill_status"
|
||||
class="filter-item"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.IO_BILL_STATUS"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="box_no" width="250" label="木箱号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="子卷号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="sap_pcsn" label="SAP批次" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="source_bill_type_name" label="源单类型" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="source_bill_code" label="源单编号" align="center" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'20px 20px 0 20px'}">
|
||||
<el-form ref="form2" :inline="true" :model="form" :rules="rules" size="mini">
|
||||
<el-form-item label="入库点" prop="point_code">
|
||||
<el-select
|
||||
v-model="form.point_code"
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 200px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in pointlist"
|
||||
:key="item.point_code"
|
||||
:label="item.point_name"
|
||||
:value="item.point_code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">载具物料明细</span>
|
||||
<div class="crud-opts-form">
|
||||
<el-form ref="form" :inline="true" :model="form" size="mini">
|
||||
<el-form-item label="库区" prop="gender5">
|
||||
<el-cascader
|
||||
placeholder="请选择"
|
||||
:options="sects"
|
||||
:props="{ checkStrictly: true }"
|
||||
clearable
|
||||
@change="sectQueryChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="checked">
|
||||
<el-checkbox v-model="form.checked">自动分配货位</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button
|
||||
:loading="divBtn"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="divStruct()"
|
||||
>
|
||||
分配货位
|
||||
</el-button>
|
||||
<el-button
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="unDivStruct()"
|
||||
>
|
||||
取消分配
|
||||
</el-button>
|
||||
<el-button
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
@click="divPoint()"
|
||||
>
|
||||
设置起点
|
||||
</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="dis_table"
|
||||
:data="form.tableMater"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column show-overflow-tooltip type="index" label="序号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="box_no" width="250" label="木箱号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="子卷号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="sap_pcsn" label="SAP批次" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="point_code" label="入库点" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="struct_code" label="货位" align="center" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<StructDiv
|
||||
ref="child"
|
||||
:stor-id="storId"
|
||||
:dialog-show.sync="structShow"
|
||||
:sect-prop="sectProp"
|
||||
@tableChanged="tableChanged"
|
||||
/>
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
// import crudSectattr from '@/views/wms/basedata/st/sect/sectattr'
|
||||
// import StructDiv from '@/views/wms/pub/StructDialog'
|
||||
import inBill from '@/views/wms/storage_manage/ios/inbill/inbill'
|
||||
// import crudPoint from '@/views/wms/sch/point/point'
|
||||
// import crudUserStor, { getSect } from '@/views/wms/basedata/st/userStor/userStor'
|
||||
|
||||
export default {
|
||||
name: 'DivDialog',
|
||||
components: { },
|
||||
mixins: [crud()],
|
||||
dicts: ['IO_BILL_STATUS'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
},
|
||||
storId: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
stor_id: '',
|
||||
sect_id: '',
|
||||
sectProp: null,
|
||||
structShow: false,
|
||||
divBtn: false,
|
||||
allDivBtn: false,
|
||||
sects: [],
|
||||
form: {
|
||||
dtl_row: null,
|
||||
storage_qty: '',
|
||||
point_code: null,
|
||||
checked: true,
|
||||
tableMater: []
|
||||
},
|
||||
storlist: [],
|
||||
pointlist: [],
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
/* crudUserStor.getSect({ 'stor_id': this.storId }).then(res => {
|
||||
this.sects = res.content
|
||||
})
|
||||
|
||||
const area_type = '1585164789083148288'
|
||||
|
||||
crudPoint.getPoint({ 'area_type': area_type }).then(res => {
|
||||
this.pointlist = res
|
||||
})*/
|
||||
},
|
||||
close() {
|
||||
this.form.tableMater = []
|
||||
this.form.dtl_row = null
|
||||
this.sectProp = null
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('AddChanged')
|
||||
this.crud.refresh()
|
||||
this.$refs['form2'].resetFields()
|
||||
},
|
||||
clcikRow(row) {
|
||||
this.form.dtl_row = row
|
||||
/*crudRawAssist.getIODtl({ 'bill_code': this.form.dtl_row.bill_code }).then(res => {
|
||||
this.openParam = res
|
||||
this.form.dtl_row = res[row.index]
|
||||
})
|
||||
crudRawAssist.getDisDtl(row).then(res => {
|
||||
this.form.tableMater = res
|
||||
})*/
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
row.index = rowIndex
|
||||
},
|
||||
sectQueryChange(val) {
|
||||
this.sectProp = val
|
||||
if (val.length === 1) {
|
||||
this.stor_id = val[0]
|
||||
this.sect_id = ''
|
||||
}
|
||||
if (val.length === 0) {
|
||||
this.sect_id = ''
|
||||
this.stor_id = ''
|
||||
}
|
||||
if (val.length === 2) {
|
||||
this.stor_id = val[0]
|
||||
this.sect_id = val[1]
|
||||
}
|
||||
},
|
||||
tableChanged(row) {
|
||||
// 新增一行物料时,给行进行赋值
|
||||
for (let i = 0; i < this.form.tableMater.length; i++) {
|
||||
this.form.tableMater[i].struct_code = row.struct_code
|
||||
this.form.tableMater[i].sect_id = row.sect_id
|
||||
this.form.tableMater[i].struct_id = row.struct_id
|
||||
this.form.tableMater[i].struct_name = row.struct_name
|
||||
this.form.tableMater[i].sect_code = row.sect_code
|
||||
this.form.tableMater[i].sect_name = row.sect_name
|
||||
this.form.tableMater.splice(i, 1, this.form.tableMater[i]) // 通过splice 替换数据 触发视图更新
|
||||
}
|
||||
/* crudRawAssist.divStruct(this.form).then(res => {
|
||||
crudRawAssist.getIODtl({ 'bill_code': this.form.dtl_row.bill_code, 'open_flag': '1' }).then(res => {
|
||||
this.openParam = res
|
||||
})
|
||||
this.form.tableMater = []
|
||||
})*/
|
||||
},
|
||||
divPoint() {
|
||||
},
|
||||
allDivStruct() {
|
||||
},
|
||||
divStruct() {
|
||||
},
|
||||
unDivStruct() {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .el-dialog__title2 {
|
||||
line-height: 24px;
|
||||
font-size: 20px;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.crud-opts2 .role-span {
|
||||
padding: 10px 0px 10px 0px;
|
||||
}
|
||||
|
||||
.crud-opts2 .crud-opts-form {
|
||||
padding: 10px 0px 0px 20px;
|
||||
}
|
||||
|
||||
.input-with-select {
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,229 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible2"
|
||||
destroy-on-close
|
||||
:show-close="false"
|
||||
fullscreen
|
||||
@close="close"
|
||||
>
|
||||
|
||||
<span slot="title" class="dialog-footer">
|
||||
<div class="crud-opts2">
|
||||
<span class="el-dialog__title2">入库单任务操作</span>
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button slot="left" type="info" @click="dialogVisible2 = false">关闭</el-button>
|
||||
</span>
|
||||
</div>
|
||||
</span>
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">入库单据明细项</span>
|
||||
</div>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="this.openParam"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
border
|
||||
highlight-current-row
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@row-click="clcikRow"
|
||||
>
|
||||
<el-table-column show-overflow-tooltip type="index" label="序号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="bill_code" label="单据号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="子卷号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="sap_pcsn" label="SAP批次" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
prop="assign_qty"
|
||||
:formatter="crud.formatNum3"
|
||||
label="已分配数量"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column show-overflow-tooltip prop="unassign_qty" :formatter="crud.formatNum3" label="未分配数量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位" align="center" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'20px 20px 0 20px'}">
|
||||
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="mini">
|
||||
<el-form-item prop="checked">
|
||||
<el-checkbox v-model="form.checked" true-label="1" false-label="0" @change="checkedChange()">仅显示未完成的任务</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">入库单据任务项</span>
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="delTask()"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
@click="reIssueTask()"
|
||||
>
|
||||
下发
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
@click="confirmTask()"
|
||||
>
|
||||
标识完成
|
||||
</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="disTable"
|
||||
:data="form.tableMater"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
:row-class-name="tableRowClassName"
|
||||
highlight-current-row
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@row-click="clcikDisRow"
|
||||
>
|
||||
<el-table-column width="60" prop="seq_no" label="序号" align="center" />
|
||||
<el-table-column width="150" prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column width="150" prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column width="170" prop="pcsn" label="子卷号" align="center" />
|
||||
<el-table-column width="120" prop="sap_pcsn" label="SAP批次" align="center" />
|
||||
<el-table-column width="230" prop="box_no" label="木箱码" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="struct_code" label="分配货位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="work_status" label="指令状态" :formatter="statusFormat" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="task_code" label="指令操作号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="point_code" label="入库点位编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="point_name" label="入库点位名称" align="center" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import inBill from '@/views/wms/storage_manage/ios/inbill/inbill'
|
||||
|
||||
export default {
|
||||
name: 'TaskDialog',
|
||||
components: {},
|
||||
mixins: [crud()],
|
||||
dicts: ['IO_BILL_STATUS', 'TASK_STATUS'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
openParam: {
|
||||
type: Array,
|
||||
default: () => { return [] }
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible2: false,
|
||||
dis_row: null,
|
||||
fullscreenLoading: false,
|
||||
form: {
|
||||
tableMater: [],
|
||||
dtl_row: null,
|
||||
checked: '1'
|
||||
},
|
||||
rules: {
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible2 = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.form.tableMater = []
|
||||
this.form.checked = '1'
|
||||
this.form.dtl_row = null
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
delTask() {
|
||||
},
|
||||
statusFormat(row, column) {
|
||||
return this.dict.label.TASK_STATUS[row.work_status]
|
||||
},
|
||||
confirmTask() {
|
||||
},
|
||||
reIssueTask() {
|
||||
},
|
||||
checkedChange(val) {
|
||||
},
|
||||
clcikRow(row, column, event) {
|
||||
this.form.dtl_row = row
|
||||
row.checked = this.form.checked
|
||||
/* crudRawAssist.queryTask(row).then(res => {
|
||||
this.form.tableMater = res
|
||||
})*/
|
||||
},
|
||||
clcikDisRow(row, column, event) {
|
||||
this.dis_row = row
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
row.index = rowIndex
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .el-dialog__title2 {
|
||||
line-height: 24px;
|
||||
font-size:20px;
|
||||
color:#303133;
|
||||
}
|
||||
|
||||
.crud-opts2 .role-span {
|
||||
padding: 10px 0px 10px 0px;
|
||||
}
|
||||
.crud-opts2 .crud-opts-form {
|
||||
padding: 10px 0px 0px 20px;
|
||||
}
|
||||
|
||||
.input-with-select {
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,283 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
append-to-body
|
||||
title="入库详情"
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
fullscreen
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" size="mini" label-width="85px" label-suffix=":">
|
||||
<el-form-item label="单据号" prop="bill_code">
|
||||
<label slot="label">单 据 号:</label>
|
||||
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库" prop="stor_id">
|
||||
<label slot="label">仓 库:</label>
|
||||
<el-select
|
||||
v-model="form.stor_id"
|
||||
clearable
|
||||
placeholder="仓库"
|
||||
class="filter-item"
|
||||
style="width: 210px"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in storlist"
|
||||
:key="item.stor_id"
|
||||
:label="item.stor_name"
|
||||
:value="item.stor_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务类型" prop="bill_type">
|
||||
<el-select
|
||||
v-model="form.bill_type"
|
||||
clearable
|
||||
placeholder="业务类型"
|
||||
style="width: 210px"
|
||||
class="filter-item"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.INANDOUT_BILL_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="bill_status">
|
||||
<el-select
|
||||
v-model="form.bill_status"
|
||||
clearable
|
||||
style="width: 210px"
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.IO_BILL_STATUS"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="明细数" prop="detail_count">
|
||||
<label slot="label">明 细 数:</label>
|
||||
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总重量" prop="total_qty">
|
||||
<label slot="label">总 重 量:</label>
|
||||
<el-input-number
|
||||
v-model="form.total_qty"
|
||||
:controls="false"
|
||||
:precision="3"
|
||||
:min="0"
|
||||
disabled
|
||||
style="width: 210px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务日期" prop="biz_date">
|
||||
<el-date-picker v-model="form.biz_date" type="date" placeholder="选择日期" style="width: 210px" value-format="yyyy-MM-dd" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span2">入库明细</span>
|
||||
</div>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tableDtl"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
size="mini"
|
||||
border
|
||||
:highlight-current-row="true"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@current-change="handleDtlCurrentChange"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="bill_code" label="单据号" align="center" />
|
||||
<el-table-column :formatter="bill_statusFormat" prop="bill_status" label="状态" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column prop="pcsn" label="子卷号" width="150" align="center" />
|
||||
<el-table-column prop="sap_pcsn" label="SAP批次号" width="150" align="center" />
|
||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" align="center" />
|
||||
<el-table-column prop="source_bill_type" label="源单类型" align="center" width="130px" :formatter="invtypeFormat" />
|
||||
<el-table-column prop="source_bill_code" label="源单号" align="center" width="130px" />
|
||||
<el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">作业明细</span>
|
||||
</div>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table2"
|
||||
:data="tabledis"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
size="mini"
|
||||
border
|
||||
:highlight-current-row="true"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@current-change="handleDisCurrentChange"
|
||||
>
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column prop="pcsn" label="子卷号" align="center" width="150"/>
|
||||
<el-table-column prop="sap_pcsn" label="SAP批次号" align="center" />
|
||||
<el-table-column prop="box_no" label="载具号" align="center" />
|
||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column prop="next_point_code" label="起始位置" align="center" />
|
||||
<el-table-column prop="struct_code" label="目的位置" align="center" />
|
||||
<el-table-column prop="task_code" label="任务号" align="center" />
|
||||
<el-table-column prop="task_type_name" label="任务类型" align="center" width="150px" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { crud } from '@crud/crud'
|
||||
// import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||
|
||||
export default {
|
||||
name: 'ViewDialog',
|
||||
components: { },
|
||||
mixins: [crud()],
|
||||
dicts: ['IO_BILL_STATUS', 'WORK_STATUS', 'TASK_STATUS'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
rowmst: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
tableDtl: [],
|
||||
tabledis: [],
|
||||
billtypelist: [],
|
||||
storlist: [],
|
||||
currentdtl: null,
|
||||
currentDis: {},
|
||||
form: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
},
|
||||
rowmst: {
|
||||
handler(newValue) {
|
||||
this.form = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
/* checkoutbill.getInvTypes().then(res => {
|
||||
this.billtypelist = res
|
||||
})
|
||||
crudUserStor.getUserStor().then(res => {
|
||||
this.storlist = res
|
||||
})*/
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.queryTableDtl()
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.currentDis = {}
|
||||
this.currentdtl = null
|
||||
this.tableDtl = []
|
||||
this.tabledis = []
|
||||
this.$emit('TaskChanged')
|
||||
},
|
||||
bill_statusFormat(row) {
|
||||
return this.dict.label.IO_BILL_STATUS[row.bill_status]
|
||||
},
|
||||
task_statusFormat(row) {
|
||||
return this.dict.label.TASK_STATUS[row.TASK_STATUS]
|
||||
},
|
||||
work_statusFormat(row) {
|
||||
return this.dict.label.WORK_STATUS[row.WORK_STATUS]
|
||||
},
|
||||
handleDtlCurrentChange(current) {
|
||||
if (current !== null) {
|
||||
this.tabledis = []
|
||||
this.currentdtl = current
|
||||
this.queryTableDdis()
|
||||
} else {
|
||||
this.tabledis = []
|
||||
this.currentdtl = {}
|
||||
}
|
||||
},
|
||||
invtypeFormat(row, column) {
|
||||
for (const item of this.billtypelist) {
|
||||
if (item.code === row.source_bill_type) {
|
||||
return item.name
|
||||
}
|
||||
}
|
||||
},
|
||||
handleDisCurrentChange(current) {
|
||||
this.currentDis = current
|
||||
},
|
||||
queryTableDtl() {
|
||||
/* checkoutbill.getOutBillDtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
|
||||
this.tableDtl = res
|
||||
})*/
|
||||
},
|
||||
queryTableDdis() {
|
||||
/*if (this.currentdtl !== null) {
|
||||
checkoutbill.getOutBillTask({ 'iostorinvdtl_id': this.currentdtl.iostorinvdtl_id }).then(res => {
|
||||
this.tabledis = res
|
||||
}).catch(() => {
|
||||
this.tabledis = []
|
||||
})
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .el-dialog__title2 {
|
||||
line-height: 24px;
|
||||
font-size:20px;
|
||||
color:#303133;
|
||||
}
|
||||
|
||||
.crud-opts2 .role-span2 {
|
||||
padding: 0px 0px 20px 0px;
|
||||
}
|
||||
.crud-opts2 {
|
||||
padding: 10px 0px 0px 50px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,35 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/api/stIvtIostorinv/inBill',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: '/api/stIvtIostorinv/inBill',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: '/api/stIvtIostorinv/inBill',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function queryBoxMater(data) {
|
||||
return request({
|
||||
url: '/api/stIvtIostorinv/inBill/queryBoxMater',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, queryBoxMater }
|
||||
351
lms/nladmin-ui/src/views/wms/storage_manage/ios/inbill/index.vue
Normal file
351
lms/nladmin-ui/src/views/wms/storage_manage/ios/inbill/index.vue
Normal file
@@ -0,0 +1,351 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="模糊查询">
|
||||
<el-input
|
||||
v-model="query.bill_code"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="单据号"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属仓库">
|
||||
<el-select
|
||||
v-model="query.stor_id"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="全部"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in storlist"
|
||||
:key="item.stor_id"
|
||||
:label="item.stor_name"
|
||||
:value="item.stor_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="生成方式">
|
||||
<el-select
|
||||
v-model="query.create_mode"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="生成方式"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_CREATE_MODE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="单据状态">
|
||||
<el-select
|
||||
v-model="query.bill_status"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.IO_BILL_STATUS"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="业务类型">
|
||||
<el-select
|
||||
v-model="query.bill_type"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
placeholder="业务类型"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_INV_IN_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="子卷号">
|
||||
<el-input
|
||||
v-model="query.pcsn"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="子卷号"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="SAP批次">
|
||||
<el-input
|
||||
v-model="query.sap_pcsn"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="SAP批次"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
:disabled="dis_flag"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@click="divOpen"
|
||||
>
|
||||
分配
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
:disabled="dis_flag"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@click="taskOpen"
|
||||
>
|
||||
作业任务
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:disabled="task_flag"
|
||||
@click="confirm"
|
||||
>
|
||||
强制确认
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
size="mini"
|
||||
:data="crud.data"
|
||||
highlight-current-row
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
@current-change="handleCurrentChange"
|
||||
@select="handleSelectionChange"
|
||||
@select-all="onSelectAll"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column
|
||||
v-permission="['admin','inbill:del','inbill:edit']"
|
||||
label="操作"
|
||||
width="115"
|
||||
align="center"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
:disabled-edit="canUd(scope.row)"
|
||||
:disabled-dle="canUd(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="bill_code" width="130" label="单据号">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.bill_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip :formatter="stateFormat" prop="bill_status" label="单据状态" />
|
||||
<el-table-column prop="stor_name" label="仓库" />
|
||||
<el-table-column show-overflow-tooltip prop="bill_type" min-width="120" :formatter="bill_typeFormat" label="业务类型" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="biz_date" label="业务日期" />
|
||||
<el-table-column show-overflow-tooltip prop="create_mode" :formatter="create_modeFormat" label="生成方式" />
|
||||
<el-table-column label="明细数" align="center" prop="detail_count" />
|
||||
<el-table-column label="总重量" align="center" prop="total_qty" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="制单人" align="center" prop="input_optname" />
|
||||
<el-table-column label="制单时间" align="center" prop="input_time" width="150" />
|
||||
<el-table-column label="修改人" align="center" prop="update_optname" />
|
||||
<el-table-column label="修改时间" align="center" prop="update_time" width="150" />
|
||||
<el-table-column label="分配人" align="center" prop="dis_optname" width="140px" />
|
||||
<el-table-column label="分配时间" align="center" prop="dis_time" width="150" />
|
||||
<el-table-column label="确认人" align="center" prop="confirm_optname" width="150" />
|
||||
<el-table-column label="确认时间" align="center" prop="confirm_time" width="150" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<AddDialog @AddChanged="querytable" />
|
||||
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
|
||||
<DivDialog :dialog-show.sync="divShow" :stor-id="storId" :open-param="openParam" @AddChanged="querytable" />
|
||||
<TaskDialog :dialog-show.sync="taskShow" :open-param="openParam" @AddChanged="querytable" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import inBill from '@/views/wms/storage_manage/ios/inbill/inbill'
|
||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import AddDialog from '@/views/wms/storage_manage/ios/inbill/AddDialog'
|
||||
import DivDialog from '@/views/wms/storage_manage/ios/inbill/DivDialog'
|
||||
import ViewDialog from '@/views/wms/storage_manage/ios/inbill/ViewDialog'
|
||||
import TaskDialog from '@/views/wms/storage_manage/ios/inbill/TaskDialog'
|
||||
// import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||
|
||||
export default {
|
||||
name: 'Inbill',
|
||||
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DivDialog, TaskDialog },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '',
|
||||
optShow: { add: true, reset: true },
|
||||
idField: 'iostorinv_id',
|
||||
url: '/api/stIvtIostorinv/inBill',
|
||||
crudMethod: { ...inBill }
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
// 数据字典
|
||||
dicts: ['IO_BILL_STATUS', 'ST_CREATE_MODE', 'ST_INV_IN_TYPE'],
|
||||
data() {
|
||||
return {
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
permission: {
|
||||
add: ['admin', 'inbill:add'],
|
||||
edit: ['admin', 'inbill:edit'],
|
||||
del: ['admin', 'inbill:del']
|
||||
},
|
||||
dis_flag: true,
|
||||
task_flag: true,
|
||||
viewShow: false,
|
||||
mstrow: {},
|
||||
divShow: false,
|
||||
taskShow: false,
|
||||
openParam: [],
|
||||
currentRow: null,
|
||||
storlist: [],
|
||||
statuslist: [],
|
||||
storId: null
|
||||
}
|
||||
},
|
||||
created() {
|
||||
/*crudUserStor.getUserStor().then(res => {
|
||||
this.storlist = res
|
||||
})*/
|
||||
},
|
||||
methods: {
|
||||
canUd(row) {
|
||||
return row.bill_status !== '10'
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
if (val.length > 1) {
|
||||
this.$refs.table.clearSelection()
|
||||
this.$refs.table.toggleRowSelection(val.pop())
|
||||
this.buttonChange(row)
|
||||
} else if (val.length === 1) {
|
||||
this.buttonChange(row)
|
||||
} else {
|
||||
this.handleCurrentChange(null)
|
||||
}
|
||||
},
|
||||
onSelectAll() {
|
||||
this.$refs.table.clearSelection()
|
||||
this.handleCurrentChange(null)
|
||||
},
|
||||
buttonChange(currentRow) {
|
||||
if (currentRow !== null) {
|
||||
this.currentRow = currentRow
|
||||
if (currentRow.bill_status === '10' || currentRow.bill_status === '20' || currentRow.bill_status === '30' || currentRow.bill_status === '40') {
|
||||
this.dis_flag = false
|
||||
} else {
|
||||
this.dis_flag = true
|
||||
}
|
||||
if (currentRow.bill_status === '30' || currentRow.bill_status === '40') {
|
||||
this.task_flag = false
|
||||
} else {
|
||||
this.task_flag = true
|
||||
}
|
||||
}
|
||||
},
|
||||
handleCurrentChange(currentRow) {
|
||||
if (currentRow === null) {
|
||||
this.dis_flag = true
|
||||
this.task_flag = true
|
||||
this.currentRow = {}
|
||||
}
|
||||
},
|
||||
bill_typeFormat(row, column) {
|
||||
return this.dict.label.ST_INV_IN_TYPE[row.bill_type]
|
||||
},
|
||||
toView(index, row) {
|
||||
this.mstrow = row
|
||||
this.viewShow = true
|
||||
},
|
||||
confirm() {
|
||||
|
||||
},
|
||||
stateFormat(row, column) {
|
||||
return this.dict.label.IO_BILL_STATUS[row.bill_status]
|
||||
},
|
||||
create_modeFormat(row, column) {
|
||||
return this.dict.label.ST_CREATE_MODE[row.create_mode]
|
||||
},
|
||||
divOpen() {
|
||||
},
|
||||
querytable() {
|
||||
this.onSelectAll()
|
||||
this.crud.toQuery()
|
||||
},
|
||||
taskOpen() {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 10px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user