UNPKG

flexbiz-server

Version:

Flexible Server

1,477 lines 500 kB
exports.data = [ { "_id": "677bd47b3e2bba891dd819bb", "columns": [ { "datatype": "String", "field": "ma_kh", "header": "Mã khách", "stt": 0, "line": 1640061930332 }, { "datatype": "String", "field": "ten_kh", "header": "Tên khách", "line": 1640051876114, "stt": 1, "config": "{style:{minWidth:300}}" }, { "datatype": "Number", "hide": false, "stt": 2, "field": "t_so_bill", "header": "Số đơn hàng", "line": 1700620555397, "style": "" }, { "datatype": "Number", "field": "t_sl_xuat", "header": "Số lượng", "stt": 3, "line": 1640051899753 }, { "datatype": "Number", "field": "t_tien_hang_ct", "header": "Tiền hàng chưa thuế", "stt": 4, "line": 1640051918772, "hide": false }, { "datatype": "Number", "field": "t_tien_ck", "header": "Chiết khấu", "stt": 6, "line": 1640051937560, "hide": false }, { "datatype": "Number", "field": "t_thue", "header": "Thuế", "stt": 7, "line": 1640051954409, "hide": false }, { "datatype": "Number", "field": "tien_ck_hd", "header": "CK hoá đơn", "stt": 8, "line": 1640051973761, "hide": true }, { "datatype": "Number", "field": "tien_evoucher", "header": "Evoucher", "stt": 9, "line": 1640052027111, "hide": true }, { "datatype": "Number", "field": "tien_phi_vc", "header": "Phí VC", "stt": 10, "line": 1653984947501, "hide": true }, { "datatype": "Number", "field": "tien_freeship", "header": "Free ship", "stt": 11, "line": 1653984958268, "hide": true }, { "datatype": "Number", "field": "t_phai_thu", "header": "Tổng tiền phải thu", "stt": 29, "line": 1640052092208, "hide": true }, { "datatype": "Pivot", "field": "thanh_toan", "header": "Thanh toán", "stt": 32, "line": 1640052523868, "custom_render": "return `<div style=\"text-align:right\">${numeral(row[column.field.ma]).format()}</div>`;", "custom_header": "return header.ten", "hide": true }, { "datatype": "Number", "field": "t_tien_thu", "header": "Tổng thu", "stt": 40, "line": 1640053110275, "hide": true }, { "datatype": "Number", "field": "phai_tra", "header": "Tiền thối lại", "stt": 50, "line": 1640061759647, "hide": true }, { "datatype": "Number", "stt": 80, "field": "t_tien_phai_tl", "header": "Trả lại gồm thuế", "line": 1654066039566, "hide": false }, { "datatype": "Number", "stt": 81, "field": "thuc_thu", "header": "Doanh số", "line": 1640337471318, "hide": false }, { "datatype": "Number", "stt": 90, "field": "t_doanh_thu_thuan", "header": "Tổng thanh toán", "line": 1654066393799, "hide": true }, { "datatype": "Date", "hide": false, "stt": 97, "field": "cust_created", "header": "Ngày tạo", "line": 1702282032300 }, { "datatype": "Date", "hide": false, "stt": 98, "field": "ngay_mua_dau_tien", "header": "Mua lần đầu", "line": 1697421385588, "custom_render": "" }, { "datatype": "Date", "hide": false, "stt": 98, "field": "cust_new", "header": "Mua gần nhất", "line": 1702606399616 }, { "datatype": "String", "hide": true, "stt": 99, "field": "dien_thoai", "header": "Số điện thoại", "line": 1696492613745 }, { "datatype": "String", "stt": 99, "field": "dia_chi", "header": "Địa chỉ", "line": 1692679574994, "hide": false } ], "is_dashboard_item": false, "dashboard_default": false, "chart_width": 8, "chart_height": 6, "status": true, "user_created": "leemeenhee1994@gmail.com", "user_updated": "anh@goodapp.vn", "date_created": "2024-01-05T06:30:02.609Z", "date_updated": "2025-01-20T06:22:58.034Z", "code": "admin_dtbanletheokh", "title": "Dùng Cho Quản Lý: Doanh thu theo khách hàng", "form_condition_info": "admin_dtbanletheokh", "table_info": "", "drilldown_info": "row.ma_kh?{code:'dtbanletheosp',type:'report',title:`Chi tiết bán lẻ`}:null", "chart_data_key_x": "ma_kh", "chart_data_key_ys": "Doanh Thu", "chart_type": "table", "dashboard_ids": "", "chart_stt": 0, "handle_data": "let rs = data.data;\nrs.forEach(r=>{\n r.thuc_thu = r.t_tien_hang_ct - r.t_tien_ck + r.t_thue - r.t_tien_phai_tl\n})\nreturn rs;", "chart_handle_data": "let rs = data.filter(r=>!r.bold);\nrs.forEach(r=>{\n r[\"Doanh Thu\"] = r.t_doanh_thu_thuan;\n})\nreturn rs;", "handle_data_expression_server": "await utils.joinModel2(data.data,user.current_id_app,\"customer\",\"ma_kh\",{cust_created:\"date_created\",cust_new:\"ngay_mua_gan_nhat\"})\nreturn data;", "api_code": "dtbanletheokh", "exfields": {}, "collection_name": "reportinfo", "stt_sorted": 0, "approve_data": [], "name_user_updated": "Admin", "ten_kieu_chart": "Bảng" }, { "_id": "67e1200419dafdce1a75f0df", "columns": [ { "datatype": "String", "stt": 1, "field": "reply", "header": "Kết quả phân tích", "line": 1640142938411, "custom_render": "return `<div id=\"ai_reply\">${row.reply}</div>`" } ], "is_dashboard_item": false, "dashboard_default": true, "chart_width": 4, "chart_height": 2, "status": true, "user_created": "anh@goodapp.vn", "user_updated": "anh@goodapp.vn", "date_created": "2025-03-24T09:04:04.134Z", "date_updated": "2025-04-09T01:49:04.795Z", "code": "analyzedata", "title": "Phân tích dữ liệu tài chính", "table_info": "", "form_condition_info": "analyzedata", "cancel_label": "", "search_label": "Phân tích", "handle_data": "context[`${context.userInfo.email}-id_conv`] = data.id_conv;\n// Step 1: Parse Markdown to HTML\nlet htmlContent = marked.parse(data.reply);\nsetTimeout(()=>{\n // Tạo một phần tử tạm để xử lý MathJax\n const tempElement = document.getElementById('ai_reply');\n MathJax.typesetPromise([tempElement]);\n},100)\nreturn [{reply:htmlContent}];", "chart_stt": 0, "exfields": {}, "handle_condition": "if(!condition.id_conv){\n let id_conv = context[`${context.userInfo.email}-id_conv`];\n condition.id_conv = id_conv||\"\";\n}\nreturn condition;", "collection_name": "reportinfo", "stt_sorted": 1, "approve_data": [], "name_user_updated": "Admin", "name_user_created": "Admin" }, { "_id": "677bd47b3e2bba891dd819bd", "columns": [ { "datatype": "String", "stt": 1, "field": "name", "header": "Tên ví", "line": 1662524733168 }, { "datatype": "String", "stt": 2, "field": "username", "header": "Tên đăng nhập", "line": 1662524744660 }, { "datatype": "String", "stt": 3, "field": "fullname", "header": "Tên người dùng", "line": 1662525592206 }, { "datatype": "String", "stt": 5, "field": "address", "header": "Địa chỉ ví", "line": 1662524767900 }, { "datatype": "Number", "stt": 7, "field": "bl_vnd", "header": "Số dư VND", "line": 1662524796160 } ], "is_dashboard_item": false, "dashboard_default": true, "chart_width": 4, "chart_height": 2, "status": true, "user_created": "invncur@gmail.com", "user_updated": "anh@goodapp.vn", "date_created": "2022-09-07T04:38:37.337Z", "date_updated": "2025-01-20T06:22:58.112Z", "chart_stt": 0, "code": "assbalances", "title": "Báo cáo số dư theo ví", "form_condition_info": "assbalances", "api_code": "asskey", "handle_data": "data.forEach(item=>{\n item.bl_vnd = Number( (item.balances.find(b=>b.denom==\"vnd\") ||{}).amount ||0);\n})\ndata = data.filter(r=>r.bl_vnd && r.address!= \"flexzen1s56hyw0ad02lr5y0gr432ts48k5jqznhpx9f4j\")\nreturn data;", "handle_condition": "condition.has_balance = true;\nreturn condition;", "exfields": {}, "collection_name": "reportinfo", "stt_sorted": 2, "approve_data": [], "name_user_updated": "Admin", "name_user_created": "Van Truong" }, { "_id": "677bd47b3e2bba891dd819bf", "columns": [ { "datatype": "String", "stt": 1, "field": "name", "header": "Tên ví", "line": 1662524733168 }, { "datatype": "String", "stt": 2, "field": "username", "header": "Tên đăng nhập", "line": 1662524744660 }, { "datatype": "String", "stt": 3, "field": "fullname", "header": "Tên người dùng", "line": 1662525592206 }, { "datatype": "String", "stt": 5, "field": "address", "header": "Địa chỉ ví", "line": 1662524767900 } ], "is_dashboard_item": false, "dashboard_default": true, "chart_width": 4, "chart_height": 2, "status": true, "user_created": "longhai1309@gmail.com", "user_updated": "anh@goodapp.vn", "date_created": "2022-09-16T06:57:57.984Z", "date_updated": "2025-01-20T06:22:58.170Z", "chart_stt": 0, "code": "assbalances_cus", "title": "Danh sách ví", "form_condition_info": "assbalances", "api_code": "asskey", "handle_data": "", "handle_condition": "condition.has_balance = true;\nreturn condition;", "exfields": {}, "collection_name": "reportinfo", "stt_sorted": 3, "approve_data": [], "name_user_updated": "Admin" }, { "_id": "677bd47b3e2bba891dd819c1", "columns": [ { "datatype": "String", "stt": 0, "field": "memo", "header": "Nội dung", "config": "{md:\"6\"}", "line": 1657248201439, "custom_render": " `<div style=\"width:300px\">${row.memo}</div>`" }, { "datatype": "Date", "stt": 1, "field": "date", "header": "Ngày", "custom_render": "", "line": 1657248142946 }, { "datatype": "String", "stt": 1, "field": "introduceCode", "header": "Mã giới thiệu", "config": "{md:\"3\"}", "custom_render": "", "line": 1663575953897 }, { "datatype": "String", "stt": 2, "field": "username", "header": "Tài khoản người nhận", "custom_render": "", "line": 1657248266355 }, { "datatype": "String", "stt": 2, "field": "receiver", "header": "Ví nhận", "custom_render": "", "line": 1663575874063 }, { "datatype": "String", "stt": 3, "field": "name", "header": "Tên người nhận", "custom_render": "", "line": 1657248279830 }, { "datatype": "String", "stt": 5, "field": "ma_kh", "header": "Mã khách hàng", "custom_render": "", "line": 1658816834233 }, { "datatype": "String", "stt": 7, "field": "ten_kh", "header": "Tên khách hàng", "custom_render": "", "line": 1658816842506 }, { "datatype": "String", "stt": 21, "field": "idProduct", "header": "Mã dự án", "line": 1646115367492, "custom_render": "" }, { "datatype": "String", "stt": 22, "field": "ten_san_pham", "header": "Tên dự án", "custom_render": "`<div style=\"width:300px\">${row.ten_san_pham}</div>`", "line": 1657247921140, "config": "{md:6}" }, { "datatype": "String", "stt": 23, "field": "idPeriod", "header": "Mã gói đầu tư", "custom_render": "", "line": 1657247992296 }, { "datatype": "String", "stt": 24, "field": "ten_ky_han", "header": "Tên gói đầu tư", "custom_render": "", "line": 1657248016589 }, { "datatype": "String", "stt": 30, "field": "tokenName", "header": "Token gói đầu tư", "config": "", "line": 1657262677057 }, { "datatype": "Number", "stt": 31, "field": "tokenAmount", "header": "Số lượng token", "config": "", "line": 1657262699523 }, { "datatype": "Number", "stt": 32, "field": "tokenValue", "header": "Giá trị đầu tư", "config": "", "line": 1657262717530 }, { "datatype": "String", "stt": 89, "field": "denom", "header": "Loại tiền hoa hồng", "config": "", "line": 1657248117738 }, { "datatype": "Number", "stt": 90, "field": "amount", "header": "Tiền hoa hồng", "line": 1646115388640, "config": "" } ], "is_dashboard_item": true, "dashboard_default": true, "chart_width": 12, "chart_height": 8, "status": true, "user_created": "invncur@gmail.com", "user_updated": "anh@goodapp.vn", "date_created": "2022-09-12T04:24:09.632Z", "date_updated": "2025-01-20T06:22:58.228Z", "chart_stt": 1, "code": "assbonus", "api_code": "", "title": "Tiền hoa hồng", "form_condition_info": "assbonus1", "handle_data": "", "dashboard_ids": "WALLET", "chart_type": "table", "exfields": {}, "collection_name": "reportinfo", "stt_sorted": 4, "approve_data": [], "name_user_updated": "Admin", "name_user_created": "Van Truong", "ten_kieu_chart": "Bảng" }, { "_id": "677bd47b3e2bba891dd819c3", "columns": [ { "datatype": "String", "stt": 0, "field": "memo", "header": "Nội dung", "config": "{md:\"6\"}", "line": 1657248201439, "custom_render": " `<div style=\"width:300px\">${row.memo}</div>`" }, { "datatype": "DateTime", "stt": 1, "field": "date", "header": "Ngày", "custom_render": "", "line": 1657248142946 }, { "datatype": "String", "stt": 2, "field": "username", "header": "Tài khoản người nhận", "custom_render": "", "line": 1657248266355 }, { "datatype": "String", "stt": 3, "field": "name", "header": "Tên người nhận", "custom_render": "", "line": 1657248279830 }, { "datatype": "String", "stt": 5, "field": "ma_kh", "header": "Mã khách hàng", "custom_render": "", "line": 1658816834233 }, { "datatype": "String", "stt": 7, "field": "ten_kh", "header": "Tên khách hàng", "custom_render": "", "line": 1658816842506 }, { "datatype": "String", "stt": 21, "field": "idProduct", "header": "Mã dự án", "line": 1646115367492, "custom_render": "" }, { "datatype": "String", "stt": 22, "field": "ten_san_pham", "header": "Tên dự án", "custom_render": "`<div style=\"width:300px\">${row.ten_san_pham}</div>`", "line": 1657247921140, "config": "{md:6}" }, { "datatype": "String", "stt": 23, "field": "idPeriod", "header": "Mã gói đầu tư", "custom_render": "", "line": 1657247992296 }, { "datatype": "String", "stt": 24, "field": "ten_ky_han", "header": "Tên gói đầu tư", "custom_render": "", "line": 1657248016589 }, { "datatype": "String", "stt": 30, "field": "tokenName", "header": "Token gói đầu tư", "config": "", "line": 1657262677057 }, { "datatype": "Number", "stt": 31, "field": "tokenAmount", "header": "Số lượng token", "config": "", "line": 1657262699523 }, { "datatype": "Number", "stt": 32, "field": "tokenValue", "header": "Giá trị đầu tư", "config": "", "line": 1657262717530 }, { "datatype": "Number", "stt": 33, "field": "lai_suat", "header": "Lãi suất (%/năm)", "config": "", "line": 1657262736614 }, { "datatype": "String", "stt": 89, "field": "denom", "header": "Loại tiền trả lãi", "config": "", "line": 1657248117738 }, { "datatype": "Number", "stt": 90, "field": "amount", "header": "Tiền lãi", "line": 1646115388640, "config": "" } ], "is_dashboard_item": true, "dashboard_default": true, "chart_width": 12, "chart_height": 8, "status": true, "user_created": "invncur@gmail.com", "user_updated": "anh@goodapp.vn", "date_created": "2022-07-08T02:45:14.587Z", "date_updated": "2025-01-20T06:22:58.279Z", "chart_stt": 1, "code": "assinterest", "api_code": "", "title": "Tiền lãi đã trả", "form_condition_info": "assinterest", "handle_data": "", "dashboard_ids": "WALLET", "chart_type": "table", "exfields": {}, "collection_name": "reportinfo", "stt_sorted": 5, "approve_data": [], "name_user_updated": "Admin", "name_user_created": "Van Truong", "ten_kieu_chart": "Bảng" }, { "_id": "677bd47b3e2bba891dd819c5", "columns": [ { "datatype": "String", "field": "stt", "header": "stt", "stt": 1, "line": 1669183520598 }, { "datatype": "String", "field": "be_introduced_by", "header": "Người giới thiệu", "line": 1669110587661, "stt": 2 }, { "datatype": "String", "field": "name", "header": "Tên người giới thiệu", "stt": 2, "line": 1672023949702 }, { "datatype": "String", "field": "introduce_code", "header": "Mã giới thiệu", "stt": 3, "line": 1669110608737 }, { "datatype": "Number", "field": "so_luong", "header": "Số lần giới thiệu", "stt": 4, "line": 1669110634718 } ], "is_dashboard_item": false, "dashboard_default": true, "chart_width": 4, "chart_height": 2, "status": true, "user_created": "longhai1309@gmail.com", "user_updated": "anh@goodapp.vn", "date_created": "2022-11-22T09:46:10.634Z", "date_updated": "2025-01-20T06:22:58.334Z", "chart_stt": 0, "code": "assintroducer", "title": "Thông kê giới thiệu", "form_condition_info": "assintroducer", "api_code": "introducer", "handle_data": "if(condition.group_id){\n data = data.filter(row=>row.group_id&& (!condition.group_id|| condition.group_id===row.group_id));\n}\n\nlet rs = data.filter(r=>{\n return new Date(r.date_created).getTime()>=new Date(condition.tu_ngay) && new Date(r.date_created).getTime()<=new Date(condition.den_ngay)\n}).map(item=>{\n    return {\n\t\tstt: 0,\n dg : \"1\",\n        be_introduced_by: item.be_introduced_by,\n\tintroduce_code: item.introduce_code,\n\tbonus_paid: item.bonus_paid,\nname: item.be_introduced_by_name,\n        so_luong: 1\n    }\n});\n\nlet i = 0;\nlet report= utils.groupBy(rs,[\"be_introduced_by\",\"introduce_code\",\"name\"],[\"bonus_paid\",\"so_luong\"]);\nreport.forEach(r => {\n\ti = i + 1;\n\tr.stt = i;\n});\n\nlet sm= utils.groupBy(rs,[\"dg\"],[\"bonus_paid\",\"so_luong\"]);\nsm.forEach(r=>{\n r.bold = true;\n r.be_introduced_by= 'Tổng cộng';\n})\n\nreport= report.concat(sm);\n\nreturn report;", "handle_condition": "", "handle_data_expression_server": "if(condition.group_id){\n return data.filter(row=>row.group_id&& (!condition.group_id|| condition.group_id===row.group_id));\n}", "exfields": {}, "collection_name": "reportinfo", "stt_sorted": 6, "approve_data": [], "name_user_updated": "Admin" }, { "_id": "677bd47b3e2bba891dd819c7", "columns": [ { "datatype": "String", "stt": 2, "field": "email", "header": "Tài khoản nhà đầu tư", "custom_render": "", "line": 1657248266355 }, { "datatype": "String", "stt": 3, "field": "name", "header": "Tên nhà đầu tư", "custom_render": "", "line": 1657248279830 }, { "datatype": "String", "stt": 21, "field": "id_product", "header": "Mã dự án", "line": 1646115367492, "custom_render": "" }, { "datatype": "String", "stt": 22, "field": "ten_san_pham", "header": "Tên dự án", "custom_render": "`<div style=\"width:300px\">${row.ten_san_pham}</div>`", "line": 1657247921140, "config": "{md:6}" }, { "datatype": "String", "stt": 23, "field": "id_period", "header": "Mã gói đầu tư", "custom_render": "", "line": 1657247992296 }, { "datatype": "String", "stt": 24, "field": "ten_ky_han", "header": "Tên gói đầu tư", "custom_render": "", "line": 1657248016589 }, { "datatype": "String", "stt": 89, "field": "denom", "header": "Token", "config": "", "line": 1657248117738 }, { "datatype": "Number", "stt": 90, "field": "amount", "header": "Số lượng", "line": 1646115388640, "config": "" } ], "is_dashboard_item": true, "dashboard_default": true, "chart_width": 12, "chart_height": 8, "status": true, "user_created": "invncur@gmail.com", "user_updated": "anh@goodapp.vn", "date_created": "2022-10-26T04:29:38.653Z", "date_updated": "2025-01-20T06:22:58.386Z", "chart_stt": 1, "code": "assproductowners", "api_code": "", "title": "Danh sách nhà đầu tư hiện tại theo dự án", "form_condition_info": "assproductowners", "handle_data": "", "dashboard_ids": "WALLET", "chart_type": "table", "exfields": {}, "collection_name": "reportinfo", "stt_sorted": 7, "approve_data": [], "name_user_updated": "Admin", "name_user_created": "Van Truong", "ten_kieu_chart": "Bảng" }, { "_id": "677bd47b3e2bba891dd819c9", "columns": [ { "datatype": "DateTime", "field": "date_created", "header": "Ngày giao dịch", "stt": 18, "line": 1670827889063 }, { "datatype": "String", "stt": 20, "field": "username_sender", "header": "Người gửi", "custom_render": "", "line": 1670211544869 }, { "datatype": "String", "stt": 29, "field": "username_receiver", "header": "Người nhận", "custom_render": "", "line": 1670211528172 }, { "datatype": "Number", "stt": 30, "field": "received_amount", "header": "Số lượng", "custom_render": "", "line": 1670208651535 }, { "datatype": "String", "stt": 45, "field": "denom", "header": "Loại tiền/token", "custom_render": "", "line": 1670208632039 }, { "datatype": "String", "stt": 50, "field": "memo", "header": "Nội dung", "custom_render": "", "line": 1670208683134 } ], "is_dashboard_item": true, "dashboard_default": true, "chart_width": 12, "chart_height": 8, "status": true, "user_created": "invncur@gmail.com", "user_updated": "anh@goodapp.vn", "date_created": "2022-12-05T02:51:40.612Z", "date_updated": "2025-01-20T06:22:58.449Z", "chart_stt": 1, "code": "asstransferlog", "api_code": "", "title": "Lịch sử giao dich của người dùng", "form_condition_info": "asstransferlog", "handle_data": "data = data.filter(r=>r.received_amount);\ndata.forEach(r=>{\n r.username_sender = `${r.name_sender||\"\"}(${r.username_sender||r.sender||\"SYSTEM\"})`;\n r.username_receiver = `${r.name_receiver||\"\"}(${r.username_receiver||r.receiver||\"SYSTEM\"})`;\n})\nreturn data;", "dashboard_ids": "WALLET", "chart_type": "table", "exfields": {}, "collection_name": "reportinfo", "stt_sorted": 8, "approve_data": [], "name_user_updated": "Admin", "name_user_created": "Van Truong", "ten_kieu_chart": "Bảng" }, { "_id": "677bd47b3e2bba891dd819cb", "columns": [ { "datatype": "String", "hide": false, "stt": 0, "field": "ma_kho", "header": "Kho", "line": 1721182265374 }, { "datatype": "String", "stt": 1, "field": "ma_vt", "header": "Vật tư", "line": 1640142938411 }, { "datatype": "String", "stt": 2, "field": "ten_vt", "header": "Tên vật tư", "line": 1640142947349 }, { "datatype": "String", "hide": false, "hide_with_condition": "", "is_title": false, "stt": 3, "field": "ma_dvt", "header": "Đơn vị tính", "line": 1732612873028 }, { "datatype": "Number", "stt": 4, "field": "ton_dau", "header": "SL đầu kỳ", "line": 1640143013163 }, { "datatype": "Number", "stt": 5, "field": "du_dau", "header": "Giá trị đầu kỳ", "line": 1640142999071 }, { "datatype": "Number", "stt": 7, "field": "sl_nhap", "header": "SL nhập", "line": 1640143028415 }, { "datatype": "Number", "stt": 8, "field": "tien_nhap", "header": "Tiền nhập", "line": 1640143036834 }, { "datatype": "Number", "stt": 9, "field": "tong_sl", "header": "Tổng số lượng", "line": 1640143048852 }, { "datatype": "Number", "stt": 11, "field": "tong_tien", "header": "Tổng tiền", "line": 1640143086206 }, { "datatype": "Number", "stt": 99, "field": "gia", "header": "Giá trung bình", "line": 1640143097607 } ], "is_dashboard_item": false, "dashboard_default": true, "chart_width": 4, "chart_height": 2, "status": true, "user_created": "invncur@gmail.com", "user_updated": "anh@goodapp.vn", "date_created": "2022-10-19T01:57:46.649Z", "date_updated": "2025-01-20T06:22:58.508Z", "code": "banggiatb", "title": "Bảng giá trung bình", "table_info": "", "form_condition_info": "banggiatb", "cancel_label": "", "search_label": "", "exfields": {}, "collection_name": "reportinfo", "stt_sorted": 9, "approve_data": [], "name_user_updated": "Admin", "name_user_created": "Van Truong" }, { "_id": "677bd47b3e2bba891dd819cd", "columns": [], "is_dashboard_item": false, "dashboard_default": true, "chart_width": 4, "chart_height": 2, "status": true, "user_created": "invncur@gmail.com", "user_updated": "anh@goodapp.vn", "date_created": "2020-07-02T09:32:34.656Z", "date_updated": "2025-01-20T06:22:58.557Z", "code": "bangtinhkhauhao", "title": "Bảng tính khấu hao", "table_info": "bangtinhkhauhao", "form_condition_info": "bangtinhkhauhao", "exfields": {}, "collection_name": "reportinfo", "stt_sorted": 10, "approve_data": [], "name_user_updated": "Admin", "name_user_created": "Van Truong" }, { "_id": "677bd47b3e2bba891dd819cf", "columns": [ { "datatype": "String", "stt": 1, "field": "denom", "header": "Tên token", "line": 1646115367492, "custom_render": "`<b>${row[column.field]}</b>`" }, { "datatype": "Number", "stt": 2, "field": "amount", "header": "Số lượng", "line": 1646115388640, "config": "" } ], "is_dashboard_item": true, "dashboard_default": true, "chart_width": 12, "chart_height": 8, "status": true, "user_created": "invncur@gmail.com", "user_updated": "anh@goodapp.vn", "date_created": "2022-03-01T06:16:51.838Z", "date_updated": "2025-01-20T06:22:58.618Z", "chart_stt": 1, "code": "bc_supply", "api_code": "asssupply", "title": "Token đã phát hành", "form_condition_info": "bc_supply", "handle_data": "", "dashboard_ids": "WALLET", "chart_type": "table", "exfields": {}, "collection_name": "reportinfo", "stt_sorted": 11, "approve_data": [], "name_user_updated": "Admin", "name_user_created": "Van Truong", "ten_kieu_chart": "Bảng" }, { "_id": "677bd47b3e2bba891dd819d1", "columns": [], "is_dashboard_item": false, "dashboard_default": true, "chart_width": 4, "chart_height": 2, "status": true, "user_created": "invncur@gmail.com", "user_updated": "anh@goodapp.vn", "date_created": "2020-07-04T02:45:24.966Z", "date_updated": "2025-01-20T06:22:58.671Z", "code": "bcdkt", "title": "Bảng cân đối kế toán", "table_info": "bcdkt", "form_condition_info": "bcdkt", "exfields": {}, "collection_name": "reportinfo", "stt_sorted": 12, "approve_data": [], "name_user_updated": "Admin", "name_user_created": "Van Truong" }, { "_id": "677bd47b3e2bba891dd819d3", "columns": [ { "datatype": "String", "field": "user_received", "header": "Người dùng", "stt": 1, "line": 1651715350396 }, { "datatype": "String", "field": "user_received_name", "header": "Tên người dùng", "stt": 2, "line": 1651715360336 }, { "datatype": "Date", "field": "ngay_ct", "header": "Ngày phát sinh", "stt": 3, "line": 1651715375303 }, { "datatype": "String", "field": "type_name", "header": "Loại thu nhập", "stt": 4, "line": 1651715391546 }, { "datatype": "Number", "field": "amount", "header": "Giá trị", "stt": 5, "line": 1651715411378 }, { "datatype": "String", "field": "unit", "header": "Đơn vị tính", "stt": 6, "line": 1651715446744 } ], "is_dashboard_item": true, "dashboard_default": true, "chart_width": 6, "chart_height": 5, "status": true, "user_created": "invncur@gmail.com", "user_updated": "anh@goodapp.vn", "date_created": "2022-05-05T01:50:55.822Z", "date_updated": "2025-01-20T06:22:58.731Z", "chart_stt": 2, "code": "bcintroducebonus", "title": "Báo cáo thu nhập từ giới thiệu theo ngày trong tháng", "form_condition_info": "bcintroducebonus", "chart_data_key_x": "ngay_ct", "chart_data_key_ys": "sl,amount", "chart_handle_data": "let rows = utils.groupBy(data,[\"ngay_ct\"],[\"sl\",\"amount\"])\nreturn rows", "chart_type": "line", "dashboard_ids": "WALLET", "handle_data_expression_server": "data.forEach(r=>{\n r.ngay_ct = moment(r.ngay_ct).endOf(\"date\").toDate();\n r.sl =1;\n})\nreturn data;", "exfields": {}, "collection_name": "reportinfo", "stt_sorted": 13, "approve_data": [], "name_user_updated": "Admin", "name_user_created": "Van Truong" }, { "_id": "677bd47b3e2bba891dd819d5", "columns": [ { "datatype": "String", "field": "user_received", "header": "Người dùng", "stt": 1, "line": 1651715350396 }, { "datatype": "String", "field": "user_received_name", "header": "Tên người dùng", "stt": 2, "line": 1651715360336 }, { "datatype": "Number", "field": "thang", "header": "Tháng", "stt": 3, "line": 1651715375303 }, { "datatype": "Number", "field": "nam", "header": "Năm", "stt": 3, "line": 1655171627215 }, { "datatype": "String", "field": "type_name", "header": "Loại thu nhập", "stt": 4, "line": 1651715391546 }, { "datatype": "Number", "field": "amount", "header": "Giá trị", "stt": 5, "line": 1651715411378 }, { "datatype": "String", "field": "unit", "header": "Đơn vị tính", "stt": 6, "line": 1651715446744 } ], "is_dashboard_item": true, "dashboard_default": true, "chart_width": 6, "chart_height": 5, "status": true, "user_created": "invncur@gmail.com", "user_updated": "anh@goodapp.vn", "date_created": "2022-06-14T01:52:49.507Z", "date_updated": "2025-01-20T06:22:58.784Z", "chart_stt": 2, "code": "bcintroducebonusbymonth", "title": "Báo cáo thu nhập từ giới thiệu theo tháng", "form_condition_info": "bcintroducebonusbymonth", "chart_data_key_x": "thang", "chart_data_key_ys": "sl,amount", "chart_handle_data": "let rows = utils.groupBy(data,[\"nam\",\"thang\"],[\"sl\",\"amount\"])\nreturn rows", "chart_type": "line", "dashboard_ids": "WALLET", "handle_data_expression_server": "data.forEach(r=>{\n r.thang = moment(r.ngay_ct).endOf(\"date\").toDate().getMonth()+1;\n r.nam = moment(r.ngay_ct).endOf(\"date\").toDate().getFullYear();\n r.sl =1;\n})\nreturn data;", "api_code": "bcintroducebonus", "exfields": {}, "collection_name": "reportinfo", "stt_sorted": 14, "approve_data": [], "name_user_updated": "Admin", "name_user_created": "Van Truong" }, { "_id": "677bd47b3e2bba891dd819d7", "columns": [ { "datatype": "String", "field": "user_received", "header": "Người dùng", "stt": 1, "line": 1651715350396 }, { "datatype": "String", "field": "user_received_name", "header": "Tên người dùng", "stt": 2, "line": 1651715360336 }, { "datatype": "Number", "field": "quy", "header": "Quý", "stt": 3, "line": 1651715375303 }, { "datatype": "Number", "field": "nam", "header": "Năm", "stt": 3, "line": 1655171627215 }, { "datatype": "String", "field": "type_name", "header": "Loại thu nhập", "stt": 4, "line": 1651715391546 }, { "datatype": "Number", "field": "amount", "header": "Giá trị", "stt": 5, "line": 1651715411378 }, { "datatype": "String", "field": "unit", "header": "Đơn vị tính", "stt": 6, "line": 1651715446744 } ], "is_dashboard_item": true, "dashboard_default": true, "chart_width": 6, "chart_height": 5, "status": true, "user_created": "invncur@gmail.com", "user_updated": "anh@goodapp.vn", "date_created": "2022-06-14T01:58:37.215Z", "date_updated": "2025-01-20T06:22:58.837Z", "chart_stt": 2, "code": "bcintroducebonusbyquarter", "title": "Báo cáo thu nhập từ giới thiệu theo quý", "form_condition_info": "bcintroducebonusbyquarter", "chart_data_key_x": "quy", "chart_data_key_ys": "sl,amount", "chart_handle_data": "let rows = utils.groupBy(data,[\"nam\",\"quy\"],[\"sl\",\"amount\"])\nreturn rows", "chart_type": "area", "dashboard_ids": "WALLET", "handle_data_expression_server": "data.forEach(r=>{\n r.quy = moment(r.ngay_ct).endOf(\"date\").quarter();\n r.nam = moment(r.ngay_ct).endOf(\"date\").toDate().getFullYear();\n r.sl =1;\n})\nreturn data;", "api_code": "bcintroducebonus", "exfields": {}, "collection_name": "reportinfo", "stt_sorted": 15, "approve_data": [], "name_user_updated": "Admin", "name_user_created": "Van Truong" }, { "_id": "677bd47b3e2bba891dd819d9", "columns": [ { "datatype": "String", "hide": false, "stt": 2, "field": "ma_kh", "header": "Mã khách hàng", "line": 1717645039722 }, { "datatype": "String", "hide": false, "stt": 3, "field": "ten_kh", "header": "Tên khách hàng", "line": 1717645049072 }, { "datatype": "String", "hide": false, "stt": 4, "field": "phu_trach", "header": "Phụ trách", "line": 1717646323348 }, { "datatype": "Date", "hide": false, "stt": 20, "field": "ngay_tuong_tac_gan_nhat", "header": "Ngày tương tác gần nhất", "line": 1717645141053 }, { "datatype": "Date", "hide": false, "stt": 29, "field": "ngay_mua_gan_nhat", "header": "Ngày mua gần nhất", "line": 1717645125557 }, { "datatype": "Date", "hide": false, "stt": 30, "field": "ngay_mua_dau_tien", "header": "Ngày mua đầu tiên", "line": 1717645102985 } ], "is_dashboard_item": false, "dashboard_default": true, "chart_width": 4, "chart_height": 2, "status": true, "user_created": "invncur@gmail.com", "user_updated": "anh@goodapp.vn", "date_created": "2024-06-06T03:39:04.283Z", "date_updated": "2025-01-20T06:22:58.893Z", "chart_stt": 0, "code": "bckhtiemnang", "title": "Báo cáo khách hàng tiềm năng", "form_condition_info": "bckhtiemnang", "handle_condition": "", "exfields": {}, "collection_name": "reportinfo", "stt_sorted": 16, "approve_data": [], "name_user_updated": "Admin", "name_user_created": "Van Truong" }, { "_id": "677bd47b3e2bba891dd819db", "columns": [ { "datatype": "Number", "field": "stt", "header": "STT", "line": 1625925896812, "stt": 1, "config": "{width:50}", "hide": true }, { "datatype": "String", "field": "ma_so", "header": "Mã số", "line": 1625925907925, "stt": 2, "config": "", "hide": true }, { "datatype": "String", "field": "title", "header": "Chỉ tiêu", "stt": 3, "line": 1637657465886, "config": "", "style": "{minWidth:200}" }, { "datatype": "Pivot", "stt": 20, "field": "columns", "header": "Column", "line": 1625926546478, "custom_header": "if(!header.title || header.title===header.ma_so) return header.ma_so;\nreturn `<div style='text-align:center'>${header.title }<div style='text-align:center'>(${header.ma_so})</div></div>`;", "custom_render": "if(column.field.data_type==='Number' && !row[column.field.ma_so].value) return \"--\";\nreturn column.field.data_type==='Number'?numeral(row[column.field.ma_so].value).format():row[column.field.ma_so].value" } ], "is_