UNPKG

kpiplus

Version:

KPI+

1 lines 671 B
var model=require("../../models/dmchietkhau"),dmvt=require("../../models/dmvt"),dmnvt=require("../../models/dmnvt"),controller=require("../../controllers/controller"),async=require("async"),arrayfuncs=require("../../libs/array-funcs");module.exports=function(e){this.contr=new controller(e,model,"dmchietkhau",{sort:{ma_vt:1,ma_kho:1,sl_tu:1,sl_den:1}}),this.contr.view=function(e,n,t){id_app=e.current_id_app,async.parallel([function(e){n.joinModel2(id_app,dmvt,{where:"ma_vt",fields:"ten_vt"},function(n){e(null,n)})},function(e){n.joinModel2(id_app,dmnvt,{where:{ma_nvt:"_id"},fields:"ten_nvt"},function(n){e(null,n)})}],function(e,r){t(null,n)})},this.contr.route()};