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.

411 lines
15 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
  1. <template>
  2. <div>
  3. <div class="listBtn">
  4. <el-button type="primary" class="btnClass" @click="prList">人员列表</el-button>
  5. </div>
  6. <div class="listBtn">
  7. <el-button type="primary" class="btnClass" @click="toDoctorCheck">医生诊台</el-button>
  8. </div>
  9. <div class="listBtn">
  10. <el-button type="primary" class="btnClass" @click="save">保存</el-button>
  11. </div>
  12. <div class="listBtn">
  13. <el-button type="primary" class="btnClass" @click="edit">修改</el-button>
  14. </div>
  15. <div class="listBtn">
  16. <el-button type="primary" class="btnClass" @click="del">取消总检</el-button>
  17. </div>
  18. <div class="listBtn">
  19. <el-button type="primary" class="btnClass" @click="audit">审核</el-button>
  20. </div>
  21. <div class="listBtn">
  22. <el-button type="primary" class="btnClass" @click="unAudit">取消审核</el-button>
  23. </div>
  24. <div class="listBtn">
  25. <el-button type="primary" class="btnClass" @click="addSuggtion">新增建议</el-button>
  26. </div>
  27. <div class="listBtn">
  28. <el-button type="primary" class="btnClass" @click="report">体检报告</el-button>
  29. </div>
  30. <div class="listBtn">
  31. <el-button type="primary" class="btnClass" @click="reCheck">复查</el-button>
  32. </div>
  33. <div class="listBtn">
  34. <el-button type="primary" class="btnClass" @click="intervene">干预措施</el-button>
  35. </div>
  36. <!-- 人员档案列表 -->
  37. <el-dialog title="人员档案列表" :visible.sync="sumDoctorCheck.sumDoctorCheckDialogVisible" width="1000px">
  38. <PatientRegisterList win="sumDoctorCheck"/>
  39. </el-dialog>
  40. </div>
  41. </template>
  42. <script>
  43. import { mapState } from "vuex";
  44. import { getapi, postapi, putapi, deletapi } from "@/api/api";
  45. import { arrayExistObj,parseID } from "../../utlis/proFunc";
  46. import PatientRegisterList from "../doctorCheck/PatientRegisterList.vue";
  47. export default {
  48. components: {
  49. PatientRegisterList,
  50. },
  51. data() {
  52. return {
  53. dialogVisible: false,
  54. tableData: [
  55. {
  56. col: 'col',
  57. details: [{id:1, name: '000' }, {id:2, name: '001' }]
  58. }
  59. ],
  60. };
  61. },
  62. created() { },
  63. //挂载完成
  64. mounted() {
  65. },
  66. computed: {
  67. ...mapState(["dict", "patientRegister", "doctorCheck", "sumDoctorCheck"]),
  68. },
  69. methods: {
  70. prList(){
  71. this.sumDoctorCheck.sumDoctorCheckDialogVisible = true
  72. },
  73. //to医生诊台
  74. toDoctorCheck() {
  75. this.$router.push({ path: "/doctorCheck" });
  76. },
  77. //操作判断
  78. optGrant(optType) {
  79. let ret = ''
  80. if (!this.sumDoctorCheck.sumPREdit.id) return '请选择体检人员'
  81. if (this.sumDoctorCheck.sumPREdit.isLock == 'Y') return '人员已锁定,不可执行此操作'
  82. if (optType == 'save') {
  83. //if (!this.sumDoctorCheck.sumPREdit.summaryDoctor) return "请选择总检医生"
  84. if (this.sumDoctorCheck.sumPREdit.completeFlag == '3') return "该人员已总检,不可再执行此操作,如需操作请点【修改】"
  85. if (this.sumDoctorCheck.sumPREdit.isAudit == 'Y') return '该人员检查已审核,请先取消审核,方可执行此操作!'
  86. }
  87. if (optType == 'edit') {
  88. if (this.sumDoctorCheck.sumPREdit.completeFlag != '3') return "该人员尚未总检,无需执行此操作"
  89. if (this.sumDoctorCheck.sumPREdit.isAudit == 'Y') return '该人员检查已审核,请先取消审核,方可执行此操作!'
  90. }
  91. if (optType == 'del') {
  92. if (this.sumDoctorCheck.sumPREdit.completeFlag != '3') return "该人员尚未总检,无需执行此操作"
  93. if (this.sumDoctorCheck.sumPREdit.isAudit == 'Y') return '该人员检查已审核,请先取消审核,方可执行此操作!'
  94. }
  95. if (optType == 'audit') {
  96. if (this.sumDoctorCheck.sumPREdit.completeFlag != '3') return "该检查项目尚未保存,不可执行此操作"
  97. if (this.sumDoctorCheck.sumPREdit.isAudit == 'Y') return "该人员检查已审核,无需再执行此操作"
  98. }
  99. if (optType == 'unAudit') {
  100. if (this.sumDoctorCheck.sumPREdit.completeFlag != '3') return "该人员尚未总检,不可执行此操作"
  101. if (this.sumDoctorCheck.sumPREdit.isAudit == 'N') return "该人员检查尚未审核,无需执行此操作"
  102. }
  103. if (optType == 'report') {
  104. if (this.sumDoctorCheck.sumPREdit.completeFlag != '3') return "该人员检查尚未总检,不可执行此操作"
  105. if (this.sumDoctorCheck.sumPREdit.isAudit == 'N') return "该人员检查尚未审核,不可执行此操作"
  106. }
  107. return ret
  108. },
  109. //保存数据
  110. save() {
  111. let ret = this.optGrant('save')
  112. if (ret) {
  113. alert(ret)
  114. return
  115. }
  116. //更新总检
  117. this.updateSumDoctorCheck();
  118. //更新综述
  119. this.saveSummary();
  120. //更新建议
  121. this.saveSuggestion();
  122. },
  123. //修改结果
  124. edit() {
  125. let ret = this.optGrant('edit')
  126. if (ret) {
  127. alert(ret)
  128. return
  129. }
  130. this.sumDoctorCheck.sumPREdit.completeFlag = '2'
  131. },
  132. //取消结果
  133. del() {
  134. let body = {
  135. patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
  136. //summaryDoctor: this.sumDoctorCheck.sumPREdit.summaryDoctor,
  137. //summaryDate: this.sumDoctorCheck.sumPREdit.summaryDate,
  138. completeFlag: '2'
  139. }
  140. console.log(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
  141. postapi(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
  142. .then((res) => {
  143. console.log("del", res.data);
  144. if (res.code != -1) {
  145. this.sumDoctorCheck.sumPREdit.completeFlag = '2';
  146. console.log(`/api/app/sumsummaryheader/deletesumsummarymany?PatientRegisterId=${this.sumDoctorCheck.sumPREdit.id}`)
  147. return postapi(`/api/app/sumsummaryheader/deletesumsummarymany?PatientRegisterId=${this.sumDoctorCheck.sumPREdit.id}`)
  148. }
  149. })
  150. .then((res) => {
  151. console.log("deletesumsuggestionmany", res.data);
  152. if (res.code != -1) {
  153. console.log(`/api/app/sumsuggestionheader/deletesumsuggestionmany?PatientRegisterId=${this.sumDoctorCheck.sumPREdit.id}`)
  154. return postapi(`/api/app/sumsuggestionheader/deletesumsuggestionmany?PatientRegisterId=${this.sumDoctorCheck.sumPREdit.id}`)
  155. }
  156. })
  157. .then((res) => {
  158. console.log("deletesumsuggestionmany", res.data);
  159. if (res.code != -1) {
  160. this.$message({ type: "success", message: `取消总检成功!` });
  161. }
  162. })
  163. .catch((err) => {
  164. this.$message({ type: "error", message: `取消总检失败,原因:${err}` });
  165. });
  166. },
  167. //审核
  168. audit() {
  169. let ret = this.optGrant('audit')
  170. if (ret) {
  171. alert(ret)
  172. return
  173. }
  174. let body = {
  175. patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
  176. //auditDoctor: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  177. //auditDate: "string" 不传时,取当前时间
  178. isAudit: 'Y'
  179. }
  180. console.log(`/api/app/patientregister/updatepatientregisterauditordoctor`, body)
  181. postapi(`/api/app/patientregister/updatepatientregisterauditordoctor`, body)
  182. .then((res) => {
  183. console.log("audit", res.data);
  184. if (res.code != -1) {
  185. this.sumDoctorCheck.sumPREdit.isAudit = 'Y';
  186. this.$message({ type: "success", message: `总检审核成功` });
  187. }
  188. })
  189. .catch((err) => {
  190. this.$message({ type: "error", message: `总检审核失败,原因:${err}` });
  191. });
  192. },
  193. //取消审核
  194. unAudit() {
  195. let ret = this.optGrant('unAudit')
  196. if (ret) {
  197. alert(ret)
  198. return
  199. }
  200. let body = {
  201. patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
  202. //auditDoctor: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  203. //auditDate: "string" 不传时,取当前时间
  204. isAudit: 'N'
  205. }
  206. console.log(`/api/app/patientregister/updatepatientregisterauditordoctor`, body)
  207. postapi(`/api/app/patientregister/updatepatientregisterauditordoctor`, body)
  208. .then((res) => {
  209. console.log("unAudit", res.data);
  210. if (res.code != -1) {
  211. this.sumDoctorCheck.sumPREdit.isAudit = 'N';
  212. this.$message({ type: "success", message: `取消总检审核成功` });
  213. }
  214. })
  215. .catch((err) => {
  216. this.$message({ type: "error", message: `取消总检审核失败,原因:${err}` });
  217. });
  218. },
  219. //体检报告
  220. report() {
  221. let ret = this.optGrant('report')
  222. if (ret) {
  223. alert(ret)
  224. return
  225. }
  226. },
  227. //增加建议
  228. addSuggtion(){
  229. let id = String(new Date().getTime())
  230. let pojo = {
  231. id,
  232. patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
  233. details: [
  234. {
  235. sumSuggestionHeaderId: id,
  236. suggestionContent: '',
  237. }
  238. ]
  239. }
  240. this.sumDoctorCheck.suggestionList.push(pojo);
  241. },
  242. //复查
  243. reCheck() {
  244. console.log("parseID('123456198007240000')",parseID('123456198007240000'))
  245. let ret = this.optGrant('reCheck')
  246. if (ret) {
  247. alert(ret)
  248. return
  249. }
  250. },
  251. //干预措施
  252. intervene() {
  253. let ret = this.optGrant('intervene')
  254. if (ret) {
  255. alert(ret)
  256. return
  257. }
  258. },
  259. //更新总检
  260. updateSumDoctorCheck() {
  261. let body = {
  262. patientRegisterId: this.sumDoctorCheck.sumPREdit.id,
  263. //summaryDoctor:this.sumDoctorCheck.sumPREdit.summaryDoctor,
  264. //summaryDate: this.sumDoctorCheck.sumPREdit.summaryDate,
  265. completeFlag: '3'
  266. }
  267. console.log(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
  268. postapi(`/api/app/patientregister/updatepatientregistersummarydoctor`, body)
  269. .then((res) => {
  270. console.log("updateSumDoctorCheck", res.data);
  271. if (res.code != -1) {
  272. this.sumDoctorCheck.sumPREdit.completeFlag = '3';
  273. this.$message({ type: "success", message: `总检保存成功!` });
  274. }
  275. })
  276. .catch((err) => {
  277. this.$message({ type: "error", message: `总检保存失败,原因:${err}` });
  278. });
  279. },
  280. //更新综述
  281. saveSummary() {
  282. let body = []
  283. this.sumDoctorCheck.summaryList.forEach(item => {
  284. delete item.id;
  285. delete item.summaryFlag;
  286. delete item.displayOrder;
  287. item.details.forEach(e => {
  288. delete e.sumSummaryHeaderId;
  289. delete e.displayOrder;
  290. })
  291. body.push(item)
  292. });
  293. console.log(`/api/app/sumsummaryheader/createsumsummary`, body)
  294. if(body.length < 1) return
  295. postapi(`/api/app/sumsummaryheader/createsumsummary`, body)
  296. .then((res) => {
  297. console.log("saveSummary", res.data);
  298. if (res.code != -1) {
  299. //this.sumDoctorCheck.sumPREdit.completeFlag = '1';
  300. }
  301. })
  302. .catch((err) => {
  303. this.$message({ type: "error", message: `综述保存失败,原因:${err}` });
  304. });
  305. },
  306. //更新建议
  307. saveSuggestion() {
  308. let body = []
  309. this.sumDoctorCheck.suggestionList.forEach(item => {
  310. delete item.id;
  311. delete item.suggestionFlag;
  312. delete item.displayOrder;
  313. item.details.forEach(e => {
  314. delete e.sumSuggestionHeaderId;
  315. delete e.displayOrder;
  316. })
  317. body.push(item)
  318. });
  319. console.log(`/api/app/sumsuggestionheader/createsumsuggestion`, body)
  320. if(body.length < 1) return
  321. postapi(`/api/app/sumsuggestionheader/createsumsuggestion`, body)
  322. .then((res) => {
  323. console.log("saveSuggestion", res.data);
  324. if (res.code != -1) {
  325. //this.sumDoctorCheck.sumPREdit.completeFlag = '1';
  326. }
  327. })
  328. .catch((err) => {
  329. this.$message({ type: "error", message: `建议保存失败,原因:${err}` });
  330. });
  331. },
  332. addSummary() {
  333. if (!this.sumDoctorCheck.sumPREdit.id) {
  334. alert("请选择检查项目")
  335. return
  336. }
  337. this.doctorCheck.checkSummaryList.push({
  338. registerCheckId: this.sumDoctorCheck.sumPREdit.id,
  339. summary: '',
  340. summaryFlag: 'N',
  341. })
  342. this.doctorCheck.checkSuggestionList.push({
  343. registerCheckId: this.sumDoctorCheck.sumPREdit.id,
  344. suggestion: '',
  345. })
  346. },
  347. },
  348. //监听事件()
  349. watch: {
  350. //1级单位值改变,分组改变
  351. "patientRegister.query.CustomerOrgParentId"(newVal, oldVal) {
  352. console.log(
  353. "watch patientRegister.query.CustomerOrgParentId newVal:",
  354. newVal,
  355. " oldVal:",
  356. oldVal
  357. );
  358. if (newVal != oldVal && newVal !== this.dict.personOrgId) {
  359. this.getCustomerOrgGroup(newVal);
  360. }
  361. },
  362. },
  363. };
  364. </script>
  365. <style scoped>
  366. .listBtn {
  367. margin-top: 10px;
  368. text-align: center;
  369. }
  370. .btnClass{
  371. width:110px;
  372. }
  373. </style>