liudan 1 неделя назад
Родитель
Сommit
1db724cf70

+ 663 - 0
docs/PC挂号-图文咨询与线上门诊接口文档_20260803_161244_250.md

@@ -0,0 +1,663 @@
+---
+AIGC:
+    Label: "1"
+    ContentProducer: 001191440300708461136T1XGW3
+    ProduceID: 96fe338f7fff1558be1c7f0355f40426_3be035ca8f1311f1a37a525400287e28
+    ReservedCode1: 7Vj0YCcCfT7EkRKzmQfdqnOeAizQvjn8l4i3hjvkbv4gCXTU5OxQpKlk9VM0iI/yKUytHHCDxqp1vNbzJR0WI+Oj2Sbm8IdqDBlSlWHnS8HMgNss7Uu4oxuMVbuVWE6lHgvAY9s/iOr4RTQll2muvL0n5NlILWiOgEL7/CadNzbtXvwqqe/Y7y4IiJc=
+    ContentPropagator: 001191440300708461136T1XGW3
+    PropagateID: 96fe338f7fff1558be1c7f0355f40426_3be035ca8f1311f1a37a525400287e28
+    ReservedCode2: 7Vj0YCcCfT7EkRKzmQfdqnOeAizQvjn8l4i3hjvkbv4gCXTU5OxQpKlk9VM0iI/yKUytHHCDxqp1vNbzJR0WI+Oj2Sbm8IdqDBlSlWHnS8HMgNss7Uu4oxuMVbuVWE6lHgvAY9s/iOr4RTQll2muvL0n5NlILWiOgEL7/CadNzbtXvwqqe/Y7y4IiJc=
+---
+
+# PC挂号 — 图文咨询与线上门诊 前端接口文档
+
+## 概述
+
+在现有 PC 挂号页面新增「图文咨询」和「线上门诊」两种就诊类型。操作流程与线下门诊完全一致:**选科室 → 选医生 → 选时段 → 选患者 → 确认费用 → 挂号提交**。
+
+后端复用现有两步挂号流程(`PrePatRegister` + `CompletionPatRegister`),挂号成功后自动写入咨询记录。以下为前端全流程所需的全部接口。
+
+---
+
+## 接口清单
+
+| 序号 | 步骤 | code | 接口 | 用途 | 状态 | 备注 |
+|------|------|------|------|------|------|------|
+| 26 | 0 | `01040160` | `GetHBResTypeLinkHospId` | 查询医院资源类型(判断是否支持图文/线上门诊) | 就绪 | **新增** |
+| 27 | 1 | `03040005` | `GetRegLocList` | 获取可挂号科室列表 | 就绪(与线下共用) | — |
+| 28 | 2 | `03040002` | `GetSchedulingData` | 获取指定日期的排班号源 | **需改造** | — |
+| 29 | 3 | `03040018` | `GetRegTimedata` | 获取时段及费用预览 | 就绪 | — |
+| 30 | 4 | `03040004` | `GetPatientInfo` | 刷卡/辅号查询患者信息 | 就绪 | — |
+| 31 | 5 | `03040008` | `GetRegistFee` | 计算挂号费用明细 | 就绪(现有接口) | — |
+| 32 | 6 | `03040051` | `ImageConsultRegister` | 提交图文咨询挂号 | 就绪 | **新增** |
+| 33 | 7 | `03040052` | `VideoConsultRegister` | 提交线上门诊挂号 | 就绪 | **新增** |
+| 34 | 8 | `03040016` | `CancleRegist` | 退号 | 就绪(通用,不依赖 ResourceType) | — |
+
+---
+
+## 接口调用时序
+
+```mermaid
+sequenceDiagram
+    participant 前端 as 前端页面
+    participant 后端 as 后端接口
+
+    Note over 前端,后端: 【页面初始化】
+    前端->>后端: 0. GetHBResTypeLinkHospId (hospID)
+    后端-->>前端: 返回资源类型列表 [OP, IMAGE, VIDEO]
+    Note over 前端: 根据返回决定展示<br/>图文/线上入口
+
+    Note over 前端,后端: 【选择就诊类型后】
+    前端->>后端: 1. GetRegLocList
+    后端-->>前端: 返回科室列表
+
+    Note over 前端,后端: 【选择科室后】
+    前端->>后端: 2. GetSchedulingData (resourceType)
+    后端-->>前端: 返回排班号源
+
+    Note over 前端,后端: 【选择医生/日期后】
+    前端->>后端: 3. GetRegTimedata
+    后端-->>前端: 返回时段及费用预览
+
+    Note over 前端,后端: 【刷卡/输号】
+    前端->>后端: 4. GetPatientInfo (patCardNo)
+    后端-->>前端: 返回患者信息
+
+    Note over 前端,后端: 【确认挂号前】
+    前端->>后端: 5. GetRegistFee
+    后端-->>前端: 返回费用明细
+
+    Note over 前端,后端: 【提交挂号】
+    alt 图文咨询
+        前端->>后端: 6. ImageConsultRegister
+    else 线上门诊
+        前端->>后端: 7. VideoConsultRegister
+    end
+    后端-->>前端: 挂号成功
+
+    Note over 前端,后端: 【退号(独立分支)】
+    前端->>后端: 8. CancleRegist
+    后端-->>前端: 退号成功
+```
+
+**说明**:
+- 步骤 0-5 为三种就诊类型(线下门诊/图文咨询/线上门诊)的公共流程
+- 步骤 2 `GetSchedulingData` 需要传入 `resourceType` 区分排班类型
+- 步骤 6/7 分别对应图文咨询和线上门诊的挂号提交,互斥
+- 步骤 8 退号为独立操作,不依赖 `resourceType`
+
+---
+
+## 0. GetHBResTypeLinkHospId — 查询医院资源类型
+
+**接口码**:`01040160`
+
+根据医院 ID 查询该院已配置的资源类型(线下门诊 `OP`、图文咨询 `IMAGE`、线上门诊 `VIDEO`),前端可用于判断当前医院是否支持图文咨询/线上门诊入口。
+
+**请求参数**:
+
+```json
+{
+  "params": [{
+    "hospID": "91",
+    "active": "Y"
+  }],
+  "pagination": [{
+    "pageSize": 10,
+    "currentPage": 1
+  }],
+  "session": [{
+    "userID": "946",
+    "locID": "448",
+    "groupID": "307",
+    "hospID": "91",
+    "hospCode": "H23"
+  }]
+}
+```
+
+| 字段 | 层级 | 类型 | 必填 | 说明 |
+|------|------|------|------|------|
+| `hospID` | `params[0]` | String | 是 | 医院 ID |
+| `active` | `params[0]` | String | 否 | `"Y"` 仅返回生效,`"N"` 仅返回失效,不传则全返回 |
+| `pageSize` | `pagination[0]` | Integer | 否 | 每页条数 |
+| `currentPage` | `pagination[0]` | Integer | 否 | 当前页码 |
+
+**返回结果**:
+
+```json
+{
+  "errorCode": "0",
+  "errorMessage": "",
+  "result": {
+    "TotalCount": 3,
+    "data": [
+      {
+        "id": 1,
+        "code": "OP",
+        "descripts": "线下门诊",
+        "enDescripts": "Outpatient",
+        "startDate": "2024-01-01",
+        "status": "生效"
+      },
+      {
+        "id": 2,
+        "code": "IMAGE",
+        "descripts": "图文咨询",
+        "enDescripts": "Image Consultation",
+        "startDate": "2024-01-01",
+        "status": "生效"
+      },
+      {
+        "id": 3,
+        "code": "VIDEO",
+        "descripts": "线上门诊",
+        "enDescripts": "Video Consultation",
+        "startDate": "2024-01-01",
+        "status": "生效"
+      }
+    ]
+  }
+}
+```
+
+| 字段 | 层级 | 类型 | 说明 |
+|------|------|------|------|
+| `errorCode` | — | String | `"0"` 成功 |
+| `TotalCount` | `result` | Integer | 符合条件总记录数 |
+| `id` | `result.data[]` | Integer | 资源类型 ID |
+| `code` | `result.data[]` | String | 资源类型编码:`OP` / `IMAGE` / `VIDEO` |
+| `descripts` | `result.data[]` | String | 中文描述 |
+| `enDescripts` | `result.data[]` | String | 英文描述 |
+| `startDate` | `result.data[]` | String | 生效日期 |
+| `status` | `result.data[]` | String | `"生效"` / `"失效"` |
+
+**前端使用说明**:挂号页初始化时调用此接口,根据返回的 `code` 列表决定是否展示「图文咨询」「线上门诊」入口;`OP` 始终对应线下门诊。
+
+---
+
+## 1. GetRegLocList — 获取挂号科室列表
+
+**接口码**:`03040005`
+
+沿用线下门诊的科室列表,无需区分 ResourceType。同一科室可同时配置线下门诊、图文咨询、线上门诊三种排班。
+
+**请求参数**:
+
+```json
+{
+  "params": [{
+    "locID": "",
+    "detailFlag": "1",
+    "docFlag": "1"
+  }],
+  "session": [{
+    "userID": "946",
+    "locID": "448",
+    "groupID": "307",
+    "hospID": "67",
+    "hospCode": "H23"
+  }]
+}
+```
+
+| 字段 | 类型 | 必填 | 说明 |
+|------|------|------|------|
+| `params[0].locID` | String | 否 | 指定科室 ID,不传则返回全部有权限的科室 |
+| `params[0].detailFlag` | String | 否 | `"1"` 返回详细信息 |
+| `params[0].docFlag` | String | 否 | `"1"` 返回科室下医生信息 |
+| `session[0]` | Object | 是 | 登录信息 |
+
+**返回结果**:
+
+```json
+{
+  "errorCode": "0",
+  "errorMessage": "",
+  "result": {
+    "TotalCount": 5,
+    "Data": [
+      {
+        "id": "448",
+        "descripts": "内科门诊",
+        "locType": "O",
+        "doctorList": [
+          { "id": "946", "name": "张三", "title": "主任医师" }
+        ]
+      }
+    ]
+  }
+}
+```
+
+---
+
+## 2. GetSchedulingData — 获取排班号源
+
+**接口码**:03040002
+
+与线下门诊排班查询的核心区别:需传入 `resourceType` 参数,区分 OP / IMAGE / VIDEO。
+
+**请求参数**:
+
+```json
+{
+  "params": [{
+    "date": "2026-08-03",
+    "locID": "448",
+    "docID": "946",
+    "resourceType": "IMAGE",
+    "timeRangeID": "1"
+  }],
+  "session": [{
+    "userID": "946",
+    "locID": "448",
+    "groupID": "307",
+    "hospID": "67",
+    "hospCode": "H23"
+  }]
+}
+```
+
+| 字段 | 类型 | 必填 | 说明 |
+|------|------|------|------|
+| `params[0].date` | String | 是 | 排班日期,格式 `yyyy-MM-dd` |
+| `params[0].locID` | String | 否 | 科室 ID |
+| `params[0].docID` | String | 否 | 医生 ID |
+| `params[0].resourceType` | String | 否 | 资源类型。`"OP"`(线下) / `"IMAGE"`(图文) / `"VIDEO"`(线上)。不传默认 `"OP"` |
+| `params[0].timeRangeID` | String | 否 | 时段 ID,不传取当前时段 |
+| `session[0]` | Object | 是 | 登录信息 |
+
+**返回结果**:
+
+```json
+{
+  "errorCode": "0",
+  "errorMessage": "",
+  "result": {
+    "totalCount": 1,
+    "data": [
+      {
+        "resDetailID": "448||68971||1",
+        "locID": "448",
+        "locDesc": "内科门诊",
+        "docID": "946",
+        "docName": "张三",
+        "title": "主任医师",
+        "resDate": "2026-08-03",
+        "timeRangeList": [
+          {
+            "id": "448||68971||1||1",
+            "timeRangeDesc": "上午",
+            "timeDetail": "08:00-12:00",
+            "totalNum": 30,
+            "regNum": 5,
+            "usableNum": 25,
+            "workStatusCode": "N"
+          }
+        ]
+      }
+    ]
+  }
+}
+```
+
+| 字段 | 说明 |
+|------|------|
+| `resDetailID` | 排班明细 ID,挂号提交时需要 |
+| `timeRangeList[].id` | 时段 ID(即 `timeRangeID`),挂号提交和费用计算时需要 |
+| `timeRangeList[].totalNum` | 总号源数 |
+| `timeRangeList[].regNum` | 已挂号数 |
+| `timeRangeList[].usableNum` | 可用号源数 |
+| `timeRangeList[].workStatusCode` | `"N"`=正常,`"F"`=约满 |
+
+---
+
+## 3. GetRegTimedata — 获取时段详情及费用预览
+
+**接口码**:03040018
+
+入参无需改造,传入排班查询返回的 `resDetailID` 即可。
+
+**请求参数**:
+
+```json
+{
+  "params": [{
+    "patID": "36214",
+    "resDetailID": "448||68971||1"
+  }],
+  "session": [{
+    "userID": "946",
+    "locID": "448",
+    "groupID": "307",
+    "hospID": "67"
+  }]
+}
+```
+
+| 字段 | 类型 | 必填 | 说明 |
+|------|------|------|------|
+| `params[0].patID` | String | 否 | 患者 ID,用于展示患者简要信息 |
+| `params[0].resDetailID` | String | 是 | 排班明细 ID |
+| `params[0].chooseRegTitleID` | String | 否 | 多号源职称 ID(按职称区分的号源配置) |
+| `session[0]` | Object | 是 | 登录信息 |
+
+**返回结果**:
+
+```json
+{
+  "errorCode": "0",
+  "errorMessage": "",
+  "data": {
+    "patInfo": {
+      "patNo": "P2023001",
+      "patName": "李四",
+      "patSexDesc": "男",
+      "patBirthDate": "1990-05-20",
+      "patCredNo": "3201**********1234",
+      "patMobile": "138****5678",
+      "patAge": "36"
+    },
+    "resDetail": [
+      {
+        "id": "448||68971||1||1",
+        "locDescripts": "内科门诊",
+        "docName": "张三",
+        "bookDate": "2026-08-03",
+        "sumAmt": "25.00",
+        "price": "25.00",
+        "resDetailID": "448||68971||1",
+        "timeRange": "上午",
+        "timeDetail": "08:00-12:00",
+        "regResources": "5/30",
+        "workStatusCode": "N",
+        "usableNum": 25
+      }
+    ]
+  }
+}
+```
+
+---
+
+## 4. GetPatientInfo — 查询患者信息
+
+**接口码**:`03040004`
+
+通用接口,三种就诊类型共用。
+
+**请求参数**:
+
+```json
+{
+  "params": [{
+    "cardTypeID": "1",
+    "cardNo": "0000123456",
+    "number": ""
+  }],
+  "session": [{
+    "userID": "946",
+    "locID": "448",
+    "groupID": "307",
+    "hospID": "67"
+  }]
+}
+```
+
+| 字段 | 类型 | 必填 | 说明 |
+|------|------|------|------|
+| `params[0].cardTypeID` | String | 否 | 卡类型 ID,与 `cardNo` 配合使用 |
+| `params[0].cardNo` | String | 否 | 卡号(最高优先级) |
+| `params[0].number` | String | 否 | 登记号 / 身份证号 / 医保号,`cardNo` 为空时使用 |
+| `session[0]` | Object | 是 | 登录信息 |
+
+**返回结果**:
+
+```json
+{
+  "errorCode": "0",
+  "errorMessage": "",
+  "data": {
+    "patID": "36214",
+    "patNo": "P2023001",
+    "patName": "李四",
+    "patSexDesc": "男",
+    "patCredNo": "3201**********1234",
+    "patBirthDate": "1990-05-20",
+    "patAge": "36",
+    "patMobile": "138****5678",
+    "patTypeDesc": "自费",
+    "patTypeID": "1",
+    "accountBalance": "150.00",
+    "admReason": [
+      { "id": "123", "descripts": "自费", "defaultFlag": "Y" }
+    ],
+    "cardFlag": "1",
+    "cardID": "5001",
+    "patCardNo": "0000123456",
+    "visitedFlag": "N"
+  }
+}
+```
+
+| 主要字段 | 说明 |
+|------|------|
+| `patID` | 患者 ID,挂号提交时使用 |
+| `admReason` | 费别列表,`defaultFlag="Y"` 的是默认费别 |
+| `cardFlag` | `"1"` 表示存在有效卡 |
+
+---
+
+## 5. GetRegistFee — 计算挂号费用
+
+**接口码**:03040008
+
+通用接口,三种就诊类型共用。
+
+**请求参数**:
+
+```json
+{
+  "params": [{
+    "patID": "36214",
+    "resDetailID": "448||68971||1",
+    "admReasonID": "123",
+    "greenFlag": "N",
+    "visitFlag": "N",
+    "bookFlag": "N"
+  }],
+  "session": [{
+    "userID": "946",
+    "locID": "448",
+    "groupID": "307",
+    "hospID": "67"
+  }]
+}
+```
+
+| 字段 | 类型 | 必填 | 说明 |
+|------|------|------|------|
+| `params[0].patID` | String | 是 | 患者 ID |
+| `params[0].resDetailID` | String | 是 | 排班明细 ID |
+| `params[0].admReasonID` | String | 是 | 费别 ID,取自 `GetPatientInfo.admReason[].id` |
+| `params[0].greenFlag` | String | 否 | 绿色号 `"Y"`,图文/线上通常为 `"N"` |
+| `params[0].visitFlag` | String | 否 | 复诊号 `"Y"` |
+| `params[0].bookFlag` | String | 否 | 病历本 `"Y"` |
+| `session[0]` | Object | 是 | 登录信息 |
+
+**返回结果**:
+
+```json
+{
+  "errorCode": "0",
+  "errorMessage": "",
+  "data": {
+    "price": "25.00",
+    "discount": "0.00",
+    "accountBalance": "150.00",
+    "insuSum": "0.00",
+    "insuBalance": "0.00",
+    "shareFee": "25.00",
+    "paywCASHID": "1",
+    "paywACCID": "2",
+    "accountFee": "0.00"
+  }
+}
+```
+
+| 字段 | 说明 |
+|------|------|
+| `price` | 总费用(挂号费+诊查费) |
+| `discount` | 优惠金额 |
+| `shareFee` | 应收金额(自付部分) |
+| `paywCASHID` | 现金支付方式 ID |
+| `paywACCID` | 院内账户支付方式 ID |
+
+---
+
+## 6. ImageConsultRegister — 提交图文咨询挂号
+
+**接口码**:03040051
+
+新增接口。挂号成功后自动写入 `BS_ConsultRecord` 图文咨询记录。
+
+**请求参数**:
+
+```json
+{
+  "params": [{
+    "patID": "36214",
+    "resDetailID": "448||68971||1",
+    "timeRangeID": "448||68971||1||1",
+    "admReasonID": "123",
+    "paywStr": "[{\"payWay\":\"1\",\"amt\":\"25.00\"}]"
+  }],
+  "session": [{
+    "userID": "946",
+    "locID": "448",
+    "groupID": "307",
+    "hospID": "67",
+    "hospCode": "H23"
+  }]
+}
+```
+
+| 字段 | 类型 | 必填 | 说明 |
+|------|------|------|------|
+| `params[0].patID` | String | **是** | 患者 ID,来自 `GetPatientInfo.data.patID` |
+| `params[0].resDetailID` | String | **是** | 排班明细 ID,来自 `GetSchedulingData.result.data[].resDetailID` |
+| `params[0].timeRangeID` | String | **是** | 时段 ID,来自 `GetSchedulingData.result.data[].timeRangeList[].id` |
+| `params[0].admReasonID` | String | 否 | 费别 ID,不传则自动取患者默认费别 |
+| `params[0].paywStr` | String | 否 | 支付方式,格式 `[{"payWay":"支付方式ID","amt":"金额"}]` |
+| `session[0]` | Object | 是 | 登录信息 |
+
+**返回结果**:
+
+```json
+{
+  "errorCode": "0",
+  "errorMessage": "挂号成功",
+  "result": {
+    "admID": "123456"
+  }
+}
+```
+
+| 字段 | 说明 |
+|------|------|
+| `errorCode` | `"0"` 成功,非 `"0"` 失败 |
+| `result.admID` | 就诊 ID,用于退号 |
+
+**常见错误**:
+
+| errorCode | errorMessage | 原因 |
+|-----------|-------------|------|
+| `-1` | 请选择患者! | patID 为空 |
+| `-1` | 请选择排班信息! | resDetailID 为空 |
+| 其他 | 号源已满 / 排班不存在…… | 见系统错误提示 |
+
+---
+
+## 7. VideoConsultRegister — 提交线上门诊挂号
+
+**接口码**:03040052
+
+新增接口。挂号成功后自动写入 `BS_ConsultRecord` + `BS_VideoConsultRecord` 线上门诊咨询记录。
+
+**入参 / 出参与 `ImageConsultRegister` 完全一致**,参见上节。
+
+---
+
+## 8. CancleRegist — 退号
+
+**接口码**:无
+
+通用接口,不依赖 ResourceType,三种就诊类型共用。
+
+**请求参数**:
+
+```json
+{
+  "params": [{
+    "admID": "123456",
+    "pcFlag": "Y"
+  }],
+  "session": [{
+    "userID": "946",
+    "locID": "448",
+    "groupID": "307",
+    "hospID": "67"
+  }]
+}
+```
+
+| 字段 | 类型 | 必填 | 说明 |
+|------|------|------|------|
+| `params[0].admID` | String | **是** | 就诊 ID,挂号成功后返回 |
+| `params[0].pcFlag` | String | 否 | PC 端退号传 `"Y"`,控制结算校验 |
+| `session[0]` | Object | 是 | 登录信息 |
+
+**返回结果**:
+
+```json
+{
+  "errorCode": "0",
+  "errorMessage": "",
+  "result": {
+    "payMentID": "退费交易记录ID"
+  }
+}
+```
+
+**限制条件**(以下任一满足则退号失败):
+- 已就诊(队列状态为 A/F)
+- 已有诊断记录
+- 存在非挂号费类的医嘱
+- PC 端且挂号费已结算
+
+---
+
+## 附录:三种就诊类型对比
+
+| 维度 | 线下门诊 | 图文咨询 | 线上门诊 |
+|------|----------|----------|----------|
+| 排班 ResourceType | `OP` | `IMAGE` | `VIDEO` |
+| 挂号提交接口 | `DoctorRegister`(03040050) | `ImageConsultRegister`(未分配) | `VideoConsultRegister`(未分配) |
+| 咨询记录 | 无 | `BS_ConsultRecord` | `BS_ConsultRecord` + `BS_VideoConsultRecord` |
+| 排班查询 resourceType | `"OP"` | `"IMAGE"` | `"VIDEO"` |
+| 科室列表 | 共用 | 共用 | 共用 |
+| 患者查询 | 共用 | 共用 | 共用 |
+| 费用计算 | 共用 | 共用 | 共用 |
+| 退号 | 共用 | 共用 | 共用 |
+
+## 附录:后端改造状态
+
+| 接口 | 状态 | 说明 |
+|------|------|------|
+| `ImageConsultRegister` | 已新增 | `src.Doctor.Interface` + `src.Doctor.reg` |
+| `VideoConsultRegister` | 已新增 | 同上 |
+| `GetHBResTypeLinkHospId` | 已新增 | `src\DocCure\Interface.cls` + `src\DocCure\HBResTypeLinkHosp.cls`,前置查询医院资源类型 |
+| `GetSchedulingData` | 已改造 | `src\Doctor\reg.cls` 第 144 行,`resourceType` 参数默认 `"OP"`,支持传入 `"IMAGE"` / `"VIDEO"` |
+| 其余接口 | 无需改造 | 公共逻辑,不依赖 ResourceType |
+*(内容由AI生成,仅供参考)*

+ 286 - 38
src/pages/opadmReg/RegistrationIncludesMedicalInsurance.jsx

@@ -5,15 +5,16 @@
  * */
 import React from 'react';
 import { Card, Table, Input, Tabs, Select, Row, Col, Checkbox, Badge, DatePicker, Button, Icon, message, Modal, Tooltip, Radio, Spin } from 'antd';
-import ShowInvoiceNumModal from './component/ShowInvoiceNumModal';
-import ShowBackNumModal from './component/ShowBackNumModal';
-import CancelOrderModal from './component/CancelOrderModal';
-import ShowToOrderModal from './component/ShowToOrderModal';
-import NewShowRegPayModal from './component/NewShowRegPayModal';
-import ShowGetNumModal from './component/ShowGetNumModal';
-import CorrelationModal from './component/CorrelationModal';
+import ShowInvoiceNumModal from './component/ShowInvoiceNumModal.jsx';
+import ShowBackNumModal from './component/ShowBackNumModal.jsx';
+import CancelOrderModal from './component/CancelOrderModal.jsx';
+import ShowToOrderModal from './component/ShowToOrderModal.jsx';
+import NewShowRegPayModal from './component/NewShowRegPayModal.jsx';
+import ShowGetNumModal from './component/ShowGetNumModal.jsx';
+import CorrelationModal from './component/CorrelationModal.jsx';
 import fetchJsonp from 'fetch-jsonp';
-import ShowMedicalInsuranceModal from './component/ShowMedicalInsuranceModal';
+import QRCode from 'qrcode.react';
+import ShowMedicalInsuranceModal from './component/ShowMedicalInsuranceModal.jsx';
 import ColumnAuthoritysModel from 'pages/columnAuthority/ColumnAuthoritysModel';
 import ShowFaceRecognitionModal from 'pages/workstation/component/ShowFaceRecognitionModal';
 import FaceRecognitionManual from 'pages/common/FaceRecognitionManual';
@@ -25,7 +26,7 @@ import { dayFormat } from 'tools/index';
 import moment from 'moment';
 import store from 'store';
 import './style/index.less';
-import ShowLoadModal from '../../components/showLoadingModal';
+import ShowLoadModal from '../../components/showLoadingModal/index.jsx';
 
 const { TextArea } = Input;
 const Search = Input.Search;
@@ -54,7 +55,9 @@ class RegistrationIncludesMedicalInsurance extends React.Component {
       birthDayDate: '',
       checked: false,
       ipConfig: ipConfig,
-      activeKey: '1',
+      activeKey: 'OP',
+      resTypeTabs: [], // 资源类型tabs(来自01040160接口)
+      resourceType: 'OP', // 当前选中的资源类型: OP/IMAGE/VIDEO
       patientMsg: {
         defaultTitle: '挂号默认置灰病人信息'
       },
@@ -69,6 +72,7 @@ class RegistrationIncludesMedicalInsurance extends React.Component {
       magneticCardFee: '',
       magneticCardFeeFlag: 'N', // 是否展示磁卡费勾选框
       insuRegFlag: '', // 医保登记标识
+      qrccodeURL: '', // 患者二维码URL
     }
     this.keyDownElements = this.keyDownElement.bind(this)
     this.keyDownFast = this.keyDownFastMsg.bind(this)
@@ -84,6 +88,7 @@ class RegistrationIncludesMedicalInsurance extends React.Component {
   }
 
   componentDidMount() {
+    this.loadResTypeTabs(); // 获取资源类型(线下门诊/图文咨询/线上门诊)
     this.loadTimeSolt(); // 获取时间段
     this.initData();
     this.loadTimeRange();
@@ -228,6 +233,7 @@ class RegistrationIncludesMedicalInsurance extends React.Component {
             note: res.data.note,
             visitedFlag: res.data.visitedFlag,
             adminUser: '', // 报备人员
+            qrccodeURL: res.data.qrccodeURL || '',
           }, () => {
             this.currentMeter()
           })
@@ -303,6 +309,34 @@ class RegistrationIncludesMedicalInsurance extends React.Component {
     });
   }
 
+  // 获取资源类型tabs(线下门诊/图文咨询/线上门诊)
+  loadResTypeTabs() {
+    var params = {
+      params: [{
+        hospID: this.state.userData.hospID,
+        active: 'Y',
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '01040160',
+      data: params,
+      success: function (res) {
+        if (res.errorCode == '0') {
+          let tabs = res.result && res.result.data ? res.result.data : [];
+          if (tabs.length === 0) {
+            tabs = [{ code: 'OP', descripts: '线下门诊' }];
+          }
+          let firstType = tabs[0].code || 'OP';
+          this.setState({
+            resTypeTabs: tabs,
+            resourceType: firstType,
+            activeKey: firstType,
+          });
+        }
+      }
+    });
+  }
+
   // 获取挂号排班记录
   loadSchedulingMsg() {
     var admReasonFlags = '';
@@ -328,6 +362,7 @@ class RegistrationIncludesMedicalInsurance extends React.Component {
         docID: this.state.depDoctorId, // doctorId -->docID
         locID: this.state.locId, // locId--> locID
         admReasonID: this.state.admReasonId ? this.state.admReasonId : (admReasonFlags ? admId : defAdmId),
+        resourceType: this.state.resourceType, // 资源类型: OP/IMAGE/VIDEO
       }]
     }
     $http.post('urlDeault', this, {
@@ -921,9 +956,12 @@ class RegistrationIncludesMedicalInsurance extends React.Component {
           bookMethodID: 'Win', // 写死
           admReasonID: this.state.admReasonId ? this.state.admReasonId : (admReasonFlags ? admId : defAdmId),
           chooseRegTitleID: this.state.chooseRegTitleID,
-          patTypeCode: patTypeCode
+          patTypeCode: patTypeCode,
+          resourceType: this.state.resourceType, // 资源类型
         }]
       }
+      // 存储当前排班信息(用于IMAGE/VIDEO提交时使用)
+      this.setState({ registrMsg: { resDetailID: data.resDetailID, timeRangeID: data.timeRangeID } })
 
       // 预挂号 
       let res = await INSUYBUtil.GoTOHISHttp(params, '03040048'); // 调用his接口
@@ -970,19 +1008,25 @@ class RegistrationIncludesMedicalInsurance extends React.Component {
             return
           }
           this.setState({
-            maypayData: paydateobj.chargeAmtInfo[0].paywArr || [],
-            accPurPoseList: paydateobj.accPurPoseList || '',
-            moneyData: paydateobj.chargeAmtInfo[0], // 金额对象
-            payableAmt: paydateobj.chargeAmtInfo[0].otherPayAmt, // 金额
-            cashInCashVal: '0.00',
-            zeroPay: '0.00',
-            otherPayMoney: '0.00',
             loading: false,
-            isNewShowRegistrModal: true,
+          }, () => {
+            Modal.confirm({
+              title: '确认挂号',
+              content: '确认挂号吗?',
+              onOk: () => {
+                this.updatePayModal('');
+              },
+            });
           });
         } else {
           //挂号不收费
-          this.CompletionPatRegister(''); // 挂号确认
+          if (this.state.resourceType === 'IMAGE') {
+            this.imageConsultRegister('');
+          } else if (this.state.resourceType === 'VIDEO') {
+            this.videoConsultRegister('');
+          } else {
+            this.CompletionPatRegister(''); // OP挂号确认
+          }
         }
       })
     } catch (error) {
@@ -1119,6 +1163,190 @@ class RegistrationIncludesMedicalInsurance extends React.Component {
     return true;
   }
 
+  // 图文咨询挂号(单步提交)
+  imageConsultRegister = async (paywIDinfo) => {
+    let { patientMsg, registrMsg } = this.state;
+    let patID = patientMsg?.patID || '';
+    var admReasonFlags = '';
+    var admId = '';
+    var defAdmId = '';
+    if (this.state.admReason) {
+      var admReason = this.state.admReason;
+      for (var i = 0; i < admReason.length; i++) {
+        if (admReason[i].defaultFlag == 'Y') {
+          admReasonFlags = true;
+          admId = admReason[i].id;
+          break;
+        } else {
+          admReasonFlags = false;
+          defAdmId = admReason[0].id;
+        }
+      }
+    }
+    var params = {
+      params: [{
+        patID: patID,
+        resDetailID: registrMsg?.resDetailID || '',
+        timeRangeID: registrMsg?.timeRangeID || '',
+        admReasonID: this.state.admReasonId ? this.state.admReasonId : (admReasonFlags ? admId : defAdmId),
+        paywStr: paywIDinfo,
+      }]
+    }
+    // 图文咨询挂号
+    let res = await INSUYBUtil.GoTOHISHttp(params, '03040051');
+    if (res.errorCode != '0') {
+      this.RollBACKOPCharge();
+      this.setState({ loading: false });
+      message.warn(res.errorMessage);
+      return false;
+    }
+    message.success('挂号成功!');
+    this.hideModal('isNewShowRegistrModal');
+    this.loadSchedulingMsg();
+    this.loadRegistrNumData();
+    this.loadConfigFee();
+    if (!Util.isEmpty(res.print)) {
+      $loadTemplate('Registration', res.print);
+    }
+    if (!Util.isEmpty(res.invPrint && res.invPrint.data) && !Util.isEmpty(res.invPrint.template)) {
+      $loadTemplate(res.invPrint.template, res.invPrint.data);
+    }
+    this.clearInput();
+    this.input.focus();
+    this.setState({
+      loading: false,
+      chooseDocObj: {},
+      chooseRegTitleID: '',
+      patientData: [],
+      locId: '',
+      returnFlag: 'N',
+      cancleRegFlag: 'N',
+      cancleAPPFlag: 'N',
+      regPrintFlag: 'N',
+      APPPrintFlag: 'N',
+      count: '',
+      confirmLoading: false,
+      admID: '',
+      regOperationDateID: '',
+      chargeRecodeId: '',
+      accmID: '',
+      paywIDinfo: '',
+      resSeqNoId: '',
+      maypayData: [],
+      moneyData: '',
+      greenFlag: false,
+      swipeCardFlag: false,
+      checked: false,
+      visitFlag: false,
+    });
+    if ((this.state.insuFlag != 'Y') && (this.state.OPInsuType == 'Y') && this.state.insuRegFlag === 'Y') {
+      let data = {
+        params: [{
+          admID: res?.admID || '',
+          patID,
+        }],
+        businessType: "M2",
+        operationType: 'RegisterOP',
+        hospID: this.state.userData.hospID,
+        session: [(this.state.userData)]
+      }
+      await React.$dllPost('Register', data, 'INSUNew/PTMedInsuInterface.dll', 'PTMedInsuInterface.InsuBusiness');
+    }
+    return true;
+  }
+
+  // 线上门诊挂号(单步提交)
+  videoConsultRegister = async (paywIDinfo) => {
+    let { patientMsg, registrMsg } = this.state;
+    let patID = patientMsg?.patID || '';
+    var admReasonFlags = '';
+    var admId = '';
+    var defAdmId = '';
+    if (this.state.admReason) {
+      var admReason = this.state.admReason;
+      for (var i = 0; i < admReason.length; i++) {
+        if (admReason[i].defaultFlag == 'Y') {
+          admReasonFlags = true;
+          admId = admReason[i].id;
+          break;
+        } else {
+          admReasonFlags = false;
+          defAdmId = admReason[0].id;
+        }
+      }
+    }
+    var params = {
+      params: [{
+        patID: patID,
+        resDetailID: registrMsg?.resDetailID || '',
+        timeRangeID: registrMsg?.timeRangeID || '',
+        admReasonID: this.state.admReasonId ? this.state.admReasonId : (admReasonFlags ? admId : defAdmId),
+        paywStr: paywIDinfo,
+      }]
+    }
+    // 线上门诊挂号
+    let res = await INSUYBUtil.GoTOHISHttp(params, '03040052');
+    if (res.errorCode != '0') {
+      this.RollBACKOPCharge();
+      this.setState({ loading: false });
+      message.warn(res.errorMessage);
+      return false;
+    }
+    message.success('挂号成功!');
+    this.hideModal('isNewShowRegistrModal');
+    this.loadSchedulingMsg();
+    this.loadRegistrNumData();
+    this.loadConfigFee();
+    if (!Util.isEmpty(res.print)) {
+      $loadTemplate('Registration', res.print);
+    }
+    if (!Util.isEmpty(res.invPrint && res.invPrint.data) && !Util.isEmpty(res.invPrint.template)) {
+      $loadTemplate(res.invPrint.template, res.invPrint.data);
+    }
+    this.clearInput();
+    this.input.focus();
+    this.setState({
+      loading: false,
+      chooseDocObj: {},
+      chooseRegTitleID: '',
+      patientData: [],
+      locId: '',
+      returnFlag: 'N',
+      cancleRegFlag: 'N',
+      cancleAPPFlag: 'N',
+      regPrintFlag: 'N',
+      APPPrintFlag: 'N',
+      count: '',
+      confirmLoading: false,
+      admID: '',
+      regOperationDateID: '',
+      chargeRecodeId: '',
+      accmID: '',
+      paywIDinfo: '',
+      resSeqNoId: '',
+      maypayData: [],
+      moneyData: '',
+      greenFlag: false,
+      swipeCardFlag: false,
+      checked: false,
+      visitFlag: false,
+    });
+    if ((this.state.insuFlag != 'Y') && (this.state.OPInsuType == 'Y') && this.state.insuRegFlag === 'Y') {
+      let data = {
+        params: [{
+          admID: res?.admID || '',
+          patID,
+        }],
+        businessType: "M2",
+        operationType: 'RegisterOP',
+        hospID: this.state.userData.hospID,
+        session: [(this.state.userData)]
+      }
+      await React.$dllPost('Register', data, 'INSUNew/PTMedInsuInterface.dll', 'PTMedInsuInterface.InsuBusiness');
+    }
+    return true;
+  }
+
   // 设置发票号
   showInvoiceNumModal() {
     this.setState({
@@ -1602,6 +1830,7 @@ class RegistrationIncludesMedicalInsurance extends React.Component {
               OPInsuType: !Util.isEmpty(res.data.admReason) ? res.data.admReason[0].OPInsuType : '',
               note: res.data.note,
               visitedFlag: res.data.visitedFlag,
+              qrccodeURL: res.data.qrccodeURL || '',
             }, () => {
               this.currentMeter()
               this.loadRegisterMsg(res.data); // 查询患者挂号/预约记录
@@ -1713,7 +1942,8 @@ class RegistrationIncludesMedicalInsurance extends React.Component {
       paywIDinfo: '',
       resSeqNoId: '',
       maypayData: [],
-      moneyData: ''
+      moneyData: '',
+      qrccodeURL: '',
     }, () => {
       this.input.focus()
     })
@@ -1758,7 +1988,7 @@ class RegistrationIncludesMedicalInsurance extends React.Component {
     var date = new Date(); // 点击预约,日期-1
     this.setState({
       showNewDate: true,
-      activeKey: '1',
+      activeKey: this.state.resourceType,
       date: moment(new Date()).add(-1, 'days').format(),
       orderStatus: false,
       showDate: true
@@ -2497,7 +2727,7 @@ class RegistrationIncludesMedicalInsurance extends React.Component {
       return
     }
 
-    if (this.state.orderStatus) { // 预约挂号
+    if (this.state.orderStatus && this.state.resourceType === 'OP') { // OP预约挂号
       this.handleToOrder(data);
     } else {
       if (!Util.isEmpty(this.state.registerInfo) && this.state.registerInfo.noChargeFlag == 'N') {
@@ -2626,7 +2856,7 @@ class RegistrationIncludesMedicalInsurance extends React.Component {
             //activeKey: '2',
             patientData: [],
             orderStatus: false,
-            activeKey: '1'
+            activeKey: 'OP'
           }, () => {
             this.loadSchedulingMsg();
             this.loadConfigFee();
@@ -3195,8 +3425,14 @@ class RegistrationIncludesMedicalInsurance extends React.Component {
   }
 
   updatePayModal = async (paywIDinfo) => {
-    // 结算确认
-    this.CompletionPatRegister(paywIDinfo)
+    // 结算确认,根据资源类型调用不同接口
+    if (this.state.resourceType === 'IMAGE') {
+      this.imageConsultRegister(paywIDinfo);
+    } else if (this.state.resourceType === 'VIDEO') {
+      this.videoConsultRegister(paywIDinfo);
+    } else {
+      this.CompletionPatRegister(paywIDinfo);
+    }
   }
 
   onRef = ref => {
@@ -3261,18 +3497,22 @@ class RegistrationIncludesMedicalInsurance extends React.Component {
   }
 
   handleTablsChange = key => {
-    var date = new Date(); // 点击预约,日期+1
+    var date = new Date();
+    // OP: 当天挂号(不显示日期选择),IMAGE/VIDEO: 显示日期选择
+    var isOP = key === 'OP';
     this.setState({
-      showDate: key === '1' ? false : true,
+      showDate: !isOP,
       activeKey: key,
-      date: key === '1' ? date : moment(new Date()).add(1, 'days').format(),
-      orderStatus: key === '1' ? false : true
+      resourceType: key,
+      date: date,
+      orderStatus: false,
+      showNewDate: false,
     }, () => {
       this.loadSchedulingMsg()
       this.loadRegisterMsg()
       this.loadRegistrNumData()
-      if (this.state.activeKey === '2') {
-        this.bookName.current.focus();
+      if (!isOP) {
+        this.bookName.current && this.bookName.current.focus();
       }
     })
   }
@@ -4145,6 +4385,11 @@ class RegistrationIncludesMedicalInsurance extends React.Component {
                   <Checkbox checked={this.state.visitedFlag}
                     onChange={this.handleVisitFlagCheckbox.bind(this, 'visitedFlag')} disabled={(Util.isEmpty(this.state.patientMsg) || this.state.visitedFlag === "Y") ? true : false}>复诊</Checkbox>
                   <Button onClick={this.clearInput.bind(this)} size="small" type="danger" style={{ marginLeft: 5 }}>清空(ctrl+z)</Button>
+                  {this.state.qrccodeURL && (
+                    <div style={{ marginTop: 10, textAlign: 'center' }}>
+                      <QRCode value={this.state.qrccodeURL} size={120} />
+                    </div>
+                  )}
                 </div>
               </div>
             </div>
@@ -4155,12 +4400,15 @@ class RegistrationIncludesMedicalInsurance extends React.Component {
                 <div className="divider-vertical-line"></div>
                 <div className="nrts-content" style={{ width: 'calc(100% - 195px)', overflow: 'hidden' }}>
                   <Tabs activeKey={activeKey} onChange={this.handleTablsChange}>
-                    <TabPane tab="当日挂号" key="1">
-                      {registerDom}
-                    </TabPane>
-                    <TabPane tab="预约挂号" key="2">
-                      {registerDom}
-                    </TabPane>
+                    {this.state.resTypeTabs.length > 0 ? this.state.resTypeTabs.map(item => (
+                      <TabPane tab={item.descripts} key={item.code}>
+                        {registerDom}
+                      </TabPane>
+                    )) : (
+                      <TabPane tab="线下门诊" key="OP">
+                        {registerDom}
+                      </TabPane>
+                    )}
                   </Tabs>
                 </div>
                 <div className="divider-vertical-line-right"></div>

+ 4301 - 0
src/pages/opadmReg/RegistrationIncludesMedicalInsurance_old.jsx

@@ -0,0 +1,4301 @@
+/*
+ * Create:      hyg
+ * CreateDate:  2023/02/14
+ * Describe:   挂号 - 含医保
+ * */
+import React from 'react';
+import { Card, Table, Input, Tabs, Select, Row, Col, Checkbox, Badge, DatePicker, Button, Icon, message, Modal, Tooltip, Radio, Spin } from 'antd';
+import ShowInvoiceNumModal from './component/ShowInvoiceNumModal.jsx';
+import ShowBackNumModal from './component/ShowBackNumModal.jsx';
+import CancelOrderModal from './component/CancelOrderModal.jsx';
+import ShowToOrderModal from './component/ShowToOrderModal.jsx';
+import NewShowRegPayModal from './component/NewShowRegPayModal.jsx';
+import ShowGetNumModal from './component/ShowGetNumModal.jsx';
+import CorrelationModal from './component/CorrelationModal.jsx';
+import fetchJsonp from 'fetch-jsonp';
+import ShowMedicalInsuranceModal from './component/ShowMedicalInsuranceModal.jsx';
+import ColumnAuthoritysModel from 'pages/columnAuthority/ColumnAuthoritysModel';
+import ShowFaceRecognitionModal from 'pages/workstation/component/ShowFaceRecognitionModal';
+import FaceRecognitionManual from 'pages/common/FaceRecognitionManual';
+import { $loadTemplate } from '../lodop/Common/Print.js';
+import ReadCard from 'components/readcard/ReadCard';
+import { $http } from 'containers/config/https';
+import { Util, INSUYBUtil } from 'tools/index';
+import { dayFormat } from 'tools/index';
+import moment from 'moment';
+import store from 'store';
+import './style/index.less';
+import ShowLoadModal from '../../components/showLoadingModal/index.jsx';
+
+const { TextArea } = Input;
+const Search = Input.Search;
+const Option = Select.Option;
+const confirm = Modal.confirm;
+const noData = require('./image/no-data1.png');
+const { TabPane } = Tabs;
+
+class RegistrationIncludesMedicalInsurance extends React.Component {
+  constructor(props) {
+    super(props)
+    var userData = JSON.parse(sessionStorage.getItem('userData'))
+    var ipConfig = React.$getSessionData('ipConfig');
+    var date = new Date();
+    this.state = {
+      defaultImg: '',
+      dataSource: [],
+      schedulData: [],
+      patientData: [],
+      timeRange: [],
+      date: date,
+      userData: userData,
+      defaultId: '1',
+      typeCode: '01',
+      confirmLoading: false,
+      birthDayDate: '',
+      checked: false,
+      ipConfig: ipConfig,
+      activeKey: '1',
+      patientMsg: {
+        defaultTitle: '挂号默认置灰病人信息'
+      },
+      isShowResModel: false,
+      resModelSelect: [],
+      chooseRegTitleID: '',
+      chooseDocObj: {},
+      insuFlag: 'N', // 医保结算标志
+      departMentData: [],
+      loading: false,
+      totalWidth: 0,
+      magneticCardFee: '',
+      magneticCardFeeFlag: 'N', // 是否展示磁卡费勾选框
+      insuRegFlag: '', // 医保登记标识
+    }
+    this.keyDownElements = this.keyDownElement.bind(this)
+    this.keyDownFast = this.keyDownFastMsg.bind(this)
+    this.textInput = React.createRef();
+    this.textSelect = React.createRef();
+    this.textCard = React.createRef();
+    this.bookName = React.createRef();
+    this.bookSex = React.createRef();
+    this.bookCardType = React.createRef();
+    this.bookCard = React.createRef();
+    this.bookPhone = React.createRef();
+    this.bookAddress = React.createRef();
+  }
+
+  componentDidMount() {
+    this.loadTimeSolt(); // 获取时间段
+    this.initData();
+    this.loadTimeRange();
+    this.loadCardType(); // 获取卡类型
+    this.loadDepartMent(); // 挂号科室信息
+    this.loadRegistrNumData(); // 号源消耗进度
+    this.loadConfigFee(); // 配置收费
+    this.loadUnawares(); // 获取接待人数据
+    // this.textInput.current.focus()
+    if (!Util.isEmpty(this.getQueryString('cardNum')) || !Util.isEmpty(this.getQueryString('posId'))) {
+      this.searchBuildCardMsg()
+    }
+    // 计算当前组件的宽度做分辨率适配
+    this.clientWidth = document.body.clientWidth;
+    setTimeout(() => {
+      this.input && this.input.focus()
+    }, 1000);
+    document.addEventListener('keydown', this.keyDownFast)
+    this.handleAdress();
+  }
+
+  componentWillUnmount() {
+    // 组件销毁,移除键盘监听事件
+    document.removeEventListener('keydown', this.keyDownElements);
+    document.removeEventListener('keydown', this.keyDownFast);
+    this.setState = (state, callback) => { return; };
+  }
+
+  keyDownFastMsg(e) {
+    if (e && e.keyCode) {
+      let currKey = 0;
+      e = e || event || window.event;
+      currKey = e.keyCode || e.which || e.charCode;
+      // 快捷键F1
+      if (currKey == 90 && (e.ctrlKey)) {
+        e.preventDefault();
+        this.clearInput()
+      }
+    }
+  }
+
+  getQueryString(name) {
+    var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
+    var r = this.props.location ? this.props.location.search.substr(1).match(reg) : null;
+    if (r != null) {
+      return decodeURIComponent(r[2]);
+    }
+    return null;
+  }
+
+  initData() {
+    let data = {
+      params: [{
+        compontName: 'RegistrationPage',
+        type: 'C',
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '01040073',
+      data: data,
+      success: (res) => {
+        if (+res.errorCode === 0) {
+          var columns = res.result.C;
+          var dynColumns = []
+          for (var i = 0; i < columns.length; i++) {
+            dynColumns.push({
+              title: columns[i].title,
+              dataIndex: columns[i].dataIndex,
+              width: parseInt(columns[i].width),
+              align: columns[i].align || 'center'
+            })
+          }
+          this.setState({
+            column: dynColumns,
+            totalWidth: res?.totalWidth || 1000
+          })
+          this.props.hanlderThis.setState({
+            reload: false,
+          })
+        }
+      }
+    })
+  }
+
+  // 获取时间段
+  loadTimeSolt() {
+    var params = {
+      params: []
+    }
+    $http.post('urlDeault', this, {
+      code: '03040001',
+      data: params,
+      success: function (res) {
+        if (res.errorCode == '0') {
+          var timeSolt = res.data;
+          for (var i = 0; i < timeSolt.length; i++) {
+            this.setState({
+              timeSolt: timeSolt[i].id
+            }, () => {
+              this.loadSchedulingMsg(); // 获取挂号排班记录
+            })
+          }
+        }
+      }
+    });
+  }
+
+  // 获取建卡后跳转过来信息
+  searchBuildCardMsg() {
+    var params = {
+      params: [{
+        number: this.getQueryString('posId'),
+        cardTypeID: this.getQueryString('cardTypeId'),
+        cardNo: '', // this.getQueryString('cardNum')
+        present: 'Y'
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '03040004',
+      data: params,
+      success: function (res) {
+        this.loadRegisterMsg(res.data); // 查询患者挂号/预约记录
+        if (res.errorCode == '0') {
+          this.textInput.current.focus()
+          message.success('患者信息查询成功!')
+          this.setState({
+            patientMsg: res.data,
+            admReason: res.data.admReason,
+            mobilephone: '',
+            credNo: this.getQueryString('posId'),
+            paitId: this.getQueryString('posId'),
+            readCardNo: this.getQueryString('posId'),
+            count: '',
+            returnFlag: 'N',
+            priorFalag: 'N',
+            regFlag: 'N',
+            cancleRegFlag: 'N',
+            cancleAPPFlag: 'N',
+            regPrintFlag: 'N',
+            APPPrintFlag: 'N',
+            OPInsuType: !Util.isEmpty(res.data.admReason) ? res.data.admReason[0].OPInsuType : '',
+            note: res.data.note,
+            visitedFlag: res.data.visitedFlag,
+            adminUser: '', // 报备人员
+          }, () => {
+            this.currentMeter()
+          })
+        }
+      }
+    });
+  }
+
+  // 获取接待人
+  loadUnawares() {
+    var params = {
+      params: [{}]
+    }
+    $http.post('urlDeault', this, {
+      code: '03040036',
+      data: params,
+      success: function (res) {
+        if (res.errorCode == '0') {
+          this.setState({
+            unawaresList: res.result,
+          })
+        }
+      }
+    });
+  }
+
+  // 获取卡类型
+  loadCardType() {
+    var params = {
+      params: [{
+        cardTypeFlag: '1', // 卡类型
+        sexFlag: '1', // 性别
+        credTypeFlag: '1', // 证件类型
+        socialStatusFlag: '1', // 身份标签
+        patTypeFlag: '1', // 病人类型
+        payMethodFlag: '1', // 支付方式
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '03030005',
+      data: params,
+      success: function (res) {
+        var cardStatus = ''
+        var replaceZero = ''
+        var cardLength = 0
+        var readMode = ''
+        if (res.errorCode == '0') {
+          if (res.cardType && res.cardType.length > 0) {
+            var cardType = res.cardType;
+            for (var i = 0; i < cardType.length; i++) {
+              if (cardType[i].defaultFlag == 'Y') {
+                cardStatus = cardType[i].id,
+                  replaceZero = cardType[i].replenishZero
+                cardLength = cardType[i].cardLength
+                readMode = cardType[i].readMode
+              }
+            }
+          }
+          this.setState({
+            cardTypeData: res.cardType,
+            credTypeData: res.credType,
+            patTypeData: res.patType,
+            sexData: res.sex,
+            socialStatusData: res.socialStatus,
+            cardStatus: cardStatus,
+            replenishZero: replaceZero,
+            cardLength: cardLength,
+            readMode: readMode,
+            magneticCardFeeFlag: res?.magneticCardFeeflag || 'N', // 磁卡费标志
+          })
+        }
+      }
+    });
+  }
+
+  // 获取挂号排班记录
+  loadSchedulingMsg() {
+    var admReasonFlags = '';
+    var admId = '';
+    var defAdmId = '';
+    if (this.state.admReason) {
+      var admReason = this.state.admReason;
+      for (var i = 0; i < admReason.length; i++) {
+        if (admReason[i].defaultFlag == 'Y') {
+          admReasonFlags = true;
+          admId = admReason[i].id;
+          break;
+        } else {
+          admReasonFlags = false;
+          defAdmId = admReason[0].id;
+        }
+      }
+    }
+    var params = {
+      params: [{
+        date: moment(this.state.date).format(dayFormat),
+        timeRangeID: this.state.timeRangeId ? this.state.timeRangeId : this.state.timeSolt, // timeRangeId -->timeRangeID
+        docID: this.state.depDoctorId, // doctorId -->docID
+        locID: this.state.locId, // locId--> locID
+        admReasonID: this.state.admReasonId ? this.state.admReasonId : (admReasonFlags ? admId : defAdmId),
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '03040002',
+      data: params,
+      success: function (res) {
+        if (res.errorCode == '0') {
+          let schedulData = res.result && res.result.data && res.result.data.length > 0 ? res.result.data : [];
+          let windowHost = window.location && window.location.origin ? window.location.origin : (window.location && window.location.protocol ? (window.location.protocol + '//' + window.location.hostname) : '');
+          for (var i = 0; i < schedulData.length; i++) {
+            let url = schedulData[i].image
+            schedulData[i].image = url.indexOf('http') !== -1 ? url : windowHost + url;
+          }
+          this.setState({
+            schedulData,
+          })
+        }
+      }
+    });
+  }
+
+  // 查询患者预约/挂号记录
+  loadRegisterMsg = (data) => {
+    var admReasonFlags = '';
+    var admId = '';
+    var defAdmId = '';
+    if (this.state.admReason) {
+      var admReason = this.state.admReason;
+      for (var i = 0; i < admReason.length; i++) {
+        if (admReason[i].defaultFlag == 'Y') {
+          admReasonFlags = true;
+          admId = admReason[i].id;
+          break;
+        } else {
+          admReasonFlags = false;
+          defAdmId = admReason[0].id;
+        }
+      }
+    }
+    if (this.state.paitId || (data && data.patID) || (this.state.patientMsg && this.state.patientMsg.patID)) {
+      var params = {
+        params: [{
+          patIDCardNo: this.state.paitId,
+          date: moment(this.state.date).format(dayFormat),
+          patID: data ? data.patID : (this.state.patientMsg) ? this.state.patientMsg.patID : '',//patientDr --> patID
+          admReasonID: this.state.admReasonId ? this.state.admReasonId : (admReasonFlags ? admId : defAdmId),
+        }]
+      }
+      $http.post('urlDeault', this, {
+        code: '03040003',
+        data: params,
+        success: function (res) {
+          if (res.errorCode === '0') {
+            this.setState({
+              patientData: res.data
+            })
+          }
+        }
+      });
+    }
+  }
+
+
+  // 查询时段服务
+  loadTimeRange() {
+    var params = {
+      params: [{
+        hospID: this.state.userData.hospID
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '01040010',
+      data: params,
+      success: function (res) {
+        if (res.errorCode === '0') {
+          this.setState({
+            timeRange: res.timeRange
+          })
+        }
+      }
+    });
+  }
+
+  loadDepartMent() {
+    var params = {
+      params: [{
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '03040005',
+      data: params,
+      success: function (res) {
+        if (res.errorCode === '0') {
+          this.setState({
+            departMentData: res.result.Data
+          })
+        }
+      }
+    });
+  }
+
+  // 号源消耗进度
+  loadRegistrNumData() {
+    var date = new Date();
+    var params = {
+      params: [{
+        date: this.state.date ? moment(this.state.date).format(dayFormat) : moment(date).format(dayFormat)
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '03040012',
+      data: params,
+      success: function (res) {
+        if (res.errorCode === '0') {
+          this.setState({
+            registrNumData: res.data
+          })
+        }
+      }
+    });
+  }
+
+  // 配置收费
+  loadConfigFee() {
+    var params = {
+      params: [{
+        logonHospID: this.state.userData.hospID,
+        logonGroupID: this.state.userData.groupID,
+        logonUserID: this.state.userData.userID,
+        invTypeCode: 'R',
+        menuType: this.state.userData.defaultMenuType
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '05210001',
+      data: params,
+      success: function (res) {
+        if (res.errorCode === '0') {
+          this.state.groupConfig = res.groupConfig
+          this.state.sysConfig = res.sysConfig
+          this.state.currentInvNoInfo = res.currentInvNoInfo
+          this.state.registerInfo = res.registerInfo
+          this.state.newPayWay = res.groupConfig.HBOPConfigPaymode[0].Reg
+          let insuFlag = res.insuFlag;
+          let insuRegFlag = res.insuRegFlag; // 医保登记标识
+          this.setState({ insuFlag, insuRegFlag }, () => {
+            var invNo = '';
+            var currentInvNo = ''
+            // 对发票号进行截取
+            if (this.state.currentInvNoInfo) {
+              var currentInvNoInfo = this.state.currentInvNoInfo;
+              invNo = currentInvNoInfo.substring(currentInvNoInfo.indexOf('^') + 1);
+              currentInvNo = invNo.substring(invNo.indexOf('^') + 1)
+            }
+            if (this.state.groupConfig && this.state.groupConfig.IfInvNo == 'Y' && Util.isEmpty(currentInvNo)
+              && this.state.registerInfo && this.state.registerInfo.noChargeFlag !== 'Y') {
+              message.error('当前无发票号,无法进行挂号')
+            }
+          })
+        }
+      }
+    });
+  }
+
+  // 获取挂号医生信息
+  loadDoctorId() {
+    var params = {
+      params: [{
+        locID: this.state.locId
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '03040006',
+      data: params,
+      success: function (res) {
+        if (res.errorCode === '0') {
+          this.setState({
+            depDoctorData: res.depDoctor
+          })
+        }
+      }
+    });
+  }
+
+  // 鼠标移入card,添加挂号按钮
+  addRegistrBtn(index, e) {
+    this.setState({
+      setBabkground: true,
+      // mouseElement: true,
+      rowIds: index
+    })
+  }
+
+  addFloatElement(code, item) {
+    // var floatOption = []
+    var params = {
+      params: [{
+        patID: this.state.patientMsg ? (this.state.patientMsg.patID) : '',
+        resDetailID: item.resDetailID
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '03040018',
+      data: params,
+      success: function (res) {
+        if (res.errorCode === '0') {
+          this.setState({
+            orderData: res.data,
+            floatStatus: true,
+            floatData: item
+          }, () => {
+            this.loadElementDome()
+          })
+        }
+      }
+    });
+    // return floatOption
+  }
+
+  loadElementDome() {
+    var floatOption = []
+    if (!Util.isEmpty(this.state.orderData)) {
+      var resDetail = this.state.orderData.resDetail;
+      resDetail && resDetail.map((item, index) => {
+        floatOption.push(
+          <div className='order-table-body-float' onDoubleClick={this.handleFloatToOrder.bind(this, '', item.id)}>
+            <div><div className={item.workStatusCode == 'S' ? 'stop-order-num-new' :
+              (item.workStatusCode == 'F' ? 'full-order-num-new' : '')}></div>
+              <div className={item.workStatusCode == 'N' ? 'order-table-disable-new' : 'order-table-title-new'}>
+                {item.timeDetail}</div></div>
+            <div style={{ background: 'white', height: 28 }}>{item.workStatusCode == 'S' ? <span style={{ color: 'red' }}>停诊</span> :
+              (item.workStatusCode == 'F' ? <span style={{ color: '#bbbbbb' }}>约满</span> :
+                <span style={{ color: 'rgba(102,102,102,1)' }}>{item.regResources}</span>)
+            }</div>
+          </div>
+        )
+      })
+    }
+    return floatOption
+  }
+
+  handleFloatToOrder(name, code, e) {
+    e.stopPropagation(); // 冒泡阻止多次调用点击事件
+    // if (Util.isEmpty(this.state.patientMsg)) {
+    //   message.error('必填信息不能为空!')
+    //   return
+    // }
+    this.setState({
+      bookStatus: true,
+      isShowToOrderModal: true,
+      floatStatus: false,
+      bookCode: code
+    }, () => {
+      this.handleToOrder(this.state.floatData)
+    })
+  }
+
+  // enter键去挂号
+  handleRegistrBtn(index, data, e) {
+    this.setState({
+      floatStatus: false
+    })
+    if (e.keyCode == '13') {
+    } else if (e.keyCode == '37') { // 左方向键
+      if (parseInt(this.state.rowIds) - 1 < 0) {
+        this.setState({ // 当向左移动已无数据时,默认第一个数据
+          rowIds: '0'
+        })
+      } else {
+        this.setState({
+          rowIds: parseInt(this.state.rowIds) - 1
+        })
+      }
+    } else if (e.keyCode == '38') { // 上方向键
+      if (this.clientWidth < 1500) {
+        if (parseInt(this.state.rowIds) - 6 < 0) {
+          this.setState({ // 当上移已无数据时,默认当前数据
+            rowIds: index
+          })
+        } else {
+          this.setState({
+            rowIds: parseInt(this.state.rowIds) - 6
+          })
+        }
+      } else {
+        if (parseInt(this.state.rowIds) - 7 < 0) {
+          this.setState({ // 当上移已无数据时,默认当前数据
+            rowIds: index
+          })
+        } else {
+          this.setState({
+            rowIds: parseInt(this.state.rowIds) - 7
+          })
+        }
+      }
+    } else if (e.keyCode == '39') { // 右方向键schedulData
+      if (parseInt(this.state.rowIds) + 1 == this.state.schedulData.length) {
+        this.setState({ // 当右移大于当前数据的长度时,默认当前数据
+          rowIds: index
+        })
+      } else {
+        this.setState({
+          rowIds: parseInt(this.state.rowIds) + 1
+        })
+      }
+    } else if (e.keyCode == '40') { // 下方向键
+      if (this.clientWidth < 1500) {
+        if (parseInt(this.state.rowIds) + 6 >= this.state.schedulData.length) {
+          this.setState({ // 当下移大于当前数据的长度时,默认当前数据
+            rowIds: index
+          })
+        } else {
+          this.setState({
+            rowIds: parseInt(this.state.rowIds) + 6
+          })
+        }
+      } else {
+        if (parseInt(this.state.rowIds) + 7 >= this.state.schedulData.length) {
+          this.setState({ // 当下移大于当前数据的长度时,默认当前数据
+            rowIds: index
+          })
+        } else {
+          this.setState({
+            rowIds: parseInt(this.state.rowIds) + 7
+          })
+        }
+      }
+    }
+  }
+
+  // 鼠标离开,移除挂号按钮
+  removeRegistrBtn() {
+    this.setState({
+      mouseElement: false,
+      floatStatus: true,
+      setBabkground: false, // 鼠标移出,title回复
+    })
+  }
+
+  // 双击,添加背景颜色
+  addBackground(index, e) {
+    this.setState({
+      setBabkground: true,
+      mouseElement: true,
+      rowIds: index
+    })
+  }
+
+  // 键盘F1-F12按钮事件
+  keyDownElement(e) {
+    // var rthis = this;
+    if (e.keyCode == '113' && this.state.regFlag == 'Y') {
+      this.showGetNumModal(); // F2,取号
+    } else if (e.keyCode == '117' && this.state.cancleRegFlag == 'Y') {
+      this.showBackNumModal(); // F6,退号
+    } else if (e.keyCode == '121' && this.state.cancleAPPFlag == 'Y') {
+      this.showCannelOrderModal(); // F10,取消预约
+    } else if (e.keyCode == '119') { // 重打凭条
+      this.printEntrySlip()
+    } else if (e.keyCode == '120') { // 重打发票
+      this.printInvoice()
+    } else if (e.keyCode == '27') {
+      this.setState({
+        focusStatus: true
+      }, () => {
+        this.textSelect.current.focus()
+      })
+    }
+  }
+
+  // 隐藏弹出框
+  hideModal(name) {
+    this.setState({
+      [name]: false, // 将所有参数置为false
+      bookStatus: false,
+      confirmLoading: false,
+      qrCode: undefined,
+      icCardNum: undefined,
+      otherPayWayId: undefined
+    });
+    if (name == 'isShowReadCardModal' || name == 'isShowGetNumModal') {
+      //将选中对象置空
+      this.setState({
+        chooseDocObj: {},
+        chooseRegTitleID: ''
+      })
+    }
+  }
+
+  /**
+   * @ByYQL: 结算费别内根据insuAlertBeforeAdm决定是否需要事前提醒,是否展示险种类型
+   * Create 2021-12-17
+   */
+  handleSelectChange(name, e, code) {
+    if (name == 'admReasonId') {
+      this.setState({
+        [name]: e,
+        OPInsuType: code.props.opinsutype,
+        insuAlertBeforeAdm: code.props.insuAlertBeforeAdm, // 是否展示险种类型
+      }, () => {
+        this.loadSchedulingMsg();
+        this.loadRegisterMsg(); // 查询患者挂号/预约记录
+        if (code.props.insuAlertBeforeAdm == 'Y') {
+          this.getInsuAlertListInfo(); // 获取险种类型赋值
+        }
+      })
+    } else {
+      this.setState({
+        [name]: e,
+      }, () => {
+        this.loadSchedulingMsg();
+        this.loadRegisterMsg(); // 查询患者挂号/预约记录
+      })
+    }
+  }
+
+  /**
+   * @ByYQL: 获取险种类型
+   * Create 2021-12-17
+   */
+  getInsuAlertListInfo() {
+    var params = {
+      params: [{ 'admReasonCode': 'INSUJNSYB' }]
+    }
+    $http.post('urlDeault', this, {
+      code: 'pr02900',
+      data: params,
+      success: function (res) {
+        console.log('pr02900反参', res);
+        if (res.errorCode === '0') {
+          this.setState({
+            insuranceData: res.result.Data
+          })
+        }
+      }
+    });
+  }
+
+  changeDepartMent(e) {
+    var id = '';
+    if (e) {
+      id = e.substring(e.indexOf('^') + 1)
+    }
+    this.setState({
+      locId: id,
+      rowIds: '0',
+      setBabkground: true,
+      mouseElement: true,
+      focusStatus: false
+    }, () => {
+      this.loadSchedulingMsg();
+      this.loadDoctorId();
+    })
+    document.addEventListener('keydown', this.keyDownElements)
+  }
+
+  changeDepDoctor(e) {
+    var id = '';
+    if (e) {
+      id = e.substring(e.indexOf('*') + 1);
+    }
+    this.setState({
+      depDoctorId: id,
+      rowIds: '0',
+      setBabkground: true,
+      mouseElement: true
+
+    }, () => {
+      this.loadSchedulingMsg();
+    })
+  }
+
+  // 去挂号弹框
+  showRegistrModal = async (data) => {
+    try {
+      if (parseInt(data.registedNum) >= parseInt(data.registNum)) {
+        message.error('挂号已满,请选择其他科室或者坐诊医生');
+        return
+      }
+      this.setState({ loading: true });
+      const { magneticCardFeeFlag } = this.state;
+      var admReasonFlags = '';
+      var admId = '';
+      var defAdmId = '';
+      if (this.state.admReason) {
+        var admReason = this.state.admReason;
+        for (var i = 0; i < admReason.length; i++) {
+          if (admReason[i].defaultFlag == 'Y') {
+            admReasonFlags = true;
+            admId = admReason[i].id;
+            break;
+          } else {
+            admReasonFlags = false;
+            defAdmId = admReason[0].id;
+          }
+        }
+      }
+      if (this.state.admReason && this.state.admReason.length > 0) {
+        if (this.state.patientMsg) {
+        } else {
+          message.error('必填信息不能为空')
+        }
+      } else {
+        message.error('结账费别不能为空')
+      }
+      var patTypeCode = ""
+      if ((this.state.insuFlag == 'Y') && (this.state.OPInsuType == 'Y') && (this.state.userData.hospCode == 'H12')) {
+        //北京医保要读取病人类型
+        let { userData } = window.sessionStorage;
+        //查询医保病人信息 
+        try {
+          var params = {
+            params: [{
+              hospID: this.state.userData.hospID,
+              patID: this.state.patientMsg.patID, // patientDr -->patID
+            }]
+          }
+          let res = await INSUYBUtil.GoTOHISHttp(params, '05100421'); // 查询医保病人信息
+          patTypeCode = res?.result?.psnType||""
+          if (patTypeCode == "") {
+            let insupaydata = {
+              params: [{
+                "userID": this.state.userData.userID || '',
+                "locID": this.state.userData.locID,
+                "hospID": this.state.userData.hospID, //医院id
+                "groupID": this.state.userData.groupID,  //角色id
+                "ip": React.$getSessionData('ipConfig')?.ipv4 || ''
+              }],
+              "businessType": "Z1",
+              "hospID": this.state.userData.hospID, //医院id
+              session: [(JSON.parse(userData))]
+            }
+            let patientInfo = await INSUYBUtil.insuNew("GetPatientInfo", insupaydata);
+            let patientInfoRet = JSON.parse(patientInfo);
+            if (+patientInfoRet.errorCode === 0) {
+              if (patientInfoRet.result) {
+                var insuPatInfo = patientInfoRet.result
+                if (insuPatInfo.patientInfo) {
+                  if (insuPatInfo.patientInfo.root) {
+                    if (insuPatInfo.patientInfo.root.output) {
+                      if (insuPatInfo.patientInfo.root.output.net) {
+                        if (insuPatInfo.patientInfo.root.output.net.persontype) {
+                          patTypeCode = insuPatInfo.patientInfo.root.output.net.persontype   //医保病人类型
+                        }
+                      }
+                    }
+                  }
+                }
+              } else {
+                message.warn('未获取到反参')
+                this.setState({ loading: false });
+                return
+              }
+            } else {
+              
+              message.warn(patientInfoRet.errorMessage);
+              this.setState({ loading: false });
+              return
+            }
+          }
+          if (patTypeCode == "") {
+            
+            message.warn('医保病人类型获取失败,不能挂号')
+            this.setState({ loading: false });
+                return
+          }
+          
+        } catch (error) {
+          message.warning("异常:" + error)
+          console.error(error);
+          this.setState({ loading: false });
+          return
+        }
+      }
+      var params = {
+        params: [{
+          resDetailID: data.resDetailID,
+          userID: this.state.userData.userID,
+          groupID: this.state.userData.groupID,
+          cardID: this.state.patientMsg.cardID,
+          locID: this.state.userData.locID, // loc -->locID
+          hospID: this.state.userData.hospID,
+          patID: this.state.patientMsg.patID, // patientDr -->patID
+          contractUnitID: this.state.userData.hospID,
+          bookFlag: this.state.checked ? 'Y' : 'N',
+          deskClerk: this.state.deskClerk,
+          greenFlag: this.state.greenFlag ? 'Y' : 'N',
+          magneticCardFeeflag: magneticCardFeeFlag === 'Y' ? (this.state.swipeCardFlag ? 'Y' : 'N') : undefined,
+          visitFlag: this.state.visitFlag ? 'Y' : 'N',
+          visitedFlag: this.state.visitedFlag ? 'Y' : 'N',
+          bookMethodID: 'Win', // 写死
+          admReasonID: this.state.admReasonId ? this.state.admReasonId : (admReasonFlags ? admId : defAdmId),
+          chooseRegTitleID: this.state.chooseRegTitleID,
+          patTypeCode: patTypeCode
+        }]
+      }
+
+      // 预挂号 
+      let res = await INSUYBUtil.GoTOHISHttp(params, '03040048'); // 调用his接口
+      if (res.errorCode != '0') {
+        this.setState({ loading: false });
+        message.warn(res.errorMessage);
+        return
+      }
+      this.setState({
+        magneticCardFee: res?.magneticCardFee || '',
+        chargeRecodeId: res.recordIDinfo, // 交款记录id
+        admID: res.admID, // 就诊id
+        resSeqNoId: res.resSeqNoId, // 排班队列号id
+        regOperationDateID: res.regOperationDateID, // 挂号信息id
+        accmID: res.accmID
+      }, async () => {
+        if (res.recordIDinfo != '') {
+          // 挂号收费
+          if ((this.state.insuFlag == 'Y') && (this.state.OPInsuType == 'Y')) {
+            // 进行医保结算
+            var insures = await this.insuSettlement(res);
+            if (insures.errorCode == '0') {
+              // this.setState({ insuAdmID: res.insuAdmID });
+              //Keup.ModalMessage(3, this, '医保结算成功!', '自动关闭', 'destroy', '确定', 'success')
+            }
+            else {
+              this.RollBACKOPCharge()
+              this.setState({ loading: false });
+              message.warn(insures.errorMessage);
+              //this.setState({ mask: false })
+              return false;
+            }
+          }
+          var data = {
+            params: [{
+              'chargeRecodeStr': res.recordIDinfo,
+            }]
+          }
+          // 预结算后的金额信息
+          let paydateobj = await INSUYBUtil.GoTOHISHttp(data, '05210035'); // 调用his接口
+          if (paydateobj.errorCode != '0') {
+            this.setState({ loading: false });
+            message.warn(paydateobj.errorMessage);
+            return
+          }
+          this.setState({
+            maypayData: paydateobj.chargeAmtInfo[0].paywArr || [],
+            accPurPoseList: paydateobj.accPurPoseList || '',
+            moneyData: paydateobj.chargeAmtInfo[0], // 金额对象
+            payableAmt: paydateobj.chargeAmtInfo[0].otherPayAmt, // 金额
+            cashInCashVal: '0.00',
+            zeroPay: '0.00',
+            otherPayMoney: '0.00',
+            loading: false,
+            isNewShowRegistrModal: true,
+          });
+        } else {
+          //挂号不收费
+          this.CompletionPatRegister(''); // 挂号确认
+        }
+      })
+    } catch (error) {
+      console.log('error', error)
+    }
+  }
+
+  ///进行医保结算
+  insuSettlement = async (data) => {
+    this.setState({ mask: true })
+    try {
+      //组织结算入参
+      let setlInpar = {
+        params: [{
+          'admID': this.state.admID || '',
+          'recordID': this.state.chargeRecodeId || '',
+          'billID': '',
+          'userID': this.state.userData.userID || '',
+          'locID': this.state.userData.locID,
+          'hospID': this.state.userData.hospID, // 医院idm
+          'groupID': this.state.userData.groupID, // 角色id
+          'ip': this.state.ipConfig?.ipv4 || '',
+          'patID': this.state.patientMsg.patID, // 病人id
+        }],
+        'businessType': 'M5',
+        operationType: 'RegisterOP',
+        'hospID': this.state.userData.hospID, // 医院id
+        session: [this.state.userData]
+      }
+      // console.log(setlInpar)
+      let setlRtn = await INSUYBUtil.insuNew('Settlement', setlInpar);
+      let res = JSON.parse(setlRtn);
+      return res
+    } catch (error) {
+      message.warning('异常:' + JSON.stringify(error))
+      let res = {
+        'errorCode': '-1',
+        'errorMessage': error?.message || '调用异常'
+      }
+      return res
+    }
+  }
+
+  // 进行挂号确认
+  CompletionPatRegister = async (paywIDinfo) => {
+    let { chargeRecodeId, patientMsg } = this.state;
+    let patID = patientMsg?.patID || '';
+    let admID = this.state.admID;
+    var params = {
+      params: [{
+        admID,
+        recordIDinfo: chargeRecodeId,
+        userID: this.state.userData.userID,
+        regOperationDateID: this.state.regOperationDateID,
+        groupID: this.state.userData.groupID,
+        cardID: this.state.patientMsg.cardID,
+        locID: this.state.userData.locID, // loc -->locID
+        hospID: this.state.userData.hospID,
+        patID, // patientDr -->patID
+        paywStr: paywIDinfo
+
+      }]
+    }
+    // 挂号确认
+    let res = await INSUYBUtil.GoTOHISHttp(params, '03040049'); // 调用his接口
+    if (res.errorCode != '0') {
+      // 确认失败回
+      this.RollBACKOPCharge();
+      this.setState({ loading: false });
+      message.warn(res.errorMessage);
+      return false;
+    }
+    message.success('挂号成功!');
+    // this.loadRegisterMsg()
+    this.hideModal('isNewShowRegistrModal');
+    this.loadSchedulingMsg();
+    this.loadRegistrNumData();
+    this.loadConfigFee();
+    // $loadTemplate('Registration', res.print);
+    if (!Util.isEmpty(res.print)) {
+      $loadTemplate('Registration', res.print);
+    }
+    if (!Util.isEmpty(res.invPrint.data) && !Util.isEmpty(res.invPrint.template)) {
+      $loadTemplate(res.invPrint.template, res.invPrint.data);
+    }
+    // setTimeout(() => {
+    //   clearInterval(timer);
+    //   modal && modal.destroy();
+    // }, secondsToGo * 1000);
+    // 将选中对象置空
+    this.clearInput();
+    this.input.focus();
+    this.setState({
+      loading: false,
+      chooseDocObj: {},
+      chooseRegTitleID: '',
+      patientData: [],
+      locId: '',
+      returnFlag: 'N',
+      priorFalag: 'N',
+      regFlag: 'N',
+      cancleRegFlag: 'N',
+      cancleAPPFlag: 'N',
+      regPrintFlag: 'N',
+      APPPrintFlag: 'N',
+      count: '',
+      confirmLoading: false,
+      admID: '',
+      regOperationDateID: '',
+      chargeRecodeId: '',
+      accmID: '',
+      paywIDinfo: '',
+      resSeqNoId: '',
+      maypayData: [],
+      moneyData: '',
+      greenFlag: false,
+      swipeCardFlag: false,
+      checked: false,
+      visitFlag: false,
+    });
+    if ((this.state.insuFlag != 'Y') && (this.state.OPInsuType == 'Y') && this.state.insuRegFlag === 'Y') {
+      let data = {
+        params: [{
+          admID: admID || res?.admID || '',
+          patID,
+        }],
+        businessType: "M2",
+        operationType: 'RegisterOP',
+        hospID: this.state.userData.hospID, //医院id
+        session: [(this.state.userData)]
+      }
+      await React.$dllPost('Register', data, 'INSUNew/PTMedInsuInterface.dll', 'PTMedInsuInterface.InsuBusiness');
+    }
+    return true;
+  }
+
+  // 设置发票号
+  showInvoiceNumModal() {
+    this.setState({
+      isShowInvoiceNumModal: true
+    })
+  }
+
+  changeBirthDay(e) {
+    this.setState({
+      birthDayDate: e
+    }, () => {
+      this.autoAge()
+    })
+  }
+
+  autoAge() {
+    let data = {}
+    data = {
+      params: [{
+        birthday: this.state.birthDayDate ? (moment(this.state.birthDayDate).format(dayFormat)) : undefined,
+        hospID: this.state.userData.hospID,
+      }],
+    }
+    if (this.state.birthDayDate && this.state.birthDayDate != 'Invalid date') {
+      $http.post('urlS', this, {
+        code: '03030013',
+        data: data,
+        success: function (res) {
+          if (+res.errorCode === 0) {
+            this.setState({
+              yearOld: res.result
+            })
+          } else {
+
+          }
+        }
+      })
+    } else {
+      this.setState({
+        yearOld: undefined
+      })
+    }
+  }
+
+  chengeTime(e) {
+    var date = moment(new Date()).format(dayFormat);
+    var afterDate = moment(e).format(dayFormat);
+    if (date < afterDate) {
+      this.setState({
+        date: e,
+        orderStatus: true
+      }, () => {
+        this.loadSchedulingMsg(); // 获取挂号排班记录
+        this.loadRegisterMsg();
+        this.loadRegistrNumData()
+      })
+    } else {
+      this.setState({
+        date: e,
+        orderStatus: false
+      }, () => {
+        this.loadSchedulingMsg(); // 获取挂号排班记录
+        this.loadRegisterMsg();
+        this.loadRegistrNumData()
+      })
+    }
+  }
+
+  // 切换卡类型
+  changeCardType(e) {
+    var { cardTypeData } = this.state;
+    for (var i = 0; i < cardTypeData.length; i++) {
+      if (e == cardTypeData[i].id) {
+        this.setState({
+          cardLength: cardTypeData[i].cardLength,
+          replenishZero: cardTypeData[i].replenishZero,
+          cardTypeId: cardTypeData[i].id,
+          readMode: cardTypeData[i].readMode,
+          inputStatus: true,
+          equipManagerObj: cardTypeData[i].equipManagerObj
+        })
+      }
+    }
+  }
+
+  /**
+   * @ByYQL: 卡类型为医保卡时调用电子凭证DLL
+   * Create 2022-9-26
+   */
+  readMedVoucher = async () => {
+    if (this.state.cardTypeId == '8') { // 合肥-8
+      let dllInputdata = {
+        'iShowForm': 0,
+        'iCardType': '01', // 01:电子凭证
+        'operatorId': JSON.parse(window.sessionStorage.userData).userCode,
+        'operatorName': JSON.parse(window.sessionStorage.userData).userName,
+        'officeId': JSON.parse(window.sessionStorage.userData).locID,
+        'officeName': JSON.parse(window.sessionStorage.userData).locDesc,
+        'patID': ''
+      };
+      var retStr = await INSUYBUtil.ReadInsuCard(dllInputdata);
+      let resObj = JSON.parse(retStr);
+      if (+resObj.errorCode === 0) {
+        this.setState({
+          medVoucherObj: resObj.result
+        }, function () {
+          if (resObj.result) {
+            this.handleVoucherInfo(resObj.result);
+          } else {
+            message.warn('未获取到反参')
+          }
+        })
+      } else {
+        message.warn(resObj.errorMessage);
+        this.setState({
+          medVoucherObj: {}
+        })
+      }
+    } else { // 济南-11
+      this.setState({ cardShow: true, qrCode: '', areaType: '本地', cardType: this.state.cardTypeId });
+    }
+  };
+
+  // 输入卡号进行查询
+  changeCardNum(e) {
+    this.setState({
+      readCardNo: e.target.value,
+      clearStatus: true
+    })
+  }
+
+  changePaitId(e) {
+    this.setState({
+      paitId: e.target.value,
+      paitStatus: true
+    })
+  }
+
+  handleReadCard() {
+    /**
+     * @ByYQL: 读卡功能,适配新读卡器华视100UC【hospID:济南-64、合肥-25、长春-62】
+     * Create 2021-12-9
+     */
+    let hospID = sessionStorage.userData ? JSON.parse(sessionStorage.userData).hospID : '';
+    let inputDirRoute = hospID == 25 || hospID == 62 ? 'ReadCard/ReadCard.dll' : 'ReadCard_UC/ReadCard.dll';
+    let that = this;
+    let dllParams = JSON.stringify({ 'inputDir': inputDirRoute, 'clsName': 'ReadCard.ReadCardObj', 'funcName': 'ReadIDCardInfo' });
+    if (typeof (CefSharp) != 'undefined') {   // 新元素定制浏览器
+      CefSharp.BindObjectAsync('xysCefToJavaScripts');
+      setTimeout(() => {
+        xysCefToJavaScripts.driveLocalHardware(dllParams).then((returnVale) => {
+          var json = JSON.parse(returnVale);
+          if (json.errorCode == '0') {
+            that.setState({
+              // parms:json.result
+              sourceData: json.result,
+              readStatus: 'read',
+              readCardNo: !Util.isEmpty(json.result) ? json.result.IDCardNo : '',
+            }, () => {
+              that.loadReadCardMessage();
+              // that.handleSelectPersonMsg('face', 'e')
+              // sessionStorage.setItem('readCardMsg', JSON.stringify(that.state.source))
+            })
+            message.success('读身份证成功');
+          } else {
+            message.error(json.errorMessage);
+          }
+        })
+      }, 100);
+    } else {
+      const frame = chrome?.webview?.hostObjects?.Bridge || ''; // 新版浏览器
+      if (frame) {
+        frame.DynamicLoadingDLL(dllParams)
+          .then(
+            data => {
+              var json = JSON.parse(data);
+              if (json.errorCode == '0') {
+                that.setState({
+                  sourceData: json.result,
+                  readStatus: 'read',
+                  readCardNo: !Util.isEmpty(json.result) ? json.result.IDCardNo : '',
+                }, () => {
+                  that.loadReadCardMessage();
+                })
+                message.success('读身份证成功');
+              } else {
+                message.error(json.errorMessage);
+              }
+            },
+            err => {
+              console.log(err);
+            }
+          )
+      } else {
+        let data = 'input={"inputDir":"' + inputDirRoute + '","clsName":"' + 'ReadCard.ReadCardObj' + '","funcName":"' + 'ReadIDCardInfo' + '"}'
+        fetchJsonp('http://127.0.0.1:62534/XYSWCFService/DynamicLoadingDLL?' + '&' + data, {
+          jsonpCallback: 'JsonCallback',
+        })
+          .then(function (response) {
+            return response.json()
+          }).then(function (json) {
+            //返回卡号
+            json = JSON.parse(json)
+            if (json.errorCode == '0') {
+              that.setState({
+                // parms:json.result
+                sourceData: json.result,
+                readStatus: 'read',
+                readCardNo: !Util.isEmpty(json.result) ? json.result.IDCardNo : '',
+              }, () => {
+                that.loadReadCardMessage()
+                // that.handleSelectPersonMsg('face', 'e')
+                // sessionStorage.setItem('readCardMsg', JSON.stringify(that.state.source))
+              })
+              message.success('读身份证成功');
+            } else {
+              message.error(json.errorMessage);
+            }
+            // return cardNo
+          }).catch(function (ex) {
+            console.log(ex);
+          })
+      }
+    }
+  }
+
+  //门诊医生工作站的读卡事件
+  handleReadCard2() {
+    var cardType = this.state.cardTypeId ? this.state.cardTypeId : (this.state.cardStatus ? this.state.cardStatus : this.getQueryString('cardTypeId'));
+    this.readCard2.ReadCard(cardType, "R", (json) => {
+      this.setState({ readPatID: json && json.patInfo ? json.patInfo.patID : '', patCardNo: json.cardNo, number: json && json.patInfo ? json.patInfo.patNo : '', readStatus: 'read' }, () => {
+        // 03040004
+        this.searchPatient(this.state.patCardNo !== '' ? this.state.patCardNo : this.state.number)
+      })
+    }, this.state.equipManagerObj?.readCardCode)
+  }
+
+  loadKeyDown(e) {
+    if (e.keyCode == '13') {
+      this.setState({//自动补0,渲染到组件中
+        patCardNo: this.state.replaceZero == 'Y' ? (Array(parseInt(this.state.cardLength || 0)).join(0) + this.state.patCardNo).slice(-parseInt(this.state.cardLength)) : this.state.patCardNo
+      }, () => {
+        this.searchPatient(this.state.patCardNo)
+      })
+    }
+  }
+
+  searchPatient(patNo) {
+    var params = {
+      params: [{
+        number: patNo,
+        cardTypeID: this.state.cardTypeId ? this.state.cardTypeId : (this.state.cardStatus ? this.state.cardStatus : this.getQueryString('cardTypeId')),//cardTypeDr -->cardTypeID
+        // cardNo: this.state.cardNum
+        cardNo: (this.state.cardNum ? this.state.cardNum : (this.getQueryString('cardNum') || '')),
+        present: 'Y'
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '03040004',
+      data: params,
+      success: function (res) {
+        if (res.errorCode == '0') {
+          message.success('患者信息查询成功!');
+          this.setState({
+            patientMsg: res.data,
+            admReason: res.data.admReason,
+            mobilephone: '',
+            credNo: '',
+            count: '',
+            returnFlag: 'N',
+            priorFalag: 'N',
+            regFlag: 'N',
+            cancleRegFlag: 'N',
+            cancleAPPFlag: 'N',
+            regPrintFlag: 'N',
+            APPPrintFlag: 'N',
+            OPInsuType: !Util.isEmpty(res.data.admReason) ? res.data.admReason[0].OPInsuType : '',
+            note: res.data.note,
+            visitedFlag: res.data.visitedFlag,
+          }, () => {
+            this.currentMeter()
+            this.loadRegisterMsg(res.data); // 查询患者挂号/预约记录
+            this.loadSchedulingMsg()
+          })
+        } else {
+          var that = this;
+          var cardTypeId = this.state.cardTypeId ? this.state.cardTypeId : (this.state.cardStatus);
+          var paitId = this.state.paitId ? ('&paitId=' + this.state.paitId) : (this.state.readCardNo ? ('&paitId=' + this.state.readCardNo) : '');
+          var cardNum = this.state.cardNum ? ('&cardNum=' + this.state.cardNum) : '';
+          confirm({
+            title: '确认建卡',
+            okText: that.state.userData.language == 'CN' ? '确定' : 'OK',
+            cancelText: that.state.userData.language == 'CN' ? '取消' : 'Cannel',
+            content: <span><span style={{ color: 'red' }}>当前为{res.errorMessage},</span>
+              <span>确定要跳转到建卡页面吗?</span></span>,
+            onOk() {
+              // that.props.history.push('./03030002?cardTypeId=' + cardTypeId + paitId + cardNum)
+              if (that.state.userData.defaultMenuType == '2') {
+                that.goRegistrCards(cardTypeId, paitId, cardNum)
+              } else {
+                that.props.history.push('./03030003?cardTypeId=' + cardTypeId + paitId + cardNum)
+              }
+            },
+            onCancel() {
+              console.log('Cancel');
+              sessionStorage.removeItem('readCardMsg')
+            },
+          });
+          this.setState({
+            patientMsg: {
+              defaultTitle: '挂号默认置灰病人信息'
+            }
+          })
+        }
+      }
+    });
+  }
+
+  loadReadCardMessage() {
+    var params = {
+      params: [this.state.sourceData]
+    }
+    $http.post('urlS', this, {
+      code: '03030115',
+      data: params,
+      success: function (res) {
+        if (res.errorCode === '0') {
+          this.setState({
+            source: res.result
+          }, () => {
+            this.handleSelectPersonMsg('face', 'e')
+            sessionStorage.setItem('readCardMsg', JSON.stringify(this.state.source))
+          })
+        }
+      }
+    })
+  }
+
+  //流调表提示
+  currentMeter() {
+    let { patientMsg } = this.state;
+    if (patientMsg && patientMsg.currentMeter === 'Y') {
+      if (patientMsg.toDayFillFlag != 'Y') {
+        var that = this;
+        confirm({
+          title: '流调表提示',
+          okText: '否-患者扫码填表',
+          cancelText: '是-继续挂号',
+          content: <span>{patientMsg.meterMessage}</span>,
+          onOk() { that.clearInput() },
+          onCancel() { }
+        });
+      }
+    }
+  }
+
+  onAreaTypeChange = (e) => {
+    this.setState({ areaType: e.target.value });
+  }
+
+  onqrCodeChange = (e) => {
+    this.setState({ qrCode: e.target.value });
+  }
+
+  YBInputSure = async () => {
+    let dllInputdata = {
+      'params': [{
+        'userID': JSON.parse(window.sessionStorage.userData).userID || '',
+        'qrCode': this.state.qrCode,
+        'icCardNum': '',
+        'areaType': this.state.areaType,
+        'hospID': JSON.parse(window.sessionStorage.userData).hospID,
+        'reasonCode': 'INSUJNSYB',
+        'patID': '',
+        'patName': '',
+        'xnhjgCode': ''
+      }],
+      'code': '05210036'
+    };
+    let data = await INSUYBUtil.insuYBAHSYB('ReadYBCard', dllInputdata); // 读医保病人信息
+    let res = JSON.parse(data);
+    console.log('ReadYBCard反', res);
+    if (+res.errorCode === 0) {
+      if (res.result) {
+        this.handleVoucherInfo(res.result);
+      } else {
+        message.warn('未获取到反参');
+        this.setState({ cardShow: false });
+      }
+    } else {
+      message.warn(res.errorMessage);
+      this.setState({ cardShow: false });
+    }
+  };
+
+  goRegistrCard(cardTypeId, paitId, cardNum) {
+    if (!Util.isEmpty(this.state.registerInfo)) {
+      if (this.state.registerInfo.jumpFlag == 'Y') {
+        this.props.history.push('./03030003?cardTypeId=' + cardTypeId + paitId + cardNum)
+      } else {
+        message.error('暂无权限建卡,请先联系管理员!')
+        return
+      }
+    }
+  }
+
+  // 电子凭证查询病人信息
+  handleVoucherInfo(result) {
+    var params = {
+      params: [{
+        medVoucherInfo: result
+      }]
+    };
+    $http.post('urlDeault', this, {
+      code: this.state.equipManagerObj?.readCardCode || '15020001',
+      data: params,
+      success: function (res) {
+        if (+res.errorCode === 0) {
+          this.setState({
+            readCardNo: res.result?.idNo,
+          }, function () {
+            this.handleSelectPersonMsg('face', 'e');
+          });
+        } else {
+          message.error(res.errorMessage);
+        }
+        this.setState({ cardShow: false });
+      }
+    });
+  }
+
+  // enter查询病人信息
+  handleSelectPersonMsg(data, e) {
+    if (e.keyCode == '13' || data == 'face') {
+      if (Util.isEmpty(this.state.cardNum) && Util.isEmpty(data)) {
+        message.error('请先输入您需要查询的卡号!')
+        return
+      }
+      this.textInput.current.focus()
+      if (Util.isEmpty(data)) {
+        this.setState({ // 自动补0,渲染到组件中
+          cardNum: this.state.replenishZero == 'Y' ? (Array(parseInt(this.state.cardLength)).join(0) + this.state.cardNum).slice(-parseInt(this.state.cardLength)) : this.state.cardNum
+        })
+      }
+      // var params = {
+      //     params: [{
+      //         number: this.state.paitId,
+      //         cardTypeID: this.state.cardTypeId ? this.state.cardTypeId : (this.state.cardStatus),//cardTypeDr -->cardTypeID
+      //         // cardNo: this.state.cardNum
+      //         cardNo: this.state.replenishZero == 'Y' ? (Array(parseInt(this.state.cardLength)).join(0) + this.state.cardNum).slice(-parseInt(this.state.cardLength)) : this.state.cardNum
+      //     }]
+      // }
+      var params = {
+        params: [{
+          number: this.state.paitId ? this.state.paitId : (this.state.readCardNo ? this.state.readCardNo : this.getQueryString('posId')),
+          cardTypeID: this.state.cardTypeId ? this.state.cardTypeId : (this.state.cardStatus ? this.state.cardStatus : this.getQueryString('cardTypeId')),//cardTypeDr -->cardTypeID
+          // cardNo: this.state.cardNum
+          cardNo: (this.state.cardNum ? this.state.cardNum : (this.getQueryString('cardNum') || '')),
+          present: 'Y'
+        }]
+      }
+      $http.post('urlDeault', this, {
+        code: '03040004',
+        data: params,
+        success: function (res) {
+          if (res.errorCode == '0') {
+            message.success('患者信息查询成功!');
+            this.setState({
+              patientMsg: res.data,
+              admReason: res.data.admReason,
+              mobilephone: '',
+              credNo: '',
+              count: '',
+              returnFlag: 'N',
+              priorFalag: 'N',
+              regFlag: 'N',
+              cancleRegFlag: 'N',
+              cancleAPPFlag: 'N',
+              regPrintFlag: 'N',
+              APPPrintFlag: 'N',
+              OPInsuType: !Util.isEmpty(res.data.admReason) ? res.data.admReason[0].OPInsuType : '',
+              note: res.data.note,
+              visitedFlag: res.data.visitedFlag,
+            }, () => {
+              this.currentMeter()
+              this.loadRegisterMsg(res.data); // 查询患者挂号/预约记录
+              this.loadSchedulingMsg()
+            })
+          } else {
+            var that = this;
+            var cardTypeId = this.state.cardTypeId ? this.state.cardTypeId : (this.state.cardStatus);
+            var paitId = this.state.paitId ? ('&paitId=' + this.state.paitId) : (this.state.readCardNo ? ('&paitId=' + this.state.readCardNo) : '');
+            var cardNum = this.state.cardNum ? ('&cardNum=' + this.state.cardNum) : '';
+            confirm({
+              title: '确认建卡',
+              okText: that.state.userData.language == 'CN' ? '确定' : 'OK',
+              cancelText: that.state.userData.language == 'CN' ? '取消' : 'Cannel',
+              content: <span><span style={{ color: 'red' }}>当前为{res.errorMessage},</span>
+                <span>确定要跳转到建卡页面吗?</span></span>,
+              onOk() {
+                // that.props.history.push('./03030002?cardTypeId=' + cardTypeId + paitId + cardNum)
+                if (that.state.userData.defaultMenuType == '2') {
+                  that.goRegistrCards(cardTypeId, paitId, cardNum)
+                } else {
+                  that.props.history.push('./03030003?cardTypeId=' + cardTypeId + paitId + cardNum)
+                }
+              },
+              onCancel() {
+                console.log('Cancel');
+                sessionStorage.removeItem('readCardMsg')
+              },
+            });
+            this.setState({
+              patientMsg: {
+                defaultTitle: '挂号默认置灰病人信息'
+              }
+            })
+          }
+        }
+      });
+    }
+  }
+
+  goRegistrCards(cardTypeId, paitId, cardNum) {
+    if (!Util.isEmpty(this.state.registerInfo)) {
+      if (this.state.registerInfo.jumpFlag == 'Y') {
+        var data = {
+          cardTypeId: cardTypeId,
+          paitId: paitId,
+          cardNum: cardNum
+        }
+        this.props.openWindowBySubTab({
+          title: '建卡登记',
+          path: '/03030003',
+          Paras: {
+            targetKey: '建卡登记',
+            flag: 'compile',
+            userInfo: data
+          },
+          component: 'pages/registercard/RegisterPatCard.jsx'
+        });
+      } else {
+        message.error('暂无权限建卡,请先联系管理员!')
+        return
+      }
+    }
+  }
+
+  // 清除输入框数据
+  clearInput() {
+    //刷新 判断是否存在异常数据
+    this.FindOPChargeExceptionInfo('')
+    this.setState({
+      patientMsg: {
+        defaultTitle: '挂号默认置灰病人信息'
+      },
+      cardNum: '',
+      paitId: '',
+      patientData: [],
+      bookName: '',
+      bookSex: undefined,
+      credType: '',
+      credNo: '',
+      birthDayDate: '',
+      yearOld: '',
+      mobilephone: '',
+      personDr: undefined,
+      personType: undefined,
+      personMoney: '',
+      patinId: '',
+      returnFlag: 'N',
+      priorFalag: 'N',
+      regFlag: 'N',
+      cancleRegFlag: 'N',
+      cancleAPPFlag: 'N',
+      regPrintFlag: 'N',
+      APPPrintFlag: 'N',
+      checkData: '',
+      admReasonId: undefined,
+      insuranceId: '', // 险种类别
+      admReason: [],
+      correCode: false,
+      deskClerk: undefined,
+      checked: false,
+      note: '',
+      patSource: '',
+      adminUser: '', // 报备人员
+      admID: '',
+      regOperationDateID: '',
+      chargeRecodeId: '',
+      accmID: '',
+      paywIDinfo: '',
+      resSeqNoId: '',
+      maypayData: [],
+      moneyData: ''
+    }, () => {
+      this.input.focus()
+    })
+  }
+
+  // 点击预约,获取预约状态,对预约时间进行disabled操作
+  showDate() {
+    var { bookName, bookSex, credType, credNo, mobilephone, patientMsg } = this.state;
+    // if (Util.isEmpty(patientMsg) && (Util.isEmpty(bookName) || Util.isEmpty(bookSex)
+    //     || Util.isEmpty(credNo) || Util.isEmpty(mobilephone))) {
+    //     message.error('病人必填信息不能为空,请先输入相关信息')
+    //     return
+    // }
+    var date = new Date();//点击预约,日期+1
+    if (this.state.showNewDate) {
+      this.setState({
+        showDate: false,
+        date: date,
+        orderStatus: false,
+        showNewDate: false
+      }, () => {
+        this.loadSchedulingMsg()
+        this.loadRegisterMsg()
+        this.loadRegistrNumData()
+      })
+    } else {
+      this.setState({
+        showDate: true,
+        date: moment(new Date()).add(1, 'days').format(),
+        orderStatus: true,
+        showNewDate: true
+      }, () => {
+        this.loadSchedulingMsg()
+        this.loadRegisterMsg()
+        this.loadRegistrNumData()
+        this.bookName.current.focus()
+      })
+    }
+  }
+
+  showRegistrDate() {
+    var date = new Date(); // 点击预约,日期-1
+    this.setState({
+      showNewDate: true,
+      activeKey: '1',
+      date: moment(new Date()).add(-1, 'days').format(),
+      orderStatus: false,
+      showDate: true
+    }, () => {
+      this.loadSchedulingMsg()
+    })
+  }
+
+  // 点击行,渲染当前行样式
+  onClickRow = (record) => {
+    return {
+      onClick: () => {
+        this.setState({
+          rowId: record.admID,
+          admDr: record.admID,
+          payMentDr: record.recordID,
+          regQueDr: record.regQueID,
+          recordData: record,
+          bookScheduleDr: record.bookScheduleID,
+          workScheduleDr: record.resDetailID, // 点击行,获取排班id
+          count: record.count,
+          returnFlag: record.returnFlag, // 复诊标识
+          priorFalag: record.priorFalag, // 优先标识
+          regFlag: record.regFlag, // 取号标识
+          cancleRegFlag: record.cancleRegFlag, // 退号标识
+          cancleAPPFlag: record.cancleAPPFlag, // 取消预约标识
+          regPrintFlag: record.regPrintFlag, // 重打凭条标识
+          APPPrintFlag: record.APPPrintFlag, // 重打发票
+          cancleRegTips: record.cancleRegTips
+        });
+        // 点击表格后,监听键盘事件
+        document.addEventListener('keydown', this.keyDownElements)
+      },
+    };
+  }
+
+  // 点击行,渲染当前行样式
+  setRowClassName = (record) => {
+    return record.count === this.state.count ? 'clickRowStyle' : '';
+  }
+  // 医保登记之后界面跳转
+  handleGoBack = (res) => {
+    let secondsToGo = this.state.userData && this.state.userData.messageTime;
+    const modal = Modal.success({
+      title: '挂号成功',
+      content: <span>弹框将在&nbsp;<span style={{ fontSize: 16, color: 'red' }}>{secondsToGo}</span>&nbsp;秒后关闭.</span>
+    });
+    const timer = setInterval(() => {
+      secondsToGo -= 1;
+      modal.update({
+        content: <span>弹框将在&nbsp;<span style={{ fontSize: 16, color: 'red' }}>{secondsToGo}</span>&nbsp;秒后关闭.</span>
+      });
+    }, 1000);
+    setTimeout(() => {
+      clearInterval(timer);
+      modal.destroy();
+    }, secondsToGo * 1000);
+    // this.loadRegisterMsg()
+    this.loadSchedulingMsg();
+    this.loadRegistrNumData();
+    this.loadConfigFee();
+    // this.hideModal('isShowRegistrModal')
+    this.hideModal('isNewShowRegistrModal')
+    // $loadTemplate('Registration', res.print);
+    if (!Util.isEmpty(res.print)) {
+      $loadTemplate('Registration', res.print);
+    }
+    if (!Util.isEmpty(res.invPrint.data) && !Util.isEmpty(res.invPrint.template)) {
+      $loadTemplate(res.invPrint.template, res.invPrint.data);
+    }
+    this.clearInput()
+    this.setState({
+      patientData: [],
+      locId: '',
+      returnFlag: 'N',
+      priorFalag: 'N',
+      regFlag: 'N',
+      cancleRegFlag: 'N',
+      cancleAPPFlag: 'N',
+      regPrintFlag: 'N',
+      APPPrintFlag: 'N',
+      count: '',
+      confirmLoading: false
+    }, () => {
+      setTimeout(() => {
+        this.input.focus()
+      }, 1000)
+      if (this.props.openWindowBySubTab) {
+        this.props.openWindowBySubTab({
+          title: '医嘱录入',
+          path: '/03050002',
+          Paras: {
+            targetKey: '医嘱录入',
+            flag: 'compile',
+            userInfo: data
+          },
+          component: 'pages/opadmReg/NewRegistrationPage.jsx'
+        });
+      } else {
+        this.props.history.push('./030400011')
+      }
+    })
+  }
+
+  // 取号
+  onSubmitGetNum(data, payWayId, payWayMoney, realPayMoney, hospitalId, checkAccount) {
+    var { getRegistrData } = this.state;
+    var admReasonFlags = '';
+    var admId = '';
+    var defAdmId = '';
+    if (this.state.admReason) {
+      var admReason = this.state.admReason;
+      for (var i = 0; i < admReason.length; i++) {
+        if (admReason[i].defaultFlag == 'Y') {
+          admReasonFlags = true;
+          admId = admReason[i].id;
+          break;
+        } else {
+          admReasonFlags = false;
+          defAdmId = admReason[0].id;
+        }
+      }
+    }
+    var params = {
+      params: [{
+        resDetailID: this.state.workScheduleDr,
+        userID: this.state.userData.userID,
+        groupID: this.state.userData.groupID,
+        cardID: this.state.patientMsg.cardID,
+        locID: this.state.userData.locID,
+        hospID: this.state.userData.hospID,
+        patID: this.state.patientMsg.patID,
+        contractUnitID: hospitalId,
+        deskClerk: this.state.deskClerk,
+        bookScheduleID: this.state.recordData.bookScheduleID,
+        bookMethodID: 'Win',//写死
+        admReasonID: this.state.admReasonId ? this.state.admReasonId : (admReasonFlags ? admId : defAdmId),
+        paywStr: [{
+          payWayID: getRegistrData.paywCASHID,
+          payWayAmt: realPayMoney,
+          hospID: Util.isEmpty(hospitalId) ? '' : hospitalId
+        }, {
+          payWayID: getRegistrData.paywACCID,
+          payWayAmt: checkAccount ? 0 : data.accountFee,
+          hospID: Util.isEmpty(hospitalId) ? '' : hospitalId
+        }, {
+          payWayID: payWayId ? payWayId : '',
+          payWayAmt: Math.abs(payWayMoney.toFixed(2)),
+          hospID: Util.isEmpty(hospitalId) ? '' : hospitalId
+        }],
+        insuTypeCode: this.state.insuranceId, // 险种类型编码
+        chooseRegTitleID: this.state.chooseRegTitleID
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '03040007',
+      data: params,
+      success: function (res) {
+        if (res.errorCode == '0') {
+          message.success('取号成功!')
+          this.loadRegisterMsg()
+          this.hideModal('isShowGetNumModal')
+          if (!Util.isEmpty(res.print)) {
+            $loadTemplate('Registration', res.print);
+          }
+          if (!Util.isEmpty(res.invPrint.data) && !Util.isEmpty(res.invPrint.template)) {
+            $loadTemplate(res.invPrint.template, res.invPrint.data);
+          }
+          this.setState({
+            returnFlag: 'N',
+            priorFalag: 'N',
+            regFlag: 'N',
+            cancleRegFlag: 'N',
+            cancleAPPFlag: 'N',
+            regPrintFlag: 'N',
+            APPPrintFlag: 'N',
+            count: '',
+          }, () => {
+            if (this.props.openWindowBySubTab) {
+              this.props.openWindowBySubTab({
+                title: '医嘱录入',
+                path: '/03050002',
+                Paras: {
+                  targetKey: '医嘱录入',
+                  flag: 'compile',
+                  userInfo: data
+                },
+                component: 'pages/opadmReg/NewRegistrationPage.jsx'
+              });
+            } else {
+              this.props.history.push('./030400011')
+            }
+          })
+        }
+      }
+    });
+    // 将选中对象置空
+    this.setState({
+      chooseDocObj: {},
+      chooseRegTitleID: ''
+    })
+  }
+
+  // 加载当日号源消耗进度
+  loadRegistrNum() {
+    var registrNumOption = []
+    var { registrNumData } = this.state;
+    registrNumData && registrNumData.map((item, index) => {
+      registrNumOption.push(
+        <div style={{ padding: '18px', paddingBottom: '0', width: '100%', boxSizing: 'border-box', fontSize: '14px', color: '#333' }} key={index}>
+          <Badge status='success' text={<div style={{ display: 'inline-block', width: 'calc(100% - 14px)' }}>{item.locDescripts}<span style={{ float: 'right', fontSize: '12px' }}>{item.registedNumSum + '/' + item.registNumSum}</span></div>}></Badge>
+          {/* <Progress percent={item.proportion} /> */}
+        </div>
+      )
+    })
+    return registrNumOption;
+  }
+
+  // 退号
+  showBackNumModal() {
+    if (this.state.groupConfig) {
+      if (this.state.groupConfig.IfAbortFlag !== 'Y' && this.state.recordData.SFlag !== 'A') {
+        message.error('暂无作废权限,无法进行退号')
+        return
+      } else if (this.state.groupConfig.IfStrikeFlag !== 'Y' && this.state.recordData.SFlag !== 'S') {
+        message.error('暂无红冲权限,无法进行退号')
+        return
+      }
+    }
+    if (((!Util.isEmpty(this.state.registerInfo) && this.state.registerInfo.noChargeFlag == 'Y')) || (Util.isEmpty(this.state.payMentDr))) {
+      // if (!Util.isEmpty(this.state.registerInfo) && this.state.registerInfo.noChargeFlag == 'N') {
+      this.registrBackNum()
+    } else {
+      var params = {
+        params: [{
+          recodeIDStr: this.state.payMentDr
+        }]
+      }
+      $http.post('urlDeault', this, {
+        code: '05210008',
+        data: params,
+        success: function (res) {
+          if (res.errorCode === '0') {
+            this.setState({
+              registrFee: res.chargeAmtInfo[0]
+            })
+          }
+        }
+      });
+      this.setState({
+        isShowBackNumModal: true
+      })
+      this.FindOPChargeExceptionInfo('')    //查询异常数据
+    }
+  }
+
+  //取号
+  showGetNumModal() {
+    var admReasonFlags = '';
+    var admId = '';
+    var defAdmId = '';
+    // if (Util.isEmpty(this.state.deskClerk)) {
+    //   message.error('无接待人员,无法取号,请先选择接待人员!')
+    //   return
+    // }
+    const { magneticCardFeeFlag } = this.state;
+    if (this.state.admReason) {
+      var admReason = this.state.admReason;
+      for (var i = 0; i < admReason.length; i++) {
+        if (admReason[i].defaultFlag == 'Y') {
+          admReasonFlags = true;
+          admId = admReason[i].id;
+          break;
+        } else {
+          admReasonFlags = false;
+          defAdmId = admReason[0].id;
+        }
+      }
+    }
+    var params = {
+      params: [{
+        patID: this.state.patientMsg.patID,
+        resDetailID: this.state.workScheduleDr,
+        admReasonID: this.state.admReasonId ? this.state.admReasonId : (admReasonFlags ? admId : defAdmId),
+        insuBalance: 0,
+        insuSum: 0,
+        greenFlag: this.state.greenFlag ? 'Y' : 'N',
+        magneticCardFeeflag: magneticCardFeeFlag === 'Y' ? (this.state.swipeCardFlag ? 'Y' : 'N') : undefined,
+        visitFlag: this.state.visitFlag ? 'Y' : 'N',
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '03040008',
+      data: params,
+      success: function (res) {
+        if (res.errorCode === '0') {
+          this.setState({
+            getRegistrData: res.data
+          })
+        }
+      }
+    });
+    if (!Util.isEmpty(this.state.registerInfo) && this.state.registerInfo.noChargeFlag == 'Y') {
+      // this.setState({
+      //   isShowGetNumModal: true
+      // })
+      this.getNumNoCharge()
+    } else {
+      this.setState({
+        isShowGetNumModal: true
+      })
+    }
+  }
+
+  getNumNoCharge() {
+    var { getRegistrData } = this.state;
+    var admReasonFlags = '';
+    var admId = '';
+    var defAdmId = '';
+    if (this.state.admReason) {
+      var admReason = this.state.admReason;
+      for (var i = 0; i < admReason.length; i++) {
+        if (admReason[i].defaultFlag == 'Y') {
+          admReasonFlags = true;
+          admId = admReason[i].id;
+          break;
+        } else {
+          admReasonFlags = false;
+          defAdmId = admReason[0].id;
+        }
+      }
+    }
+
+    var params = {
+      params: [{
+        resDetailID: this.state.workScheduleDr,
+        userID: this.state.userData.userID,
+        groupID: this.state.userData.groupID,
+        cardID: this.state.patientMsg.cardID,
+        locID: this.state.userData.locID,
+        hospID: this.state.userData.hospID,
+        patID: this.state.patientMsg.patID,
+        deskClerk: this.state.deskClerk,
+        contractUnitID: '',
+        bookScheduleID: this.state.recordData.bookScheduleID,
+        bookMethodID: 'Win', // 写死
+        admReasonID: this.state.admReasonId ? this.state.admReasonId : (admReasonFlags ? admId : defAdmId),
+        paywStr: [],
+        insuTypeCode: this.state.insuranceId, // 险种类型编码
+        chooseRegTitleID: this.state.chooseRegTitleID
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '03040007',
+      data: params,
+      success: function (res) {
+        if (res.errorCode == '0') {
+          message.success('取号成功!')
+          this.loadRegisterMsg()
+          this.hideModal('isShowGetNumModal')
+          if (!Util.isEmpty(res.print)) {
+            $loadTemplate('Registration', res.print);
+          }
+          if (!Util.isEmpty(res.invPrint.data) && !Util.isEmpty(res.invPrint.template)) {
+            $loadTemplate(res.invPrint.template, res.invPrint.data);
+          }
+          this.setState({
+            returnFlag: 'N',
+            priorFalag: 'N',
+            regFlag: 'N',
+            cancleRegFlag: 'N',
+            cancleAPPFlag: 'N',
+            regPrintFlag: 'N',
+            APPPrintFlag: 'N',
+            count: '',
+          }, () => {
+            if (this.props.openWindowBySubTab) {
+              this.props.openWindowBySubTab({
+                title: '医嘱录入',
+                path: '/03050002',
+                Paras: {
+                  targetKey: '医嘱录入',
+                  flag: 'compile',
+                  userInfo: data
+                },
+                component: 'pages/opadmReg/NewRegistrationPage.jsx'
+              });
+            } else {
+              this.props.history.push('./030400011')
+            }
+          })
+        }
+      }
+    });
+    // 将选中对象置空
+    this.setState({
+      chooseDocObj: {},
+      chooseRegTitleID: ''
+    })
+  }
+
+  // 退号
+  registrBackNum = async (id) => {
+    // 显示加载框
+    this.childLoadExamine.showModal();
+    if (this.state.payMentDr != '') {
+      // 判断付款记录是否是医保记录
+      var paramsdata = {
+        params: [{
+          'recordinvID': this.state.payMentDr, // 付款记录串
+          'invtype': 'PAY', // his交易流水
+          'userID': JSON.parse(window.sessionStorage.userData).userID || '', // 操作人
+          'ip': this.state.ipConfig?.ipv4 || '', // ip
+          'hospID': JSON.parse(window.sessionStorage.userData).hospID || '', // 医院
+        }]
+      }
+      let hisdataobj = await INSUYBUtil.GoTOHISHttp(paramsdata, '05210047'); // 调用his接口
+      if (hisdataobj.errorCode != '0') {
+        message.warn(res.errorMessage);
+        return false;
+      }
+      var insuPayID = hisdataobj.insuPayIDinfo
+      let insuAdmObj = hisdataobj.insuAdmObj
+      let onlineYBFalg = hisdataobj.onlineYBFalg
+      let businessType = "M5C"
+      if (onlineYBFalg === 'Y') {
+        businessType = "M6C"
+      }
+      if (insuPayID != '') {
+        // 医保退费
+        // 组织结算入参
+        let cancleSetlInpar = {
+          params: [{
+            'admID': this.state.admDr || '',
+            'recordID': this.state.payMentDr || '',
+            'billID': '',
+            'userID': this.state.userData.userID || '',
+            'locID': this.state.userData.locID,
+            'hospID': this.state.userData.hospID, // 医院idm
+            'groupID': this.state.userData.groupID, // 角色id
+            'ip': this.state.ipConfig?.ipv4 || '',
+            'patID': this.state.patientMsg.patID, // 病人id
+            'psn_no': insuAdmObj.psn_no,
+            'mdtrt_id': insuAdmObj.mdtrt_id,
+            'insuplc_admdvs': insuAdmObj.insuplc_admdvs,
+            'setl_id': insuAdmObj.setl_id,
+            'interfaceDr': insuAdmObj.interfaceDr
+          }],
+          'insuAdmObj': insuAdmObj,
+          'businessType': businessType,
+          operationType: 'RegisterOP',
+          'hospID': this.state.userData.hospID, // 医院id
+          session: [(this.state.userData)]
+        }
+        let cancleSetlRtn = await INSUYBUtil.insuNew('Settlement', cancleSetlInpar);
+        let res = JSON.parse(cancleSetlRtn);
+        if (res.errorCode == '0') {
+          // this.setState({ insuAdmID: res.insuAdmID });
+          //Keup.ModalMessage(3, this, '医保退费成功!', '自动关闭', 'destroy', '确定', 'success')
+        }
+        else {
+          message.warn(res.errorMessage);
+          this.childLoadExamine.close();
+          return false;
+        }
+      }
+    }
+    //his退号
+    var params = {
+      params: [{
+        admID: this.state.admDr,
+        repaywID: id,
+        pcFlag: 'Y'
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '03040016',
+      data: params,
+      success: function (res) {
+        // 关闭加载框
+        setTimeout(() => {
+          if (res.errorCode === '0') {
+            message.success('退号成功!')
+            this.setState({
+              count: '',
+              returnFlag: 'N', // 复诊标识
+              priorFalag: 'N', // 优先标识
+              regFlag: 'N', // 取号标识
+              cancleRegFlag: 'N', // 退号标识
+              cancleAPPFlag: 'N', // 取消预约标识
+              regPrintFlag: 'N', // 重打凭条标识
+              APPPrintFlag: 'N', // 重打发票
+            })
+            this.hideModal('isShowBackNumModal')
+            this.loadRegisterMsg()
+            this.FindOPChargeExceptionInfo('')    //查询异常数据
+
+          }
+          this.childLoadExamine.close();
+        }, 2000)
+      }
+    });
+  }
+
+  /**
+   * @ByYQL: 退号请求展示公共组件加载等待框,
+   * 避免快速操作导致数据混乱
+   * Create 2021-12-6
+   */
+  onLoadModalRef = (ref) => {
+    this.childLoadExamine = ref;
+  };
+
+  // 复诊
+  visitDoctor() {
+    var params = {
+      params: [{
+        regQueID: this.state.regQueDr,
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '03040015',
+      data: params,
+      success: function (res) {
+        if (res.errorCode === '0') {
+          message.success('操作成功!')
+          this.loadRegisterMsg()
+        }
+      }
+    });
+  }
+
+  // 优先
+  loadPriority() {
+    var params = {
+      params: [{
+        regQueID: this.state.regQueDr,
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '03040014',
+      data: params,
+      success: function (res) {
+        if (res.errorCode === '0') {
+          message.success('操作成功!')
+          this.loadRegisterMsg()
+        }
+      }
+    });
+  }
+
+  /**
+  * @ByYQL: 挂号前,判断险种类型是否有值
+  * Create 2021-12-17
+  * @ByGJG: 添加是否有多个号源的判断
+  */
+  outPreAuditFun(data) {
+    // console.log('险种类型:'+this.state.insuranceId);
+    if (this.state.insuAlertBeforeAdm == 'Y') {   //为Y:需要险种类型
+      if (this.state.insuranceId && this.state.insuranceId != 'undefined') {
+        if (data && data.resModelSelect && data.resModelSelect.length > 1) {
+          this.setState({
+            resModelSelect: data.resModelSelect,
+            chooseDocObj: data
+          }, () => {
+            this.modifyVisible(true)
+          })
+        } else {
+          this.showRegistrOrOrder(data)
+        }
+      } else {
+        message.warning('险种类型不能为空,请在左侧选择险种类型')
+      }
+    } else {
+      console.log('this.state.insuAlertBeforeAdm', this.state.insuAlertBeforeAdm)
+      // 当号源数大于一个时,弹出下拉框选择号源,否则不需选择
+      if (data && data.resModelSelect && data.resModelSelect.length > 1) {
+        this.setState({
+          resModelSelect: data.resModelSelect,
+          chooseDocObj: data
+        }, () => {
+          this.modifyVisible(true);
+        })
+      } else {
+        this.showRegistrOrOrder(data);
+      }
+    }
+  }
+
+  // 预挂号回滚(预挂号异常撤消)
+  RollBACKOPCharge = async () => {
+    let { admID, chargeRecodeId } = this.state
+    // 判断付款记录是否可以撤消
+    if (chargeRecodeId != '') {
+      // 判断付款记录是否是医保记录
+      var paramsdata = {
+        params: [{
+          'recordinvID': chargeRecodeId, // 付款记录串
+          'invtype': 'PAY', // his交易流水
+          'userID': JSON.parse(window.sessionStorage.userData).userID || '', // 操作人
+          'ip': this.state.ipConfig?.ipv4 || '', // ip
+          'hospID': JSON.parse(window.sessionStorage.userData).hospID || '', // 医院
+        }]
+      }
+      let hisdataobj = await INSUYBUtil.GoTOHISHttp(paramsdata, '05210047'); // 调用his接口
+      if (hisdataobj.errorCode != '0') {
+        message.warn(res.errorMessage);
+        return false;
+      }
+      var insuPayID = hisdataobj.insuPayIDinfo
+      let insuAdmObj = hisdataobj.insuAdmObj
+      if (insuPayID != '') {
+        // 医保退费
+        // 组织结算入参
+        let cancleSetlInpar = {
+          params: [{
+            'admID': this.state.admID || '',
+            'recordID': this.state.chargeRecodeId || '',
+            'billID': '',
+            'userID': this.state.userData.userID || '',
+            'locID': this.state.userData.locID,
+            'hospID': this.state.userData.hospID, // 医院idm
+            'groupID': this.state.userData.groupID, // 角色id
+            'ip': this.state.ipConfig?.ipv4 || '',
+            'patID': this.state.patientMsg.patID, // 病人id
+            'psn_no': insuAdmObj.psn_no,
+            'mdtrt_id': insuAdmObj.mdtrt_id,
+            'insuplc_admdvs': insuAdmObj.insuplc_admdvs,
+            'setl_id': insuAdmObj.setl_id,
+            'interfaceDr': insuAdmObj.interfaceDr
+          }],
+          'insuAdmObj': insuAdmObj,
+          'businessType': 'M5C',
+          operationType: 'CancelSettlementOP',
+          'hospID': this.state.userData.hospID, // 医院id
+          session: [(this.state.userData)]
+        }
+        let cancleSetlRtn = await INSUYBUtil.insuNew('Settlement', cancleSetlInpar);
+        console.log('cancleSetlRtn', cancleSetlRtn)
+        let res = React.$isJsonString(cancleSetlRtn) ? JSON.parse(cancleSetlRtn) : {};
+        if (res?.errorCode == '0') {
+          // this.setState({ insuAdmID: res.insuAdmID });
+          Keup.ModalMessage(3, this, '医保撤销结算成功!', '自动关闭', 'destroy', '确定', 'success')
+        }
+        else {
+          message.warn(res?.errorMessage || '动态库返回异常!');
+          this.setState({ mask: false })
+          return false;
+        }
+      }
+    }
+    // 预挂号回滚(预挂号异常撤消)
+    var data = {
+      params: [{
+        'admID': admID, // 应该ID
+        'hisTradeNum': '', // his交易流水
+        'userID': this.state.userData.userID || '', // 操作人
+        'hospID': this.state.userData.hospID || '', // 医院
+        'ip': this.state.ipConfig?.ipv4 || '', // ip
+      }]
+    }
+    let hisdataobj = await INSUYBUtil.GoTOHISHttp(data, '05210093'); // 调用his接口
+    if (hisdataobj.errorCode != '0') {
+      message.warn(res.errorMessage);
+      return false;
+    }
+    else {
+      // 将选中对象置空
+      this.setState({
+        chooseDocObj: {},
+        chooseRegTitleID: ''
+      });
+      //this.clearInput();
+      this.input.focus();
+      this.setState({
+        patientData: [],
+        locId: '',
+        returnFlag: 'N',
+        priorFalag: 'N',
+        regFlag: 'N',
+        cancleRegFlag: 'N',
+        cancleAPPFlag: 'N',
+        regPrintFlag: 'N',
+        APPPrintFlag: 'N',
+        count: '',
+        confirmLoading: false,
+        admID: '',
+        regOperationDateID: '',
+        chargeRecodeId: '',
+        accmID: '',
+        paywIDinfo: '',
+        resSeqNoId: '',
+        maypayData: [],
+        moneyData: ''
+      });
+      this.hideModal('isNewShowRegistrModal');
+    }
+    return true;
+  }
+
+  // 修改弹窗状态
+  modifyVisible = (visible) => {
+    // 选中的ID置空
+    this.setState({ isShowResModel: visible, chooseRegTitleID: '' })
+  }
+
+  // 确定
+  handleOk = () => {
+    this.setState({ isShowResModel: false })
+    this.showRegistrOrOrder(this.state.chooseDocObj)
+  }
+
+  // 下拉框传值
+  handleSelectResModel(e) {
+    this.setState({
+      chooseRegTitleID: e
+    })
+  }
+
+  /**
+   * @ByYQL: 原代码onDoubleClick双击事件直接调用该方法
+   * 现添加事前审核逻辑,先走outPreAuditFun
+   * Create 2021-12-17
+   */
+  showRegistrOrOrder(data) {
+    var invNo = '';
+    var currentInvNo = '';
+    // 对发票号进行截取
+    if (this.state.currentInvNoInfo) {
+      var currentInvNoInfo = this.state.currentInvNoInfo;
+      invNo = currentInvNoInfo.substring(currentInvNoInfo.indexOf('^') + 1);
+      currentInvNo = invNo.substring(invNo.indexOf('^') + 1);
+    }
+    if (Util.isEmpty(this.state.groupConfig) || (this.state.groupConfig && this.state.groupConfig.IfChargeFlag == 'N')) {
+      message.error('无收费权限,暂时无法挂号');
+      return
+    }
+
+    if (this.state.orderStatus) { // 预约挂号
+      this.handleToOrder(data);
+    } else {
+      if (!Util.isEmpty(this.state.registerInfo) && this.state.registerInfo.noChargeFlag == 'N') {
+        if (this.state.groupConfig && this.state.groupConfig.IfInvNo == 'Y' && Util.isEmpty(currentInvNo)) {
+          message.error('当前无可用发票,无法挂号');
+          return;
+        }
+      }
+      this.showRegistrModal(data);
+    }
+  }
+
+  // 预约
+  handleToOrder(data) {
+    if (parseInt(data.registedNum) >= parseInt(data.registNum)) {
+      message.error('号源已满,请选择其他科室或者坐诊医生');
+      return
+    }
+    // 手机号码校验
+    var mobile = /^[1-9]\d{10}$/;
+    var phone = this.state.mobilephone;
+    if (phone && !mobile.test(phone)) {
+      message.error('手机号码输入格式不正确,请重新输入')
+      return
+    }
+    var idCard = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
+    var cardNo = this.state.credNo;
+    if (cardNo && !idCard.test(cardNo) && this.state.typeCode == '01') {
+      message.error('身份证号码输入格式不正确,请重新输入')
+      return
+    }
+    var { bookName, bookSex, credType, credNo, credTypeData } = this.state;
+    if (this.state.patientMsg || (bookName && bookSex && (credType || (credTypeData ? credTypeData[0].id : '')) && credNo)) {
+      var params = {
+        params: [{
+          patID: this.state.patientMsg ? (this.state.patientMsg.patID) : '',
+          resDetailID: data.resDetailID,
+          chooseRegTitleID: this.state.chooseRegTitleID
+        }]
+      }
+      $http.post('urlDeault', this, {
+        code: '03040018',
+        data: params,
+        success: function (res) {
+          if (res.errorCode === '0') {
+            this.setState({
+              orderData: res.data,
+              setRowId: res.data.resDetail[0].id,
+              orderSchData: res.data.resDetail[0]
+            })
+          }
+        }
+      });
+      this.setState({
+        isShowToOrderModal: true,
+        orderSchData: data
+      })
+    } else {
+      this.setState({
+        orderStyle: true
+      })
+      message.error('必填信息不能为空')
+    }
+  }
+
+  // 预约
+  handleSubmitOrder(id, code) {
+    var params = {}
+    if (this.state.patientMsg && this.state.patientMsg.patID) {
+      params = {
+        params: [{
+          patID: this.state.patientMsg ? this.state.patientMsg.patID : '',
+          resDetailID: this.state.orderSchData ? this.state.orderSchData.resDetailID : '',
+          userID: this.state.userData.userID,
+          bookMethodID: 'Win', // 写死
+          resTimeID: code ? code : this.state.bookCode,
+          chooseRegTitleID: this.state.chooseRegTitleID
+        }]
+      }
+    } else {
+      params = {
+        params: [{
+          resDetailID: this.state.orderSchData ? this.state.orderSchData.resDetailID : '',
+          userID: this.state.userData.userID,
+          bookMethodID: 'Win', // 写死
+          resTimeID: code ? code : this.state.bookCode,
+          bookName: this.state.bookName,
+          patCredTypeID: this.state.credType ? this.state.credType : (this.state.credTypeData ? this.state.credTypeData[0].id : ''),
+          patCredNo: this.state.credNo,
+          patMobile: this.state.mobilephone,
+          patSexID: this.state.bookSex,
+          patBirthDate: this.state.birthDayDate,
+          patAddress: this.state.patAddress,
+          chooseRegTitleID: this.state.chooseRegTitleID
+        }]
+      }
+    }
+    $http.post('urlDeault', this, {
+      code: '03040011',
+      data: params,
+      success: function (res) {
+        if (res.errorCode === '0') {
+          var date = new Date();
+          // message.success('预约成功!')
+          let secondsToGo = this.state.userData && this.state.userData.messageTime;
+          const modal = Modal.success({
+            title: '预约成功',
+            content: <span>弹框将在&nbsp;<span style={{ fontSize: 16, color: 'red' }}>{secondsToGo}</span>&nbsp;秒后关闭.</span>
+          });
+          const timer = setInterval(() => {
+            secondsToGo -= 1;
+            modal.update({
+              content: <span>弹框将在&nbsp;<span style={{ fontSize: 16, color: 'red' }}>{secondsToGo}</span>&nbsp;秒后关闭.</span>
+            });
+          }, 1000);
+          setTimeout(() => {
+            clearInterval(timer);
+            modal.destroy();
+          }, secondsToGo * 1000);
+          this.hideModal('isShowToOrderModal');
+          this.clearInput();
+          this.setState({
+            showDate: false,
+            date: date,
+            showNewDate: false,
+            //activeKey: '2',
+            patientData: [],
+            orderStatus: false,
+            activeKey: '1'
+          }, () => {
+            this.loadSchedulingMsg();
+            this.loadConfigFee();
+          });
+        }
+      }
+    });
+    // 将选中对象置空
+    this.setState({
+      chooseDocObj: {},
+      chooseRegTitleID: ''
+    })
+  }
+
+  // 取消预约弹框
+  showCannelOrderModal() {
+    this.setState({
+      isCancelOrderModal: true
+    })
+  }
+  // 查询费用异常
+  FindOPChargeExceptionInfo = (patNo) => {
+    let data = {}
+    data = {
+      params: [{
+        hospID: JSON.parse(window.sessionStorage.userData).hospID,
+        chargeUserID: this.state.userData.userID,
+        patNo: this.getQueryString('posId'),
+        cardTypeID: this.state.cardTypeId ? this.state.cardTypeId : (this.state.cardStatus ? this.state.cardStatus : this.getQueryString('cardTypeId')),//cardTypeDr -->cardTypeID
+        cardNo: (this.state.cardNum ? this.state.cardNum : (this.getQueryString('cardNum') || '')),
+      }]
+    }
+    $http.post('urlS', this, {
+      code: '05210022',
+      data: data,
+      success: function (res) {
+        if (+res.errorCode === 0 && res.recordInfo) {
+          if (i < res.recordInfo.length) {
+            message.error('你存在收费异常,请到收费异常界面处理')
+          }
+        }
+      }
+    })
+  }
+  // 重打凭条
+  printEntrySlip() {
+    var params = {
+      params: [{
+        admID: this.state.admDr
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '03040027',
+      data: params,
+      success: function (res) {
+        if (res.errorCode === '0') {
+          message.success('操作成功!')
+          if (!Util.isEmpty(res.result)) {
+            $loadTemplate('Registration', res.result);
+          }
+        }
+      }
+    });
+  }
+
+  // 重打发票
+  printInvoice() {
+    var params = {
+      params: [{
+        admID: this.state.admDr
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '03040028',
+      data: params,
+      success: function (res) {
+        if (res.errorCode === '0') {
+          message.success('操作成功!')
+          if (!Util.isEmpty(res.result.data)) {
+            $loadTemplate(res.result.template, res.result.data);
+          }
+        }
+      }
+    });
+  }
+
+  // 取消预约
+  cannelRegistr() {
+    var params = {
+      params: [{
+        bookScheduleID: this.state.bookScheduleDr
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '03040013',
+      data: params,
+      success: function (res) {
+        if (res.errorCode === '0') {
+          message.success('取消预约成功!')
+          this.loadRegisterMsg()
+          this.hideModal('isCancelOrderModal')
+        }
+      }
+    });
+  }
+
+  disabledDate(e) {
+    var date = new Date()
+    return e && e < moment(date).startOf('day');
+  }
+
+  onBlurCardNo() {
+    var idCard = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
+    var cardNo = this.state.credNo;
+    if (!Util.isEmpty(cardNo) && !idCard.test(cardNo) && this.state.typeCode == '01') {
+      message.error('身份证号码输入格式不正确,请重新输入')
+      return
+    }
+  }
+
+  // 回车键校验录入病人信息
+  checkMessage(e) {
+    if (e.keyCode == '13') {
+      // 手机号码校验
+      var mobile = /^[1-9]\d{10}$/;
+      var phone = this.state.mobilephone;
+      // if (!mobile.test(phone)) {
+      //     message.error('手机号码输入格式不正确,请重新输入')
+      //     return
+      // }
+      var idCard = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
+      var cardNo = this.state.credNo;
+      if (!Util.isEmpty(cardNo) && !idCard.test(cardNo) && this.state.typeCode == '01') {
+        message.error('身份证号码输入格式不正确,请重新输入')
+        return
+      }
+      var params = {
+        params: [{
+          credTypeID: (this.state.credType ? this.state.credType : (this.state.credTypeData ? this.state.credTypeData[0].id : undefined)),
+          credNo: this.state.credNo
+        }]
+      }
+      $http.post('urlDeault', this, {
+        code: '03040019',
+        data: params,
+        success: function (res) {
+          if (res.errorCode === '0') {
+            if (Util.isEmpty(res.patInfo.patCredNo)) {
+              message.error('当前用户不存在')
+              this.bookPhone.current.focus()
+            }
+            this.setState({
+              checkData: res.patInfo,
+              isShowCorrelationModal: res.patInfo.patCredNo ? true : false,
+              checkMsg: res.message
+            })
+          }
+        }
+      });
+      this.getSex()
+    }
+  }
+
+  // 获取性别
+  getSex() {
+    var { credNo, sexData } = this.state;
+    let sexno, sex
+    if (credNo && credNo.length == 18) {
+      sexno = credNo.substring(16, 17)
+    } else if (credNo.length == 15) {
+      sexno = credNo.substring(14, 15)
+    } else {
+      return false
+    }
+    var boyID = '', girlID = ''
+    if (!Util.isEmpty(sexData)) {
+      for (var i = 0; i < sexData.length; i++) {
+        if (sexData[i].code == '2') {
+          boyID = sexData[i].id
+        } else if (sexData[i].code == '1') {
+          girlID = sexData[i].id
+        }
+      }
+    }
+
+    var birthdayno, birthdaytemp
+    if (credNo && credNo.length == 18) {
+      birthdayno = credNo.substring(6, 14)
+    } else if (credNo && credNo.length == 15) {
+      birthdaytemp = credNo.substring(6, 12)
+      credNo = '19' + birthdaytemp
+    } else {
+    }
+    var birthday = birthdayno.substring(0, 4) + '-' + birthdayno.substring(4, 6) + '-' + birthdayno.substring(6, 8)
+    var date = moment(birthday).format(dayFormat)
+    var tempid = sexno % 2;
+    if (tempid == 0) {
+      this.setState({
+        bookSex: boyID,
+        birthDayDate: date
+      }, () => {
+        this.autoAge()
+      })
+    } else {
+      this.setState({
+        bookSex: girlID,
+        birthDayDate: date
+      }, () => {
+        this.autoAge()
+      })
+    }
+  }
+
+  // 跳号
+  loadInvoiceNum(currentNo, jumpReason, data) {
+    var params = {
+      params: [{
+        hospID: this.state.userData.hospID,
+        userID: this.state.userData.userID,
+        paytype: 'R',
+        staInvNo: data[0].currentInvNo,
+        endInvNo: data[0].preFix + currentNo,
+        jumpReason: jumpReason
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '05210027',
+      data: params,
+      success: function (res) {
+        if (res.errorCode == '0') {
+          message.success('跳号成功!')
+          this.hideModal('isShowInvoiceNumModal')
+          this.loadConfigFee()
+        }
+      }
+    });
+  }
+
+  submitCorrelation() {
+    var { checkData } = this.state;
+    this.setState({
+      patientMsg: checkData,
+      correCode: true
+    })
+    this.hideModal('isShowCorrelationModal')
+    // this.bookTime.current.focus()
+  }
+
+  onBlurPhone() {
+    var mobile = /^[1-9]\d{10}$/;
+    var phone = this.state.mobilephone;
+    if (phone && !mobile.test(phone)) {
+      message.error('手机号码输入格式不正确,请重新输入')
+      return
+    }
+  }
+
+  onKeyDownCheckPhone(e) {
+    if (e.keyCode == '13') {
+      // 手机号码校验
+      var mobile = /^[1-9]\d{10}$/;
+      var phone = this.state.mobilephone;
+      if (phone && !mobile.test(phone)) {
+        message.error('手机号码输入格式不正确,请重新输入')
+        return
+      } else {
+        this.bookAddress.current.focus()
+      }
+    }
+  }
+
+  onChangeSex() {
+    this.bookPhone.current.focus()
+  }
+
+  onKeyDownCheckName(e) {
+    if (e.keyCode == '13') {
+      var reg = /^(([a-zA-Z+\.?\·?a-zA-Z+]{2,30}$)|([\u4e00-\u9fa5+\s·?\u4e00-\u9fa5+]{2,30}$))/;
+      if (!reg.test(this.state.bookName)) {
+        message.error('姓名格式填写错误,请重新输入!'); // 校验未通过
+        return;
+      } else {
+        this.bookCardType.current.focus()
+      }
+    }
+  }
+
+  onKeyDownPatNote(e) {
+    if (e.keyCode == '13') {
+      // console.log(e.target.value)
+      var params = {
+        params: [{
+          patID: !Util.isEmpty(this.state.patientMsg) ? this.state.patientMsg.patID : '', // patientDr -->patID
+          userID: this.state.userData.userID,
+          note: e.target.value
+        }]
+      }
+      $http.post('urlDeault', this, {
+        code: '03040046',
+        data: params,
+        success: function (res) {
+          if (res.errorCode == '0') {
+
+          }
+        }
+      });
+    }
+  }
+
+  onBlurPatNote(e) {
+    var params = {
+      params: [{
+        patID: !Util.isEmpty(this.state.patientMsg) ? this.state.patientMsg.patID : '', // patientDr -->patID
+        userID: this.state.userData.userID,
+        note: e.target.value
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '03040046',
+      data: params,
+      success: function (res) {
+        if (res.errorCode == '0') {
+
+        }
+      }
+    })
+  }
+
+  // 获取证件类型的code
+  onSelectCardType(e, id) {
+    this.setState({
+      typeCode: id.props.code
+    })
+    this.bookCard.current.focus()
+  }
+
+  onClickCardType(id) {
+    this.setState({
+      typeCode: id
+    })
+    this.bookCard.current.focus()
+  }
+
+  onColumnRef = (ref) => {
+    this.columnRef = ref;
+  }
+
+  // 医保读卡
+  handleReadCardModal = async () => {
+    this.hideModal('isShowReadCardModal')
+    // 需要医保结算
+    let dllInputdata = {
+      'params': [{
+        'userID': this.state.userData.userID,
+        qrCode: this.state.qrCode,
+        icCardNum: this.state.icCardNum,
+        hospID: this.state.userData.hospID
+      }],
+      'code': '05210036'
+    }
+    let data = await INSUYBUtil.insuYBHFReadCard(dllInputdata);
+    // let data = "{\"errorCode\":\"0\",\"errorMessage\":\"成功\",\"result\":{\"userparams\":[{\"usernm\":\"马元新\",\"akb020\":\"0326\",\"akb021\":\"安徽医科大学第二附属医院\",\"aka101\":\"\",\"aab034\":\"\",\"aab300\":\"\"}],\"patYBparams\":[{\"aac001\":\"06471531\",\"akc020\":\"AC8822849\",\"aac002\":\"340103198403243525\",\"akc021\":\"011\",\"vvv001\":\"在职职工\",\"aab001\":\"107262\",\"aab004\":\"合肥普瑞眼科医院有限公司\",\"aac003\":\"张甦\",\"aac004\":\"2\",\"vvv002\":\"女性\",\"akc023\":\"36\",\"aab034\":\"\",\"aab300\":\"\",\"aab301\":\"340199\",\"aaa146\":\"合肥市市本级\",\"akc087\":\"587.63\",\"akc141\":\"001\",\"ska702\":\"\",\"skc111\":\"00\",\"skc112\":\"职工\",\"akb020\":\"0326\",\"akb021\":\"安徽医科大学第二附属医院\",\"skc516\":\"\",\"skc519\":\"\",\"mkc111\":\"11\",\"mkc112\":\"享受生育保险\",\"smc053\":\"\",\"smc055\":\"\",\"smc056\":\"\"}]}}"
+    let res = JSON.parse(data);
+    console.dir(res)
+    if (res.errorCode == '0') {
+      let YBPatDivdata = await INSUYBUtil.GetYBPatDivdata(res.result);
+      if (YBPatDivdata.errorCode == '0') {
+        let Divdata = YBPatDivdata.result;
+        this.setState({
+          issueData: res.result,
+          Divdata: Divdata,
+          isShowMedicalInsuranceModal: true, // 医保病人信息弹框
+        })
+      }
+    }
+    else {
+      message.warn(res.errorMessage);
+      return;
+    }
+  }
+
+  handleSubmitMedical() {
+    this.hideModal('isShowMedicalInsuranceModal')
+    this.loadMedicalInsurance(); // 医保结算
+  }
+
+  loadMedicalInsurance() {
+    var admReasonFlags = '';
+    var admId = '';
+    var defAdmId = '';
+    if (this.state.admReason) {
+      var admReason = this.state.admReason;
+      for (var i = 0; i < admReason.length; i++) {
+        if (admReason[i].defaultFlag == 'Y') {
+          admReasonFlags = true;
+          admId = admReason[i].id;
+          break;
+        } else {
+          admReasonFlags = false;
+          defAdmId = admReason[0].id;
+        }
+      }
+    }
+    var params = {
+      params: [{
+        userID: this.state.userData.userID,
+        admReasonID: this.state.admReasonId ? this.state.admReasonId : (admReasonFlags ? admId : defAdmId),
+        appointID: this.state.registrMsg && this.state.registrMsg.resDetailID,
+        patID: this.state.patientMsg ? (this.state.patientMsg.patID) : '',
+        hospID: this.state.userData.hospID,
+        groupID: this.state.userData.groupID,
+        locID: this.state.userData.locID,
+        admType: 'R',
+        ip: this.state.ipConfig?.ipv4 || '',
+        readCard: this.state.issueData
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '05210041',
+      data: params,
+      success: function (res) {
+        if (res.errorCode == '0') {
+          this.setState({
+            isNewShowRegistrModal: true
+          })
+        }
+      }
+    });
+  }
+
+  // 病历本费
+  handleCheckbox(e) {
+    this.setState({
+      checked: e.target.checked
+    }, () => {
+      if (this.state.checked == true) {
+        this.loadMedicalMsg(); // 获取病历本费
+      }
+    })
+  }
+
+  handleGreenCheckbox(name, e) {
+    if (e.target.checked == true) {
+      this.setState({
+        [name]: e.target.checked,
+        visitFlag: false
+      })
+    } else {
+      this.setState({
+        [name]: e.target.checked
+      })
+    }
+  }
+
+  handleVisitCheckbox(name, e) {
+    if (e.target.checked == true) {
+      this.setState({
+        [name]: e.target.checked,
+        greenFlag: false
+      })
+    } else {
+      this.setState({
+        [name]: e.target.checked
+      })
+    }
+  }
+
+  handleVisitFlagCheckbox(name, e) {
+    this.setState({
+      [name]: e.target.checked
+    })
+  }
+
+  loadMedicalMsg() {
+    var params = {
+      params: [{
+        patID: !Util.isEmpty(this.state.patientMsg) ? this.state.patientMsg.patID : '', // patientDr -->patID
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '03050252',
+      data: params,
+      success: function (res) {
+        if (res.errorCode == '0') {
+          this.setState({
+            medicalFee: !Util.isEmpty(res.result) ? parseFloat(res.result) : 0
+          })
+        }
+      }
+    });
+  }
+
+  handleOtherSelectChange(name, e, code) {
+    this.setState({
+      [name]: e,
+      otherPayCode: code ? code.props.code : '',
+      otherPayMoney: 0
+    })
+  }
+
+  handleMedicalRecord() {
+    this.setState({
+      isShowMedicalModal: true
+    })
+  }
+
+  handleCharge() {
+    if (Util.isEmpty(this.state.otherPayWayId)) {
+      message.error('请选择支付方式!')
+      return
+    }
+    var admReasonFlags = '';
+    var admId = '';
+    var defAdmId = '';
+    if (this.state.admReason) {
+      var admReason = this.state.admReason;
+      for (var i = 0; i < admReason.length; i++) {
+        if (admReason[i].defaultFlag == 'Y') {
+          admReasonFlags = true;
+          admId = admReason[i].id;
+          break;
+        } else {
+          admReasonFlags = false;
+          defAdmId = admReason[0].id;
+        }
+      }
+    }
+    var params = {
+      params: [{
+        userID: this.state.userData.userID,
+        groupID: this.state.userData.groupID,
+        cardID: this.state.patientMsg.cardID,
+        locID: this.state.userData.locID, // loc -->locID
+        hospID: this.state.userData.hospID,
+        bookFlag: this.state.checked ? 'Y' : 'N',
+        patID: this.state.patientMsg.patID, // patientDr -->patID
+        contractUnitID: this.state.userData.hospID,
+        admReasonID: this.state.admReasonId ? this.state.admReasonId : (admReasonFlags ? admId : defAdmId),
+        paywStr: [{
+          payWayID: this.state.otherPayWayId,
+          payWayAmt: this.state.medicalFee,
+          hospID: ''
+        }],
+        insuTypeCode: this.state.insuranceId, // 险种类型编码
+        chooseRegTitleID: this.state.chooseRegTitleID
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '03040007',
+      data: params,
+      success: function (res) {
+        if (res.errorCode === '0') {
+          this.hideModal('isShowMedicalModal')
+          message.success('操作成功!')
+          this.setState({
+            checked: false
+          })
+        }
+      }
+    });
+    // 将选中对象置空
+    this.setState({
+      chooseDocObj: {},
+      chooseRegTitleID: ''
+    })
+  }
+
+  updatePayModal = async (paywIDinfo) => {
+    // 结算确认
+    this.CompletionPatRegister(paywIDinfo)
+  }
+
+  onRef = ref => {
+    this.onFace = ref
+  }
+
+  // 人脸识别
+  handleShowFaceRecognition() {
+    this.setState({
+      isShowFaceRecognitionModal: true,
+      numbet: undefined
+    })
+  }
+
+  loadCallBackMsg(data) {
+    this.setState({
+      paitId: data
+    }, () => {
+      this.loadFaceData()
+    })
+  }
+
+  loadFaceData(data) {
+    var params = {
+      params: [{
+        number: this.state.paitId || data,
+        cardTypeID: this.state.cardTypeId ? this.state.cardTypeId : (this.state.cardStatus ? this.state.cardStatus : this.getQueryString('cardTypeId')),//cardTypeDr -->cardTypeID
+        cardNo: (this.state.cardNum ? this.state.cardNum : (this.getQueryString('cardNum') || '')),
+        present: 'Y'
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '03040004',
+      data: params,
+      success: function (res) {
+        this.loadRegisterMsg(res.data); // 查询患者挂号/预约记录
+        if (res.errorCode === '0') {
+          this.textInput.current.focus()
+          message.success('患者信息查询成功!')
+          this.setState({
+            patientMsg: res.data,
+            admReason: res.data.admReason,
+            mobilephone: '',
+            // credNo: this.getQueryString('cardNum'),
+            // paitId: this.getQueryString('posId'),
+            count: '',
+            returnFlag: 'N',
+            priorFalag: 'N',
+            regFlag: 'N',
+            cancleRegFlag: 'N',
+            cancleAPPFlag: 'N',
+            regPrintFlag: 'N',
+            APPPrintFlag: 'N',
+            note: res.data.note,
+            visitedFlag: res.data.visitedFlag,
+          }, () => {
+            this.currentMeter()
+          })
+        }
+      }
+    });
+  }
+
+  handleTablsChange = key => {
+    var date = new Date(); // 点击预约,日期+1
+    this.setState({
+      showDate: key === '1' ? false : true,
+      activeKey: key,
+      date: key === '1' ? date : moment(new Date()).add(1, 'days').format(),
+      orderStatus: key === '1' ? false : true
+    }, () => {
+      this.loadSchedulingMsg()
+      this.loadRegisterMsg()
+      this.loadRegistrNumData()
+      if (this.state.activeKey === '2') {
+        this.bookName.current.focus();
+      }
+    })
+  }
+
+  // 采集人像
+  handleAdress() {
+    let data = {}
+    data = {
+      params: [{
+        hospID: sessionStorage.userData ? JSON.parse(sessionStorage.userData).hospID : '',
+        userID: sessionStorage.userData ? JSON.parse(sessionStorage.userData).userID : '',
+        locID: sessionStorage.userData ? JSON.parse(sessionStorage.userData).locID : '',
+      }]
+    }
+    $http.post('urlDeault', this, {
+      code: '03030114',
+      data: data,
+      success: function (res) {
+        if (res.errorCode == '0') {
+          let windowHost = ''
+          let url = ''
+          if (process.env.NODE_ENV === 'production') {
+            windowHost = window.location && window.location.origin ? window.location.origin : (window.location && window.location.protocol ? (window.location.protocol + '//' + window.location.hostname) : '');
+            url = !Util.isEmpty(res.result) ? res.result.upLoadUrl : '';
+          } else {
+            windowHost = 'https://172.16.1.6'
+            url = !Util.isEmpty(res.result) ? res.result.upLoadUrl : '';
+          }
+          this.setState({
+            actionUrl: !Util.isEmpty(res.result) ? res.result.upLoadUrl : '',
+            downLoadUrl: !Util.isEmpty(res.result) ? res.result.downLoadUrl : '',
+            faceImgAdress: url.indexOf('http') !== -1 ? url : windowHost + url,
+            imageAddress: url.indexOf('http') !== -1 ? url : windowHost
+          }, () => {
+            // console.dir(this.state.faceImgAdress)
+          })
+        }
+      }
+    });
+  }
+
+  handleOpenPhoto() {
+    if (Util.isEmpty(this.state.patientMsg) || Util.isEmpty(this.state.patientMsg.patID)) {
+      message.error('请先输入病人信息,进行人脸采集')
+      return
+    }
+    this.setState({
+      tackPhoto: true
+    })
+  }
+
+  // 人脸特征值录入
+  onRef = (ref) => {
+    this.refChildFace = ref
+  }
+
+  getBase64 = (img, callback) => {
+    const reader = new FileReader();
+    reader.addEventListener('load', () => callback(reader.result));
+    reader.readAsDataURL(img);
+  }
+
+  loadDara = (v, img) => {
+    this.setState({
+      faceImg: v,
+    })
+    let fiel = this.dataURLtoFile(img, 'x.jpg')
+    this.getBase64(fiel, imageUrl =>
+      this.setState({
+        // imageUrl,
+        // loading: false,
+        // fileList: info.file,
+      }, () => {
+        let that = this
+        let formData = new FormData();
+        formData.append("file", fiel);
+        const option = {
+          method: 'post',
+          mode: 'cors',
+          headers: {},
+          body: formData
+        };
+        // http://218.17.212.34:53774/uploadFile?fileType=health
+        // let url  = "http://172.18.100.86:3008/uploadFile?fileType=health";
+        fetch(that.state.faceImgAdress, option).then(response => {
+          if (response.ok) {
+            that.refChildFace.clearVideo()
+            that.setState({
+              loadingDom: false,
+              tackPhoto: false
+            })
+            return response.text();
+          } else {
+            that.setState({
+              loadingDom: false
+            })
+            console.log('网络错误,请稍后再试');
+            return;
+          }
+        }).then(data => {
+          let dataS = JSON.parse(data);
+          if (+dataS.errorCode == 0) {
+            // let str = that.state.faceImg.match(/(\S*)\/uploadFile/)[1];
+            that.setState({
+              // [name]:this.state.faceImg + dataS.filePath,
+              imageUrl: dataS.filePath,
+              defaultImg: that.state.downLoadUrl + dataS.filePath
+            }, () => {
+              this.handleUpdateMessage()
+            })
+          } else {
+            message.warning(dataS.errorMessage, this.state.userData && this.state.userData.messageTime)
+            that.setState({
+              // [name]:this.state.faceImg + dataS.filePath,
+            })
+          }
+          // this.state.fileList.push(obj);
+          // this.setState({imgList:this.state.imgList});
+        }).catch(error => {
+          message.warning("上传失败,请重新上传", this.state.userData && this.state.userData.messageTime);
+        })
+      }),
+    );
+  }
+
+  // 将base64转换为文件
+  dataURLtoFile = (dataurl, filename) => {
+    var arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1],
+      bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);
+    while (n--) {
+      u8arr[n] = bstr.charCodeAt(n);
+    }
+    return new File([u8arr], filename, { type: mime });
+  }
+
+  handleUpdateMessage() {
+    var params = {
+      params: [{
+        faceValue: this.state.faceImg && this.state.faceImg || undefined, // 记录人脸特征值
+        patPicture: this.state.imageUrl && this.state.imageUrl || undefined,
+        patID: this.state.patientMsg ? this.state.patientMsg.patID : '',
+        patUpdateUserID: this.state.userData.userID,
+        userID: this.state.userData.userID,
+      }]
+    }
+    $http.post('urlS', this, {
+      code: '03030012',
+      data: params,
+      success: function (res) {
+        if (res.errorCode == '0') {
+          message.success('保存成功!')
+        }
+      }
+    });
+  }
+
+  render() {
+    const { loading, totalWidth, magneticCardFeeFlag } = this.state;
+    // 时间段0000144406
+    let resModelOption = []
+    this.state.resModelSelect && this.state.resModelSelect.map((item, index) => {
+      resModelOption.push(<Option key={index} value={item.regTitleID}>{item.regTitleDesc}</Option>)
+    })
+
+    // 时间段0000144406
+    let timeRangeOption = []
+    this.state.timeRange && this.state.timeRange.map((item, index) => {
+      timeRangeOption.push(<Option key={index} value={item.id}>{item.descripts}</Option>)
+    })
+
+    // 卡类型
+    let cardTypeOption = []
+    this.state.cardTypeData && this.state.cardTypeData.map((item, index) => {
+      cardTypeOption.push(<Option key={index} value={item.id}><Tooltip title={item.descripts}>{item.descripts}</Tooltip></Option>)
+    })
+
+    // 证件类型
+    let credTypeOption = []
+    this.state.credTypeData && this.state.credTypeData.map((item, index) => {
+      credTypeOption.push(<Option key={index} value={item.id} code={item.code}
+        onClick={this.onClickCardType.bind(this, item.code)}>{item.descripts}</Option>)
+    })
+
+    // 性别
+    let sexOption = []
+    this.state.sexData && this.state.sexData.map((item, index) => {
+      sexOption.push(<Option key={index} value={item.id} onClick={this.onChangeSex.bind(this)}>{item.descripts}</Option>)
+    })
+
+    // 身份标签
+    let socialStatusOption = []
+    this.state.socialStatusData && this.state.socialStatusData.map((item, index) => {
+      socialStatusOption.push(<Option key={index} value={item.id}>{item.descripts}</Option>)
+    })
+
+    // 病人类型
+    let patTypeOption = []
+    this.state.patTypeData && this.state.patTypeData.map((item, index) => {
+      patTypeOption.push(<Option key={index} value={item.id + ''}>{item.descripts}</Option>)
+    })
+
+    //结算类型admReason
+    let admReasonOption = []
+    this.state.admReason && this.state.admReason.map((item, index) => {
+      admReasonOption.push(<Option key={index} value={item.id} opinsutype={item.OPInsuType} insuAlertBeforeAdm={item.insuAlertBeforeAdm}>{item.descripts}</Option>)
+    })
+
+    //险种类型insurance
+    let insuranceOption = []
+    this.state.insuranceData && this.state.insuranceData.map((item, index) => {
+      insuranceOption.push(<Option key={index} value={item.id} code={item.code}>{item.descripts}</Option>)
+    })
+
+    //获取科室信息
+    let departMentOption = []
+    this.state.departMentData && this.state.departMentData.map((item, index) => {
+      departMentOption.push(<Option key={index} value={item.id} code={item.descripts}
+        name={item.descriptsSPCode}>{item.descripts}</Option>)
+    })
+
+    //获取科室医生信息
+    let depDoctorOption = []
+    this.state.depDoctorData && this.state.depDoctorData.map((item, index) => {
+      depDoctorOption.push(<Option key={index} value={item.descripts + '-' + item.code + item.descriptsSPCode + '*' + item.id + ''}>{item.descripts}</Option>)
+    })
+
+    //接待人
+    let unawaresListOption = []
+    this.state.unawaresList && this.state.unawaresList.map((item, index) => {
+      unawaresListOption.push(<Option key={index} value={item.id} code={item.descripts} name={item.descriptsSPCode}>{item.descripts}</Option>)
+    })
+
+    //支付方式
+    var payWayOtherOption = []
+    this.state.newPayWay && this.state.newPayWay.map((item, index) => {
+      payWayOtherOption.push(<Option key={index} value={item.paywID} code={item.paywCode}>{item.paywDesc}</Option>)
+    })
+
+    var patStatus = false
+    if (!Util.isEmpty(this.state.patTypeData) && !Util.isEmpty(this.state.patientMsg)) {
+      var patType = this.state.patTypeData
+      for (var i = 0; i < patType.length; i++) {
+        if (patType[i].id == this.state.patientMsg.patTypeID) {
+          patStatus = true
+          break;
+        }
+      }
+    } else {
+      if (!Util.isEmpty(this.state.patientMsg) && !Util.isEmpty(this.state.patientMsg.patTypeID)) {
+        patStatus = false
+      }
+    }
+
+    var admReasonFlag = '';
+    var admId = '';
+    var defAdmId = '';
+    if (this.state.admReason) {
+      var admReason = this.state.admReason;
+      for (var i = 0; i < admReason.length; i++) {
+        if (admReason[i].defaultFlag == 'Y') {
+          admReasonFlag = true;
+          admId = admReason[i].id;
+          break;
+        } else {
+          admReasonFlag = false;
+          defAdmId = admReason[0].id;
+        }
+      }
+    }
+
+    var { activeKey, schedulData, patientMsg, checkData, parms, isShowResModel } = this.state;
+    var registOption = [];
+    if (this.state.schedulData && this.state.schedulData.length > 0) {
+      schedulData && schedulData.map((item, index) => {
+        registOption.push(
+          <Col span={4} style={{ marginRight: '10px', width: '240px', marginBottom: '10px' }} key={index + 'col'}>
+            <Card
+              className={this.state.rowIds == index && this.state.setBabkground ? (parseInt(item.registedNum) >= parseInt(item.registNum) ? '' : 'scheduling-card-hover') : ''}
+              id={this.state.rowIds == index && this.state.setBabkground ? (
+                parseInt(item.registedNum) >= parseInt(item.registNum) ? 'registr-card-bgd-disabled' : 'registr-bgd-hover-id') : (
+                parseInt(item.registedNum) >= parseInt(item.registNum) ? 'registr-card-bgd-disabled' : '')}
+              title={(
+                <div className={this.state.rowIds == index && this.state.setBabkground ? (parseInt(item.registedNum) >= parseInt(item.registNum) ? 'header-class' : 'registr-bgd-hover') : ''}>
+                  <div style={{ display: 'flex' }}>
+                    {parseInt(item.registedNum) >= parseInt(item.registNum) ? <div className='noNum-sprite'></div> : null}
+                    <div>
+                      <div>
+                        <div className={item.onLineStatusCode == 'Y' ? 'cs-bg cs-onLine' : 'cs-bg cs-out'}>
+                          {item.onLineStatusCode == 'Y' ? '在线' : '离线'}
+                        </div>
+                      </div>
+                    </div>
+                  </div>
+                </div>
+              )}
+              extra={(
+                <div style={{ fontSize: '14px' }}>
+                  <span style={{ color: '#999', fontSize: '12px', marginRight: '8px' }}>已用/待诊/总号源</span>
+                  <span style={{ color: '#007AFF' }}>{item.registedNum}</span>
+                  /
+                  <span>{item.waitNum}</span>
+                  /
+                  <span>{item.registNum}</span>
+                </div>
+              )}
+              bordered={true}
+              key={index + 'crad'}
+              tabIndex={'-1'}
+              hoverable={true}
+              // id={parseInt(item.registedNum) >= parseInt(item.registNum) ? 'registr-card-bgd-disabled' : ''}
+              // className={this.state.rowIds == index && this.state.setBabkground ? 'registration-card-bg' : ''}
+              onKeyDown={this.handleRegistrBtn.bind(this, index, item)}
+              onMouseOver={this.addRegistrBtn.bind(this, index)}
+              onMouseEnter={this.addFloatElement.bind(this, index, item)}
+              onDoubleClick={this.outPreAuditFun.bind(this, item)}
+              onClick={this.addBackground.bind(this, index)}
+              onMouseLeave={this.removeRegistrBtn.bind(this)}
+            >
+              <div style={{ display: 'flex' }}>
+                {this.state.mouseElement && index == this.state.rowIds && this.state.floatStatus && this.state.orderStatus ? (
+                  <Tooltip getPopupContainer={() => document.querySelector('.new-registration-body')} placement="bottom"
+                    overlayStyle={{ maxHeight: '30%', maxWidth: '28%', zIndex: '10000' }}
+                    title={this.loadElementDome()}>
+                    <div style={{ background: '#eff9f2', width: '100%' }}>
+                      <div style={{ display: 'flex' }}>
+                        {/* <div className={item.sex == '1' ? 'card-splice-boy' : 'card-splice-girl'}></div> */}
+                        {!Util.isEmpty(item.image) ? (
+                          <div style={{ width: 86, height: 120 }}><img src={item.image} style={{ width: '100%', height: '100%' }} /></div>
+                        ) : (
+                          <div className={item.docSexCode == '1' ? 'card-splice-boy' : 'card-splice-girl'}></div>
+                        )}
+                        <div style={{ marginLeft: 10 }}>
+                          <div className="cart-doc-name">{item.docName}</div>
+                          <div>
+                            <span style={{ color: '#888888', marginRight: "6x" }}><Icon className='registr-card-regtitle' /></span>
+                            <span style={{ color: '#666666' }}>{item.regTitle}</span>
+                          </div>
+                          <div style={{ margin: "4px 0" }}>
+                            <span style={{ marginRight: "6px" }}><Icon className='registr-card-locDescripts' /></span>
+                            <span style={{ color: '#13C2C2' }}>{item.locDescripts}</span>
+                          </div>
+                          <span style={{ color: '#888888', marginRight: "6px" }}>
+                            <Icon className='registr-card-price' />
+                          </span>
+                          <span style={{ color: '#007AFF' }}>{item.price}</span>
+                          <span style={{ color: '#666666' }}> 元/次</span>
+                        </div>
+                      </div>
+                      <div style={{ marginTop: '8px' }}>
+                        <span>专长:</span> {item.experise !== '' ? item.experise : '暂未维护专长项目'}
+                      </div>
+                    </div>
+                  </Tooltip>
+                ) : (
+                  <div style={{ /**background: '#eff9f2',**/ width: '100%' }}>
+                    <div style={{ display: 'flex' }}>
+                      {!Util.isEmpty(item.image) ? (
+                        <div style={{ width: 86, height: 120 }}><img src={item.image} style={{ width: '100%', height: '100%' }} /></div>
+                      ) : (
+                        <div className={item.docSexCode == '1' ? 'card-splice-boy' : 'card-splice-girl'}></div>
+                      )}
+                      <div style={{ marginLeft: 10 }}>
+                        <div className="cart-doc-name">{item.docName}</div>
+                        <div>
+                          <span style={{ color: '#888888', marginRight: '6px' }}><Icon className='registr-card-regtitle' /></span>
+                          <span style={{ color: '#666666' }}>{item.regTitle}</span>
+                        </div>
+                        <div style={{ margin: '4px 0' }}>
+                          <span style={{ marginRight: '6px' }}><Icon className='registr-card-locDescripts' /></span>
+                          <span style={{ color: '#13C2C2' }}>{item.locDescripts}</span>
+                        </div>
+                        <span style={{ color: '#888888', marginRight: '6px' }}>
+                          <Icon className="registr-card-price" />
+                        </span><span style={{ color: '#007AFF' }}>{item.price}</span>
+                        <span style={{ color: '#666666' }}> 元/次</span>
+                      </div>
+                    </div>
+                    <div className="registr-card-expertise" style={{ marginTop: 8, paddingRight: 12 }}>
+                      <Tooltip placement="right" title={item.experise ? '专长:' + item.experise : ''} overlayClassName="registr-card-expertise-tooltip">
+                        <div className={(item.experise ? 'registr-card-expertise-content' : '') + ' ellipsis'} style={{ width: '96%' }}>
+                          <span>专长:</span>
+                          {item.experise !== '' ? (
+                            <span>{item.experise}</span>
+                          ) : <span style={{ color: '#999' }}>暂无数据</span>}
+                        </div>
+                      </Tooltip>
+                    </div>
+                  </div>
+                )}
+              </div>
+              <div style={{ display: 'none' }}>
+                {this.state.rowIds == index && this.state.mouseElement ? (
+                  this.state.orderStatus ? (
+                    parseInt(item.registedNum) >= parseInt(item.registNum) ? (
+                      <div className="registr-btn">
+                        <Button autoFocus size='small' style={{ color: '#666666', height: '5px', border: '0px' }}></Button>
+                      </div>
+                    ) : (
+                      <div
+                        className="registr-btn"
+                        onClick={this.handleToOrder.bind(this, item)}
+                      >
+                        <Button autoFocus size="small" style={{ color: '#007AFF', height: '5px', border: '0px' }}></Button>
+                      </div>
+                    )
+                  ) : (
+                    this.state.groupConfig && this.state.groupConfig.IfChargeFlag ? (
+                      parseInt(item.registedNum) >= parseInt(item.registNum) ? (
+                        <div className="registr-btn">
+                          <Button autoFocus size="small" style={{ color: '#666666', height: '5px', border: '0px' }}></Button>
+                        </div>
+                      ) : (
+                        <div
+                          className="registr-btn"
+                          onClick={this.showRegistrModal.bind(this, item)}
+                        >
+                          <Button autoFocus size="small" style={{ color: '#007AFF', height: '5px', border: '0px' }}></Button>
+                        </div>
+                      )
+                    ) : null)
+                ) : null}
+              </div>
+            </Card>
+          </Col>
+        )
+      })
+    } else {
+      registOption.push(
+        <div key="1" style={{ color: 'red', textAlign: 'center', fontSize: '15px' }}>
+          <img src={noData} />
+          <div>当前时间段,该科室无坐诊医生</div>
+        </div>
+      )
+    }
+    var invNo = '';
+    var currentInvNo = ''
+    // 对发票号进行截取
+    if (this.state.currentInvNoInfo) {
+      var currentInvNoInfo = this.state.currentInvNoInfo;
+      invNo = currentInvNoInfo.substring(currentInvNoInfo.indexOf('^') + 1);
+      currentInvNo = invNo.substring(invNo.indexOf('^') + 1)
+    }
+
+    let registerDom = (
+      <div className="register-dom">
+        <div className="register-inpit">
+          <span className="nlb-lable">日期:</span>
+          <DatePicker
+            placeholder="时间"
+            style={{ width: '158px' }}
+            disabledDate={this.disabledDate.bind(this)}
+            disabled={!this.state.showDate}
+            onChange={this.chengeTime.bind(this)}
+            value={this.state.date ? moment(this.state.date, dayFormat) : ''}
+          />
+          <span className="nlb-lable" style={{ marginLeft: 20 }}>时段:</span>
+          <Select
+            placeholder="时段"
+            style={{ width: '158px' }}
+            value={this.state.timeRangeId ? this.state.timeRangeId : this.state.timeSolt}
+            onChange={this.handleSelectChange.bind(this, 'timeRangeId')}
+            allowClear={true}
+            getPopupContainer={triggerNode => triggerNode.parentNode}
+          >
+            {timeRangeOption}
+          </Select>
+          <span className="nlb-lable" style={{ marginLeft: 20 }}>科室:</span>
+          <Select
+            placeholder="请选择科室"
+            style={{ width: '158px' }}
+            onChange={this.changeDepartMent.bind(this)} showSearch={true}
+            filterOption={(input, option) =>
+              option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
+              || option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0
+              || option.props.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
+            }
+            value={this.state.locId ? this.state.locId : undefined}
+            ref={this.textInput}
+            allowClear={true}
+            getPopupContainer={triggerNode => triggerNode.parentNode}
+          >
+            {departMentOption}
+          </Select>
+          <span className="nlb-lable" style={{ marginLeft: 20 }}>医生:</span>
+          <Select
+            placeholder="请选择医生"
+            style={{ width: '158px' }}
+            onChange={this.changeDepDoctor.bind(this)} showSearch={true}
+            ref={this.textSelect}
+            allowClear={true} getPopupContainer={triggerNode => triggerNode.parentNode}
+          >
+            {depDoctorOption}
+          </Select>
+        </div>
+        <Row style={{ height: store.getState().tableHeight.y - 99 + 'px', overflow: 'auto' }}>
+          {registOption}
+        </Row>
+      </div>
+    )
+
+    return (
+      <div className="new-registration-body">
+        {/**读卡 */}
+        <ReadCard ref={ref => this.readCard = ref}></ReadCard>
+        <ColumnAuthoritysModel
+          clientWidth="800px"
+          compontName="RegistrationPage"
+          configType="C"
+          onRef={this.onColumnRef}
+          reloadData={this.initData}
+        />
+
+        {/**收费弹窗 */}
+        <NewShowRegPayModal
+          isShow={this.state.isNewShowRegistrModal}
+          patientMsg={this.state.patientMsg}
+          registrMsg={this.state.registrMsg}
+          newPayWay={this.state.newPayWay}
+          checked={this.state.checked}
+          swipeCardFlag={this.state.swipeCardFlag}
+          medicalFee={this.state.medicalFee}
+          magneticCardFee={this.state.magneticCardFee}
+          confirmLoading={this.state.confirmLoading}
+          RollBACKOPCharge={this.RollBACKOPCharge.bind(this)}
+          updatePayModal={this.updatePayModal.bind(this)}
+          maypayData={this.state.maypayData}
+          chargeRecodeId={this.state.chargeRecodeId}
+          moneyData={this.state.moneyData}
+          onHide={this.hideModal.bind(this, 'isNewShowRegistrModal')}>
+        </NewShowRegPayModal>
+
+        {/**设置发票号  */}
+        <ShowInvoiceNumModal
+          isShow={this.state.isShowInvoiceNumModal}
+          currentInvNo={currentInvNo}
+          onSubmit={this.loadInvoiceNum.bind(this)}
+          onHide={this.hideModal.bind(this, 'isShowInvoiceNumModal')}>
+        </ShowInvoiceNumModal>
+
+        {/**退号 */}
+        <ShowBackNumModal
+          isShow={this.state.isShowBackNumModal}
+          registrFee={this.state.registrFee}
+          patientMsg={this.state.patientMsg}
+          recordData={this.state.recordData}
+          onSubmit={this.registrBackNum.bind(this)}
+          onHide={this.hideModal.bind(this, 'isShowBackNumModal')}>
+        </ShowBackNumModal>
+
+        {/**预约 , bookSex, credType, credNo, mobilephone*/}
+        <ShowToOrderModal
+          isShow={this.state.isShowToOrderModal}
+          onSubmit={this.handleSubmitOrder.bind(this)}
+          orderData={this.state.orderData}
+          bookStatus={this.state.bookStatus}
+          setRowId={this.state.setRowId}
+          bookName={this.state.bookName}
+          bookSex={this.state.bookSex}
+          credNo={this.state.credNo}
+          mobilephone={this.state.mobilephone}
+          recordData={this.state.orderSchData}
+          date={this.state.date}
+          onHide={this.hideModal.bind(this, 'isShowToOrderModal')}>
+        </ShowToOrderModal>
+
+        {/**取消预约 */}
+        <CancelOrderModal
+          isShow={this.state.isCancelOrderModal}
+          patientMsg={this.state.patientMsg}
+          recordData={this.state.recordData}
+          onSubmit={this.cannelRegistr.bind(this)}
+          onHide={this.hideModal.bind(this, 'isCancelOrderModal')}></CancelOrderModal>
+
+        {/**取号 */}
+        <ShowGetNumModal
+          isShow={this.state.isShowGetNumModal}
+          patientMsg={this.state.patientMsg}
+          recordData={this.state.recordData}
+          newPayWay={this.state.newPayWay}
+          onSubmitGetNum={this.onSubmitGetNum.bind(this)}
+          registrSumData={this.state.getRegistrData}
+          onHide={this.hideModal.bind(this, 'isShowGetNumModal')}>
+        </ShowGetNumModal>
+
+        {/**关联信息弹框 */}
+        <CorrelationModal
+          isShow={this.state.isShowCorrelationModal}
+          onSubmit={this.submitCorrelation.bind(this)}
+          checkData={this.state.checkMsg}
+          onHide={this.hideModal.bind(this, 'isShowCorrelationModal')}>
+        </CorrelationModal>
+
+        {/**医保病人弹框 */}
+        <ShowMedicalInsuranceModal
+          isShow={this.state.isShowMedicalInsuranceModal}
+          Divdata={this.state.Divdata}
+          onSubmit={this.handleSubmitMedical.bind(this)}
+          onHide={this.hideModal.bind(this, 'isShowMedicalInsuranceModal')}>
+        </ShowMedicalInsuranceModal>
+
+        {/**人脸识别 */}
+        <ShowFaceRecognitionModal
+          isShow={this.state.isShowFaceRecognitionModal}
+          businessCode="003" onRef={this.onRef}
+          onSubmit={this.loadCallBackMsg.bind(this)}
+          onHide={this.hideModal.bind(this, 'isShowFaceRecognitionModal')}>
+        </ShowFaceRecognitionModal>
+
+        <Modal
+          width="1120px"
+          visible={this.state.tackPhoto}
+          title="采集人像标识"
+          onCancel={() => {
+            this.refChildFace.clearVideo()
+            this.setState({
+              tackPhoto: false
+            }, () => {
+
+            })
+          }}
+          centered={true}
+          footer={null}
+        >
+          {this.state.tackPhoto && this.state.tackPhoto ? <FaceRecognitionManual ref={this.onRef} loadDara={this.loadDara}></FaceRecognitionManual> : ''}
+        </Modal>
+
+        <Spin tip="挂号中,请稍后……" spinning={loading}>
+          <div className="register-left-message">
+            <div className="nrts-left" style={{ width: '15%', float: 'left' }}>
+              <div style={{ textAlign: 'center', padding: '10px 0', borderBottom: '1px solid #e8e8e8' }}>
+                {!Util.isEmpty(this.state.defaultImg) || (patientMsg && patientMsg.patImage) ? (
+                  <div onClick={this.handleOpenPhoto.bind(this)}>
+                    <img
+                      src={this.state.defaultImg ? this.state.defaultImg : (patientMsg.patImage ? (this.state.imageAddress + patientMsg.patImage) : '')}
+                      style={{ width: '120px', height: '125px', cursor: 'pointer' }}
+                    />
+                  </div>
+                ) : (
+                  <div
+                    style={{
+                      width: '120px', height: '125px', cursor: 'pointer', textAlign: 'center',
+                      borderRadius: '4px', border: '2px dashed #e8e8e8', marginLeft: '25%'
+                    }}
+                    onClick={this.handleOpenPhoto.bind(this)}
+                  >
+                    <div style={{ marginTop: 40 }}>
+                      <Icon type="plus" />
+                      <div style={{ marginTop: 5, fontSize: '16px' }}>采集人像</div>
+                    </div>
+                  </div>
+                )}
+              </div>
+              <div className="nrts-left-top">
+                <div className="nrts-left-top-content">
+                  <Select
+                    placeholder="请选择卡类型"
+                    getPopupContainer={triggerNode => triggerNode.parentNode}
+                    value={this.state.cardTypeId ? this.state.cardTypeId : (this.state.cardStatus)}
+                    onSelect={this.changeCardType.bind(this)} style={{ width: '100%' }}
+                  >
+                    {cardTypeOption}
+                  </Select>
+                  {this.state.cardTypeId == '8' || this.state.cardTypeId == '11' ? (
+                    <div style={{ margin: '8px 0' }}>
+                      <Input
+                        placeholder="电子凭证编码"
+                        style={{ width: 'calc(100% - 96px)', marginTop: '8px', marginRight: '14px' }}
+                        ref={(input) => this.input = input}
+                        value={this.state.medVoucherObj?.erQrCode || ''}
+                      />
+                      <Button type='primary' onClick={() => this.readMedVoucher()} style={{ width: '82px', padding: 0 }}>电子凭证</Button>
+                    </div>
+                  ) : ''}
+                  <div style={{ margin: '8px 0' }}>
+                    <Input
+                      placeholder="请输入身份证号码"
+                      style={{ width: 'calc(100% - 96px)', marginRight: '14px' }}
+                      onKeyDown={this.handleSelectPersonMsg.bind(this, 'msg')}
+                      ref={(input) => this.input = input}
+                      value={this.state.readCardNo}
+                      onChange={this.changeCardNum.bind(this)}
+                    />
+                    <Button type='primary' onClick={this.handleReadCard.bind(this)} style={{ width: '82px', padding: 0 }}>读身份证</Button>
+                  </div>
+                  {this.state.cardTypeId == '10' ? (
+
+                    <div style={{ margin: '8px 0' }}>
+                      {/**读卡 */}
+                      <ReadCard ref={ref => this.readCard2 = ref}></ReadCard>
+                      <Search
+                        placeholder="请输入或者读卡" style={{ width: 'calc(100% - 96px)', marginRight: '14px' }}
+                        onChange={Util.commonInputChange.bind(this, 'patCardNo')}
+                        value={this.state.patCardNo}
+                        enterButton="读卡"
+                        readOnly={this.state.readMode == 'R' ? true : false}
+                        onPressEnter={(e) => console.dir(e)}
+                        onKeyDown={this.loadKeyDown.bind(this)}
+                        onSearch={this.handleReadCard2.bind(this)}
+                      />
+                    </div>
+                  ) :
+                    <div style={{ margin: '8px 0' }}>
+                      <Input
+                        placeholder="病人ID/身份证/手机" style={{ width: 'calc(100% - 96px)', marginRight: '14px' }}
+                        onKeyDown={this.handleSelectPersonMsg.bind(this, 'msg')} ref={(input) => this.input = input}
+                        value={this.state.paitId ? this.state.paitId : ''}
+                        onChange={this.changePaitId.bind(this)}
+                      />
+                      <Button type="primary" onClick={this.handleShowFaceRecognition.bind(this)} style={{ width: '82px', padding: 0 }}>人脸识别</Button>
+                    </div>
+                  }
+                </div>
+              </div>
+              <div className="nrts-left-bottom">
+                <div className="nlb-form-item">
+                  <span className="nlb-lable">病人ID号:</span>
+                  <Input placeholder='请输入病人ID' disabled={patientMsg ? true : false} value={patientMsg ? patientMsg.patNo : this.state.patinId}
+                    onChange={Util.commonInputChange.bind(this, 'patinId')} style={{ width: 'calc(100% - 86px)' }} /></div>
+                <div className="nlb-form-item">
+                  <div className="nlb-lable"><span style={{ color: '#f5222d', fontFamily: 'SimSun', marginLeft: '10%' }}>*</span>姓名:</div>
+                  <TextArea
+                    autoSize={{ minRows: 1, maxRows: 3 }}
+                    placeholder="回车键校验"
+                    style={{ width: 'calc(100% - 86px)' }}
+                    disabled={patientMsg ? true : false}
+                    onChange={Util.commonInputChange.bind(this, 'bookName')}
+                    ref={this.bookName}
+                    className={this.state.orderStyle && Util.isEmpty(patientMsg) && Util.isEmpty(checkData) && Util.isEmpty(this.state.bookName) ? 'registr-btn-style' : ''}
+                    onKeyDown={this.onKeyDownCheckName.bind(this)}
+                    value={this.state.bookName ? this.state.bookName : (this.state.correCode && checkData ? checkData.patName : (patientMsg ? patientMsg.patName : this.state.bookName))} />
+                </div>
+                <div className="nlb-form-item">
+                  <div className="nlb-lable"><span style={{ color: '#f5222d', fontFamily: 'SimSun' }}>*</span><span>证件类型:</span></div>
+                  <Select style={{ width: 'calc(100% - 86px)' }} getPopupContainer={triggerNode => triggerNode.parentNode}
+                    onChange={Util.handleSelectChange.bind(this, 'credType')}
+                    onSelect={this.onSelectCardType.bind(this)}
+                    ref={this.bookCardType}
+                    disabled={patientMsg ? true : false} value={patientMsg ? patientMsg.patCredTypeID :
+                      (this.state.credType ? this.state.credType : (this.state.credTypeData ? this.state.credTypeData[0].id : undefined))} placeholder='请选择证件类型'>
+                    {credTypeOption}
+                  </Select>
+                </div>
+                <div className="nlb-form-item">
+                  <div className="nlb-lable"><span style={{ color: '#f5222d', fontFamily: 'SimSun' }}>*</span><span >证件号码:</span></div>
+                  <Input placeholder='请输入证件号码,按回车键校验' disabled={patientMsg ? true : false} maxLength={18}
+                    onKeyDown={this.checkMessage.bind(this)}
+                    ref={this.bookCard}
+                    onBlur={this.onBlurCardNo.bind(this)}
+                    className={this.state.orderStyle && Util.isEmpty(patientMsg) && Util.isEmpty(checkData) && Util.isEmpty(this.state.credNo) ? 'registr-btn-style' : ''}
+                    onChange={Util.commonInputChange.bind(this, 'credNo')}
+                    value={this.state.credNo ? this.state.credNo : (checkData ? checkData.patCredNo : (patientMsg ? patientMsg.patCredNo : this.state.credNo))}
+                    style={{ width: 'calc(100% - 86px)' }} />
+                </div>
+                <div className="nlb-form-item">
+                  <div className="nlb-lable"><span style={{ color: '#f5222d', fontFamily: 'SimSun', marginLeft: '10%' }}>*</span>性别:</div>
+                  <Select style={{ width: 'calc(100% - 86px)' }} getPopupContainer={triggerNode => triggerNode.parentNode}
+                    placeholder='请选择性别'
+                    ref={this.bookSex}
+                    className={this.state.orderStyle && Util.isEmpty(patientMsg) && Util.isEmpty(checkData) && Util.isEmpty(this.state.bookSex) ? 'registr-btn-style' : ''}
+                    onChange={Util.handleSelectChange.bind(this, 'bookSex')}
+                    onSelect={this.onChangeSex.bind(this)}
+                    value={this.state.bookSex ? this.state.bookSex : (this.state.correCode && checkData ? checkData.patSexID : (patientMsg ? patientMsg.patSexID : this.state.bookSex))}
+                    disabled={patientMsg ? true : false}>
+                    {sexOption}
+                  </Select>
+                </div>
+                <div className="nlb-form-item">
+                  <span className="nlb-lable">出生日期:</span>
+                  <DatePicker placeholder='出生日期' disabled={patientMsg ? true : false} style={{ width: 'calc(100% - 138px)' }}
+                    onChange={this.changeBirthDay.bind(this)}
+                    className="nlb-picker"
+                    format={this.state.birthDayDate ? 'YYYY-MM-DD' : 'YYYYMMDD'}
+                    value={patientMsg && patientMsg.patBirthDate ? moment(patientMsg.patBirthDate, dayFormat) :
+                      (this.state.birthDayDate ? moment(this.state.birthDayDate, dayFormat) : undefined)} />
+                  <Tooltip title={patientMsg ? patientMsg.patAge : this.state.yearOld}>
+                    <Input style={{ width: '48px' }} placeholder='年龄' disabled={patientMsg ? true : false}
+                      onChange={Util.commonInputChange.bind(this, 'yearOld')}
+                      className="picker-input"
+                      value={patientMsg ? patientMsg.patAge : this.state.yearOld} /></Tooltip>
+                </div>
+                <div className="nlb-form-item">
+                  <div className="nlb-lable"><span style={{ color: '#f5222d', fontFamily: 'SimSun' }}>*</span>联系电话:</div>
+                  <Input style={{ width: 'calc(100% - 86px)' }} disabled={patientMsg ? true : false} maxLength={11}
+                    onChange={Util.commonInputChange.bind(this, 'mobilephone')}
+                    onBlur={this.onBlurPhone.bind(this)}
+                    className={this.state.orderStyle && Util.isEmpty(patientMsg) && Util.isEmpty(checkData) && Util.isEmpty(this.state.mobilephone) ? 'registr-btn-style' : ''}
+                    onKeyDown={this.onKeyDownCheckPhone.bind(this)}
+                    ref={this.bookPhone}
+                    value={this.state.mobilephone ? this.state.mobilephone : (this.state.correCode && checkData ? checkData.patMobile : (patientMsg ? patientMsg.patMobile : this.state.mobilephone))}
+                    placeholder='请输入手机号码,按回车键校验' />
+                </div>
+                <div className="nlb-form-item">
+                  <span className="nlb-lable">病人类型:</span>
+                  <Select style={{ width: 'calc(100% - 86px)' }} getPopupContainer={triggerNode => triggerNode.parentNode}
+                    onChange={Util.handleSelectChange.bind(this, 'personType')} allowClear
+                    disabled={patientMsg ? true : false} value={patientMsg ? (patStatus == true ? patientMsg.patTypeID : undefined) : this.state.personType} placeholder='请选择病人类型'>
+                    {patTypeOption}
+                  </Select>
+                </div>
+                <div className="nlb-form-item">
+                  <span className="nlb-lable">账户余额:</span>
+                  <Input addonBefore='¥' style={{ width: 'calc(100% - 86px)' }} disabled={patientMsg ? true : false}
+                    onChange={Util.commonInputChange.bind(this, 'personMoney')}
+                    className="nlb-person-mone"
+                    value={patientMsg ? patientMsg.accountBalance : this.state.personMoney} placeholder='请输入账户余额' />
+                </div>
+                <div className="nlb-form-item">
+                  <span className="nlb-lable">结账费别:</span>
+                  <Select style={{ width: 'calc(100% - 86px)' }} getPopupContainer={triggerNode => triggerNode.parentNode}
+                    onChange={this.handleSelectChange.bind(this, 'admReasonId')}
+                    value={this.state.admReasonId ? this.state.admReasonId :
+                      (admReasonFlag ? admId : (defAdmId ? defAdmId : undefined))} placeholder='请选择结账类型'>
+                    {admReasonOption}
+                  </Select>
+                </div>
+                <div className="nlb-form-item">
+                  <span className="nlb-lable">报备人员:</span>
+                  <Input
+                    style={{ width: 'calc(100% - 86px)' }}
+                    value={patientMsg ? patientMsg.adminUser : this.state.adminUser}
+                    placeholder="请输入报备人员"
+                    disabled
+                    onChange={Util.commonInputChange.bind(this, 'adminUser')}
+                  />
+                </div>
+                <div className="nlb-form-item">
+                  <span className="nlb-lable">接待人员:</span>
+                  <Input
+                    style={{ width: 'calc(100% - 86px)' }}
+                    placeholder="请输入接待人员"
+                    onChange={Util.commonInputChange.bind(this, 'patSource')}
+                  />
+                </div>
+
+                {/* 门诊事前审核添加险种类型 */}
+                {this.state.insuAlertBeforeAdm == 'Y' ? <div className="nlb-form-item">
+                  <span className="nlb-lable">险种类型:</span>
+                  <Select style={{ width: 'calc(100% - 86px)' }} getPopupContainer={triggerNode => triggerNode.parentNode}
+                    onChange={this.handleSelectChange.bind(this, 'insuranceId')}
+                    value={this.state.insuranceId ? this.state.insuranceId : undefined} placeholder='请选择险种类型'>
+                    {insuranceOption}
+                  </Select></div> : ''}
+                <div className="nlb-form-item">
+                  <div className="nlb-lable">备注:</div>
+                  <TextArea style={{ width: 'calc(100% - 86px)' }}
+                    autoSize={{ minRows: 1 }}
+                    onChange={Util.commonInputChange.bind(this, 'note')}
+                    ref={this.note}
+                    onBlur={this.onBlurPatNote.bind(this)}
+                    value={this.state.note} />
+                </div>
+                <div style={{ textAlign: 'right' }}>
+                  <Checkbox checked={this.state.checked} disabled={Util.isEmpty(this.state.patientMsg)}
+                    onChange={this.handleCheckbox.bind(this)}>病历本费</Checkbox>
+                  <Checkbox checked={this.state.greenFlag} disabled={Util.isEmpty(this.state.patientMsg)}
+                    onChange={this.handleGreenCheckbox.bind(this, 'greenFlag')}>绿色号</Checkbox>
+                  <Checkbox checked={this.state.visitFlag} disabled={Util.isEmpty(this.state.patientMsg)}
+                    onChange={this.handleVisitCheckbox.bind(this, 'visitFlag')}>复诊号</Checkbox>
+                </div>
+                <div className='registr-left-button'>
+                  {magneticCardFeeFlag === 'Y' && ( // 是否展示磁卡费勾选标志
+                    <Checkbox
+                      checked={this.state.swipeCardFlag}
+                      disabled={Util.isEmpty(this.state.patientMsg)}
+                      onChange={this.handleVisitFlagCheckbox.bind(this, 'swipeCardFlag')}
+                    >
+                      磁卡费
+                    </Checkbox>
+                  )}
+                  <Checkbox checked={this.state.visitedFlag}
+                    onChange={this.handleVisitFlagCheckbox.bind(this, 'visitedFlag')} disabled={(Util.isEmpty(this.state.patientMsg) || this.state.visitedFlag === "Y") ? true : false}>复诊</Checkbox>
+                  <Button onClick={this.clearInput.bind(this)} size="small" type="danger" style={{ marginLeft: 5 }}>清空(ctrl+z)</Button>
+                </div>
+              </div>
+            </div>
+
+            {/* 左列表 */}
+            <div style={{ float: 'right', width: '84.5%' }}>
+              <div className="new-registration-top-shizi">
+                <div className="divider-vertical-line"></div>
+                <div className="nrts-content" style={{ width: 'calc(100% - 195px)', overflow: 'hidden' }}>
+                  <Tabs activeKey={activeKey} onChange={this.handleTablsChange}>
+                    <TabPane tab="当日挂号" key="1">
+                      {registerDom}
+                    </TabPane>
+                    <TabPane tab="预约挂号" key="2">
+                      {registerDom}
+                    </TabPane>
+                  </Tabs>
+                </div>
+                <div className="divider-vertical-line-right"></div>
+                <div className="nrts-right">
+                  <div className="nr-title">当日号源消耗进度排行</div>
+                  {this.loadRegistrNum()}
+                </div>
+              </div>
+
+              <div className="new-registration-bottom-shizi">
+                <Table columns={this.state.column} dataSource={this.state.patientData}
+                  className={this.state.patientData.length > 0 ? 'registr-table-lists table-body-height' : 'table-body-height'}
+                  // onKeyDown={this.keyDownElement.bind(this)}
+                  scroll={{ x: totalWidth, y: '146px' }}
+                  tabIndex={this.state.rowId}
+                  onRow={this.onClickRow}
+                  bordered
+                  rowClassName={this.setRowClassName}
+                  rowKey={(data) => {
+                    return data.count
+                  }}
+                  onHeaderRow={() => {
+                    return {
+                      onDoubleClick: () => {
+                        this.columnRef.onOpenModel();
+                      },
+                    };
+                  }}
+                  pagination={false}
+                  title={() => {
+                    return (
+                      <div style={{ display: 'flex', justifyContent: 'space-between', padding: '0 24px', boxSizing: 'border-box' }} className="registr-header-btn">
+                        <div
+                          style={{
+                            display: 'flex', fontSize: '14px'
+                          }}
+                          className={(this.state.groupConfig && this.state.groupConfig.IfInvNo == 'Y' && !Util.isEmpty(currentInvNo)) ? "cursor" : ""}
+                          onClick={(this.state.groupConfig && this.state.groupConfig.IfInvNo == 'Y' && !Util.isEmpty(currentInvNo)) ? this.showInvoiceNumModal.bind(this) : null}
+                        >
+                          当前发票号:<span style={{ color: '#007AFF' }}>{currentInvNo}</span>
+                        </div>
+                        <div className="rgistr-btn-screen" style={{ display: 'flex' }}>
+                          <Button type="primary" style={{ marginLeft: '24px', width: '100px' }} size='small' disabled={this.state.regFlag == 'Y' ? false : true}
+                            onClick={this.showGetNumModal.bind(this)}>取号(F2)</Button>
+                          {this.state.cancleRegFlag == 'N' ? <Tooltip title={this.state.cancleRegTips}>
+                            <Button type="primary" style={{ marginLeft: '24px', width: '100px' }} size='small' disabled={this.state.cancleRegFlag == 'Y' ? false : true}
+                              onClick={this.showBackNumModal.bind(this)}>退号(F6)</Button></Tooltip> :
+                            <Button type="primary" style={{ marginLeft: '24px', width: '100px' }} size='small' disabled={this.state.cancleRegFlag == 'Y' ? false : true}
+                              onClick={this.showBackNumModal.bind(this)}>退号(F6)</Button>}
+                          <Button type="primary" style={{ marginLeft: '24px', width: '120px' }} size='small' disabled={this.state.cancleAPPFlag == 'Y' ? false : true}
+                            onClick={this.showCannelOrderModal.bind(this)}>取消预约(F10)</Button>
+                          <Button type="primary" style={{ marginLeft: '24px', width: '120px' }} size='small' disabled={this.state.regPrintFlag == 'Y' ? false : true}
+                            onClick={this.printEntrySlip.bind(this)}>重打凭条(F8)</Button>
+                          <Button type="primary" style={{ marginLeft: '24px', width: '120px' }} size='small' disabled={this.state.APPPrintFlag == 'Y' ? false : true}
+                            onClick={this.printInvoice.bind(this)}>重打发票(F9)</Button></div>
+                      </div>
+                    )
+                  }}>
+                </Table>
+              </div>
+            </div>
+
+            <Modal
+              title="读卡信息"
+              visible={this.state.isShowReadCardModal}
+              onOk={this.handleReadCardModal.bind(this)}
+              onCancel={this.hideModal.bind(this, 'isShowReadCardModal')}
+            >
+              扫描码:<Input style={{ width: 200 }} value={this.state.qrCode} placeholder="请输入扫描码"
+                onChange={Util.commonInputChange.bind(this, 'qrCode')} /><br />
+              IC卡号:<Input style={{ width: 200, marginTop: 10 }} placeholder="请输入IC卡号" value={this.state.icCardNum}
+                onChange={Util.commonInputChange.bind(this, 'icCardNum')} />
+            </Modal>
+
+            <Modal
+              title="病历本费"
+              visible={this.state.isShowMedicalModal}
+              onOk={!Util.isEmpty(this.state.medicalData) ? this.showRegistrModal.bind(this, this.state.medicalData) : this.handleCharge.bind(this)}
+              onCancel={this.hideModal.bind(this, 'isShowMedicalModal')}
+            >
+              <div>
+                <div>支付方式:<Select placeholder="请选择支付方式" style={{ width: 160, marginLeft: 5 }}
+                  value={this.state.otherPayWayId}
+                  onChange={this.handleOtherSelectChange.bind(this, 'otherPayWayId')}>
+                  {payWayOtherOption}</Select></div>
+                <div style={{ marginTop: 10 }}>病历本费:<span style={{ fontSize: '17px', color: 'orange' }}>{this.state.medicalFee}元</span></div>
+              </div>
+            </Modal>
+
+            <Modal
+              title="请选择号源"
+              visible={isShowResModel}
+              destroyOnClose={true}
+              width="600px"
+              onOk={this.handleOk}
+              onCancel={() => this.modifyVisible(false, '')}
+            >
+              <div style={{ textAlign: 'center' }}>
+                号源:
+                <Select placeholder="请选择时段" style={{ width: '180px' }}
+                  onChange={this.handleSelectResModel.bind(this)}>
+                  {resModelOption}
+                </Select>
+              </div>
+            </Modal>
+
+            <Modal
+              title="请输入医保卡号或扫描电子凭证医保码"
+              visible={this.state.cardShow}
+              onOk={this.YBInputSure}
+              onCancel={() => this.setState({ cardShow: false })}
+            >
+              <div>
+                电子凭证:<Input placeholder="请扫描电子凭证医保码回车" value={this.state.qrCode} onChange={(e) => this.onqrCodeChange(e)} onPressEnter={this.YBInputSure}></Input>
+              </div>
+              <div>
+                区域类型:
+                <Radio.Group style={{ marginLeft: '15px' }} onChange={(e) => { this.onAreaTypeChange(e) }} value={this.state.areaType}>
+                  <Radio value="本地">本地</Radio>
+                  <Radio value="省内">省内</Radio>
+                  <Radio value="跨省">跨省</Radio>
+                  <Radio value="省直">省直</Radio>
+                </Radio.Group>
+              </div>
+            </Modal>
+
+            {/*公用加载框*/}
+            <ShowLoadModal
+              onRef={this.onLoadModalRef}
+            />
+          </div>
+        </Spin>
+      </div>
+    )
+  }
+}
+
+export default RegistrationIncludesMedicalInsurance;

Разница между файлами не показана из-за своего большого размера
+ 752 - 905
yarn.lock


Некоторые файлы не были показаны из-за большого количества измененных файлов