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.

621 lines
26 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="margin-left: 5px;z-index: 2001;">
  3. <div v-show="checkPagePriv(pagePriv.privs,'人员列表')" class="divBtnClass">
  4. <el-button type="primary" class="commonbutton" @click="prList">人员列表</el-button>
  5. </div>
  6. <div v-show="checkPagePriv(pagePriv.privs,'体检日期')" class="divBtnClass">
  7. <el-button type="primary" class="commonbutton" @click="dialogVisibleSetStartDate = true">体检日期</el-button>
  8. </div>
  9. <div v-show="checkPagePriv(pagePriv.privs,'增加人员')" class="divBtnClass">
  10. <el-button type="primary" class="commonbutton" @click="btnAddPr">增加人员</el-button>
  11. </div>
  12. <div v-show="checkPagePriv(pagePriv.privs,'编辑人员')" class="divBtnClass">
  13. <el-button type="primary" class="commonbutton" @click="btnEditPr">编辑人员</el-button>
  14. </div>
  15. <div v-show="checkPagePriv(pagePriv.privs,'删除人员')" class="divBtnClass">
  16. <el-button type="primary" class="commonbutton" @click="btnDelPr">删除人员</el-button>
  17. </div>
  18. <div v-show="checkPagePriv(pagePriv.privs,'上一人')" class="divBtnClass">
  19. <el-button type="primary" class="commonbutton" @click="btnStep(-1)">上一人</el-button>
  20. </div>
  21. <div v-show="checkPagePriv(pagePriv.privs,'下一人')" class="divBtnClass">
  22. <el-button type="primary" class="commonbutton" @click="btnStep(1)">下一人</el-button>
  23. </div>
  24. <!--
  25. <div>
  26. <el-button type="primary" class="btnClass" @click="save">保存结果</el-button>
  27. </div>
  28. -->
  29. <div v-show="checkPagePriv(pagePriv.privs,'修改结果')" class="divBtnClass">
  30. <el-button type="primary" class="commonbutton" @click="btnEdit">修改结果</el-button>
  31. </div>
  32. <div v-show="checkPagePriv(pagePriv.privs,'删除结果')" class="divBtnClass">
  33. <el-button type="primary" class="commonbutton" @click="btnDel">删除结果</el-button>
  34. </div>
  35. <div v-show="checkPagePriv(pagePriv.privs,'放弃明细项目检查')" class="divBtnClass">
  36. <el-button type="primary" class="commonbutton" @click="refuseItem" style="font-size:11px;">放弃明细项目检查</el-button>
  37. </div>
  38. <div v-show="checkPagePriv(pagePriv.privs,'删除明细项目')" class="divBtnClass">
  39. <el-button type="primary" class="commonbutton" @click="delItem">删除明细项目</el-button>
  40. </div>
  41. <div v-show="checkPagePriv(pagePriv.privs,'取消审核')" class="divBtnClass">
  42. <el-button type="primary" class="commonbutton" @click="unAudit">取消审核</el-button>
  43. </div>
  44. <div v-show="checkPagePriv(pagePriv.privs,'历次结果')" class="divBtnClass">
  45. <el-button type="primary" class="commonbutton" @click="btnCheckHistory">历次结果</el-button>
  46. </div>
  47. <div v-show="checkPagePriv(pagePriv.privs,'体检报告')" class="divBtnClass">
  48. <el-button type="primary" class="commonbutton" @click="report">体检报告</el-button>
  49. </div>
  50. <div v-show="checkPagePriv(pagePriv.privs,'总检')" class="divBtnClass">
  51. <el-button type="primary" class="commonbutton" @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-show="doctorCheck.doctorCheckDialogVisible"
  68. :style="`z-index:2;border-radius: 10px;border: 1px solid #ddd;background-color:#FFF; position: absolute;top:50px;right:0px;width:300px;height: ${window.pageHeight - 42 - 10}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
  79. :title="doctorCheck.prBase.id ? '体检人员--编辑' : '体检人员--新增'"
  80. :visible.sync="dialogWin.PatientRegisterEdit"
  81. :close-on-click-modal="false"
  82. fullscreen @close="closeDialogWinPatientRegisterEdit"
  83. >
  84. <!-- :formInitData="formData" -->
  85. <PatientRegisterEdit style="z-index:30001;"
  86. :isDoctor="'1'"
  87. :patientRegisterId = "doctorCheck.prBase.id"
  88. :editTimes="editTimes"
  89. :refreshRegister="refreshRegister"
  90. />
  91. </el-dialog>
  92. <el-dialog
  93. title="设置体检日期" style="z-index:30002;"
  94. :visible.sync="dialogVisibleSetStartDate"
  95. :close-on-click-modal="false" :show-close="false"
  96. width="300px"
  97. >
  98. <div style="padding: 0 20px;">
  99. <span style="margin-right:5px ;">体检日期</span>
  100. <el-date-picker v-model="medicalStartDateTemp" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="出生日期"
  101. prefix-icon="" size="small" style="width:150px;"/>
  102. </div>
  103. <span slot="footer" class="dialog-footer">
  104. <el-button class="commonbutton" @click="dialogVisibleSetStartDate = false"> </el-button>
  105. <el-button class="commonbutton" type="primary" @click="btnSetStartDate"> </el-button>
  106. </span>
  107. </el-dialog>
  108. <el-dialog
  109. title="历次结果"
  110. :visible.sync="dialogVisibleCheckHistory"
  111. :close-on-click-modal="false"
  112. width="800px"
  113. >
  114. <div style="padding: 0 20px;">
  115. <el-tabs v-model="tabChoosed">
  116. <el-tab-pane label="明细结果" name="2">
  117. <CheckDetails :patientRegisterId="doctorCheck.prBase.id" />
  118. </el-tab-pane>
  119. <el-tab-pane label="项目对比" name="4">
  120. <SumItemsType :patientId="doctorCheck.prBase.patientId" />
  121. </el-tab-pane>
  122. <el-tab-pane label="横向对比" name="5">
  123. <SumItems :patientId="doctorCheck.prBase.patientId" />
  124. </el-tab-pane>
  125. <el-tab-pane label="历次综述" name="6">
  126. <SumHistory :patientId="doctorCheck.prBase.patientId" />
  127. </el-tab-pane>
  128. </el-tabs>
  129. </div>
  130. </el-dialog>
  131. </div>
  132. </template>
  133. <script>
  134. import { mapState, mapActions, mapMutations} from "vuex";
  135. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  136. import { getPagePriv,checkPagePriv, deepCopy, arrayExistObj,objCopy } from "../../utlis/proFunc";
  137. import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";
  138. import PatientRegisterList from "./PatientRegisterList.vue";
  139. import CheckDetails from "../../components/sumDoctorCheck/CheckDetails.vue";
  140. import SumItemsType from "../../components/sumDoctorCheck/SumItemsType.vue";
  141. import SumItems from "../../components/sumDoctorCheck/SumItems.vue";
  142. import SumHistory from "../../components/sumDoctorCheck/SumHistory.vue";
  143. import moment from 'moment';
  144. export default {
  145. components: {
  146. PatientRegisterEdit,
  147. PatientRegisterList,
  148. CheckDetails,
  149. SumItemsType,
  150. SumItems,
  151. SumHistory
  152. },
  153. props:["optGrant","addSummary","btnMakeDiagnosis","save","audit","unAudit"],
  154. data() {
  155. return {
  156. pagePriv:{
  157. routeUrlorPageName:'doctorCheck', //当前页面归属路由或归属页面权限名称
  158. privs:[] // 页面权限
  159. },
  160. medicalStartDate:'', //设置体检日期
  161. medicalStartDateTemp:'', //设置体检日期 临时体检日期
  162. refreshPatientRegisterList:0, // 当有 人员登记有 新增/编辑/删除 时,强制刷新 上一人/下一人的人员列表
  163. medicalStartDateDatas:[], // 设置体检日期 的人员信息登记信息,按登记日期排序 (用于上一人,下一人)
  164. dialogVisibleSetStartDate:false, //设置体检日期窗口
  165. editTimes:0,
  166. nextTodialogVisible:false, //设置完体检日期是否显示 体检人员登记窗口
  167. dialogVisible:false, //体检人员登记窗口
  168. formData:{
  169. registerManType:'doctor', //登记人员类型,客服:customer 医生:doctor 支持在医生诊台处理登记人员
  170. id: "", //id
  171. photo:'', //照片
  172. patientId: "00000000-0000-0000-0000-000000000000", //档案号ID 选择了档案就传档案号,未选就传00000-0000...
  173. patientNo: "", //档案号
  174. customerOrgId: ["00000000-0000-0000-0000-000000000001"], //单位编号 默认个人
  175. customerOrgGroupId: null, //分组
  176. medicalPackageId: null, //套餐
  177. patientName: "", //姓名
  178. birthDate: null, //日期型
  179. sexId: "U", //性别 默认未知U
  180. age: null, //年龄
  181. jobCardNo: "", //工卡号
  182. medicalCardNo: "", //体检卡号
  183. maritalStatusId: "9", //婚姻状况 默认未知
  184. medicalTypeId: null, //体检类别
  185. personnelTypeId: null, //人员类别
  186. jobPost: "", //职务
  187. jobTitle: "", //职称
  188. salesman: "", //介绍人
  189. sexHormoneTermId: null, //性激素期限
  190. isNameHide: "N", //隐藏姓名
  191. isPhoneFollow: "N", //电话随访
  192. isVip: "N", //vip客户
  193. remark: "", //
  194. isLock: "N", //是否锁住
  195. completeFlag: "1", //完成标志 0:预登记,1:未检,2:部份已检,3:已总检 【创建编辑时不操作】
  196. isMedicalStart: "N", //体检开始标志 【创建编辑时不操作】
  197. patientRegisterNo: "", //条码号 【创建编辑时不操作】
  198. medicalTimes: 1, //条码号 【创建编辑时不操作】
  199. medicalCenterId: null, //体检中心
  200. address: "", //地址
  201. email: "", //email
  202. idNo: "", //身份证号
  203. telephone: "", //电话
  204. mobileTelephone: "", //手机号
  205. nationId: null, //民族编号
  206. birthPlaceId: null, //籍惯(出生地)
  207. postalCode: "", //邮编
  208. creatorId: null,
  209. creationTime: "",
  210. lastModificationTime: "",
  211. lastModifierId: null,
  212. isVipBox: false, //vip客户
  213. isNameHideBox: false, //隐藏姓名
  214. isPhoneFollowBox: false, //电话随访
  215. isLockBox: false, //是否锁住
  216. customerOrgRegisterId: null,
  217. isMaxMedicalTimes: 'N',
  218. medicalStartDate:null,
  219. }, //单位 记录 目前新增与更新是一致
  220. formInitData:{},
  221. medicalStartDateLoadOpts:{ //按体检日期 查询参数
  222. totalCount:0,
  223. skipCount:0,
  224. maxResultCount:50000,
  225. },
  226. displayPrList:false, //是否显示人员列表
  227. dialogVisibleCheckHistory:false, //历次结果
  228. tabChoosed:'2',
  229. };
  230. },
  231. created() {
  232. //获取用户当前页面的权限
  233. let userPriv = window.sessionStorage.getItem('userPriv')
  234. if(userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
  235. this.formInitData = Object.assign({},this.formData)
  236. this.medicalStartDateTemp = new Date()
  237. },
  238. //挂载完成
  239. mounted() {
  240. },
  241. computed: {
  242. ...mapState(["window", "dialogWin", "dataTransOpts", "dict", "patientRegister", "doctorCheck","sumDoctorCheck"]),
  243. },
  244. methods: {
  245. ...mapActions(["getCustomerOrgGroup"]),
  246. ...mapMutations(['doctorCheckPrBaseInit']),
  247. checkPagePriv,
  248. prList() {
  249. // console.log('this.doctorCheck.doctorCheckDialogVisible', this.doctorCheck.doctorCheckDialogVisible)
  250. this.doctorCheck.doctorCheckDialogVisible = true
  251. // console.log('this.doctorCheck.doctorCheckDialogVisible2', this.doctorCheck.doctorCheckDialogVisible)
  252. },
  253. //设置体检日期
  254. btnSetStartDate(){
  255. this.medicalStartDate = this.medicalStartDateTemp
  256. this.dialogVisibleSetStartDate = false
  257. setTimeout(() => {
  258. this.refreshPatientRegisterList++
  259. }, 20);
  260. if(this.nextTodialogVisible) this.btnAddPr()
  261. },
  262. //人员登记
  263. btnAddPr(){
  264. // debugger
  265. if(this.medicalStartDate){
  266. //this.formData = Object.assign({},this.formInitData,{medicalStartDate:moment(this.medicalStartDate).format('yyyy-MM-DD')})
  267. this.dataTransOpts.tableS.patient_register.id = ''
  268. this.dialogWin.PatientRegisterEdit = true
  269. setTimeout(() => {
  270. this.dataTransOpts.refresh.patient_register.S++
  271. }, 20);
  272. this.patientRegister.photo = ''
  273. }else{
  274. this.nextTodialogVisible = true
  275. this.dialogVisibleSetStartDate = true
  276. }
  277. },
  278. //人员删除
  279. btnDelPr(){
  280. if(!this.dataTransOpts.tableS.patient_register.id){
  281. this.$message.warning("未选中要删除的人员记录")
  282. return
  283. }
  284. let id = this.dataTransOpts.tableS.patient_register.id
  285. this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
  286. confirmButtonText: "是",
  287. cancelButtonText: "否",
  288. type: "warning",
  289. }).then(() => {
  290. //console.log('{patientRegisterIds}',{patientRegisterIds})
  291. return postapi(`/api/app/patient-register/delete-many`, {patientRegisterIds:[id]})
  292. }).then((res) => {
  293. if(res.code != -1){
  294. console.log("操作成功!")
  295. // this.doctorCheckPrBaseInit();
  296. this.dataTransOpts.tableS.patient_register.id = ''
  297. setTimeout(() => {
  298. // 刷新当前界面数据 及 上一人/下一人 列表数据
  299. this.closeDialogWinPatientRegisterEdit()
  300. }, 20);
  301. }
  302. }).catch((err) => {
  303. if (err == "cancel") {
  304. // this.$message.info("已取消删除");
  305. console.log('已取消删除')
  306. }
  307. });
  308. },
  309. //人员编辑
  310. btnEditPr() {
  311. if(!this.dataTransOpts.tableS.patient_register.id){
  312. this.$message.warning("未选中要编辑的人员记录")
  313. return
  314. }
  315. // this.patientRegister.patientRegisterRd = Object.assign({},this.doctorCheck.prBase)
  316. // this.formData = Object.assign({},this.doctorCheck.prBase)
  317. //console.log(this.patientRegister.patientRegisterRd,this.patientRegister.prList)
  318. this.dialogWin.PatientRegisterEdit = true;
  319. setTimeout(() => {
  320. this.dataTransOpts.refresh.patient_register.S++
  321. }, 20);
  322. },
  323. // 关闭人员登记 新增/编辑 时,刷新当前界面数据 及 上一人/下一人 列表数据
  324. closeDialogWinPatientRegisterEdit(){
  325. this.dataTransOpts.refresh.patient_register.S++ // 刷新当前界面数据
  326. this.refreshPatientRegisterList++ // 刷新 上一人/下一人 列表
  327. },
  328. // 上(下)一人 step 1 表示下一人, -1 表示上一人
  329. btnStep(step){
  330. if(!this.medicalStartDate){
  331. this.$message.warning("请先设置体检日期")
  332. return
  333. }
  334. if(this.medicalStartDateDatas.length == 0) {
  335. this.$message.warning("当前设置的体检日期,无体检人员信息")
  336. return
  337. }
  338. let lstep = -1
  339. if(step && step > 0) lstep = 1
  340. let lfind = -1
  341. let patientRegisterId = this.dataTransOpts.tableS.patient_register.id
  342. if(patientRegisterId){
  343. lfind = arrayExistObj(this.medicalStartDateDatas,'id',patientRegisterId)
  344. if(lfind > - 1){
  345. if(lstep < 0 && lfind == 0){
  346. this.$message.warning("已是第一个人")
  347. return
  348. }else if(lstep > 0 && lfind == this.medicalStartDateDatas.length - 1){
  349. this.$message.warning("已是最后一人")
  350. return
  351. }
  352. lfind = Number(lfind) + Number(lstep)
  353. this.dataTransOpts.tableS.patient_register.id = this.medicalStartDateDatas[lfind].id
  354. }
  355. }else{
  356. if(this.medicalStartDateDatas && this.medicalStartDateDatas.length > 0){
  357. this.dataTransOpts.tableS.patient_register.id = this.medicalStartDateDatas[0].id
  358. }
  359. }
  360. setTimeout(() => {
  361. this.dataTransOpts.refresh.patient_register.S++
  362. }, 20);
  363. },
  364. //查询找到相关信息处理
  365. findPR(rd){
  366. this.doctorCheck.prBase = Object.assign({},this.doctorCheck.prBase,rd)
  367. this.patientRegister.photo = rd.photo
  368. },
  369. //刷新或添加列表数据
  370. refreshRegister(patientRegister){
  371. console.log('编辑/新增的 form :',patientRegister)
  372. this.doctorCheck.prBase = Object.assign({},patientRegister)
  373. this.patientRegister.photo = patientRegister.photo
  374. },
  375. //修改结果
  376. btnEdit() {
  377. let ret = this.optGrant('edit')
  378. if (ret) {
  379. this.$message.warning(ret)
  380. return
  381. }
  382. this.doctorCheck.RegisterCheckEdit.completeFlag = '0'
  383. },
  384. //删除结果
  385. btnDel() {
  386. let ret = this.optGrant('del')
  387. if (ret) {
  388. this.$message.warning(ret)
  389. return
  390. }
  391. postapi('/api/app/registercheck/updatecompletemany', [{ registerCheckId: this.doctorCheck.RegisterCheckEdit.id, completeFlag: '0' }])
  392. .then((res) => {
  393. console.log("del", res.data);
  394. if (res.code != -1) {
  395. this.doctorCheck.RegisterCheckEdit.completeFlag = '0';
  396. let lfind = arrayExistObj(this.doctorCheck.RegisterCheckList,'id',this.doctorCheck.RegisterCheckEdit.id)
  397. if(lfind > -1) this.doctorCheck.RegisterCheckList[lfind].completeFlag = '0'
  398. // 刷新明细项目,小结与建议
  399. this.dataTransOpts.refresh.register_check_item.M++
  400. this.dataTransOpts.refresh.register_check.S++
  401. console.log("操作成功!");
  402. }
  403. });
  404. },
  405. //放弃明细项目检查
  406. refuseItem() {
  407. let ret = this.optGrant('refuseItem')
  408. if (ret) {
  409. this.$message.warning(ret)
  410. return
  411. }
  412. // console.log('this.doctorCheck.checkItem',this.doctorCheck.checkItem)
  413. if(!this.doctorCheck.checkItem){
  414. this.$message.warning("请选择要操作的明细项目")
  415. return
  416. }
  417. if(!this.doctorCheck.checkItem.itemId){
  418. this.$message.warning("请选择要操作的明细项目")
  419. return
  420. }
  421. let lfind = arrayExistObj(this.doctorCheck.checkItemList, 'itemId', this.doctorCheck.checkItem.itemId)
  422. if (lfind == -1) {
  423. this.$message.warning("请选择要操作的明细项目")
  424. return
  425. }
  426. this.doctorCheck.checkItemList[lfind].result = "放弃检查"
  427. },
  428. //删除明细项目
  429. delItem() {
  430. let ret = this.optGrant('delItem')
  431. if (ret) {
  432. this.$message.warning(ret)
  433. return
  434. }
  435. if(!this.doctorCheck.checkItem){
  436. this.$message.warning("请选择要删除的明细项目")
  437. return
  438. }
  439. if(!this.doctorCheck.checkItem.itemId){
  440. this.$message.warning("请选择要删除的明细项目")
  441. return
  442. }
  443. let lfind = arrayExistObj(this.doctorCheck.checkItemList, 'itemId', this.doctorCheck.checkItem.itemId)
  444. if (lfind == -1) {
  445. this.$message.warning("请选择要删除的明细项目")
  446. return
  447. }
  448. this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
  449. confirmButtonText: "是",
  450. cancelButtonText: "否",
  451. type: "warning",
  452. }).then(() => {
  453. return postapi(`/api/app/registercheckitem/deleteregistercheckitem?RegisterCheckId=${this.doctorCheck.checkItem.registerCheckId}&ItemId=${this.doctorCheck.checkItem.itemId}`)
  454. }).then(res => {
  455. if (res.code != -1) {
  456. this.doctorCheck.checkItemList.splice(lfind, 1);
  457. this.doctorCheck.checkItem.itemId = ''
  458. }
  459. }).catch((err) => {
  460. if (err == "cancel") {
  461. this.$message.info("已取消");
  462. }else{
  463. this.$message({ type: "error", message: `项目明细删除失败,原因:${err}` });
  464. }
  465. });
  466. },
  467. // 历次结果
  468. btnCheckHistory() {
  469. if(!this.doctorCheck.prBase.id) return;
  470. this.dialogVisibleCheckHistory = true;
  471. },
  472. //体检报告
  473. report() {
  474. if(!this.$peisAPI) {
  475. this.$message.info("此功能,需要在壳客户端才可运行!")
  476. return
  477. }
  478. ///3a0c990e-5756-2dc0-19d5-69a617fe4048
  479. let ReportCode = '0005';
  480. let token = window.sessionStorage.getItem('token');
  481. let user = window.sessionStorage.getItem('user');
  482. let toOutShell = {
  483. ReportCode, token,
  484. preViewCanPrint: this.doctorCheck.prBase.isAudit, //this.sumDoctorCheck.sumPREdit.isAudit
  485. Parameters: [
  486. { Name: 'printer', Value: user },
  487. { Name: 'LTS', Value: 'Y' }, //Y、N N只看不能打印
  488. { Name: 'hisLog', Value: 'pic/hisLog.jpg' },
  489. { Name: "peisReportFirstPage", Value: "pic/peisReportFirstPage.jpg" },
  490. { Name: "peisReportPageHeader", Value: "pic/peisReportPageHeader.jpg" },
  491. { Name: "peisReportPageFooter", Value: "pic/peisReportPageFooter.jpg" }
  492. ],
  493. };
  494. postapi(`/api/app/printreport/getpeisreport?PatientRegisterId=${this.doctorCheck.prBase.id}`)
  495. .then((res) => {
  496. if (res.code != -1) {
  497. toOutShell.ReportTable = res.data;
  498. console.log('JSON.stringify(toOutShell)', JSON.stringify(toOutShell));
  499. return this.$peisAPI.printPre(JSON.stringify(toOutShell));
  500. }
  501. })
  502. .catch(err => {
  503. this.$message.warning(err);
  504. });
  505. },
  506. //总检
  507. toSumDoctorCheck() {
  508. this.sumDoctorCheck.sumPREdit = Object.assign({},this.doctorCheck.prBase)
  509. this.$router.push({ path: "/sumDoctorCheck" });
  510. },
  511. },
  512. //监听事件()
  513. watch: {
  514. //1级单位值改变,分组改变
  515. "patientRegister.query.CustomerOrgParentId"(newVal, oldVal) {
  516. console.log(
  517. "watch patientRegister.query.CustomerOrgParentId newVal:",
  518. newVal,
  519. " oldVal:",
  520. oldVal
  521. );
  522. if (newVal != oldVal && newVal !== this.dict.personOrgId) {
  523. this.getCustomerOrgGroup(newVal);
  524. }
  525. },
  526. // 设置体检日期
  527. "refreshPatientRegisterList":{
  528. // immediate:true,
  529. handler(newVal,oldVal){
  530. if(newVal != oldVal){
  531. let body = {
  532. customerOrgs: [
  533. {
  534. startDate: moment(this.medicalStartDate).format('yyyy-MM-DD'),
  535. endDate: moment(this.medicalStartDate).format('yyyy-MM-DD'),
  536. dateType: '2' //体检日期
  537. }
  538. ],
  539. maxResultCount: 1000
  540. }
  541. postapi('/api/patientregister/getpeisrecordlist',body).then(res => {
  542. if(res.code != -1) this.medicalStartDateDatas = res.data.items
  543. })
  544. }else{
  545. this.medicalStartDateDatas = []
  546. }
  547. }
  548. },
  549. },
  550. };
  551. </script>
  552. <style scoped>
  553. @import '../../assets/css/global_button.css';
  554. .divBtnClass {
  555. margin-top: 5px;
  556. }
  557. </style>