123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259 |
- 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;
- (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
- appealInfo = {
- exampleOperation: 2,
- casesEntryName: data.casesEntryName,
- casesEntryMsg: data.casesEntryMsg,
- value: data.qcresultDetaiValue,
- remark: data.remark,
- behospitalCode: data.behospitalCode,
- qcResultAlgVO: {
- casesEntryId: casesEntryId,
- casesId: data.casesId,
- id: data.qcresultDetailId,
- exampleOperation: appealOperationType
- }
- }
- 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) {
- 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);
- }
- 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>
- </div>`;
- }
- $('.history').append(str);
- }
- $(document).on("click", ".goDetail", (e) => {
- $(parent.document).find("#contentIframe").attr("src", "checkTaskList.html")
- });
- $(document).on("click", ".btn-sure", (e) => {
- $("#delModal .modal-body").html("");
- $("#delModal").show();
- if (appealOperationType == 0) {
- $("#appealDel").tmpl(appealInfo).appendTo("#delModal .modal-body");
- $("#delModal .confirm").text("确定").unbind("click").click(function () {
- approved(1)
- });
- } else if (appealOperationType == 1) {
- $("#appealAdd").tmpl(appealInfo).appendTo("#delModal .modal-body");
- $("#delModal .confirm").text("确定").unbind("click").click(function () {
- approved(2)
- });
- } else if (appealOperationType == 2) {
- $("#appealDef").tmpl(appealInfo).appendTo("#delModal .modal-body");
- $("#delModal .confirm").text("确定").unbind("click").click(function () {
- approved(3)
- });
- }
- console.log(appealOperationType);
- });
- $(document).on("click", ".btn-cancel", (e) => {
- $("#delModal .modal-body").html("");
- $('.bot ul').css({
- "display": 'none',
- });
- $("#delModal").show();
- $("#delModal .modal-header .title").html('驳回');
- $("#appealReject").tmpl(appealInfo).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 if (type == 2) {
- appealInfo.exampleOperation = 3
- } 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
- }
- }
- 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' });
- });
- }
|