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.

444 lines
16 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years 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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div>
  3. <div>
  4. <el-table :data="patientRegister.prList" border ref="info" id="info"
  5. :height="(window.pageHeight < 600) ? 230 : (window.pageHeight - 370)" highlight-current-row @row-click="rowClick"
  6. size="small" @selection-change="handleSelectionChange">
  7. <el-table-column type="selection" width="40" align="center" />
  8. <el-table-column prop="completeFlag" label="体检进度">
  9. <template slot-scope="scope">
  10. <div :style="`color: ${setPrStatusColor(scope.row.isAudit, scope.row.completeFlag)}`">{{
  11. dddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div>
  12. </template>
  13. </el-table-column>
  14. <el-table-column prop="isReportPrint" label="打印" width="50" align="center">
  15. <template slot-scope="scope">
  16. <i class="el-icon-printer" v-if="scope.row.isReportPrint == 'Y'" style="font-size: 24px;color: green;"></i>
  17. </template>
  18. </el-table-column>
  19. <el-table-column prop="isUploadAppoint" label="预约备单" align="center">
  20. <template slot-scope="scope">
  21. <div style="font-family: 'Microsoft YaHei';">{{ scope.row.isUploadAppoint == "Y" ? "√" : "" }}</div>
  22. </template>
  23. </el-table-column>
  24. <el-table-column prop="isUpload" label="报告上传" align="center">
  25. <template slot-scope="scope">
  26. <div style="font-family: 'Microsoft YaHei';">{{ scope.row.isUpload == "Y" ? "√" : "" }}</div>
  27. </template>
  28. </el-table-column>
  29. <el-table-column prop="customerOrgName" label="单位" width="180" />
  30. <el-table-column prop="departmentName" label="部门" width="180" />
  31. <el-table-column prop="patientName" label="姓名" align="center" />
  32. <el-table-column prop="mobileTelephone" label="手机" width="130" />
  33. <el-table-column prop="sexName" label="性别" align="center" />
  34. <el-table-column prop="age" label="年龄" align="center" />
  35. <el-table-column prop="patientRegisterNo" label="条码号" width="150" align="center" />
  36. <el-table-column prop="patientNo" label="档案号" align="center" />
  37. <el-table-column prop="medicalTimes" label="体检次数" align="center" />
  38. <el-table-column label="分组/套餐" width="150">
  39. <template slot-scope="scope">
  40. <div v-if="scope.row.medicalPackageName">
  41. {{ scope.row.medicalPackageName }}
  42. </div>
  43. <div v-if="scope.row.customerOrgGroupName">
  44. {{ scope.row.customerOrgGroupName }}
  45. </div>
  46. </template>
  47. </el-table-column>
  48. <el-table-column prop="nationId" label="民族" align="center">
  49. <template slot-scope="scope">
  50. <div>
  51. {{ dddw(dict.nation, "nationId", scope.row.nationId, "displayName") }}
  52. </div>
  53. </template>
  54. </el-table-column>
  55. <el-table-column prop="idNo" label="身份证" width="150" align="center" />
  56. <el-table-column prop="birthDate" label="出生日期" width="100" align="center">
  57. <template slot-scope="scope">
  58. <div v-if="scope.row.birthDate">
  59. {{ lmoment(scope.row.birthDate, "yyyy-MM-DD") }}
  60. </div>
  61. </template>
  62. </el-table-column>
  63. <el-table-column prop="email" label="邮箱" width="180" />
  64. <el-table-column prop="telephone" label="电话" width="130" />
  65. <el-table-column prop="address" label="地址" width="400" />
  66. <el-table-column prop="medicalCardNo" label="体检卡号" />
  67. <el-table-column prop="jobCardNo" label="工卡号" />
  68. <el-table-column prop="maritalStatusName" label="婚姻状况" align="center" />
  69. <el-table-column prop="medicalTypeName" label="体检类别" align="center"/>
  70. <el-table-column prop="personnelTypeName" label="人员类别" align="center"/>
  71. <el-table-column prop="jobPost" label="职务" />
  72. <el-table-column prop="jobTitle" label="职称" />
  73. <el-table-column prop="salesman" label="介绍人" />
  74. <el-table-column prop="isVip" label="VIP" width="50" align="center">
  75. <template slot-scope="scope">
  76. <div>{{ scope.row.isVip == "Y" ? "是" : "否" }}</div>
  77. </template>
  78. </el-table-column>
  79. <el-table-column prop="registerName" label="登记人" align="center"/>
  80. <el-table-column prop="registerDate" label="登记日期" width="150" align="center"/>
  81. <el-table-column prop="isLock" label="锁住" align="center" width="50">
  82. <template slot-scope="scope">
  83. <div>{{ scope.row.isLock == "Y" ? "是" : "否" }}</div>
  84. </template>
  85. </el-table-column>
  86. <!--
  87. "sexHormoneTermId": "00000000-0000-0000-0000-000000000000",
  88. "interposeMeasure": null,
  89. "medicalConclusionId": "00000000-0000-0000-0000-000000000000",
  90. "reportPrintTimes": 0,
  91. "isMedicalStart": "N",
  92. "medicalStartDate": "6/28/2023",
  93. "isRecoverGuide": "N",
  94. "summaryDate": "",
  95. "summaryDoctor": null,
  96. "isAudit": "N",
  97. "auditDoctor": null,
  98. "auditDate": "",
  99. "isNameHide": "N",
  100. "isPhoneFollow": "N",
  101. "thirdInfo": null,
  102. "guidePrintTimes": null,
  103. "remark": null,
  104. "medicalCenterId": "00000000-0000-0000-0000-000000000000",
  105. "customerOrgRegisterId": "00000000-0000-0000-0000-000000000000",
  106. "lastModifierName": "",
  107. "lastModificationTime": null,
  108. "lastModifierId": null,
  109. "creatorId": null,
  110. "id": "3a0c196d-a6d0-37fe-5c32-4806bdc4530f"
  111. -->
  112. </el-table>
  113. <div style="display: flex;justify-content:space-between;">
  114. <div></div>
  115. <div>
  116. <span style="font-size:12px;">{{ loadOpts.totalCount }} 条记录当前显示{{ patientRegister.prList.length }}
  117. </span>
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. </template>
  123. <script>
  124. import moment from "moment";
  125. import { mapState, mapActions } from "vuex";
  126. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  127. import { dddw, deepCopy, objCopy, arrayReduce, arrayExistObj, setPrStatusColor } from "@/utlis/proFunc";
  128. import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";
  129. import Camera from "../../components/patientRegister/Camera.vue";
  130. import PatientRegisterAsbItem from "../../components/patientRegister/patientRegisterAsbItem.vue";
  131. export default {
  132. components: {
  133. PatientRegisterEdit,
  134. Camera,
  135. PatientRegisterAsbItem,
  136. },
  137. props: ['fromType'],
  138. data() {
  139. return {
  140. dialogVisible: false,
  141. dialogCamera: false,
  142. dialogGuide: false,
  143. guideMsg: 'guideMsg',
  144. tabChoosed: "1",
  145. formInitData: {}, //体检登记初始表单数据
  146. editTimes: 0,
  147. rClickRow: null, //右击的行
  148. rClickColumn: null, //右击的列(预留)
  149. dom: null, //用于滚动加载数据
  150. lazyLoading: false, //是否懒加载中
  151. loadOpts: {
  152. totalCount: 0,
  153. skipCount: 0,
  154. maxResultCount: 100,
  155. },
  156. loadOptsInit: {},
  157. };
  158. },
  159. created() {
  160. this.loadOptsInit = Object.assign({}, this.loadOpts)
  161. this.patientRegister.prList = []
  162. },
  163. //挂载完成
  164. mounted() {
  165. this.$nextTick(() => {
  166. this.scrollFull()
  167. })
  168. },
  169. computed: {
  170. ...mapState(["window", "dict", 'dataTransOpts', "patientRegister", "customerOrg", "report"]),
  171. },
  172. methods: {
  173. dddw, setPrStatusColor,
  174. handleSelectionChange(val) {
  175. this.dataTransOpts.tableM.patient_register = val
  176. },
  177. //获取单位分组 /api/app/customer-org-group/in-customer-org-id/3a0c0444-d7a0-871f-4074-19faf1655caf
  178. // getCustomerOrgGroup(customerOrgld) {
  179. // getapi(`/api/app/customer-org-group/in-customer-org-id/${customerOrgld}`)
  180. // .then((res) => {
  181. // console.log("getCustomerOrgGroup", res.data);
  182. // if (res.code == 1) {
  183. // this.patientRegister.customerOrgGroup = res.data;
  184. // }
  185. // });
  186. // },
  187. //点击体检次数行
  188. rowClick(row) {
  189. this.dataTransOpts.tableS.patient_register = deepCopy(row)
  190. this.dataTransOpts.tableS.patient_register.id = row.patientRegisterId
  191. // 刷新个人资料
  192. this.dataTransOpts.refresh.patient_register.S++
  193. // 刷新总检状态
  194. this.dataTransOpts.refresh.sumDoctor.M++
  195. // 刷新检查项目
  196. this.dataTransOpts.refresh.register_check.M++
  197. },
  198. async load() {
  199. this.loadOpts.skipCount++
  200. await this.queryEvent()
  201. },
  202. //滚动加载数据
  203. scrollFull() {
  204. this.dom = this.$refs['info'].bodyWrapper
  205. console.log('this.dom', this.dom)
  206. this.dom.addEventListener('scroll', async () => {
  207. // console.log('scrollTop',this.dom.scrollTop,'clientHeight',this.dom.clientHeight,'scrollHeight',this.dom.scrollHeight);
  208. if (this.dom.scrollTop + this.dom.clientHeight + 20 > this.dom.scrollHeight && !this.lazyLoading) {
  209. // 获取到的不是全部数据 当滚动到底部
  210. console.log('scrollTop', this.dom.scrollTop, 'clientHeight', this.dom.clientHeight, 'scrollHeight', this.dom.scrollHeight);
  211. if (Number(this.loadOpts.skipCount) * Number(this.loadOpts.maxResultCount) >= Number(this.loadOpts.totalCount)) {
  212. this.lazyLoading = false
  213. } else {
  214. this.lazyLoading = true
  215. await this.load()
  216. this.lazyLoading = false
  217. // this.dom.scrollTop = this.dom.scrollTop - 100
  218. }
  219. }
  220. })
  221. },
  222. lmoment(date, forMat) {
  223. return moment(new Date(date)).format(forMat);
  224. },
  225. //查询
  226. async btnQuery() {
  227. this.loadOpts.skipCount = 0
  228. this.queryEvent()
  229. },
  230. async queryEvent() {
  231. if (this.fromType == 'report') {
  232. this.reportQuery()
  233. return
  234. }
  235. this.patientRegister.prList = [];
  236. let body = {}
  237. console.log(`this.patientRegister.query`, this.patientRegister.query)
  238. body = deepCopy(this.patientRegister.query)
  239. if (this.patientRegister.query.customerOrgFlag) {
  240. if (this.patientRegister.query.CustomerOrgParentId) {
  241. body.customerOrgId = this.patientRegister.query.CustomerOrgParentId
  242. } else {
  243. if (this.patientRegister.query.customerOrgId) body.customerOrgId = this.patientRegister.query.customerOrgId
  244. }
  245. }
  246. if (this.patientRegister.query.sex) body.sexId = this.patientRegister.query.sex
  247. //StartDate EndDate
  248. if (this.patientRegister.query.dateRange) {
  249. body.startDate = moment(new Date(this.patientRegister.query.dateRange[0])).format("yyyy-MM-DD")
  250. body.endDate = moment(new Date(this.patientRegister.query.dateRange[1])).format("yyyy-MM-DD")
  251. }
  252. console.log('body',body)
  253. if (this.patientRegister.query.idCardNo) body = { idNo: this.patientRegister.query.idCardNo }
  254. if (this.patientRegister.query.patientNo) body = { patientNo: this.patientRegister.query.patientNo }
  255. if (this.patientRegister.query.patientRegisterNo) body = { patientRegisterNo: this.patientRegister.query.patientRegisterNo }
  256. console.log('/api/app/patientregister/getlistinfilter', body)
  257. postapi('/api/app/patientregister/getlistinfilter', body)
  258. .then((res) => {
  259. if (res.code != -1) {
  260. this.patientRegister.prList = res.data.items;
  261. }
  262. })
  263. // try {
  264. // let res =await postapi('/api/app/patientregister/getlistinfilter', body);
  265. // this.patientRegister.prList = res.data;
  266. // } catch (error) {
  267. // console.log("query error",error);
  268. // }
  269. },
  270. // 报告查询
  271. reportQuery() {
  272. console.log('reportQuery this.loadOpts', this.loadOpts)
  273. if (this.loadOpts.skipCount != 0 && this.loadOpts.skipCount * this.loadOpts.maxResultCount >= this.loadOpts.totalCount) return
  274. let body = {
  275. skipCount: this.loadOpts.skipCount,
  276. maxResultCount: this.loadOpts.maxResultCount
  277. };
  278. let customerOrgs = [];
  279. if (this.report.dataCusOrgOCX.length > 0) {
  280. this.report.dataCusOrgOCX.forEach(e => {
  281. let rd = {
  282. startDate: moment(e.startDate).format('yyyy-MM-DD'),
  283. endDate: moment(e.endDate).format('yyyy-MM-DD'),
  284. dateType: e.dateType == 'summaryDate' ? '3' : (e.dateType == 'medicalStartDate' ? '2' : '1')
  285. }
  286. if (e.customerOrgId) {
  287. rd.customerOrgId = e.customerOrgId
  288. if (e.customerOrgId == this.dict.personOrgId) {
  289. rd.customerOrgRegisterId = null
  290. rd.customerOrgGroupId = []
  291. } else {
  292. rd.customerOrgRegisterId = e.customerOrgRegister.id
  293. rd.customerOrgGroupId = e.customerOrgGroupIds
  294. }
  295. }
  296. customerOrgs.push(rd)
  297. })
  298. }
  299. body.customerOrgs = customerOrgs
  300. if (this.patientRegister.query.patientRegisterNo) body.patientRegisterNo = this.patientRegister.query.patientRegisterNo
  301. if (this.patientRegister.query.patientNo) body.patientNo = this.patientRegister.query.patientNo
  302. if (this.patientRegister.query.patientName) body.patientName = this.patientRegister.query.patientName
  303. if (this.patientRegister.query.idCardNo) body.idCardNo = this.patientRegister.query.idCardNo
  304. if (this.patientRegister.query.phone) body.phone = this.patientRegister.query.phone
  305. if (this.patientRegister.query.completeFlag) body.completeFlag = this.patientRegister.query.completeFlag
  306. if (this.patientRegister.query.isAudit) body.isAudit = this.patientRegister.query.isAudit
  307. if (this.patientRegister.query.reportPrintTimes >= 0) body.isReportPrint = this.patientRegister.query.reportPrintTimes
  308. if (this.patientRegister.query.isUpload) body.isUpload = this.patientRegister.query.isUpload
  309. if (this.patientRegister.query.medicalTypeIds) body.medicalTypeIds = this.patientRegister.query.medicalTypeIds
  310. if (this.patientRegister.query.personnelTypeId) body.personnelTypeId = this.patientRegister.query.personnelTypeId
  311. //console.log('/api/app/peisreport/getpatientregisterreport',body)
  312. postapi('/api/app/peisreport/getpatientregisterreport', body).then(res => {
  313. if (res.code > -1) {
  314. // 刷新最大记录数
  315. this.loadOpts.totalCount = res.data.totalCount
  316. if (body.skipCount == 0) { //查询
  317. this.patientRegister.prList = [];
  318. }
  319. this.patientRegister.prList = this.patientRegister.prList.concat(res.data.items)
  320. if (body.skipCount == 0 && this.patientRegister.prList.length == 1) {
  321. this.rowClick(this.patientRegister.prList[0])
  322. this.$refs['info'].setCurrentRow(this.patientRegister.prList[0]);
  323. } else {
  324. this.$refs['info'].setCurrentRow();
  325. this.dataTransOpts.tableS.patient_register = { id: '' }
  326. // 刷新个人资料
  327. this.dataTransOpts.refresh.patient_register.S++
  328. // 刷新总检状态
  329. this.dataTransOpts.refresh.sumDoctor.M++
  330. // 刷新检查项目
  331. this.dataTransOpts.refresh.register_check.M++
  332. }
  333. }
  334. })
  335. },
  336. },
  337. //监听事件
  338. watch: {
  339. //触发查询事件
  340. "patientRegister.query.times": {
  341. // immediate:true,
  342. handler(newVal, oldVal) {
  343. console.log('查询触发', newVal, oldVal)
  344. if (newVal != oldVal) {
  345. this.btnQuery();
  346. }
  347. }
  348. },
  349. //新增后,触发赋值
  350. "patientRegister.patientRegisterRd.id"(newVal, oldVal) {
  351. if (newVal != oldVal) {
  352. //console.log('patientRegister.patientRegisterRd.customerOrgId',this.patientRegister.patientRegisterRd.customerOrgId)
  353. objCopy(this.patientRegister.patientRegisterRd, this.form);
  354. }
  355. },
  356. },
  357. };
  358. </script>
  359. <style scoped>
  360. .box {
  361. display: flex;
  362. }
  363. .listBtn {
  364. margin-top: 5px;
  365. text-align: center;
  366. }
  367. .btnClass {
  368. width: 110px;
  369. }
  370. ::v-deep .el-input__inner {
  371. text-align: center;
  372. padding-left: 1px;
  373. padding-right: 1px;
  374. }
  375. ::v-deep .el-table th.el-table__cell {
  376. text-align: center;
  377. padding-left: 1px;
  378. padding-right: 1px;
  379. }
  380. ::v-deep .el-table td.el-table__cell {
  381. padding-left: 1px;
  382. padding-right: 1px;
  383. }
  384. ::v-deep .el-table .cell {
  385. padding-left: 1px;
  386. padding-right: 1px;
  387. }
  388. ::v-deep input[type="number"]::-webkit-inner-spin-button,
  389. input[type="number"]::-webkit-outer-spin-button {
  390. -webkit-appearance: none !important;
  391. margin: 0 !important;
  392. }
  393. </style>