Merge remote-tracking branch 'origin/master'

This commit is contained in:
ls
2026-02-25 17:24:23 +08:00
20 changed files with 1231 additions and 73 deletions

View File

@@ -343,6 +343,71 @@ public class PdmBiSubpackagerelation extends Model<PdmBiSubpackagerelation> {
@TableField(exist = false)
private String plan_qty;
/**
* 实际木箱重量
*/
private String box_actual_net_weight;
/**
* 客户木箱唯一序列号
*/
private String box_customer_sn;
/**
* 客户物料号
*/
private String customer_material_code;
/**
* 客户物料名称
*/
private String customer_material_desc;
/**
* 客户要求批号
*/
private String customer_batch_number;
/**
* 子卷的客户卷号
*/
private String customer_roll_name;
/**
* 子卷铝箔袋重量
*/
private String roll_package_material_al_weight;
/**
* 子卷辅材重量
*/
private String roll_fc_weight;
/**
* 子卷备注
*/
private String roll_remark;
/**
* 净重合计
*/
private BigDecimal total_net_weight;
/**
* 净重转换
*/
private BigDecimal net_weight_convert;
/**
* 毛重转换
*/
private BigDecimal gross_weight_convert;
/**
* 质保截止日期
*/
private String warranty_expire_date;
/**
* 获取主键值
*

View File

@@ -71,6 +71,21 @@ public interface IStIvtIostorinvdisService extends IService<StIvtIostorinvdis> {
*/
List<InBillPageVo> getInBillDatas(InBillPageParam paramMap);
/**
* 成品入库查询 - 不分页从写方法sql与 {@link IStIvtIostorinvdisService#getInBillPage(InBillPageParam, PageQuery)} 一样
* @param paramMap
* @return
*/
List<InBillPageVo> getInBillDatasNew(InBillPageParam paramMap);
/**
* 成品入库分页查询3
* @param paramMap 参数
* @param page 分页数据
* @return
*/
IPage<InBillPageVo> getInBillPage3(InBillPageParam paramMap, PageQuery page);
/**
* 成品出库分页查询
* @param paramMap 参数

View File

@@ -75,6 +75,8 @@ public interface StIvtIostorinvdisMapper extends BaseMapper<StIvtIostorinvdis> {
*/
IPage<InBillPageVo> selectPageLeftJoin(IPage<InBillPageVo> pages, InBillPageParam paramMap);
IPage<InBillPageVo> selectPageLeftJoin3(IPage<InBillPageVo> pages, InBillPageParam paramMap);
/**
* 查询成品入库全部分页数据
* @param pages
@@ -83,6 +85,8 @@ public interface StIvtIostorinvdisMapper extends BaseMapper<StIvtIostorinvdis> {
*/
IPage<InBillPageVo> selectPageAllLeftJoin(IPage<InBillPageVo> pages, InBillPageParam paramMap);
List<InBillPageVo> getInBillDataNew(@Param("paramMap") InBillPageParam paramMap);
List<InBillPageVo> getInBillData(@Param("paramMap") InBillPageParam paramMap);
List<InBillPageVo> getInBillAllData(@Param("paramMap") InBillPageParam paramMap);

View File

@@ -485,6 +485,318 @@
mst.iostorinv_id,
dis.box_no
</select>
<select id="getInBillDataNew" resultType="org.nl.wms.stat.service.vo.InBillPageVo">
SELECT
mst.stor_name,
dis.sect_name,
dis.struct_code,
dis.struct_name,
mst.bill_type,
dis.box_no,
dis.pcsn,
sub.sap_pcsn,
sub.net_weight,
dis.qty_unit_name,
sub.customer_name,
sub.quanlity_in_box,
sub.customer_description,
sub.sale_order_name,
mst.input_time,
mst.confirm_time,
sub.date_of_production,
mst.input_optname,
sub.width,
sub.box_actual_net_weight,
sub.box_customer_sn,
sub.customer_material_code,
sub.customer_material_desc,
sub.customer_batch_number,
sub.customer_roll_name,
sub.roll_package_material_al_weight,
sub.roll_fc_weight,
sub.roll_remark,
sub.total_net_weight,
sub.net_weight_convert,
sub.gross_weight_convert,
sub.warranty_expire_date,
replace(CONCAT( sub.thickness_request, '*', sub.width_standard ),'.0','') AS spec,
sub.thickness,
sub.box_weight,
sub.length,
sub.thickness_request,
sub.width_standard,
sub.mass_per_unit_area,
sub.demand_limit,
sub.standard_limit,
sub.actual_value,
mst.remark,
sub.container_name,
CONCAT( sub.box_length,'*',sub.box_width,'*',sub.box_high) AS box_size
FROM
(
SELECT
MIN( a.iostorinvdis_id ) AS iostorinvdis_id
FROM
st_ivt_iostorinvdis a
LEFT JOIN st_ivt_iostorinv b ON a.iostorinv_id = b.iostorinv_id
WHERE
b.io_type = '0'
<if test="paramMap.bill_type != null and paramMap.bill_type != ''">
AND b.bill_type = #{paramMap.bill_type}
</if>
<if test="paramMap.pcsn != null and paramMap.pcsn != ''">
AND a.pcsn = #{paramMap.pcsn}
</if>
<if test="paramMap.begin_time != null and paramMap.begin_time != ''">
AND b.confirm_time <![CDATA[ >= ]]> #{paramMap.begin_time}
</if>
<if test="paramMap.end_time != null and paramMap.end_time != ''">
AND b.confirm_time <![CDATA[ <= ]]> #{paramMap.end_time}
</if>
AND b.bill_status = '99'
GROUP BY
pcsn
UNION
SELECT
MIN( a.iostorinvdis_id ) AS iostorinvdis_id
FROM
st_ivt_iostorinvdis a
LEFT JOIN st_ivt_iostorinv b ON a.iostorinv_id = b.iostorinv_id
WHERE
b.io_type = '0'
<if test="paramMap.new_bill_type != null and paramMap.new_bill_type != ''">
AND b.bill_type = #{paramMap.new_bill_type}
</if>
<if test="paramMap.pcsn != null and paramMap.pcsn != ''">
AND a.pcsn = #{paramMap.new_bill_type}
</if>
<if test="paramMap.begin_time != null and paramMap.begin_time != ''">
AND b.confirm_time <![CDATA[ >= ]]> #{paramMap.begin_time}
</if>
<if test="paramMap.end_time != null and paramMap.end_time != ''">
AND b.confirm_time <![CDATA[ <= ]]> #{paramMap.end_time}
</if>
AND b.bill_status = '99'
GROUP BY
pcsn
) AS c
LEFT JOIN st_ivt_iostorinvdis dis ON dis.iostorinvdis_id = c.iostorinvdis_id
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dis.iostorinv_id
INNER JOIN pdm_bi_subpackagerelation sub ON sub.container_name = dis.pcsn AND sub.package_box_sn =
dis.box_no
WHERE
mst.io_type = '0'
AND mst.is_delete = '0'
AND mst.bill_status = '99'
<if test="paramMap.stor_id != null and !paramMap.stor_id.isEmpty()">
AND mst.stor_id IN
<foreach collection="paramMap.stor_id" item="code" separator="," open="(" close=")">
#{code}
</foreach>
</if>
<if test="paramMap.product_area != null and !paramMap.product_area.isEmpty()">
AND LEFT(sub.container_name,2) IN
<foreach collection="paramMap.product_area" item="code" separator="," open="(" close=")">
#{code}
</foreach>
OR SUBSTRING(sub.container_name,2,2) IN
<foreach collection="paramMap.product_area" item="code" separator="," open="(" close=")">
#{code}
</foreach>
</if>
<if test="paramMap.thickness_request != null and paramMap.thickness_request != ''">
AND sub.thickness_request = #{paramMap.thickness_request}
</if>
<if test="paramMap.bill_type != null and paramMap.bill_type != '' and paramMap.bill_type == '0001'">
AND IFNULL(sub.sub_type,'') = ''
</if>
<if test="paramMap.sale_order_name != null and paramMap.sale_order_name != ''">
AND sub.sale_order_name = #{paramMap.sale_order_name}
</if>
<if test="paramMap.sap_pcsn != null and paramMap.sap_pcsn != ''">
AND sub.sap_pcsn = #{paramMap.sap_pcsn}
</if>
<if test="paramMap.bill_type != null and paramMap.bill_type != '' and paramMap.bill_type == '0007'">
AND sub.sub_type = '2'
</if>
<if test="paramMap.begin_time != null and paramMap.begin_time != ''">
AND mst.confirm_time <![CDATA[ >= ]]> #{paramMap.begin_time}
</if>
<if test="paramMap.end_time != null and paramMap.end_time != ''">
AND mst.confirm_time <![CDATA[ <= ]]> #{paramMap.end_time}
</if>
<if test="paramMap.with != null and paramMap.with != ''">
AND CONCAT( sub.thickness_request,'*',sub.width) = #{paramMap.with}
</if>
<if test="paramMap.classes == 1">
AND DATE_FORMAT( mst.confirm_time, '%H:%i:%s' ) <![CDATA[ >= ]]>'08:00:00' AND DATE_FORMAT( mst.confirm_time,
'%H:%i:%s' ) <![CDATA[ <= ]]> '19:59:59'
</if>
<if test="paramMap.classes == 2">
AND (DATE_FORMAT( mst.confirm_time, '%H:%i:%s' ) <![CDATA[ >= ]]>'20:00:00' AND DATE_FORMAT( mst.confirm_time,
'%H:%i:%s' ) <![CDATA[ <= ]]> '23:59:59'
OR
DATE_FORMAT( mst.confirm_time, '%H:%i:%s' ) <![CDATA[ >= ]]>'00:00:00' AND DATE_FORMAT( mst.confirm_time,
'%H:%i:%s' ) <![CDATA[ <= ]]> '07:59:59')
</if>
ORDER BY mst.confirm_time DESC, dis.box_no
</select>
<select id="selectPageLeftJoin3" resultType="org.nl.wms.stat.service.vo.InBillPageVo">
SELECT
mst.stor_name,
dis.sect_name,
dis.struct_code,
dis.struct_name,
mst.bill_type,
dis.box_no,
dis.pcsn,
sub.sap_pcsn,
sub.net_weight,
dis.qty_unit_name,
sub.customer_name,
sub.quanlity_in_box,
sub.customer_description,
sub.sale_order_name,
mst.input_time,
mst.confirm_time,
sub.date_of_production,
mst.input_optname,
sub.width,
sub.box_actual_net_weight,
sub.box_customer_sn,
sub.customer_material_code,
sub.customer_material_desc,
sub.customer_batch_number,
sub.customer_roll_name,
sub.roll_package_material_al_weight,
sub.roll_fc_weight,
sub.roll_remark,
sub.total_net_weight,
sub.net_weight_convert,
sub.gross_weight_convert,
sub.warranty_expire_date,
sub.thickness,
sub.box_weight,
sub.length,
sub.thickness_request,
sub.width_standard,
sub.mass_per_unit_area,
sub.demand_limit,
sub.standard_limit,
sub.actual_value,
mst.remark,
sub.container_name,
replace(CONCAT( sub.thickness_request, '*', sub.width_standard ),'.0','') AS spec,
CONCAT( sub.box_length,'*',sub.box_width,'*',sub.box_high) AS box_size
FROM
(
SELECT
MIN( a.iostorinvdis_id ) AS iostorinvdis_id
FROM
st_ivt_iostorinvdis a
LEFT JOIN st_ivt_iostorinv b ON a.iostorinv_id = b.iostorinv_id
WHERE
b.io_type = '0'
<if test="paramMap.bill_type != null and paramMap.bill_type != ''">
AND b.bill_type = #{paramMap.bill_type}
</if>
<if test="paramMap.pcsn != null and paramMap.pcsn != ''">
AND a.pcsn = #{paramMap.pcsn}
</if>
<if test="paramMap.begin_time != null and paramMap.begin_time != ''">
AND b.confirm_time <![CDATA[ >= ]]> #{paramMap.begin_time}
</if>
<if test="paramMap.end_time != null and paramMap.end_time != ''">
AND b.confirm_time <![CDATA[ <= ]]> #{paramMap.end_time}
</if>
AND b.bill_status = '99'
GROUP BY
pcsn
UNION
SELECT
MIN( a.iostorinvdis_id ) AS iostorinvdis_id
FROM
st_ivt_iostorinvdis a
LEFT JOIN st_ivt_iostorinv b ON a.iostorinv_id = b.iostorinv_id
WHERE
b.io_type = '0'
<if test="paramMap.new_bill_type != null and paramMap.new_bill_type != ''">
AND b.bill_type = #{paramMap.new_bill_type}
</if>
<if test="paramMap.pcsn != null and paramMap.pcsn != ''">
AND a.pcsn = #{paramMap.new_bill_type}
</if>
<if test="paramMap.begin_time != null and paramMap.begin_time != ''">
AND b.confirm_time <![CDATA[ >= ]]> #{paramMap.begin_time}
</if>
<if test="paramMap.end_time != null and paramMap.end_time != ''">
AND b.confirm_time <![CDATA[ <= ]]> #{paramMap.end_time}
</if>
AND b.bill_status = '99'
GROUP BY
pcsn
) AS c
LEFT JOIN st_ivt_iostorinvdis dis ON dis.iostorinvdis_id = c.iostorinvdis_id
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dis.iostorinv_id
INNER JOIN pdm_bi_subpackagerelation sub ON sub.container_name = dis.pcsn AND sub.package_box_sn =
dis.box_no
WHERE
mst.io_type = '0'
AND mst.is_delete = '0'
AND mst.bill_status = '99'
<if test="paramMap.stor_id != null and !paramMap.stor_id.isEmpty()">
AND mst.stor_id IN
<foreach collection="paramMap.stor_id" item="code" separator="," open="(" close=")">
#{code}
</foreach>
</if>
<if test="paramMap.product_area != null and !paramMap.product_area.isEmpty()">
AND LEFT(sub.container_name,2) IN
<foreach collection="paramMap.product_area" item="code" separator="," open="(" close=")">
#{code}
</foreach>
OR SUBSTRING(sub.container_name,2,2) IN
<foreach collection="paramMap.product_area" item="code" separator="," open="(" close=")">
#{code}
</foreach>
</if>
<if test="paramMap.thickness_request != null and paramMap.thickness_request != ''">
AND sub.thickness_request = #{paramMap.thickness_request}
</if>
<if test="paramMap.bill_type != null and paramMap.bill_type != '' and paramMap.bill_type == '0001'">
AND IFNULL(sub.sub_type,'') = ''
</if>
<if test="paramMap.sale_order_name != null and paramMap.sale_order_name != ''">
AND sub.sale_order_name = #{paramMap.sale_order_name}
</if>
<if test="paramMap.sap_pcsn != null and paramMap.sap_pcsn != ''">
AND sub.sap_pcsn = #{paramMap.sap_pcsn}
</if>
<if test="paramMap.bill_type != null and paramMap.bill_type != '' and paramMap.bill_type == '0007'">
AND sub.sub_type = '2'
</if>
<if test="paramMap.begin_time != null and paramMap.begin_time != ''">
AND mst.confirm_time <![CDATA[ >= ]]> #{paramMap.begin_time}
</if>
<if test="paramMap.end_time != null and paramMap.end_time != ''">
AND mst.confirm_time <![CDATA[ <= ]]> #{paramMap.end_time}
</if>
<if test="paramMap.with != null and paramMap.with != ''">
AND CONCAT( sub.thickness_request,'*',sub.width) = #{paramMap.with}
</if>
<if test="paramMap.classes == 1">
AND DATE_FORMAT( mst.confirm_time, '%H:%i:%s' ) <![CDATA[ >= ]]>'08:00:00' AND DATE_FORMAT( mst.confirm_time,
'%H:%i:%s' ) <![CDATA[ <= ]]> '19:59:59'
</if>
<if test="paramMap.classes == 2">
AND (DATE_FORMAT( mst.confirm_time, '%H:%i:%s' ) <![CDATA[ >= ]]>'20:00:00' AND DATE_FORMAT( mst.confirm_time,
'%H:%i:%s' ) <![CDATA[ <= ]]> '23:59:59'
OR
DATE_FORMAT( mst.confirm_time, '%H:%i:%s' ) <![CDATA[ >= ]]>'00:00:00' AND DATE_FORMAT( mst.confirm_time,
'%H:%i:%s' ) <![CDATA[ <= ]]> '07:59:59')
</if>
ORDER BY mst.confirm_time DESC, dis.box_no
</select>
<select id="getInBillData" resultType="org.nl.wms.stat.service.vo.InBillPageVo">
SELECT
mst.stor_name,

View File

@@ -228,6 +228,55 @@ public class StIvtIostorinvdisServiceImpl extends ServiceImpl<StIvtIostorinvdisM
}
}
@Override
public List<InBillPageVo> getInBillDatasNew(InBillPageParam paramMap) {
String begin_time = paramMap.getBegin_time();
String end_time = paramMap.getEnd_time();
if (ObjectUtil.isNotEmpty(paramMap.getBill_type())) {
paramMap.setNew_bill_type("0001".equals(paramMap.getBill_type()) ? "0007" : "-1");
}
// 处理时间
if (ObjectUtil.isNotEmpty(begin_time) && ObjectUtil.isNotEmpty(end_time)) {
String begin_time_today = begin_time.substring(0, 10);
String end_time_today = end_time.substring(0, 10);
// 开始时间
String today_begin_time = begin_time_today + " 08:00:00";
// 结束时间19:59:59
DateTime parse = DateUtil.parse(end_time_today);
String substring = DateUtil.offsetDay(parse, 1).toString().substring(0, 10);
String today_end_time = substring + " 07:59:59";
paramMap.setBegin_time(today_begin_time);
paramMap.setEnd_time(today_end_time);
}
return stIvtIostorinvdisMapper.getInBillDataNew(paramMap);
}
@Override
public IPage<InBillPageVo> getInBillPage3(InBillPageParam paramMap, PageQuery page) {
String begin_time = paramMap.getBegin_time();
String end_time = paramMap.getEnd_time();
if (ObjectUtil.isNotEmpty(paramMap.getBill_type())) {
paramMap.setNew_bill_type("0001".equals(paramMap.getBill_type()) ? "0007" : "-1");
}
// 处理时间
if (ObjectUtil.isNotEmpty(begin_time) && ObjectUtil.isNotEmpty(end_time)) {
String begin_time_today = begin_time.substring(0, 10);
String end_time_today = end_time.substring(0, 10);
// 开始时间
String today_begin_time = begin_time_today + " 08:00:00";
// 结束时间19:59:59
DateTime parse = DateUtil.parse(end_time_today);
String substring = DateUtil.offsetDay(parse, 1).toString().substring(0, 10);
String today_end_time = substring + " 07:59:59";
paramMap.setBegin_time(today_begin_time);
paramMap.setEnd_time(today_end_time);
}
IPage<InBillPageVo> pages = new Page<>(page.getPage() + 1, page.getSize());
pages = stIvtIostorinvdisMapper.selectPageLeftJoin3(pages, paramMap);
return pages;
}
@Override
public IPage<OutBillPageVo> getOutBillPage(OutBillPageParam paramMap, PageQuery page) {
// 空格查询

View File

@@ -15,6 +15,7 @@ import org.nl.common.constants.FieldConstant;
import org.nl.common.domain.query.PageQuery;
import org.nl.modules.common.exception.BadRequestException;
import org.nl.common.utils.SecurityUtils;
import org.nl.system.service.menu.dao.SysMenu;
import org.nl.system.service.menu.dao.mapper.SysMenuMapper;
import org.nl.system.service.role.ISysRoleService;
import org.nl.system.service.role.dao.SysRole;
@@ -131,10 +132,32 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
JSONObject object = menus.getJSONObject(i);
menuIds.add(object.getString("menuId"));
}
// 删除当前角色绑定的菜单
Set<String> allMenuIds = new HashSet<>(menuIds);
addAllParentMenus(allMenuIds);
roleMapper.deleteRoleMenuBatchRoleIds(Arrays.asList(roleId));
// 插入数据
roleMapper.insertRoleMenu(roleId, menuIds);
roleMapper.insertRoleMenu(roleId, allMenuIds);
}
private void addAllParentMenus(Set<String> menuIds) {
Set<String> menuIdsToQuery = new HashSet<>(menuIds);
// Map<String, SysMenu> menuMap = new HashMap<>();
while (!menuIdsToQuery.isEmpty()) {
List<String> queryList = new ArrayList<>(menuIdsToQuery);
menuIdsToQuery.clear();
List<SysMenu> menus = sysMenuMapper.selectBatchIds(queryList);
for (SysMenu menu : menus) {
// menuMap.put(menu.getMenu_id(), menu);
String pid = menu.getPid();
if (StringUtils.isNotEmpty(pid) && !"0".equals(pid) && !menuIds.contains(pid)) {
menuIds.add(pid);
menuIdsToQuery.add(pid);
}
}
}
}
@Override

View File

@@ -64,6 +64,8 @@ import org.nl.wms.pdm.bi.service.dto.SubpackagerelationDto;
import org.nl.wms.sch.manage.AbstractAcsTask;
import org.nl.wms.sch.tasks.CoolCutTask;
import org.nl.wms.st.instor.service.impl.ProductScrapServiceImpl;
import org.nl.wms.util.DateCalculateUtil;
import org.nl.wms.util.WeightUnitConverterUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -1229,7 +1231,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
String ProductName = param.getString("ProductName"); // 来源卷位置
String Description = param.getString("Description"); // 来源卷位置
String DateOfFGInbound = param.getString("DateOfFGInbound"); // 来源卷位置
String BoxWeight = param.getString("BoxWeight"); // 来源卷位置
String BoxWeight = param.getString("BoxWeight"); // 木箱净重
String BoxWeight2 = "";
if (ObjectUtil.isEmpty(BoxWeight) || param.getDoubleValue("BoxWeight") == 0) {
BoxWeight2 = "0";
@@ -1241,6 +1243,14 @@ public class MesToLmsServiceImpl implements MesToLmsService {
String box_high = param.getString("Attribute4"); // 木箱料号
String sub_type = param.getString("Attribute5"); // 包装关系类型
String ext_code = param.getString("Attribute6"); // 储存地点
String box_actual_net_weight = param.getString("BoxActualNetWeight"); // 实际木箱重量
String box_customer_sn = param.getString("BoxCustomerSN"); // 客户木箱唯一序列号
String customer_material_code = param.getString("CustomerMaterialCode"); // 客户木箱唯一序列号
String customer_material_desc = param.getString("CustomerMaterialDesc"); // 客户物料名称
BigDecimal total_net_weight = BigDecimal.ZERO;
JSONArray details = param.getJSONArray("details");
if (ObjectUtil.isEmpty(details)) {
throw new BadRequestException("明细为空");
@@ -1256,7 +1266,15 @@ public class MesToLmsServiceImpl implements MesToLmsService {
String Width = detail.getString("Width"); // 分切机台编码
String Thickness = detail.getString("Thickness"); // 分切组
String MassPerUnitArea = detail.getString("MassPerUnitArea"); // 生产顺序
String NetWeight = detail.getString("NetWeight"); // 生产订单
String NetWeight = detail.getString("NetWeight"); // 净重
if (NetWeight != null && NetWeight.matches("^\\d+(\\.\\d+)?$")) {
total_net_weight = total_net_weight.add(new BigDecimal(NetWeight));
} else {
// 处理非法数据如赋值为0、抛出业务异常、打印日志等
throw new BadRequestException("净重不为数字");
}
String Length = detail.getString("Length");
String DateOfProduction = detail.getString("DateOfProduction");
String isUnPlanProduction = detail.getString("isUnPlanProduction");
@@ -1272,6 +1290,11 @@ public class MesToLmsServiceImpl implements MesToLmsService {
String Attribute7 = detail.getString("Attribute7");//包装关系类型
String Attribute8 = detail.getString("Attribute8");//产品类型
int Attribute9 = detail.getIntValue("Attribute9");//接头数
String customer_batch_number = detail.getString("CustomerBatchNumber"); // 客户要求批号
String customer_roll_name = detail.getString("CustomerRollName"); // 子卷的客户卷号
String roll_package_material_al_weight = detail.getString("RollPackageMaterialAlWeight"); // 子卷铝箔袋重量
String roll_fc_weight = detail.getString("RollFCWeight"); // 子卷辅材重量
String roll_remark = detail.getString("RollRemark"); // 子卷备注
if (ObjectUtil.isNotEmpty(Attribute7) && "1".equals(Attribute7)) {
sub_type = "2";
}
@@ -1379,8 +1402,13 @@ public class MesToLmsServiceImpl implements MesToLmsService {
entity.setActual_value(actual_value);
entity.setQuanlity_in_box(NumberUtil.toBigDecimal(QuanlityInBox).setScale(2, RoundingMode.DOWN));
entity.setExt_code(ext_code);
entity.setBox_actual_net_weight(box_actual_net_weight);
entity.setBox_customer_sn(box_customer_sn);
entity.setCustomer_name(customer_material_code);
entity.setCustomer_material_desc(customer_material_desc);
BigDecimal boxWeightBigDecimal = new BigDecimal(BoxWeight).setScale(2, RoundingMode.DOWN);
BigDecimal boxWeightBigDecimal = new BigDecimal(BoxWeight);
entity.setBox_weight(boxWeightBigDecimal);
if (BigDecimal.ZERO.compareTo(boxWeightBigDecimal) == 0) {
BoxWeight2 = String.valueOf(NumberUtil.add(BoxWeight2, NetWeight));
@@ -1413,19 +1441,35 @@ public class MesToLmsServiceImpl implements MesToLmsService {
entity.setThickness_request(thickness_request);
entity.setMaterial_type(Attribute8);
entity.setJoint_type(String.valueOf(Attribute9));
entity.setCustomer_roll_name(customer_roll_name);
entity.setCustomer_batch_number(customer_batch_number);
entity.setRoll_package_material_al_weight(roll_package_material_al_weight);
entity.setRoll_fc_weight(roll_fc_weight);
entity.setRoll_remark(roll_remark);
entity.setStatus("0");
entity.setCreate_id(1L);
entity.setCreate_name("管理员");
entity.setCreate_time(DateUtil.now());
//计算
entity.setTotal_net_weight(total_net_weight);
entity.setNet_weight_convert(WeightUnitConverterUtil.convertKgToLbm(total_net_weight,2,RoundingMode.HALF_UP));
entity.setWarranty_expire_date(DateCalculateUtil.addDateWithDays(DateOfFGInbound,QualityGuaranPeriod));
// ========== 2. 插入数据替换原tab.insert(jo) ==========
pdmBiSubpackagerelationMapper.insert(entity);
PdmBiSubpackagerelation pdmBiSubpackagerelationUpdate = new PdmBiSubpackagerelation();
if (StrUtil.equals(BoxWeight, "0")) {
pdmBiSubpackagerelationUpdate.setBox_weight(NumberUtil.toBigDecimal(BoxWeight2).setScale(2, RoundingMode.DOWN));
pdmBiSubpackagerelationUpdate.setTotal_net_weight(total_net_weight);
pdmBiSubpackagerelationUpdate.setNet_weight_convert(WeightUnitConverterUtil.convertKgToLbm(total_net_weight,2,RoundingMode.HALF_UP));
pdmBiSubpackagerelationUpdate.setBox_weight(NumberUtil.toBigDecimal(BoxWeight2));
pdmBiSubpackagerelationUpdate.setGross_weight_convert(WeightUnitConverterUtil.convertKgToLbm(NumberUtil.toBigDecimal(BoxWeight2),2,RoundingMode.HALF_UP));
} else {
pdmBiSubpackagerelationUpdate.setBox_weight(NumberUtil.toBigDecimal(BoxWeight).setScale(2, RoundingMode.DOWN));
pdmBiSubpackagerelationUpdate.setTotal_net_weight(NumberUtil.toBigDecimal(NetWeight));
pdmBiSubpackagerelationUpdate.setNet_weight_convert(WeightUnitConverterUtil.convertKgToLbm(NumberUtil.toBigDecimal(NetWeight),2,RoundingMode.HALF_UP));
pdmBiSubpackagerelationUpdate.setBox_weight(NumberUtil.toBigDecimal(BoxWeight));
pdmBiSubpackagerelationUpdate.setGross_weight_convert(WeightUnitConverterUtil.convertKgToLbm(NumberUtil.toBigDecimal(BoxWeight),2,RoundingMode.HALF_UP));
}
pdmBiSubpackagerelationMapper.update(pdmBiSubpackagerelationUpdate, new LambdaUpdateWrapper<PdmBiSubpackagerelation>()
.eq(PdmBiSubpackagerelation::getPackage_box_sn, PackageBoxSN));

View File

@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelationrecord;
import org.nl.b_lms.pdm.subpackagerelation.service.IPdmBiSubpackagerelationrecordService;
@@ -156,6 +157,9 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
paramMap.setVbeln("");
paramMap.setFlag("1");
}
if (StringUtils.isNotBlank(paramMap.getBox_no())) {
paramMap.setFlag("1");
}
//获取人员对应的仓库
List<String> storIds = bsrealstorattrService.getStoreForUser(SecurityUtils.getCurrentUserId());
paramMap.setIn_stor_id(storIds);

View File

@@ -46,6 +46,12 @@ public class InBillQueryController {
return new ResponseEntity<>(TableDataInfo.build(inBillQueryService.getPage2(whereJson, page)), HttpStatus.OK);
}
@GetMapping(value = "/query3")
@Log("新查询3")
public ResponseEntity<Object> query3(InBillPageParam whereJson, PageQuery page) {
return new ResponseEntity<>(TableDataInfo.build(inBillQueryService.getPage3(whereJson, page)), HttpStatus.OK);
}
@Log("导出数据")
@GetMapping(value = "/download")
public void download(@RequestParam Map map, HttpServletResponse response, String[] product_area) throws IOException {
@@ -57,4 +63,11 @@ public class InBillQueryController {
public void downloadInBillTable(HttpServletResponse response, InBillPageParam whereJson, PageQuery page) throws IOException {
inBillQueryService.downloadInBillTable(response, whereJson, page);
}
@GetMapping(value = "/download3")
@Log("导出成品入库数据新")
public void downloadInBillTableNew(HttpServletResponse response, InBillPageParam whereJson, PageQuery page) throws IOException {
inBillQueryService.downloadInBillTableNew(response, whereJson, page);
}
}

View File

@@ -66,6 +66,8 @@ public interface InBillQueryService {
IPage<InBillPageVo> getPage2(InBillPageParam whereJson, PageQuery page);
IPage<InBillPageVo> getPage3(InBillPageParam whereJson, PageQuery page);
/**
*
* @param whereJson
@@ -73,4 +75,14 @@ public interface InBillQueryService {
* @return
*/
void downloadInBillTable(HttpServletResponse response, InBillPageParam whereJson, PageQuery page) throws IOException;
/**
*
* @param whereJson
* @param page
* @return
*/
void downloadInBillTableNew(HttpServletResponse response, InBillPageParam whereJson, PageQuery page) throws IOException;
}

View File

@@ -190,6 +190,11 @@ public class InBillQueryServiceImpl implements InBillQueryService {
return iostorinvdisService.getInBillPage(whereJson, page);
}
@Override
public IPage<InBillPageVo> getPage3(InBillPageParam whereJson, PageQuery page) {
return iostorinvdisService.getInBillPage3(whereJson, page);
}
@Override
public List<PointDto> queryAll(Map whereJson) {
WQLObject wo = WQLObject.getWQLObject("sch_base_point");
@@ -655,5 +660,41 @@ public class InBillQueryServiceImpl implements InBillQueryService {
}
@Override
public void downloadInBillTableNew(HttpServletResponse response, InBillPageParam whereJson, PageQuery page) throws IOException {
List<Map<String, Object>> list = new ArrayList<>();
List<InBillPageVo> inBillPageVos = iostorinvdisService.getInBillDatasNew(whereJson);
for (int i = 0; i < inBillPageVos.size(); i++) {
InBillPageVo billPageVo = inBillPageVos.get(i);
Map<String, Object> mp = new LinkedHashMap<>();
mp.put("成品卷号 \nSub-roll number", billPageVo.getContainer_name());
mp.put("入库日期\nWarehousing date", billPageVo.getConfirm_time());
mp.put("装箱日期\nPacking date", billPageVo.getDate_of_production().replace("-", "/"));
mp.put("客户名称\nCustomer name", billPageVo.getCustomer_description());
try {
mp.put("订单号\nPO number", billPageVo.getSale_order_name().substring(0, billPageVo.getSale_order_name().indexOf("-")));
} catch (Exception e) {
mp.put("订单号\nPO number", billPageVo.getSale_order_name());
}
mp.put("批号\nBatch number", billPageVo.getCustomer_batch_number());
mp.put("物料号\nMaterial number", billPageVo.getCustomer_material_code());
mp.put("箱号\nBox number", billPageVo.getBox_no());
mp.put("客户箱号/序列号\nCustomer Box number/Serial number", billPageVo.getBox_customer_sn() );
mp.put("客户卷号\nCustomer Roll Number", billPageVo.getCustomer_roll_name());
mp.put("客户要求厚度\n", billPageVo.getThickness_request());
mp.put("客户要求幅宽\n", billPageVo.getWidth_standard());
mp.put("规格\nSpec", billPageVo.getSpec());
mp.put("子卷净重\nRoll net weight", NumberUtil.round(StrUtil.isEmpty(billPageVo.getNet_weight()) ? "0" : billPageVo.getNet_weight(), 1));
mp.put("米数(长度)\nLength", NumberUtil.round(StrUtil.isEmpty(billPageVo.getLength()) ? "0" : billPageVo.getLength(), 1));
mp.put("净重合计\nTotal net weight",billPageVo.getTotal_net_weight());
mp.put("毛重合计\nTotal gross weight", NumberUtil.round(StrUtil.isEmpty(billPageVo.getBox_weight()) ? "0" : billPageVo.getBox_weight(), 1));
mp.put("备注\n", billPageVo.getRoll_remark());
mp.put("净重转换\nnet weight convert",billPageVo.getNet_weight_convert());
mp.put("毛重转换\ngross weight convert",billPageVo.getGross_weight_convert());
mp.put("质保截止日期\n",billPageVo.getWarranty_expire_date());
list.add(mp);
}
FileUtil.downloadExcel(list, response);
}
}

View File

@@ -75,4 +75,19 @@ public class InBillPageVo {
private String box_size;
/** 日期 */
private String confirm_time_class;
private String box_customer_sn;
private String customer_material_code;
private String customer_material_desc;
private String customer_batch_number;
private String customer_roll_name;
private String roll_package_material_al_weight;
private String roll_fc_weight;
private String roll_remark;
private String total_net_weight;
private String net_weight_convert;
private String gross_weight_convert;
private String warranty_expire_date;
private String container_name;
private String spec;
}

View File

@@ -0,0 +1,61 @@
package org.nl.wms.util;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import org.nl.modules.common.exception.BadRequestException;
/**
* 日期工具类移除RegexUtil基于Hutool DateUtil实现 「字符串日期 + 字符串天数」的计算
*/
public class DateCalculateUtil {
// 优化点:提取日期格式为常量,便于后续修改,符合规范
private static final String DATE_PATTERN = "yyyy-MM-dd";
/**
* 计算指定日期加上指定天数后的结果(输入输出均为字符串格式)
* @param dateStr 原始日期字符串格式yyyy-MM-dd如2022-12-24
* @param daysStr 天数字符串(格式:数字+天如90天、120天
* @return 相加后的日期字符串格式yyyy-MM-dd
* @throws BadRequestException 入参为空/格式非法/转换失败时抛出自定义业务异常
*/
public static String addDateWithDays(String dateStr, String daysStr) {
// 1. 非空校验
if (StrUtil.isEmpty(dateStr)) {
throw new BadRequestException("原始日期字符串不能为空要求格式为yyyy-MM-dd");
}
if (StrUtil.isEmpty(daysStr)) {
throw new BadRequestException("天数字符串不能为空,要求格式为「数字+天」如90天");
}
// 2. 解析原始日期字符串为Date对象显式指定格式更严谨
java.util.Date originalDate;
try {
originalDate = DateUtil.parse(dateStr, DATE_PATTERN);
} catch (Exception e) {
// 优化点:统一抛出自定义业务异常,异常信息更友好,便于前端展示
throw new BadRequestException("原始日期格式非法要求格式为yyyy-MM-dd当前输入" + dateStr);
}
// 3. 替代RegexUtil提取daysStr中的纯数字处理"90天"、" 120天 "等格式)
// 步骤1先去除前后空格再替换所有非数字字符为空只保留数字
String pureNumStr = daysStr.trim().replaceAll("\\D", "");
// 步骤2判断提取后是否为空无有效数字
if (StrUtil.isEmpty(pureNumStr)) {
throw new BadRequestException("天数格式非法,要求格式为「数字+天」如90天当前输入" + daysStr);
}
// 步骤3转换为整数
int days;
try {
days = Integer.parseInt(pureNumStr);
} catch (NumberFormatException e) {
// 优化点统一抛出自定义业务异常避免抛出原生IllegalArgumentException
throw new BadRequestException("提取的天数无法转换为有效整数,当前输入:" + daysStr);
}
// 4. 核心使用DateUtil.offsetDay()添加天数
java.util.Date resultDate = DateUtil.offsetDay(originalDate, days);
// 5. 格式化结果日期为字符串
return DateUtil.format(resultDate, DATE_PATTERN);
}
}

View File

@@ -0,0 +1,55 @@
package org.nl.wms.util;
import org.nl.modules.common.exception.BadRequestException;
import java.math.BigDecimal;
import java.math.RoundingMode;
/**
* 重量单位转换工具类kg千克→ lbm
*/
public class WeightUnitConverterUtil {
// 核心换算常量1 kg = 2.20462262185 lbm用BigDecimal存储保证精度不可修改
private static final BigDecimal KG_TO_LBM_RATIO = new BigDecimal("2.20462262185");
// 优化点:提取默认小数位数为常量,便于后续修改
private static final int DEFAULT_SCALE = 4;
/**
* 千克kg转换为磅lbm- 默认保留4位小数四舍五入RoundingMode.HALF_UP
* @param kg 待转换的千克数BigDecimal类型不可为null
* @return 转换后的磅数BigDecimal
* @throws BadRequestException 入参为null时抛出自定义业务异常
*/
public static BigDecimal convertKgToLbm(BigDecimal kg) {
// 1. 非空校验优化点统一抛出自定义业务异常替换原生NullPointerException
if (kg == null) {
throw new BadRequestException("入参kg千克数不能为null");
}
// 2. 核心转换kg × 换算常量默认保留4位小数四舍五入
return kg.multiply(KG_TO_LBM_RATIO).setScale(DEFAULT_SCALE, RoundingMode.HALF_UP);
}
/**
* 千克kg转换为磅lbm- 支持自定义保留小数位数和舍入模式
* @param kg 待转换的千克数BigDecimal类型不可为null
* @param scale 保留的小数位数
* @param roundingMode 舍入模式如RoundingMode.HALF_UP四舍五入
* @return 转换后的磅数BigDecimal
* @throws BadRequestException 入参为null/小数位数为负数时抛出自定义业务异常
*/
public static BigDecimal convertKgToLbm(BigDecimal kg, int scale, RoundingMode roundingMode) {
// 1. 非空校验
if (kg == null) {
throw new BadRequestException("入参kg千克数不能为null");
}
if (roundingMode == null) {
throw new BadRequestException("入参roundingMode舍入模式不能为null");
}
// 2. 校验小数位数合法性(不能为负数)
if (scale < 0) {
throw new BadRequestException("保留小数位数scale不能为负数当前输入" + scale);
}
// 3. 核心转换kg × 换算常量,自定义精度和舍入模式
return kg.multiply(KG_TO_LBM_RATIO).setScale(scale, roundingMode);
}
}

View File

@@ -49,6 +49,8 @@ var config = {
"mesErrorTitle": "MES Error"
},
"common": {
"warranty_expire_date":"warranty expire date",
"spec": "Specification",
"warehousing_time": "Warehousing Time",
"stock_age": "Stock Age",
"produce_age": "Production Duration (Days)",
@@ -573,6 +575,19 @@ var config = {
"pleaseSelectBusinessType": "Please select business type!",
"pleaseSelectWarehouse": "Please select warehouse!",
"doNotAllowAddingSameMaterial": "Adding the same material is not allowed!",
"instorgeDate": "Inbound Date",
"materialNumber": "Material Number",
"customerBoxNumber": "Customer Box Number/Serial Number",
"customerRollNumber": "Customer Roll Number",
"customerRequiredThickness": "Customer Required Thickness",
"subRollNetWeight": "Sub-Roll Net Weight",
"meterage": "Meterage (Length)",
"totalNetWeight": "Total Net Weight",
"totalGrossWeight": "Total Gross Weight",
"packingDate": "Packing Date",
"netWeightConvert": "Net Weight Conversion",
"grossWeightConvert": "Gross Weight Conversion",
"finishedProductRollNumber": "Finished Product Roll Number",
"outStorIdCannotBeEmpty": "Transfer in warehouse cannot be empty!"
},
"task": {
@@ -2820,7 +2835,9 @@ var config = {
"update_name": "Modifier",
"update_time": "Update Time",
"ext_id": "External ID",
"top_dept": "Top Department"
"top_dept": "顶级部门",
"parent_dept":"上级部门",
"select_dept_category":"选择部门类目"
},
"sys_dict": {
"code": "Code",

View File

@@ -48,6 +48,8 @@ var config = {
"load_text5": "Hanya dapat mengunggah satu file excel!"
},
"common": {
"warranty_expire_date":"Tanggal Berakhir Garansi",
"spec": "Spesifikasi",
"warehousing_time": "Waktu Pemasukan Gudang",
"stock_age": "Usia Inventaris",
"produce_age": "Durasi Produksi (hari)",
@@ -572,6 +574,19 @@ var config = {
"pleaseSelectBusinessType": "Silakan pilih jenis bisnis!",
"pleaseSelectWarehouse": "Silakan pilih gudang!",
"doNotAllowAddingSameMaterial": "Tidak boleh menambahkan material yang sama!",
"instorgeDate": "Tanggal Masuk Gudang",
"materialNumber": "Nomor Material",
"customerBoxNumber": "Nomor Kotak/Nomor Seri Pelanggan",
"customerRollNumber": "Nomor Gulungan Pelanggan",
"customerRequiredThickness": "Ketebalan yang Diminta Pelanggan",
"subRollNetWeight": "Berat Bersih Sub-Gulungan",
"meterage": "Meteran (Panjang)",
"totalNetWeight": "Total Berat Bersih",
"totalGrossWeight": "Total Berat Kotor",
"packingDate": "Tanggal Pengepakan",
"netWeightConvert": "Konversi Berat Bersih",
"grossWeightConvert": "Konversi Berat Kotor",
"finishedProductRollNumber": "Nomor Gulungan Produk Jadi",
"outStorIdCannotBeEmpty": "Gudang masuk tidak boleh kosong!"
},
"task": {
@@ -2814,9 +2829,11 @@ var config = {
"is_used": "Status",
"name": "Nama",
"pid": "Departemen Atasan",
"sub_count": "Jumlah Sub Departemen",
"update_name": "Pengubah",
"update_time": "Waktu Pembaruan"
"update_time": "Waktu Pembaruan",
"top_dept": "Departemen Puncak",
"parent_dept": "Departemen Induk",
"select_dept_category": "Pilih Kategori Departemen"
},
"sys_dict": {
"code": "Kode",

View File

@@ -93,6 +93,8 @@ var config = {
"correspondingDeepLocationError": "对应的深货位错误!"
},
"common": {
"warranty_expire_date":"质保截止日期",
"spec":"规格",
"warehousing_time":"入库时间",
"stock_age":"库龄",
"produce_age":"生产时长(天)",
@@ -617,7 +619,20 @@ var config = {
"pleaseSelectBusinessType": "请选择业务类型!",
"pleaseSelectWarehouse": "请选择仓库!",
"doNotAllowAddingSameMaterial": "不允许添加相同物料!",
"outStorIdCannotBeEmpty": "移入仓库不能为空!"
"outStorIdCannotBeEmpty": "移入仓库不能为空!",
"instorgeDate": "入库日期",
"materialNumber": "物料号",
"customerBoxNumber": "客户箱号/序列号",
"customerRollNumber": "客户卷号",
"customerRequiredThickness": "客户要求厚度",
"subRollNetWeight": "子卷净重",
"meterage": "米数(长度)",
"totalNetWeight": "净重合计",
"totalGrossWeight": "毛重合计",
"packingDate": "装箱日期",
"netWeightConvert": "净重转换",
"grossWeightConvert": "毛重转换",
"finishedProductRollNumber": "成品卷号"
},
"task": {
"status": {
@@ -2864,7 +2879,9 @@ var config = {
"update_name": "修改者",
"update_time": "更新时间",
"ext_id": "外部标识",
"top_dept": "顶级部门"
"top_dept": "顶级部门",
"parent_dept":"上级部门",
"select_dept_category":"选择部门类目"
},
"sys_dict": {
"code": "编码",

View File

@@ -85,25 +85,6 @@
<el-input v-model="form.ext_id" style="width: 200px;" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :label="$t('wms.basedata.master.material.materialCategory')" prop="material_type_id">
<el-select
v-model="form.material_type_id"
size="mini"
:placeholder="$t('wms.basedata.master.material.pleaseSelect')"
class="filter-item"
>
<el-option
v-for="item in dict.material_type"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item :label="$t('wms.basedata.master.material.isEnabled')" prop="is_used">
<el-radio v-model="form.is_used" label="0">{{ $t('wms.basedata.master.material.no') }}</el-radio>
@@ -111,6 +92,9 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8" />
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">{{ $t('wms.basedata.master.material.cancel') }}</el-button>
@@ -130,8 +114,6 @@
<el-table-column prop="material_name" :label="$t('wms.basedata.master.material.materialName')" width="180" show-overflow-tooltip />
<el-table-column prop="material_spec" :label="$t('wms.basedata.master.material.materialSpecification')" width="140" />
<el-table-column prop="material_model" :label="$t('wms.basedata.master.material.materialModel')" />
<el-table-column prop="class_code" :label="$t('wms.basedata.master.material.materialClassCode')" width="120" />
<el-table-column prop="class_name" :label="$t('wms.basedata.master.material.materialClass')" width="140" />
<el-table-column prop="unit_name" :label="$t('wms.basedata.master.material.measureUnit')" />
<el-table-column prop="standing_time" :label="$t('wms.basedata.master.material.standingTimeMinutes')" width="130px" />
<el-table-column :label="$t('wms.basedata.master.material.enabled')" align="center" prop="is_used">

View File

@@ -11,16 +11,16 @@
<span slot="title" class="dialog-footer">
<div class="crud-opts2">
<span class="el-dialog__title2">{{$t('common.outboundAllocation')}}</span>
<span class="el-dialog__title2">{{ $t('common.outboundAllocation') }}</span>
<span class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left" />
<el-button slot="left" type="info" @click="dialogVisible = false">{{$t('common.close')}}</el-button>
<el-button slot="left" type="info" @click="dialogVisible = false">{{ $t('common.close') }}</el-button>
</span>
</div>
</span>
<div class="crud-opts2">
<span class="role-span">{{$t('common.outboundDetails')}}</span>
<span class="role-span">{{ $t('common.outboundDetails') }}</span>
<div class="crud-opts-form">
<el-form ref="form" :inline="true" :model="form" size="mini">
<el-form-item :label="$t('common.warehouseArea')" prop="gender2">
@@ -46,7 +46,7 @@
size="mini"
@click="allDiv()"
>
{{$t('common.allocateAll')}}
{{ $t('common.allocateAll') }}
</el-button>
<el-button
slot="left"
@@ -57,7 +57,7 @@
size="mini"
@click="allCancel()"
>
{{$t('common.cancelAll')}}
{{ $t('common.cancelAll') }}
</el-button>
<el-button
v-if="this.mstrow.bill_type !== '1011'"
@@ -70,7 +70,7 @@
:disabled="button1"
@click="oneDiv()"
>
{{$t('common.autoAllocate')}}
{{ $t('common.autoAllocate') }}
</el-button>
<el-button
v-if="this.mstrow.bill_type !== '1011'"
@@ -83,7 +83,7 @@
:disabled="button2"
@click="oneCancel()"
>
{{$t('common.autoCancel')}}
{{ $t('common.autoCancel') }}
</el-button>
<el-button
slot="left"
@@ -95,7 +95,7 @@
:disabled="button3"
@click="openStructIvt"
>
{{$t('common.manualAllocate')}}
{{ $t('common.manualAllocate') }}
</el-button>
<el-button
v-if="this.mstrow.bill_type !== '1011'"
@@ -107,7 +107,7 @@
size="mini"
@click="allSetPointAllDtl"
>
{{$t('common.oneClickSetting')}}
{{ $t('common.oneClickSetting') }}
</el-button>
</span>
</div>
@@ -140,28 +140,28 @@
</el-table>
</el-card>
<div class="crud-opts2">
<span class="role-span">{{$t('common.allocationDetails')}}</span>
<span class="role-span">{{ $t('common.allocationDetails') }}</span>
<div class="crud-opts-form">
<el-form ref="form2" :inline="true" :model="form2" size="mini">
<el-form-item :label="$t('common.toBeAllocated')" prop="unassign_qty" />
<el-input-number
v-model="form2.unassign_qty"
style="width: 100px;"
:controls="false"
:precision="3"
:min="0"
disabled
/>
<el-input-number
v-model="form2.unassign_qty"
style="width: 100px;"
:controls="false"
:precision="3"
:min="0"
disabled
/>
</el-form-item>
<el-form-item :label="$t('common.alreadyAllocated')" prop="assign_qty" />
<el-input-number
v-model="form2.assign_qty"
style="width: 100px;"
:controls="false"
:precision="3"
:min="0"
disabled
/>
<el-input-number
v-model="form2.assign_qty"
style="width: 100px;"
:controls="false"
:precision="3"
:min="0"
disabled
/>
</el-form-item>
<el-form-item v-if="mstrow.stor_id !== '1582991156504039455'" :label="$t('common.outboundPoint')" prop="point_code">
<el-select
@@ -180,11 +180,11 @@
</el-select>
</el-form-item>
<el-form-item prop="checked">
<el-checkbox v-if="mstrow.stor_id !== '1582991156504039455'" v-model="checked">{{$t('common.isAbnormalOutbound')}}</el-checkbox>
<el-checkbox v-if="mstrow.stor_id !== '1582991156504039455'" v-model="checked">{{ $t('common.isAbnormalOutbound') }}</el-checkbox>
</el-form-item>
<el-form-item :label="$t('common.overdueShipment') + ':'" prop="is_overdue">
<el-radio v-model="rowmst.is_overdue" label="1" :disabled="rowmst.bill_status === '40'" @change="updataIsOverdue">{{$t('common.doNotShipOverdue')}}</el-radio>
<el-radio v-model="rowmst.is_overdue" label="0" :disabled="rowmst.bill_status === '40'" @change="updataIsOverdue">{{$t('common.shipOverdue')}}</el-radio>
<el-radio v-model="rowmst.is_overdue" label="1" :disabled="rowmst.bill_status === '40'" @change="updataIsOverdue">{{ $t('common.doNotShipOverdue') }}</el-radio>
<el-radio v-model="rowmst.is_overdue" label="0" :disabled="rowmst.bill_status === '40'" @change="updataIsOverdue">{{ $t('common.shipOverdue') }}</el-radio>
</el-form-item>
<!--<el-form-item label="超期数量:" prop="assign_qty" v-if="rowmst.is_overdue === '1'">
<el-input-number
@@ -223,7 +223,7 @@
:disabled="button4"
@click="oneSetPoint2"
>
{{$t('common.setSite')}}
{{ $t('common.setSite') }}
</el-button>
<el-button
v-if="this.mstrow.bill_type !== '1011'"
@@ -236,7 +236,7 @@
size="mini"
@click="allSetPoint"
>
{{$t('common.oneClickSetting')}}
{{ $t('common.oneClickSetting') }}
</el-button>
<el-button
v-if="this.mstrow.bill_type === '1011'"
@@ -249,7 +249,7 @@
size="mini"
@click="saveUpdate"
>
{{$t('common.saveChanges')}}
{{ $t('common.saveChanges') }}
</el-button>
</span>
</div>
@@ -639,15 +639,15 @@ export default {
},
oneSetPoint2() {
if (this.form2.point_code === '') {
this.crud.notify('请先选择站点!', CRUD.NOTIFICATION_TYPE.INFO)
this.crud.notify(this.$t('common.pleaseSelectSiteFirst'), CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (this.currentDis.point_code) {
this.crud.notify('站点已设置!', CRUD.NOTIFICATION_TYPE.INFO)
this.crud.notify(this.$t('common.siteHasBeenSet'), CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (this.currentDis.work_status !== '00') {
this.crud.notify('任务已生成!', CRUD.NOTIFICATION_TYPE.INFO)
this.crud.notify(this.$t('common.taskAlreadyGenerated'), CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.loadingSetPoint = true
@@ -667,7 +667,7 @@ export default {
allSetPoint() {
if (this.mstrow.stor_id !== '1582991156504039455') {
if (this.form2.point_code === '') {
this.crud.notify('请先选择站点!', CRUD.NOTIFICATION_TYPE.INFO)
this.crud.notify(this.$t('common.pleaseSelectSiteFirst'), CRUD.NOTIFICATION_TYPE.INFO)
return
}
}
@@ -681,7 +681,7 @@ export default {
this.currentRow.stor_id = this.mstrow.stor_id
checkoutbill.allSetPoint(this.currentRow).then(res => {
this.queryTableDdis(this.currentRow.iostorinvdtl_id)
this.crud.notify('设置成功!', CRUD.NOTIFICATION_TYPE.INFO)
this.crud.notify(this.$t('common.settingSuccessful'), CRUD.NOTIFICATION_TYPE.INFO)
this.loadingSetAllPoint = false
}).catch(() => {
this.loadingSetAllPoint = false
@@ -709,7 +709,7 @@ export default {
allSetPointAllDtl() {
if (this.mstrow.stor_id !== '1582991156504039455') {
if (this.form2.point_code === '') {
this.crud.notify('请先选择站点!', CRUD.NOTIFICATION_TYPE.INFO)
this.crud.notify(this.$t('common.pleaseSelectSiteFirst'), CRUD.NOTIFICATION_TYPE.INFO)
return
}
}
@@ -723,7 +723,7 @@ export default {
}
checkoutbill.allSetPoint(data).then(res => {
this.queryTableDdis(this.currentRow.iostorinvdtl_id)
this.crud.notify('设置成功!', CRUD.NOTIFICATION_TYPE.INFO)
this.crud.notify(this.$t('common.settingSuccessful'), CRUD.NOTIFICATION_TYPE.INFO)
this.loadingSetAllPoint = false
}).catch(() => {
this.loadingSetAllPoint = false

View File

@@ -0,0 +1,412 @@
<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="90px"
label-suffix=":"
>
<el-form-item :label="$t('common.stor_name')">
<el-select
v-model="query.stor_id"
clearable
collapse-tags
multiple
size="mini"
:placeholder="$t('common.Please_select')"
class="filter-item"
>
<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="$t('st_ivt_structivtchange.buss_type')">
<el-select
v-model="query.bill_type"
clearable
filterable
size="mini"
:placeholder="$t('st_ivt_structivtchange.buss_type')"
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="$t('st_ivt_coolpointivt.instorage_time')">
<el-date-picker
v-model="query.createTime"
type="daterange"
value-format="yyyy-MM-dd HH:mm:ss"
:start-placeholder="$t('common.startDate')"
:end-placeholder="$t('common.endDate')"
:default-time="['00:00:00', '23:59:59']"
/>
</el-form-item>
<el-form-item :label="$t('common.width')">
<el-input
v-model="query.with"
size="mini"
clearable
placeholder="例如8*868"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item :label="$t('common.thickness')">
<el-input
v-model="query.thickness_request"
size="mini"
clearable
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item :label="$t('common.container_name')">
<el-input
v-model="query.pcsn"
size="mini"
clearable
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label-width="120" :label="$t('pdm_bi_containerinfo.sale_order_name')">
<el-input
v-model="query.sale_order_name"
size="mini"
clearable
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item :label="$t('common.product_area')">
<el-select
v-model="query.product_area"
clearable
multiple
size="mini"
class="filter-item"
>
<el-option
v-for="item in dict.product_area"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('status.virtual_warehouse')">
<el-select
v-model="query.is_virtual"
clearable
size="mini"
:placeholder="$t('common.Please_select')"
class="filter-item"
@change="crud.toQuery"
>
<el-option
v-for="item in dict.IS_OR_NOT"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('st_ivt_iostorinv.shift')">
<el-select
v-model="query.classes"
clearable
size="mini"
:placeholder="$t('common.Please_select')"
class="filter-item"
@change="crud.toQuery"
>
<el-option
v-for="item in classes"
:key="item.id"
:label="item.code"
:value="item.id"
/>
</el-select>
</el-form-item>
<!-- <el-form-item :label="$t('common.is_summary')">
<el-select
v-model="query.is_all"
clearable
size="mini"
:placeholder="$t('common.Please_select')"
class="filter-item"
@change="crud.toQuery"
>
<el-option
v-for="item in dict.IS_OR_NOT"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>-->
<el-form-item style="display: flex; justify-content: flex-end;">
<rrOperation />
</el-form-item>
</el-form>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission">
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-thumb"
size="mini"
:loading="showDtlLoading"
@click="downdtl"
>
{{ $t('common.Export') }}
</el-button>
</crudOperation>
<!--表格渲染-->
<el-table
ref="table"
v-loading="crud.loading"
size="mini"
:data="crud.data"
highlight-current-row
style="width: 100%;"
>
<el-table-column
show-overflow-tooltip
prop="container_name"
:label="$t('common.finishedProductRollNumber')"
:min-width="flexWidth('container_name',crud.data,$t('common.finishedProductRollNumber'))"
/>
<el-table-column
show-overflow-tooltip
prop="confirm_time"
:label="$t('common.instorgeDate')"
:min-width="flexWidth('confirm_time',crud.data,$t('common.instorgeDate'))"
/>
<el-table-column
show-overflow-tooltip
prop="date_of_production"
:label="$t('common.packingDate')"
:min-width="flexWidth('date_of_production',crud.data,$t('common.packingDate'))"
/>
<el-table-column
show-overflow-tooltip
prop="customer_description"
:label="$t('common.customerName')"
:min-width="flexWidth('customer_description',crud.data,$t('common.customerName'))"
/>
<el-table-column
show-overflow-tooltip
prop="sale_order_name"
:label="$t('common.orderNumber')"
:min-width="flexWidth('sale_order_name',crud.data,$t('common.orderNumber'))"
/>
<el-table-column
show-overflow-tooltip
prop="customer_batch_number"
:label="$t('common.batchNumber')"
:min-width="flexWidth('customer_batch_number',crud.data,$t('common.batchNumber'))"
/>
<el-table-column
show-overflow-tooltip
prop="customer_material_code"
:label="$t('common.materialNumber')"
:min-width="flexWidth('customer_material_code',crud.data,$t('common.materialNumber'))"
/>
<el-table-column
show-overflow-tooltip
prop="box_no"
:label="$t('common.boxNumber')"
:min-width="flexWidth('box_no',crud.data,$t('common.boxNumber'))"
/>
<el-table-column
show-overflow-tooltip
prop="box_customer_sn"
:label="$t('common.customerBoxNumber')"
:min-width="flexWidth('box_customer_sn',crud.data,$t('common.customerBoxNumber'))"
/>
<el-table-column
show-overflow-tooltip
prop="customer_roll_name"
:label="$t('common.customerRollNumber')"
:min-width="flexWidth('customer_roll_name',crud.data,$t('common.customerRollNumber'))"
/>
<el-table-column
show-overflow-tooltip
prop="thickness_request"
:label="$t('common.customerRequiredThickness')"
:min-width="flexWidth('thickness_request',crud.data,$t('common.customerRequiredThickness'))"
/>
<el-table-column
show-overflow-tooltip
prop="width_standard"
:label="$t('wms.pdm.bi.requiredWidth')"
:formatter="crud.formatNum0"
:min-width="flexWidth('width_standard',crud.data,$t('wms.pdm.bi.requiredWidth'))"
/>
<el-table-column
show-overflow-tooltip
prop="spec"
:label="$t('common.spec')"
:min-width="flexWidth('spec',crud.data,$t('common.spec'))"
/>
<el-table-column
show-overflow-tooltip
prop="net_weight"
:label="$t('common.subRollNetWeight')"
:formatter="crud.formatNum2"
:min-width="flexWidth('net_weight',crud.data,$t('common.subRollNetWeight'))"
/>
<el-table-column
show-overflow-tooltip
prop="length"
:label="$t('common.meterage')"
:formatter="crud.formatNum2"
:min-width="flexWidth('length',crud.data,$t('common.meterage'))"
/>
<el-table-column
show-overflow-tooltip
prop="total_net_weight"
:label="$t('common.totalNetWeight')"
:formatter="crud.formatNum2"
:min-width="flexWidth('total_net_weight',crud.data,$t('common.totalNetWeight'))"
/>
<el-table-column
show-overflow-tooltip
prop="box_weight"
:label="$t('common.totalGrossWeight')"
:formatter="crud.formatNum2"
:min-width="flexWidth('box_weight',crud.data,$t('common.totalGrossWeight'))"
/>
<el-table-column
show-overflow-tooltip
prop="roll_remark"
:label="$t('common.remark')"
:min-width="flexWidth('roll_remark',crud.data,$t('common.remark'))"
/>
<el-table-column
show-overflow-tooltip
prop="net_weight_convert"
:label="$t('common.netWeightConvert')"
:min-width="flexWidth('net_weight_convert',crud.data,$t('common.netWeightConvert'))"
/>
<el-table-column
show-overflow-tooltip
prop="gross_weight_convert"
:label="$t('common.grossWeightConvert')"
:min-width="flexWidth('gross_weight_convert',crud.data,$t('common.grossWeightConvert'))"
/>
<el-table-column
show-overflow-tooltip
prop="warranty_expire_date"
:label="$t('common.warranty_expire_date')"
:min-width="flexWidth('warranty_expire_date',crud.data,$t('common.warranty_expire_date'))"
/>
</el-table>
<!--分页组件-->
<pagination />
</div>
</div>
</template>
<script>
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 DateRangePicker from '@/components/DateRangePicker/index'
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
import crudInbillquery from '@/views/wms/stat/inbillquery/inbillquery'
import { download } from '@/api/data'
import { downloadFile } from '@/utils'
export default {
name: 'InQuery3',
components: { crudOperation, rrOperation, udOperation, pagination, DateRangePicker },
cruds() {
return CRUD({
title: '',
optShow: { add: false, reset: true },
idField: 'iostorinv_id',
url: '/api/in/InQuery/query3',
query: { 'is_all': '0', 'bill_type': '0001', 'createTime': [new Date(), new Date()], 'stor_id': '1582991156504039424' },
crudMethod: { ...crudInbillquery }
})
},
mixins: [presenter(), header(), crud()],
// 数据字典
dicts: ['io_bill_status', 'ST_INV_IN_TYPE', 'product_area', 'IS_OR_NOT'],
data() {
return {
height: document.documentElement.clientHeight - 180 + 'px;',
storlist: [],
classes: [{ 'id': '1', 'code': '白班' }, { 'id': '2', 'code': '晚班' }],
showDtlLoading: false
}
},
mounted: function() {
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 180 + 'px;'
}
},
created() {
crudUserStor.getUserStor().then(res => {
this.storlist = res
})
},
methods: {
[CRUD.HOOK.beforeRefresh]() {
return true
},
selectTime() {
var date = new Date()
var y = date.getFullYear()
var m = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
var d = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
var start_day = y + '-' + m + '-' + '01' + ' ' + '00:00:00'
var end_day = `${y}-${m}-${d}` + ' ' + '23:59:59'
this.query.createTime = [new Date(start_day), new Date(end_day)]
},
bill_typeFormat(row, column) {
return this.dict.label.ST_INV_IN_TYPE[row.bill_type]
},
downdtl() {
const data = this.crud.query
if (this.crud.query.createTime !== undefined) {
data.begin_time = this.crud.query.createTime[0]
data.end_time = this.crud.query.createTime[1]
}
this.showDtlLoading = true
download('/api/in/InQuery/download3', data).then(result => {
downloadFile(result, '成品入库查询', 'xlsx')
this.showDtlLoading = false
}).catch(() => {
this.showDtlLoading = false
})
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
::v-deep .el-dialog__body {
padding-top: 10px;
}
</style>