|
@@ -3,7 +3,7 @@ var LODOP; //声明为全局变量
|
|
|
//默认打印机下标
|
|
|
var printIndex = -1;
|
|
|
//选中的要退的费用收费编码
|
|
|
-var chargeItemCodes =null;
|
|
|
+var chargeItemCodes = null;
|
|
|
$(function () {
|
|
|
//默认光标在卡号输入框
|
|
|
$("#cardNo").focus();
|
|
@@ -169,7 +169,7 @@ function initDeptSelect() {
|
|
|
}
|
|
|
var html = '';
|
|
|
$.each(data.data, function (commentIndex, comment) {
|
|
|
- html += '<option value="' + comment.code + '">' + comment.name + '('+comment.pyCode+')</option>';
|
|
|
+ html += '<option value="' + comment.code + '">' + comment.name + '(' + comment.pyCode + ')</option>';
|
|
|
});
|
|
|
$('#deptNoParam').empty();
|
|
|
$('#deptNoParam').html(html);
|
|
@@ -206,6 +206,7 @@ function initDoctorSelect() {
|
|
|
}
|
|
|
|
|
|
var $table_1;
|
|
|
+
|
|
|
/**
|
|
|
* 初始化收费表格
|
|
|
*/
|
|
@@ -213,17 +214,21 @@ function initFeeTable() {
|
|
|
var payMarkGroup = getIndex("pay_mark_group");
|
|
|
var timeColumusName = "处方时间";
|
|
|
var timeColumus = "priceTime";
|
|
|
- if(payMarkGroup==1){
|
|
|
+ $("#refundFeeTip").removeClass("in").addClass("hide");
|
|
|
+ $("#chargeFeeTip").removeClass("hide").addClass("in");
|
|
|
+ if (payMarkGroup == 1) {
|
|
|
timeColumusName = "缴费时间";
|
|
|
timeColumus = "chargeDate";
|
|
|
- }else if(payMarkGroup==2){
|
|
|
+ $("#refundFeeTip").removeClass("hide").addClass("in");
|
|
|
+ $("#chargeFeeTip").removeClass("in").addClass("hide");
|
|
|
+ } else if (payMarkGroup == 2) {
|
|
|
timeColumusName = "退费时间";
|
|
|
timeColumus = "inputDate";
|
|
|
}
|
|
|
|
|
|
|
|
|
- var patientId=$("#patientId").val();
|
|
|
- if(payMarkGroup==0 && patientId!=null && patientId!=''){
|
|
|
+ var patientId = $("#patientId").val();
|
|
|
+ if (payMarkGroup == 0 && patientId != null && patientId != '') {
|
|
|
$("#patientIdHaveTally").val(patientId);
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
@@ -257,7 +262,7 @@ function initFeeTable() {
|
|
|
}
|
|
|
|
|
|
$('#tb_table').bootstrapTable("destroy");
|
|
|
- $table_1= $('#tb_table').bootstrapTable({
|
|
|
+ $table_1 = $('#tb_table').bootstrapTable({
|
|
|
url: '/thmz/listMzChargeDetail', //请求后台的URL(*)
|
|
|
method: 'post', //请求方式(*)
|
|
|
toolbar: '#toolbar', //工具按钮用哪个容器
|
|
@@ -269,8 +274,8 @@ function initFeeTable() {
|
|
|
queryParams: queryParams, //传递参数(*)
|
|
|
sidePagination: "server", //分页方式:client客户端分页,server服务端分页(*)
|
|
|
pageNumber: 1, //初始化加载第一页,默认第一页
|
|
|
- pageSize: 10, //每页的记录行数(*)
|
|
|
- pageList: [10, 25, 50, 100], //可供选择的每页的行数(*)
|
|
|
+ pageSize: 5, //每页的记录行数(*)
|
|
|
+ pageList: [5, 10, 25, 50, 100], //可供选择的每页的行数(*)
|
|
|
search: false, //是否显示表格搜索,此搜索是客户端搜索,不会进服务端,所以,个人感觉意义不大
|
|
|
strictSearch: true,
|
|
|
showColumns: false, //是否显示所有的列
|
|
@@ -352,7 +357,7 @@ function initFeeTable() {
|
|
|
}
|
|
|
return format(value, "yyyy-MM-dd HH:mm:ss");
|
|
|
}
|
|
|
- },{
|
|
|
+ }, {
|
|
|
title: '操作',
|
|
|
align: "center",
|
|
|
valign: 'middle',
|
|
@@ -362,15 +367,15 @@ function initFeeTable() {
|
|
|
str += '<button type="button" class="registration-no-color-foot-button" title="诊断查询" onclick="diagnoseQuery(\'' + row.patientId + '\',' + row.times + ')"><i class="fa fa-search-minus"></i></button>';
|
|
|
var payMarkGroup = getIndex("pay_mark_group");
|
|
|
if (payMarkGroup == 0) {
|
|
|
- str += '<button type="button" class="registration-no-color-foot-button"title="确认收费" onclick="tipHaveTally(' + row.amount + ',\'' + row.patientId + '\',' + row.times + ',\'' + row.name + '\','+row.receiptNo+')"><i class="fa fa-rmb"></i></button>';
|
|
|
+ str += '<button type="button" class="registration-no-color-foot-button"title="确认收费" onclick="tipHaveTally(' + row.amount + ',\'' + row.patientId + '\',' + row.times + ',\'' + row.name + '\',' + row.receiptNo + ')"><i class="fa fa-rmb"></i></button>';
|
|
|
}
|
|
|
if (payMarkGroup == 1) {
|
|
|
- str += '<button type="button" class="registration-no-color-foot-button" title="退费" onclick="refundFee(\'' + row.patientId + '\',' + row.times + ','+row.printFlag+');"><i class="fa fa-reply"></i></button>';
|
|
|
+ str += '<button type="button" class="registration-no-color-foot-button" title="退费" onclick="refundFee(\'' + row.patientId + '\',' + row.times + ',' + row.printFlag + ');"><i class="fa fa-reply"></i></button>';
|
|
|
if (row.printFlag == 0) {
|
|
|
str += '<button type="button" class="registration-no-color-foot-button" title="发票打印" onclick="prn1Print(\'' + row.patientId + '\',' + row.times + ');" style="color: #35D082;"><i class="fa fa-print"></i></button>';
|
|
|
- }else if (row.printFlag == 1) {
|
|
|
+ } else if (row.printFlag == 1) {
|
|
|
str += '<button type="button" class="registration-no-color-foot-button" title="发票重打" onclick="repPrint(\'' + row.patientId + '\',' + row.times + ');" style="color: #F4BD00;"><i class="fa fa-print"></i></button>';
|
|
|
- str += '<button type="button" class="registration-no-color-foot-button" title="发票作废重打" onclick="obsoleteAndRepPrint(\'' + row.patientId + '\',' + row.times + ','+row.receiptNo+');" style="color: #E73E48;"><i class="fa fa-print"></i></button>';
|
|
|
+ str += '<button type="button" class="registration-no-color-foot-button" title="发票作废重打" onclick="obsoleteAndRepPrint(\'' + row.patientId + '\',' + row.times + ',' + row.receiptNo + ');" style="color: #E73E48;"><i class="fa fa-print"></i></button>';
|
|
|
}
|
|
|
}
|
|
|
return str;
|
|
@@ -384,7 +389,7 @@ function initFeeTable() {
|
|
|
}
|
|
|
var ress = eval(res);
|
|
|
if (ress.code == -1) {
|
|
|
- if(ress.message!=null && ress.message!=''){
|
|
|
+ if (ress.message != null && ress.message != '') {
|
|
|
new PNotify({
|
|
|
title: '错误提示',
|
|
|
text: ress.message,
|
|
@@ -413,16 +418,16 @@ function initFeeTable() {
|
|
|
* @param {点击列的整行数据} row
|
|
|
* @param {td 元素} $element
|
|
|
*/
|
|
|
- onClickCell: function(field, value, row, $element) {
|
|
|
+ onClickCell: function (field, value, row, $element) {
|
|
|
var cardNo = $("#cardNo").val();
|
|
|
- if(cardNo == '120' && field == 'name' && (payMarkGroup==0 || payMarkGroup==1)){
|
|
|
+ if (cardNo == '120' && field == 'name' && (payMarkGroup == 0 || payMarkGroup == 1)) {
|
|
|
$element.attr('contenteditable', true);
|
|
|
$element.html(null);
|
|
|
$element.focus();
|
|
|
- $element.blur(function() {
|
|
|
+ $element.blur(function () {
|
|
|
var index = $element.parent().data('index');
|
|
|
var tdValue = $element.html();
|
|
|
- saveData(index, field, tdValue,row,$table_1);
|
|
|
+ saveData(index, field, tdValue, row, $table_1);
|
|
|
})
|
|
|
}
|
|
|
},
|
|
@@ -436,13 +441,13 @@ function initFeeTable() {
|
|
|
* @param value
|
|
|
* @param row
|
|
|
*/
|
|
|
-function saveData(index, field, value,row,table) {
|
|
|
+function saveData(index, field, value, row, table) {
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: '/thmz/changePatientIdName',
|
|
|
contentType: "application/json;charset=UTF-8",
|
|
|
dataType: "json",
|
|
|
- data: JSON.stringify({"patientId": row.patientId,"times":row.times,"name":value}),
|
|
|
+ data: JSON.stringify({"patientId": row.patientId, "times": row.times, "name": value}),
|
|
|
headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
async: false,
|
|
|
success: function (res) {
|
|
@@ -501,28 +506,29 @@ function queryParams(params) {
|
|
|
};
|
|
|
|
|
|
function initChargeDetailTable() {
|
|
|
- initChargeDetailTablePublic('/thmz/getMzChargeDetailByBillItem',$('#charge_detail_table'),queryParamsForDetail);
|
|
|
+ initChargeDetailTablePublic('/thmz/getMzChargeDetailByBillItem', $('#charge_detail_table'), queryParamsForDetail);
|
|
|
}
|
|
|
|
|
|
function initMzChargeDetailByBillItem(flag) {
|
|
|
- if(flag){
|
|
|
+ if (flag) {
|
|
|
$("#refund_bill_item_group").removeClass("hide").addClass("in");
|
|
|
- if($("#plusOrMinus").hasClass("fa-plus")){
|
|
|
+ if ($("#plusOrMinus").hasClass("fa-plus")) {
|
|
|
$("#plusOrMinus").removeClass("fa-plus").addClass("fa-minus");
|
|
|
- initChargeDetailTablePublic('/thmz/getNewListForRefundFeeByBillItem',$('#refund_fee_bill_table'),queryParamsForRefundByBillItem);
|
|
|
- }else if($("#plusOrMinus").hasClass("fa-minus")){
|
|
|
+ initChargeDetailTablePublic('/thmz/getNewListForRefundFeeByBillItem', $('#refund_fee_bill_table'), queryParamsForRefundByBillItem);
|
|
|
+ } else if ($("#plusOrMinus").hasClass("fa-minus")) {
|
|
|
$("#plusOrMinus").removeClass("fa-minus").addClass("fa-plus");
|
|
|
$("#refund_bill_item_group").removeClass("in").addClass("hide");
|
|
|
$('#refund_fee_bill_table').bootstrapTable("destroy");
|
|
|
}
|
|
|
- }else {
|
|
|
- initChargeDetailTablePublic('/thmz/getNewListForRefundFeeByBillItem',$('#refund_fee_bill_table'),queryParamsForRefundByBillItem);
|
|
|
+ } else {
|
|
|
+ initChargeDetailTablePublic('/thmz/getNewListForRefundFeeByBillItem', $('#refund_fee_bill_table'), queryParamsForRefundByBillItem);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 初始化收费明细表格
|
|
|
*/
|
|
|
-function initChargeDetailTablePublic(url,obj,params) {
|
|
|
+function initChargeDetailTablePublic(url, obj, params) {
|
|
|
$(obj).bootstrapTable("destroy");
|
|
|
$(obj).bootstrapTable({
|
|
|
url: url, //请求后台的URL(*)
|
|
@@ -699,11 +705,11 @@ function cardNoChange() {
|
|
|
*/
|
|
|
function queryUserInfoByCardNo() {
|
|
|
var cardNo = $("#cardNo").val();
|
|
|
- var index =cardNo.indexOf("-");
|
|
|
- if(index > 0 && index==cardNo.length-2){
|
|
|
+ var index = cardNo.indexOf("-");
|
|
|
+ if (index > 0 && index == cardNo.length - 2) {
|
|
|
$("#patientId").val(cardNo);
|
|
|
initFeeTable();
|
|
|
- } else if (cardNo =='120' || cardNo.length == 8) {
|
|
|
+ } else if (cardNo == '120' || cardNo.length == 8) {
|
|
|
$("#cardNo").attr("title", cardNo);
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
@@ -732,7 +738,7 @@ function queryUserInfoByCardNo() {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- }else if(cardNo==null || cardNo== ""){
|
|
|
+ } else if (cardNo == null || cardNo == "") {
|
|
|
cleanParams();
|
|
|
}
|
|
|
}
|
|
@@ -770,12 +776,12 @@ function getRePortRangeArr() {
|
|
|
/**
|
|
|
* 打开收费窗口
|
|
|
*/
|
|
|
-function confirmFeeModal(times,totalCharge,receiptNo) {
|
|
|
+function confirmFeeModal(times, totalCharge, receiptNo) {
|
|
|
$('#payType').selectpicker('val', 1);
|
|
|
$('#payType').selectpicker('refresh');
|
|
|
var data = parseFloat($("#dataIdHaveTally").val());
|
|
|
- if(totalCharge!=null && totalCharge>0){
|
|
|
- data =totalCharge;
|
|
|
+ if (totalCharge != null && totalCharge > 0) {
|
|
|
+ data = totalCharge;
|
|
|
$("#timesHaveTally").val(times);
|
|
|
$("#receiptNoHaveTally").val(receiptNo);
|
|
|
}
|
|
@@ -791,7 +797,11 @@ function confirmFeeModal(times,totalCharge,receiptNo) {
|
|
|
$("#confirmFeeModal").modal();
|
|
|
$("#amountMoneyConfirm").text(data);
|
|
|
$("#realMoney").val(data);
|
|
|
- $("#cash").val(data);
|
|
|
+ $("#cash").val(null);
|
|
|
+ setTimeout(function () {
|
|
|
+ //默认光标在卡号输入框
|
|
|
+ $("#cash").focus();
|
|
|
+ }, 800);
|
|
|
$("#payType").selectpicker('val', 1);
|
|
|
$("#payType").selectpicker('refresh');
|
|
|
$("#changeAmount").val(0.0);
|
|
@@ -821,7 +831,7 @@ function diagnoseQuery(patientId, times) {
|
|
|
url: '/thmz/getVisitTableByPatientIdAndTimes',
|
|
|
contentType: "application/json;charset=UTF-8",
|
|
|
dataType: "json",
|
|
|
- data: JSON.stringify({"patientId": patientId,"times":times}),
|
|
|
+ data: JSON.stringify({"patientId": patientId, "times": times}),
|
|
|
headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
async: false,
|
|
|
success: function (res) {
|
|
@@ -830,10 +840,10 @@ function diagnoseQuery(patientId, times) {
|
|
|
return;
|
|
|
}
|
|
|
if (res.code == 0) {
|
|
|
- if(res.data.icdText!=null || res.data.icdText!=''){
|
|
|
+ if (res.data.icdText != null || res.data.icdText != '') {
|
|
|
$("#diagnoseModal").modal();
|
|
|
$("#diagnose").html(res.data.icdText);
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
new PNotify({
|
|
|
title: '操作提示',
|
|
|
text: '当前病人诊断未知',
|
|
@@ -849,7 +859,6 @@ function diagnoseQuery(patientId, times) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
// /**
|
|
|
// * 打开退费重收明细窗口
|
|
|
// * @param data
|
|
@@ -914,7 +923,7 @@ function checkFee(flag) {
|
|
|
for (var i = 0; i < arr.length; i++) {
|
|
|
var temp = parseFloat($(arr[i]).find("input").val());
|
|
|
if (isNaN(temp)) {
|
|
|
- temp=0;
|
|
|
+ temp = 0;
|
|
|
}
|
|
|
if ($(arr[i]).find("select").val() != 1) {
|
|
|
notCashAmount += temp;
|
|
@@ -968,11 +977,17 @@ function checkFee(flag) {
|
|
|
$("#surplusAmount").val(surplusAmount.toFixed(2));
|
|
|
return;
|
|
|
}
|
|
|
+ var changeAmount = 0.00;
|
|
|
if (totalAmount >= realMoney) {
|
|
|
- var changeAmount = totalAmount - realMoney;
|
|
|
- $("#changeAmount").val(changeAmount.toFixed(2));
|
|
|
+ changeAmount = totalAmount - realMoney;
|
|
|
+ changeAmount = changeAmount.toFixed(2);
|
|
|
+ $("#changeAmount").val(changeAmount);
|
|
|
$("#addPayType").parent().removeClass("in").addClass("hide");
|
|
|
}
|
|
|
+ //设置收费首页找零与应收和实收金额
|
|
|
+ $("#payableAmount").text(realMoney);
|
|
|
+ $("#paidAmount").text(totalAmount);
|
|
|
+ $("#changedAmount").text(changeAmount);
|
|
|
}
|
|
|
//计算和设置折扣比例
|
|
|
var amountMoneyConfirm = parseFloat($("#amountMoneyConfirm").text());
|
|
@@ -988,7 +1003,7 @@ function checkFee(flag) {
|
|
|
/**
|
|
|
* 提示有记账记录
|
|
|
*/
|
|
|
-function tipHaveTally(data, patientId, times, name,receiptNo) {
|
|
|
+function tipHaveTally(data, patientId, times, name, receiptNo) {
|
|
|
if (patientId == null || patientId == "") {
|
|
|
return;
|
|
|
}
|
|
@@ -1027,23 +1042,24 @@ function tipHaveTally(data, patientId, times, name,receiptNo) {
|
|
|
// }
|
|
|
// }
|
|
|
// });
|
|
|
- confirmFeeModal(null,null,null);
|
|
|
+ confirmFeeModal(null, null, null);
|
|
|
}
|
|
|
|
|
|
var $tally_detail_table;
|
|
|
+
|
|
|
/**
|
|
|
* 初始化本院记账明细表格
|
|
|
*/
|
|
|
function initTallyDetailTable() {
|
|
|
$("#haveTallyModal").modal('hide');
|
|
|
var patientId = $("#patientIdHaveTally").val();
|
|
|
- // var name = $("#nameHaveTally").val();
|
|
|
+ // var name = $("#nameHaveTally").val();
|
|
|
if (patientId == null || patientId == '') {
|
|
|
return;
|
|
|
}
|
|
|
$("#tallyDetailModal").modal();
|
|
|
$('#tally_detail_table').bootstrapTable("destroy");
|
|
|
- $tally_detail_table=$('#tally_detail_table').bootstrapTable({
|
|
|
+ $tally_detail_table = $('#tally_detail_table').bootstrapTable({
|
|
|
url: '/thmz/getTallyReceiptSerial?patientId=' + patientId, //请求后台的URL(*)
|
|
|
method: 'get', //请求方式(*)
|
|
|
toolbar: '#toolbar', //工具按钮用哪个容器
|
|
@@ -1112,21 +1128,21 @@ function initTallyDetailTable() {
|
|
|
* @param {点击列的整行数据} row
|
|
|
* @param {td 元素} $element
|
|
|
*/
|
|
|
- onClickCell: function(field, value, row, $element) {
|
|
|
+ onClickCell: function (field, value, row, $element) {
|
|
|
var cardNo = $("#cardNo").val();
|
|
|
- if(cardNo == '120' && field == 'name'){
|
|
|
+ if (cardNo == '120' && field == 'name') {
|
|
|
$element.attr('contenteditable', true);
|
|
|
$element.html(null);
|
|
|
$element.focus();
|
|
|
- $element.blur(function() {
|
|
|
+ $element.blur(function () {
|
|
|
var index = $element.parent().data('index');
|
|
|
var tdValue = $element.html();
|
|
|
- saveData(index, field, tdValue,row,$tally_detail_table);
|
|
|
+ saveData(index, field, tdValue, row, $tally_detail_table);
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
onDblClickRow: function (row) {
|
|
|
- confirmFeeModal(row.times,row.totalCharge,row.receiptNo);
|
|
|
+ confirmFeeModal(row.times, row.totalCharge, row.receiptNo);
|
|
|
},
|
|
|
responseHandler: function (res) {
|
|
|
if (res == '401' || res == 401) {
|
|
@@ -1178,9 +1194,9 @@ function saveConfirmFee() {
|
|
|
var temp = parseFloat($(arr[i]).find("input").val());
|
|
|
var tempJson = JSON.parse('{"chequeType":"","amount":""}');
|
|
|
tempJson.chequeType = $(arr[i]).find("select").val();
|
|
|
- if(tempJson.chequeType=="1"){
|
|
|
- temp=temp-$("#changeAmount").val();
|
|
|
- temp=temp.toFixed(2);
|
|
|
+ if (tempJson.chequeType == "1") {
|
|
|
+ temp = temp - $("#changeAmount").val();
|
|
|
+ temp = temp.toFixed(2);
|
|
|
}
|
|
|
tempJson.amount = temp;
|
|
|
jsonData.mzDepositFiles[i] = tempJson;
|
|
@@ -1234,8 +1250,8 @@ function saveConfirmFee() {
|
|
|
* @param times
|
|
|
*/
|
|
|
function prn1Print(patientId, times) {
|
|
|
- var url='/thmz/getAllSerialForThisTime?patientId=' + patientId + "×=" + times;
|
|
|
- printCommon(url,patientId, times);
|
|
|
+ var url = '/thmz/getAllSerialForThisTime?patientId=' + patientId + "×=" + times;
|
|
|
+ printCommon(url, patientId, times);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -1246,7 +1262,7 @@ function prn1Print(patientId, times) {
|
|
|
function repPrint(patientId, times) {
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
- url: '/thmz/getReceiptForThisTime?patientId=' + patientId + "×="+times,
|
|
|
+ url: '/thmz/getReceiptForThisTime?patientId=' + patientId + "×=" + times,
|
|
|
contentType: "application/json;charset=UTF-8",
|
|
|
dataType: "json",
|
|
|
headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
@@ -1256,20 +1272,20 @@ function repPrint(patientId, times) {
|
|
|
return;
|
|
|
}
|
|
|
if (res.code == 0) {
|
|
|
- if(res.data.length==1){
|
|
|
- var message= "确定要重新打印发票号码为【"+res.data[0].receiptBill+"】的发票吗?请确认发票打印机即将要打印的发票编号";
|
|
|
- var url='/thmz/repPrintForThisTime?patientId=' + patientId + "×=" + times + "&obsolete=0" + "&receiptBill="+res.data[0].receiptBill;
|
|
|
- confirmMessage(patientId,times,message,url);
|
|
|
- }else {
|
|
|
+ if (res.data.length == 1) {
|
|
|
+ var message = "确定要重新打印发票号码为【" + res.data[0].receiptBill + "】的发票吗?请确认发票打印机即将要打印的发票编号";
|
|
|
+ var url = '/thmz/repPrintForThisTime?patientId=' + patientId + "×=" + times + "&obsolete=0" + "&receiptBill=" + res.data[0].receiptBill;
|
|
|
+ confirmMessage(patientId, times, message, url);
|
|
|
+ } else {
|
|
|
$("#tip_message").text("请选择需要重新打印的发票号");
|
|
|
$("#repPrintModal").modal();
|
|
|
$("#repPrintTable").html(null);
|
|
|
- for (var i=0;i<res.data.length;i++){
|
|
|
- $("<tr><td>"+res.data[i].receiptBill+"</td></tr>").appendTo("#repPrintTable").bind('click',function () {
|
|
|
+ for (var i = 0; i < res.data.length; i++) {
|
|
|
+ $("<tr><td>" + res.data[i].receiptBill + "</td></tr>").appendTo("#repPrintTable").bind('click', function () {
|
|
|
$("#repPrintModal").modal("hide");
|
|
|
- var message= "确定要重新打印发票号码为【"+$(this).text()+"】的发票吗?请确认发票打印机即将要打印的发票编号";
|
|
|
- var url='/thmz/repPrintForThisTime?patientId=' + patientId + "×=" + times + "&obsolete=0" + "&receiptBill="+$(this).text();
|
|
|
- confirmMessage(patientId,times,message,url);
|
|
|
+ var message = "确定要重新打印发票号码为【" + $(this).text() + "】的发票吗?请确认发票打印机即将要打印的发票编号";
|
|
|
+ var url = '/thmz/repPrintForThisTime?patientId=' + patientId + "×=" + times + "&obsolete=0" + "&receiptBill=" + $(this).text();
|
|
|
+ confirmMessage(patientId, times, message, url);
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -1285,12 +1301,12 @@ function repPrint(patientId, times) {
|
|
|
* @param times
|
|
|
* @param name
|
|
|
*/
|
|
|
-function confirmMessage(patientId,times,message,url) {
|
|
|
- if(!confirm(message)){
|
|
|
+function confirmMessage(patientId, times, message, url) {
|
|
|
+ if (!confirm(message)) {
|
|
|
return;
|
|
|
}
|
|
|
//var url='/thmz/repPrintForThisTime?patientId=' + patientId + "×=" + times + "&obsolete=0" + "&receiptBill="+receiptBill;
|
|
|
- printCommon(url,patientId, times);
|
|
|
+ printCommon(url, patientId, times);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1299,10 +1315,10 @@ function confirmMessage(patientId,times,message,url) {
|
|
|
* @param patientId
|
|
|
* @param times
|
|
|
*/
|
|
|
-function obsoleteAndRepPrint(patientId, times,receiptNo) {
|
|
|
+function obsoleteAndRepPrint(patientId, times, receiptNo) {
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
- url: '/thmz/getReceiptForThisTime?patientId=' + patientId + "×="+times + "&receiptNo="+receiptNo,
|
|
|
+ url: '/thmz/getReceiptForThisTime?patientId=' + patientId + "×=" + times + "&receiptNo=" + receiptNo,
|
|
|
contentType: "application/json;charset=UTF-8",
|
|
|
dataType: "json",
|
|
|
headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
@@ -1312,20 +1328,20 @@ function obsoleteAndRepPrint(patientId, times,receiptNo) {
|
|
|
return;
|
|
|
}
|
|
|
if (res.code == 0) {
|
|
|
- if(res.data.length==1){
|
|
|
- var message= "确定要作废发票号码为【"+res.data[0].receiptBill+"】的发票吗?请确认需要作废发票编号";
|
|
|
- var url='/thmz/repPrintForThisTime?patientId=' + patientId + "×=" + times + "&obsolete=1" + "&receiptBill="+res.data[0].receiptBill;
|
|
|
- confirmMessage(patientId,times,message,url);
|
|
|
- }else {
|
|
|
+ if (res.data.length == 1) {
|
|
|
+ var message = "确定要作废发票号码为【" + res.data[0].receiptBill + "】的发票吗?请确认需要作废发票编号";
|
|
|
+ var url = '/thmz/repPrintForThisTime?patientId=' + patientId + "×=" + times + "&obsolete=1" + "&receiptBill=" + res.data[0].receiptBill;
|
|
|
+ confirmMessage(patientId, times, message, url);
|
|
|
+ } else {
|
|
|
$("#tip_message").text("请选择需要作废的发票号");
|
|
|
$("#repPrintModal").modal();
|
|
|
$("#repPrintTable").html(null);
|
|
|
- for (var i=0;i<res.data.length;i++){
|
|
|
- $("<tr><td>"+res.data[i].receiptBill+"</td></tr>").appendTo("#repPrintTable").bind('click',function () {
|
|
|
+ for (var i = 0; i < res.data.length; i++) {
|
|
|
+ $("<tr><td>" + res.data[i].receiptBill + "</td></tr>").appendTo("#repPrintTable").bind('click', function () {
|
|
|
$("#repPrintModal").modal("hide");
|
|
|
- var message= "确定要作废发票号码为【"+$(this).text()+"】的发票吗?请确认需要作废发票编号";
|
|
|
- var url='/thmz/repPrintForThisTime?patientId=' + patientId + "×=" + times + "&obsolete=1" + "&receiptBill="+$(this).text();
|
|
|
- confirmMessage(patientId,times,message,url);
|
|
|
+ var message = "确定要作废发票号码为【" + $(this).text() + "】的发票吗?请确认需要作废发票编号";
|
|
|
+ var url = '/thmz/repPrintForThisTime?patientId=' + patientId + "×=" + times + "&obsolete=1" + "&receiptBill=" + $(this).text();
|
|
|
+ confirmMessage(patientId, times, message, url);
|
|
|
});
|
|
|
}
|
|
|
}
|
|
@@ -1336,17 +1352,16 @@ function obsoleteAndRepPrint(patientId, times,receiptNo) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 打印发票通用方法
|
|
|
* @param patientId
|
|
|
* @param times
|
|
|
*/
|
|
|
-function printCommon(url,patientId, times) {
|
|
|
+function printCommon(url, patientId, times) {
|
|
|
setPrint();
|
|
|
- var height ="93.0mm";
|
|
|
- if(countReceiot%2==0){
|
|
|
- height ="93.1mm";
|
|
|
+ var height = "93.0mm";
|
|
|
+ if (countReceiot % 2 == 0) {
|
|
|
+ height = "93.1mm";
|
|
|
}
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
@@ -1441,8 +1456,6 @@ function printCommon(url,patientId, times) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
//
|
|
|
// /**
|
|
|
// * 加载打印机列表
|
|
@@ -1599,7 +1612,7 @@ function setPrint() {
|
|
|
/**
|
|
|
* 退费操作
|
|
|
*/
|
|
|
-function refundFee(patientId, times,printFlag) {
|
|
|
+function refundFee(patientId, times, printFlag) {
|
|
|
if (printFlag == 0) {
|
|
|
new PNotify({
|
|
|
title: '错误提示',
|
|
@@ -1821,10 +1834,10 @@ function queryParamsForRefundFee(patientId, times) {
|
|
|
*/
|
|
|
function readyRefundFee() {
|
|
|
var allSelecteds = $('#refund_fee_detail_table').bootstrapTable('getAllSelections');
|
|
|
- chargeItemCodes=null;
|
|
|
- if(allSelecteds!=null && allSelecteds.length>0){
|
|
|
+ chargeItemCodes = null;
|
|
|
+ if (allSelecteds != null && allSelecteds.length > 0) {
|
|
|
for (var i = 0; i < allSelecteds.length; i++) {
|
|
|
- var temp = allSelecteds[i].orderNo+"_"+allSelecteds[i].chargeItemCode;
|
|
|
+ var temp = allSelecteds[i].orderNo + "_" + allSelecteds[i].chargeItemCode;
|
|
|
if (chargeItemCodes == null) {
|
|
|
chargeItemCodes = temp;
|
|
|
} else {
|
|
@@ -1839,8 +1852,6 @@ function readyRefundFee() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 初始化退费重收费明细表格
|
|
|
*/
|
|
@@ -1910,16 +1921,16 @@ function initRefundChargeDetailTable(chargeItemCodes) {
|
|
|
formatter: function (value, row, index) {
|
|
|
return Math.abs(value);
|
|
|
}
|
|
|
- },{
|
|
|
+ }, {
|
|
|
title: '操作',
|
|
|
align: "center",
|
|
|
valign: 'middle',
|
|
|
// sortable: true,
|
|
|
formatter: function (value, row, index) {
|
|
|
- var str ="";
|
|
|
- if(row.amount==0 || row.amount==null || row.amount==undefined){
|
|
|
+ var str = "";
|
|
|
+ if (row.amount == 0 || row.amount == null || row.amount == undefined) {
|
|
|
str = '<button type="button" class="can-not-used" title="费用明细" ><i id="plusOrMinus" class="fa fa-plus"></i></button>';
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
str = '<button type="button" class="registration-no-color-foot-button" title="费用明细" onclick="initMzChargeDetailByBillItem(true)"><i id="plusOrMinus" class="fa fa-plus"></i></button>';
|
|
|
}
|
|
|
str += '<button type="button" class="registration-no-color-foot-button"title="确认退费" onclick="saveRefundFee()"><i class="fa fa-check"></i></button>';
|
|
@@ -1933,6 +1944,9 @@ function initRefundChargeDetailTable(chargeItemCodes) {
|
|
|
return;
|
|
|
}
|
|
|
var ress = eval(res);
|
|
|
+ $("#oriAmount").text(ress.pageViewVo.data[0].oriAmount);
|
|
|
+ $("#newAmount").text(ress.pageViewVo.data[0].amount);
|
|
|
+ $("#refundAmount").text(ress.pageViewVo.data[0].refundFee);
|
|
|
if (ress.code == -1) {
|
|
|
new PNotify({
|
|
|
title: '错误提示',
|
|
@@ -1978,8 +1992,8 @@ function closeRefundFeeDetailModal() {
|
|
|
* 提交退费操作
|
|
|
*/
|
|
|
function saveRefundFee() {
|
|
|
- var params= queryParamsForRefundByBillItem(null);
|
|
|
- $.ajax({
|
|
|
+ var params = queryParamsForRefundByBillItem(null);
|
|
|
+ $.ajax({
|
|
|
type: "POST",
|
|
|
url: '/thmz/saveRefundFee',
|
|
|
contentType: "application/json;charset=UTF-8",
|
|
@@ -2000,9 +2014,9 @@ function saveRefundFee() {
|
|
|
styling: 'bootstrap3'
|
|
|
});
|
|
|
$("#refundFeeModal").modal("hide");
|
|
|
- if(res.times>0){
|
|
|
- prn1Print(res.patientId,res.times);
|
|
|
- }else {
|
|
|
+ if (res.times > 0) {
|
|
|
+ prn1Print(res.patientId, res.times);
|
|
|
+ } else {
|
|
|
initFeeTable();
|
|
|
}
|
|
|
} else {
|