12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798 |
- //@ sourceURL=toll_administration.js
- var LODOP; //声明为全局变量
- //默认打印机下标
- var printIndex = -1;
- //选中的要退的费用收费编码
- var chargeItemCodes = null;
- //门诊结算单地址
- var mzjsdHost = null;
- $(function () {
- //默认光标在卡号输入框
- $("#cardNo").focus();
- init_daterangepicker();
- initSelect();
- initFeeTable();
- //卡号输入改变事件
- cardNoChange();
- //重置查询参数
- $('#btn_clean').click(function () {
- cleanParams();
- });
- //初始化页面上面的按钮事件
- //查询
- $('#btn_query').click(function () {
- initFeeTable();
- });
- /**
- * 增加收款方式按钮事件
- */
- $("#addPayType").on("click", function () {
- addPayType(null);
- });
- //初始门诊收银方式下拉选
- initChequeType("payType");
- //初始门诊收银方式下拉选
- initChequeType("payTypeEditPayMode");
- setTimeout(function () {
- getLodop();
- }, 800);
- /**
- * 核酸检测跳转过来的直接刷新待收费列表
- */
- if (patientIdFullForNucleicAcid != null && patientIdFullForNucleicAcid != "") {
- $("#cardNo").val(patientIdFullForNucleicAcid);
- $("#patientId").val(patientIdFullForNucleicAcid);
- initFeeTable();
- }
- /**
- * 医保电子凭证读卡
- */
- $("#siReadCard").on("click", function (t) {
- siReadCard();
- });
- //获取门诊医保结算单打印服务地址
- $.ajax({
- type: "GET",
- url: '/thmz/getMzjsdHost',
- dataType: "json",
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- success: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- mzjsdHost = res.data;
- }
- });
- });
- /**
- * 列表类型按钮切换事件
- * @param object
- */
- function payMarkButtonChange(object) {
- $("#pay_mark_group").find("button").each(function (index, element) {
- if ($(element).hasClass("btn-primary")) {
- $(element).removeClass("btn-primary").addClass("btn-default");
- }
- });
- $(object).removeClass("btn-default").addClass("btn-primary");
- initFeeTable();
- }
- /**
- * 收费明细类型按钮切换事件
- * @param object
- */
- function billItemButtonChange(object) {
- $("#bill_item_group").find("button").each(function (index, element) {
- if ($(element).hasClass("btn-primary")) {
- $(element).removeClass("btn-primary").addClass("btn-default");
- }
- });
- $(object).removeClass("btn-default").addClass("btn-primary");
- initChargeDetailTable();
- //默认光标在卡号输入框
- $("#cardNo").focus();
- }
- /**
- * 收费明细类型按钮切换事件
- * @param object
- */
- function refundBillItemButtonChange(object) {
- $("#refund_bill_item_group").find("button").each(function (index, element) {
- if ($(element).hasClass("btn-primary")) {
- $(element).removeClass("btn-primary").addClass("btn-default");
- }
- });
- $(object).removeClass("btn-default").addClass("btn-primary");
- initMzChargeDetailByBillItem(false);
- }
- /**
- * 初始化下拉选
- */
- function initSelect() {
- $(".selectpicker").selectpicker({
- dropuAuto: false
- });
- initDeptSelect();
- initDoctorSelect();
- initCooperativeEnterprisesSelect();
- initMztczfSiReadCardTypeSelect();
- }
- /**
- * 初始化读卡类型
- */
- function initMztczfSiReadCardTypeSelect() {
- $('#mztczfSiReadCardType').html("<option value='03'>社保卡</option><option value='01'>电子凭证</option><option value='02'>身份证</option>");
- $('#mztczfSiReadCardType').selectpicker('refresh');
- var selectHtml = '<option value="0">否</option><option value="1">是</option>';
- $('#grzhzf').html(selectHtml);
- $('#grzhzf').selectpicker('refresh');
- }
- /**
- * 挂号列表中的科室列表
- */
- function initDeptSelect() {
- //科室列表
- $.ajax({
- type: "GET",
- url: '/thmz/allMzUnitCode',
- dataType: "json",
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- success: function (data) {
- if (data == '401' || data == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- var html = '';
- $.each(data.data, function (commentIndex, comment) {
- html += '<option value="' + comment.code + '">' + comment.name + '(' + comment.pyCode + ')</option>';
- });
- $('#deptNoParam').empty();
- $('#deptNoParam').html(html);
- $('#deptNoParam').selectpicker('refresh');
- }
- });
- }
- /**
- * 挂号列表中的医生列表初始化
- */
- function initDoctorSelect() {
- //医生列表
- $.ajax({
- type: "GET",
- url: '/thmz/listEmployeeByDepts?depts=' + $('#deptNoParam').val(),
- dataType: "json",
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- success: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- var html = '';
- $.each(res.data, function (commentIndex, comment) {
- html += '<option value="' + comment.employeeCode + '">' + comment.employeeName + '</option>';
- });
- $('#doctorParam').empty();
- $('#doctorParam').html(html);
- $('#doctorParam').selectpicker('destroy').selectpicker('refresh');
- }
- });
- }
- /**
- * 合作企业列表
- */
- function initCooperativeEnterprisesSelect() {
- $.ajax({
- type: "GET",
- url: '/thmz/getAllCooperativeEnterprises',
- dataType: "json",
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- success: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- var html = '';
- $.each(res.data, function (commentIndex, comment) {
- html += '<option value="' + comment.id + '">' + comment.projectName + " " + comment.contractNo + '</option>';
- });
- $('#project').empty();
- $('#project').html(html);
- $('#project').selectpicker('destroy').selectpicker('refresh');
- $('#projectCharged').empty();
- $('#projectCharged').html(html);
- $('#projectCharged').selectpicker('destroy').selectpicker('refresh');
- }
- });
- }
- var $table_1;
- /**
- * 初始化收费表格
- */
- function initFeeTable() {
- var payMarkGroup = getIndex("pay_mark_group");
- var timeColumusName = "处方时间";
- var timeColumus = "priceTime";
- $("#refundFeeTip").removeClass("in").addClass("hide");
- $("#chargeFeeTip").removeClass("hide").addClass("in");
- if (payMarkGroup == 1) {
- timeColumusName = "缴费时间";
- timeColumus = "chargeDate";
- $("#refundFeeTip").removeClass("hide").addClass("in");
- $("#chargeFeeTip").removeClass("in").addClass("hide");
- } else if (payMarkGroup == 2) {
- timeColumusName = "退费时间";
- timeColumus = "inputDate";
- }
- var patientId = $("#patientId").val();
- //查询记账信息
- if (payMarkGroup == 0 && patientId != null && patientId != '') {
- $("#patientIdHaveTally").val(patientId);
- $.ajax({
- type: "GET",
- url: '/thmz/getTallyTotalCharge?patientId=' + patientId,
- contentType: "application/json;charset=UTF-8",
- dataType: "json",
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- success: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- if (res.code == 0) {
- if (res.data != null && res.data > 0) {
- $("#haveTallyModal").modal();
- $("#totalTallyAmount").text(res.data.toFixed(2));
- } else {
- $("#haveTallyModal").modal('hide');
- }
- } else {
- new PNotify({
- title: '错误提示',
- text: res.message,
- type: 'error',
- hide: true,
- styling: 'bootstrap3'
- });
- }
- }
- });
- }
- $('#tb_table').bootstrapTable("destroy");
- $table_1 = $('#tb_table').bootstrapTable({
- url: '/thmz/listMzChargeDetail', //请求后台的URL(*)
- method: 'post', //请求方式(*)
- toolbar: '#toolbar', //工具按钮用哪个容器
- striped: true, //是否显示行间隔色
- cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
- pagination: true, //是否显示分页(*)
- sortable: true, //是否启用排序
- sortOrder: "asc", //排序方式
- queryParams: queryParams, //传递参数(*)
- sidePagination: "server", //分页方式:client客户端分页,server服务端分页(*)
- pageNumber: 1, //初始化加载第一页,默认第一页
- pageSize: 5, //每页的记录行数(*)
- pageList: [5, 10, 25, 50, 100], //可供选择的每页的行数(*)
- search: false, //是否显示表格搜索,此搜索是客户端搜索,不会进服务端,所以,个人感觉意义不大
- strictSearch: true,
- showColumns: false, //是否显示所有的列
- showRefresh: false, //是否显示刷新按钮
- minimumCountColumns: 2, //最少允许的列数
- clickToSelect: true, //是否启用点击选中行
- uniqueId: "ID", //每一行的唯一标识,一般为主键列
- showToggle: false, //是否显示详细视图和列表视图的切换按钮
- cardView: false, //是否显示详细视图
- detailView: false,
- //rowStyle:rowStyle,//通过自定义函数设置行样式
- ajaxOptions: {
- headers: {
- 'Accept': 'application/json',
- 'Authorization': 'Bearer ' + localStorage.getItem("token")
- }
- },
- columns: [
- // {
- // checkbox: true
- // },
- {
- field: 'realNo',
- title: '缴费流水号',
- align: "center",
- valign: 'middle',
- formatter: function (value, row, index) {
- return Math.abs(value);
- }
- }, {
- field: 'patientId',
- title: '患者编号',
- align: "center",
- valign: 'middle',
- }, {
- field: 'name',
- title: '患者姓名',
- align: "center",
- valign: 'middle',
- }, {
- field: 'times',
- title: '就诊次数',
- align: "center",
- valign: 'middle',
- }, {
- field: 'receiptNo',
- title: '结算次数',
- align: "center",
- valign: 'middle',
- formatter: function (value, row, index) {
- return Math.abs(value);
- }
- }, {
- field: 'notDiscountAmount',
- title: '订单金额(元)',
- align: "center",
- valign: 'middle',
- formatter: function (value, row, index) {
- return Math.abs(value).toFixed(2);
- }
- }, {
- field: 'discountAmount',
- title: '优惠总额(元)',
- align: "center",
- valign: 'middle',
- formatter: function (value, row, index) {
- return Math.abs(value).toFixed(2);
- }
- }, {
- field: 'amount',
- title: '应付金额(元)',
- align: "center",
- valign: 'middle',
- formatter: function (value, row, index) {
- return Math.abs(value).toFixed(2);
- }
- }, {
- field: 'warnDept',
- title: '科室',
- align: "center",
- valign: 'middle',
- }, {
- field: 'doctorCode',
- title: '医生',
- align: "center",
- valign: 'middle',
- }, {
- field: timeColumus,
- title: timeColumusName,
- align: "center",
- valign: 'middle',
- formatter: function (value, row, index) {
- if (value == null || value == "") {
- return "";
- }
- return format(value, "yyyy-MM-dd HH:mm:ss");
- }
- }, {
- title: '操作',
- align: "center",
- valign: 'middle',
- // sortable: true,
- formatter: function (value, row, index) {
- var str = '<button type="button" class="registration-no-color-foot-button" title="费用明细" onclick="chargeDetailModal(\'' + row.patientId + '\',' + row.times + ',' + row.receiptNo + ')"><i class="fa fa-plus"></i></button>';
- str += '<button type="button" class="registration-no-color-foot-button" title="诊断查询" onclick="diagnoseQuery(\'' + row.patientId + '\',' + row.times + ')"><i class="fa fa-search-minus"></i></button>';
- var payMarkGroup = getIndex("pay_mark_group");
- if (payMarkGroup == 0) {
- if (row.countYbZf > 0) {
- str += '<button type="button" class="registration-no-color-foot-button"title="医保读卡" onclick="mztczfSiReadCardTypeModel()"><i class="fa fa-newspaper-o"></i></button>';
- str += '<button type="button" class="registration-no-color-foot-button"title="医保结算" onclick="directRegistration(\'' + row.patientId + '\',' + row.times + ')"><i class="fa fa-credit-card"></i></button>';
- }
- str += '<button type="button" class="registration-no-color-foot-button"title="确认收费" onclick="tipHaveTally(' + row.amount + ',\'' + row.patientId + '\',' + row.times + ',\'' + row.name + '\',' + row.receiptNo + ')"><i class="fa fa-rmb"></i></button>';
- return str;
- }
- if (payMarkGroup == 1) {
- // str += '<button type="button" class="registration-no-color-foot-button" title="修改收款方式" onclick="showChequType(\'' + row.patientId + '\','+row.times+','+row.receiptNo+')"><i class="fa fa-credit-card"></i></button>' ;
- str += '<button type="button" class="registration-no-color-foot-button" title="退费" onclick="refundFee(\'' + row.patientId + '\',' + row.times + ',' + row.receiptNo + ',' + row.printFlag + ');"><i class="fa fa-reply"></i></button>';
- if (row.printFlag == 0) {
- str += '<button type="button" id="button_' + row.realNo + '" class="registration-no-color-foot-button" title="发票打印" onclick="prn1PrintHand(\'' + row.patientId + '\',' + row.times + ',true,' + row.receiptNo + ',' + row.realNo + ');" style="color: #35D082;"><i class="fa fa-print"></i></button>';
- } else if (row.printFlag == 1) {
- str += '<button type="button" class="registration-no-color-foot-button" title="发票重打" onclick="repPrint(\'' + row.patientId + '\',' + row.times + ',' + row.receiptNo + ');" style="color: #F4BD00;"><i class="fa fa-print"></i></button>';
- str += '<button type="button" class="registration-no-color-foot-button" title="发票作废重打" onclick="obsoleteAndRepPrint(\'' + row.patientId + '\',' + row.times + ',' + row.receiptNo + ');" style="color: #E73E48;"><i class="fa fa-print"></i></button>';
- }
- //是否有权限设置合同编号
- var buttonCodes = localStorage.getItem("buttonCodes");
- if (buttonCodes != null) {
- if (isInArrayStr("contract_match", buttonCodes)) {
- str += '<button type="button" class="registration-no-color-foot-button" title="合作项目维护" onclick="matchProject(\'' + row.realNo + '\');"><i class="fa fa-plug"></i></button>';
- }
- }
- if (row.countYbZf > 0) {
- str += '<button type="button" class="registration-no-color-foot-button" title="打印医保结算单" onclick="printYbjsd(\'' + row.patientId + '\',' + row.times + ',' + row.receiptNo + ');"><i class="fa fa-file-word-o"></i></button>';
- }
- return str;
- }
- if (payMarkGroup == 2) {
- // str += '<button type="button" class="registration-no-color-foot-button" title="修改收款方式" onclick="showChequType(\'' + row.patientId + '\','+row.times+','+row.receiptNo+')"><i class="fa fa-credit-card"></i></button>' ;
- return str;
- }
- }
- }
- ],
- responseHandler: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- var ress = eval(res);
- if (ress.code == -1) {
- if (ress.message != null && ress.message != '') {
- new PNotify({
- title: '错误提示',
- text: ress.message,
- type: 'error',
- hide: true,
- styling: 'bootstrap3'
- });
- }
- return {
- "total": 0,//总页数
- "rows": {} //数据
- };
- }
- // if(ress.pageViewVo.total==0){
- // $("#cardNo").val(null);
- // $("#name").val(null);
- // }
- return {
- "total": ress.pageViewVo.total,//总页数
- "rows": ress.pageViewVo.data //数据
- };
- },
- /**
- * @param {点击列的 field 名称} field
- * @param {点击列的 value 值} value
- * @param {点击列的整行数据} row
- * @param {td 元素} $element
- */
- onClickCell: function (field, value, row, $element) {
- var cardNo = $("#cardNo").val();
- if (cardNo == '120' && field == 'name' && (payMarkGroup == 0 || payMarkGroup == 1)) {
- $element.attr('contenteditable', true);
- $element.html(null);
- $element.focus();
- $element.blur(function () {
- var index = $element.parent().data('index');
- var tdValue = $element.html();
- saveData(index, field, tdValue, row, $table_1);
- })
- }
- },
- });
- }
- /**
- * 更新病人缴费记录病人姓名
- * @param index
- * @param field
- * @param value
- * @param row
- */
- function saveData(index, field, value, row, table) {
- $.ajax({
- type: "POST",
- url: '/thmz/changePatientIdName',
- contentType: "application/json;charset=UTF-8",
- dataType: "json",
- data: JSON.stringify({"patientId": row.patientId, "times": row.times, "name": value}),
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- async: false,
- success: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- if (res.code == 0) {
- table.bootstrapTable('updateCell', {
- index: index, //行索引
- field: field, //列名
- value: value //cell值
- })
- } else {
- table.bootstrapTable('updateCell', {
- index: index, //行索引
- field: field, //列名
- value: row.name //cell值
- })
- errorMesage(res);
- }
- }
- });
- }
- /**
- * 构建列表查询参数
- * @param params
- * @returns {{mzChargeDetail: {patientId: string | number | string[] | undefined | jQuery, warnDept: string | number | string[] | undefined | jQuery, doctorCode: string | number | string[] | undefined | jQuery, name: string | number | string[] | undefined | jQuery, payMark: number}, beginTime: Date, endTime: Date, pageSize: *, pageIndex: number}}
- */
- function queryParams(params) {
- var rePortRangeArr = getRePortRangeArr();
- var payMarkGroup = getIndex("pay_mark_group");
- var temp = {
- mzChargeDetail: {
- patientId: $("#patientId").val(),
- warnDept: $("#deptNoParam").val(),
- doctorCode: $("#doctorParam").val(),
- name: $("#name").val(),
- payMark: 5
- },
- beginTime: new Date(rePortRangeArr[0]),
- endTime: new Date(rePortRangeArr[1]),
- pageSize: params.limit, //页面大小
- pageIndex: params.offset / params.limit, //页码
- serialNo: $("#serialNo").val(),
- ownData: $('#ownData').is(':checked') ? 0 : 1,
- };
- if (payMarkGroup == 1) {
- temp.mzChargeDetail.payMark = 0;
- } else if (payMarkGroup == 2) {
- temp.mzChargeDetail.payMark = 1;
- }
- return temp;
- };
- function initChargeDetailTable() {
- initChargeDetailTablePublic('/thmz/getMzChargeDetailByBillItem', $('#charge_detail_table'), queryParamsForDetail);
- }
- function initMzChargeDetailByBillItem(flag) {
- if (flag) {
- $("#refund_bill_item_group").removeClass("hide").addClass("in");
- if ($("#plusOrMinus").hasClass("fa-plus")) {
- $("#plusOrMinus").removeClass("fa-plus").addClass("fa-minus");
- initChargeDetailTablePublic('/thmz/getNewListForRefundFeeByBillItem', $('#refund_fee_bill_table'), queryParamsForRefundByBillItem);
- } else if ($("#plusOrMinus").hasClass("fa-minus")) {
- $("#plusOrMinus").removeClass("fa-minus").addClass("fa-plus");
- $("#refund_bill_item_group").removeClass("in").addClass("hide");
- $('#refund_fee_bill_table').bootstrapTable("destroy");
- }
- } else {
- initChargeDetailTablePublic('/thmz/getNewListForRefundFeeByBillItem', $('#refund_fee_bill_table'), queryParamsForRefundByBillItem);
- }
- }
- /**
- * 初始化收费明细表格
- */
- function initChargeDetailTablePublic(url, obj, params) {
- $(obj).bootstrapTable("destroy");
- $(obj).bootstrapTable({
- url: url, //请求后台的URL(*)
- method: 'post', //请求方式(*)
- toolbar: '#toolbar', //工具按钮用哪个容器
- striped: true, //是否显示行间隔色
- cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
- pagination: true, //是否显示分页(*)
- sortable: true, //是否启用排序
- sortOrder: "asc", //排序方式
- // sortName: 'orderNo', //排序字段
- queryParams: params, //传递参数(*)
- sidePagination: "client", //分页方式:client客户端分页,server服务端分页(*)
- pageNumber: 1, //初始化加载第一页,默认第一页
- pageSize: 5, //每页的记录行数(*)
- pageList: [5, 10, 25, 50, 100], //可供选择的每页的行数(*)
- search: false, //是否显示表格搜索,此搜索是客户端搜索,不会进服务端,所以,个人感觉意义不大
- strictSearch: true,
- showColumns: false, //是否显示所有的列
- showRefresh: false, //是否显示刷新按钮
- minimumCountColumns: 2, //最少允许的列数
- clickToSelect: true, //是否启用点击选中行
- uniqueId: "ID", //每一行的唯一标识,一般为主键列
- showToggle: false, //是否显示详细视图和列表视图的切换按钮
- cardView: false, //是否显示详细视图
- detailView: false,
- //rowStyle:rowStyle,//通过自定义函数设置行样式
- ajaxOptions: {
- headers: {
- 'Accept': 'application/json',
- 'Authorization': 'Bearer ' + localStorage.getItem("token")
- }
- },
- columns: [
- // {
- // checkbox: true
- // },
- {
- field: 'orderNo',
- title: '处方号',
- align: "center",
- valign: 'middle',
- formatter: function (value, row, index) {
- return Math.abs(value);
- }
- }, {
- field: 'chargeItemCode',
- title: '编码',
- align: "center",
- valign: 'middle',
- }, {
- field: 'tcName',
- title: '项目',
- align: "center",
- valign: 'middle',
- },
- // {
- // field: 'times',
- // title: '规格',
- // align: "center",
- // valign: 'middle',
- // },
- {
- field: 'quantity',
- title: '数量',
- align: "center",
- valign: 'middle'
- }, {
- field: 'drugWin',
- title: '副数',
- align: "center",
- valign: 'middle',
- }, {
- field: 'origPrice',
- title: '原单价(元)',
- align: "center",
- valign: 'middle',
- formatter: function (value, row, index) {
- if (value != undefined && value != null) {
- return value.toFixed(2);
- }
- }
- }, {
- field: 'unitPrice',
- title: '折后单价(元)',
- align: "center",
- valign: 'middle',
- formatter: function (value, row, index) {
- return value.toFixed(2);
- }
- }, {
- field: 'amount',
- title: '总金额(元)',
- align: "center",
- valign: 'middle',
- formatter: function (value, row, index) {
- return value.toFixed(2);
- }
- }
- ],
- responseHandler: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- var ress = eval(res);
- if (ress.code == -1) {
- new PNotify({
- title: '错误提示',
- text: ress.message,
- type: 'error',
- hide: true,
- styling: 'bootstrap3'
- });
- return {
- "total": 0,//总页数
- "rows": {} //数据
- };
- }
- return {
- //"total": ress.pageViewVo.total,//总页数
- "rows": ress.data //数据
- };
- },
- });
- }
- /**
- * 构建列表查询参数
- * @param params
- * @returns {{patientId: string | number | string[] | undefined | jQuery, times: string | number | string[] | undefined | jQuery, billItemCode: number}}
- */
- function queryParamsForDetail(params) {
- var billItemGroup = getIndex("bill_item_group");
- var payMarkGroup = getIndex("pay_mark_group");
- var temp = {
- patientId: $("#patientIdChargeItem").val(),
- times: $("#timesChargeItem").val(),
- receiptNo: $("#receiptNoChargeItem").val(),
- billItemCode: billItemGroup,
- payMark: 5
- };
- if (payMarkGroup == 1) {
- temp.payMark = 0;
- } else if (payMarkGroup == 2) {
- temp.payMark = 1;
- }
- return temp;
- };
- /**
- * 构建列表查询参数
- * @param params
- * @returns {{patientId: string | number | string[] | undefined | jQuery, times: string | number | string[] | undefined | jQuery, billItemCode: number}}
- */
- function queryParamsForRefundByBillItem(params) {
- var billItemGroup = getIndex("refund_bill_item_group");
- return {
- patientId: $("#patientIdRefund").val(),
- times: $("#timesRefund").val(),
- receiptNo: $("#receiptNoRefund").val(),
- chargeItemCodes: chargeItemCodes,
- billItemCode: billItemGroup
- };
- };
- /**
- * 卡号输入改变事件
- */
- function cardNoChange() {
- if (window.ActiveXObject || "ActiveXObject" in window) {
- $("#cardNo").on('input propertychange', function () {
- queryUserInfoByCardNo();
- });
- } else {
- $("#cardNo").on('input οninput', function () {
- queryUserInfoByCardNo();
- });
- }
- }
- /**
- * 卡号有变化后查询病人信息
- */
- function queryUserInfoByCardNo() {
- var cardNo = $("#cardNo").val();
- var index = cardNo.indexOf("-");
- if (index > 0 && index == cardNo.length - 2) {
- $("#patientId").val(cardNo);
- initFeeTable();
- } else if (cardNo == '120' || cardNo.length == 8) {
- $("#cardNo").attr("title", cardNo);
- $.ajax({
- type: "GET",
- url: '/thmz/getByIcCardNo?icCardNo=' + cardNo,
- contentType: "application/json;charset=UTF-8",
- dataType: "json",
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- success: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- if (res.code == 0) {
- if (res.data != null) {
- $("#patientId").val(res.data.patientId);
- initFeeTable();
- }
- } else {
- new PNotify({
- title: '错误提示',
- text: res.message,
- type: 'error',
- hide: true,
- styling: 'bootstrap3'
- });
- }
- }
- });
- } else if (cardNo == null || cardNo == "") {
- cleanParams();
- }
- }
- /**
- * 获取按钮组选择的下标
- * @param id
- * @returns {number}
- */
- function getIndex(id) {
- var index = 0;
- var item = $("#" + id).find("button");
- for (var i = 0; i <= item.length; i++) {
- if ($(item[i]).hasClass("btn-primary")) {
- index = i;
- break;
- }
- }
- return index;
- }
- /**
- * 获取时间选择器的时间数组
- * @returns {string[]}
- */
- function getRePortRangeArr() {
- var rePortRange = $('#reportrange span').html();
- var rePortRangeArr = rePortRange.split(" - ");
- rePortRangeArr[0] = rePortRangeArr[0] + " 00:00:00"
- rePortRangeArr[1] = rePortRangeArr[1] + " 23:59:59"
- return rePortRangeArr;
- }
- /**
- * 打开收费窗口
- */
- function confirmFeeModal(times, totalCharge, receiptNo) {
- var buttonCodes = localStorage.getItem("buttonCodes");
- if (buttonCodes != null) {
- if (isInArrayStr("contract_match", buttonCodes)) {
- $("#projectDiv").removeClass("hide").addClass("in");
- } else {
- $("#projectDiv").removeClass("in").addClass("hide");
- }
- } else {
- $("#projectDiv").removeClass("in").addClass("hide");
- }
- var payTypeList = $("#payType").children();
- if (payTypeList.length == 1) {
- $('#payType').selectpicker('val', 'Y');
- } else {
- $('#payType').selectpicker('val', 1);
- }
- $('#payType').selectpicker('refresh');
- var data = parseFloat($("#dataIdHaveTally").val());
- if (totalCharge != null && totalCharge > 0) {
- data = totalCharge;
- $("#timesHaveTally").val(times);
- $("#receiptNoHaveTally").val(receiptNo);
- }
- var prevAll = $("#changeAmountParent").prevAll();
- while (prevAll.length > 2) {
- $("#changeAmountParent").prev().remove();
- prevAll = $("#changeAmountParent").prevAll();
- }
- // $("#realMoney").val($("#amountMoneyConfirm").text());
- // $("#cash").val($("#amountMoneyConfirm").text());
- $("#tallyDetailModal").modal('hide');
- $("#haveTallyModal").modal('hide');
- $("#confirmFeeModal").modal();
- $("#amountMoneyConfirm").text(data);
- //医保报销金额
- var fundPay = $("#fundPay").val();
- //个人账户支付金额
- var acctPay = $("#acctPay").val();
- //医保卡类型
- var cardType = $("#cardType").val();
- var payTypeIndex = 0;
- if (fundPay > 0) {
- var payTypeId = "payType_" + payTypeIndex++;
- addPayType(payTypeId);
- $('#' + payTypeId).selectpicker('val', 2);
- $('#' + payTypeId).selectpicker('refresh');
- $('#' + payTypeId).parent().parent().next().children(':first').val(fundPay);
- $('#' + payTypeId).parent().parent().next().next().children(':first').remove();
- $('#' + payTypeId).attr("disabled", true);
- $('#' + payTypeId).parent().parent().next().children(':first').attr("readonly", "readonly");
- //payTypeIndex++;
- }
- if (acctPay > 0) {
- var payTypeId = "payType_" + payTypeIndex++;
- addPayType(payTypeId);
- var ybkType = 6;
- if (cardType != null && (cardType == 2 || cardType == "2")) {
- ybkType = 7;
- }
- $('#' + payTypeId).selectpicker('val', ybkType);
- $('#' + payTypeId).selectpicker('refresh');
- $('#' + payTypeId).parent().parent().next().children(':first').val(acctPay);
- $('#' + payTypeId).parent().parent().next().next().children(':first').remove();
- $('#' + payTypeId).attr("disabled", true);
- $('#' + payTypeId).parent().parent().next().children(':first').attr("readonly", "readonly");
- }
- //总金额减医保报销
- var realMoney = Minus(data, fundPay);
- //减完医保报销后减个人医保卡支付金额
- realMoney = Minus(realMoney, acctPay);
- $("#realMoney").val(data);
- $("#cash").val(realMoney);
- // $("#cash").val(null);
- setTimeout(function () {
- //默认光标在现金输入框
- $("#cash").focus();
- }, 800);
- if (payTypeList.length == 1) {
- $('#payType').selectpicker('val', 'Y');
- } else {
- $('#payType').selectpicker('val', 1);
- }
- $("#changeAmount").val(0.0);
- $("#surplusAmount").val(0.0);
- sendPriceMessage(realMoney, 0, 0, $("#patientIdHaveTally").val());
- }
- /**
- * 打开收费明细窗口
- * @param data
- */
- function chargeDetailModal(patientId, times, receiptNo) {
- $("#patientIdChargeItem").val(patientId);
- $("#timesChargeItem").val(times);
- $("#receiptNoChargeItem").val(receiptNo);
- $("#chargeDetailModal").modal();
- initChargeDetailTable();
- }
- /**
- * 病人当前就诊次数的诊断查询
- * @param data
- */
- function diagnoseQuery(patientId, times) {
- $.ajax({
- type: "POST",
- url: '/thmz/getVisitTableByPatientIdAndTimes',
- contentType: "application/json;charset=UTF-8",
- dataType: "json",
- data: JSON.stringify({"patientId": patientId, "times": times}),
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- async: false,
- success: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- if (res.code == 0) {
- if (res.data.icdText != null || res.data.icdText != '') {
- $("#diagnoseModal").modal();
- $("#diagnose").html(res.data.icdText);
- } else {
- new PNotify({
- title: '操作提示',
- text: '当前病人诊断未知',
- type: 'warn',
- styling: 'bootstrap3'
- });
- }
- } else {
- errorMesage(res);
- }
- }
- });
- }
- // /**
- // * 打开退费重收明细窗口
- // * @param data
- // */
- // function chargeRefundDetailModal(patientId, times) {
- // // $("#patientIdChargeItem").val(patientId);
- // // $("#timesChargeItem").val(times);
- // initMzChargeDetailByBillItem();
- // }
- /**
- * 初始门诊收银方式下拉选
- */
- function initChequeType(payType) {
- $.ajax({
- type: "GET",
- url: '/thmz/getAllZdChequeTypeForMz',
- dataType: "json",
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- async: false,
- success: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- var html = '';
- $.each(res.data, function (commentIndex, comment) {
- html += '<option value="' + comment.code + '">' + comment.name + '</option>';
- });
- $('#' + payType).empty();
- $('#' + payType).html(html);
- $('#' + payType).selectpicker('refresh');
- if (res.data.length == 1) {
- $('#' + payType).selectpicker('val', 'Y');
- } else {
- $('#' + payType).selectpicker('val', 1);
- }
- $('#' + payType).selectpicker('refresh');
- }
- });
- }
- /**
- * 关闭当前这个付款方式
- */
- function closeThisParent(obj) {
- $(obj).parent().parent().parent().remove();
- checkFee(false);
- }
- /**
- * 校验收款金额
- * @param flag 是否是提交时候的校验,是的话,如果缴费金额不够,需要返回 false
- */
- function checkFee(flag) {
- var realMoney = parseFloat($("#realMoney").val());
- realMoney = realMoney.toFixed(2);
- $("#realMoney").val(realMoney);
- var arr = $("#payForm").find("div.pay-item");
- if (arr.length > 0) {
- //非现金收款总金额
- var notCashAmount = 0;
- //现金收款总额
- var cashAmount = 0;
- for (var i = 0; i < arr.length; i++) {
- var temp = parseFloat($(arr[i]).find("input").val());
- if (isNaN(temp)) {
- temp = 0;
- }
- if ($(arr[i]).find("select").val() != 1) {
- notCashAmount = Add(notCashAmount, temp);
- } else {
- cashAmount = Add(cashAmount, temp);
- }
- for (var j = 0; j < arr.length; j++) {
- if ($(arr[i]).find("select").val() == $(arr[j]).find("select").val() && i != j) {
- new PNotify({
- title: '错误提示',
- text: "已经存在相同的收款方式,请不要重复添加!",
- type: 'error',
- hide: true,
- styling: 'bootstrap3'
- });
- return;
- }
- }
- }
- if (notCashAmount > realMoney) {
- new PNotify({
- title: '错误提示',
- text: "非现金收款金额不能大于实收金额!",
- type: 'error',
- hide: true,
- styling: 'bootstrap3'
- });
- $("#addPayType").parent().removeClass("in").addClass("hide");
- return;
- }
- var totalAmount = Add(cashAmount, notCashAmount);
- $("#surplusAmount").val(0.0);
- if (totalAmount < realMoney) {
- if (flag) {
- new PNotify({
- title: '错误提示',
- text: "收款金额不能少于实收金额,请调整收款金额或者增加收款方式!",
- type: 'error',
- hide: true,
- styling: 'bootstrap3'
- });
- return false;
- }
- if (totalAmount == 0) {
- $("#addPayType").parent().removeClass("in").addClass("hide");
- } else {
- $("#addPayType").parent().removeClass("hide").addClass("in");
- }
- $("#changeAmount").val(0.00);
- var surplusAmount = Minus(realMoney, totalAmount);
- $("#surplusAmount").val(surplusAmount);
- return;
- }
- var changeAmount = 0.00;
- if (totalAmount >= realMoney) {
- changeAmount = Minus(totalAmount, realMoney);
- //changeAmount = changeAmount.toFixed(2);
- $("#changeAmount").val(changeAmount);
- $("#addPayType").parent().removeClass("in").addClass("hide");
- if (!flag) {
- sendPriceMessage(realMoney, totalAmount, changeAmount, $("#patientIdHaveTally").val());
- }
- }
- //设置收费首页找零与应收和实收金额
- $("#payableAmount").text(realMoney);
- $("#paidAmount").text(totalAmount);
- $("#changedAmount").text(changeAmount);
- }
- //计算和设置折扣比例
- var amountMoneyConfirm = parseFloat($("#amountMoneyConfirm").text());
- var discount = 100;
- if (realMoney < amountMoneyConfirm) {
- discount = Division(realMoney, Multiply(amountMoneyConfirm, 100));
- }
- $("#discount").text(discount.toFixed(2))
- return true;
- }
- /**
- * 提示有记账记录
- */
- function tipHaveTally(data, patientId, times, name, receiptNo) {
- if (patientId == null || patientId == "") {
- return;
- }
- $("#patientIdHaveTally").val(patientId);
- $("#nameHaveTally").val(name);
- $("#dataIdHaveTally").val(data);
- $("#timesHaveTally").val(times);
- $("#receiptNoHaveTally").val(receiptNo);
- $.ajax({
- type: "POST",
- url: '/thmz/getTmFee',
- contentType: "application/json;charset=UTF-8",
- dataType: "json",
- data: JSON.stringify({"patientId": patientId, "times": times, "receiptNo": receiptNo}),
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- async: false,
- success: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- if (res.code == 0) {
- if (res.data != undefined && res.data != null) {
- $("#fundPay").val(res.data.fundPay);
- $("#acctPay").val(res.data.acctPay);
- $("#cardType").val(res.data.cardType);
- //$("#realMoney").val(res.data.selfPay);
- } else {
- $("#fundPay").val(0.0);
- $("#acctPay").val(0.0);
- $("#cardType").val(null);
- }
- } else {
- errorMesage(res);
- }
- $("#saveConfirmFee").attr("disabled", false);
- }
- });
- confirmFeeModal(null, null, null);
- }
- var $tally_detail_table;
- /**
- * 初始化本院记账明细表格
- */
- function initTallyDetailTable() {
- $("#haveTallyModal").modal('hide');
- var patientId = $("#patientIdHaveTally").val();
- // var name = $("#nameHaveTally").val();
- if (patientId == null || patientId == '') {
- return;
- }
- $("#tallyDetailModal").modal();
- $('#tally_detail_table').bootstrapTable("destroy");
- $tally_detail_table = $('#tally_detail_table').bootstrapTable({
- url: '/thmz/getTallyReceiptSerial?patientId=' + patientId, //请求后台的URL(*)
- method: 'get', //请求方式(*)
- toolbar: '#toolbar', //工具按钮用哪个容器
- striped: true, //是否显示行间隔色
- cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
- pagination: false, //是否显示分页(*)
- sortable: true, //是否启用排序
- sortOrder: "asc", //排序方式
- sidePagination: "client", //分页方式:client客户端分页,server服务端分页(*)
- pageNumber: 1, //初始化加载第一页,默认第一页
- pageSize: 10, //每页的记录行数(*)
- pageList: [10, 25, 50, 100], //可供选择的每页的行数(*)
- search: false, //是否显示表格搜索,此搜索是客户端搜索,不会进服务端,所以,个人感觉意义不大
- strictSearch: true,
- showColumns: false, //是否显示所有的列
- showRefresh: false, //是否显示刷新按钮
- minimumCountColumns: 2, //最少允许的列数
- clickToSelect: true, //是否启用点击选中行
- uniqueId: "ID", //每一行的唯一标识,一般为主键列
- showToggle: false, //是否显示详细视图和列表视图的切换按钮
- cardView: false, //是否显示详细视图
- detailView: false,
- //rowStyle:rowStyle,//通过自定义函数设置行样式
- ajaxOptions: {
- headers: {
- 'Accept': 'application/json',
- 'Authorization': 'Bearer ' + localStorage.getItem("token")
- }
- },
- columns: [
- // {
- // checkbox: true,
- // },
- {
- field: 'patientId',
- title: '病人编号',
- align: "center",
- valign: 'middle'
- }, {
- field: 'name',
- title: '病人姓名',
- align: "center",
- valign: 'middle',
- // formatter: function (value, row, index) {
- // return name;
- // }
- }, {
- field: 'times',
- title: '就诊次数',
- align: "center",
- valign: 'middle',
- },
- {
- field: 'totalCharge',
- title: '总费用(元)',
- align: "center",
- valign: 'middle',
- formatter: function (value, row, index) {
- return value.toFixed(2);
- }
- },
- {
- field: 'chargeDate',
- title: '记账时间',
- align: "center",
- valign: 'middle',
- formatter: function (value, row, index) {
- return format(value, "yyyy-MM-dd HH:mm:ss");
- }
- }
- // , {
- // title: '操作',
- // align: "center",
- // valign: 'middle',
- // // sortable: true,
- // formatter: function (value, row, index) {
- // var str = '<button type="button" class="registration-no-color-foot-button" title="同步费用明细" onclick="reInsertDetailModal(\'' + row.patientId + '\',' + row.times + ',' + row.receiptNo + ')"><i class="fa fa-exchange"></i></button>';
- // return str;
- // }
- // }
- ],
- /**
- * @param {点击列的 field 名称} field
- * @param {点击列的 value 值} value
- * @param {点击列的整行数据} row
- * @param {td 元素} $element
- */
- onClickCell: function (field, value, row, $element) {
- var cardNo = $("#cardNo").val();
- if (cardNo == '120' && field == 'name') {
- $element.attr('contenteditable', true);
- $element.html(null);
- $element.focus();
- $element.blur(function () {
- var index = $element.parent().data('index');
- var tdValue = $element.html();
- saveData(index, field, tdValue, row, $tally_detail_table);
- })
- }
- },
- onDblClickRow: function (row) {
- confirmFeeModal(row.times, row.totalCharge, row.receiptNo);
- },
- responseHandler: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- var ress = eval(res);
- if (ress.code == -1) {
- errorMesage(ress);
- return {
- "total": 0,//总页数
- "rows": {} //数据
- };
- }
- if (ress.data == null || ress.data.length == 0) {
- $("#tallyDetailModal").modal("hide");
- }
- return {
- "rows": ress.data //数据
- };
- },
- });
- }
- /**
- * 提交缴费申请
- */
- function saveConfirmFee() {
- $("#saveConfirmFee").attr("disabled", true);
- if (!checkFee(true)) {
- $("#saveConfirmFee").attr("disabled", false);
- return;
- }
- var project = $("#project").val();
- var jsonData = JSON.parse('{"patientId":"","times":"","receiptNo":"","mzDepositFiles":[]}');
- var patientId = $("#patientIdHaveTally").val();
- var times = $("#timesHaveTally").val();
- var receiptNo = $("#receiptNoHaveTally").val();
- jsonData.patientId = patientId;
- jsonData.times = times;
- jsonData.receiptNo = receiptNo;
- var arr = $("#payForm").find("div.pay-item");
- if (arr.length > 0) {
- for (var i = 0; i < arr.length; i++) {
- var temp = parseFloat($(arr[i]).find("input").val());
- if (temp == null || temp == 0) {
- continue;
- }
- var tempJson = JSON.parse('{"chequeType":"","amount":"","contractId":""}');
- tempJson.chequeType = $(arr[i]).find("select").val();
- //现金有可能会多收,比入实收37,对方给了100,需要找零63. 所以必须减去找零金额,才是实收金额
- if (tempJson.chequeType == "1") {
- temp = temp - $("#changeAmount").val();
- temp = temp.toFixed(2);
- }
- if (project != null && project != "null" && project != "") {
- tempJson.contractId = project;
- }
- tempJson.amount = temp;
- jsonData.mzDepositFiles[jsonData.mzDepositFiles.length] = tempJson;
- }
- }
- $.ajax({
- type: "POST",
- url: '/thmz/chargeFee',
- contentType: "application/json;charset=UTF-8",
- dataType: "json",
- data: JSON.stringify(jsonData),
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- success: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- if (res.code == 0) {
- prn1Print(patientId, times, true, res.receiptNo);
- successMesage(res);
- $("#confirmFeeModal").modal("hide");
- $("#patientId").val(null);
- $("#cardNo").val(null);
- $("#name").val(null);
- $("#fundPay").val(0);
- $("#acctPay").val(0);
- $("#cardType").val(null);
- //缴费成功后清空全局参数
- patientIdFullForNucleicAcid = null;
- initFeeTable();
- //默认光标在卡号输入框
- $("#cardNo").focus();
- toEvaluation(patientId);
- } else {
- errorMesage(res);
- }
- $("#saveConfirmFee").attr("disabled", false);
- }
- });
- }
- /**
- * 保存合作项目
- */
- function saveProject() {
- var projectRealNo = $("#projectRealNo").val();
- var projectCharged = $("#projectCharged").val();
- $.ajax({
- type: "GET",
- url: '/thmz/setMzDepositFileSetContractId?contractId=' + projectCharged + '&serialNo=' + projectRealNo,
- contentType: "application/json;charset=UTF-8",
- dataType: "json",
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- success: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- if (res.code == 0) {
- successMesage(res);
- $("#projectRealNo").val(null);
- $('#projectCharged').selectpicker('val', null);
- $('#projectCharged').selectpicker('refresh');
- $("#projectModal").modal("hide");
- } else {
- errorMesage(res);
- }
- $("#saveConfirmFee").attr("disabled", false);
- }
- });
- }
- /**
- * 直接打印发票
- * @param patientId
- * @param times
- * @param chargeFeeFlag 收费 退费标记 true 收费和重打发票来源 false 退费来源
- */
- function prn1PrintHand(patientId, times, chargeFeeFlag, receiptNo, realNo) {
- $("#button_" + realNo).css("display", "none");
- prn1Print(patientId, times, chargeFeeFlag, receiptNo);
- }
- /**
- * 直接打印发票
- * @param patientId
- * @param times
- * @param chargeFeeFlag 收费 退费标记 true 收费和重打发票来源 false 退费来源
- */
- function prn1Print(patientId, times, chargeFeeFlag, receiptNo) {
- var url = '/thmz/getAllSerialForThisTime?patientId=' + patientId + "×=" + times + "&receiptNo=" + receiptNo;
- printCommon(url, patientId, times, chargeFeeFlag);
- }
- /**
- * 重打发票
- * @param patientId
- * @param times
- */
- function repPrint(patientId, times, receiptNo) {
- $.ajax({
- type: "GET",
- url: '/thmz/getReceiptForThisTime?patientId=' + patientId + "×=" + times + "&receiptNo=" + receiptNo,
- contentType: "application/json;charset=UTF-8",
- dataType: "json",
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- success: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- if (res.code == 0) {
- if (res.data.length == 1) {
- var message = "确定要重新打印发票号码为【" + res.data[0].receiptBill + "】的发票吗?请确认发票打印机即将要打印的发票编号";
- var url = '/thmz/repPrintForThisTime?patientId=' + patientId + "×=" + times + "&obsolete=0&receiptBill=" + res.data[0].receiptBill;
- confirmMessage(patientId, times, message, url);
- } else {
- $("#tip_message").text("请选择需要重新打印的发票号");
- $("#repPrintModal").modal();
- $("#repPrintTable").html(null);
- for (var i = 0; i < res.data.length; i++) {
- $("<tr><td>" + res.data[i].receiptBill + "</td></tr>").appendTo("#repPrintTable").bind('click', function () {
- $("#repPrintModal").modal("hide");
- var message = "确定要重新打印发票号码为【" + $(this).text() + "】的发票吗?请确认发票打印机即将要打印的发票编号";
- var url = '/thmz/repPrintForThisTime?patientId=' + patientId + "×=" + times + "&obsolete=0&receiptBill=" + $(this).text();
- confirmMessage(patientId, times, message, url);
- });
- }
- }
- }
- }
- });
- }
- /**
- * 发票重打提示
- * @param patientId
- * @param times
- * @param name
- */
- function confirmMessage(patientId, times, message, url) {
- if (!confirm(message)) {
- return;
- }
- //var url='/thmz/repPrintForThisTime?patientId=' + patientId + "×=" + times + "&obsolete=0" + "&receiptBill="+receiptBill;
- printCommon(url, patientId, times, true);
- }
- /**
- * 作废重打发票
- * @param patientId
- * @param times
- */
- function obsoleteAndRepPrint(patientId, times, receiptNo) {
- $.ajax({
- type: "GET",
- url: '/thmz/getReceiptForThisTime?patientId=' + patientId + "×=" + times + "&receiptNo=" + receiptNo,
- contentType: "application/json;charset=UTF-8",
- dataType: "json",
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- success: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- if (res.code == 0) {
- if (res.data.length == 1) {
- var message = "确定要作废发票号码为【" + res.data[0].receiptBill + "】的发票吗?请确认需要作废发票编号";
- var url = '/thmz/repPrintForThisTime?patientId=' + patientId + "×=" + times + "&obsolete=1&receiptBill=" + res.data[0].receiptBill;
- confirmMessage(patientId, times, message, url);
- } else {
- $("#tip_message").text("请选择需要作废的发票号");
- $("#repPrintModal").modal();
- $("#repPrintTable").html(null);
- for (var i = 0; i < res.data.length; i++) {
- $("<tr><td>" + res.data[i].receiptBill + "</td></tr>").appendTo("#repPrintTable").bind('click', function () {
- $("#repPrintModal").modal("hide");
- var message = "确定要作废发票号码为【" + $(this).text() + "】的发票吗?请确认需要作废发票编号";
- var url = '/thmz/repPrintForThisTime?patientId=' + patientId + "×=" + times + "&obsolete=1&receiptBill=" + $(this).text();
- confirmMessage(patientId, times, message, url);
- });
- }
- }
- }
- }
- });
- }
- /**
- * 打印医保结算单
- * @param patientId
- * @param times
- * @param receiptNo
- */
- function printYbjsd(patientId, times, receiptNo) {
- if (mzjsdHost == null) {
- errorMesageSimaple("医保结算单域名为空,操作失败!");
- return;
- }
- const iframeEle = document.getElementById('ybjsdDiv');
- const loadingEle = document.getElementById('loading');
- //设置ififrame透明
- iframeEle.style.opacity = 0;
- loadingEle.style.display = 'block';
- var url = mzjsdHost + "/siSettleDetailList/" + patientId + "/" + times;
- $("#ybjsdDiv").attr("src", url);
- iframeEle.addEventListener('load', function () {
- // Hide the loading indicator
- loadingEle.style.display = 'none';
- // Bring the iframe back
- iframeEle.style.opacity = 1;
- });
- $("#ybjsdModal").modal();
- }
- /**
- * 匹配合作项目
- * @param realNo
- */
- function matchProject(realNo) {
- $("#projectRealNo").val(realNo);
- $("#projectModal").modal();
- $.ajax({
- type: "GET",
- url: '/thmz/getMzDepositFileContractId?serialNo=' + realNo,
- contentType: "application/json;charset=UTF-8",
- dataType: "json",
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- success: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- if (res.code == 0) {
- $('#projectCharged').selectpicker('val', res.data);
- $('#projectCharged').selectpicker('refresh');
- }
- }
- });
- }
- /**
- * 打印发票通用方法
- * @param patientId
- * @param times
- * @param chargeFeeFlag 收费 退费标记 true 收费和重打发票来源 false 退费来源
- */
- function printCommon(url, patientId, times, chargeFeeFlag) {
- setPrint();
- var height = "93.15mm";
- // if (countReceiot % 2 == 0) {
- // height = "93.2mm";
- // }
- $.ajax({
- type: "GET",
- url: url,
- contentType: "application/json;charset=UTF-8",
- dataType: "json",
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- async: false,
- success: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- if (res.code == 0) {
- if (res.data == null || res.data.length == 0) {
- return;
- }
- // countReceiot++;
- for (var i = 0; i < res.data.length; i++) {
- LODOP = getLodop();
- var temp = res.data[i].mzReceiptSerial;
- LODOP.PRINT_INITA(6, 0, "120mm", height, "泰和门诊发票打印");
- //设置默认打印机
- LODOP.SET_PRINTER_INDEX(printIndex);
- LODOP.SET_SHOW_MODE("BKIMG_WIDTH", "120mm");
- LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", height);
- LODOP.SET_PRINT_PAGESIZE(1, "120mm", height, "CreateCustomPage");
- LODOP.SET_PRINT_MODE("CREATE_CUSTOM_PAGE_NAME", "门诊发票");//对新建的纸张重命名
- LODOP.SET_PRINT_STYLE("FontSize", 11); //字体大小
- LODOP.ADD_PRINT_TEXT("6mm", "0mm", "55mm", "3mm", "湖南泰和医院管理有限公司");
- LODOP.ADD_PRINT_TEXT("6mm", "59mm", "30mm", "3mm", "机制号:");
- LODOP.ADD_PRINT_TEXT("6mm", "72mm", "20mm", "3mm", temp.serialNo);
- LODOP.ADD_PRINT_TEXT("19mm", "0mm", "35mm", "3mm", temp.receiptBill);
- LODOP.ADD_PRINT_TEXT("25mm", "7mm", "40mm", "3mm", res.mzPatientMi.name);
- LODOP.ADD_PRINT_TEXT("25mm", "61mm", "27mm", "3mm", patientId);
- var feeList = res.data[i].feeList;
- if (feeList != null && feeList.length > 0) {
- var top = 32;
- var left = 6;
- for (var j = 0; j < feeList.length; j++) {
- var row = parseInt(j / 3);
- var tempTop = top + row * 5;
- var tempLeft = left;
- if (j % 3 == 1) {
- tempLeft = left + 30;
- } else if (j % 3 == 2) {
- tempLeft = left + 60;
- }
- LODOP.ADD_PRINT_TEXT(tempTop + "mm", tempLeft + "mm", "30mm", "3mm", feeList[j]);
- }
- }
- // LODOP.ADD_PRINT_TEXT("32mm","25mm","25mm","3mm","诊查费 10.00");
- // LODOP.ADD_PRINT_TEXT("32mm","50mm","25mm","3mm","中成药费30.10");
- // LODOP.ADD_PRINT_TEXT("37mm","25mm","25mm","3mm","治疗费 22.00");
- // LODOP.ADD_PRINT_TEXT("37mm","50mm","25mm","3mm","材料费 14.20");
- // LODOP.ADD_PRINT_TEXT("42mm","25mm","25mm","3mm","西药费 161.20");
- var qyxxs = res.data[i].qyxxs;
- if (qyxxs != null && qyxxs.length > 0) {
- var top = 54;
- for (var j = 0; j < qyxxs.length; j++) {
- var row = j / 3;
- var tempTop = top + row * 10;
- var qyxx = qyxxs[j];
- var arr = qyxx.split(",");
- LODOP.ADD_PRINT_TEXT(tempTop + "mm", "6mm", "50mm", "3mm", "取药窗口:" + arr[0]);
- LODOP.ADD_PRINT_TEXT(tempTop + "mm", "61mm", "50mm", "3mm", "取药号码:" + arr[1]);
- }
- }
- // LODOP.ADD_PRINT_TEXT("54mm","25mm","50mm","3mm","取药窗口:西药房4号窗口");
- // LODOP.ADD_PRINT_TEXT("54mm","80mm","35mm","3mm","取药号码:408392");
- LODOP.ADD_PRINT_TEXT("65mm", "21mm", "60mm", "3mm", temp.totalCharge + " 元");
- LODOP.ADD_PRINT_TEXT("72mm", "19mm", "60mm", "3mm", res.data[i].totalChargeStr);
- LODOP.ADD_PRINT_TEXT("79mm", "0mm", "15mm", "3mm", res.data[i].year);//年
- LODOP.ADD_PRINT_TEXT("79mm", "13mm", "10mm", "3mm", res.data[i].month);//月
- LODOP.ADD_PRINT_TEXT("79mm", "25mm", "10mm", "3mm", res.data[i].day);//日
- LODOP.ADD_PRINT_TEXT("79mm", "53mm", "50mm", "3mm", temp.operatorId);//收费员
- LODOP.PRINT();
- //LODOP.PREVIEW();
- initFeeTable();
- }
- } else if (res.code == -1) {
- //退费就退出,不提示异常
- if (!chargeFeeFlag) {
- return;
- }
- new PNotify({
- title: '错误提示',
- text: res.message,
- type: 'error',
- hide: true,
- styling: 'bootstrap3'
- });
- }
- }
- });
- }
- //
- // /**
- // * 加载打印机列表
- // * @constructor
- // */
- // function CreatePrinterList() {
- // LODOP = getLodop();
- // LODOP.PRINT_INITA(6, 0, "92mm", "120mm", "泰和门诊发票打印");
- // //获取打印机设备数,用于进行遍历
- // var count = LODOP.GET_PRINTER_COUNT();
- // var html = "";
- // for (var i = 0; i < count; i++) {
- // //根据设备序号获取设备名
- // var msg = LODOP.GET_PRINTER_NAME(i);
- // html += "<option value='" + i + "'>" + msg + "</option>";
- // }
- // $('#printSelect').html(html);
- // $('#printSelect').selectpicker('refresh');
- // $.ajax({
- // type: "GET",
- // url: '/thmz/getLastWindowsByCurrentUser',
- // contentType: "application/json;charset=UTF-8",
- // dataType: "json",
- // headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- // success: function (res) {
- // if (res == '401' || res == 401) {
- // window.location.href = '/thmz/login/view'
- // return;
- // }
- // if (res.code == 0) {
- // $('#printSelect').selectpicker('val', res.data.printIndex);
- // $('#printSelect').selectpicker('refresh');
- // printIndex=res.data.printIndex;
- // }
- // }
- // });
- // }
- //
- //
- // /**
- // * 保存窗口号
- // */
- // function saveWindows() {
- // $.ajax({
- // type: "POST",
- // url: '/thmz/saveWindows',
- // contentType: "application/json;charset=UTF-8",
- // dataType: "json",
- // data: JSON.stringify({"windowsNo": $("#windowsNum").val()}),
- // headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- // success: function (res) {
- // if (res == '401' || res == 401) {
- // window.location.href = '/thmz/login/view'
- // return;
- // }
- // $('#editWindowsModal').modal('hide');
- // if (res.code == 0) {
- // new PNotify({
- // title: '操作提示',
- // text: res.message,
- // type: 'success',
- // hide: true,
- // styling: 'bootstrap3'
- // });
- // } else {
- // new PNotify({
- // title: '错误提示',
- // text: res.message,
- // type: 'error',
- // hide: true,
- // styling: 'bootstrap3'
- // });
- // }
- // }
- // });
- // }
- //
- //
- //
- // /**
- // * 保存打印机
- // */
- // function savePrint() {
- // $.ajax({
- // type: "POST",
- // url: '/thmz/savePrintIndex',
- // contentType: "application/json;charset=UTF-8",
- // dataType: "json",
- // data: JSON.stringify({"printIndex": $("#printSelect").val()}),
- // headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- // success: function (res) {
- // if (res == '401' || res == 401) {
- // window.location.href = '/thmz/login/view'
- // return;
- // }
- // LODOP = getLodop();
- // LODOP.PRINT_INITA(6, 0, "92mm", "120mm", "泰和门诊发票打印");
- // LODOP.SET_PRINTER_INDEX($("#printSelect").val());
- // printIndex=$("#printSelect").val();
- // $('#editPrintModal').modal('hide');
- // if (res.code == 0) {
- // new PNotify({
- // title: '操作提示',
- // text: res.message,
- // type: 'success',
- // hide: true,
- // styling: 'bootstrap3'
- // });
- // } else {
- // new PNotify({
- // title: '错误提示',
- // text: res.message,
- // type: 'error',
- // hide: true,
- // styling: 'bootstrap3'
- // });
- // }
- // }
- // });
- // }
- /**
- * 查询默认打印机
- */
- function setPrint() {
- if (printIndex >= 0) {
- return;
- }
- $.ajax({
- type: "GET",
- url: '/thmz/getLastWindowsByCurrentUser',
- contentType: "application/json;charset=UTF-8",
- dataType: "json",
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- async: false,
- success: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- if (res.code == 0) {
- printIndex = res.data.printIndex;
- } else {
- printIndex = -1;
- }
- }
- });
- }
- /**
- * 退费操作
- */
- function refundFee(patientId, times, receiptNo, printFlag) {
- if (printFlag == 0) {
- new PNotify({
- title: '错误提示',
- text: '当前病人缴费记录发票还未打印,无法进行退费,请先打印该发票!',
- type: 'error',
- hide: true,
- styling: 'bootstrap3'
- });
- return;
- }
- $("#refundFeePrepare").text(0.00);
- $("#refundFeeDetailModal").modal();
- $("#refund_bill_item_group").removeClass("in").addClass("hide");
- $('#refund_fee_bill_table').bootstrapTable("destroy");
- initRefundFeeDetailTable(patientId, times, receiptNo);
- }
- /**
- * 初始化退费明细表格
- * @param patientId
- * @param times
- * @param receiptNo
- */
- function initRefundFeeDetailTable(patientId, times, receiptNo) {
- $("#patientIdRefund").val(patientId);
- $("#timesRefund").val(times);
- $("#receiptNoRefund").val(receiptNo);
- $('#refund_fee_detail_table').bootstrapTable("destroy");
- $('#refund_fee_detail_table').bootstrapTable({
- url: '/thmz/getRefundFeeDetail', //请求后台的URL(*)
- method: 'post', //请求方式(*)
- toolbar: '#toolbar', //工具按钮用哪个容器
- striped: true, //是否显示行间隔色
- cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
- pagination: false, //是否显示分页(*)
- sortable: true, //是否启用排序
- sortOrder: "asc", //排序方式
- // sortName: 'orderNo', //排序字段
- queryParams: queryParamsForRefundFee(patientId, times, receiptNo), //传递参数(*)
- sidePagination: "server", //分页方式:client客户端分页,server服务端分页(*)
- pageNumber: 1, //初始化加载第一页,默认第一页
- pageSize: 10, //每页的记录行数(*)
- pageList: [10, 25, 50, 100], //可供选择的每页的行数(*)
- search: false, //是否显示表格搜索,此搜索是客户端搜索,不会进服务端,所以,个人感觉意义不大
- strictSearch: true,
- showColumns: false, //是否显示所有的列
- showRefresh: false, //是否显示刷新按钮
- minimumCountColumns: 2, //最少允许的列数
- clickToSelect: true, //是否启用点击选中行
- uniqueId: "ID", //每一行的唯一标识,一般为主键列
- showToggle: false, //是否显示详细视图和列表视图的切换按钮
- cardView: false, //是否显示详细视图
- detailView: false,
- //rowStyle:rowStyle,//通过自定义函数设置行样式
- ajaxOptions: {
- headers: {
- 'Accept': 'application/json',
- 'Authorization': 'Bearer ' + localStorage.getItem("token")
- }
- },
- columns: [
- {
- checkbox: true,
- formatter: function (value, row, index) {
- if (row.confirmFlag == 1) {
- return {
- disabled: true, //设置是否可用
- checked: false//设置选中
- }
- }
- if (row.confirmFlag == 3) {
- //getRefundFee();
- return {
- disabled: true, //设置是否可用
- checked: true//设置选中
- }
- }
- }
- },
- {
- field: 'orderNo',
- title: '处方号',
- align: "center",
- valign: 'middle',
- formatter: function (value, row, index) {
- return Math.abs(value);
- }
- }, {
- field: '',
- title: '项目号',
- align: "center",
- valign: 'middle',
- formatter: function (value, row, index) {
- return index + 1;
- }
- }, {
- field: 'billItemCode',
- title: '分类名称',
- align: "center",
- valign: 'middle',
- }, {
- field: 'chargeItemCode',
- title: '收费编码',
- align: "center",
- valign: 'middle',
- }, {
- field: 'tcName',
- title: '项目',
- align: "center",
- valign: 'middle',
- },
- {
- field: 'quantity',
- title: '数量',
- align: "center",
- valign: 'middle'
- ,
- formatter: function (value, row, index) {
- return value * row.drugWin;
- }
- }, {
- field: 'unitPrice',
- title: '单价(元)',
- align: "center",
- valign: 'middle',
- formatter: function (value, row, index) {
- return value.toFixed(2);
- }
- }, {
- field: 'amount',
- title: '总金额(元)',
- align: "center",
- valign: 'middle',
- formatter: function (value, row, index) {
- return value.toFixed(2);
- }
- }, {
- field: 'confirmFlag',
- title: '确认标志',
- align: "center",
- valign: 'middle',
- formatter: function (value, row, index) {
- if (value == 0) {
- return "待确认";
- }
- if (value == 1) {
- return "已确认";
- }
- if (value == 3) {
- return "已取消";
- }
- if (value == 4) {
- return "已退费";
- }
- }
- }, {
- field: 'decAmount',
- title: '退药量',
- align: "center",
- valign: 'middle',
- // formatter: function (value, row, index) {
- // return value.toFixed(2);
- // }
- }, {
- field: 'execDept',
- title: '确认科室',
- align: "center",
- valign: 'middle'
- }, {
- field: 'confirmTime',
- title: '确认时间',
- align: "center",
- valign: 'middle',
- formatter: function (value, row, index) {
- if (value != null && value != "") {
- return format(value, "yyyy-MM-dd HH:mm:ss");
- }
- return "";
- }
- }
- ],
- //点击全选框时触发的操作
- onCheckAll: function (rows) {
- getRefundFee();
- },
- //取消所有
- onUncheckAll: function (row) {
- getRefundFee();
- },
- //点击每一个单选框时触发的操作
- onCheck: function (row) {
- getRefundFee();
- },
- //取消每一个单选框时对应的操作;
- onUncheck: function (row) {
- getRefundFee();
- },
- responseHandler: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- var ress = eval(res);
- if (ress.code == -1) {
- new PNotify({
- title: '错误提示',
- text: ress.message,
- type: 'error',
- hide: true,
- styling: 'bootstrap3'
- });
- return {
- "total": 0,//总页数
- "rows": {} //数据
- };
- }
- return {
- //"total": ress.pageViewVo.total,//总页数
- "rows": ress.data //数据
- };
- },
- //加载完成事件
- onLoadSuccess: function (data) {
- getRefundFee();
- }
- });
- }
- /**
- * 退费列表参数
- * @param patientId
- * @param times
- * @returns {{patientId: *, times: *}}
- */
- function queryParamsForRefundFee(patientId, times, receiptNo) {
- var temp = {
- patientId: patientId,
- times: times,
- receiptNo: receiptNo
- };
- return temp;
- };
- /**
- * 每次选择费用清单明细时计算实际应退金额
- */
- function getRefundFee() {
- extracted();
- if (chargeItemCodes == null) {
- $("#refundFeePrepare").text(0.00);
- return;
- }
- $.ajax({
- type: "POST",
- url: '/thmz/getNewListForRefundFee',
- contentType: "application/json;charset=UTF-8",
- dataType: "json",
- data: JSON.stringify({
- patientId: $("#patientIdRefund").val(),
- times: $("#timesRefund").val(),
- receiptNo: $("#receiptNoRefund").val(),
- chargeItemCodes: chargeItemCodes
- }),
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- success: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- if (res.code == 0) {
- $("#refundFeePrepare").text(res.pageViewVo.data[0].refundFee.toFixed(2));
- } else {
- new PNotify({
- title: '错误提示',
- text: res.message,
- type: 'error',
- hide: true,
- styling: 'bootstrap3'
- });
- }
- }
- });
- }
- /**
- * 发起预退费
- */
- function readyRefundFee() {
- extracted();
- $("#refundFeeModal").modal();
- initRefundChargeDetailTable(chargeItemCodes);
- $("#refundFeeDetailModal").modal("hide");
- }
- /**
- * 获取预退费金额
- * @returns {*}
- */
- function extracted() {
- var allSelecteds = $('#refund_fee_detail_table').bootstrapTable('getAllSelections');
- chargeItemCodes = null;
- if (allSelecteds != null && allSelecteds.length > 0) {
- for (var i = 0; i < allSelecteds.length; i++) {
- var temp = allSelecteds[i].orderNo + "_" + allSelecteds[i].itemNo + "_" + allSelecteds[i].chargeItemCode;
- if (chargeItemCodes == null) {
- chargeItemCodes = temp;
- } else {
- chargeItemCodes += "," + temp;
- }
- }
- }
- }
- /**
- * 初始化退费重收费明细表格
- */
- function initRefundChargeDetailTable(chargeItemCodes) {
- $('#refund_fee_table').bootstrapTable("destroy");
- $('#refund_fee_table').bootstrapTable({
- url: '/thmz/getNewListForRefundFee', //请求后台的URL(*)
- method: 'post', //请求方式(*)
- toolbar: '#toolbar', //工具按钮用哪个容器
- striped: true, //是否显示行间隔色
- cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
- pagination: false, //是否显示分页(*)
- sortable: true, //是否启用排序
- sortOrder: "asc", //排序方式
- // sortName: 'orderNo', //排序字段
- queryParams: queryParamsForRefundDetail(chargeItemCodes), //传递参数(*)
- sidePagination: "server", //分页方式:client客户端分页,server服务端分页(*)
- pageNumber: 1, //初始化加载第一页,默认第一页
- pageSize: 10, //每页的记录行数(*)
- pageList: [10, 25, 50, 100], //可供选择的每页的行数(*)
- search: false, //是否显示表格搜索,此搜索是客户端搜索,不会进服务端,所以,个人感觉意义不大
- strictSearch: true,
- showColumns: false, //是否显示所有的列
- showRefresh: false, //是否显示刷新按钮
- minimumCountColumns: 2, //最少允许的列数
- clickToSelect: true, //是否启用点击选中行
- uniqueId: "ID", //每一行的唯一标识,一般为主键列
- showToggle: false, //是否显示详细视图和列表视图的切换按钮
- cardView: false, //是否显示详细视图
- detailView: false,
- //rowStyle:rowStyle,//通过自定义函数设置行样式
- ajaxOptions: {
- headers: {
- 'Accept': 'application/json',
- 'Authorization': 'Bearer ' + localStorage.getItem("token")
- }
- },
- columns: [
- // {
- // checkbox: true
- // },
- {
- field: 'patientId',
- title: '患者编号',
- align: "center",
- valign: 'middle',
- }, {
- field: 'name',
- title: '患者姓名',
- align: "center",
- valign: 'middle',
- }, {
- field: 'oriAmount',
- title: '已收金额(元)',
- align: "center",
- valign: 'middle',
- }, {
- field: 'refundFee',
- title: '应退金额(元)',
- align: "center",
- valign: 'middle'
- }, {
- field: 'amount',
- title: '应收金额(元)',
- align: "center",
- valign: 'middle',
- formatter: function (value, row, index) {
- return Math.abs(value);
- }
- }, {
- title: '操作',
- align: "center",
- valign: 'middle',
- // sortable: true,
- formatter: function (value, row, index) {
- var str = "";
- if (row.amount == 0 || row.amount == null || row.amount == undefined) {
- str = '<button type="button" class="can-not-used" title="费用明细" ><i id="plusOrMinus" class="fa fa-plus"></i></button>';
- } else {
- str = '<button type="button" class="registration-no-color-foot-button" title="费用明细" onclick="initMzChargeDetailByBillItem(true)"><i id="plusOrMinus" class="fa fa-plus"></i></button>';
- }
- str += '<button type="button" class="registration-no-color-foot-button"title="确认退费" onclick="saveRefundFee()"><i class="fa fa-check"></i></button>';
- return str;
- }
- }
- ],
- responseHandler: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- var ress = eval(res);
- if (ress.code == -1) {
- new PNotify({
- title: '错误提示',
- text: ress.message,
- type: 'error',
- hide: true,
- styling: 'bootstrap3'
- });
- return {
- "total": 0,//总页数
- "rows": {} //数据
- };
- }
- $("#oriAmount").text(ress.pageViewVo.data[0].oriAmount);
- $("#newAmount").text(ress.pageViewVo.data[0].amount);
- $("#refundAmount").text(ress.pageViewVo.data[0].refundFee);
- return {
- "total": ress.pageViewVo.total,//总页数
- "rows": ress.pageViewVo.data //数据
- };
- },
- });
- }
- /**
- * 构建列表查询参数
- * @param chargeItemCodes
- * @returns {{patientId: string | number | string[] | undefined | jQuery, times: string | number | string[] | undefined | jQuery, billItemCode: number}}
- */
- function queryParamsForRefundDetail(chargeItemCodes) {
- return {
- patientId: $("#patientIdRefund").val(),
- times: $("#timesRefund").val(),
- receiptNo: $("#receiptNoRefund").val(),
- chargeItemCodes: chargeItemCodes
- };
- };
- /**
- * 关闭预退费窗口
- */
- function closeRefundFeeDetailModal() {
- $("#refundFeeDetailModal").modal("hide");
- }
- /**
- * 提交退费操作
- */
- function saveRefundFee() {
- var params = queryParamsForRefundByBillItem(null);
- $.ajax({
- type: "POST",
- url: '/thmz/saveRefundFee',
- contentType: "application/json;charset=UTF-8",
- dataType: "json",
- data: JSON.stringify(params),
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- success: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- if (res.code == 0) {
- new PNotify({
- title: '操作提示',
- text: res.message,
- type: 'success',
- hide: true,
- styling: 'bootstrap3'
- });
- $("#refundFeeModal").modal("hide");
- if (res.times > 0) {
- prn1Print(res.patientId, res.times, false, 1);
- } else {
- initFeeTable();
- }
- } else {
- new PNotify({
- title: '错误提示',
- text: res.message,
- type: 'error',
- hide: true,
- styling: 'bootstrap3'
- });
- }
- }
- });
- }
- /**
- * 清空查询条件
- */
- function cleanParams() {
- $("#deptNoParam").selectpicker('val', null);//默认选中
- $("#deptNoParam").selectpicker('refresh');
- $("#doctorParam").selectpicker('val', null);//默认选中
- $("#doctorParam").selectpicker('refresh');
- $("#cardNo").val(null);
- $("#name").val(null);
- $('#reportrange span').html(moment().format('YYYY-MM-DD') + ' - ' + moment().format('YYYY-MM-DD'));
- $("#patientId").val(null);
- //默认光标在卡号输入框
- $("#cardNo").focus();
- $("#serialNo").val(null);
- $("#ownData").removeAttr("checked");
- }
- /**
- * 增加收费方式
- */
- function addPayType(id) {
- // var arr = $("#payForm").find("div.pay-item");
- // if (arr.length > 0) {
- // for (var i = 0; i < arr.length; i++) {
- // var temp = parseFloat($(arr[i]).find("input").val());
- // if (temp == 0) {
- // new PNotify({
- // title: '错误提示',
- // text: "存在未使用的收款方式,请不要重复添加!",
- // type: 'error',
- // hide: true,
- // styling: 'bootstrap3'
- // });
- // return;
- // }
- // }
- // }
- var payTypeId = null;
- if (id != undefined && id != null) {
- payTypeId = id;
- } else {
- var payTypeIndex = $("#payTypeIndex").val();
- payTypeId = "payType_" + payTypeIndex;
- }
- var html = '<div class="item form-group pay-item"><div class="col-md-12 col-sm-12 col-xs-12"><div class="col-md-2 col-sm-2 col-xs-12"></div><label class="col-md-3 col-sm-3 col-xs-12"><select class="form-control selectpicker show-tick" required="true" id="' + payTypeId + '" onchange="checkFee(false)"></select></label><div class="col-md-3 col-sm-3 col-xs-12"><input class="form-control col-md-5 col-xs-12" type="number" data-placement="bottom-right" min="0" onchange="checkFee()"></div><div class="col-md-1 col-sm-1 col-xs-12" style="line-height: 34px;">元 <a style="line-height: 34px;cursor: pointer;" onclick="closeThisParent(this)"><i class="fa fa-close"></i></a></div></div></div>';
- $("#changeAmountParent").before(html);
- initChequeType(payTypeId)
- if (payTypeIndex != undefined && payTypeIndex != null) {
- payTypeIndex = Add(payTypeIndex, 1);
- $("#payTypeIndex").val(payTypeIndex);
- }
- $("#addPayType").parent().removeClass("in").addClass("hide");
- }
- // /**
- // * 取消费用上传
- // */
- // function cancelFee() {
- // var patientId = $("#patientIdHaveTally").val();
- // var times = $("#timesHaveTally").val();
- // var receiptNo = $("#receiptNoHaveTally").val();
- // $.ajax({
- // type: "POST",
- // url: '/thmz/cancelTmFee',
- // contentType: "application/json;charset=UTF-8",
- // dataType: "json",
- // data: JSON.stringify({"patientId": patientId, "times": times, "receiptNo": receiptNo}),
- // headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- // async: false,
- // success: function (res) {
- // if (res == '401' || res == 401) {
- // window.location.href = '/thmz/login/view'
- // return;
- // }
- // if (res.code == 0) {
- // $("#fundPay").val(0);
- // } else {
- // new PNotify({
- // title: '错误提示',
- // text: res.message,
- // type: 'error',
- // hide: true,
- // styling: 'bootstrap3'
- // });
- // }
- // }
- // });
- // }
- /**
- * 查询当前门诊缴费订单的所有缴费方式列表
- * @param patientId
- * @param times
- * @param receiptNo
- */
- function showChequType(patientId, times, receiptNo) {
- $("#depositFileModal").modal();
- $('#deposit_file_detail_table').bootstrapTable("destroy");
- $('#deposit_file_detail_table').bootstrapTable({
- url: '/thmz/getAllDepositFileForThisTime?patientId=' + patientId + "×=" + times + "&receiptNo=" + Math.abs(receiptNo), //请求后台的URL(*)
- method: 'get', //请求方式(*)
- toolbar: '#toolbar', //工具按钮用哪个容器
- striped: true, //是否显示行间隔色
- cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
- pagination: false, //是否显示分页(*)
- sortable: true, //是否启用排序
- sortOrder: "asc", //排序方式
- sidePagination: "client", //分页方式:client客户端分页,server服务端分页(*)
- pageNumber: 1, //初始化加载第一页,默认第一页
- pageSize: 5, //每页的记录行数(*)
- pageList: [10, 25, 50, 100], //可供选择的每页的行数(*)
- search: false, //是否显示表格搜索,此搜索是客户端搜索,不会进服务端,所以,个人感觉意义不大
- strictSearch: true,
- showColumns: false, //是否显示所有的列
- showRefresh: false, //是否显示刷新按钮
- minimumCountColumns: 2, //最少允许的列数
- clickToSelect: true, //是否启用点击选中行
- uniqueId: "ID", //每一行的唯一标识,一般为主键列
- showToggle: false, //是否显示详细视图和列表视图的切换按钮
- cardView: false, //是否显示详细视图
- detailView: false,
- //rowStyle:rowStyle,//通过自定义函数设置行样式
- ajaxOptions: {
- headers: {
- 'Accept': 'application/json',
- 'Authorization': 'Bearer ' + localStorage.getItem("token")
- }
- },
- columns: [
- // {
- // checkbox: true,
- // },
- {
- field: 'patientId',
- title: '病人编号',
- align: "center",
- valign: 'middle'
- }, {
- field: 'times',
- title: '就诊次数',
- align: "center",
- valign: 'middle',
- }, {
- field: 'amount',
- title: '支付金额(元)',
- align: "center",
- valign: 'middle',
- formatter: function (value, row, index) {
- return value.toFixed(2);
- }
- },
- {
- field: 'chequeTypeName',
- title: '支付方式',
- align: "center",
- valign: 'middle'
- }
- ],
- onDblClickRow: function (row) {
- editChequType(row.receiptSn, row.chequeType, row.dcountNo, row.chequeTypeName);
- },
- responseHandler: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- var ress = eval(res);
- if (ress.code == -1) {
- new PNotify({
- title: '错误提示',
- text: ress.message,
- type: 'error',
- hide: true,
- styling: 'bootstrap3'
- });
- return {
- "total": 0,//总页数
- "rows": {} //数据
- };
- }
- if (ress.data == null || ress.data.length == 0) {
- $("#tallyDetailModal").modal("hide");
- }
- return {
- "rows": ress.data //数据
- };
- },
- });
- }
- /**
- * 修改收款方式
- * @param patientId
- * @param times
- * @param paymode
- */
- function editChequType(receiptSn, chequType, dcountNo, chequeTypeName) {
- var message = "当前病人本次门诊缴费的支付方式为【" + chequeTypeName + "】,确定需要修改吗?";
- if (dcountNo == 1) {
- message = "当前病人本次门诊缴费的支付方式为【" + chequeTypeName + "】,且本次缴费已经结算,确定需要修改吗?如仍需继续修改,会影响已经结算的报表,请重新打印本次缴费所在日期的【日结报表】!";
- }
- $("#editPayModeTip").html(message);
- $("#receiptSn").val(receiptSn);
- $("#chequType").val(chequType);
- $('#payTypeEditPayMode').selectpicker('val', 1);
- $('#payTypeEditPayMode').selectpicker('refresh');
- $("#editPayModeModal").modal();
- $("#depositFileModal").modal("hide");
- }
- /**
- * 提交修改收款方式
- */
- function saveEditPayMode() {
- $.ajax({
- type: "GET",
- url: '/thmz/updateChequType?oldChequeType=' + $("#chequType").val() + "&receiptSn=" + $("#receiptSn").val() + "&chequeType=" + $("#payTypeEditPayMode").val(),
- contentType: "application/json;charset=UTF-8",
- dataType: "json",
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- success: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- if (res.code == 0) {
- successMesage(res);
- clearEditPayMode();
- $("#editPayModeModal").modal("hide");
- } else if (res.code == -1) {
- new PNotify({
- title: '错误提示',
- text: res.message,
- type: 'error',
- hide: true,
- styling: 'bootstrap3'
- });
- }
- }
- });
- }
- /**
- * 清空
- */
- function clearEditPayMode() {
- $("#receiptSn").val(null);
- $("#chequType").val(null);
- }
- //
- // /**
- // * 反写备份表的数据到正式表中,记账的数据在备分表
- // * @param patientId
- // * @param times
- // * @param receiptNo
- // */
- // function reInsertDetailModal(patientId,times ,receiptNo) {
- // $.ajax({
- // type: "POST",
- // url: '/thmz/reSaveDetailForByjz',
- // contentType: "application/json;charset=UTF-8",
- // dataType: "json",
- // data: JSON.stringify({"patientId": patientId, "times": times, "receiptNo": receiptNo}),
- // headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- // async: false,
- // success: function (res) {
- // if (res == '401' || res == 401) {
- // window.location.href = '/thmz/login/view'
- // return;
- // }
- // if (res.code == 0) {
- // successMesage(res);
- // initFeeTable();
- // } else {
- // new PNotify({
- // title: '错误提示',
- // text: res.message,
- // type: 'error',
- // hide: true,
- // styling: 'bootstrap3'
- // });
- // }
- // }
- // });
- // }
- /**
- * 医保电子凭证读卡
- */
- function siReadCard() {
- $.ajax({
- type: "GET",
- url: 'http://localhost:8321/readcard/entry?param=qrcode_01101',
- contentType: "application/json;charset=UTF-8",
- dataType: "json",
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- success: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- //console.log(res);
- if (res.code == 200) {
- var data = JSON.parse(res.data);
- queryUserInfoBySocialNoNotFillPatient('cardNo', "" + data.data.idNo + "", initFeeTable, null);
- } else {
- errorMesage(res);
- }
- }
- });
- // window.open('ReadCard://'+prm, '_self')
- }
- /**
- * 读卡类型改变事件
- */
- function mztczfSiReadCardTypeChange() {
- var grzhzf = $("#grzhzf").val();
- if (grzhzf == null || grzhzf == "") {
- errorMesageSimaple("请先选择是否使用个人账户余额支付剩余门诊费用!")
- $('#mztczfSiReadCardType').selectpicker('val', null);
- $('#mztczfSiReadCardType').selectpicker('refresh');
- return;
- }
- var mztczfSiReadCardType = $("#mztczfSiReadCardType").val();
- if (mztczfSiReadCardType == null || mztczfSiReadCardType == "") {
- return;
- }
- var url = "http://localhost:8321/readcard/entry?param=";
- if (mztczfSiReadCardType == "03") {
- url+='sicard_01101';
- } else if (mztczfSiReadCardType == "01") {
- url+= 'qrcode_01101';
- } else if (mztczfSiReadCardType == "02") {
- url+= 'idcard_01101';
- }
- $.ajax({
- type: "GET",
- url: url,
- contentType: "application/json;charset=UTF-8",
- dataType: "json",
- headers: {
- 'Accept': 'application/json',
- 'Authorization': 'Bearer ' + localStorage.getItem("token")
- },
- success: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- //console.log(res);
- if (res.code == 200) {
- if(mztczfSiReadCardType == "01"){
- var data = JSON.parse(res.data);
- $("#readCardResult").val(JSON.stringify(data.data));
- }else {
- $("#readCardResult").val(res.data);
- }
- successMesageSimaple("读卡成功,可以进行医保结算操作。");
- $("#mztczfSiReadCardModal").modal("hide");
- } else {
- warningMesageSimaple("读卡失败,可以稍后重试或者自费结算(不享受门诊统筹)!")
- console.log(res);
- //errorMesage(res);
- }
- },
- error: function (XMLHttpRequest, textStatus, errorThrown) {
- warningMesageSimaple("读卡异常,可以稍后重试或者自费结算(不享受门诊统筹)!")
- }
- });
- }
- /**
- * 打开读卡类型弹窗
- */
- function mztczfSiReadCardTypeModel() {
- $("#readCardResult").val(null);
- $('#mztczfSiReadCardType').selectpicker('val', null);
- $('#mztczfSiReadCardType').selectpicker('refresh');
- $('#grzhzf').selectpicker('val', null);
- $('#grzhzf').selectpicker('refresh');
- $("#mztczfSiReadCardModal").modal();
- }
- /**
- * 医保结算
- * @param patientId
- * @param times
- */
- function directRegistration(patientId, times) {
- $.ajax({
- type: "POST",
- url: '/thmz/directRegistration',
- contentType: "application/json;charset=UTF-8",
- dataType: "json",
- data: JSON.stringify({
- patientId: patientId,
- times: times,
- readCardResult: $("#readCardResult").val(),
- grzhzf: $("#grzhzf").val(),
- readCardType:$("#mztczfSiReadCardType").val()
- }),
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
- success: function (res) {
- if (res == '401' || res == 401) {
- window.location.href = '/thmz/login/view'
- return;
- }
- if (res.code == 0) {
- successMesage(res);
- } else {
- errorMesage(res);
- }
- }
- });
- }
|