jg-waiwang-pro
vayne 7 months ago
commit 744508c6a4

@ -14,7 +14,6 @@
<result column="box_surface_num" property="boxSurfaceNum"/>
<result column="spec" property="spec"/>
<result column="inventory_type" property="inventoryType"/>
<result column="inventory_unit_id" property="inventoryUnitId"/>
<result column="bar_code" property="barCode"/>
<result column="f_creator_time" property="creatorTime"/>
@ -34,6 +33,8 @@
<result column="productTypeIds" property="productTypeIds"/>
<result column="inventoryTypes" property="inventoryTypes"/>
<result column="productId" property="productId"/>
<result column="inventoryNumber" property="inventoryNumber"/>
</resultMap>
@ -81,7 +82,6 @@
JgFnUnitName ( inventory_unit_id ) AS inventoryUnitIds,
JgFnUnitName ( operate_unit_id ) AS operateUnitIds,
operate_unit_id AS operateUnitId
FROM
jg_product a
LEFT JOIN flow_task b ON a.id = b.f_process_id
@ -131,4 +131,63 @@
WHERE f_delete_mark is null and id = #{id}
</select>
<select id="queryProductInventoryReportlossList" resultMap="getProductWarehouseMap">
SELECT
b.*,
b.id AS productId,
CASE
inventory_type
WHEN 1 THEN
'原材料'
WHEN 2 THEN
'半成品'
WHEN 3 THEN
'产成品'
END AS inventoryTypes,
CASE
b.product_type_id
WHEN 1 THEN
'实物商品'
WHEN 2 THEN
'虚拟商品'
WHEN 3 THEN
'设备/器材'
WHEN 4 THEN
'耗材/辅材'
END AS productTypeIds,
IF
(
many_unit_flag = 1,
JgFnUnitName ( order_main_unit_id ),
JgFnUnitArrName ( order_main_unit_id )) AS orderMainUnitIds,
order_main_unit_id AS orderMainUnitId,
purchase_order_quantity_down as purchaseOrderQuantityDowns,
purchase_order_quantity_upper as purchaseOrderQuantityUppers,
purchase_order_multiple as purchaseOrderMultiples,
IF
(
many_unit_flag = 1,
JgFnUnitName ( sales_main_unit_id ),
JgFnUnitArrName ( sales_main_unit_id )) AS salesMainUnitIds,
sales_order_quantity_down as salesOrderQuantityDowns,
sales_order_quantity_upper as salesOrderQuantityUppers,
sales_order_multiple as salesOrderMultiples,
JgFnUnitName ( b.inventory_unit_id ) AS inventoryUnitIds,
JgFnUnitName ( operate_unit_id ) AS operateUnitIds,
operate_unit_id AS operateUnitId,
a.inventory_number AS inventoryNumber,
a.id AS inventoryId
FROM
jg_inventory a
LEFT JOIN jg_product b ON a.product_id = b.id AND a.product_type_id =b.product_type_id
LEFT JOIN flow_task c ON b.id = c.f_process_id
${ew.customSqlSegment} AND c.f_status = 2
<if test="productWarehousePagination.sidx != null and productWarehousePagination.sidx != ''">
ORDER BY ${productWarehousePagination.sidx} ${productWarehousePagination.sort}
</if>
</select>
</mapper>

@ -8,6 +8,43 @@
WHERE t1.f_delete_mark IS NULL AND t2.id = #{id}
</select>
<resultMap id="receiveProduct" type="jnpf.entity.ProductWarehouseEntity">
<id column="id" property="id"/>
<result column="product_type_id" property="productTypeId"/>
<result column="photo" property="photo"/>
<result column="code" property="code"/>
<result column="name" property="name"/>
<result column="product_status" property="productStatus"/>
<result column="short_name" property="shortName"/>
<result column="bar_code" property="barCode"/>
<result column="box_surface_num" property="boxSurfaceNum"/>
<result column="spec" property="spec"/>
<result column="inventory_type" property="inventoryType"/>
<result column="inventory_unit_id" property="inventoryUnitId"/>
<result column="bar_code" property="barCode"/>
<result column="f_creator_time" property="creatorTime"/>
<result column="f_creator_user_id" property="creatorUserId"/>
<result column="f_last_modify_time" property="lastModifyTime"/>
<result column="f_last_modify_user_id" property="lastModifyUserId"/>
<result column="salesMainUnitIds" property="salesMainUnitIds"/>
<result column="orderMainUnitIds" property="orderMainUnitIds"/>
<result column="inventoryUnitIds" property="inventoryUnitIds"/>
<result column="operateUnitIds" property="operateUnitIds"/>
<result column="purchaseOrderQuantityDowns" property="purchaseOrderQuantityDowns"/>
<result column="purchaseOrderQuantityUppers" property="purchaseOrderQuantityUppers"/>
<result column="purchaseOrderMultiples" property="purchaseOrderMultiples"/>
<result column="salesOrderQuantityDowns" property="salesOrderQuantityDowns"/>
<result column="salesOrderQuantityUppers" property="salesOrderQuantityUppers"/>
<result column="salesOrderMultiples" property="salesOrderMultiples"/>
<result column="productTypeIds" property="productTypeIds"/>
<result column="inventoryTypes" property="inventoryTypes"/>
<result column="productId" property="productId"/>
<result column="inventoryNumber" property="inventoryNumber"/>
<result column="usedreturnNumber" property="usedreturnNumber"/>
<result column="usedreturnUnit" property="usedreturnUnit"/>
</resultMap>
<select id="queryTransitInventory" resultType="java.math.BigDecimal">
SELECT SUM(d.usedreturn_number) usedreturnNumSum from jg_warehousing_receive a
LEFT JOIN flow_task b ON a.id = b.f_process_id
@ -26,4 +63,67 @@
AND d.product_id = #{inventoryEntity.productId}
</if>
</select>
<select id="queryWorkOrderReceiveProduct" resultMap="receiveProduct">
SELECT
b.*,
b.id AS productId,
CASE
inventory_type
WHEN 1 THEN
'原材料'
WHEN 2 THEN
'半成品'
WHEN 3 THEN
'产成品'
END AS inventoryTypes,
CASE
b.product_type_id
WHEN 1 THEN
'实物商品'
WHEN 2 THEN
'虚拟商品'
WHEN 3 THEN
'设备/器材'
WHEN 4 THEN
'耗材/辅材'
END AS productTypeIds,
IF
(
many_unit_flag = 1,
JgFnUnitName ( order_main_unit_id ),
JgFnUnitArrName ( order_main_unit_id )) AS orderMainUnitIds,
order_main_unit_id AS orderMainUnitId,
purchase_order_quantity_down as purchaseOrderQuantityDowns,
purchase_order_quantity_upper as purchaseOrderQuantityUppers,
purchase_order_multiple as purchaseOrderMultiples,
IF
(
many_unit_flag = 1,
JgFnUnitName ( sales_main_unit_id ),
JgFnUnitArrName ( sales_main_unit_id )) AS salesMainUnitIds,
sales_order_quantity_down as salesOrderQuantityDowns,
sales_order_quantity_upper as salesOrderQuantityUppers,
sales_order_multiple as salesOrderMultiples,
JgFnUnitName ( b.inventory_unit_id ) AS inventoryUnitIds,
JgFnUnitName ( b.inventory_unit_id ) AS usedreturnUnit,
JgFnUnitName ( operate_unit_id ) AS operateUnitIds,
operate_unit_id AS operateUnitId,
a.inventory_number AS inventoryNumber,
d.reality_num AS usedreturnNumber,
a.id AS inventoryId
FROM
jg_inventory a
LEFT JOIN jg_product b ON a.product_id = b.id AND a.product_type_id =b.product_type_id
LEFT JOIN flow_task c ON b.id = c.f_process_id
LEFT JOIN jg_work_order_primary d ON d.product_id =b.id
LEFT JOIN jg_work_order e ON d.work_id = e.id AND e.f_delete_mark IS NULL
WHERE
a.f_delete_mark IS NULL
AND e.id = #{id}
GROUP BY
a.id
</select>
</mapper>

@ -2,10 +2,53 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.WarehousingReturnMapper">
<resultMap id="workOrderBomProduct" type="jnpf.entity.ProductWarehouseEntity">
<id column="id" property="id"></id>
<result column="productId" property="productId"></result>
<result column="name" property="name"></result>
<result column="spec" property="spec"></result>
<result column="barCode" property="barCode"></result>
<result column="inventoryType" property="inventoryType"></result>
<result column="inventoryUnitIds" property="inventoryUnitIds"></result>
<result column="theoryNum" property="theoryNum"></result>
<result column="returnUnit" property="returnUnit"></result>
</resultMap>
<select id="queryReturnNum" resultType="String">
SELECT SUM(return_number) AS returnNum FROM jg_warehousing_return_product t1
LEFT JOIN jg_warehousing_return t2 ON t2.id=t1.return_id
WHERE t1.f_delete_mark IS NULL AND t2.id = #{id}
</select>
<select id="queryReturnReceiveProduct" resultMap="workOrderBomProduct">
SELECT
b.id,
b.id AS productId,
b.NAME AS NAME,
b.spec,
b.bar_code AS barCode,
CASE
b.inventory_type
WHEN 1 THEN
'原材料'
WHEN 2 THEN
'半成品'
WHEN 3 THEN
'产成品'
END AS inventoryType,
JgFnUnitName ( b.inventory_unit_id ) AS inventoryUnitIds,
JgFnUnitName ( b.inventory_unit_id ) AS returnUnit
FROM
jg_warehousing_receive_product a
LEFT JOIN jg_product b ON a.product_id = b.id
AND b.f_delete_mark IS NULL
LEFT JOIN jg_warehousing_receive c ON a.receive_id = c.id
AND c.f_delete_mark IS NULL
WHERE
a.f_delete_mark IS NULL
AND c.id = #{id}
</select>
</mapper>

@ -19,8 +19,6 @@
<result column="inventoryType" property="inventoryType"></result>
<result column="inventoryUnitIds" property="inventoryUnitIds"></result>
<result column="theoryNum" property="theoryNum"></result>
</resultMap>
<select id="queryworkOrderBom" resultMap="workOrderBom">

@ -27,4 +27,7 @@ public interface ProductWarehouseMapper extends BaseMapper<ProductWarehouseEntit
//凭证关联商品
List<ProductWarehouseEntity> getProductByVoucher(String id);
//报损单依据库存表查询商品
IPage<ProductWarehouseEntity> queryProductInventoryReportlossList(@Param("page") Page<ProductWarehouseEntity> page, @Param("productWarehousePagination") ProductWarehousePagination productWarehousePagination, @Param("ew") Wrapper<ProductWarehouseEntity> bomQueryWrapper);
}

@ -2,6 +2,7 @@ package jnpf.mapper;
import jnpf.entity.InventoryEntity;
import jnpf.entity.ProductWarehouseEntity;
import jnpf.entity.WarehousingReceiveEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
@ -22,4 +23,7 @@ public interface WarehousingReceiveMapper extends BaseMapper<WarehousingReceiveE
String queryReceiveNum(String id);
BigDecimal queryTransitInventory(@Param("inventoryEntity") InventoryEntity inventoryEntity);
//返库单根据加工单带出加工原材料
List<ProductWarehouseEntity> queryWorkOrderReceiveProduct(@Param("id") String id);
}

@ -1,8 +1,12 @@
package jnpf.mapper;
import jnpf.entity.ProductWarehouseEntity;
import jnpf.entity.WarehousingReturnEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* warehousingReturn
@ -14,4 +18,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface WarehousingReturnMapper extends BaseMapper<WarehousingReturnEntity> {
String queryReturnNum(String id); //返库总数量
//加工单根据商品成品查询bom带出原材料2
List<ProductWarehouseEntity> queryReturnReceiveProduct(@Param("id") String id);
}

@ -46,4 +46,8 @@ public interface ProductWarehouseService extends IService<ProductWarehouseEntity
List<ProductWarehouseEntity> getProductByVoucherInfo(String id);
//报损单依据库存表查询商品
List<ProductWarehouseEntity> getProductInventoryReportlossList(ProductWarehousePagination productWarehousePagination);
List<ProductWarehouseEntity> getProductInventoryReportlossTypeList(ProductWarehousePagination productWarehousePagination,String dataType);
}

@ -45,4 +45,5 @@ public interface WarehousingReceiveService extends IService<WarehousingReceiveEn
void saveOrUpdateWorkOrder(WarehousingReceiveForm warehousingReceiveForm,String id, boolean isSave) throws Exception;
List<ProductWarehouseEntity> getWorkProduct(String id);
}

@ -41,4 +41,7 @@ public interface WarehousingReturnService extends IService<WarehousingReturnEnti
//返库总数量
String queryReturnNum(String id);
List<ProductWarehouseEntity> getReturnReceiveProduct(String id);
}

@ -48,4 +48,8 @@ public interface WorkOrderService extends IService<WorkOrderEntity> {
List<ProductWarehouseEntity> getWorkBomProduct(String id);
//领用单查询使用
List<WorkOrderEntity> getReceiveList(WorkOrderPagination workOrderPagination);
List<WorkOrderEntity> getReceiveTypeList(WorkOrderPagination workOrderPagination,String dataType);
}

@ -870,4 +870,300 @@ public class ProductWarehouseServiceImpl extends ServiceImpl<ProductWarehouseMap
public List<ProductWarehouseEntity> getProductByVoucherInfo(String id) {
return productWarehouseMapper.getProductByVoucher(id);
}
@Override
public List<ProductWarehouseEntity> getProductInventoryReportlossList(ProductWarehousePagination productWarehousePagination) {
return getProductInventoryReportlossTypeList(productWarehousePagination,productWarehousePagination.getDataType());
}
@Override
public List<ProductWarehouseEntity> getProductInventoryReportlossTypeList(ProductWarehousePagination productWarehousePagination, String dataType) {
String userId=userProvider.get().getUserId();
List<String> AllIdList =new ArrayList();
List<List<String>> intersectionList =new ArrayList<>();
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
String columnData = !isPc ? ProductWarehouseConstant.getAppColumnData() : ProductWarehouseConstant.getColumnData();
ColumnDataModel columnDataModel = JsonUtil.getJsonToBean(columnData, ColumnDataModel.class);
String ruleJson = !isPc ? JsonUtil.getObjectToString(columnDataModel.getRuleListApp()) : JsonUtil.getObjectToString(columnDataModel.getRuleList());
int total=0;
int productWarehouseNum =0;
QueryWrapper<ProductWarehouseEntity> productWarehouseQueryWrapper=new QueryWrapper<>();
int productBusinessNum =0;
QueryWrapper<ProductBusinessEntity> productBusinessQueryWrapper=new QueryWrapper<>();
int productUnitNum =0;
QueryWrapper<ProductUnitEntity> productUnitQueryWrapper=new QueryWrapper<>();
long productBusinesscount = productBusinessService.count();
long productUnitcount = productUnitService.count();
List<String> allSuperIDlist = new ArrayList<>();
String superOp ="";
if (ObjectUtil.isNotEmpty(productWarehousePagination.getSuperQueryJson())){
List<String> allSuperList = new ArrayList<>();
List<List<String>> intersectionSuperList = new ArrayList<>();
String queryJson = productWarehousePagination.getSuperQueryJson();
SuperJsonModel superJsonModel = JsonUtil.getJsonToBean(queryJson, SuperJsonModel.class);
int superNum = 0;
QueryWrapper<ProductWarehouseEntity> productWarehouseSuperWrapper = new QueryWrapper<>();
productWarehouseSuperWrapper = generaterSwapUtil.getCondition(new QueryModel(productWarehouseSuperWrapper,ProductWarehouseEntity.class,queryJson,"0"));
int productWarehouseNum1 = productWarehouseSuperWrapper.getExpression().getNormal().size();
if (productWarehouseNum1>0){
List<String> productWarehouseList =this.list(productWarehouseSuperWrapper).stream().map(ProductWarehouseEntity::getId).collect(Collectors.toList());
allSuperList.addAll(productWarehouseList);
intersectionSuperList.add(productWarehouseList);
superNum++;
}
String productBusinessTable = "jg_product_business";
boolean productBusinessHasSql = queryJson.contains(productBusinessTable);
List<String> productBusinessList = generaterSwapUtil.selectIdsByChildCondition(ProductWarehouseConstant.getTableList(), productBusinessTable , queryJson, null);
if (productBusinessHasSql){
allSuperList.addAll(productBusinessList);
intersectionSuperList.add(productBusinessList);
superNum++;
}
String productUnitTable = "jg_product_unit";
boolean productUnitHasSql = queryJson.contains(productUnitTable);
List<String> productUnitList = generaterSwapUtil.selectIdsByChildCondition(ProductWarehouseConstant.getTableList(), productUnitTable , queryJson, null);
if (productUnitHasSql){
allSuperList.addAll(productUnitList);
intersectionSuperList.add(productUnitList);
superNum++;
}
superOp = superNum > 0 ? superJsonModel.getMatchLogic() : "";
//and or
if(superOp.equalsIgnoreCase("and")){
allSuperIDlist = generaterSwapUtil.getIntersection(intersectionSuperList);
}else{
allSuperIDlist = allSuperList;
}
}
List<String> allRuleIDlist = new ArrayList<>();
String ruleOp ="";
if (ObjectUtil.isNotEmpty(ruleJson)){
List<String> allRuleList = new ArrayList<>();
List<List<String>> intersectionRuleList = new ArrayList<>();
SuperJsonModel ruleJsonModel = JsonUtil.getJsonToBean(ruleJson, SuperJsonModel.class);
int ruleNum = 0;
QueryWrapper<ProductWarehouseEntity> productWarehouseSuperWrapper = new QueryWrapper<>();
productWarehouseSuperWrapper = generaterSwapUtil.getCondition(new QueryModel(productWarehouseSuperWrapper,ProductWarehouseEntity.class,ruleJson,"0"));
int productWarehouseNum1 = productWarehouseSuperWrapper.getExpression().getNormal().size();
if (productWarehouseNum1>0){
List<String> productWarehouseList =this.list(productWarehouseSuperWrapper).stream().map(ProductWarehouseEntity::getId).collect(Collectors.toList());
allRuleList.addAll(productWarehouseList);
intersectionRuleList.add(productWarehouseList);
ruleNum++;
}
String productBusinessTable = "jg_product_business";
boolean productBusinessHasSql = ruleJson.contains(productBusinessTable);
List<String> productBusinessList = generaterSwapUtil.selectIdsByChildCondition(ProductWarehouseConstant.getTableList(), productBusinessTable , ruleJson, null);
if (productBusinessHasSql){
allRuleList.addAll(productBusinessList);
intersectionRuleList.add(productBusinessList);
ruleNum++;
}
String productUnitTable = "jg_product_unit";
boolean productUnitHasSql = ruleJson.contains(productUnitTable);
List<String> productUnitList = generaterSwapUtil.selectIdsByChildCondition(ProductWarehouseConstant.getTableList(), productUnitTable , ruleJson, null);
if (productUnitHasSql){
allRuleList.addAll(productUnitList);
intersectionRuleList.add(productUnitList);
ruleNum++;
}
ruleOp = ruleNum > 0 ? ruleJsonModel.getMatchLogic() : "";
//and or
if(ruleOp.equalsIgnoreCase("and")){
allRuleIDlist = generaterSwapUtil.getIntersection(intersectionRuleList);
}else{
allRuleIDlist = allRuleList;
}
}
boolean pcPermission = true;
boolean appPermission = false;
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object productWarehouseObj=generaterSwapUtil.getAuthorizeCondition(new QueryModel(productWarehouseQueryWrapper,ProductWarehouseEntity.class,productWarehousePagination.getMenuId(),"0"));
if (ObjectUtil.isEmpty(productWarehouseObj)){
return new ArrayList<>();
} else {
productWarehouseQueryWrapper = (QueryWrapper<ProductWarehouseEntity>)productWarehouseObj;
if( productWarehouseQueryWrapper.getExpression().getNormal().size()>0){
productWarehouseNum++;
}
}
Object productBusinessObj=generaterSwapUtil.getAuthorizeCondition(new QueryModel(productBusinessQueryWrapper,ProductBusinessEntity.class,productWarehousePagination.getMenuId(),"0"));
if (ObjectUtil.isEmpty(productBusinessObj)){
return new ArrayList<>();
} else {
productBusinessQueryWrapper = (QueryWrapper<ProductBusinessEntity>)productBusinessObj;
if( productBusinessQueryWrapper.getExpression().getNormal().size()>0){
productBusinessNum++;
}
}
Object productUnitObj=generaterSwapUtil.getAuthorizeCondition(new QueryModel(productUnitQueryWrapper,ProductUnitEntity.class,productWarehousePagination.getMenuId(),"0"));
if (ObjectUtil.isEmpty(productUnitObj)){
return new ArrayList<>();
} else {
productUnitQueryWrapper = (QueryWrapper<ProductUnitEntity>)productUnitObj;
if( productUnitQueryWrapper.getExpression().getNormal().size()>0){
productUnitNum++;
}
}
}
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object productWarehouseObj=generaterSwapUtil.getAuthorizeCondition(new QueryModel(productWarehouseQueryWrapper,ProductWarehouseEntity.class,productWarehousePagination.getMenuId(),"0"));
if (ObjectUtil.isEmpty(productWarehouseObj)){
return new ArrayList<>();
} else {
productWarehouseQueryWrapper = (QueryWrapper<ProductWarehouseEntity>)productWarehouseObj;
if( productWarehouseQueryWrapper.getExpression().getNormal().size()>0){
productWarehouseNum++;
}
}
Object productBusinessObj=generaterSwapUtil.getAuthorizeCondition(new QueryModel(productBusinessQueryWrapper,ProductBusinessEntity.class,productWarehousePagination.getMenuId(),"0"));
if (ObjectUtil.isEmpty(productBusinessObj)){
return new ArrayList<>();
} else {
productBusinessQueryWrapper = (QueryWrapper<ProductBusinessEntity>)productBusinessObj;
if( productBusinessQueryWrapper.getExpression().getNormal().size()>0){
productBusinessNum++;
}
}
Object productUnitObj=generaterSwapUtil.getAuthorizeCondition(new QueryModel(productUnitQueryWrapper,ProductUnitEntity.class,productWarehousePagination.getMenuId(),"0"));
if (ObjectUtil.isEmpty(productUnitObj)){
return new ArrayList<>();
} else {
productUnitQueryWrapper = (QueryWrapper<ProductUnitEntity>)productUnitObj;
if( productUnitQueryWrapper.getExpression().getNormal().size()>0){
productUnitNum++;
}
}
}
}
if(isPc){
if(ObjectUtil.isNotEmpty(productWarehousePagination.getCode())){
productWarehouseNum++;
String value = productWarehousePagination.getCode() instanceof List ?
JsonUtil.getObjectToString(productWarehousePagination.getCode()) :
String.valueOf(productWarehousePagination.getCode());
productWarehouseQueryWrapper.like("b.CODE",value);
}
if(ObjectUtil.isNotEmpty(productWarehousePagination.getName())){
productWarehouseNum++;
String value = productWarehousePagination.getName() instanceof List ?
JsonUtil.getObjectToString(productWarehousePagination.getName()) :
String.valueOf(productWarehousePagination.getName());
productWarehouseQueryWrapper.like("b.NAME",value);
}
if(ObjectUtil.isNotEmpty(productWarehousePagination.getId())){
productWarehouseNum++;
String value = productWarehousePagination.getName() instanceof List ?
JsonUtil.getObjectToString(productWarehousePagination.getId()) :
String.valueOf(productWarehousePagination.getId());
productWarehouseQueryWrapper.like("b.id",value);
}
if(ObjectUtil.isNotEmpty(productWarehousePagination.getProductTypeId())){
productWarehouseNum++;
productWarehouseQueryWrapper.lambda().eq(ProductWarehouseEntity::getProductTypeId,productWarehousePagination.getProductTypeId());
}
if(productWarehousePagination.getExcludeIdList() != null && productWarehousePagination.getExcludeIdList().size() > 0){
productWarehouseNum++;
productWarehouseQueryWrapper.notIn("b.id",productWarehousePagination.getExcludeIdList());
}
if(ObjectUtil.isNotEmpty(productWarehousePagination.getInventoryType())){
productWarehouseNum++;
List<String> idList = new ArrayList<>();
try {
String[][] inventoryType = JsonUtil.getJsonToBean(productWarehousePagination.getInventoryType(),String[][].class);
for(int i=0;i<inventoryType.length;i++){
if(inventoryType[i].length>0){
idList.add(JsonUtil.getObjectToString(Arrays.asList(inventoryType[i])));
}
}
}catch (Exception e1){
try {
List<String> inventoryType = JsonUtil.getJsonToList(productWarehousePagination.getInventoryType(),String.class);
if(inventoryType.size()>0){
idList.addAll(inventoryType);
}
}catch (Exception e2){
idList.add(String.valueOf(productWarehousePagination.getInventoryType()));
}
}
productWarehouseQueryWrapper.lambda().and(t->{
idList.forEach(tt->{
t.like(ProductWarehouseEntity::getInventoryType, tt).or();
});
});
}
}
if(productBusinessNum>0){
List<String> productBusinessIdList = productBusinessService.list(productBusinessQueryWrapper).stream().filter(t->StringUtil.isNotEmpty(t.getProductId())).map(t->t.getProductId()).collect(Collectors.toList());
long count = productBusinessService.count();
if (count>0){
intersectionList.add(productBusinessIdList);
}
AllIdList.addAll(productBusinessIdList);
}
total+=productBusinessNum;
if(productUnitNum>0){
List<String> productUnitIdList = productUnitService.list(productUnitQueryWrapper).stream().filter(t->StringUtil.isNotEmpty(t.getProuctId())).map(t->t.getProuctId()).collect(Collectors.toList());
long count = productUnitService.count();
if (count>0){
intersectionList.add(productUnitIdList);
}
AllIdList.addAll(productUnitIdList);
}
total+=productUnitNum;
List<String> intersection = generaterSwapUtil.getIntersection(intersectionList);
if (total>0){
if (intersection.size()==0){
intersection.add("jnpfNullList");
}
productWarehouseQueryWrapper.lambda().in(ProductWarehouseEntity::getId, intersection);
}
//是否有数据过滤查询
if (StringUtil.isNotEmpty(ruleOp)){
if (allRuleIDlist.size()==0){
allRuleIDlist.add("jnpfNullList");
}
List<String> finalAllRuleIDlist = allRuleIDlist;
productWarehouseQueryWrapper.lambda().and(t->t.in(ProductWarehouseEntity::getId, finalAllRuleIDlist));
}
//假删除标志
// productWarehouseQueryWrapper.lambda().isNull(ProductWarehouseEntity::getDeleteMark);
productWarehouseQueryWrapper.isNull("b.f_delete_mark");
//排序
if(StringUtil.isEmpty(productWarehousePagination.getSidx())){
// productWarehouseQueryWrapper.lambda().orderByDesc(ProductWarehouseEntity::getId);
productWarehousePagination.setSidx("b.f_creator_time");
productWarehousePagination.setSort("DESC");
}else{
try {
String sidx = productWarehousePagination.getSidx();
String[] strs= sidx.split("_name");
ProductWarehouseEntity productWarehouseEntity = new ProductWarehouseEntity();
Field declaredField = productWarehouseEntity.getClass().getDeclaredField(strs[0]);
declaredField.setAccessible(true);
String value = declaredField.getAnnotation(TableField.class).value();
productWarehousePagination.setSidx("b." + value);
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
}
if("0".equals(dataType)){
if((total>0 && AllIdList.size()>0) || total==0){
Page<ProductWarehouseEntity> page=new Page<>(productWarehousePagination.getCurrentPage(), productWarehousePagination.getPageSize());
IPage<ProductWarehouseEntity> userIPage=productWarehouseMapper.queryProductInventoryReportlossList(page, productWarehousePagination, productWarehouseQueryWrapper);
return productWarehousePagination.setData(userIPage.getRecords(),userIPage.getTotal());
}else{
List<ProductWarehouseEntity> list = new ArrayList();
return productWarehousePagination.setData(list, list.size());
}
}else{
return this.list(productWarehouseQueryWrapper);
}
}
}

@ -30,6 +30,9 @@ import jnpf.util.*;
import java.util.*;
import jnpf.base.UserInfo;
import jnpf.permission.entity.UserEntity;
import javax.annotation.Resource;
/**
*
* warehousingReceive
@ -48,7 +51,7 @@ public class WarehousingReceiveServiceImpl extends ServiceImpl<WarehousingReceiv
@Autowired
private WarehousingReceiveProductService warehousingReceiveProductService;
@Autowired
@Resource
private WarehousingReceiveMapper warehousingReceiveMapper;
@Override
public List<WarehousingReceiveEntity> getList(WarehousingReceivePagination warehousingReceivePagination){
@ -503,4 +506,9 @@ public class WarehousingReceiveServiceImpl extends ServiceImpl<WarehousingReceiv
}
}
}
@Override
public List<ProductWarehouseEntity> getWorkProduct(String id) {
return warehousingReceiveMapper.queryWorkOrderReceiveProduct(id);
}
}

@ -30,6 +30,9 @@ import jnpf.util.*;
import java.util.*;
import jnpf.base.UserInfo;
import jnpf.permission.entity.UserEntity;
import javax.annotation.Resource;
/**
*
* warehousingReportloss
@ -48,7 +51,7 @@ public class WarehousingReportlossServiceImpl extends ServiceImpl<WarehousingRep
@Autowired
private WarehousingReportlossProductService warehousingReportlossProductService;
@Autowired
@Resource
private WarehousingReportlossMapper warehousingReportlossMapper;
@Override
public List<WarehousingReportlossEntity> getList(WarehousingReportlossPagination warehousingReportlossPagination){

@ -496,4 +496,9 @@ public class WarehousingReturnServiceImpl extends ServiceImpl<WarehousingReturnM
public String queryReturnNum(String id) {
return warehousingReturnMapper.queryReturnNum(id);
}
@Override
public List<ProductWarehouseEntity> getReturnReceiveProduct(String id) {
return warehousingReturnMapper.queryReturnReceiveProduct(id);
}
}

@ -550,4 +550,283 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
public List<ProductWarehouseEntity> getWorkBomProduct(String id) {
return workOrderMapper.queryworkOrderBomProduct(id);
}
@Override
public List<WorkOrderEntity> getReceiveList(WorkOrderPagination workOrderPagination) {
return getReceiveTypeList(workOrderPagination,workOrderPagination.getDataType());
}
@Override
public List<WorkOrderEntity> getReceiveTypeList(WorkOrderPagination workOrderPagination, String dataType) {
String userId=userProvider.get().getUserId();
List<String> AllIdList =new ArrayList();
List<List<String>> intersectionList =new ArrayList<>();
boolean isPc = true;
String columnData = !isPc ? WorkOrderConstant.getAppColumnData() : WorkOrderConstant.getColumnData();
ColumnDataModel columnDataModel = JsonUtil.getJsonToBean(columnData, ColumnDataModel.class);
String ruleJson = !isPc ? JsonUtil.getObjectToString(columnDataModel.getRuleListApp()) : JsonUtil.getObjectToString(columnDataModel.getRuleList());
int total=0;
int workOrderNum =0;
QueryWrapper<WorkOrderEntity> workOrderQueryWrapper=new QueryWrapper<>();
int workOrderPrimaryNum =0;
QueryWrapper<WorkOrderPrimaryEntity> workOrderPrimaryQueryWrapper=new QueryWrapper<>();
int workOrderProductNum =0;
QueryWrapper<WorkOrderProductEntity> workOrderProductQueryWrapper=new QueryWrapper<>();
long workOrderPrimarycount = workOrderPrimaryService.count();
long workOrderProductcount = workOrderProductService.count();
List<String> allSuperIDlist = new ArrayList<>();
String superOp ="";
if (ObjectUtil.isNotEmpty(workOrderPagination.getSuperQueryJson())){
List<String> allSuperList = new ArrayList<>();
List<List<String>> intersectionSuperList = new ArrayList<>();
String queryJson = workOrderPagination.getSuperQueryJson();
SuperJsonModel superJsonModel = JsonUtil.getJsonToBean(queryJson, SuperJsonModel.class);
int superNum = 0;
QueryWrapper<WorkOrderEntity> workOrderSuperWrapper = new QueryWrapper<>();
workOrderSuperWrapper = generaterSwapUtil.getCondition(new QueryModel(workOrderSuperWrapper,WorkOrderEntity.class,queryJson,"0"));
int workOrderNum1 = workOrderSuperWrapper.getExpression().getNormal().size();
if (workOrderNum1>0){
List<String> workOrderList =this.list(workOrderSuperWrapper).stream().map(WorkOrderEntity::getId).collect(Collectors.toList());
allSuperList.addAll(workOrderList);
intersectionSuperList.add(workOrderList);
superNum++;
}
String workOrderPrimaryTable = "jg_work_order_primary";
boolean workOrderPrimaryHasSql = queryJson.contains(workOrderPrimaryTable);
List<String> workOrderPrimaryList = generaterSwapUtil.selectIdsByChildCondition(WorkOrderConstant.getTableList(), workOrderPrimaryTable , queryJson, null);
if (workOrderPrimaryHasSql){
allSuperList.addAll(workOrderPrimaryList);
intersectionSuperList.add(workOrderPrimaryList);
superNum++;
}
String workOrderProductTable = "jg_work_order_product";
boolean workOrderProductHasSql = queryJson.contains(workOrderProductTable);
List<String> workOrderProductList = generaterSwapUtil.selectIdsByChildCondition(WorkOrderConstant.getTableList(), workOrderProductTable , queryJson, null);
if (workOrderProductHasSql){
allSuperList.addAll(workOrderProductList);
intersectionSuperList.add(workOrderProductList);
superNum++;
}
superOp = superNum > 0 ? superJsonModel.getMatchLogic() : "";
//and or
if(superOp.equalsIgnoreCase("and")){
allSuperIDlist = generaterSwapUtil.getIntersection(intersectionSuperList);
}else{
allSuperIDlist = allSuperList;
}
}
List<String> allRuleIDlist = new ArrayList<>();
String ruleOp ="";
if (ObjectUtil.isNotEmpty(ruleJson)){
List<String> allRuleList = new ArrayList<>();
List<List<String>> intersectionRuleList = new ArrayList<>();
SuperJsonModel ruleJsonModel = JsonUtil.getJsonToBean(ruleJson, SuperJsonModel.class);
int ruleNum = 0;
QueryWrapper<WorkOrderEntity> workOrderSuperWrapper = new QueryWrapper<>();
workOrderSuperWrapper = generaterSwapUtil.getCondition(new QueryModel(workOrderSuperWrapper,WorkOrderEntity.class,ruleJson,"0"));
int workOrderNum1 = workOrderSuperWrapper.getExpression().getNormal().size();
if (workOrderNum1>0){
List<String> workOrderList =this.list(workOrderSuperWrapper).stream().map(WorkOrderEntity::getId).collect(Collectors.toList());
allRuleList.addAll(workOrderList);
intersectionRuleList.add(workOrderList);
ruleNum++;
}
String workOrderPrimaryTable = "jg_work_order_primary";
boolean workOrderPrimaryHasSql = ruleJson.contains(workOrderPrimaryTable);
List<String> workOrderPrimaryList = generaterSwapUtil.selectIdsByChildCondition(WorkOrderConstant.getTableList(), workOrderPrimaryTable , ruleJson, null);
if (workOrderPrimaryHasSql){
allRuleList.addAll(workOrderPrimaryList);
intersectionRuleList.add(workOrderPrimaryList);
ruleNum++;
}
String workOrderProductTable = "jg_work_order_product";
boolean workOrderProductHasSql = ruleJson.contains(workOrderProductTable);
List<String> workOrderProductList = generaterSwapUtil.selectIdsByChildCondition(WorkOrderConstant.getTableList(), workOrderProductTable , ruleJson, null);
if (workOrderProductHasSql){
allRuleList.addAll(workOrderProductList);
intersectionRuleList.add(workOrderProductList);
ruleNum++;
}
ruleOp = ruleNum > 0 ? ruleJsonModel.getMatchLogic() : "";
//and or
if(ruleOp.equalsIgnoreCase("and")){
allRuleIDlist = generaterSwapUtil.getIntersection(intersectionRuleList);
}else{
allRuleIDlist = allRuleList;
}
}
boolean pcPermission = true;
boolean appPermission = false;
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object workOrderObj=generaterSwapUtil.getAuthorizeCondition(new QueryModel(workOrderQueryWrapper,WorkOrderEntity.class,workOrderPagination.getMenuId(),"0"));
if (ObjectUtil.isEmpty(workOrderObj)){
return new ArrayList<>();
} else {
workOrderQueryWrapper = (QueryWrapper<WorkOrderEntity>)workOrderObj;
if( workOrderQueryWrapper.getExpression().getNormal().size()>0){
workOrderNum++;
}
}
Object workOrderPrimaryObj=generaterSwapUtil.getAuthorizeCondition(new QueryModel(workOrderPrimaryQueryWrapper,WorkOrderPrimaryEntity.class,workOrderPagination.getMenuId(),"0"));
if (ObjectUtil.isEmpty(workOrderPrimaryObj)){
return new ArrayList<>();
} else {
workOrderPrimaryQueryWrapper = (QueryWrapper<WorkOrderPrimaryEntity>)workOrderPrimaryObj;
if( workOrderPrimaryQueryWrapper.getExpression().getNormal().size()>0){
workOrderPrimaryNum++;
}
}
Object workOrderProductObj=generaterSwapUtil.getAuthorizeCondition(new QueryModel(workOrderProductQueryWrapper,WorkOrderProductEntity.class,workOrderPagination.getMenuId(),"0"));
if (ObjectUtil.isEmpty(workOrderProductObj)){
return new ArrayList<>();
} else {
workOrderProductQueryWrapper = (QueryWrapper<WorkOrderProductEntity>)workOrderProductObj;
if( workOrderProductQueryWrapper.getExpression().getNormal().size()>0){
workOrderProductNum++;
}
}
}
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object workOrderObj=generaterSwapUtil.getAuthorizeCondition(new QueryModel(workOrderQueryWrapper,WorkOrderEntity.class,workOrderPagination.getMenuId(),"0"));
if (ObjectUtil.isEmpty(workOrderObj)){
return new ArrayList<>();
} else {
workOrderQueryWrapper = (QueryWrapper<WorkOrderEntity>)workOrderObj;
if( workOrderQueryWrapper.getExpression().getNormal().size()>0){
workOrderNum++;
}
}
Object workOrderPrimaryObj=generaterSwapUtil.getAuthorizeCondition(new QueryModel(workOrderPrimaryQueryWrapper,WorkOrderPrimaryEntity.class,workOrderPagination.getMenuId(),"0"));
if (ObjectUtil.isEmpty(workOrderPrimaryObj)){
return new ArrayList<>();
} else {
workOrderPrimaryQueryWrapper = (QueryWrapper<WorkOrderPrimaryEntity>)workOrderPrimaryObj;
if( workOrderPrimaryQueryWrapper.getExpression().getNormal().size()>0){
workOrderPrimaryNum++;
}
}
Object workOrderProductObj=generaterSwapUtil.getAuthorizeCondition(new QueryModel(workOrderProductQueryWrapper,WorkOrderProductEntity.class,workOrderPagination.getMenuId(),"0"));
if (ObjectUtil.isEmpty(workOrderProductObj)){
return new ArrayList<>();
} else {
workOrderProductQueryWrapper = (QueryWrapper<WorkOrderProductEntity>)workOrderProductObj;
if( workOrderProductQueryWrapper.getExpression().getNormal().size()>0){
workOrderProductNum++;
}
}
}
}
if(isPc){
if(ObjectUtil.isNotEmpty(workOrderPagination.getCode())){
workOrderNum++;
String value = workOrderPagination.getCode() instanceof List ?
JsonUtil.getObjectToString(workOrderPagination.getCode()) :
String.valueOf(workOrderPagination.getCode());
workOrderQueryWrapper.lambda().like(WorkOrderEntity::getCode,value);
}
if(ObjectUtil.isNotEmpty(workOrderPagination.getBusinessCode())){
workOrderNum++;
String value = workOrderPagination.getBusinessCode() instanceof List ?
JsonUtil.getObjectToString(workOrderPagination.getBusinessCode()) :
String.valueOf(workOrderPagination.getBusinessCode());
workOrderQueryWrapper.lambda().like(WorkOrderEntity::getBusinessCode,value);
}
if(ObjectUtil.isNotEmpty(workOrderPagination.getType())){
workOrderNum++;
workOrderQueryWrapper.lambda().eq(WorkOrderEntity::getType,workOrderPagination.getType());
}
}
if(workOrderPrimaryNum>0){
List<String> workOrderPrimaryIdList = workOrderPrimaryService.list(workOrderPrimaryQueryWrapper).stream().filter(t->StringUtil.isNotEmpty(t.getWorkId())).map(t->t.getWorkId()).collect(Collectors.toList());
long count = workOrderPrimaryService.count();
if (count>0){
intersectionList.add(workOrderPrimaryIdList);
}
AllIdList.addAll(workOrderPrimaryIdList);
}
total+=workOrderPrimaryNum;
if(workOrderProductNum>0){
List<String> workOrderProductIdList = workOrderProductService.list(workOrderProductQueryWrapper).stream().filter(t->StringUtil.isNotEmpty(t.getWorkId())).map(t->t.getWorkId()).collect(Collectors.toList());
long count = workOrderProductService.count();
if (count>0){
intersectionList.add(workOrderProductIdList);
}
AllIdList.addAll(workOrderProductIdList);
}
total+=workOrderProductNum;
List<String> intersection = generaterSwapUtil.getIntersection(intersectionList);
if (total>0){
if (intersection.size()==0){
intersection.add("jnpfNullList");
}
workOrderQueryWrapper.lambda().in(WorkOrderEntity::getId, intersection);
}
//是否有高级查询
if (StringUtil.isNotEmpty(superOp)){
if (allSuperIDlist.size()==0){
allSuperIDlist.add("jnpfNullList");
}
List<String> finalAllSuperIDlist = allSuperIDlist;
workOrderQueryWrapper.lambda().and(t->t.in(WorkOrderEntity::getId, finalAllSuperIDlist));
}
//是否有数据过滤查询
if (StringUtil.isNotEmpty(ruleOp)){
if (allRuleIDlist.size()==0){
allRuleIDlist.add("jnpfNullList");
}
List<String> finalAllRuleIDlist = allRuleIDlist;
workOrderQueryWrapper.lambda().and(t->t.in(WorkOrderEntity::getId, finalAllRuleIDlist));
}
//假删除标志
workOrderQueryWrapper.lambda().isNull(WorkOrderEntity::getDeleteMark);
//排序
if(StringUtil.isEmpty(workOrderPagination.getSidx())){
workOrderQueryWrapper.lambda().orderByDesc(WorkOrderEntity::getId);
}else{
try {
String sidx = workOrderPagination.getSidx();
String[] strs= sidx.split("_name");
WorkOrderEntity workOrderEntity = new WorkOrderEntity();
Field declaredField = workOrderEntity.getClass().getDeclaredField(strs[0]);
declaredField.setAccessible(true);
String value = declaredField.getAnnotation(TableField.class).value();
workOrderQueryWrapper="asc".equals(workOrderPagination.getSort().toLowerCase())?workOrderQueryWrapper.orderByAsc(value):workOrderQueryWrapper.orderByDesc(value);
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
}
if("0".equals(dataType)){
if((total>0 && AllIdList.size()>0) || total==0){
Page<WorkOrderEntity> page=new Page<>(workOrderPagination.getCurrentPage(), workOrderPagination.getPageSize());
IPage<WorkOrderEntity> userIPage=this.page(page, workOrderQueryWrapper);
return workOrderPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}else{
List<WorkOrderEntity> list = new ArrayList();
return workOrderPagination.setData(list, list.size());
}
}else{
return this.list(workOrderQueryWrapper);
}
}
}

@ -304,4 +304,42 @@ public class ProductWarehouseController {
return ActionResult.success(productWarehouseMap);
}
/**
*
*
* @param productWarehousePagination
* @return
*/
@Operation(summary = "报损单根据库存获取商品")
@PostMapping("/postInventoryReportlossProductlist")
public ActionResult InventoryReportlossProductlist(@RequestBody ProductWarehousePagination productWarehousePagination) throws IOException{
List<ProductWarehouseEntity> list= productWarehouseService.getProductInventoryReportlossList(productWarehousePagination);
List<Map<String, Object>> realList=new ArrayList<>();
for (ProductWarehouseEntity entity : list) {
Map<String, Object> productWarehouseMap=JsonUtil.entityToMap(entity);
productWarehouseMap.put("id", productWarehouseMap.get("id"));
//副表数据
ProductBusinessEntity productBusinessEntity = productWarehouseService.getProductBusiness(entity.getId());
if(ObjectUtil.isNotEmpty(productBusinessEntity)){
Map<String, Object> productBusinessMap=JsonUtil.entityToMap(productBusinessEntity);
for(String key:productBusinessMap.keySet()){
productWarehouseMap.put("jnpf_jg_product_business_jnpf_"+key,productBusinessMap.get(key));
}
}
//子表数据
List<ProductUnitEntity> productUnitList = productWarehouseService.getProductUnitList(entity.getId(),productWarehousePagination);
productWarehouseMap.put("tableField141",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(productUnitList)));
realList.add(productWarehouseMap);
}
//返回对象
PageListVO vo = new PageListVO();
vo.setList(realList);
PaginationVO page = JsonUtil.getJsonToBean(productWarehousePagination, PaginationVO.class);
vo.setPagination(page);
return ActionResult.success(vo);
}
}

@ -126,7 +126,7 @@ public class WarehousingOutboundController {
if (flowTaskEntity!=null){
vo.put("flowState",flowTaskEntity.getStatus());
}else{
vo.put("flowState",null);
vo.put("flowState",2);
}
//添加流程id
String flowId="";

@ -7,6 +7,10 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import jnpf.base.ActionResult;
import jnpf.base.UserInfo;
import jnpf.exception.DataException;
import jnpf.model.warehousingreportloss.WarehousingReportlossConstant;
import jnpf.model.warehousingreportloss.WarehousingReportlossPagination;
import jnpf.model.workorder.WorkOrderConstant;
import jnpf.model.workorder.WorkOrderPagination;
import jnpf.permission.entity.UserEntity;
import jnpf.service.*;
import jnpf.entity.*;
@ -73,6 +77,8 @@ public class WarehousingReceiveController {
@Autowired
private WarehousingReceiveProductService warehousingReceiveProductService;
@Autowired
private WorkOrderService workOrderService;
@Autowired
@ -92,6 +98,10 @@ public class WarehousingReceiveController {
for (WarehousingReceiveEntity entity : list) {
entity.setReceiveNum(warehousingReceiveService.queryReceiveNumber(entity.getId()));
// QueryWrapper<WorkOrderEntity> workOrderEntityQueryWrapper =new QueryWrapper<>();
// workOrderEntityQueryWrapper.lambda().eq(WorkOrderEntity::getId,entity.getBusinessId());
WorkOrderEntity workOrderEntity=workOrderService.getInfo(entity.getBusinessId());
entity.setBusinessWorkOrder(workOrderEntity.getBusinessCode());
Map<String, Object> warehousingReceiveMap=JsonUtil.entityToMap(entity);
warehousingReceiveMap.put("id", warehousingReceiveMap.get("id"));
@ -110,7 +120,7 @@ public class WarehousingReceiveController {
if (flowTaskEntity!=null){
vo.put("flowState",flowTaskEntity.getStatus());
}else{
vo.put("flowState",null);
vo.put("flowState",2);
}
//添加流程id
String flowId="";
@ -462,4 +472,42 @@ public class WarehousingReceiveController {
return ActionResult.success("创建成功");
}
/**
*
*
* @param
* @return
*/
@Operation(summary = "获取列表")
@GetMapping("/getWorkOrderList")
public ActionResult workOrderList(@RequestParam("warehouseId") String warehouseId)throws IOException{
WorkOrderPagination workOrderPagination=new WorkOrderPagination();
workOrderPagination.setWarehouseId(warehouseId);
List<WorkOrderEntity> list= workOrderService.getReceiveList(workOrderPagination);
List<Map<String, Object>> realList=new ArrayList<>();
for (WorkOrderEntity entity : list) {
Map<String, Object> workOrderMap=JsonUtil.entityToMap(entity);
workOrderMap.put("id", workOrderMap.get("id"));
//副表数据
//子表数据
// List<WorkOrderProductEntity> workOrderProductList = workOrderService.getWorkOrderProductList(entity.getId(),workOrderPagination);
// workOrderMap.put("tableField116",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(workOrderProductList)));
// List<WorkOrderPrimaryEntity> workOrderPrimaryList = workOrderService.getWorkOrderPrimaryList(entity.getId(),workOrderPagination);
List<ProductWarehouseEntity> productWarehouseEntityList = warehousingReceiveService.getWorkProduct(entity.getId());
workOrderMap.put("tableField126",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(productWarehouseEntityList)));
realList.add(workOrderMap);
}
//数据转换
// realList = generaterSwapUtil.swapDataList(realList, WorkOrderConstant.getFormData(), WorkOrderConstant.getColumnData(), workOrderPagination.getModuleId(),false);
//返回对象
PageListVO vo = new PageListVO();
vo.setList(realList);
PaginationVO page = JsonUtil.getJsonToBean(workOrderPagination, PaginationVO.class);
vo.setPagination(page);
return ActionResult.success(vo);
}
}

@ -6,7 +6,13 @@ import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jnpf.base.ActionResult;
import jnpf.base.UserInfo;
import jnpf.engine.entity.FlowTaskNodeEntity;
import jnpf.engine.service.FlowTaskNodeService;
import jnpf.engine.service.FlowTaskService;
import jnpf.exception.DataException;
import jnpf.model.warehousingoutbound.WarehousingOutboundForm;
import jnpf.model.warehousingoutbound.WarehousingOutboundProductModel;
import jnpf.model.warehousingreceive.WarehousingReceiveProductModel;
import jnpf.permission.entity.UserEntity;
import jnpf.service.*;
import jnpf.entity.*;
@ -73,7 +79,12 @@ public class WarehousingReportlossController {
@Autowired
private WarehousingReportlossProductService warehousingReportlossProductService;
@Autowired
private FlowTaskNodeService flowTaskNodeService;
@Autowired
private FlowTaskService flowTaskService;
@Autowired
private WarehousingOutboundController warehousingOutboundController;
@Autowired
private ConfigValueUtil configValueUtil;
@ -108,7 +119,7 @@ public class WarehousingReportlossController {
if (flowTaskEntity!=null){
vo.put("flowState",flowTaskEntity.getStatus());
}else{
vo.put("flowState",null);
vo.put("flowState",2);
}
//添加流程id
String flowId="";
@ -367,6 +378,33 @@ public class WarehousingReportlossController {
if(entity!=null){
try{
warehousingReportlossService.saveOrUpdate(warehousingReportlossForm,id,false);
FlowTaskEntity flowTaskEntity = flowTaskService.getById(id);
if (flowTaskEntity!=null){
QueryWrapper<FlowTaskNodeEntity> flowTaskNodeEntityQueryWrapper = new QueryWrapper<>();
flowTaskNodeEntityQueryWrapper.lambda().eq(FlowTaskNodeEntity::getNodeCode, flowTaskEntity.getThisStepId());
flowTaskNodeEntityQueryWrapper.lambda().eq(FlowTaskNodeEntity::getTaskId, flowTaskEntity.getId());
List<FlowTaskNodeEntity> flowTaskNodeEntityList = flowTaskNodeService.list(flowTaskNodeEntityQueryWrapper);
if(flowTaskNodeEntityList != null && "end".equals(flowTaskNodeEntityList.get(0).getNodeNext())) {
//出库单
WarehousingOutboundForm warehousingOutboundForm=new WarehousingOutboundForm();
warehousingOutboundForm.setWarehousingOutboundType("10");
warehousingOutboundForm.setWarehousingId(entity.getId());
warehousingOutboundForm.setWarehouseId(entity.getWarehouseId());
List<WarehousingOutboundProductModel> warehousingOutboundProductModelList =new ArrayList<>();
for (WarehousingReportlossProductModel warehousingReportlossProductModel:warehousingReportlossForm.getWarehousingReportlossProductList()){
WarehousingOutboundProductModel warehousingOutboundProductModel=new WarehousingOutboundProductModel();
warehousingOutboundProductModel.setProductId(warehousingReportlossProductModel.getProductId());
warehousingOutboundProductModel.setOutboundAreaId(warehousingReportlossProductModel.getCargoId());
warehousingOutboundProductModel.setOutboundUnit(warehousingReportlossProductModel.getReportlossUnit()); //加工单位
warehousingOutboundProductModel.setOutboundNumber(warehousingReportlossProductModel.getReportlossNumber()); //报损数量
warehousingOutboundProductModelList.add(warehousingOutboundProductModel);
warehousingOutboundForm.setWarehousingOutboundProductList(warehousingOutboundProductModelList);
}
warehousingOutboundController.createWork(id,warehousingOutboundForm);
}
}
}catch(Exception e){
return ActionResult.fail("修改数据失败");
}

@ -73,6 +73,8 @@ public class WarehousingReturnController {
@Autowired
private WarehousingReturnProductService warehousingReturnProductService;
@Autowired
private WarehousingReceiveService warehousingReceiveService;
@Autowired
@ -91,6 +93,9 @@ public class WarehousingReturnController {
List<Map<String, Object>> realList=new ArrayList<>();
for (WarehousingReturnEntity entity : list) {
entity.setReturnNum(warehousingReturnService.queryReturnNum(entity.getId()));
WarehousingReceiveEntity warehousingReceiveEntity =warehousingReceiveService.getInfo(entity.getBusinessId());
entity.setBusinessReceive(warehousingReceiveEntity.getReceiveCode());
Map<String, Object> warehousingReturnMap=JsonUtil.entityToMap(entity);
warehousingReturnMap.put("id", warehousingReturnMap.get("id"));
//副表数据
@ -108,7 +113,7 @@ public class WarehousingReturnController {
if (flowTaskEntity!=null){
vo.put("flowState",flowTaskEntity.getStatus());
}else{
vo.put("flowState",null);
vo.put("flowState",2);
}
//添加流程id
String flowId="";
@ -461,4 +466,24 @@ public class WarehousingReturnController {
return ActionResult.success(warehousingReturnMap);
}
/**
*
*
* @return
*/
@Operation(summary = "获取返库单下面的领用单")
@GetMapping("/getreturnReceiveList")
public ActionResult returnReceiveList(@RequestParam("warehouseId") String warehouseId) throws IOException{
QueryWrapper<WarehousingReceiveEntity> warehousingReturnEntityQueryWrapper =new QueryWrapper<>();
warehousingReturnEntityQueryWrapper.lambda().eq(WarehousingReceiveEntity::getWarehouseId,warehouseId);
List<WarehousingReceiveEntity> warehousingReceiveEntityList =warehousingReceiveService.list(warehousingReturnEntityQueryWrapper);
for (WarehousingReceiveEntity warehousingReceiveEntity:warehousingReceiveEntityList){
List<ProductWarehouseEntity> productWarehouseEntityList=warehousingReturnService.getReturnReceiveProduct(warehousingReceiveEntity.getId());
warehousingReceiveEntity.setProductWarehouseEntityList(productWarehouseEntityList);
}
return ActionResult.success(warehousingReceiveEntityList);
}
}

@ -125,7 +125,7 @@ public class WarehousingStorageController {
if (flowTaskEntity!=null){
vo.put("flowState",flowTaskEntity.getStatus());
}else{
vo.put("flowState",null);
vo.put("flowState",2);
}
//添加流程id
String flowId="";

@ -272,4 +272,12 @@ public class ProductWarehouseEntity {
private String productTypeIds;
@TableField(exist = false)
private String inventoryTypes;
@TableField(exist = false)
private String inventoryNumber;
@TableField(exist = false)
private String usedreturnNumber;
@TableField(exist = false)
private String usedreturnUnit;
@TableField(exist = false)
private String returnUnit;
}

@ -34,6 +34,8 @@ public class WarehousingInventoryEntity {
private String missingDiskRule;
@TableField(value = "DUPLICATE_INVENTORY_RULE" , updateStrategy = FieldStrategy.IGNORED)
private String duplicateInventoryRule;
@TableField(value = "CARGO_ID" , updateStrategy = FieldStrategy.IGNORED)
private String cargoId;
@TableField(value = "f_creator_time" , fill = FieldFill.INSERT)
private Date creatorTime;
@TableField(value = "f_creator_user_id" , fill = FieldFill.INSERT)

@ -3,6 +3,8 @@ package jnpf.entity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
*
*
@ -60,4 +62,10 @@ public class WarehousingReceiveEntity {
@TableField(exist = false)
private String receiveNum; //领用总数量
@TableField(exist = false)
private String businessWorkOrder;
@TableField(exist = false)
private List<ProductWarehouseEntity> productWarehouseEntityList;
}

@ -57,4 +57,8 @@ public class WarehousingReportlossProductEntity {
@TableField(value = "CARGO_ID" , updateStrategy = FieldStrategy.IGNORED)
private String cargoId;
@TableField(exist = false)
private String spec;
}

@ -60,4 +60,7 @@ public class WarehousingReturnEntity {
@TableField(exist = false)
private String returnNum; //返库总数量
@TableField(exist = false)
private String businessReceive;
}

@ -1,5 +1,7 @@
package jnpf.model.warehousinginventory;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import java.util.List;
import java.math.BigDecimal;
@ -62,4 +64,7 @@ public class WarehousingInventoryForm {
/** 重复盘点规则 **/
@JsonProperty("duplicateInventoryRule")
private String duplicateInventoryRule;
/** 货区id **/
@JsonProperty("cargoId")
private String cargoId;
}

@ -36,4 +36,8 @@ public class WarehousingReportlossPagination extends Pagination {
/** 报损单编号 */
@JsonProperty("reportlossCode")
private Object reportlossCode;
/** 报损单编号 */
@JsonProperty("warehouseId")
private Object warehouseId;
}

@ -39,4 +39,7 @@ public class WorkOrderPagination extends Pagination {
@JsonProperty("status")
private Object status;
@JsonProperty("warehouseId")
private Object warehouseId;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

@ -91,7 +91,7 @@
<jnpf-form-tip-item label="商品分类" v-if="judgeShow('productCategoryId')" prop="productCategoryId">
<JnpfSelect v-model="dataForm.productCategoryId"
@change="changeData('productCategoryId', -1)" placeholder="请选择"
:disabled="true" clearable :style='{ "width": "100%" }'
:disabled="judgeWrite('productCategoryId')" clearable :style='{ "width": "100%" }'
:options="productCategoryIdOptions" :props="productCategoryIdProps">
</JnpfSelect>
</jnpf-form-tip-item>

@ -0,0 +1,147 @@
<template>
<el-dialog title="选择商品" :close-on-click-modal="false" :visible.sync="visible"
class="JNPF-dialog JNPF-dialog_center" lock-scroll append-to-body width="800px">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="10">
<el-form-item label="关键词">
<el-input v-model="keyword" placeholder="请输入关键词查询" clearable
@keyup.enter.native="search()" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-button type="primary" icon="el-icon-search"
@click="search()">{{ $t('common.search') }}
</el-button>
<el-button icon="el-icon-refresh-right" @click="refresh()">{{ $t('common.reset') }}
</el-button>
</el-form-item>
</el-col>
</el-form>
<div class="JNPF-common-search-box-right">
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="search()" />
</el-tooltip>
</div>
</el-row>
<JNPF-table v-loading="listLoading" :data="list" hasC @selection-change="handleSelectionChange"
:border="false">
<el-table-column prop="name" label="商品名称" align="left">
</el-table-column>
<el-table-column prop="code" label="商品编码" align="left">
</el-table-column>
<el-table-column prop="productTypeIds" label="商品类型" align="left">
</el-table-column>
<el-table-column prop="shortName" label="商品简称" align="left">
</el-table-column>
<el-table-column prop="spec" label="商品规格" align="left">
</el-table-column>
<el-table-column prop="barCode" label="商品条码" align="left">
</el-table-column>
<el-table-column prop="inventoryTypes" label="存货类型" align="left">
</el-table-column>
<el-table-column prop="inventoryUnitIds" label="库存单位" align="left">
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="init" />
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">{{ $t('common.cancelButton') }}</el-button>
<el-button type="primary" @click="select()">{{ $t('common.confirmButton') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import request from '@/utils/request'
import {
GoodsList
} from '@/api/extend/order'
export default {
data() {
return {
visible: false,
listLoading: true,
keyword: '',
list: [],
total: 0,
listQuery: {
superQueryJson: '',
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "",
},
excludeIdList: [],
checked: []
}
},
methods: {
init(excludeIdList, val) {
this.visible = true
this.listLoading = true
if (excludeIdList) {
this.excludeIdList = excludeIdList;
}
let query = {
...this.listQuery,
keyword: this.keyword,
excludeIdList: this.excludeIdList,
dataType: 0,
id: val,
}
request({
url: `/api/scm/ProductWarehouse/getBomProductlist`,
method: 'post',
data: query
}).then(res => {
this.list = res.data.list
this.listLoading = false
this.total = res.data.pagination.total
})
},
refresh() {
this.keyword = ''
this.listQuery.currentPage = 1
this.listQuery.pageSize = 20
this.listQuery.sort = "desc"
this.listQuery.sidx = ""
this.init()
},
search() {
this.listQuery.currentPage = 1
this.listQuery.pageSize = 20
this.listQuery.sort = "desc"
this.listQuery.sidx = ""
this.init()
},
select() {
if (!this.checked.length) return
this.visible = false
this.$emit('refreshDataList', this.checked)
},
handleSelectionChange(val) {
this.checked = val
}
}
}
</script>
<style lang="scss" scoped>
>>> .el-dialog__body {
height: 70vh;
padding: 0 0 10px !important;
display: flex;
flex-direction: column;
overflow: hidden;
.JNPF-common-search-box {
margin-bottom: 0;
.JNPF-common-search-box-right {
padding: 10px 10px 0 0;
}
}
}
</style>

@ -0,0 +1,149 @@
<template>
<el-dialog title="选择商品" :close-on-click-modal="false" :visible.sync="visible"
class="JNPF-dialog JNPF-dialog_center" lock-scroll append-to-body width="800px">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="10">
<el-form-item label="关键词">
<el-input v-model="keyword" placeholder="请输入关键词查询" clearable
@keyup.enter.native="search()" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-button type="primary" icon="el-icon-search"
@click="search()">{{ $t('common.search') }}
</el-button>
<el-button icon="el-icon-refresh-right" @click="refresh()">{{ $t('common.reset') }}
</el-button>
</el-form-item>
</el-col>
</el-form>
<div class="JNPF-common-search-box-right">
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="search()" />
</el-tooltip>
</div>
</el-row>
<JNPF-table v-loading="listLoading" :data="list" hasC @selection-change="handleSelectionChange"
:border="false">
<el-table-column prop="name" label="商品名称" align="left">
</el-table-column>
<el-table-column prop="code" label="商品编码" align="left">
</el-table-column>
<el-table-column prop="productTypeIds" label="商品类型" align="left">
</el-table-column>
<el-table-column prop="shortName" label="商品简称" align="left">
</el-table-column>
<el-table-column prop="spec" label="商品规格" align="left">
</el-table-column>
<el-table-column prop="barCode" label="商品条码" align="left">
</el-table-column>
<el-table-column prop="inventoryTypes" label="存货类型" align="left">
</el-table-column>
<el-table-column prop="inventoryNumber" label="可用库存" align="left">
</el-table-column>
<el-table-column prop="inventoryUnitIds" label="库存单位" align="left">
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="init" />
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">{{ $t('common.cancelButton') }}</el-button>
<el-button type="primary" @click="select()">{{ $t('common.confirmButton') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import request from '@/utils/request'
import {
GoodsList
} from '@/api/extend/order'
export default {
data() {
return {
visible: false,
listLoading: true,
keyword: '',
list: [],
total: 0,
listQuery: {
superQueryJson: '',
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "",
},
excludeIdList: [],
checked: []
}
},
methods: {
init(excludeIdList, val) {
this.visible = true
this.listLoading = true
if (excludeIdList) {
this.excludeIdList = excludeIdList;
}
let query = {
...this.listQuery,
keyword: this.keyword,
excludeIdList: this.excludeIdList,
dataType: 0,
id: val,
}
request({
url: `/api/scm/ProductWarehouse/postInventoryReportlossProductlist`,
method: 'post',
data: query
}).then(res => {
this.list = res.data.list
this.listLoading = false
this.total = res.data.pagination.total
})
},
refresh() {
this.keyword = ''
this.listQuery.currentPage = 1
this.listQuery.pageSize = 20
this.listQuery.sort = "desc"
this.listQuery.sidx = ""
this.init()
},
search() {
this.listQuery.currentPage = 1
this.listQuery.pageSize = 20
this.listQuery.sort = "desc"
this.listQuery.sidx = ""
this.init()
},
select() {
if (!this.checked.length) return
this.visible = false
this.$emit('refreshDataList', this.checked)
},
handleSelectionChange(val) {
this.checked = val
}
}
}
</script>
<style lang="scss" scoped>
>>> .el-dialog__body {
height: 70vh;
padding: 0 0 10px !important;
display: flex;
flex-direction: column;
overflow: hidden;
.JNPF-common-search-box {
margin-bottom: 0;
.JNPF-common-search-box-right {
padding: 10px 10px 0 0;
}
}
}
</style>

@ -1,95 +1,121 @@
<template>
<div :style="{ margin: '0 auto', width: '100%' }">
<el-row :gutter="15" class="">
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px" label-position="right"
:disabled="setting.readonly">
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px"
label-position="right" :disabled="setting.readonly">
<template v-if="!loading && formOperates">
<!-- 具体表单 -->
<el-col :span="24">
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">基础信息</span>
</div>
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">基础信息</span>
</div>
</el-col>
<el-col :span="24" v-if="judgeShow('inventoryType')">
<jnpf-form-tip-item label="业务类型" v-if="judgeShow('inventoryType')" prop="inventoryType">
<JnpfRadio v-model="dataForm.inventoryType" @change="changeData('inventoryType', -1)"
:disabled="judgeWrite('inventoryType')" optionType="default" direction="horizontal" size="small"
:options="inventoryTypeOptions" :props="inventoryTypeProps">
:disabled="judgeWrite('inventoryType')" optionType="default" direction="horizontal"
size="small" :options="inventoryTypeOptions" :props="inventoryTypeProps">
</JnpfRadio>
</jnpf-form-tip-item>
</el-col>
<el-col :span="12" v-if="judgeShow('warehouseId')">
<jnpf-form-tip-item label="仓库名称" v-if="judgeShow('warehouseId')" prop="warehouseId">
<JnpfPopupSelect v-model="dataForm.warehouseId" @change="changeData('warehouseId', -1)" :rowIndex="null"
:formData="dataForm" :templateJson="interfaceRes.warehouseId" placeholder="请选择"
:disabled="judgeWrite('warehouseId')" hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='name' field='warehouseId' interfaceId="529617754022498181"
:pageSize="20" :columnOptions="warehouseIdcolumnOptions" clearable :style='{ "width": "100%" }'>
<JnpfPopupSelect v-model="dataForm.warehouseId"
@change="changeData('warehouseId', -1)" :rowIndex="null" :formData="dataForm"
:templateJson="interfaceRes.warehouseId" placeholder="请选择"
:disabled="judgeWrite('warehouseId')" hasPage propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='name' field='warehouseId'
interfaceId="529617754022498181" :pageSize="20"
:columnOptions="warehouseIdcolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="12" v-if="judgeShow('inventoryTimeStart')">
<jnpf-form-tip-item label="盘点开始时间" v-if="judgeShow('inventoryTimeStart')" label-width="120px"
prop="inventoryTimeStart">
<JnpfDatePicker v-model="dataForm.inventoryTimeStart" @change="changeData('inventoryTimeStart', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')" placeholder="请选择"
:disabled="judgeWrite('inventoryTimeStart')" clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
<jnpf-form-tip-item label="盘点开始时间" v-if="judgeShow('inventoryTimeStart')"
label-width="120px" prop="inventoryTimeStart">
<JnpfDatePicker v-model="dataForm.inventoryTimeStart"
@change="changeData('inventoryTimeStart', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')"
placeholder="请选择" :disabled="judgeWrite('inventoryTimeStart')" clearable
:style='{ "width": "100%" }' type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" v-if="judgeShow('documentNo')">
<el-col :span="8" v-if="judgeShow('cargoId')">
<jnpf-form-tip-item label="货区名称" v-if="judgeShow('cargoId')" prop="cargoId">
<JnpfPopupSelect v-model="dataForm.cargoId" @change="changeData('cargoId',-1)"
:rowIndex="null" :formData="dataForm" :templateJson="interfaceRes.cargoId"
placeholder="请选择" hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='cargo_name' field='cargoId'
interfaceId="530700536261903749" :pageSize="20"
:columnOptions="cargoIdcolumnOptions" clearable :style='{"width":"100%"}'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('documentNo')">
<jnpf-form-tip-item label="单据编号" v-if="judgeShow('documentNo')" prop="documentNo">
<JnpfInput v-model="dataForm.documentNo" @change="changeData('documentNo', -1)" placeholder="系统自动生成"
:disabled="judgeWrite('documentNo')" readonly :style='{ "width": "100%" }'>
<JnpfInput v-model="dataForm.documentNo" @change="changeData('documentNo', -1)"
placeholder="系统自动生成" :disabled="judgeWrite('documentNo')" readonly
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" v-if="judgeShow('remark')">
<jnpf-form-tip-item label="备注" v-if="judgeShow('remark')" prop="remark">
<JnpfInput v-model="dataForm.remark" @change="changeData('remark', -1)" placeholder="请输入"
:disabled="judgeWrite('remark')" clearable :style='{ "width": "100%" }'>
<JnpfInput v-model="dataForm.remark" @change="changeData('remark', -1)"
placeholder="请输入" :disabled="judgeWrite('remark')" clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">盘点规则</span>
</div>
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">盘点规则</span>
</div>
</el-col>
<el-col :span="24" v-if="judgeShow('stocktakingMode')">
<jnpf-form-tip-item label="盘点方式" v-if="judgeShow('stocktakingMode')" prop="stocktakingMode">
<JnpfRadio v-model="dataForm.stocktakingMode" @change="changeData('stocktakingMode', -1)"
:disabled="judgeWrite('stocktakingMode')" optionType="default" direction="horizontal" size="small"
:options="stocktakingModeOptions" :props="stocktakingModeProps">
<jnpf-form-tip-item label="盘点方式" v-if="judgeShow('stocktakingMode')"
prop="stocktakingMode">
<JnpfRadio v-model="dataForm.stocktakingMode"
@change="changeData('stocktakingMode', -1)"
:disabled="judgeWrite('stocktakingMode')" optionType="default"
direction="horizontal" size="small" :options="stocktakingModeOptions"
:props="stocktakingModeProps">
</JnpfRadio>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" v-if="judgeShow('missingDiskRule')">
<jnpf-form-tip-item label="漏盘规则" v-if="judgeShow('missingDiskRule')" prop="missingDiskRule">
<JnpfRadio v-model="dataForm.missingDiskRule" @change="changeData('missingDiskRule', -1)"
:disabled="judgeWrite('missingDiskRule')" optionType="default" direction="horizontal" size="small"
:options="missingDiskRuleOptions" :props="missingDiskRuleProps">
<jnpf-form-tip-item label="漏盘规则" v-if="judgeShow('missingDiskRule')"
prop="missingDiskRule">
<JnpfRadio v-model="dataForm.missingDiskRule"
@change="changeData('missingDiskRule', -1)"
:disabled="judgeWrite('missingDiskRule')" optionType="default"
direction="horizontal" size="small" :options="missingDiskRuleOptions"
:props="missingDiskRuleProps">
</JnpfRadio>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" v-if="judgeShow('duplicateInventoryRule')">
<jnpf-form-tip-item label="重复盘点规则" v-if="judgeShow('duplicateInventoryRule')" label-width="120px"
prop="duplicateInventoryRule">
<JnpfRadio v-model="dataForm.duplicateInventoryRule" @change="changeData('duplicateInventoryRule', -1)"
:disabled="judgeWrite('duplicateInventoryRule')" optionType="default" direction="horizontal"
size="small" :options="duplicateInventoryRuleOptions" :props="duplicateInventoryRuleProps">
<!-- <el-col :span="24" v-if="judgeShow('duplicateInventoryRule')">
<jnpf-form-tip-item label="重复盘点规则" v-if="judgeShow('duplicateInventoryRule')"
label-width="120px" prop="duplicateInventoryRule">
<JnpfRadio v-model="dataForm.duplicateInventoryRule"
@change="changeData('duplicateInventoryRule', -1)"
:disabled="judgeWrite('duplicateInventoryRule')" optionType="default"
direction="horizontal" size="small" :options="duplicateInventoryRuleOptions"
:props="duplicateInventoryRuleProps">
</JnpfRadio>
</jnpf-form-tip-item>
</el-col>
</el-col> -->
<el-col :span="24">
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">实盘录入</span>
</div>
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">实盘录入</span>
</div>
</el-col>
<el-col :span="24" v-if="judgeShow('-${html.relationField}')">
<jnpf-form-tip-item label-width="0">
@ -98,42 +124,49 @@
</div>
<el-table :data="dataForm.warehousingInventoryProductList" size='mini' border>
<el-table-column type="index" width="50" label="序号" align="center" fixed="left" />
<el-table-column label="商品名称" v-if="judgeShow('warehousinginventoryproduct-productId')"
prop="productId" align="center" width="220" fixed="left">
<el-table-column label="商品名称"
v-if="judgeShow('warehousinginventoryproduct-productId')" prop="productId"
align="center" width="220" fixed="left">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousinginventoryproductList-productId')">*</span>商品名称
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.productId" @change="productBatch" :rowIndex="scope.$index"
:formData="dataForm" :templateJson="interfaceRes.warehousinginventoryproductproductId"
<JnpfPopupSelect v-model="scope.row.productId" @change="productBatch"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.warehousinginventoryproductproductId"
placeholder="请选择"
:disabled="judgeWrite('warehousinginventoryproductList') || judgeWrite('warehousinginventoryproductList-productId')"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='name'
:field="'productId' + scope.$index" interfaceId="529994958833209925" :pageSize="20"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
relationField='name' :field="'productId' + scope.$index"
interfaceId="529994958833209925" :pageSize="20"
:columnOptions="warehousinginventoryproductproductIdcolumnOptions" clearable
:style='{ "width": "100%" }'>
</JnpfPopupSelect>
</template>
</el-table-column>
<el-table-column label="规格" v-if="judgeShow('warehousinginventoryproduct-spec')" prop="spec" align="center" width="220">
<el-table-column label="规格" v-if="judgeShow('warehousinginventoryproduct-spec')"
prop="spec" align="center" width="220">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('warehousinginventoryproductList-spec')">*</span>
<span class="required-sign"
v-if="judgeRequired('warehousinginventoryproductList-spec')">*</span>规格
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.spec"
@change="changeData('warehousinginventoryproduct-spec', scope.$index)" placeholder="请输入"
@change="changeData('warehousinginventoryproduct-spec', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousinginventoryproductList') || judgeWrite('warehousinginventoryproductList-spec')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="库存单位" v-if="judgeShow('warehousinginventoryproduct-inventoryUnitIds')"
<el-table-column label="库存单位"
v-if="judgeShow('warehousinginventoryproduct-inventoryUnitIds')"
prop="inventoryUnitIds" align="center" width="220">
<template slot="header">
@ -151,8 +184,9 @@
</template>
</el-table-column>
<el-table-column label="商品分类" v-if="judgeShow('warehousinginventoryproduct-categoryName')"
prop="categoryName" align="center" width="220">
<el-table-column label="商品分类"
v-if="judgeShow('warehousinginventoryproduct-categoryName')" prop="categoryName"
align="center" width="220">
<template slot="header">
<span class="required-sign"
@ -161,14 +195,17 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.categoryName"
@change="changeData('warehousinginventoryproduct-categoryName', scope.$index)" placeholder="请输入"
@change="changeData('warehousinginventoryproduct-categoryName', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousinginventoryproductList') || judgeWrite('warehousinginventoryproductList-categoryName')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="品牌" v-if="judgeShow('warehousinginventoryproduct-brandName')" prop="brandName" align="center" width="220">
<el-table-column label="品牌"
v-if="judgeShow('warehousinginventoryproduct-brandName')" prop="brandName"
align="center" width="220">
<template slot="header">
<span class="required-sign"
@ -177,14 +214,16 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.brandName"
@change="changeData('warehousinginventoryproduct-brandName', scope.$index)" placeholder="请输入"
@change="changeData('warehousinginventoryproduct-brandName', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousinginventoryproductList') || judgeWrite('warehousinginventoryproductList-brandName')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="实盘数量" v-if="judgeShow('warehousinginventoryproduct-firmOfferQuantity')"
<el-table-column label="实盘数量"
v-if="judgeShow('warehousinginventoryproduct-firmOfferQuantity')"
prop="firmOfferQuantity" align="center" width="220">
<template slot="header">
@ -202,13 +241,11 @@
</template>
</el-table-column>
<el-table-column label="货区名称" v-if="judgeShow('warehousinginventoryproduct-cargoId')" prop="cargoId" align="center" width="220">
<!-- <el-table-column label="货区名称" v-if="judgeShow('warehousinginventoryproduct-cargoId')" prop="cargoId" align="center" width="220">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousinginventoryproductList-cargoId')">*</span>货区名称
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.cargoId"
@change="changeData('warehousinginventoryproduct-cargoId', scope.$index)" :rowIndex="scope.$index"
@ -219,11 +256,11 @@
:style='{ "width": "100%" }'>
</JnpfPopupSelect>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="批次号" v-if="judgeShow('warehousinginventoryproduct-batchNumber')"
prop="batchNumber" align="center" width="220">
<el-table-column label="批次号"
v-if="judgeShow('warehousinginventoryproduct-batchNumber')" prop="batchNumber"
align="center" width="220">
<template slot="header">
<span class="required-sign"
@ -232,14 +269,16 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.batchNumber"
@change="changeData('warehousinginventoryproduct-batchNumber', scope.$index)" placeholder="请输入"
@change="changeData('warehousinginventoryproduct-batchNumber', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousinginventoryproductList') || judgeWrite('warehousinginventoryproductList-batchNumber')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="生产日期" v-if="judgeShow('warehousinginventoryproduct-dateManufacture')"
<el-table-column label="生产日期"
v-if="judgeShow('warehousinginventoryproduct-dateManufacture')"
prop="dateManufacture" align="center" width="220">
<template slot="header">
@ -257,7 +296,8 @@
</template>
</el-table-column>
<el-table-column label="操作" align="center" fixed="right" width="50" v-if="!judgeWrite('warehousinginventoryproductList')">
<el-table-column label="操作" align="center" fixed="right" width="50"
v-if="!judgeWrite('warehousinginventoryproductList')">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@ -273,8 +313,8 @@
</el-col>
<!-- 表单结束 -->
</template>
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm" ref="selectDialog"
@select="addForSelect" @close="selectDialogVisible = false" />
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm"
ref="selectDialog" @select="addForSelect" @close="selectDialogVisible = false" />
</el-form>
</el-row>
<UserBox v-if="userBoxVisible" ref="userBox" @submit="submit" />
@ -344,6 +384,7 @@ export default {
inventoryType: undefined,
warehouseId: undefined,
inventoryTimeStart: undefined,
cargoId: undefined,
documentNo: undefined,
remark: undefined,
creatorUserId: undefined,
@ -394,17 +435,11 @@ export default {
trigger: 'change'
},
],
duplicateInventoryRule: [
{
required: true,
message: '不能为空',
trigger: 'change'
},
],
},
inventoryTypeOptions: [{ "fullName": "日常盘点单", "id": "1" }, { "fullName": "业务盘点单", "id": "2" }],
inventoryTypeProps: { "label": "fullName", "value": "id" },
warehouseIdcolumnOptions: [{ "label": "仓库名称", "value": "name" }, { "label": "仓库编码", "value": "code" },],
cargoIdcolumnOptions: [{ "label": "货区名称", "value": "cargo_name" },],
stocktakingModeOptions: [{ "fullName": "静态盘点", "id": "1" }, { "fullName": "动态盘点", "id": "2" }],
stocktakingModeProps: { "label": "fullName", "value": "id" },
missingDiskRuleOptions: [{ "fullName": "漏盘商品不做盈亏调整", "id": "1" }, { "fullName": "漏盘商品账面库存自动清零", "id": "2" }],
@ -419,6 +454,7 @@ export default {
inventoryType: [],
warehouseId: [],
inventoryTimeStart: [],
cargoId: [{ "dataType": "varchar", "defaultValue": "", "field": "businessOrganizeId", "fieldName": "", "id": "AyAmdw1", "jnpfKey": "popupSelect", "relationField": "warehouseId", "required": "0" }],
documentNo: [],
remark: [],
creatorUserId: [],

@ -1,74 +1,83 @@
<template>
<div :style="{ margin: '0 auto', width: '100%' }">
<el-row :gutter="15" class="">
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px" label-position="right"
:disabled="setting.readonly">
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px"
label-position="right" :disabled="setting.readonly">
<template v-if="!loading && formOperates">
<!-- 具体表单 -->
<el-col :span="24">
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">基础信息</span>
</div>
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">基础信息</span>
</div>
</el-col>
<el-col :span="8" v-if="judgeShow('receiveCode')">
<jnpf-form-tip-item label="领用单编号" v-if="judgeShow('receiveCode')" prop="receiveCode">
<JnpfInput v-model="dataForm.receiveCode" @change="changeData('receiveCode', -1)" placeholder="系统自动生成"
:disabled="judgeWrite('receiveCode')" readonly :style='{ "width": "100%" }'>
<JnpfInput v-model="dataForm.receiveCode" @change="changeData('receiveCode', -1)"
placeholder="系统自动生成" :disabled="judgeWrite('receiveCode')" readonly
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('warehouseId')">
<jnpf-form-tip-item label="仓库名称" v-if="judgeShow('warehouseId')" prop="warehouseId">
<JnpfPopupSelect v-model="dataForm.warehouseId" @change="changeData('warehouseId', -1)" :rowIndex="null"
:formData="dataForm" :templateJson="interfaceRes.warehouseId" placeholder="请选择"
:disabled="judgeWrite('warehouseId')" hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='name' field='warehouseId' interfaceId="529617754022498181"
:pageSize="20" :columnOptions="warehouseIdcolumnOptions" clearable :style='{ "width": "100%" }'>
<JnpfPopupSelect v-model="dataForm.warehouseId"
@change="changeData('warehouseId', -1)" :rowIndex="null" :formData="dataForm"
:templateJson="interfaceRes.warehouseId" placeholder="请选择"
:disabled="judgeWrite('warehouseId')" hasPage propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='name' field='warehouseId'
interfaceId="529617754022498181" :pageSize="20"
:columnOptions="warehouseIdcolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('usedreturnTime')">
<jnpf-form-tip-item label="领用时间" v-if="judgeShow('usedreturnTime')" prop="usedreturnTime">
<JnpfDatePicker v-model="dataForm.usedreturnTime" @change="changeData('usedreturnTime', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')" placeholder="请选择"
:disabled="judgeWrite('usedreturnTime')" clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
<jnpf-form-tip-item label="领用时间" v-if="judgeShow('usedreturnTime')"
prop="usedreturnTime">
<JnpfDatePicker v-model="dataForm.usedreturnTime"
@change="changeData('usedreturnTime', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')"
placeholder="请选择" :disabled="judgeWrite('usedreturnTime')" clearable
:style='{ "width": "100%" }' type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('usedreturnReason')">
<jnpf-form-tip-item label="领用原因" v-if="judgeShow('usedreturnReason')" prop="usedreturnReason">
<JnpfSelect v-model="dataForm.usedreturnReason" @change="changeData('usedreturnReason', -1)"
placeholder="请选择" :disabled="judgeWrite('usedreturnReason')" clearable :style='{ "width": "100%" }'
<jnpf-form-tip-item label="领用原因" v-if="judgeShow('usedreturnReason')"
prop="usedreturnReason">
<JnpfSelect v-model="dataForm.usedreturnReason"
@change="changeData('usedreturnReason', -1)" placeholder="请选择"
:disabled="judgeWrite('usedreturnReason')" clearable :style='{ "width": "100%" }'
:options="usedreturnReasonOptions" :props="usedreturnReasonProps">
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('businessId')">
<jnpf-form-tip-item label="关联单据" v-if="judgeShow('businessId')" prop="businessId">
<JnpfPopupSelect v-model="dataForm.businessId" @change="changeData('businessId', -1)" :rowIndex="null"
:formData="dataForm" :templateJson="interfaceRes.businessId" placeholder="请选择"
:disabled="judgeWrite('businessId')" hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='code' field='businessId' interfaceId="530410134715782917"
:pageSize="20" :columnOptions="businessIdcolumnOptions" clearable :style='{ "width": "100%" }'>
<JnpfPopupSelect v-model="dataForm.businessId" :rowIndex="null" :formData="dataForm"
@change="changeDataWorkOrder" :templateJson="interfaceRes.businessId"
placeholder="请选择" :disabled="judgeWrite('businessId')" hasPage propsValue="id"
popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='code'
field='businessId' interfaceId="530410134715782917" :pageSize="20"
:columnOptions="businessIdcolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" v-if="judgeShow('remark')">
<jnpf-form-tip-item label="备注" v-if="judgeShow('remark')" prop="remark">
<JnpfInput v-model="dataForm.remark" @change="changeData('remark', -1)" placeholder="请输入"
:disabled="judgeWrite('remark')" clearable :style='{ "width": "100%" }'>
<JnpfInput v-model="dataForm.remark" @change="changeData('remark', -1)"
placeholder="请输入" :disabled="judgeWrite('remark')" clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">商品信息</span>
</div>
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">商品信息</span>
</div>
</el-col>
<el-col :span="24" v-if="judgeShow('-${html.relationField}')">
<jnpf-form-tip-item label-width="0">
@ -77,7 +86,9 @@
</div>
<el-table :data="dataForm.warehousingReceiveProductList" size='mini' border>
<el-table-column type="index" width="50" label="序号" align="center" fixed="left" />
<el-table-column label="商品名称" v-if="judgeShow('warehousingreceiveproduct-productId')" prop="productId" align="center" width="220" fixed="left">
<el-table-column label="商品名称"
v-if="judgeShow('warehousingreceiveproduct-productId')" prop="productId"
align="center" width="220" fixed="left">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingreceiveproductList-productId')">*</span>商品名称
@ -86,17 +97,20 @@
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.productId" @change="receiveProductBatch"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.warehousingreceiveproductproductId" placeholder="请选择"
:templateJson="interfaceRes.warehousingreceiveproductproductId"
placeholder="请选择"
:disabled="judgeWrite('warehousingreceiveproductList') || judgeWrite('warehousingreceiveproductList-productId')"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='name'
:field="'productId' + scope.$index" interfaceId="530652311085669125" :pageSize="20"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
relationField='name' :field="'productId' + scope.$index"
interfaceId="530652311085669125" :pageSize="20"
:columnOptions="warehousingreceiveproductproductIdcolumnOptions" clearable
:style='{ "width": "100%" }'>
</JnpfPopupSelect>
</template>
</el-table-column>
<el-table-column label="领用单位" v-if="judgeShow('warehousingreceiveproduct-usedreturnUnit')"
prop="usedreturnUnit" align="center" width="200">
<el-table-column label="领用单位"
v-if="judgeShow('warehousingreceiveproduct-usedreturnUnit')" prop="usedreturnUnit"
align="center" width="200">
<template slot="header">
<span class="required-sign"
@ -104,36 +118,51 @@
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.usedreturnUnit"
<JnpfInput v-model="scope.row.usedreturnUnit"
@change="changeData('warehousingreceiveproduct-inventoryUnitIds', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingreceiveproductList') || judgeWrite('warehousingreceiveproductList-inventoryUnitIds')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
<!-- <template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.inventoryUnitIds"
@change="changeData('warehousingreceiveproduct-usedreturnUnit', scope.$index)"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.warehousingreceiveproductusedreturnUnit" placeholder="请选择"
:templateJson="interfaceRes.warehousingreceiveproductusedreturnUnit"
placeholder="请选择"
:disabled="judgeWrite('warehousingreceiveproductList') || judgeWrite('warehousingreceiveproductList-usedreturnUnit')"
hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
relationField='unit_name' :field="'usedreturnUnit' + scope.$index"
interfaceId="529938341609623877" :pageSize="20"
:columnOptions="warehousingreceiveproductusedreturnUnitcolumnOptions" clearable
:style='{ "width": "100%" }'>
hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='unit_name'
:field="'usedreturnUnit' + scope.$index" interfaceId="529938341609623877"
:pageSize="20"
:columnOptions="warehousingreceiveproductusedreturnUnitcolumnOptions"
clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</template>
</template> -->
</el-table-column>
<el-table-column label="规格" v-if="judgeShow('warehousingreceiveproduct-spec')" prop="spec" align="center" width="200">
<el-table-column label="规格" v-if="judgeShow('warehousingreceiveproduct-spec')"
prop="spec" align="center" width="200">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('warehousingreceiveproductList-spec')">*</span>
<span class="required-sign"
v-if="judgeRequired('warehousingreceiveproductList-spec')">*</span>规格
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.spec"
@change="changeData('warehousingreceiveproduct-spec', scope.$index)" placeholder="请输入"
@change="changeData('warehousingreceiveproduct-spec', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingreceiveproductList') || judgeWrite('warehousingreceiveproductList-spec')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="库存单位" v-if="judgeShow('warehousingreceiveproduct-inventoryUnitIds')"
<el-table-column label="库存单位"
v-if="judgeShow('warehousingreceiveproduct-inventoryUnitIds')"
prop="inventoryUnitIds" align="center" width="200">
<template slot="header">
@ -143,14 +172,16 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.inventoryUnitIds"
@change="changeData('warehousingreceiveproduct-inventoryUnitIds', scope.$index)" placeholder="请输入"
@change="changeData('warehousingreceiveproduct-inventoryUnitIds', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingreceiveproductList') || judgeWrite('warehousingreceiveproductList-inventoryUnitIds')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="实物库存" v-if="judgeShow('warehousingreceiveproduct-inventoryUnitIds')"
<!-- <el-table-column label="实物库存"
v-if="judgeShow('warehousingreceiveproduct-inventoryUnitIds')"
prop="inventoryUnitIds" align="center" width="200">
<template slot="header">
@ -160,15 +191,17 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.inventoryUnitIds"
@change="changeData('warehousingreceiveproduct-inventoryUnitIds', scope.$index)" placeholder="请输入"
@change="changeData('warehousingreceiveproduct-inventoryUnitIds', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingreceiveproductList') || judgeWrite('warehousingreceiveproductList-inventoryUnitIds')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="可用库存" v-if="judgeShow('warehousingreceiveproduct-inventoryUnitIds')"
prop="inventoryUnitIds" align="center" width="200">
<el-table-column label="可用库存"
v-if="judgeShow('warehousingreceiveproduct-inventoryUnitIds')"
prop="inventoryNumber" align="center" width="200">
<template slot="header">
<span class="required-sign"
@ -176,15 +209,17 @@
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.inventoryUnitIds"
@change="changeData('warehousingreceiveproduct-inventoryUnitIds', scope.$index)" placeholder="请输入"
<JnpfInput v-model="scope.row.inventoryNumber"
@change="changeData('warehousingreceiveproduct-inventoryUnitIds', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingreceiveproductList') || judgeWrite('warehousingreceiveproductList-inventoryUnitIds')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="领用数量" v-if="judgeShow('warehousingreceiveproduct-usedreturnNumber')"
<el-table-column label="领用数量"
v-if="judgeShow('warehousingreceiveproduct-usedreturnNumber')"
prop="usedreturnNumber" align="center" width="200">
<template slot="header">
@ -194,14 +229,16 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.usedreturnNumber"
@change="changeData('warehousingreceiveproduct-usedreturnNumber', scope.$index)" placeholder="请输入"
@change="changeData('warehousingreceiveproduct-usedreturnNumber', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingreceiveproductList') || judgeWrite('warehousingreceiveproductList-usedreturnNumber')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="批次号" v-if="judgeShow('warehousingreceiveproduct-batchNumber')"
prop="batchNumber" align="center" width="200">
<el-table-column label="批次号"
v-if="judgeShow('warehousingreceiveproduct-batchNumber')" prop="batchNumber"
align="center" width="200">
<template slot="header">
<span class="required-sign"
@ -210,14 +247,16 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.batchNumber"
@change="changeData('warehousingreceiveproduct-batchNumber', scope.$index)" placeholder="请输入"
@change="changeData('warehousingreceiveproduct-batchNumber', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingreceiveproductList') || judgeWrite('warehousingreceiveproductList-batchNumber')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="货区名称" v-if="judgeShow('warehousingreceiveproduct-cargoId')" prop="cargoId" align="center" width="200">
<el-table-column label="货区名称" v-if="judgeShow('warehousingreceiveproduct-cargoId')"
prop="cargoId" align="center" width="200">
<template slot="header">
<span class="required-sign"
@ -226,18 +265,20 @@
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.cargoId"
@change="changeData('warehousingreceiveproduct-cargoId', scope.$index)" :rowIndex="scope.$index"
:formData="dataForm" :templateJson="interfaceRes.warehousingreceiveproductcargoId"
placeholder="请选择" hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
relationField='cargo_name' :field="'cargoId' + scope.$index" interfaceId="530700536261903749"
:pageSize="20" :columnOptions="warehousingreceiveproductcargoIdcolumnOptions" clearable
:style='{ "width": "100%" }'>
@change="changeData('warehousingreceiveproduct-cargoId', scope.$index)"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.warehousingreceiveproductcargoId"
placeholder="请选择" hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='cargo_name'
:field="'cargoId' + scope.$index" interfaceId="530700536261903749"
:pageSize="20" :columnOptions="warehousingreceiveproductcargoIdcolumnOptions"
clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</template>
</el-table-column>
<el-table-column label="操作" width="50" align="center" fixed="right" v-if="!judgeWrite('warehousingreceiveproductList')">
<el-table-column label="操作" width="50" align="center" fixed="right"
v-if="!judgeWrite('warehousingreceiveproductList')">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@ -253,8 +294,8 @@
</el-col>
<!-- 表单结束 -->
</template>
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm" ref="selectDialog"
@select="addForSelect" @close="selectDialogVisible = false" />
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm"
ref="selectDialog" @select="addForSelect" @close="selectDialogVisible = false" />
</el-form>
</el-row>
<UserBox v-if="userBoxVisible" ref="userBox" @submit="submit" />
@ -366,7 +407,8 @@ export default {
warehouseIdcolumnOptions: [{ "label": "仓库名称", "value": "name" }, { "label": "仓库编码", "value": "code" },],
usedreturnReasonOptions: [{ "fullName": "质量问题", "id": "1" }, { "fullName": "客户退回", "id": "2" }, { "fullName": "试用", "id": "3" }, { "fullName": "临期报废", "id": "4" }, { "fullName": "维修", "id": "5" }, { "fullName": "保养", "id": "6" }, { "fullName": "作业工具", "id": "7" }, { "fullName": "其他", "id": "8" }],
usedreturnReasonProps: { "label": "fullName", "value": "id" },
businessIdcolumnOptions: [{ "label": "加工单", "value": "code" }, { "label": "工厂", "value": "businessName" }, { "label": "业务线", "value": "businessfactoryName" }, { "label": "班组", "value": "team_name" },],
// businessIdcolumnOptions: [{ "label": "", "value": "code" }, { "label": "", "value": "businessName" }, { "label": "线", "value": "businessfactoryName" }, { "label": "", "value": "team_name" },],
businessIdcolumnOptions: [{ "label": "加工单", "value": "code" }],
warehousingreceiveproductproductIdcolumnOptions: [{ "label": "商品名称", "value": "name" }, { "label": "规格", "value": "spec" }, { "label": "批次号", "value": "batchNumber" },],
warehousingreceiveproductusedreturnUnitcolumnOptions: [{ "label": "单位名称", "value": "unit_name" },],
warehousingreceiveproductcargoIdcolumnOptions: [{ "label": "货区名称", "value": "cargo_name" },],
@ -376,9 +418,11 @@ export default {
interfaceRes: {
receiveCode: [],
warehouseId: [],
// businessId: [{ "dataType": "varchar", "defaultValue": "", "field": "businessId", "fieldName": "", "id": "7aZrw22", "jnpfKey": "popupSelect", "relationField": "warehouseId", "required": "0" }],
businessId: [{ "dataType": "varchar", "defaultValue": "", "field": "warehouseId", "fieldName": "", "id": "7aZrw22", "jnpfKey": "popupSelect", "relationField": "warehouseId", "required": "0" }
],
usedreturnTime: [],
usedreturnReason: [],
businessId: [],
remark: [],
creatorTime: [],
creatorUserId: [],
@ -415,6 +459,22 @@ export default {
this.dataForm.warehousingReceiveProductList.splice(0, 1)
},
changeDataWorkOrder(model, index) {
this.dataForm.businessId = index.id
this.dataForm.warehousingReceiveProductList = index.tableField126
var tablebox = index.tableField126
// this.dataForm.warehousingReceiveProductList.filter((item) => {
// tablebox.filter((sub) => {
// if (item.id == sub.id) {
// console.log(1111);
// this.dataForm.warehousingReceiveProductList[item.index].usedreturnUnit = tablebox[sub.index].inventoryUnitIds
// }
// })
// })
// this.dataForm.warehousingReceiveProductList.usedreturnUnit = index.tableField126.inventoryUnitIds
},
changeData(model, index) {
this.isEdit = false
this.childIndex = index
@ -509,6 +569,7 @@ export default {
let isOk = true;
for (let i = 0; i < this.dataForm.warehousingReceiveProductList.length; i++) {
const e = this.dataForm.warehousingReceiveProductList[i];
if (!e.productId) {
this.$message({
message: '商品名称不能为空',

@ -1,26 +1,30 @@
<template>
<div :style="{ margin: '0 auto', width: '100%' }">
<el-row :gutter="15" class="">
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px" label-position="right"
:disabled="setting.readonly">
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px"
label-position="right" :disabled="setting.readonly">
<template v-if="!loading && formOperates">
<!-- 具体表单 -->
<el-col :span="24">
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">基础信息</span>
</div>
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">基础信息</span>
</div>
</el-col>
<el-col :span="8" v-if="judgeShow('reportlossCode')">
<jnpf-form-tip-item label="报损单编号" v-if="judgeShow('reportlossCode')" prop="reportlossCode">
<JnpfInput v-model="dataForm.reportlossCode" @change="changeData('reportlossCode', -1)"
placeholder="系统自动生成" :disabled="judgeWrite('reportlossCode')" readonly :style='{ "width": "100%" }'>
<jnpf-form-tip-item label="报损单编号" v-if="judgeShow('reportlossCode')"
prop="reportlossCode">
<JnpfInput v-model="dataForm.reportlossCode"
@change="changeData('reportlossCode', -1)" placeholder="系统自动生成"
:disabled="judgeWrite('reportlossCode')" readonly :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('reportlossType')">
<jnpf-form-tip-item label="单据类型" v-if="judgeShow('reportlossType')" prop="reportlossType">
<JnpfSelect v-model="dataForm.reportlossType" @change="changeData('reportlossType', -1)" placeholder="请选择"
<jnpf-form-tip-item label="单据类型" v-if="judgeShow('reportlossType')"
prop="reportlossType">
<JnpfSelect v-model="dataForm.reportlossType"
@change="changeData('reportlossType', -1)" placeholder="请选择"
:disabled="judgeWrite('reportlossType')" clearable :style='{ "width": "100%" }'
:options="reportlossTypeOptions" :props="reportlossTypeProps">
</JnpfSelect>
@ -28,44 +32,51 @@
</el-col>
<el-col :span="8" v-if="judgeShow('reportlossTime')">
<jnpf-form-tip-item label="报损时间" v-if="judgeShow('reportlossTime')" prop="reportlossTime">
<JnpfDatePicker v-model="dataForm.reportlossTime" @change="changeData('reportlossTime', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')" placeholder="请选择"
:disabled="judgeWrite('reportlossTime')" clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
<jnpf-form-tip-item label="报损时间" v-if="judgeShow('reportlossTime')"
prop="reportlossTime">
<JnpfDatePicker v-model="dataForm.reportlossTime"
@change="changeData('reportlossTime', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')"
placeholder="请选择" :disabled="judgeWrite('reportlossTime')" clearable
:style='{ "width": "100%" }' type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('reportlossReason')">
<jnpf-form-tip-item label="报损原因" v-if="judgeShow('reportlossReason')" prop="reportlossReason">
<JnpfSelect v-model="dataForm.reportlossReason" @change="changeData('reportlossReason', -1)"
placeholder="请选择" :disabled="judgeWrite('reportlossReason')" clearable :style='{ "width": "100%" }'
<jnpf-form-tip-item label="报损原因" v-if="judgeShow('reportlossReason')"
prop="reportlossReason">
<JnpfSelect v-model="dataForm.reportlossReason"
@change="changeData('reportlossReason', -1)" placeholder="请选择"
:disabled="judgeWrite('reportlossReason')" clearable :style='{ "width": "100%" }'
:options="reportlossReasonOptions" :props="reportlossReasonProps">
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('warehouseId')">
<jnpf-form-tip-item label="仓库名称" v-if="judgeShow('warehouseId')" prop="warehouseId">
<JnpfPopupSelect v-model="dataForm.warehouseId" @change="changeData('warehouseId', -1)" :rowIndex="null"
:formData="dataForm" :templateJson="interfaceRes.warehouseId" placeholder="请选择"
:disabled="judgeWrite('warehouseId')" hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='name' field='warehouseId' interfaceId="529617754022498181"
:pageSize="20" :columnOptions="warehouseIdcolumnOptions" clearable :style='{ "width": "100%" }'>
<JnpfPopupSelect v-model="dataForm.warehouseId"
@change="changeData('warehouseId', -1)" :rowIndex="null" :formData="dataForm"
:templateJson="interfaceRes.warehouseId" placeholder="请选择"
:disabled="judgeWrite('warehouseId')" hasPage propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='name' field='warehouseId'
interfaceId="529617754022498181" :pageSize="20"
:columnOptions="warehouseIdcolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" v-if="judgeShow('remark')">
<jnpf-form-tip-item label="备注" v-if="judgeShow('remark')" prop="remark">
<JnpfInput v-model="dataForm.remark" @change="changeData('remark', -1)" placeholder="请输入"
:disabled="judgeWrite('remark')" clearable :style='{ "width": "100%" }'>
<JnpfInput v-model="dataForm.remark" @change="changeData('remark', -1)"
placeholder="请输入" :disabled="judgeWrite('remark')" clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">商品信息</span>
</div>
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">商品信息</span>
</div>
</el-col>
<el-col :span="24" v-if="judgeShow('-${html.relationField}')">
<jnpf-form-tip-item label-width="0">
@ -74,8 +85,9 @@
</div>
<el-table :data="dataForm.warehousingReportlossProductList" size='mini' border>
<el-table-column type="index" width="50" label="序号" align="center" fixed="left" />
<el-table-column label="商品名称" v-if="judgeShow('warehousingreportlossproduct-productId')"
prop="productId" align="center" width="220" fixed="left">
<el-table-column label="商品名称"
v-if="judgeShow('warehousingreportlossproduct-productId')" prop="productId"
align="center" width="220" fixed="left">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingreportlossproductList-productId')">*</span>商品名称
@ -84,16 +96,19 @@
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.productId" @change="reportlossProductBatch"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.warehousingreportlossproductproductId" placeholder="请选择"
:templateJson="interfaceRes.warehousingreportlossproductproductId"
placeholder="请选择"
:disabled="judgeWrite('warehousingreportlossproductList') || judgeWrite('warehousingreportlossproductList-productId')"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='name'
:field="'productId' + scope.$index" interfaceId="529994958833209925" :pageSize="20"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
relationField='name' :field="'productId' + scope.$index"
interfaceId="546960153916755077" :pageSize="20"
:columnOptions="warehousingreportlossproductproductIdcolumnOptions" clearable
:style='{ "width": "100%" }'>
</JnpfPopupSelect>
</template>
</el-table-column>
<el-table-column label="报损单位" v-if="judgeShow('warehousingreportlossproduct-reportlossUnit')"
<el-table-column label="报损单位"
v-if="judgeShow('warehousingreportlossproduct-reportlossUnit')"
prop="reportlossUnit" align="center" width="200">
<template slot="header">
@ -102,42 +117,39 @@
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.reportlossUnit"
<JnpfInput v-model="scope.row.reportlossUnit"
@change="changeData('warehousingreportlossproduct-reportlossUnit', scope.$index)"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.warehousingreportlossproductreportlossUnit" placeholder="请选择"
:disabled="judgeWrite('warehousingreportlossproductList') || judgeWrite('warehousingreportlossproductList-reportlossUnit')"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='unit_name'
:field="'reportlossUnit' + scope.$index" interfaceId="529938341609623877" :pageSize="20"
:columnOptions="warehousingreportlossproductreportlossUnitcolumnOptions" clearable
:style='{ "width": "100%" }'>
</JnpfPopupSelect>
placeholder="请输入" disabled clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="规格" v-if="judgeShow('warehousingreportlossproduct-spec')" prop="spec" align="center" width="200">
<el-table-column label="规格" v-if="judgeShow('warehousingreportlossproduct-spec')"
prop="spec" align="center" width="200">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('warehousingreportlossproductList-spec')">*</span>
<span class="required-sign"
v-if="judgeRequired('warehousingreportlossproductList-spec')">*</span>规格
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.spec"
@change="changeData('warehousingreportlossproduct-spec', scope.$index)" placeholder="请输入"
@change="changeData('warehousingreportlossproduct-spec', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingreportlossproductList') || judgeWrite('warehousingreportlossproductList-spec')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="库存单位" v-if="judgeShow('warehousingreportlossproduct-inventoryUnitIds')"
<el-table-column label="库存单位"
v-if="judgeShow('warehousingreportlossproduct-inventoryUnitIds')"
prop="inventoryUnitIds" align="center" width="200">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingreportlossproductList-inventoryUnitIds')">*</span>库存单位
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.inventoryUnitIds"
@change="changeData('warehousinginventoryproduct-inventoryUnitIds', scope.$index)"
@ -148,14 +160,13 @@
</template>
</el-table-column>
<el-table-column label="实物库存" v-if="judgeShow('warehousingreportlossproduct-inventoryUnitIds')"
<!-- <el-table-column label="实物库存"
v-if="judgeShow('warehousingreportlossproduct-inventoryUnitIds')"
prop="inventoryUnitIds" align="center" width="200">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousinginventoryproductList-inventoryUnitIds')">*</span>实物库存
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.inventoryUnitIds"
@change="changeData('warehousingreportlossproduct-inventoryUnitIds', scope.$index)"
@ -164,18 +175,18 @@
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="可用库存" v-if="judgeShow('warehousingreportlossproduct-inventoryUnitIds')"
prop="inventoryUnitIds" align="center" width="200">
<el-table-column label="可用库存"
v-if="judgeShow('warehousingreportlossproduct-inventoryUnitIds')"
prop="inventoryNumber" align="center" width="200">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousinginventoryproductList-inventoryUnitIds')">*</span>可用库存
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.inventoryUnitIds"
<JnpfInput v-model="scope.row.inventoryNumber"
@change="changeData('warehousingreportlossproduct-inventoryUnitIds', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousinginventoryproductList') || judgeWrite('warehousinginventoryproductList-inventoryUnitIds')"
@ -184,7 +195,8 @@
</template>
</el-table-column>
<el-table-column label="报损数量" v-if="judgeShow('warehousingreportlossproduct-reportlossNumber')"
<el-table-column label="报损数量"
v-if="judgeShow('warehousingreportlossproduct-reportlossNumber')"
prop="reportlossNumber" align="center" width="200">
<template slot="header">
@ -202,7 +214,9 @@
</template>
</el-table-column>
<el-table-column label="货区名称" v-if="judgeShow('warehousingreportlossproduct-cargoId')" prop="cargoId" align="center" width="200">
<el-table-column label="货区名称"
v-if="judgeShow('warehousingreportlossproduct-cargoId')" prop="cargoId"
align="center" width="200">
<template slot="header">
<span class="required-sign"
@ -213,17 +227,19 @@
<JnpfPopupSelect v-model="scope.row.cargoId"
@change="changeData('warehousingreportlossproduct-cargoId', scope.$index)"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.warehousingreportlossproductcargoId" placeholder="请选择" hasPage
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='cargo_name'
:field="'cargoId' + scope.$index" interfaceId="530700536261903749" :pageSize="20"
:templateJson="interfaceRes.warehousingreportlossproductcargoId"
placeholder="请选择" hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='cargo_name'
:field="'cargoId' + scope.$index" interfaceId="530700536261903749"
:pageSize="20"
:columnOptions="warehousingreportlossproductcargoIdcolumnOptions" clearable
:style='{ "width": "100%" }'>
</JnpfPopupSelect>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200" fixed="right" v-if="!judgeWrite('warehousingreportlossproductList')">
<el-table-column label="操作" align="center" width="200" fixed="right"
v-if="!judgeWrite('warehousingreportlossproductList')">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@ -231,19 +247,28 @@
</template>
</el-table-column>
</el-table>
<div class="table-actions" @click="addwarehousingreportlossproductList()"
<!-- <div class="table-actions" @click="addwarehousingreportlossproductList()"
v-if="!judgeWrite('warehousingreportlossproductList')">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div> -->
<div class="table-actions" @click="choice()"
v-if="!judgeWrite('warehousingreportlossproductList')" align="center">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</jnpf-form-tip-item>
</el-col>
<!-- 表单结束 -->
</template>
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm" ref="selectDialog"
@select="addForSelect" @close="selectDialogVisible = false" />
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm"
ref="selectDialog" @select="addForSelect" @close="selectDialogVisible = false" />
</el-form>
</el-row>
<UserBox v-if="userBoxVisible" ref="userBox" @submit="submit" />
<ReportlossProductGoodsBox v-if="ReportlossgoodsBoxVisible" ref="ReportlossGoodsBox"
@refreshDataList="initList" />
</div>
</template>
@ -258,9 +283,11 @@ import { getDefaultCurrentValueUserId } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
import { thousandsFormat } from "@/components/Generator/utils/index"
import ReportlossProductGoodsBox from '@/views/scm/publicPopup/ReportlossProductGoodsBox'
export default {
mixins: [comMixin],
components: {},
components: { ReportlossProductGoodsBox },
props: [],
data() {
return {
@ -277,6 +304,7 @@ export default {
setting: {},
eventType: '',
userBoxVisible: false,
ReportlossgoodsBoxVisible: false,
selectDialogVisible: false,
currTableConf: {},
dataValueAll: {},
@ -386,11 +414,45 @@ export default {
methods: {
reportlossProductBatch(model, row) {
row.productId = row.id
this.dataForm.warehousingReportlossProductList.push(row)
this.dataForm.warehousingReportlossProductList.splice(0, 1)
// row.productId = row.id
// this.dataForm.warehousingReportlossProductList.push(row)
// this.dataForm.warehousingReportlossProductList.splice(0, 1)
},
choice() {
this.ReportlossgoodsBoxVisible = true
let excludeIdList = [];
for (let i = 0; i < this.dataForm.warehousingReportlossProductList.length; i++) {
excludeIdList.push(this.dataForm.warehousingReportlossProductList[i].productId);
}
this.$nextTick(() => {
this.$refs.ReportlossGoodsBox.init(excludeIdList)
})
},
initList(list) {
for (let i = 0; i < list.length; i++) {
const e = list[i];
let item = {
productId: e.productId,
name: e.name,
spec: e.spec,
inventoryType: e.inventoryType,
inventoryUnitIds: e.inventoryUnitIds,
reportlossUnit: e.inventoryUnitIds,
salesMainUnitIds: e.salesMainUnitIds,
barCode: e.barCode,
operateUnitIds: e.operateUnitIds,
productTypeIds: e.productTypeId,
inventoryNumber: e.inventoryNumber,
}
this.dataForm.warehousingReportlossProductList.push(item)
}
},
changeData(model, index) {
this.isEdit = false
this.childIndex = index

@ -1,30 +1,33 @@
<template>
<div :style="{ margin: '0 auto', width: '100%' }">
<el-row :gutter="15" class="">
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px" label-position="right"
:disabled="setting.readonly">
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px"
label-position="right" :disabled="setting.readonly">
<template v-if="!loading && formOperates">
<!-- 具体表单 -->
<el-col :span="24">
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">基础信息</span>
</div>
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">基础信息</span>
</div>
</el-col>
<el-col :span="8" v-if="judgeShow('returnCode')">
<jnpf-form-tip-item label="返库单编号" v-if="judgeShow('returnCode')" prop="returnCode">
<JnpfInput v-model="dataForm.returnCode" @change="changeData('returnCode', -1)" placeholder="系统自动生成"
:disabled="judgeWrite('returnCode')" readonly :style='{ "width": "100%" }'>
<JnpfInput v-model="dataForm.returnCode" @change="changeData('returnCode', -1)"
placeholder="系统自动生成" :disabled="judgeWrite('returnCode')" readonly
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('warehouseId')">
<jnpf-form-tip-item label="仓库名称" v-if="judgeShow('warehouseId')" prop="warehouseId">
<JnpfPopupSelect v-model="dataForm.warehouseId" @change="changeData('warehouseId', -1)" :rowIndex="null"
:formData="dataForm" :templateJson="interfaceRes.warehouseId" placeholder="请选择"
:disabled="judgeWrite('warehouseId')" hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='name' field='warehouseId' interfaceId="529617754022498181"
:pageSize="20" :columnOptions="warehouseIdcolumnOptions" clearable :style='{ "width": "100%" }'>
<JnpfPopupSelect v-model="dataForm.warehouseId"
@change="changeData('warehouseId', -1)" :rowIndex="null" :formData="dataForm"
:templateJson="interfaceRes.warehouseId" placeholder="请选择"
:disabled="judgeWrite('warehouseId')" hasPage propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='name' field='warehouseId'
interfaceId="529617754022498181" :pageSize="20"
:columnOptions="warehouseIdcolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
</el-col>
@ -32,42 +35,45 @@
<el-col :span="8" v-if="judgeShow('returnTime')">
<jnpf-form-tip-item label="返库时间" v-if="judgeShow('returnTime')" prop="returnTime">
<JnpfDatePicker v-model="dataForm.returnTime" @change="changeData('returnTime', -1)"
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')" placeholder="请选择"
:disabled="judgeWrite('returnTime')" clearable :style='{ "width": "100%" }' type="date"
format="yyyy-MM-dd">
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')"
placeholder="请选择" :disabled="judgeWrite('returnTime')" clearable
:style='{ "width": "100%" }' type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('returnReason')">
<jnpf-form-tip-item label="返库原因" v-if="judgeShow('returnReason')" prop="returnReason">
<JnpfSelect v-model="dataForm.returnReason" @change="changeData('returnReason', -1)" placeholder="请选择"
:disabled="judgeWrite('returnReason')" clearable :style='{ "width": "100%" }'
:options="returnReasonOptions" :props="returnReasonProps">
<JnpfSelect v-model="dataForm.returnReason" @change="changeData('returnReason', -1)"
placeholder="请选择" :disabled="judgeWrite('returnReason')" clearable
:style='{ "width": "100%" }' :options="returnReasonOptions"
:props="returnReasonProps">
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('businessId')">
<jnpf-form-tip-item label="关联单据" v-if="judgeShow('businessId')" prop="businessId">
<JnpfPopupSelect v-model="dataForm.businessId" @change="changeData('businessId', -1)" :rowIndex="null"
:formData="dataForm" :templateJson="interfaceRes.businessId" placeholder="请选择"
:disabled="judgeWrite('businessId')" hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='code' field='businessId' interfaceId="531744380948602437"
:pageSize="20" :columnOptions="businessIdcolumnOptions" clearable :style='{ "width": "100%" }'>
<JnpfPopupSelect v-model="dataForm.businessId" @change="changeDataOrder"
:rowIndex="null" :formData="dataForm" :templateJson="interfaceRes.businessId"
placeholder="请选择" :disabled="judgeWrite('businessId')" hasPage propsValue="id"
popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='receiveCode'
field='businessId' interfaceId="531744380948602437" :pageSize="20"
:columnOptions="businessIdcolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" v-if="judgeShow('remark')">
<jnpf-form-tip-item label="备注" v-if="judgeShow('remark')" prop="remark">
<JnpfInput v-model="dataForm.remark" @change="changeData('remark', -1)" placeholder="请输入"
:disabled="judgeWrite('remark')" clearable :style='{ "width": "100%" }'>
<JnpfInput v-model="dataForm.remark" @change="changeData('remark', -1)"
placeholder="请输入" :disabled="judgeWrite('remark')" clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">商品信息</span>
</div>
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">商品信息</span>
</div>
</el-col>
<el-col :span="24" v-if="judgeShow('-${html.relationField}')">
<jnpf-form-tip-item label-width="0">
@ -76,41 +82,48 @@
</div>
<el-table :data="dataForm.warehousingReturnProductList" size='mini' border>
<el-table-column type="index" width="50" label="序号" align="center" fixed="left" />
<el-table-column label="商品名称" v-if="judgeShow('warehousingreturnproduct-productId')" prop="productId" align="center" width="220" fixed="left">
<el-table-column label="商品名称" v-if="judgeShow('warehousingreturnproduct-productId')"
prop="productId" align="center" width="220" fixed="left">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingreturnproductList-productId')">*</span>商品名称
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.productId" @change="returnProductBatch" :rowIndex="scope.$index"
:formData="dataForm" :templateJson="interfaceRes.warehousingreturnproductproductId"
<JnpfPopupSelect v-model="scope.row.productId" @change="returnProductBatch"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.warehousingreturnproductproductId"
placeholder="请选择"
:disabled="judgeWrite('warehousingreturnproductList') || judgeWrite('warehousingreturnproductList-productId')"
hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
relationField='name' :field="'productId' + scope.$index" interfaceId="530652311085669125"
:pageSize="20" :columnOptions="warehousingreturnproductproductIdcolumnOptions" clearable
:style='{ "width": "100%" }'>
hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据"
:innerName="scope.row.productId" popupType="dialog" relationField='name'
:field="'productId' + scope.$index" interfaceId="530652311085669125"
:pageSize="20" :columnOptions="warehousingreturnproductproductIdcolumnOptions"
clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</template>
</el-table-column>
<el-table-column label="规格" v-if="judgeShow('warehousingreturnproduct-spec')" prop="spec" align="center" width="200">
<el-table-column label="规格" v-if="judgeShow('warehousingreturnproduct-spec')"
prop="spec" align="center" width="200">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('warehousingreturnproductList-spec')">*</span>
<span class="required-sign"
v-if="judgeRequired('warehousingreturnproductList-spec')">*</span>规格
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.spec"
@change="changeData('warehousingreturnproduct-spec', scope.$index)" placeholder="请输入"
@change="changeData('warehousingreturnproduct-spec', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingreturnproductList') || judgeWrite('warehousingreturnproductList-spec')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="库存单位" v-if="judgeShow('warehousingreturnproduct-inventoryUnitIds')"
<el-table-column label="库存单位"
v-if="judgeShow('warehousingreturnproduct-inventoryUnitIds')"
prop="inventoryUnitIds" align="center" width="200">
<template slot="header">
@ -120,14 +133,17 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.inventoryUnitIds"
@change="changeData('warehousingreturnproduct-inventoryUnitIds', scope.$index)" placeholder="请输入"
@change="changeData('warehousingreturnproduct-inventoryUnitIds', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingreturnproductList') || judgeWrite('warehousingreturnproductList-inventoryUnitIds')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="返库单位" v-if="judgeShow('warehousingreturnproduct-returnUnit')" prop="returnUnit" align="center" width="200">
<el-table-column label="返库单位"
v-if="judgeShow('warehousingreturnproduct-returnUnit')" prop="returnUnit"
align="center" width="200">
<template slot="header">
<span class="required-sign"
@ -136,19 +152,23 @@
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.returnUnit"
@change="changeData('warehousingreturnproduct-returnUnit', scope.$index)" :rowIndex="scope.$index"
:formData="dataForm" :templateJson="interfaceRes.warehousingreturnproductreturnUnit"
@change="changeData('warehousingreturnproduct-returnUnit', scope.$index)"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.warehousingreturnproductreturnUnit"
placeholder="请选择"
:disabled="judgeWrite('warehousingreturnproductList') || judgeWrite('warehousingreturnproductList-returnUnit')"
hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
relationField='unit_name' :field="'returnUnit' + scope.$index" interfaceId="529938341609623877"
:pageSize="20" :columnOptions="warehousingreturnproductreturnUnitcolumnOptions" clearable
hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='unit_name'
:field="'returnUnit' + scope.$index" interfaceId="529938341609623877"
:pageSize="20"
:columnOptions="warehousingreturnproductreturnUnitcolumnOptions" clearable
:style='{ "width": "100%" }'>
</JnpfPopupSelect>
</template>
</el-table-column>
<el-table-column label="返库数量" v-if="judgeShow('warehousingreturnproduct-returnNumber')"
prop="returnNumber" align="center" width="200">
<el-table-column label="返库数量"
v-if="judgeShow('warehousingreturnproduct-returnNumber')" prop="returnNumber"
align="center" width="200">
<template slot="header">
<span class="required-sign"
@ -157,14 +177,16 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.returnNumber"
@change="changeData('warehousingreturnproduct-returnNumber', scope.$index)" placeholder="请输入"
@change="changeData('warehousingreturnproduct-returnNumber', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingreturnproductList') || judgeWrite('warehousingreturnproductList-returnNumber')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="批次号" v-if="judgeShow('warehousingreturnproduct-batchNumber')"
prop="batchNumber" align="center" width="200">
<el-table-column label="批次号"
v-if="judgeShow('warehousingreturnproduct-batchNumber')" prop="batchNumber"
align="center" width="200">
<template slot="header">
<span class="required-sign"
@ -173,14 +195,16 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.batchNumber"
@change="changeData('warehousingreturnproduct-batchNumber', scope.$index)" placeholder="请输入"
@change="changeData('warehousingreturnproduct-batchNumber', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('warehousingreturnproductList') || judgeWrite('warehousingreturnproductList-batchNumber')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="货区名称" v-if="judgeShow('warehousingreturnproduct-cargoId')" prop="cargoId" align="center">
<el-table-column label="货区名称" v-if="judgeShow('warehousingreturnproduct-cargoId')"
prop="cargoId" align="center">
<template slot="header">
<span class="required-sign"
@ -189,17 +213,20 @@
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.cargoId"
@change="changeData('warehousingreturnproduct-cargoId', scope.$index)" :rowIndex="scope.$index"
:formData="dataForm" :templateJson="interfaceRes.warehousingreturnproductcargoId"
placeholder="请选择" hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
relationField='cargo_name' :field="'cargoId' + scope.$index" interfaceId="530700536261903749"
:pageSize="20" :columnOptions="warehousingreturnproductcargoIdcolumnOptions" clearable
:style='{ "width": "100%" }'>
@change="changeData('warehousingreturnproduct-cargoId', scope.$index)"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.warehousingreturnproductcargoId" placeholder="请选择"
hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='cargo_name'
:field="'cargoId' + scope.$index" interfaceId="530700536261903749"
:pageSize="20" :columnOptions="warehousingreturnproductcargoIdcolumnOptions"
clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</template>
</el-table-column>
<el-table-column label="操作" width="50" align="center" fixed="right" v-if="!judgeWrite('warehousingreturnproductList')">
<el-table-column label="操作" width="50" align="center" fixed="right"
v-if="!judgeWrite('warehousingreturnproductList')">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@ -215,8 +242,8 @@
</el-col>
<!-- 表单结束 -->
</template>
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm" ref="selectDialog"
@select="addForSelect" @close="selectDialogVisible = false" />
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm"
ref="selectDialog" @select="addForSelect" @close="selectDialogVisible = false" />
</el-form>
</el-row>
<UserBox v-if="userBoxVisible" ref="userBox" @submit="submit" />
@ -328,7 +355,7 @@ export default {
warehouseIdcolumnOptions: [{ "label": "仓库名称", "value": "name" }, { "label": "仓库编码", "value": "code" },],
returnReasonOptions: [{ "fullName": "质量问题", "id": "1" }, { "fullName": "客户退回", "id": "2" }, { "fullName": "试用", "id": "3" }, { "fullName": "临期报废", "id": "4" }, { "fullName": "维修", "id": "5" }, { "fullName": "保养", "id": "6" }, { "fullName": "作业工具", "id": "7" }, { "fullName": "其他", "id": "8" }],
returnReasonProps: { "label": "fullName", "value": "id" },
businessIdcolumnOptions: [{ "label": "领用单编号", "value": "receive_code" }, { "label": "关联的加工单", "value": "code" },],
businessIdcolumnOptions: [{ "label": "领用单编号", "value": "receiveCode" }],
warehousingreturnproductproductIdcolumnOptions: [{ "label": "商品名称", "value": "name" }, { "label": "规格", "value": "spec" }, { "label": "批次号", "value": "batchNumber" },],
warehousingreturnproductreturnUnitcolumnOptions: [{ "label": "单位名称", "value": "unit_name" },],
warehousingreturnproductcargoIdcolumnOptions: [{ "label": "货区名称", "value": "cargo_name" },],
@ -339,7 +366,7 @@ export default {
warehouseId: [],
returnTime: [],
returnReason: [],
businessId: [],
businessId: [{ "dataType": "varchar", "defaultValue": "", "field": "warehouseId", "fieldName": "", "id": "odxww22", "jnpfKey": "popupSelect", "relationField": "warehouseId", "required": "0" }],
remark: [],
creatorTime: [],
creatorUserId: [],
@ -375,6 +402,10 @@ export default {
this.dataForm.warehousingReturnProductList.splice(0, 1)
},
changeDataOrder(model, index) {
// this.dataForm.businessId = index.id
this.dataForm.warehousingReturnProductList = index.productWarehouseEntityList
},
changeData(model, index) {
this.isEdit = false

Loading…
Cancel
Save