# Class: Field

## Field()

#### new Field()

字段

Source:
  - Field.js, line 11

### Methods

#### (async, static) CalculateSize() → {Number}

计算字段头需要占用的存储空间

Source:
  - Field.js, line 307

##### Returns:

占用空间值

Type
  Number

#### (async, static) createObj() → {Promise.<Field>}

构造一个新的 Field 对象。

Source:
  - Field.js, line 21

##### Returns:

Type
  Promise.<Field>

#### (async, static) deleteExtField() → {Number}

删除扩展字段

Source:
  - Field.js, line 363

##### Returns:

大于0成功，否则失败

Type
  Number

#### (async, static) getEditable() → {Number}

获取编辑使能标志

Source:
  - Field.js, line 199

##### Returns:

使能标志

Type
  Number

#### (async, static) getExtField() → {Promise.<ExtField>}

取扩展字段信息

Source:
  - Field.js, line 320

##### Returns:

扩展字段对象

Type
  Promise.<ExtField>

#### (async, static) getFieldLength() → {Number}

获取字段字节长度

Source:
  - Field.js, line 118

##### Returns:

字节长度 （int类型的Number）

Type
  Number

#### (async, static) getFieldName() → {String}

获取字段名称

Source:
  - Field.js, line 37

##### Returns:

字段名称

Type
  String

#### (async, static) getFieldOffset() → {Number}

获取字段偏移

Source:
  - Field.js, line 91

##### Returns:

偏移值 （int类型的Number）

Type
  Number

#### (async, static) getFieldType() → {Number}

获取字段类型

Source:
  - Field.js, line 64

##### Returns:

字段类型 （int类型的Number）

Type
  Number

#### (async, static) getIsInherited() → {Number}

获取字段是否继承标志

Source:
  - Field.js, line 280

##### Returns:

继承标志值

Type
  Number

#### (async, static) getMskLength() → {Number}

获取字段字符长度

Source:
  - Field.js, line 145

##### Returns:

字段字符长度

Type
  Number

#### (async, static) getPointLength() → {Number}

获取小数位数

Source:
  - Field.js, line 172

##### Returns:

小数位数

Type
  Number

#### (async, static) getPtcPosition() → {Number}

获取字段序号

Source:
  - Field.js, line 253

##### Returns:

字段序号值

Type
  Number

#### (async, static) getPtFlag() → {Number}

获取打印标志

Source:
  - Field.js, line 226

##### Returns:

标志值

Type
  Number

#### (async, static) hasExtField() → {Number}

是否有扩展字段

Source:
  - Field.js, line 350

##### Returns:

非0/0 ：是/否

Type
  Number

#### (async, static) setEditable(value) → {Promise.<void>}

设置编辑使能标志

##### Parameters:

Name | Type | Description
--- | --- | ---
`value` | Number | 使能标志

Source:
  - Field.js, line 213

##### Returns:

Type
  Promise.<void>

#### (async, static) setExtField(fieldEx) → {Promise.<void>}

设置扩展字段信息

##### Parameters:

Name | Type | Description
--- | --- | ---
`fieldEx` |  | 扩展字段对象

Source:
  - Field.js, line 337

##### Returns:

Type
  Promise.<void>

#### (async, static) setFieldLength(length) → {Promise.<void>}

设置字段字节长度

##### Parameters:

Name | Type | Description
--- | --- | ---
`length` | Number | 字节长度（int类型的Number）

Source:
  - Field.js, line 132

##### Returns:

Type
  Promise.<void>

#### (async, static) setFieldName(name) → {Promise.<void>}

设置字段名称

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | String | 字段名称

Source:
  - Field.js, line 51

##### Returns:

Type
  Promise.<void>

#### (async, static) setFieldOffset(offset) → {Promise.<void>}

设置字段偏移

##### Parameters:

Name | Type | Description
--- | --- | ---
`offset` | Number | 偏移值（int类型的Number）

Source:
  - Field.js, line 105

##### Returns:

Type
  Promise.<void>

#### (async, static) setFieldType(type) → {Promise.<void>}

设置字段类型

##### Parameters:

Name | Type | Description
--- | --- | ---
`type` | Number | 字段类型（int类型的Number）

Source:
  - Field.js, line 78

##### Returns:

Type
  Promise.<void>

#### (async, static) setIsInherited(value) → {Promise.<void>}

设置字段是否继承标志

##### Parameters:

Name | Type | Description
--- | --- | ---
`value` | Number | 继承标志值

Source:
  - Field.js, line 294

##### Returns:

Type
  Promise.<void>

#### (async, static) setMskLength(length) → {Promise.<void>}

设置字段字符长度

##### Parameters:

Name | Type | Description
--- | --- | ---
`length` | Number | 字段字符长度

Source:
  - Field.js, line 159

##### Returns:

Type
  Promise.<void>

#### (async, static) setPointLength(length) → {Promise.<void>}

设置小数位数

##### Parameters:

Name | Type | Description
--- | --- | ---
`length` | Number | 小数位数

Source:
  - Field.js, line 186

##### Returns:

Type
  Promise.<void>

#### (async, static) setPtcPosition(position) → {Promise.<void>}

设置字段序号

##### Parameters:

Name | Type | Description
--- | --- | ---
`position` | Number | 字段序号值

Source:
  - Field.js, line 267

##### Returns:

Type
  Promise.<void>

#### (async, static) setPtFlag(flag) → {Promise.<void>}

设置打印标志

##### Parameters:

Name | Type | Description
--- | --- | ---
`flag` | Number | 标志值

Source:
  - Field.js, line 240

##### Returns:

Type
  Promise.<void>