You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3149 lines
114 KiB

3 years ago
2 years ago
4 months ago
2 years ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
1 year ago
2 years ago
4 months ago
1 year ago
3 months ago
1 year ago
2 years ago
2 years ago
1 year ago
3 months ago
1 year ago
2 years ago
2 years ago
4 months ago
2 years ago
4 months ago
2 years ago
4 months ago
5 months ago
2 years ago
5 months ago
2 years ago
2 years ago
4 months ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
4 months ago
6 months ago
2 years ago
5 months ago
6 months ago
2 years ago
5 months ago
2 years ago
1 year ago
2 years ago
5 months ago
2 years ago
1 year ago
4 months ago
1 year ago
2 years ago
5 months ago
2 years ago
1 year ago
2 years ago
5 months ago
2 years ago
1 year ago
2 years ago
5 months ago
2 years ago
1 year ago
2 years ago
4 months ago
2 years ago
4 months ago
2 years ago
2 years ago
1 year ago
4 months ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
4 months ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
4 months ago
2 years ago
2 years ago
4 months ago
2 years ago
4 months ago
2 years ago
4 months ago
2 years ago
4 months ago
2 years ago
4 months ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
4 months ago
2 years ago
4 months ago
2 years ago
4 months ago
2 years ago
4 months ago
2 years ago
4 months ago
2 years ago
4 months ago
4 months ago
1 year ago
4 months ago
4 months ago
2 years ago
5 months ago
2 years ago
1 year ago
2 years ago
5 months ago
4 months ago
8 months ago
4 months ago
5 months ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
4 months ago
2 years ago
4 months ago
3 months ago
4 months ago
2 years ago
4 months ago
3 months ago
2 years ago
2 years ago
4 months ago
2 years ago
1 year ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
2 years ago
4 months ago
1 year ago
2 years ago
4 months ago
2 years ago
4 months ago
2 years ago
1 year ago
4 months ago
2 years ago
1 year ago
2 years ago
4 months ago
2 years ago
2 years ago
4 months ago
2 years ago
2 years ago
2 years ago
4 months ago
2 years ago
2 years ago
4 months ago
2 years ago
2 years ago
4 months ago
2 years ago
4 months ago
2 years ago
4 months ago
2 years ago
2 years ago
4 months ago
2 years ago
4 months ago
2 years ago
2 years ago
4 months ago
2 years ago
6 months ago
4 months ago
6 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
2 years ago
4 months ago
2 years ago
2 years ago
4 months ago
2 years ago
6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
5 months ago
4 months ago
4 months ago
5 months ago
3 years ago
3 years ago
4 months ago
3 years ago
3 years ago
3 years ago
1 year ago
4 months ago
1 year ago
4 months ago
3 years ago
3 years ago
1 year ago
3 years ago
4 months ago
1 year ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
6 months ago
5 months ago
2 years ago
2 years ago
2 years ago
4 months ago
4 months ago
3 years ago
3 years ago
4 months ago
2 years ago
6 months ago
5 months ago
3 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
4 months ago
3 years ago
3 months ago
3 years ago
3 years ago
2 years ago
1 year ago
2 years ago
3 months ago
3 months ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
1 year ago
3 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
4 months ago
1 year ago
4 months ago
1 year ago
5 months ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
2 years ago
1 year ago
5 months ago
1 year ago
5 months ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
4 months ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
2 years ago
4 months ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
4 months ago
4 months ago
6 months ago
4 months ago
5 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
5 months ago
4 months ago
5 months ago
3 years ago
3 years ago
3 years ago
2 years ago
1 year ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
2 years ago
1 year ago
2 years ago
5 months ago
2 years ago
1 year ago
2 years ago
1 year ago
6 months ago
4 months ago
6 months ago
4 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
1 year ago
1 year ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
1 year ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
1 year ago
2 years ago
3 years ago
3 years ago
3 years ago
1 year ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
1 year ago
3 years ago
3 years ago
3 years ago
1 year ago
3 months ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
1 year ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
6 months ago
4 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
1 year ago
2 years ago
8 months ago
4 months ago
8 months ago
4 months ago
8 months ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
8 months ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
1 year ago
2 years ago
1 year ago
3 months ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
4 months ago
5 months ago
5 months ago
4 months ago
5 months ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
3 years ago
2 years ago
1 year ago
3 years ago
3 months ago
3 months ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
4 months ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
3 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
1 year ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
1 year ago
4 months ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
3 years ago
2 years ago
2 years ago
1 year ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
1 year ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
1 year ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
1 year ago
3 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
1 year ago
3 months ago
1 year ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
3 months ago
2 years ago
1 year ago
4 months ago
1 year ago
2 years ago
2 years ago
3 months ago
5 months ago
3 years ago
3 years ago
3 months ago
5 months ago
3 months ago
3 years ago
3 years ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
2 years ago
1 year ago
2 years ago
3 months ago
3 months ago
3 months ago
2 years ago
3 months ago
4 months ago
4 months ago
2 years ago
4 months ago
2 years ago
4 months ago
3 months ago
4 months ago
2 years ago
4 months ago
2 years ago
4 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago
1 year ago
4 months ago
2 years ago
4 months ago
2 years ago
1 year ago
4 months ago
2 years ago
1 year ago
3 months ago
1 year ago
1 year ago
1 year ago
3 years ago
2 years ago
2 years ago
1 year ago
2 years ago
4 months ago
2 years ago
4 months ago
4 months ago
4 months ago
2 years ago
4 months ago
4 months ago
4 months ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
2 years ago
4 months ago
4 months ago
4 months ago
1 year ago
4 months ago
4 months ago
3 months ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
5 months ago
3 years ago
1 year ago
3 years ago
2 years ago
1 year ago
3 years ago
1 year ago
3 years ago
1 year ago
2 years ago
2 years ago
4 months ago
2 years ago
4 months ago
4 months ago
4 months ago
4 months ago
1 year ago
4 months ago
2 years ago
1 year ago
2 years ago
4 months ago
4 months ago
4 months ago
1 year ago
2 years ago
1 year ago
6 months ago
1 year ago
2 years ago
2 years ago
3 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
3 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
3 years ago
1 year ago
5 months ago
4 months ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
6 months ago
5 months ago
1 year ago
5 months ago
4 months ago
5 months ago
5 months ago
4 months ago
1 year ago
5 months ago
2 years ago
1 year ago
5 months ago
2 years ago
1 year ago
1 year ago
2 years ago
1 year ago
6 months ago
6 months ago
6 months ago
5 months ago
6 months ago
6 months ago
5 months ago
5 months ago
5 months ago
4 months ago
5 months ago
4 months ago
6 months ago
4 months ago
6 months ago
1 year ago
2 years ago
3 years ago
1 year ago
3 years ago
3 years ago
3 months ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
1 year ago
3 years ago
2 years ago
1 year ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 months ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
1 year ago
3 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
1 year ago
3 years ago
1 year ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
1 year ago
3 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
3 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
3 years ago
2 years ago
2 years ago
6 months ago
2 years ago
1 year ago
2 years ago
6 months ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
4 months ago
6 months ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
2 years ago
6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
2 years ago
2 years ago
2 years ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
1 year ago
4 months ago
1 year ago
2 years ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
4 months ago
5 months ago
4 months ago
5 months ago
4 months ago
5 months ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
3 years ago
3 years ago
3 months ago
2 years ago
3 years ago
3 months ago
3 years ago
3 months ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <template>
  2. <div>
  3. <!--组件主体-->
  4. <div style="display: flex">
  5. <div :style="'width:' + (window.pageWidth - 200 - 145) + 'px;'" @contextmenu.prevent="onContextmenu">
  6. <div>
  7. <u-table :data="tableData" border :height="window.pageHeight < 600
  8. ? 248
  9. : Math.floor(((window.pageHeight - 250) * 2) / 3)
  10. " highlight-current-row @row-click="rowClick" @row-dblclick="dblClick" size="small" row-key="id"
  11. @selection-change="handleSelectionChange" @row-contextmenu="onCellRightClick" ref="info" id="info"
  12. :row-class-name="handleRowClassName" use-virtual :row-height="25" @table-body-scroll="scrollFull"
  13. big-data-checkbox :data-changes-scroll-top="false">
  14. <u-table-column type="selection" width="40" align="center"></u-table-column>
  15. <u-table-column v-for="(item, index) in dragCol" :key="index" :type="dragCol[index].type"
  16. :min-width="dragCol[index].minWidth" :align="dragCol[index].align" :label="item.label"
  17. :prop="dragCol[index].prop" :sortable="dragCol[index].type || dragCol[index].prop == 'sn'
  18. ? false
  19. : true
  20. ">
  21. <template slot-scope="scope" v-if="!dragCol[index].type">
  22. <div v-if="!dragCol[index].type">
  23. <div v-if="dragCol[index].prop == 'sn'">
  24. {{ scope.$index + 1 }}
  25. </div>
  26. <div v-else-if="dragCol[index].prop == 'completeFlag'" :style="`color: ${setPrStatusColor(
  27. scope.row.isAudit,
  28. scope.row.completeFlag
  29. )}`">
  30. {{
  31. scope.row.isAudit == "Y"
  32. ? "已审核"
  33. : dddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName")
  34. }}
  35. </div>
  36. <div v-else-if="dragCol[index].prop == 'qztlType'">
  37. {{
  38. dddw(dict.qztlType, "id", scope.row.qztlType, "displayName")
  39. }}
  40. </div>
  41. <div v-else-if="dragCol[index].prop == 'guidePrintTimes'">
  42. <i class="el-icon-printer" v-if="scope.row.guidePrintTimes > 0"
  43. style="font-size: 20px; color: green" />
  44. </div>
  45. <div v-else-if="dragCol[index].prop == 'isLock'">
  46. <i class="el-icon-lock" v-if="scope.row.isLock == 'Y'" style="font-size: 20px; color: red" />
  47. </div>
  48. <div v-else-if="
  49. dragCol[index].prop == 'isVip' ||
  50. dragCol[index].prop == 'isUpload' ||
  51. dragCol[index].prop == 'qztlIsMain' ||
  52. dragCol[index].prop == 'qztlIsCy' ||
  53. dragCol[index].prop == 'qztlIsCw' ||
  54. dragCol[index].prop == 'qztlIsGt' ||
  55. dragCol[index].prop == 'qztlIsWh' ||
  56. dragCol[index].prop == 'qztlIsFj'
  57. ">
  58. <el-checkbox :value="scope.row[dragCol[index].prop] == 'Y'" />
  59. <!--
  60. {{ scope.row[dragCol[index].prop] == "Y" ? "是" : "否" }}
  61. -->
  62. </div>
  63. <div v-else-if="dragCol[index].prop == 'customerOrgParentName'">
  64. {{
  65. scope.row.customerOrgParentName
  66. ? scope.row.customerOrgParentName
  67. : scope.row.customerOrgName
  68. }}
  69. </div>
  70. <div v-else-if="dragCol[index].prop == 'sexId'">
  71. {{
  72. dddw(
  73. dict.sex,
  74. "id",
  75. scope.row[dragCol[index].prop],
  76. "displayName"
  77. )
  78. }}
  79. </div>
  80. <div v-else-if="dragCol[index].prop == 'groupPack'">
  81. <div v-if="
  82. scope.row.medicalPackageId !== dict.personOrgId &&
  83. scope.row.customerOrgId === dict.personOrgId
  84. ">
  85. {{ scope.row.medicalPackageName }}
  86. </div>
  87. <div v-else>
  88. {{ scope.row.customerOrgGroupName }}
  89. </div>
  90. </div>
  91. <!--
  92. <div v-else-if="dragCol[index].prop == 'nationId'">
  93. {{
  94. dddw(
  95. dict.nation,
  96. "id",
  97. scope.row[dragCol[index].prop],
  98. "displayName"
  99. )
  100. }}
  101. </div>
  102. -->
  103. <div v-else-if="dragCol[index].prop == 'birthDate'">
  104. {{
  105. scope.row[dragCol[index].prop]
  106. ? moment(scope.row[dragCol[index].prop]).format(
  107. "yyyy-MM-DD"
  108. )
  109. : ""
  110. }}
  111. </div>
  112. <!--
  113. <div v-else-if="dragCol[index].prop == 'maritalStatusId'">
  114. {{
  115. dddw(
  116. dict.maritalStatus,
  117. "id",
  118. scope.row[dragCol[index].prop],
  119. "displayName"
  120. )
  121. }}
  122. </div>
  123. -->
  124. <div v-else-if="dragCol[index].prop == 'medicalTypeId'">
  125. {{
  126. dddw(
  127. dict.medicalType,
  128. "id",
  129. scope.row[dragCol[index].prop],
  130. "displayName"
  131. )
  132. }}
  133. </div>
  134. <!--
  135. <div v-else-if="dragCol[index].prop == 'personnelTypeId'">
  136. {{
  137. dddw(
  138. dict.personnelType,
  139. "id",
  140. scope.row[dragCol[index].prop],
  141. "displayName"
  142. )
  143. }}
  144. </div>
  145. &#031;-->
  146. <div v-else-if="dragCol[index].prop == 'idNo'">
  147. {{ scope.row[dragCol[index].prop] }}
  148. </div>
  149. <div v-else-if="dragCol[index].prop == 'customerOrgName'">
  150. {{
  151. scope.row[dragCol[index].prop] ==
  152. scope.row["customerOrgParentName"]
  153. ? ""
  154. : scope.row[dragCol[index].prop]
  155. }}
  156. </div>
  157. <div v-else>
  158. {{ scope.row[dragCol[index].prop] }}
  159. </div>
  160. </div>
  161. </template>
  162. </u-table-column>
  163. <!--
  164. "sexHormoneTermId": "00000000-0000-0000-0000-000000000000",
  165. "interposeMeasure": null,
  166. "medicalConclusionId": "00000000-0000-0000-0000-000000000000",
  167. "reportPrintTimes": 0,
  168. "isMedicalStart": "N",
  169. "medicalStartDate": "6/28/2023",
  170. "isRecoverGuide": "N",
  171. "summaryDate": "",
  172. "summaryDoctor": null,
  173. "isAudit": "N",
  174. "auditDoctor": null,
  175. "auditDate": "",
  176. "isNameHide": "N",
  177. "isPhoneFollow": "N",
  178. "thirdInfo": null,
  179. "guidePrintTimes": null,
  180. "remark": null,
  181. "medicalCenterId": "00000000-0000-0000-0000-000000000000",
  182. "customerOrgRegisterId": "00000000-0000-0000-0000-000000000000",
  183. "lastModifierName": "",
  184. "lastModificationTime": null,
  185. "lastModifierId": null,
  186. "creatorId": null,
  187. "id": "3a0c196d-a6d0-37fe-5c32-4806bdc4530f"
  188. -->
  189. </u-table>
  190. <div style="display: flex; justify-content: space-between">
  191. <div></div>
  192. <div>
  193. <span style="font-size: 12px">{{ loadOpts.totalCount }} 条记录当前显示{{
  194. tableData.length
  195. }}
  196. </span>
  197. </div>
  198. </div>
  199. </div>
  200. <!-- 组合项目 基本信息 -->
  201. <el-tabs v-model="tabChoosed" style="margin-top: -22px">
  202. <!-- 组合项目 -->
  203. <el-tab-pane label="已选组合项目" name="1">
  204. <PatientRegisterAsbItem />
  205. </el-tab-pane>
  206. </el-tabs>
  207. </div>
  208. <div style="margin-left: 10px">
  209. <div v-show="checkPagePriv(pagePriv.privs, '导入青藏数据')" class="listBtn">
  210. <el-button type="success" class="commonbutton" @click="btnImportOrgData">导入青藏数据</el-button>
  211. </div>
  212. <div v-show="checkPagePriv(pagePriv.privs, '人员登记')" class="listBtn">
  213. <el-button type="success" class="commonbutton" @click="btnAdd">人员登记</el-button>
  214. </div>
  215. <div v-show="checkPagePriv(pagePriv.privs, '批量正式登记')" class="listBtn">
  216. <el-button type="success" class="commonbutton" @click="btnAddBatch('1')">批量正式登记</el-button>
  217. </div>
  218. <div v-show="checkPagePriv(pagePriv.privs, '批量转预登记')" class="listBtn">
  219. <el-button type="success" class="commonbutton" @click="btnAddBatch('0')">批量转预登记</el-button>
  220. </div>
  221. <div v-show="checkPagePriv(pagePriv.privs, '编辑')" class="listBtn">
  222. <el-button type="primary" class="commonbutton" @click="btnEdit">编辑</el-button>
  223. </div>
  224. <div v-show="checkPagePriv(pagePriv.privs, '删除')" class="listBtn">
  225. <el-button type="danger" class="deleteButton" @click="btnDel">删除</el-button>
  226. </div>
  227. <!--
  228. <div class="listBtn">
  229. <el-button
  230. type=""
  231. class="btnClass"
  232. @click="openCamera"
  233. icon="el-icon-camera"
  234. >拍照</el-button
  235. >
  236. </div>
  237. <div class="listBtn">
  238. <el-button type="" class="btnClass commonbutton">健康档案</el-button>
  239. </div>
  240. -->
  241. <div v-show="checkPagePriv(pagePriv.privs, '批量调整分组')" class="listBtn">
  242. <el-button type="" class="commonbutton" @click="btnGroupBatch">批量调整分组</el-button>
  243. </div>
  244. <div v-show="checkPagePriv(pagePriv.privs, '批量调整项目')" class="listBtn">
  245. <el-button type="" class="commonbutton" @click="btnAsbBatch">批量调整项目</el-button>
  246. </div>
  247. <div v-show="checkPagePriv(pagePriv.privs, '指引单打印')" class="listBtn">
  248. <el-button type="" class="commonbutton" @click="guidePrint('0001', false)">指引单打印</el-button>
  249. </div>
  250. <div v-show="checkPagePriv(pagePriv.privs, '指引单预览')" class="listBtn">
  251. <el-button type="" class="commonbutton" @click="guidePrint('0001', true)">指引单预览</el-button>
  252. </div>
  253. <div v-show="checkPagePriv(pagePriv.privs, '人员检验检查条码')" class="listBtn">
  254. <el-button type="" class="commonbutton" @click="printPromise()" style="font-size: 12px">人员检验检查条码</el-button>
  255. </div>
  256. <div v-show="checkPagePriv(pagePriv.privs, '人员信息导出')" class="listBtn">
  257. <!-- <download-excel :fields="jsonFields" :fetch="btnExport" type="xls" :name="tableName">
  258. <el-button type="" style="width:100%">人员信息导出</el-button>
  259. </download-excel> -->
  260. <el-button type="" class="commonbutton" @click="btnExport('info')">人员信息导出</el-button>
  261. </div>
  262. <!-- 弃用
  263. <div class="listBtn">
  264. <el-button type="" class="commonbutton" @click="btnDragColDesign">设计列排序</el-button>
  265. </div>
  266. -->
  267. <div v-show="checkPagePriv(pagePriv.privs, '人员检验检查条码')" class="listBtn">
  268. <el-button type="" class="commonbutton" @click="printPromise2()" style="font-size: 12px">人员+检查条码</el-button>
  269. </div>
  270. <div v-show="checkPagePriv(pagePriv.privs, '体检表回收')" class="listBtn">
  271. <el-button type="" class="commonbutton" @click="btnScanRecover">体检表回收</el-button>
  272. </div>
  273. <!-- elProgress.display dialogWin.LocalConfig
  274. <div class="listBtn">
  275. <el-button type="" class="commonbutton" @click="dialogWin.LocalConfig = true">本地设置</el-button>
  276. </div>
  277. -->
  278. <!--
  279. <div class="listBtn">
  280. <el-button type="" class="btnClass commonbutton" @click="rowSelected(tableData)">选中</el-button>
  281. </div>
  282. -->
  283. </div>
  284. </div>
  285. <!--组件弹窗-->
  286. <div>
  287. <!-- 体检人员登记 :title="patientRegister.patientRegisterRd.id ? '体检人员--编辑' : '体检人员--新增'" -->
  288. <el-dialog :title="dataTransOpts.tableS.patient_register.id
  289. ? '体检人员--编辑'
  290. : '体检人员--新增'
  291. " :visible.sync="dialogWin.PatientRegisterEdit" :close-on-click-modal="false" fullscreen
  292. @close="close_dialogWin_PatientRegisterEdit">
  293. <!-- :formInitData="patientRegister.patientRegisterRd" -->
  294. <PatientRegisterEdit :isDoctor="'1'" :patientRegisterId="patientRegister.patientRegisterRd.id"
  295. :editTimes="editTimes" :refFuncSetData="refFuncSetData" :refQueryCondition="refQueryCondition" />
  296. </el-dialog>
  297. <!-- 修改信息 -->
  298. <el-dialog title="修改人员信息" :visible.sync="upBaseInfo.visble" width="800px" :show-close="false"
  299. :append-to-body="true" :close-on-click-modal="false">
  300. <div>
  301. <div style="display: flex; margin-bottom: 20px">
  302. <el-form ref="form" :model="upBaseInfo" label-width="80px" size="medium">
  303. <el-row>
  304. <el-col :span="8">
  305. <el-form-item label="姓名" prop="patientName">
  306. <el-input id="patientName" v-model="upBaseInfo.patientName" size="small"
  307. autocomplete="off"></el-input>
  308. </el-form-item>
  309. </el-col>
  310. <el-col :span="8">
  311. <el-form-item label="身份证号" prop="idNo">
  312. <el-input v-model="upBaseInfo.idNo" placeholder="身份证号" @change="changeIdNo('N')"
  313. size="small"></el-input>
  314. </el-form-item>
  315. </el-col>
  316. <el-col :span="8">
  317. <el-form-item label="出生日期" prop="birthDate">
  318. <el-date-picker v-model="upBaseInfo.birthDate" type="date" format="yyyy-MM-dd"
  319. value-format="yyyy-MM-dd" placeholder="出生日期" style="width: 180px" @change="changeBirthDate"
  320. size="small" />
  321. </el-form-item>
  322. </el-col>
  323. </el-row>
  324. <el-row>
  325. <el-col :span="8">
  326. <el-form-item label="性别" prop="sexId">
  327. <el-select v-model="upBaseInfo.sexId" placeholder="请选择" size="small" filterable>
  328. <el-option v-for="item in dict.sex" :key="item.id" :label="item.displayName" :value="item.id">
  329. </el-option>
  330. </el-select>
  331. </el-form-item>
  332. </el-col>
  333. <el-col :span="8">
  334. <el-form-item label="年龄" prop="age">
  335. <el-input v-model="upBaseInfo.age" size="small" @change="changeAge"></el-input>
  336. </el-form-item>
  337. </el-col>
  338. <el-col :span="8">
  339. <el-form-item label="婚姻" prop="maritalStatusId">
  340. <el-select v-model="upBaseInfo.maritalStatusId" placeholder="请选择" size="small" filterable>
  341. <el-option v-for="item in dict.maritalStatus" :key="item.id" :label="item.displayName"
  342. :value="item.id">
  343. </el-option>
  344. </el-select>
  345. </el-form-item>
  346. </el-col>
  347. </el-row>
  348. <el-row>
  349. <el-col :span="8">
  350. <el-form-item label="手机号" prop="mobileTelephone">
  351. <el-input v-model="upBaseInfo.mobileTelephone" size="small"></el-input>
  352. </el-form-item>
  353. </el-col>
  354. <el-col :span="8">
  355. <el-form-item label="电话" prop="telephone">
  356. <el-input v-model="upBaseInfo.telephone" size="small"></el-input>
  357. </el-form-item>
  358. </el-col>
  359. <el-col :span="8">
  360. <el-form-item label="籍贯" prop="birthPlaceId">
  361. <el-select v-model="upBaseInfo.birthPlaceId" placeholder="请选择" filterable clearable size="small">
  362. <el-option v-for="item in dict.birthPlace" :key="item.id" :label="item.displayName"
  363. :value="item.id" />
  364. </el-select>
  365. </el-form-item>
  366. </el-col>
  367. </el-row>
  368. <el-row>
  369. <el-col :span="24">
  370. <el-form-item label="地址" prop="address">
  371. <el-input v-model="upBaseInfo.address" size="small"></el-input>
  372. </el-form-item>
  373. </el-col>
  374. </el-row>
  375. <el-row>
  376. <el-col :span="8">
  377. <el-form-item label="邮编" prop="postalCode">
  378. <el-input v-model="upBaseInfo.postalCode" size="small"></el-input>
  379. </el-form-item>
  380. </el-col>
  381. <el-col :span="8">
  382. <el-form-item label="邮箱" prop="email">
  383. <el-input v-model="upBaseInfo.email" size="small"></el-input>
  384. </el-form-item>
  385. </el-col>
  386. <el-col :span="8">
  387. <el-form-item label="体检卡号" prop="medicalCardNo">
  388. <el-input v-model="upBaseInfo.medicalCardNo" size="small"></el-input>
  389. </el-form-item>
  390. </el-col>
  391. </el-row>
  392. <el-row>
  393. <el-col :span="8">
  394. <el-form-item label="性激素期" prop="sexHormoneTermId">
  395. <el-select v-model="upBaseInfo.sexHormoneTermId" placeholder="请选择" filterable clearable
  396. size="small">
  397. <el-option v-for="item in dict.sexHormoneTerm" :key="item.id" :label="item.displayName"
  398. :value="item.id">
  399. </el-option>
  400. </el-select>
  401. </el-form-item>
  402. </el-col>
  403. <el-col :span="8">
  404. <el-form-item label="民族" prop="nationId">
  405. <el-select v-model="upBaseInfo.nationId" placeholder="请选择" filterable clearable default-first-option
  406. :filter-method="filterMethod" size="small">
  407. <el-option v-for="item in nation" :key="item.id" :label="item.displayName" :value="item.id" />
  408. </el-select>
  409. </el-form-item>
  410. </el-col>
  411. </el-row>
  412. <el-row>
  413. <el-col :span="8">
  414. <el-form-item label="体检类别" prop="medicalTypeId">
  415. <el-select v-model="upBaseInfo.medicalTypeId" placeholder="请选择" filterable clearable size="small">
  416. <el-option v-for="item in dict.medicalType" :key="item.id" :label="item.displayName"
  417. :value="item.id" />
  418. </el-select>
  419. </el-form-item>
  420. </el-col>
  421. <el-col :span="8">
  422. <el-form-item label="人员类别" prop="personnelTypeId">
  423. <el-select v-model="upBaseInfo.personnelTypeId" placeholder="请选择" filterable clearable size="small">
  424. <el-option v-for="item in dict.personnelType" :key="item.id" :label="item.displayName"
  425. :value="item.id" />
  426. </el-select>
  427. </el-form-item>
  428. </el-col>
  429. <el-col :span="8">
  430. <el-form-item label="介绍人" prop="salesman">
  431. <el-input v-model="upBaseInfo.salesman" size="small"></el-input>
  432. </el-form-item>
  433. </el-col>
  434. </el-row>
  435. <el-row>
  436. <el-col :span="8">
  437. <el-form-item label="工卡号" prop="jobCardNo">
  438. <el-input v-model="upBaseInfo.jobCardNo" size="small"></el-input>
  439. </el-form-item>
  440. </el-col>
  441. <el-col :span="8">
  442. <el-form-item label="职务" prop="jobPost">
  443. <el-input v-model="upBaseInfo.jobPost" size="small"></el-input>
  444. </el-form-item>
  445. </el-col>
  446. <el-col :span="8">
  447. <el-form-item label="职称" prop="jobTitle">
  448. <el-input v-model="upBaseInfo.jobTitle" size="small" />
  449. </el-form-item>
  450. </el-col>
  451. </el-row>
  452. <el-row>
  453. <el-col :span="8">
  454. <el-form-item label="门诊号" prop="hisPatientId">
  455. <el-input v-model="upBaseInfo.hisPatientId" size="small" />
  456. </el-form-item>
  457. </el-col>
  458. <el-col :span="8">
  459. <el-form-item label="电话随访" prop="isPhoneFollow">
  460. <el-checkbox v-model="upBaseInfo.isPhoneFollow" true-label="Y" false-label="N" />
  461. </el-form-item>
  462. </el-col>
  463. <el-col :span="8">
  464. <el-form-item label="VIP" prop="isVip">
  465. <el-checkbox v-model="upBaseInfo.isVip" true-label="Y" false-label="N" />
  466. </el-form-item>
  467. </el-col>
  468. </el-row>
  469. <el-row>
  470. <el-col :span="8">
  471. <el-form-item label="隐藏姓名" prop="isNameHide">
  472. <el-checkbox v-model="upBaseInfo.isNameHide" true-label="Y" false-label="N" />
  473. </el-form-item>
  474. </el-col>
  475. <el-col :span="8">
  476. <el-form-item label="锁住" prop="isLock">
  477. <el-checkbox v-model="upBaseInfo.isLock" true-label="Y" false-label="N" />
  478. </el-form-item>
  479. </el-col>
  480. <el-col :span="8">
  481. <el-form-item label="体检开始" prop="isMedicalStart">
  482. <el-checkbox v-model="upBaseInfo.isMedicalStart" true-label="Y" false-label="N" />
  483. </el-form-item>
  484. </el-col>
  485. </el-row>
  486. <el-row>
  487. <el-col :span="24">
  488. <el-form-item label="备注" prop="remark">
  489. <el-input v-model="upBaseInfo.remark" type="textarea" :rows="1" placeholder="请输入备注"
  490. size="small"></el-input>
  491. </el-form-item>
  492. </el-col>
  493. </el-row>
  494. </el-form>
  495. </div>
  496. <div style="display: flex; justify-content: space-between">
  497. <div></div>
  498. <div>
  499. <el-button class="commonbutton" @click="btnUpBaseInfo">提交</el-button>
  500. <el-button class="commonbutton" @click="close_dialogWin_upBaseInfo">关闭</el-button>
  501. </div>
  502. </div>
  503. </div>
  504. </el-dialog>
  505. <el-dialog title="修改信息--体检日期" :visible.sync="dialogEditMedicalStartDate" width="400" :show-close="false"
  506. :append-to-body="true" :close-on-click-modal="false">
  507. <div>
  508. <div style="display: flex; margin-bottom: 20px">
  509. <span style="padding: 5px 0 0 10px; width: 100px">体检日期</span>
  510. <el-date-picker v-model="upBaseInfo.medicalStartDate" type="date" placeholder="体检日期" size="small"
  511. value-format="yyyy-MM-dd" :picker-options="pickerOptions" />
  512. </div>
  513. <div style="display: flex; justify-content: space-between">
  514. <div></div>
  515. <div>
  516. <el-button class="commonbutton" @click="btnEditMedicalStartDate">提交</el-button>
  517. <el-button class="commonbutton" @click="dialogEditMedicalStartDate = false">关闭</el-button>
  518. </div>
  519. </div>
  520. </div>
  521. </el-dialog>
  522. <!-- 分诊排队 -->
  523. <el-dialog title="分诊排队" :visible.sync="dialogWin.queue" width="800px" :append-to-body="true"
  524. :close-on-click-modal="false">
  525. <Queue :refParams="queueParams" />
  526. </el-dialog>
  527. <!-- 拍照 -->
  528. <el-dialog title="拍照" :visible.sync="patientRegister.cameraVisble" width="400" height="800" :show-close="false"
  529. :append-to-body="true" :close-on-click-modal="false">
  530. <Camera :id="patientRegister.patientRegisterId" />
  531. </el-dialog>
  532. <!-- 导入企业数据 -->
  533. <el-dialog title="导入企业数据" :visible.sync="dialogWin.ImportOrgData" width="800px" :append-to-body="true"
  534. :close-on-click-modal="false">
  535. <ImportOrgData />
  536. </el-dialog>
  537. <!-- 列排序 -->
  538. <el-dialog title="列排序" :visible.sync="dialogColSort" width="300px" :append-to-body="true"
  539. :close-on-click-modal="false">
  540. <el-table id="elTable_dragCol" :data="dragColDesign" row-key="prop" border height="600">
  541. <el-table-column type="index" label="序号" width="40" align="center">
  542. </el-table-column>
  543. <el-table-column label="列名" prop="label" min-width="120" align="center"></el-table-column>
  544. </el-table>
  545. <span slot="footer" class="dialog-footer">
  546. <el-button class="commonbutton" @click="dialogColSort = false">取消</el-button>
  547. <el-button class="commonbutton" @click="btnDragColDesignOk">确定</el-button>
  548. </span>
  549. </el-dialog>
  550. <!-- 批量调整分组 -->
  551. <el-dialog title="批量调整分组" :visible.sync="dialogWin.PatientRegisterEditGroupBatch" width="600px" height="800px"
  552. :append-to-body="true" :close-on-click-modal="false">
  553. <PatientRegisterEditGroupBatch :multipleSelection="multipleSelection" />
  554. </el-dialog>
  555. <!-- 批量调整项目 -->
  556. <el-dialog title="批量调整项目" :visible.sync="dialogWin.PatientRegisterEditItemBatch" width="610px" height="800px"
  557. :append-to-body="true" :close-on-click-modal="false">
  558. <PatientRegisterEditItemBatch :multipleSelection="multipleSelection" />
  559. </el-dialog>
  560. <!-- 批量调整检查项目医生 -->
  561. <el-dialog title="批量调整检查项目医生" :visible.sync="dialogWin.PatientRegisterEditDoctorBatch" width="610px"
  562. :append-to-body="true" :close-on-click-modal="false">
  563. <PatientRegisterEditDoctorBatch :multipleSelection="multipleSelection" :doctorType="doctorType" />
  564. </el-dialog>
  565. <!-- 批量调整体检类别 -->
  566. <el-dialog title="批量调整体检类别" :visible.sync="dialogWin.PatientRegisterEditMedicalTypeBatch" width="610px"
  567. :append-to-body="true" :close-on-click-modal="false">
  568. <PatientRegisterEditMedicalTypeBatch :multipleSelection="multipleSelection" />
  569. </el-dialog>
  570. <!-- 批量调整人员类别 -->
  571. <el-dialog title="批量调整人员类别" :visible.sync="dialogWin.PatientRegisterEditPersonnelTypeBatch" width="610px"
  572. :append-to-body="true" :close-on-click-modal="false">
  573. <PatientRegisterEditPersonnelTypeBatch :multipleSelection="multipleSelection" />
  574. </el-dialog>
  575. <!-- 批量调整备注 -->
  576. <el-dialog title="批量调整备注" :visible.sync="dialogWin.PatientRegisterEditRemarkBatch" width="610px"
  577. :append-to-body="true" :close-on-click-modal="false">
  578. <PatientRegisterEditRemarkBatch :multipleSelection="multipleSelection" />
  579. </el-dialog>
  580. <!-- 通用进度条 -->
  581. <el-dialog title="数据处理中……" :visible.sync="elProgress.display" width="600px" height="400" :show-close="false"
  582. :close-on-click-modal="false" :append-to-body="true">
  583. <ElProgressOCX />
  584. </el-dialog>
  585. <!--通用本地参数设置-->
  586. <el-dialog title="本地参数设置" :visible.sync="dialogWin.LocalConfig" :close-on-click-modal="false"
  587. :append-to-body="true" width="800px" height="600px">
  588. <LocalConfig />
  589. </el-dialog>
  590. <!--云胶片二维码-->
  591. <el-dialog :visible.sync="qrCode.winDisplay" title="云胶片二维码" width="400px" style="text-align: center">
  592. <!--<canvas ref="canvas"></canvas>-->
  593. <img width="100%" :src="qrCode.personUrl" />
  594. <div style="font-size: 16px">
  595. {{ qrCode.barcodeNo + " " + qrCode.patientName }}
  596. </div>
  597. </el-dialog>
  598. <!---->
  599. <el-dialog title="扫/输入条码回收体检表(指引单)" :visible.sync="recover.dialog" width="400px" :append-to-body="true"
  600. :close-on-click-modal="false">
  601. <div style="margin-left: 10px">
  602. <template>
  603. <el-radio v-model="recover.recoverType" label="0">条码号</el-radio>
  604. <el-radio v-model="recover.recoverType" label="1">档案号</el-radio>
  605. </template>
  606. <el-input style="margin: 10px 0" ref="tmh" v-model="recover.barcode"
  607. @keyup.native.enter="signByPatientRegisterNo"></el-input>
  608. </div>
  609. <div slot="footer" class="dialog-footer">
  610. <el-button type="primary" @click="signByPatientRegisterNo" class="commonbutton">确定</el-button>
  611. <el-button @click="recover.dialog = false" class="commonbutton">关闭</el-button>
  612. </div>
  613. </el-dialog>
  614. </div>
  615. </div>
  616. </template>
  617. <script>
  618. import moment from "moment";
  619. import QRCode from "qrcode";
  620. import { mapState, mapActions } from "vuex";
  621. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  622. import Sortable from "sortablejs";
  623. import FileSaver from "file-saver";
  624. import * as XLSX from "xlsx";
  625. import html2canvas from "html2canvas";
  626. import JsonExcel from "vue-json-excel";
  627. import { exportJsonToExcel } from "../../utlis/Export2Excel";
  628. import {
  629. getPagePriv,
  630. checkPagePriv,
  631. dddw,
  632. objCopy,
  633. arrayReduce,
  634. arrayExistObj,
  635. deepCopy,
  636. birthdayToAge,
  637. ageToBirthday,
  638. parseID,
  639. setPrStatusColor,
  640. } from "../../utlis/proFunc";
  641. import { savePeoplePhoto } from "../../utlis/proApi";
  642. import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";
  643. import Camera from "../../components/patientRegister/Camera.vue";
  644. import PatientRegisterAsbItem from "../../components/patientRegister/patientRegisterAsbItem.vue";
  645. import ElProgressOCX from "../../components/report/ElProgressOCX.vue";
  646. import PatientRegisterEditGroupBatch from "./PatientRegisterEditGroupBatch.vue";
  647. import PatientRegisterEditItemBatch from "./PatientRegisterEditItemBatch.vue";
  648. import PatientRegisterEditDoctorBatch from "./PatientRegisterEditDoctorBatch.vue";
  649. import PatientRegisterEditMedicalTypeBatch from "./PatientRegisterEditMedicalTypeBatch.vue";
  650. import PatientRegisterEditPersonnelTypeBatch from "./PatientRegisterEditPersonnelTypeBatch.vue";
  651. import PatientRegisterEditRemarkBatch from "./PatientRegisterEditRemarkBatch.vue";
  652. import ImportOrgData from "./ImportOrgData.vue";
  653. import LocalConfig from "../../components/common/LocalConfig.vue";
  654. import Queue from "../../components/queue/Queue.vue";
  655. import { UTable, UTableColumn } from "umy-ui";
  656. export default {
  657. components: {
  658. PatientRegisterEdit,
  659. Camera,
  660. PatientRegisterAsbItem,
  661. PatientRegisterEditGroupBatch, // 批量调整分组
  662. PatientRegisterEditItemBatch, // 批量调整项目
  663. PatientRegisterEditDoctorBatch, // 批量调整检查项目医生
  664. PatientRegisterEditMedicalTypeBatch, // 批量调整体检类别
  665. PatientRegisterEditPersonnelTypeBatch, // 批量调整体检类别
  666. PatientRegisterEditRemarkBatch, // 批量调整体检类别
  667. ElProgressOCX,
  668. LocalConfig,
  669. ImportOrgData,
  670. Queue,
  671. DownloadExcel: JsonExcel,
  672. UTable,
  673. UTableColumn,
  674. },
  675. props: ["refQueryCondition"],
  676. data() {
  677. return {
  678. pagePriv: {
  679. routeUrlorPageName: "patientRegister", //当前页面归属路由或归属页面权限名称
  680. privs: [], // 页面权限
  681. },
  682. patient_register_query_idno: 'Y', // 身份证排他
  683. patient_register_query_name: 'N', // 姓名排他
  684. patient_register_read_idno_upPhoto: 'N', // 读身份证查询 是否更新照片
  685. peisid: null,
  686. startPoint: -1, // 多选起点 -1 表示选择
  687. endPoint: -1, // 多选终点 -1 表示未选择
  688. tableData: [], //表格数据
  689. tableDataCurrentRow: {}, // 当前被选中的行
  690. multipleSelection: [], //选中的数据列表
  691. dialogCamera: false,
  692. tabChoosed: "1",
  693. formInitData: {}, //体检登记初始表单数据
  694. editTimes: 0,
  695. rClickRow: null, //右击的行
  696. rClickColumn: null, //右击的列(预留)
  697. dragColDesign: [], // 待调整的排序的序
  698. //拖动列
  699. dragCol: [
  700. { label: "序号", prop: "sn", minWidth: 40, align: "center" },
  701. {
  702. label: "体检进度",
  703. prop: "completeFlag",
  704. minWidth: 80,
  705. align: "center",
  706. },
  707. {
  708. label: "打印",
  709. prop: "guidePrintTimes",
  710. minWidth: 55,
  711. align: "center",
  712. },
  713. { label: "锁住", prop: "isLock", minWidth: 55, align: "center" },
  714. {
  715. label: "单位",
  716. prop: "customerOrgParentName",
  717. minWidth: 180,
  718. align: "center",
  719. },
  720. {
  721. label: "部门",
  722. prop: "customerOrgName",
  723. minWidth: 120,
  724. align: "center",
  725. },
  726. { label: "姓名", prop: "patientName", minWidth: 80, align: "center" },
  727. { label: "性别", prop: "sexId", minWidth: 55, align: "center" },
  728. { label: "年龄", prop: "age", minWidth: 55, align: "center" },
  729. {
  730. label: "条码号",
  731. prop: "patientRegisterNo",
  732. minWidth: 110,
  733. align: "center",
  734. },
  735. { label: "档案号", prop: "patientNo", minWidth: 90, align: "center" },
  736. {
  737. label: "体检次数",
  738. prop: "medicalTimes",
  739. minWidth: 80,
  740. align: "center",
  741. },
  742. {
  743. label: "分组/套餐",
  744. prop: "groupPack",
  745. minWidth: 150,
  746. align: "center",
  747. },
  748. { label: "民族", prop: "nationName", minWidth: 55, align: "center" }, //nationId
  749. { label: "身份证", prop: "idNo", minWidth: 160, align: "center" },
  750. { label: "出生日期", prop: "birthDate", minWidth: 80, align: "center" },
  751. { label: "邮箱", prop: "email", minWidth: 150, align: "center" },
  752. {
  753. label: "手机",
  754. prop: "mobileTelephone",
  755. minWidth: 130,
  756. align: "center",
  757. },
  758. { label: "电话", prop: "telephone", minWidth: 130, align: "center" },
  759. { label: "地址", prop: "address", minWidth: 400, align: "" },
  760. { label: "备注", prop: "remark", minWidth: 400, align: "" },
  761. {
  762. label: "体检卡号",
  763. prop: "medicalCardNo",
  764. minWidth: 80,
  765. align: "center",
  766. },
  767. { label: "工卡号", prop: "jobCardNo", minWidth: 80, align: "center" },
  768. {
  769. label: "婚姻状况",
  770. prop: "maritalStatusName", //maritalStatusId
  771. minWidth: 80,
  772. align: "center",
  773. },
  774. {
  775. label: "体检类别",
  776. prop: "medicalTypeId",
  777. minWidth: 80,
  778. align: "center",
  779. },
  780. {
  781. label: "人员类别",
  782. prop: "personnelTypeName", //personnelTypeId
  783. minWidth: 80,
  784. align: "center",
  785. },
  786. { label: "职务", prop: "jobPost", minWidth: 200, align: "center" },
  787. { label: "职称", prop: "jobTitle", minWidth: 80, align: "center" },
  788. { label: "介绍人", prop: "salesman", minWidth: 80, align: "center" },
  789. { label: "是否VIP", prop: "isVip", minWidth: 80, align: "center" },
  790. { label: "登记人", prop: "creatorName", minWidth: 80, align: "center" },
  791. {
  792. label: "登记日期",
  793. prop: "creationTime",
  794. minWidth: 140,
  795. align: "center",
  796. },
  797. {
  798. label: "体检日期",
  799. prop: "medicalStartDate",
  800. minWidth: 140,
  801. align: "center",
  802. },
  803. { label: "是否上传", prop: "isUpload", minWidth: 80, align: "center" },
  804. { label: "高原/健康", prop: "qztlType", minWidth: 90, align: "center" },
  805. { label: "行车", prop: "qztlIsMain", minWidth: 50, align: "center" },
  806. { label: "从业", prop: "qztlIsCy", minWidth: 50, align: "center" },
  807. { label: "普速", prop: "qztlIsCw", minWidth: 50, align: "center" },
  808. { label: "高铁", prop: "qztlIsGt", minWidth: 50, align: "center" },
  809. { label: "职害", prop: "qztlIsWh", minWidth: 50, align: "center" },
  810. { label: "复检", prop: "qztlIsFj", minWidth: 50, align: "center" },
  811. {
  812. label: "标准金额",
  813. prop: "standardAmount",
  814. minWidth: 80,
  815. align: "center",
  816. },
  817. {
  818. label: "应收金额",
  819. prop: "receivableAmount",
  820. minWidth: 80,
  821. align: "center",
  822. },
  823. {
  824. label: "实收金额",
  825. prop: "chargeAmount",
  826. minWidth: 80,
  827. align: "center",
  828. },
  829. {
  830. label: "支付方式",
  831. prop: "chargePayMode",
  832. minWidth: 80,
  833. align: "center",
  834. },
  835. ],
  836. dialogColSort: false,
  837. jsonFields: {},
  838. dom: null, //用于滚动加载数据
  839. // lazyLoading: false, //是否懒加载中
  840. loadOpts: {
  841. totalCount: 0,
  842. skipCount: 0,
  843. maxResultCount: 100,
  844. },
  845. loadOptsInit: {},
  846. upBaseInfo: {
  847. visble: false,
  848. label: "姓名",
  849. value: "",
  850. colName: "patientName",
  851. patientRegisterId: "",
  852. medicalStartDate: "", // 体检日期
  853. registerManType: "customer", //登记人员类型,客服:customer 医生:doctor 支持在医生诊台处理登记人员
  854. id: "", //id
  855. photo: "", //照片
  856. patientId: "00000000-0000-0000-0000-000000000000", //档案号ID 选择了档案就传档案号,未选就传00000-0000...
  857. patientNo: "", //档案号
  858. customerOrgId: ["00000000-0000-0000-0000-000000000001"], //单位编号 默认个人
  859. customerOrgParentId: "00000000-0000-0000-0000-000000000001",
  860. customerOrgName: "个人体检",
  861. customerOrgRegisterId: "00000000-0000-0000-0000-000000000001", //默认单位体检次数
  862. customerOrgGroupId: null, //分组
  863. medicalPackageId: null, //套餐
  864. patientName: "", //姓名
  865. birthDate: null, //日期型
  866. sexId: "U", //性别 默认未知U
  867. age: null, //年龄
  868. jobCardNo: "", //工卡号
  869. medicalCardNo: "", //体检卡号
  870. maritalStatusId: "9", //婚姻状况 默认未知
  871. medicalTypeId: null, //体检类别
  872. personnelTypeId: null, //人员类别
  873. jobPost: "", //职务
  874. jobTitle: "", //职称
  875. salesman: "", //介绍人
  876. sexHormoneTermId: null, //性激素期限
  877. isNameHide: "N", //隐藏姓名
  878. isPhoneFollow: "N", //电话随访
  879. isVip: "N", //vip客户
  880. remark: "", //
  881. isLock: "N", //是否锁住
  882. completeFlag: "1", //完成标志 0:预登记,1:正式登记(未检),2:部份已检,3:已总检 【创建编辑时不操作】
  883. isMedicalStart: "N", //体检开始标志 【创建编辑时不操作】
  884. patientRegisterNo: "", //条码号 【创建编辑时不操作】
  885. medicalTimes: 1, //条码号 【创建编辑时不操作】
  886. medicalCenterId: null, //体检中心
  887. address: "", //地址
  888. email: "", //email
  889. idNo: "", //身份证号
  890. telephone: "", //电话
  891. mobileTelephone: "", //手机号
  892. nationId: null, //民族编号
  893. birthPlaceId: null, //籍惯(出生地)
  894. postalCode: "", //邮编
  895. creatorId: null,
  896. creationTime: "",
  897. lastModificationTime: "",
  898. lastModifierId: null,
  899. isMaxMedicalTimes: "N",
  900. //medicalStartDate: null,
  901. hisPatientId: "", //对接 hisid
  902. registerCheckAsbitems: [], //所选组合项目明细
  903. // 青藏公司 数据
  904. qztlType: "0", // 高原/健康
  905. qztlIsCw: "N", // 普速
  906. qztlIsCy: "N", // 从业
  907. qztlIsGt: "N", // 高铁
  908. qztlIsMain: "N", // 行车
  909. qztlIsWh: "N", // 职害
  910. qztlIsFj: "N", // 复检
  911. isQztlImport: "N", // 导入
  912. uploadQztlFlag: "N", // 上传
  913. planuserid: "", // 计划人
  914. // 职业病
  915. ocCheckTypeId: null, //检查类别
  916. jobType: "", //工种
  917. poisonIds: [], // 接害因素IDs(主表不保存此项数据)
  918. isPatientOccupationalDisease: "Y", // 是否职业病检查(主表不保存此项数据)
  919. appointPatientRegisterId: "",
  920. thirdBookingId: "",
  921. occupationalDiseaseNumber: "",
  922. },
  923. nation: [],
  924. dialogEditMedicalStartDate: false, // 修改体检日期
  925. queueParams: {}, // 分诊排队参数
  926. LocalConfig: {
  927. normal: {
  928. maxResultCount: 100, //分页时单页记录数
  929. },
  930. },
  931. tableName: "", //导出人员列表表名
  932. doctorType: "check", //check:检查 audit:审核
  933. merge_lis_pacs_label: "0", //默认0 检验检查条码合并 0:不合并,1:合并
  934. qrCode: {
  935. winDisplay: false, // 页面显示
  936. url: "https://ccjktj.cn:5081/", //二维码 前辍地址
  937. personUrl: "", // 个人云胶片地址
  938. barcodeNo: "条码号",
  939. patientName: "姓 名",
  940. },
  941. // 体检表回收
  942. recover: {
  943. dialog: false,
  944. recoverType: "0", //回收类型 0-条码号 1-档案号
  945. barcode: "", // 条码号或档案号
  946. barcodes: [], // 条码号或档案号集合
  947. isRecoverGuide: "Y", //状态 Y-回收,N-取消回收
  948. },
  949. // 避免单击事件与双击事件冲突
  950. clickTime1: 0,
  951. clickTime2: 0,
  952. };
  953. },
  954. created() {
  955. //获取用户当前页面的权限
  956. let userPriv = window.sessionStorage.getItem("userPriv");
  957. if (userPriv)
  958. this.pagePriv.privs = deepCopy(
  959. getPagePriv(this.pagePriv.routeUrlorPageName)
  960. );
  961. try {
  962. let LocalConfig = JSON.parse(
  963. window.localStorage.getItem("LocalConfig") || null
  964. );
  965. if (LocalConfig?.normal?.maxResultCount) {
  966. this.LocalConfig.normal.maxResultCount =
  967. LocalConfig.normal.maxResultCount;
  968. }
  969. } catch (error) {
  970. console.log('window.localStorage.getItem("LocalConfig")', error);
  971. }
  972. // console.log('this.LocalConfig',this.LocalConfig)
  973. this.loadOpts.maxResultCount = Number(
  974. this.LocalConfig.normal.maxResultCount || 100
  975. );
  976. this.loadOptsInit = Object.assign({}, this.loadOpts);
  977. // 获取系统参数 -- 合并检验检查条码
  978. postapi("/api/app/SysParmValue/GetSysParmValueBySysParmId", {
  979. sysParmId: "merge_lis_pacs_label",
  980. }).then((res) => {
  981. if (res.code > -1) {
  982. this.merge_lis_pacs_label = res.data || "0";
  983. }
  984. });
  985. // 获取系统参数 -- 云胶片二维码网址
  986. postapi("/api/app/SysParmValue/GetSysParmValueBySysParmId", {
  987. sysParmId: "pacs_cloud_url",
  988. }).then((res) => {
  989. if (res.code > -1) {
  990. this.qrCode.url = res.data || "https://ccjktj.cn:5081/";
  991. }
  992. });
  993. // 获取系统参数 -- 身份证排他
  994. postapi("/api/app/SysParmValue/GetSysParmValueBySysParmId",
  995. { sysParmId: "patient_register_query_idno" }
  996. ).then((res) => {
  997. if (res.code > -1) {
  998. this.patient_register_query_idno = res.data || "Y";
  999. }
  1000. });
  1001. // 获取系统参数 -- 姓名排他
  1002. postapi("/api/app/SysParmValue/GetSysParmValueBySysParmId",
  1003. { sysParmId: "patient_register_query_name" }
  1004. ).then((res) => {
  1005. if (res.code > -1) {
  1006. this.patient_register_query_name = res.data || "N";
  1007. }
  1008. });
  1009. // 获取系统参数 -- 读身份证 是否更新照片
  1010. postapi("/api/app/SysParmValue/GetSysParmValueBySysParmId",
  1011. { sysParmId: "patient_register_read_idno_upPhoto" }
  1012. ).then((res) => {
  1013. if (res.code > -1) {
  1014. this.patient_register_read_idno_upPhoto = res.data || "N";
  1015. }
  1016. });
  1017. },
  1018. //挂载完成
  1019. mounted() {
  1020. this.quickAsb = this.dict.asbItemAll;
  1021. this.peisid = window.sessionStorage.getItem("peisid");
  1022. // if(this.$refs.info){
  1023. // this.$nextTick(() => {
  1024. // this.scrollFull()
  1025. // })
  1026. // }
  1027. },
  1028. computed: {
  1029. ...mapState([
  1030. "pickerOptions",
  1031. "window",
  1032. "dataTransOpts",
  1033. "dialogWin",
  1034. "dict",
  1035. "elProgress",
  1036. "patientRegister",
  1037. "customerOrg",
  1038. ]),
  1039. },
  1040. methods: {
  1041. ...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
  1042. moment,
  1043. dddw,
  1044. deepCopy,
  1045. checkPagePriv,
  1046. setPrStatusColor,
  1047. // 扩展定义表格行样式
  1048. handleRowClassName({ row, rowIndex }) {
  1049. // highLightBg 为 'selected'的高亮
  1050. //// console.log(rowIndex, row)
  1051. //return row.highLightBg == 'selected' ? 'high-light-bg' : '';
  1052. if (row.choosed) {
  1053. return "current-row";
  1054. } else {
  1055. return "";
  1056. }
  1057. },
  1058. // 行选择
  1059. rowSelected(rows) {
  1060. rows.forEach((e) => {
  1061. this.$refs["info"].toggleRowSelection(e, true);
  1062. });
  1063. },
  1064. refFuncSetData(item, v) {
  1065. setData(this, item, v);
  1066. },
  1067. // 打印指引单(isPreview)
  1068. async guidePrint(ReportCode, isPreview) {
  1069. if (!this.$peisAPI) {
  1070. this.$message.info({
  1071. showClose: true,
  1072. message: "此功能,需要在壳客户端才可运行!",
  1073. });
  1074. return;
  1075. }
  1076. let token = window.sessionStorage.getItem("token");
  1077. let user = window.sessionStorage.getItem("user");
  1078. let toOutShell = {
  1079. ReportCode,
  1080. token,
  1081. isBuildImage: "N",
  1082. IsUploadPdf: "N",
  1083. preViewCanPrint: "N",
  1084. Parameters: [
  1085. { Name: "printer", Value: user },
  1086. { Name: "hisLog", Value: "pic/hisLog.jpg" },
  1087. { Name: "pageFooter", Value: "pic/peisQrCode.jpg" },
  1088. { Name: "picExtOne", Value: "pic/evaluate.jpg" }, // 客户评价二维码(检后评价)
  1089. ],
  1090. };
  1091. let lfind = -1;
  1092. //选中(取消勾选)start -------------------------
  1093. // this.multipleSelection = []
  1094. // this.tableData.forEach(e => {
  1095. // if (e.choosed) {
  1096. // this.multipleSelection.push(deepCopy(e))
  1097. // }
  1098. // })
  1099. //选中(取消勾选) end  -------------------------
  1100. if (this.multipleSelection.length < 1) {
  1101. this.$message.info({
  1102. showClose: true,
  1103. message: "请勾选要打印指引单的人员记录!",
  1104. });
  1105. return;
  1106. }
  1107. if (isPreview) {
  1108. /*
  1109. //this.multipleSelection.forEach((item,index) =>{
  1110. postapi(
  1111. `/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.multipleSelection[0].id}`
  1112. )
  1113. .then((res) => {
  1114. if (res.code != -1) {
  1115. toOutShell.ReportTable = res.data;
  1116. // console.log(
  1117. "JSON.stringify(toOutShell)",
  1118. JSON.stringify(toOutShell)
  1119. );
  1120. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  1121. }
  1122. })
  1123. .then(res => {
  1124. // console.log('this.$peisAPI.printPre', res)
  1125. if (JSON.parse(res).code < 0) {
  1126. this.$message.warning(JSON.parse(res).message);
  1127. }
  1128. })
  1129. .catch((err) => {
  1130. // console.log('打印指引单', err)
  1131. this.$message.warning({ showClose: true, message: err });
  1132. });
  1133. */
  1134. toOutShell.BusinessCode = this.multipleSelection[0].id;
  1135. if (this.multipleSelection[0].completeFlag == "0") {
  1136. this.$message.warning({
  1137. showClose: true,
  1138. message: "预登记人员,不可执行此操作!",
  1139. });
  1140. return;
  1141. }
  1142. this.$peisAPI
  1143. .printPre(JSON.stringify(toOutShell))
  1144. .then((res) => {
  1145. if (JSON.parse(res).code < 0) {
  1146. this.$message.warning({
  1147. showClose: true,
  1148. message: JSON.parse(res).message,
  1149. });
  1150. }
  1151. })
  1152. .catch((err) => {
  1153. // console.log('打印指引单', err)
  1154. this.$message.warning({ showClose: true, message: `${err}` });
  1155. });
  1156. } else {
  1157. this.elProgress.display = true;
  1158. this.elProgress.percentage = 0;
  1159. for (let i = 0; i < this.multipleSelection.length; i++) {
  1160. try {
  1161. let patientregisterId = this.multipleSelection[i].id;
  1162. if (this.multipleSelection[i].completeFlag == "0") {
  1163. this.$message.warning({
  1164. showClose: true,
  1165. message: `${this.multipleSelection[i].patientName} 为预登记人员,不可打印指引单`,
  1166. });
  1167. continue;
  1168. }
  1169. toOutShell.BusinessCode = patientregisterId;
  1170. let resPeisAPI = await this.$peisAPI.print(
  1171. JSON.stringify(toOutShell)
  1172. );
  1173. if (JSON.parse(resPeisAPI).code < 0) continue;
  1174. let resPrintTimes = await postapi(
  1175. "/api/app/patientregister/updatepatientregisterguideprinttimesmany",
  1176. [patientregisterId]
  1177. );
  1178. if (resPrintTimes.code == -1) continue;
  1179. lfind = arrayExistObj(this.tableData, "id", patientregisterId);
  1180. if (lfind > -1) {
  1181. if (this.tableData[lfind].guidePrintTimes) {
  1182. this.tableData[lfind].guidePrintTimes =
  1183. Number(this.tableData[lfind].guidePrintTimes) + 1;
  1184. } else {
  1185. this.tableData[lfind].guidePrintTimes = 1;
  1186. }
  1187. }
  1188. } catch (error) {
  1189. // console.log('打印指引单', error)
  1190. this.$message.warning({ showClose: true, message: `${error}` });
  1191. }
  1192. this.elProgress.percentage = Math.floor(
  1193. ((i + 1) * 100) / this.multipleSelection.length
  1194. );
  1195. }
  1196. this.elProgress.display = false;
  1197. }
  1198. },
  1199. // 指引单新打印方式,promise
  1200. guidePrintPromise(ReportCode, isPreview, row) {
  1201. return new Promise((resolve, reject) => {
  1202. if (!this.$peisAPI) reject("此功能,需要在壳客户端才可运行!");
  1203. let token = window.sessionStorage.getItem("token");
  1204. let user = window.sessionStorage.getItem("user");
  1205. let toOutShell = {
  1206. ReportCode,
  1207. token,
  1208. isBuildImage: "N",
  1209. IsUploadPdf: "N",
  1210. preViewCanPrint: "N",
  1211. Parameters: [
  1212. { Name: "printer", Value: user },
  1213. { Name: "hisLog", Value: "pic/hisLog.jpg" },
  1214. { Name: "pageFooter", Value: "pic/peisQrCode.jpg" },
  1215. ],
  1216. };
  1217. if (!row.completeFlag || row.completeFlag == "0")
  1218. reject("预登记人员,不可执行此操作!");
  1219. toOutShell.BusinessCode = row.id;
  1220. console.log(JSON.stringify(toOutShell));
  1221. if (isPreview) {
  1222. this.$peisAPI
  1223. .printPre(JSON.stringify(toOutShell))
  1224. .then((res) => {
  1225. let lres = JSON.parse(res);
  1226. if (lres.code > -1) {
  1227. resolve(lres);
  1228. } else {
  1229. reject(lres.message);
  1230. }
  1231. })
  1232. .catch((err) => {
  1233. reject(err);
  1234. });
  1235. } else {
  1236. this.$peisAPI
  1237. .print(JSON.stringify(toOutShell))
  1238. .then((res) => {
  1239. let lres = JSON.parse(res);
  1240. if (lres.code > -1) {
  1241. return postapi(
  1242. "/api/app/patientregister/updatepatientregisterguideprinttimesmany",
  1243. [row.id]
  1244. );
  1245. } else {
  1246. reject(lres.message);
  1247. }
  1248. })
  1249. .then((res) => {
  1250. if (res && res.code > -1) {
  1251. let lfind = arrayExistObj(this.tableData, "id", row.id);
  1252. if (lfind > -1) {
  1253. if (this.tableData[lfind].guidePrintTimes) {
  1254. this.tableData[lfind].guidePrintTimes =
  1255. Number(this.tableData[lfind].guidePrintTimes) + 1;
  1256. } else {
  1257. this.tableData[lfind].guidePrintTimes = 1;
  1258. }
  1259. }
  1260. }
  1261. resolve(res);
  1262. })
  1263. .catch((err) => {
  1264. reject(err);
  1265. });
  1266. }
  1267. });
  1268. },
  1269. printGuideLisPacs(row) {
  1270. return new Promise((resolve, reject) => {
  1271. // this.merge_lis_pacs_label == '1' 合并检验检查条码
  1272. if (this.merge_lis_pacs_label == "1") {
  1273. this.lisPrint(row, "0002", false)
  1274. .then((res) => {
  1275. return this.guidePrintPromise("0008", false, row);
  1276. })
  1277. // .then((res) => {
  1278. // return this.pacsPrint(row, "0004", false);
  1279. // })
  1280. .then((res) => {
  1281. resolve(res);
  1282. })
  1283. .catch((err) => {
  1284. reject(err);
  1285. });
  1286. } else {
  1287. this.lisPrint(row, "0002", false)
  1288. .then((res) => {
  1289. return this.pacsPrint(row, "0004", false);
  1290. })
  1291. .then((res) => {
  1292. return this.guidePrintPromise("0008", false, row);
  1293. })
  1294. .then((res) => {
  1295. resolve(res);
  1296. })
  1297. .catch((err) => {
  1298. reject(err);
  1299. });
  1300. }
  1301. });
  1302. },
  1303. // 临时加
  1304. printGuidePacs(row) {
  1305. return new Promise((resolve, reject) => {
  1306. this.pacsPrint(row, "0004", false)
  1307. .then((res) => {
  1308. return this.guidePrintPromise("0008", false, row);
  1309. })
  1310. .then((res) => {
  1311. resolve(res);
  1312. })
  1313. .catch((err) => {
  1314. reject(err);
  1315. });
  1316. });
  1317. },
  1318. async printPromise() {
  1319. if (this.multipleSelection.length < 1) {
  1320. this.$message.info({
  1321. showClose: true,
  1322. message: "请勾选要打印人员检验检查条码的记录!",
  1323. });
  1324. return;
  1325. }
  1326. this.elProgress.display = true;
  1327. this.elProgress.percentage = 0;
  1328. for (let i = 0; i < this.multipleSelection.length; i++) {
  1329. let row = this.multipleSelection[i];
  1330. try {
  1331. await this.printGuideLisPacs(row);
  1332. } catch (error) {
  1333. console.log("printPromise", error);
  1334. }
  1335. this.elProgress.percentage = Math.floor(
  1336. ((i + 1) * 100) / this.multipleSelection.length
  1337. );
  1338. }
  1339. this.elProgress.display = false;
  1340. },
  1341. // 临时加
  1342. async printPromise2() {
  1343. if (this.multipleSelection.length < 1) {
  1344. this.$message.info({
  1345. showClose: true,
  1346. message: "请勾选要打印人员检验检查条码的记录!",
  1347. });
  1348. return;
  1349. }
  1350. this.elProgress.display = true;
  1351. this.elProgress.percentage = 0;
  1352. for (let i = 0; i < this.multipleSelection.length; i++) {
  1353. let row = this.multipleSelection[i];
  1354. try {
  1355. await this.printGuidePacs(row);
  1356. } catch (error) {
  1357. console.log("printPromise", error);
  1358. }
  1359. this.elProgress.percentage = Math.floor(
  1360. ((i + 1) * 100) / this.multipleSelection.length
  1361. );
  1362. }
  1363. this.elProgress.display = false;
  1364. },
  1365. handleSelectionChange(rows) {
  1366. //this.multipleSelection = rows;
  1367. //// console.log('this.multipleSelection',this.multipleSelection)
  1368. // rows.forEach((item) => {
  1369. // item.highLightBg = "selected";
  1370. // });
  1371. // // 取消全选
  1372. // if (!rows.length) {
  1373. // this.tableData.forEach((item) => {
  1374. // item.highLightBg = "";
  1375. // });
  1376. // }
  1377. this.multipleSelection = rows;
  1378. },
  1379. //设置新增/编辑的form数据
  1380. setForm(formData) {
  1381. this.patientRegister.patientRegisterRd = deepCopy(formData);
  1382. if (!this.patientRegister.patientRegisterRd.id) {
  1383. this.patientRegister.patientRegisterRd.customerOrgId =
  1384. this.refQueryCondition.customerOrgId;
  1385. }
  1386. },
  1387. //点击体检次数行
  1388. rowClick(row) {
  1389. // 按住了shift键
  1390. // if (this.window.shift) {
  1391. // //清除所有选择
  1392. // this.tableData.forEach((e, index) => {
  1393. // e.choosed = false;
  1394. // e.index = index;
  1395. // });
  1396. // if (this.startPoint == -1) {
  1397. // this.tableData[row.index].choosed = true;
  1398. // this.startPoint = row.index;
  1399. // } else {
  1400. // if (this.startPoint > row.index) {
  1401. // for (let i = row.index; i <= this.startPoint; i++) {
  1402. // this.tableData[i].choosed = true;
  1403. // }
  1404. // } else if (this.startPoint <= row.index) {
  1405. // for (let i = this.startPoint; i <= row.index; i++) {
  1406. // this.tableData[i].choosed = true;
  1407. // }
  1408. // }
  1409. // }
  1410. // } else if (this.window.ctrl) { // 按住了ctrl 键
  1411. // this.tableData[row.index].choosed = true;
  1412. // if (this.startPoint == -1) {
  1413. // this.startPoint = row.index;
  1414. // }
  1415. // } else {
  1416. // // 未按住了ctrl 、shift 键
  1417. // //清除所有选择
  1418. // // console.log("清除所有选择");
  1419. // this.tableData.forEach((e, index) => {
  1420. // e.choosed = false;
  1421. // e.index = index;
  1422. // });
  1423. // // console.log(this.tableData, row.index);
  1424. // // console.log(this.tableData[row.index].choosed);
  1425. // this.tableData[row.index].choosed = true;
  1426. // this.startPoint = row.index;
  1427. // }
  1428. //选中了多个点编辑时,排序最前的作为当前选中的
  1429. // console.log('row.index <= this.startPoint', row.index, this.startPoint)
  1430. // let lfind = -1
  1431. // for (let i = 0; i < this.tableData.length; i++) {
  1432. // if (this.tableData[i].choosed) {
  1433. // lfind = i
  1434. // break
  1435. // }
  1436. // }
  1437. // if (lfind > -1) {
  1438. // 弹出编辑框,只有在编辑框显示时,才去触发获取数据
  1439. this.clickTime1 = new Date().getTime();
  1440. setTimeout(() => {
  1441. if (this.clickTime1 > this.clickTime2) {
  1442. this.dataTransOpts.tableS.patient_register = deepCopy(row);
  1443. this.tableDataCurrentRow = deepCopy(row);
  1444. this.dataTransOpts.refresh.register_check_asbitem.M++; //触发所选组合项目刷新
  1445. }
  1446. }, 400);
  1447. // }
  1448. },
  1449. // 双击 调出编辑
  1450. dblClick(row) {
  1451. this.clickTime2 = new Date().getTime();
  1452. this.dataTransOpts.tableS.patient_register.id = row.id;
  1453. this.btnEdit();
  1454. //触发单击事件
  1455. this.dataTransOpts.tableS.patient_register = deepCopy(row);
  1456. this.tableDataCurrentRow = deepCopy(row);
  1457. this.dataTransOpts.refresh.register_check_asbitem.M++; //触发所选组合项目刷新
  1458. },
  1459. // 导入企业(青藏公司)数据
  1460. btnImportOrgData() {
  1461. //
  1462. this.dataTransOpts.plus.ImportOrgData++;
  1463. this.dialogWin.ImportOrgData = true;
  1464. },
  1465. //体检次数 相关操作
  1466. btnAdd() {
  1467. if (!this.peisid || this.peisid == "null") {
  1468. this.$message.warning({
  1469. showClose: true,
  1470. message: "该用户未选归属体检中心,不能执行此操作!",
  1471. });
  1472. return;
  1473. }
  1474. console.log('btnAdd.this.refQueryCondition', this.refQueryCondition)
  1475. let customerOrgId = this.refQueryCondition.customerOrgId;
  1476. if (!customerOrgId) {
  1477. this.$message.warning({ showClose: true, message: "请选择单位或个人" });
  1478. return;
  1479. }
  1480. // this.patientRegister.patientRegisterRdInit.customerOrgId = customerOrgId
  1481. // this.setForm(this.patientRegister.patientRegisterRdInit)
  1482. // this.patientRegister.patientRegisterAbs = [];
  1483. // this.patientRegister.patientRegisterRd.id = ''
  1484. // this.dialogWin.PatientRegisterEdit = true;
  1485. // this.editTimes++; //触发表单窗口,数据更新
  1486. // this.getPatientRegisterAbs();
  1487. this.dataTransOpts.tableS.patient_register.id = "";
  1488. this.dataTransOpts.copyGroup.itemTypeIds = []; //
  1489. this.dialogWin.PatientRegisterEdit = true;
  1490. this.dataTransOpts.plus.clearPatientRegisterQuery++; //触发清空人员登记界面的查询条件
  1491. setTimeout(() => {
  1492. this.dataTransOpts.refresh.patient_register.S++; //触发人员信息刷新
  1493. }, 10);
  1494. },
  1495. //批量正式登记
  1496. btnAddBatch(completeFlag) {
  1497. let patientRegisterIds = [];
  1498. //取消勾选,换成选择的方式 start
  1499. // this.multipleSelection = [];
  1500. // this.tableData.forEach((e) => {
  1501. // if (e.choosed && e.completeFlag == '0') {
  1502. // this.multipleSelection.push(e);
  1503. // patientRegisterIds.push(e.id)
  1504. // }
  1505. // });
  1506. //取消勾选,换成选择的方式 end
  1507. if (this.multipleSelection.length < 1) {
  1508. this.$message.info({
  1509. showClose: true,
  1510. message: "请勾选要操作的记录!",
  1511. });
  1512. return;
  1513. }
  1514. this.multipleSelection.forEach((e) => {
  1515. switch (completeFlag) {
  1516. case "0":
  1517. if (e.completeFlag == "1") patientRegisterIds.push(e.id);
  1518. break;
  1519. case "1":
  1520. if (e.completeFlag == "0") patientRegisterIds.push(e.id);
  1521. break;
  1522. }
  1523. });
  1524. if (patientRegisterIds.length == 0) {
  1525. this.$message.info({ showClose: true, message: "没有可操作的数据!" });
  1526. return;
  1527. }
  1528. let body = { completeFlag, patientRegisterIds };
  1529. postapi(
  1530. "/api/app/patientregister/updatepatientregistercompleteflagormedicalstartdate",
  1531. body
  1532. )
  1533. .then((res) => {
  1534. if (res.code != -1) {
  1535. // console.log('操作成功!')
  1536. patientRegisterIds.forEach((e) => {
  1537. let lfind = arrayExistObj(this.tableData, "id", e);
  1538. if (lfind > -1) this.tableData[lfind].completeFlag = completeFlag;
  1539. });
  1540. }
  1541. })
  1542. .catch((err) => {
  1543. this.$message.error({ showClose: true, message: `操作失败 ${err}` });
  1544. });
  1545. },
  1546. // 单个编辑
  1547. btnEdit() {
  1548. // if (!this.patientRegister.patientRegisterRd.id) {
  1549. if (!this.dataTransOpts.tableS.patient_register.id) {
  1550. this.$message.warning({
  1551. showClose: true,
  1552. message: "请选择要操作的记录",
  1553. });
  1554. return;
  1555. }
  1556. //// console.log(this.patientRegister.patientRegisterRd,this.tableData)
  1557. // 触发数据刷新
  1558. this.dataTransOpts.refresh.patient_register.S++; //触发人员信息刷新(会同时刷新组合项目)
  1559. this.dataTransOpts.plus.clearPatientRegisterQuery++; //触发清空人员登记界面的查询条件
  1560. this.dataTransOpts.copyGroup.itemTypeIds = []; //
  1561. this.dialogWin.PatientRegisterEdit = true;
  1562. },
  1563. //新增或编辑后选中记录
  1564. async close_dialogWin_PatientRegisterEdit() {
  1565. // 如果 dataTransOpts.tableS.patient_register.id 为空(未增加),则不做处理
  1566. let id = this.dataTransOpts.tableS.patient_register.id;
  1567. if (!id) {
  1568. id = this.tableDataCurrentRow.id;
  1569. }
  1570. if (!id) return;
  1571. this.dataTransOpts.tableS.patient_register.id = id;
  1572. let res = await postapi("/api/app/patientregister/getlistinfilter", {
  1573. patientRegisterNo:
  1574. this.dataTransOpts.tableS.patient_register.patientRegisterNo,
  1575. });
  1576. if (res.code != 1) return;
  1577. let currentRow = res.data.items[0];
  1578. // this.tableData.forEach(e => {
  1579. // e.choosed = false
  1580. // });
  1581. let lfind = arrayExistObj(
  1582. this.tableData,
  1583. "id",
  1584. this.dataTransOpts.tableS.patient_register.id
  1585. );
  1586. if (lfind > -1) {
  1587. objCopy(currentRow, this.tableData[lfind]);
  1588. } else {
  1589. lfind = this.tableData.length;
  1590. currentRow.index = lfind;
  1591. currentRow.choosed = true;
  1592. this.tableData.push(currentRow);
  1593. }
  1594. // 刷新 register_check_asbitem 表记录
  1595. if (lfind > -1) {
  1596. this.dataTransOpts.refresh.register_check_asbitem.M++;
  1597. }
  1598. },
  1599. //拍照
  1600. openCamera() {
  1601. if (!this.patientRegister.patientRegisterId) {
  1602. this.$message.warning({
  1603. showClose: true,
  1604. message: "请选择要操作的记录",
  1605. });
  1606. return;
  1607. }
  1608. this.patientRegister.cameraVisble = true;
  1609. },
  1610. //删除(可批量删除)
  1611. // /api/app/patient-register/many?PatientRegisterIds=3a0c2cac-f44c-f407-9504-c1fc5e80a159&PatientRegisterIds=3a0c2cb3-d10c-ed70-db6a-b835e75ce641
  1612. btnDel() {
  1613. //选中(取消勾选)start -------------------------
  1614. // this.multipleSelection = []
  1615. // this.tableData.forEach(e => {
  1616. // if (e.choosed) {
  1617. // this.multipleSelection.push(deepCopy(e))
  1618. // }
  1619. // })
  1620. //选中(取消勾选) end -------------------------
  1621. if (this.multipleSelection.length < 1) {
  1622. this.$message.warning({
  1623. showClose: true,
  1624. message: "请先勾选要操作的记录",
  1625. });
  1626. return;
  1627. }
  1628. let patientRegisterIds = [];
  1629. for (let i = 0; i < this.multipleSelection.length; i++) {
  1630. patientRegisterIds.push(this.multipleSelection[i]["id"]);
  1631. }
  1632. this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
  1633. confirmButtonText: "是",
  1634. cancelButtonText: "否",
  1635. type: "warning",
  1636. })
  1637. .then(() => {
  1638. //// console.log('{patientRegisterIds}',{patientRegisterIds})
  1639. return postapi("/api/app/patient-register/delete-many", {
  1640. patientRegisterIds,
  1641. });
  1642. })
  1643. .then((res) => {
  1644. if (res.code != -1) {
  1645. // console.log("操作成功");
  1646. this.dataTransOpts.tableS.patient_register.id = "";
  1647. setTimeout(() => {
  1648. this.dataTransOpts.refresh.register_check_asbitem.M++;
  1649. }, 10);
  1650. arrayReduce(this.tableData, this.multipleSelection, "id=id"); //清除列表记录
  1651. // this.setForm(this.patientRegister.patientRegisterRdInit)
  1652. // this.getPatientRegisterAbs();
  1653. }
  1654. })
  1655. .catch((err) => {
  1656. if (err == "cancel") {
  1657. this.$message.info({ showClose: true, message: "已取消操作" });
  1658. }
  1659. });
  1660. },
  1661. //查询
  1662. async Query() {
  1663. // 查询时,清掉明细数据 (滚动时不清)
  1664. this.dataTransOpts.tableS.patient_register.id = "";
  1665. this.tableDataCurrentRow = {}; // 清除选择
  1666. if (
  1667. !(
  1668. this.refQueryCondition.isSeries == "Y" &&
  1669. this.refQueryCondition.patientRegisterNo
  1670. )
  1671. ) {
  1672. this.tableData = [];
  1673. }
  1674. setTimeout(() => {
  1675. this.dataTransOpts.refresh.register_check_asbitem.M++; //触发所选组合项目刷新
  1676. }, 10);
  1677. this.loadOpts = Object.assign(this.loadOpts, this.loadOptsInit);
  1678. await this.getPrList();
  1679. },
  1680. //数据量多时,滚动加载
  1681. async load() {
  1682. this.loadOpts.skipCount++;
  1683. await this.getPrList();
  1684. this.lazyLoading = false;
  1685. },
  1686. // 查询获取人员列表数据
  1687. async getPrList() {
  1688. if (
  1689. this.loadOpts.skipCount != 0 &&
  1690. this.loadOpts.skipCount * this.loadOpts.maxResultCount >=
  1691. this.loadOpts.totalCount
  1692. )
  1693. return;
  1694. // console.log('getPrList', this.loadOpts)
  1695. let body = Object.assign({}, this.loadOpts)
  1696. let queryType = this.refQueryCondition.queryType
  1697. console.log('getPrList.this.refQueryCondition', this.refQueryCondition)
  1698. // 非排他查询条件 ===================== Start ==========================
  1699. if (!queryType) {
  1700. // 查询条件--日期
  1701. if (this.refQueryCondition.startDate && this.refQueryCondition.endDate) {
  1702. body.dateType = this.refQueryCondition.dateType;
  1703. body.startDate = this.refQueryCondition.startDate
  1704. body.endDate = this.refQueryCondition.endDate
  1705. if (body.startDate > body.endDate) {
  1706. this.$message.warning({
  1707. showClose: true,
  1708. message: "起始日期不能大于截止日期,数据校验不通过!",
  1709. });
  1710. return;
  1711. }
  1712. }
  1713. // 查询条件--单位、次数、分组
  1714. if (this.refQueryCondition.customerOrgFlag) {
  1715. if (this.refQueryCondition.customerOrgId) body.customerOrgId = this.refQueryCondition.customerOrgId
  1716. // 获取单位体检次数与分组
  1717. try {
  1718. if (
  1719. this.refQueryCondition.customerOrgId &&
  1720. this.refQueryCondition.customerOrgId != this.dict.personOrgId &&
  1721. this.refQueryCondition.customerOrgRegister.id
  1722. ) {
  1723. body.customerOrgRegisterId = this.refQueryCondition.customerOrgRegister.id;
  1724. if (this.refQueryCondition.customerOrgGroupIds) body.customerOrgGroupIds = this.refQueryCondition.customerOrgGroupIds
  1725. }
  1726. } catch (error) {
  1727. console.error(error);
  1728. }
  1729. }
  1730. // 电话
  1731. if (this.refQueryCondition.phone) body.phone = this.refQueryCondition.phone
  1732. // 性别
  1733. if (this.refQueryCondition.sexId) body.sexId = this.refQueryCondition.sexId
  1734. // 体检类别
  1735. if (this.refQueryCondition.medicalTypeIds) body.medicalTypeIds = this.refQueryCondition.medicalTypeIds
  1736. // 人员状态
  1737. if (this.refQueryCondition.completeFlags) body.completeFlags = this.refQueryCondition.completeFlags
  1738. // 人员类别
  1739. if (this.refQueryCondition.personnelTypeIds) body.personnelTypeIds = this.refQueryCondition.personnelTypeIds
  1740. // 表格回收状态
  1741. if (this.refQueryCondition.isRecoverGuide) body.isRecoverGuide = this.refQueryCondition.isRecoverGuide
  1742. // 排他条件有值时
  1743. if (this.refQueryCondition.patientRegisterNo) {
  1744. queryType = "patientRegisterNo"
  1745. } else if (this.refQueryCondition.pacsNo) {
  1746. queryType = "pacsNo"
  1747. } else if (this.refQueryCondition.lisNo) {
  1748. queryType = "lisNo"
  1749. } else if (this.refQueryCondition.patientNo) {
  1750. queryType = "patientNo"
  1751. } else if (this.refQueryCondition.idCardNo) {
  1752. queryType = "idCardNo"
  1753. } else if (this.refQueryCondition.patientName) {
  1754. queryType = "patientName"
  1755. }
  1756. }
  1757. // 非排他查询条件 ===================== End ==========================
  1758. // 排他查询条件
  1759. let photo = ''
  1760. switch (queryType) {
  1761. case 'patientName': // 姓名排他判断
  1762. if (this.refQueryCondition.patientName) {
  1763. body.patientName = this.refQueryCondition.patientName;
  1764. if (this.patient_register_query_name == 'Y') {
  1765. body = {
  1766. patientName: this.refQueryCondition.patientName,
  1767. skipCount: this.loadOpts.skipCount,
  1768. maxResultCount: this.loadOpts.maxResultCount,
  1769. };
  1770. }
  1771. }
  1772. break;
  1773. case 'idCardNo': // 身份证排他判断
  1774. if (this.refQueryCondition.idCardNo) {
  1775. body.idNo = this.refQueryCondition.idCardNo;
  1776. if (this.patient_register_query_idno == 'Y') {
  1777. body = {
  1778. idNo: this.refQueryCondition.idCardNo,
  1779. skipCount: this.loadOpts.skipCount,
  1780. maxResultCount: this.loadOpts.maxResultCount,
  1781. };
  1782. }
  1783. }
  1784. if (this.refQueryCondition.photo) photo = this.refQueryCondition.photo;
  1785. break;
  1786. case 'patientNo': // 档案号排他判断
  1787. if (this.refQueryCondition.patientNo)
  1788. body = {
  1789. patientNo: this.refQueryCondition.patientNo,
  1790. skipCount: this.loadOpts.skipCount,
  1791. maxResultCount: this.loadOpts.maxResultCount,
  1792. };
  1793. break;
  1794. case 'patientRegisterNo': // 条码号排他判断
  1795. if (this.refQueryCondition.patientRegisterNo)
  1796. body = {
  1797. patientRegisterNo: this.refQueryCondition.patientRegisterNo,
  1798. skipCount: this.loadOpts.skipCount,
  1799. maxResultCount: this.loadOpts.maxResultCount,
  1800. };
  1801. break;
  1802. case 'pacsNo': // 检查条码排他判断
  1803. if (this.refQueryCondition.pacsNo)
  1804. body = {
  1805. pacsNo: this.refQueryCondition.pacsNo,
  1806. skipCount: this.loadOpts.skipCount,
  1807. maxResultCount: this.loadOpts.maxResultCount,
  1808. };
  1809. break;
  1810. case 'lisNo': // 检验条码排他判断
  1811. if (this.refQueryCondition.lisNo)
  1812. body = {
  1813. lisNo: this.refQueryCondition.lisNo,
  1814. skipCount: this.loadOpts.skipCount,
  1815. maxResultCount: this.loadOpts.maxResultCount,
  1816. };
  1817. break;
  1818. default: //
  1819. break;
  1820. }
  1821. // 带费且合计 /api/app/PatientRegister/GetPatientRegisterWithCharge
  1822. // 不带费且合计 /api/app/patientregister/getlistinfilter
  1823. postapi(
  1824. "/api/app/PatientRegister/GetPatientRegisterWithCharge",
  1825. body
  1826. ).then(async (res) => {
  1827. if (res.code > -1) {
  1828. // 刷新最大记录数
  1829. this.loadOpts.totalCount = res.data.totalCount;
  1830. let curLoad = res.data.items;
  1831. // let oldCount = 0
  1832. // 处理:
  1833. // 1、分组/套餐 排序混乱的问题
  1834. // 2、扫身份证查询时,无照片自动更新照片(参数控制)
  1835. curLoad.forEach((e) => {
  1836. // 1、分组/套餐 排序混乱的问题
  1837. if (e.customerOrgId == this.dict.personOrgId) {
  1838. e.groupPack = e.medicalPackageId;
  1839. } else {
  1840. e.groupPack = e.customerOrgGroupId;
  1841. }
  1842. // 2、扫身份证查询时,无照片自动更新照片(参数控制)
  1843. if (this.patient_register_read_idno_upPhoto == "Y" && photo) {
  1844. if (!e.photo) {
  1845. savePeoplePhoto(e.id, photo);
  1846. }
  1847. }
  1848. });
  1849. // 不是连续扫码时,需要判断是否分页查询(连续扫码不清原来的数据)
  1850. // console.log("this.refQueryCondition", this.refQueryCondition.isSeries, this.refQueryCondition.patientRegisterNo);
  1851. if (this.refQueryCondition.isSeries == "Y" && this.refQueryCondition.patientRegisterNo) {
  1852. // 如果已经存在列表中,则不在添加
  1853. for (let index = curLoad.length - 1; index > -1; index--) {
  1854. const e = curLoad[index];
  1855. if (arrayExistObj(this.tableData, 'id', e.id) > -1) curLoad.splice(index, 1)
  1856. }
  1857. } else {
  1858. if (body.skipCount == 0) {
  1859. //查询
  1860. this.tableData = [];
  1861. }
  1862. }
  1863. this.tableData = this.tableData.concat(curLoad);
  1864. // else {
  1865. // // 懒加载 ,原数据集不用清空
  1866. // oldCount = this.tableData.length
  1867. // }
  1868. // curLoad.forEach((e, index) => {
  1869. // this.tableData.push(Object.assign({ index: Number(oldCount) + Number(index), choosed: false }, e))
  1870. // })
  1871. //如果 有选中 记录,则刷新其对应的组合项目
  1872. if (this.dataTransOpts.tableS.patient_register.id) {
  1873. this.dataTransOpts.refresh.register_check_asbitem.M++;
  1874. }
  1875. }
  1876. });
  1877. },
  1878. //滚动加载数据
  1879. async scrollFull(scroll, event) {
  1880. if (!scroll.judgeFlse) return;
  1881. // 正在加载时阻止重复触发
  1882. if (this.lazyLoading) return;
  1883. if (
  1884. (Number(this.loadOpts.skipCount) + 1) *
  1885. Number(this.loadOpts.maxResultCount) >=
  1886. Number(this.loadOpts.totalCount)
  1887. ) {
  1888. return;
  1889. }
  1890. this.lazyLoading = true;
  1891. try {
  1892. await this.load();
  1893. } catch (e) {
  1894. console.error('scrollFull load error', e);
  1895. }
  1896. // this.dom = this.$refs.info.bodyWrapper
  1897. // console.log('this.dom', this.dom)
  1898. // this.dom.addEventListener('scroll', async () => {
  1899. // // // console.log('scrollTop',this.dom.scrollTop,'clientHeight',this.dom.clientHeight,'scrollHeight',this.dom.scrollHeight);
  1900. // if (this.dom.scrollTop + this.dom.clientHeight + 20 > this.dom.scrollHeight && !this.lazyLoading) {
  1901. // // 获取到的不是全部数据 当滚动到底部
  1902. // // console.log('scrollTop', this.dom.scrollTop, 'clientHeight', this.dom.clientHeight, 'scrollHeight', this.dom.scrollHeight);
  1903. // if ((Number(this.loadOpts.skipCount) + 1) * Number(this.loadOpts.maxResultCount) >= Number(this.loadOpts.totalCount)) {
  1904. // this.lazyLoading = false
  1905. // } else {
  1906. // this.lazyLoading = true
  1907. // await this.load()
  1908. // this.lazyLoading = false
  1909. // // this.dom.scrollTop = this.dom.scrollTop - 100
  1910. // }
  1911. // }
  1912. // })
  1913. },
  1914. close_dialogWin_upBaseInfo() {
  1915. this.upBaseInfo.visble = false;
  1916. this.close_dialogWin_PatientRegisterEdit();
  1917. },
  1918. btnUpBaseInfo() {
  1919. // let body = {
  1920. // patientRegisterId: this.upBaseInfo.patientRegisterId,
  1921. // };
  1922. // {
  1923. // "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  1924. // "patientName": "string",
  1925. // "mobileTelephone": "string",
  1926. // "idNo": "string",
  1927. // "remark": "string",
  1928. // "medicalTypeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  1929. // "personnelTypeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  1930. // "sexHormoneTermId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  1931. // }
  1932. // body[this.upBaseInfo.colName] = this.upBaseInfo.value;
  1933. // 旧版/api/app/PatientRegister/UpdatePatientRegisterBaseInfoByPatientRegisterId
  1934. postapi(
  1935. "/api/app/PatientRegister/UpdatePatientRegisterBySumCheck",
  1936. this.upBaseInfo
  1937. ).then((res) => {
  1938. if (res.code > -1) {
  1939. this.close_dialogWin_upBaseInfo();
  1940. }
  1941. });
  1942. },
  1943. //修改出生日期
  1944. changeBirthDate() {
  1945. this.upBaseInfo.age = birthdayToAge(this.upBaseInfo.birthDate);
  1946. },
  1947. //修改出生日期
  1948. changeAge() {
  1949. this.upBaseInfo.birthDate = ageToBirthday(this.upBaseInfo.age);
  1950. },
  1951. //修改身份证,生成年龄、出生、性别
  1952. // isNameContinue 身份证号查重后是否姓名查重
  1953. changeIdNo(isNameContinue) {
  1954. if (!this.upBaseInfo.idNo) return;
  1955. let ret = parseID(this.upBaseInfo.idNo);
  1956. // console.log('changeIdNo',ret)
  1957. if (ret.age != -1) {
  1958. this.upBaseInfo.birthDate = new Date(ret.birthday);
  1959. this.upBaseInfo.age = ret.age;
  1960. this.upBaseInfo.sexId = ret.sex;
  1961. }
  1962. },
  1963. //快速选择组合项目时,调整可按拼间简码及简称查找
  1964. filterMethod(keyWords) {
  1965. //// console.log('filterMethod',this.asbItemQuick)
  1966. if (keyWords) {
  1967. this.nation = [];
  1968. this.dict.nation.forEach((item) => {
  1969. if (
  1970. item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) >
  1971. -1 ||
  1972. item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1
  1973. ) {
  1974. this.nation.push(item);
  1975. }
  1976. });
  1977. } else {
  1978. this.nation = deepCopy(this.dict.nation);
  1979. }
  1980. },
  1981. // 修改基本信息
  1982. fnUpBaseInfo(row) {
  1983. //婚姻状况
  1984. getapi("/api/app/MaritalStatus/GetMaritalStatusList").then((res) => {
  1985. if (res.code == 1) {
  1986. this.dict.maritalStatus = res.data;
  1987. }
  1988. });
  1989. //性激素期
  1990. getapi("/api/app/sex-hormone-term/in-filter").then((res) => {
  1991. if (res.code == 1) {
  1992. this.dict.sexHormoneTerm = res.data;
  1993. }
  1994. });
  1995. //民族
  1996. getapi("/api/app/nation/in-filter").then((res) => {
  1997. if (res.code != -1) {
  1998. this.dict.nation = res.data;
  1999. this.nation = deepCopy(res.data);
  2000. }
  2001. });
  2002. //籍惯 ,出生地
  2003. getapi("/api/app/birth-place/in-filter").then((res) => {
  2004. if (res.code == 1) {
  2005. this.dict.birthPlace = res.data;
  2006. }
  2007. });
  2008. this.dataTransOpts.tableS.patient_register.id = row.id;
  2009. this.dataTransOpts.tableS.patient_register.patientRegisterNo =
  2010. row.patientRegisterNo;
  2011. // 获取资料
  2012. postapi('/api/app/patientregister/getinfoorpatient', { patientRegisterId: row.id })
  2013. .then(res => {
  2014. if (res.code > -1) {
  2015. this.upBaseInfo = Object.assign(this.upBaseInfo, row);
  2016. this.upBaseInfo.patientRegisterId = row.id;
  2017. this.upBaseInfo.visble = true;
  2018. }
  2019. })
  2020. },
  2021. editMedicalStartDate() {
  2022. if (this.multipleSelection.length < 1) {
  2023. this.$message.warning({
  2024. showClose: true,
  2025. message: "请勾选要操作的人员记录!",
  2026. });
  2027. return;
  2028. }
  2029. this.upBaseInfo.medicalStartDate = moment(
  2030. this.multipleSelection[0].medicalStartDate
  2031. ).format("yyyy-MM-DD");
  2032. this.dialogEditMedicalStartDate = true;
  2033. },
  2034. // 批量修改体检日期
  2035. btnEditMedicalStartDate() {
  2036. let body = {
  2037. //"completeFlag": "string",
  2038. medicalStartDate: this.upBaseInfo.medicalStartDate,
  2039. patientRegisterIds: [],
  2040. };
  2041. this.multipleSelection.forEach((e) => {
  2042. body.patientRegisterIds.push(e.id);
  2043. });
  2044. postapi(
  2045. "/api/app/PatientRegister/UpdatePatientRegisterMedicalStartDate",
  2046. body
  2047. ).then((res) => {
  2048. if (res.code > -1) {
  2049. let lfind = 0;
  2050. this.multipleSelection.forEach((e) => {
  2051. e.medicalStartDate = body.medicalStartDate;
  2052. lfind = arrayExistObj(this.tableData, "id", e.id);
  2053. if (lfind > -1)
  2054. this.tableData.medicalStartDate = body.medicalStartDate;
  2055. });
  2056. this.dialogEditMedicalStartDate = false;
  2057. }
  2058. });
  2059. },
  2060. // 分诊排队
  2061. fnQueue(row) {
  2062. this.queueParams = {
  2063. patientRegisterId: row.id,
  2064. };
  2065. this.dialogWin.queue = true;
  2066. this.dataTransOpts.plus.queue++;
  2067. },
  2068. //表右击菜单
  2069. onCellRightClick(row, column) {
  2070. // console.log(row)
  2071. this.rClickRow = { ...row }; //右击的行记录
  2072. this.rClickColumn = { ...column }; //右击的列(预留)
  2073. // console.log(row, column.property);
  2074. // this.onContextmenu()
  2075. },
  2076. onContextmenu(event) {
  2077. // console.log('onContextmenu',event);
  2078. if (!this.rClickRow) return false;
  2079. let row = { ...this.rClickRow };
  2080. let items = []; //菜单项
  2081. // items.push({
  2082. // label: "一级菜单",
  2083. // children: [
  2084. // { label: "修改姓名", onClick: () => { ; } }
  2085. // ]
  2086. // })
  2087. if (checkPagePriv(this.pagePriv.privs, "修改人员信息")) {
  2088. items.push({
  2089. label: "修改人员信息",
  2090. onClick: () => {
  2091. this.fnUpBaseInfo(row);
  2092. },
  2093. });
  2094. }
  2095. if (checkPagePriv(this.pagePriv.privs, "修改体检日期"))
  2096. items.push({
  2097. label: "修改体检日期",
  2098. onClick: () => {
  2099. this.editMedicalStartDate();
  2100. },
  2101. });
  2102. if (checkPagePriv(this.pagePriv.privs, "删除照片"))
  2103. items.push({
  2104. label: "删除照片",
  2105. onClick: () => {
  2106. postapi(`/api/app/patient-register/update-photo`, {
  2107. patientRegisterId: row.id,
  2108. photo: "",
  2109. }).then((res) => {
  2110. if (res.code > -1)
  2111. this.$message.success({
  2112. showClose: true,
  2113. message: "操作成功!",
  2114. });
  2115. });
  2116. },
  2117. });
  2118. if (
  2119. checkPagePriv(this.pagePriv.privs, "分诊排队") &&
  2120. row.completeFlag != "0"
  2121. )
  2122. items.push({
  2123. label: "分诊排队",
  2124. onClick: () => {
  2125. this.fnQueue(row);
  2126. },
  2127. });
  2128. if (
  2129. checkPagePriv(this.pagePriv.privs, "发送检验申请") &&
  2130. row.completeFlag != "0"
  2131. )
  2132. items.push({
  2133. label: "发送检验申请",
  2134. onClick: () => {
  2135. this.lisRequest(row);
  2136. },
  2137. });
  2138. // 预览条码
  2139. let subMenuPre = [];
  2140. if (
  2141. checkPagePriv(this.pagePriv.privs, "预览人员条码") &&
  2142. row.completeFlag != "0"
  2143. )
  2144. subMenuPre.push({
  2145. label: "预览人员条码",
  2146. onClick: () => {
  2147. this.guidePrintPromise("0008", true, row);
  2148. },
  2149. });
  2150. if (
  2151. checkPagePriv(this.pagePriv.privs, "预览检验条码") &&
  2152. row.completeFlag != "0"
  2153. )
  2154. subMenuPre.push({
  2155. label: "预览检验条码",
  2156. onClick: () => {
  2157. this.lisPrint(row, "0002", true);
  2158. },
  2159. });
  2160. if (
  2161. checkPagePriv(this.pagePriv.privs, "预览Pacs条码") &&
  2162. row.completeFlag != "0"
  2163. )
  2164. subMenuPre.push({
  2165. label: "预览Pacs条码",
  2166. onClick: () => {
  2167. // console.log('预览Pacs条码 row',row)
  2168. this.pacsPrint(row, "0004", true);
  2169. },
  2170. });
  2171. if (subMenuPre.length > 0)
  2172. items.push({ label: "预览条码", children: subMenuPre });
  2173. let subMenuPrint = [];
  2174. if (
  2175. checkPagePriv(this.pagePriv.privs, "打印人员条码") &&
  2176. row.completeFlag != "0"
  2177. )
  2178. subMenuPrint.push({
  2179. label: "打印人员条码",
  2180. onClick: () => {
  2181. this.guidePrintPromise("0008", false, row);
  2182. },
  2183. });
  2184. if (
  2185. checkPagePriv(this.pagePriv.privs, "打印检验条码") &&
  2186. row.completeFlag != "0"
  2187. )
  2188. subMenuPrint.push({
  2189. label: "打印检验条码",
  2190. onClick: () => {
  2191. this.lisPrint(row, "0002", false);
  2192. },
  2193. });
  2194. if (
  2195. checkPagePriv(this.pagePriv.privs, "打印Pacs条码") &&
  2196. row.completeFlag != "0"
  2197. )
  2198. subMenuPrint.push({
  2199. label: "打印Pacs条码",
  2200. onClick: () => {
  2201. this.pacsPrint(row, "0004", false);
  2202. },
  2203. });
  2204. if (subMenuPrint.length > 0)
  2205. items.push({ label: "打印条码", children: subMenuPrint });
  2206. // 导入结果合集 ============ start
  2207. let subMenuImp = [];
  2208. if (
  2209. checkPagePriv(this.pagePriv.privs, "导入检查结果") &&
  2210. row.completeFlag != "0"
  2211. )
  2212. subMenuImp.push({
  2213. label: "导入检查结果",
  2214. onClick: () => {
  2215. this.importResult("pacs", row);
  2216. },
  2217. });
  2218. if (
  2219. checkPagePriv(this.pagePriv.privs, "导入检验结果") &&
  2220. row.completeFlag != "0"
  2221. )
  2222. subMenuImp.push({
  2223. label: "导入检验结果",
  2224. onClick: () => {
  2225. this.importResult("lis", row);
  2226. },
  2227. });
  2228. if (
  2229. checkPagePriv(this.pagePriv.privs, "导入迪安结果") &&
  2230. row.completeFlag != "0"
  2231. )
  2232. subMenuImp.push({
  2233. label: "导入迪安结果",
  2234. onClick: () => {
  2235. this.importResult("diAn", row);
  2236. },
  2237. });
  2238. if (subMenuImp.length > 0) {
  2239. items.push({ label: "导入结果", children: subMenuImp });
  2240. }
  2241. // 导入结果合集 ============ end
  2242. // 批量操作合集 ============ start
  2243. let batchMenus = [];
  2244. if (
  2245. checkPagePriv(this.pagePriv.privs, "批量更新组合项目明细") &&
  2246. this.multipleSelection.length > 0
  2247. )
  2248. batchMenus.push({
  2249. label: "批量更新组合项目明细",
  2250. onClick: () => {
  2251. this.btnItemBatch();
  2252. },
  2253. });
  2254. if (
  2255. checkPagePriv(this.pagePriv.privs, "调整检查项目医生") &&
  2256. this.multipleSelection.length > 0
  2257. )
  2258. batchMenus.push({
  2259. label: "调整检查项目医生",
  2260. onClick: () => {
  2261. // this.doctorType = 'check'
  2262. this.dataTransOpts.plus.PatientRegisterEditDoctorBatch++; //如果放在弹窗显示后面,在首次加载子组件时,会触发两次数据处理
  2263. this.dialogWin.PatientRegisterEditDoctorBatch = true;
  2264. },
  2265. });
  2266. if (
  2267. checkPagePriv(this.pagePriv.privs, "批量调整体检类别") &&
  2268. this.multipleSelection.length > 0
  2269. ) {
  2270. batchMenus.push({
  2271. label: "批量调整体检类别",
  2272. onClick: () => {
  2273. // this.doctorType = 'check'
  2274. this.dataTransOpts.plus.PatientRegisterEditMedicalTypeBatch++; //如果放在弹窗显示后面,在首次加载子组件时,会触发两次数据处理
  2275. this.dialogWin.PatientRegisterEditMedicalTypeBatch = true;
  2276. },
  2277. });
  2278. }
  2279. if (
  2280. checkPagePriv(this.pagePriv.privs, "批量调整人员类别") &&
  2281. this.multipleSelection.length > 0
  2282. ) {
  2283. batchMenus.push({
  2284. label: "批量调整人员类别",
  2285. onClick: () => {
  2286. // this.doctorType = 'check'
  2287. this.dataTransOpts.plus.PatientRegisterEditPersonnelTypeBatch++; //如果放在弹窗显示后面,在首次加载子组件时,会触发两次数据处理
  2288. this.dialogWin.PatientRegisterEditPersonnelTypeBatch = true;
  2289. },
  2290. });
  2291. }
  2292. if (
  2293. checkPagePriv(this.pagePriv.privs, "批量调整备注") &&
  2294. this.multipleSelection.length > 0
  2295. ) {
  2296. batchMenus.push({
  2297. label: "批量调整备注",
  2298. onClick: () => {
  2299. // this.doctorType = 'check'
  2300. this.dataTransOpts.plus.PatientRegisterEditRemarkBatch++; //如果放在弹窗显示后面,在首次加载子组件时,会触发两次数据处理
  2301. this.dialogWin.PatientRegisterEditRemarkBatch = true;
  2302. },
  2303. });
  2304. }
  2305. if (batchMenus.length > 0) {
  2306. items.push({ label: "批量操作", children: batchMenus });
  2307. }
  2308. // 批量操作合集 ============ end
  2309. if (checkPagePriv(this.pagePriv.privs, "查看云胶片二维码"))
  2310. items.push({
  2311. label: "查看云胶片二维码",
  2312. onClick: () => {
  2313. this.makeQrCode(row);
  2314. },
  2315. });
  2316. items.push({ label: "----------------" });
  2317. this.$contextmenu({
  2318. items,
  2319. event,
  2320. x: event.clientX,
  2321. y: event.clientY,
  2322. customClass: "custom-class",
  2323. zIndex: 3,
  2324. minWidth: 80,
  2325. });
  2326. this.rClickRow = null;
  2327. return false;
  2328. },
  2329. //批量更新分组按钮
  2330. btnGroupBatch() {
  2331. let customerOrgId = this.refQueryCondition.customerOrgId;
  2332. if (!customerOrgId) {
  2333. this.$message.warning({ showClose: true, message: "请选择单位" });
  2334. return;
  2335. }
  2336. //取消勾选,换成选择的方式 start
  2337. // this.multipleSelection = [];
  2338. // this.tableData.forEach((e) => {
  2339. // if (e.choosed) this.multipleSelection.push(e);
  2340. // });
  2341. //取消勾选,换成选择的方式 end
  2342. if (this.multipleSelection.length < 1) {
  2343. this.$message.info({
  2344. showClose: true,
  2345. message: "请选择要操作的记录!",
  2346. });
  2347. return;
  2348. }
  2349. this.dataTransOpts.plus.PatientRegisterEditGroupBatch++;
  2350. this.dialogWin.PatientRegisterEditGroupBatch = true;
  2351. },
  2352. //批量更新组合项目
  2353. btnAsbBatch() {
  2354. let customerOrgId = this.refQueryCondition.customerOrgId;
  2355. if (!customerOrgId) {
  2356. this.$message.warning({ showClose: true, message: "请选择单位" });
  2357. return;
  2358. }
  2359. //取消勾选,换成选择的方式 start
  2360. // this.multipleSelection = [];
  2361. // this.tableData.forEach((e) => {
  2362. // if (e.choosed) this.multipleSelection.push(e);
  2363. // });
  2364. //取消勾选,换成选择的方式 end
  2365. if (this.multipleSelection.length < 1) {
  2366. this.$message.warning({
  2367. showClose: true,
  2368. message: "请选择要操作的记录",
  2369. });
  2370. return;
  2371. }
  2372. this.dataTransOpts.plus.PatientRegisterEditItemBatch++; //如果放在弹窗显示后面,在首次加载子组件时,会触发两次数据处理
  2373. this.dialogWin.PatientRegisterEditItemBatch = true;
  2374. },
  2375. //批量更新组合项目
  2376. async btnItemBatch() {
  2377. if (this.multipleSelection.length < 1) {
  2378. this.$message.warning({
  2379. showClose: true,
  2380. message: "请选择要操作的记录",
  2381. });
  2382. return;
  2383. }
  2384. this.elProgress.display = true;
  2385. this.elProgress.percentage = 0;
  2386. for (let i = 0; i < this.multipleSelection.length; i++) {
  2387. let patientRegisterId = this.multipleSelection[i].id;
  2388. try {
  2389. await postapi("/api/app/RegisterCheckItem/SyncRegisterCheckItem", {
  2390. patientRegisterId,
  2391. });
  2392. } catch (error) {
  2393. console.log("printPromise", error);
  2394. }
  2395. this.elProgress.percentage = Math.floor(
  2396. ((i + 1) * 100) / this.multipleSelection.length
  2397. );
  2398. }
  2399. this.elProgress.display = false;
  2400. },
  2401. //检验申请
  2402. async lisRequest(row) {
  2403. let isPrintLisRequest = false;
  2404. let res = null;
  2405. if (row.completeFlag == "0") {
  2406. this.$message.info({
  2407. showClose: true,
  2408. message: "预登记人员,不可执行此操作!",
  2409. });
  2410. return;
  2411. }
  2412. try {
  2413. res = await postapi(
  2414. `/api/app/lisrequest/setlisrequest?PatientRegisterId=${row.id}`
  2415. );
  2416. // console.log(`/ api / app / lisrequest / setlisrequest ? PatientRegisterId = ${ prId }`,res);
  2417. } catch (error) {
  2418. return;
  2419. }
  2420. if (res.code > -1) {
  2421. isPrintLisRequest = true;
  2422. }
  2423. //重复申请,重打
  2424. if (res.code == -1 && res.message.indexOf("已申请") > -1) {
  2425. isPrintLisRequest = true;
  2426. }
  2427. if (!isPrintLisRequest) return;
  2428. try {
  2429. await this.$confirm("是否打印检验申请单?", "提示", {
  2430. confirmButtonText: "是",
  2431. cancelButtonText: "否",
  2432. type: "info",
  2433. showClose: false,
  2434. closeOnClickModal: false,
  2435. closeOnPressEscape: false,
  2436. });
  2437. } catch (error) {
  2438. return;
  2439. }
  2440. //打印检验申请单
  2441. this.lisPrint(row, "0003", false);
  2442. },
  2443. //检验条码打印 改造成 promise
  2444. lisPrint(row, ReportCode, isPreview) {
  2445. return new Promise((resolve, reject) => {
  2446. if (!this.$peisAPI) reject("此功能,需要在壳客户端才可运行!");
  2447. if (!row.completeFlag || row.completeFlag == "0")
  2448. reject("预登记人员,不可执行此操作!");
  2449. let token = window.sessionStorage.getItem("token");
  2450. let user = window.sessionStorage.getItem("user");
  2451. let toOutShell = {
  2452. ReportCode,
  2453. token,
  2454. IsMoreLabel: "Y",
  2455. isBuildImage: "N",
  2456. IsUploadPdf: "N",
  2457. preViewCanPrint: "N",
  2458. Parameters: [
  2459. { Name: "printer", Value: user },
  2460. { Name: "hisLog", Value: "pic/hisLog.jpg" },
  2461. ],
  2462. BusinessCode: row.id,
  2463. };
  2464. console.log("this.$peisAPI.toOutShell", toOutShell);
  2465. if (isPreview) {
  2466. this.$peisAPI
  2467. .printPre(JSON.stringify(toOutShell))
  2468. .then((res) => {
  2469. console.log("this.$peisAPI.printPre", res);
  2470. let lres = JSON.parse(res);
  2471. if (lres.code > -1) {
  2472. resolve(lres);
  2473. } else {
  2474. reject(lres.message);
  2475. }
  2476. })
  2477. .catch((err) => {
  2478. reject(err);
  2479. });
  2480. } else {
  2481. this.$peisAPI
  2482. .print(JSON.stringify(toOutShell))
  2483. .then((res) => {
  2484. console.log("this.$peisAPI.print", res);
  2485. let lres = JSON.parse(res);
  2486. if (lres.code < 0) {
  2487. reject(lres.message);
  2488. } else {
  2489. return postapi("/api/app/lisrequest/updatelisrequestisprint", {
  2490. operateType: 1,
  2491. patientRegisterId: row.id,
  2492. });
  2493. }
  2494. })
  2495. .then((res) => {
  2496. if (res && res.code < 0) {
  2497. reject(res.message);
  2498. } else {
  2499. resolve(res);
  2500. }
  2501. })
  2502. .catch((err) => {
  2503. reject(err);
  2504. });
  2505. }
  2506. });
  2507. },
  2508. //pacs条码打印
  2509. pacsPrint(row, ReportCode, isPreview) {
  2510. return new Promise((resolve, reject) => {
  2511. if (!this.$peisAPI) reject("此功能,需要在壳客户端才可运行!");
  2512. if (!row.completeFlag || row.completeFlag == "0")
  2513. reject("预登记人员,不可执行此操作!");
  2514. let token = window.sessionStorage.getItem("token");
  2515. let user = window.sessionStorage.getItem("user");
  2516. let toOutShell = {
  2517. ReportCode,
  2518. token,
  2519. IsMoreLabel: "Y",
  2520. isBuildImage: "N",
  2521. IsUploadPdf: "N",
  2522. preViewCanPrint: "N",
  2523. Parameters: [
  2524. { Name: "printer", Value: user },
  2525. { Name: "hisLog", Value: "pic/hisLog.jpg" },
  2526. ],
  2527. BusinessCode: row.id,
  2528. };
  2529. console.log("this.$peisAPI.print", toOutShell);
  2530. if (isPreview) {
  2531. this.$peisAPI
  2532. .printPre(JSON.stringify(toOutShell))
  2533. .then((res) => {
  2534. console.log("this.$peisAPI.printPre", res);
  2535. let lres = JSON.parse(res);
  2536. if (lres.code > -1) {
  2537. resolve(lres);
  2538. } else {
  2539. reject(lres.message);
  2540. }
  2541. })
  2542. .catch((err) => {
  2543. reject(err);
  2544. });
  2545. } else {
  2546. this.$peisAPI
  2547. .print(JSON.stringify(toOutShell))
  2548. .then((res) => {
  2549. console.log("this.$peisAPI.print", res);
  2550. let lres = JSON.parse(res);
  2551. if (lres.code > -1) {
  2552. resolve(lres);
  2553. } else {
  2554. reject(lres.message);
  2555. }
  2556. })
  2557. .catch((err) => {
  2558. reject(err);
  2559. });
  2560. }
  2561. });
  2562. },
  2563. // 导入检查检验结果
  2564. // checkType:pacs检查/lis检验/diAn迪安
  2565. importResult(checkType, row) {
  2566. let url = "/api/app/ImportLisResult/ImportResultByPatientRegisterId";
  2567. switch (checkType) {
  2568. case "pacs": //常规 pacs 数据导入
  2569. url = "/api/app/ImportPacsResult/ImportResultByPatientRegisterId";
  2570. postapi(url, { patientRegisterId: row.id })
  2571. .then((res) => {
  2572. if (res.code > -1) {
  2573. return postapi(
  2574. "/api/app/ImportElectrocardiogramResult/ImportElectrocardiogramResultByPatientRegisterId",
  2575. { patientRegisterId: row.id }
  2576. );
  2577. }
  2578. })
  2579. .then((res) => {
  2580. if (res && res.code > -1) {
  2581. this.$message.success({
  2582. showClose: true,
  2583. message: "导入成功!",
  2584. });
  2585. this.rowClick(row);
  2586. }
  2587. });
  2588. break;
  2589. case "diAn": //迪安数据导入
  2590. url = "/api/app/ImportLisResult/ImportDianResultByPatientRegisterId";
  2591. postapi(url, { patientRegisterId: row.id }).then((res) => {
  2592. if (res.code > -1) {
  2593. this.$message.success({ showClose: true, message: "导入成功!" });
  2594. this.rowClick(row);
  2595. }
  2596. });
  2597. break;
  2598. default: //常规lis数据导入
  2599. postapi(url, { patientRegisterId: row.id }).then((res) => {
  2600. if (res.code > -1) {
  2601. this.$message.success({ showClose: true, message: "导入成功!" });
  2602. this.rowClick(row);
  2603. }
  2604. });
  2605. break;
  2606. }
  2607. },
  2608. //生成云胶片二维码
  2609. makeQrCode(row) {
  2610. //let canvas = this.$refs.canvas;
  2611. let url = `${this.qrCode.url}?reportparam=条码号&mrn=条码号`; //`https://ccjktj.cn:5081/?reportparam=条码号&mrn=条码号`
  2612. if (row?.patientRegisterNo) {
  2613. url = `${this.qrCode.url}?reportparam=${row.patientRegisterNo}&mrn=${row.patientRegisterNo}`;
  2614. this.qrCode.barcodeNo = row.patientRegisterNo;
  2615. }
  2616. if (row?.patientName) {
  2617. this.qrCode.patientName = row.patientName;
  2618. }
  2619. this.qrCode.patientName =
  2620. this.qrCode.patientName.substring(0, 1) +
  2621. "*" +
  2622. this.qrCode.patientName.substring(2);
  2623. // canvas 方式不可取,有延时
  2624. // this.$nextTick(() => {
  2625. // QRCode.toCanvas(canvas, url, { errorCorrectionLevel: 'H' })
  2626. // .then(() => {
  2627. // console.log('success!')
  2628. // })
  2629. // .catch(err => {
  2630. // this.dialogQrCode = false
  2631. // this.$message.error({ showClose: true, message: err.message })
  2632. // console.log('fail!', err.message)
  2633. // })
  2634. // .finally(() => {
  2635. // console.log('url:', url)
  2636. // })
  2637. // })
  2638. QRCode.toDataURL(url, { errorCorrectionLevel: "H" })
  2639. .then((res) => {
  2640. console.log(res);
  2641. this.qrCode.personUrl = res;
  2642. this.qrCode.winDisplay = true;
  2643. })
  2644. .catch((err) => {
  2645. this.$message.error({ showClose: true, message: err.message });
  2646. console.error(err);
  2647. })
  2648. .finally(() => {
  2649. console.log("url", url);
  2650. });
  2651. },
  2652. formatJson(filterVal, jsonData) {
  2653. return jsonData.map((v) => {
  2654. return filterVal.map((j) => v[j]);
  2655. });
  2656. },
  2657. //通用导出
  2658. btnExport(elId) {
  2659. require.ensure([], () => {
  2660. const tHeader = [];
  2661. const filterVal = [];
  2662. this.dragCol.forEach((e) => {
  2663. tHeader.push(e.label);
  2664. filterVal.push(e.prop);
  2665. });
  2666. const list = this.tableData.map((row, index) => {
  2667. const newRow = { ...row }; // 创建副本,避免修改原数据
  2668. // 使用对象映射优化数据转换
  2669. newRow.sn = index + 1;
  2670. if (newRow.completeFlag)
  2671. newRow.completeFlag =
  2672. newRow.isAudit == "Y"
  2673. ? "已审核"
  2674. : this.dddw(
  2675. this.dict.completeFlag,
  2676. "id",
  2677. newRow.completeFlag,
  2678. "displayName"
  2679. );
  2680. if (newRow.guidePrintTimes?.toString())
  2681. newRow.guidePrintTimes = newRow.guidePrintTimes > 0 ? "打印" : "";
  2682. if (newRow.isLock) newRow.isLock = newRow.isLock == "Y" ? "锁住" : "";
  2683. if (newRow.sexId)
  2684. newRow.sexId = this.dddw(
  2685. this.dict.sex,
  2686. "id",
  2687. newRow.sexId,
  2688. "displayName"
  2689. );
  2690. if (newRow.patientRegisterNo)
  2691. newRow.patientRegisterNo = "\u200C" + newRow.patientRegisterNo;
  2692. if (newRow.patientNo) newRow.patientNo = "\u200C" + newRow.patientNo;
  2693. if (
  2694. newRow.medicalPackageId !== this.dict.personOrgId &&
  2695. newRow.customerOrgId === this.dict.personOrgId
  2696. ) {
  2697. newRow.groupPack = newRow.medicalPackageName;
  2698. } else if (
  2699. newRow.medicalPackageId !== this.dict.personOrgId &&
  2700. newRow.customerOrgId !== this.dict.personOrgId
  2701. ) {
  2702. newRow.groupPack = newRow.customerOrgGroupName;
  2703. }
  2704. if (newRow.idNo) newRow.idNo = "\u200C" + newRow.idNo;
  2705. if (newRow.birthDate)
  2706. newRow.birthDate = moment(newRow.birthDate).format("yyyy-MM-DD");
  2707. if (newRow.medicalTypeId)
  2708. newRow.medicalTypeId = this.dddw(
  2709. this.dict.medicalType,
  2710. "id",
  2711. newRow.medicalTypeId,
  2712. "displayName"
  2713. );
  2714. if (newRow.isVip) newRow.isVip = newRow.isVip == "Y" ? "是" : "否";
  2715. if (newRow.isUpload)
  2716. newRow.isUpload = newRow.isUpload == "Y" ? "是" : "否";
  2717. if (newRow.qztlType)
  2718. newRow.qztlType = this.dddw(
  2719. this.dict.qztlType,
  2720. "id",
  2721. newRow.qztlType,
  2722. "displayName"
  2723. );
  2724. if (newRow.qztlIsMain)
  2725. newRow.qztlIsMain = newRow.qztlIsMain == "Y" ? "是" : "否";
  2726. if (newRow.qztlIsCy)
  2727. newRow.qztlIsCy = newRow.qztlIsCy == "Y" ? "是" : "否";
  2728. if (newRow.qztlIsCw)
  2729. newRow.qztlIsCw = newRow.qztlIsCw == "Y" ? "是" : "否";
  2730. if (newRow.qztlIsGt)
  2731. newRow.qztlIsGt = newRow.qztlIsGt == "Y" ? "是" : "否";
  2732. if (newRow.qztlIsWh)
  2733. newRow.qztlIsWh = newRow.qztlIsWh == "Y" ? "是" : "否";
  2734. if (newRow.qztlIsFj)
  2735. newRow.qztlIsFj = newRow.qztlIsFj == "Y" ? "是" : "否";
  2736. return newRow;
  2737. });
  2738. const data = list.map((v) => filterVal.map((j) => v[j]));
  2739. exportJsonToExcel(tHeader, data, '人员登记列表' + moment(new Date()).format('yyyyMMDDHHmmss')); //"列表excel" 是下载后的表名 可修改
  2740. });
  2741. // this.dragCol.forEach((e) => {
  2742. // this.jsonFields[e.label] = e.prop;
  2743. // });
  2744. // let tableDatas = deepCopy(this.tableData)
  2745. // tableDatas.forEach((e, index) => {
  2746. // if (index) e.sn = index + 1
  2747. // if (e.completeFlag) e.completeFlag = e.isAudit == "Y" ? "已审核" : dddw(this.dict.completeFlag, "id", e.completeFlag, "displayName")
  2748. // if (e.guidePrintTimes.toString()) e.guidePrintTimes = e.guidePrintTimes > 0 ? '打印' : ''
  2749. // if (e.isLock) e.isLock = e.isLock == 'Y' ? '锁住' : ''
  2750. // if (e.sexId) e.sexId = dddw(this.dict.sex, "id", e.sexId, "displayName")
  2751. // if (e.patientRegisterNo) e.patientRegisterNo = '\u200C' + e.patientRegisterNo
  2752. // if (e.patientNo) e.patientNo = '\u200C' + e.patientNo
  2753. // if (e.medicalPackageId !== this.dict.personOrgId && e.customerOrgId === this.dict.personOrgId) {
  2754. // e.groupPack = e.medicalPackageName // dddw(this.dict.medicalPackage, "id", e.medicalPackageId, "displayName")
  2755. // } else if (e.medicalPackageId !== this.dict.personOrgId && e.customerOrgId !== this.dict.personOrgId) {
  2756. // e.groupPack = e.customerOrgGroupName // dddw(this.dict.customerOrgGroupAll, "id", e.customerOrgGroupId, "displayName")
  2757. // }
  2758. // //if (e.nationId) e.nationId = dddw(this.dict.nation, "id", e.nationId, "displayName")
  2759. // if (e.idNo) e.idNo = '\u200C' + e.idNo
  2760. // if (e.birthDate) e.birthDate = moment(e.birthDate).format("yyyy-MM-DD")
  2761. // //if (e.maritalStatusId) e.maritalStatusId = dddw(this.dict.maritalStatus, "id", e.maritalStatusId, "displayName")
  2762. // if (e.medicalTypeId) e.medicalTypeId = dddw(this.dict.medicalType, "id", e.medicalTypeId, "displayName")
  2763. // //if (e.personnelTypeId) e.personnelTypeId = dddw(this.dict.personnelType, "id", e.personnelTypeId, "displayName")
  2764. // if (e.isVip) e.isVip = e.isVip == "Y" ? "是" : "否"
  2765. // if (e.isUpload) e.isUpload = e.isUpload == "Y" ? "是" : "否"
  2766. // if (e.qztlType) e.qztlType = dddw(this.dict.qztlType, "id", e.qztlType, "displayName")
  2767. // if (e.qztlIsMain) e.qztlIsMain = e.qztlIsMain == "Y" ? "是" : "否"
  2768. // if (e.qztlIsCy) e.qztlIsCy = e.qztlIsCy == "Y" ? "是" : "否"
  2769. // if (e.qztlIsCw) e.qztlIsCw = e.qztlIsCw == "Y" ? "是" : "否"
  2770. // if (e.qztlIsGt) e.qztlIsGt = e.qztlIsGt == "Y" ? "是" : "否"
  2771. // if (e.qztlIsWh) e.qztlIsWh = e.qztlIsWh == "Y" ? "是" : "否"
  2772. // if (e.qztlIsFj) e.qztlIsFj = e.qztlIsFj == "Y" ? "是" : "否"
  2773. // })
  2774. // this.tableName = '人员登记列表' + moment(new Date()).format('yyyyMMDDHHmmss') + '.xls'
  2775. // return tableDatas;
  2776. // const columns = this.$refs.info.getColumns(); // 获取列信息
  2777. // const data = this.$refs.info.getData(); // 获取数据
  2778. // console.log(columns)
  2779. // console.log(columns)
  2780. // const exportConf = { columns, data }; // 构建导出配置对象
  2781. // const filename = 'my_data.xlsx'; // 设置文件名
  2782. // const blob = exportTable(exportConf); // 导出数据为 Blob 对象
  2783. // saveAs(blob, filename); // 使用 file-saver 保存文件
  2784. // // 获取HTML元素(表格)
  2785. // // let table = document.getElementById(elId); //.cloneNode(true)
  2786. // this.$nextTick(() => {
  2787. // // let refsTable = this.$refs[elId] //.cloneNode(true) true
  2788. // let table = document.getElementById(elId)
  2789. // // console.log('table,refsTable', table, refsTable)
  2790. // let tableData = table.innerHTML
  2791. // let fileName = moment(new Date()).format('yyyyMMDDHHmmss')
  2792. // let blob = new Blob([tableData], { type: "text/plain;charset=utf-8" });
  2793. // FileSaver.saveAs(blob, fileName + '.xls');
  2794. // // 导出图片
  2795. // // 使用html2canvas将HTML元素转换为画布
  2796. // // let cloneTable = table.cloneNode(true) //[elId]
  2797. // /*
  2798. // html2canvas(table).then(canvas => {
  2799. // // 创建一个a元素用于下载
  2800. // const link = document.createElement('a');
  2801. // link.href = canvas.toDataURL('image/jpeg');
  2802. // link.download = fileName + '.jpg';
  2803. // document.body.appendChild(link);
  2804. // link.click();
  2805. // //document.body.removeChild(link);
  2806. // // // 创建一个PDF对象
  2807. // // var pdf = new jsPDF();
  2808. // // // 设置PDF的尺寸
  2809. // // pdf.addImage(canvas.toDataURL('image/png'), 'PNG', 0, 0, canvas.width, canvas.height);
  2810. // // // 导出PDF
  2811. // // pdf.save('员工信息表.pdf');
  2812. // });
  2813. // */
  2814. // })
  2815. },
  2816. // 点击扫码回收体检表按钮
  2817. btnScanRecover() {
  2818. this.patientRegisterNo = "";
  2819. this.recover.dialog = true;
  2820. this.$nextTick(() => {
  2821. this.$refs["tmh"].focus(); //打开光标定位到条码栏里
  2822. });
  2823. },
  2824. //按条码号查个人数据
  2825. signByPatientRegisterNo() {
  2826. // let patientRegisterNos = [this.patientRegisterNo]
  2827. // let body = {
  2828. // patientRegisterNos
  2829. // }
  2830. // //console.log(`/api/app/patientregister/getpatientregisterorpatient`, body)
  2831. // postapi('/api/app/PatientRegister/BatchRecoverGuideByPatientRegisterNo', body)
  2832. // .then((res) => {
  2833. // if (res.code > -1) {
  2834. // this.patientRegisterNo = ''
  2835. // this.$message.success({ showClose: true, message: '操作成功!' })
  2836. // }
  2837. // });
  2838. this.recover.barcodes = [this.recover.barcode];
  2839. postapi("/api/app/PatientRegister/BatchRecoverGuide", this.recover).then(
  2840. (res) => {
  2841. if (res.code > -1) {
  2842. this.recover.barcode = "";
  2843. this.$message.success({ showClose: true, message: "操作成功!" });
  2844. }
  2845. }
  2846. );
  2847. },
  2848. btnDragColDesign() {
  2849. this.dragColDesign = deepCopy(this.dragCol);
  2850. this.dialogColSort = true;
  2851. this.rowDrag();
  2852. },
  2853. btnDragColDesignOk() {
  2854. this.dragCol = deepCopy(this.dragColDesign);
  2855. this.dialogColSort = false;
  2856. },
  2857. //拖拽
  2858. rowDrag() {
  2859. this.$nextTick(() => {
  2860. const el = document.querySelector("#elTable_dragCol tbody");
  2861. // console.log('el0', el)
  2862. const that = this;
  2863. Sortable.create(el, {
  2864. animation: 150, // ms, number 单位:ms,定义排序动画的时间
  2865. //拖拽结束
  2866. onEnd({ newIndex, oldIndex }) {
  2867. that.isshow = false;
  2868. const currRow = that.dragColDesign.splice(oldIndex, 1)[0];
  2869. that.dragColDesign.splice(newIndex, 0, currRow);
  2870. // console.log('el', el)
  2871. },
  2872. });
  2873. });
  2874. },
  2875. //合计
  2876. getSummaries(param) {
  2877. console.log("getSummaries param", param);
  2878. // if(!param){
  2879. // param = {
  2880. // columns:[{}, {}, {}, {}, {}, {}, {property: 'asbitemMoney'},{property: 'customerOrgGroupDetailMoney'}],
  2881. // data:this.customerOrgGroupAsbitems
  2882. // }
  2883. // }
  2884. const { columns, data } = param;
  2885. const sumCol = [2, 3, 4, 7, 8]; //需合计的列
  2886. const sums = [];
  2887. columns.forEach((column, index) => {
  2888. //console.log('column, index,data',column, index,data)
  2889. //显示合计列
  2890. if (index === 1) {
  2891. sums[index] = "合计";
  2892. return;
  2893. }
  2894. //不合计的列
  2895. if (sumCol.indexOf(index) == -1) {
  2896. sums[index] = "";
  2897. return;
  2898. }
  2899. sums[index] = 0;
  2900. data.forEach((e) => {
  2901. if (!isNaN(e[column.property]))
  2902. sums[index] += Number(e[column.property]); // * e['amount']
  2903. });
  2904. sums[index] = sums[index].toFixed(2); //+ ' 元';
  2905. });
  2906. return sums;
  2907. },
  2908. },
  2909. //监听事件
  2910. watch: {
  2911. // "refQueryCondition.customerOrgId": {
  2912. // // immediate: true, // 立即执行
  2913. // // deep: true, // 深度监听复杂类型内变化
  2914. // handler(newVal, oldVal) {
  2915. // //// console.log('watch:refQueryCondition.customerOrgId:',newVal,oldVal)
  2916. // // 单位变化时,清除当前列表信息
  2917. // if (newVal && newVal != oldVal) {
  2918. // this.tableData = [];
  2919. // this.dataTransOpts.tableM.register_check_asbitem = [];
  2920. // }
  2921. // },
  2922. // },
  2923. //触发查询事件
  2924. "refQueryCondition.queryConditionTimes"(newVal, oldVal) {
  2925. if (newVal != oldVal) {
  2926. console.log('触发查询 refQueryCondition.queryConditionTimes', oldVal, newVal)
  2927. this.Query();
  2928. }
  2929. },
  2930. //新增后,触发赋值
  2931. // "patientRegister.patientRegisterRd.id"(newVal, oldVal) {
  2932. // if (newVal != oldVal) {
  2933. // //// console.log('patientRegister.patientRegisterRd.customerOrgId',this.patientRegister.patientRegisterRd.customerOrgId)
  2934. // objCopy(this.patientRegister.patientRegisterRd, this.form);
  2935. // }
  2936. // },
  2937. },
  2938. };
  2939. </script>
  2940. <style scoped>
  2941. @import "../../assets/css/global_input.css";
  2942. @import "../../assets/css/global_table.css";
  2943. @import "../../assets/css/global.css";
  2944. .box {
  2945. display: flex;
  2946. }
  2947. .listBtn {
  2948. margin-top: 5px;
  2949. text-align: center;
  2950. }
  2951. .btnClass {
  2952. width: 100px;
  2953. }
  2954. </style>