123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295 |
- const $ = require('jquery');
- require("../css/appealExamine.less");
- require('./modal.js');
- require('jquery-templates');
- const { api } = require('./api.js')
- const { post, getCookie, getLocal, getUrlArgObjectNew, emptyBox, downloadExportedData, expJson, getLogoParam, listenScroll, getPickerDate, exportTimeLimit } = require('./utils.js')
- require('./../resource/jquery-ui/jquery-ui.min.js');
- require('./../resource/jquery-ui/jquery-ui.min.css');
- const iconCheck = require("./../images/icon_check.png")
- const iconUnCheck = require("./../images/icon_unchecked.png")
- const iconCalenBlue = require("./../images/icon_calen_blue.png")
- const iconCalenGrey = require("./../images/icon_calen_grey.png")
- const iconDown = require("./../images/arrow_down.png")
- const iconUp = require("./../images/arrow_up.png")
- const loadingImg = require("./../images/loading.gif")
- const arrowLeft = require("./../images/arrow_left.png")
- const arrowRight = require("./../images/arrow_right.png")
- const goUpG = require("./../images/arrow_up_grey.png")
- const goUpB = require("./../images/arrow_up_blue.png")
- const goDownG = require("./../images/arrow_down_grey.png")
- const goDownB = require("./../images/arrow_down_blue.png")
- listenScroll()
- let srcUrl = $("#contentIframe", parent.document).attr("src")
- const id = getUrlArgObjectNew("id", srcUrl) || "";
- const hospitalId = getUrlArgObjectNew("hospitalId", srcUrl) || "";
- const behospitalCode = getUrlArgObjectNew("behospitalCode", srcUrl) || "";
- const casesEntryId = getUrlArgObjectNew("casesEntryId", srcUrl) || "";
- const qcresultDetailId = getUrlArgObjectNew("qcresultDetailId", srcUrl) || "";
- const appealOperationType = getUrlArgObjectNew("appealOperationType", srcUrl) || "";
- const form = getUrlArgObjectNew("form", srcUrl) || "";
- let appealInfo, appealExamineRecordDTOList;
- (function () {
- getApprovedView()
- if (form == 2) {
- $(".bot").hide();
- $('.appealExamine h2').html('申诉信息 > 申诉审核 > 查看');
- } else if (form == 3) {
- $(".bot").hide();
- $('.appealExamine h2').html('申诉信息 > 申诉记录 > 查看');
- }
- })();
- //获取审核详情
- function getApprovedView() {
- const param = {
- id: id,
- behospitalCode: behospitalCode,
- casesEntryId: casesEntryId,
- hospitalId: hospitalId,
- qcresultDetailId: qcresultDetailId,
- }
- return post(api.getApprovedView, param).then(res => {
- if (res.data.code == '0') {
- data = res.data.data.data
- appealExamineRecordDTOList = data.appealExamineRecordDTOList,
- appealInfo = {
- exampleOperation: 2,
- casesEntryName: data.casesEntryName,
- casesEntryMsg: data.casesEntryMsg,
- remark: data.remark,
- behospitalCode: data.behospitalCode,
- qcResultAlgVO: {
- casesEntryId: casesEntryId,
- casesId: data.casesId,
- id: data.qcresultDetailId,
- casesScore: appealExamineRecordDTOList[0].casesScore,
- msg: appealExamineRecordDTOList[0].msg,
- score: appealExamineRecordDTOList[0].qcresultDetaiValue,
- isReject: appealExamineRecordDTOList[0].isReject,
- explainInfo:appealExamineRecordDTOList[0].explainInfo,
- }
- }
- getInfo(data)
- getCon(data)
- getAppealInfo(id, behospitalCode, casesEntryId, hospitalId, qcresultDetailId)
- } else {
- const token = localStorage.getItem('accessToken');
- if (!token && window.location.href.indexOf('login') == -1) {
- //alert('无token判断,跳回登录')
- } else {
- $.alerModal({ "message": res.data.msg, type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
- }
- }
- }).catch((e) => {
- })
- }
- function getAppealInfo(id, behospitalCode, casesEntryId, hospitalId, qcresultDetailId) {
- const param = {
- id: id,
- behospitalCode: behospitalCode,
- casesEntryId: casesEntryId,
- hospitalId: hospitalId,
- qcresultDetailId: qcresultDetailId,
- }
- return post(api.getAppealInfo, param).then(res => {
- if (res.data.code == '0') {
- data = res.data.data.appealExamineRecordDTOList
- getHistory(data)
- } else {
- const token = localStorage.getItem('accessToken');
- if (!token && window.location.href.indexOf('login') == -1) {
- //alert('无token判断,跳回登录')
- } else {
- $.alerModal({ "message": res.data.msg, type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
- }
- }
- }).catch((e) => {
- })
- }
- function getInfo(data) {
- let str = ''
- str += `<span class="info-title">病案号:${data.behospitalCode || '-'}</span>
- <span class="info-title">姓名:${data.name || '-'}</span>
- <span class="info-title">性别:${data.sex || '-'}</span>
- <span class="info-title">年龄:${data.age || '-'}</span>
- <span class="info-title">科室:${data.behDeptName || '-'}</span>
- <span class="info-title">主管医生:${data.doctorName || '-'}</span>
- <span class="info-title">入院时间:${data.behospitalDate || '-'}</span>
- <span class="info-title">出院时间:${data.leaveHospitalDate || '-'}</span>`;
- $('.info').append(str);
- }
- function getCon(data) {
- console.log(data);
- let str = ''
- str += `<p class="con-title">申述模块:${data.casesName || '-'}</p>
- <p class="con-title">病历内容:${data.defectContent || '-'}</p>
- <p class="con-title">缺陷详情:${data.qcresultDetailMsg || '-'}</p>
- <p class="con-title"> 评分:${data.qcresultDetaiValue || '-'}</p>
- <p class="con-title">病案详情:<span class="goDetail">查看</span></p>`;
- $('.content').append(str);
- $('.goDetail').on('click', function (e) {
- scoreDetail(data.behospitalCode, data.age, 'YH-BLZK-ZKSSKS', data.name)
- })
- }
- function getHistory(data) {
- let str = ''
- for (let i = 0; i < data.length; i++) {
- const item = data[i]
- str += `<div class="box">
- <p class="con-title"><span>申述时间:${item.appealCreateDate || '-'}</span><span>申述人:${item.claimantName || '-'}</span><span>审核人:${item.checkName || '-'}</span></p>
- <p class="con-title">操作类型:${item.appealOperationType == 0 ? '删改条目' : item.appealOperationType == 1 ? '新增已有条目' : item.appealOperationType == 2 ? '新增缺失条目' : '恢复条目'}</p>
- <p class="con-title">申述说明:${item.appealExplain || '-'}</p>
- ${item.exampleStatus == 2 ?
- `<p class="con-title" style="border-top: 1px solid #333;margin-top: 10px;padding-top: 10px;">审核时间:${item.appealExamineDate || '-'}</p>
- <p class="con-title">申述结果:审核通过</p>
- <p class="con-title">处理方式:${item.exampleOperation == 1 ? '修改' : item.exampleOperation == 2 ? '删除' : item.exampleOperation == 3 ? '新增已有' : item.exampleOperation == 4 ? '新增缺失' : '恢复条目'}</p>
- <p class="con-title">质控条目:${item.casesEntryName || '-'}</p>
- <p class="con-title">提示信息:${item.msg || '-'}</p>
- <p class="con-title">分值:${item.score || '-'}</p>
- <p class="con-title">备注:${item.exampleRemark || '-'}</p>`
- : item.exampleStatus == 1 ?
- `<p class="con-title" style="border-top: 1px solid #333;margin-top: 10px;padding-top: 10px;">审核时间:${item.appealExamineDate || '-'}</p>
- <p class="con-title">申述结果:审核通过</p>
- <p class="con-title">驳回理由:${item.rejectReason || '-'}</p>`
- : ""}
- </div>`;
- }
- $('.history').append(str);
- }
- function scoreDetail(id, age, code, name) {
- const logoParam = getLogoParam();
- window.open(`./appealUserPage.html?id=${id}&age=${age}&code=${code}&hid=${getCookie('hospitalid')}&name=${name}&form=44` + logoParam)
- }
- $(document).on("click", "input[type=radio][value=1]", (e) => {
- $(".endis").attr("disabled", false);
- });
- $(document).on("click", "input[type=radio][value=2]", (e) => {
- $(".endis").attr("disabled", true);
- });
- $(document).on("click", ".btn-sure", (e) => {
- $("#delModal .modal-body").html("");
- $("#delModal").show();
- if (appealOperationType == 0) {
- $("#appealDel").tmpl(appealExamineRecordDTOList[0]).appendTo("#delModal .modal-body");
- $("#delModal .confirm").text("确定").unbind("click").click(function () {
- approved(1)
- });
- } else if (appealOperationType == 1) {
- console.log(appealInfo);
- $("#appealAdd").tmpl(appealExamineRecordDTOList[0]).appendTo("#delModal .modal-body");
- $("#delModal .confirm").text("确定").unbind("click").click(function () {
- approved(2)
- });
- } else if (appealOperationType == 2) {
- $("#appealDef").tmpl(appealExamineRecordDTOList[0]).appendTo("#delModal .modal-body");
- $("#delModal .confirm").text("确定").unbind("click").click(function () {
- approved(3)
- });
- }
- });
- $(document).on("click", ".btn-cancel", (e) => {
- $("#delModal .modal-body").html("");
- $('.bot ul').css({
- "display": 'none',
- });
- $("#delModal").show();
- $("#delModal .modal-header .title").html('驳回');
- $("#appealReject").tmpl(appealExamineRecordDTOList[0]).appendTo("#delModal .modal-body");
- $("#delModal .confirm").text("确定").unbind("click").click(function () {
- rejected()
- });
- });
- //审核
- function approved(type) {
- if (type == 1) {
- appealInfo.exampleOperation = $('input:radio:checked').val()
- if ($('input:radio:checked').val() == 2) {
- appealInfo.delStatus == 0
- } else {
- appealInfo.casesEntryMsg == $(".case").val()
- appealInfo.qcResultAlgVO.score = $('.score').val()
- appealInfo.qcResultAlgVO.explainInfo = $('.explainInfo').val()
- }
- } else if (type == 2) {
- appealInfo.exampleOperation = 3
- appealInfo.qcResultAlgVO.score = $('.score').val()
- appealInfo.qcResultAlgVO.explainInfo = $('.explainInfo').val()
- } else if (type == 3) {
- appealInfo.exampleOperation = 4
- appealInfo.processResult = $(".textarea").val()
- let val = $(".textarea").val()
- let num = 500
- if (!val) {
- $(".appealDef .warning .red").text("处理结果不能为空~");
- $(".appealDef .warning").show();
- return
- } else if (val.length > num) {
- $(".appealDef .warning .red").text("处理结果不能超过" + num + "个字~");
- $(".appealDef .warning").show();
- return
- }
- }
- console.log(appealInfo);
- const param = {
- ...appealInfo,
- 'id': id,
- };
- post(api.approved, param).then(function (res) {
- if (res.data.code === '0') {
- $("#delModal").hide();
- $.alerModal({ "message": "审核成功", type: "tip", time: '1000', win: true });
- } else {
- $.alerModal({ "message": res.data.msg || '失败,请重试~', type: "tip", time: '1000', win: 'default' });
- }
- }).catch(() => {
- $.alerModal({ "message": '失败,请重试~', type: "tip", time: '1000', win: 'default' });
- });
- }
- //驳回
- function rejected() {
- let val = $(".textarea2").val()
- let num = 500
- if (!val) {
- $(".appealReject .warning .red").text("驳回理由不能为空~");
- $(".appealReject .warning").show();
- return
- } else if (val.length > num) {
- $(".appealReject .warning .red").text("驳回理由不能超过" + num + "个字~");
- $(".appealReject .warning").show();
- return
- }
- const param = {
- 'behospitalCode': behospitalCode,
- 'id': id,
- rejectedReason: $(".textarea2").val()
- };
- post(api.rejected, param).then(function (res) {
- console.log(res.data.data.code);
- if (res.data.data.code === '0') {
- $("#delModal").hide();
- $.alerModal({ "message": "驳回成功", type: "tip", time: '1000', win: true });
- } else {
- console.log(123);
- $.alerModal({ "message": res.data.data.msg || '失败,请重试~', type: "tip", time: '1000', win: 'default' });
- }
- }).catch(() => {
- $.alerModal({ "message": '失败,请重试~', type: "tip", time: '1000', win: 'default' });
- });
- }
|