From 74d131182770a07b7209b4238b78fc270a59e4b6 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 13 十一月 2023 10:18:49 +0800
Subject: [PATCH] 销售订单:页面初始化后根据表头客户内码获取对应客户余额和客户信用额度、更改客户后修改客户余额和客户信用额度
---
WebTM/views/销售管理/销售订单/Add_Edit_Xs_SeOrderBillList.html | 37 ++++++++++++++++++++++++++++++++++++-
1 files changed, 36 insertions(+), 1 deletions(-)
diff --git "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Add_Edit_Xs_SeOrderBillList.html" "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Add_Edit_Xs_SeOrderBillList.html"
index bba4472..442bdad 100644
--- "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Add_Edit_Xs_SeOrderBillList.html"
+++ "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Add_Edit_Xs_SeOrderBillList.html"
@@ -200,7 +200,7 @@
<div class="layui-inline">
<label class="layui-form-label">瀹㈡埛浣欓</label>
<div class="layui-input-inline">
- <input class="layui-input" name="" id="" autocomplete="off" readonly>
+ <input class="layui-input" name="HCusBalance" id="HCusBalance" autocomplete="off" readonly>
</div>
</div>
<div class="layui-inline">
@@ -407,6 +407,10 @@
//#region 鍒濆鍖栫粍缁�
Organ();
+ //#endregion
+
+ //#region 椤甸潰鍒濆鍖栧悗锛屾牴鎹鎴疯幏鍙栧鎴蜂綑棰�
+ getCustomerBalance( $("#HCusID").val() );
//#endregion
//#region 鍒楄缃細瀛愯〃1
@@ -1080,6 +1084,9 @@
return layer.msg('璇烽�夋嫨鏁版嵁');
}
getCustomerByCusID(checkStatus.data[0].HItemID);
+ //鏍规嵁瀹㈡埛鑾峰彇瀹㈡埛浣欓
+ getCustomerBalance(checkStatus.data[0].HItemID);
+
layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
, btn2: function (index, layero) { }
@@ -1933,7 +1940,10 @@
{
//$("#HCusName").val(obj[0].HName);
//$("#HCusID").val(obj[0].HItemID);
+ //鏍规嵁瀹㈡埛鑾峰彇鐩稿叧淇℃伅
getCustomerByCusID(obj[0].HItemID);
+ //鏍规嵁瀹㈡埛鑾峰彇瀹㈡埛浣欓
+ getCustomerBalance(obj[0].HItemID);
}
function GetHManagerValue(obj) //杩斿洖涓荤
@@ -1983,6 +1993,31 @@
});
}
//#endregion
+
+ //#region 鏍规嵁瀹㈡埛鑾峰彇瀹㈡埛浣欓
+ function getCustomerBalance(HCusID) {
+ $.ajax({
+ url: GetWEBURL() + "/Xs_CusRatingChangeBill/getCustomerBalance",
+ async: false,
+ type: "GET",
+ data: {
+ "HCusID": HCusID
+ },
+ success: function (result) {
+ if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ var data = result.data[0];
+
+ $("#HCusBalance").val(data.HCusBalance == null ? 0 : data.HCusBalance);
+ $("#HCreditRating_Now").val(data.HCreditRating_Now == null ? 0 : data.HCreditRating_Now);
+ } else {
+ layer.alert(result.msg, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+ }
+ }, error: function () {
+ layer.alert("鍙戠敓閿欒!", { icon: 5 });
+ }
+ });
+ }
+ //#endregion
</script>
</body>
</html>
\ No newline at end of file
--
Gitblit v1.9.1