|
@@ -7,6 +7,8 @@
|
|
|
let detailProjectIndex = 0;
|
|
|
let previousAmount = z.ui.input("[name='createReqVO$totalAmount']").getValue();
|
|
|
let costTypeJSON = JSON.parse(document.querySelector('#costTypeJSON').value)
|
|
|
+ let lastProjectId = '';
|
|
|
+ let lastProjectName = '';
|
|
|
window.onload = function (ex) {
|
|
|
let timeObject = document.querySelector('#detailList')
|
|
|
let arrays = JSON.parse(timeObject.value)
|
|
@@ -172,6 +174,12 @@
|
|
|
z.ui.selecttree("[name='costType[" + i + "]']").setValue(isTimes[i].costType)
|
|
|
$("[name='CommonCostDetailDO[" + i + "]$costType']").val(isTimes[i].costType);
|
|
|
}
|
|
|
+ if(!(!lastProjectId || lastProjectId.trim() === '')){
|
|
|
+ $("[name='CommonCostDetailDO[" + i + "]$projectId']").val(lastProjectId);
|
|
|
+ }
|
|
|
+ if(!(!lastProjectName || lastProjectName.trim() === '')){
|
|
|
+ z.ui.input("[name='CommonCostDetailDO[" + i + "]$projectName']").setValue(lastProjectName);
|
|
|
+ }
|
|
|
if (!(!isTimes[i].projectId || isTimes[i].projectId.trim() === '')) {
|
|
|
$("[name='CommonCostDetailDO[" + i + "]$projectId']").val(isTimes[i].projectId);
|
|
|
}
|
|
@@ -221,6 +229,8 @@
|
|
|
z.ui.alertWarning(`项目不能为空!`)
|
|
|
return false;
|
|
|
}
|
|
|
+ lastProjectId = $("[name='CommonCostDetailDO[" + i + "]$projectId']").val();
|
|
|
+ lastProjectName = z.ui.input("[name='CommonCostDetailDO[" + i + "]$projectName']").getValue();
|
|
|
if(!z.ui.date("[name='CommonCostDetailDO[" + i + "]$costDate']").getValue()){
|
|
|
z.ui.alertWarning(`发生日期不能为空!`)
|
|
|
return false;
|