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.

673 lines
30 KiB

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