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.

1622 lines
53 KiB

3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years 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
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 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
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years 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
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div style="display: flex">
  3. <div
  4. :style="
  5. 'margin-left:5px;width:' + (window.pageWidth - 200 - 110 - 50) + 'px;'
  6. "
  7. @contextmenu.prevent="onContextmenu"
  8. >
  9. <el-table
  10. :data="patientRegister.prList"
  11. border
  12. :height="
  13. window.pageHeight < 600
  14. ? 202
  15. : Math.floor(((window.pageHeight - 302) * 2) / 3)
  16. "
  17. highlight-current-row
  18. @row-click="rowClick"
  19. size="small"
  20. @selection-change="handleSelectionChange"
  21. @cell-contextmenu="onCellRightClick"
  22. ref="info"
  23. :row-class-name="handleRowClassName"
  24. >
  25. <!-- 取消勾选改为选中
  26. <el-table-column type="selection" width="40" show-overflow-tooltip/>
  27. -->
  28. <el-table-column
  29. v-for="(item, index) in headerCols"
  30. :key="`col_${index}`"
  31. :min-width="dropCol[index].minWidth"
  32. :align="dropCol[index].align"
  33. :label="item.label"
  34. >
  35. <template slot-scope="scope">
  36. <div v-if="dropCol[index].prop == 'sn'" >
  37. {{ scope.$index + 1 }}
  38. </div>
  39. <div v-else-if="dropCol[index].prop == 'completeFlag'" >
  40. {{ dddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}
  41. </div>
  42. <div v-else-if="dropCol[index].prop == 'guidePrintTimes'" >
  43. <i class="el-icon-printer"
  44. v-if="scope.row.guidePrintTimes > 0"
  45. style="font-size: 24px; color: green" />
  46. </div>
  47. <div v-else-if ="dropCol[index].prop == 'isLock'
  48. || dropCol[index].prop == 'isVip'
  49. || dropCol[index].prop == 'isUpload'
  50. " >
  51. {{ scope.row[dropCol[index].prop] == "Y" ? "是" : "否" }}
  52. </div>
  53. <div v-else-if="dropCol[index].prop == 'customerOrgParentName'" >
  54. {{ scope.row.customerOrgParentName
  55. ? scope.row.customerOrgParentName
  56. : scope.row.customerOrgName }}
  57. </div>
  58. <div v-else-if="dropCol[index].prop == 'sexId'" >
  59. {{ dddw(dict.sex, "id", scope.row[dropCol[index].prop], "displayName") }}
  60. </div>
  61. <div v-else-if="dropCol[index].prop == 'groupPack'" >
  62. <div v-if=" scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId === dict.personOrgId">
  63. {{ dddw(dict.medicalPackage,"id",scope.row.medicalPackageId,"displayName")}}
  64. </div>
  65. <div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId !== dict.personOrgId">
  66. {{ dddw( dict.customerOrgGroupAll, "id", scope.row.customerOrgGroupId, "displayName" ) }}
  67. </div>
  68. </div>
  69. <div v-else-if="dropCol[index].prop == 'nationId'" >
  70. {{ dddw(dict.nation, "id", scope.row[dropCol[index].prop], "displayName") }}
  71. </div>
  72. <div v-else-if ="dropCol[index].prop == 'birthDate'
  73. || dropCol[index].prop == 'creationTime'" >
  74. {{ scope.row[dropCol[index].prop] ? moment(scope.row[dropCol[index].prop]).format('yyyy-MM-DD'):'' }}
  75. </div>
  76. <div v-else-if="dropCol[index].prop == 'maritalStatusId'" >
  77. {{ dddw(dict.maritalStatus, "id", scope.row[dropCol[index].prop], "displayName") }}
  78. </div>
  79. <div v-else-if="dropCol[index].prop == 'medicalTypeId'" >
  80. {{ dddw(dict.medicalType, "id", scope.row[dropCol[index].prop], "displayName") }}
  81. </div>
  82. <div v-else-if="dropCol[index].prop == 'personnelTypeId'" >
  83. {{ dddw(dict.personnelType, "id", scope.row[dropCol[index].prop], "displayName") }}
  84. </div>
  85. <div v-else>
  86. {{ scope.row[dropCol[index].prop] }}
  87. </div>
  88. </template>
  89. </el-table-column>
  90. <!--
  91. "sexHormoneTermId": "00000000-0000-0000-0000-000000000000",
  92. "interposeMeasure": null,
  93. "medicalConclusionId": "00000000-0000-0000-0000-000000000000",
  94. "reportPrintTimes": 0,
  95. "isMedicalStart": "N",
  96. "medicalStartDate": "6/28/2023",
  97. "isRecoverGuide": "N",
  98. "summaryDate": "",
  99. "summaryDoctor": null,
  100. "isAudit": "N",
  101. "auditDoctor": null,
  102. "auditDate": "",
  103. "isNameHide": "N",
  104. "isPhoneFollow": "N",
  105. "thirdInfo": null,
  106. "guidePrintTimes": null,
  107. "remark": null,
  108. "organizationUnitId": "00000000-0000-0000-0000-000000000000",
  109. "customerOrgRegisterId": "00000000-0000-0000-0000-000000000000",
  110. "lastModifierName": "",
  111. "lastModificationTime": null,
  112. "lastModifierId": null,
  113. "creatorId": null,
  114. "id": "3a0c196d-a6d0-37fe-5c32-4806bdc4530f"
  115. -->
  116. </el-table>
  117. <!-- 给合项目 基本信息 -->
  118. <el-tabs v-model="tabChoosed">
  119. <!-- 给合项目 -->
  120. <el-tab-pane label="已选组合项目" name="1">
  121. <PatientRegisterAsbItem />
  122. </el-tab-pane>
  123. </el-tabs>
  124. </div>
  125. <div style="margin-left: 10px;">
  126. <div class="listBtn">
  127. <el-button type="success" class="btnClass" @click="btnAdd">人员登记</el-button
  128. >
  129. </div>
  130. <div class="listBtn">
  131. <el-button type="primary" class="btnClass" @click="btnEdit"
  132. >编辑</el-button
  133. >
  134. </div>
  135. <div class="listBtn">
  136. <el-button type="danger" class="btnClass" @click="btnDel"
  137. >删除</el-button
  138. >
  139. </div>
  140. <!--
  141. <div class="listBtn">
  142. <el-button
  143. type=""
  144. class="btnClass"
  145. @click="openCamera"
  146. icon="el-icon-camera"
  147. >拍照</el-button
  148. >
  149. </div>
  150. <div class="listBtn">
  151. <el-button type="" class="btnClass commonbutton">健康档案</el-button>
  152. </div>
  153. -->
  154. <div class="listBtn">
  155. <el-button type="" class="btnClass" @click="btnGroupBatch"
  156. >批量调整分组</el-button
  157. >
  158. </div>
  159. <div class="listBtn">
  160. <el-button type="" class="btnClass" @click="btnAsbBatch"
  161. >批量调整项目</el-button
  162. >
  163. </div>
  164. <div class="listBtn">
  165. <el-button
  166. type=""
  167. class="btnClass"
  168. @click="guidePrint('0001', false)"
  169. >指引单打印</el-button
  170. >
  171. </div>
  172. <div class="listBtn">
  173. <el-button
  174. type=""
  175. class="btnClass"
  176. @click="guidePrint('0001', true)"
  177. >指引单预览</el-button
  178. >
  179. </div>
  180. <!--
  181. <div class="listBtn">
  182. <el-button type="" class="btnClass commonbutton" @click="rowSelected(patientRegister.prList)">选中</el-button>
  183. </div>
  184. -->
  185. </div>
  186. <!-- 体检人员登记 -->
  187. <el-dialog
  188. :title="patientRegister.patientRegisterRd.id ? '体检人员--编辑' : '体检人员--新增'"
  189. :visible.sync="dialogVisible"
  190. :close-on-click-modal="false"
  191. fullscreen @close="closeDialogPR"
  192. >
  193. <PatientRegisterEdit
  194. :formInitData="patientRegister.patientRegisterRd"
  195. :editTimes="editTimes"
  196. />
  197. </el-dialog>
  198. <!-- 拍照 -->
  199. <el-dialog
  200. title="拍照"
  201. :visible.sync="patientRegister.cameraVisble"
  202. width="400"
  203. height="800"
  204. :show-close="false"
  205. :append-to-body="true"
  206. :close-on-click-modal="false"
  207. >
  208. <Camera :id="patientRegister.patientRegisterId" />
  209. </el-dialog>
  210. <!-- 指引单 -->
  211. <el-dialog
  212. title="指引单"
  213. :visible.sync="dialogGuide"
  214. width="400"
  215. height="800"
  216. :append-to-body="true"
  217. :close-on-click-modal="false"
  218. >
  219. <div>{{ guideMsg }}</div>
  220. </el-dialog>
  221. <!-- 批量调整分组 -->
  222. <el-dialog
  223. title="批量调整分组"
  224. :visible.sync="dialogGroup"
  225. width="600px"
  226. height="800"
  227. :append-to-body="true"
  228. :close-on-click-modal="false"
  229. >
  230. <div>
  231. <div>
  232. 批量调整分组只针对单位体检有效个人体检将忽略此操作不能调整已收费或已检的项目及已总检的体检人员
  233. </div>
  234. <div>
  235. <br /><span>分组</span>
  236. <el-select
  237. v-model="groupBatch.customerOrgGroupId"
  238. placeholder="请选择"
  239. filterable
  240. size="small"
  241. >
  242. <el-option
  243. v-for="item in patientRegister.customerOrgGroup"
  244. :key="item.id"
  245. :label="item.displayName"
  246. :value="item.id"
  247. />
  248. </el-select>
  249. </div>
  250. <div>
  251. <br /><el-radio v-model="groupBatch.payTypeFlag" label="0"
  252. >个人支付</el-radio
  253. >
  254. <br /><el-radio v-model="groupBatch.payTypeFlag" label="1"
  255. >单位支付</el-radio
  256. >
  257. <br /><el-radio v-model="groupBatch.payTypeFlag" label="2"
  258. >免费</el-radio
  259. >
  260. </div>
  261. <div>
  262. <br /><el-checkbox v-model="groupBatch.isReserveAddAsbitem"
  263. >保留加做项目包括不属于原分组的没有设置分组的</el-checkbox
  264. >
  265. </div>
  266. </div>
  267. <span slot="footer" class="dialog-footer">
  268. <el-button type="primary" @click="groupBatchHandle"> </el-button>
  269. <el-button @click="dialogGroup = false"> </el-button>
  270. </span>
  271. </el-dialog>
  272. <!-- 批量调整项目 -->
  273. <el-dialog
  274. title="批量调整项目"
  275. :visible.sync="dialogAsbitem"
  276. width="600px"
  277. height="800"
  278. :append-to-body="true"
  279. :close-on-click-modal="false"
  280. >
  281. <div>
  282. <div>
  283. 批量调整分组只针对单位体检有效个人体检将忽略此操作不能调整已收费或已检的项目及已总检的体检人员
  284. </div>
  285. <div>
  286. <br /><el-radio v-model="asbitemBatch.operate" label="add"
  287. >增加项目</el-radio
  288. >
  289. <el-radio v-model="asbitemBatch.operate" label="del"
  290. >删除项目</el-radio
  291. >
  292. </div>
  293. <div>
  294. <br /><el-checkbox
  295. v-model="asbitemBatch.isDeleteGroup"
  296. :disabled="asbitemBatch.operate == 'add' ? true : false"
  297. >如果删除项目属于分组则删除体检记录信息的分组设置</el-checkbox
  298. >
  299. </div>
  300. <div>
  301. <br /><span>直接录入</span>
  302. <el-select
  303. v-model="asbitemBatch.asbItemId"
  304. placeholder="快速选择组合项目"
  305. size="small" highlight-current-row
  306. filterable :filter-method="filterMethod"
  307. clearable @clear="quickAsb = deepCopy(dict.asbItemQuick)"
  308. @change="quickChoosedAsb"
  309. default-first-option ref="quickAsbOCX"
  310. style="width: 150px; text-align: left; padding-right: 15px"
  311. >
  312. <el-option
  313. v-for="item in quickAsb"
  314. :key="item.id"
  315. :value="item.id"
  316. :label="item.displayName"
  317. />
  318. </el-select>
  319. </div>
  320. <div style="display: flex; margin-top: 2px">
  321. <div style="width: 480px">
  322. <el-table
  323. :data="asbitemBatch.asbitemsTemp"
  324. height="240"
  325. width="100%"
  326. show-summary
  327. @row-dblclick="removeAbs"
  328. size="small" highlight-current-row
  329. @row-click="rowClickaAbitemCurr"
  330. border
  331. >
  332. <el-table-column
  333. label="组合项目"
  334. width="150"
  335. prop="asbitemName"
  336. />
  337. <el-table-column label="数量" prop="amount" width="60">
  338. <template slot-scope="scope">
  339. <el-input
  340. type="number"
  341. v-model="scope.row.amount"
  342. size="small"
  343. :disabled="asbitemBatch.operate == 'del' ? true : false"
  344. />
  345. </template>
  346. </el-table-column>
  347. <el-table-column label="实收价格" prop="chargePrice" width="90">
  348. <template slot-scope="scope">
  349. <el-input
  350. type="number"
  351. v-model="scope.row.chargePrice"
  352. size="small"
  353. :disabled="asbitemBatch.operate == 'del' ? true : false"
  354. />
  355. </template>
  356. </el-table-column>
  357. <el-table-column label="支付方式" prop="payTypeFlag" width="120">
  358. <template slot-scope="scope">
  359. <el-select
  360. v-model="scope.row.payTypeFlag"
  361. size="small"
  362. :disabled="asbitemBatch.operate == 'del' ? true : false"
  363. >
  364. <el-option
  365. v-for="item in dict.payType"
  366. :key="item.id"
  367. :label="item.displayName"
  368. :value="item.id"
  369. />
  370. </el-select>
  371. </template>
  372. </el-table-column>
  373. </el-table>
  374. </div>
  375. <div style="display: block; width: 110px; margin-left: 10px">
  376. <div style="margin-top: 5px">
  377. <el-button
  378. type="danger"
  379. @click="asbitemDel(1)"
  380. style="width: 100px"
  381. >删除</el-button
  382. >
  383. </div>
  384. <div style="margin-top: 5px">
  385. <el-button
  386. type="danger"
  387. @click="asbitemDel(0)"
  388. style="width: 100px"
  389. >删除全部</el-button
  390. >
  391. </div>
  392. <div style="margin-top: 5px">
  393. <el-button
  394. type="primary"
  395. @click="changePayTypeFlag('0')"
  396. style="width: 100px"
  397. >全个人支付</el-button
  398. >
  399. </div>
  400. <div style="margin-top: 5px">
  401. <el-button
  402. type="primary"
  403. @click="changePayTypeFlag('1')"
  404. style="width: 100px"
  405. >全单位支付</el-button
  406. >
  407. </div>
  408. <div style="margin-top: 5px">
  409. <el-button
  410. type="primary"
  411. @click="changePayTypeFlag('2')"
  412. style="width: 100px"
  413. >全赠送</el-button
  414. >
  415. </div>
  416. </div>
  417. </div>
  418. </div>
  419. <span slot="footer" class="dialog-footer">
  420. <el-button type="primary" @click="asbitemBatchHandle"> </el-button>
  421. <el-button @click="dialogAsbitem = false"> </el-button>
  422. </span>
  423. </el-dialog>
  424. <!-- 通用进度条 -->
  425. <el-dialog
  426. title="数据处理中……"
  427. :visible.sync="elProgress.display"
  428. width="600px"
  429. height="400"
  430. :show-close="false"
  431. :close-on-click-modal="false"
  432. :append-to-body="true"
  433. >
  434. <ElProgressOCX />
  435. </el-dialog>
  436. </div>
  437. </template>
  438. <script>
  439. import moment from "moment";
  440. import { mapState, mapActions } from "vuex";
  441. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  442. import Sortable from "sortablejs";
  443. import {
  444. dddw,
  445. objCopy,
  446. arrayReduce,
  447. arrayExistObj,
  448. deepCopy,
  449. } from "@/utlis/proFunc";
  450. import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";
  451. import Camera from "../../components/patientRegister/Camera.vue";
  452. import PatientRegisterAsbItem from "../../components/patientRegister/patientRegisterAsbItem.vue";
  453. import ElProgressOCX from "../../components/report/ElProgressOCX.vue";
  454. export default {
  455. components: {
  456. PatientRegisterEdit,
  457. Camera,
  458. PatientRegisterAsbItem,
  459. ElProgressOCX,
  460. },
  461. data() {
  462. return {
  463. peisid:null,
  464. startPoint: -1, // 多选起点 -1 表示选择
  465. endPoint: -1, // 多选终点 -1 表示选择
  466. multipleSelection: [], //选中的数据列表
  467. dialogVisible: false,
  468. dialogCamera: false,
  469. dialogGuide: false,
  470. guideMsg: "guideMsg",
  471. tabChoosed: "1",
  472. formInitData: {}, //体检登记初始表单数据
  473. editTimes: 0,
  474. rClickRow: null, //右击的行
  475. rClickColumn: null, //右击的列(预留)
  476. dialogGroup: false,
  477. groupBatch: {
  478. patientRegisterId: null,
  479. customerOrgGroupId: null,
  480. payTypeFlag: "1", //0:个人付费,1:单位付费 2:免费
  481. isReserveAddAsbitem: true, //是否保留加做项目
  482. },
  483. dialogAsbitem: false,
  484. asbitemBatch: {
  485. operate: "add",
  486. isDeleteGroup: false,
  487. asbItemId: "",
  488. asbitemsTemp: [], //删除或增加项目临时用
  489. asbitemCurr: {}, //当前选中要删除的项目(批量调整)
  490. },
  491. quickAsb: [], //可供快速选择的组合项目
  492. //动态列
  493. headerCols: [],
  494. //拖动列
  495. dropCol: [
  496. { label: "序号",prop: "sn",minWidth: 40,align:"center"},
  497. { label: "体检进度",prop: "completeFlag",minWidth: 80,align:"center"},
  498. { label: "打印", prop: "guidePrintTimes", minWidth: 50,align:"center" },
  499. { label: "锁住", prop: "isLock", minWidth: 50, align:"center"},
  500. { label: "单位", prop: "customerOrgParentName", minWidth: 180, align:"center"},
  501. { label: "部门", prop: "customerOrgName", minWidth: 120, align:"center"},
  502. { label: "姓名", prop: "patientName", minWidth: 80, align:"center"},
  503. { label: "性别", prop: "sexId", minWidth: 50, align:"center"},
  504. { label: "年龄", prop: "age", minWidth: 50, align:"center"},
  505. { label: "条码号", prop: "patientRegisterNo", minWidth: 150, align:"center"},
  506. { label: "档案号", prop: "patientNo", minWidth: 100, align:"center"},
  507. { label: "体检次数", prop: "medicalTimes", minWidth: 80, align:"center"},
  508. { label: "分组/套餐", prop: "groupPack", minWidth: 150, align:"center"},
  509. { label: "民族", prop: "nationId", minWidth: 50, align:"center"},
  510. { label: "身份证", prop: "idNo", minWidth: 150, align:"center"},
  511. { label: "出生日期", prop: "birthDate", minWidth: 80, align:"center"},
  512. { label: "邮箱", prop: "email", minWidth: 150, align:"center"},
  513. { label: "手机", prop: "mobileTelephone", minWidth: 100, align:"center"},
  514. { label: "电话", prop: "telephone", minWidth: 100, align:"center"},
  515. { label: "地址", prop: "address", minWidth: 300, align:""},
  516. { label: "体检卡号", prop: "medicalCardNo", minWidth: 80, align:"center"},
  517. { label: "工卡号", prop: "jobCardNo", minWidth: 80, align:"center"},
  518. { label: "婚姻状况", prop: "maritalStatusId", minWidth: 80, align:"center"},
  519. { label: "体检类别", prop: "medicalTypeId", minWidth: 80, align:"center"},
  520. { label: "人员类别", prop: "personnelTypeId", minWidth: 80, align:"center"},
  521. { label: "职务", prop: "jobPost", minWidth: 80, align:"center"},
  522. { label: "职称", prop: "jobTitle", minWidth: 80, align:"center"},
  523. { label: "介绍人", prop: "salesman", minWidth: 80, align:"center"},
  524. { label: "是否VIP", prop: "isVip", minWidth: 80, align:"center"},
  525. { label: "登记人", prop: "creatorName", minWidth: 80, align:"center"},
  526. { label: "登记日期", prop: "creationTime", minWidth: 80, align:"center"},
  527. { label: "是否上传", prop: "isUpload", minWidth: 80, align:"center"},
  528. ],
  529. };
  530. },
  531. created() {
  532. this.headerCols = deepCopy(this.dropCol)
  533. },
  534. //挂载完成
  535. mounted() {
  536. this.quickAsb = this.dict.asbItemAll;
  537. this.peisid = window.sessionStorage.getItem('peisid');
  538. //初始化可以拖动的列
  539. this.dropCol = this.columnDrop(this.dropCol);
  540. },
  541. computed: {
  542. ...mapState([
  543. "window",
  544. "dict",
  545. "elProgress",
  546. "patientRegister",
  547. "customerOrg",
  548. ]),
  549. },
  550. methods: {
  551. ...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
  552. moment,dddw,deepCopy,
  553. handleRowClassName({ row, rowIndex }) {
  554. // highLightBg 为 'selected'的高亮
  555. //console.log(rowIndex, row)
  556. //return row.highLightBg == 'selected' ? 'high-light-bg' : '';
  557. if (row.choosed) {
  558. return "current-row";
  559. } else {
  560. return "";
  561. }
  562. },
  563. rowSelected(rows) {
  564. rows.forEach((e) => {
  565. this.$refs["info"].toggleRowSelection(e, true);
  566. });
  567. },
  568. // 打印指引单(isPreview)
  569. async guidePrint(ReportCode, isPreview) {
  570. if (!this.$peisAPI) {
  571. this.$message.info("此功能,需要在壳客户端才可运行!");
  572. return;
  573. }
  574. let token = localStorage.getItem("token");
  575. let user = localStorage.getItem("user");
  576. let toOutShell = {
  577. ReportCode,
  578. token,
  579. preViewCanPrint: "N",
  580. Parameters: [
  581. { Name: "printer", Value: user },
  582. { Name: "hisLog", Value: "pic/hisLog.jpg" },
  583. ],
  584. };
  585. let lfind = -1;
  586. if (this.multipleSelection.length < 1) {
  587. this.$message.info("请勾选要打印指引单的人员记录!");
  588. return;
  589. }
  590. if (isPreview) {
  591. //
  592. //this.multipleSelection.forEach((item,index) =>{
  593. postapi(
  594. `/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.multipleSelection[0].id}`
  595. )
  596. .then((res) => {
  597. if (res.code != -1) {
  598. toOutShell.ReportTable = res.data;
  599. console.log(
  600. "JSON.stringify(toOutShell)",
  601. JSON.stringify(toOutShell)
  602. );
  603. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  604. }
  605. })
  606. .catch((err) => {
  607. this.$message.warning(err);
  608. });
  609. // });
  610. } else {
  611. this.multipleSelection.forEach((item, index) => {
  612. postapi(
  613. `/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${item.id}`
  614. )
  615. .then((res) => {
  616. if (res.code != -1) {
  617. toOutShell.ReportTable = res.data;
  618. console.log(
  619. "JSON.stringify(toOutShell)",
  620. JSON.stringify(toOutShell)
  621. );
  622. return this.$peisAPI.print(JSON.stringify(toOutShell));
  623. }
  624. })
  625. .then((res) => {
  626. if (JSON.parse(res).code >= 0) {
  627. //更新打印次数
  628. return postapi(
  629. "api/app/patientregister/updatepatientregisterguideprinttimesmany",
  630. [item.id]
  631. );
  632. }
  633. })
  634. .then((res) => {
  635. if (res.code != -1) {
  636. lfind = arrayExistObj(
  637. this.patientRegister.prList,
  638. "id",
  639. item.id
  640. );
  641. if (lfind > -1) {
  642. if (this.patientRegister.prList[lfind].guidePrintTimes) {
  643. this.patientRegister.prList[lfind].guidePrintTimes =
  644. Number(
  645. this.patientRegister.prList[lfind].guidePrintTimes
  646. ) + 1;
  647. } else {
  648. this.patientRegister.prList[lfind].guidePrintTimes = 1;
  649. }
  650. }
  651. }
  652. })
  653. .catch((err) => {
  654. this.$message.warning(err);
  655. });
  656. });
  657. }
  658. },
  659. handleSelectionChange(rows) {
  660. //this.multipleSelection = rows;
  661. //console.log('this.multipleSelection',this.multipleSelection)
  662. rows.forEach((item) => {
  663. item.highLightBg = "selected";
  664. });
  665. // 取消全选
  666. if (!rows.length) {
  667. this.patientRegister.prList.forEach((item) => {
  668. item.highLightBg = "";
  669. });
  670. }
  671. this.multipleSelection = JSON.parse(JSON.stringify(rows));
  672. },
  673. //获取单位分组 /api/app/customer-org-group/in-customer-org-id/3a0c0444-d7a0-871f-4074-19faf1655caf
  674. getCustomerOrgGroup(customerOrgId) {
  675. getapi(
  676. `/api/app/customer-org-group/in-customer-org-id/${customerOrgId}`
  677. ).then((res) => {
  678. console.log("getCustomerOrgGroup", res.data);
  679. if (res.code == 1) {
  680. this.patientRegister.customerOrgGroup = res.data;
  681. }
  682. });
  683. },
  684. //设置新增/编辑的form数据
  685. setForm(formData){
  686. this.patientRegister.patientRegisterRd = deepCopy(formData)
  687. if(!this.patientRegister.patientRegisterRd.id){
  688. this.patientRegister.patientRegisterRd.customerOrgId = this.patientRegister.query.customerOrgId
  689. }
  690. },
  691. //点击体检次数行
  692. rowClick(row) {
  693. //console.log("this.patientRegister.prList",this.window,this.patientRegister.prList);
  694. // 按住了shift键
  695. if (this.window.shift) {
  696. //清除所有选择
  697. this.patientRegister.prList.forEach((e,index) => {
  698. e.choosed = false;
  699. e.index = index;
  700. });
  701. if (this.startPoint == -1) {
  702. this.patientRegister.prList[row.index].choosed = true;
  703. this.startPoint = row.index;
  704. }else{
  705. if (this.startPoint > row.index) {
  706. for (let i = row.index; i <= this.startPoint; i++) {
  707. this.patientRegister.prList[i].choosed = true;
  708. }
  709. } else if (this.startPoint <= row.index) {
  710. for (let i = this.startPoint; i <= row.index; i++) {
  711. this.patientRegister.prList[i].choosed = true;
  712. }
  713. }
  714. }
  715. }else if (this.window.ctrl) { // 按住了ctrl 键
  716. this.patientRegister.prList[row.index].choosed = true;
  717. if (this.startPoint == -1){
  718. this.startPoint = row.index;
  719. }
  720. }else{
  721. // 未按住了ctrl 、shift 键
  722. //清除所有选择
  723. console.log("清除所有选择");
  724. this.patientRegister.prList.forEach((e,index) => {
  725. e.choosed = false;
  726. e.index = index;
  727. });
  728. console.log(this.patientRegister.prList,row.index);
  729. console.log(this.patientRegister.prList[row.index].choosed);
  730. this.patientRegister.prList[row.index].choosed = true;
  731. this.startPoint = row.index;
  732. }
  733. //选中了多个点编辑时,排序最前的为当前选中的
  734. console.log('row.index <= this.startPoint',row.index,this.startPoint)
  735. let lfind = -1
  736. for(let i=0;i<this.patientRegister.prList.length;i++){
  737. if(this.patientRegister.prList[i].choosed){
  738. lfind = i
  739. break
  740. }
  741. }
  742. if(lfind > -1 && this.patientRegister.patientRegisterRd.id != this.patientRegister.prList[lfind].id){
  743. this.setForm(this.patientRegister.prList[lfind])
  744. // this.patientRegister.query.customerOrgParentId = this.patientRegister.prList[lfind].customerOrgParentId;
  745. this.patientRegister.customerOrgGroupChange = 0; //控制体检列表记录切换时,0 无需触发更换分组操作
  746. this.patientRegister.medicalPackageChange = 0; //控制体检列表记录切换时,0 无需触发更换套餐操作
  747. // this.getCustomerOrgGroup(this.patientRegister.prList[lfind].customerOrgParentId);
  748. this.dict.asbItem = [...this.dict.asbItemAll];
  749. this.getPatientRegisterAbs(this.patientRegister.prList[lfind].id);
  750. }
  751. },
  752. //体检次数 相关操作
  753. btnAdd() {
  754. if(!this.peisid || this.peisid == 'null'){
  755. this.$message.warning("该用户未选归属体检中心,不能执行此操作!");
  756. return
  757. }
  758. let customerOrgId = this.patientRegister.query.customerOrgId;
  759. if (!customerOrgId) {
  760. this.$message.warning("请选择单位或个人");
  761. return;
  762. }
  763. this.patientRegister.patientRegisterRdInit.customerOrgId = customerOrgId
  764. this.setForm(this.patientRegister.patientRegisterRdInit)
  765. this.patientRegister.patientRegisterAbs = [];
  766. this.dialogVisible = true;
  767. this.editTimes++; //触发表单窗口,数据更新
  768. this.getPatientRegisterAbs();
  769. },
  770. btnEdit() {
  771. if (!this.patientRegister.patientRegisterRd.id) {
  772. this.$message.warning("请选择要操作的记录");
  773. return;
  774. }
  775. //console.log(this.patientRegister.patientRegisterRd,this.patientRegister.prList)
  776. this.dialogVisible = true;
  777. this.editTimes++; //触发表单窗口,数据更新
  778. },
  779. //新增或编辑后选中记录
  780. closeDialogPR(){
  781. this.patientRegister.prList.forEach(e =>{
  782. e.choosed = false
  783. })
  784. let currentRow = {}
  785. let lfind = arrayExistObj(this.patientRegister.prList,'id',this.patientRegister.patientRegisterRd.id)
  786. if(lfind > -1){
  787. this.patientRegister.prList[lfind].choosed = true
  788. currentRow = this.patientRegister.prList[lfind]
  789. }else if(this.patientRegister.patientRegisterRd.id){
  790. currentRow = deepCopy(this.patientRegister.patientRegisterRd)
  791. lfind = this.patientRegister.prList.length
  792. currentRow.choosed = true
  793. currentRow.index = lfind
  794. this.patientRegister.prList.push(currentRow)
  795. }
  796. if(lfind > -1){
  797. setTimeout(() => {
  798. this.$refs['info'].setCurrentRow(currentRow)
  799. }, 100)
  800. }
  801. },
  802. //拍照
  803. openCamera() {
  804. if (!this.patientRegister.patientRegisterId) {
  805. this.$message.warning("请选择要操作的记录");
  806. return;
  807. }
  808. this.patientRegister.cameraVisble = true;
  809. },
  810. //删除(可批量删除)
  811. // /api/app/patient-register/many?PatientRegisterIds=3a0c2cac-f44c-f407-9504-c1fc5e80a159&PatientRegisterIds=3a0c2cb3-d10c-ed70-db6a-b835e75ce641
  812. btnDel() {
  813. //选中(取消勾选)start -------------------------
  814. this.multipleSelection = []
  815. this.patientRegister.prList.forEach(e =>{
  816. if(e.choosed){
  817. this.multipleSelection.push(deepCopy(e))
  818. }
  819. })
  820. //选中(取消勾选) end -------------------------
  821. if (this.multipleSelection.length < 1) {
  822. this.$message.warning("请先勾选要操作的记录");
  823. return;
  824. }
  825. let patientRegisterIds = [];
  826. for (let i = 0; i < this.multipleSelection.length; i++) {
  827. patientRegisterIds.push(this.multipleSelection[i]["id"]);
  828. }
  829. this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
  830. confirmButtonText: "是",
  831. cancelButtonText: "否",
  832. type: "warning",
  833. })
  834. .then(() => {
  835. //console.log('{patientRegisterIds}',{patientRegisterIds})
  836. return postapi(`/api/app/patient-register/delete-many`, {
  837. patientRegisterIds,
  838. });
  839. })
  840. .then((res) => {
  841. if(res.code != -1){
  842. this.$message.success("操作成功");
  843. arrayReduce(this.patientRegister.prList,this.multipleSelection,'id=id')
  844. this.setForm(this.patientRegister.patientRegisterRdInit)
  845. this.getPatientRegisterAbs();
  846. }
  847. })
  848. .catch((err) => {
  849. if (err == "cancel") {
  850. this.$message.info("已取消操作");
  851. }
  852. });
  853. },
  854. //查询
  855. async Query() {
  856. this.patientRegister.prList = [];
  857. let body = {maxResultCount:500};
  858. console.log(`this.patientRegister.query`, this.patientRegister.query);
  859. if (this.patientRegister.query.customerOrgFlag) {
  860. // if (this.patientRegister.query.CustomerOrgParentId) {
  861. // body.customerOrgId = this.patientRegister.query.CustomerOrgParentId;
  862. // } else {
  863. // if (this.patientRegister.query.customerOrgId)
  864. // body.customerOrgId = this.patientRegister.query.customerOrgId;
  865. // }
  866. if (this.patientRegister.query.customerOrgId) body.customerOrgId = this.patientRegister.query.customerOrgId;
  867. if(this.patientRegister.query.customerOrgId && this.patientRegister.query.customerOrgId != this.dict.personOrgId){
  868. body.customerOrgRegisterId = this.patientRegister.query.customerOrgRegister.id
  869. }
  870. }
  871. if (this.patientRegister.query.sex)
  872. body.sexId = this.patientRegister.query.sex;
  873. if (this.patientRegister.query.patientName)
  874. body.patientName = this.patientRegister.query.patientName;
  875. if (this.patientRegister.query.completeFlag)
  876. body.completeFlag = this.patientRegister.query.completeFlag;
  877. //StartDate EndDate
  878. if (
  879. this.patientRegister.query.startDate &&
  880. this.patientRegister.query.endDate
  881. ) {
  882. body.startDate = moment(this.patientRegister.query.startDate).format(
  883. "yyyy-MM-DD"
  884. );
  885. body.endDate = moment(this.patientRegister.query.endDate).format(
  886. "yyyy-MM-DD"
  887. );
  888. if (body.startDate > body.endDate) {
  889. this.$message.warning("起始日期不能大于截止日期,数据校验不通过!");
  890. return;
  891. }
  892. }
  893. if (this.patientRegister.query.phone)
  894. body.phone = this.patientRegister.query.phone;
  895. if (this.patientRegister.query.idCardNo)
  896. body = { idNo: this.patientRegister.query.idCardNo };
  897. if (this.patientRegister.query.patientNo)
  898. body = { patientNo: this.patientRegister.query.patientNo };
  899. if (this.patientRegister.query.patientRegisterNo)
  900. body = {
  901. patientRegisterNo: this.patientRegister.query.patientRegisterNo,
  902. };
  903. console.log("/api/app/patientregister/getlistinfilter", body);
  904. const loading = this.$loading({
  905. lock: true,
  906. text: "Loading",
  907. spinner: "el-icon-loading",
  908. background: "rgba(0, 0, 0, 0.7)",
  909. });
  910. postapi("/api/app/patientregister/getlistinfilter", body)
  911. .then((res) => {
  912. if (res.code != -1) {
  913. this.patientRegister.prList = res.data.items;
  914. //配合多选使用
  915. this.patientRegister.prList.forEach((item, index) => {
  916. item.index = index;
  917. item.choosed = false;
  918. });
  919. }
  920. loading.close();
  921. })
  922. .catch((err) => {
  923. loading.close();
  924. });
  925. // try {
  926. // let res =await postapi('/api/app/patientregister/getlistinfilter', body);
  927. // this.patientRegister.prList = res.data;
  928. // } catch (error) {
  929. // console.log("query error",error);
  930. // }
  931. },
  932. //右击菜单
  933. onCellRightClick(row, column) {
  934. this.rClickRow = { ...row }; //右击的行记录
  935. this.rClickColumn = { ...column }; //右击的列(预留)
  936. console.log(row, column.property);
  937. },
  938. onContextmenu(event) {
  939. //console.log('onContextmenu',event);
  940. if (!this.rClickRow) return false;
  941. let row = { ...this.rClickRow };
  942. this.$contextmenu({
  943. items: [
  944. {
  945. label: "发送检验申请",
  946. onClick: () => {
  947. this.lisRequest(row.id);
  948. },
  949. },
  950. {
  951. label: "预览检验条码",
  952. onClick: () => {
  953. this.lisPrint(row.id, "0002", true);
  954. },
  955. },
  956. {
  957. label: "打印检验条码",
  958. onClick: () => {
  959. this.lisPrint(row.id, "0002", false);
  960. },
  961. },
  962. {
  963. label: "预览Pacs条码",
  964. onClick: () => {
  965. this.pacsPrint(row.id, "0004", true);
  966. },
  967. },
  968. {
  969. label: "打印Pacs条码",
  970. onClick: () => {
  971. this.pacsPrint(row.id, "0004", false);
  972. },
  973. },
  974. {
  975. label: "----------------",
  976. },
  977. ],
  978. event,
  979. //x: event.clientX,
  980. //y: event.clientY,
  981. customClass: "custom-class",
  982. zIndex: 3,
  983. minWidth: 80,
  984. });
  985. this.rClickRow = null;
  986. return false;
  987. },
  988. //批量更新分组按钮
  989. btnGroupBatch() {
  990. let customerOrgId = this.patientRegister.query.customerOrgId;
  991. if (!customerOrgId) {
  992. this.$message.warning("请选择单位");
  993. return;
  994. }
  995. //取消勾选,换成选择的方式 start
  996. this.multipleSelection = [];
  997. this.patientRegister.prList.forEach((e) => {
  998. if (e.choosed) this.multipleSelection.push(e);
  999. });
  1000. //取消勾选,换成选择的方式 end
  1001. if (this.multipleSelection.length < 1) {
  1002. this.$message.info("请选择要操作的记录!");
  1003. return;
  1004. }
  1005. this.dialogGroup = true;
  1006. },
  1007. //批量更新分组处理
  1008. async groupBatchHandle() {
  1009. let groupBatch = { patientRegisterId: null, ...this.groupBatch };
  1010. if (groupBatch.isReserveAddAsbitem) {
  1011. groupBatch.isReserveAddAsbitem = "Y";
  1012. } else {
  1013. groupBatch.isReserveAddAsbitem = "N";
  1014. }
  1015. console.log("groupBatch", groupBatch);
  1016. if (!groupBatch.customerOrgGroupId) {
  1017. this.$message.warning("请选择分组");
  1018. return;
  1019. }
  1020. this.elProgress.display = true;
  1021. this.elProgress.percentage = 0;
  1022. for (let i = 0; i < this.multipleSelection.length; i++) {
  1023. groupBatch.patientRegisterId = this.multipleSelection[i].id;
  1024. try {
  1025. await postapi(
  1026. "/api/app/patientregister/updatepatientregistercustomerorggroup",
  1027. groupBatch
  1028. );
  1029. } catch (error) {
  1030. console.log(error);
  1031. }
  1032. this.elProgress.percentage = Math.floor(
  1033. ((i + 1) * 100) / this.multipleSelection.length
  1034. );
  1035. }
  1036. this.$message.success("操作成功!");
  1037. this.dialogGroup = false;
  1038. this.Query();
  1039. },
  1040. //快速查询项目
  1041. filterMethod(keyWords) {
  1042. //console.log('filterMethod',this.dict.asbItemQuick)
  1043. if (keyWords) {
  1044. this.quickAsb = [];
  1045. this.dict.asbItemQuick.forEach((item) => {
  1046. if (
  1047. item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) >
  1048. -1 ||
  1049. item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) >
  1050. -1 ||
  1051. item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > -1
  1052. ) {
  1053. this.quickAsb.push(item);
  1054. }
  1055. });
  1056. } else {
  1057. this.quickAsb = deepCopy(this.dict.asbItemQuick);
  1058. }
  1059. },
  1060. //快速选择项目
  1061. quickChoosedAsb(v) {
  1062. //过滤已选的的组合项目
  1063. let lfind = -1;
  1064. if (v) {
  1065. lfind = arrayExistObj(this.quickAsb, "id", v);
  1066. if (lfind > -1) {
  1067. this.asbitemBatch.asbitemsTemp.push({
  1068. asbitemId: v,
  1069. asbitemName: this.quickAsb[lfind].displayName, //仅作显示用
  1070. patientRegisterId: null,
  1071. standardPrice: this.quickAsb[lfind].price,
  1072. chargePrice: this.quickAsb[lfind].price,
  1073. payTypeFlag: "1", //默认单位支付
  1074. isCharge: "N",
  1075. amount: 1,
  1076. });
  1077. this.quickAsb.splice(lfind, 1);
  1078. arrayReduce(this.dict.asbItemQuick, { id: v }, "id=id");
  1079. }
  1080. }
  1081. //console.log(v, this.asbitemBatch.asbitemsTemp);
  1082. this.$nextTick(() => {
  1083. this.$refs['quickAsbOCX'].blur(); //total asbItemId
  1084. this.asbItemId = ''
  1085. this.quickAsb = deepCopy(this.dict.asbItemQuick)
  1086. this.$refs['quickAsbOCX'].focus(); //total asbItemId
  1087. });
  1088. },
  1089. //删除临时显示的组合项目
  1090. removeAbs(row) {
  1091. let lfind = arrayExistObj(
  1092. this.asbitemBatch.asbitemsTemp,
  1093. "asbitemId",
  1094. row.asbitemId
  1095. );
  1096. if (lfind > -1) this.asbitemBatch.asbitemsTemp.splice(lfind, 1);
  1097. },
  1098. rowClickaAbitemCurr(row) {
  1099. this.asbitemBatch.asbitemCurr = row;
  1100. },
  1101. btnRemoveAbs() {
  1102. if (!this.asbitemBatch.asbitemCurr.asbitemId) {
  1103. this.$message.warning("请选择要删除的组合项目!");
  1104. return;
  1105. }
  1106. this.removeAbs(this.asbitemBatch.asbitemCurr);
  1107. this.asbitemBatch.asbitemCurr.asbitemId = null;
  1108. },
  1109. removeAllAbs() {
  1110. this.asbitemBatch.asbitemsTemp = [];
  1111. },
  1112. //批量更新项目
  1113. btnAsbBatch() {
  1114. let customerOrgId = this.patientRegister.query.customerOrgId;
  1115. if (!customerOrgId) {
  1116. this.$message.warning("请选择单位");
  1117. return;
  1118. }
  1119. //取消勾选,换成选择的方式 start
  1120. this.multipleSelection = [];
  1121. this.patientRegister.prList.forEach((e) => {
  1122. if (e.choosed) this.multipleSelection.push(e);
  1123. });
  1124. //取消勾选,换成选择的方式 end
  1125. if(this.multipleSelection.length < 1){
  1126. this.$message.warning("请选择要操作的记录")
  1127. return
  1128. }
  1129. this.dialogAsbitem = true;
  1130. //供快速选择的组合项目
  1131. this.dict.asbItemQuick = deepCopy(this.dict.asbItemAll);
  1132. this.asbitemBatch.asbitemCurr.asbitemId = null;
  1133. this.asbitemBatch.asbitemsTemp = [];
  1134. },
  1135. asbitemDel(type) {
  1136. //typ==0 为批量删除
  1137. if (Number(type) == 0) {
  1138. this.asbitemBatch.asbitemsTemp = [];
  1139. } else {
  1140. if (!this.asbitemBatch.asbitemCurr.asbitemId) {
  1141. this.$message.warning("请选中要删除的项目!");
  1142. return;
  1143. }
  1144. //console.log(this.asbitemBatch.asbitemsTemp,this.asbitemBatch.asbitemCurr)
  1145. let lfind = arrayExistObj(
  1146. this.asbitemBatch.asbitemsTemp,
  1147. "asbitemId",
  1148. this.asbitemBatch.asbitemCurr.asbitemId
  1149. );
  1150. if (lfind > -1) {
  1151. this.asbitemBatch.asbitemsTemp.splice(lfind, 1);
  1152. this.asbitemBatch.asbitemCurr.asbitemId = null;
  1153. }
  1154. //console.log(lfind);
  1155. }
  1156. },
  1157. //批量调整支付方式
  1158. changePayTypeFlag(flag) {
  1159. this.asbitemBatch.asbitemsTemp.forEach((e) => {
  1160. e.payTypeFlag = flag;
  1161. return e;
  1162. });
  1163. },
  1164. //批量调整项目
  1165. async asbitemBatchHandle() {
  1166. let msg = "",
  1167. body = {};
  1168. if (this.asbitemBatch.asbitemsTemp.length == 0) {
  1169. this.$message.warning("没有选择组合项目,不可执行此操作!");
  1170. return;
  1171. }
  1172. if (this.asbitemBatch.operate == "add") {
  1173. this.asbitemBatch.asbitemsTemp.forEach((e, index) => {
  1174. if (!e.amount || !e.chargePrice) {
  1175. msg = "第 " + (index + 1) + " 行,未输入数量或价格!";
  1176. }
  1177. });
  1178. if (msg) {
  1179. this.$message.warning(msg);
  1180. return;
  1181. }
  1182. // {
  1183. // "organizationUnitId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  1184. // "createRegisterAsbitemDtos": [
  1185. // {
  1186. // "asbitemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  1187. // "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  1188. // "standardPrice": 0,
  1189. // "chargePrice": 0,
  1190. // "payTypeFlag": "string",
  1191. // "isCharge": "string",
  1192. // "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  1193. // "amount": 0,
  1194. // "groupPackageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  1195. // }
  1196. // ]
  1197. // }
  1198. let createRegisterAsbitemDtos = deepCopy(
  1199. this.asbitemBatch.asbitemsTemp
  1200. );
  1201. createRegisterAsbitemDtos.forEach((e) => {
  1202. delete e.asbitemName;
  1203. return e;
  1204. });
  1205. this.elProgress.display = true;
  1206. this.elProgress.percentage = 0;
  1207. for (let i = 0; i < this.multipleSelection.length; i++) {
  1208. createRegisterAsbitemDtos.forEach((e) => {
  1209. e.patientRegisterId = this.multipleSelection[i].id;
  1210. return e;
  1211. });
  1212. body = {
  1213. organizationUnitId: this.multipleSelection[i].organizationUnitId,
  1214. createRegisterAsbitemDtos,
  1215. };
  1216. try {
  1217. await postapi(
  1218. "/api/app/registerasbitem/createregisterasbitemincustomerorgmany",
  1219. body
  1220. );
  1221. } catch (error) {
  1222. console.log("批量增加项目错误,原因:", error);
  1223. }
  1224. this.elProgress.percentage = Math.floor(
  1225. ((i + 1) * 100) / this.multipleSelection.length
  1226. );
  1227. }
  1228. } else {
  1229. // {
  1230. // isDeleteGroup: 'N',
  1231. // patientRegisterId: null,
  1232. // asbitemIds: [],
  1233. // }
  1234. let asbitemIds = [];
  1235. if (this.asbitemBatch.isDeleteGroup) {
  1236. body.isDeleteGroup = "Y";
  1237. } else {
  1238. body.isDeleteGroup = "N";
  1239. }
  1240. this.elProgress.display = true;
  1241. this.elProgress.percentage = 0;
  1242. for (let i = 0; i < this.multipleSelection.length; i++) {
  1243. this.asbitemBatch.asbitemsTemp.forEach((e) => {
  1244. asbitemIds.push(e.asbitemId);
  1245. });
  1246. body.patientRegisterId = this.multipleSelection[i].id;
  1247. body.asbitemIds = asbitemIds;
  1248. try {
  1249. await postapi(
  1250. "/api/app/registerasbitem/deleteregisterasbitemincustomerorgmany",
  1251. body
  1252. );
  1253. } catch (error) {
  1254. console.log("批量删除项目错误,原因:", error);
  1255. }
  1256. this.elProgress.percentage = Math.floor(
  1257. ((i + 1) * 100) / this.multipleSelection.length
  1258. );
  1259. }
  1260. }
  1261. this.$message.success("操作成功!");
  1262. this.dialogAsbitem = false;
  1263. this.Query();
  1264. },
  1265. //检验申请
  1266. async lisRequest(prId) {
  1267. let isPrintLisRequest = false;
  1268. let res = null;
  1269. if (prId.length < 1) {
  1270. this.$message.info("人员信息尚未保存,不可执行此操作!");
  1271. return;
  1272. }
  1273. try {
  1274. res = await postapi(
  1275. `/api/app/lisrequest/setlisrequest?PatientRegisterId=${prId}`
  1276. );
  1277. console.log(
  1278. `/api/app/lisrequest/setlisrequest?PatientRegisterId=${prId}`,
  1279. res
  1280. );
  1281. } catch (error) {
  1282. return;
  1283. }
  1284. if (res.code != -1) {
  1285. this.$message.info("发送检验申请成功!");
  1286. isPrintLisRequest = true;
  1287. }
  1288. //重复申请,重打
  1289. if (res.code == -1 && res.message.indexOf("已申请") > -1) {
  1290. isPrintLisRequest = true;
  1291. }
  1292. if (!isPrintLisRequest) return;
  1293. try {
  1294. await this.$confirm("是否打印检验申请单?", "提示", {
  1295. confirmButtonText: "是",
  1296. cancelButtonText: "否",
  1297. type: "info",
  1298. showClose: false,
  1299. closeOnClickModal: false,
  1300. closeOnPressEscape: false,
  1301. });
  1302. } catch (error) {
  1303. return;
  1304. }
  1305. //打印检验申请单
  1306. this.lisPrint(prId, "0003", false);
  1307. },
  1308. //检验条码打印
  1309. lisPrint(prId, ReportCode, isPreview) {
  1310. if (!this.$peisAPI) {
  1311. this.$message.info("此功能,需要在壳客户端才可运行!");
  1312. return;
  1313. }
  1314. let token = localStorage.getItem("token");
  1315. let user = localStorage.getItem("user");
  1316. let toOutShell = {
  1317. ReportCode,
  1318. token,
  1319. preViewCanPrint: "N",
  1320. Parameters: [
  1321. { Name: "printer", Value: user },
  1322. { Name: "hisLog", Value: "pic/hisLog.jpg" },
  1323. ],
  1324. };
  1325. if (isPreview) {
  1326. //http://140.143.162.39:9529/api/app/printreport/getlisrequestreport?PatientRegisterId=3a0d2e90-da68-3746-6775-bf17e5f9b295
  1327. //this.multipleSelection.forEach((item,index) =>{
  1328. postapi(
  1329. `/api/app/printreport/getlisrequestreport?PatientRegisterId=${prId}`
  1330. )
  1331. .then((res) => {
  1332. if (res.code != -1) {
  1333. toOutShell.ReportTable = { lisRequest: res.data };
  1334. console.log(
  1335. "JSON.stringify(toOutShell)",
  1336. JSON.stringify(toOutShell)
  1337. );
  1338. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  1339. }
  1340. })
  1341. .catch((err) => {
  1342. this.$message.warning(err);
  1343. });
  1344. // });
  1345. } else {
  1346. postapi(
  1347. `/api/app/printreport/getlisrequestreport?PatientRegisterId=${prId}`
  1348. )
  1349. .then((res) => {
  1350. if (res.code != -1) {
  1351. toOutShell.ReportTable = { lisRequest: res.data };
  1352. console.log(
  1353. "JSON.stringify(toOutShell)",
  1354. JSON.stringify(toOutShell)
  1355. );
  1356. return this.$peisAPI.print(JSON.stringify(toOutShell));
  1357. }
  1358. })
  1359. .then((res) => {
  1360. //console.log("res", res);
  1361. if (JSON.parse(res).code >= 0) {
  1362. //更新打印状态 /api/app/lisrequest/updatelisrequestisprint
  1363. // {
  1364. // "operateType": 0, 操作类型(1.按PatientRegisterId 2.按LisRequestId)
  1365. // "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  1366. // "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  1367. // }
  1368. return postapi("/api/app/lisrequest/updatelisrequestisprint", {
  1369. operateType: 1,
  1370. patientRegisterId: prId,
  1371. });
  1372. }
  1373. })
  1374. .catch((err) => {
  1375. this.$message.warning(err);
  1376. });
  1377. }
  1378. },
  1379. //pacs条码打印
  1380. pacsPrint(prId, ReportCode, isPreview) {
  1381. if (!this.$peisAPI) {
  1382. this.$message.info("此功能,需要在壳客户端才可运行!");
  1383. return;
  1384. }
  1385. let token = localStorage.getItem("token");
  1386. let user = localStorage.getItem("user");
  1387. let toOutShell = {
  1388. ReportCode,
  1389. token,
  1390. preViewCanPrint: "Y",
  1391. Parameters: [
  1392. { Name: "printer", Value: user },
  1393. { Name: "hisLog", Value: "pic/hisLog.jpg" },
  1394. ],
  1395. };
  1396. if (isPreview) {
  1397. //http://140.143.162.39:9529/api/app/printreport/getpacsnoreport?PatientRegisterId=3a0c990e-5756-2dc0-19d5-69a617fe4048
  1398. //this.multipleSelection.forEach((item,index) =>{
  1399. postapi(
  1400. `/api/app/printreport/getpacsnoreport?PatientRegisterId=${prId}`
  1401. )
  1402. .then((res) => {
  1403. if (res.code != -1) {
  1404. toOutShell.ReportTable = { lisRequest: res.data };
  1405. console.log(
  1406. "JSON.stringify(toOutShell)",
  1407. JSON.stringify(toOutShell)
  1408. );
  1409. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  1410. }
  1411. })
  1412. .catch((err) => {
  1413. this.$message.warning(err);
  1414. });
  1415. // });
  1416. } else {
  1417. postapi(
  1418. `/api/app/printreport/getpacsnoreport?PatientRegisterId=${prId}`
  1419. )
  1420. .then((res) => {
  1421. if (res.code != -1) {
  1422. toOutShell.ReportTable = { lisRequest: res.data };
  1423. console.log(
  1424. "JSON.stringify(toOutShell)",
  1425. JSON.stringify(toOutShell)
  1426. );
  1427. return this.$peisAPI.print(JSON.stringify(toOutShell));
  1428. }
  1429. })
  1430. .then((res) => {
  1431. if (JSON.parse(res).code >= 0) {
  1432. //更新打印状态 /api/app/lisrequest/updatelisrequestisprint
  1433. // {
  1434. // "operateType": 0, 操作类型(1.按PatientRegisterId 2.按LisRequestId)
  1435. // "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  1436. // "lisRequestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  1437. // }
  1438. return postapi("/api/app/lisrequest/updatelisrequestisprint", {
  1439. operateType: 1,
  1440. patientRegisterId: prId,
  1441. });
  1442. }
  1443. })
  1444. .catch((err) => {
  1445. this.$message.warning(err);
  1446. });
  1447. }
  1448. },
  1449. columnDrop(dropCol) {
  1450. //获取dom节点
  1451. const wrapperTr = document.querySelector(".el-table__header-wrapper tr");
  1452. Sortable.create(wrapperTr, {
  1453. animation: 180,
  1454. delay: 0,
  1455. // 元素被选中
  1456. onChoose: function (/**Event*/ evt) {
  1457. //console.log('onChoose',evt,evt.oldIndex)
  1458. evt.oldIndex; // element index within parent
  1459. },
  1460. // 元素未被选中的时候(从选中到未选中)
  1461. onUnchoose: function (/**Event*/ evt) {
  1462. // same properties as onEnd
  1463. },
  1464. // 开始拖拽的时候
  1465. onStart: function (/**Event*/ evt) {
  1466. //console.log('onStart',evt,evt.oldIndex)
  1467. evt.oldIndex; // element index within parent
  1468. },
  1469. onEnd: (evt) => {
  1470. const oldItem = dropCol[evt.oldIndex]; // dropCol[evt.oldIndex - 1];
  1471. if (oldItem) {
  1472. dropCol.splice(evt.oldIndex, 1);
  1473. dropCol.splice(evt.newIndex, 0, oldItem);
  1474. }
  1475. //console.log(this.headerCols, oldItem, dropCol);
  1476. },
  1477. });
  1478. return dropCol;
  1479. },
  1480. },
  1481. //监听事件
  1482. watch: {
  1483. //触发查询事件
  1484. "patientRegister.query.times"(newVal, oldVal) {
  1485. if (newVal != oldVal) {
  1486. //alert('触发查询事件')
  1487. this.Query();
  1488. }
  1489. },
  1490. //新增后,触发赋值
  1491. "patientRegister.patientRegisterRd.id"(newVal, oldVal) {
  1492. if (newVal != oldVal) {
  1493. //console.log('patientRegister.patientRegisterRd.customerOrgId',this.patientRegister.patientRegisterRd.customerOrgId)
  1494. objCopy(this.patientRegister.patientRegisterRd, this.form);
  1495. }
  1496. },
  1497. },
  1498. };
  1499. </script>
  1500. <style scoped>
  1501. @import "../../assets/css/global_input.css";
  1502. @import "../../assets/css/global_table.css";
  1503. @import "../../assets/css/global.css";
  1504. .box {
  1505. display: flex;
  1506. }
  1507. .listBtn {
  1508. margin-top: 5px;
  1509. text-align: center;
  1510. }
  1511. .btnClass {
  1512. width: 100px;
  1513. }
  1514. </style>