Commit a1e09350 by 宋祥

Merge remote-tracking branch 'origin/dev' into dev

parents ab21e766 a0a5dc3b
......@@ -2,18 +2,17 @@ package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.InventTypeDetailEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.kc.domain.*;
import com.baosight.hggp.hg.kc.domain.HGKC007;
import com.baosight.hggp.hg.kc.domain.HGKC007A;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.pz.domain.HGPZ004;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.hg.sb.domain.HGSB001;
import com.baosight.hggp.hg.sb.tools.HGSBTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
......@@ -23,7 +22,6 @@ import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.*;
......@@ -44,25 +42,24 @@ public class ServiceHGKC007A extends ServiceBase {
@Override
@OperationLogAnnotation(operModul = "其他出库明细", operType = "查询", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
EiInfo outInfo = super.initLoad(inInfo, new HGKC007A());
try {
String whCode = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC007A.FIELD_WH_CODE);
String companyCode = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC007A.FIELD_COMPANY_CODE);
Map map = new HashMap();
map.put(HGKC007A.FIELD_ACCOUNT_CODE, UserSessionUtils.getAccountCode());
map.put(HGKC007A.FIELD_WH_CODE, whCode);
map.put(HGKC007A.FIELD_COMPANY_CODE, companyCode);
map.put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getProdTypeFour());
CommonMethod.initBlock(inInfo,
EiInfoUtils.addBlock(outInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
CommonMethod.initBlock(outInfo,
Arrays.asList(
DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID,
DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID,
DdynamicEnum.SPEC_BOX_BLOCK_ID),map,false
);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC007A().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
DdynamicEnum.SPEC_BOX_BLOCK_ID),
new HashMap<String,Object>(){{
put(HGSB001.FIELD_COMPANY_CODES,roleCompanyCode);
put(HGKC013A.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
}}, false);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC007A().eiMetadata);
}catch (Exception e){
LogUtils.setDetailMsg(outInfo, e, "初始化失败");
}
return inInfo;
return outInfo;
}
/**
......
......@@ -8,6 +8,7 @@ import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.pz.domain.HGPZ002;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
......@@ -205,7 +206,7 @@ public class ServiceHGPZ002 extends ServiceBase {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
List<String> custCodes = resultRows.stream().map(row -> row.get(HGPZ002.FIELD_CUST_CODE).toString()).collect(Collectors.toList());
List<HGCW002> hgcw002List = queryCustCode(custCodes);
List<HGSC001> hgsc001List = queryCustCode(custCodes);
for (Map resultRow : resultRows) {
HGPZ002 hgpz002 = new HGPZ002();
hgpz002.fromMap(resultRow);
......@@ -214,26 +215,28 @@ public class ServiceHGPZ002 extends ServiceBase {
if (count > 0) {
//throw new PlatException(String.format("企业[%s]已关联用户,请先解除用户", hgpz002.getAccountName()));
}
List<HGCW002> hgcw002s =hgcw002List.stream().filter(hgcw002 -> hgcw002.getPartyA().equals(hgpz002.getCustCode())).collect(Collectors.toList());
AssertUtils.isNotEmpty(hgcw002s, String.format("客户[%s]已关联业务,请先解除业务", hgpz002.getCustName()));
List<HGSC001> hgcw002s =hgsc001List.stream().filter(hgsc001 ->
hgsc001.getSubcontractCode().equals(hgpz002.getCustCode())||
hgsc001.getGenralContractCode().equals(hgpz002.getCustCode())
).collect(Collectors.toList());
AssertUtils.isNotEmpty(hgcw002s, String.format("客户[%s]已关联业务,无法删除", hgpz002.getCustName()));
DaoUtils.update(HGPZ002.DELETE, hgpz002);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "修改失败");
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
public List<HGCW002> queryCustCode(List<String> custCodes){
public List<HGSC001> queryCustCode(List<String> custCodes){
List<HGCW002> hgcw002List = DaoBase.getInstance().query(HGCW002.QUERY,
List<HGSC001> hgsc001List = DaoBase.getInstance().query(HGSC001.QUERY,
new HashMap<String,Object>(){{
put("partyA", custCodes);
put("partyB", custCodes);
put("custCodes", custCodes);
}});
return hgcw002List;
return hgsc001List;
}
}
......@@ -44,7 +44,7 @@ public class ServiceHGSC010A extends ServiceEPBase {
Arrays.asList(DdynamicEnum.INVENT_RECORD_BOX_BLOCK_ID),
new HashMap<String, Object>(){{
put(HGPZ005.FIELD_STATUS,1);
put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, Arrays.asList(InventTypeDetailEnum.COMPONENT.getCode(),InventTypeDetailEnum.RAW.getCode()));
/*put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, Arrays.asList(InventTypeDetailEnum.COMPONENT.getCode(),InventTypeDetailEnum.RAW.getCode()));*/
}}, false);
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC010A().eiMetadata);
......
......@@ -49,7 +49,7 @@ public class ServiceHGSC010B extends ServiceEPBase {
Arrays.asList(DdynamicEnum.INVENT_RECORD_BOX_BLOCK_ID),
new HashMap<String, Object>(){{
put(HGPZ005.FIELD_STATUS,1);
put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, Arrays.asList(InventTypeDetailEnum.COMPONENT.getCode(),InventTypeDetailEnum.RAW.getCode()));
//put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, Arrays.asList(InventTypeDetailEnum.COMPONENT.getCode(),InventTypeDetailEnum.RAW.getCode()));
}}, false);
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC010B().eiMetadata);
......
......@@ -40,7 +40,7 @@ public class ServiceHGSC010C extends ServiceEPBase {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getProdTypeFour());
inInfo = super.query(inInfo, HGYX001C.QUERY, new HGYX001C());
Map<String, Object> queryMap = new HashMap<>();
queryMap.put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getProdTypeFour());
//queryMap.put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getProdTypeFour());
CommonMethod.initBlock(inInfo,
Arrays.asList(
DdynamicEnum.INVENT_TYPE_BLOCK_ID,
......
......@@ -5,6 +5,7 @@ import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
......@@ -38,6 +39,9 @@ public class ServiceHGSC012 extends ServiceEPBase {
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
if (queryMap.containsKey("contractDate")){
queryMap.put("contractDate", DateUtils.formatShort(queryMap.get("contractDate")));
}
List<Map> list = DaoBase.getInstance().query("HGSC012.query", queryMap);
inInfo.set(EiConstant.resultBlock, list);
}catch (Exception e){
......
package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/10/24
* @description 生产管理
*/
public class ServiceHGSC013 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID, DdynamicEnum.PROJ_RECORD_BLOCK_ID));
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
}catch (Exception e){
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
if (queryMap.containsKey("contractDate")){
queryMap.put("contractDate", DateUtils.formatShort(queryMap.get("contractDate")));
}
List<Map> list = DaoBase.getInstance().query("HGSC013.query", queryMap);
inInfo.set(EiConstant.resultBlock, list);
}catch (Exception e){
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
......@@ -122,6 +122,10 @@
<isNotEmpty prepend=" AND " property="branchUnit">
branch_unit = #branchUnit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custCodes">
(subcontract_code in <iterate close=")" open="(" conjunction="," property="custCodes">#custCodes[]#</iterate>
or genral_contract_code in <iterate close=")" open="(" conjunction="," property="custCodes">#custCodes[]#</iterate>)
</isNotEmpty>
</sql>
<sql id="customCondition">
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="HGSC013">
<select id="query" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
select
h.company_code as "companyCode", <!-- 公司编码(预留) -->
h.company_name as "companyName", <!-- 公司名称(预留) -->
h.proj_code as "projCode", <!-- 项目编码(预留) -->
h.proj_name as "projName", <!-- 项目名称(预留) -->
ha.product_code as "productCode", <!-- 产品编号 -->
ha.product_name as "productName", <!-- 产品名称 -->
ha.spec as "spec", <!-- 规格 -->
ha.length as "length", <!-- 长 -->
ha.width as "width", <!-- 宽 -->
ha.thick as "thick", <!-- 厚 -->
ha.quantity as "quantity", <!-- 数量 -->
ha.single_weight as "singleWeight", <!-- 单重 -->
ha.total_weight as "totalWeight", <!-- 总重 -->
ha.DEPOSIT_DATE as "depositDate", <!-- 入库日期 -->
ha.INV_QTY as "invQty", <!-- 数量 -->
ha.INV_UNIT_WEIGHT as "invUnitWeight", <!-- 单重 -->
ha.INV_WEIGHT as "invWeight", <!-- 重量 -->
hb.product_code as "clproductCode" , <!-- 产品编号 -->
hb.product_name as "clproductName", <!-- 产品名称 -->
hb.spec as "clspec", <!-- 规格 -->
hb.length as "cllength", <!-- 长 -->
hb.width as "clwidth", <!-- 宽 -->
hb.thick as "clthick", <!-- 厚 -->
hb.quantity as "clquantity", <!-- 数量 -->
hb.total_weight as "cltotalWeight", <!-- 总重 -->
hb.RECEIPT_DATE as "receiptDate", <!-- 领料日期 -->
hb.INV_QTY as "llinvQty", <!-- 数量 -->
hb.INV_WEIGHT as "llinvWeight" <!-- 重量 -->
from hggp.hgsc004 h
join (
select
h.id , -- 主键 -->
h.company_code , -- 公司编码(预留) -->
h.company_name , -- 公司名称(预留) -->
h.proj_code , -- 项目编码(预留) -->
h.proj_name , -- 项目名称(预留) -->
h.parent_prod_code , -- 父节点-产品编码 -->
h.parent_prod_name , -- 父节点-产品名称 -->
h.material_id , -- 物料清单id -->
h.product_id , -- 产品id -->
h.product_type , -- 产品类别 -->
h.product_code , -- 产品编号 -->
h.product_name , -- 产品名称 -->
h.invent_type , -- 档案类型 -->
h.spec , -- 规格 -->
h.length , -- 长 -->
h.width , -- 宽 -->
h.thick , -- 厚 -->
h.quantity , -- 数量 -->
h.single_weight , -- 单重 -->
h.total_weight , -- 总重 -->
h.approval_status , -- 审批状态 0:待审;1:审核中;2:已审 -->
h.leaf , -- 是否有叶子节点 -->
h.sort , -- 排序字段 -->
h.lv , -- 层级 -->
k.DEPOSIT_DATE , -- 入库日期 -->
k.INV_QTY , -- 数量 -->
k.INV_UNIT_WEIGHT , -- 单重 -->
k.INV_WEIGHT -- 重量 -->
from hggp.hgsc004a h
left join hggp.hgkc003 k on h.company_code = k.COMPANY_CODE and h.proj_code = k.PROJ_CODE
and h.product_code = k.PRDT_CODE
and k.DELETE_FLAG = 0
where h.product_status = 1 and h.lv = 3
<isNotEmpty prepend=" AND " property="accountCode">
h.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
h.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
h.COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
h.proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
h.proj_name = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="productCode">
h.product_code = #productCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositDate">
k.DEPOSIT_DATE = #depositDate#
</isNotEmpty>
) ha on h.id = ha.material_id
join (
select
h.id , -- 主键 -->
h.company_code , -- 公司编码(预留) -->
h.company_name , -- 公司名称(预留) -->
h.proj_code , -- 项目编码(预留) -->
h.proj_name , -- 项目名称(预留) -->
h.parent_prod_code , -- 父节点-产品编码 -->
h.parent_prod_name , -- 父节点-产品名称 -->
h.material_id , -- 物料清单id -->
h.product_id , -- 产品id -->
h.product_type , -- 产品类别 -->
h.product_code , -- 产品编号 -->
h.product_name , -- 产品名称 -->
h.invent_type , -- 档案类型 -->
h.spec , -- 规格 -->
h.length , -- 长 -->
h.width , -- 宽 -->
h.thick , -- 厚 -->
h.quantity , -- 数量 -->
h.single_weight , -- 单重 -->
h.total_weight , -- 总重 -->
h.approval_status , -- 审批状态 0:待审;1:审核中;2:已审 -->
h.leaf , -- 是否有叶子节点 -->
h.sort , -- 排序字段 -->
h.lv , -- 层级 -->
k.RECEIPT_DATE , -- 入库日期 -->
k.INV_QTY , -- 数量 -->
k.INV_WEIGHT -- 重量 -->
from hggp.hgsc004a h
left join (
select
k.COMPANY_CODE ,
k.PROJ_CODE ,
k1.RECEIPT_DATE , -- 入库日期 -->
k.INVENT_CODE ,
sum(k.INV_QTY) as INV_QTY, -- 数量 -->
sum(k.INV_WEIGHT) as INV_WEIGHT -- 重量 -->
from hggp.hgkc008a k
join hggp.hgkc008 k1 on k.RECEIVE_ID = k1.id
where k.DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="accountCode">
k.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
k.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
k.COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
k.RECEIPT_DATE = #receiptDate#
</isNotEmpty>
group by k.COMPANY_CODE, k.PROJ_CODE, k1.RECEIPT_DATE, k.INVENT_CODE
) k on h.company_code = k.COMPANY_CODE
and h.proj_code = k.PROJ_CODE
and h.product_code = k.INVENT_CODE
where h.lv = 4 and h.product_status = 1
<isNotEmpty prepend=" AND " property="accountCode">
h.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
h.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
h.COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
h.product_code = #inventCode#
</isNotEmpty>
) hb on h.id = hb.material_id and ha.product_code = hb.parent_prod_code
order by h.id desc
</select>
</sqlMap>
\ No newline at end of file
$(function () {
let inInfo = new EiInfo();
$("#QUERY").on("click", () => {
inInfo.set("inqu_status-0-companyCode",$("#inqu_status-0-companyCode").val());
inInfo.set("inqu_status-0-contractDate",$("#inqu_status-0-contractDate").val())
inInfo.set("inqu_status-0-contractCode",$("#inqu_status-0-contractCode").val())
inInfo.set("inqu_status-0-supCode",$("#inqu_status-0-supCode").val())
vue.onLoading()
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20, pageSizes: [10, 20, 50, 70, 100],
},
columns: [
],
loadComplete: function (grid) {
},
onSuccess: function (e) {
}
}
let vue = new Vue({
el:'#table-box',
data(){
return {
columns: [
{
label:"委外加工单",
tableType:'th',
colspan:9
},
{
label:"委外出库单",
tableType:'th',
colspan:3
},
{
label:"委外加工单",
tableType:'th',
colspan:5
},
{
label:"委外入库单",
tableType:'th',
colspan:3
},
],
columns2:[
{
label:'公司名称',
value:'companyName'
},
{
label:'委外加工日期',
value:'contractDate'
},
{
label:'委外加工单号',
value:'contractCode'
},
{
label:'供应商名称',
value:'supName'
},
{
label:'材料编码',
value:'lcinventCode'
},
{
label:'材料名称',
value:'lcinventName'
},
{
label:'材料规格',
value:'lcspec'
},
{
label:'计划出库数量',
value:'jhckQty'
},
{
label:'计划出库重量',
value:'jhckWeight'
},
{
label:'出库日期',
value:'outDate'
},
{
label:'实际出库数量',
value:'sjckoutQty'
},
{
label:'实际出库重量',
value:'sjckoutWeight'
},
{
label:'成品编码',
value:'productCode'
},
{
label:'成品名称',
value:'productName'
},
{
label:'成品规格',
value:'rkspec'
},
{
label:'计划入库数量',
value:'jhrkdepositQty'
},
{
label:'计划入库重量',
value:'jhrkdepositWeight'
},
{
label:'入库日期',
value:'depositDate'
},
{
label:'实际入库数量',
value:'actualQty'
},
{
label:'实际入库重量',
value:'depositWeight'
}
],
list:[]
}
},
mounted(){
this.onLoading();
},
methods:{
onLoading(){
let that = this;
IPLAT.EiCommunicator.send('HGSC012', 'query', inInfo, {
onSuccess: (res) => {
if(res.extAttr.result && res.extAttr.result.length){
that.list = [];
let list = res.extAttr.result.map(item => {
return {
...item,
contractDate: item.contractDate? dayjs(item.contractDate).format('YYYY-MM-DD'):'',
outDate: item.outDate? dayjs(item.outDate).format('YYYY-MM-DD'):'',
depositDate: item.depositDate? dayjs(item.depositDate).format('YYYY-MM-DD'):''
}
}).map(item =>{
let obj = {}
that.columns2.forEach(val =>{
obj[val.value] = {
value: item[val.value],
rowspan:1,
show:true
}
})
return obj
});
let contractCodeObj = {}
list.forEach(item =>{
contractCodeObj[item.contractCode.value] = '';
})
let contractCodeList = Object.keys(contractCodeObj);
let arr1 = contractCodeList.map(val => {
let a = list.filter(val2 => val2.contractCode.value === val);
let obj2 ={}
a.forEach(item2 => {
obj2[item2.lcinventCode.value] = '';
});
let bList = Object.keys(obj2)
let Elist = bList.map(item3 => {
let b = a.filter(val2 => val2.lcinventCode.value === item3);
return b;
})
if(Elist.length){
let fList = [];
Elist.forEach(val4 => {
if(val4.length){
let g = val4.map((val5,i4) => {
return {
...val5,
lcinventCode:{
...val5.lcinventCode,
rowspan: val4.length,
show: !i4
},
lcinventName:{
...val5.lcinventName,
rowspan: val4.length,
show: !i4
},
lcspec:{
...val5.lcspec,
rowspan: val4.length,
show: !i4
},
jhckQty:{
...val5.jhckQty,
rowspan: val4.length,
show: !i4
},
jhckWeight:{
...val5.jhckWeight,
rowspan: val4.length,
show: !i4
},
outDate:{
...val5.outDate,
rowspan: val4.length,
show: !i4
},
sjckoutQty:{
...val5.sjckoutQty,
rowspan: val4.length,
show: !i4
},
sjckoutWeight:{
...val5.sjckoutWeight,
rowspan: val4.length,
show: !i4
},
}
})
let productCodeObj = {}
g.forEach(item3 =>{
productCodeObj[item3.productCode.value] = '';
})
let gList = Object.keys(productCodeObj)
let Hlist = gList.map(item4 => {
let d = g.filter(val7 => val7.productCode.value === item4);
return d.map((val6,i5) => {
return {
...val6,
productCode:{
...val6.productCode,
rowspan: d.length,
show: !i5
},
productName:{
...val6.productName,
rowspan: d.length,
show: !i5
},
rkspec:{
...val6.rkspec,
rowspan: d.length,
show: !i5
},
jhrkdepositQty:{
...val6.jhrkdepositQty,
rowspan: d.length,
show: !i5
},
jhrkdepositWeight:{
...val6.jhrkdepositWeight,
rowspan: d.length,
show: !i5
}
}
});
})
let finalArr = []
Hlist.forEach(item6=>{
finalArr.push(...item6);
})
fList.push(...finalArr)
}
})
a = fList;
}
return a.map((val3,i3) => {
return {
...val3,
companyName:{
...val3.companyName,
rowspan: a.length,
show: !i3
},
contractDate:{
...val3.contractDate,
rowspan: a.length,
show: !i3
},
contractCode:{
...val3.contractCode,
rowspan: a.length,
show: !i3
},
supName:{
...val3.supName,
rowspan: a.length,
show: !i3
}
}
})
})
arr1.forEach(item=>{
that.list.push(...item);
})
}
},
onFail: (err) => {
console.error('request_tools----------------->错误信息', err);
}
},
{async: false}
);
}
}
})
});
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/10/24
Time: 14:51
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/common/js/dayjs.min.js"></script>
<script src="${ctx}/common/js/vue-2.6.10.js"></script>
<style>
table{
border-color: #99d2ff;
}
table tr{
}
table tr th{
padding: 2px 8px;
font-size: .8125rem;
color: #2f80ed;
background: #dbefff;
height: 30px;
text-align: center;
}
table tr th span{
white-space: nowrap;
}
table tr td span{
white-space: nowrap;
}
table tr td{
padding: 0 8px;
height: 25px;
}
#table-box{
position: relative;
width: 100%;
overflow: auto;
min-height: 100%;
height: 74vh;
}
#table-box .table-content{
position: absolute;
min-height: 100%;
min-width: 100%;
}
.bg-blue{
background-color: #eff8ff;
}
</style>
<EF:EFPage title="委外执行加工表">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFSelect>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="contractDate" cname="委外加工日期" role="date"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="contractCode" cname="委外加工单号" placeholder="模糊查询" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="supCode" cname="供应商名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="sup_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
</EF:EFGrid>
<section id="table-box">
<section class="table-content">
<table border="1" >
<colgroup>
<col v-for="(item,k) in columns2" :key="k">
</colgroup>
<thead>
<tr>
<th v-for="(item,k) in columns" :key="k" :colspan="item.colspan">
<span>{{item.label}}</span>
</th>
</tr>
<tr>
<th v-for="(item,k) in columns2" :key="k" >
<span>{{item.label}}</span>
</th>
</tr>
</thead>
<tbody>
<tr v-for="(valObj,i) in list" :key="i">
<td v-for="(item,k) in columns2" :key="k" v-if="valObj[item.value].show" :rowspan="valObj[item.value].rowspan" :class="i/2%1?'bg-blue':''">
<span>{{valObj[item.value].value}}</span>
</td>
</tr>
</tbody>
</table>
</section>
</section>
</EF:EFRegion>
</EF:EFPage>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment