|
@@ -405,7 +405,9 @@
|
|
|
$('#divPresets').show();
|
|
|
current_advance_id = -1;
|
|
|
current_material_id = -1;
|
|
|
+ current_stage_id = bk_current_stage_id;
|
|
|
// 还有归档按钮处理
|
|
|
+ // current_stage_id
|
|
|
rptArchiveObj.toggleBtn(true);
|
|
|
} else if (type === 'change_prepay') {
|
|
|
// 预付款
|
|
@@ -418,9 +420,9 @@
|
|
|
// 要触发一下
|
|
|
current_advance_id = -1;
|
|
|
current_material_id = -1;
|
|
|
- if (current_advance_id === -1) {
|
|
|
- advancePayClick( $('#prepay-select-item a')[0]);
|
|
|
- }
|
|
|
+ bk_current_stage_id = current_stage_id;
|
|
|
+ current_stage_id = -400;
|
|
|
+ advancePayClick( $('#prepay-select-item a')[0]);
|
|
|
rptArchiveObj.toggleBtn(true);
|
|
|
} else if (type === 'change_material_adjustment') {
|
|
|
// 材料调差
|
|
@@ -433,9 +435,9 @@
|
|
|
// 要触发一下
|
|
|
current_advance_id = -1;
|
|
|
current_material_id = -1;
|
|
|
- if (current_material_id === -1) {
|
|
|
- buildMaterialSelection();
|
|
|
- }
|
|
|
+ bk_current_stage_id = current_stage_id;
|
|
|
+ current_stage_id = -500;
|
|
|
+ buildMaterialSelection();
|
|
|
rptArchiveObj.toggleBtn(true);
|
|
|
}
|
|
|
filterReportsByType();
|
|
@@ -605,6 +607,7 @@
|
|
|
let current_advance_id = -1; // 预付款期id
|
|
|
let current_material_id = -1; // 材差期id
|
|
|
let current_stage_id = STAGE_ID;
|
|
|
+ let bk_current_stage_id = current_stage_id;
|
|
|
let current_stage_times = -1;
|
|
|
let current_stage_status = -1;
|
|
|
const customSelects = <%- JSON.stringify(customSelects) %>;
|
|
@@ -819,6 +822,9 @@
|
|
|
const str = `<a class="dropdown-item" style="cursor:pointer${dispStr}" onclick="changeCurrentAdvance(this)" advance_id = "${advance.id}">第${adIndex + 1}期</a>`;
|
|
|
$("#optionSelectableAdvancePays").append(str);
|
|
|
});
|
|
|
+ if (current_advance_id > 0) {
|
|
|
+ getReportArchive();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function buildMaterialSelection() {
|
|
@@ -834,6 +840,9 @@
|
|
|
const str = `<a class="dropdown-item" style="cursor:pointer${dispStr}" onclick="changeCurrentMaterial(this)" material_id = "${materialAdj.id}">第${maIndex + 1}期</a>`;
|
|
|
$("#optionSelectableMaterials").append(str);
|
|
|
});
|
|
|
+ if (current_material_id > 0) {
|
|
|
+ getReportArchive();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function changeCurrentMaterial(ele) {
|
|
@@ -848,6 +857,7 @@
|
|
|
if (zTreeOprObj.currentNode) {
|
|
|
zTreeOprObj.treeObj.selectNode(zTreeOprObj.currentNode, false);
|
|
|
}
|
|
|
+ getReportArchive();
|
|
|
}
|
|
|
|
|
|
function changeCurrentAdvance(ele) {
|
|
@@ -862,6 +872,7 @@
|
|
|
if (zTreeOprObj.currentNode) {
|
|
|
zTreeOprObj.treeObj.selectNode(zTreeOprObj.currentNode, false);
|
|
|
}
|
|
|
+ getReportArchive();
|
|
|
}
|
|
|
|
|
|
function changeCurrentStage(ele) {
|
|
@@ -876,7 +887,16 @@
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- let params = {prjId: PROJECT_ID, stgId: current_stage_id, stgTimes: current_stage_times, stgStatus: current_stage_status};
|
|
|
+ getReportArchive();
|
|
|
+ }
|
|
|
+
|
|
|
+ function getReportArchive() {
|
|
|
+ const params = {prjId: PROJECT_ID, stgId: current_stage_id, stgTimes: current_stage_times, stgStatus: current_stage_status};
|
|
|
+ if (current_stage_id === -400) {
|
|
|
+ params.bizId = current_advance_id;
|
|
|
+ } else if (current_stage_id === -500) {
|
|
|
+ params.bizId = current_material_id;
|
|
|
+ }
|
|
|
$.bootstrapLoading.start();
|
|
|
CommonAjax.postXsrfEx("/tender/report_api/getReportArchive", params, 10000, true, getCookie('csrfToken_j'),
|
|
|
function(result){
|
|
@@ -899,6 +919,7 @@
|
|
|
$.bootstrapLoading.end();
|
|
|
}
|
|
|
);
|
|
|
+ //
|
|
|
}
|
|
|
|
|
|
function setupSignature() {
|