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.

539 lines
20 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
  1. <template>
  2. <div style="margin-left: 10px;">
  3. <div>
  4. <el-button type="primary" class="btnClass" @click="prList">人员列表</el-button>
  5. </div>
  6. <div>
  7. <el-button type="primary" class="btnClass" @click="dialogVisibleSetStartDate = true">体检日期</el-button>
  8. </div>
  9. <div>
  10. <el-button type="primary" class="btnClass" @click="btnAddPr">增加人员</el-button>
  11. </div>
  12. <div>
  13. <el-button type="primary" class="btnClass" @click="btnEditPr">编辑人员</el-button>
  14. </div>
  15. <div>
  16. <el-button type="primary" class="btnClass" @click="btnDelPr">删除人员</el-button>
  17. </div>
  18. <div>
  19. <el-button type="primary" class="btnClass" @click="btnPrev">上一人</el-button>
  20. </div>
  21. <div>
  22. <el-button type="primary" class="btnClass" @click="btnNext">下一人</el-button>
  23. </div>
  24. <!--
  25. <div>
  26. <el-button type="primary" class="btnClass" @click="save">保存结果</el-button>
  27. </div>
  28. -->
  29. <div>
  30. <el-button type="primary" class="btnClass" @click="edit">修改结果</el-button>
  31. </div>
  32. <div>
  33. <el-button type="primary" class="btnClass" @click="del">删除结果</el-button>
  34. </div>
  35. <div>
  36. <el-button type="primary" class="btnClass" @click="refuseItem" style="font-size:11px;">放弃明细项目检查</el-button>
  37. </div>
  38. <div>
  39. <el-button type="primary" class="btnClass" @click="delItem">删除明细项目</el-button>
  40. </div>
  41. <div>
  42. <el-button type="primary" class="btnClass" @click="unAudit">取消审核</el-button>
  43. </div>
  44. <div>
  45. <el-button type="primary" class="btnClass">历次结果</el-button>
  46. </div>
  47. <div>
  48. <el-button type="primary" class="btnClass">体检报告</el-button>
  49. </div>
  50. <div>
  51. <el-button type="primary" class="btnClass" @click="toSumDoctorCheck">总检</el-button>
  52. </div>
  53. <!--
  54. <div>
  55. <el-button type="primary" class="btnClass" @click="btnMakeDiagnosis">生成小结</el-button>
  56. </div>
  57. <div>
  58. <el-button type="primary" class="btnClass" @click="addSummary">新增小结</el-button>
  59. </div>
  60. <div>
  61. <el-button type="primary" class="btnClass" @click="audit">审核</el-button>
  62. </div>
  63. <div>
  64. <el-button type="primary" class="btnClass">排队</el-button>
  65. </div>
  66. -->
  67. <div v-if="doctorCheck.doctorCheckDialogVisible"
  68. :style="`border-radius: 10px;border: 1px solid #000;background-color:#FFF; position: absolute;top:70px;right:10px;width:300px;height: ${window.pageHeight - 42 - 5 - 30}px;opacity:1;`">
  69. <PatientRegisterList win="doctorCheck" :winAbsolute="true"/>
  70. </div>
  71. <!-- 抽屉方式遮罩层不能操作
  72. <el-drawer title="体检人员列表" :visible.sync="doctorCheck.doctorCheckDialogVisible" direction="rtl"
  73. :wrapperClosable="false" :modal="false" :size="300">
  74. <PatientRegisterList win="doctorCheck" />
  75. </el-drawer>
  76. -->
  77. <!-- 体检人员登记 -->
  78. <el-dialog style="z-index:30001;"
  79. :title="patientRegister.patientRegisterRd.id ? '体检人员--编辑' : '体检人员--新增'"
  80. :visible.sync="dialogVisible"
  81. :close-on-click-modal="false"
  82. fullscreen
  83. >
  84. <PatientRegisterEdit style="z-index:30001;"
  85. :formInitData="formData"
  86. :editTimes="editTimes"
  87. :refreshRegister="refreshRegister"
  88. />
  89. </el-dialog>
  90. <el-dialog
  91. title="设置体检日期" style="z-index:30002;"
  92. :visible.sync="dialogVisibleSetStartDate"
  93. :close-on-click-modal="false" :show-close="false"
  94. width="300px"
  95. >
  96. <div style="padding: 0 20px;">
  97. <span style="margin-right:5px ;">体检日期</span>
  98. <el-date-picker v-model="medicalStartDateTemp" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="出生日期"
  99. prefix-icon="" size="small" style="width:150px;"/>
  100. </div>
  101. <span slot="footer" class="dialog-footer">
  102. <el-button @click="dialogVisibleSetStartDate = false"> </el-button>
  103. <el-button type="primary" @click="btnSetStartDate"> </el-button>
  104. </span>
  105. </el-dialog>
  106. </div>
  107. </template>
  108. <script>
  109. import { mapState, mapActions, mapMutations} from "vuex";
  110. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  111. import { arrayExistObj,objCopy } from "../../utlis/proFunc";
  112. import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";
  113. import PatientRegisterList from "./PatientRegisterList.vue";
  114. import moment from 'moment';
  115. export default {
  116. components: {
  117. PatientRegisterEdit,
  118. PatientRegisterList,
  119. },
  120. props:["optGrant","addSummary","btnMakeDiagnosis","save","audit","unAudit"],
  121. data() {
  122. return {
  123. medicalStartDate:'', //设置体检日期
  124. medicalStartDateTemp:'', //设置体检日期 临时体检日期
  125. medicalStartDateDatas:[], // 设置体检日期 的人员信息登记信息,按登记日期排序 (用于上一人,下一人)
  126. dialogVisibleSetStartDate:false, //设置体检日期窗口
  127. editTimes:0,
  128. nextTodialogVisible:false, //设置完体检日期是否显示 体检人员登记窗口
  129. dialogVisible:false, //体检人员登记窗口
  130. formData:{
  131. registerManType:'doctor', //登记人员类型,客服:customer 医生:doctor 支持在医生诊台处理登记人员
  132. id: "", //id
  133. photo:'', //照片
  134. patientId: "00000000-0000-0000-0000-000000000000", //档案号ID 选择了档案就传档案号,未选就传00000-0000...
  135. patientNo: "", //档案号
  136. customerOrgId: ["00000000-0000-0000-0000-000000000000"], //单位编号 默认个人
  137. customerOrgGroupId: null, //分组
  138. medicalPackageId: null, //套餐
  139. patientName: "", //姓名
  140. birthDate: null, //日期型
  141. sexId: "U", //性别 默认未知U
  142. age: null, //年龄
  143. jobCardNo: "", //工卡号
  144. medicalCardNo: "", //体检卡号
  145. maritalStatusId: "9", //婚姻状况 默认未知
  146. medicalTypeId: null, //体检类别
  147. personnelTypeId: null, //人员类别
  148. jobPost: "", //职务
  149. jobTitle: "", //职称
  150. salesman: "", //介绍人
  151. sexHormoneTermId: null, //性激素期限
  152. isNameHide: "N", //隐藏姓名
  153. isPhoneFollow: "N", //电话随访
  154. isVip: "N", //vip客户
  155. remark: "", //
  156. isLock: "N", //是否锁住
  157. completeFlag: "1", //完成标志 0:预登记,1:未检,2:部份已检,3:已总检 【创建编辑时不操作】
  158. isMedicalStart: "N", //体检开始标志 【创建编辑时不操作】
  159. patientRegisterNo: "", //条码号 【创建编辑时不操作】
  160. medicalTimes: 1, //条码号 【创建编辑时不操作】
  161. organizationUnitId: null, //体检中心
  162. address: "", //地址
  163. email: "", //email
  164. idNo: "", //身份证号
  165. telephone: "", //电话
  166. mobileTelephone: "", //手机号
  167. nationId: null, //民族编号
  168. birthPlaceId: null, //籍惯(出生地)
  169. postalCode: "", //邮编
  170. creatorId: null,
  171. creationTime: "",
  172. lastModificationTime: "",
  173. lastModifierId: null,
  174. isVipBox: false, //vip客户
  175. isNameHideBox: false, //隐藏姓名
  176. isPhoneFollowBox: false, //电话随访
  177. isLockBox: false, //是否锁住
  178. customerOrgRegisterId: null,
  179. isMaxMedicalTimes: 'N',
  180. medicalStartDate:null,
  181. }, //单位 记录 目前新增与更新是一致
  182. formInitData:{},
  183. medicalStartDateLoadOpts:{ //按体检日期 查询参数
  184. totalCount:0,
  185. skipCount:0,
  186. maxResultCount:50000,
  187. },
  188. displayPrList:false, //是否显示人员列表
  189. };
  190. },
  191. created() {
  192. this.formInitData = Object.assign({},this.formData)
  193. this.medicalStartDateTemp = new Date()
  194. },
  195. //挂载完成
  196. mounted() {
  197. },
  198. computed: {
  199. ...mapState(["window", "dict", "patientRegister", "doctorCheck","sumDoctorCheck"]),
  200. },
  201. methods: {
  202. ...mapActions(["getCustomerOrgGroup"]),
  203. ...mapMutations(['doctorCheckPrBaseInit']),
  204. prList() {
  205. // console.log('this.doctorCheck.doctorCheckDialogVisible', this.doctorCheck.doctorCheckDialogVisible)
  206. this.doctorCheck.doctorCheckDialogVisible = true
  207. // console.log('this.doctorCheck.doctorCheckDialogVisible2', this.doctorCheck.doctorCheckDialogVisible)
  208. },
  209. //设置体检日期
  210. btnSetStartDate(){
  211. this.medicalStartDate = this.medicalStartDateTemp
  212. this.dialogVisibleSetStartDate = false
  213. if(this.nextTodialogVisible) this.btnAddPr()
  214. },
  215. //人员登记
  216. btnAddPr(){
  217. // debugger
  218. if(this.medicalStartDate){
  219. this.formData = Object.assign({},this.formInitData,{medicalStartDate:moment(this.medicalStartDate).format('yyyy-MM-DD')})
  220. this.dialogVisible = true
  221. this.patientRegister.photo = ''
  222. setTimeout(() =>{
  223. this.editTimes++
  224. },100)
  225. }else{
  226. this.nextTodialogVisible = true
  227. this.dialogVisibleSetStartDate = true
  228. }
  229. },
  230. //人员删除
  231. btnDelPr(){
  232. if(!this.doctorCheck.prBase.id){
  233. this.$message.warning("未选中要删除的人员记录")
  234. return
  235. }
  236. let id = this.doctorCheck.prBase.id
  237. this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
  238. confirmButtonText: "是",
  239. cancelButtonText: "否",
  240. type: "warning",
  241. }).then(() => {
  242. //console.log('{patientRegisterIds}',{patientRegisterIds})
  243. return postapi(`/api/app/patient-register/delete-many`, {patientRegisterIds:[id]})
  244. }).then((res) => {
  245. if(res.code != -1){
  246. this.$message.success("操作成功!")
  247. this.doctorCheckPrBaseInit();
  248. let lfind = arrayExistObj(this.medicalStartDateDatas,'id',id)
  249. if(lfind > -1) this.medicalStartDateDatas.splice(lfind,1)
  250. }
  251. }).catch((err) => {
  252. if (err == "cancel") {
  253. this.$message.info("已取消删除");
  254. }
  255. });
  256. },
  257. //人员编辑
  258. btnEditPr() {
  259. if(!this.doctorCheck.prBase.id){
  260. this.$message.warning("未选中要编辑的人员记录")
  261. return
  262. }
  263. this.patientRegister.patientRegisterRd = Object.assign({},this.doctorCheck.prBase)
  264. this.formData = Object.assign({},this.doctorCheck.prBase)
  265. //console.log(this.patientRegister.patientRegisterRd,this.patientRegister.prList)
  266. this.dialogVisible = true;
  267. this.editTimes++; //触发表单窗口,数据更新
  268. },
  269. // 上一人
  270. btnPrev(){
  271. if(!this.medicalStartDate){
  272. this.$message.warning("请先设置体检日期")
  273. return
  274. }
  275. if(this.medicalStartDateDatas.length == 0) {
  276. this.$message.warning("当前设置的体检日期,无体检人员信息")
  277. return
  278. }
  279. let lfind = -1
  280. if(this.doctorCheck.prBase.id){
  281. lfind = arrayExistObj(this.medicalStartDateDatas,'id',this.doctorCheck.prBase.id)
  282. if(lfind == 0){
  283. this.$message.warning("已是第一个人")
  284. return
  285. }
  286. if(lfind > - 1) lfind--
  287. }
  288. // 未选中,未找到,显示第一人
  289. if(lfind < 0){
  290. if(this.medicalStartDateDatas && this.medicalStartDateDatas.length > 0){
  291. this.findPR(this.medicalStartDateDatas[0])
  292. }
  293. }else{
  294. if(this.medicalStartDateDatas && this.medicalStartDateDatas.length > 0){
  295. this.findPR(this.medicalStartDateDatas[lfind])
  296. }
  297. }
  298. },
  299. // 下一人
  300. btnNext(){
  301. if(!this.medicalStartDate){
  302. this.$message.warning("请先设置体检日期")
  303. return
  304. }
  305. if(this.medicalStartDateDatas.length == 0) {
  306. this.$message.warning("当前设置的体检日期,无体检人员信息")
  307. return
  308. }
  309. let lfind = 0
  310. if(this.doctorCheck.prBase.id){
  311. lfind = arrayExistObj(this.medicalStartDateDatas,'id',this.doctorCheck.prBase.id)
  312. lfind++
  313. }
  314. // 未选中,未找到,显示第一人
  315. if(this.medicalStartDateDatas.length > lfind){
  316. this.findPR(this.medicalStartDateDatas[lfind])
  317. }else{
  318. this.$message.warning("已是最后一人")
  319. }
  320. },
  321. //查询找到相关信息处理
  322. findPR(rd){
  323. this.doctorCheck.prBase = Object.assign({},this.doctorCheck.prBase,rd)
  324. this.patientRegister.photo = rd.photo
  325. },
  326. //刷新或添加列表数据
  327. refreshRegister(patientRegister){
  328. console.log('编辑/新增的 form :',patientRegister)
  329. this.doctorCheck.prBase = Object.assign({},patientRegister)
  330. this.patientRegister.photo = patientRegister.photo
  331. },
  332. //修改结果
  333. edit() {
  334. let ret = this.optGrant('edit')
  335. if (ret) {
  336. this.$message.warning(ret)
  337. return
  338. }
  339. this.doctorCheck.RegisterCheckEdit.completeFlag = '0'
  340. },
  341. //删除结果
  342. del() {
  343. let ret = this.optGrant('del')
  344. if (ret) {
  345. this.$message.warning(ret)
  346. return
  347. }
  348. postapi('/api/app/registercheck/updatecompletemany', [{ registerCheckId: this.doctorCheck.RegisterCheckEdit.id, completeFlag: '0' }])
  349. .then((res) => {
  350. console.log("del", res.data);
  351. if (res.code != -1) {
  352. this.doctorCheck.RegisterCheckEdit.completeFlag = '0';
  353. let lfind = arrayExistObj(this.doctorCheck.RegisterCheckList,'id',this.doctorCheck.RegisterCheckEdit.id)
  354. if(lfind > -1) this.doctorCheck.RegisterCheckList[lfind].completeFlag = '0'
  355. this.$message.success("操作成功!");
  356. }
  357. });
  358. },
  359. //放弃明细项目检查
  360. refuseItem() {
  361. let ret = this.optGrant('refuseItem')
  362. if (ret) {
  363. this.$message.warning(ret)
  364. return
  365. }
  366. // console.log('this.doctorCheck.checkItem',this.doctorCheck.checkItem)
  367. if(!this.doctorCheck.checkItem){
  368. this.$message.warning("请选择要操作的明细项目")
  369. return
  370. }
  371. if(!this.doctorCheck.checkItem.itemId){
  372. this.$message.warning("请选择要操作的明细项目")
  373. return
  374. }
  375. let lfind = arrayExistObj(this.doctorCheck.checkItemList, 'itemId', this.doctorCheck.checkItem.itemId)
  376. if (lfind == -1) {
  377. this.$message.warning("请选择要操作的明细项目")
  378. return
  379. }
  380. this.doctorCheck.checkItemList[lfind].result = "放弃检查"
  381. },
  382. //删除明细项目
  383. delItem() {
  384. let ret = this.optGrant('delItem')
  385. if (ret) {
  386. this.$message.warning(ret)
  387. return
  388. }
  389. if(!this.doctorCheck.checkItem){
  390. this.$message.warning("请选择要删除的明细项目")
  391. return
  392. }
  393. if(!this.doctorCheck.checkItem.itemId){
  394. this.$message.warning("请选择要删除的明细项目")
  395. return
  396. }
  397. let lfind = arrayExistObj(this.doctorCheck.checkItemList, 'itemId', this.doctorCheck.checkItem.itemId)
  398. if (lfind == -1) {
  399. this.$message.warning("请选择要删除的明细项目")
  400. return
  401. }
  402. this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
  403. confirmButtonText: "是",
  404. cancelButtonText: "否",
  405. type: "warning",
  406. }).then(() => {
  407. return postapi(`/api/app/registercheckitem/deleteregistercheckitem?RegisterCheckId=${this.doctorCheck.checkItem.registerCheckId}&ItemId=${this.doctorCheck.checkItem.itemId}`)
  408. }).then(res => {
  409. if (res.code != -1) {
  410. this.doctorCheck.checkItemList.splice(lfind, 1);
  411. this.doctorCheck.checkItem.itemId = ''
  412. }
  413. }).catch((err) => {
  414. if (err == "cancel") {
  415. this.$message.info("已取消");
  416. }else{
  417. this.$message({ type: "error", message: `项目明细删除失败,原因:${err}` });
  418. }
  419. });
  420. },
  421. //总检
  422. toSumDoctorCheck() {
  423. this.sumDoctorCheck.sumPREdit = Object.assign({},this.doctorCheck.prBase)
  424. this.$router.push({ path: "/sumDoctorCheck" });
  425. },
  426. },
  427. //监听事件()
  428. watch: {
  429. //1级单位值改变,分组改变
  430. "patientRegister.query.CustomerOrgParentId"(newVal, oldVal) {
  431. console.log(
  432. "watch patientRegister.query.CustomerOrgParentId newVal:",
  433. newVal,
  434. " oldVal:",
  435. oldVal
  436. );
  437. if (newVal != oldVal && newVal !== this.dict.personOrgId) {
  438. this.getCustomerOrgGroup(newVal);
  439. }
  440. },
  441. // 设置体检日期
  442. "medicalStartDate":{
  443. immediate:true,
  444. handler(newVal,oldVal){
  445. if(newVal){
  446. let body = {
  447. customerOrgs: [
  448. {
  449. startDate: moment(this.medicalStartDate).format('yyyy-MM-DD'),
  450. endDate: moment(this.medicalStartDate).format('yyyy-MM-DD'),
  451. dateType: '2' //体检日期
  452. }
  453. ],
  454. maxResultCount: 1000
  455. }
  456. postapi('/api/patientregister/getpeisrecordlist',body).then(res => {
  457. if(res.code != -1) this.medicalStartDateDatas = res.data.items
  458. })
  459. }else{
  460. this.medicalStartDateDatas = []
  461. }
  462. }
  463. },
  464. },
  465. };
  466. </script>
  467. <style scoped>
  468. @import '../../assets/css/global_button.css';
  469. .btnClass {
  470. margin-top: 1px;
  471. width: 100px;
  472. height: 26px;
  473. padding: 5px 5px; /*原始 默认值 10px 10px */
  474. }
  475. </style>