|
|
@@ -0,0 +1,921 @@
|
|
|
+//@ sourceURL=daily_repeat_print.js
|
|
|
+var LODOP; //声明为全局变量
|
|
|
+//默认打印机下标
|
|
|
+var printIndex = -1;
|
|
|
+$(function () {
|
|
|
+ //init_daterangepicker();
|
|
|
+ daterangepicker(getAllOperator);
|
|
|
+ // initFeeTable();
|
|
|
+ //重置查询参数
|
|
|
+ $('#btn_clean').click(function () {
|
|
|
+ cleanParams();
|
|
|
+ });
|
|
|
+ //初始化页面上面的按钮事件
|
|
|
+ $("#btn_daily").click(function (t) {
|
|
|
+ print();
|
|
|
+ });
|
|
|
+
|
|
|
+ setTimeout(function () {
|
|
|
+ getLodop();
|
|
|
+ }, 400);
|
|
|
+
|
|
|
+ $(".selectpicker").selectpicker({
|
|
|
+ dropuAuto: false
|
|
|
+ });
|
|
|
+});
|
|
|
+
|
|
|
+/**
|
|
|
+ * 列表类型按钮切换事件
|
|
|
+ * @param object
|
|
|
+ */
|
|
|
+function reportButtonChange(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();
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 初始化收费表格
|
|
|
+ */
|
|
|
+function initFeeTable() {
|
|
|
+ $('#tb_table').bootstrapTable("destroy");
|
|
|
+ $("#report_table").removeClass("in").addClass("hide");
|
|
|
+ var payMarkGroup = getIndex("pay_mark_group");
|
|
|
+ if (payMarkGroup == 0) {
|
|
|
+ getRjbb();
|
|
|
+ } else if (payMarkGroup == 1) {
|
|
|
+ getsfqd();
|
|
|
+ } else if (payMarkGroup == 2) {
|
|
|
+ getGhqd();
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 获取日结报表
|
|
|
+ */
|
|
|
+function getRjbb() {
|
|
|
+ $("#report_table").removeClass("hide").addClass("in");
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ url: '/thmz/getFullChargeReprint',
|
|
|
+ contentType: "application/json;charset=UTF-8",
|
|
|
+ dataType: "json",
|
|
|
+ headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
+ data: JSON.stringify({opId: $('#cashParam').val(),dcountDate: $('#rjList').val()}),
|
|
|
+ success: function (res) {
|
|
|
+ if (res == '401' || res == 401) {
|
|
|
+ window.location.href = '/thmz/login/view'
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (res.code == 0) {
|
|
|
+ $("#userIdCode").html(res.user.userCode);
|
|
|
+ $("#username").html(res.user.userName);
|
|
|
+ $("#dcountDate").html(format($("#rjList").val(), "yyyy-MM-dd HH:mm:ss"));
|
|
|
+ $("#charge1").html(res.mzReceiptSerial.charge1.toFixed(2));
|
|
|
+ $("#charge2").html(res.mzReceiptSerial.charge2.toFixed(2));
|
|
|
+ $("#charge3").html(res.mzReceiptSerial.charge3.toFixed(2));
|
|
|
+ $("#charge4").html(res.mzReceiptSerial.charge4.toFixed(2));
|
|
|
+ $("#charge5").html(res.mzReceiptSerial.charge5.toFixed(2));
|
|
|
+ $("#charge6").html(res.mzReceiptSerial.charge6.toFixed(2));
|
|
|
+ $("#charge7").html(res.mzReceiptSerial.charge7.toFixed(2));
|
|
|
+ $("#charge8").html(res.mzReceiptSerial.charge8.toFixed(2));
|
|
|
+ $("#charge9").html(res.mzReceiptSerial.charge9.toFixed(2));
|
|
|
+ $("#charge10").html(res.mzReceiptSerial.charge10.toFixed(2));
|
|
|
+ $("#charge11").html(res.mzReceiptSerial.charge11.toFixed(2));
|
|
|
+ $("#charge12").html(res.mzReceiptSerial.charge12.toFixed(2));
|
|
|
+ $("#charge13").html(res.mzReceiptSerial.charge13.toFixed(2));
|
|
|
+ $("#charge14").html(res.mzReceiptSerial.charge14.toFixed(2));
|
|
|
+ $("#charge15").html(res.mzReceiptSerial.charge15.toFixed(2));
|
|
|
+ $("#charge16").html(res.mzReceiptSerial.charge16.toFixed(2));
|
|
|
+ $("#charge17").html(res.mzReceiptSerial.charge17.toFixed(2));
|
|
|
+ $("#charge18").html(res.mzReceiptSerial.charge18.toFixed(2));
|
|
|
+ $("#charge19").html(res.mzReceiptSerial.charge19.toFixed(2));
|
|
|
+ $("#charge20").html(res.mzReceiptSerial.charge20.toFixed(2));
|
|
|
+ $("#totalCharge").html(res.mzReceiptSerial.totalCharge.toFixed(2));
|
|
|
+
|
|
|
+ $("#userIdCode_p").html(res.user.userCode);
|
|
|
+ $("#username_p").html(res.user.userName);
|
|
|
+ $("#dcountDate_p").html(format($("#rjList").val(), "yyyy-MM-dd HH:mm:ss"));
|
|
|
+ $("#charge1_p").html(res.mzReceiptSerial.charge1.toFixed(2));
|
|
|
+ $("#charge2_p").html(res.mzReceiptSerial.charge2.toFixed(2));
|
|
|
+ $("#charge3_p").html(res.mzReceiptSerial.charge3.toFixed(2));
|
|
|
+ $("#charge4_p").html(res.mzReceiptSerial.charge4.toFixed(2));
|
|
|
+ $("#charge5_p").html(res.mzReceiptSerial.charge5.toFixed(2));
|
|
|
+ $("#charge6_p").html(res.mzReceiptSerial.charge6.toFixed(2));
|
|
|
+ $("#charge7_p").html(res.mzReceiptSerial.charge7.toFixed(2));
|
|
|
+ $("#charge8_p").html(res.mzReceiptSerial.charge8.toFixed(2));
|
|
|
+ $("#charge9_p").html(res.mzReceiptSerial.charge9.toFixed(2));
|
|
|
+ $("#charge10_p").html(res.mzReceiptSerial.charge10.toFixed(2));
|
|
|
+ $("#charge11_p").html(res.mzReceiptSerial.charge11.toFixed(2));
|
|
|
+ $("#charge12_p").html(res.mzReceiptSerial.charge12.toFixed(2));
|
|
|
+ $("#charge13_p").html(res.mzReceiptSerial.charge13.toFixed(2));
|
|
|
+ $("#charge14_p").html(res.mzReceiptSerial.charge14.toFixed(2));
|
|
|
+ $("#charge15_p").html(res.mzReceiptSerial.charge15.toFixed(2));
|
|
|
+ $("#charge16_p").html(res.mzReceiptSerial.charge16.toFixed(2));
|
|
|
+ $("#charge17_p").html(res.mzReceiptSerial.charge17.toFixed(2));
|
|
|
+ $("#charge18_p").html(res.mzReceiptSerial.charge18.toFixed(2));
|
|
|
+ $("#charge19_p").html(res.mzReceiptSerial.charge19.toFixed(2));
|
|
|
+ $("#charge20_p").html(res.mzReceiptSerial.charge20.toFixed(2));
|
|
|
+ $("#totalCharge_p").html(res.mzReceiptSerial.totalCharge.toFixed(2));
|
|
|
+
|
|
|
+ //现金收款
|
|
|
+ $("#xjbs").html(res.chargeCountVo.xjbs);
|
|
|
+ $("#xjbs_p").html(res.chargeCountVo.xjbs);
|
|
|
+ if (res.chargeCountVo.xjsk != null) {
|
|
|
+ $("#xjsk").html(res.chargeCountVo.xjsk.toFixed(2));
|
|
|
+ $("#xjsk_p").html(res.chargeCountVo.xjsk.toFixed(2));
|
|
|
+ }
|
|
|
+ $("#xjtfbs").html(res.chargeCountVo.xjtfbs);
|
|
|
+ $("#xjtfbs_p").html(res.chargeCountVo.xjtfbs);
|
|
|
+ if (res.chargeCountVo.xjtf != null) {
|
|
|
+ $("#xjtf").html(res.chargeCountVo.xjtf.toFixed(2));
|
|
|
+ $("#xjtf_p").html(res.chargeCountVo.xjtf.toFixed(2));
|
|
|
+ }
|
|
|
+ $("#xjssbs").html(res.chargeCountVo.xjssbs);
|
|
|
+ $("#xjssbs_p").html(res.chargeCountVo.xjssbs);
|
|
|
+ if (res.chargeCountVo.xjss != null) {
|
|
|
+ $("#xjss").html(res.chargeCountVo.xjss.toFixed(2));
|
|
|
+ $("#xjss_p").html(res.chargeCountVo.xjss.toFixed(2));
|
|
|
+ }
|
|
|
+ //银行卡收款
|
|
|
+ $("#yhsbs").html(res.chargeCountVo.yhsbs);
|
|
|
+ $("#yhsbs_p").html(res.chargeCountVo.yhsbs);
|
|
|
+ if (res.chargeCountVo.yhksk != null) {
|
|
|
+ $("#yhksk").html(res.chargeCountVo.yhksk.toFixed(2));
|
|
|
+ $("#yhksk_p").html(res.chargeCountVo.yhksk.toFixed(2));
|
|
|
+ }
|
|
|
+ $("#yhktfbs").html(res.chargeCountVo.yhktfbs);
|
|
|
+ $("#yhktfbs_p").html(res.chargeCountVo.yhktfbs);
|
|
|
+ if (res.chargeCountVo.yhktf != null) {
|
|
|
+ $("#yhktf").html(res.chargeCountVo.yhktf.toFixed(2));
|
|
|
+ $("#yhktf_p").html(res.chargeCountVo.yhktf.toFixed(2));
|
|
|
+ }
|
|
|
+ $("#yhkssbs").html(res.chargeCountVo.yhkssbs);
|
|
|
+ $("#yhkssbs_p").html(res.chargeCountVo.yhkssbs);
|
|
|
+ if (res.chargeCountVo.yhkss != null) {
|
|
|
+ $("#yhkss").html(res.chargeCountVo.yhkss.toFixed(2));
|
|
|
+ $("#yhkss_p").html(res.chargeCountVo.yhkss.toFixed(2));
|
|
|
+ }
|
|
|
+ //支付宝收款
|
|
|
+ $("#zfbbs").html(res.chargeCountVo.zfbbs);
|
|
|
+ $("#zfbbs_p").html(res.chargeCountVo.zfbbs);
|
|
|
+ if (res.chargeCountVo.zfbsk != null) {
|
|
|
+ $("#zfbsk").html(res.chargeCountVo.zfbsk.toFixed(2));
|
|
|
+ $("#zfbsk_p").html(res.chargeCountVo.zfbsk.toFixed(2));
|
|
|
+ }
|
|
|
+ $("#zfbtfbs").html(res.chargeCountVo.zfbtfbs);
|
|
|
+ $("#zfbtfbs_p").html(res.chargeCountVo.zfbtfbs);
|
|
|
+ if (res.chargeCountVo.zfbtf != null) {
|
|
|
+ $("#zfbtf").html(res.chargeCountVo.zfbtf.toFixed(2));
|
|
|
+ $("#zfbtf_p").html(res.chargeCountVo.zfbtf.toFixed(2));
|
|
|
+ }
|
|
|
+ $("#zfbssbs").html(res.chargeCountVo.zfbssbs);
|
|
|
+ $("#zfbssbs_p").html(res.chargeCountVo.zfbssbs);
|
|
|
+ if (res.chargeCountVo.zfbss != null) {
|
|
|
+ $("#zfbss").html(res.chargeCountVo.zfbss.toFixed(2));
|
|
|
+ $("#zfbss_p").html(res.chargeCountVo.zfbss.toFixed(2));
|
|
|
+ }
|
|
|
+ //微信收款
|
|
|
+ $("#wxbs").html(res.chargeCountVo.wxbs);
|
|
|
+ $("#wxbs_p").html(res.chargeCountVo.wxbs);
|
|
|
+ if (res.chargeCountVo.wxsk != null) {
|
|
|
+ $("#wxsk").html(res.chargeCountVo.wxsk.toFixed(2));
|
|
|
+ $("#wxsk_p").html(res.chargeCountVo.wxsk.toFixed(2));
|
|
|
+ }
|
|
|
+ $("#wxtfbs").html(res.chargeCountVo.wxtfbs);
|
|
|
+ $("#wxtfbs_p").html(res.chargeCountVo.wxtfbs);
|
|
|
+ if (res.chargeCountVo.wxtf != null) {
|
|
|
+ $("#wxtf").html(res.chargeCountVo.wxtf.toFixed(2));
|
|
|
+ }
|
|
|
+ $("#wxssbs").html(res.chargeCountVo.wxssbs);
|
|
|
+ $("#wxssbs_p").html(res.chargeCountVo.wxssbs);
|
|
|
+ if (res.chargeCountVo.wxss != null) {
|
|
|
+ $("#wxss").html(res.chargeCountVo.wxss.toFixed(2));
|
|
|
+ $("#wxss_p").html(res.chargeCountVo.wxss.toFixed(2));
|
|
|
+ }
|
|
|
+ //记账绿色通道收款
|
|
|
+ $("#zfbs").html(res.chargeCountVo.zfbs);
|
|
|
+ $("#zfbs_p").html(res.chargeCountVo.zfbs);
|
|
|
+ if (res.chargeCountVo.zfsk != null) {
|
|
|
+ $("#zfsk").html(res.chargeCountVo.zfsk.toFixed(2));
|
|
|
+ $("#zfsk_p").html(res.chargeCountVo.zfsk.toFixed(2));
|
|
|
+ }
|
|
|
+ $("#zftfbs").html(res.chargeCountVo.zftfbs);
|
|
|
+ $("#zftfbs_p").html(res.chargeCountVo.zftfbs);
|
|
|
+ if (res.chargeCountVo.zftf != null) {
|
|
|
+ $("#zftf").html(res.chargeCountVo.zftf.toFixed(2));
|
|
|
+ $("#zftf_p").html(res.chargeCountVo.zftf.toFixed(2));
|
|
|
+ }
|
|
|
+ $("#zfssbs").html(res.chargeCountVo.zfssbs);
|
|
|
+ $("#zfssbs_p").html(res.chargeCountVo.zfssbs);
|
|
|
+ if (res.chargeCountVo.zfss != null) {
|
|
|
+ $("#zfss").html(res.chargeCountVo.zfss.toFixed(2));
|
|
|
+ $("#zfss_p").html(res.chargeCountVo.zfss.toFixed(2));
|
|
|
+ }
|
|
|
+ //医保卡收款
|
|
|
+ $("#sybbs").html(res.chargeCountVo.sybbs);
|
|
|
+ $("#sybbs_p").html(res.chargeCountVo.sybbs);
|
|
|
+ if (res.chargeCountVo.sybksk != null) {
|
|
|
+ $("#sybksk").html(res.chargeCountVo.sybksk.toFixed(2));
|
|
|
+ $("#sybksk_p").html(res.chargeCountVo.sybksk.toFixed(2));
|
|
|
+ }
|
|
|
+ $("#sybtfbs").html(res.chargeCountVo.sybtfbs);
|
|
|
+ $("#sybtfbs_p").html(res.chargeCountVo.sybtfbs);
|
|
|
+ if (res.chargeCountVo.sybtf != null) {
|
|
|
+ $("#sybtf").html(res.chargeCountVo.sybtf.toFixed(2));
|
|
|
+ $("#sybtf_p").html(res.chargeCountVo.sybtf.toFixed(2));
|
|
|
+ }
|
|
|
+ $("#sybssbs").html(res.chargeCountVo.sybssbs);
|
|
|
+ $("#sybssbs_p").html(res.chargeCountVo.sybssbs);
|
|
|
+ if (res.chargeCountVo.sybkss != null) {
|
|
|
+ $("#sybkss").html(res.chargeCountVo.sybkss.toFixed(2));
|
|
|
+ $("#sybkss_p").html(res.chargeCountVo.sybkss.toFixed(2));
|
|
|
+ }
|
|
|
+ //总计收款
|
|
|
+ $("#zjbs").html(res.chargeCountVo.zjbs);
|
|
|
+ $("#zjbs_p").html(res.chargeCountVo.zjbs);
|
|
|
+ if (res.chargeCountVo.zjsk != null) {
|
|
|
+ $("#zjsk").html(res.chargeCountVo.zjsk.toFixed(2));
|
|
|
+ $("#zjsk_p").html(res.chargeCountVo.zjsk.toFixed(2));
|
|
|
+ }
|
|
|
+ $("#ztfbs").html(res.chargeCountVo.ztfbs);
|
|
|
+ $("#ztfbs_p").html(res.chargeCountVo.ztfbs);
|
|
|
+ if (res.chargeCountVo.zjtk != null) {
|
|
|
+ $("#zjtk").html(res.chargeCountVo.zjtk.toFixed(2));
|
|
|
+ $("#zjtk_p").html(res.chargeCountVo.zjtk.toFixed(2));
|
|
|
+ }
|
|
|
+ $("#zjssbs").html(res.chargeCountVo.zjssbs);
|
|
|
+ $("#zjssbs_p").html(res.chargeCountVo.zjssbs);
|
|
|
+ if (res.chargeCountVo.zjss != null) {
|
|
|
+ $("#zjss").html(res.chargeCountVo.zjss.toFixed(2));
|
|
|
+ $("#zjss_p").html(res.chargeCountVo.zjss.toFixed(2));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (res.chargeCountVo.sjhj != null) {
|
|
|
+ $("#sjhj").html(res.chargeCountVo.sjhj.toFixed(2));
|
|
|
+ $("#sjhj_p").html(res.chargeCountVo.sjhj.toFixed(2));
|
|
|
+ }
|
|
|
+ $("#sjhjdx").html(res.chargeCountVo.sjhjdx);
|
|
|
+ $("#sjhjdx_p").html(res.chargeCountVo.sjhjdx);
|
|
|
+ if (res.chargeCountVo.zfss != null) {
|
|
|
+ $("#zfsshj").html(res.chargeCountVo.zfss.toFixed(2));
|
|
|
+ $("#zfsshj_p").html(res.chargeCountVo.zfss.toFixed(2));
|
|
|
+ }
|
|
|
+ $("#zfdx").html(res.chargeCountVo.zfdx);
|
|
|
+ $("#zfdx_p").html(res.chargeCountVo.zfdx);
|
|
|
+ if (res.chargeCountVo.zj != null) {
|
|
|
+ $("#zj").html(res.chargeCountVo.zj.toFixed(2));
|
|
|
+ $("#zj_p").html(res.chargeCountVo.zj.toFixed(2));
|
|
|
+ }
|
|
|
+ $("#zjdx").html(res.chargeCountVo.zjdx);
|
|
|
+ $("#zjdx_p").html(res.chargeCountVo.zjdx);
|
|
|
+
|
|
|
+ $("#sfReceiptBills").html(null);
|
|
|
+ $("#sfReceiptBills_p_table").html(null);
|
|
|
+ if (res.sfReceiptBills != null && res.sfReceiptBills.length > 0) {
|
|
|
+ var html = '<div class="col-md-12 col-sm-12 col-xs-12">所用票号:</div>';
|
|
|
+ var html_p = '';
|
|
|
+ for (var i = 0; i < res.sfReceiptBills.length; i++) {
|
|
|
+ html += '<div class="col-md-3 col-sm-3 col-xs-12">' + res.sfReceiptBills[i] + '</div>';
|
|
|
+
|
|
|
+ if (i % 4 == 0) {
|
|
|
+ html_p += '<tr>';
|
|
|
+ }
|
|
|
+ html_p += '<td>' + res.sfReceiptBills[i] + '</td>';
|
|
|
+ if (i % 4 == 3 || i == res.sfReceiptBills.length - 1) {
|
|
|
+ html_p += '</tr>';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $("#sfReceiptBills").html(html);
|
|
|
+ $("#sfReceiptBills_p_table").html(html_p);
|
|
|
+ }
|
|
|
+ $("#sffps").html(res.sffps);
|
|
|
+ $("#tpzs").html(res.tpzs);
|
|
|
+ $("#zffps").html(res.zffps);
|
|
|
+ $("#sffps_p").html(res.sffps);
|
|
|
+ $("#tpzs_p").html(res.tpzs);
|
|
|
+ $("#zffps_p").html(res.zffps);
|
|
|
+ if (res.sfzffpmx.length == 0) {
|
|
|
+ $(".sfzffpmx").removeClass("in").addClass("hide");
|
|
|
+ $("#sfzffpmx_p_table").css("display", "none");
|
|
|
+ $("#sfzffpmx_table").css("display", "none");
|
|
|
+ } else if (res.sfzffpmx.length > 0) {
|
|
|
+ $(".sfzffpmx").removeClass("hide").addClass("in");
|
|
|
+ $("#sfzffpmx_p_table").css("display", "block");
|
|
|
+ $("#sfzffpmx_table").css("display", "block");
|
|
|
+ var html = '';
|
|
|
+ for (var i = 0; i < res.sfzffpmx.length; i++) {
|
|
|
+ var receiptBill = res.sfzffpmx[i].receiptBill;
|
|
|
+ if (res.sfzffpmx[i].receiptBill != null && res.sfzffpmx[i].receiptBill.length > 8) {
|
|
|
+ receiptBill = receiptBill.substring(0, 7);
|
|
|
+ }
|
|
|
+ if (i % 3 == 0) {
|
|
|
+ html += '<tr>';
|
|
|
+ }
|
|
|
+ html += '<td>' + receiptBill + '</td>';
|
|
|
+ html += '<td>' + res.sfzffpmx[i].name + '</td>';
|
|
|
+ html += '<td>' + res.sfzffpmx[i].totalCharge.toFixed(2) + '</td>';
|
|
|
+ if (i % 3 == 2 || i == res.sfzffpmx.length - 1) {
|
|
|
+ html += '</tr>';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $("#sfzffpmx").html(html);
|
|
|
+ $("#sfzffpmx_p").html(html);
|
|
|
+ }
|
|
|
+ $("#userIdCode_gh").html(res.user.userCode);
|
|
|
+ $("#username_gh").html(res.user.userName);
|
|
|
+ $("#dcountDate_gh").html(format($("#rjList").val(), "yyyy-MM-dd HH:mm:ss"));
|
|
|
+ $("#userIdCode_gh_p").html(res.user.userCode);
|
|
|
+ $("#username_gh_p").html(res.user.userName);
|
|
|
+ $("#dcountDate_gh_p").html(format($("#rjList").val(), "yyyy-MM-dd HH:mm:ss"));
|
|
|
+ if (res.ghsrgcmx.ghje != null) {
|
|
|
+ $("#ghje").html(res.ghsrgcmx.ghje.toFixed(2));
|
|
|
+ $("#ghje_p").html(res.ghsrgcmx.ghje.toFixed(2));
|
|
|
+ }
|
|
|
+ $("#ghfps").html("所用票数:" + res.ghfps);
|
|
|
+ $("#qmhs").html("全免号数:" + res.ghsrgcmx.qmhs);
|
|
|
+ $("#ghfps_p").html("所用票数:" + res.ghfps);
|
|
|
+ $("#qmhs_p").html("全免号数:" + res.ghsrgcmx.qmhs);
|
|
|
+ if (res.ghsrgcmx.jzhs != null) {
|
|
|
+ $("#jzhs").html("记账号数:" + res.ghsrgcmx.jzhs);
|
|
|
+ $("#jzhs_p").html("记账号数:" + res.ghsrgcmx.jzhs);
|
|
|
+ }
|
|
|
+ if (res.ghsrgcmx.jzje != null) {
|
|
|
+ $("#jzje").html("记账金额:" + res.ghsrgcmx.jzje);
|
|
|
+ $("#jzje_p").html("记账金额:" + res.ghsrgcmx.jzje);
|
|
|
+ }
|
|
|
+ if (res.ghsrgcmx.zcsr != null) {
|
|
|
+ $("#zcsr").html("诊察收入:" + res.ghsrgcmx.zcsr.toFixed(2));
|
|
|
+ $("#zcsr_p").html("诊察收入:" + res.ghsrgcmx.zcsr.toFixed(2));
|
|
|
+ }
|
|
|
+ if (res.ghsrgcmx.jcsr != null) {
|
|
|
+ $("#jcsr").html("检查收入:" + res.ghsrgcmx.jcsr.toFixed(2));
|
|
|
+ $("#jcsr_p").html("检查收入:" + res.ghsrgcmx.jcsr.toFixed(2));
|
|
|
+ }
|
|
|
+ if (res.ghsrgcmx.ghsr != null) {
|
|
|
+ $("#ghsr").html("挂号费(门诊):" + res.ghsrgcmx.ghsr.toFixed(2));
|
|
|
+ $("#ghsr_p").html("挂号费(门诊):" + res.ghsrgcmx.ghsr.toFixed(2));
|
|
|
+ }
|
|
|
+ if (res.ghsrgcmx.thje != null) {
|
|
|
+ $("#thje").html(res.ghsrgcmx.thje.toFixed(2));
|
|
|
+ $("#thje_p").html(res.ghsrgcmx.thje.toFixed(2));
|
|
|
+ }
|
|
|
+ $("#ghtpzs").html("退票数:" + res.ghtpzs);
|
|
|
+ $("#ghtpzs_p").html("退票数:" + res.ghtpzs);
|
|
|
+ if (res.ghsrgcmx.ghhj != null) {
|
|
|
+ $("#ghhj").html(res.ghsrgcmx.ghhj.toFixed(2));
|
|
|
+ $("#ghhj_p").html(res.ghsrgcmx.ghhj.toFixed(2));
|
|
|
+ }
|
|
|
+ if (res.ghsrgcmx.ghjebhjz != null) {
|
|
|
+ $("#ghjebhjz").html("合计(不含记账) " + res.ghsrgcmx.ghjebhjz.toFixed(2));
|
|
|
+ $("#ghjebhjz_p").html("合计(不含记账) " + res.ghsrgcmx.ghjebhjz.toFixed(2));
|
|
|
+ }
|
|
|
+ $("#ghhjdx").html(res.ghsrgcmx.ghhjdx);
|
|
|
+ $("#ghjebhjzdx").html("合计(不含记账) " + res.ghsrgcmx.ghjebhjzdx);
|
|
|
+ $("#ghhjdx_p").html(res.ghsrgcmx.ghhjdx);
|
|
|
+ $("#ghjebhjzdx_p").html("合计(不含记账) " + res.ghsrgcmx.ghjebhjzdx);
|
|
|
+ $("#ghReceiptBills").html(null);
|
|
|
+ $("#ghReceiptBills_p_table").html(null);
|
|
|
+ if (res.ghReceiptBills != null && res.ghReceiptBills.length > 0) {
|
|
|
+ var html = '<div class="col-md-12 col-sm-12 col-xs-12">所用票号:</div>';
|
|
|
+ var html_p = '';
|
|
|
+ for (var i = 0; i < res.ghReceiptBills.length; i++) {
|
|
|
+ html += '<div class="col-md-3 col-sm-3 col-xs-12">' + res.ghReceiptBills[i] + '</div>';
|
|
|
+
|
|
|
+ if (i % 4 == 0) {
|
|
|
+ html_p += '<tr>';
|
|
|
+ }
|
|
|
+ html_p += '<td>' + res.ghReceiptBills[i] + '</td>';
|
|
|
+ if (i % 4 == 3 || i == res.ghReceiptBills.length - 1) {
|
|
|
+ html_p += '</tr>';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $("#ghReceiptBills").html(html);
|
|
|
+ $("#ghReceiptBills_p_table").html(html_p);
|
|
|
+ }
|
|
|
+ $("#username_zbr").html(res.user.userName);
|
|
|
+ $("#username_zbr_p").html(res.user.userName);
|
|
|
+ if (res.thzffpmx.length == 0) {
|
|
|
+ $("#thzffpmx_table").css("display", "none");
|
|
|
+ $("#thzffpmx_table_p").css("display", "none");
|
|
|
+ } else if (res.sfzffpmx.length > 0) {
|
|
|
+ $("#thzffpmx_table").css("display", "block");
|
|
|
+ $("#thzffpmx_table_p").css("display", "block");
|
|
|
+ var html = '';
|
|
|
+ for (var i = 0; i < res.thzffpmx.length; i++) {
|
|
|
+ var receiptBill = res.thzffpmx[i].receiptBill;
|
|
|
+ if (res.thzffpmx[i].receiptBill != null && res.thzffpmx[i].receiptBill.length > 8) {
|
|
|
+ receiptBill = receiptBill.substring(0, 7);
|
|
|
+ }
|
|
|
+ if (i % 3 == 0) {
|
|
|
+ html += '<tr>';
|
|
|
+ }
|
|
|
+ html += '<td>' + receiptBill + '</td>';
|
|
|
+ html += '<td>' + res.thzffpmx[i].name + '</td>';
|
|
|
+ html += '<td>' + res.thzffpmx[i].totalCharge.toFixed(2) + '</td>';
|
|
|
+ if (i % 3 == 2 || i == res.thzffpmx.length - 1) {
|
|
|
+ html += '</tr>';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $("#thzffpmx").html(html);
|
|
|
+ $("#thzffpmx_p").html(html);
|
|
|
+ }
|
|
|
+ } else if (res.code == -1) {
|
|
|
+ new PNotify({
|
|
|
+ title: '错误提示',
|
|
|
+ text: res.message,
|
|
|
+ type: 'error',
|
|
|
+ hide: true,
|
|
|
+ styling: 'bootstrap3'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 挂号清单
|
|
|
+ */
|
|
|
+function getGhqd() {
|
|
|
+ $('#tb_table').bootstrapTable({
|
|
|
+ url: '/thmz/getReqrecVoReprint', //请求后台的URL(*)
|
|
|
+ method: 'post', //请求方式(*)
|
|
|
+ toolbar: '#toolbar', //工具按钮用哪个容器
|
|
|
+ striped: true, //是否显示行间隔色
|
|
|
+ cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
|
|
|
+ pagination: true, //是否显示分页(*)
|
|
|
+ sortable: true, //是否启用排序
|
|
|
+ sortOrder: "asc", //排序方式
|
|
|
+ queryParams: queryParams, //传递参数(*)
|
|
|
+ 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: [
|
|
|
+ {
|
|
|
+ field: 'receiptBill',
|
|
|
+ title: '收据号',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle'
|
|
|
+ }, {
|
|
|
+ field: 'serialNo',
|
|
|
+ title: '机制号',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle',
|
|
|
+ }, {
|
|
|
+ field: 'patientId',
|
|
|
+ title: '病人ID',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle',
|
|
|
+ }, {
|
|
|
+ field: 'name',
|
|
|
+ title: '病人姓名',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle',
|
|
|
+ }, {
|
|
|
+ field: 'unitCode',
|
|
|
+ title: '科别',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle'
|
|
|
+ }, {
|
|
|
+ field: 'chargeType',
|
|
|
+ title: '号别',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle'
|
|
|
+ }, {
|
|
|
+ field: 'cancelMark',
|
|
|
+ title: '状态',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle',
|
|
|
+ }, {
|
|
|
+ field: 'chargeFee',
|
|
|
+ title: '金额',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle',
|
|
|
+ formatter: function (value, row, index) {
|
|
|
+ return value.toFixed(2);
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ field: 'opDay',
|
|
|
+ title: '挂号日期',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle',
|
|
|
+ formatter: function (value, row, index) {
|
|
|
+ return format(value, "yyyy-MM-dd HH:mm:ss");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ 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": {} //数据
|
|
|
+ };
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ "total": ress.data.length,//总页数
|
|
|
+ "rows": ress.data //数据
|
|
|
+ };
|
|
|
+ },
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 收费请单
|
|
|
+ */
|
|
|
+function getsfqd() {
|
|
|
+ $('#tb_table').bootstrapTable({
|
|
|
+ url: '/thmz/getChargeFeeVoReprint', //请求后台的URL(*)
|
|
|
+ method: 'post', //请求方式(*)
|
|
|
+ toolbar: '#toolbar', //工具按钮用哪个容器
|
|
|
+ striped: true, //是否显示行间隔色
|
|
|
+ cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
|
|
|
+ pagination: true, //是否显示分页(*)
|
|
|
+ sortable: true, //是否启用排序
|
|
|
+ sortOrder: "asc", //排序方式
|
|
|
+ queryParams: queryParams, //传递参数(*)
|
|
|
+ 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: [
|
|
|
+ {
|
|
|
+ field: 'patientId',
|
|
|
+ title: '病人ID',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle'
|
|
|
+ }, {
|
|
|
+ field: 'serialNo',
|
|
|
+ title: '机制号',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle',
|
|
|
+ }, {
|
|
|
+ field: 'payMark',
|
|
|
+ title: '退欠标识',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle',
|
|
|
+ }, {
|
|
|
+ field: 'totalCharge',
|
|
|
+ title: '金额',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle',
|
|
|
+ formatter: function (value, row, index) {
|
|
|
+ return value.toFixed(2);
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ field: 'receiptBill',
|
|
|
+ title: '发票号',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle'
|
|
|
+ }, {
|
|
|
+ field: 'chequeType',
|
|
|
+ title: '付款方式',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle'
|
|
|
+ }, {
|
|
|
+ field: 'chargeDate',
|
|
|
+ title: '收费日期',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle',
|
|
|
+ formatter: function (value, row, index) {
|
|
|
+ return format(value, "yyyy-MM-dd HH:mm:ss");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ 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": {} //数据
|
|
|
+ };
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ "total": ress.data.length,//总页数
|
|
|
+ "rows": ress.data //数据
|
|
|
+ };
|
|
|
+ },
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 构建列表查询参数
|
|
|
+ * @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 temp = {
|
|
|
+ opId: $('#cashParam').val(),
|
|
|
+ dcountDate: $('#rjList').val()
|
|
|
+ };
|
|
|
+
|
|
|
+ return temp;
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 获取按钮组选择的下标
|
|
|
+ * @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 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")},
|
|
|
+ success: function (res) {
|
|
|
+ if (res == '401' || res == 401) {
|
|
|
+ window.location.href = '/thmz/login/view'
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (res.code == 0) {
|
|
|
+ printIndex = res.data.cgPrintIndex;
|
|
|
+ } else {
|
|
|
+ printIndex = -1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 清空查询条件
|
|
|
+ */
|
|
|
+function cleanParams() {
|
|
|
+ $('#reportrange span').html(moment().format('YYYY-MM-DD') + ' - ' + moment().format('YYYY-MM-DD'));
|
|
|
+ $("#printNum").val(null);
|
|
|
+ $('#cashParam').empty();
|
|
|
+ $('#cashParam').selectpicker('refresh');
|
|
|
+ $('#rjList').empty();
|
|
|
+ $('#rjList').selectpicker('refresh');
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 打印报表
|
|
|
+ */
|
|
|
+function print() {
|
|
|
+ setPrint();
|
|
|
+ LODOP = getLodop();
|
|
|
+ LODOP.PRINT_INITA(6, 0, "210mm", "297mm", "门诊收费收入日报表");
|
|
|
+ //设置默认打印机
|
|
|
+ LODOP.SET_PRINTER_INDEX(printIndex);
|
|
|
+ LODOP.SET_SHOW_MODE("BKIMG_WIDTH", "297mm");
|
|
|
+ LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", "210mm");
|
|
|
+ LODOP.ADD_PRINT_HTM("0mm", "0mm", "210mm", "297mm", document.getElementById("printDiv").innerHTML);
|
|
|
+ LODOP.PRINT();
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 日期改变事件
|
|
|
+ * @param callback 回调函数
|
|
|
+ */
|
|
|
+function daterangepicker(callback) {
|
|
|
+
|
|
|
+ if (typeof ($.fn.daterangepicker) === 'undefined') {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ console.log('init_daterangepicker');
|
|
|
+
|
|
|
+ var cb = function (start, end, label) {
|
|
|
+ console.log(start.toISOString(), end.toISOString(), label);
|
|
|
+ $('#reportrange span').html(start.format('YYYY-MM-DD') + ' - ' + end.format('YYYY-MM-DD'));
|
|
|
+ callback();
|
|
|
+ };
|
|
|
+ var optionSet1 = {
|
|
|
+ //startDate: moment().subtract(29, 'days'),
|
|
|
+ startDate: moment(),
|
|
|
+ endDate: moment(),
|
|
|
+ minDate: '2012-01-01',
|
|
|
+ maxDate: nowString(),
|
|
|
+ dateLimit: {
|
|
|
+ days: 60
|
|
|
+ },
|
|
|
+ showDropdowns: true,
|
|
|
+ showWeekNumbers: true,
|
|
|
+ timePicker: false,
|
|
|
+ timePickerIncrement: 1,
|
|
|
+ timePicker12Hour: true,
|
|
|
+ ranges: {
|
|
|
+ '今天': [moment(), moment()],
|
|
|
+ '昨天': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
|
|
|
+ '最近7天': [moment().subtract(6, 'days'), moment()],
|
|
|
+ '最近30天': [moment().subtract(29, 'days'), moment()],
|
|
|
+ '当月': [moment().startOf('month'), moment().endOf('month')],
|
|
|
+ '上个月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
|
|
|
+ },
|
|
|
+ opens: 'left',
|
|
|
+ buttonClasses: ['btn btn-default'],
|
|
|
+ applyClass: 'btn-small btn-primary',
|
|
|
+ cancelClass: 'btn-small',
|
|
|
+ format: 'YYYY-MM-DD',
|
|
|
+ separator: ' to ',
|
|
|
+ locale: {
|
|
|
+ applyLabel: '确定',
|
|
|
+ cancelLabel: '取消',
|
|
|
+ fromLabel: 'From',
|
|
|
+ toLabel: 'To',
|
|
|
+ customRangeLabel: '自定义',
|
|
|
+ daysOfWeek: ['日', '一', '二', '三', '四', '五', '六'],
|
|
|
+ monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
|
|
|
+ firstDay: 1
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ //$('#reportrange span').html(moment().subtract(29, 'days').format('YYYY-MM-DD') + ' - ' + moment().format('YYYY-MM-DD'));
|
|
|
+ $('#reportrange span').html(moment().format('YYYY-MM-DD') + ' - ' + moment().format('YYYY-MM-DD'));
|
|
|
+ $('#reportrange').daterangepicker(optionSet1, cb);
|
|
|
+ $('#reportrange').on('show.daterangepicker', function () {
|
|
|
+ console.log("show event fired");
|
|
|
+ });
|
|
|
+ $('#reportrange').on('hide.daterangepicker', function () {
|
|
|
+ console.log("hide event fired");
|
|
|
+ });
|
|
|
+ $('#reportrange').on('apply.daterangepicker', function (ev, picker) {
|
|
|
+ console.log("apply event fired, start/end dates are " + picker.startDate.format('YYYY-MM-DD') + " to " + picker.endDate.format('YYYY-MM-DD'));
|
|
|
+ });
|
|
|
+ $('#reportrange').on('cancel.daterangepicker', function (ev, picker) {
|
|
|
+ console.log("cancel event fired");
|
|
|
+ });
|
|
|
+ $('#options1').click(function () {
|
|
|
+ $('#reportrange').data('daterangepicker').setOptions(optionSet1, cb);
|
|
|
+ });
|
|
|
+ $('#options2').click(function () {
|
|
|
+ $('#reportrange').data('daterangepicker').setOptions(optionSet2, cb);
|
|
|
+ });
|
|
|
+ $('#destroy').click(function () {
|
|
|
+ $('#reportrange').data('daterangepicker').remove();
|
|
|
+ });
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 查询给定日期内收费员列表
|
|
|
+ */
|
|
|
+function getAllOperator() {
|
|
|
+ var rePortRangeArr = getRePortRangeArr();
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ url: '/thmz/getAllOperator',
|
|
|
+ contentType: "application/json;charset=UTF-8",
|
|
|
+ dataType: "json",
|
|
|
+ headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
+ data: JSON.stringify({"beginDate": rePortRangeArr[0], "endDate": rePortRangeArr[1]}),
|
|
|
+ success: function (res) {
|
|
|
+ if (res == '401' || res == 401) {
|
|
|
+ window.location.href = '/thmz/login/view'
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (res.code == 0) {
|
|
|
+ var html = '';
|
|
|
+ $.each(res.employees, function (commentIndex, comment) {
|
|
|
+ html += '<option value="' + comment.employeeCode + '">' + comment.employeeName + '</option>';
|
|
|
+ });
|
|
|
+ $('#cashParam').empty();
|
|
|
+ $('#cashParam').html(html);
|
|
|
+ $('#cashParam').selectpicker('refresh');
|
|
|
+ } else {
|
|
|
+ errorMesage(res);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 查询可以被重打结算列表用户与日期列表
|
|
|
+ */
|
|
|
+function getDcountDateList() {
|
|
|
+ var rePortRangeArr = getRePortRangeArr();
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ url: '/thmz/getDcountDateList',
|
|
|
+ contentType: "application/json;charset=UTF-8",
|
|
|
+ dataType: "json",
|
|
|
+ headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
+ data: JSON.stringify({
|
|
|
+ "beginDate": rePortRangeArr[0],
|
|
|
+ "endDate": rePortRangeArr[1],
|
|
|
+ "opId": $('#cashParam').val()
|
|
|
+ }),
|
|
|
+ success: function (res) {
|
|
|
+ if (res == '401' || res == 401) {
|
|
|
+ window.location.href = '/thmz/login/view'
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (res.code == 0) {
|
|
|
+ var html = '';
|
|
|
+ $.each(res.dcountDateListVos, function (commentIndex, comment) {
|
|
|
+ html += '<option value="' + comment.dcountDateStr + '">' + comment.dcountDateStr + '</option>';
|
|
|
+ });
|
|
|
+ $('#rjList').empty();
|
|
|
+ $('#rjList').html(html);
|
|
|
+ $('#rjList').selectpicker('refresh');
|
|
|
+ } else {
|
|
|
+ errorMesage(res);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|