qcScore.js 42 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106
  1. require("../css/qcScore.less");
  2. const $ = require('jquery');
  3. require('jquery-templates');
  4. require('./modal.js');
  5. const { post, getUrlArgObject, setBoxHeight, getCookie, getLocal, initScroll } = require('./utils.js');
  6. const { api, ywCheckApi } = require('./api.js');
  7. let checkOk = require('./../images/checkOk.png')
  8. const loadingImg = require("./../images/loading.gif")
  9. const adLogo = require("../images/adlogo.png")
  10. if (localStorage.getItem('toLogin') === '1') {
  11. window.location.href = '../login.html';
  12. }
  13. /**
  14. *data_type:存储的是对缺陷总览页面的缺陷总览和控费缺陷两个子页面操作时,
  15. *停留在哪个页面,2表示为缺陷总览子页面,1表示控费缺陷子页面,
  16. *点击侧边菜单栏data_type会重置为2
  17. *
  18. */
  19. let data_type = 2
  20. $(function () {
  21. const hideLogo = getUrlArgObject("hideLg");
  22. if (hideLogo) {
  23. $(".sub-menu .logo img,.copy-right").remove();
  24. $(".menu-mini .logo").text("");
  25. }
  26. const otherLogo = getUrlArgObject("adLg");
  27. if (otherLogo) {
  28. $(".logo img").attr("src", adLogo);
  29. $(".menu-mini .logo").text("艾登");
  30. $(".copy-right").remove();
  31. }
  32. //本页全局变量
  33. let global_flawData = {}; //缺陷数据
  34. let global_flawDataPay = {}; //缺陷数据
  35. const global_id = getUrlArgObject("id");
  36. const global_hid = getUrlArgObject("hid");
  37. let global_check;
  38. let global_check_home, global_check_show, check_Operation_WithAppeal;
  39. let global_entryName, global_casesEntryId
  40. const global_code = getUrlArgObject("code");
  41. let global_activeTab = $(".sub-menu .page.active").attr("code"); //当前激活菜单项
  42. let global_modules = {}; //模板数据缓存
  43. let global_flaws = []; //缺陷条目列表缓存
  44. let global_selectedFlaw = {}; //新增时选中的条目信息
  45. let isPlacefile = getCookie('isPlacefile')
  46. getAllModules();
  47. let showCheckBtns = global_code === "YH-ZKHC-HCRWLB";
  48. window.document.title = (showCheckBtns ? "质控核查-" : "质控评分-") + getUrlArgObject("name");
  49. let hasAu5 = isPlacefile == 0 ? true : showCheckBtns && hasData('FUNC000011'); //新增缺陷权限
  50. if (hasAu5) {
  51. $(".add-flaw").click(function () {
  52. getQcCasesEntry();
  53. });
  54. }
  55. $("body").on("click", ".refreshBtn", function () {
  56. supplementData()
  57. });
  58. function showAppealDetailEvent() {
  59. //申诉状态点击事件
  60. $(".flaw-item").off("click").on("click", ".title .btn", function () {
  61. showModal("5", $(this).attr("data_id"), $(this).attr("data_type"), $(this).attr("data_casesEntryId"), $(this).attr("data_qcresultDetailId"));
  62. });
  63. }
  64. function initMenu(data) {
  65. const menu = [{ id: 0, name: "缺陷总览", parentId: -1, sonMode: [] }, ...(data || [])];
  66. //菜单数据填充
  67. $("#subMenuTmpl").tmpl(menu).appendTo("#subMenu");
  68. $("#miniMenuTmpl").tmpl(menu).appendTo(".menu-mini ul");
  69. //菜单收起展开
  70. $(document).on("click", ".sub-menu .list-1", function () {
  71. $(".sub-menu .list-1 .slide-up").removeClass('slide-up');
  72. $(this).toggleClass('slide-up');
  73. $(this).find("ul").slideToggle();
  74. // setTimeout(function(){
  75. // initScroll("subMenu","Y",2)
  76. // },300)
  77. });
  78. $(".sub-menu .list-1 li").on("click", function (e) {
  79. e.stopPropagation();
  80. });
  81. //收起菜单
  82. $(".slide-show").click(function () {
  83. $(".sub-menu,.copy-right").animate({ "width": "60px" }, function () {
  84. $(this).hide();
  85. $(".menu-mini").show();
  86. });
  87. $(".tab-container").animate({ "margin-left": "60px" });
  88. });
  89. //展开菜单
  90. $(".slide-hide").click(function () {
  91. $(".menu-mini").hide();
  92. $(".sub-menu,.copy-right").show().animate({ "width": "220px" }, function () {
  93. });
  94. $(".tab-container").animate({ "margin-left": "220px" });
  95. });
  96. //右侧内容切换
  97. $(".page").on("click", function () {
  98. data_type = 2
  99. $(".info-item .cont,.flaw-item,td").removeClass("active"); //清空缺陷定位背景
  100. const title = $(this).attr("code");
  101. if (title == '缺陷总览' || !global_check_show) { //质控核查页进来隐藏原核查按钮
  102. $(".check,.ywCheck").css('display', 'none')
  103. }/*else if(title == '病案首页'){
  104. if(showCheckBtns){
  105. $(".ywCheck").show();
  106. }else{
  107. $(".check").css('display','block').text(global_check_home==1?'重新核查':'病案首页核查')
  108. }
  109. }*/else {
  110. if (showCheckBtns) {
  111. $(".ywCheck").show();
  112. } else {
  113. $(".check").css('display', 'block').text(global_check == 1 ? '重新核查' : '病历核查')
  114. }
  115. }
  116. if (title === "缺陷总览" || title === "谈话告知书" || title === "知情同意书" || title === '医嘱信息' || title === '检验信息' || title === '检查信息' || title === '护理信息' || title === '其他信息') {
  117. if (title === "缺陷总览") {
  118. getRecordDetailUpdate()
  119. }
  120. $(".flaw-table .page-item").hide();
  121. $(".flaw-table,.flaw-table .page-item[code=" + title + "]").show();
  122. } else {
  123. $(".flaw-table").hide();
  124. }
  125. iframeShow(title)
  126. //选中样式
  127. $(".sub-menu .active,.menu-mini .active").removeClass('active');
  128. const mItems = $(".sub-menu .page[code=" + title + "],.menu-mini .page[code=" + title + "]");
  129. mItems.addClass("active");
  130. mItems.parents(".list-1").addClass("active");
  131. //显示对应内容
  132. const code = $(this).attr("code");
  133. global_activeTab = code;
  134. //initModuleData();
  135. $(".content-item,.flaw-item").hide();
  136. $(".content-item[code='" + code + "']").show();
  137. showFlawList();
  138. $("#contentInfo").scrollTop(0)
  139. });
  140. // initScroll("subMenu","Y",2)
  141. }
  142. function iframeShow(title) {
  143. if (title === '医嘱信息') {
  144. $("#pacsIframeIn,#assistIframeIn,#pacsDetailIframeIn,#contentNursing,#contentOther").css("display", "none")
  145. $("#contentIframeIn").css({ display: 'block' }).attr("src", 'advice.html').contents().find(".adviceWrp").height(window.innerHeight - $("#patientInfo").height() - 20 + 'px')
  146. $(window).resize(function () {
  147. $("#contentIframeIn").contents().find(".adviceWrp").height(window.innerHeight - $("#patientInfo").height() - 20 + 'px')
  148. });
  149. } else if (title === '检验信息') {
  150. $("#contentIframeIn,#assistIframeIn,#pacsDetailIframeIn,#contentNursing,#contentOther").css("display", "none")
  151. $("#pacsIframeIn").css({ display: 'block' }).attr("src", 'pacs.html').contents().find(".pacsWrp").height(window.innerHeight - $("#patientInfo").height() - 20 + 'px')
  152. $(window).resize(function () {
  153. $("#pacsIframeIn").contents().find(".pacsWrp").height(window.innerHeight - $("#patientInfo").height() - 20 + 'px')
  154. });
  155. } else if (title === '检查信息') {
  156. $("#contentIframeIn,#pacsIframeIn,#pacsDetailIframeIn,#contentNursing,#contentOther").css("display", "none")
  157. $("#assistIframeIn").css({ display: 'block' }).attr("src", 'assist.html').contents().find(".assistWrp").height(window.innerHeight - $("#patientInfo").height() - 20 + 'px')
  158. $(window).resize(function () {
  159. $("#assistIframeIn").contents().find(".assistWrp").height(window.innerHeight - $("#patientInfo").height() - 20 + 'px')
  160. });
  161. } else if (title === '护理信息') {
  162. $("#pacsIframeIn,#assistIframeIn,#pacsDetailIframeIn,#contentIframeIn,#contentOther").css("display", "none")
  163. $("#contentNursing").css({ display: 'block' }).attr("src", 'nursing.html').contents().find(".nursingWrp").height(window.innerHeight - $("#patientInfo").height() - 20 + 'px')
  164. $(window).resize(function () {
  165. $("#contentNursing").contents().find(".nursingWrp").height(window.innerHeight - $("#patientInfo").height() - 20 + 'px')
  166. });
  167. } else if (title === '其他信息') {
  168. $("#pacsIframeIn,#assistIframeIn,#pacsDetailIframeIn,#contentIframeIn,#contentNursing").css("display", "none")
  169. $("#contentOther").css({ display: 'block' }).attr("src", 'other.html').contents().find(".otherWrp").height(window.innerHeight - $("#patientInfo").height() - 20 + 'px')
  170. $(window).resize(function () {
  171. $("#contentOther").contents().find(".otherWrp").height(window.innerHeight - $("#patientInfo").height() - 20 + 'px')
  172. });
  173. } else {
  174. $("#contentIframeIn,#pacsIframeIn,#pacsDetailIframeIn,#assistIframeIn,#contentNursing,#contentOther").css({ display: 'none' })
  175. }
  176. }
  177. //判断有无某一权限
  178. function hasData(data) {
  179. return true
  180. let trdObj = JSON.parse(getLocal("trdObj"))
  181. let lis = trdObj[global_code]
  182. if (!lis) {
  183. return false
  184. }
  185. if (lis.indexOf(data) > -1) {//有权限
  186. return true
  187. }
  188. return false;
  189. }
  190. //获取病例明细
  191. function getRecordDetail(type) {
  192. post(api.getRecordDetail, { 'behospitalCode': global_id }).then(function (res) {
  193. if (res.data.code === '0') {
  194. const data = res.data.data;
  195. const { beHospital, result, msg, checkStatus, drgs, mrStatus, checkShow, checkOperationWithAppeal } = data;
  196. global_check = checkStatus
  197. global_check_home = mrStatus
  198. global_check_show = checkShow;//0隐藏操作按钮1显示
  199. check_Operation_WithAppeal = checkOperationWithAppeal;
  200. const info = Object.assign(beHospital, result);
  201. initMenu(JSON.parse(result.menuData));
  202. // $(".sub-menu>ul>li:first-child.page,.menu-mini>ul>li:first-child.page").addClass("active");
  203. $(".subMenu >li:first-child.page,.menu-mini>ul>li:first-child.page").addClass("active");
  204. global_activeTab = $(".sub-menu .page.active").attr("code");
  205. $(".operation").show()
  206. initPatientInfo(info);
  207. initContent(result.pageData, 2);
  208. initList(msg);
  209. initScoreItem(msg);
  210. global_flawData = msg;
  211. global_flawDataPay = drgs;
  212. setBoxHeight();
  213. changePay()
  214. } else {
  215. $.alerModal({ "message": '接口出错', type: "tip", time: '1000', isFather: true, win: 'default', fatherWrapper: $("#mainBox", parent.document) });
  216. }
  217. }).catch(() => {
  218. $.alerModal({ "message": '接口出错', type: "tip", time: '1000', isFather: true, win: 'default', fatherWrapper: $("#mainBox", parent.document) });
  219. });
  220. }
  221. function getRecordDetailUpdate() {
  222. post(api.getRecordDetail, { 'behospitalCode': global_id }).then(function (res) {
  223. if (res.data.code === '0') {
  224. const data = res.data.data;
  225. const { beHospital, result, msg, checkStatus, drgs } = data;
  226. // global_check = checkStatus
  227. // const info=Object.assign(beHospital,result);
  228. // initMenu(JSON.parse(result.menuData));
  229. // $(".subMenu >li:first-child.page,.menu-mini>ul>li:first-child.page").addClass("active");
  230. // global_activeTab=$(".sub-menu .page.active").attr("code");
  231. // initPatientInfo(info);
  232. // initContent(result.pageData);
  233. initList(msg);
  234. initScoreItem(msg);
  235. global_flawData = msg;
  236. global_flawDataPay = drgs;
  237. // setBoxHeight();
  238. // changePay()
  239. }
  240. });
  241. }
  242. //补录数据,接口来自技术服务部
  243. function supplementData() {
  244. //重新拉数据接口
  245. post(api.supplementData, { 'behospitalCode': global_id, 'behospitalNum': '' }).then(function (res) {
  246. const { code, data } = res.data;
  247. if (code === '0') {
  248. if (data === '0') { //0表示数据已更新,-1表示数据未更新
  249. //数据更新后先评分(评分成功后)再重新获取详情即刷新页面
  250. recordScore();
  251. } else {
  252. $.alerModal({ "message": '刷新失败,请重试~', type: "tip", time: '1000', isFather: true, win: 'default', fatherWrapper: $("#mainBox", parent.document) });
  253. }
  254. } else {
  255. $.alerModal({ "message": '刷新失败,请重试~', type: "tip", time: '1000', isFather: true, win: 'default', fatherWrapper: $("#mainBox", parent.document) });
  256. }
  257. });
  258. }
  259. function loading() {
  260. const str = `
  261. <div class="loadingBox">
  262. <div class="mask"></div>
  263. <img class="loadingImg" src=${loadingImg} alt="loading" />
  264. </div>
  265. `
  266. $("body", parent.document).append(str)
  267. }
  268. function hideLoading() {
  269. $(".loadingBox", parent.document).remove()
  270. }
  271. //评分
  272. function recordScore() {
  273. const param = {
  274. behospitalCode: global_id
  275. };
  276. loading();
  277. post(api.recordScore, param).then(res => {
  278. if (res.data.code === '0') {
  279. hideLoading();
  280. //评分成功,刷新病历详情页面
  281. window.parent.location.reload()
  282. } else {
  283. hideLoading()
  284. $.alerModal({ "message": res.data.msg || '刷新失败,请重试~', type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
  285. }
  286. }).catch(() => {
  287. hideLoading()
  288. $.alerModal({ "message": '刷新失败,请重试~', type: "tip", win: 'default', time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
  289. })
  290. }
  291. function changePay() {
  292. $(document).on('click', ".titleSpecial span", function () {
  293. let type = $(this).attr("data-type")
  294. // window.localStorage.setItem("data_type", type)
  295. data_type = Number(type)
  296. if (type == 1) {
  297. initList(global_flawDataPay, type);
  298. } else {
  299. initList(global_flawData, type);
  300. }
  301. })
  302. }
  303. //填充患者信息
  304. function initPatientInfo(data) {
  305. const obj = Object.assign({}, data, { showCheckBtns, checkState: global_check, checkStateHome: global_check_home });
  306. $("#infoTmpl").tmpl(obj).appendTo("#patientInfo");
  307. /*$(".check").on("click", function(){
  308. checkQc()
  309. })*/
  310. $(".ywCheck").on("click", function () {
  311. checkYwQc()
  312. })
  313. }
  314. //显示病例模块明细
  315. function initContent(data, type) {
  316. const obj = JSON.parse(data);
  317. let info = [];
  318. let hml = '', moduleId = '';
  319. if (type == 2) {
  320. formatSpecPage(obj["谈话告知书"], "谈话告知书");
  321. formatSpecPage(obj["知情同意书"], "知情同意书");
  322. }
  323. // formatSpecPage(obj["医嘱信息"],"医嘱信息");
  324. $(".content-box").show();
  325. for (let k in obj) {
  326. if (k === "谈话告知书" || k === "知情同意书") {
  327. continue;
  328. }
  329. for (let i in obj[k]) {
  330. info = formatInfoData(k, obj[k][i]);
  331. moduleId = info.mode_id;
  332. if (global_modules[moduleId]) {
  333. hml = initModuleData(moduleId, obj[k]);
  334. $.tmpl(hml, info).appendTo("#contentInfo");
  335. } else {
  336. const icon = require("../images/empty1.png");
  337. const sid = moduleId ? "(" + moduleId + ")" : "";
  338. const code = k.replace(/[^\u4e00-\u9fa5|a-zA-Z0-9]+/g, '');
  339. const emptyStr = `<div class="empty">
  340. <img src="${icon}" alt="空"/>
  341. <p>暂无信息~</p>
  342. </div>`;
  343. if (!$(".content-item[code=" + code + "] .empty").length) { //显示一条空提示即可
  344. hml = '<div class="content-item" code="' + code + '">' +
  345. '<h2 class="title">' + k + sid + '</h2>' + emptyStr + '</div>';
  346. $.tmpl(hml, {}).appendTo("#contentInfo");
  347. }
  348. }
  349. }
  350. }
  351. $(".content-item[code=" + global_activeTab + "]").show();
  352. //console.log(obj)
  353. }
  354. function formatInfoData(k, data) {
  355. let obj = {}, name = "";
  356. for (let i in data) {
  357. if (i !== "mode_id") {
  358. name = i.replace(/[^\u4e00-\u9fa5|a-zA-Z0-9]+/g, "").replace(/^[0-9]+/, "a"); //过滤key中存在的特殊符号,模板会渲染不出来且不报错
  359. obj[name] = data[i].replace(/\n/g, "<br/>") || "";
  360. } else {
  361. obj[i] = data[i].replace(/\n/g, "<br/>") || "";
  362. }
  363. }
  364. return Object.assign({ title: k }, obj);
  365. }
  366. //知情同意书、谈话告知书
  367. function formatSpecPage(data, title, type) {
  368. $(".page-item[code='缺陷总览']").remove()
  369. // $(".flaw-table").html("")
  370. let hasAu = isPlacefile == 0 ? true : showCheckBtns && global_check_show && hasData('FUNC000013'); //修改缺陷权限
  371. let hasAu2 = isPlacefile == 0 ? true : showCheckBtns && global_check_show && hasData('FUNC000012'); //删除缺陷权限
  372. // let hasAu4 = isPlacefile == 0 ? true : check_Operation_WithAppeal && showCheckBtns && global_check_show
  373. // let hasAu3 = check_Operation_WithAppeal
  374. // console.log("hasAu3:", check_Operation_WithAppeal)
  375. $("#appointBookTmpl").tmpl({ title, data, hasAu, hasAu2 }).appendTo(".flaw-table");
  376. // 防止页面数据更新时,页面不显示
  377. $(".page-item[code='缺陷总览']").css("display", "block")
  378. setBoxHeight();
  379. // console.log("data:", data)
  380. // 操作列: 修改,恢复和编辑
  381. $(".scroll-table .oper a").unbind("click").click(function () {
  382. // 获取当前操作的类型,当前分为:病案首页,入院记录和出院小结等
  383. let opType_old = $(this).parents("tr").attr("code");
  384. // 剔除掉opType_old的特殊符号
  385. let opType_new = opType_old.replace(/[^\u4e00-\u9fa5|a-zA-Z0-9]+/g, "")
  386. // 获取当前这条记录在同类型里的索引
  387. const i = $(`.scroll-table tr[code= '${opType_old}' ]`).index($(this).parents("tr"))
  388. // debugger
  389. //获取当前记录的ID
  390. const code = $(this).attr("code");
  391. // 查看是否点击的是编辑
  392. const isEdit = $(this).is(".edit-flaw");
  393. //if(!hasAu)return
  394. // 由于弹窗的数据填充的是由当前菜单决定的,需要修改global_activeTab为当前操作类型
  395. global_activeTab = opType_new
  396. if (isEdit && hasAu) {
  397. showModal('0', code, i); //编辑
  398. } else if (!isEdit && hasAu2) {
  399. if ($(this).is(".recover-flaw")) {
  400. showModal('3', code, i); //恢复
  401. //
  402. } else {
  403. showModal('1', code, i); //删除
  404. }
  405. }
  406. // 防止影响菜单,重新激活菜单项
  407. global_activeTab = $(".sub-menu .page.active").attr("code");
  408. })
  409. $(".page-anchor").on("click", function () {
  410. const code = $(this).attr("code");
  411. const pCode = $(this).parents("tr").attr("code").replace(/[^\u4e00-\u9fa5|a-zA-Z0-9]+/g, '');
  412. //菜单同步状态
  413. $(".sub-menu .page[code=" + pCode + "]").parents(".list-1").click();
  414. $(".sub-menu .page[code=" + pCode + "],.menu-mini .page[code=" + pCode + "").click();
  415. //缺陷定位
  416. $(".info-item .cont,.flaw-item,td").removeClass("active");
  417. const flawItem = $(".flaw-item .title a[code=" + code + "]");
  418. if (!flawItem.length) {
  419. $.alerModal({ "message": '模块数据缺失~', type: "tip", time: '1000', isFather: true, fatherWrapper: $(".flaw-table", parent.document) });
  420. return;
  421. }
  422. $(".flaw-item .title a[code=" + code + "]").click();
  423. const anch = $(".flaw-item .title a[code=" + code + "]").attr("href");
  424. if ($(anch)[0]) {
  425. $('#contentInfo').scrollTop($(anch).offset().top - 60);
  426. }
  427. });
  428. if (global_activeTab == "缺陷总览") {
  429. $(".check").css("display", "none")
  430. } else {
  431. $(".check").css("display", "block")
  432. }
  433. if (type && type == 1) {
  434. $(".titleNo").css({
  435. 'background-color': '#00A1FF',
  436. 'color': '#fff',
  437. 'border-color': '#00A1FF'
  438. })
  439. $(".titlePay").css({
  440. 'background-color': '#fff',
  441. 'border': '1px solid #777',
  442. 'border-right': 0,
  443. 'color': '#777'
  444. })
  445. setBoxHeight()
  446. } else if (type && type == 2) {
  447. $(".titleNo").css({
  448. 'background-color': '#fff',
  449. 'border': '1px solid #777',
  450. 'border-left': 0,
  451. 'color': '#777'
  452. })
  453. $(".titlePay").css({
  454. 'background-color': '#00A1FF',
  455. 'color': '#fff',
  456. 'border-color': '#00A1FF'
  457. })
  458. setBoxHeight()
  459. }
  460. }
  461. function initList(data, type) {
  462. //$("#flawTotalList").tmpl({title:"缺陷总览",data:data}).appendTo(".flaw-table");
  463. formatSpecPage(data, "缺陷总览", type);
  464. $(".flaw-table").show();
  465. $(".flaw-table .page-item[code=" + global_activeTab + "]").show();
  466. $(".slide-up").off("click").on("click", function () {
  467. const name = $(this).text();
  468. $("tr[code='" + name + "']").slideToggle();
  469. $(this).toggleClass("down");
  470. });
  471. }
  472. //评分项数据填充
  473. function initScoreItem(data) {
  474. $("#flaws .flaw-box").html("");
  475. // console.log(showCheckBtns, 11122);
  476. let hasAu = isPlacefile == 0 ? true : showCheckBtns && global_check_show && hasData('FUNC000013'); //修改缺陷权限
  477. let hasAu2 = isPlacefile == 0 ? true : showCheckBtns && global_check_show && hasData('FUNC000012'); //删除缺陷权限
  478. let hasAu4 = isPlacefile == 0 ? true : check_Operation_WithAppeal && showCheckBtns && global_check_show
  479. let hasAu3 = check_Operation_WithAppeal
  480. for (let k in data) {
  481. for (let i = 0; i < data[k].length; i++) {
  482. let item = data[k][i];
  483. item.hasAu3 = hasAu3
  484. }
  485. $("#flawTmpl").tmpl(data[k]).appendTo("#flaws .flaw-box");
  486. }
  487. showFlawList();
  488. $(".flaw-item .oper a").unbind("click").click(function () {
  489. const i = $(".flaw-item[code=" + global_activeTab + "]").index($(this).parents(".flaw-item"));
  490. const code = $(this).attr("code");
  491. const isEdit = $(this).is(".edit-flaw");
  492. // console.log("global_activeTab:", global_activeTab)
  493. //if(!hasAu)return
  494. if (isEdit && hasAu) {
  495. showModal('0', code, i); //编辑
  496. } else if (!isEdit && hasAu2) {
  497. if ($(this).is(".recover-flaw")) {
  498. showModal('3', code, i); //恢复
  499. } else {
  500. showModal('1', code, i); //删除
  501. }
  502. }
  503. })
  504. $(".edit-flaw").css({ "display": hasAu ? "inline" : "none" });
  505. $(".del-flaw").css({ "display": hasAu2 ? "inline" : "none" });
  506. $(".add-flaw").css({ "display": hasAu4 ? "inline" : "none" });
  507. $(".recover-flaw").css({ "display": hasAu2 ? "inline" : "none" });
  508. $(".flaw-item .title a[href]").unbind("click").click(function () {
  509. const id = $(this).attr("href");
  510. const anchors = $(this).attr("anchors").split(",");
  511. let ans = anchors.map((it) => {
  512. return "#anchor" + it;
  513. });
  514. $(".info-item .cont,.flaw-item,td").removeClass("active");
  515. $(ans.join(",")).addClass("active");
  516. $(this).parents(".flaw-item").addClass("active");
  517. });
  518. }
  519. //显示缺陷列表
  520. function showFlawList() {
  521. const hml = $(".flaw-item[code=" + global_activeTab + "]");
  522. if (hml.length) {
  523. hml.show();
  524. $("#flaws .empty").hide();
  525. } else {
  526. $("#flaws .empty").length ? $("#flaws .empty").show() : $("#emptyTmpl").tmpl().appendTo("#flaws .flaw-box");
  527. }
  528. showAppealDetailEvent();
  529. }
  530. //删除评分项
  531. function delScore(id, info, isRecover) {
  532. const text = isRecover ? "恢复" : "删除";
  533. const param = {
  534. 'behospitalCode': global_id,
  535. 'optResultAlgVO': {
  536. 'id': id
  537. },
  538. 'delStatus': isRecover ? 1 : 0
  539. };
  540. post(api.delScore, param).then(function (res) {
  541. if (res.data.code === '0') {
  542. $("#delModal").hide();
  543. updateFlaws(res.data.data);
  544. $("#anchor" + info.pageKeyList[0]).removeClass("active");
  545. $.alerModal({ "message": text + "成功", type: "tip", time: '1000', win: true });
  546. } else {
  547. $.alerModal({ "message": res.data.msg || (text + '失败,请重试~'), type: "tip", time: '1000', win: 'default' });
  548. }
  549. }).catch(() => {
  550. $.alerModal({ "message": text + '失败,请重试~', type: "tip", time: '1000', win: 'default' });
  551. });
  552. }
  553. //修改评分项
  554. function editScore(info) {
  555. info.reviewer = info.exampleDate > info.gmtModified ? info.reviewer : info.linkman
  556. info.exampleDate = info.exampleDate > info.gmtModified ? info.exampleDate : info.gmtModified
  557. const param = {
  558. "behospitalCode": global_id,
  559. "optResultAlgVO": info
  560. };
  561. post(api.editScore, param).then(function (res) {
  562. if (res.data.code === '0') {
  563. $("#delModal").hide();
  564. updateFlaws(res.data.data);
  565. $.alerModal({ "message": "修改成功", type: "tip", time: '1000', win: true });
  566. } else {
  567. $.alerModal({ "message": '修改失败,请重试~', type: "tip", time: '1000', isFather: true, win: 'default', fatherWrapper: $("#mainBox", parent.document) });
  568. }
  569. }).catch(() => {
  570. $.alerModal({ "message": '修改失败,请重试~', type: "tip", time: '1000', isFather: true, win: 'default', fatherWrapper: $("#mainBox", parent.document) });
  571. });
  572. }
  573. //添加评分项
  574. function addScore(info) {
  575. const optResultAlgVO = {
  576. "casesEntryId": info.casesEntryId,
  577. "casesId": info.casesId,
  578. "casesScore": info.caseScore,
  579. "code": info.code || "",
  580. "id": info.id || "",
  581. "info": info.info || "",
  582. "isReject": info.isReject,
  583. "msg": info.msg || "",
  584. "score": info.score,
  585. "explainInfo": info.explainInfo,
  586. }
  587. const param = {
  588. "behospitalCode": global_id,
  589. "optResultAlgVO": optResultAlgVO
  590. };
  591. post(api.addScore, param).then(function (res) {
  592. if (res.data.code === '0') {
  593. $("#delModal").hide();
  594. updateFlaws(res.data.data);
  595. $.alerModal({ "message": "添加成功", type: "tip", win: true, time: '1000' });
  596. } else {
  597. $.alerModal({ "message": "添加失败,请重试~", type: "tip", win: 'default', time: '1000' });
  598. }
  599. }).catch(() => {
  600. $.alerModal({ "message": "添加失败,请重试~", type: "tip", win: 'default', time: '1000' });
  601. });
  602. }
  603. //显示删除/修改弹窗
  604. function showModal(flag, code, i, id, qcresultDetailId) {
  605. // console.log(flag);
  606. $("#delModal .modal-body").html("");
  607. $("#delModal").show();
  608. $("#delModal .cancel").text("关闭")
  609. $("#delModal .cancel").hide();
  610. $(".info-item .cont,.flaw-item .title,td").removeClass("active");
  611. //事件解绑
  612. $("#delModal .confirm").off("click");
  613. let flawsList
  614. if (data_type === 2) {
  615. flawsList = formatFlawKeys(global_flawData)
  616. } else {
  617. flawsList = formatFlawKeys(global_flawDataPay)
  618. }
  619. // console.log("flawsList:", flawsList)
  620. const info = flawsList[global_activeTab] && flawsList[global_activeTab][i];
  621. if (flag === '0') { //修改
  622. $("#delModal .confirm").show()
  623. $("#delModal .title").text("修改");
  624. $("#delModal .confirm").text("保存");
  625. $("#editTmpl").tmpl(info).appendTo("#delModal .modal-body");
  626. $("#qcScore,#qcMsg,#qcInfo").off("input");
  627. //分数输入验证
  628. $("#qcScore").on("input", function () {
  629. const val = $(this).val();
  630. if (/^[0-9]\d*$|^[0-9]\d*(.\d)?$/.test(val) && val <= 100) {
  631. $(".edit-box .warning").hide();
  632. } else {
  633. $(".edit-box .warning .red").text("支持≥0且≤100的数字输入,最多保留小数点后1位~");
  634. $(".edit-box .warning").show();
  635. }
  636. });
  637. //提示信息输入验证
  638. $("#qcMsg").on("input", function () {
  639. const val = $(this).val();
  640. $(this).attr("title", val)
  641. if (val.trim()) {
  642. $(".edit-box .warning").hide();
  643. } else {
  644. $(".edit-box .warning .red").text("提示信息不能为空~");
  645. $(".edit-box .warning").show();
  646. }
  647. });
  648. //提示信息输入验证
  649. $("#qcInfo").on("input", function () {
  650. const val = $(this).val();
  651. $(this).attr("title", val)
  652. if (val.length > 125) {
  653. $(".edit-box .warning .red").text("备注不能超过125个字~");
  654. $(".edit-box .warning").show();
  655. } else {
  656. $(".edit-box .warning").hide();
  657. return;
  658. }
  659. });
  660. if ($("#qcInfo").val().length > 125) {
  661. $(".edit-box .warning .red").text("备注不能超过125个字~");
  662. $(".edit-box .warning").show();
  663. return;
  664. }
  665. $("#delModal .confirm").unbind("click").click(function () {
  666. if ($(".edit-box .warning").is(":visible")) {
  667. return;
  668. }
  669. const obj = Object.assign({}, info, { explainInfo: $("#delModal #qcInfo").val(), msg: $("#delModal #qcMsg").val(), score: $("#delModal #qcScore").val() });
  670. editScore(obj);
  671. });
  672. } else if (flag === '5') { //查看
  673. $("#delModal .title").text("查看");
  674. $("#delModal .confirm").hide();
  675. $("#delModal .cancel").show();
  676. $("#delModal .modal-box").css("margin-top", '-245px');
  677. //0申诉1驳回2审核
  678. //新增项模板
  679. getAppealDetail(code, i, id, qcresultDetailId);
  680. } else if (flag === '2') { //新增
  681. $("#delModal .confirm").show();
  682. $("#delModal .title").text("新增");
  683. $("#delModal .confirm").text("保存");
  684. $("#addFlawTmpl").tmpl().appendTo("#delModal .modal-body");
  685. $("#flawDropTmpl").tmpl({ info: code }).appendTo("#delModal .modal-body ul");
  686. $("#addQcScore,#addQcMsg,#addQcInfo").off("input");
  687. //分数输入验证
  688. $("#addQcScore").on("input", function () {
  689. const val = $(this).val();
  690. if (/^[0-9]\d*$|^[0-9]\d*(.\d)?$/.test(val) && val <= 100) {
  691. $(".add-box .warning").hide();
  692. } else {
  693. $(".add-box .warning .red").text("支持≥0且≤100的数字输入,最多保留小数点后1位~");
  694. $(".add-box .warning").show();
  695. return;
  696. }
  697. });
  698. //提示信息输入验证
  699. $("#addQcMsg").on("input", function () {
  700. const val = $(this).val();
  701. $(this).attr("title", val)
  702. if (val.trim()) {
  703. $(".add-box .warning").hide();
  704. } else {
  705. $(".add-box .warning .red").text("提示信息不能为空~");
  706. $(".add-box .warning").show();
  707. return;
  708. }
  709. });
  710. //提示信息输入验证
  711. $("#addQcInfo").on("input", function () {
  712. const val = $(this).val();
  713. $(this).attr("title", val)
  714. if (val.length > 125) {
  715. $(".add-box .warning .red").text("备注不能超过125个字~");
  716. $(".add-box .warning").show();
  717. } else {
  718. $(".add-box .warning").hide();
  719. return;
  720. }
  721. });
  722. $("#delModal .confirm").unbind("click").click(function () {
  723. if (!$(".flaw-drop-input").attr("code")) {
  724. $(".add-box .warning .red").text("请选择质控条目~");
  725. $(".add-box .warning").show();
  726. return;
  727. }
  728. const msg = $("#delModal #addQcMsg").val();
  729. const score = Number($("#delModal #addQcScore").val());
  730. const explainInfo = $("#delModal #addQcInfo").val();
  731. if ($(".add-box .warning").is(":visible")) {
  732. return;
  733. }
  734. if (!msg.trim()) {
  735. $(".add-box .warning .red").text("提示信息不能为空~");
  736. $(".add-box .warning").show();
  737. return;
  738. }
  739. if ((!score) && $("#delModal #addQcScore").val() != '0') {
  740. $(".add-box .warning .red").text("分值不能为空~");
  741. $(".add-box .warning").show();
  742. return;
  743. }
  744. if ($("#addQcInfo").val().length > 125) {
  745. $(".add-box .warning .red").text("备注不能超过125个字~");
  746. $(".add-box .warning").show();
  747. return;
  748. }
  749. const obj = Object.assign({}, global_selectedFlaw, { msg, score, explainInfo });
  750. addScore(obj);
  751. });
  752. } else if (flag === '3') {
  753. $("#delModal .confirm").show();
  754. $("#delModal .title").text("恢复提示");
  755. $("#delModal .modal-body").html('<p>确定要恢复该评分记录吗?</p>');
  756. $("#delModal .confirm").text("取消").unbind("click").click(function () {
  757. $("#delModal").hide();
  758. });
  759. $("#delModal .cancel").show().text("恢复").unbind("click").click(function () {
  760. delScore(code, info, true);
  761. });
  762. } else {
  763. $("#delModal .confirm").show();
  764. $("#delModal .title").text("删除提示");
  765. $("#delModal .modal-body").html('<p>确定要删除该评分记录吗?</p>');
  766. $("#delModal .confirm").text("取消").unbind("click").click(function () {
  767. $("#delModal").hide();
  768. });
  769. $("#delModal .cancel").show().text("删除").unbind("click").click(function () {
  770. // console.log(123);
  771. delScore(code, info);
  772. });
  773. }
  774. }
  775. function getAppealDetail(id, flg, casesEntryId, qcresultDetailId) {
  776. const param = {
  777. behospitalCode: global_id,
  778. casesEntryId: casesEntryId,
  779. hospitalId: global_hid,
  780. qcresultDetailId: qcresultDetailId,
  781. id: +id
  782. };
  783. post(api.getApprovedView, param).then((res) => {
  784. const info = res.data.data || {};
  785. const appealInfo = info.appealExamineRecordDTOList;
  786. $("#appealStatusTmpl").tmpl(appealInfo).appendTo("#delModal .modal-body");
  787. $("#delModal .cancel").text("关闭").unbind("click").click(function () {
  788. $("#delModal").hide();
  789. });
  790. /*if (flg === '1') {
  791. $(".check-item").hide();
  792. $(".reject-item").show();
  793. } else if (flg === '2') {
  794. $(".check-item").show();
  795. }*/
  796. })
  797. }
  798. //缺陷列表key值去掉特殊符号
  799. function formatFlawKeys(data) {
  800. const obj = {};
  801. for (let k in data) {
  802. obj[k.replace(/[^\u4e00-\u9fa5|a-zA-Z0-9]+/g, '')] = data[k];
  803. }
  804. return obj;
  805. }
  806. //获取缺陷条目下拉列表
  807. function getQcCasesEntry(name) {
  808. const id = $("#subMenu [code=" + global_activeTab + "]").attr("mode");
  809. const param = {
  810. 'behospitalCode': global_id,
  811. 'entryName': name || "",
  812. 'modeId': id
  813. };
  814. post(api.findQcCasesEntry, param).then(function (res) {
  815. if (res.data.code === '0') {
  816. const data = res.data.data;
  817. if (name) {
  818. global_flaws = data;
  819. $("#delModal .modal-body ul").html("");
  820. $("#flawDropTmpl").tmpl({ info: data }).appendTo("#delModal .modal-body ul");
  821. } else {
  822. global_flaws = data;
  823. if ($("#delModal").css("display") == "block") {
  824. $("#flawDropTmpl").tmpl({ info: data }).appendTo("#delModal .modal-body ul");
  825. return
  826. }
  827. showModal('2', data);
  828. }
  829. }
  830. });
  831. }
  832. //增加条目弹窗元素事件
  833. $("body").on("click", ".add-box .flaw-drop-input", function () {
  834. $(".add-box .drop-box").addClass("show");
  835. });
  836. $("body").on("blur", ".add-box .flaw-drop-input", function () {
  837. setTimeout(function () {
  838. $(".add-box .drop-box").removeClass("show");
  839. }, 300)
  840. });
  841. $("body").on("input", ".add-box .flaw-drop-input", function () {
  842. $(this).attr({ "code": "", "title": $(this).val().trim() });
  843. getQcCasesEntry($(this).val().trim());
  844. });
  845. $("body").on("click", ".add-box .drop-box li", function () {
  846. const n = $(this).attr("idx");
  847. const flaw = global_flaws[n];
  848. const { score, msg, entryName, casesEntryId } = flaw;
  849. global_selectedFlaw = flaw;
  850. global_entryName = entryName
  851. global_casesEntryId = casesEntryId
  852. $(".flaw-drop-input").val(entryName).attr({ "code": casesEntryId, "title": entryName });
  853. $("#addQcMsg").val(msg).attr("title", msg);
  854. $("#addQcScore").val(score);
  855. $(".add-box .warning").hide();
  856. $(".add-box .drop-box").removeClass("show");
  857. // console.log(123);
  858. });
  859. $(document).on("blur", ".flaw-drop-input", (e) => {
  860. $('.flaw-drop-input').val(global_entryName).attr({ "code": global_casesEntryId, "title": global_entryName });
  861. });
  862. //更新缺陷列表
  863. function updateFlaws(info) {
  864. $("#patientInfo .level").text("质控等级:" + info.level);
  865. $("#patientInfo .score").text("质控得分:" + info.scoreRes);
  866. const param = {
  867. 'behospitalCode': global_id,
  868. 'paramStr': [
  869. "msg"
  870. ]
  871. };
  872. post(api.getRecordDetail, param).then(function (res) {
  873. if (res.data.code === '0') {
  874. const data = res.data.data;
  875. const { msg, drgs } = data;
  876. initScoreItem(msg);
  877. global_flawData = msg;
  878. global_flawDataPay = drgs
  879. // console.log("data:", data)
  880. // 单独刷新缺陷总览页面的数据
  881. if (data_type === 1) {
  882. // 控费缺陷
  883. formatSpecPage(drgs, "缺陷总览", 1);
  884. } else {
  885. // 缺陷总览
  886. formatSpecPage(msg, "缺陷总览", 2);
  887. }
  888. }
  889. });
  890. }
  891. //获取病例模板
  892. function getInfoModule(moduleId) {
  893. const param = {
  894. moduleId: moduleId
  895. };
  896. post(api.getInfoModule, param).then(function (res) {
  897. if (res.data.code === '0') {
  898. const data = res.data.data;
  899. cachemoduleDatas(data);
  900. getRecordDetail();
  901. }
  902. });
  903. }
  904. //模板数据缓存
  905. function cachemoduleDatas(data) {
  906. const moudle = data.moduleDetail;
  907. global_modules[data.modeName] = [];
  908. for (let i in moudle) {
  909. global_modules[data.modeName].push(moudle[i]);
  910. }
  911. }
  912. //初始化模板
  913. function initModuleData(mid, obj) {
  914. const n = obj.length;
  915. const module = global_modules[mid].moduleDetail;
  916. const key = global_modules[mid].modeName.replace(/[^\u4e00-\u9fa5|a-zA-Z0-9]+/g, '');
  917. let hml = '<div class="content-item" code="' + key + '">' +
  918. '<h2 class="title">' + global_modules[mid].modeName + '(' + mid + ')</h2>' +
  919. (n > 1 ? '<div class="container">' : '<div class="container content-hts">');
  920. for (let i in module) {
  921. hml = hml + '<div class="info-item">';
  922. for (let j = 0; j < module[i].length; j++) {
  923. const detal = module[i][j].questionDTO;
  924. const { tagType } = detal;
  925. switch (tagType) {
  926. case 1:
  927. hml = hml + simpleStructure(detal, obj);
  928. break;
  929. case 4:
  930. hml = hml + combineStructure(detal);
  931. break;
  932. default:
  933. break;
  934. }
  935. }
  936. hml = hml + "</div>"
  937. }
  938. return hml + "</div></div>";
  939. }
  940. //基础类型结构生成
  941. function simpleStructure(data, obj) {
  942. const { name, val, monoLine, addLine, position, bold, retract, id } = data;
  943. if (name === "手术记录表格-1") {
  944. const value = val.replace("【", "").replace("】", "");
  945. const diag = obj[0][value] ? JSON.parse(obj[0][value]) : "";
  946. let thml = `<div class="cont" style="width: 100%;" id="anchor${id}">`;
  947. thml += $("#tableTmpl").tmpl({ k: "手术信息", data: diag })[0].outerHTML + "</div>";
  948. return thml;
  949. }
  950. if (name === "出院诊断表格-1") {
  951. const value = val.replace("【", "").replace("】", "");
  952. const diag = obj[0][value] ? JSON.parse(obj[0][value]) : "";
  953. let thml = `<div class="cont" style="width: 100%;" id="anchor${id}">`;
  954. thml += $("#tableTmpl").tmpl({ k: "出院诊断", data: diag })[0].outerHTML + "</div>";
  955. return thml;
  956. }
  957. const posClass = position === 1 ? 'text-left' : '';
  958. const boldClass = bold === 1 ? 'text-bold' : '';
  959. const retractClass = retract === 1 ? 'text-indent' : '';
  960. const lineHml = ('<p class="' + posClass + ' ' + boldClass + ' ' + retractClass + '">' + extractVars(val) + '</p>');
  961. const txtHml = ('<p style="display: inline;vertical-align: middle;" class="' + posClass + ' ' + boldClass + ' ' + retractClass + '">' + extractVars(val) + '</p>');
  962. let hml = addLine || monoLine ? `<div class="cont ${posClass}" style="width: 100%;" id="anchor${id}">` : `<div class="cont" id="anchor${id}">`;
  963. hml = hml + `<span class="label">${name}</span>` + (addLine ? lineHml : txtHml) + `</div>`;
  964. return hml;
  965. }
  966. //组合类型结构生成
  967. function combineStructure(data) {
  968. const { name, questionMapping, id } = data;
  969. let hml = '<div class="inner-table"><table>';
  970. const colNum = Math.ceil(questionMapping.length / 2);
  971. let tdVal = '';
  972. const regexp = /(【(.+?)】)/g;
  973. for (let i = 0; i < questionMapping.length;) {
  974. if (questionMapping[i + 1]) {
  975. tdVal = "<td id='anchor" + questionMapping[i].id + "'>" + questionMapping[i].name + extractVars(questionMapping[i].val) + "</td><td id='anchor" + questionMapping[i + 1].id + "'>" + questionMapping[i + 1].name + extractVars(questionMapping[i + 1].val) + "</td>";
  976. } else {
  977. tdVal = "<td id='anchor" + questionMapping[i].id + "'>" + questionMapping[i].name + extractVars(questionMapping[i].val) + "</td><td></td>";
  978. }
  979. if (i == 0) {
  980. hml = hml + `<tr><td rowspan="${colNum}" id='anchor${id}'>${name}</td>${tdVal}`;
  981. } else {
  982. hml = hml + `<tr>${tdVal}`;
  983. }
  984. hml = hml + "</tr>";
  985. i = ((i + 2) > questionMapping.length ? i + 1 : i + 2)
  986. }
  987. hml = hml + "</table></div>";
  988. return hml;
  989. }
  990. //抽取变量
  991. function extractVars(org) {
  992. const regexp = /(【(.+?)】)/g;
  993. const arr = org.split(regexp);
  994. //console.log(arr)
  995. let htl = '', val = '';
  996. for (let i = 0; i < arr.length; i++) {
  997. val = arr[i].indexOf("【") != -1 ? '' : (arr[i - 1] && arr[i - 1].indexOf("【") != -1 ? "{{html " + arr[i] + "}}" : arr[i]);
  998. htl = htl + val;
  999. }
  1000. return htl;
  1001. }
  1002. //获取所有模板
  1003. function getAllModules() {
  1004. const param = {
  1005. hospitalId: getUrlArgObject("hid"),
  1006. modeId: ''
  1007. };
  1008. post(api.getModuleById, param).then((res) => {
  1009. if (res.data.code === '0') {
  1010. const data = res.data.data;
  1011. global_modules = data;
  1012. getRecordDetail();
  1013. $("#loading").hide();
  1014. /*setTimeout(function(){
  1015. $(".operation").show()
  1016. },50)*/
  1017. }
  1018. });
  1019. }
  1020. /*function checkQc(){
  1021. const param={
  1022. behospitalCode:getUrlArgObject("id"),
  1023. hospitalId:getUrlArgObject("hid"),
  1024. checkType: global_activeTab == '病案首页'?'1':'0'
  1025. };
  1026. post(api.checkQc,param).then((res)=>{
  1027. if(res.data.code==='0') {
  1028. if(global_activeTab == '病案首页'){
  1029. global_check_home = 1
  1030. }else{
  1031. global_check = 1
  1032. }
  1033. $(".check").text("重新核查")
  1034. $.alerModal({"message":"核查成功",type:"tip",time:'1000',win:true});
  1035. }else{
  1036. $.alerModal({"message":res.data.msg ||"核查失败",type:"tip",time:'1000',isFather: false});
  1037. }
  1038. });
  1039. }*/
  1040. function checkYwQc() {
  1041. const param = {
  1042. behospitalCode: getUrlArgObject("id"),
  1043. hospitalId: getUrlArgObject("hid"),
  1044. };
  1045. post(ywCheckApi.recordCheck, param).then((res) => {
  1046. if (res.data.code === '0') {
  1047. global_check = 1
  1048. $(".ywCheck").text("重新核查")
  1049. $.alerModal({ "message": "核查成功", type: "tip", time: '1000', win: true });
  1050. } else {
  1051. $.alerModal({ "message": res.data.msg || "核查失败", type: "tip", time: '1000', isFather: false });
  1052. }
  1053. });
  1054. }
  1055. });