|
@@ -1,6 +1,7 @@
|
|
|
const $ = require('jquery');
|
|
|
require("../css/appealHistory.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');
|
|
@@ -17,7 +18,8 @@ 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")
|
|
|
+const goDownB = require("./../images/arrow_down_blue.png");
|
|
|
+const ret = require('bluebird/js/release/util');
|
|
|
listenScroll()
|
|
|
let pageSet = [], pageSetCopy = [], showNum = 0, scrollTop = 0;
|
|
|
$(".selectModular").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
@@ -29,10 +31,10 @@ let srcUrl = $("#contentIframe", parent.document).attr("src")
|
|
|
let statisticsType = getUrlArgObjectNew("dateType", srcUrl) || getUrlArgObjectNew("shijian", srcUrl) || ""
|
|
|
let startDateParam = getUrlArgObjectNew("startDateParam", srcUrl) || ""
|
|
|
let endDateParam = getUrlArgObjectNew("endDateParam", srcUrl) || ""
|
|
|
-let tabList = [], name = "", behospitalCode = "", deptName = "", deptNameTemp = "", behosDateStart = "", level = "", behosDateEnd = "", nameTemp = "",moduleName = "",operationType="",
|
|
|
+let tabList = [], name = "", behospitalCode = "", deptName = "", deptNameTemp = "", behosDateStart = "", level = "", behosDateEnd = "", nameTemp = "", moduleName = "", operationType = "",
|
|
|
behospitalCodeTemp = "", levelTemp = "", deptId = "", deptIdTemp = "", doctorName = "", doctorNameTemp = "", doctorNum = "", doctorNumTemp = "",
|
|
|
fpCheckStatus = "", fpCheckStatusTemp = "", fpCheckName = "", fpCheckNameTemp = "", qcCheckName = "", qcCheckNameTemp = "", qcCheckMain = "", qcCheckStatus = "", state = "",
|
|
|
- data_desc = ["leave_hospital_date"], data_asc = [];
|
|
|
+ data_desc = ["leave_hospital_date"], data_asc = [], global_checkers = []; //审核人列表;
|
|
|
let isPlacefile = getCookie('isPlacefile') || 1
|
|
|
|
|
|
$('.datapickerBox').append(`<img class="iconCalen" src=${iconCalenGrey} />`)
|
|
@@ -58,11 +60,11 @@ function getTabData(activePage) {
|
|
|
asc: data_asc, //升序
|
|
|
desc: data_desc, //降序
|
|
|
deptName: deptName == "全部" ? "" : deptName || '',
|
|
|
- casesName:moduleName,
|
|
|
- operationType:operationType,
|
|
|
- state:state,
|
|
|
+ casesName: moduleName,
|
|
|
+ operationType: operationType,
|
|
|
+ state: state,
|
|
|
size: 15,
|
|
|
- name:$('.patientNameInp').val(),
|
|
|
+ name: $('.patientNameInp').val(),
|
|
|
complaintDateEnd: behosDateEnd.replaceAll("/", "-"),
|
|
|
complaintDateStart: behosDateStart.replaceAll("/", "-"),
|
|
|
}
|
|
@@ -224,6 +226,36 @@ $(".abnormalClear").on("click", function (e) {
|
|
|
getTabData(1)
|
|
|
})
|
|
|
|
|
|
+//获取审核人下拉列表
|
|
|
+function getCheckUser() {
|
|
|
+ const param = {};
|
|
|
+ post(api.getReviewer, param).then(function (res) {
|
|
|
+ if (res.data.code === '0') {
|
|
|
+ const data = res.data.data;
|
|
|
+ global_checkers = data;
|
|
|
+ $("#flawDropTmpl").tmpl({ info: data }).appendTo("#delModal .checker-drop-box ul");
|
|
|
+ userDropEvent(".checker-drop-input", selectChecker);
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+function userDropEvent(domSelector, selectEvent) {
|
|
|
+ $("body").on("click", domSelector, function () {
|
|
|
+ $(domSelector).parents(".drop-box").toggleClass("show");
|
|
|
+ });
|
|
|
+ $("body").on("click", ".checker-drop-box li", function () {
|
|
|
+ $(".add-box .warning").hide();
|
|
|
+ const n = $(this).attr("idx");
|
|
|
+ selectEvent(domSelector, n);
|
|
|
+ $(domSelector).parents(".drop-box").find(".warning").hide();
|
|
|
+ $(domSelector).parents(".drop-box").removeClass("show");
|
|
|
+ });
|
|
|
+}
|
|
|
+//审核人下拉选中
|
|
|
+function selectChecker(domSelector, n) {
|
|
|
+ const flaw = global_checkers[n];
|
|
|
+ const { id, userName } = flaw;
|
|
|
+ $(domSelector).text(userName).attr({ "code": id, "title": userName });
|
|
|
+}
|
|
|
function renderTab(data) {
|
|
|
let str = ``
|
|
|
if (data.length === 0) {
|
|
@@ -233,7 +265,7 @@ function renderTab(data) {
|
|
|
for (let i = 0; i < data.length; i++) {
|
|
|
const item = data[i]
|
|
|
str += `
|
|
|
- <tr data-index=${i} data-doc="${item.doctorName || ""}" data-docId="${item.doctorId || ""}">
|
|
|
+ <tr>
|
|
|
<td >${item.claimantName || "-"}</td>
|
|
|
<td >${item.behDeptName || "-"}</td>
|
|
|
<td >${item.claimantGmtCreate}</td>
|
|
@@ -244,18 +276,111 @@ function renderTab(data) {
|
|
|
<td >${item.checkName || "-"}</td>
|
|
|
<td >${item.checkGmtCreate || "-"}</td>
|
|
|
<td >${item.appealOperationType == 0 ? '删改条目' : item.appealOperationType == 1 ? '新增已有条目' : item.appealOperationType == 2 ? '新增缺失条目' : '恢复条目'}</td>
|
|
|
- <td >${item.exampleStatus == 0 ? '<span class="review">待审核</span>' : item.exampleStatus == 1 ? '<span class="rejected">已驳回</span>' : '<span class="approved">审核通过</span>'}</td>
|
|
|
- <td >
|
|
|
- ${item.exampleStatus == 0 ? `<span class="appealBtn">查看</span><span class="appealBtn">撤回</span>` : ''}
|
|
|
- ${item.exampleStatus == 1 || item.exampleStatus == 2 ? `<span class="appealBtn">再次申述</span>` : ''}
|
|
|
+ <td >${item.exampleStatus == 0 ? '<span class="review"><i></i>待审核</span>' : item.exampleStatus == 1 ? '<span class="rejected"><i></i>已驳回</span>' : '<span class="approved"<i></i>>审核通过</span>'}</td>
|
|
|
+ <td data-id="${item.id || ""}" data-hos="${item.hospitalId || ""}" data-behospitalCode="${item.behospitalCode || ""}" data-casesEntryId="${item.casesEntryId || ""}" data-qcresultDetailId="${item.qcresultDetailId || ""}" data-appealOperationType="${item.appealOperationType || ""}" data-index=${i}>
|
|
|
+ ${item.exampleStatus == 0 ? `<span class="appealBtn goHomeDetail1">查看</span><span class="appealBtn withdraw" >撤回</span>` : ''}
|
|
|
+ ${item.exampleStatus == 1 || item.exampleStatus == 2 ? `<span class="appealBtn appealAgain">再次申述</span>` : ''}
|
|
|
</td>
|
|
|
</tr>
|
|
|
`
|
|
|
}
|
|
|
-
|
|
|
$('.tbody').html(str)
|
|
|
+ $(".withdraw").click(function () {
|
|
|
+ let id = $(this).parent().attr("data-id")
|
|
|
+ console.log(id);
|
|
|
+ cancelAppealInfo(id)
|
|
|
+ })
|
|
|
+ $(".appealAgain").click(function () {
|
|
|
+ let i = $(this).parent().attr("data-index")
|
|
|
+ $("#delModal .modal-body").html("");
|
|
|
+ $("#delModal").show();
|
|
|
+ getCheckUser()
|
|
|
+ $(".checker-drop-input").html('123')
|
|
|
+ console.log(data[i].checkName);
|
|
|
+ $("#appealDef").tmpl(data[i]).appendTo("#delModal .modal-body");
|
|
|
+ $("#delModal .confirm").text("确定").unbind("click").click(function () {
|
|
|
+ addAppealInfo(data[i])
|
|
|
+ });
|
|
|
+ })
|
|
|
+ $(".goHomeDetail1").click(function () {
|
|
|
+ let id = $(this).parent().attr("data-id")
|
|
|
+ let hospitalId = $(this).parent().attr("data-hos")
|
|
|
+ let behospitalCode = $(this).parent().attr("data-behospitalCode")
|
|
|
+ let casesEntryId = $(this).parent().attr("data-casesEntryId")
|
|
|
+ let qcresultDetailId = $(this).parent().attr("data-qcresultDetailId")
|
|
|
+ let appealOperationType = $(this).parent().attr("data-appealOperationType")
|
|
|
+ $(parent.document).find("#contentIframe").attr("src", "appealExamine.html?id=" + id + "&hospitalId=" + hospitalId + "&behospitalCode=" + behospitalCode + "&casesEntryId=" + casesEntryId + "&qcresultDetailId=" + qcresultDetailId + "&appealOperationType=" + appealOperationType + "&form=" + 3)
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+function cancelAppealInfo(id) {
|
|
|
+ post(api.cancelAppealInfo, { id: id }).then(function (res) {
|
|
|
+ if (res.data.code === '0') {
|
|
|
+ getTabData(1)
|
|
|
+ $.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 addAppealInfo(data) {
|
|
|
+ if (data.appealOperationType == 1) {
|
|
|
+ if (data.exampleStatus == 2) {
|
|
|
+ data.appealOperationType = 0
|
|
|
+ } else {
|
|
|
+ data.appealOperationType = 1
|
|
|
+ }
|
|
|
+ } else if (data.appealOperationType == 3) {
|
|
|
+ data.appealOperationType = 0
|
|
|
+ }
|
|
|
+ $(".warning").hide();
|
|
|
+ let val = $(".textarea").val()
|
|
|
+ let num = 500
|
|
|
+ if (!val) {
|
|
|
+ $(".warning .red").text("申诉说明不能为空~");
|
|
|
+ $(".warning").show();
|
|
|
+ return
|
|
|
+ } else if (val.length > num) {
|
|
|
+ $(".warning .red").text("申诉说明不能超过" + num + "个字~");
|
|
|
+ $(".warning").show();
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const param = {
|
|
|
+ appealExplain: $(".textarea").val(),
|
|
|
+ appealOperationType: data.appealOperationType,
|
|
|
+ behospitalCode: data.behospitalCode,
|
|
|
+ checkId: $(".checker-drop-input").attr("code"),
|
|
|
+ appealType: 1,
|
|
|
+ }
|
|
|
+ post(api.addAppealInfo, param).then(function (res) {
|
|
|
+ if (res.data.code === '0') {
|
|
|
+ getTabData(1)
|
|
|
+ $("#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' });
|
|
|
+
|
|
|
+ });
|
|
|
+}
|
|
|
+$(document).on("click", ".checker-drop-input", (e) => {
|
|
|
+ e.stopPropagation()
|
|
|
+ $("#delModal ul").css("display", "block")
|
|
|
+});
|
|
|
+$(document).on("click", ".infoItem", (e) => {
|
|
|
+ e.stopPropagation()
|
|
|
+ const name = $(this).attr("data-name")
|
|
|
+ $("#delModal ul").css("display", "none")
|
|
|
+});
|
|
|
//选择病历等级
|
|
|
$('.selectModular').on("click", function (e) {
|
|
|
e.stopPropagation()
|
|
@@ -791,6 +916,7 @@ $(document).on("click", function () {
|
|
|
$(".selectCheck .arrow").attr("src", iconDown)
|
|
|
$(".fpSelectCheck .arrow").attr("src", iconDown)
|
|
|
$(".qcSelectCheck .arrow").attr("src", iconDown)
|
|
|
+ $("#delModal ul").css("display", "none")
|
|
|
})
|
|
|
|
|
|
|