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.

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