UNPKG

flexbiz-server

Version:

Flexible Server

4 lines (3 loc) 726 B
'use strict';const model=global.getModel("chamcong"),loaicong=global.getModel("dmloaicong"),controller=require("../../controllers/controller"); module.exports=function($router$$){(new controller($router$$,model,"chamcong",{sort:{ngay:-1,ma_nv:1,ma_loai_cong:1},onView:async function($user$$,$items$$,$fn$$){await $items$$.asyncJoinModel2($user$$.current_id_app,loaicong,[{where:{ma_loai_cong:"ma_loai_cong"},fields:["ten_loai_cong","color"]}]);await $items$$.asyncJoinModel2($user$$.current_id_app,global.getModel("dmnv"),[{where:{ma_nv:"ma_nv"},fields:["ten_nv"]}]);await $items$$.asyncJoinModel2($user$$.current_id_app,global.getModel("dmbp"), [{where:{ma_bp:"ma_bp"},fields:["ten_bp"]}]);$fn$$(null,$items$$)}})).route()};