add:增加子卷装箱页面功能。
This commit is contained in:
@@ -3,6 +3,7 @@ package org.nl.b_lms.pdm.subpackagerelation.controller;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
||||||
import org.nl.common.TableDataInfo;
|
import org.nl.common.TableDataInfo;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -48,6 +49,31 @@ public class PdmBiSubpackagerelationController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询订单装箱信息
|
||||||
|
*
|
||||||
|
* @param whereJson 查询条件
|
||||||
|
* @param page 分页参数
|
||||||
|
*/
|
||||||
|
@GetMapping("/queryContainerization")
|
||||||
|
@Log("查询订单装箱信息")
|
||||||
|
public ResponseEntity<Object> queryContainerization(@RequestParam Map whereJson, PageQuery page) {
|
||||||
|
return new ResponseEntity<>(TableDataInfo.build(pdmBiSubpackagerelationService.queryContainerization(whereJson, page)), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据订单号查询子卷信息
|
||||||
|
*
|
||||||
|
* @param whereJson 查询条件
|
||||||
|
*/
|
||||||
|
@GetMapping("/queryContainerNameBySaleOrder")
|
||||||
|
@Log("查询订单装箱信息")
|
||||||
|
public ResponseEntity<Object> queryContainerNameBySaleOrder(@RequestParam Map whereJson) {
|
||||||
|
return new ResponseEntity<>(TableDataInfo.build(pdmBiSubpackagerelationService.queryContainerNameBySaleOrder(whereJson)), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增数据
|
* 新增数据
|
||||||
*
|
*
|
||||||
@@ -76,6 +102,14 @@ public class PdmBiSubpackagerelationController {
|
|||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/updateEntityList")
|
||||||
|
@Log("子卷分配木箱规格")
|
||||||
|
//@SaCheckPermission("@el.check(updateEntityList)")
|
||||||
|
public ResponseEntity<Object> updateEntityList(@RequestBody JSONObject whereJson) {
|
||||||
|
pdmBiSubpackagerelationService.updateEntityList(whereJson);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除数据
|
* 删除数据
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package org.nl.b_lms.pdm.subpackagerelation.dao;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import jdk.nashorn.internal.ir.annotations.Ignore;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
@@ -20,11 +21,7 @@ import com.baomidou.mybatisplus.extension.activerecord.Model;
|
|||||||
* @since 2024-02-01
|
* @since 2024-02-01
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString
|
|
||||||
@AllArgsConstructor
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
@SuppressWarnings("serial")
|
|
||||||
@TableName("pdm_bi_subpackagerelation")
|
@TableName("pdm_bi_subpackagerelation")
|
||||||
public class PdmBiSubpackagerelation extends Model<PdmBiSubpackagerelation> {
|
public class PdmBiSubpackagerelation extends Model<PdmBiSubpackagerelation> {
|
||||||
|
|
||||||
@@ -36,7 +33,7 @@ public class PdmBiSubpackagerelation extends Model<PdmBiSubpackagerelation> {
|
|||||||
* 子卷包装标识
|
* 子卷包装标识
|
||||||
*/
|
*/
|
||||||
@TableId(value = "workorder_id", type = IdType.NONE)
|
@TableId(value = "workorder_id", type = IdType.NONE)
|
||||||
private Long workorder_id;
|
private String workorder_id;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -186,7 +183,6 @@ public class PdmBiSubpackagerelation extends Model<PdmBiSubpackagerelation> {
|
|||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
@TableField(fill = FieldFill.INSERT)
|
|
||||||
private String create_time;
|
private String create_time;
|
||||||
|
|
||||||
|
|
||||||
@@ -309,6 +305,11 @@ public class PdmBiSubpackagerelation extends Model<PdmBiSubpackagerelation> {
|
|||||||
*/
|
*/
|
||||||
private String ext_code;
|
private String ext_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 木箱组
|
||||||
|
*/
|
||||||
|
private String box_group;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取主键值
|
* 获取主键值
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
package org.nl.b_lms.pdm.subpackagerelation.dao.mapper;
|
package org.nl.b_lms.pdm.subpackagerelation.dao.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@code @Description:} 子卷包装关系表(PdmBiSubpackagerelation)数据持久层
|
* {@code @Description:} 子卷包装关系表(PdmBiSubpackagerelation)数据持久层
|
||||||
* {@code @Author:} gbx
|
* {@code @Author:} gbx
|
||||||
@@ -12,4 +17,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
public interface PdmBiSubpackagerelationMapper extends BaseMapper<PdmBiSubpackagerelation> {
|
public interface PdmBiSubpackagerelationMapper extends BaseMapper<PdmBiSubpackagerelation> {
|
||||||
|
|
||||||
|
|
||||||
|
List<PdmBiSubpackagerelation> selectGroupedSubPackageRelation(Page<PdmBiSubpackagerelation> page, Map<String, Object> whereJson);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,5 +2,19 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="org.nl.b_lms.pdm.subpackagerelation.dao.mapper.PdmBiSubpackagerelationMapper">
|
<mapper namespace="org.nl.b_lms.pdm.subpackagerelation.dao.mapper.PdmBiSubpackagerelationMapper">
|
||||||
|
|
||||||
|
<select id="selectGroupedSubPackageRelation" resultType="org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation">
|
||||||
|
SELECT *
|
||||||
|
FROM pdm_bi_subpackagerelation
|
||||||
|
WHERE (sale_order_name, create_time) IN (
|
||||||
|
SELECT sale_order_name, MAX(create_time) AS create_time
|
||||||
|
FROM pdm_bi_subpackagerelation
|
||||||
|
<if test="_parameter.containsKey('customer_name')">
|
||||||
|
WHERE customer_name = #{customer_name}
|
||||||
|
</if>
|
||||||
|
GROUP BY sale_order_name
|
||||||
|
)
|
||||||
|
ORDER BY create_time DESC
|
||||||
|
LIMIT #{page.offset}, #{page.size}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public class PdmBiSubpackagerelationDto implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 子卷包装标识
|
* 子卷包装标识
|
||||||
*/
|
*/
|
||||||
private Long workorder_id;
|
private String workorder_id;
|
||||||
/**
|
/**
|
||||||
* 木箱唯一码
|
* 木箱唯一码
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
package org.nl.b_lms.pdm.subpackagerelation.service;
|
package org.nl.b_lms.pdm.subpackagerelation.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import org.nl.common.domain.query.PageQuery;
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -29,6 +32,33 @@ public interface IpdmBiSubpackagerelationService extends IService<PdmBiSubpackag
|
|||||||
IPage<PdmBiSubpackagerelation> queryAll(Map whereJson, PageQuery pageable);
|
IPage<PdmBiSubpackagerelation> queryAll(Map whereJson, PageQuery pageable);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询订单装箱信息
|
||||||
|
*
|
||||||
|
* @param whereJson 查询条件
|
||||||
|
* @param pageable 分页参数
|
||||||
|
* @return IPage<PdmBiSubpackagerelation>
|
||||||
|
*/
|
||||||
|
IPage<PdmBiSubpackagerelation> queryContainerization(Map whereJson, PageQuery pageable);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据订单号查询子卷信息
|
||||||
|
*
|
||||||
|
* @param whereJson 查询条件
|
||||||
|
* @return List<PdmBiSubpackagerelation>
|
||||||
|
*/
|
||||||
|
List<PdmBiSubpackagerelation> queryContainerNameBySaleOrder(Map whereJson);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子卷分配木箱规格
|
||||||
|
*
|
||||||
|
* @param whereJson 分配信息
|
||||||
|
*/
|
||||||
|
void updateEntityList(@RequestBody JSONObject whereJson);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建
|
* 创建
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
package org.nl.b_lms.pdm.subpackagerelation.service.impl;
|
package org.nl.b_lms.pdm.subpackagerelation.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.map.MapUtil;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
|
import org.apache.commons.collections4.MapUtils;
|
||||||
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
||||||
import org.nl.b_lms.pdm.subpackagerelation.dao.mapper.PdmBiSubpackagerelationMapper;
|
import org.nl.b_lms.pdm.subpackagerelation.dao.mapper.PdmBiSubpackagerelationMapper;
|
||||||
import org.nl.b_lms.pdm.subpackagerelation.service.IpdmBiSubpackagerelationService;
|
import org.nl.b_lms.pdm.subpackagerelation.service.IpdmBiSubpackagerelationService;
|
||||||
@@ -13,8 +19,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import org.nl.common.domain.query.PageQuery;
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.Map;
|
import java.math.BigDecimal;
|
||||||
import java.util.Set;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -39,11 +46,85 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public IPage<PdmBiSubpackagerelation> queryAll(Map whereJson, PageQuery page) {
|
public IPage<PdmBiSubpackagerelation> queryAll(Map whereJson, PageQuery page) {
|
||||||
|
|
||||||
return pdmBiSubpackagerelationMapper.selectPage(new Page<>(page.getPage() + 1, page.getSize()), new QueryWrapper<PdmBiSubpackagerelation>()
|
return pdmBiSubpackagerelationMapper.selectPage(new Page<>(page.getPage() + 1, page.getSize()), new QueryWrapper<PdmBiSubpackagerelation>()
|
||||||
.lambda());
|
.lambda());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询订单装箱信息
|
||||||
|
*
|
||||||
|
* @param whereJson 查询条件
|
||||||
|
* @param pageable 分页参数
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public IPage<PdmBiSubpackagerelation> queryContainerization(Map whereJson, PageQuery pageable) {
|
||||||
|
IPage<PdmBiSubpackagerelation> resultPage = new Page<>(pageable.getPage(), pageable.getSize());
|
||||||
|
LambdaQueryWrapper<PdmBiSubpackagerelation> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
if (whereJson.containsKey("customer_description")) {
|
||||||
|
queryWrapper.like(PdmBiSubpackagerelation::getCustomer_description, whereJson.get("customer_description"));
|
||||||
|
}
|
||||||
|
if (whereJson.containsKey("sale_order_name")) {
|
||||||
|
queryWrapper.like(PdmBiSubpackagerelation::getSale_order_name, whereJson.get("sale_order_name"));
|
||||||
|
}
|
||||||
|
if (whereJson.containsKey("customer_name")) {
|
||||||
|
queryWrapper.like(PdmBiSubpackagerelation::getCustomer_name, whereJson.get("customer_name"));
|
||||||
|
}
|
||||||
|
if (whereJson.containsKey("status")) {
|
||||||
|
if ("99".equals(whereJson.get("status"))) {
|
||||||
|
queryWrapper.eq(PdmBiSubpackagerelation::getStatus, whereJson.get("status"));
|
||||||
|
} else {
|
||||||
|
queryWrapper.lt(PdmBiSubpackagerelation::getStatus, "99");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
queryWrapper.groupBy(PdmBiSubpackagerelation::getSale_order_name)
|
||||||
|
.orderByDesc(PdmBiSubpackagerelation::getCreate_time);
|
||||||
|
return pdmBiSubpackagerelationMapper.selectPage(resultPage, queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据订单号查询子卷信息
|
||||||
|
*
|
||||||
|
* @param whereJson 查询条件
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<PdmBiSubpackagerelation> queryContainerNameBySaleOrder(Map whereJson) {
|
||||||
|
LambdaQueryWrapper<PdmBiSubpackagerelation> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
if (whereJson.containsKey("customer_description")) {
|
||||||
|
queryWrapper.like(PdmBiSubpackagerelation::getCustomer_description, whereJson.get("customer_description"));
|
||||||
|
}
|
||||||
|
if (whereJson.containsKey("sale_order_name")) {
|
||||||
|
queryWrapper.eq(PdmBiSubpackagerelation::getSale_order_name, whereJson.get("sale_order_name"));
|
||||||
|
}
|
||||||
|
if (whereJson.containsKey("customer_name")) {
|
||||||
|
queryWrapper.like(PdmBiSubpackagerelation::getCustomer_name, whereJson.get("customer_name"));
|
||||||
|
}
|
||||||
|
if (whereJson.containsKey("status")) {
|
||||||
|
if ("99".equals(whereJson.get("status"))) {
|
||||||
|
queryWrapper.eq(PdmBiSubpackagerelation::getStatus, whereJson.get("status"));
|
||||||
|
} else {
|
||||||
|
queryWrapper.ge(PdmBiSubpackagerelation::getStatus, whereJson.get("status"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
queryWrapper.orderByDesc(PdmBiSubpackagerelation::getBox_group);
|
||||||
|
List<PdmBiSubpackagerelation> pdmBiSubpackagerelationList = pdmBiSubpackagerelationMapper.selectList(queryWrapper);
|
||||||
|
Map<String, Long> countByGroup = pdmBiSubpackagerelationList.stream()
|
||||||
|
.filter(item -> item.getBox_group() != null)
|
||||||
|
.collect(Collectors.groupingBy(PdmBiSubpackagerelation::getBox_group, Collectors.counting()));
|
||||||
|
pdmBiSubpackagerelationList.forEach(item -> {
|
||||||
|
if (item.getBox_group() != null) {
|
||||||
|
item.setQuanlity_in_box(BigDecimal.valueOf(countByGroup.getOrDefault(item.getBox_group(), null)));
|
||||||
|
} else {
|
||||||
|
item.setQuanlity_in_box(BigDecimal.ZERO);
|
||||||
|
item.setBox_group("0");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return pdmBiSubpackagerelationList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建
|
* 创建
|
||||||
*
|
*
|
||||||
@@ -69,6 +150,36 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
|||||||
pdmBiSubpackagerelationMapper.updateById(getBasicInfo(entity, false));
|
pdmBiSubpackagerelationMapper.updateById(getBasicInfo(entity, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子卷分配木箱规格
|
||||||
|
*
|
||||||
|
* @param whereJson 分配信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void updateEntityList(JSONObject whereJson) {
|
||||||
|
List<String> entityList = JSONObject.parseArray(whereJson.getJSONArray("tableMater").toJSONString(), PdmBiSubpackagerelation.class).stream()
|
||||||
|
.map(PdmBiSubpackagerelation::getWorkorder_id)
|
||||||
|
.map(String::valueOf)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
;
|
||||||
|
if (entityList.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
List<PdmBiSubpackagerelation> pdmBiSubpackagerelationList = pdmBiSubpackagerelationMapper
|
||||||
|
.selectList(new LambdaQueryWrapper<PdmBiSubpackagerelation>().eq(PdmBiSubpackagerelation::getSale_order_name, whereJson.getString("sale_order_name")));
|
||||||
|
Integer maxBoxGroup = pdmBiSubpackagerelationList.stream()
|
||||||
|
.map(PdmBiSubpackagerelation::getBox_group)
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.map(Integer::parseInt)
|
||||||
|
.max(Integer::compareTo)
|
||||||
|
.orElse(0) + 1;
|
||||||
|
UpdateWrapper<PdmBiSubpackagerelation> updateWrapper = new UpdateWrapper<>();
|
||||||
|
updateWrapper.set("box_type", whereJson.getString("checked"));
|
||||||
|
updateWrapper.set("box_group", maxBoxGroup);
|
||||||
|
updateWrapper.in("workorder_id", entityList);
|
||||||
|
pdmBiSubpackagerelationMapper.update(null, updateWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 多选删除
|
* 多选删除
|
||||||
@@ -89,11 +200,11 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
|||||||
* @param isCreate 是否创建
|
* @param isCreate 是否创建
|
||||||
*/
|
*/
|
||||||
private PdmBiSubpackagerelation getBasicInfo(PdmBiSubpackagerelation entity, boolean isCreate) {
|
private PdmBiSubpackagerelation getBasicInfo(PdmBiSubpackagerelation entity, boolean isCreate) {
|
||||||
if (isCreate) {
|
if (isCreate) {
|
||||||
entity.setCreate_id(Long.valueOf(SecurityUtils.getCurrentUserId()));
|
entity.setCreate_id(Long.valueOf(SecurityUtils.getCurrentUserId()));
|
||||||
entity.setCreate_name(SecurityUtils.getCurrentNickName());
|
entity.setCreate_name(SecurityUtils.getCurrentNickName());
|
||||||
entity.setCreate_time(DateUtil.now());
|
entity.setCreate_time(DateUtil.now());
|
||||||
}
|
}
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -204,7 +204,6 @@ import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
|||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
import { getDepts, getDeptSuperior } from '@/views/system/dept/dept'
|
import { getDepts, getDeptSuperior } from '@/views/system/dept/dept'
|
||||||
import { isvalidPhone } from '@/utils/validate'
|
import { isvalidPhone } from '@/utils/validate'
|
||||||
import crudSectattr from '@/views/wms/basedata/st/sect/sectattr'
|
|
||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
stor_id: null,
|
stor_id: null,
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dict.d_lock_type"
|
v-for="item in dict.d_lock_type"
|
||||||
|
:key="item.id"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
@@ -281,8 +282,7 @@ import rrOperation from '@crud/RR.operation'
|
|||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
import udOperation from '@crud/UD.operation'
|
import udOperation from '@crud/UD.operation'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import crudSectattr from '@/views/wms/basedata/st/sect/sectattr'
|
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||||
import crudUserStor, { getSect } from '@/views/wms/basedata/st/userStor/userStor'
|
|
||||||
/* import checkoutbill from "@/api/wms/st/core/outbill/checkoutbill";*/
|
/* import checkoutbill from "@/api/wms/st/core/outbill/checkoutbill";*/
|
||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
|
|||||||
399
lms/nladmin-ui/src/views/wms/pdm/sub/DivDialog.vue
Normal file
399
lms/nladmin-ui/src/views/wms/pdm/sub/DivDialog.vue
Normal file
@@ -0,0 +1,399 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
append-to-body
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
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>
|
||||||
|
</div>
|
||||||
|
<div class="crud-opts-right2" style="display: flex; justify-content: flex-end; align-items: center;">
|
||||||
|
<!--左侧插槽-->
|
||||||
|
<slot name="left" />
|
||||||
|
<el-button type="info" @click="dialogVisible = false">关闭</el-button>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
<div class="crud-opts2">
|
||||||
|
<span class="role-span">分配方案</span>
|
||||||
|
</div>
|
||||||
|
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||||
|
<!--表格1渲染-->
|
||||||
|
<el-table
|
||||||
|
ref="dtl_table"
|
||||||
|
:data="openParam"
|
||||||
|
style="width: 100%;"
|
||||||
|
max-height="300"
|
||||||
|
border
|
||||||
|
highlight-current-row
|
||||||
|
:row-class-name="tableRowClassName"
|
||||||
|
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||||
|
:row-key="row => row.name"
|
||||||
|
:span-method="handleSpanMethod"
|
||||||
|
@row-click="handleRowClick"
|
||||||
|
>
|
||||||
|
<!-- 列的定义... -->
|
||||||
|
<!-- <el-table-column prop="box_group" label="木箱组 " align="center" width="120">-->
|
||||||
|
<!-- <template slot-scope="scope">-->
|
||||||
|
<!-- {{ '' }}-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- </el-table-column>-->
|
||||||
|
<el-table-column show-overflow-tooltip prop="box_group" label="木箱组" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="quanlity_in_box" label="箱内子卷数" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="container_name" label="子卷号" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="sap_pcsn" label="sap批次" align="center" />
|
||||||
|
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
<div style="margin-bottom: 20px;" />
|
||||||
|
<div>
|
||||||
|
<span class="role-span">调整分配</span>
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 10px;" />
|
||||||
|
<div class="search-box">
|
||||||
|
<el-input
|
||||||
|
v-model="searchText"
|
||||||
|
placeholder="请输入子卷号"
|
||||||
|
class="search-input"
|
||||||
|
clearable
|
||||||
|
@clear="handleInput"
|
||||||
|
@input="handleSearch"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<span class="crud-opts-right2">
|
||||||
|
<el-button
|
||||||
|
slot="left"
|
||||||
|
class="filter-item"
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-circle-close"
|
||||||
|
size="mini"
|
||||||
|
@click="clearSearch()"
|
||||||
|
>
|
||||||
|
清空
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
<span class="crud-opts-right2" style="margin-left: 15px;">
|
||||||
|
<el-button
|
||||||
|
slot="left"
|
||||||
|
class="filter-item"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="divStruct()"
|
||||||
|
>
|
||||||
|
分配
|
||||||
|
</el-button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||||
|
<el-table
|
||||||
|
ref="dis_table"
|
||||||
|
:data="filteredData"
|
||||||
|
style="width: 100%;"
|
||||||
|
max-height="300"
|
||||||
|
border
|
||||||
|
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||||
|
:row-style="table2RowStyle"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<!-- 列的定义-->
|
||||||
|
<el-table-column type="selection" width="55" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="box_group" label="木箱组" align="center" width="130" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="container_name" label="子卷号" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="sap_pcsn" label="sap批次" align="center" />
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
<MaterDiv ref="child" :dialog-show.sync="structShow" :sect-prop="sectProp" @tableChanged="tableChanged" />
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import CRUD, { crud } from '@crud/crud'
|
||||||
|
import MaterDiv from '@/views/wms/pdm/sub/MaterDialog.vue'
|
||||||
|
import crudPackagerelation from '@/views/wms/pdm/sub/packagerelation'
|
||||||
|
import crudSubpackagerelation from '@/views/wms/pdm/sub/packagerelation'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'DivDialog',
|
||||||
|
components: { MaterDiv },
|
||||||
|
mixins: [crud()],
|
||||||
|
dicts: ['io_bill_status'],
|
||||||
|
props: {
|
||||||
|
props: {
|
||||||
|
parentMethod: {
|
||||||
|
type: Function,
|
||||||
|
default: () => {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
openParam: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
saleOrderName: {
|
||||||
|
type: String,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
billType: {
|
||||||
|
type: String,
|
||||||
|
default: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
searchText: '',
|
||||||
|
// 存储搜索前的选中状态
|
||||||
|
previousSelection: [],
|
||||||
|
// 存储搜索后的选中状态
|
||||||
|
currentSelection: [],
|
||||||
|
// 取消选中
|
||||||
|
cancelSelection: [],
|
||||||
|
multipleSelection: [],
|
||||||
|
dialogVisible: false,
|
||||||
|
stor_id: '',
|
||||||
|
sect_id: '',
|
||||||
|
sectProp: null,
|
||||||
|
bucketProp: {},
|
||||||
|
structShow: false,
|
||||||
|
bucketObj: null,
|
||||||
|
bucketShow: false,
|
||||||
|
sects: [],
|
||||||
|
sect_val: null,
|
||||||
|
form: {
|
||||||
|
checked: null,
|
||||||
|
sale_order_name: null,
|
||||||
|
tableMater: []
|
||||||
|
},
|
||||||
|
storlist: [],
|
||||||
|
pointlist: [],
|
||||||
|
rules: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
filteredData() {
|
||||||
|
if (this.searchText.trim() === '') {
|
||||||
|
return this.openParam
|
||||||
|
} else {
|
||||||
|
// 过滤数据
|
||||||
|
return this.openParam.filter(row =>
|
||||||
|
row.container_name.toLowerCase().includes(this.searchText.toLowerCase())
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
dialogShow: {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
this.dialogVisible = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleSearch() {
|
||||||
|
this.multipleSelection = this.multipleSelection.filter(i => { return this.$refs.dis_table.selection.includes(i) })
|
||||||
|
this.currentSelection = [...this.$refs.dis_table.selection]
|
||||||
|
},
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
if (selection.length > 0) {
|
||||||
|
this.currentSelection = selection
|
||||||
|
if (!this.searchText) {
|
||||||
|
this.previousSelection = selection
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!this.searchText) {
|
||||||
|
this.cancelSelection = []
|
||||||
|
this.cancelSelection = [...this.currentSelection]
|
||||||
|
this.table2RowStyle({ row: this.currentSelection })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 处理清除搜索条件事件
|
||||||
|
clearSearch() {
|
||||||
|
this.searchText = ''
|
||||||
|
this.currentSelection.push(...this.previousSelection)
|
||||||
|
this.multipleSelection.push(...this.currentSelection)
|
||||||
|
this.multipleSelection = this.getMultipleSelection(this.multipleSelection)
|
||||||
|
console.log('multipleSelection1:', this.multipleSelection)
|
||||||
|
this.multipleSelection.forEach(row => {
|
||||||
|
this.table2RowStyle(row)
|
||||||
|
})
|
||||||
|
console.log('multipleSelection2:', this.multipleSelection)
|
||||||
|
const table2 = this.$refs.dis_table
|
||||||
|
table2.clearSelection()
|
||||||
|
const selectedRows = this.multipleSelection
|
||||||
|
selectedRows.forEach(row => {
|
||||||
|
debugger
|
||||||
|
table2.toggleRowSelection(row)
|
||||||
|
})
|
||||||
|
// this.$refs.dis_table.clearSelection()
|
||||||
|
// this.multipleSelection.forEach(row => {
|
||||||
|
// this.$refs.dis_table.toggleRowSelection(row,true);
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
clearSearch1() {
|
||||||
|
console.log('dis_table1:', this.$refs.dis_table)
|
||||||
|
console.log('dis_table2:', this.$refs['dis_table'])
|
||||||
|
console.log('multipleSelection:', this.currentSelection)
|
||||||
|
const table2 = this.$refs.dis_table
|
||||||
|
table2.clearSelection()
|
||||||
|
const selectedRows = this.multipleSelection
|
||||||
|
selectedRows.forEach(row => table2.toggleRowSelection(row))
|
||||||
|
// this.$refs.dis_table.clearSelection()
|
||||||
|
// this.multipleSelection.forEach(row => {
|
||||||
|
// this.$refs.dis_table.toggleRowSelection(row,true);
|
||||||
|
// });
|
||||||
|
},
|
||||||
|
handleInput(value) {
|
||||||
|
this.clearSearch1()
|
||||||
|
},
|
||||||
|
table2RowStyle({ row }) {
|
||||||
|
// if(this.cancelSelection.includes(row))
|
||||||
|
// {
|
||||||
|
// return {background: 'white'}; // 修改颜色
|
||||||
|
// }
|
||||||
|
if (this.currentSelection.includes(row)) {
|
||||||
|
return { background: 'orange' } // 修改颜色
|
||||||
|
}
|
||||||
|
if (this.multipleSelection.includes(row)) {
|
||||||
|
return { background: 'orange' } // 修改颜色
|
||||||
|
}
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
getMultipleSelection(multipleSelection) {
|
||||||
|
return multipleSelection.reduce((acc, item) => {
|
||||||
|
debugger
|
||||||
|
const existingItem = acc.find(existing => existing.container_name === item.container_name)
|
||||||
|
if (!existingItem) {
|
||||||
|
acc.push(item)
|
||||||
|
}
|
||||||
|
return acc
|
||||||
|
}, [])
|
||||||
|
},
|
||||||
|
// 表格1的分组处理
|
||||||
|
handleSpanMethod({ row, columnIndex }) {
|
||||||
|
if (columnIndex === 0 || columnIndex === 1) {
|
||||||
|
if (row.box_group !== null) {
|
||||||
|
const sortedData = [...this.openParam].sort((a, b) => a.box_group.localeCompare(b.box_group))
|
||||||
|
const currentIndex = sortedData.findIndex(item => item === row)
|
||||||
|
const isFirstRow = currentIndex === 0 || sortedData[currentIndex - 1].box_group !== row.box_group
|
||||||
|
return {
|
||||||
|
rowspan: isFirstRow ? sortedData.filter(item => item.box_group === row.box_group).length : 0,
|
||||||
|
colspan: 1
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return { rowspan: 1, colspan: 1 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 表格1的行点击事件
|
||||||
|
handleRowClick(scope) {
|
||||||
|
debugger
|
||||||
|
const table2 = this.$refs.dis_table
|
||||||
|
const table2Data = Array.from(this.openParam)
|
||||||
|
const groupValue = scope.box_group === 0 ? scope.container_name : scope.box_group
|
||||||
|
const selectedRows = table2Data.filter(row => row.box_group === groupValue && row.box_group !== null && row.box_group !== 0)
|
||||||
|
table2.clearSelection()
|
||||||
|
selectedRows.forEach(row => table2.toggleRowSelection(row))
|
||||||
|
},
|
||||||
|
toDelete(data) {
|
||||||
|
this.$set(data, 'pop', true)
|
||||||
|
// data.pop = true
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.clearSelection()
|
||||||
|
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()
|
||||||
|
},
|
||||||
|
// 清除选中项
|
||||||
|
clearSelection() {
|
||||||
|
this.previousSelection = []
|
||||||
|
this.multipleSelection = []
|
||||||
|
this.currentSelection = []
|
||||||
|
},
|
||||||
|
tableRowClassName({ row, rowIndex }) {
|
||||||
|
row.index = rowIndex
|
||||||
|
},
|
||||||
|
tableChanged(row) {
|
||||||
|
this.form.tableMater = this.currentSelection
|
||||||
|
this.form.checked = row.material_code
|
||||||
|
this.form.sale_order_name = this.sale_order_name
|
||||||
|
crudPackagerelation.updateEntityList(this.form).then(res => {
|
||||||
|
crudSubpackagerelation.queryContainerization({ 'sale_order_name': this.sale_order_name }).then(res => {
|
||||||
|
this.openParam = res.content
|
||||||
|
this.$emit('childEvent')
|
||||||
|
this.clearSelection()
|
||||||
|
})
|
||||||
|
this.form.tableMater = []
|
||||||
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
divStruct() {
|
||||||
|
debugger
|
||||||
|
if (this.currentSelection.length > 0 && this.$refs.dis_table.selection.length > 0) {
|
||||||
|
debugger
|
||||||
|
this.structShow = true
|
||||||
|
this.$refs.child.getMsg(false)
|
||||||
|
} else {
|
||||||
|
this.crud.notify('请确认并勾选子卷信息!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
doCancel(data) {
|
||||||
|
this.$set(data, 'pop', false)
|
||||||
|
// data.pop = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-box {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-input {
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clear-icon {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.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>
|
||||||
183
lms/nladmin-ui/src/views/wms/pdm/sub/MaterDialog.vue
Normal file
183
lms/nladmin-ui/src/views/wms/pdm/sub/MaterDialog.vue
Normal file
@@ -0,0 +1,183 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
title="木箱选择"
|
||||||
|
append-to-body
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
destroy-on-close
|
||||||
|
width="1000px"
|
||||||
|
@close="close"
|
||||||
|
@open="open"
|
||||||
|
>
|
||||||
|
<!-- 搜索 -->
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-input
|
||||||
|
v-model="query.search"
|
||||||
|
clearable
|
||||||
|
style="width: 200px"
|
||||||
|
size="mini"
|
||||||
|
placeholder="输入木箱物料名称"
|
||||||
|
prefix-icon="el-icon-search"
|
||||||
|
class="filter-item"
|
||||||
|
/> </el-col>
|
||||||
|
|
||||||
|
<el-col :span="6">
|
||||||
|
<rrOperation />
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<div style="margin-bottom: 10px" />
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table
|
||||||
|
ref="table"
|
||||||
|
v-loading="crud.loading"
|
||||||
|
:data="crud.data"
|
||||||
|
style="width: 100%;"
|
||||||
|
border
|
||||||
|
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||||
|
@select="handleSelectionChange"
|
||||||
|
@select-all="onSelectAll"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="55" />
|
||||||
|
<el-table-column prop="material_code" label="木箱规格" />
|
||||||
|
<el-table-column prop="material_name" label="物料名称" />
|
||||||
|
</el-table>
|
||||||
|
<!--分页组件-->
|
||||||
|
<pagination />
|
||||||
|
<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, { header, presenter } from '@crud/crud'
|
||||||
|
import rrOperation from '@crud/RR.operation'
|
||||||
|
import pagination from '@crud/Pagination'
|
||||||
|
import crudMaterattr from '@/views/wms/pdm/sub/materattr'
|
||||||
|
export default {
|
||||||
|
name: 'MaterDialog',
|
||||||
|
components: { rrOperation, pagination },
|
||||||
|
cruds() {
|
||||||
|
return CRUD({
|
||||||
|
title: '木箱规格',
|
||||||
|
optShow: {},
|
||||||
|
url: 'api/Materialbase',
|
||||||
|
idField: 'material_id',
|
||||||
|
sort: 'material_id,desc',
|
||||||
|
query: { search: '', material_id: '' },
|
||||||
|
crudMethod: { ...crudMaterattr }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
mixins: [presenter(), header()],
|
||||||
|
props: {
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
sectProp: {
|
||||||
|
type: Object
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
classes: [],
|
||||||
|
dialogVisible: false,
|
||||||
|
sect: {},
|
||||||
|
checkrow: {},
|
||||||
|
rows: [],
|
||||||
|
dialogDis: true,
|
||||||
|
lock: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
dialogShow: {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
this.dialogVisible = newValue
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sectProp: {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
this.sect = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* 接受父组件传值
|
||||||
|
* @param msg
|
||||||
|
*/
|
||||||
|
getMsg(msg) {
|
||||||
|
this.dialogDis = msg
|
||||||
|
this.lock = '00'
|
||||||
|
},
|
||||||
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
|
this.query.lock = this.lock
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
open() {
|
||||||
|
if (this.sect) {
|
||||||
|
this.query.sect = this.sect
|
||||||
|
if (this.sect.length === 1) {
|
||||||
|
this.query.stor_id = this.sect[0]
|
||||||
|
this.query.sect_id = ''
|
||||||
|
}
|
||||||
|
if (this.sect.length === 0) {
|
||||||
|
this.query.sect_id = ''
|
||||||
|
this.query.stor_id = ''
|
||||||
|
}
|
||||||
|
if (this.sect.length === 2) {
|
||||||
|
this.query.stor_id = this.sect[0]
|
||||||
|
this.query.sect_id = this.sect[1]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.query.is_lock = '1'
|
||||||
|
this.query.lock = this.lock
|
||||||
|
this.query.is_used = '1'
|
||||||
|
this.crud.toQuery()
|
||||||
|
},
|
||||||
|
handleSelectionChange(val, row) {
|
||||||
|
if (val.length > 1) {
|
||||||
|
this.$refs.table.clearSelection()
|
||||||
|
this.$refs.table.toggleRowSelection(val.pop())
|
||||||
|
} else {
|
||||||
|
this.checkrow = row
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sectQueryChange(val) {
|
||||||
|
if (val.length === 1) {
|
||||||
|
this.crud.query.stor_id = val[0]
|
||||||
|
this.crud.query.sect_id = ''
|
||||||
|
}
|
||||||
|
if (val.length === 0) {
|
||||||
|
this.crud.query.sect_id = ''
|
||||||
|
this.crud.query.stor_id = ''
|
||||||
|
}
|
||||||
|
if (val.length === 2) {
|
||||||
|
this.crud.query.stor_id = val[0]
|
||||||
|
this.crud.query.sect_id = val[1]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onSelectAll() {
|
||||||
|
this.$refs.table.clearSelection()
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.crud.resetQuery()
|
||||||
|
this.query.sect = null
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
},
|
||||||
|
submit() {
|
||||||
|
debugger
|
||||||
|
this.rows = this.$refs.table.selection
|
||||||
|
if (this.rows.length <= 0) {
|
||||||
|
this.$message('请先选择木箱信息')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.$emit('tableChanged', this.checkrow)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
304
lms/nladmin-ui/src/views/wms/pdm/sub/index.vue
Normal file
304
lms/nladmin-ui/src/views/wms/pdm/sub/index.vue
Normal file
@@ -0,0 +1,304 @@
|
|||||||
|
<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="115px"
|
||||||
|
label-suffix=":"
|
||||||
|
>
|
||||||
|
<el-form-item label="订单号">
|
||||||
|
<el-input
|
||||||
|
v-model="query.sale_order_name"
|
||||||
|
clearable
|
||||||
|
placeholder="输入订单号"
|
||||||
|
style="width: 185px;"
|
||||||
|
class="filter-item"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户名称">
|
||||||
|
<el-input
|
||||||
|
v-model="query.customer_description"
|
||||||
|
clearable
|
||||||
|
placeholder="输入客户名称"
|
||||||
|
style="width: 185px;"
|
||||||
|
class="filter-item"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户编码">
|
||||||
|
<el-input
|
||||||
|
v-model="query.customer_name"
|
||||||
|
clearable
|
||||||
|
placeholder="输入客户编码"
|
||||||
|
style="width: 185px;"
|
||||||
|
class="filter-item"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="状态">-->
|
||||||
|
<!-- <el-select-->
|
||||||
|
<!-- v-model="query.status"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- size="mini"-->
|
||||||
|
<!-- placeholder="请选择"-->
|
||||||
|
<!-- class="filter-item"-->
|
||||||
|
<!-- @change="hand"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <el-option label="未分配" value="99" />-->
|
||||||
|
<!-- <el-option label="已分配" value="0" />-->
|
||||||
|
<!-- </el-select>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<rrOperation :crud="crud" />
|
||||||
|
</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="divOpen1"
|
||||||
|
>
|
||||||
|
分配
|
||||||
|
</el-button>
|
||||||
|
</crudOperation>
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-tabs v-model="activeName" class="custom-tabs" @tab-click="handleClick">
|
||||||
|
<el-tab-pane label="未分配" name="first" />
|
||||||
|
<el-tab-pane label="已分配" name="second" />
|
||||||
|
</el-tabs>
|
||||||
|
<el-table
|
||||||
|
ref="table"
|
||||||
|
v-loading="crud.loading"
|
||||||
|
height
|
||||||
|
style="width: 100%"
|
||||||
|
:data="crud.data"
|
||||||
|
size="mini"
|
||||||
|
@select="handleSelectionChange"
|
||||||
|
@selection-change="crud.selectionChangeHandler"
|
||||||
|
@row-dblclick="handleRowDblClick"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" />
|
||||||
|
<el-table-column
|
||||||
|
prop="sale_order_name"
|
||||||
|
label="销售订单及行号"
|
||||||
|
:min-width="flexWidth('sale_order_name',crud.data,'销售订单及行号')"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="customer_name"
|
||||||
|
label="客户编码"
|
||||||
|
:min-width="flexWidth('customer_name',crud.data,'客户编码')"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="customer_description"
|
||||||
|
label="客户名称"
|
||||||
|
:min-width="flexWidth('customer_description',crud.data,'客户名称')"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="status" label="状态" :min-width="flexWidth('status', crud.data, '状态')">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.status === "99" ? '未分配' : '已分配' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'创建人')" />
|
||||||
|
<el-table-column
|
||||||
|
prop="create_time"
|
||||||
|
label="创建时间"
|
||||||
|
:min-width="flexWidth('create_time',crud.data,'创建时间')"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="sale_order_description"
|
||||||
|
label="销售订单描述"
|
||||||
|
:min-width="flexWidth('sale_order_description',crud.data,'销售订单描述')"
|
||||||
|
/>
|
||||||
|
<!-- <el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')"/>-->
|
||||||
|
</el-table>
|
||||||
|
<!--分页组件-->
|
||||||
|
<pagination />
|
||||||
|
</div>
|
||||||
|
<DivDialog :dialog-show.sync="divShow" :open-param="openParam" :sale_order_name="sale_order_name" @childEvent="handleChildEvent" @AddChanged="querytable" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import crudSubpackagerelation from './packagerelation'
|
||||||
|
import CRUD, { crud, form, 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 { download } from '@/api/data'
|
||||||
|
import { downloadFile } from '@/utils'
|
||||||
|
import DivDialog from '@/views/wms/pdm/sub/DivDialog.vue'
|
||||||
|
|
||||||
|
const defaultForm = {
|
||||||
|
workorder_id: null,
|
||||||
|
package_box_sn: null,
|
||||||
|
quanlity_in_box: null,
|
||||||
|
box_weight: null,
|
||||||
|
quality_guaran_period: null,
|
||||||
|
sale_order_name: null,
|
||||||
|
customer_name: null,
|
||||||
|
customer_description: null,
|
||||||
|
product_name: null,
|
||||||
|
product_description: null,
|
||||||
|
date_of_fg_inbound: null,
|
||||||
|
container_name: null,
|
||||||
|
width: null,
|
||||||
|
thickness: null,
|
||||||
|
mass_per_unit_area: null,
|
||||||
|
net_weight: null,
|
||||||
|
length: null,
|
||||||
|
date_of_production: null,
|
||||||
|
is_un_plan_production: null,
|
||||||
|
un_plan_product_property1: null,
|
||||||
|
un_plan_product_property2: null,
|
||||||
|
un_plan_product_property3: null,
|
||||||
|
box_type: null,
|
||||||
|
sap_pcsn: null,
|
||||||
|
remark: null,
|
||||||
|
create_id: null,
|
||||||
|
create_name: null,
|
||||||
|
create_time: null,
|
||||||
|
status: '99',
|
||||||
|
isreprintpackageboxlabel: null,
|
||||||
|
isunpackbox: null,
|
||||||
|
thickness_request: null,
|
||||||
|
width_standard: null
|
||||||
|
}
|
||||||
|
export default {
|
||||||
|
name: 'Packagerelation',
|
||||||
|
dicts: ['sub_package_relation', 'IS_OR_NOT'],
|
||||||
|
components: { pagination, crudOperation, rrOperation, udOperation, DivDialog },
|
||||||
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
|
cruds() {
|
||||||
|
return CRUD({
|
||||||
|
title: '子卷装箱',
|
||||||
|
optShow: { add: false, edit: false, del: false },
|
||||||
|
url: 'api/pdmBiSubpackagerelation/queryContainerization',
|
||||||
|
crudMethod: { ...crudSubpackagerelation }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeName: 'first',
|
||||||
|
divShow: false,
|
||||||
|
openParam: [],
|
||||||
|
sale_order_name: null,
|
||||||
|
bussConfig: null,
|
||||||
|
currentRow: null,
|
||||||
|
dis_flag: true,
|
||||||
|
permission: {
|
||||||
|
add: ['admin', 'sub:add'],
|
||||||
|
edit: ['admin', 'sub:edit'],
|
||||||
|
del: ['admin', 'sub:del']
|
||||||
|
},
|
||||||
|
isPlanProducList: [
|
||||||
|
{ 'label': '是', 'value': '1' },
|
||||||
|
{ 'label': '否', 'value': '0' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
// 标签页点击
|
||||||
|
handleClick(tab) {
|
||||||
|
this.query.status = tab.name === 'first' ? '99' : '0'
|
||||||
|
this.crud.toQuery()
|
||||||
|
},
|
||||||
|
// 表格双击事件
|
||||||
|
handleRowDblClick(row, column, event) {
|
||||||
|
// 双击事件的处理逻辑
|
||||||
|
this.divOpen(row)
|
||||||
|
},
|
||||||
|
// 双击
|
||||||
|
divOpen(row) {
|
||||||
|
this.sale_order_name = row.sale_order_name
|
||||||
|
crudSubpackagerelation.queryContainerization({ 'sale_order_name': row.sale_order_name }).then(res => {
|
||||||
|
this.openParam = res.content
|
||||||
|
this.divShow = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
divOpen1() {
|
||||||
|
this.sale_order_name = this.currentRow.sale_order_name
|
||||||
|
crudSubpackagerelation.queryContainerization({ 'sale_order_name': this.currentRow.sale_order_name }).then(res => {
|
||||||
|
this.openParam = res.content
|
||||||
|
this.divShow = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
querytable() {
|
||||||
|
this.onSelectAll()
|
||||||
|
this.crud.toQuery()
|
||||||
|
},
|
||||||
|
handleChildEvent() {
|
||||||
|
this.divOpen()
|
||||||
|
},
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
buttonChange(currentRow) {
|
||||||
|
if (currentRow !== null) {
|
||||||
|
this.currentRow = currentRow
|
||||||
|
this.dis_flag = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onSelectAll() {
|
||||||
|
this.$refs.table.clearSelection()
|
||||||
|
this.handleCurrentChange(null)
|
||||||
|
},
|
||||||
|
handleCurrentChange(currentRow) {
|
||||||
|
if (currentRow === null) {
|
||||||
|
this.dis_flag = true
|
||||||
|
this.currentRow = {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
hand(value) {
|
||||||
|
this.crud.toQuery()
|
||||||
|
},
|
||||||
|
downdtl() {
|
||||||
|
if (this.currentRow !== null) {
|
||||||
|
crud.downloadLoading = true
|
||||||
|
download('/api/packagerelation/download', this.crud.query).then(result => {
|
||||||
|
debugger
|
||||||
|
downloadFile(result, '子卷包装', 'xlsx')
|
||||||
|
crud.downloadLoading = false
|
||||||
|
}).catch(() => {
|
||||||
|
crud.downloadLoading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.custom-tabs {
|
||||||
|
margin-bottom: 0px; /* 调整垂直间距,根据需要调整数值 */
|
||||||
|
}
|
||||||
|
.custom-table {
|
||||||
|
margin-top: 0px; /* 调整垂直间距,根据需要调整数值 */
|
||||||
|
}
|
||||||
|
.tableAuto.el-table .cell {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
27
lms/nladmin-ui/src/views/wms/pdm/sub/materattr.js
Normal file
27
lms/nladmin-ui/src/views/wms/pdm/sub/materattr.js
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function add(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/structattr',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function del(ids) {
|
||||||
|
return request({
|
||||||
|
url: 'api/structattr/',
|
||||||
|
method: 'delete',
|
||||||
|
data: ids
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function edit(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/structattr',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { add, edit, del }
|
||||||
43
lms/nladmin-ui/src/views/wms/pdm/sub/packagerelation.js
Normal file
43
lms/nladmin-ui/src/views/wms/pdm/sub/packagerelation.js
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function add(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/subpackagerelation',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function del(ids) {
|
||||||
|
return request({
|
||||||
|
url: 'api/pdmBiSubpackagerelation/',
|
||||||
|
method: 'delete',
|
||||||
|
data: ids
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function edit(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/pdmBiSubpackagerelation',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function queryContainerization(params) {
|
||||||
|
return request({
|
||||||
|
url: '/api/pdmBiSubpackagerelation/queryContainerNameBySaleOrder',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateEntityList(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/pdmBiSubpackagerelation/updateEntityList',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { add, edit, del, queryContainerization, updateEntityList }
|
||||||
@@ -71,7 +71,6 @@ import CRUD, { header, presenter } from '@crud/crud'
|
|||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import crudStructattr from '@/views/wms/basedata/st/struct/structattr'
|
import crudStructattr from '@/views/wms/basedata/st/struct/structattr'
|
||||||
import crudSectattr from '@/views/wms/basedata/st/sect/sectattr'
|
|
||||||
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column show-overflow-tooltip prop="turnout_sect_name" label="库区"/>
|
<el-table-column show-overflow-tooltip prop="turnout_sect_name" label="库区" />
|
||||||
<el-table-column show-overflow-tooltip prop="turnout_struct_code" label="货位" width="110px" />
|
<el-table-column show-overflow-tooltip prop="turnout_struct_code" label="货位" width="110px" />
|
||||||
<el-table-column show-overflow-tooltip prop="storagevehicle_code" width="250" label="载具号" />
|
<el-table-column show-overflow-tooltip prop="storagevehicle_code" width="250" label="载具号" />
|
||||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="150px" />
|
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="150px" />
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
<el-table-column show-overflow-tooltip prop="sap_pcsn" label="SAP批次" width="120" />
|
<el-table-column show-overflow-tooltip prop="sap_pcsn" label="SAP批次" width="120" />
|
||||||
<el-table-column show-overflow-tooltip prop="sale_order_name" width="150px" label="销售订单及批次" />
|
<el-table-column show-overflow-tooltip prop="sale_order_name" width="150px" label="销售订单及批次" />
|
||||||
<el-table-column show-overflow-tooltip prop="customer_name" label="客户编码" />
|
<el-table-column show-overflow-tooltip prop="customer_name" label="客户编码" />
|
||||||
<el-table-column show-overflow-tooltip prop="customer_description" label="客户描述" width="150"/>
|
<el-table-column show-overflow-tooltip prop="customer_description" label="客户描述" width="150" />
|
||||||
<el-table-column show-overflow-tooltip prop="qty" label="重量" :formatter="crud.formatNum3" width="110px" />
|
<el-table-column show-overflow-tooltip prop="qty" label="重量" :formatter="crud.formatNum3" width="110px" />
|
||||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位" />
|
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位" />
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -119,7 +119,6 @@
|
|||||||
import CRUD, { header, presenter } from '@crud/crud'
|
import CRUD, { header, presenter } from '@crud/crud'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import crudSectattr from '@/views/wms/basedata/st/sect/sectattr'
|
|
||||||
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||||
import handmovestor from '@/views/wms/st/inStor/moveStor/handmovestor'
|
import handmovestor from '@/views/wms/st/inStor/moveStor/handmovestor'
|
||||||
|
|
||||||
|
|||||||
@@ -203,11 +203,10 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CRUD, { crud } from '@crud/crud'
|
import CRUD, { crud } from '@crud/crud'
|
||||||
import crudSectattr from '@/views/wms/basedata/st/sect/sectattr'
|
|
||||||
import StructDiv from '@/views/wms/pub/StructDialog'
|
import StructDiv from '@/views/wms/pub/StructDialog'
|
||||||
import crudRawAssist, { allDivStruct } from '@/views/wms/st/inbill/rawassist'
|
import crudRawAssist from '@/views/wms/st/inbill/rawassist'
|
||||||
import crudPoint from '@/views/wms/sch/point/point'
|
import crudPoint from '@/views/wms/sch/point/point'
|
||||||
import crudUserStor, { getSect } from '@/views/wms/basedata/st/userStor/userStor'
|
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DivDialog',
|
name: 'DivDialog',
|
||||||
|
|||||||
@@ -105,13 +105,13 @@
|
|||||||
<el-table-column show-overflow-tooltip sortable prop="pcsn" label="子卷批次号" align="center" width="150px" />
|
<el-table-column show-overflow-tooltip sortable prop="pcsn" label="子卷批次号" align="center" width="150px" />
|
||||||
<el-table-column show-overflow-tooltip sortable prop="sap_pcsn" label="sap批次" align="center" width="140px" />
|
<el-table-column show-overflow-tooltip sortable prop="sap_pcsn" label="sap批次" align="center" width="140px" />
|
||||||
<el-table-column show-overflow-tooltip prop="canuse_qty" label="可出重量" :formatter="crud.formatNum3" align="center" />
|
<el-table-column show-overflow-tooltip prop="canuse_qty" label="可出重量" :formatter="crud.formatNum3" align="center" />
|
||||||
<!-- <el-table-column show-overflow-tooltip prop="plan_qty" label="重量" :formatter="crud.formatNum3" width="160" align="center">-->
|
<!-- <el-table-column show-overflow-tooltip prop="plan_qty" label="重量" :formatter="crud.formatNum3" width="160" align="center">-->
|
||||||
<!-- <template scope="scope">-->
|
<!-- <template scope="scope">-->
|
||||||
<!-- <el-input-number v-show="!scope.row.edit" v-model="scope.row.plan_qty" :precision="3" :max="100000000" />-->
|
<!-- <el-input-number v-show="!scope.row.edit" v-model="scope.row.plan_qty" :precision="3" :max="100000000" />-->
|
||||||
<!-- <span v-show="scope.row.edit">{{ scope.row.plan_qty }}</span>-->
|
<!-- <span v-show="scope.row.edit">{{ scope.row.plan_qty }}</span>-->
|
||||||
<!-- </template>-->
|
<!-- </template>-->
|
||||||
<!-- </el-table-column>-->
|
<!-- </el-table-column>-->
|
||||||
<!-- <el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" align="center" />-->
|
<!-- <el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" align="center" />-->
|
||||||
<el-table-column align="center" label="操作" width="160" fixed="right">
|
<el-table-column align="center" label="操作" width="160" fixed="right">
|
||||||
<template scope="scope">
|
<template scope="scope">
|
||||||
<el-button v-show="!scope.row.edit" type="primary" class="filter-item" size="mini" icon="el-icon-edit" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
<el-button v-show="!scope.row.edit" type="primary" class="filter-item" size="mini" icon="el-icon-edit" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
||||||
@@ -125,7 +125,6 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
import CRUD, { header } from '@crud/crud'
|
import CRUD, { header } from '@crud/crud'
|
||||||
import crudSectattr from '@/views/wms/basedata/st/sect/sectattr'
|
|
||||||
import checkoutbill from '@/views/wms/st/outbill/checkoutbill'
|
import checkoutbill from '@/views/wms/st/outbill/checkoutbill'
|
||||||
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||||
|
|
||||||
@@ -214,7 +213,7 @@ export default {
|
|||||||
this.$set(row, 'edit', false)
|
this.$set(row, 'edit', false)
|
||||||
}
|
}
|
||||||
if (!row.edit) {
|
if (!row.edit) {
|
||||||
/* if (row.plan_qty > this.queryrow.unassign_qty) {
|
/* if (row.plan_qty > this.queryrow.unassign_qty) {
|
||||||
this.crud.notify('出库重量不能超过未分配数', CRUD.NOTIFICATION_TYPE.INFO)
|
this.crud.notify('出库重量不能超过未分配数', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
return false
|
return false
|
||||||
}*/
|
}*/
|
||||||
|
|||||||
Reference in New Issue
Block a user