const $ = require('jquery');
require("../css/appealCheck.less");
require('./modal.js');
const { api } = require('./api.js')
const { post, getCookie,setCookie, getUrlArgObjectNew, emptyBox, downloadExportedData, expJson, setDatePicker, 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 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 pageSet = [], pageSetCopy = [], showNum = 0, scrollTop = 0;
$(".selectModular").append(`
`)
$(".selectType").append(`
`)
$(".selectDept").append(`
`)
$(".fpSelectCheck").append(`
`)
$(".qcSelectCheck").append(`
`)
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 page = getUrlArgObjectNew("page", srcUrl) || 1
let behosDateStart = getUrlArgObjectNew("behosDateStart", srcUrl) || ""
let behosDateEnd = getUrlArgObjectNew("behosDateEnd", srcUrl) || ""
let deptId = getUrlArgObjectNew("deptId", srcUrl) || ""
let deptName = getUrlArgObjectNew("deptName", srcUrl) || ""
let moduleName = getUrlArgObjectNew("moduleName", srcUrl) || ""
let name = getUrlArgObjectNew("name", srcUrl) || ""
let patientName = getUrlArgObjectNew("patientName", srcUrl) || ""
let fileCode = getUrlArgObjectNew("fileCode", srcUrl) || ""
let operationType = getUrlArgObjectNew("operationType", srcUrl) || ""
let state = getUrlArgObjectNew("state", srcUrl) || ""
let tabList = [], deptNameTemp = "", typeList,
deptIdTemp = "",
fpCheckStatusTemp = "", fpCheckNameTemp = "", qcCheckNameTemp = "";
let isPlacefile = getCookie('isPlacefile') || 1
setCookie('excelName', "申诉审核");
$('.datapickerBox').append(`
`)
$('.iconCalen').on("mouseenter", function (e) {
$(this).attr("src", iconCalenBlue)
})
$('.iconCalen').on("mouseleave", function (e) {
$(this).attr("src", iconCalenGrey)
})
$('.iconCalen').on("click", function (e) {
$(this).parent().find("input").focus()
})
$(".menu .page", parent.document).removeClass("active")
$(parent.document).find(".menu .page[code=YH-SSXX-SSSH]").addClass("active")
if (deptName) {
$('.selectDept').html(deptName).attr("title", deptName)
$(".selectDept").append(`
`)
}
if (moduleName) {
$('.selectModular').html(moduleName).attr("title", moduleName)
$(".selectModular").append(`
`)
}
if (operationType) {
$('.selectType').html(operationType).attr("title", operationType)
$(".selectType").append(`
`)
}
if (state) {
$('.qcSelectCheck').html(state).attr("title", state)
$(".qcSelectCheck").append(`
`)
}
if (name) {
$('.name').val(name)
}
$(".name").on("input", function (e) {
const val = $(this).val().trim()
name = val
})
$(".patientName").on("input", function (e) {
const val = $(this).val().trim()
patientName = val
})
$(".fileCode").on("input", function (e) {
const val = $(this).val().trim()
fileCode = val
})
function getTabData(activePage) {
behosDateStart = getPickerDate($("#datepicker"), 1)
behosDateEnd = getPickerDate($("#datepicker2"), 2)
const param = {
current: activePage,
deptId: deptId.trim(),
deptName: deptName == "全部" ? "" : deptName || '',
modeName: moduleName == "全部" ? "" : moduleName || '',
operationType: operationType,
state: state,
size: 15,
name: name,
patientName:patientName,
fileCode:fileCode,
complaintDateEnd: behosDateEnd.replace(/\//g, '-'),
complaintDateStart: behosDateStart.replace(/\//g, '-'),
"desc": ['claimant_gmt_create']
}
$('.pagination').html("")
$('.tbody').html(emptyBox('努力加载中...', '',))
return post(api.getAppealReview, param).then(res => {
if (res.data.code == '0') {
tabList = res.data.data.records
const totalPage = res.data.data.pages
const totalNum = res.data.data.total
renderTab(tabList)
renderPagination(totalPage, Number(activePage), totalNum)
if (totalPage > 1) {
renderPagination(totalPage, Number(activePage), totalNum)
} else {
$('.pagination').html("")
}
} 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) => {
})
}
getAuditNumber()
//获取待审核数量
function getAuditNumber() {
let isPlacefile = getCookie('isPlacefile') || 1
return post(api.getAuditNumber, { analyzeType: isPlacefile }).then(res => {
if (res.data.code == '0') {
auditNumber = res.data.data > 99 ? '99+' : res.data.data
if (auditNumber == 0) {
$(".menu .page", parent.document).children('.reds').hide()
$(".menu .dian", parent.document).hide()
$(".menu-mini .page", parent.document).children('.reds').hide()
$(".menu-mini .dian", parent.document).hide()
} else {
$(".menu .page", parent.document).children('.reds').show()
$(".menu-mini .page", parent.document).children('.reds').show()
$(".menu .page", parent.document).children('.reds').html(auditNumber)
$(".menu-mini .page", parent.document).children('.reds').html(auditNumber)
}
} 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) => {
})
}
$(".filter").on("click", function (e) {
behosDateStart = $("#datepicker").val()
behosDateEnd = $("#datepicker2").val()
const behosDateStartTime = new Date(behosDateStart).getTime()
const behosDateEndTime = new Date(behosDateEnd).getTime()
if (behosDateStartTime > behosDateEndTime) {
$.alerModal({ "message": '申诉时间开始时间不能大于结束时间~', type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
return
}
// if (behosDateStart) {
// behosDateStart = behosDateStart.replace(/\//g, '-') + ' 00:00:00'
// }
// if (behosDateEnd) {
// behosDateEnd = behosDateEnd.replace(/\//g, '-') + ' 23:59:59'
// }
deptId = deptIdTemp
deptName = deptNameTemp
fpCheckName = fpCheckNameTemp
qcCheckName = qcCheckNameTemp
fpCheckStatus = fpCheckStatusTemp
qcCheckStatus = state
page = 1
getTabData(1)
})
$(".abnormalClear").on("click", function (e) {
page = 1
tabList = [];
behospitalCode = "";
scoreSum = 0;
nameTemp = "";
deptId = "";
deptIdTemp = "";
deptName = deptNameTemp = "";
fpCheckName = "";
qcCheckName = "";
qcCheckMain = "";
fpCheckNameTemp = "";
qcCheckNameTemp = "";
qcCheckMainTemp = "";
fpCheckStatus = "";
fpCheckStatusTemp = "";
qcCheckStatus = "";
state = ""
moduleName = ""
operationType = ""
name = ""
patientName=""
fileCode=""
$('.name').val(''),
$('.patientName').val(''),
$('.fileCode').val(''),
data_desc = ["leave_hospital_date"]
if (isPlacefile != 1) {
data_desc = ["behospital_date"]
}
data_asc = [];
// $('#datepicker').val('')
// $('#datepicker2').val('')
//默认日期为近一周
$("#datepicker").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "yy/mm/dd",
}).datepicker("setDate", "-6d");
$("#datepicker2").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "yy/mm/dd"
}).datepicker("setDate", new Date());
$("#datepickerFp1").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "yy/mm/dd",
}).datepicker("setDate", "");
$("#datepickerFp2").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "yy/mm/dd"
}).datepicker("setDate", "");
$("#datepickerQc1").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "yy/mm/dd",
}).datepicker("setDate", "");
$("#datepickerQc2").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "yy/mm/dd"
}).datepicker("setDate", "");
$('.selectDept ').html('全部')
$(".deptList").css("display", "none")
$(".selectDept").append(`
`)
// $('.selectDept ').addClass('unSelect')
$('.selectModular').html('全部')
$(".modularList").css("display", "none")
$(".selectModular").append(`
`)
// $('.selectModular ').addClass('unSelect')
$('.selectType').html('全部')
$(".typeList ").css("display", "none")
$(".selectType").append(`
`)
$('.qcSelectCheck').html('全部')
$(".qcCheckList").css("display", "none")
$(".qcSelectCheck").append(`
`)
$("th[code]").removeClass("asc desc")
if (isPlacefile == 1) {
$(".leaveHospitalDate").addClass(" desc")
} else {
$(".behospitalDate").addClass(" desc")
}
behosDateStart = $("#datepicker").val()
behosDateEnd = $("#datepicker2").val()
if (behosDateStart) {
behosDateStart = behosDateStart.replace(/\//g, '-') + ' 00:00:00'
}
if (behosDateEnd) {
behosDateEnd = behosDateEnd.replace(/\//g, '-') + ' 23:59:59'
}
getTabData(page)
})
function renderTab(data) {
let str = ``
if (data.length === 0) {
$('.tbody').html(emptyBox(null, showNum + 12))
return;
}
for (let i = 0; i < data.length; i++) {
const item = data[i]
str += `
${item.claimantName || "-"} |
${item.behDeptName || "-"} |
${item.claimantGmtCreate} |
${item.behospitalCode} |
${item.fileCode || "-"} |
${item.name || "-"} |
${item.modeName || "-"} |
${item.qcresultDetailMsg && item.qcresultDetailMsg.length > 30 ? `${item.qcresultDetailMsg.substring(0,30)+'...' || "-"} | ` : `${item.qcresultDetailMsg || "-"} | `}
${item.checkName || "-"} |
${item.checkGmtCreate || "-"} |
${item.appealOperationType == 0 ? '删改条目' : item.appealOperationType == 1 ? '新增已有条目' : item.appealOperationType == 2 ? '新增缺失条目' : '恢复条目'} |
${item.exampleStatus == 0 ? '待审核' : item.exampleStatus == 1 ? '已驳回' : '审核通过'} |
${item.exampleStatus == 0 ? `审核查看` : ''}
${item.exampleStatus == 1 || item.exampleStatus == 2 ? `查看` : ''}
|
`
}
$('.tbody').html(str)
$(".goExamine").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 + "&name=" + name + "&operationType=" + operationType + "&state=" + state + "&hospitalId=" + hospitalId + "&behospitalCode=" + behospitalCode + "&casesEntryId=" + casesEntryId + "&qcresultDetailId=" + qcresultDetailId + "&appealOperationType=" + appealOperationType + "&page=" + page + "&behosDateStart=" + behosDateStart + "&behosDateEnd=" + behosDateEnd + "&deptId=" + deptId + "&deptName=" + deptName + "&moduleName=" + moduleName + "&form=" + 1)
})
$(".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 + "&name=" + name + "&operationType=" + operationType + "&state=" + state + "&hospitalId=" + hospitalId + "&behospitalCode=" + behospitalCode + "&casesEntryId=" + casesEntryId + "&qcresultDetailId=" + qcresultDetailId + "&appealOperationType=" + appealOperationType + "&page=" + page + "&behosDateStart=" + behosDateStart + "&behosDateEnd=" + behosDateEnd + "&deptId=" + deptId + "&deptName=" + deptName + "&moduleName=" + moduleName + "&form=" + 2)
})
}
//选择病历等级
$('.selectModular').on("click", function (e) {
e.stopPropagation()
$(".selectDept .arrow").attr("src", iconDown)
$(".deptList").css("display", "none")
$(".selectType .arrow").attr("src", iconDown)
$(".typeList").css("display", "none")
$(".qcSelectCheck .arrow").attr("src", iconDown)
$(".qcCheckList").css("display", "none")
const showList = $(".modularList ").css("display")
if (showList == "none" || !showList) {
$(".modularList ").css("display", "block")
$(".selectModular .arrow").attr("src", iconUp)
} else {
$(".modularList ").css("display", "none")
$(".selectModular .arrow").attr("src", iconDown)
}
})
//操作类型
$('.selectType').on("click", function (e) {
e.stopPropagation()
$(".selectDept .arrow").attr("src", iconDown)
$(".deptList").css("display", "none")
$(".selectModular .arrow").attr("src", iconDown)
$(".modularList ").css("display", "none")
$(".qcSelectCheck .arrow").attr("src", iconDown)
$(".qcCheckList").css("display", "none")
const showList = $(".typeList ").css("display")
if (showList == "none" || !showList) {
$(".typeList ").css("display", "block")
$(".selectType .arrow").attr("src", iconUp)
} else {
$(".typeList ").css("display", "none")
$(".selectType .arrow").attr("src", iconDown)
}
})
//选择状态
$('.qcSelectCheck').on("click", function (e) {
e.stopPropagation()
$(".selectDept .arrow").attr("src", iconDown)
$(".deptList").css("display", "none")
$(".selectModular .arrow").attr("src", iconDown)
$(".modularList ").css("display", "none")
$(".selectType .arrow").attr("src", iconDown)
$(".typeList").css("display", "none")
const showList = $(".qcCheckList ").css("display")
if (showList == "none" || !showList) {
$(".qcCheckList ").css("display", "block")
$(".qcSelectCheck .arrow").attr("src", iconUp)
} else {
$(".qcCheckList ").css("display", "none")
$(".qcSelectCheck .arrow").attr("src", iconDown)
}
})
getmoduleList()
//获取模块类型
function getmoduleList() {
post(api.getAppealMode, { pageType: 2 }).then(res => {
if (res.data.code == '0') {
const moduleTypeList = res.data.data
renderModuleList(moduleTypeList)
} else { }
}).catch((e) => {
})
}
function renderModuleList(moduleTypeList) {
let str = `全部`
for (let i = 0; i < moduleTypeList.length; i++) {
str += ` ${moduleTypeList[i].modeName}`
}
$('.modularList').html(str)
bindModuleSelect()
}
//模块类型选择
function bindModuleSelect() {
$('.modularItem').on("click", function () {
const modularItemName = $(this).attr("data-name")
const modularItemItemId = $(this).attr("data-id")
moduleName = modularItemName
$('.selectModular').html(modularItemName)
$(".modularList").css("display", "none")
$(".selectModular").append(`
`)
$('.selectModular').removeClass('unSelect')
})
}
getAppealReviewDictionary()
//获取操作类型
function getAppealReviewDictionary() {
post(api.getAppealReviewDictionary).then(res => {
if (res.data.code == '0') {
const typeList = res.data.data['操作类型']
const statusList = res.data.data['状态']
renderTypeList(typeList)
renderStatusList(statusList)
} else { }
}).catch((e) => {
})
}
function renderTypeList(data) {
let str = `全部`
for (var i in data) {
str += ` ${data[i]}`
}
$('.typeList').html(str)
if (operationType) {
$('.selectType').html(data[operationType]).attr("title", data[operationType])
$(".selectType").append(`
`)
}
bindTypedSelect()
}
//操作类型选择
function bindTypedSelect() {
$('.typeItem').on("click", function () {
const typeItemName = $(this).attr("data-name")
const typeItemItemId = $(this).attr("data-id")
operationType = typeItemItemId
$('.selectType').html(typeItemName)
$(".typeList").css("display", "none")
$(".selectType").append(`
`)
$('.selectType').removeClass('unSelect')
})
}
function renderStatusList(data) {
let str = `全部`
for (var i in data) {
str += ` ${data[i]}`
}
$('.qcCheckList').html(str)
bindCheckedSelectQc()
if (state) {
$('.qcSelectCheck').html(data[state]).attr("title", data[state])
$(".qcSelectCheck").append(`
`)
}
}
//状态
function bindCheckedSelectQc() {
$('.qcCheckItem').on("click", function () {
const qcCheckItemName = $(this).attr("data-name")
const qcCheckItemItemId = $(this).attr("data-id") || ""
state = qcCheckItemItemId
$('.qcSelectCheck').html(qcCheckItemName)
$(".qcCheckList").css("display", "none")
$(".qcSelectCheck").append(`
`)
$('.qcSelectCheck').removeClass('unSelect')
})
}
$('.selectDept').on("click", function (e) {
e.stopPropagation()
$(".selectModular .arrow").attr("src", iconDown)
$(".modularList ").css("display", "none")
$(".selectType .arrow").attr("src", iconDown)
$(".typeList").css("display", "none")
$(".qcSelectCheck .arrow").attr("src", iconDown)
$(".qcCheckList").css("display", "none")
const showList = $(".deptList ").css("display")
if (showList == "none" || !showList) {
$(".deptList ").css("display", "block")
$(".selectDept .arrow").attr("src", iconUp)
} else {
$(".deptList ").css("display", "none")
$(".selectDept .arrow").attr("src", iconDown)
}
})
//获取科室列表
getDeptList()
function getDeptList() {
post(api.getAppealDept, { inputStr: "", pageType: 2 }).then(res => {
if (res.data.code == '0') {
const deptList = res.data.data
rendeDeptList(deptList)
} else { }
}).catch((e) => {
})
}
function rendeDeptList(deptList) {
let str = `全部`
for (let i = 0; i < deptList.length; i++) {
str += ` ${deptList[i].deptName}`
}
$('.deptList').html(str)
bindDeptSelect()
}
//科室选择
function bindDeptSelect() {
$('.deptItem').on("click", function () {
const deptItemName = $(this).attr("data-name")
const deptItemId = $(this).attr("data-id")
deptIdTemp = deptItemId
deptName = deptNameTemp = deptItemName
if (deptItemName.length > 10) {
$('.selectDept').html(deptItemName.substring(0, 8) + '...')
} else {
$('.selectDept').html(deptItemName)
}
$('.selectDept ').attr('title', deptItemName)
$(".selectDept").append(`
`)
$('.selectDept').removeClass('unSelect')
$(".deptList").css("display", "none")
})
}
function renderColSet(list) {
let pageSetList = list || pageSetCopy
let allSelect = true
for (let i = 0; i < pageSetList.length; i++) {
if (pageSetList[i].status != 1) {
allSelect = false
}
}
let str = `
列显示设置 })
恢复默认 取消 保存设置
`
let infoStr = `${allSelect ? `
` : `
`}全选列名 "
// $(".main-body").append(str)
if (!$("#mainBox .colSetBox", parent.document).length) {
$("#mainBox", parent.document).append(str)
}
$("#mainBox .colSetBox .cloInfo", parent.document).html(infoStr)
$(".colTabInfoBox", parent.document).scrollTop(scrollTop)
scrollTop = 0
bindSelectCol()
bindColOrder()
bindSaveColSet()
bindDefaultColset()
bindCloseColSet()
bindImgEnter()
}
function bindDefaultColset() {
$('.defaultColSet', parent.document).off("hover").hover(function () {
$(this).css('color', '#00A1FF')
}, function () {
$(this).css('color', '#777777')
})
$('.defaultColSet', parent.document).off("click").on('click', function () {
return post(api.getDefaultPageSet, { pageType: 1 }).then(res => {
if (res.data.code == '0') {
pageSet = res.data.data
pageSetCopy = JSON.parse(JSON.stringify(pageSet))
renderColSet(pageSetCopy)
} else { }
}).catch((e) => {
})
// closeColSet()
})
}
function bindImgEnter() {
$(".pageSetUpBox img", parent.document).off("mouseenter").on("mouseenter", function () {
$(this).attr('src', goUpB)
})
$(".pageSetDownBox img", parent.document).off("mouseenter").on("mouseenter", function () {
$(this).attr('src', goDownB)
})
$(".pageSetUpBox img", parent.document).off("mouseout").on("mouseout", function () {
$(this).attr('src', goUpG)
})
$(".pageSetDownBox img", parent.document).off("mouseout").on("mouseout", function () {
$(this).attr('src', goDownG)
})
}
function bindSelectCol() {
$(".toggleSelectCol", parent.document).off("click").on("click", function () {
const index = $(this).parent().attr("data-index")
pageSetCopy[index].status = pageSetCopy[index].status == 1 ? 0 : 1
scrollTop = $(".colTabInfoBox", parent.document).scrollTop()
renderColSet(pageSetCopy)
})
$(".toggleSelectColAll", parent.document).off("click").on("click", function () {
const hasSelectAll = $(this).attr("data-select")
for (let i = 0; i < pageSetCopy.length; i++) {
if (hasSelectAll == "true") {
pageSetCopy[i].status = 0
} else {
pageSetCopy[i].status = 1
}
}
scrollTop = $(".colTabInfoBox", parent.document).scrollTop()
renderColSet(pageSetCopy)
})
}
function closeColSet() {
pageSetCopy = JSON.parse(JSON.stringify(pageSet))
$("#mainBox .colSetBox", parent.document).remove()
}
function bindCloseColSet() {
$(".colSetBox .iconClose", parent.document).off("click").on("click", function () {
closeColSet()
})
$(".colSetBox .cancalColSet", parent.document).off("click").on("click", function () {
closeColSet()
})
}
function bindSaveColSet() {
$(".saveColSet", parent.document).off("click").on("click", function () {
let showNumSet = 0
let sysUserPagesetVOList = []
for (let i = 0; i < pageSetCopy.length; i++) {
const item = pageSetCopy[i]
sysUserPagesetVOList.push({
name: item.name,
orderNo: i,
status: item.status,
val: item.val
})
if (item.status == 1) {
showNumSet++
}
}
if (showNumSet === 0) {
$.alerModal({ "message": '最少显示一列', type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
return
}
return post(api.saveQcListPageSet, { pageType: 1, sysUserPagesetVOList: sysUserPagesetVOList }).then(res => {
if (res.data.code == '0') {
closeColSet()
} else {
$("#mainBox .colSetBox", parent.document).remove()
$.alerModal({ "message": '保存失败,请重试~', type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
}
}).catch((e) => {
$("#mainBox .colSetBox", parent.document).remove()
$.alerModal({ "message": '保存失败,请重试~', type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
})
})
}
function bindColOrder() {
$(".pageSetUp", parent.document).off("click").on("click", function () {
const index = parseInt($(this).parent().parent().parent().parent().attr("data-index"))
if (index != 0) {
const upItem = pageSetCopy[index]
const upItemPre = pageSetCopy[index - 1]
pageSetCopy.splice(index - 1, 2, upItem, upItemPre)
scrollTop = $(".colTabInfoBox", parent.document).scrollTop()
renderColSet(pageSetCopy)
} else {
return
}
})
$(".pageSetDown", parent.document).off("click").on("click", function () {
const index = parseInt($(this).parent().parent().parent().parent().attr("data-index"))
if (index == pageSetCopy.length - 1) {
return
} else {
const downItem = pageSetCopy[index]
const downItemBack = pageSetCopy[index + 1]
pageSetCopy.splice(index, 2, downItemBack, downItem)
scrollTop = $(".colTabInfoBox", parent.document).scrollTop()
renderColSet(pageSetCopy)
}
})
}
$(function () {
$.datepicker.regional['zh-CN'] = {
clearText: '清除',
clearStatus: '清除已选e799bee5baa6e59b9ee7ad9431333361303131日期',
closeText: '关闭',
closeStatus: '不改变当前选择',
prevText: '<上月',
prevStatus: '显示上月',
prevBigText: '<<',
prevBigStatus: '显示上一年',
nextText: '下月>',
nextStatus: '显示下月',
nextBigText: '>>',
nextBigStatus: '显示下一年',
currentText: '今天',
currentStatus: '显示本月',
monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
monthNamesShort: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
yearNamesShort: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
monthStatus: '选择月份',
yearStatus: '选择年份',
weekHeader: '周',
weekStatus: '年内周次',
dayNames: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
dayNamesShort: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
dayNamesMin: ['日', '一', '二', '三', '四', '五', '六'],
dayStatus: '设置 DD 为一周起始',
dateStatus: '选择 m月 d日, DD',
dateFormat: 'yy-mm-dd',
firstDay: 1,
initStatus: '请选择日期',
isRTL: false
};
$.datepicker.setDefaults($.datepicker.regional['zh-CN']);
let startDate = "", endDate = new Date()
let year = new Date().getFullYear()
let month = new Date().getMonth() + 1
if (statisticsType == '1') {
startDate = new Date(`${year}-${month}-01`)
} else if (statisticsType == '2') {
startDate = new Date(`${year}-01-01`)
} else if (statisticsType == '3') {
startDate = new Date(startDateParam)
endDate = new Date(endDateParam)
} else {
startDate = "-6d"
}
if (behosDateStart && behosDateEnd) {
startDate = new Date(behosDateStart)
endDate = new Date(behosDateEnd)
}
$("#datepicker").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "yy/mm/dd",
}).datepicker("setDate", startDate);
$("#datepicker2").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "yy/mm/dd"
}).datepicker("setDate", endDate);
getTabData(page)
});
//分页渲染
function renderPagination(totalPage, activePage, totalNum) {
let str = `共${totalPage}页/${totalNum}条数据
`
if (totalPage <= 6) {
for (let i = 1; i <= totalPage; i++) {
str += `${i}`
}
} else {
if (activePage <= 3) { //选中页数小于4
for (let i = 1; i <= 4; i++) {
str += `${i}`
}
str += `...`
str += `${totalPage}`
} else if (activePage > totalPage - 3) {
str += `1`
str += `...`
str += `${totalPage - 3}`
str += `${totalPage - 2}`
str += `${totalPage - 1}`
str += `${totalPage}`
} else {
str += `1`
str += `...`
str += `${activePage - 1}`
str += `${activePage}`
str += `${activePage + 1}`
str += `...`
str += `${totalPage}`
}
}
str += `
`
$('.pagination').html(str)
$('.page' + activePage).addClass('activePage')
$(".pageNum").on("click", function (e) {
const activePageNow = Number($(this).attr('data-page'))
page = activePageNow
getTabData(activePageNow)
// renderPagination(totalPage,activePageNow,totalNum)
})
$(".prePage").on("click", function (e) {
let activePageNow = Number($(".activePage").attr('data-page'))
page = activePageNow
if (activePageNow > 1) {
activePageNow--
getTabData(activePageNow)
// renderPagination(totalPage,activePageNow,totalNum)
}
})
$(".nextPage").on("click", function (e) {
let activePageNow = Number($(".activePage").attr('data-page'))
page = activePageNow
if (activePageNow < totalPage) {
activePageNow++
getTabData(activePageNow)
// renderPagination(totalPage,activePageNow,totalNum)
}
})
}
$(document).on("click", function () {
$(".selectDept .arrow").attr("src", iconDown)
$(".deptList").css("display", "none")
$(".selectModular .arrow").attr("src", iconDown)
$(".modularList ").css("display", "none")
$(".selectType .arrow").attr("src", iconDown)
$(".typeList").css("display", "none")
$(".qcSelectCheck .arrow").attr("src", iconDown)
$(".qcCheckList").css("display", "none")
})
let radioCheck = 1;
$((function ($) {
$('.export').click(function () {
const behosDateStartTime = new Date(behosDateStart).getTime()
const behosDateEndTime = new Date(behosDateEnd).getTime()
if (behosDateStartTime > behosDateEndTime) {
$.alerModal({ "message": '开始时间不能大于结束时间~', type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
return
}
const param = {
deptId: deptId.trim(),
deptName: deptName == "全部" ? "" : deptName || '',
modeName: moduleName == "全部" ? "" : moduleName || '',
operationType: operationType,
state: state,
isPlacefile: isPlacefile,
size: 15,
name: name,
complaintDateEnd: behosDateEnd.replaceAll("/", "-"),
complaintDateStart: behosDateStart.replaceAll("/", "-"),
"desc": ['claimant_gmt_create']
}
expJson(api.getAppealReviewExport, param).then(res => {
downloadExportedData(res.data, "申诉审核.xls")
})
})
})($));