32 lines
1.1 KiB
JavaScript
32 lines
1.1 KiB
JavaScript
// 主表预计付款日期
|
|
const yjfksj = WfForm.convertFieldNameToId('yjfksj');
|
|
// 主表比例
|
|
const bl = WfForm.convertFieldNameToId('bcfkbl');
|
|
// 明细要求付款日期
|
|
const detail3Yqfkrq = WfForm.convertFieldNameToId('yqfkrq',"detail_3");
|
|
// 明细本次付款比例
|
|
const detailBl = WfForm.convertFieldNameToId('bcfkbl',"detail_3");
|
|
|
|
WfForm.registerCheckEvent(WfForm.OPER_ADDROW + "3", function (callback) {
|
|
callback();
|
|
initDeatail3Date();
|
|
});
|
|
|
|
WfForm.bindFieldChangeEvent(`${yjfksj},${bl}`, function(obj,id,value){
|
|
initDeatail3Date();
|
|
});
|
|
|
|
function initDeatail3Date(){
|
|
let dateVal = WfForm.getFieldValue(yjfksj);
|
|
let blVal = WfForm.getFieldValue(bl);
|
|
console.log('dateVal ', dateVal);
|
|
console.log('blVal ', blVal);
|
|
let detail3RowArr = WfForm.getDetailAllRowIndexStr('detail_3').split(",");
|
|
for (let i = 0; i < detail3RowArr.length; i++) {
|
|
let rowIndex = detail3RowArr[i];
|
|
if (rowIndex !== "") {
|
|
WfForm.changeFieldValue(`${detail3Yqfkrq}_${rowIndex}`,{value: dateVal});
|
|
WfForm.changeFieldValue(`${detailBl}_${rowIndex}`,{value: blVal});
|
|
}
|
|
}
|
|
} |