ebu_ecology_dev1/javascript/xuanran.wang/ajx/ChildWorkFlowSplit.js

27 lines
994 B
JavaScript
Raw Normal View History

2023-07-14 14:50:48 +08:00
$(()=>{
const config = {
// 子流程主表帐套号字段名
zth:'zth',
filterConfig:{
// 子流程明细表帐套号字段名
zthm:'zthm',
// 子流程明细表索引
detailNo: 1
}
}
const mainZth = WfForm.convertFieldNameToId(config.zth);
const detailTable = "detail_" + config.filterConfig.detailNo;
const detailZth = WfForm.convertFieldNameToId(config.filterConfig.zthm, detailTable);
let rowArr = WfForm.getDetailAllRowIndexStr(detailTable).split(",");
let mainZthVal = WfForm.getFieldValue(mainZth);
for(let i=0; i < rowArr.length; i++){
let rowIndex = rowArr[i];
if(rowIndex !== ""){
let fieldValue = WfForm.getFieldValue(`${detailZth}_${rowIndex}`);
if(mainZthVal !== fieldValue){
$(`#oTable${+config.filterConfig.detailNo - 1} tr[data-rowindex='${rowIndex}']`).css("display","none")
}
}
}
})