flexbiz-server
Version:
Flexible Server
3 lines (2 loc) • 930 B
JavaScript
'use strict';const model=global.getModel("hmcn"),controller=require("../../controllers/controller"),customer=global.getModel("customer"),dmtk=global.getModel("account"),async=require("async"),hmcn=function($contr_router$$){$contr_router$$=new controller($contr_router$$,model,"hmcn",{sort:{ma_kh:1,tk:1}});$contr_router$$.route();$contr_router$$.view=function($user$$,$result$$,$fn$$){const $id_app$$=$user$$.current_id_app;async.series({kh:function($callback$$){$result$$.joinModel2($id_app$$,customer,
{where:"ma_kh",fields:{ten_kh:"ten_kh"}},function(){$callback$$()})},tk:function($callback$$){$result$$.joinModel2($id_app$$,dmtk,{where:"tk",fields:["ten_tk","ma_nt"]},function(){$callback$$()})}},async function(){$fn$$(null,$result$$)})};$contr_router$$.creating=($user$$,$obj$$,$next$$)=>{$next$$(null,$obj$$)};$contr_router$$.updating=($user$$,$data$$,$obj$$,$next$$)=>{$next$$(null,$data$$,$obj$$)}};module.exports=hmcn;