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.

496 lines
18 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
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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 style="display: flex">
  3. <div :style="'width:' + (window.pageWidth - 200 - 120 - 70) + 'px;'">
  4. <el-table :data="patientRegister.prList" border :height="patientRegister.prListHeight" highlight-current-row
  5. @row-click="rowick" size="small" @selection-change="handleSelectionChange">
  6. <el-table-column type="selection" width="40">
  7. </el-table-column>
  8. <el-table-column prop="completeFlag" label="体检进度">
  9. <template slot-scope="scope">
  10. <div>{{ ldddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div>
  11. </template>
  12. </el-table-column>
  13. <el-table-column prop="isLock" label="锁住">
  14. <template slot-scope="scope">
  15. <div>{{ scope.row.isLock == "Y" ? "是" : "否" }}</div>
  16. </template>
  17. </el-table-column>
  18. <el-table-column prop="customerOrgParentName" label="单位" width="180">
  19. <template slot-scope="scope">
  20. <div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgParentName : scope.row.customerOrgName }}</div>
  21. </template>
  22. </el-table-column>
  23. <el-table-column prop="customerOrgName" label="部门" width="180">
  24. <template slot-scope="scope">
  25. <div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgName : "" }}</div>
  26. </template>
  27. </el-table-column>
  28. <el-table-column prop="patientName" label="姓名" />
  29. <el-table-column prop="sexId" label="性别">
  30. <template slot-scope="scope">
  31. <div>{{ ldddw(dict.sex, "id", scope.row.sexId, "displayName") }}</div>
  32. </template>
  33. </el-table-column>
  34. <el-table-column prop="age" label="年龄" />
  35. <el-table-column prop="patientRegisterNo" label="条码号" width="150" />
  36. <el-table-column prop="patientNo" label="档案号" />
  37. <el-table-column prop="medicalTimes" label="体检次数"></el-table-column>
  38. <el-table-column label="分组/套餐" width="150">
  39. <template slot-scope="scope">
  40. <div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId === dict.personOrgId">
  41. {{ ldddw(dict.medicalPackage, "id", scope.row.medicalPackageId, "displayName") }}
  42. </div>
  43. <div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId !== dict.personOrgId">
  44. {{ ldddw(dict.customerOrgGroupAll, "id", scope.row.customerOrgGroupId, "displayName") }}
  45. </div>
  46. </template>
  47. </el-table-column>
  48. <el-table-column prop="nationId" label="民族">
  49. <template slot-scope="scope">
  50. <div>
  51. {{ ldddw(dict.nation, "nationId", scope.row.nationId, "displayName") }}
  52. </div>
  53. </template>
  54. </el-table-column>
  55. <el-table-column prop="idNo" label="身份证" width="150" />
  56. <el-table-column prop="birthDate" label="出生日期" width="100">
  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="mobileTelephone" label="手机" width="100" />
  65. <el-table-column prop="telephone" label="电话" width="100" />
  66. <el-table-column prop="address" label="地址" width="300" />
  67. <el-table-column prop="medicalCardNo" label="体检卡号" />
  68. <el-table-column prop="jobCardNo" label="工卡号" />
  69. <el-table-column prop="maritalStatusId" label="婚姻状况">
  70. <template slot-scope="scope">
  71. <div>
  72. {{ ldddw(dict.maritalStatus, "id", scope.row.maritalStatusId, "displayName") }}
  73. </div>
  74. </template>
  75. </el-table-column>
  76. <el-table-column prop="medicalTypeId" label="体检类别">
  77. <template slot-scope="scope">
  78. <div v-if="scope.row.medicalTypeId !== dict.personOrgId">
  79. {{ ldddw(dict.medicalType, "id", scope.row.medicalTypeId, "displayName") }}
  80. </div>
  81. </template>
  82. </el-table-column>
  83. <el-table-column prop="personnelTypeId" label="人员类别">
  84. <template slot-scope="scope">
  85. <div v-if="scope.row.personnelTypeId !== dict.personOrgId">
  86. {{ ldddw(dict.personnelType, "id", scope.row.personnelTypeId, "displayName") }}
  87. </div>
  88. </template>
  89. </el-table-column>
  90. <el-table-column prop="jobPost" label="职务" />
  91. <el-table-column prop="jobTitle" label="职称" />
  92. <el-table-column prop="salesman" label="介绍人" />
  93. <el-table-column prop="isVip" label="是否VIP">
  94. <template slot-scope="scope">
  95. <div>{{ scope.row.isVip == "Y" ? "是" : "否" }}</div>
  96. </template>
  97. </el-table-column>
  98. <el-table-column prop="creatorName" label="登记人" />
  99. <el-table-column prop="creationTime" label="登记日期" width="100">
  100. <template slot-scope="scope">
  101. <div>{{ lmoment(scope.row.creationTime, "yyyy-MM-DD") }}</div>
  102. </template>
  103. </el-table-column>
  104. <el-table-column prop="isUpload" label="是否上传">
  105. <template slot-scope="scope">
  106. <div>{{ scope.row.isUpload == "Y" ? "是" : "否" }}</div>
  107. </template>
  108. </el-table-column>
  109. <!--
  110. "sexHormoneTermId": "00000000-0000-0000-0000-000000000000",
  111. "interposeMeasure": null,
  112. "medicalConclusionId": "00000000-0000-0000-0000-000000000000",
  113. "reportPrintTimes": 0,
  114. "isMedicalStart": "N",
  115. "medicalStartDate": "6/28/2023",
  116. "isRecoverGuide": "N",
  117. "summaryDate": "",
  118. "summaryDoctor": null,
  119. "isAudit": "N",
  120. "auditDoctor": null,
  121. "auditDate": "",
  122. "isNameHide": "N",
  123. "isPhoneFollow": "N",
  124. "thirdInfo": null,
  125. "guidePrintTimes": null,
  126. "remark": null,
  127. "organizationUnitId": "00000000-0000-0000-0000-000000000000",
  128. "customerOrgRegisterId": "00000000-0000-0000-0000-000000000000",
  129. "lastModifierName": "",
  130. "lastModificationTime": null,
  131. "lastModifierId": null,
  132. "creatorId": null,
  133. "id": "3a0c196d-a6d0-37fe-5c32-4806bdc4530f"
  134. -->
  135. </el-table>
  136. <!-- 给合项目 基本信息 -->
  137. <el-tabs v-model="tabChoosed">
  138. <!-- 给合项目 -->
  139. <el-tab-pane label="已选组合项目" name="1">
  140. <PatientRegisterAsbItem />
  141. </el-tab-pane>
  142. </el-tabs>
  143. </div>
  144. <div style="margin-left: 10px;width:110px;">
  145. <div class="listBtn">
  146. <el-button type="success" class="btnClass" @click="add">人员登记</el-button>
  147. </div>
  148. <div class="listBtn">
  149. <el-button type="primary" class="btnClass" @click="edit">编辑</el-button>
  150. </div>
  151. <div class="listBtn">
  152. <el-button type="danger" class="btnClass" @click="del">删除</el-button>
  153. </div>
  154. <div class="listBtn">
  155. <el-button type="primary" class="btnClass" @click="openCamera" icon="el-icon-camera">拍照</el-button>
  156. </div>
  157. <div class="listBtn">
  158. <el-button type="primary" class="btnClass">健康档案</el-button>
  159. </div>
  160. <div class="listBtn">
  161. <el-button type="primary" class="btnClass">调整分组</el-button>
  162. </div>
  163. <div class="listBtn">
  164. <el-button type="primary" class="btnClass">调整项目</el-button>
  165. </div>
  166. <div class="listBtn">
  167. <el-button type="primary" class="btnClass" @click="guidePrint">打指引单</el-button>
  168. </div>
  169. </div>
  170. <!-- 体检人员登记 -->
  171. <el-dialog :title="patientRegister.patientRegisterId ? '体检人员--编辑' : '体检人员--新增'" :visible.sync="dialogVisible"
  172. :close-on-click-modal="false" fullscreen>
  173. <PatientRegisterEdit :formInitData="formInitData" :editTimes="editTimes" />
  174. </el-dialog>
  175. <!-- 拍照 -->
  176. <el-dialog title="拍照" :visible.sync="patientRegister.cameraVisble" width="400" height="800" :show-close="false"
  177. :append-to-body="true" :close-on-click-modal="false">
  178. <Camera :id="patientRegister.patientRegisterId" />
  179. </el-dialog>
  180. <!-- 指引单 -->
  181. <el-dialog title="指引单" :visible.sync="dialogGuide" width="400" height="800"
  182. :append-to-body="true" :close-on-click-modal="false">
  183. <div>{{ guideMsg }}</div>
  184. </el-dialog>
  185. </div>
  186. </template>
  187. <script>
  188. import moment from "moment";
  189. import { mapState, mapActions } from "vuex";
  190. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  191. import { dddw, objCopy, arrayReduce } from "@/utlis/proFunc";
  192. import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";
  193. import Camera from "../../components/patientRegister/Camera.vue";
  194. import PatientRegisterAsbItem from "../../components/patientRegister/patientRegisterAsbItem.vue";
  195. export default {
  196. components: {
  197. PatientRegisterEdit,
  198. Camera,
  199. PatientRegisterAsbItem,
  200. },
  201. data() {
  202. return {
  203. multipleSelection: [], //选中的数据列表
  204. dialogVisible: false,
  205. dialogCamera: false,
  206. dialogGuide:false,
  207. guideMsg:'guideMsg',
  208. tabChoosed: "1",
  209. formInitData: {}, //体检登记初始表单数据
  210. editTimes: 0,
  211. };
  212. },
  213. created() { },
  214. //挂载完成
  215. mounted() { },
  216. computed: {
  217. ...mapState(["window", "dict", "patientRegister", "customerOrg"]),
  218. },
  219. methods: {
  220. ...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
  221. // 打印指引单(isPreview)
  222. async guidePrint(isPreview){
  223. let token = localStorage.getItem('token');
  224. let user = localStorage.getItem('user');
  225. let toOutShell = '';
  226. let lfind = -1;
  227. if(this.multipleSelection.length < 1){
  228. this.$message.info("请勾选要打印指引单的人员记录!");
  229. return;
  230. }
  231. this.multipleSelection.forEach((item,index) =>{
  232. getapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${item.id}`)
  233. .then((res) => {
  234. if (res.code != -1) {
  235. res.data;
  236. return this.$electronAPI.printPre('web 传入参数');
  237. }
  238. })
  239. .then(res => {
  240. if(res.toLowerCase() == 'success'){
  241. //更新打印次数
  242. return postapi('api/app/patientregister/updatepatientregisterguideprinttimesmany',[item.id])
  243. }
  244. })
  245. .then(res =>{
  246. if (res.code != -1) {
  247. //
  248. }
  249. });
  250. });
  251. console.log(msg);
  252. },
  253. handleSelectionChange(val) {
  254. this.multipleSelection = val;
  255. //console.log('this.multipleSelection',this.multipleSelection)
  256. },
  257. //获取单位分组 /api/app/customer-org-group/in-customer-org-id/3a0c0444-d7a0-871f-4074-19faf1655caf
  258. getCustomerOrgGroup(customerOrgld) {
  259. getapi(`/api/app/customer-org-group/in-customer-org-id/${customerOrgld}`)
  260. .then((res) => {
  261. console.log("getCustomerOrgGroup", res.data);
  262. if (res.code == 1) {
  263. this.patientRegister.customerOrgGroup = res.data;
  264. }
  265. });
  266. },
  267. //点击体检次数行
  268. rowick(row) {
  269. this.patientRegister.photo = ""; //清除照片缓存
  270. this.patientRegister.patientRegisterId = row.id;
  271. this.patientRegister.patientRegisterRd = row;
  272. this.patientRegister.query.customerOrgParentId = row.customerOrgParentId;
  273. this.patientRegister.customerOrgGroupChange = 0; //控制体检列表记录切换时,0 无需触发更换分组操作
  274. this.patientRegister.medicalPackageChange = 0; //控制体检列表记录切换时,0 无需触发更换套餐操作
  275. this.getCustomerOrgGroup(row.customerOrgParentId);
  276. this.dict.asbItem = [...this.dict.asbItemAll]
  277. this.getPatientRegisterAbs(row.id);
  278. },
  279. //体检次数 相关操作
  280. add() {
  281. let customerOrgId = this.patientRegister.query.customerOrgId;
  282. if (!customerOrgId) {
  283. alert("请选择单位或个人");
  284. return;
  285. }
  286. //console.log('customerOrgId',customerOrgId)
  287. // this.patientRegister.patientRegisterId = "";
  288. // this.patientRegister.patientRegisterRd.photo = '';
  289. // this.patientRegister.patientRegisterRdInit.id = "";
  290. // this.patientRegister.patientRegisterRdInit.customerOrgId = this.patientRegister.query.customerOrgId;
  291. // this.patientRegister.addTimes++;
  292. // this.patientRegister.patientRegisterTimes++;
  293. this.patientRegister.patientRegisterRdInit.customerOrgId = this.patientRegister.query.customerOrgId;
  294. this.formInitData = { ...this.patientRegister.patientRegisterRdInit };
  295. this.patientRegister.patientRegisterAbs = [];
  296. this.dialogVisible = true;
  297. this.editTimes++; //触发表单窗口,数据更新
  298. this.getPatientRegisterAbs();
  299. },
  300. edit() {
  301. if (!this.patientRegister.patientRegisterRd.id) {
  302. alert("请选择要操作的记录");
  303. return;
  304. }
  305. //this.patientRegister.patientRegisterTimes++;
  306. this.getPatientRegisterAbs(this.patientRegister.patientRegisterRd.id);
  307. this.formInitData = { ...this.patientRegister.patientRegisterRd };
  308. this.dialogVisible = true;
  309. this.editTimes++; //触发表单窗口,数据更新
  310. },
  311. //拍照
  312. openCamera() {
  313. if (!this.patientRegister.patientRegisterId) {
  314. alert("请选择要操作的记录");
  315. return;
  316. }
  317. this.patientRegister.cameraVisble = true;
  318. },
  319. //删除(可批量删除)
  320. // /api/app/patient-register/many?PatientRegisterIds=3a0c2cac-f44c-f407-9504-c1fc5e80a159&PatientRegisterIds=3a0c2cb3-d10c-ed70-db6a-b835e75ce641
  321. del() {
  322. if (this.multipleSelection.length < 1) {
  323. alert("请先勾选要操作的记录");
  324. return;
  325. }
  326. let patientRegisterIds = [];
  327. for (let i = 0; i < this.multipleSelection.length; i++) {
  328. patientRegisterIds.push(this.multipleSelection[i]["id"]);
  329. }
  330. this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
  331. confirmButtonText: "确定",
  332. cancelButtonText: "取消",
  333. type: "warning",
  334. })
  335. .then(() => {
  336. //console.log('{patientRegisterIds}',{patientRegisterIds})
  337. return postapi(`/api/app/patient-register/delete-many`, {
  338. patientRegisterIds,
  339. });
  340. })
  341. .then((res) => {
  342. this.$message.success("删除成功");
  343. this.patientRegister.query.times++;
  344. this.patientRegister.patientRegisterId = "";
  345. })
  346. .catch(() => {
  347. this.$message({
  348. type: "info",
  349. message: "已取消删除",
  350. });
  351. });
  352. },
  353. //单个删除方式
  354. delBak() {
  355. if (!this.patientRegister.patientRegisterId) {
  356. alert("请选择要操作的记录");
  357. return;
  358. }
  359. this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
  360. confirmButtonText: "确定",
  361. cancelButtonText: "取消",
  362. type: "warning",
  363. })
  364. .then(() => {
  365. //console.log('${this.patientRegister.patientRegisterId}',this.patientRegister.patientRegisterId)
  366. return deletapi(`/api/app/patient-register/${this.patientRegister.patientRegisterId}`);
  367. })
  368. .then((res) => {
  369. this.$message.success("删除成功");
  370. this.patientRegister.query.times++;
  371. this.patientRegister.patientRegisterId = "";
  372. })
  373. .catch(() => {
  374. this.$message({ type: "info", message: "已取消删除", });
  375. });
  376. },
  377. ldddw(arrayData, key, value, display) {
  378. return dddw(arrayData, key, value, display);
  379. },
  380. lmoment(date, forMat) {
  381. return moment(new Date(date)).format(forMat);
  382. },
  383. //查询
  384. query() {
  385. let body = {}
  386. console.log(`this.patientRegister.query`, this.patientRegister.query)
  387. if (this.patientRegister.query.customerOrgFlag) {
  388. if (this.patientRegister.query.CustomerOrgParentId) {
  389. body.customerOrgId = this.patientRegister.query.CustomerOrgParentId
  390. } else {
  391. if (this.patientRegister.query.customerOrgId) body.customerOrgId = this.patientRegister.query.customerOrgId
  392. }
  393. }
  394. if (this.patientRegister.query.sex) body.sexId = this.patientRegister.query.sex
  395. if (this.patientRegister.query.patientName) body.patientName = this.patientRegister.query.patientName
  396. if (this.patientRegister.query.completeFlag) body.completeFlag = this.patientRegister.query.completeFlag
  397. //StartDate EndDate
  398. if (this.patientRegister.query.dateRange) {
  399. body.startDate = moment(new Date(this.patientRegister.query.dateRange[0])).format("yyyy-MM-DD")
  400. body.endDate = moment(new Date(this.patientRegister.query.dateRange[1])).format("yyyy-MM-DD")
  401. }
  402. if (this.patientRegister.query.idCardNo) body = { idNo: this.patientRegister.query.idCardNo }
  403. if (this.patientRegister.query.patientNo) body = { patientNo: this.patientRegister.query.patientNo }
  404. if (this.patientRegister.query.patientRegisterNo) body = { patientRegisterNo: this.patientRegister.query.patientRegisterNo }
  405. console.log('/api/app/patientregister/getlistinfilter', body)
  406. postapi('/api/app/patientregister/getlistinfilter', body)
  407. .then((res) => {
  408. this.patientRegister.prList = res.data;
  409. });
  410. },
  411. },
  412. //监听事件
  413. watch: {
  414. //触发查询事件
  415. "patientRegister.query.times"(newVal, oldVal) {
  416. if (newVal != oldVal) {
  417. //alert('触发查询事件')
  418. this.query();
  419. }
  420. },
  421. //新增后,触发赋值
  422. "patientRegister.patientRegisterRd.id"(newVal, oldVal) {
  423. if (newVal != oldVal) {
  424. //console.log('patientRegister.patientRegisterRd.customerOrgId',this.patientRegister.patientRegisterRd.customerOrgId)
  425. objCopy(this.patientRegister.patientRegisterRd, this.form);
  426. }
  427. },
  428. },
  429. };
  430. </script>
  431. <style scoped>
  432. .box {
  433. display: flex;
  434. }
  435. .listBtn {
  436. margin-top: 5px;
  437. text-align: center;
  438. }
  439. .btnClass {
  440. width: 110px;
  441. }
  442. </style>