UNPKG

ttk-app-core

Version:
485 lines (482 loc) 13.6 kB
export function getMeta() { return { name: 'root', component: 'Layout', className: 'ttk-omp-app-list-org', children: [{ name: 'root-content', component: 'Layout', className: 'ttk-omp-app-list-org-backgroundColor', children: [{ name: 'header', component: '::div', className: 'ttk-omp-app-list-org-header', children: [{ name: 'dataSelect1', component: 'DatePicker', className: 'ttk-omp-app-list-org-header-left selectDate', allowClear: true, onChange: '{{$dateSelect}}' }, { name: 'line', component: '::span', className: 'ttk-omp-app-list-org-header-left line', children: '-' }, { name: 'dataSelect1', component: 'DatePicker', allowClear: true, className: 'ttk-omp-app-list-org-header-left selectDate marginRight', onChange: '{{$dateSelect2}}' }, { name: 'select', component: 'Select', className: 'ttk-omp-app-list-org-header-left marginRight selectClear', placeholder: '请选择产品', allowClear: true, onChange: `{{function(v){!!v ? $sf('data.searchValue.appId',data.appName.filter(function(data){return data.id == v})[0].id) : $sf('data.searchValue.appId','')}}}`, children: { name: 'option', component: 'Select.Option', value: "{{data.appName &&data.appName[_rowIndex].id}}", children: '{{data.appName && data.appName[_rowIndex].name}}', _power: 'for in data.appName' } }, { name: 'companyName', component: 'Input', className: 'ttk-omp-app-list-org-header-left input companyInput marginRight', placeholder: "请输入企业名称", value:'{{data.searchValue.orgName}}', onChange: `{{function(e){$sf('data.searchValue.orgName',e.target.value)}}}`, }, { name: 'tel', component: 'Input', className: 'ttk-omp-app-list-org-header-left input marginRight', placeholder: "请输入手机号", value:'{{data.searchValue.mobile}}', onChange: `{{function(e){$sf('data.searchValue.mobile',e.target.value)}}}`, }, { name: 'btnGroup', component: 'Layout', className: 'ttk-omp-app-list-org-header-right', children: [{ name: 'add', component: 'Button', children: '搜索', type: 'primary', className: 'btn', onClick: '{{$search}}' }, { name: 'export', component: 'Button', onClick: '{{$export}}', className: 'exportIconBtn', children: [{ name: 'more', component: 'Icon', fontFamily: 'edficon', type: 'daochu', title: '导出', style: { fontSize: '28px' }, }] }] }] }, { name: 'content', component: 'Layout', className: 'ttk-omp-app-list-org-content', children: [{ name: 'dataGrid', component: 'DataGrid', ellipsis: true, headerHeight: 37, rowHeight: 37, isColumnResizing: false, loading: '{{data.other.loading}}', className: '{{$heightCount()}}', startSequence: '{{(data.pagination.currentPage-1)*data.pagination.pageSize + 1}}', rowsCount: "{{$getListRowsCount()}}", columns: [{ name: 'sequence', component: 'DataGrid.Column', columnKey: 'sequence', width: 70, flexGrow: 1, header: { name: 'header', component: 'DataGrid.Cell', children: '序号' }, cell: { name: 'cell', component: "DataGrid.Cell", tip: true, value: "{{data.list[_rowIndex].sequence}}", _power: '({rowIndex})=>rowIndex', } }, { name: 'appName', component: 'DataGrid.Column', columnKey: 'appName', width: 120, flexGrow: 1, header: { name: 'header', component: 'DataGrid.Cell', children: '产品' }, cell: { name: 'cell', component: "DataGrid.Cell", tip: true, className: 'mk-datagrid-cellContent-left', value: "{{data.list[_rowIndex].appName}}", _power: '({rowIndex})=>rowIndex', } }, { name: 'version', component: 'DataGrid.Column', columnKey: 'version', width: 70, flexGrow: 1, header: { name: 'header', component: 'DataGrid.Cell', children: '版本' }, cell: { name: 'cell', component: "DataGrid.Cell", tip: true, value: "{{data.list[_rowIndex].version}}", _power: '({rowIndex})=>rowIndex', } }, { name: 'orgName', component: 'DataGrid.Column', columnKey: 'orgName', width: 137, flexGrow: 1, header: { name: 'header', component: 'DataGrid.Cell', children: '企业名称' }, cell: { name: 'cell', component: "DataGrid.Cell", tip: true, className: 'mk-datagrid-cellContent-left', value: "{{data.list[_rowIndex].orgName}}", _power: '({rowIndex})=>rowIndex', } }, { name: 'createDate', component: 'DataGrid.Column', columnKey: 'createDate', width: 135, flexGrow: 1, header: { name: 'header', component: 'DataGrid.Cell', children: '创建日期' }, cell: { name: 'cell', component: "DataGrid.Cell", tip: true, className: 'mk-datagrid-cellContent-left', value: "{{data.list[_rowIndex].createDate}}", _power: '({rowIndex})=>rowIndex', } }, { name: 'lastLoginDate', component: 'DataGrid.Column', columnKey: 'lastLoginDate', width: 135, flexGrow: 1, header: { name: 'header', component: 'DataGrid.Cell', children: '最后登录日期' }, cell: { name: 'cell', component: "DataGrid.Cell", tip: true, className: 'mk-datagrid-cellContent-left', value: "{{data.list[_rowIndex].lastLoginDate}}", _power: '({rowIndex})=>rowIndex', } }, { name: 'vatTaxpayerName', component: 'DataGrid.Column', columnKey: 'vatTaxpayerName', width: 120, flexGrow: 1, header: { name: 'header', component: 'DataGrid.Cell', children: '纳税人性质' }, cell: { name: 'cell', component: "DataGrid.Cell", tip: true, className: 'mk-datagrid-cellContent-left', value: "{{data.list[_rowIndex].vatTaxpayerName}}", _power: '({rowIndex})=>rowIndex', } }, { name: 'accountingStandardsName', component: 'DataGrid.Column', columnKey: 'accountingStandardsName', width: 120, flexGrow: 1, header: { name: 'header', component: 'DataGrid.Cell', children: '会计准则' }, cell: { name: 'cell', component: "DataGrid.Cell", tip: true, className: 'mk-datagrid-cellContent-left', value: "{{data.list[_rowIndex].accountingStandardsName}}", _power: '({rowIndex})=>rowIndex', } }, { name: 'userName', component: 'DataGrid.Column', columnKey: 'userName', width: 120, flexGrow: 1, header: { name: 'header', component: 'DataGrid.Cell', children: '用户名称' }, cell: { name: 'cell', component: "DataGrid.Cell", tip: true, className: 'mk-datagrid-cellContent-left', value: "{{data.list[_rowIndex].userName}}", _power: '({rowIndex})=>rowIndex', } }, { name: 'mobile', component: 'DataGrid.Column', columnKey: 'mobile', width: 120, flexGrow: 1, header: { name: 'header', component: 'DataGrid.Cell', children: '手机号' }, cell: { name: 'cell', component: "DataGrid.Cell", tip: true, className: 'mk-datagrid-cellContent-left', value: "{{data.list[_rowIndex].mobile}}", _power: '({rowIndex})=>rowIndex', } }, { name: 'userType', component: 'DataGrid.Column', columnKey: 'userType', width: 120, flexGrow: 1, header: { name: 'header', component: 'DataGrid.Cell', children: '账号类型' }, cell: { name: 'cell', component: "DataGrid.Cell", tip: true, className: 'mk-datagrid-cellContent-left', value: "{{data.list[_rowIndex].userType}}", _power: '({rowIndex})=>rowIndex', } }, { name: 'certificateTotalAmount', component: 'DataGrid.Column', columnKey: 'certificateTotalAmount', width: 120, flexGrow: 1, header: { name: 'header', component: 'DataGrid.Cell', children: '凭证总数' }, cell: { name: 'cell', component: "DataGrid.Cell", tip: true, className: 'mk-datagrid-cellContent-left', value: "{{data.list[_rowIndex].certificateTotalAmount}}", _power: '({rowIndex})=>rowIndex', } }, { name: 'lastMonthNewCertificateAmount', component: 'DataGrid.Column', columnKey: 'lastMonthNewCertificateAmount', width: 120, flexGrow: 1, header: { name: 'header', component: 'DataGrid.Cell', children: '上月增加凭证数' }, cell: { name: 'cell', component: "DataGrid.Cell", tip: true, className: 'mk-datagrid-cellContent-left', value: "{{data.list[_rowIndex].lastMonthNewCertificateAmount}}", _power: '({rowIndex})=>rowIndex', } }, { name: 'currentMonthNewCertificateAmount', component: 'DataGrid.Column', columnKey: 'currentMonthNewCertificateAmount', width: 120, flexGrow: 1, header: { name: 'header', component: 'DataGrid.Cell', children: '本月增加凭证数' }, cell: { name: 'cell', component: "DataGrid.Cell", tip: true, className: 'mk-datagrid-cellContent-left', value: "{{data.list[_rowIndex].currentMonthNewCertificateAmount}}", _power: '({rowIndex})=>rowIndex', } }, { name: 'lastWeekNewCertificateAmount', component: 'DataGrid.Column', columnKey: 'lastWeekNewCertificateAmount', width: 120, flexGrow: 1, header: { name: 'header', component: 'DataGrid.Cell', children: '上周增加凭证数' }, cell: { name: 'cell', component: "DataGrid.Cell", tip: true, className: 'mk-datagrid-cellContent-left', value: "{{data.list[_rowIndex].lastWeekNewCertificateAmount}}", _power: '({rowIndex})=>rowIndex', } }, { name: 'currentWeekNewCertificateAmount', component: 'DataGrid.Column', columnKey: 'currentWeekNewCertificateAmount', width: 120, flexGrow: 1, header: { name: 'header', component: 'DataGrid.Cell', children: '本周增加凭证数' }, cell: { name: 'cell', component: "DataGrid.Cell", tip: true, className: 'mk-datagrid-cellContent-left', value: "{{data.list[_rowIndex].currentWeekNewCertificateAmount}}", _power: '({rowIndex})=>rowIndex', } }, { name: 'assetTotalAmount', component: 'DataGrid.Column', columnKey: 'assetTotalAmount', width: 120, flexGrow: 1, header: { name: 'header', component: 'DataGrid.Cell', children: '资产卡片总数' }, cell: { name: 'cell', component: "DataGrid.Cell", tip: true, className: 'mk-datagrid-cellContent-left', value: "{{data.list[_rowIndex].assetTotalAmount}}", _power: '({rowIndex})=>rowIndex', } }, { name: 'currentMonthNewAssetAmount', component: 'DataGrid.Column', columnKey: 'currentMonthNewAssetAmount', width: 130, flexGrow: 1, header: { name: 'header', component: 'DataGrid.Cell', children: '本月增加资产卡片数' }, cell: { name: 'cell', component: "DataGrid.Cell", tip: true, className: 'mk-datagrid-cellContent-left', value: "{{data.list[_rowIndex].currentMonthNewAssetAmount}}", _power: '({rowIndex})=>rowIndex', } }] }] }] }, { name: 'footer', component: '::div', className: 'ttk-omp-app-list-org-footer', children: [{ name: 'pagination', component: 'Pagination', showSizeChanger: true, pageSize: '{{data.pagination.pageSize}}', current: '{{data.pagination.current}}', total: '{{data.pagination.total}}', onChange: '{{$pageChanged}}', onShowSizeChange: '{{$pageChanged}}', }] }] } } export function getInitState() { return { data: { list: [], searchValue: { endDate: null, //期间终止 beginDate: null, //期间起始 orgName: null, //公司名 mobile: '', //电话 appId: null //产品 id }, pagination: { current: 1, total: 0, pageSize: 50 }, columns: [] } } }