|
@@ -15,14 +15,57 @@ $(function () {
|
|
|
});
|
|
|
|
|
|
/**
|
|
|
- * 收费退费
|
|
|
+ * 收费
|
|
|
*/
|
|
|
$("#chargeFee").on("click", function (t) {
|
|
|
$("#chargeFeeModal").modal("show");
|
|
|
});
|
|
|
|
|
|
initChequeType();
|
|
|
- // initStatus();
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 收费保存
|
|
|
+ */
|
|
|
+ $("#saveEdit").on("click", function (t) {
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ url: '/thmz/saveZyDepositFile',
|
|
|
+ contentType: "application/json;charset=UTF-8",
|
|
|
+ dataType: "json",
|
|
|
+ async: false,
|
|
|
+ data: JSON.stringify({
|
|
|
+ "status": "1",
|
|
|
+ "inpatientNo": $("#admissionNumber").val(),
|
|
|
+ "depoType": $("#depoType").val(),
|
|
|
+ "depoAmount": $("#depoAmount").val(),
|
|
|
+ "chequeNo": $("#chequeNo").val()
|
|
|
+ }),
|
|
|
+ headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
+ success: function (res) {
|
|
|
+ if (res == '401' || res == 401) {
|
|
|
+ window.location.href = '/thmz/login/view'
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (res.code == 0) {
|
|
|
+ $('#tb_table').bootstrapTable("refresh");
|
|
|
+ $("#chargeFeeModal").modal("hide");
|
|
|
+ successMesage(res);
|
|
|
+ } else {
|
|
|
+ errorMesage(res);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 退费提交
|
|
|
+ */
|
|
|
+ $("#refundZyFee").on("click", function (t) {
|
|
|
+ saveRefundZyFee();
|
|
|
+ });
|
|
|
+
|
|
|
+ // initStatus();
|
|
|
});
|
|
|
|
|
|
|
|
@@ -49,6 +92,11 @@ function initChequeType() {
|
|
|
$('#depoType').selectpicker('refresh');
|
|
|
$('#depoType').selectpicker('val', 1);
|
|
|
$('#depoType').selectpicker('refresh');
|
|
|
+ $('#refundDepoType').empty();
|
|
|
+ $('#refundDepoType').html(html);
|
|
|
+ $('#refundDepoType').selectpicker('refresh');
|
|
|
+ $('#refundDepoType').selectpicker('val', 1);
|
|
|
+ $('#refundDepoType').selectpicker('refresh');
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -62,6 +110,7 @@ function initStatus() {
|
|
|
$('#status').html('<option value="1">预交</option><option value="2">退费</option>');
|
|
|
$('#status').selectpicker('refresh');
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 获取按钮组选择的下标
|
|
|
* @param id
|
|
@@ -98,11 +147,11 @@ function titleButtonChange(object) {
|
|
|
* 根据病人门诊id或者住院号查询病人信息
|
|
|
*/
|
|
|
function getZyActpatientByInpatientNoOrMzNO(id) {
|
|
|
- var index = getIndex("regi_List_btn_group");
|
|
|
- var tableName ='zy_actpatient';
|
|
|
- if(index==1){
|
|
|
- tableName ='zy_inactpatient';
|
|
|
- }
|
|
|
+ var index = getIndex("regi_List_btn_group");
|
|
|
+ var tableName = 'zy_actpatient';
|
|
|
+ if (index == 1) {
|
|
|
+ tableName = 'zy_inactpatient';
|
|
|
+ }
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: '/thmz/getZyActpatientByInpatientNoOrMzNO',
|
|
@@ -121,7 +170,7 @@ function getZyActpatientByInpatientNoOrMzNO(id) {
|
|
|
return;
|
|
|
}
|
|
|
if (res.code == 0) {
|
|
|
- if(res.data.length>0){
|
|
|
+ if (res.data.length > 0) {
|
|
|
$("#patientModal").modal();
|
|
|
$("#patientTable").html(null);
|
|
|
for (var i = 0; i < res.data.length; i++) {
|
|
@@ -130,12 +179,12 @@ function getZyActpatientByInpatientNoOrMzNO(id) {
|
|
|
fillPatinet($(this).attr("data-target"));
|
|
|
});
|
|
|
}
|
|
|
- }else {
|
|
|
- if(id=='admissionNumber'){
|
|
|
- $("#patientId").val(null);
|
|
|
- }else if(id=='patientId'){
|
|
|
- $("#admissionNumber").val(null);
|
|
|
- }
|
|
|
+ } else {
|
|
|
+ if (id == 'admissionNumber') {
|
|
|
+ $("#patientId").val(null);
|
|
|
+ } else if (id == 'patientId') {
|
|
|
+ $("#admissionNumber").val(null);
|
|
|
+ }
|
|
|
$("#userName").val(null);
|
|
|
$("#gender").val(null);
|
|
|
$("#bedNo").val(null);
|
|
@@ -163,8 +212,6 @@ function getZyActpatientByInpatientNoOrMzNO(id) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 按照病人inpatientNo查询病人信息
|
|
|
* @param patientId
|
|
@@ -174,13 +221,13 @@ function fillPatinet(inpatientNo) {
|
|
|
return;
|
|
|
}
|
|
|
var index = getIndex("regi_List_btn_group");
|
|
|
- var tableName ='zy_actpatient';
|
|
|
- if(index==1){
|
|
|
- tableName ='zy_inactpatient';
|
|
|
+ var tableName = 'zy_actpatient';
|
|
|
+ if (index == 1) {
|
|
|
+ tableName = 'zy_inactpatient';
|
|
|
}
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
- url: '/thmz/getByInpatientNo?inpatientNo=' + inpatientNo+"&tableName="+tableName,
|
|
|
+ url: '/thmz/getByInpatientNo?inpatientNo=' + inpatientNo + "&tableName=" + tableName,
|
|
|
contentType: "application/json;charset=UTF-8",
|
|
|
dataType: "json",
|
|
|
headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
@@ -191,7 +238,7 @@ function fillPatinet(inpatientNo) {
|
|
|
}
|
|
|
if (res.code == 0) {
|
|
|
if (res.data != null) {
|
|
|
- inpatientNoFull=res.data.inpatientNo.trim();
|
|
|
+ inpatientNoFull = res.data.inpatientNo.trim();
|
|
|
$("#admissionNumber").val(inpatientNoFull);
|
|
|
$("#patientId").val(res.data.mzNo);
|
|
|
$("#userName").val(res.data.name);
|
|
@@ -202,7 +249,7 @@ function fillPatinet(inpatientNo) {
|
|
|
$("#responceType").val(res.data.responceTypeName);
|
|
|
$("#totalAmount").val(res.data.totalCharge);
|
|
|
$("#balance").val(res.data.balance);
|
|
|
- admissTimesFull=res.data.admissTimes;
|
|
|
+ admissTimesFull = res.data.admissTimes;
|
|
|
listDepositFile();
|
|
|
}
|
|
|
} else {
|
|
@@ -213,11 +260,6 @@ function fillPatinet(inpatientNo) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 住院收费明细
|
|
|
*/
|
|
@@ -260,7 +302,7 @@ function listDepositFile() {
|
|
|
title: '账页号',
|
|
|
align: "center",
|
|
|
valign: 'middle'
|
|
|
- },{
|
|
|
+ }, {
|
|
|
field: 'depoDate',
|
|
|
title: '时间',
|
|
|
align: "center",
|
|
@@ -298,6 +340,17 @@ function listDepositFile() {
|
|
|
title: '操作员',
|
|
|
align: "center",
|
|
|
valign: 'middle'
|
|
|
+ }, {
|
|
|
+ title: '操作',
|
|
|
+ align: "center",
|
|
|
+ valign: 'middle',
|
|
|
+ formatter: function (value, row, index) {
|
|
|
+ var str='';
|
|
|
+ if (row.reportFlag != 1 && row.depoAmount>0) {
|
|
|
+ str ='<button type="button" class="btn btn-primary btn-sm" onclick="refundZyFee(\'' + row.receiptNo + '\',\'' + row.depoAmount + '\',\'' + row.depoType + '\')">退费</button>';
|
|
|
+ }
|
|
|
+ return [str].join('');
|
|
|
+ }
|
|
|
}
|
|
|
],
|
|
|
responseHandler: function (res) {
|
|
@@ -343,6 +396,56 @@ function queryParams(params) {
|
|
|
};
|
|
|
|
|
|
|
|
|
+/**
|
|
|
+ * 退费确认页面
|
|
|
+ * @param receiptNo
|
|
|
+ * @param depoAmount
|
|
|
+ * @param depoType
|
|
|
+ */
|
|
|
+function refundZyFee(receiptNo,depoAmount,depoType) {
|
|
|
+ $("#receiptNo").val(receiptNo);
|
|
|
+ $("#refungZyFeeModal").modal("show");
|
|
|
+ $("#refundDepoAmount").val(depoAmount);
|
|
|
+ $('#refundDepoType').selectpicker('val', depoType);
|
|
|
+ $('#refundDepoType').selectpicker('refresh');
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 退住院预交金
|
|
|
+ * @param receiptNo
|
|
|
+ */
|
|
|
+function saveRefundZyFee() {
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ url: '/thmz/saveZyDepositFile',
|
|
|
+ contentType: "application/json;charset=UTF-8",
|
|
|
+ dataType: "json",
|
|
|
+ async: false,
|
|
|
+ data: JSON.stringify({
|
|
|
+ "status": "2",
|
|
|
+ "receiptNo": $("#receiptNo").val(),
|
|
|
+ "depoType": $("#refundDepoType").val()
|
|
|
+ }),
|
|
|
+ headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
+ success: function (res) {
|
|
|
+ if (res == '401' || res == 401) {
|
|
|
+ window.location.href = '/thmz/login/view'
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (res.code == 0) {
|
|
|
+ $('#tb_table').bootstrapTable("refresh");
|
|
|
+ $("#refungZyFeeModal").modal("hide");
|
|
|
+ $("#receiptNo").val(null);
|
|
|
+ successMesage(res);
|
|
|
+ } else {
|
|
|
+ errorMesage(res);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 清空
|
|
|
*/
|