瀏覽代碼

报表改造

hurugang 5 年之前
父節點
當前提交
7054950d1c

+ 8 - 11
src/main/java/cn/hnthyy/thmz/controller/ChargeFeeVoController.java

@@ -361,8 +361,7 @@ public class ChargeFeeVoController {
             reqrecVo.fomartReqrecVo();
             resultMap.put("ghsrgcmx", reqrecVo);
             MzReceiptSerial mzReceiptSerial = chargeFeeVoService.queryMzReceiptSerial(tokenUser.getUserIdCode(), null, null, null).get(0);
-            mzReceiptSerial.setTotalChargeStr(mzReceiptSerial.getTotalCharge().add(reqrecVo.getGhje()));
-            mzReceiptSerial.setCharge1(reqrecVo.getGhje());
+            mzReceiptSerial.setCharge1(reqrecVo.getHjss());
             resultMap.put("mzReceiptSerial", mzReceiptSerial);
             ChargeCountVo chargeCountVo = chargeFeeVoService.queryChargeCountVo(tokenUser.getUserIdCode(), null, null, null).get(0);
             chargeCountVo.fomartChargeCountVo();
@@ -439,8 +438,7 @@ public class ChargeFeeVoController {
             reqrecVo.fomartReqrecVo();
             resultMap.put("ghsrgcmx", reqrecVo);
             MzReceiptSerial mzReceiptSerial = chargeFeeVoService.queryMzReceiptSerial(chargeFeeParamsVo.getOpId(), chargeFeeParamsVo.getDcountDate(), null, null).get(0);
-            mzReceiptSerial.setTotalChargeStr(mzReceiptSerial.getTotalCharge().add(reqrecVo.getGhje()));
-            mzReceiptSerial.setCharge1(reqrecVo.getGhje());
+            mzReceiptSerial.setCharge1(reqrecVo.getHjss());
             resultMap.put("mzReceiptSerial", mzReceiptSerial);
             ChargeCountVo chargeCountVo = chargeFeeVoService.queryChargeCountVo(chargeFeeParamsVo.getOpId(), chargeFeeParamsVo.getDcountDate(), null, null).get(0);
             chargeCountVo.fomartChargeCountVo();
@@ -651,22 +649,21 @@ public class ChargeFeeVoController {
         Map<String, Object> resultMap = new HashMap<>();
         try {
             User tokenUser = TokenUtil.getUser(httpServletRequest);
-            BigDecimal totalFee = chargeFeeVoService.queryTotalCharge(tokenUser.getUserIdCode());
-            //挂号收入构成表格数据
-            ReqrecVo reqrecVo = chargeFeeVoService.queryMzReceiptSerialCount(tokenUser.getUserIdCode(), null, null, null).get(0);
-            if ((totalFee == null || BigDecimal.ZERO.compareTo(totalFee) == 0) && (reqrecVo == null || reqrecVo.getGhje() == null || BigDecimal.ZERO.compareTo(reqrecVo.getGhje()) == 0)) {
+            Integer count= chargeFeeVoService.queryCountCanDaily(tokenUser.getUserIdCode());
+            if (count == null || count == 0) {
                 resultMap.put("code", -1);
                 resultMap.put("message", "费用结算失败,无可结算费用");
                 return resultMap;
             }
-            Integer count = chargeFeeVoService.queryTFWDFPCount(tokenUser.getUserIdCode());
+            count = chargeFeeVoService.queryTFWDFPCount(tokenUser.getUserIdCode());
             if (count > 0) {
                 resultMap.put("code", -1);
                 resultMap.put("message", "存在退费后发票未重打的发票信息,请 处理后再结账!");
                 return resultMap;
             }
-            Date dcountDate = chargeFeeVoService.dcountCharge(tokenUser.getUserIdCode());
-            resultMap.put("dcountDate", dcountDate);
+           // Date dcountDate = chargeFeeVoService.dcountCharge(tokenUser.getUserIdCode());
+            //resultMap.put("dcountDate", dcountDate);
+            resultMap.put("dcountDate", new Date());
             resultMap.put("code", 0);
             resultMap.put("message", "费用结算成功");
             return resultMap;

+ 9 - 2
src/main/java/cn/hnthyy/thmz/entity/his/MzReceiptSerial.java

@@ -106,13 +106,20 @@ public class MzReceiptSerial implements Serializable {
 
     private Integer totalCount;
 
-    public void setTotalChargeStr(BigDecimal totalCharge) {
+    public void setCharge1(BigDecimal charge1) {
+        this.charge1 = charge1;
+        if(totalCharge==null){
+            totalCharge=charge1;
+        }else {
+            totalCharge=totalCharge.add(charge1);
+        }
         if(totalCharge!=null){
-            this.totalCharge=totalCharge.setScale(2, BigDecimal.ROUND_HALF_UP);
+            totalCharge=totalCharge.setScale(2, BigDecimal.ROUND_HALF_UP);
             totalChargeStr=NumberToCN.number2CNMontrayUnit(this.totalCharge);
         }
     }
 
+
     public MzReceiptSerial() {
     }
 

+ 64 - 10
src/main/java/cn/hnthyy/thmz/mapper/his/ChargeFeeVoMapper.java

@@ -569,16 +569,53 @@ public interface ChargeFeeVoMapper {
     @Select({
             "<script>",
             "SELECT " +
-                    "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 ) ghje, " +
-                    "sum ( case when (cancel_mark ='0' and  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 ( 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 ) thje," +
-                    "sum (  req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 ) ) ghhj," +
-                    "sum ( clinic_fee ) zcsr," +
-                    "sum ( oth_fee ) jcsr," +
-                    "sum ( req_fee ) ghsr, " +
-                    "count ( case when print_flag ='1' and cancel_mark ='0' then 1 else null end ) qmhs," +
-                    "    sum ( case when charge_type ='19' and cancel_mark ='0' then 1 when charge_type ='20' and cancel_mark ='0' then 1 when charge_type ='19' and cancel_mark ='1' then - 1 when charge_type ='20' and cancel_mark ='1' then - 1 else 0 end ) jzhs," +
-                    " sum ( case when charge_type ='19' then isnull ( req_fee , 0 ) + isnull ( oth_fee , 0 ) + isnull ( clinic_fee , 0 ) when charge_type ='20' then isnull ( req_fee , 0 ) + isnull ( oth_fee , 0 ) + isnull ( clinic_fee , 0 ) else 0 end ) jzje "+
+                    " 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," +
+                    " 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," +
+                    " 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," +
+                    " 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," +
+                    " 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," +
+                    " 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," +
+                    " 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," +
+                    " 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 ( clinic_fee ) zcsr," +
+                    " sum ( oth_fee ) jcsr," +
+                    " sum ( req_fee ) ghsr "+
                     "FROM mzy_reqrec " +
                     " where 1=1 " +
                     "<when test='userIdCode!=null'>",
@@ -640,6 +677,23 @@ public interface ChargeFeeVoMapper {
             "and isnull ( bill_item_code , '' )  <> '020' ")
     Integer selectTFWDFPCount(@Param("userIdCode") String userIdCode);
 
+    /**
+     * 查询是否有可以日结的收费数据
+     * @param userIdCode
+     * @return
+     */
+    @Select("select count(1) from mz_receipt_serial where operator_id =#{userIdCode} and dcount_no =0 ")
+    Integer selectChargeCountCanDaily(@Param("userIdCode") String userIdCode);
+
+
+    /**
+     * 查询是否有可以日结的挂号数据
+     * @param userIdCode
+     * @return
+     */
+    @Select("select count(1) from mzy_reqrec where op_id =#{userIdCode} and dcount_no =0 ")
+    Integer selectRequecCountCanDaily(@Param("userIdCode") String userIdCode);
+
     /**
      * 查询总计金额
      * @param userIdCode

+ 9 - 0
src/main/java/cn/hnthyy/thmz/service/his/ChargeFeeVoService.java

@@ -247,4 +247,13 @@ public interface ChargeFeeVoService {
      * @return
      */
     List<ChargeDetailVo> queryChargeDetailVos(YesNoEnum hisDate,Date beginDate, Date endDate);
+
+
+
+    /**
+     * 查询是否有可以日结的数据
+     * @param userIdCode
+     * @return
+     */
+    Integer queryCountCanDaily(String userIdCode);
 }

+ 7 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/ChargeFeeVoServiceImpl.java

@@ -176,4 +176,11 @@ public class ChargeFeeVoServiceImpl implements ChargeFeeVoService {
         }
         return chargeFeeVoMapper.selectChargeDetailVos(tableName,tableName1,beginDate,endDate);
     }
+
+    @Override
+    public Integer queryCountCanDaily(String userIdCode) {
+       Integer chargeCount=chargeFeeVoMapper.selectChargeCountCanDaily(userIdCode);
+       Integer requecCount=chargeFeeVoMapper.selectRequecCountCanDaily(userIdCode);
+        return chargeCount+requecCount;
+    }
 }

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

@@ -31,14 +31,90 @@ public class ReqrecVo {
     private Date opDay;
     //收费员编号
     private String opId;
-    //挂号金额
-    private BigDecimal ghje;
-    //挂号金额不含记账
-    private BigDecimal ghjebhjz;
-    //退号金额
-    private BigDecimal thje;
-    //挂号合计
-    private BigDecimal ghhj;
+    //现金号数
+    private Integer xjhs;
+    //现金收款
+    private BigDecimal xjsk;
+    //现金退号数
+    private Integer xjthhs;
+    //现金退号费
+    private BigDecimal xjth;
+    //现金实收号数
+    private Integer xjsshs;
+    //现金实收金额
+    private BigDecimal xjss;
+    //银行卡号数
+    private Integer yhkhs;
+    //银行卡收款
+    private BigDecimal yhksk;
+    //银行卡退号号数
+    private Integer yhkthhs;
+    //银行卡退号费
+    private BigDecimal yhkth;
+    //银行卡实收号数
+    private Integer yhksshs;
+    //银行卡实收
+    private BigDecimal yhkss;
+    //医保卡号数
+    private Integer ybkhs;
+    //医保卡收款
+    private BigDecimal ybksk;
+    //医保卡退号号数
+    private Integer ybkthhs;
+    //医保卡退号费
+    private BigDecimal ybkth;
+    //医保卡实收号数
+    private Integer ybksshs;
+    //医保卡实收
+    private BigDecimal ybkss;
+    //支付宝号数
+    private Integer zfbhs;
+    //支付宝收款
+    private BigDecimal zfbsk;
+    //支付宝退号号数
+    private Integer zfbthhs;
+    //支付宝退号费
+    private BigDecimal zfbth;
+    //支付宝实收号数
+    private Integer zfbsshs;
+    //支付宝实收
+    private BigDecimal zfbss;
+    //微信号数
+    private Integer wxhs;
+    //微信收款
+    private BigDecimal wxsk;
+    //微信退号号数
+    private Integer wxthhs;
+    //微信退号费
+    private BigDecimal wxth;
+    //微信实收号数
+    private Integer wxsshs;
+    //微信实收
+    private BigDecimal wxss;
+    //本院记账号数
+    private Integer byjzhs;
+    //本院记账收款
+    private BigDecimal byjzsk;
+    //本院记账退号号数
+    private Integer byjzthhs;
+    //本院记账退号费
+    private BigDecimal byjzth;
+    //本院记账实收号数
+    private Integer byjzsshs;
+    //本院记账实收
+    private BigDecimal byjzss;
+    //合计号数
+    private Integer hjhs;
+    //合计收款
+    private BigDecimal hjsk;
+    //合计退号号数
+    private Integer hjthhs;
+    //合计退号费
+    private BigDecimal hjth;
+    //合计实收号数
+    private Integer hjsshs;
+    //合计实收
+    private BigDecimal hjss;
     //诊察收入
     private BigDecimal zcsr;
     //检查收入
@@ -55,12 +131,20 @@ public class ReqrecVo {
     private String ghhjdx;
     //挂号金额不含记账大写
     private String ghjebhjzdx;
+
+    public BigDecimal getHjss() {
+        if(hjss==null){
+            hjss=BigDecimal.ZERO;
+        }
+        return hjss;
+    }
+
     /**
      * 设置实收笔数
      */
     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=(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);
     }
 }

+ 6 - 108
src/main/resources/static/js/daily.js

@@ -93,185 +93,112 @@ function getRjbb() {
                 $("#totalCharge").html(res.mzReceiptSerial.totalCharge);
                 $("#totalChargeStr").html(res.mzReceiptSerial.totalChargeStr);
 
-                $("#userIdCode_p").html(res.user.userCode);
-                $("#username_p").html(res.user.userName);
-                $("#dcountDate_p").html(format(new Date(), "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);
-                $("#totalChargeStr_p").html(res.mzReceiptSerial.totalChargeStr);
                 //现金收款
                 $("#xjbs").html(res.chargeCountVo.xjbs);
-                $("#xjbs_p").html(res.chargeCountVo.xjbs);
                 if (res.chargeCountVo.xjsk != null) {
                     $("#xjsk").html(res.chargeCountVo.xjsk.toFixed(2));
-                    $("#xjsk_p").html(res.chargeCountVo.xjsk.toFixed(2));
                 }
                 $("#xjtfbs").html(res.chargeCountVo.xjtfbs);
-                $("#xjtfbs_p").html(res.chargeCountVo.xjtfbs);
                 if (res.chargeCountVo.xjtf != null) {
                     $("#xjtf").html(res.chargeCountVo.xjtf.toFixed(2));
-                    $("#xjtf_p").html(res.chargeCountVo.xjtf.toFixed(2));
                 }
                 $("#xjssbs").html(res.chargeCountVo.xjssbs);
-                $("#xjssbs_p").html(res.chargeCountVo.xjssbs);
                 if (res.chargeCountVo.xjss != null) {
                     $("#xjss").html(res.chargeCountVo.xjss.toFixed(2));
-                    $("#xjss_p").html(res.chargeCountVo.xjss.toFixed(2));
                 }
                 //银行卡收款
                 $("#yhsbs").html(res.chargeCountVo.yhsbs);
-                $("#yhsbs_p").html(res.chargeCountVo.yhsbs);
                 if (res.chargeCountVo.yhksk != null) {
                     $("#yhksk").html(res.chargeCountVo.yhksk.toFixed(2));
-                    $("#yhksk_p").html(res.chargeCountVo.yhksk.toFixed(2));
                 }
                 $("#yhktfbs").html(res.chargeCountVo.yhktfbs);
-                $("#yhktfbs_p").html(res.chargeCountVo.yhktfbs);
                 if (res.chargeCountVo.yhktf != null) {
                     $("#yhktf").html(res.chargeCountVo.yhktf.toFixed(2));
-                    $("#yhktf_p").html(res.chargeCountVo.yhktf.toFixed(2));
                 }
                 $("#yhkssbs").html(res.chargeCountVo.yhkssbs);
-                $("#yhkssbs_p").html(res.chargeCountVo.yhkssbs);
                 if (res.chargeCountVo.yhkss != null) {
                     $("#yhkss").html(res.chargeCountVo.yhkss.toFixed(2));
-                    $("#yhkss_p").html(res.chargeCountVo.yhkss.toFixed(2));
                 }
                 //支付宝收款
                 $("#zfbbs").html(res.chargeCountVo.zfbbs);
-                $("#zfbbs_p").html(res.chargeCountVo.zfbbs);
                 if (res.chargeCountVo.zfbsk != null) {
                     $("#zfbsk").html(res.chargeCountVo.zfbsk.toFixed(2));
-                    $("#zfbsk_p").html(res.chargeCountVo.zfbsk.toFixed(2));
                 }
                 $("#zfbtfbs").html(res.chargeCountVo.zfbtfbs);
-                $("#zfbtfbs_p").html(res.chargeCountVo.zfbtfbs);
                 if (res.chargeCountVo.zfbtf != null) {
                     $("#zfbtf").html(res.chargeCountVo.zfbtf.toFixed(2));
-                    $("#zfbtf_p").html(res.chargeCountVo.zfbtf.toFixed(2));
                 }
                 $("#zfbssbs").html(res.chargeCountVo.zfbssbs);
-                $("#zfbssbs_p").html(res.chargeCountVo.zfbssbs);
                 if (res.chargeCountVo.zfbss != null) {
                     $("#zfbss").html(res.chargeCountVo.zfbss.toFixed(2));
-                    $("#zfbss_p").html(res.chargeCountVo.zfbss.toFixed(2));
                 }
                 //微信收款
                 $("#wxbs").html(res.chargeCountVo.wxbs);
-                $("#wxbs_p").html(res.chargeCountVo.wxbs);
                 if (res.chargeCountVo.wxsk != null) {
                     $("#wxsk").html(res.chargeCountVo.wxsk.toFixed(2));
-                    $("#wxsk_p").html(res.chargeCountVo.wxsk.toFixed(2));
                 }
                 $("#wxtfbs").html(res.chargeCountVo.wxtfbs);
-                $("#wxtfbs_p").html(res.chargeCountVo.wxtfbs);
                 if (res.chargeCountVo.wxtf != null) {
                     $("#wxtf").html(res.chargeCountVo.wxtf.toFixed(2));
                 }
                 $("#wxssbs").html(res.chargeCountVo.wxssbs);
-                $("#wxssbs_p").html(res.chargeCountVo.wxssbs);
                 if (res.chargeCountVo.wxss != null) {
                     $("#wxss").html(res.chargeCountVo.wxss.toFixed(2));
-                    $("#wxss_p").html(res.chargeCountVo.wxss.toFixed(2));
                 }
                 //记账绿色通道收款
                 $("#zfbs").html(res.chargeCountVo.zfbs);
-                $("#zfbs_p").html(res.chargeCountVo.zfbs);
                 if (res.chargeCountVo.zfsk != null) {
                     $("#zfsk").html(res.chargeCountVo.zfsk.toFixed(2));
-                    $("#zfsk_p").html(res.chargeCountVo.zfsk.toFixed(2));
                 }
                 $("#zftfbs").html(res.chargeCountVo.zftfbs);
-                $("#zftfbs_p").html(res.chargeCountVo.zftfbs);
                 if (res.chargeCountVo.zftf != null) {
                     $("#zftf").html(res.chargeCountVo.zftf.toFixed(2));
-                    $("#zftf_p").html(res.chargeCountVo.zftf.toFixed(2));
                 }
                 $("#zfssbs").html(res.chargeCountVo.zfssbs);
-                $("#zfssbs_p").html(res.chargeCountVo.zfssbs);
                 if (res.chargeCountVo.zfss != null) {
                     $("#zfss").html(res.chargeCountVo.zfss.toFixed(2));
-                    $("#zfss_p").html(res.chargeCountVo.zfss.toFixed(2));
                 }
                 //医保卡收款
                 $("#sybbs").html(res.chargeCountVo.sybbs);
-                $("#sybbs_p").html(res.chargeCountVo.sybbs);
                 if (res.chargeCountVo.sybksk != null) {
                     $("#sybksk").html(res.chargeCountVo.sybksk.toFixed(2));
-                    $("#sybksk_p").html(res.chargeCountVo.sybksk.toFixed(2));
                 }
                 $("#sybtfbs").html(res.chargeCountVo.sybtfbs);
-                $("#sybtfbs_p").html(res.chargeCountVo.sybtfbs);
                 if (res.chargeCountVo.sybtf != null) {
                     $("#sybtf").html(res.chargeCountVo.sybtf.toFixed(2));
-                    $("#sybtf_p").html(res.chargeCountVo.sybtf.toFixed(2));
                 }
                 $("#sybssbs").html(res.chargeCountVo.sybssbs);
-                $("#sybssbs_p").html(res.chargeCountVo.sybssbs);
                 if (res.chargeCountVo.sybkss != null) {
                     $("#sybkss").html(res.chargeCountVo.sybkss.toFixed(2));
-                    $("#sybkss_p").html(res.chargeCountVo.sybkss.toFixed(2));
                 }
                 //总计收款
                 $("#zjbs").html(res.chargeCountVo.zjbs);
-                $("#zjbs_p").html(res.chargeCountVo.zjbs);
                 if (res.chargeCountVo.zjsk != null) {
                     $("#zjsk").html(res.chargeCountVo.zjsk.toFixed(2));
-                    $("#zjsk_p").html(res.chargeCountVo.zjsk.toFixed(2));
                 }
                 $("#ztfbs").html(res.chargeCountVo.ztfbs);
-                $("#ztfbs_p").html(res.chargeCountVo.ztfbs);
                 if (res.chargeCountVo.zjtk != null) {
                     $("#zjtk").html(res.chargeCountVo.zjtk.toFixed(2));
-                    $("#zjtk_p").html(res.chargeCountVo.zjtk.toFixed(2));
                 }
                 $("#zjssbs").html(res.chargeCountVo.zjssbs);
-                $("#zjssbs_p").html(res.chargeCountVo.zjssbs);
                 if (res.chargeCountVo.zjss != null) {
                     $("#zjss").html(res.chargeCountVo.zjss.toFixed(2));
-                    $("#zjss_p").html(res.chargeCountVo.zjss.toFixed(2));
                 }
 
                 if (res.chargeCountVo.sjhj != null) {
                     $("#sjhj").html(res.chargeCountVo.sjhj.toFixed(2));
-                    $("#sjhj_p").html(res.chargeCountVo.sjhj.toFixed(2));
                 }
                 $("#sjhjdx").html(res.chargeCountVo.sjhjdx);
-                $("#sjhjdx_p").html(res.chargeCountVo.sjhjdx);
                 if (res.chargeCountVo.zfss != null) {
                     $("#zfsshj").html(res.chargeCountVo.zfss.toFixed(2));
-                    $("#zfsshj_p").html(res.chargeCountVo.zfss.toFixed(2));
                 }
                 $("#zfdx").html(res.chargeCountVo.zfdx);
-                $("#zfdx_p").html(res.chargeCountVo.zfdx);
                 if (res.chargeCountVo.zj != null) {
                     $("#zj").html(res.chargeCountVo.zj.toFixed(2));
-                    $("#zj_p").html(res.chargeCountVo.zj.toFixed(2));
                 }
                 $("#zjdx").html(res.chargeCountVo.zjdx);
-                $("#zjdx_p").html(res.chargeCountVo.zjdx);
 
                 $("#sfReceiptBills").html(null);
-                $("#sfReceiptBills_p_table").html(null);
                 if (res.sfReceiptBills != null && res.sfReceiptBills.length > 0) {
                     var html = '<div class="col-md-12 col-sm-12 col-xs-12">所用票号:</div>';
                     var html_p = '';
@@ -292,16 +219,11 @@ function getRjbb() {
                 $("#sffps").html(res.sffps);
                 $("#tpzs").html(res.tpzs);
                 $("#zffps").html(res.zffps);
-                $("#sffps_p").html(res.sffps);
-                $("#tpzs_p").html(res.tpzs);
-                $("#zffps_p").html(res.zffps);
                 if (res.sfzffpmx.length == 0) {
                     $(".sfzffpmx").removeClass("in").addClass("hide");
-                    $("#sfzffpmx_p_table").css("display", "none");
                     $("#sfzffpmx_table").css("display", "none");
                 } else if (res.sfzffpmx.length > 0) {
                     $(".sfzffpmx").removeClass("hide").addClass("in");
-                    $("#sfzffpmx_p_table").css("display", "block");
                     $("#sfzffpmx_table").css("display", "block");
                     var html = '';
                     for (var i = 0; i < res.sfzffpmx.length; i++) {
@@ -320,62 +242,43 @@ function getRjbb() {
                         }
                     }
                     $("#sfzffpmx").html(html);
-                    $("#sfzffpmx_p").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"));
-                $("#userIdCode_gh_p").html(res.user.userCode);
-                $("#username_gh_p").html(res.user.userName);
-                $("#dcountDate_gh_p").html(format(new Date(), "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 = '';
@@ -394,13 +297,10 @@ function getRjbb() {
                     $("#ghReceiptBills_p_table").html(html_p);
                 }
                 $("#username_zbr").html(res.user.userName);
-                $("#username_zbr_p").html(res.user.userName);
                 if (res.thzffpmx.length == 0) {
                     $("#thzffpmx_table").css("display", "none");
-                    $("#thzffpmx_table_p").css("display", "none");
                 } else if (res.thzffpmx.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;
@@ -418,7 +318,6 @@ function getRjbb() {
                         }
                     }
                     $("#thzffpmx").html(html);
-                    $("#thzffpmx_p").html(html);
                 }
             } else if (res.code == -1) {
                 new PNotify({
@@ -741,9 +640,7 @@ function dcountCharge() {
                 for (var i = 0; i < printNum; i++) {
 
                     $("#dcountDate").html(format(res.dcountDate, "yyyy-MM-dd HH:mm:ss"));
-                    $("#dcountDate_p").html(format(res.dcountDate, "yyyy-MM-dd HH:mm:ss"));
                     $("#dcountDate_gh").html(format(res.dcountDate, "yyyy-MM-dd HH:mm:ss"));
-                    $("#dcountDate_gh_p").html(format(res.dcountDate, "yyyy-MM-dd HH:mm:ss"));
                     setPrint();
                     LODOP = getLodop();
                     LODOP.PRINT_INITA(6, 0, "210mm", "297mm", "门诊收费收入日报表");
@@ -752,11 +649,12 @@ function dcountCharge() {
                     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);
-                    LODOP.NewPageA();
-                    LODOP.ADD_PRINT_HTM("0mm", "5mm", "200mm", "280mm", document.getElementById("printDiv_gh").innerHTML);
-                    LODOP.PRINT();
-                    //LODOP.PREVIEW();
+                    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();
                     //刷新数据
                     getRjbb();
                 }

+ 161 - 421
src/main/resources/templates/daily.html

@@ -55,8 +55,9 @@
             <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
+                <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>
@@ -123,20 +124,22 @@
                     </tr>
                     </tbody>
                 </table>
-                <table id="datatable" class="table table-striped table-bordered">
+
+                <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>
@@ -214,473 +217,210 @@
                         <td id="zjss">0.00</td>
                     </tr>
                     <tr>
-                        <td class="text-center" colspan="2">实收合计</td>
+                        <td class="text-center">实收合计</td>
                         <td id="sjhj">0.00</td>
-                        <td colspan="4" id="sjhjdx"></td>
+                        <td colspan="5" id="sjhjdx">零元整</td>
                     </tr>
                     <tr>
-                        <td class="text-center" colspan="2">绿色通道记账小计</td>
+                        <td class="text-center">绿色通道记账小计</td>
                         <td id="zfsshj">0.00</td>
-                        <td colspan="4" id="zfdx"></td>
+                        <td colspan="5" id="zfdx"></td>
                     </tr>
                     <tr>
-                        <td class="text-center" colspan="2">医保卡记账小计</td>
+                        <td class="text-center">医保卡记账小计</td>
                         <td id="ybkjzhj">0.00</td>
-                        <td colspan="4" id="ybkjzhjdx">零元整</td>
+                        <td colspan="5" id="ybkjzhjdx">零元整</td>
                     </tr>
                     <tr>
-                        <td class="text-center" colspan="2">总计</td>
+                        <td class="text-center">总计</td>
                         <td id="zj">0.00</td>
-                        <td colspan="4" id="zjdx"></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">
-                    <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">
+                <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 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>
+                        <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 id="qmhs">全免号数:0</td>
-                        <td id="jzhs">记账号数:0</td>
-                        <td id="jzje">记账金额: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 id="zcsr">诊察收入:0.00</td>
-                        <td id="jcsr">检查收入:0.00</td>
-                        <td id="ghsr">挂号费(门诊):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 id="thje">0.00</td>
-                        <td colspan="3" id="ghtpzs">退票数: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>合计(小写)</td>
-                        <td colspan="2" id="ghhj">0.00</td>
-                        <td colspan="2" id="ghjebhjz">合计(不含记账) 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 colspan="2" id="ghhjdx"></td>
-                        <td colspan="2" id="ghjebhjzdx">合计(不含记账)</td>
+                        <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" 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 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="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%;margin-top: 20px;border-width: 1px;border-style: solid;border-collapse: collapse;">
-                        <tbody>
-                        <tr>
-                            <td>挂号费</td>
-                            <td id="charge1_p">0.00</td>
-                            <td>其他</td>
-                            <td id="charge9_p">0.00</td>
-                            <td>消毒费</td>
-                            <td id="charge16_p">0.00</td>
-                        </tr>
-                        <tr>
-                            <td>床位费</td>
-                            <td id="charge2_p">0.00</td>
-                            <td>西药费</td>
-                            <td id="charge10_p">0.00</td>
-                            <td>材料费</td>
-                            <td id="charge18_p">0.00</td>
-                        </tr>
-                        <tr>
-                            <td>诊查费</td>
-                            <td id="charge3_p">0.00</td>
-                            <td>中成药费</td>
-                            <td id="charge11_p">0.00</td>
-                            <td>麻醉费</td>
-                            <td id="charge19_p">0.00</td>
-                        </tr>
-                        <tr>
-                            <td>检查费</td>
-                            <td id="charge4_p">0.00</td>
-                            <td>中草药费</td>
-                            <td id="charge12_p">0.00</td>
-                            <td>四舍五入</td>
-                            <td id="charge20_p">0.00</td>
-                        </tr>
-                        <tr>
-                            <td>治疗费</td>
-                            <td id="charge5_p">0.00</td>
-                            <td>特殊材料费</td>
-                            <td id="charge13_p">0.00</td>
-                            <td>护理费</td>
-                            <td id="charge6_p">0.00</td>
-                        </tr>
-                        <tr>
-                            <td>输血费</td>
-                            <td id="charge14_p">0.00</td>
-                            <td>手术费</td>
-                            <td id="charge7_p">0.00</td>
-                            <td>鉴定费</td>
-                            <td id="charge15_p">0.00</td>
-                        </tr>
-                        <tr>
-                            <td>化验费</td>
-                            <td id="charge8_p">0.00</td>
-                            <td>手术器械使用费</td>
-                            <td id="charge17_p">0.00</td>
-                            <td></td>
-                            <td></td>
-                        </tr>
-                        <tr>
-                            <td>合计:</td>
-                            <td id="totalCharge_p">0.00</td>
-                            <td id="totalChargeStr_p" 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;">
+                    <table>
                         <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_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>
-                        </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>
-                        </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>
-                        </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>
-                        </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>
-                        </tr>
-                        <tr>
-                            <td class="text-center">医保卡</td>
-                            <td id="ybkjzbs_p">0</td>
-                            <td id="ybkjzsk_p">0.00</td>
-                            <td id="ybkjztfbs_p">0</td>
-                            <td id="ybkjztf_p">0.00</td>
-                            <td id="ybkjzssbs_p">0</td>
-                            <td id="ybkjzss_p">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>
-                        </tr>
+                            <td colspan="4">所用票号:</td>
                         <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 width="25%"></td>
+                            <td width="25%"></td>
+                            <td width="25%"></td>
+                            <td width="25%"></td>
                         </tr>
-                        <tr>
-                            <td class="text-center" colspan="2">实收合计</td>
-                            <td id="sjhj_p">0.00</td>
-                            <td colspan="4" id="sjhjdx_p"></td>
-                        </tr>
-                        <tr>
-                            <td class="text-center" colspan="2">绿色通道记账小计</td>
-                            <td id="zfsshj_p">0.00</td>
-                            <td colspan="4" id="zfdx_p"></td>
-                        </tr>
-                        <tr>
-                            <td class="text-center" colspan="2">医保卡记账小计</td>
-                            <td id="ybkjzhj_p">0.00</td>
-                            <td colspan="4" id="ybkjzhjdx_p">零元整</td>
-                        </tr>
-                        <tr>
-                            <td class="text-center" colspan="2">总计</td>
-                            <td id="zj_p">0.00</td>
-                            <td colspan="4" id="zjdx_p"></td>
                         </tr>
+                        </thead>
+                        <tbody id="sfReceiptBills_p_table">
                         </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;border-collapse: collapse;">
-                        <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>
+                </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 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>发票张数:</td>
+                                <td id="sffps_p">0</td>
+                                <td>退票张数:</td>
+                                <td id="tpzs_p">0</td>
+                                <td>作废张数:</td>
+                                <td id="zffps_p">0</td>
                             </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">
-                        <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_p">0.00</td>
-                            <td colspan="3" id="ghfps_p">所用票数:0</td>
-                        </tr>
-                        <tr>
-                            <td id="qmhs_p">全免号数:0</td>
-                            <td id="jzhs_p">记账号数:0</td>
-                            <td id="jzje_p">记账金额:0</td>
-                        </tr>
+                    <table style="width: 96%;padding-left: 20px;display: none;border-top:1px solid"
+                           id="sfzffpmx_p_table">
+                        <thead>
                         <tr>
-                            <td id="zcsr_p">诊察收入:0.00</td>
-                            <td id="jcsr_p">检查收入:0.00</td>
-                            <td id="ghsr_p">挂号费(门诊):0.00</td>
+                            <td colspan="9">作废/退费明细表:</td>
                         </tr>
                         <tr>
-                            <td>退号</td>
-                            <td id="thje_p">0.00</td>
-                            <td colspan="3" id="ghtpzs_p">退票数:0</td>
-                        </tr>
                         <tr>
-                            <td>合计(小写)</td>
-                            <td colspan="2" id="ghhj_p">0.00</td>
-                            <td colspan="2" id="ghjebhjz_p">合计(不含记账) 0.00</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 width="114.8px">发票号</td>
+                            <td width="100px">姓名</td>
+                            <td width="72.2px">金额</td>
                         </tr>
-                        <tr>
-                            <td>合计(大写)</td>
-                            <td colspan="2" id="ghhjdx_p"></td>
-                            <td colspan="2" id="ghjebhjzdx_p">合计(不含记账)</td>
                         </tr>
+                        </thead>
+                        <tbody id="sfzffpmx_p">
+
                         </tbody>
                     </table>
-                    <div class="form-group col-md-12 col-sm-12 col-xs-12" style="margin-bottom: 50px;border-width: 1px;border-style: solid;border-collapse: collapse;">
-                        <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>
-                        <table style="width: 96%;padding-left: 20px;display: none;border-top:1px solid"
-                               id="thzffpmx_table_p">
-                            <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_p">
+                </div>
 
-                            </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>
+                <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>
             <table id="tb_table"></table>
             <div id="previewImage">