|
|
@@ -62,7 +62,7 @@ module.exports = app => {
|
|
|
jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.template.posCalc),
|
|
|
};
|
|
|
renderData.templateList = await ctx.service.calcTmpl.getAllTemplate(ctx.subProject.id, 'posCalc');
|
|
|
- await ctx.service.calcTmpl.checkTemplateUsed(renderData.templateList);
|
|
|
+ await ctx.service.calcTmpl.checkTemplateUsed(renderData.templateList, 'posCalc');
|
|
|
const specList = await ctx.service.stdExtraList.getList(0);
|
|
|
renderData.specList = specList.map(x => { return { value: x.id, text: x.name }; });
|
|
|
await this.layout('template/pos_calc.ejs', renderData, 'template/preview_modal.ejs');
|
|
|
@@ -80,7 +80,7 @@ module.exports = app => {
|
|
|
jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.template.cost),
|
|
|
};
|
|
|
renderData.templateList = await ctx.service.calcTmpl.getAllTemplate(ctx.subProject.id, 'cost');
|
|
|
- // await ctx.service.calcTmpl.checkTemplateUsed(renderData.templateList);
|
|
|
+ await ctx.service.calcTmpl.checkTemplateUsed(renderData.templateList, 'cost');
|
|
|
await this.layout('template/cost.ejs', renderData, 'template/cost_modal.ejs');
|
|
|
} catch (err) {
|
|
|
ctx.log(err);
|