Browse Source

优化人员信息

hurugang 5 years ago
parent
commit
628f8f4dab

+ 31 - 0
src/main/resources/static/js/common/pad-util.js

@@ -41,4 +41,35 @@ function postCMD(cmd,UserID,UserPsw,ItemName,Coast,Pay,Change,GuestName,Msg,Self
     sendData(JSON.stringify(d));
     //console.log(d);
     //console.log(JSON.stringify(d));
+}
+
+
+/**
+ * 推送价格信息
+ * @param data 应收金额
+ * @Pay Pay 实收金额
+ * @param changeAmount
+ * @param message
+ * @param patientId
+ * @param name
+ */
+function sendPeiceMessage(data,pay,changeAmount,message,patientId,name) {
+    $.ajax({
+        type: "GET",
+        url: '/thmz/getByPatientId?patientId=' + patientId,
+        contentType: "application/json;charset=UTF-8",
+        dataType: "json",
+        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
+        success: function (res) {
+            if (res == '401' || res == 401) {
+                window.location.href = '/thmz/login/view'
+                return;
+            }
+            if (res.code == 0) {
+                if (res.data != null) {
+                    postCMD("price",localStorage.getItem("userID"),'000000','收费项目',parseFloat(data).toFixed(2),parseFloat(pay).toFixed(2),parseFloat(changeAmount).toFixed(2), name,message,parseFloat(data).toFixed(2),parseFloat(0).toFixed(2),res.data.phoneNo);
+                }
+            }
+        }
+    });
 }

+ 3 - 32
src/main/resources/static/js/registration.js

@@ -748,7 +748,7 @@ function confirmFeeModal() {
     $("#cash").val($("#amountMoneyConfirm").text());
     //$("#cash").val(null);
     $("#confirmFeeModal").modal();
-    sendPeiceMessage($("#amountMoneyConfirm").text(),0,0,'您本次应付金额为'+$("#amountMoneyConfirm").text()+'元');
+    sendPeiceMessage($("#amountMoneyConfirm").text(),0,0,'您本次应付金额为'+$("#amountMoneyConfirm").text()+'元',$("#patientId").val(),$("#userNameReadOnly").val());
 }
 
 /**
@@ -898,7 +898,7 @@ function checkFee() {
         if ($("#payType").val() == 1) {
             var changeAmount = cash - realMoney;
             $("#changeAmount").val(changeAmount.toFixed(2));
-            sendPeiceMessage(realMoney,cash,changeAmount.toFixed(2),'实际支付金额为'+cash+'元,应找零'+changeAmount+'元');
+            sendPeiceMessage(realMoney,cash,changeAmount.toFixed(2),'实际支付金额为'+cash+'元,应找零'+changeAmount+'元',$("#patientId").val(),$("#userNameReadOnly").val());
         } else {
             new PNotify({
                 title: '错误提示',
@@ -911,7 +911,7 @@ function checkFee() {
         }
     }else {
         $("#changeAmount").val(0.00);
-        sendPeiceMessage(realMoney,cash,0.00,'实际支付金额为'+cash+'元');
+        sendPeiceMessage(realMoney,cash,0.00,'实际支付金额为'+cash+'元',$("#patientId").val(),$("#userNameReadOnly").val());
     }
     //计算和设置折扣比例
     var amountMoneyConfirm = parseFloat($("#amountMoneyConfirm").text());
@@ -1826,32 +1826,3 @@ function queryUserInfoByName() {
     }
 
 }
-
-
-/**
- * 推送价格信息
- * @param data 应收金额
- * @Pay Pay 实收金额
- * @param changeAmount
- * @param message
- */
-function sendPeiceMessage(data,Pay,changeAmount,message) {
-    $.ajax({
-        type: "GET",
-        url: '/thmz/getByPatientId?patientId=' + $("#patientId").val(),
-        contentType: "application/json;charset=UTF-8",
-        dataType: "json",
-        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
-        success: function (res) {
-            if (res == '401' || res == 401) {
-                window.location.href = '/thmz/login/view'
-                return;
-            }
-            if (res.code == 0) {
-                if (res.data != null) {
-                    postCMD("price",localStorage.getItem("userID"),'000000','收费项目',parseFloat(data).toFixed(2),parseFloat(Pay).toFixed(2),parseFloat(changeAmount).toFixed(2), $("#userNameReadOnly").val(),message,parseFloat(data).toFixed(2),parseFloat(0).toFixed(2),res.data.phoneNo);
-                }
-            }
-        }
-    });
-}

+ 3 - 29
src/main/resources/static/js/toll_administration.js

@@ -813,36 +813,10 @@ function confirmFeeModal(times, totalCharge, receiptNo) {
     $("#payType").selectpicker('refresh');
     $("#changeAmount").val(0.0);
     $("#surplusAmount").val(0.0);
-    sendPeiceMessage(data,0,0,'您本次应付金额为'+data+'元');
+    sendPeiceMessage(data,0,0,'您本次应付金额为'+data+'元',$("#patientIdHaveTally").val(),$("#nameHaveTally").val());
 }
 
-/**
- * 推送价格信息
- * @param data 应收金额
- * @Pay Pay 实收金额
- * @param changeAmount
- * @param message
- */
-function sendPeiceMessage(data,pay,changeAmount,message) {
-    $.ajax({
-        type: "GET",
-        url: '/thmz/getByPatientId?patientId=' + $("#patientIdHaveTally").val(),
-        contentType: "application/json;charset=UTF-8",
-        dataType: "json",
-        headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
-        success: function (res) {
-            if (res == '401' || res == 401) {
-                window.location.href = '/thmz/login/view'
-                return;
-            }
-            if (res.code == 0) {
-                if (res.data != null) {
-                    postCMD("price",localStorage.getItem("userID"),'000000','收费项目',parseFloat(data).toFixed(2),parseFloat(pay).toFixed(2),parseFloat(changeAmount).toFixed(2), $("#nameHaveTally").val(),message,parseFloat(data).toFixed(2),parseFloat(0).toFixed(2),res.data.phoneNo);
-                }
-            }
-        }
-    });
-}
+
 
 /**
  * 打开收费明细窗口
@@ -1021,7 +995,7 @@ function checkFee(flag) {
             $("#changeAmount").val(changeAmount);
             $("#addPayType").parent().removeClass("in").addClass("hide");
             if (!flag) {
-                sendPeiceMessage(realMoney,totalAmount,changeAmount,'实际支付金额为'+totalAmount+'元,应找零'+changeAmount+'元');
+                sendPeiceMessage(realMoney,totalAmount,changeAmount,'实际支付金额为'+totalAmount+'元,应找零'+changeAmount+'元',$("#patientIdHaveTally").val(),$("#nameHaveTally").val());
             }
         }
         //设置收费首页找零与应收和实收金额