hurugang 5 anni fa
parent
commit
73e3faaef3

+ 45 - 54
src/main/java/cn/hnthyy/thmz/controller/ChargeFeeVoController.java

@@ -367,30 +367,31 @@ public class ChargeFeeVoController {
             chargeCountVo.fomartChargeCountVo();
             resultMap.put("chargeCountVo", chargeCountVo);
             //收费所用票号
-            List<String> sfReceiptBills = getStrings(chargeFeeVoService.querySfReceiptBillVoUnAccount(tokenUser.getUserIdCode()));
-            resultMap.put("sfReceiptBills", sfReceiptBills);
+            List<ReceiptBillVo> sfReceipts=chargeFeeVoService.querySfReceiptBillVoUnAccount(tokenUser.getUserIdCode());
             //挂号所用票号
-            List<String> ghReceiptBills = getStrings(chargeFeeVoService.queryGhReceiptBillVoUnAccount(tokenUser.getUserIdCode()));
-            resultMap.put("ghReceiptBills", ghReceiptBills);
+            List<ReceiptBillVo> ghReceipts=chargeFeeVoService.queryGhReceiptBillVoUnAccount(tokenUser.getUserIdCode());
+            sfReceipts.addAll(ghReceipts);
+            Collections.sort(sfReceipts); // 按发票号排序
+            List<String> receiptBills = getStrings(sfReceipts);
+            resultMap.put("receiptBills", receiptBills);
             Integer sffps = chargeFeeVoService.countReceipt(tokenUser.getUserIdCode(), PayMarkEnum.CHARGED.code, null);
             Integer tpzs=chargeFeeVoService.countReceipt(tokenUser.getUserIdCode(), PayMarkEnum.RETURN_PREMIUM.code, null);
             Integer zffps=chargeFeeVoService.countReceipt(tokenUser.getUserIdCode(), PayMarkEnum.CANCELLATION.code, null);
-            //收费发票张数
-            resultMap.put("sffps",sffps+tpzs+zffps);
+            Integer ghfps=chargeFeeVoService.countReqrecReceipt(tokenUser.getUserIdCode(), YesNoEnum.NO.code.toString(), null, null, null);
+            Integer ghtpzs=chargeFeeVoService.countReqrecReceipt(tokenUser.getUserIdCode(), YesNoEnum.YES.code.toString(), null, null, null);
+            //收费发票总数
+            resultMap.put("sffps",sffps+tpzs+zffps+ghfps+ghtpzs);
             //退费发票张数
-            resultMap.put("tpzs", tpzs);
+            resultMap.put("tpzs", tpzs+ghtpzs);
             //作废收费发票张数
             resultMap.put("zffps", zffps);
-            Integer ghfps=chargeFeeVoService.countReqrecReceipt(tokenUser.getUserIdCode(), YesNoEnum.NO.code.toString(), null, null, null);
-            Integer ghtpzs=chargeFeeVoService.countReqrecReceipt(tokenUser.getUserIdCode(), YesNoEnum.YES.code.toString(), null, null, null);
-            //挂号发票张数
-            resultMap.put("ghfps",ghfps+ghtpzs);
-            //退号发票张数
-            resultMap.put("ghtpzs", ghtpzs);
             //收费作废发票明细
-            resultMap.put("sfzffpmx", chargeFeeVoService.queryReceiptVo(tokenUser.getUserIdCode(), null));
+            List<ReceiptVo> sfzffpmx= chargeFeeVoService.queryReceiptVo(tokenUser.getUserIdCode(), null);
             //退号发票明细
-            resultMap.put("thzffpmx", chargeFeeVoService.queryThMzReceiptSerial(tokenUser.getUserIdCode(), null));
+            List<ReceiptVo> thzffpmx=chargeFeeVoService.queryThMzReceiptSerial(tokenUser.getUserIdCode(), null);
+            sfzffpmx.addAll(thzffpmx);
+            Collections.sort(sfzffpmx); // 按发票号排序
+            resultMap.put("zffpmx", sfzffpmx);
             resultMap.put("user", tokenUser);
             resultMap.put("code", 0);
             resultMap.put("message", "查询费用日结报表成功");
@@ -444,30 +445,36 @@ public class ChargeFeeVoController {
             chargeCountVo.fomartChargeCountVo();
             resultMap.put("chargeCountVo", chargeCountVo);
             //收费所用票号
-            List<String> sfReceiptBills = getStrings(chargeFeeVoService.querySfReceiptBillVoReprint(chargeFeeParamsVo.getOpId(), chargeFeeParamsVo.getDcountDate()));
-            resultMap.put("sfReceiptBills", sfReceiptBills);
+            List<ReceiptBillVo> sfReceipts=chargeFeeVoService.querySfReceiptBillVoReprint(chargeFeeParamsVo.getOpId(), chargeFeeParamsVo.getDcountDate());
             //挂号所用票号
-            List<String> ghReceiptBills = getStrings(chargeFeeVoService.queryGhReceiptBillVoReprint(chargeFeeParamsVo.getOpId(), chargeFeeParamsVo.getDcountDate()));
-            resultMap.put("ghReceiptBills", ghReceiptBills);
+            List<ReceiptBillVo> ghReceipts=chargeFeeVoService.queryGhReceiptBillVoReprint(chargeFeeParamsVo.getOpId(), chargeFeeParamsVo.getDcountDate());
+            sfReceipts.addAll(ghReceipts);
+            Collections.sort(sfReceipts); // 按发票号排序
+            List<String> receiptBills = getStrings(sfReceipts);
+            resultMap.put("receiptBills", receiptBills);
+            //收费发票张数
             Integer sffps=chargeFeeVoService.countReceipt(chargeFeeParamsVo.getOpId(), PayMarkEnum.CHARGED.code, chargeFeeParamsVo.getDcountDate());
+            //退费发票张数
             Integer tpzs=chargeFeeVoService.countReceipt(chargeFeeParamsVo.getOpId(), PayMarkEnum.RETURN_PREMIUM.code, chargeFeeParamsVo.getDcountDate());
+            //作废收费发票张数
             Integer zffps=chargeFeeVoService.countReceipt(chargeFeeParamsVo.getOpId(), PayMarkEnum.CANCELLATION.code, chargeFeeParamsVo.getDcountDate());
-            //收费发票张数
-            resultMap.put("sffps", sffps+tpzs+zffps);
+            //挂号发票张数
+            Integer ghfps=chargeFeeVoService.countReqrecReceipt(chargeFeeParamsVo.getOpId(), YesNoEnum.NO.code.toString(), chargeFeeParamsVo.getDcountDate(), null, null);
+            //退号发票张数
+            Integer ghtpzs=chargeFeeVoService.countReqrecReceipt(chargeFeeParamsVo.getOpId(), YesNoEnum.YES.code.toString(), chargeFeeParamsVo.getDcountDate(), null, null);
+            //收费发票总数
+            resultMap.put("sffps", sffps+tpzs+zffps+ghfps+ghtpzs);
             //退费发票张数
-            resultMap.put("tpzs", tpzs);
+            resultMap.put("tpzs", tpzs+ghtpzs);
             //作废收费发票张数
             resultMap.put("zffps", zffps);
-            Integer ghfps=chargeFeeVoService.countReqrecReceipt(chargeFeeParamsVo.getOpId(), YesNoEnum.NO.code.toString(), chargeFeeParamsVo.getDcountDate(), null, null);
-            Integer ghtpzs=chargeFeeVoService.countReqrecReceipt(chargeFeeParamsVo.getOpId(), YesNoEnum.YES.code.toString(), chargeFeeParamsVo.getDcountDate(), null, null);
-            //挂号发票张数
-            resultMap.put("ghfps", ghfps+ghtpzs);
-            //退号发票张数
-            resultMap.put("ghtpzs", ghtpzs);
             //收费作废发票明细
-            resultMap.put("sfzffpmx", chargeFeeVoService.queryReceiptVo(chargeFeeParamsVo.getOpId(), chargeFeeParamsVo.getDcountDate()));
+            List<ReceiptVo> sfzffpmx= chargeFeeVoService.queryReceiptVo(chargeFeeParamsVo.getOpId(), chargeFeeParamsVo.getDcountDate());
             //退号发票明细
-            resultMap.put("thzffpmx", chargeFeeVoService.queryThMzReceiptSerial(chargeFeeParamsVo.getOpId(), chargeFeeParamsVo.getDcountDate()));
+            List<ReceiptVo> thzffpmx= chargeFeeVoService.queryThMzReceiptSerial(chargeFeeParamsVo.getOpId(), chargeFeeParamsVo.getDcountDate());
+            sfzffpmx.addAll(thzffpmx);
+            Collections.sort(sfzffpmx); // 按发票号排序
+            resultMap.put("zffpmx", sfzffpmx);
             User tokenUser = userService.queryUserByUserIdCode(chargeFeeParamsVo.getOpId());
             resultMap.put("user", tokenUser);
             resultMap.put("code", 0);
@@ -507,38 +514,22 @@ public class ChargeFeeVoController {
                 resultMap.put("message", "查询费用汇总报表失败,查询时间为空");
                 return resultMap;
             }
+            //挂号收入构成表格数据
+            ReqrecVo reqrecVo = chargeFeeVoService.queryMzReceiptSerialCount(chargeFeeParamsVo.getOpId(), null, chargeFeeParamsVo.getBeginDate(), chargeFeeParamsVo.getEndDate()).get(0);
+            reqrecVo.fomartReqrecVo();
+            resultMap.put("ghsrgcmx", reqrecVo);
             MzReceiptSerial mzReceiptSerial = chargeFeeVoService.queryMzReceiptSerial(chargeFeeParamsVo.getOpId(), null, chargeFeeParamsVo.getBeginDate(), chargeFeeParamsVo.getEndDate()).get(0);
+            mzReceiptSerial.setCharge1(reqrecVo.getHjss());
             resultMap.put("mzReceiptSerial", mzReceiptSerial);
             ChargeCountVo chargeCountVo = chargeFeeVoService.queryChargeCountVo(chargeFeeParamsVo.getOpId(), null, chargeFeeParamsVo.getBeginDate(), chargeFeeParamsVo.getEndDate()).get(0);
             chargeCountVo.fomartChargeCountVo();
             resultMap.put("chargeCountVo", chargeCountVo);
-            Integer ghfps=chargeFeeVoService.countReqrecReceipt(null, YesNoEnum.NO.code.toString(), null, chargeFeeParamsVo.getBeginDate(), chargeFeeParamsVo.getEndDate());
-            Integer ghtpzs=chargeFeeVoService.countReqrecReceipt(null, YesNoEnum.YES.code.toString(), null, chargeFeeParamsVo.getBeginDate(), chargeFeeParamsVo.getEndDate());
-            //挂号发票张数
-            resultMap.put("ghfps",ghfps + ghtpzs);
-            //退号发票张数
-            resultMap.put("ghtpzs", ghtpzs);
-            //挂号收入构成表格数据
-            ReqrecVo reqrecVo = chargeFeeVoService.queryMzReceiptSerialCount(chargeFeeParamsVo.getOpId(), null, chargeFeeParamsVo.getBeginDate(), chargeFeeParamsVo.getEndDate()).get(0);
-            reqrecVo.fomartReqrecVo();
-            resultMap.put("ghsrgcmx", reqrecVo);
             List<WorkloadVo> ghWorkloadVos = chargeFeeVoService.queryGhWorkloadVo(chargeFeeParamsVo.getHisData(), chargeFeeParamsVo.getBeginDate(), chargeFeeParamsVo.getEndDate());
             frmartWorkloadVo(ghWorkloadVos);
             resultMap.put("ghWorkloadVos", ghWorkloadVos);
             List<WorkloadVo> sfWorkloadVos = chargeFeeVoService.querySfWorkloadVo(chargeFeeParamsVo.getHisData(), chargeFeeParamsVo.getBeginDate(), chargeFeeParamsVo.getEndDate());
             frmartWorkloadVo(sfWorkloadVos);
             resultMap.put("sfWorkloadVos", sfWorkloadVos);
-            List<ChargeDetailVo> chargeDetailVos = chargeFeeVoService.queryChargeDetailVos(chargeFeeParamsVo.getHisData(), chargeFeeParamsVo.getBeginDate(), chargeFeeParamsVo.getEndDate());
-            ChargeDetailVo totalChargeDetailVo = new ChargeDetailVo();
-            for (ChargeDetailVo co : chargeDetailVos) {
-                if (totalChargeDetailVo.getTotalCharge() == null) {
-                    totalChargeDetailVo.setTotalCharge(co.getTotalCharge());
-                } else {
-                    totalChargeDetailVo.setTotalCharge(totalChargeDetailVo.getTotalCharge().add(co.getTotalCharge()));
-                }
-            }
-            chargeDetailVos.add(totalChargeDetailVo);
-            resultMap.put("chargeDetailVos", chargeDetailVos);
             resultMap.put("user", tokenUser);
             resultMap.put("code", 0);
             resultMap.put("message", "查询费用汇总报表成功");
@@ -661,9 +652,9 @@ public class ChargeFeeVoController {
                 resultMap.put("message", "存在退费后发票未重打的发票信息,请 处理后再结账!");
                 return resultMap;
             }
-           // Date dcountDate = chargeFeeVoService.dcountCharge(tokenUser.getUserIdCode());
-            //resultMap.put("dcountDate", dcountDate);
-            resultMap.put("dcountDate", new Date());
+            Date dcountDate = chargeFeeVoService.dcountCharge(tokenUser.getUserIdCode());
+            resultMap.put("dcountDate", dcountDate);
+            //resultMap.put("dcountDate", new Date());
             resultMap.put("code", 0);
             resultMap.put("message", "费用结算成功");
             return resultMap;

+ 49 - 44
src/main/java/cn/hnthyy/thmz/mapper/his/ChargeFeeVoMapper.java

@@ -363,23 +363,28 @@ public interface ChargeFeeVoMapper {
                     "sum ( case when cheque_type in ('5' ,'3') and pay_mark ='0' then amount else 0 end ) yhksk," +
                     "sum ( case cheque_type when '6' then amount else 0 end ) sybkss," +
                     "sum ( case when cheque_type='6' and pay_mark ='0' then amount else 0 end ) sybksk," +
-                    "sum ( case when cheque_type in ( '2' , 'Y' ) and responce_type ='01' then amount else 0 end ) zfss," +
-                    "sum ( case when cheque_type in ( '2' , 'Y' ) and pay_mark ='0' and responce_type ='01' then amount else 0 end ) zfsk," +
+                    "sum ( case when cheque_type = 'Y'  then amount else 0 end ) zfss," +
+                    "sum ( case when cheque_type = 'Y'  and pay_mark ='0' then amount else 0 end ) zfsk," +
+                    "sum ( case when cheque_type ='2'   then amount else 0 end ) ybjzss," +
+                    "sum ( case when cheque_type = '2'  and pay_mark ='0'  then amount else 0 end ) ybjzsk," +
                     "sum ( case when cheque_type ='1' and pay_mark ='1' then amount else 0 end ) xjtf," +
                     "sum ( case when ( cheque_type ='5' or cheque_type ='3' ) and pay_mark ='1' then amount else 0 end ) yhktf," +
                     "sum ( case when cheque_type ='6' and pay_mark ='1' then amount else 0 end ) sybtf," +
-                    "sum ( case when cheque_type in ( '2' , 'Y' ) and pay_mark &gt; '0' and responce_type ='01' then amount else 0 end ) zftf," +
+                    "sum ( case when cheque_type = 'Y'  and pay_mark &gt; '0'  then amount else 0 end ) zftf," +
+                    "sum ( case when cheque_type = '2' and pay_mark &gt; '0'  then amount else 0 end ) ybjztf," +
                     "sum ( amount) zjss," +
                     "sum ( case when pay_mark ='0'  then amount else 0 end ) zjsk," +
                     "sum ( case when pay_mark  <![CDATA[<>]]>'0'  then amount else 0 end ) zjtk," +
                     "count ( distinct case when cheque_type ='1' and pay_mark ='0' then receipt_sn else null end ) xjbs," +
                     "  count ( distinct case when ( cheque_type ='5' or cheque_type ='3' ) and pay_mark ='0' then receipt_sn else null end ) yhsbs," +
                     "  count ( distinct case when cheque_type ='6' and pay_mark ='0' then receipt_sn else null end ) sybbs," +
-                    " count ( distinct case when cheque_type in ( '2' , 'Y' ) and pay_mark ='0' and responce_type ='01' then receipt_sn else null end ) zfbs," +
+                    " count ( distinct case when cheque_type = 'Y'  and pay_mark ='0'  then receipt_sn else null end ) zfbs," +
+                    " count ( distinct case when cheque_type = '2'  and pay_mark ='0'  then receipt_sn else null end ) ybjzbs," +
                     " count ( distinct case when cheque_type ='1' and pay_mark &gt; '0' then receipt_sn else null end ) xjtfbs," +
                     "count ( distinct case when ( cheque_type ='5' or cheque_type ='3' ) and pay_mark &gt; '0' then receipt_sn else null end ) yhktfbs," +
                     "count ( distinct case when cheque_type ='6' and pay_mark &gt; '0' then receipt_sn else null end ) sybtfbs," +
-                    "   count ( distinct case when cheque_type in ( '2' , 'Y' ) and pay_mark &gt; '0' and responce_type ='01' then receipt_sn else null end ) zftfbs," +
+                    "   count ( distinct case when cheque_type = 'Y'  and pay_mark &gt; '0'  then receipt_sn else null end ) zftfbs," +
+                    "   count ( distinct case when cheque_type ='2'  and pay_mark &gt; '0'  then receipt_sn else null end ) ybjztfbs," +
                     "    count ( distinct case when pay_mark ='0' then receipt_sn else null end ) zjbs," +
                     "count ( distinct case when pay_mark  <![CDATA[<>]]> '0' then receipt_sn else null end ) ztfbs," +
                     "count ( distinct case when cheque_type ='E' and pay_mark ='0' then receipt_sn else null end ) wxbs," +
@@ -497,7 +502,7 @@ public interface ChargeFeeVoMapper {
      */
     @Select({"<script>",
             "select a.name," +
-                    "       b.receipt_bill," +
+                    "     receipt_bill=rtrim(b.receipt_bill)," +
                     "       flag=(select case when count(*)> 0 then '取消'else '' end from mz_charge_detail where real_no=b.receipt_sn and isnull(confirm_flag_qx,'')='1')," +
                     "       total_charge=sum(b.total_charge) " +
                     "from mz_patient_mi a," +
@@ -513,7 +518,7 @@ public interface ChargeFeeVoMapper {
                     "group by a.name,b.receipt_bill,b.receipt_sn " +
                     "union " +
                     "select '作废'," +
-                    "       receipt_bill," +
+                    "       receipt_bill=rtrim(receipt_bill)," +
                     "       flag=''," +
                     "       total_charge " +
                     "from mz_receipt_serial " +
@@ -569,50 +574,50 @@ public interface ChargeFeeVoMapper {
     @Select({
             "<script>",
             "SELECT " +
-                    " count ( case when cancel_mark ='0' and (paymode ='1' or paymode is null) then 1 else null end ) xjhs," +
-                    " sum ( case when cancel_mark ='0' and (paymode ='1' or paymode is null) then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) xjsk, " +
-                    " count ( case when cancel_mark ='1' and (paymode ='1' or paymode is null) then 1 else null end ) xjthhs," +
-                    " sum ( case when cancel_mark ='1' and (paymode ='1' or paymode is null) then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) xjth, " +
-                    " count ( case when cancel_mark ='0' and (paymode ='1' or paymode is null) then 1 else null end )-count ( case when cancel_mark ='1' and (paymode ='1' or paymode is null) then 1 else null end ) xjsshs," +
+                    " count ( case when cancel_mark ='0' and (paymode ='1' or paymode is null) then 1 else null end ) + count ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 and (paymode ='1' or paymode is null) then 1 else null end ) xjhs," +
+                    " sum ( case when cancel_mark ='0' and (paymode ='1' or paymode is null) then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) +ABS( sum ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 and (paymode ='1' or paymode is null) then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) xjsk, " +
+                    " count ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 and (paymode ='1' or paymode is null) then 1 else null end ) xjthhs," +
+                    " ABS( sum ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 and (paymode ='1' or paymode is null) then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) xjth, " +
+                    " count ( case when cancel_mark ='0' and (paymode ='1' or paymode is null) then 1 else null end ) xjsshs," +
                     " sum ( case when paymode ='1' or paymode is null then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) xjss, " +
-                    " count ( case when cancel_mark ='0' and paymode ='3' then 1 else null end ) yhkhs," +
-                    " sum ( case when cancel_mark ='0' and paymode ='3'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) yhksk, " +
-                    " count ( case when cancel_mark ='1' and paymode ='3' then 1 else null end ) yhkthhs," +
-                    " sum ( case when cancel_mark ='1' and paymode ='3' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) yhkth, " +
-                    " count ( case when cancel_mark ='0' and paymode ='3'  then 1 else null end )-count ( case when cancel_mark ='1' and paymode ='3'  then 1 else null end ) yhksshs," +
+                    " count ( case when cancel_mark ='0' and paymode ='3' then 1 else null end ) + count ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 and paymode ='3'  then 1 else null end ) yhkhs," +
+                    " sum ( case when cancel_mark ='0' and paymode ='3'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) + ABS(sum ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 and paymode ='3' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ))yhksk, " +
+                    " count ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 and paymode ='3' then 1 else null end ) yhkthhs," +
+                    " ABS(sum ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 and paymode ='3' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) yhkth, " +
+                    " count ( case when cancel_mark ='0' and paymode ='3'  then 1 else null end ) yhksshs," +
                     " sum ( case when paymode ='3'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) yhkss," +
-                    " count ( case when cancel_mark ='0' and paymode ='6' then 1 else null end ) ybkhs," +
-                    " sum ( case when cancel_mark ='0' and paymode ='6'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) ybksk, " +
-                    " count ( case when cancel_mark ='1' and paymode ='6' then 1 else null end ) ybkthhs," +
-                    " sum ( case when cancel_mark ='1' and paymode ='6' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) ybkth, " +
-                    " count ( case when cancel_mark ='0' and paymode ='6'  then 1 else null end )-count ( case when cancel_mark ='1' and paymode ='6'  then 1 else null end ) ybksshs," +
+                    " count ( case when cancel_mark ='0' and paymode ='6' then 1 else null end ) + count ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 and paymode ='6'  then 1 else null end )ybkhs," +
+                    " sum ( case when cancel_mark ='0' and paymode ='6'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) + ABS(sum ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 and paymode ='6' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) ybksk, " +
+                    " count ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 and paymode ='6' then 1 else null end ) ybkthhs," +
+                    " ABS(sum ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 and paymode ='6' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) ybkth, " +
+                    " count ( case when cancel_mark ='0' and paymode ='6'  then 1 else null end ) ybksshs," +
                     " sum ( case when paymode ='6'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) ybkss," +
-                    " count ( case when cancel_mark ='0' and paymode ='F' then 1 else null end ) zfbhs," +
-                    " sum ( case when cancel_mark ='0' and paymode ='F'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) zfbsk, " +
-                    " count ( case when cancel_mark ='1' and paymode ='F' then 1 else null end ) zfbthhs," +
-                    " sum ( case when cancel_mark ='1' and paymode ='F' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) zfbth, " +
-                    " count ( case when cancel_mark ='0' and paymode ='F'  then 1 else null end )-count ( case when cancel_mark ='1' and paymode ='F'  then 1 else null end ) zfbsshs," +
+                    " count ( case when cancel_mark ='0' and paymode ='F' then 1 else null end ) + count ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 and paymode ='F'  then 1 else null end )zfbhs," +
+                    " sum ( case when cancel_mark ='0' and paymode ='F'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) + ABS(sum ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 and paymode ='F' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) zfbsk, " +
+                    " count ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 and paymode ='F' then 1 else null end ) zfbthhs," +
+                    " ABS(sum ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 and paymode ='F' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) zfbth, " +
+                    " count ( case when cancel_mark ='0' and paymode ='F'  then 1 else null end ) zfbsshs," +
                     " sum ( case when paymode ='F'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) zfbss," +
-                    " count ( case when cancel_mark ='0' and paymode ='E' then 1 else null end ) wxhs," +
-                    " sum ( case when cancel_mark ='0' and paymode ='E'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) wxsk, " +
-                    " count ( case when cancel_mark ='1' and paymode ='E' then 1 else null end ) wxthhs," +
-                    " sum ( case when cancel_mark ='1' and paymode ='E' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) wxth, " +
-                    " count ( case when cancel_mark ='0' and paymode ='E'  then 1 else null end )-count ( case when cancel_mark ='1' and paymode ='E'  then 1 else null end ) wxsshs," +
+                    " count ( case when cancel_mark ='0' and paymode ='E' then 1 else null end ) +count ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 and paymode ='E'  then 1 else null end ) wxhs," +
+                    " sum ( case when cancel_mark ='0' and paymode ='E'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) + ABS(sum ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 and paymode ='E' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) wxsk, " +
+                    " count ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 and paymode ='E' then 1 else null end ) wxthhs," +
+                    " ABS(sum ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 and paymode ='E' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) wxth, " +
+                    " count ( case when cancel_mark ='0' and paymode ='E'  then 1 else null end ) wxsshs," +
                     " sum ( case when paymode ='E'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) wxss," +
-                    " count ( case when cancel_mark ='0' and paymode ='Y' then 1 else null end ) byjzhs," +
-                    " sum ( case when cancel_mark ='0' and paymode ='Y'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) byjzsk, " +
-                    " count ( case when cancel_mark ='1' and paymode ='Y' then 1 else null end ) byjzthhs," +
-                    " sum ( case when cancel_mark ='1' and paymode ='Y' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) byjzth, " +
-                    " count ( case when cancel_mark ='0' and paymode ='Y'  then 1 else null end )-count ( case when cancel_mark ='1' and paymode ='Y'  then 1 else null end ) byjzsshs," +
+                    " count ( case when cancel_mark ='0' and paymode ='Y' then 1 else null end ) + count ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 and paymode ='Y'  then 1 else null end ) byjzhs," +
+                    " sum ( case when cancel_mark ='0' and paymode ='Y'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) +ABS(sum ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 and paymode ='Y' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) byjzsk, " +
+                    " count ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 and paymode ='Y' then 1 else null end ) byjzthhs," +
+                    " ABS(sum ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 and paymode ='Y' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) byjzth, " +
+                    " count ( case when cancel_mark ='0' and paymode ='Y'  then 1 else null end ) byjzsshs," +
                     " sum ( case when paymode ='Y'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) byjzss," +
-                    " count ( case when cancel_mark ='0' then 1 else null end ) hjhs," +
-                    " sum ( case when cancel_mark ='0' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) hjsk, " +
-                    " count ( case when cancel_mark ='1' then 1 else null end ) hjthhs," +
-                    " sum ( case when cancel_mark ='1'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) hjth, " +
-                    " count ( case when cancel_mark ='0'  then 1 else null end )-count ( case when cancel_mark ='1'  then 1 else null end ) hjsshs," +
+                    " count ( case when cancel_mark ='0' then 1 else null end ) +count ( case when cancel_mark ='1'   and times  <![CDATA[<]]> 0 then 1 else null end ) hjhs," +
+                    " sum ( case when cancel_mark ='0' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) +ABS(sum ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ))hjsk, " +
+                    " count ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 then 1 else null end ) hjthhs," +
+                    " ABS(sum ( case when cancel_mark ='1'  and times  <![CDATA[<]]> 0 then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end )) hjth, " +
+                    " count ( case when cancel_mark ='0'  then 1 else null end ) hjsshs," +
                     " sum ( req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) ) hjss," +
                     " sum ( case when isnull ( paymode , '1' ) = 'Y' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) ghjejz," +
-                    " sum ( case when isnull ( paymode , '1' ) <> 'Y' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) ghjebhjz," +
+                    " sum ( case when isnull ( paymode , '1' ) <![CDATA[<>]]> 'Y' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) else 0 end ) ghjebhjz," +
                     " sum ( clinic_fee ) zcsr," +
                     " sum ( oth_fee ) jcsr," +
                     " sum ( req_fee ) ghsr "+
@@ -647,7 +652,7 @@ public interface ChargeFeeVoMapper {
     @Select({
             "<script>",
             "SELECT " +
-                    " mzy_reqrec.receipt_bill," +
+                    "receipt_bill= rtrim(mzy_reqrec.receipt_bill)," +
                     "         rtrim(mzy_reqrec.name) name," +
                     "         mzy_reqrec.req_fee+mzy_reqrec.oth_fee+mzy_reqrec.clinic_fee  as total_charge " +
                     "FROM mzy_reqrec " +

+ 41 - 3
src/main/java/cn/hnthyy/thmz/vo/ChargeCountVo.java

@@ -80,8 +80,18 @@ public class ChargeCountVo {
     private Integer wxtfbs;
     //支付宝退费笔数
     private Integer zfbtfbs;
-
-
+    //医保记账笔数
+    private Integer ybjzbs;
+    //医保记账收款
+    private BigDecimal ybjzsk;
+    //医保记账退费笔数
+    private Integer ybjztfbs;
+    //医保记账收款
+    private BigDecimal ybjztf;
+    //医保记账实收笔数
+    private Integer ybjzssbs;
+    //医保记账实收
+    private BigDecimal ybjzss;
     //以下次数公式为收款次数--退费次数
     //现金实收笔数
     private Integer xjssbs;
@@ -111,10 +121,20 @@ public class ChargeCountVo {
     private String zjdx;
     //自费(记账)大写
     private String zfdx;
+    //医保卡记账大写
+    private String ybkjzhjdx;
     /**
      * 设置实收笔数
      */
     public void fomartChargeCountVo(){
+        if(ybjzbs==null){
+            ybjzbs=0;
+        }
+        if(ybjztfbs==null){
+            ybjztfbs=0;
+        }
+        ybjzssbs=ybjzbs-ybjztfbs;
+
         if(xjbs==null){
             xjbs=0;
         }
@@ -122,6 +142,7 @@ public class ChargeCountVo {
             xjtfbs=0;
         }
         xjssbs=xjbs-xjtfbs;
+
         if(yhsbs==null){
             yhsbs=0;
         }
@@ -129,6 +150,7 @@ public class ChargeCountVo {
             yhktfbs=0;
         }
         yhkssbs=yhsbs-yhktfbs;
+
         if(sybbs==null){
             sybbs=0;
         }
@@ -136,6 +158,7 @@ public class ChargeCountVo {
             sybtfbs=0;
         }
         sybssbs=sybbs-sybtfbs;
+
         if(zfbs==null){
             zfbs=0;
         }
@@ -143,6 +166,7 @@ public class ChargeCountVo {
             zftfbs=0;
         }
         zfssbs=zfbs-zftfbs;
+
         if(wxbs==null){
             wxbs=0;
         }
@@ -150,19 +174,29 @@ public class ChargeCountVo {
             wxtfbs=0;
         }
         wxssbs=wxbs-wxtfbs;
+
         if(zfbbs==null){
             zfbbs=0;
         }
         if(zfbtfbs==null){
             zfbtfbs=0;
         }
+        zfbssbs=zfbbs-zfbtfbs;
+
+        if(zjbs==null){
+            zjbs=0;
+        }
+        if(ztfbs==null){
+            ztfbs=0;
+        }
+        zjssbs=zjbs-ztfbs;
+
         if(zfss==null){
             zfss=BigDecimal.ZERO;
         }
         if(zjss==null){
             zjss=BigDecimal.ZERO;
         }
-        zfbssbs=zfbbs-zfbtfbs;
         this.zj=zjss.setScale(2, BigDecimal.ROUND_HALF_UP);
         zjdx=NumberToCN.number2CNMontrayUnit(zj);
         zfdx=NumberToCN.number2CNMontrayUnit(zfss.setScale(2, BigDecimal.ROUND_HALF_UP));
@@ -188,7 +222,11 @@ public class ChargeCountVo {
         if(sybkss==null){
             sybkss=BigDecimal.ZERO;
         }
+        if(ybjzss==null){
+            ybjzss=BigDecimal.ZERO;
+        }
         sjhj=xjss.add(yhkss).add(zfbss).add(wxss).add(sybkss).setScale(2, BigDecimal.ROUND_HALF_UP);
         sjhjdx=NumberToCN.number2CNMontrayUnit(sjhj);
+        ybkjzhjdx=NumberToCN.number2CNMontrayUnit(ybjzss);
     }
 }

+ 17 - 1
src/main/java/cn/hnthyy/thmz/vo/ReceiptBillVo.java

@@ -1,14 +1,30 @@
 package cn.hnthyy.thmz.vo;
 
 import lombok.Data;
+import org.apache.commons.lang3.StringUtils;
 
 /**
  * 所用票号视图类
  */
 @Data
-public class ReceiptBillVo {
+public class ReceiptBillVo implements Comparable<ReceiptBillVo> {
     private String payMark;
     private String cancelMark;
     private String receiptBill;
     private String serialNo;
+
+
+    @Override
+    public int compareTo(ReceiptBillVo receiptBillVo) {
+        //重写Comparable接口的compareTo方法,
+        Integer ownBill = 0;
+        Integer otherBill = 0;
+        if (StringUtils.isNotBlank(this.receiptBill)) {
+            ownBill = Integer.valueOf(this.receiptBill);
+        }
+        if (receiptBillVo != null && StringUtils.isNotBlank(receiptBillVo.getReceiptBill())) {
+            otherBill = Integer.valueOf(receiptBillVo.getReceiptBill());
+        }
+        return ownBill - otherBill;// 根据发票号升序排列,降序修改相减顺序即可
+    }
 }

+ 17 - 1
src/main/java/cn/hnthyy/thmz/vo/ReceiptVo.java

@@ -1,13 +1,29 @@
 package cn.hnthyy.thmz.vo;
 
 import lombok.Data;
+import org.apache.commons.lang3.StringUtils;
 
 import java.math.BigDecimal;
 
 @Data
-public class ReceiptVo {
+public class ReceiptVo implements Comparable<ReceiptVo>{
     private String name;
     private String receiptBill;
     private String flag;
     private BigDecimal totalCharge;
+
+
+    @Override
+    public int compareTo(ReceiptVo receiptVo) {
+        //重写Comparable接口的compareTo方法,
+        Integer ownBill = 0;
+        Integer otherBill = 0;
+        if (StringUtils.isNotBlank(this.receiptBill)) {
+            ownBill = Integer.valueOf(this.receiptBill);
+        }
+        if (receiptVo != null && StringUtils.isNotBlank(receiptVo.getReceiptBill())) {
+            otherBill = Integer.valueOf(receiptVo.getReceiptBill());
+        }
+        return ownBill - otherBill;// 根据发票号升序排列,降序修改相减顺序即可
+    }
 }

+ 9 - 11
src/main/java/cn/hnthyy/thmz/vo/ReqrecVo.java

@@ -121,17 +121,14 @@ public class ReqrecVo {
     private BigDecimal jcsr;
     //挂号费
     private BigDecimal ghsr;
-    //全免号数
-    private Integer qmhs;
-    //记账号数
-    private Integer jzhs;
-    //记账金额
-    private BigDecimal jzje;
     //挂号合计大写
-    private String ghhjdx;
+    private String hjssdx;
     //挂号金额不含记账大写
     private String ghjebhjzdx;
-
+    //挂号金额不含记账
+    private BigDecimal ghjebhjz;
+    //本院记账大写
+    private String byjzssdx;
     public BigDecimal getHjss() {
         if(hjss==null){
             hjss=BigDecimal.ZERO;
@@ -143,8 +140,9 @@ public class ReqrecVo {
      * 设置实收笔数
      */
     public void fomartReqrecVo(){
-//        ghjebhjz=(ghhj==null?BigDecimal.ZERO:ghhj).subtract(jzje==null?BigDecimal.ZERO:jzje);
-//        ghhjdx=NumberToCN.number2CNMontrayUnit(ghje==null?BigDecimal.ZERO:ghje);
-//        ghjebhjzdx=NumberToCN.number2CNMontrayUnit(ghjebhjz==null?BigDecimal.ZERO:ghjebhjz);
+        ghjebhjz=(hjss==null?BigDecimal.ZERO:hjss).subtract(byjzss==null?BigDecimal.ZERO:byjzss);
+        ghjebhjzdx=NumberToCN.number2CNMontrayUnit(ghjebhjz==null?BigDecimal.ZERO:ghjebhjz);
+        hjssdx=NumberToCN.number2CNMontrayUnit(hjss==null?BigDecimal.ZERO:hjss);
+        byjzssdx=NumberToCN.number2CNMontrayUnit(byjzss==null?BigDecimal.ZERO:byjzss);
     }
 }

+ 285 - 212
src/main/resources/static/js/daily.js

@@ -15,7 +15,7 @@ $(function () {
 
     setTimeout(function () {
         getLodop();
-    }, 400);
+    }, 800);
 });
 
 /**
@@ -50,6 +50,264 @@ function initFeeTable() {
 
 }
 
+/**
+ * 设置收费参数
+ * @param res
+ */
+function extractedSf (res) {
+//现金收款
+    $("#xjbs").html(res.chargeCountVo.xjbs);
+    if (res.chargeCountVo.xjsk != null) {
+        $("#xjsk").html(res.chargeCountVo.xjsk.toFixed(2));
+    }
+    $("#xjtfbs").html(res.chargeCountVo.xjtfbs);
+    if (res.chargeCountVo.xjtf != null) {
+        $("#xjtf").html(res.chargeCountVo.xjtf.toFixed(2));
+    }
+    $("#xjssbs").html(res.chargeCountVo.xjssbs);
+    if (res.chargeCountVo.xjss != null) {
+        $("#xjss").html(res.chargeCountVo.xjss.toFixed(2));
+    }
+    //银行卡收款
+    $("#yhsbs").html(res.chargeCountVo.yhsbs);
+    if (res.chargeCountVo.yhksk != null) {
+        $("#yhksk").html(res.chargeCountVo.yhksk.toFixed(2));
+    }
+    $("#yhktfbs").html(res.chargeCountVo.yhktfbs);
+    if (res.chargeCountVo.yhktf != null) {
+        $("#yhktf").html(res.chargeCountVo.yhktf.toFixed(2));
+    }
+    $("#yhkssbs").html(res.chargeCountVo.yhkssbs);
+    if (res.chargeCountVo.yhkss != null) {
+        $("#yhkss").html(res.chargeCountVo.yhkss.toFixed(2));
+    }
+    //医保卡卡收款
+    $("#ybjzbs").html(res.chargeCountVo.ybjzbs);
+    if (res.chargeCountVo.ybjzsk != null) {
+        $("#ybjzsk").html(res.chargeCountVo.ybjzsk.toFixed(2));
+    }
+    $("#ybjztfbs").html(res.chargeCountVo.ybjztfbs);
+    if (res.chargeCountVo.ybjztf != null) {
+        $("#ybjztf").html(res.chargeCountVo.ybjztf.toFixed(2));
+    }
+    $("#ybjzssbs").html(res.chargeCountVo.ybjzssbs);
+    if (res.chargeCountVo.ybjzss != null) {
+        $("#ybjzss").html(res.chargeCountVo.ybjzss.toFixed(2));
+    }
+    //支付宝收款
+    $("#zfbbs").html(res.chargeCountVo.zfbbs);
+    if (res.chargeCountVo.zfbsk != null) {
+        $("#zfbsk").html(res.chargeCountVo.zfbsk.toFixed(2));
+    }
+    $("#zfbtfbs").html(res.chargeCountVo.zfbtfbs);
+    if (res.chargeCountVo.zfbtf != null) {
+        $("#zfbtf").html(res.chargeCountVo.zfbtf.toFixed(2));
+    }
+    $("#zfbssbs").html(res.chargeCountVo.zfbssbs);
+    if (res.chargeCountVo.zfbss != null) {
+        $("#zfbss").html(res.chargeCountVo.zfbss.toFixed(2));
+    }
+    //微信收款
+    $("#wxbs").html(res.chargeCountVo.wxbs);
+    if (res.chargeCountVo.wxsk != null) {
+        $("#wxsk").html(res.chargeCountVo.wxsk.toFixed(2));
+    }
+    $("#wxtfbs").html(res.chargeCountVo.wxtfbs);
+    if (res.chargeCountVo.wxtf != null) {
+        $("#wxtf").html(res.chargeCountVo.wxtf.toFixed(2));
+    }
+    $("#wxssbs").html(res.chargeCountVo.wxssbs);
+    if (res.chargeCountVo.wxss != null) {
+        $("#wxss").html(res.chargeCountVo.wxss.toFixed(2));
+    }
+    //记账绿色通道收款
+    $("#zfbs").html(res.chargeCountVo.zfbs);
+    if (res.chargeCountVo.zfsk != null) {
+        $("#zfsk").html(res.chargeCountVo.zfsk.toFixed(2));
+    }
+    $("#zftfbs").html(res.chargeCountVo.zftfbs);
+    if (res.chargeCountVo.zftf != null) {
+        $("#zftf").html(res.chargeCountVo.zftf.toFixed(2));
+    }
+    $("#zfssbs").html(res.chargeCountVo.zfssbs);
+    if (res.chargeCountVo.zfss != null) {
+        $("#zfss").html(res.chargeCountVo.zfss.toFixed(2));
+    }
+    //医保卡收款
+    $("#sybbs").html(res.chargeCountVo.sybbs);
+    if (res.chargeCountVo.sybksk != null) {
+        $("#sybksk").html(res.chargeCountVo.sybksk.toFixed(2));
+    }
+    $("#sybtfbs").html(res.chargeCountVo.sybtfbs);
+    if (res.chargeCountVo.sybtf != null) {
+        $("#sybtf").html(res.chargeCountVo.sybtf.toFixed(2));
+    }
+    $("#sybssbs").html(res.chargeCountVo.sybssbs);
+    if (res.chargeCountVo.sybkss != null) {
+        $("#sybkss").html(res.chargeCountVo.sybkss.toFixed(2));
+    }
+    //总计收款
+    $("#zjbs").html(res.chargeCountVo.zjbs);
+    if (res.chargeCountVo.zjsk != null) {
+        $("#zjsk").html(res.chargeCountVo.zjsk.toFixed(2));
+    }
+    $("#ztfbs").html(res.chargeCountVo.ztfbs);
+    if (res.chargeCountVo.zjtk != null) {
+        $("#zjtk").html(res.chargeCountVo.zjtk.toFixed(2));
+    }
+    $("#zjssbs").html(res.chargeCountVo.zjssbs);
+    if (res.chargeCountVo.zjss != null) {
+        $("#zjss").html(res.chargeCountVo.zjss.toFixed(2));
+    }
+
+
+    if (res.chargeCountVo.sjhj != null) {
+        $("#sjhj").html(res.chargeCountVo.sjhj.toFixed(2));
+    }
+    $("#sjhjdx").html(res.chargeCountVo.sjhjdx);
+    if (res.chargeCountVo.zfss != null) {
+        $("#zfsshj").html(res.chargeCountVo.zfss.toFixed(2));
+    }
+    $("#zfdx").html(res.chargeCountVo.zfdx);
+
+    if (res.chargeCountVo.ybjzss != null) {
+        $("#ybkjzhj").html(res.chargeCountVo.ybjzss.toFixed(2));
+    }
+    $("#ybkjzhjdx").html(res.chargeCountVo.ybkjzhjdx);
+
+    if (res.chargeCountVo.zj != null) {
+        $("#zj").html(res.chargeCountVo.zj.toFixed(2));
+    }
+    $("#zjdx").html(res.chargeCountVo.zjdx);
+}
+
+
+
+/**
+ * 设置挂号参数
+ * @param res
+ */
+function extractedGh (res) {
+//现金收款
+    $("#ghxjbs").html(res.ghsrgcmx.xjhs);
+    if (res.ghsrgcmx.xjsk != null) {
+        $("#ghxjsk").html(res.ghsrgcmx.xjsk.toFixed(2));
+    }
+    $("#ghxjtfbs").html(res.ghsrgcmx.xjthhs);
+    if (res.ghsrgcmx.xjth != null) {
+        $("#ghxjtf").html(res.ghsrgcmx.xjth.toFixed(2));
+    }
+    $("#ghxjssbs").html(res.ghsrgcmx.xjsshs);
+    if (res.ghsrgcmx.xjss != null) {
+        $("#ghxjss").html(res.ghsrgcmx.xjss.toFixed(2));
+    }
+    //银行卡收款
+    $("#ghyhsbs").html(res.ghsrgcmx.yhkhs);
+    if (res.ghsrgcmx.yhksk != null) {
+        $("#ghyhksk").html(res.ghsrgcmx.yhksk.toFixed(2));
+    }
+    $("#ghyhktfbs").html(res.ghsrgcmx.yhkthhs);
+    if (res.ghsrgcmx.yhkth != null) {
+        $("#ghyhktf").html(res.ghsrgcmx.yhkth.toFixed(2));
+    }
+    $("#ghyhkssbs").html(res.ghsrgcmx.yhksshs);
+    if (res.ghsrgcmx.yhkss != null) {
+        $("#ghyhkss").html(res.ghsrgcmx.yhkss.toFixed(2));
+    }
+    //医保卡卡收款
+    $("#ghsybbs").html(res.ghsrgcmx.ybkhs);
+    if (res.ghsrgcmx.ybksk != null) {
+        $("#ghsybksk").html(res.ghsrgcmx.ybksk.toFixed(2));
+    }
+    $("#ghsybtfbs").html(res.ghsrgcmx.ybkthhs);
+    if (res.ghsrgcmx.ybkth != null) {
+        $("#ghsybtf").html(res.ghsrgcmx.ybkth.toFixed(2));
+    }
+    $("#ghsybssbs").html(res.ghsrgcmx.ybksshs);
+    if (res.ghsrgcmx.ybkss != null) {
+        $("#ghsybkss").html(res.ghsrgcmx.ybkss.toFixed(2));
+    }
+    //支付宝收款
+    $("#ghzfbbs").html(res.ghsrgcmx.zfbhs);
+    if (res.ghsrgcmx.zfbsk != null) {
+        $("#ghzfbsk").html(res.ghsrgcmx.zfbsk.toFixed(2));
+    }
+    $("#ghzfbtfbs").html(res.ghsrgcmx.zfbthhs);
+    if (res.ghsrgcmx.zfbth != null) {
+        $("#ghzfbtf").html(res.ghsrgcmx.zfbth.toFixed(2));
+    }
+    $("#ghzfbssbs").html(res.ghsrgcmx.zfbsshs);
+    if (res.ghsrgcmx.zfbss != null) {
+        $("#ghzfbss").html(res.ghsrgcmx.zfbss.toFixed(2));
+    }
+    //微信收款
+    $("#ghwxbs").html(res.ghsrgcmx.wxhs);
+    if (res.ghsrgcmx.wxsk != null) {
+        $("#ghwxsk").html(res.ghsrgcmx.wxsk.toFixed(2));
+    }
+    $("#ghwxtfbs").html(res.ghsrgcmx.wxthhs);
+    if (res.ghsrgcmx.wxth != null) {
+        $("#ghwxtf").html(res.ghsrgcmx.wxth.toFixed(2));
+    }
+    $("#ghwxssbs").html(res.ghsrgcmx.wxsshs);
+    if (res.ghsrgcmx.wxss != null) {
+        $("#ghwxss").html(res.ghsrgcmx.wxss.toFixed(2));
+    }
+    //记账绿色通道收款
+    $("#ghzfbs").html(res.ghsrgcmx.byjzhs);
+    if (res.ghsrgcmx.byjzsk != null) {
+        $("#ghzfsk").html(res.ghsrgcmx.byjzsk.toFixed(2));
+    }
+    $("#ghzftfbs").html(res.ghsrgcmx.byjzthhs);
+    if (res.ghsrgcmx.byjzth != null) {
+        $("#ghzftf").html(res.ghsrgcmx.byjzth.toFixed(2));
+    }
+    $("#ghzfssbs").html(res.ghsrgcmx.byjzsshs);
+    if (res.ghsrgcmx.byjzss != null) {
+        $("#ghzfss").html(res.ghsrgcmx.byjzss.toFixed(2));
+    }
+    //总计收款
+    $("#ghzjbs").html(res.ghsrgcmx.hjhs);
+    if (res.ghsrgcmx.hjsk != null) {
+        $("#ghzjsk").html(res.ghsrgcmx.hjsk.toFixed(2));
+    }
+    $("#ghztfbs").html(res.ghsrgcmx.hjthhs);
+    if (res.ghsrgcmx.hjth != null) {
+        $("#ghzjtk").html(res.ghsrgcmx.hjth.toFixed(2));
+    }
+    $("#ghzjssbs").html(res.ghsrgcmx.hjsshs);
+    if (res.ghsrgcmx.hjss != null) {
+        $("#ghzjss").html(res.ghsrgcmx.hjss.toFixed(2));
+    }
+
+
+    if (res.ghsrgcmx.ghjebhjz != null) {
+        $("#ghsjhj").html(res.ghsrgcmx.ghjebhjz.toFixed(2));
+    }
+    $("#ghsjhjdx").html(res.ghsrgcmx.ghjebhjzdx);
+    if (res.ghsrgcmx.byjzss != null) {
+        $("#ghzfsshj").html(res.ghsrgcmx.byjzss.toFixed(2));
+    }
+    $("#ghzfdx").html(res.ghsrgcmx.byjzssdx);
+
+    if (res.ghsrgcmx.hjss != null) {
+        $("#ghzj").html(res.ghsrgcmx.hjss.toFixed(2));
+    }
+    $("#ghzjdx").html(res.ghsrgcmx.hjssdx);
+    if (res.ghsrgcmx.zcsr != null) {
+        $("#zcsr").html(res.ghsrgcmx.zcsr.toFixed(2));
+    }
+    if (res.ghsrgcmx.jcsr != null) {
+        $("#jcsr").html(res.ghsrgcmx.jcsr.toFixed(2));
+    }
+    if (res.ghsrgcmx.ghsr != null) {
+        $("#ghsr").html(res.ghsrgcmx.ghsr.toFixed(2));
+    }
+
+}
+
+
+
 /**
  * 获取日结报表
  */
@@ -93,232 +351,47 @@ function getRjbb() {
                 $("#totalCharge").html(res.mzReceiptSerial.totalCharge);
                 $("#totalChargeStr").html(res.mzReceiptSerial.totalChargeStr);
 
-                //现金收款
-                $("#xjbs").html(res.chargeCountVo.xjbs);
-                if (res.chargeCountVo.xjsk != null) {
-                    $("#xjsk").html(res.chargeCountVo.xjsk.toFixed(2));
-                }
-                $("#xjtfbs").html(res.chargeCountVo.xjtfbs);
-                if (res.chargeCountVo.xjtf != null) {
-                    $("#xjtf").html(res.chargeCountVo.xjtf.toFixed(2));
-                }
-                $("#xjssbs").html(res.chargeCountVo.xjssbs);
-                if (res.chargeCountVo.xjss != null) {
-                    $("#xjss").html(res.chargeCountVo.xjss.toFixed(2));
-                }
-                //银行卡收款
-                $("#yhsbs").html(res.chargeCountVo.yhsbs);
-                if (res.chargeCountVo.yhksk != null) {
-                    $("#yhksk").html(res.chargeCountVo.yhksk.toFixed(2));
-                }
-                $("#yhktfbs").html(res.chargeCountVo.yhktfbs);
-                if (res.chargeCountVo.yhktf != null) {
-                    $("#yhktf").html(res.chargeCountVo.yhktf.toFixed(2));
-                }
-                $("#yhkssbs").html(res.chargeCountVo.yhkssbs);
-                if (res.chargeCountVo.yhkss != null) {
-                    $("#yhkss").html(res.chargeCountVo.yhkss.toFixed(2));
-                }
-                //支付宝收款
-                $("#zfbbs").html(res.chargeCountVo.zfbbs);
-                if (res.chargeCountVo.zfbsk != null) {
-                    $("#zfbsk").html(res.chargeCountVo.zfbsk.toFixed(2));
-                }
-                $("#zfbtfbs").html(res.chargeCountVo.zfbtfbs);
-                if (res.chargeCountVo.zfbtf != null) {
-                    $("#zfbtf").html(res.chargeCountVo.zfbtf.toFixed(2));
-                }
-                $("#zfbssbs").html(res.chargeCountVo.zfbssbs);
-                if (res.chargeCountVo.zfbss != null) {
-                    $("#zfbss").html(res.chargeCountVo.zfbss.toFixed(2));
-                }
-                //微信收款
-                $("#wxbs").html(res.chargeCountVo.wxbs);
-                if (res.chargeCountVo.wxsk != null) {
-                    $("#wxsk").html(res.chargeCountVo.wxsk.toFixed(2));
-                }
-                $("#wxtfbs").html(res.chargeCountVo.wxtfbs);
-                if (res.chargeCountVo.wxtf != null) {
-                    $("#wxtf").html(res.chargeCountVo.wxtf.toFixed(2));
-                }
-                $("#wxssbs").html(res.chargeCountVo.wxssbs);
-                if (res.chargeCountVo.wxss != null) {
-                    $("#wxss").html(res.chargeCountVo.wxss.toFixed(2));
-                }
-                //记账绿色通道收款
-                $("#zfbs").html(res.chargeCountVo.zfbs);
-                if (res.chargeCountVo.zfsk != null) {
-                    $("#zfsk").html(res.chargeCountVo.zfsk.toFixed(2));
-                }
-                $("#zftfbs").html(res.chargeCountVo.zftfbs);
-                if (res.chargeCountVo.zftf != null) {
-                    $("#zftf").html(res.chargeCountVo.zftf.toFixed(2));
-                }
-                $("#zfssbs").html(res.chargeCountVo.zfssbs);
-                if (res.chargeCountVo.zfss != null) {
-                    $("#zfss").html(res.chargeCountVo.zfss.toFixed(2));
-                }
-                //医保卡收款
-                $("#sybbs").html(res.chargeCountVo.sybbs);
-                if (res.chargeCountVo.sybksk != null) {
-                    $("#sybksk").html(res.chargeCountVo.sybksk.toFixed(2));
-                }
-                $("#sybtfbs").html(res.chargeCountVo.sybtfbs);
-                if (res.chargeCountVo.sybtf != null) {
-                    $("#sybtf").html(res.chargeCountVo.sybtf.toFixed(2));
-                }
-                $("#sybssbs").html(res.chargeCountVo.sybssbs);
-                if (res.chargeCountVo.sybkss != null) {
-                    $("#sybkss").html(res.chargeCountVo.sybkss.toFixed(2));
-                }
-                //总计收款
-                $("#zjbs").html(res.chargeCountVo.zjbs);
-                if (res.chargeCountVo.zjsk != null) {
-                    $("#zjsk").html(res.chargeCountVo.zjsk.toFixed(2));
-                }
-                $("#ztfbs").html(res.chargeCountVo.ztfbs);
-                if (res.chargeCountVo.zjtk != null) {
-                    $("#zjtk").html(res.chargeCountVo.zjtk.toFixed(2));
-                }
-                $("#zjssbs").html(res.chargeCountVo.zjssbs);
-                if (res.chargeCountVo.zjss != null) {
-                    $("#zjss").html(res.chargeCountVo.zjss.toFixed(2));
-                }
-
-                if (res.chargeCountVo.sjhj != null) {
-                    $("#sjhj").html(res.chargeCountVo.sjhj.toFixed(2));
-                }
-                $("#sjhjdx").html(res.chargeCountVo.sjhjdx);
-                if (res.chargeCountVo.zfss != null) {
-                    $("#zfsshj").html(res.chargeCountVo.zfss.toFixed(2));
-                }
-                $("#zfdx").html(res.chargeCountVo.zfdx);
-                if (res.chargeCountVo.zj != null) {
-                    $("#zj").html(res.chargeCountVo.zj.toFixed(2));
-                }
-                $("#zjdx").html(res.chargeCountVo.zjdx);
-
-                $("#sfReceiptBills").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>';
+                extractedSf(res);
+                extractedGh (res);
 
+                $("#receiptBills_table").html(null);
+                var html = '';
+                if (res.receiptBills != null && res.receiptBills.length > 0) {
+                    for (var i = 0; i < res.receiptBills.length; i++) {
                         if (i % 4 == 0) {
-                            html_p += '<tr>';
+                            html += '<tr>';
                         }
-                        html_p += '<td>' + res.sfReceiptBills[i] + '</td>';
-                        if (i % 4 == 3 || i == res.sfReceiptBills.length - 1) {
-                            html_p += '</tr>';
+                        html += '<td width="215px">' + res.receiptBills[i] + '</td>';
+                        if (i % 4 == 3 || i == res.receiptBills.length - 1) {
+                            html += '</tr>';
                         }
                     }
-                    $("#sfReceiptBills").html(html);
-                    $("#sfReceiptBills_p_table").html(html_p);
                 }
-                $("#sffps").html(res.sffps);
-                $("#tpzs").html(res.tpzs);
-                $("#zffps").html(res.zffps);
-                if (res.sfzffpmx.length == 0) {
-                    $(".sfzffpmx").removeClass("in").addClass("hide");
+                html+='<tr><td width="215px">发票总数:'+res.sffps+'</td><td width="215px">退票张数:'+res.tpzs+'</td><td width="215px">作废张数:'+res.zffps+'</td></tr>';
+                $("#receiptBills_table").html(html);
+                if (res.zffpmx.length == 0) {
                     $("#sfzffpmx_table").css("display", "none");
-                } else if (res.sfzffpmx.length > 0) {
-                    $(".sfzffpmx").removeClass("hide").addClass("in");
+                } else if (res.zffpmx.length > 0) {
                     $("#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) {
+                    for (var i = 0; i < res.zffpmx.length; i++) {
+                        var receiptBill = res.zffpmx[i].receiptBill;
+                        if (res.zffpmx[i].receiptBill != null && res.zffpmx[i].receiptBill.length > 8) {
                             receiptBill = receiptBill.substring(0, 8);
                         }
-                        if (i % 3 == 0) {
+                        if (i % 2 == 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 += '<td>' + res.zffpmx[i].name + '</td>';
+                        html += '<td>' + res.zffpmx[i].totalCharge.toFixed(2) + '</td>';
+                        if (i % 2 == 1 || i == res.zffpmx.length - 1) {
                             html += '</tr>';
                         }
                     }
                     $("#sfzffpmx").html(html);
                 }
-                $("#userIdCode_gh").html(res.user.userCode);
-                $("#username_gh").html(res.user.userName);
-                $("#dcountDate_gh").html(format(new Date(), "yyyy-MM-dd HH:mm:ss"));
-                if (res.ghsrgcmx.ghje != null) {
-                    $("#ghje").html(res.ghsrgcmx.ghje.toFixed(2));
-                }
-                $("#ghfps").html("所用票数:" + res.ghfps);
-                $("#qmhs").html("全免号数:" + res.ghsrgcmx.qmhs);
-                if (res.ghsrgcmx.jzhs != null) {
-                    $("#jzhs").html("记账号数:" + res.ghsrgcmx.jzhs);
-                }
-                if (res.ghsrgcmx.jzje != null) {
-                    $("#jzje").html("记账金额:" + res.ghsrgcmx.jzje);
-                }
-                if (res.ghsrgcmx.zcsr != null) {
-                    $("#zcsr").html("诊察收入:" + res.ghsrgcmx.zcsr.toFixed(2));
-                }
-                if (res.ghsrgcmx.jcsr != null) {
-                    $("#jcsr").html("检查收入:" + res.ghsrgcmx.jcsr.toFixed(2));
-                }
-                if (res.ghsrgcmx.ghsr != null) {
-                    $("#ghsr").html("挂号费(门诊):" + res.ghsrgcmx.ghsr.toFixed(2));
-                }
-                if (res.ghsrgcmx.thje != null) {
-                    $("#thje").html(res.ghsrgcmx.thje.toFixed(2));
-                }
-                $("#ghtpzs").html("退票数:" + res.ghtpzs);
-                if (res.ghsrgcmx.ghhj != null) {
-                    $("#ghhj").html(res.ghsrgcmx.ghhj.toFixed(2));
-                }
-                if (res.ghsrgcmx.ghjebhjz != null) {
-                    $("#ghjebhjz").html("合计(不含记账)   " + res.ghsrgcmx.ghjebhjz.toFixed(2));
-                }
-                $("#ghhjdx").html(res.ghsrgcmx.ghhjdx);
-                $("#ghjebhjzdx").html("合计(不含记账)   " + res.ghsrgcmx.ghjebhjzdx);
-                $("#ghReceiptBills").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);
-                if (res.thzffpmx.length == 0) {
-                    $("#thzffpmx_table").css("display", "none");
-                } else if (res.thzffpmx.length > 0) {
-                    $("#thzffpmx_table").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, 8);
-                        }
-                        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);
-                }
             } else if (res.code == -1) {
                 new PNotify({
                     title: '错误提示',
@@ -650,11 +723,11 @@ function dcountCharge() {
                     LODOP.SET_SHOW_MODE("BKIMG_WIDTH", "210mm");
                     LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", "297mm");
                     var strStyle="<style>table{width: 96%;margin-top: 20px;margin-bottom: 10px;} table,td,th {border-width: 1px;border-style: solid;border-collapse: collapse}</style>"
-                    LODOP.ADD_PRINT_HTM("0mm", "5mm", "200mm", "280mm",strStyle+ document.getElementById("report_table").innerHTML);
-                   // LODOP.NewPageA();
-                   // LODOP.ADD_PRINT_HTM("0mm", "5mm", "200mm", "280mm", document.getElementById("printDiv_gh").innerHTML);
-                    //LODOP.PRINT();
-                    LODOP.PREVIEW();
+                    LODOP.ADD_PRINT_HTM("0mm", "5mm", "200mm", "280mm",strStyle+ document.getElementById("report_table_1").innerHTML);
+                    LODOP.NewPageA();
+                    LODOP.ADD_PRINT_HTM("0mm", "5mm", "200mm", "280mm", document.getElementById("zbr_div").innerHTML);
+                    LODOP.PRINT();
+                    //LODOP.PREVIEW();
                     //刷新数据
                     getRjbb();
                 }

+ 265 - 279
src/main/resources/static/js/daily_collect.js

@@ -18,7 +18,7 @@ $(function () {
 
     setTimeout(function () {
         getLodop();
-    }, 400);
+    }, 800);
 
     $(".selectpicker").selectpicker({
         dropuAuto: false
@@ -57,6 +57,264 @@ function initFeeTable() {
     canPrint = true;
 }
 
+
+/**
+ * 设置收费参数
+ * @param res
+ */
+function extractedSf (res) {
+//现金收款
+    $("#xjbs").html(res.chargeCountVo.xjbs);
+    if (res.chargeCountVo.xjsk != null) {
+        $("#xjsk").html(res.chargeCountVo.xjsk.toFixed(2));
+    }
+    $("#xjtfbs").html(res.chargeCountVo.xjtfbs);
+    if (res.chargeCountVo.xjtf != null) {
+        $("#xjtf").html(res.chargeCountVo.xjtf.toFixed(2));
+    }
+    $("#xjssbs").html(res.chargeCountVo.xjssbs);
+    if (res.chargeCountVo.xjss != null) {
+        $("#xjss").html(res.chargeCountVo.xjss.toFixed(2));
+    }
+    //银行卡收款
+    $("#yhsbs").html(res.chargeCountVo.yhsbs);
+    if (res.chargeCountVo.yhksk != null) {
+        $("#yhksk").html(res.chargeCountVo.yhksk.toFixed(2));
+    }
+    $("#yhktfbs").html(res.chargeCountVo.yhktfbs);
+    if (res.chargeCountVo.yhktf != null) {
+        $("#yhktf").html(res.chargeCountVo.yhktf.toFixed(2));
+    }
+    $("#yhkssbs").html(res.chargeCountVo.yhkssbs);
+    if (res.chargeCountVo.yhkss != null) {
+        $("#yhkss").html(res.chargeCountVo.yhkss.toFixed(2));
+    }
+    //医保卡卡收款
+    $("#ybjzbs").html(res.chargeCountVo.ybjzbs);
+    if (res.chargeCountVo.ybjzsk != null) {
+        $("#ybjzsk").html(res.chargeCountVo.ybjzsk.toFixed(2));
+    }
+    $("#ybjztfbs").html(res.chargeCountVo.ybjztfbs);
+    if (res.chargeCountVo.ybjztf != null) {
+        $("#ybjztf").html(res.chargeCountVo.ybjztf.toFixed(2));
+    }
+    $("#ybjzssbs").html(res.chargeCountVo.ybjzssbs);
+    if (res.chargeCountVo.ybjzss != null) {
+        $("#ybjzss").html(res.chargeCountVo.ybjzss.toFixed(2));
+    }
+    //支付宝收款
+    $("#zfbbs").html(res.chargeCountVo.zfbbs);
+    if (res.chargeCountVo.zfbsk != null) {
+        $("#zfbsk").html(res.chargeCountVo.zfbsk.toFixed(2));
+    }
+    $("#zfbtfbs").html(res.chargeCountVo.zfbtfbs);
+    if (res.chargeCountVo.zfbtf != null) {
+        $("#zfbtf").html(res.chargeCountVo.zfbtf.toFixed(2));
+    }
+    $("#zfbssbs").html(res.chargeCountVo.zfbssbs);
+    if (res.chargeCountVo.zfbss != null) {
+        $("#zfbss").html(res.chargeCountVo.zfbss.toFixed(2));
+    }
+    //微信收款
+    $("#wxbs").html(res.chargeCountVo.wxbs);
+    if (res.chargeCountVo.wxsk != null) {
+        $("#wxsk").html(res.chargeCountVo.wxsk.toFixed(2));
+    }
+    $("#wxtfbs").html(res.chargeCountVo.wxtfbs);
+    if (res.chargeCountVo.wxtf != null) {
+        $("#wxtf").html(res.chargeCountVo.wxtf.toFixed(2));
+    }
+    $("#wxssbs").html(res.chargeCountVo.wxssbs);
+    if (res.chargeCountVo.wxss != null) {
+        $("#wxss").html(res.chargeCountVo.wxss.toFixed(2));
+    }
+    //记账绿色通道收款
+    $("#zfbs").html(res.chargeCountVo.zfbs);
+    if (res.chargeCountVo.zfsk != null) {
+        $("#zfsk").html(res.chargeCountVo.zfsk.toFixed(2));
+    }
+    $("#zftfbs").html(res.chargeCountVo.zftfbs);
+    if (res.chargeCountVo.zftf != null) {
+        $("#zftf").html(res.chargeCountVo.zftf.toFixed(2));
+    }
+    $("#zfssbs").html(res.chargeCountVo.zfssbs);
+    if (res.chargeCountVo.zfss != null) {
+        $("#zfss").html(res.chargeCountVo.zfss.toFixed(2));
+    }
+    //医保卡收款
+    $("#sybbs").html(res.chargeCountVo.sybbs);
+    if (res.chargeCountVo.sybksk != null) {
+        $("#sybksk").html(res.chargeCountVo.sybksk.toFixed(2));
+    }
+    $("#sybtfbs").html(res.chargeCountVo.sybtfbs);
+    if (res.chargeCountVo.sybtf != null) {
+        $("#sybtf").html(res.chargeCountVo.sybtf.toFixed(2));
+    }
+    $("#sybssbs").html(res.chargeCountVo.sybssbs);
+    if (res.chargeCountVo.sybkss != null) {
+        $("#sybkss").html(res.chargeCountVo.sybkss.toFixed(2));
+    }
+    //总计收款
+    $("#zjbs").html(res.chargeCountVo.zjbs);
+    if (res.chargeCountVo.zjsk != null) {
+        $("#zjsk").html(res.chargeCountVo.zjsk.toFixed(2));
+    }
+    $("#ztfbs").html(res.chargeCountVo.ztfbs);
+    if (res.chargeCountVo.zjtk != null) {
+        $("#zjtk").html(res.chargeCountVo.zjtk.toFixed(2));
+    }
+    $("#zjssbs").html(res.chargeCountVo.zjssbs);
+    if (res.chargeCountVo.zjss != null) {
+        $("#zjss").html(res.chargeCountVo.zjss.toFixed(2));
+    }
+
+
+    if (res.chargeCountVo.sjhj != null) {
+        $("#sjhj").html(res.chargeCountVo.sjhj.toFixed(2));
+    }
+    $("#sjhjdx").html(res.chargeCountVo.sjhjdx);
+    if (res.chargeCountVo.zfss != null) {
+        $("#zfsshj").html(res.chargeCountVo.zfss.toFixed(2));
+    }
+    $("#zfdx").html(res.chargeCountVo.zfdx);
+
+    if (res.chargeCountVo.ybjzss != null) {
+        $("#ybkjzhj").html(res.chargeCountVo.ybjzss.toFixed(2));
+    }
+    $("#ybkjzhjdx").html(res.chargeCountVo.ybkjzhjdx);
+
+    if (res.chargeCountVo.zj != null) {
+        $("#zj").html(res.chargeCountVo.zj.toFixed(2));
+    }
+    $("#zjdx").html(res.chargeCountVo.zjdx);
+}
+
+
+
+/**
+ * 设置挂号参数
+ * @param res
+ */
+function extractedGh (res) {
+//现金收款
+    $("#ghxjbs").html(res.ghsrgcmx.xjhs);
+    if (res.ghsrgcmx.xjsk != null) {
+        $("#ghxjsk").html(res.ghsrgcmx.xjsk.toFixed(2));
+    }
+    $("#ghxjtfbs").html(res.ghsrgcmx.xjthhs);
+    if (res.ghsrgcmx.xjth != null) {
+        $("#ghxjtf").html(res.ghsrgcmx.xjth.toFixed(2));
+    }
+    $("#ghxjssbs").html(res.ghsrgcmx.xjsshs);
+    if (res.ghsrgcmx.xjss != null) {
+        $("#ghxjss").html(res.ghsrgcmx.xjss.toFixed(2));
+    }
+    //银行卡收款
+    $("#ghyhsbs").html(res.ghsrgcmx.yhkhs);
+    if (res.ghsrgcmx.yhksk != null) {
+        $("#ghyhksk").html(res.ghsrgcmx.yhksk.toFixed(2));
+    }
+    $("#ghyhktfbs").html(res.ghsrgcmx.yhkthhs);
+    if (res.ghsrgcmx.yhkth != null) {
+        $("#ghyhktf").html(res.ghsrgcmx.yhkth.toFixed(2));
+    }
+    $("#ghyhkssbs").html(res.ghsrgcmx.yhksshs);
+    if (res.ghsrgcmx.yhkss != null) {
+        $("#ghyhkss").html(res.ghsrgcmx.yhkss.toFixed(2));
+    }
+    //医保卡卡收款
+    $("#ghsybbs").html(res.ghsrgcmx.ybkhs);
+    if (res.ghsrgcmx.ybksk != null) {
+        $("#ghsybksk").html(res.ghsrgcmx.ybksk.toFixed(2));
+    }
+    $("#ghsybtfbs").html(res.ghsrgcmx.ybkthhs);
+    if (res.ghsrgcmx.ybkth != null) {
+        $("#ghsybtf").html(res.ghsrgcmx.ybkth.toFixed(2));
+    }
+    $("#ghsybssbs").html(res.ghsrgcmx.ybksshs);
+    if (res.ghsrgcmx.ybkss != null) {
+        $("#ghsybkss").html(res.ghsrgcmx.ybkss.toFixed(2));
+    }
+    //支付宝收款
+    $("#ghzfbbs").html(res.ghsrgcmx.zfbhs);
+    if (res.ghsrgcmx.zfbsk != null) {
+        $("#ghzfbsk").html(res.ghsrgcmx.zfbsk.toFixed(2));
+    }
+    $("#ghzfbtfbs").html(res.ghsrgcmx.zfbthhs);
+    if (res.ghsrgcmx.zfbth != null) {
+        $("#ghzfbtf").html(res.ghsrgcmx.zfbth.toFixed(2));
+    }
+    $("#ghzfbssbs").html(res.ghsrgcmx.zfbsshs);
+    if (res.ghsrgcmx.zfbss != null) {
+        $("#ghzfbss").html(res.ghsrgcmx.zfbss.toFixed(2));
+    }
+    //微信收款
+    $("#ghwxbs").html(res.ghsrgcmx.wxhs);
+    if (res.ghsrgcmx.wxsk != null) {
+        $("#ghwxsk").html(res.ghsrgcmx.wxsk.toFixed(2));
+    }
+    $("#ghwxtfbs").html(res.ghsrgcmx.wxthhs);
+    if (res.ghsrgcmx.wxth != null) {
+        $("#ghwxtf").html(res.ghsrgcmx.wxth.toFixed(2));
+    }
+    $("#ghwxssbs").html(res.ghsrgcmx.wxsshs);
+    if (res.ghsrgcmx.wxss != null) {
+        $("#ghwxss").html(res.ghsrgcmx.wxss.toFixed(2));
+    }
+    //记账绿色通道收款
+    $("#ghzfbs").html(res.ghsrgcmx.byjzhs);
+    if (res.ghsrgcmx.byjzsk != null) {
+        $("#ghzfsk").html(res.ghsrgcmx.byjzsk.toFixed(2));
+    }
+    $("#ghzftfbs").html(res.ghsrgcmx.byjzthhs);
+    if (res.ghsrgcmx.byjzth != null) {
+        $("#ghzftf").html(res.ghsrgcmx.byjzth.toFixed(2));
+    }
+    $("#ghzfssbs").html(res.ghsrgcmx.byjzsshs);
+    if (res.ghsrgcmx.byjzss != null) {
+        $("#ghzfss").html(res.ghsrgcmx.byjzss.toFixed(2));
+    }
+    //总计收款
+    $("#ghzjbs").html(res.ghsrgcmx.hjhs);
+    if (res.ghsrgcmx.hjsk != null) {
+        $("#ghzjsk").html(res.ghsrgcmx.hjsk.toFixed(2));
+    }
+    $("#ghztfbs").html(res.ghsrgcmx.hjthhs);
+    if (res.ghsrgcmx.hjth != null) {
+        $("#ghzjtk").html(res.ghsrgcmx.hjth.toFixed(2));
+    }
+    $("#ghzjssbs").html(res.ghsrgcmx.hjsshs);
+    if (res.ghsrgcmx.hjss != null) {
+        $("#ghzjss").html(res.ghsrgcmx.hjss.toFixed(2));
+    }
+
+
+    if (res.ghsrgcmx.ghjebhjz != null) {
+        $("#ghsjhj").html(res.ghsrgcmx.ghjebhjz.toFixed(2));
+    }
+    $("#ghsjhjdx").html(res.ghsrgcmx.ghjebhjzdx);
+    if (res.ghsrgcmx.byjzss != null) {
+        $("#ghzfsshj").html(res.ghsrgcmx.byjzss.toFixed(2));
+    }
+    $("#ghzfdx").html(res.ghsrgcmx.byjzssdx);
+
+    if (res.ghsrgcmx.hjss != null) {
+        $("#ghzj").html(res.ghsrgcmx.hjss.toFixed(2));
+    }
+    $("#ghzjdx").html(res.ghsrgcmx.hjssdx);
+    if (res.ghsrgcmx.zcsr != null) {
+        $("#zcsr").html(res.ghsrgcmx.zcsr.toFixed(2));
+    }
+    if (res.ghsrgcmx.jcsr != null) {
+        $("#jcsr").html(res.ghsrgcmx.jcsr.toFixed(2));
+    }
+    if (res.ghsrgcmx.ghsr != null) {
+        $("#ghsr").html(res.ghsrgcmx.ghsr.toFixed(2));
+    }
+
+}
+
+
 /**
  * 获取日结报表
  */
@@ -101,239 +359,10 @@ function getRjbb() {
                 $("#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));
-
-                $("#dcountDate_p").html($('#reportrange span').html());
-                $("#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);
-
-                $("#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);
-
-                $("#dcountDate_gh").html($('#reportrange span').html());
-
-                $("#dcountDate_gh_p").html($('#reportrange span').html());
-                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);
+                $("#totalCharge").html(res.mzReceiptSerial.totalCharge);
+                $("#totalChargeStr").html(res.mzReceiptSerial.totalChargeStr);
+                extractedSf(res);
+                extractedGh (res);
 
 
                 if (res.ghWorkloadVos.length == 0) {
@@ -359,7 +388,6 @@ function getRjbb() {
                     html += '<td>' + temp.thAmount.toFixed(2) + '</td>';
                     html += '<td>' + temp.totalAmount.toFixed(2) + '</td></tr>';
                     $("#ghgzlhzb").html(html);
-                    $("#ghgzlhzb_p").html(html);
                 }
 
 
@@ -386,43 +414,8 @@ function getRjbb() {
                     html += '<td>' + temp.thAmount.toFixed(2) + '</td>';
                     html += '<td>' + temp.totalAmount.toFixed(2) + '</td></tr>';
                     $("#sfgzlhzb").html(html);
-                    $("#sfgzlhzb_p").html(html);
-                }
-
-
-                if (res.chargeDetailVos.length == 0) {
-                    $("#mzskylb_parent").css("display", "none");
-                } else if (res.chargeDetailVos.length > 0) {
-                    $("#mzskylb_parent").css("display", "block");
-                    var html = '';
-                    for (var i = 0; i < res.chargeDetailVos.length-1; i++) {
-
-                        var temp = res.chargeDetailVos[i];
-                        if (i % 3 == 0) {
-                            html += '<tr>';
-                        }
-                        html += '<td>' + temp.auditCode + '</td>';
-                        html += '<td>' + temp.amount + '</td>';
-                        html += '<td>' + temp.totalCharge.toFixed(2) + '</td>';
-                        if (i % 3 == 2 ) {
-                            html += '</tr>';
-                        }
-                    }
-                    var temp = res.chargeDetailVos[res.chargeDetailVos.length-1];
-                    if (i % 3 == 0) {
-                        html += '<tr>';
-                    }
-                    html += '<td colspan="2">合计</td>';
-                    html += '<td colspan="4">' + temp.totalCharge.toFixed(2) + '</td>';
-                    if (i % 3 == 2 || i == res.chargeDetailVos.length - 1) {
-                        html += '</tr>';
-                    }
-                    $("#mzskylb").html(html);
-                    $("#mzskylb_p").html(html);
                 }
                 $("#username_zbr").html(res.user.userName);
-                $("#username_zbr_p").html(res.user.userName);
-
             } else if (res.code == -1) {
                 new PNotify({
                     title: '错误提示',
@@ -796,16 +789,9 @@ function print() {
     LODOP.ADD_PRINT_HTM(26,"5%","90%",109,document.getElementById("sfgzlhzb_parent_p_title").innerHTML);
     LODOP.SET_PRINT_STYLEA(0,"ItemType",1);
     LODOP.SET_PRINT_STYLEA(0,"LinkedItem",4);
-    LODOP.NewPageA();
-   // LODOP.ADD_PRINT_HTM("0mm", "0mm", "210mm", "297mm", document.getElementById("mzskylb_parent_p").innerHTML);
-    LODOP.ADD_PRINT_TABLE(128,"5%","90%",1000,strStyle+document.getElementById("mzskylb_parent_p").innerHTML);
-    LODOP.SET_PRINT_STYLEA(0,"Vorient",3);
-    LODOP.ADD_PRINT_HTM(26,"5%","90%",109,document.getElementById("mzskylb_parent_p_title").innerHTML);
-    LODOP.SET_PRINT_STYLEA(0,"ItemType",1);
-    LODOP.SET_PRINT_STYLEA(0,"LinkedItem",6);
     LODOP.ADD_PRINT_HTM(600,"5%","90%",109, document.getElementById("username_zbr_p_parent").innerHTML);
-    LODOP.PRINT();
-    //LODOP.PREVIEW();
+    //LODOP.PRINT();
+    LODOP.PREVIEW();
 }
 
 

+ 290 - 337
src/main/resources/static/js/daily_repeat_print.js

@@ -17,7 +17,7 @@ $(function () {
 
     setTimeout(function () {
         getLodop();
-    }, 400);
+    }, 800);
 
     $(".selectpicker").selectpicker({
         dropuAuto: false
@@ -56,6 +56,264 @@ function initFeeTable() {
 
 }
 
+
+/**
+ * 设置收费参数
+ * @param res
+ */
+function extractedSf (res) {
+//现金收款
+    $("#xjbs").html(res.chargeCountVo.xjbs);
+    if (res.chargeCountVo.xjsk != null) {
+        $("#xjsk").html(res.chargeCountVo.xjsk.toFixed(2));
+    }
+    $("#xjtfbs").html(res.chargeCountVo.xjtfbs);
+    if (res.chargeCountVo.xjtf != null) {
+        $("#xjtf").html(res.chargeCountVo.xjtf.toFixed(2));
+    }
+    $("#xjssbs").html(res.chargeCountVo.xjssbs);
+    if (res.chargeCountVo.xjss != null) {
+        $("#xjss").html(res.chargeCountVo.xjss.toFixed(2));
+    }
+    //银行卡收款
+    $("#yhsbs").html(res.chargeCountVo.yhsbs);
+    if (res.chargeCountVo.yhksk != null) {
+        $("#yhksk").html(res.chargeCountVo.yhksk.toFixed(2));
+    }
+    $("#yhktfbs").html(res.chargeCountVo.yhktfbs);
+    if (res.chargeCountVo.yhktf != null) {
+        $("#yhktf").html(res.chargeCountVo.yhktf.toFixed(2));
+    }
+    $("#yhkssbs").html(res.chargeCountVo.yhkssbs);
+    if (res.chargeCountVo.yhkss != null) {
+        $("#yhkss").html(res.chargeCountVo.yhkss.toFixed(2));
+    }
+    //医保卡卡收款
+    $("#ybjzbs").html(res.chargeCountVo.ybjzbs);
+    if (res.chargeCountVo.ybjzsk != null) {
+        $("#ybjzsk").html(res.chargeCountVo.ybjzsk.toFixed(2));
+    }
+    $("#ybjztfbs").html(res.chargeCountVo.ybjztfbs);
+    if (res.chargeCountVo.ybjztf != null) {
+        $("#ybjztf").html(res.chargeCountVo.ybjztf.toFixed(2));
+    }
+    $("#ybjzssbs").html(res.chargeCountVo.ybjzssbs);
+    if (res.chargeCountVo.ybjzss != null) {
+        $("#ybjzss").html(res.chargeCountVo.ybjzss.toFixed(2));
+    }
+    //支付宝收款
+    $("#zfbbs").html(res.chargeCountVo.zfbbs);
+    if (res.chargeCountVo.zfbsk != null) {
+        $("#zfbsk").html(res.chargeCountVo.zfbsk.toFixed(2));
+    }
+    $("#zfbtfbs").html(res.chargeCountVo.zfbtfbs);
+    if (res.chargeCountVo.zfbtf != null) {
+        $("#zfbtf").html(res.chargeCountVo.zfbtf.toFixed(2));
+    }
+    $("#zfbssbs").html(res.chargeCountVo.zfbssbs);
+    if (res.chargeCountVo.zfbss != null) {
+        $("#zfbss").html(res.chargeCountVo.zfbss.toFixed(2));
+    }
+    //微信收款
+    $("#wxbs").html(res.chargeCountVo.wxbs);
+    if (res.chargeCountVo.wxsk != null) {
+        $("#wxsk").html(res.chargeCountVo.wxsk.toFixed(2));
+    }
+    $("#wxtfbs").html(res.chargeCountVo.wxtfbs);
+    if (res.chargeCountVo.wxtf != null) {
+        $("#wxtf").html(res.chargeCountVo.wxtf.toFixed(2));
+    }
+    $("#wxssbs").html(res.chargeCountVo.wxssbs);
+    if (res.chargeCountVo.wxss != null) {
+        $("#wxss").html(res.chargeCountVo.wxss.toFixed(2));
+    }
+    //记账绿色通道收款
+    $("#zfbs").html(res.chargeCountVo.zfbs);
+    if (res.chargeCountVo.zfsk != null) {
+        $("#zfsk").html(res.chargeCountVo.zfsk.toFixed(2));
+    }
+    $("#zftfbs").html(res.chargeCountVo.zftfbs);
+    if (res.chargeCountVo.zftf != null) {
+        $("#zftf").html(res.chargeCountVo.zftf.toFixed(2));
+    }
+    $("#zfssbs").html(res.chargeCountVo.zfssbs);
+    if (res.chargeCountVo.zfss != null) {
+        $("#zfss").html(res.chargeCountVo.zfss.toFixed(2));
+    }
+    //医保卡收款
+    $("#sybbs").html(res.chargeCountVo.sybbs);
+    if (res.chargeCountVo.sybksk != null) {
+        $("#sybksk").html(res.chargeCountVo.sybksk.toFixed(2));
+    }
+    $("#sybtfbs").html(res.chargeCountVo.sybtfbs);
+    if (res.chargeCountVo.sybtf != null) {
+        $("#sybtf").html(res.chargeCountVo.sybtf.toFixed(2));
+    }
+    $("#sybssbs").html(res.chargeCountVo.sybssbs);
+    if (res.chargeCountVo.sybkss != null) {
+        $("#sybkss").html(res.chargeCountVo.sybkss.toFixed(2));
+    }
+    //总计收款
+    $("#zjbs").html(res.chargeCountVo.zjbs);
+    if (res.chargeCountVo.zjsk != null) {
+        $("#zjsk").html(res.chargeCountVo.zjsk.toFixed(2));
+    }
+    $("#ztfbs").html(res.chargeCountVo.ztfbs);
+    if (res.chargeCountVo.zjtk != null) {
+        $("#zjtk").html(res.chargeCountVo.zjtk.toFixed(2));
+    }
+    $("#zjssbs").html(res.chargeCountVo.zjssbs);
+    if (res.chargeCountVo.zjss != null) {
+        $("#zjss").html(res.chargeCountVo.zjss.toFixed(2));
+    }
+
+
+    if (res.chargeCountVo.sjhj != null) {
+        $("#sjhj").html(res.chargeCountVo.sjhj.toFixed(2));
+    }
+    $("#sjhjdx").html(res.chargeCountVo.sjhjdx);
+    if (res.chargeCountVo.zfss != null) {
+        $("#zfsshj").html(res.chargeCountVo.zfss.toFixed(2));
+    }
+    $("#zfdx").html(res.chargeCountVo.zfdx);
+
+    if (res.chargeCountVo.ybjzss != null) {
+        $("#ybkjzhj").html(res.chargeCountVo.ybjzss.toFixed(2));
+    }
+    $("#ybkjzhjdx").html(res.chargeCountVo.ybkjzhjdx);
+
+    if (res.chargeCountVo.zj != null) {
+        $("#zj").html(res.chargeCountVo.zj.toFixed(2));
+    }
+    $("#zjdx").html(res.chargeCountVo.zjdx);
+}
+
+
+
+/**
+ * 设置挂号参数
+ * @param res
+ */
+function extractedGh (res) {
+//现金收款
+    $("#ghxjbs").html(res.ghsrgcmx.xjhs);
+    if (res.ghsrgcmx.xjsk != null) {
+        $("#ghxjsk").html(res.ghsrgcmx.xjsk.toFixed(2));
+    }
+    $("#ghxjtfbs").html(res.ghsrgcmx.xjthhs);
+    if (res.ghsrgcmx.xjth != null) {
+        $("#ghxjtf").html(res.ghsrgcmx.xjth.toFixed(2));
+    }
+    $("#ghxjssbs").html(res.ghsrgcmx.xjsshs);
+    if (res.ghsrgcmx.xjss != null) {
+        $("#ghxjss").html(res.ghsrgcmx.xjss.toFixed(2));
+    }
+    //银行卡收款
+    $("#ghyhsbs").html(res.ghsrgcmx.yhkhs);
+    if (res.ghsrgcmx.yhksk != null) {
+        $("#ghyhksk").html(res.ghsrgcmx.yhksk.toFixed(2));
+    }
+    $("#ghyhktfbs").html(res.ghsrgcmx.yhkthhs);
+    if (res.ghsrgcmx.yhkth != null) {
+        $("#ghyhktf").html(res.ghsrgcmx.yhkth.toFixed(2));
+    }
+    $("#ghyhkssbs").html(res.ghsrgcmx.yhksshs);
+    if (res.ghsrgcmx.yhkss != null) {
+        $("#ghyhkss").html(res.ghsrgcmx.yhkss.toFixed(2));
+    }
+    //医保卡卡收款
+    $("#ghsybbs").html(res.ghsrgcmx.ybkhs);
+    if (res.ghsrgcmx.ybksk != null) {
+        $("#ghsybksk").html(res.ghsrgcmx.ybksk.toFixed(2));
+    }
+    $("#ghsybtfbs").html(res.ghsrgcmx.ybkthhs);
+    if (res.ghsrgcmx.ybkth != null) {
+        $("#ghsybtf").html(res.ghsrgcmx.ybkth.toFixed(2));
+    }
+    $("#ghsybssbs").html(res.ghsrgcmx.ybksshs);
+    if (res.ghsrgcmx.ybkss != null) {
+        $("#ghsybkss").html(res.ghsrgcmx.ybkss.toFixed(2));
+    }
+    //支付宝收款
+    $("#ghzfbbs").html(res.ghsrgcmx.zfbhs);
+    if (res.ghsrgcmx.zfbsk != null) {
+        $("#ghzfbsk").html(res.ghsrgcmx.zfbsk.toFixed(2));
+    }
+    $("#ghzfbtfbs").html(res.ghsrgcmx.zfbthhs);
+    if (res.ghsrgcmx.zfbth != null) {
+        $("#ghzfbtf").html(res.ghsrgcmx.zfbth.toFixed(2));
+    }
+    $("#ghzfbssbs").html(res.ghsrgcmx.zfbsshs);
+    if (res.ghsrgcmx.zfbss != null) {
+        $("#ghzfbss").html(res.ghsrgcmx.zfbss.toFixed(2));
+    }
+    //微信收款
+    $("#ghwxbs").html(res.ghsrgcmx.wxhs);
+    if (res.ghsrgcmx.wxsk != null) {
+        $("#ghwxsk").html(res.ghsrgcmx.wxsk.toFixed(2));
+    }
+    $("#ghwxtfbs").html(res.ghsrgcmx.wxthhs);
+    if (res.ghsrgcmx.wxth != null) {
+        $("#ghwxtf").html(res.ghsrgcmx.wxth.toFixed(2));
+    }
+    $("#ghwxssbs").html(res.ghsrgcmx.wxsshs);
+    if (res.ghsrgcmx.wxss != null) {
+        $("#ghwxss").html(res.ghsrgcmx.wxss.toFixed(2));
+    }
+    //记账绿色通道收款
+    $("#ghzfbs").html(res.ghsrgcmx.byjzhs);
+    if (res.ghsrgcmx.byjzsk != null) {
+        $("#ghzfsk").html(res.ghsrgcmx.byjzsk.toFixed(2));
+    }
+    $("#ghzftfbs").html(res.ghsrgcmx.byjzthhs);
+    if (res.ghsrgcmx.byjzth != null) {
+        $("#ghzftf").html(res.ghsrgcmx.byjzth.toFixed(2));
+    }
+    $("#ghzfssbs").html(res.ghsrgcmx.byjzsshs);
+    if (res.ghsrgcmx.byjzss != null) {
+        $("#ghzfss").html(res.ghsrgcmx.byjzss.toFixed(2));
+    }
+    //总计收款
+    $("#ghzjbs").html(res.ghsrgcmx.hjhs);
+    if (res.ghsrgcmx.hjsk != null) {
+        $("#ghzjsk").html(res.ghsrgcmx.hjsk.toFixed(2));
+    }
+    $("#ghztfbs").html(res.ghsrgcmx.hjthhs);
+    if (res.ghsrgcmx.hjth != null) {
+        $("#ghzjtk").html(res.ghsrgcmx.hjth.toFixed(2));
+    }
+    $("#ghzjssbs").html(res.ghsrgcmx.hjsshs);
+    if (res.ghsrgcmx.hjss != null) {
+        $("#ghzjss").html(res.ghsrgcmx.hjss.toFixed(2));
+    }
+
+
+    if (res.ghsrgcmx.ghjebhjz != null) {
+        $("#ghsjhj").html(res.ghsrgcmx.ghjebhjz.toFixed(2));
+    }
+    $("#ghsjhjdx").html(res.ghsrgcmx.ghjebhjzdx);
+    if (res.ghsrgcmx.byjzss != null) {
+        $("#ghzfsshj").html(res.ghsrgcmx.byjzss.toFixed(2));
+    }
+    $("#ghzfdx").html(res.ghsrgcmx.byjzssdx);
+
+    if (res.ghsrgcmx.hjss != null) {
+        $("#ghzj").html(res.ghsrgcmx.hjss.toFixed(2));
+    }
+    $("#ghzjdx").html(res.ghsrgcmx.hjssdx);
+    if (res.ghsrgcmx.zcsr != null) {
+        $("#zcsr").html(res.ghsrgcmx.zcsr.toFixed(2));
+    }
+    if (res.ghsrgcmx.jcsr != null) {
+        $("#jcsr").html(res.ghsrgcmx.jcsr.toFixed(2));
+    }
+    if (res.ghsrgcmx.ghsr != null) {
+        $("#ghsr").html(res.ghsrgcmx.ghsr.toFixed(2));
+    }
+
+}
+
+
 /**
  * 获取日结报表
  */
@@ -77,11 +335,14 @@ function getRjbb() {
                 if(res.user!=null){
                     $("#userIdCode").html(res.user.userCode);
                     $("#username").html(res.user.userName);
+                    $("#username_zbr").html(res.user.userName);
                 }else {
                     $("#userIdCode").html($("#cashParam").val());
-                    $("#username").html($("#cashParam").find('option:selected').text());
+                    var uerName=$("#cashParam").find('option:selected').text();
+                    $("#username").html(uerName);
+                    $("#username_zbr").html(uerName);
                 }
-                $("#dcountDate").html(format($("#rjList").val(), "yyyy-MM-dd HH:mm:ss"));
+                $("#dcountDate").html(format(new Date(), "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));
@@ -102,357 +363,48 @@ function getRjbb() {
                 $("#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));
-
-                if(res.user!=null){
-                    $("#userIdCode_p").html(res.user.userCode);
-                    $("#username_p").html(res.user.userName);
-                }else {
-                    $("#userIdCode_p").html($("#cashParam").val());
-                    $("#username_p").html($("#cashParam").find('option:selected').text());
-                }
-                $("#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));
-                }
+                $("#totalCharge").html(res.mzReceiptSerial.totalCharge);
+                $("#totalChargeStr").html(res.mzReceiptSerial.totalChargeStr);
 
-                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>';
+                extractedSf(res);
+                extractedGh (res);
 
+                $("#receiptBills_table").html(null);
+                var html = '';
+                if (res.receiptBills != null && res.receiptBills.length > 0) {
+                    for (var i = 0; i < res.receiptBills.length; i++) {
                         if (i % 4 == 0) {
-                            html_p += '<tr>';
+                            html += '<tr>';
                         }
-                        html_p += '<td>' + res.sfReceiptBills[i] + '</td>';
-                        if (i % 4 == 3 || i == res.sfReceiptBills.length - 1) {
-                            html_p += '</tr>';
+                        html += '<td width="215px">' + res.receiptBills[i] + '</td>';
+                        if (i % 4 == 3 || i == res.receiptBills.length - 1) {
+                            html += '</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");
+                html+='<tr><td width="215px">发票总数:'+res.sffps+'</td><td width="215px">退票张数:'+res.tpzs+'</td><td width="215px">作废张数:'+res.zffps+'</td></tr>';
+                $("#receiptBills_table").html(html);
+                if (res.zffpmx.length == 0) {
                     $("#sfzffpmx_table").css("display", "none");
-                } else if (res.sfzffpmx.length > 0) {
-                    $(".sfzffpmx").removeClass("hide").addClass("in");
-                    $("#sfzffpmx_p_table").css("display", "block");
+                } else if (res.zffpmx.length > 0) {
                     $("#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) {
+                    for (var i = 0; i < res.zffpmx.length; i++) {
+                        var receiptBill = res.zffpmx[i].receiptBill;
+                        if (res.zffpmx[i].receiptBill != null && res.zffpmx[i].receiptBill.length > 8) {
                             receiptBill = receiptBill.substring(0, 8);
                         }
-                        if (i % 3 == 0) {
+                        if (i % 2 == 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 += '<td>' + res.zffpmx[i].name + '</td>';
+                        html += '<td>' + res.zffpmx[i].totalCharge.toFixed(2) + '</td>';
+                        if (i % 2 == 1 || i == res.zffpmx.length - 1) {
                             html += '</tr>';
                         }
                     }
                     $("#sfzffpmx").html(html);
-                    $("#sfzffpmx_p").html(html);
-                }
-
-                if(res.user!=null){
-                    $("#userIdCode_gh").html(res.user.userCode);
-                    $("#username_gh").html(res.user.userName);
-                    $("#userIdCode_gh_p").html(res.user.userCode);
-                    $("#username_gh_p").html(res.user.userName);
-                }else {
-                    var userCode= $("#cashParam").val();
-                    var userName = $("#cashParam").find('option:selected').text();
-                    $("#username_p").html();
-                    $("#userIdCode_gh").html(userCode);
-                    $("#username_gh").html(userName);
-                    $("#userIdCode_gh_p").html(userCode);
-                    $("#username_gh_p").html(userName);
-                }
-
-
-                $("#dcountDate_gh").html(format($("#rjList").val(), "yyyy-MM-dd HH:mm:ss"));
-                $("#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);
-                }
-                if(res.user!=null){
-                    $("#username_zbr").html(res.user.userName);
-                    $("#username_zbr_p").html(res.user.userName);
-                }else {
-                    $("#username_zbr").html($("#cashParam").find('option:selected').text());
-                    $("#username_zbr_p").html($("#cashParam").find('option:selected').text());
-                }
-                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, 8);
-                        }
-                        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({
@@ -803,9 +755,10 @@ function print() {
     LODOP.SET_PRINTER_INDEX(printIndex);
     LODOP.SET_SHOW_MODE("BKIMG_WIDTH", "210mm");
     LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", "297mm");
-    LODOP.ADD_PRINT_HTM("0mm", "5mm", "200mm", "280mm", document.getElementById("printDiv_sf").innerHTML);
+    var strStyle="<style>table{width: 96%;margin-top: 20px;margin-bottom: 10px;} table,td,th {border-width: 1px;border-style: solid;border-collapse: collapse}</style>"
+    LODOP.ADD_PRINT_HTM("0mm", "5mm", "200mm", "280mm",strStyle+ document.getElementById("report_table_1").innerHTML);
     LODOP.NewPageA();
-    LODOP.ADD_PRINT_HTM("0mm", "5mm", "200mm", "280mm", document.getElementById("printDiv_gh").innerHTML);
+    LODOP.ADD_PRINT_HTM("0mm", "5mm", "200mm", "280mm", document.getElementById("zbr_div").innerHTML);
     LODOP.PRINT();
     //LODOP.PREVIEW();
 }

+ 327 - 347
src/main/resources/templates/daily.html

@@ -54,374 +54,354 @@
             </div>
             <div id="report_table" class="in"
                  style="width:920px;height:700px;margin:0 auto;border: 1px solid #337ab7;font-size: 16px;padding: 40px 20px 40px 20px;overflow-y: auto; overflow-x:hidden;">
-                <h2 style="text-align:center;font-weight: 700;">门诊收费收入日报表</h2>
-                <div style="margin-top: 20px;">
-                    <span>收费员:</span><span id="username"></span><span
-                        style="margin-left: 120px;">工号:</span><span id="userIdCode"></span><span
-                        style="margin-left: 120px;">结账时间:</span><span id="dcountDate"></span></div>
-                <table class="table table-striped table-bordered">
-                    <tbody>
-                    <tr>
-                        <td>挂号费</td>
-                        <td id="charge1">0.00</td>
-                        <td>其他</td>
-                        <td id="charge9">0.00</td>
-                        <td>消毒费</td>
-                        <td id="charge16">0.00</td>
-                    </tr>
-                    <tr>
-                        <td>床位费</td>
-                        <td id="charge2">0.00</td>
-                        <td>西药费</td>
-                        <td id="charge10">0.00</td>
-                        <td>材料费</td>
-                        <td id="charge18">0.00</td>
-                    </tr>
-                    <tr>
-                        <td>诊查费</td>
-                        <td id="charge3">0.00</td>
-                        <td>中成药费</td>
-                        <td id="charge11">0.00</td>
-                        <td>麻醉费</td>
-                        <td id="charge19">0.00</td>
-                    </tr>
-                    <tr>
-                        <td>检查费</td>
-                        <td id="charge4">0.00</td>
-                        <td>中草药费</td>
-                        <td id="charge12">0.00</td>
-                        <td>四舍五入</td>
-                        <td id="charge20">0.00</td>
-                    </tr>
-                    <tr>
-                        <td>治疗费</td>
-                        <td id="charge5">0.00</td>
-                        <td>特殊材料费</td>
-                        <td id="charge13">0.00</td>
-                        <td>护理费</td>
-                        <td id="charge6">0.00</td>
-                    </tr>
-                    <tr>
-                        <td>输血费</td>
-                        <td id="charge14">0.00</td>
-                        <td>手术费</td>
-                        <td id="charge7">0.00</td>
-                        <td>鉴定费</td>
-                        <td id="charge15">0.00</td>
-                    </tr>
-                    <tr>
-                        <td>化验费</td>
-                        <td id="charge8">0.00</td>
-                        <td>手术器械使用费</td>
-                        <td id="charge17">0.00</td>
-                        <td></td>
-                        <td></td>
-                    </tr>
-                    <tr>
-                        <td>合计:</td>
-                        <td id="totalCharge">0.00</td>
-                        <td id="totalChargeStr" colspan="5">零元整</td>
-                    </tr>
-                    </tbody>
-                </table>
-
-                <div>附表1:收费收入报表</div>
-                <table id="datatable" class="table table-striped table-bordered" style="margin-top: 10px;">
-                    <thead>
-                    <tr>
-                        <th rowspan="2" class="text-center" style="vertical-align: middle !important;">收款方式</th>
-                        <th colspan="2" class="text-center">收款</th>
-                        <th colspan="2" class="text-center">退款</th>
-                        <th colspan="2" class="text-center">实收</th>
-                    </tr>
-                    <tr>
-                        <th class="text-center">笔数</th>
-                        <th class="text-center">金额</th>
-                        <th class="text-center">笔数</th>
-                        <th class="text-center">金额</th>
-                        <th class="text-center">笔数</th>
-                        <th class="text-center">金额</th>
-                    </tr>
-                    </thead>
-                    <tbody>
-                    <tr>
-                        <td class="text-center">现金</td>
-                        <td id="xjbs">0</td>
-                        <td id="xjsk">0.00</td>
-                        <td id="xjtfbs">0</td>
-                        <td id="xjtf">0.00</td>
-                        <td id="xjssbs">0</td>
-                        <td id="xjss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">银行卡</td>
-                        <td id="yhsbs">0</td>
-                        <td id="yhksk">0.00</td>
-                        <td id="yhktfbs">0</td>
-                        <td id="yhktf">0.00</td>
-                        <td id="yhkssbs">0</td>
-                        <td id="yhkss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">医保卡</td>
-                        <td id="sybbs">0</td>
-                        <td id="sybksk">0.00</td>
-                        <td id="sybtfbs">0</td>
-                        <td id="sybtf">0.00</td>
-                        <td id="sybssbs">0</td>
-                        <td id="sybkss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">支付宝</td>
-                        <td id="zfbbs">0</td>
-                        <td id="zfbsk">0.00</td>
-                        <td id="zfbtfbs">0</td>
-                        <td id="zfbtf">0.00</td>
-                        <td id="zfbssbs">0</td>
-                        <td id="zfbss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">微信</td>
-                        <td id="wxbs">0</td>
-                        <td id="wxsk">0.00</td>
-                        <td id="wxtfbs">0</td>
-                        <td id="wxtf">0.00</td>
-                        <td id="wxssbs">0</td>
-                        <td id="wxss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">医保卡记账</td>
-                        <td id="ybkjzbs">0</td>
-                        <td id="ybkjzsk">0.00</td>
-                        <td id="ybkjztfbs">0</td>
-                        <td id="ybkjztf">0.00</td>
-                        <td id="ybkjzssbs">0</td>
-                        <td id="ybkjzss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">记账绿色通道</td>
-                        <td id="zfbs">0</td>
-                        <td id="zfsk">0.00</td>
-                        <td id="zftfbs">0</td>
-                        <td id="zftf">0.00</td>
-                        <td id="zfssbs">0</td>
-                        <td id="zfss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">小计</td>
-                        <td id="zjbs">0</td>
-                        <td id="zjsk">0.00</td>
-                        <td id="ztfbs">0</td>
-                        <td id="zjtk">0.00</td>
-                        <td id="zjssbs">0</td>
-                        <td id="zjss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">实收合计</td>
-                        <td id="sjhj">0.00</td>
-                        <td colspan="5" id="sjhjdx">零元整</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">绿色通道记账小计</td>
-                        <td id="zfsshj">0.00</td>
-                        <td colspan="5" id="zfdx"></td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">医保卡记账小计</td>
-                        <td id="ybkjzhj">0.00</td>
-                        <td colspan="5" id="ybkjzhjdx">零元整</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">总计</td>
-                        <td id="zj">0.00</td>
-                        <td colspan="5" id="zjdx">零元整</td>
-                    </tr>
-                    </tbody>
-                </table>
-                <div>附表2:挂号收入报表</div>
-                <table class="table table-striped table-bordered" style="margin-top: 10px;">
-                    <thead>
-                    <tr>
-                        <th rowspan="2" class="text-center" style="vertical-align: middle !important;">收款方式</th>
-                        <th colspan="2" class="text-center">收款</th>
-                        <th colspan="2" class="text-center">退号</th>
-                        <th colspan="2" class="text-center">实收</th>
-                    </tr>
-                    <tr>
-                        <th class="text-center">号数</th>
-                        <th class="text-center">金额</th>
-                        <th class="text-center">号数</th>
-                        <th class="text-center">金额</th>
-                        <th class="text-center">号数</th>
-                        <th class="text-center">金额</th>
-                    </tr>
-                    </thead>
-                    <tbody>
-                    <tr>
-                        <td class="text-center">现金</td>
-                        <td id="ghxjbs">0</td>
-                        <td id="ghxjsk">0.00</td>
-                        <td id="ghxjtfbs">0</td>
-                        <td id="ghxjtf">0.00</td>
-                        <td id="ghxjssbs">0</td>
-                        <td id="ghxjss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">银行卡</td>
-                        <td id="ghyhsbs">0</td>
-                        <td id="ghyhksk">0.00</td>
-                        <td id="ghyhktfbs">0</td>
-                        <td id="ghyhktf">0.00</td>
-                        <td id="ghyhkssbs">0</td>
-                        <td id="ghyhkss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">医保卡</td>
-                        <td id="ghsybbs">0</td>
-                        <td id="ghsybksk">0.00</td>
-                        <td id="ghsybtfbs">0</td>
-                        <td id="ghsybtf">0.00</td>
-                        <td id="ghsybssbs">0</td>
-                        <td id="ghsybkss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">支付宝</td>
-                        <td id="ghzfbbs">0</td>
-                        <td id="ghzfbsk">0.00</td>
-                        <td id="ghzfbtfbs">0</td>
-                        <td id="ghzfbtf">0.00</td>
-                        <td id="ghzfbssbs">0</td>
-                        <td id="ghzfbss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">微信</td>
-                        <td id="ghwxbs">0</td>
-                        <td id="ghwxsk">0.00</td>
-                        <td id="ghwxtfbs">0</td>
-                        <td id="ghwxtf">0.00</td>
-                        <td id="ghwxssbs">0</td>
-                        <td id="ghwxss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">全免</td>
-                        <td id="ghqmbs">0</td>
-                        <td id="ghqmsk">0.00</td>
-                        <td id="ghqmtfbs">0</td>
-                        <td id="ghqmtf">0.00</td>
-                        <td id="ghqmssbs">0</td>
-                        <td id="ghqmss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">绿色通道记账</td>
-                        <td id="ghzfbs">0</td>
-                        <td id="ghzfsk">0.00</td>
-                        <td id="ghzftfbs">0</td>
-                        <td id="ghzftf">0.00</td>
-                        <td id="ghzfssbs">0</td>
-                        <td id="ghzfss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">小计</td>
-                        <td id="ghzjbs">0</td>
-                        <td id="ghzjsk">0.00</td>
-                        <td id="ghztfbs">0</td>
-                        <td id="ghzjtk">0.00</td>
-                        <td id="ghzjssbs">0</td>
-                        <td id="ghzjss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">实收合计(不含记账)</td>
-                        <td id="ghsjhj">0.00</td>
-                        <td colspan="5" id="ghsjhjdx">零元整</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">绿色通道记账小计</td>
-                        <td id="ghzfsshj">0.00</td>
-                        <td colspan="5" id="ghzfdx">零元整</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">总计</td>
-                        <td id="ghzj">0.00</td>
-                        <td colspan="5" id="ghzjdx">零元整</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">收入构成</td>
-                        <td>诊察收入:</td>
-                        <td id="zcsr">0.00</td>
-                        <td>检查收入:</td>
-                        <td id="jcsr">0.00</td>
-                        <td>挂号费收入:</td>
-                        <td id="ghsr">0.00</td>
-                    </tr>
-                    </tbody>
-                </table>
-                <div class="form-group col-md-12 col-sm-12 col-xs-12" id="sfReceiptBills_p"
-                     style="margin-bottom: 10px;margin-top: 20px;padding-left: 20px;">
+                <div id="report_table_1">
+                    <h2 style="text-align:center;font-weight: 700;">门诊收费收入日报表</h2>
+                    <div style="margin-top: 20px;">
+                        <span>收费员:</span><span id="username"></span><span
+                            style="margin-left: 120px;">工号:</span><span id="userIdCode"></span><span
+                            style="margin-left: 120px;">结账时间:</span><span id="dcountDate"></span></div>
+                    <table class="table table-striped table-bordered">
+                        <tbody>
+                        <tr>
+                            <td>挂号费</td>
+                            <td id="charge1">0.00</td>
+                            <td>其他</td>
+                            <td id="charge9">0.00</td>
+                            <td>消毒费</td>
+                            <td id="charge16">0.00</td>
+                        </tr>
+                        <tr>
+                            <td>床位费</td>
+                            <td id="charge2">0.00</td>
+                            <td>西药费</td>
+                            <td id="charge10">0.00</td>
+                            <td>材料费</td>
+                            <td id="charge18">0.00</td>
+                        </tr>
+                        <tr>
+                            <td>诊查费</td>
+                            <td id="charge3">0.00</td>
+                            <td>中成药费</td>
+                            <td id="charge11">0.00</td>
+                            <td>麻醉费</td>
+                            <td id="charge19">0.00</td>
+                        </tr>
+                        <tr>
+                            <td>检查费</td>
+                            <td id="charge4">0.00</td>
+                            <td>中草药费</td>
+                            <td id="charge12">0.00</td>
+                            <td>四舍五入</td>
+                            <td id="charge20">0.00</td>
+                        </tr>
+                        <tr>
+                            <td>治疗费</td>
+                            <td id="charge5">0.00</td>
+                            <td>特殊材料费</td>
+                            <td id="charge13">0.00</td>
+                            <td>护理费</td>
+                            <td id="charge6">0.00</td>
+                        </tr>
+                        <tr>
+                            <td>输血费</td>
+                            <td id="charge14">0.00</td>
+                            <td>手术费</td>
+                            <td id="charge7">0.00</td>
+                            <td>鉴定费</td>
+                            <td id="charge15">0.00</td>
+                        </tr>
+                        <tr>
+                            <td>化验费</td>
+                            <td id="charge8">0.00</td>
+                            <td>手术器械使用费</td>
+                            <td id="charge17">0.00</td>
+                            <td></td>
+                            <td></td>
+                        </tr>
+                        <tr>
+                            <td>合计:</td>
+                            <td id="totalCharge">0.00</td>
+                            <td id="totalChargeStr" colspan="5">零元整</td>
+                        </tr>
+                        </tbody>
+                    </table>
 
-                    <table>
+                    <div>附表1:收费收入报表</div>
+                    <table id="datatable" class="table table-striped table-bordered" style="margin-top: 10px;">
                         <thead>
                         <tr>
-                            <td colspan="4">所用票号:</td>
-                        <tr>
-                            <td width="25%"></td>
-                            <td width="25%"></td>
-                            <td width="25%"></td>
-                            <td width="25%"></td>
+                            <th rowspan="2" class="text-center" style="vertical-align: middle !important;">收款方式</th>
+                            <th colspan="2" class="text-center">收款</th>
+                            <th colspan="2" class="text-center">退款</th>
+                            <th colspan="2" class="text-center">实收</th>
                         </tr>
+                        <tr>
+                            <th class="text-center">笔数</th>
+                            <th class="text-center">金额</th>
+                            <th class="text-center">笔数</th>
+                            <th class="text-center">金额</th>
+                            <th class="text-center">笔数</th>
+                            <th class="text-center">金额</th>
                         </tr>
                         </thead>
-                        <tbody id="sfReceiptBills_p_table">
+                        <tbody>
+                        <tr>
+                            <td class="text-center">现金</td>
+                            <td id="xjbs">0</td>
+                            <td id="xjsk">0.00</td>
+                            <td id="xjtfbs">0</td>
+                            <td id="xjtf">0.00</td>
+                            <td id="xjssbs">0</td>
+                            <td id="xjss">0.00</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">银行卡</td>
+                            <td id="yhsbs">0</td>
+                            <td id="yhksk">0.00</td>
+                            <td id="yhktfbs">0</td>
+                            <td id="yhktf">0.00</td>
+                            <td id="yhkssbs">0</td>
+                            <td id="yhkss">0.00</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">医保卡</td>
+                            <td id="ybjzbs">0</td>
+                            <td id="ybjzsk">0.00</td>
+                            <td id="ybjztfbs">0</td>
+                            <td id="ybjztf">0.00</td>
+                            <td id="ybjzssbs">0</td>
+                            <td id="ybjzss">0.00</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">支付宝</td>
+                            <td id="zfbbs">0</td>
+                            <td id="zfbsk">0.00</td>
+                            <td id="zfbtfbs">0</td>
+                            <td id="zfbtf">0.00</td>
+                            <td id="zfbssbs">0</td>
+                            <td id="zfbss">0.00</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">微信</td>
+                            <td id="wxbs">0</td>
+                            <td id="wxsk">0.00</td>
+                            <td id="wxtfbs">0</td>
+                            <td id="wxtf">0.00</td>
+                            <td id="wxssbs">0</td>
+                            <td id="wxss">0.00</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">医保卡记账</td>
+                            <td id="ybkjzbs">0</td>
+                            <td id="ybkjzsk">0.00</td>
+                            <td id="ybkjztfbs">0</td>
+                            <td id="ybkjztf">0.00</td>
+                            <td id="ybkjzssbs">0</td>
+                            <td id="ybkjzss">0.00</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">记账绿色通道</td>
+                            <td id="zfbs">0</td>
+                            <td id="zfsk">0.00</td>
+                            <td id="zftfbs">0</td>
+                            <td id="zftf">0.00</td>
+                            <td id="zfssbs">0</td>
+                            <td id="zfss">0.00</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">小计</td>
+                            <td id="zjbs">0</td>
+                            <td id="zjsk">0.00</td>
+                            <td id="ztfbs">0</td>
+                            <td id="zjtk">0.00</td>
+                            <td id="zjssbs">0</td>
+                            <td id="zjss">0.00</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">实收合计</td>
+                            <td id="sjhj">0.00</td>
+                            <td colspan="5" id="sjhjdx">零元整</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">绿色通道记账小计</td>
+                            <td id="zfsshj">0.00</td>
+                            <td colspan="5" id="zfdx"></td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">医保卡记账小计</td>
+                            <td id="ybkjzhj">0.00</td>
+                            <td colspan="5" id="ybkjzhjdx">零元整</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">总计</td>
+                            <td id="zj">0.00</td>
+                            <td colspan="5" id="zjdx">零元整</td>
+                        </tr>
                         </tbody>
                     </table>
-                </div>
-                <div class="form-group col-md-12 col-sm-12 col-xs-12" style="margin-bottom: 100px;">
-                    <div class="col-md-12 col-sm-12 col-xs-12"
-                         style="border-bottom: 0.5px solid #dcdcdc;padding-left: 20px;">
-                        <table style="width: 60%;">
-                            <tbody>
-                            <tr>
-                                <td>发票张数:</td>
-                                <td id="sffps_p">0</td>
-                                <td>退票张数:</td>
-                                <td id="tpzs_p">0</td>
-                                <td>作废张数:</td>
-                                <td id="zffps_p">0</td>
-                            </tr>
-                            </tbody>
-                        </table>
-                    </div>
-                    <table style="width: 96%;padding-left: 20px;display: none;border-top:1px solid"
-                           id="sfzffpmx_p_table">
+                    <div>附表2:挂号收入报表</div>
+                    <table class="table table-striped table-bordered" style="margin-top: 10px;">
                         <thead>
                         <tr>
-                            <td colspan="9">作废/退费明细表:</td>
+                            <th rowspan="2" class="text-center" style="vertical-align: middle !important;">收款方式</th>
+                            <th colspan="2" class="text-center">收款</th>
+                            <th colspan="2" class="text-center">退号</th>
+                            <th colspan="2" class="text-center">实收</th>
+                        </tr>
+                        <tr>
+                            <th class="text-center">号数</th>
+                            <th class="text-center">金额</th>
+                            <th class="text-center">号数</th>
+                            <th class="text-center">金额</th>
+                            <th class="text-center">号数</th>
+                            <th class="text-center">金额</th>
+                        </tr>
+                        </thead>
+                        <tbody>
+                        <tr>
+                            <td class="text-center">现金</td>
+                            <td id="ghxjbs">0</td>
+                            <td id="ghxjsk">0.00</td>
+                            <td id="ghxjtfbs">0</td>
+                            <td id="ghxjtf">0.00</td>
+                            <td id="ghxjssbs">0</td>
+                            <td id="ghxjss">0.00</td>
                         </tr>
                         <tr>
+                            <td class="text-center">银行卡</td>
+                            <td id="ghyhsbs">0</td>
+                            <td id="ghyhksk">0.00</td>
+                            <td id="ghyhktfbs">0</td>
+                            <td id="ghyhktf">0.00</td>
+                            <td id="ghyhkssbs">0</td>
+                            <td id="ghyhkss">0.00</td>
+                        </tr>
                         <tr>
-                            <td width="114.8px">发票号</td>
-                            <td width="100px">姓名</td>
-                            <td width="72.2px">金额</td>
-                            <td width="114.8px">发票号</td>
-                            <td width="100px">姓名</td>
-                            <td width="72.2px">金额</td>
-                            <td width="114.8px">发票号</td>
-                            <td width="100px">姓名</td>
-                            <td width="72.2px">金额</td>
+                            <td class="text-center">医保卡</td>
+                            <td id="ghsybbs">0</td>
+                            <td id="ghsybksk">0.00</td>
+                            <td id="ghsybtfbs">0</td>
+                            <td id="ghsybtf">0.00</td>
+                            <td id="ghsybssbs">0</td>
+                            <td id="ghsybkss">0.00</td>
                         </tr>
+                        <tr>
+                            <td class="text-center">支付宝</td>
+                            <td id="ghzfbbs">0</td>
+                            <td id="ghzfbsk">0.00</td>
+                            <td id="ghzfbtfbs">0</td>
+                            <td id="ghzfbtf">0.00</td>
+                            <td id="ghzfbssbs">0</td>
+                            <td id="ghzfbss">0.00</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">微信</td>
+                            <td id="ghwxbs">0</td>
+                            <td id="ghwxsk">0.00</td>
+                            <td id="ghwxtfbs">0</td>
+                            <td id="ghwxtf">0.00</td>
+                            <td id="ghwxssbs">0</td>
+                            <td id="ghwxss">0.00</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">全免</td>
+                            <td id="ghqmbs">0</td>
+                            <td id="ghqmsk">0.00</td>
+                            <td id="ghqmtfbs">0</td>
+                            <td id="ghqmtf">0.00</td>
+                            <td id="ghqmssbs">0</td>
+                            <td id="ghqmss">0.00</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">绿色通道记账</td>
+                            <td id="ghzfbs">0</td>
+                            <td id="ghzfsk">0.00</td>
+                            <td id="ghzftfbs">0</td>
+                            <td id="ghzftf">0.00</td>
+                            <td id="ghzfssbs">0</td>
+                            <td id="ghzfss">0.00</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">小计</td>
+                            <td id="ghzjbs">0</td>
+                            <td id="ghzjsk">0.00</td>
+                            <td id="ghztfbs">0</td>
+                            <td id="ghzjtk">0.00</td>
+                            <td id="ghzjssbs">0</td>
+                            <td id="ghzjss">0.00</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">实收合计(不含记账)</td>
+                            <td id="ghsjhj">0.00</td>
+                            <td colspan="5" id="ghsjhjdx">零元整</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">绿色通道记账小计</td>
+                            <td id="ghzfsshj">0.00</td>
+                            <td colspan="5" id="ghzfdx">零元整</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">总计</td>
+                            <td id="ghzj">0.00</td>
+                            <td colspan="5" id="ghzjdx">零元整</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">收入构成</td>
+                            <td>诊察收入:</td>
+                            <td id="zcsr">0.00</td>
+                            <td>检查收入:</td>
+                            <td id="jcsr">0.00</td>
+                            <td>挂号费收入:</td>
+                            <td id="ghsr">0.00</td>
                         </tr>
-                        </thead>
-                        <tbody id="sfzffpmx_p">
-
                         </tbody>
                     </table>
                 </div>
+                <div id="zbr_div">
+                    <div class="form-group col-md-12 col-sm-12 col-xs-12"
+                         style="margin-bottom: 10px;margin-top: 20px;" id="receiptBills">
 
-                <div><span>结账人签字:</span><span style="text-decoration: underline" id="username_zbr"></span><span
-                        style="margin-left: 120px;">收款人签字:</span><span style="text-decoration: underline">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
-                        style="margin-left: 120px;">审核人签字:</span><span style="text-decoration: underline">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-                </div>
+                        <table>
+                            <thead>
+                            <tr>
+                                <td colspan="4">所用发票统计:</td>
+                            </tr>
+                            </thead>
+                            <tbody id="receiptBills_table">
+                            </tbody>
+                        </table>
+                    </div>
+                    <div class="form-group col-md-12 col-sm-12 col-xs-12" style="margin-bottom: 100px;">
+                        <table style="width: 96%;padding-left: 20px;display: none;border-top:1px solid"
+                               id="sfzffpmx_table">
+                            <thead>
+                            <tr>
+                                <td colspan="9">作废/退费发票明细:</td>
+                            </tr>
+                            <tr>
+                            <tr>
+                                <td width="180px">发票号</td>
+                                <td width="120px">姓名</td>
+                                <td width="100px">金额</td>
+                                <td width="180px">发票号</td>
+                                <td width="120px">姓名</td>
+                                <td width="100px">金额</td>
+                            </tr>
+                            </tr>
+                            </thead>
+                            <tbody id="sfzffpmx">
 
+                            </tbody>
+                        </table>
+                    </div>
+
+                    <div><span>结账人签字:</span><span style="text-decoration: underline" id="username_zbr"></span><span
+                            style="margin-left: 120px;">收款人签字:</span><span style="text-decoration: underline">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
+                            style="margin-left: 120px;">审核人签字:</span><span style="text-decoration: underline">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+                    </div>
+                </div>
             </div>
+
             <table id="tb_table"></table>
             <div id="previewImage">
             </div>

+ 215 - 402
src/main/resources/templates/daily_collect.html

@@ -62,478 +62,312 @@
             </div>
             <div id="report_table" class="in"
                  style="width:920px;height:700px;margin:0 auto;border: 1px solid #337ab7;font-size: 16px;padding: 40px 20px 40px 20px;overflow-y: auto; overflow-x:hidden;">
-                <h2 style="text-align:center;font-weight: 700;">泰和医院门诊收费收入日报表</h2>
-                <div style="margin-top: 20px;"><span
-                        style="margin-left: 590px;">结账时间:</span><span id="dcountDate"></span></div>
-                <table class="table table-striped table-bordered">
-                    <tbody>
-                    <tr>
-                        <td>挂号费</td>
-                        <td id="charge1">0.00</td>
-                        <td>其他</td>
-                        <td id="charge9">0.00</td>
-                        <td>消毒费</td>
-                        <td id="charge16">0.00</td>
-                    </tr>
-                    <tr>
-                        <td>床位费</td>
-                        <td id="charge2">0.00</td>
-                        <td>西药费</td>
-                        <td id="charge10">0.00</td>
-                        <td>材料费</td>
-                        <td id="charge18">0.00</td>
-                    </tr>
-                    <tr>
-                        <td>诊查费</td>
-                        <td id="charge3">0.00</td>
-                        <td>中成药费</td>
-                        <td id="charge11">0.00</td>
-                        <td>麻醉费</td>
-                        <td id="charge19">0.00</td>
-                    </tr>
-                    <tr>
-                        <td>检查费</td>
-                        <td id="charge4">0.00</td>
-                        <td>中草药费</td>
-                        <td id="charge12">0.00</td>
-                        <td>四舍五入</td>
-                        <td id="charge20">0.00</td>
-                    </tr>
-                    <tr>
-                        <td>治疗费</td>
-                        <td id="charge5">0.00</td>
-                        <td>特殊材料费</td>
-                        <td id="charge13">0.00</td>
-                        <td>护理费</td>
-                        <td id="charge6">0.00</td>
-                    </tr>
-                    <tr>
-                        <td>输血费</td>
-                        <td id="charge14">0.00</td>
-                        <td>手术费</td>
-                        <td id="charge7">0.00</td>
-                        <td>鉴定费</td>
-                        <td id="charge15">0.00</td>
-                    </tr>
-                    <tr>
-                        <td>化验费</td>
-                        <td id="charge8">0.00</td>
-                        <td>手术器械使用费</td>
-                        <td id="charge17">0.00</td>
-                        <td>合计:</td>
-                        <td id="totalCharge">0.00</td>
-                    </tr>
-                    </tbody>
-                </table>
-                <table id="datatable" class="table table-striped table-bordered">
-                    <thead>
-                    <tr>
-                        <th rowspan="2" class="text-center" style="vertical-align: middle !important;">交易类别</th>
-                        <th colspan="2" class="text-center">收款</th>
-                        <th colspan="2" class="text-center">退款</th>
-                        <th colspan="2" class="text-center">实收</th>
-                    </tr>
-                    <tr>
-                        <th class="text-center">张数</th>
-                        <th class="text-center">金额</th>
-                        <th class="text-center">张数</th>
-                        <th class="text-center">金额</th>
-                        <th class="text-center">张数</th>
-                        <th class="text-center">金额</th>
-                    </tr>
-                    </thead>
-                    <tbody>
-                    <tr>
-                        <td class="text-center">现金</td>
-                        <td id="xjbs">0</td>
-                        <td id="xjsk">0.00</td>
-                        <td id="xjtfbs">0</td>
-                        <td id="xjtf">0.00</td>
-                        <td id="xjssbs">0</td>
-                        <td id="xjss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">银行卡</td>
-                        <td id="yhsbs">0</td>
-                        <td id="yhksk">0.00</td>
-                        <td id="yhktfbs">0</td>
-                        <td id="yhktf">0.00</td>
-                        <td id="yhkssbs">0</td>
-                        <td id="yhkss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">支付宝</td>
-                        <td id="zfbbs">0</td>
-                        <td id="zfbsk">0.00</td>
-                        <td id="zfbtfbs">0</td>
-                        <td id="zfbtf">0.00</td>
-                        <td id="zfbssbs">0</td>
-                        <td id="zfbss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">微信</td>
-                        <td id="wxbs">0</td>
-                        <td id="wxsk">0.00</td>
-                        <td id="wxtfbs">0</td>
-                        <td id="wxtf">0.00</td>
-                        <td id="wxssbs">0</td>
-                        <td id="wxss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">记账绿色通道</td>
-                        <td id="zfbs">0</td>
-                        <td id="zfsk">0.00</td>
-                        <td id="zftfbs">0</td>
-                        <td id="zftf">0.00</td>
-                        <td id="zfssbs">0</td>
-                        <td id="zfss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">医保卡</td>
-                        <td id="sybbs">0</td>
-                        <td id="sybksk">0.00</td>
-                        <td id="sybtfbs">0</td>
-                        <td id="sybtf">0.00</td>
-                        <td id="sybssbs">0</td>
-                        <td id="sybkss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">总计</td>
-                        <td id="zjbs">0</td>
-                        <td id="zjsk">0.00</td>
-                        <td id="ztfbs">0</td>
-                        <td id="zjtk">0.00</td>
-                        <td id="zjssbs">0</td>
-                        <td id="zjss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center" colspan="2">实缴合计</td>
-                        <td id="sjhj">0.00</td>
-                        <td colspan="4" id="sjhjdx"></td>
-                    </tr>
-                    <tr>
-                        <td class="text-center" colspan="2">记账(绿色通道)</td>
-                        <td id="zfsshj">0.00</td>
-                        <td colspan="4" id="zfdx"></td>
-                    </tr>
-                    <tr>
-                        <td class="text-center" colspan="2">总计</td>
-                        <td id="zj">0.00</td>
-                        <td colspan="4" id="zjdx"></td>
-                    </tr>
-                    </tbody>
-                </table>
-                <h2 style="text-align:center;font-weight: 700">门诊挂号收入日结一览表</h2>
-                <div style="margin-top: 20px;"><span
-                        style="margin-left: 590px;">结账时间:</span><span id="dcountDate_gh"></span></div>
-                <table class="table table-striped table-bordered">
-                    <tbody>
-                    <tr>
-                        <td>项目</td>
-                        <td>金额</td>
-                        <td colspan="3" class="text-center">使用票据及费用构成</td>
-                    </tr>
-                    <tr>
-                        <td rowspan="3" style="vertical-align: middle !important;">挂号</td>
-                        <td rowspan="3" style="vertical-align: middle !important;" id="ghje">0.00</td>
-                        <td colspan="3" id="ghfps">所用票数:0</td>
-                    </tr>
-                    <tr>
-                        <td id="qmhs">全免号数:0</td>
-                        <td id="jzhs">记账号数:0</td>
-                        <td id="jzje">记账金额:0</td>
-                    </tr>
-                    <tr>
-                        <td id="zcsr">诊察收入:0.00</td>
-                        <td id="jcsr">检查收入:0.00</td>
-                        <td id="ghsr">挂号费(门诊):0.00</td>
-                    </tr>
-                    <tr>
-                        <td>退号</td>
-                        <td id="thje">0.00</td>
-                        <td colspan="3" id="ghtpzs">退票数:0</td>
-                    </tr>
-                    <tr>
-                        <td>合计(小写)</td>
-                        <td colspan="2" id="ghhj">0.00</td>
-                        <td colspan="2" id="ghjebhjz">合计(不含记账) 0.00</td>
-                    </tr>
-                    <tr>
-                        <td>合计(大写)</td>
-                        <td colspan="2" id="ghhjdx"></td>
-                        <td colspan="2" id="ghjebhjzdx">合计(不含记账)</td>
-                    </tr>
-                    </tbody>
-                </table>
-
-                <div style="display:none;" id="ghgzlhzb_parent">
-                    <h2 style="text-align:center;font-weight: 700">挂号处工作量汇总报表</h2>
-                    <table class="table table-striped table-bordered">
-                        <thead>
-                        <tr>
-                            <td>收款员</td>
-                            <td>结账时间</td>
-                            <td>挂号数</td>
-                            <td>挂号金额</td>
-                            <td>退号数</td>
-                            <td>退款金额</td>
-                            <td>总收入</td>
-                        </tr>
-                        </thead>
-                        <tbody id="ghgzlhzb">
-                        </tbody>
-                    </table>
-                </div>
-                <div style="display:none;" id="sfgzlhzb_parent">
-                    <h2 style="text-align:center;font-weight: 700">门诊收费结账单列表</h2>
+                <div id="report_table_1">
+                    <h2 style="text-align:center;font-weight: 700;">门诊收费收入日报表</h2>
+                    <div style="margin-top: 20px;">
+                        <span>收费员:</span><span id="username"></span><span
+                            style="margin-left: 120px;">工号:</span><span id="userIdCode"></span><span
+                            style="margin-left: 120px;">结账时间:</span><span id="dcountDate"></span></div>
                     <table class="table table-striped table-bordered">
-                        <thead>
-                        <tr>
-                            <td>收款员</td>
-                            <td>结账时间</td>
-                            <td>收款张数</td>
-                            <td>收款金额</td>
-                            <td>退款张数</td>
-                            <td>退款金额</td>
-                            <td>总收入</td>
-                        </tr>
-                        </thead>
-                        <tbody id="sfgzlhzb">
-                        </tbody>
-                    </table>
-                </div>
-                <div style="display:none;" id="mzskylb_parent">
-                    <h2 style="text-align:center;font-weight: 700">门诊收款一览表</h2>
-                    <h2 style="text-align:center;font-weight: 700">门诊收据分类统计表</h2>
-                    <table class="table table-striped table-bordered">
-                        <thead>
-                        <tr>
-                            <td>门诊收据分类</td>
-                            <td>数量</td>
-                            <td>金额</td>
-                            <td>门诊收据分类</td>
-                            <td>数量</td>
-                            <td>金额</td>
-                            <td>门诊收据分类</td>
-                            <td>数量</td>
-                            <td>金额</td>
-                        </tr>
-                        </thead>
-                        <tbody id="mzskylb">
-                        </tbody>
-                    </table>
-                </div>
-                <div><span>制表人:</span><span style="text-decoration: underline" id="username_zbr"></span></div>
-                <div id="printDiv" style="display: none">
-                    <h2 style="text-align:center;font-weight: 700;">泰和医院门诊收费收入日报表</h2>
-                    <div style="margin-top: 20px;"><span
-                            style="margin-left: 450px;">结账时间:</span><span id="dcountDate_p"></span></div>
-                    <table border="1" cellspacing="0" style="width: 96%;border-width: 1px;border-style: solid;border-collapse: collapse;">
                         <tbody>
                         <tr>
                             <td>挂号费</td>
-                            <td id="charge1_p">0.00</td>
+                            <td id="charge1">0.00</td>
                             <td>其他</td>
-                            <td id="charge9_p">0.00</td>
+                            <td id="charge9">0.00</td>
                             <td>消毒费</td>
-                            <td id="charge16_p">0.00</td>
+                            <td id="charge16">0.00</td>
                         </tr>
                         <tr>
                             <td>床位费</td>
-                            <td id="charge2_p">0.00</td>
+                            <td id="charge2">0.00</td>
                             <td>西药费</td>
-                            <td id="charge10_p">0.00</td>
+                            <td id="charge10">0.00</td>
                             <td>材料费</td>
-                            <td id="charge18_p">0.00</td>
+                            <td id="charge18">0.00</td>
                         </tr>
                         <tr>
                             <td>诊查费</td>
-                            <td id="charge3_p">0.00</td>
+                            <td id="charge3">0.00</td>
                             <td>中成药费</td>
-                            <td id="charge11_p">0.00</td>
+                            <td id="charge11">0.00</td>
                             <td>麻醉费</td>
-                            <td id="charge19_p">0.00</td>
+                            <td id="charge19">0.00</td>
                         </tr>
                         <tr>
                             <td>检查费</td>
-                            <td id="charge4_p">0.00</td>
+                            <td id="charge4">0.00</td>
                             <td>中草药费</td>
-                            <td id="charge12_p">0.00</td>
+                            <td id="charge12">0.00</td>
                             <td>四舍五入</td>
-                            <td id="charge20_p">0.00</td>
+                            <td id="charge20">0.00</td>
                         </tr>
                         <tr>
                             <td>治疗费</td>
-                            <td id="charge5_p">0.00</td>
+                            <td id="charge5">0.00</td>
                             <td>特殊材料费</td>
-                            <td id="charge13_p">0.00</td>
+                            <td id="charge13">0.00</td>
                             <td>护理费</td>
-                            <td id="charge6_p">0.00</td>
+                            <td id="charge6">0.00</td>
                         </tr>
                         <tr>
                             <td>输血费</td>
-                            <td id="charge14_p">0.00</td>
+                            <td id="charge14">0.00</td>
                             <td>手术费</td>
-                            <td id="charge7_p">0.00</td>
+                            <td id="charge7">0.00</td>
                             <td>鉴定费</td>
-                            <td id="charge15_p">0.00</td>
+                            <td id="charge15">0.00</td>
                         </tr>
                         <tr>
                             <td>化验费</td>
-                            <td id="charge8_p">0.00</td>
+                            <td id="charge8">0.00</td>
                             <td>手术器械使用费</td>
-                            <td id="charge17_p">0.00</td>
+                            <td id="charge17">0.00</td>
+                            <td></td>
+                            <td></td>
+                        </tr>
+                        <tr>
                             <td>合计:</td>
-                            <td id="totalCharge_p">0.00</td>
+                            <td id="totalCharge">0.00</td>
+                            <td id="totalChargeStr" colspan="5">零元整</td>
                         </tr>
                         </tbody>
                     </table>
-                    <table id="datatable_p" border="1" cellspacing="0" style="width: 96%;margin-top: 20px;border-width: 1px;border-style: solid;border-collapse: collapse;">
+
+                    <div>附表1:收费收入报表</div>
+                    <table id="datatable" class="table table-striped table-bordered" style="margin-top: 10px;">
                         <thead>
                         <tr>
-                            <th rowspan="2" class="text-center" style="vertical-align: middle !important;">交易类别</th>
+                            <th rowspan="2" class="text-center" style="vertical-align: middle !important;">收款方式</th>
                             <th colspan="2" class="text-center">收款</th>
                             <th colspan="2" class="text-center">退款</th>
                             <th colspan="2" class="text-center">实收</th>
                         </tr>
                         <tr>
-                            <th class="text-center">数</th>
+                            <th class="text-center">笔数</th>
                             <th class="text-center">金额</th>
-                            <th class="text-center">数</th>
+                            <th class="text-center">笔数</th>
                             <th class="text-center">金额</th>
-                            <th class="text-center">数</th>
+                            <th class="text-center">笔数</th>
                             <th class="text-center">金额</th>
                         </tr>
                         </thead>
                         <tbody>
                         <tr>
                             <td class="text-center">现金</td>
-                            <td id="xjbs_p">0</td>
-                            <td id="xjsk_p">0.00</td>
-                            <td id="xjtfbs_p">0</td>
-                            <td id="xjtf_p">0.00</td>
-                            <td id="xjssbs_p">0</td>
-                            <td id="xjss_p">0.00</td>
+                            <td id="xjbs">0</td>
+                            <td id="xjsk">0.00</td>
+                            <td id="xjtfbs">0</td>
+                            <td id="xjtf">0.00</td>
+                            <td id="xjssbs">0</td>
+                            <td id="xjss">0.00</td>
                         </tr>
                         <tr>
                             <td class="text-center">银行卡</td>
-                            <td id="yhsbs_p">0</td>
-                            <td id="yhksk_p">0.00</td>
-                            <td id="yhktfbs_p">0</td>
-                            <td id="yhktf_p">0.00</td>
-                            <td id="yhkssbs_p">0</td>
-                            <td id="yhkss_p">0.00</td>
+                            <td id="yhsbs">0</td>
+                            <td id="yhksk">0.00</td>
+                            <td id="yhktfbs">0</td>
+                            <td id="yhktf">0.00</td>
+                            <td id="yhkssbs">0</td>
+                            <td id="yhkss">0.00</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">医保卡</td>
+                            <td id="ybjzbs">0</td>
+                            <td id="ybjzsk">0.00</td>
+                            <td id="ybjztfbs">0</td>
+                            <td id="ybjztf">0.00</td>
+                            <td id="ybjzssbs">0</td>
+                            <td id="ybjzss">0.00</td>
                         </tr>
                         <tr>
                             <td class="text-center">支付宝</td>
-                            <td id="zfbbs_p">0</td>
-                            <td id="zfbsk_p">0.00</td>
-                            <td id="zfbtfbs_p">0</td>
-                            <td id="zfbtf_p">0.00</td>
-                            <td id="zfbssbs_p">0</td>
-                            <td id="zfbss_p">0.00</td>
+                            <td id="zfbbs">0</td>
+                            <td id="zfbsk">0.00</td>
+                            <td id="zfbtfbs">0</td>
+                            <td id="zfbtf">0.00</td>
+                            <td id="zfbssbs">0</td>
+                            <td id="zfbss">0.00</td>
                         </tr>
                         <tr>
                             <td class="text-center">微信</td>
-                            <td id="wxbs_p">0</td>
-                            <td id="wxsk_p">0.00</td>
-                            <td id="wxtfbs_p">0</td>
-                            <td id="wxtf_p">0.00</td>
-                            <td id="wxssbs_p">0</td>
-                            <td id="wxss_p">0.00</td>
+                            <td id="wxbs">0</td>
+                            <td id="wxsk">0.00</td>
+                            <td id="wxtfbs">0</td>
+                            <td id="wxtf">0.00</td>
+                            <td id="wxssbs">0</td>
+                            <td id="wxss">0.00</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">医保卡记账</td>
+                            <td id="ybkjzbs">0</td>
+                            <td id="ybkjzsk">0.00</td>
+                            <td id="ybkjztfbs">0</td>
+                            <td id="ybkjztf">0.00</td>
+                            <td id="ybkjzssbs">0</td>
+                            <td id="ybkjzss">0.00</td>
                         </tr>
                         <tr>
                             <td class="text-center">记账绿色通道</td>
-                            <td id="zfbs_p">0</td>
-                            <td id="zfsk_p">0.00</td>
-                            <td id="zftfbs_p">0</td>
-                            <td id="zftf_p">0.00</td>
-                            <td id="zfssbs_p">0</td>
-                            <td id="zfss_p">0.00</td>
+                            <td id="zfbs">0</td>
+                            <td id="zfsk">0.00</td>
+                            <td id="zftfbs">0</td>
+                            <td id="zftf">0.00</td>
+                            <td id="zfssbs">0</td>
+                            <td id="zfss">0.00</td>
                         </tr>
                         <tr>
-                            <td class="text-center">医保卡</td>
-                            <td id="sybbs_p">0</td>
-                            <td id="sybksk_p">0.00</td>
-                            <td id="sybtfbs_p">0</td>
-                            <td id="sybtf_p">0.00</td>
-                            <td id="sybssbs_p">0</td>
-                            <td id="sybkss_p">0.00</td>
+                            <td class="text-center">小计</td>
+                            <td id="zjbs">0</td>
+                            <td id="zjsk">0.00</td>
+                            <td id="ztfbs">0</td>
+                            <td id="zjtk">0.00</td>
+                            <td id="zjssbs">0</td>
+                            <td id="zjss">0.00</td>
                         </tr>
                         <tr>
-                            <td class="text-center">总计</td>
-                            <td id="zjbs_p">0</td>
-                            <td id="zjsk_p">0.00</td>
-                            <td id="ztfbs_p">0</td>
-                            <td id="zjtk_p">0.00</td>
-                            <td id="zjssbs_p">0</td>
-                            <td id="zjss_p">0.00</td>
+                            <td class="text-center">实收合计</td>
+                            <td id="sjhj">0.00</td>
+                            <td colspan="5" id="sjhjdx">零元整</td>
                         </tr>
                         <tr>
-                            <td class="text-center" colspan="2">实缴合计</td>
-                            <td id="sjhj_p">0.00</td>
-                            <td colspan="4" id="sjhjdx_p"></td>
+                            <td class="text-center">绿色通道记账小计</td>
+                            <td id="zfsshj">0.00</td>
+                            <td colspan="5" id="zfdx"></td>
                         </tr>
                         <tr>
-                            <td class="text-center" colspan="2">记账(绿色通道)</td>
-                            <td id="zfsshj_p">0.00</td>
-                            <td colspan="4" id="zfdx_p"></td>
+                            <td class="text-center">医保卡记账小计</td>
+                            <td id="ybkjzhj">0.00</td>
+                            <td colspan="5" id="ybkjzhjdx">零元整</td>
                         </tr>
                         <tr>
-                            <td class="text-center" colspan="2">总计</td>
-                            <td id="zj_p">0.00</td>
-                            <td colspan="4" id="zjdx_p"></td>
+                            <td class="text-center">总计</td>
+                            <td id="zj">0.00</td>
+                            <td colspan="5" id="zjdx">零元整</td>
                         </tr>
                         </tbody>
                     </table>
-
-
-                    <h2 style="text-align:center;font-weight: 700">门诊挂号收入日结一览表</h2>
-                    <div style="margin-top: 20px;"><span
-                            style="margin-left: 450px;">结账时间:</span><span id="dcountDate_gh_p"></span></div>
-                    <table border="1" style="width: 96%;border-width: 1px;border-style: solid;border-collapse: collapse;" cellspacing="0">
+                    <div>附表2:挂号收入报表</div>
+                    <table class="table table-striped table-bordered" style="margin-top: 10px;">
+                        <thead>
+                        <tr>
+                            <th rowspan="2" class="text-center" style="vertical-align: middle !important;">收款方式</th>
+                            <th colspan="2" class="text-center">收款</th>
+                            <th colspan="2" class="text-center">退号</th>
+                            <th colspan="2" class="text-center">实收</th>
+                        </tr>
+                        <tr>
+                            <th class="text-center">号数</th>
+                            <th class="text-center">金额</th>
+                            <th class="text-center">号数</th>
+                            <th class="text-center">金额</th>
+                            <th class="text-center">号数</th>
+                            <th class="text-center">金额</th>
+                        </tr>
+                        </thead>
                         <tbody>
                         <tr>
-                            <td>项目</td>
-                            <td>金额</td>
-                            <td colspan="3" class="text-center">使用票据及费用构成</td>
+                            <td class="text-center">现金</td>
+                            <td id="ghxjbs">0</td>
+                            <td id="ghxjsk">0.00</td>
+                            <td id="ghxjtfbs">0</td>
+                            <td id="ghxjtf">0.00</td>
+                            <td id="ghxjssbs">0</td>
+                            <td id="ghxjss">0.00</td>
                         </tr>
                         <tr>
-                            <td rowspan="3" style="vertical-align: middle !important;">挂号</td>
-                            <td rowspan="3" style="vertical-align: middle !important;" id="ghje_p">0.00</td>
-                            <td colspan="3" id="ghfps_p">所用票数:0</td>
+                            <td class="text-center">银行卡</td>
+                            <td id="ghyhsbs">0</td>
+                            <td id="ghyhksk">0.00</td>
+                            <td id="ghyhktfbs">0</td>
+                            <td id="ghyhktf">0.00</td>
+                            <td id="ghyhkssbs">0</td>
+                            <td id="ghyhkss">0.00</td>
                         </tr>
                         <tr>
-                            <td id="qmhs_p">全免号数:0</td>
-                            <td id="jzhs_p">记账号数:0</td>
-                            <td id="jzje_p">记账金额:0</td>
+                            <td class="text-center">医保卡</td>
+                            <td id="ghsybbs">0</td>
+                            <td id="ghsybksk">0.00</td>
+                            <td id="ghsybtfbs">0</td>
+                            <td id="ghsybtf">0.00</td>
+                            <td id="ghsybssbs">0</td>
+                            <td id="ghsybkss">0.00</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">支付宝</td>
+                            <td id="ghzfbbs">0</td>
+                            <td id="ghzfbsk">0.00</td>
+                            <td id="ghzfbtfbs">0</td>
+                            <td id="ghzfbtf">0.00</td>
+                            <td id="ghzfbssbs">0</td>
+                            <td id="ghzfbss">0.00</td>
                         </tr>
                         <tr>
-                            <td id="zcsr_p">诊察收入:0.00</td>
-                            <td id="jcsr_p">检查收入:0.00</td>
-                            <td id="ghsr_p">挂号费(门诊):0.00</td>
+                            <td class="text-center">微信</td>
+                            <td id="ghwxbs">0</td>
+                            <td id="ghwxsk">0.00</td>
+                            <td id="ghwxtfbs">0</td>
+                            <td id="ghwxtf">0.00</td>
+                            <td id="ghwxssbs">0</td>
+                            <td id="ghwxss">0.00</td>
                         </tr>
                         <tr>
-                            <td>退号</td>
-                            <td id="thje_p">0.00</td>
-                            <td colspan="3" id="ghtpzs_p">退票数:0</td>
+                            <td class="text-center">全免</td>
+                            <td id="ghqmbs">0</td>
+                            <td id="ghqmsk">0.00</td>
+                            <td id="ghqmtfbs">0</td>
+                            <td id="ghqmtf">0.00</td>
+                            <td id="ghqmssbs">0</td>
+                            <td id="ghqmss">0.00</td>
                         </tr>
                         <tr>
-                            <td>合计(小写)</td>
-                            <td colspan="2" id="ghhj_p">0.00</td>
-                            <td colspan="2" id="ghjebhjz_p">合计(不含记账) 0.00</td>
+                            <td class="text-center">绿色通道记账</td>
+                            <td id="ghzfbs">0</td>
+                            <td id="ghzfsk">0.00</td>
+                            <td id="ghzftfbs">0</td>
+                            <td id="ghzftf">0.00</td>
+                            <td id="ghzfssbs">0</td>
+                            <td id="ghzfss">0.00</td>
                         </tr>
                         <tr>
-                            <td>合计(大写)</td>
-                            <td colspan="2" id="ghhjdx_p"></td>
-                            <td colspan="2" id="ghjebhjzdx_p">合计(不含记账)</td>
+                            <td class="text-center">小计</td>
+                            <td id="ghzjbs">0</td>
+                            <td id="ghzjsk">0.00</td>
+                            <td id="ghztfbs">0</td>
+                            <td id="ghzjtk">0.00</td>
+                            <td id="ghzjssbs">0</td>
+                            <td id="ghzjss">0.00</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">实收合计(不含记账)</td>
+                            <td id="ghsjhj">0.00</td>
+                            <td colspan="5" id="ghsjhjdx">零元整</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">绿色通道记账小计</td>
+                            <td id="ghzfsshj">0.00</td>
+                            <td colspan="5" id="ghzfdx">零元整</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">总计</td>
+                            <td id="ghzj">0.00</td>
+                            <td colspan="5" id="ghzjdx">零元整</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">收入构成</td>
+                            <td>诊察收入:</td>
+                            <td id="zcsr">0.00</td>
+                            <td>检查收入:</td>
+                            <td id="jcsr">0.00</td>
+                            <td>挂号费收入:</td>
+                            <td id="ghsr">0.00</td>
                         </tr>
                         </tbody>
                     </table>
                 </div>
-                <div id="ghgzlhzb_p_title" style="display: none"><h2 style="text-align:center;font-weight: 700" >挂号处工作量汇总报表</h2></div>
-                <div style="display:none;" id="ghgzlhzb_parent_p">
-                    <table border="1" style="width: 96%;" cellspacing="0">
+                <div style="display:none;" id="ghgzlhzb_parent">
+                    <h2 style="text-align:center;font-weight: 700">挂号处工作量汇总报表</h2>
+                    <table class="table table-striped table-bordered">
                         <thead>
                         <tr>
                             <td>收款员</td>
@@ -545,13 +379,13 @@
                             <td>总收入</td>
                         </tr>
                         </thead>
-                        <tbody id="ghgzlhzb_p">
+                        <tbody id="ghgzlhzb">
                         </tbody>
                     </table>
                 </div>
-                <div id="sfgzlhzb_parent_p_title" style="display: none"><h2 style="text-align:center;font-weight: 700" >门诊收费结账单列表</h2></div>
-                <div style="display:none;" id="sfgzlhzb_parent_p">
-                    <table border="1" style="width: 96%;" cellspacing="0">
+                <div style="display:none;" id="sfgzlhzb_parent">
+                    <h2 style="text-align:center;font-weight: 700">门诊收费结账单列表</h2>
+                    <table class="table table-striped table-bordered">
                         <thead>
                         <tr>
                             <td>收款员</td>
@@ -563,32 +397,11 @@
                             <td>总收入</td>
                         </tr>
                         </thead>
-                        <tbody id="sfgzlhzb_p">
-                        </tbody>
-                    </table>
-                </div>
-                <div id="mzskylb_parent_p_title" style="display: none"><h2 style="text-align:center;font-weight: 700" >门诊收款一览表</h2><h2 style="text-align:center;font-weight: 700">门诊收据分类统计表</h2></div>
-                <div style="display:none;" id="mzskylb_parent_p">
-                    <table border="1" style="width: 96%;" cellspacing="0">
-                        <thead>
-                        <tr>
-                            <td>门诊收据分类</td>
-                            <td>数量</td>
-                            <td>金额</td>
-                            <td>门诊收据分类</td>
-                            <td>数量</td>
-                            <td>金额</td>
-                            <td>门诊收据分类</td>
-                            <td>数量</td>
-                            <td>金额</td>
-                        </tr>
-                        </thead>
-                        <tbody id="mzskylb_p">
+                        <tbody id="sfgzlhzb">
                         </tbody>
                     </table>
                 </div>
-                <div id="username_zbr_p_parent" style="display: none"><span>制表人:</span><span style="text-decoration: underline" id="username_zbr_p"></span></div>
-
+                <div><span>制表人:</span><span style="text-decoration: underline" id="username_zbr"></span></div>
             </div>
             <table id="tb_table"></table>
         </div>

+ 238 - 481
src/main/resources/templates/daily_repeat_print.html

@@ -74,593 +74,350 @@
             </div>
             <div id="report_table" class="in"
                  style="width:920px;height:700px;margin:0 auto;border: 1px solid #337ab7;font-size: 16px;padding: 40px 20px 40px 20px;overflow-y: auto; overflow-x:hidden;">
-                <h2 style="text-align:center;font-weight: 700;">门诊收费收入日报表</h2>
-                <div style="margin-top: 20px;"><span>工号:</span><span id="userIdCode"></span><span
-                        style="margin-left: 120px;">姓名:</span><span id="username"></span><span
-                        style="margin-left: 120px;">结账时间:</span><span id="dcountDate"></span></div>
-                <table class="table table-striped table-bordered">
-                    <tbody>
-                    <tr>
-                        <td>挂号费</td>
-                        <td id="charge1">0.00</td>
-                        <td>其他</td>
-                        <td id="charge9">0.00</td>
-                        <td>消毒费</td>
-                        <td id="charge16">0.00</td>
-                    </tr>
-                    <tr>
-                        <td>床位费</td>
-                        <td id="charge2">0.00</td>
-                        <td>西药费</td>
-                        <td id="charge10">0.00</td>
-                        <td>材料费</td>
-                        <td id="charge18">0.00</td>
-                    </tr>
-                    <tr>
-                        <td>诊查费</td>
-                        <td id="charge3">0.00</td>
-                        <td>中成药费</td>
-                        <td id="charge11">0.00</td>
-                        <td>麻醉费</td>
-                        <td id="charge19">0.00</td>
-                    </tr>
-                    <tr>
-                        <td>检查费</td>
-                        <td id="charge4">0.00</td>
-                        <td>中草药费</td>
-                        <td id="charge12">0.00</td>
-                        <td>四舍五入</td>
-                        <td id="charge20">0.00</td>
-                    </tr>
-                    <tr>
-                        <td>治疗费</td>
-                        <td id="charge5">0.00</td>
-                        <td>特殊材料费</td>
-                        <td id="charge13">0.00</td>
-                        <td>护理费</td>
-                        <td id="charge6">0.00</td>
-                    </tr>
-                    <tr>
-                        <td>输血费</td>
-                        <td id="charge14">0.00</td>
-                        <td>手术费</td>
-                        <td id="charge7">0.00</td>
-                        <td>鉴定费</td>
-                        <td id="charge15">0.00</td>
-                    </tr>
-                    <tr>
-                        <td>化验费</td>
-                        <td id="charge8">0.00</td>
-                        <td>手术器械使用费</td>
-                        <td id="charge17">0.00</td>
-                        <td>合计:</td>
-                        <td id="totalCharge">0.00</td>
-                    </tr>
-                    </tbody>
-                </table>
-                <table id="datatable" class="table table-striped table-bordered">
-                    <thead>
-                    <tr>
-                        <th rowspan="2" class="text-center" style="vertical-align: middle !important;">交易类别</th>
-                        <th colspan="2" class="text-center">收款</th>
-                        <th colspan="2" class="text-center">退款</th>
-                        <th colspan="2" class="text-center">实收</th>
-                    </tr>
-                    <tr>
-                        <th class="text-center">张数</th>
-                        <th class="text-center">金额</th>
-                        <th class="text-center">张数</th>
-                        <th class="text-center">金额</th>
-                        <th class="text-center">张数</th>
-                        <th class="text-center">金额</th>
-                    </tr>
-                    </thead>
-                    <tbody>
-                    <tr>
-                        <td class="text-center">现金</td>
-                        <td id="xjbs">0</td>
-                        <td id="xjsk">0.00</td>
-                        <td id="xjtfbs">0</td>
-                        <td id="xjtf">0.00</td>
-                        <td id="xjssbs">0</td>
-                        <td id="xjss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">银行卡</td>
-                        <td id="yhsbs">0</td>
-                        <td id="yhksk">0.00</td>
-                        <td id="yhktfbs">0</td>
-                        <td id="yhktf">0.00</td>
-                        <td id="yhkssbs">0</td>
-                        <td id="yhkss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">支付宝</td>
-                        <td id="zfbbs">0</td>
-                        <td id="zfbsk">0.00</td>
-                        <td id="zfbtfbs">0</td>
-                        <td id="zfbtf">0.00</td>
-                        <td id="zfbssbs">0</td>
-                        <td id="zfbss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">微信</td>
-                        <td id="wxbs">0</td>
-                        <td id="wxsk">0.00</td>
-                        <td id="wxtfbs">0</td>
-                        <td id="wxtf">0.00</td>
-                        <td id="wxssbs">0</td>
-                        <td id="wxss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">记账绿色通道</td>
-                        <td id="zfbs">0</td>
-                        <td id="zfsk">0.00</td>
-                        <td id="zftfbs">0</td>
-                        <td id="zftf">0.00</td>
-                        <td id="zfssbs">0</td>
-                        <td id="zfss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">医保卡</td>
-                        <td id="sybbs">0</td>
-                        <td id="sybksk">0.00</td>
-                        <td id="sybtfbs">0</td>
-                        <td id="sybtf">0.00</td>
-                        <td id="sybssbs">0</td>
-                        <td id="sybkss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center">总计</td>
-                        <td id="zjbs">0</td>
-                        <td id="zjsk">0.00</td>
-                        <td id="ztfbs">0</td>
-                        <td id="zjtk">0.00</td>
-                        <td id="zjssbs">0</td>
-                        <td id="zjss">0.00</td>
-                    </tr>
-                    <tr>
-                        <td class="text-center" colspan="2">实缴合计</td>
-                        <td id="sjhj">0.00</td>
-                        <td colspan="4" id="sjhjdx"></td>
-                    </tr>
-                    <tr>
-                        <td class="text-center" colspan="2">记账(绿色通道)</td>
-                        <td id="zfsshj">0.00</td>
-                        <td colspan="4" id="zfdx"></td>
-                    </tr>
-                    <tr>
-                        <td class="text-center" colspan="2">总计</td>
-                        <td id="zj">0.00</td>
-                        <td colspan="4" id="zjdx"></td>
-                    </tr>
-                    </tbody>
-                </table>
-                <div class="form-group col-md-12 col-sm-12 col-xs-12" id="sfReceiptBills">
-                    <div class="col-md-12 col-sm-12 col-xs-12" style="margin-bottom: 10px;">所用票号:</div>
-                </div>
-                <div class="form-group col-md-12 col-sm-12 col-xs-12" style="margin-bottom: 100px;">
-                    <div class="col-md-12 col-sm-12 col-xs-12" style="border-bottom: 0.5px solid #dcdcdc;">
-                        <div class="col-md-2 col-sm-2 col-xs-12" style="margin-left: -10px;">发票张数:</div>
-                        <div class="col-md-1 col-sm-1 col-xs-12" id="sffps">0</div>
-                        <div class="col-md-2 col-sm-2 col-xs-12">退票张数:</div>
-                        <div class="col-md-1 col-sm-1 col-xs-12" id="tpzs">0</div>
-                        <div class="col-md-2 col-sm-2 col-xs-12">作废张数:</div>
-                        <div class="col-md-1 col-sm-1 col-xs-12" id="zffps">0</div>
-                    </div>
-                    <table style="display: none" id="sfzffpmx_table">
-                        <thead>
-                        <tr>
-                            <td colspan="9">作废/退费明细表:</td>
-                        </tr>
-                        <tr>
-                            <td width="114.8px">发票号</td>
-                            <td width="100px">姓名</td>
-                            <td width="72.2px">金额</td>
-                            <td width="114.8px">发票号</td>
-                            <td width="100px">姓名</td>
-                            <td width="72.2px">金额</td>
-                            <td width="114.8px">发票号</td>
-                            <td width="100px">姓名</td>
-                            <td width="72.2px">金额</td>
-                        </tr>
-                        </thead>
-                        <tbody id="sfzffpmx">
-
-                        </tbody>
-                    </table>
-                </div>
-                <h2 style="text-align:center;font-weight: 700">门诊挂号收入个人日报表</h2>
-                <div style="margin-top: 20px;"><span>工号:</span><span id="userIdCode_gh"></span><span
-                        style="margin-left: 120px;">姓名:</span><span id="username_gh"></span><span
-                        style="margin-left: 120px;">结账时间:</span><span id="dcountDate_gh"></span></div>
-                <table class="table table-striped table-bordered">
-                    <tbody>
-                    <tr>
-                        <td>项目</td>
-                        <td>金额</td>
-                        <td colspan="3" class="text-center">使用票据及费用构成</td>
-                    </tr>
-                    <tr>
-                        <td rowspan="3" style="vertical-align: middle !important;">挂号</td>
-                        <td rowspan="3" style="vertical-align: middle !important;" id="ghje">0.00</td>
-                        <td colspan="3" id="ghfps">所用票数:0</td>
-                    </tr>
-                    <tr>
-                        <td id="qmhs">全免号数:0</td>
-                        <td id="jzhs">记账号数:0</td>
-                        <td id="jzje">记账金额:0</td>
-                    </tr>
-                    <tr>
-                        <td id="zcsr">诊察收入:0.00</td>
-                        <td id="jcsr">检查收入:0.00</td>
-                        <td id="ghsr">挂号费(门诊):0.00</td>
-                    </tr>
-                    <tr>
-                        <td>退号</td>
-                        <td id="thje">0.00</td>
-                        <td colspan="3" id="ghtpzs">退票数:0</td>
-                    </tr>
-                    <tr>
-                        <td>合计(小写)</td>
-                        <td colspan="2" id="ghhj">0.00</td>
-                        <td colspan="2" id="ghjebhjz">合计(不含记账) 0.00</td>
-                    </tr>
-                    <tr>
-                        <td>合计(大写)</td>
-                        <td colspan="2" id="ghhjdx"></td>
-                        <td colspan="2" id="ghjebhjzdx">合计(不含记账)</td>
-                    </tr>
-                    </tbody>
-                </table>
-                <div class="form-group col-md-12 col-sm-12 col-xs-12" style="margin-bottom: 50px;">
-                    <div class="form-group col-md-12 col-sm-12 col-xs-12"
-                         style="border-bottom: 0.5px solid #dcdcdc;" id="ghReceiptBills">
-                        <div class="col-md-12 col-sm-12 col-xs-12" style="">所用票号:</div>
-                    </div>
-                    <table style="display: none" id="thzffpmx_table">
-                        <thead>
-                        <tr>
-                            <td colspan="9">作废/退号明细表:</td>
-                        </tr>
-                        <tr>
-                            <td width="114.8px">发票号</td>
-                            <td width="100px">姓名</td>
-                            <td width="72.2px">金额</td>
-                            <td width="114.8px">发票号</td>
-                            <td width="100px">姓名</td>
-                            <td width="72.2px">金额</td>
-                            <td width="114.8px">发票号</td>
-                            <td width="100px">姓名</td>
-                            <td width="72.2px">金额</td>
-                        </tr>
-                        </thead>
-                        <tbody id="thzffpmx">
-
-                        </tbody>
-                    </table>
-                </div>
-
-                <div><span>制表人:</span><span style="text-decoration: underline" id="username_zbr"></span><span
-                        style="margin-left: 120px;">收款人:</span><span style="text-decoration: underline">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
-                        style="margin-left: 120px;">审核人:</span><span style="text-decoration: underline">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-                </div>
-
-
-                <div id="printDiv_sf" style="display: none">
-                    <h2 style="text-align:center;font-weight: 700;">门诊收费收入日报表(重打)</h2>
-                    <div style="margin-top: 20px;"><span>工号:</span><span id="userIdCode_p"></span><span
-                            style="margin-left: 120px;">姓名:</span><span id="username_p"></span><span
-                            style="margin-left: 120px;">结账时间:</span><span id="dcountDate_p"></span></div>
-                    <table border="1" cellspacing="0" style="width: 96%;border-width: 1px;border-style: solid;border-collapse: collapse;">
+                <div id="report_table_1">
+                    <h2 style="text-align:center;font-weight: 700;">门诊收费收入日报表(重打)</h2>
+                    <div style="margin-top: 20px;">
+                        <span>收费员:</span><span id="username"></span><span
+                            style="margin-left: 120px;">工号:</span><span id="userIdCode"></span><span
+                            style="margin-left: 120px;">结账时间:</span><span id="dcountDate"></span></div>
+                    <table class="table table-striped table-bordered">
                         <tbody>
                         <tr>
                             <td>挂号费</td>
-                            <td id="charge1_p">0.00</td>
+                            <td id="charge1">0.00</td>
                             <td>其他</td>
-                            <td id="charge9_p">0.00</td>
+                            <td id="charge9">0.00</td>
                             <td>消毒费</td>
-                            <td id="charge16_p">0.00</td>
+                            <td id="charge16">0.00</td>
                         </tr>
                         <tr>
                             <td>床位费</td>
-                            <td id="charge2_p">0.00</td>
+                            <td id="charge2">0.00</td>
                             <td>西药费</td>
-                            <td id="charge10_p">0.00</td>
+                            <td id="charge10">0.00</td>
                             <td>材料费</td>
-                            <td id="charge18_p">0.00</td>
+                            <td id="charge18">0.00</td>
                         </tr>
                         <tr>
                             <td>诊查费</td>
-                            <td id="charge3_p">0.00</td>
+                            <td id="charge3">0.00</td>
                             <td>中成药费</td>
-                            <td id="charge11_p">0.00</td>
+                            <td id="charge11">0.00</td>
                             <td>麻醉费</td>
-                            <td id="charge19_p">0.00</td>
+                            <td id="charge19">0.00</td>
                         </tr>
                         <tr>
                             <td>检查费</td>
-                            <td id="charge4_p">0.00</td>
+                            <td id="charge4">0.00</td>
                             <td>中草药费</td>
-                            <td id="charge12_p">0.00</td>
+                            <td id="charge12">0.00</td>
                             <td>四舍五入</td>
-                            <td id="charge20_p">0.00</td>
+                            <td id="charge20">0.00</td>
                         </tr>
                         <tr>
                             <td>治疗费</td>
-                            <td id="charge5_p">0.00</td>
+                            <td id="charge5">0.00</td>
                             <td>特殊材料费</td>
-                            <td id="charge13_p">0.00</td>
+                            <td id="charge13">0.00</td>
                             <td>护理费</td>
-                            <td id="charge6_p">0.00</td>
+                            <td id="charge6">0.00</td>
                         </tr>
                         <tr>
                             <td>输血费</td>
-                            <td id="charge14_p">0.00</td>
+                            <td id="charge14">0.00</td>
                             <td>手术费</td>
-                            <td id="charge7_p">0.00</td>
+                            <td id="charge7">0.00</td>
                             <td>鉴定费</td>
-                            <td id="charge15_p">0.00</td>
+                            <td id="charge15">0.00</td>
                         </tr>
                         <tr>
                             <td>化验费</td>
-                            <td id="charge8_p">0.00</td>
+                            <td id="charge8">0.00</td>
                             <td>手术器械使用费</td>
-                            <td id="charge17_p">0.00</td>
+                            <td id="charge17">0.00</td>
+                            <td></td>
+                            <td></td>
+                        </tr>
+                        <tr>
                             <td>合计:</td>
-                            <td id="totalCharge_p">0.00</td>
+                            <td id="totalCharge">0.00</td>
+                            <td id="totalChargeStr" colspan="5">零元整</td>
                         </tr>
                         </tbody>
                     </table>
-                    <table id="datatable_p" border="1" cellspacing="0" style="width: 96%;margin-top: 20px;border-width: 1px;border-style: solid;border-collapse: collapse;">
+
+                    <div>附表1:收费收入报表</div>
+                    <table id="datatable" class="table table-striped table-bordered" style="margin-top: 10px;">
                         <thead>
                         <tr>
-                            <th rowspan="2" class="text-center" style="vertical-align: middle !important;">交易类别</th>
+                            <th rowspan="2" class="text-center" style="vertical-align: middle !important;">收款方式</th>
                             <th colspan="2" class="text-center">收款</th>
                             <th colspan="2" class="text-center">退款</th>
                             <th colspan="2" class="text-center">实收</th>
                         </tr>
                         <tr>
-                            <th class="text-center">数</th>
+                            <th class="text-center">笔数</th>
                             <th class="text-center">金额</th>
-                            <th class="text-center">数</th>
+                            <th class="text-center">笔数</th>
                             <th class="text-center">金额</th>
-                            <th class="text-center">数</th>
+                            <th class="text-center">笔数</th>
                             <th class="text-center">金额</th>
                         </tr>
                         </thead>
                         <tbody>
                         <tr>
                             <td class="text-center">现金</td>
-                            <td id="xjbs_p">0</td>
-                            <td id="xjsk_p">0.00</td>
-                            <td id="xjtfbs_p">0</td>
-                            <td id="xjtf_p">0.00</td>
-                            <td id="xjssbs_p">0</td>
-                            <td id="xjss_p">0.00</td>
+                            <td id="xjbs">0</td>
+                            <td id="xjsk">0.00</td>
+                            <td id="xjtfbs">0</td>
+                            <td id="xjtf">0.00</td>
+                            <td id="xjssbs">0</td>
+                            <td id="xjss">0.00</td>
                         </tr>
                         <tr>
                             <td class="text-center">银行卡</td>
-                            <td id="yhsbs_p">0</td>
-                            <td id="yhksk_p">0.00</td>
-                            <td id="yhktfbs_p">0</td>
-                            <td id="yhktf_p">0.00</td>
-                            <td id="yhkssbs_p">0</td>
-                            <td id="yhkss_p">0.00</td>
+                            <td id="yhsbs">0</td>
+                            <td id="yhksk">0.00</td>
+                            <td id="yhktfbs">0</td>
+                            <td id="yhktf">0.00</td>
+                            <td id="yhkssbs">0</td>
+                            <td id="yhkss">0.00</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">医保卡</td>
+                            <td id="ybjzbs">0</td>
+                            <td id="ybjzsk">0.00</td>
+                            <td id="ybjztfbs">0</td>
+                            <td id="ybjztf">0.00</td>
+                            <td id="ybjzssbs">0</td>
+                            <td id="ybjzss">0.00</td>
                         </tr>
                         <tr>
                             <td class="text-center">支付宝</td>
-                            <td id="zfbbs_p">0</td>
-                            <td id="zfbsk_p">0.00</td>
-                            <td id="zfbtfbs_p">0</td>
-                            <td id="zfbtf_p">0.00</td>
-                            <td id="zfbssbs_p">0</td>
-                            <td id="zfbss_p">0.00</td>
+                            <td id="zfbbs">0</td>
+                            <td id="zfbsk">0.00</td>
+                            <td id="zfbtfbs">0</td>
+                            <td id="zfbtf">0.00</td>
+                            <td id="zfbssbs">0</td>
+                            <td id="zfbss">0.00</td>
                         </tr>
                         <tr>
                             <td class="text-center">微信</td>
-                            <td id="wxbs_p">0</td>
-                            <td id="wxsk_p">0.00</td>
-                            <td id="wxtfbs_p">0</td>
-                            <td id="wxtf_p">0.00</td>
-                            <td id="wxssbs_p">0</td>
-                            <td id="wxss_p">0.00</td>
+                            <td id="wxbs">0</td>
+                            <td id="wxsk">0.00</td>
+                            <td id="wxtfbs">0</td>
+                            <td id="wxtf">0.00</td>
+                            <td id="wxssbs">0</td>
+                            <td id="wxss">0.00</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">医保卡记账</td>
+                            <td id="ybkjzbs">0</td>
+                            <td id="ybkjzsk">0.00</td>
+                            <td id="ybkjztfbs">0</td>
+                            <td id="ybkjztf">0.00</td>
+                            <td id="ybkjzssbs">0</td>
+                            <td id="ybkjzss">0.00</td>
                         </tr>
                         <tr>
                             <td class="text-center">记账绿色通道</td>
-                            <td id="zfbs_p">0</td>
-                            <td id="zfsk_p">0.00</td>
-                            <td id="zftfbs_p">0</td>
-                            <td id="zftf_p">0.00</td>
-                            <td id="zfssbs_p">0</td>
-                            <td id="zfss_p">0.00</td>
+                            <td id="zfbs">0</td>
+                            <td id="zfsk">0.00</td>
+                            <td id="zftfbs">0</td>
+                            <td id="zftf">0.00</td>
+                            <td id="zfssbs">0</td>
+                            <td id="zfss">0.00</td>
                         </tr>
                         <tr>
-                            <td class="text-center">医保卡</td>
-                            <td id="sybbs_p">0</td>
-                            <td id="sybksk_p">0.00</td>
-                            <td id="sybtfbs_p">0</td>
-                            <td id="sybtf_p">0.00</td>
-                            <td id="sybssbs_p">0</td>
-                            <td id="sybkss_p">0.00</td>
+                            <td class="text-center">小计</td>
+                            <td id="zjbs">0</td>
+                            <td id="zjsk">0.00</td>
+                            <td id="ztfbs">0</td>
+                            <td id="zjtk">0.00</td>
+                            <td id="zjssbs">0</td>
+                            <td id="zjss">0.00</td>
                         </tr>
                         <tr>
-                            <td class="text-center">总计</td>
-                            <td id="zjbs_p">0</td>
-                            <td id="zjsk_p">0.00</td>
-                            <td id="ztfbs_p">0</td>
-                            <td id="zjtk_p">0.00</td>
-                            <td id="zjssbs_p">0</td>
-                            <td id="zjss_p">0.00</td>
+                            <td class="text-center">实收合计</td>
+                            <td id="sjhj">0.00</td>
+                            <td colspan="5" id="sjhjdx">零元整</td>
                         </tr>
                         <tr>
-                            <td class="text-center" colspan="2">实缴合计</td>
-                            <td id="sjhj_p">0.00</td>
-                            <td colspan="4" id="sjhjdx_p"></td>
+                            <td class="text-center">绿色通道记账小计</td>
+                            <td id="zfsshj">0.00</td>
+                            <td colspan="5" id="zfdx"></td>
                         </tr>
                         <tr>
-                            <td class="text-center" colspan="2">记账(绿色通道)</td>
-                            <td id="zfsshj_p">0.00</td>
-                            <td colspan="4" id="zfdx_p"></td>
+                            <td class="text-center">医保卡记账小计</td>
+                            <td id="ybkjzhj">0.00</td>
+                            <td colspan="5" id="ybkjzhjdx">零元整</td>
                         </tr>
                         <tr>
-                            <td class="text-center" colspan="2">总计</td>
-                            <td id="zj_p">0.00</td>
-                            <td colspan="4" id="zjdx_p"></td>
+                            <td class="text-center">总计</td>
+                            <td id="zj">0.00</td>
+                            <td colspan="5" id="zjdx">零元整</td>
                         </tr>
                         </tbody>
                     </table>
-                    <div class="form-group col-md-12 col-sm-12 col-xs-12" id="sfReceiptBills_p"
-                         style="margin-bottom: 10px;margin-top: 20px;padding-left: 20px;">
-
-                        <table>
-                            <thead>
-                            <tr>
-                                <td colspan="4">所用票号:</td>
-                            <tr>
-                                <td width="215px"></td>
-                                <td width="215px"></td>
-                                <td width="215px"></td>
-                                <td width="215px"></td>
-                            </tr>
-                            </tr>
-                            </thead>
-                            <tbody id="sfReceiptBills_p_table">
-                            </tbody>
-                        </table>
-                    </div>
-                    <div class="form-group col-md-12 col-sm-12 col-xs-12" style="margin-bottom: 100px;">
-                        <div class="col-md-12 col-sm-12 col-xs-12"
-                             style="border-bottom: 0.5px solid #dcdcdc;padding-left: 20px;">
-                            <table style="width: 60%;">
-                                <tbody>
-                                <tr>
-                                    <td>发票张数:</td>
-                                    <td id="sffps_p">0</td>
-                                    <td>退票张数:</td>
-                                    <td id="tpzs_p">0</td>
-                                    <td>作废张数:</td>
-                                    <td id="zffps_p">0</td>
-                                </tr>
-                                </tbody>
-                            </table>
-                        </div>
-                        <table style="width: 96%;padding-left: 20px;display: none;border-top:1px solid"
-                               id="sfzffpmx_p_table">
-                            <thead>
-                            <tr>
-                                <td colspan="9">作废/退费明细表:</td>
-                            </tr>
-                            <tr>
-                            <tr>
-                                <td width="114.8px">发票号</td>
-                                <td width="100px">姓名</td>
-                                <td width="72.2px">金额</td>
-                                <td width="114.8px">发票号</td>
-                                <td width="100px">姓名</td>
-                                <td width="72.2px">金额</td>
-                                <td width="114.8px">发票号</td>
-                                <td width="100px">姓名</td>
-                                <td width="72.2px">金额</td>
-                            </tr>
-                            </tr>
-                            </thead>
-                            <tbody id="sfzffpmx_p">
-
-                            </tbody>
-                        </table>
-                    </div>
-                </div>
-                <div id="printDiv_gh" style="display: none">
-                    <h2 style="text-align:center;font-weight: 700">门诊挂号收入个人日报表(重打)</h2>
-                    <div style="margin-top: 20px;"><span>工号:</span><span id="userIdCode_gh_p"></span><span
-                            style="margin-left: 120px;">姓名:</span><span id="username_gh_p"></span><span
-                            style="margin-left: 120px;">结账时间:</span><span id="dcountDate_gh_p"></span></div>
-                    <table border="1" style="width: 96%;border-width: 1px;border-style: solid;border-collapse: collapse;" cellspacing="0">
+                    <div>附表2:挂号收入报表</div>
+                    <table class="table table-striped table-bordered" style="margin-top: 10px;">
+                        <thead>
+                        <tr>
+                            <th rowspan="2" class="text-center" style="vertical-align: middle !important;">收款方式</th>
+                            <th colspan="2" class="text-center">收款</th>
+                            <th colspan="2" class="text-center">退号</th>
+                            <th colspan="2" class="text-center">实收</th>
+                        </tr>
+                        <tr>
+                            <th class="text-center">号数</th>
+                            <th class="text-center">金额</th>
+                            <th class="text-center">号数</th>
+                            <th class="text-center">金额</th>
+                            <th class="text-center">号数</th>
+                            <th class="text-center">金额</th>
+                        </tr>
+                        </thead>
                         <tbody>
                         <tr>
-                            <td>项目</td>
-                            <td>金额</td>
-                            <td colspan="3" class="text-center">使用票据及费用构成</td>
+                            <td class="text-center">现金</td>
+                            <td id="ghxjbs">0</td>
+                            <td id="ghxjsk">0.00</td>
+                            <td id="ghxjtfbs">0</td>
+                            <td id="ghxjtf">0.00</td>
+                            <td id="ghxjssbs">0</td>
+                            <td id="ghxjss">0.00</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">银行卡</td>
+                            <td id="ghyhsbs">0</td>
+                            <td id="ghyhksk">0.00</td>
+                            <td id="ghyhktfbs">0</td>
+                            <td id="ghyhktf">0.00</td>
+                            <td id="ghyhkssbs">0</td>
+                            <td id="ghyhkss">0.00</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">医保卡</td>
+                            <td id="ghsybbs">0</td>
+                            <td id="ghsybksk">0.00</td>
+                            <td id="ghsybtfbs">0</td>
+                            <td id="ghsybtf">0.00</td>
+                            <td id="ghsybssbs">0</td>
+                            <td id="ghsybkss">0.00</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">支付宝</td>
+                            <td id="ghzfbbs">0</td>
+                            <td id="ghzfbsk">0.00</td>
+                            <td id="ghzfbtfbs">0</td>
+                            <td id="ghzfbtf">0.00</td>
+                            <td id="ghzfbssbs">0</td>
+                            <td id="ghzfbss">0.00</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">微信</td>
+                            <td id="ghwxbs">0</td>
+                            <td id="ghwxsk">0.00</td>
+                            <td id="ghwxtfbs">0</td>
+                            <td id="ghwxtf">0.00</td>
+                            <td id="ghwxssbs">0</td>
+                            <td id="ghwxss">0.00</td>
+                        </tr>
+                        <tr>
+                            <td class="text-center">全免</td>
+                            <td id="ghqmbs">0</td>
+                            <td id="ghqmsk">0.00</td>
+                            <td id="ghqmtfbs">0</td>
+                            <td id="ghqmtf">0.00</td>
+                            <td id="ghqmssbs">0</td>
+                            <td id="ghqmss">0.00</td>
                         </tr>
                         <tr>
-                            <td rowspan="3" style="vertical-align: middle !important;">挂号</td>
-                            <td rowspan="3" style="vertical-align: middle !important;" id="ghje_p">0.00</td>
-                            <td colspan="3" id="ghfps_p">所用票数:0</td>
+                            <td class="text-center">绿色通道记账</td>
+                            <td id="ghzfbs">0</td>
+                            <td id="ghzfsk">0.00</td>
+                            <td id="ghzftfbs">0</td>
+                            <td id="ghzftf">0.00</td>
+                            <td id="ghzfssbs">0</td>
+                            <td id="ghzfss">0.00</td>
                         </tr>
                         <tr>
-                            <td id="qmhs_p">全免号数:0</td>
-                            <td id="jzhs_p">记账号数:0</td>
-                            <td id="jzje_p">记账金额:0</td>
+                            <td class="text-center">小计</td>
+                            <td id="ghzjbs">0</td>
+                            <td id="ghzjsk">0.00</td>
+                            <td id="ghztfbs">0</td>
+                            <td id="ghzjtk">0.00</td>
+                            <td id="ghzjssbs">0</td>
+                            <td id="ghzjss">0.00</td>
                         </tr>
                         <tr>
-                            <td id="zcsr_p">诊察收入:0.00</td>
-                            <td id="jcsr_p">检查收入:0.00</td>
-                            <td id="ghsr_p">挂号费(门诊):0.00</td>
+                            <td class="text-center">实收合计(不含记账)</td>
+                            <td id="ghsjhj">0.00</td>
+                            <td colspan="5" id="ghsjhjdx">零元整</td>
                         </tr>
                         <tr>
-                            <td>退号</td>
-                            <td id="thje_p">0.00</td>
-                            <td colspan="3" id="ghtpzs_p">退票数:0</td>
+                            <td class="text-center">绿色通道记账小计</td>
+                            <td id="ghzfsshj">0.00</td>
+                            <td colspan="5" id="ghzfdx">零元整</td>
                         </tr>
                         <tr>
-                            <td>合计(小写)</td>
-                            <td colspan="2" id="ghhj_p">0.00</td>
-                            <td colspan="2" id="ghjebhjz_p">合计(不含记账) 0.00</td>
+                            <td class="text-center">总计</td>
+                            <td id="ghzj">0.00</td>
+                            <td colspan="5" id="ghzjdx">零元整</td>
                         </tr>
                         <tr>
-                            <td>合计(大写)</td>
-                            <td colspan="2" id="ghhjdx_p"></td>
-                            <td colspan="2" id="ghjebhjzdx_p">合计(不含记账)</td>
+                            <td class="text-center">收入构成</td>
+                            <td>诊察收入:</td>
+                            <td id="zcsr">0.00</td>
+                            <td>检查收入:</td>
+                            <td id="jcsr">0.00</td>
+                            <td>挂号费收入:</td>
+                            <td id="ghsr">0.00</td>
                         </tr>
                         </tbody>
                     </table>
-                    <div class="form-group col-md-12 col-sm-12 col-xs-12" style="margin-bottom: 50px;">
-                        <div class="form-group col-md-12 col-sm-12 col-xs-12"
-                             style="border-bottom: 0.5px solid #dcdcdc;margin-bottom: 10px;margin-top: 20px;padding-left: 20px;"
-                             id="ghReceiptBills_p">
-                            <table>
-                                <thead>
-                                <tr>
-                                    <td colspan="4">所用票号:</td>
-                                <tr>
-                                    <td width="215px"></td>
-                                    <td width="215px"></td>
-                                    <td width="215px"></td>
-                                    <td width="215px"></td>
-                                </tr>
-                                </tr>
-                                </thead>
-                                <tbody id="ghReceiptBills_p_table">
-                                </tbody>
-                            </table>
-                        </div>
+                </div>
+                <div id="zbr_div">
+                    <div class="form-group col-md-12 col-sm-12 col-xs-12"
+                         style="margin-bottom: 10px;margin-top: 20px;" id="receiptBills">
+
+                        <table>
+                            <thead>
+                            <tr>
+                                <td colspan="4">所用发票统计:</td>
+                            </tr>
+                            </thead>
+                            <tbody id="receiptBills_table">
+                            </tbody>
+                        </table>
+                    </div>
+                    <div class="form-group col-md-12 col-sm-12 col-xs-12" style="margin-bottom: 100px;">
                         <table style="width: 96%;padding-left: 20px;display: none;border-top:1px solid"
-                               id="thzffpmx_table_p">
+                               id="sfzffpmx_table">
                             <thead>
                             <tr>
-                                <td colspan="9">作废/退号明细表:</td>
+                                <td colspan="9">作废/退费发票明细:</td>
                             </tr>
                             <tr>
-                                <td width="114.8px">发票号</td>
-                                <td width="100px">姓名</td>
-                                <td width="72.2px">金额</td>
-                                <td width="114.8px">发票号</td>
-                                <td width="100px">姓名</td>
-                                <td width="72.2px">金额</td>
-                                <td width="114.8px">发票号</td>
-                                <td width="100px">姓名</td>
-                                <td width="72.2px">金额</td>
+                            <tr>
+                                <td width="180px">发票号</td>
+                                <td width="120px">姓名</td>
+                                <td width="100px">金额</td>
+                                <td width="180px">发票号</td>
+                                <td width="120px">姓名</td>
+                                <td width="100px">金额</td>
+                            </tr>
                             </tr>
                             </thead>
-                            <tbody id="thzffpmx_p">
+                            <tbody id="sfzffpmx">
 
                             </tbody>
                         </table>
                     </div>
-                    <div><span>制表人:</span><span style="text-decoration: underline" id="username_zbr_p"></span><span
-                            style="margin-left: 120px;">收款人:</span><span style="text-decoration: underline">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
-                            style="margin-left: 120px;">审核人:</span><span style="text-decoration: underline">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+
+                    <div><span>结账人签字:</span><span style="text-decoration: underline" id="username_zbr"></span><span
+                            style="margin-left: 120px;">收款人签字:</span><span style="text-decoration: underline">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
+                            style="margin-left: 120px;">审核人签字:</span><span style="text-decoration: underline">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                     </div>
                 </div>
             </div>