From 0464969366317154fdbb51e106ca778b855bdd08 Mon Sep 17 00:00:00 2001
From: wxw <Administrator@DESKTOP-5BIMHQ3>
Date: 星期六, 17 八月 2024 15:45:28 +0800
Subject: [PATCH] Merge branch 'master' into wxw

---
 HTML/views/BaseSetting/Customer.html |   79 ++++++++++++++++++++-------------------
 1 files changed, 40 insertions(+), 39 deletions(-)

diff --git a/HTML/views/BaseSetting/Customer.html b/HTML/views/BaseSetting/Customer.html
index d8898f6..7f247a8 100644
--- a/HTML/views/BaseSetting/Customer.html
+++ b/HTML/views/BaseSetting/Customer.html
@@ -12,12 +12,12 @@
 	<link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
 	<script>
 		// 杩欓噷鏄渶瑕佸湪椤甸潰娓叉煋涔嬪墠鎵ц鐨勪唬鐮�
-		document.addEventListener("DOMContentLoaded", function() {
-			
+		document.addEventListener("DOMContentLoaded", function () {
+
 			//鑾峰彇table榛樿鏄剧ず鏁�
 			pageCntFirst();
 		});
-	  </script>
+	</script>
 </head>
 
 <body>
@@ -28,9 +28,8 @@
 					<div class="layui-inline">
 						<label class="layui-form-label" style="width: 56px;">瀹㈡埛缂栫爜</label>
 						<div class="layui-input-inline">
-							<input type="text" id="CustomerNo" name="CustomerNo" placeholder="瀹㈡埛缂栫爜"
-								autocomplete="off" class="layui-input"
-								onkeyup="this.value=this.value.replace(/[, ]/g,'')">
+							<input type="text" id="CustomerNo" name="CustomerNo" placeholder="瀹㈡埛缂栫爜" autocomplete="off"
+								class="layui-input" onkeyup="this.value=this.value.replace(/[, ]/g,'')">
 						</div>
 					</div>
 					<div class="layui-inline">
@@ -108,11 +107,11 @@
 				laypage = layui.laypage,
 				layer = layui.layer;
 
-			 
+
 			refreshTable();
 
 			function refreshTable() {
-				 
+
 				var no = $("#CustomerNo").val();
 				var name = $("#CustomerName").val();
 				var type = parseInt($("#CustomerType").val());
@@ -125,7 +124,7 @@
 					LinkMan: linkman,
 					Phone: phone,
 					Type: type
-				}; 
+				};
 				table.render({
 					elem: '#LAY-app-content-list',
 					url: IP + "/Basis/GetCustomerList",
@@ -133,8 +132,9 @@
 					height: 'full-95',
 					id: 'LAY-app-content-list',
 					where: param,
+					
 					contentType: 'application/json',
-					headers:{ToKen:$.cookie('token')},
+					headers: { ToKen: $.cookie('token') },
 					page: true,
 					limit: pageCnt,
 					limits: pageLimits,
@@ -143,13 +143,14 @@
 					// response:{
 					// 	statusCode: 0 
 					// },
-					done: function () {
-						$(function() {
+					done: function (ref) {
+						console.log(ref);
+						$(function () {
 							$(".editClass").hide();
 							$(".delClass").hide();
 							$(".addClass").hide();
 						});
-						sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
+						sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
 							if (res.code == 0) { //鎴愬姛 
 								for (var k = 0; k < res.data.length; k++) {
 									if (res.data[k].MenuName == "缂栬緫瀹㈡埛") {
@@ -166,13 +167,13 @@
 								layer.msg('鑾峰彇鏉冮檺淇℃伅澶辫触', {
 									icon: 2,
 									time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-								}, function() {});
+								}, function () { });
 							}
-						}); 
+						});
 					},
-					 
+
 					cols: [
-						[{ 
+						[{
 							title: '搴忓彿',
 							type: 'numbers',
 							width: 65,
@@ -194,13 +195,13 @@
 							width: 100,
 							align: 'center',
 							templet: function (d) {
-								if (d.Type ==0) {
+								if (d.Type == 0) {
 									return "瀹㈡埛";
-								} else if(d.Type ==1){
+								} else if (d.Type == 1) {
 									return "渚涜揣鍟�";
-								} else if(d.Type ==2){
+								} else if (d.Type == 2) {
 									return "璐т富";
-								}else{
+								} else {
 									return "";
 								}
 							},
@@ -222,12 +223,12 @@
 						}, {
 							field: 'BankAccount',
 							title: '閾惰鍗″彿',
-							width: 120, 
+							width: 120,
 							align: 'center'
 						}, {
 							field: 'CreditRating',
 							title: '淇$敤绛夌骇',
-							width: 90, 
+							width: 90,
 							align: 'center'
 						}, {
 							field: 'Demo',
@@ -245,7 +246,7 @@
 							width: 160,
 							templet: function (d) {
 								return formatDate(d.CreateTime);
-							}, 
+							},
 						}, {
 							field: 'UpdateUserName',
 							title: '淇敼浜�',
@@ -258,7 +259,7 @@
 							width: 160,
 							templet: function (d) {
 								return formatDate(d.UpdateTime);
-							}, 
+							},
 						}, {
 							title: '鎿嶄綔',
 							fixed: 'right',
@@ -269,13 +270,13 @@
 					],
 				});
 			}
-			
+
 			//鐩戝惉鎼滅储
 			form.on('submit(LAY-app-contlist-search)', function (data) {
-				 
+
 				refreshTable();
 			});
-			
+
 			var doing = true;
 			active = {
 				batchdel: function () {
@@ -293,7 +294,7 @@
 							var msg = [];
 							for (var i = 0; i < checkData.length; i++) {
 								msg.push(checkData[i].Id)
-							} 
+							}
 							var param = {
 								Ids: msg,
 							};
@@ -338,15 +339,15 @@
 									var field = data.field; //鑾峰彇鎻愪氦鐨勫瓧娈�
 									console.log(field);
 									//鎻愪氦 Ajax 鎴愬姛鍚庯紝闈欐�佹洿鏂拌〃鏍间腑鐨勬暟鎹�
-									var param = { 
+									var param = {
 										CustomerNo: field.CustomerNo,
 										CustomerName: field.CustomerName,
 										Address: field.Address,
 										LinkMan: field.LinkMan,
 										Phone: field.Phone,
 										Type: parseInt(field.Type),
-										BankAccount:field.BankAccount,
-										CreditRating:field.CreditRating,
+										BankAccount: field.BankAccount,
+										CreditRating: field.CreditRating,
 										Demo: field.Demo,
 									};
 									sendData(IP + "/Basis/AddCustomer", param, 'post',
@@ -357,11 +358,11 @@
 													icon: 1,
 													time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
 												}, function () {
-													refreshTable(); 
+													refreshTable();
 													layer.close(index); //鍏抽棴寮瑰眰
 													doing = true;
 												});
-											} else if(res.code == 1){
+											} else if (res.code == 1) {
 												layer.msg(res.msg, {
 													icon: 2,
 													time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
@@ -385,8 +386,8 @@
 				var type = $(this).data('type');
 				active[type] ? active[type].call(this) : '';
 			});
-			
-			
+
+
 
 			var cusid = "0";
 			table.on('tool(LAY-app-content-list)', function (obj) {
@@ -449,8 +450,8 @@
 										LinkMan: field.LinkMan,
 										Phone: field.Phone,
 										Type: parseInt(field.Type),
-										BankAccount:field.BankAccount,
-										CreditRating:field.CreditRating,
+										BankAccount: field.BankAccount,
+										CreditRating: field.CreditRating,
 										Demo: field.Demo,
 									};
 									sendData(IP + "/Basis/EditCustomer", param, 'post',
@@ -465,7 +466,7 @@
 													layer.close(index); //鍏抽棴寮瑰眰
 													doing = true;
 												});
-											} else if(res.code == 1){
+											} else if (res.code == 1) {
 												layer.msg(res.msg, {
 													icon: 2,
 													time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級

--
Gitblit v1.8.0