12345678910111213141516171819202122232425262728293031323334353637383940 |
- $(function () {
- "use strict";
- BemsWebApplication.Factory.CheckGroup = {
- getDataSourceWithRelation: function(store, options) {
- return BWA.Factory.getBaseDataSourceWithRelation(
- store,
- options,
- this.getDataSourceOptions(),
- 'FmsFacilityScheduleCheckGroup');
- },
- getDataSourceOptions: function() {
- var select = [ 'SiteId', 'CheckGroupId', 'Name', 'IsUse', 'CmBusinessField/Name' ]
- var alterNames = this.getAlterNames(select, {
- 'CmBusinessField/Name': 'BusinessFieldName'
- });
- return {
- select: select,
- expand: ['CmBusinessField'],
- filter: [
- ['SiteId', '=', BWA.UserInfo.SiteId()],
- 'and',
- ['WorkTypeId', '=', $Code.WorkType.REGULAR_CHECK]
- ],
- extendOptions: {
- alterNames: alterNames
- }
- }
- },
- defaultColumns: [
- { dataField: 'Number', caption: $G( 'number' ), width: '15%', alignment: 'center', allowFiltering: false },
- { dataField: 'BusinessFieldName', caption: $G( 'businessFieldName' ), width: '25%', alignment: 'center' },
- { dataField: 'Name', caption: $G( 'facilityCheckScheduleName' ), width: '45%', alignment: 'center', allowFiltering: false },
- utils.datagrid.columnIsUse( '15%' )
- ]
- }
- $.extend(BWA.Factory.CheckGroup, BWA.DataUtil.pickFunctions(BWA.Factory));
- })
|