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.

652 lines
25 KiB

3 years ago
4 months ago
2 years ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
2 years ago
4 months ago
4 months ago
2 years ago
4 months ago
4 months ago
3 years ago
4 months ago
3 years ago
4 months ago
3 years ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
3 years ago
4 months ago
5 months ago
2 years ago
2 years ago
3 years ago
4 months 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
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
5 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
3 years ago
2 years ago
2 years ago
2 years ago
5 months ago
4 months ago
5 months ago
2 years ago
3 years ago
2 years ago
4 months ago
2 years ago
4 months ago
3 years 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
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years 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
2 years ago
3 months ago
3 years 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
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
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
4 months ago
3 years ago
4 months ago
3 years ago
4 months ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
4 months ago
2 years ago
5 months ago
4 months ago
5 months ago
2 years ago
5 months 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
2 years ago
4 months ago
4 months ago
2 years ago
3 months ago
3 months ago
2 years ago
3 months ago
2 years ago
2 years ago
2 years ago
4 months 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
3 months ago
3 years ago
2 years ago
  1. <template>
  2. <div>
  3. <div @contextmenu.prevent="onContextmenu">
  4. <u-table :data="patientRegister.prList" border ref="info" id="info"
  5. :height="(window.pageHeight < 600) ? 230 : (window.pageHeight - 370)" highlight-current-row
  6. @row-click="rowClick" size="small" row-key="patientRegisterId" @selection-change="handleSelectionChange" @row-contextmenu="rowContextmenu" @table-body-scroll="scrollFull" use-virtual :row-height="35" big-data-checkbox :data-changes-scroll-top="false">
  7. <u-table-column :type="dragCol[0].type" width="40" align="center" />
  8. <!--列可拖拽 key值很关键 -->
  9. <u-table-column v-for="(item, index) in dragCol" v-if="index != 0" :key="`${item.label + index}`"
  10. :type="dragCol[index].type" :min-width="dragCol[index].minWidth" :align="dragCol[index].align"
  11. :label="dragCol[index].type ? '' : item.label" :prop="dragCol[index].prop"
  12. :sortable="dragCol[index].type || dragCol[index].prop == 'sn' ? false : true"
  13. :show-overflow-tooltip="dragCol[index].showTooltip">
  14. <template slot-scope="scope">
  15. <div v-if="dragCol[index].prop == 'sn'">
  16. {{ scope.$index + 1 }}
  17. </div>
  18. <div v-else-if="dragCol[index].prop == 'completeFlag'"
  19. :style="`color: ${setPrStatusColor(scope.row.isAudit, scope.row.completeFlag)}`">
  20. {{ dddw(dict.completeFlag, "id", scope.row[dragCol[index].prop], "displayName") }}
  21. </div>
  22. <div v-else-if="dragCol[index].prop == 'birthDate'">
  23. {{ scope.row[dragCol[index].prop].substring(0, 10) }}
  24. </div>
  25. <div v-else-if="dragCol[index].prop == 'isReportPrint'">
  26. <i class="el-icon-printer" v-if="scope.row.isReportPrint == 'Y'"
  27. style="font-size: 24px;color: green;"></i>
  28. </div>
  29. <div v-else-if="dragCol[index].prop == 'isLock'">
  30. <i class="el-icon-lock" v-if="scope.row.isLock == 'Y'" style="font-size: 20px; color: red" />
  31. </div>
  32. <div v-else-if="
  33. dragCol[index].prop == 'isVip' ||
  34. dragCol[index].prop == 'isUpload' ||
  35. dragCol[index].prop == 'isUploadAppoint' ||
  36. dragCol[index].prop == 'isReceiveReport'
  37. ">
  38. <el-checkbox :value="scope.row[dragCol[index].prop] == 'Y'" true-label="Y" false-label="N" />
  39. </div>
  40. <div v-else>
  41. {{ scope.row[dragCol[index].prop] }}
  42. </div>
  43. </template>
  44. </u-table-column>
  45. </u-table>
  46. <div style="display: flex;justify-content:space-between;">
  47. <div></div>
  48. <div>
  49. <span style="font-size:12px;">{{ loadOpts.totalCount }} 条记录当前显示{{ patientRegister.prList.length }}
  50. </span>
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. </template>
  56. <script>
  57. import moment from "moment";
  58. import { mapState, mapActions } from "vuex";
  59. import Sortable from "sortablejs";
  60. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  61. import { dddw, deepCopy, objCopy, arrayReduce, arrayExistObj, setPrStatusColor } from "@/utlis/proFunc";
  62. import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";
  63. import Camera from "../../components/patientRegister/Camera.vue";
  64. import PatientRegisterAsbItem from "../../components/patientRegister/patientRegisterAsbItem.vue";
  65. import { UTable, UTableColumn } from "umy-ui";
  66. export default {
  67. components: {
  68. PatientRegisterEdit,
  69. Camera,
  70. PatientRegisterAsbItem,
  71. UTable,
  72. UTableColumn,
  73. },
  74. props: ['fromType'],
  75. data() {
  76. return {
  77. dialogVisible: false,
  78. dialogCamera: false,
  79. dialogGuide: false,
  80. guideMsg: 'guideMsg',
  81. tabChoosed: "1",
  82. formInitData: {}, //体检登记初始表单数据
  83. editTimes: 0,
  84. rClickRow: null, //右击的行
  85. rClickColumn: null, //右击的列(预留)
  86. dom: null, //用于滚动加载数据
  87. lazyLoading: false, //是否懒加载中
  88. loadOpts: {
  89. totalCount: 0,
  90. skipCount: 0,
  91. maxResultCount: 100,
  92. },
  93. loadOptsInit: {},
  94. summary_check_doctor_alias: ["总检", "审核"],
  95. //拖动列
  96. selectionCol: 0,
  97. dragCol: [
  98. { label: "勾选", type: "selection", minWidth: 40, align: "center" },
  99. { label: "序号", prop: "sn", minWidth: 40, align: "center" },
  100. { label: "打印", prop: "isReportPrint", minWidth: 60, align: "center" },
  101. { label: "领取", prop: "isReceiveReport", minWidth: 60, align: "center" },
  102. { label: "体检进度", prop: "completeFlag", minWidth: 90, align: "center" },
  103. { label: "体检日期", prop: "medicalStartDate", minWidth: 100, align: "center" },
  104. { label: "单位名称", prop: "org", minWidth: 180, align: "left", showTooltip: true },
  105. { label: "部门名称", prop: "dept", minWidth: 150, align: "left", showTooltip: true },
  106. { label: "姓名", prop: "patientName", minWidth: 60, align: "center" },
  107. { label: "性别", prop: "sexName", minWidth: 60, align: "center" },
  108. { label: "年龄", prop: "age", minWidth: 60, align: "center" },
  109. { label: "民族", prop: "nationName", minWidth: 70, align: "center" },
  110. { label: "身份证号", prop: "idNo", minWidth: 160, align: "center" },
  111. { label: "条码号", prop: "patientRegisterNo", minWidth: 110, align: "center" },
  112. { label: "档案号", prop: "patientNo", minWidth: 80, align: "center" },
  113. { label: "次数", prop: "medicalTimes", minWidth: 60, align: "center" },
  114. { label: "备注", prop: "remark", minWidth: 150, align: "left" },
  115. { label: "分组/套餐", prop: "groupPack", minWidth: 150, align: "center" },
  116. { label: "手机", prop: "mobileTelephone", minWidth: 130, align: "center" },
  117. { label: "电话", prop: "telephone", minWidth: 130, align: "center" },
  118. { label: "出生日期", prop: "birthDate", minWidth: 90, align: "center" },
  119. { label: "婚姻", prop: "maritalStatusName", minWidth: 70, align: "center" },
  120. { label: "地址", prop: "address", minWidth: 400, align: "left", showTooltip: true },
  121. { label: "体检卡号", prop: "medicalCardNo", minWidth: 90, align: "center" },
  122. { label: "工卡号", prop: "jobCardNo", minWidth: 90, align: "center" },
  123. { label: "体检类别", prop: "medicalTypeName", minWidth: 100, align: "center" },
  124. { label: "人员类别", prop: "personnelTypeName", minWidth: 100, align: "center" },
  125. { label: "职务", prop: "jobPost", minWidth: 70, align: "center" },
  126. { label: "职称", prop: "jobTitle", minWidth: 70, align: "center" },
  127. { label: "介绍人", prop: "salesman", minWidth: 80, align: "center" },
  128. { label: "VIP", prop: "isVip", minWidth: 80, align: "center" },
  129. { label: "总检医生", prop: "summaryDoctorName", minWidth: 90, align: "center" },
  130. { label: "总检日期", prop: "summaryDate", minWidth: 160, align: "center" },
  131. { label: "审核医生", prop: "auditDoctorName", minWidth: 90, align: "center" },
  132. { label: "审核日期", prop: "auditDate", minWidth: 160, align: "center" },
  133. { label: "登记人", prop: "registerName", minWidth: 80, align: "center" },
  134. { label: "登记时间", prop: "registerDate", minWidth: 160, align: "center" },
  135. { label: "打印人", prop: "reportPrintName", minWidth: 70, align: "center" },
  136. { label: "领取人", prop: "reportReceiveName", minWidth: 70, align: "center" },
  137. { label: "领取时间", prop: "reportReceiveDate", minWidth: 140, align: "center" },
  138. { label: "锁住", prop: "isLock", minWidth: 60, align: "center" },
  139. { label: "预约备单", prop: "isUploadAppoint", minWidth: 90, align: "center" },
  140. { label: "上传", prop: "isUpload", minWidth: 60, align: "center" },
  141. // { label: "标准金额", prop: "standardAmount", minWidth: 80, align: "center" },
  142. // { label: "应收金额", prop: "receivableAmount", minWidth: 80, align: "center" },
  143. // { label: "实收金额", prop: "chargeAmount", minWidth: 80, align: "center" },
  144. // { label: "支付方式", prop: "chargePayMode", minWidth: 80, align: "center" },
  145. ],
  146. };
  147. },
  148. created() {
  149. this.loadOptsInit = Object.assign({}, this.loadOpts)
  150. this.patientRegister.prList = []
  151. try {
  152. let LocalConfig = JSON.parse(
  153. window.localStorage.getItem("LocalConfig") || null
  154. );
  155. if (LocalConfig?.normal?.maxResultCount) {
  156. this.loadOpts.maxResultCount =
  157. LocalConfig.normal.maxResultCount;
  158. }
  159. } catch (error) {
  160. console.log('window.localStorage.getItem("LocalConfig")', error);
  161. }
  162. // 系统参数,获取 总检别名
  163. postapi('/api/app/SysParmValue/GetSysParmValueBySysParmId', { sysParmId: "summary_check_doctor_alias" })
  164. .then(res => {
  165. if (res.code > -1) {
  166. this.summary_check_doctor_alias = JSON.parse(res.data)
  167. }
  168. })
  169. },
  170. //挂载完成
  171. mounted() {
  172. this.$nextTick(() => {
  173. // this.scrollFull()
  174. // 监听列拖拽
  175. this.initColDrag()
  176. })
  177. },
  178. computed: {
  179. ...mapState(["window", "dict", 'dataTransOpts', "patientRegister", "customerOrg", "report"]),
  180. },
  181. methods: {
  182. dddw, setPrStatusColor,
  183. handleSelectionChange(val) {
  184. this.dataTransOpts.tableM.patient_register = val
  185. },
  186. //获取单位分组 /api/app/customer-org-group/in-customer-org-id/3a0c0444-d7a0-871f-4074-19faf1655caf
  187. // getCustomerOrgGroup(customerOrgld) {
  188. // getapi(`/api/app/customer-org-group/in-customer-org-id/${customerOrgld}`)
  189. // .then((res) => {
  190. // console.log("getCustomerOrgGroup", res.data);
  191. // if (res.code == 1) {
  192. // this.patientRegister.customerOrgGroup = res.data;
  193. // }
  194. // });
  195. // },
  196. //点击体检次数行
  197. rowClick(row) {
  198. this.dataTransOpts.tableS.patient_register = deepCopy(row)
  199. this.dataTransOpts.tableS.patient_register.id = row.patientRegisterId
  200. // 刷新个人资料
  201. this.dataTransOpts.refresh.patient_register.S++
  202. // 刷新总检状态
  203. this.dataTransOpts.refresh.sumDoctor.M++
  204. // 刷新检查项目
  205. this.dataTransOpts.refresh.register_check.M++
  206. },
  207. async load() {
  208. this.loadOpts.skipCount++
  209. await this.queryEvent()
  210. },
  211. // 取消领取
  212. canselGetReport() {
  213. let body = {
  214. patientRegisterIds: [],
  215. isReceiveReport: 'N'
  216. }
  217. let rd = []
  218. if (this.dataTransOpts.tableM.patient_register && this.dataTransOpts.tableM.patient_register.length > 0) {
  219. rd = rd.concat(this.dataTransOpts.tableM.patient_register)
  220. }
  221. if (rd.length == 0) {
  222. if (this.dataTransOpts.tableS.patient_register.patientRegisterId) rd.push({ patientRegisterId: this.dataTransOpts.tableS.patient_register.patientRegisterId })
  223. }
  224. if (rd.length == 0) {
  225. this.$message.warning({ showClose: true, message: "请先勾选或选择记录(有勾选人员时,仅操作勾选的记录)!" })
  226. return
  227. }
  228. rd.forEach(e => {
  229. body.patientRegisterIds.push(e.patientRegisterId)
  230. });
  231. postapi('/api/app/PatientRegister/BatchUpdatePatientRegisterReportReceive', body)
  232. .then(res => {
  233. if (res.code > -1) {
  234. this.$message.success({ showClose: true, message: '操作成功!' })
  235. let reportReceiveDate = moment(new Date()).format('yyyy-MM-DD HH:mm:ss')
  236. let lfind = -1
  237. body.patientRegisterIds.forEach(patientRegisterId => {
  238. lfind = arrayExistObj(this.patientRegister.prList, 'patientRegisterId', patientRegisterId)
  239. if (lfind > -1) {
  240. this.patientRegister.prList[lfind].isReceiveReport = body.isReceiveReport
  241. this.patientRegister.prList[lfind].reportReceiveDate = reportReceiveDate
  242. }
  243. });
  244. }
  245. })
  246. },
  247. // 右击
  248. rowContextmenu(row, column) {
  249. this.dataTransOpts.tableS.patient_register = deepCopy(row)
  250. },
  251. onContextmenu(event) {
  252. // items.push({
  253. // label: "一级菜单",
  254. // children: [
  255. // { label: "修改姓名", onClick: () => { this.fnUpBaseInfo(row, 'patientName'); } }
  256. // ]
  257. // })
  258. let items = []
  259. //取消领取报告
  260. items.push({
  261. label: '取消领取报告',
  262. onClick: () => {
  263. this.canselGetReport();
  264. }
  265. })
  266. // 右击菜单显示
  267. this.$contextmenu({
  268. items,
  269. event,
  270. x: event.clientX,
  271. y: event.clientY,
  272. customClass: "custom-class",
  273. zIndex: 3,
  274. minWidth: 80,
  275. });
  276. return false;
  277. },
  278. //滚动加载数据
  279. async scrollFull(scroll, event) {
  280. if (!scroll.judgeFlse) return;
  281. // 正在加载时阻止重复触发
  282. if (this.lazyLoading) return;
  283. if (
  284. (Number(this.loadOpts.skipCount) + 1) *
  285. Number(this.loadOpts.maxResultCount) >=
  286. Number(this.loadOpts.totalCount)
  287. ) {
  288. return;
  289. }
  290. this.lazyLoading = true;
  291. try {
  292. await this.load();
  293. } catch (e) {
  294. console.error('scrollFull load error', e);
  295. }
  296. // this.dom = this.$refs['info'].bodyWrapper
  297. // console.log('this.dom', this.dom)
  298. // this.dom.addEventListener('scroll', async () => {
  299. // // console.log('scrollTop',this.dom.scrollTop,'clientHeight',this.dom.clientHeight,'scrollHeight',this.dom.scrollHeight);
  300. // if (this.dom.scrollTop + this.dom.clientHeight + 20 > this.dom.scrollHeight && !this.lazyLoading) {
  301. // // 获取到的不是全部数据 当滚动到底部
  302. // console.log('scrollTop', this.dom.scrollTop, 'clientHeight', this.dom.clientHeight, 'scrollHeight', this.dom.scrollHeight);
  303. // if (Number(this.loadOpts.skipCount) * Number(this.loadOpts.maxResultCount) >= Number(this.loadOpts.totalCount)) {
  304. // this.lazyLoading = false
  305. // } else {
  306. // this.lazyLoading = true
  307. // await this.load()
  308. // this.lazyLoading = false
  309. // // this.dom.scrollTop = this.dom.scrollTop - 100
  310. // }
  311. // }
  312. // })
  313. },
  314. //监听拖拽
  315. initColDrag() {
  316. // 1. 获取表格的表头元素
  317. const table = document.querySelector('.el-table__header-wrapper tr');
  318. // 2. 创建 Sortable 实例
  319. Sortable.create(table, {
  320. animation: 150, // 拖拽动画时长
  321. // 开始拖拽的时候
  322. onStart: (event) => {
  323. if (event.oldIndex == 0) {
  324. this.$alert('第1列不可以拖动', '提示')
  325. }
  326. //evt.oldIndex; // element index within parent
  327. },
  328. // 3. 监听拖拽结束事件
  329. onEnd: (event) => {
  330. const { oldIndex, newIndex } = event;
  331. // 4. 更新列定义数组的顺序
  332. let movedColumn = this.dragCol.splice(oldIndex, 1)[0];
  333. this.dragCol.splice(newIndex, 0, movedColumn);
  334. //this.selectionCol = arrayExistObj(this.dragCol,'type','selection')
  335. // 5. 强制表格重新渲染以更新视图
  336. //this.tableBrush += 1;
  337. }
  338. });
  339. },
  340. lmoment(date, forMat) {
  341. return moment(new Date(date)).format(forMat);
  342. },
  343. //查询
  344. async btnQuery() {
  345. this.loadOpts.skipCount = 0
  346. this.queryEvent()
  347. },
  348. async queryEvent() {
  349. if (this.fromType == 'report') {
  350. this.reportQuery()
  351. return
  352. }
  353. this.patientRegister.prList = [];
  354. let body = {}
  355. // console.log(`this.patientRegister.query`, this.patientRegister.query)
  356. body = deepCopy(this.patientRegister.query)
  357. if (this.patientRegister.query.customerOrgFlag) {
  358. if (this.patientRegister.query.CustomerOrgParentId) {
  359. body.customerOrgId = this.patientRegister.query.CustomerOrgParentId
  360. } else {
  361. if (this.patientRegister.query.customerOrgId) body.customerOrgId = this.patientRegister.query.customerOrgId
  362. }
  363. }
  364. if (this.patientRegister.query.sex) body.sexId = this.patientRegister.query.sex
  365. //StartDate EndDate
  366. if (this.patientRegister.query.dateRange) {
  367. body.startDate = moment(new Date(this.patientRegister.query.dateRange[0])).format("yyyy-MM-DD")
  368. body.endDate = moment(new Date(this.patientRegister.query.dateRange[1])).format("yyyy-MM-DD")
  369. }
  370. console.log('body', body)
  371. if (this.patientRegister.query.idCardNo) body = { idNo: this.patientRegister.query.idCardNo }
  372. if (this.patientRegister.query.patientNo) body = { patientNo: this.patientRegister.query.patientNo }
  373. if (this.patientRegister.query.patientRegisterNo) body = { patientRegisterNo: this.patientRegister.query.patientRegisterNo }
  374. console.log('/api/app/patientregister/getlistinfilter', body)
  375. // 带收费信息 /api/app/PeisReport/GetPatientRegisterReportWithCharge
  376. // 不带收费信息 /api/app/patientregister/getlistinfilter
  377. postapi('/api/app/PeisReport/GetPatientRegisterReportWithCharge', body)
  378. .then((res) => {
  379. if (res.code != -1) {
  380. this.patientRegister.prList = this.prListTrans(res.data.items);
  381. }
  382. })
  383. },
  384. // 显示数据转换
  385. prListTrans(items) {
  386. let arr = []
  387. if (Array.isArray(items) && items.length > 0) {
  388. arr = items
  389. arr.forEach(e => {
  390. e.groupPack = e.medicalPackageName || e.customerOrgGroupName
  391. e.org = e.customerOrgName || e.departmentName
  392. e.dept = e.customerOrgName == e.departmentName ? '' : e.departmentName
  393. });
  394. }
  395. return arr
  396. },
  397. // 报告查询
  398. reportQuery() {
  399. console.log('reportQuery this.loadOpts', this.loadOpts)
  400. if (this.loadOpts.skipCount != 0 && this.loadOpts.skipCount * this.loadOpts.maxResultCount >= this.loadOpts.totalCount) return
  401. let body = {
  402. skipCount: this.loadOpts.skipCount,
  403. maxResultCount: this.loadOpts.maxResultCount
  404. };
  405. let customerOrgs = [];
  406. if (this.report.dataCusOrgOCX.length > 0) {
  407. this.report.dataCusOrgOCX.forEach(e => {
  408. let dateType = '1'
  409. switch (e.dateType) {
  410. case 'medicalStartDate':
  411. dateType = '2'
  412. break;
  413. case 'checkDate':
  414. dateType = '4'
  415. break;
  416. case 'summaryDate':
  417. dateType = '3'
  418. break;
  419. case 'sumCheckDate':
  420. dateType = '5'
  421. break;
  422. default:
  423. break;
  424. }
  425. let rd = {
  426. startDate: moment(e.startDate).format('yyyy-MM-DD'),
  427. endDate: moment(e.endDate).format('yyyy-MM-DD'),
  428. dateType
  429. }
  430. if (e.customerOrgId) {
  431. rd.customerOrgId = e.customerOrgId
  432. if (e.customerOrgId == this.dict.personOrgId) {
  433. rd.customerOrgRegisterId = null
  434. rd.customerOrgGroupId = []
  435. } else {
  436. rd.customerOrgRegisterId = e.customerOrgRegister.id
  437. rd.customerOrgGroupId = e.customerOrgGroupIds
  438. }
  439. }
  440. customerOrgs.push(rd)
  441. })
  442. }
  443. body.customerOrgs = customerOrgs
  444. if (this.patientRegister.query.patientRegisterNo) body.patientRegisterNo = this.patientRegister.query.patientRegisterNo
  445. if (this.patientRegister.query.patientNo) body.patientNo = this.patientRegister.query.patientNo
  446. if (this.patientRegister.query.patientName) body.patientName = this.patientRegister.query.patientName
  447. if (this.patientRegister.query.idCardNo) body.idNo = this.patientRegister.query.idCardNo
  448. if (this.patientRegister.query.phone) body.phone = this.patientRegister.query.phone
  449. if (this.patientRegister.query.completeFlag) body.completeFlag = this.patientRegister.query.completeFlag
  450. if (this.patientRegister.query.isAudit) body.isAudit = this.patientRegister.query.isAudit
  451. if (this.patientRegister.query.isReportPrint) body.isReportPrint = this.patientRegister.query.isReportPrint
  452. if (this.patientRegister.query.isUpload) body.isUpload = this.patientRegister.query.isUpload
  453. if (this.patientRegister.query.medicalTypeIds && this.patientRegister.query.medicalTypeIds.length > 0) body.medicalTypeIds = this.patientRegister.query.medicalTypeIds
  454. if (this.patientRegister.query.personnelTypeId) body.personnelTypeId = this.patientRegister.query.personnelTypeId
  455. if (this.patientRegister.query.medicalConclusionId && this.patientRegister.query.medicalConclusionId.length > 0) body.medicalConclusionIds = this.patientRegister.query.medicalConclusionId
  456. //console.log('/api/app/peisreport/getpatientregisterreport',body)
  457. // 带收费信息 /api/app/PeisReport/GetPatientRegisterReportWithCharge
  458. // 不带收费信息 /api/app/patientregister/getlistinfilter
  459. postapi('/api/app/peisreport/getpatientregisterreport', body).then(res => {
  460. if (res.code > -1) {
  461. this.lazyLoading = false
  462. // 连续扫码
  463. // console.log('this.patientRegister.query',this.patientRegister.query)
  464. if (this.patientRegister.query.isSeries == 'Y' && this.patientRegister.query.patientRegisterNo ) {
  465. if (res.data.items.length > 0 && arrayExistObj(this.patientRegister.prList, 'patientRegisterId', res.data.items[0].patientRegisterId) == -1) {
  466. this.patientRegister.prList = this.patientRegister.prList.concat(this.prListTrans(res.data.items))
  467. }
  468. if (this.patientRegister.prList.length > 0 && res.data.items.length > 0) {
  469. let lfind = arrayExistObj(this.patientRegister.prList, 'patientRegisterId', res.data.items[0].patientRegisterId)
  470. if (lfind > -1) {
  471. // this.$refs['info'].setCurrentRow();
  472. this.$refs['info'].setCurrentRow(this.patientRegister.prList[lfind]);
  473. this.rowClick(this.patientRegister.prList[lfind])
  474. }
  475. }
  476. // 连续扫码,自动选中新扫的码 (换成虚拟表后,无法自动勾选了)
  477. // this.$nextTick(function () {
  478. // this.patientRegister.prList.forEach(row => {
  479. // this.$refs['info'].toggleRowSelection(row)
  480. // })
  481. // });
  482. } else {
  483. // 刷新最大记录数
  484. this.loadOpts.totalCount = res.data.totalCount
  485. if (body.skipCount == 0) { //查询
  486. this.patientRegister.prList = [];
  487. }
  488. this.patientRegister.prList = this.patientRegister.prList.concat(this.prListTrans(res.data.items))
  489. if (body.skipCount == 0 && this.patientRegister.prList.length > 0) {
  490. this.rowClick(this.patientRegister.prList[0])
  491. this.$refs['info'].setCurrentRow();
  492. this.$refs['info'].setCurrentRow(this.patientRegister.prList[0]);
  493. } else {
  494. this.$refs['info'].setCurrentRow();
  495. this.dataTransOpts.tableS.patient_register = { id: '' }
  496. // 刷新个人资料
  497. this.dataTransOpts.refresh.patient_register.S++
  498. // 刷新总检状态
  499. this.dataTransOpts.refresh.sumDoctor.M++
  500. // 刷新检查项目
  501. this.dataTransOpts.refresh.register_check.M++
  502. }
  503. }
  504. }
  505. })
  506. },
  507. },
  508. //监听事件
  509. watch: {
  510. //触发查询事件
  511. "patientRegister.query.times": {
  512. // immediate:true,
  513. handler(newVal, oldVal) {
  514. console.log('查询触发', newVal, oldVal)
  515. if (newVal != oldVal) {
  516. this.btnQuery();
  517. }
  518. }
  519. },
  520. //新增后,触发赋值
  521. "patientRegister.patientRegisterRd.id"(newVal, oldVal) {
  522. if (newVal != oldVal) {
  523. //console.log('patientRegister.patientRegisterRd.customerOrgId',this.patientRegister.patientRegisterRd.customerOrgId)
  524. objCopy(this.patientRegister.patientRegisterRd, this.form);
  525. }
  526. },
  527. },
  528. };
  529. </script>
  530. <style scoped>
  531. @import "../../assets/css/global_table.css";
  532. .box {
  533. display: flex;
  534. }
  535. .listBtn {
  536. margin-top: 5px;
  537. text-align: center;
  538. }
  539. .btnClass {
  540. width: 110px;
  541. }
  542. ::v-deep .el-input__inner {
  543. text-align: center;
  544. padding-left: 1px;
  545. padding-right: 1px;
  546. }
  547. ::v-deep .el-table th.el-table__cell {
  548. text-align: center;
  549. padding-left: 1px;
  550. padding-right: 1px;
  551. }
  552. ::v-deep .el-table td.el-table__cell {
  553. padding-left: 1px;
  554. padding-right: 1px;
  555. }
  556. ::v-deep .el-table .cell {
  557. padding-left: 1px;
  558. padding-right: 1px;
  559. }
  560. ::v-deep input[type="number"]::-webkit-inner-spin-button,
  561. input[type="number"]::-webkit-outer-spin-button {
  562. -webkit-appearance: none !important;
  563. margin: 0 !important;
  564. }
  565. </style>