瀏覽代碼

Merge branch 'dev-1.1.4' into 'dev-1.1.4'

request方法冲突

See merge request lihong/thmz_system!98
huangshuhua 6 月之前
父節點
當前提交
35277261f7

+ 26 - 1
src/main/resources/static/js/mz/west_pharmacy_send.js

@@ -2323,7 +2323,7 @@ function printView(data) {
     });
     $('#priceTime').attr("value", format(list[0].priceTime, "yyyy-MM-dd HH:mm"));
     // 获取医生签名
-    getAjaxRequst("/thmz/getDoctorSignatureImage",{doctorCode:data.employeeCode},false,function (postRes) {
+    getAjaxRequest("/thmz/getDoctorSignatureImage",{doctorCode:data.employeeCode},false,function (postRes) {
         if(postRes.code == 0){
             $("#employeeName").html("<img src='" + postRes.data + "'  style='width:100px;height:23px;'/>")
         }else {
@@ -2463,4 +2463,29 @@ function getZyPrintHtml(list) {
         '<td colspan="6" style="border: 0 !important;text-align: left;padding: 0; font-size: 14px;">'+yf+'</td>' +
         '</tr>';
     return tr;
+}
+
+function getAjaxRequest (url, data,async, callBack) {
+    requestAs(url, "GET", data, async,"application/x-www-form-urlencoded;charset=UTF-8", function(res) {
+        return typeof callBack == "function" && callBack(res)
+    })
+}
+
+function requestAs (url, method, data = {},async, contentType, back){
+    $.ajax({
+        url: url,
+        type: method,
+        data: data,
+        async: async,
+        headers:{'Accept': 'application/json','Authorization':'Bearer '+ localStorage.getItem("token")},
+        contentType: contentType,
+        dataType: "json",
+        success: function(res){
+            return typeof back == "function" && back(res);
+        },
+        error: function(error) {
+            console.log(error)
+            return typeof back == "function" && back(null);
+        }
+    });
 }

+ 0 - 1
src/main/resources/templates/mz/west_pharmacy_dispensing.html

@@ -9,7 +9,6 @@
 <script src="/thmz/js/mz/west_pharmacy_dispensing.js"></script>
 <script src="/thmz/js/dependent/LodopFuncs.js"></script>
 <script src="/thmz/js/dependent/JsBarcode.all.js"></script>
-<script src="/thmz/js/common/request.js"></script>
 <title>门诊西药房配药</title>
 <div class="row" style="height: calc(100% - 60px);overflow-y: auto;" >
     <div class="col-md-12 col-sm-12 col-xs-12">

+ 0 - 1
src/main/resources/templates/mz/west_pharmacy_send.html

@@ -14,7 +14,6 @@
 <script src="/thmz/js/mz/west_pharmacy_send.js"></script>
 <script src="/thmz/js/dependent/LodopFuncs.js"></script>
 <script src="/thmz/js/dependent/JsBarcode.all.js"></script>
-<script src="/thmz/js/common/request.js"></script>
 <title>门诊药房发退药</title>
 <!-- 打印的样式-->
 <style media="print">