|
|
@@ -11,6 +11,9 @@
|
|
|
const measureType = require('../const/tender').measureType;
|
|
|
const status = require('../const/audit').stage.status;
|
|
|
const moment = require('moment');
|
|
|
+const stashCtrl = {
|
|
|
+ first: false,
|
|
|
+};
|
|
|
|
|
|
module.exports = app => {
|
|
|
|
|
|
@@ -34,6 +37,7 @@ module.exports = app => {
|
|
|
const renderData = {
|
|
|
categoryData,
|
|
|
stashList,
|
|
|
+ stashCtrl,
|
|
|
jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.spss.gatherInfo)
|
|
|
};
|
|
|
await this.layout('spss/gather_info.ejs', renderData, 'spss/gather_info_modal.ejs');
|
|
|
@@ -49,6 +53,7 @@ module.exports = app => {
|
|
|
const renderData = {
|
|
|
categoryData,
|
|
|
stashList,
|
|
|
+ stashCtrl,
|
|
|
jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.spss.gatherLedger)
|
|
|
};
|
|
|
await this.layout('spss/gather_ledger.ejs', renderData, 'spss/spss_modal.ejs');
|
|
|
@@ -64,6 +69,7 @@ module.exports = app => {
|
|
|
const renderData = {
|
|
|
categoryData,
|
|
|
stashList,
|
|
|
+ stashCtrl,
|
|
|
jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.spss.gatherStage)
|
|
|
};
|
|
|
await this.layout('spss/gather_stage.ejs', renderData, 'spss/spss_modal.ejs');
|
|
|
@@ -79,6 +85,7 @@ module.exports = app => {
|
|
|
const renderData = {
|
|
|
categoryData,
|
|
|
stashList,
|
|
|
+ stashCtrl,
|
|
|
jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.spss.gatherStageExtra)
|
|
|
};
|
|
|
await this.layout('spss/gather_stage_extra.ejs', renderData, 'spss/spss_modal.ejs');
|
|
|
@@ -94,6 +101,7 @@ module.exports = app => {
|
|
|
const renderData = {
|
|
|
categoryData,
|
|
|
stashList,
|
|
|
+ stashCtrl,
|
|
|
jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.spss.gatherStagePay)
|
|
|
};
|
|
|
await this.layout('spss/gather_stage_pay.ejs', renderData, 'spss/spss_modal.ejs');
|
|
|
@@ -109,6 +117,7 @@ module.exports = app => {
|
|
|
const renderData = {
|
|
|
categoryData,
|
|
|
stashList,
|
|
|
+ stashCtrl,
|
|
|
jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.spss.compareLedger)
|
|
|
};
|
|
|
await this.layout('spss/compare_ledger.ejs', renderData, 'spss/spss_modal.ejs');
|
|
|
@@ -124,6 +133,7 @@ module.exports = app => {
|
|
|
const renderData = {
|
|
|
categoryData,
|
|
|
stashList,
|
|
|
+ stashCtrl,
|
|
|
jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.spss.compareStage),
|
|
|
};
|
|
|
await this.layout('spss/compare_stage.ejs', renderData, 'spss/spss_modal.ejs');
|
|
|
@@ -736,6 +746,10 @@ module.exports = app => {
|
|
|
await this.ctx.service.spssStash.addSpssStash(data.type, data.select, data.result);
|
|
|
responseData.data = await this.ctx.service.spssStash.getSpssStashList(this.ctx.subProject.id, data.type);
|
|
|
break;
|
|
|
+ case 'first':
|
|
|
+ await this.ctx.service.spssStash.firstSpssStash(this.ctx.subProject.id, data.type, data.id);
|
|
|
+ responseData.data = await this.ctx.service.spssStash.getSpssStashList(this.ctx.subProject.id, data.type);
|
|
|
+ break;
|
|
|
default: throw '未知操作';
|
|
|
}
|
|
|
ctx.body = responseData;
|