|
@@ -11,7 +11,7 @@ import STDRationLibMapModel from "../../common/std/std_ration_lib_map_model";
|
|
import STDBillLibListsModel from "../../common/std/std_bills_lib_lists_model";
|
|
import STDBillLibListsModel from "../../common/std/std_bills_lib_lists_model";
|
|
import STDGLJLibMapModel from "../../common/std/std_glj_lib_map_model";
|
|
import STDGLJLibMapModel from "../../common/std/std_glj_lib_map_model";
|
|
import {default as EngineeringConst, List as EngineeringList} from "../../common/const/engineering";
|
|
import {default as EngineeringConst, List as EngineeringList} from "../../common/const/engineering";
|
|
-import BillsTemplateModel from "../../templates/models/bills_template_model";
|
|
|
|
|
|
+import BillsTemplateModel from "../models/bills_template_model";
|
|
|
|
|
|
class CompilationController extends BaseController {
|
|
class CompilationController extends BaseController {
|
|
|
|
|
|
@@ -383,13 +383,14 @@ class CompilationController extends BaseController {
|
|
let section = request.params.section;
|
|
let section = request.params.section;
|
|
let data = JSON.parse(request.body.data);
|
|
let data = JSON.parse(request.body.data);
|
|
|
|
|
|
|
|
+ console.log(data);
|
|
let billsTemplateModel = new BillsTemplateModel();
|
|
let billsTemplateModel = new BillsTemplateModel();
|
|
let result = await billsTemplateModel.updateTemplate(valuationId, data);
|
|
let result = await billsTemplateModel.updateTemplate(valuationId, data);
|
|
|
|
|
|
if (result) {
|
|
if (result) {
|
|
- callback(request, response, 0, '', data);
|
|
|
|
|
|
+ response.json({error: 0, message: '', data: data});
|
|
} else {
|
|
} else {
|
|
- callback(request, response, 1, '更新数据错误', null);
|
|
|
|
|
|
+ response.json({error: 1, message: '更新数据错误', data: null});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|