From 152c34faf7f113c5d4c28cdca84bd53121772a47 Mon Sep 17 00:00:00 2001
From: bklLiudl <673013083@qq.com>
Date: 星期三, 10 七月 2024 10:45:56 +0800
Subject: [PATCH] 采购单据

---
 HTML/views/ASNSetting/ProcurePlanNotice.html |  250 +++++++++++++++++++++++++------------------------
 1 files changed, 126 insertions(+), 124 deletions(-)

diff --git a/HTML/views/ASNSetting/ProcurePlanNotice.html b/HTML/views/ASNSetting/ProcurePlanNotice.html
index 89c0a9f..100d354 100644
--- a/HTML/views/ASNSetting/ProcurePlanNotice.html
+++ b/HTML/views/ASNSetting/ProcurePlanNotice.html
@@ -17,13 +17,16 @@
 			height: auto;
 			line-height: 23px;
 		}
-		.layui-table-tool-panel{
+
+		.layui-table-tool-panel {
 			top: auto;
 			bottom: 29px;
 		}
-		.layui-table-tool{
+
+		.layui-table-tool {
 			padding-left: 5px;
 		}
+
 		/* 琛ㄦ牸涓嬫媺灏忕澶撮殣钘� */
 		.layui-table-grid-down {
 			display: none;
@@ -31,14 +34,14 @@
 	</style>
 	<script>
 		// 杩欓噷鏄渶瑕佸湪椤甸潰娓叉煋涔嬪墠鎵ц鐨勪唬鐮�
-		document.addEventListener("DOMContentLoaded", function() {
+		document.addEventListener("DOMContentLoaded", function () {
 			//鑾峰彇table榛樿鏄剧ず鏁�
 			pageCntFirst();
 			console.log(pageCnt)
 			//鍒ゆ柇鏄惁寮�鍚痶able鍒楄〃鍒楀璋冩暣鍔熻兘銆�
 			GetIsSetColW();
 		});
-	  </script>
+	</script>
 </head>
 
 <body id="body">
@@ -46,18 +49,6 @@
 		<div class="layui-card">
 			<div class="layui-form layui-card-header layuiadmin-card-header-auto" id="top">
 				<div class="layui-form-item">
-					<div class="layui-inline">
-						<label class="layui-form-label">鎵ц鐘舵��</label>
-						<div class="layui-input-inline">
-							<select name="Status" id="Status" lay-filter="Status" lay-search>
-								<option value=""></option>
-								<option value="0">绛夊緟鎵ц</option>
-								<option value="1">姝e湪鎵ц</option>
-								<option value="2">鎵ц瀹屾垚</option>
-								<option value="3">璁㈠崟鍏抽棴</option>
-							</select>
-						</div>
-					</div>
 					<div class="layui-inline">
 						<label class="layui-form-label">鐗╂枡缂栫爜</label>
 						<div class="layui-input-inline">
@@ -71,14 +62,27 @@
 							<input type="text" id="SkuName" name="SkuName" placeholder="鐗╂枡鍚嶇О" autocomplete="off"
 								class="layui-input">
 						</div>
-					</div>		
-                    <div class="layui-inline">
+					</div>
+
+					<div class="layui-inline">
 						<label class="layui-form-label">瀹㈡埛鍚嶇О</label>
 						<div class="layui-input-inline">
-							<input type="text" id="CustomerName" name="CustomerName" placeholder="瀹㈡埛鍚嶇О" autocomplete="off"
-							class="layui-input">
+							<input type="text" id="CustomerName" name="CustomerName" placeholder="瀹㈡埛鍚嶇О"
+								autocomplete="off" class="layui-input">
 						</div>
-					</div>				
+					</div>
+					<div class="layui-inline">
+						<label class="layui-form-label">鎵ц鐘舵��</label>
+						<div class="layui-input-inline">
+							<select name="Status" id="Status" lay-filter="Status" lay-search>
+								<option value=""></option>
+								<option value="0">绛夊緟鎵ц</option>
+								<option value="1">姝e湪鎵ц</option>
+								<option value="2">鎵ц瀹屾垚</option>
+								<option value="3">璁㈠崟鍏抽棴</option>
+							</select>
+						</div>
+					</div>
 					<div class="layui-inline">
 						<label class="layui-form-label">寮�濮嬫棩鏈�</label>
 						<div class="layui-input-inline">
@@ -103,7 +107,7 @@
 				</div>
 			</div>
 
-			<div id="center">	
+			<div id="center">
 			</div>
 
 			<div class="layui-card-body">
@@ -251,14 +255,14 @@
 		}).extend({
 			index: 'lib/index' //涓诲叆鍙fā鍧�
 		}).use(['index', 'table', 'laypage', 'layer', 'laydate'], function () {
- 
+
 			var doing = true;
-			
+
 			var table = layui.table,
 				form = layui.form,
 				laypage = layui.laypage,
 				layer = layui.layer;
-			
+
 			laydate = layui.laydate;
 
 			laydate.render({
@@ -269,44 +273,45 @@
 				elem: '#EndTime'
 				, format: 'yyyy-MM-dd' //鍙换鎰忕粍鍚�
 			});
-			
+
 			var h1 = GetTableTopHeight();
 			var h2 = GetTableBottomHeight();
 
-			
+
 			refreshTable();
-			refreshTablemx(0);	
+			refreshTablemx(0);
 			//娓叉煋鎬诲崟	
 			//#region 鑷畾涔夎〃澶�
 			var TotalColsArr = [[
-						{field: '',title: '搴忓彿',type:'numbers',width: 50,align: 'center',fixed: 'left', "disabled": true},
-						{field: 'OrderCode',title: '閲囪喘鍗曞彿',align: 'center'},
-						{field: 'Status',title: '鎵ц鐘舵��',align: 'center',templet: '#buttonTpl'},						
-						{field: 'CompleteTime',title: '瀹屾垚鏃堕棿',align: 'center',templet: '#templetCompleteTime'},
-						{field: 'CreateUserName',title: '鍒涘缓浜�',align: 'center',width: 110},
-						{field: 'CreateTime',title: '鍒涘缓鏃堕棿',align: 'center',templet: '#templetCreateTime'},
-						{field: 'UpdateUserName',title: '淇敼浜�',align: 'center',width: 110},
-						{field: 'UpdateTime',title: '淇敼鏃堕棿',align: 'center',templet: '#templetUpdateTime'},
-						{field: 'caozuo',title: '鎿嶄綔',fixed: 'right',width: 280,align: 'center',toolbar: '#toolbarDemo1', "disabled": true}
-					]];
-			var TotalColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜
+				{ field: '', title: '搴忓彿', type: 'numbers', width: 50, align: 'center', fixed: 'left', "disabled": true },
+				{ field: 'OrderCode', title: '閲囪喘鍗曞彿', align: 'center' },
+				{ field: 'Status', title: '鎵ц鐘舵��', align: 'center', templet: '#buttonTpl' },
+				{ field: 'CompleteTime', title: '瀹屾垚鏃堕棿', align: 'center', templet: '#templetCompleteTime' },
+				{ field: 'UserName', title: '鍒跺崟浜�', align: 'center', width: 110 },
+				{ field: 'CreateUserName', title: '鍒涘缓浜�', align: 'center', width: 110 },
+				{ field: 'CreateTime', title: '涓嬪彂鏃堕棿', align: 'center', templet: '#templetCreateTime' },
+				{ field: 'UpdateUserName', title: '淇敼浜�', align: 'center', width: 110 },
+				{ field: 'UpdateTime', title: '淇敼鏃堕棿', align: 'center', templet: '#templetUpdateTime' },
+				{ field: 'caozuo', title: '鎿嶄綔', fixed: 'right', width: 280, align: 'center', toolbar: '#toolbarDemo1', "disabled": true }
+			]];
+			var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜
 			//#endregion
 			function refreshTable() {
-				
+
 				//#region 鑷畾涔夎〃澶�
 				var colsJson
-				var param1={
-					Href:'BllAsn/GetProcurePlanNoticeList'
+				var param1 = {
+					Href: 'BllAsn/GetProcurePlanNoticeList'
 				};
-				sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function(res) {
-					if (res.code == 0){							
-						if(res.data=='' || res.data==undefined || res.data==null){
-							colsJson=TotalColsArr							
-						}else{
-							colsJson= eval(res.data);
+				sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function (res) {
+					if (res.code == 0) {
+						if (res.data == '' || res.data == undefined || res.data == null) {
+							colsJson = TotalColsArr
+						} else {
+							colsJson = eval(res.data);
 						}
-					}else{
-						colsJson=TotalColsArr
+					} else {
+						colsJson = TotalColsArr
 					}
 					var param = {
 						ASNNo: $("#ASNNo").val(),
@@ -316,7 +321,7 @@
 						LotNo: $("#LotNo").val(),
 						SkuNo: $("#SkuNo").val(),
 						SkuName: $("#SkuName").val(),
-						StartTime:$("#StartTime").val(),
+						StartTime: $("#StartTime").val(),
 						EndTime: $("#EndTime").val()
 					};
 					table.render({
@@ -327,16 +332,16 @@
 						id: 'LAY-app-content-list',
 						where: param,
 						contentType: 'application/json',
-						headers:{ToKen:$.cookie('token')},
+						headers: { ToKen: $.cookie('token') },
 						page: true,
 						even: true,
 						limit: pageCnt,
 						limits: pageLimits,
 						cellMinWidth: 60, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板
-						done: function(res) {
-							setRight();		
+						done: function (res) {
+							setRight();
 							//鑷畾涔夊垪瀹�
-							SetTableColW('LAY-app-content-list','BllAsn/GetProcurePlanNoticeList',TotalColsSysArr);				
+							SetTableColW('LAY-app-content-list', 'BllAsn/GetProcurePlanNoticeList', TotalColsSysArr);
 						},
 						cols: colsJson
 					});
@@ -345,52 +350,52 @@
 			}
 
 			// 鍏ュ簱鍗晅able鍗曟満浜嬩欢
-			table.on('row(LAY-app-content-list)', function(obj) {		
+			table.on('row(LAY-app-content-list)', function (obj) {
 				refreshTablemx(obj.data.Id);
 			});
-            //娓叉煋鏄庣粏
+			//娓叉煋鏄庣粏
 			//#region 鑷畾涔夎〃澶�
 			var DetailColsArr = [[
-						{field: '',title: '搴忓彿',type:'numbers',width: 50,align: 'center',fixed: 'left', "disabled": true},
-						{field: 'OrderDetailCode',title: '閲囪喘鍗曡鍙�',align: 'center',width: 100}, 
-						{field: 'CustomerName',title: '渚涘簲鍟嗗悕绉�',align: 'center'},
-						{field: 'SkuNo',title: '鐗╂枡缂栫爜',align: 'center',width: 100}, 
-						{field: 'SkuName',title: '鐗╂枡鍚嶇О',align: 'center',width: 200}, 
-						{field: 'Standard',title: '鐗╂枡瑙勬牸',align: 'center',width: 130}, 
-						{field: 'Qty',title: '鏁伴噺',align: 'center',width: 70}, 
-						{field: 'CompleteQty',title: '瀹屾垚鏁伴噺',align: 'center',width: 90}, 
-						{field: 'CompleteTime',title: '瀹屾垚鏃堕棿',align: 'center', width: 160,templet: '#templetCompleteTime2'},
-						{field: 'UnitName',title: '璁¢噺鍗曚綅',align: 'center',width: 90},
-						{field: 'Price',title: '鍗曚环',align: 'center',width: 65},
-						{field: 'Money',title: '閲戦',align: 'center',width: 65},
-						{field: 'PackagName',title: '鍖呰鍚嶇О',align: 'center',width: 110,},
-						{field: 'CreateUserName',title: '鍒涘缓浜�',align: 'center',width: 100},
-						{field: 'CreateTime',title: '鍒涘缓鏃堕棿',align: 'center',width: 160,templet: '#templetCreateTime2'},
-						{field: 'UpdateUserName',title: '淇敼浜�',align: 'center',width: 150,},
-						{field: 'UpdateTime',title: '淇敼鏃堕棿',align: 'center',width: 150,templet: '#templetUpdateTime3'},  
-						{field: 'caozuo',title: '鎿嶄綔',fixed: 'right',align: 'center',toolbar: '#toolbarDemoList', "disabled": true}
-					]];
-			var DetailColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜
+				{ field: '', title: '搴忓彿', type: 'numbers', width: 50, align: 'center', fixed: 'left', "disabled": true },
+				{ field: 'OrderDetailCode', title: '閲囪喘鍗曡鍙�', align: 'center', width: 100 },
+				{ field: 'CustomerName', title: '渚涘簲鍟嗗悕绉�', align: 'center' },
+				{ field: 'SkuNo', title: '鐗╂枡缂栫爜', align: 'center', width: 100 },
+				{ field: 'SkuName', title: '鐗╂枡鍚嶇О', align: 'center', width: 200 },
+				{ field: 'Standard', title: '鐗╂枡瑙勬牸', align: 'center', width: 130 },
+				{ field: 'Qty', title: '鏁伴噺', align: 'center', width: 70 },
+				{ field: 'CompleteQty', title: '瀹屾垚鏁伴噺', align: 'center', width: 90 },
+				{ field: 'CompleteTime', title: '瀹屾垚鏃堕棿', align: 'center', width: 160, templet: '#templetCompleteTime2' },
+				{ field: 'UnitName', title: '璁¢噺鍗曚綅', align: 'center', width: 90 },
+				{ field: 'Price', title: '鍗曚环', align: 'center', width: 65 },
+				{ field: 'Money', title: '閲戦', align: 'center', width: 65 },
+				{ field: 'PackagName', title: '鍖呰鍚嶇О', align: 'center', width: 110, },
+				{ field: 'CreateUserName', title: '鍒涘缓浜�', align: 'center', width: 100 },
+				{ field: 'CreateTime', title: '鍒涘缓鏃堕棿', align: 'center', width: 160, templet: '#templetCreateTime2' },
+				{ field: 'UpdateUserName', title: '淇敼浜�', align: 'center', width: 150, },
+				{ field: 'UpdateTime', title: '淇敼鏃堕棿', align: 'center', width: 150, templet: '#templetUpdateTime3' },
+				{ field: 'caozuo', title: '鎿嶄綔', fixed: 'right', align: 'center', toolbar: '#toolbarDemoList', "disabled": true }
+			]];
+			var DetailColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜
 			//#endregion
 			function refreshTablemx(parentId) {
-				
+
 				//#region 鑷畾涔夎〃澶�
 				var colsJson2
-				var param1={
-					Href:'BllAsn/GetProcurePlanNoticeDetailList'
+				var param1 = {
+					Href: 'BllAsn/GetProcurePlanNoticeDetailList'
 				};
-				sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function(res) {
-					if (res.code == 0){							
-						if(res.data=='' || res.data==undefined || res.data==null){
-							colsJson2=DetailColsArr						
-						}else{
-							colsJson2= eval(res.data);
+				sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function (res) {
+					if (res.code == 0) {
+						if (res.data == '' || res.data == undefined || res.data == null) {
+							colsJson2 = DetailColsArr
+						} else {
+							colsJson2 = eval(res.data);
 						}
-					}else{
-						colsJson2=DetailColsArr
-					}	
+					} else {
+						colsJson2 = DetailColsArr
+					}
 					var param = {
-						ParentId:parentId
+						ParentId: parentId
 					};
 					table.render({
 						elem: '#LAY-app-content-list2',
@@ -401,41 +406,40 @@
 						where: param,
 						contentType: 'application/json',
 						//toolbar:'#toolbarDemo',
-						defaultToolbar:  [], //'filter','print', 'exports'
-						headers:{ToKen:$.cookie('token')},
+						defaultToolbar: [], //'filter','print', 'exports'
+						headers: { ToKen: $.cookie('token') },
 						page: true,
 						limit: pageCnt,
 						limits: pageLimits,
 						cellMinWidth: 60, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板
-						done: function() {
+						done: function () {
 							setRight()
 							//鑷畾涔夊垪瀹�
-							SetTableColW('LAY-app-content-list2','BllAsn/GetProcurePlanNoticeDetailList',DetailColsSysArr);	
-						},						
+							SetTableColW('LAY-app-content-list2', 'BllAsn/GetProcurePlanNoticeDetailList', DetailColsSysArr);
+						},
 						cols: colsJson2
 					});
 				});
 				//#endregion
 			}
 
-			function setRight()
-			{
-				$(function() {
+			function setRight() {
+				$(function () {
 					$(".clossClass").hide();//鍏冲崟
 					$(".createClass").hide();//鐢熸垚鍏ュ簱鍗�
-					
+
 				});
-				sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) {
+				sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
 					if (res.code == 200) { //鎴愬姛 
 						for (var k = 0; k < res.data.length; k++) {
 							if (res.data[k].MenuName == "鐢熸垚鍏ュ簱鍗�") {
-								$(function() {
+								$(function () {
 									$(".createClass").show();
 								});
 							}
 							if (res.data[k].MenuName == "鍏抽棴閲囪喘鍗�") {
-								$(function() {
-									$(".clossClass").show(); 
+								$(function () {
+									$(".clossClass").show();
 								});
 							}
 						}
@@ -443,7 +447,7 @@
 						layer.msg('鑾峰彇鏉冮檺淇℃伅澶辫触', {
 							icon: 2,
 							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-						}, function() {});
+						}, function () { });
 					}
 				});
 			}
@@ -451,21 +455,20 @@
 			// 椤甸潰鐩戞帶锛岀偣鍑绘煡璇㈠姞杞藉叆搴撴�诲崟
 			form.on('submit(LAY-app-contlist-search)', function (data) {
 				refreshTable();
-				refreshTablemx();	
+				refreshTablemx();
 			});
-			 
+
 
 			var ImportId = 0;
 			table.on('tool(LAY-app-content-list)', function (obj) {
 				var data = obj.data;
-				switch(obj.event)
-				{					
-					case "closs" :
+				switch (obj.event) {
+					case "closs":
 						// 浠g爜鍖哄煙
-						layer.confirm('纭畾鍏抽棴姝ゅ崟鎹悧锛�', function(index) { 	
+						layer.confirm('纭畾鍏抽棴姝ゅ崟鎹悧锛�', function (index) {
 							// 浠g爜鍖哄煙
 							var param = {
-								Id:data.Id,
+								Id: data.Id,
 							};
 							sendData(IP + "/BllAsn/CloseProcurePlan", param, 'post', function (res) {
 								if (res.code == 0) { //鎴愬姛
@@ -485,22 +488,21 @@
 							});
 						});
 
-						break;		
-					default:break;
+						break;
+					default: break;
 				}
 			});
 			//鏄庣粏琛ㄦ搷浣滄爮浜嬩欢
 			table.on('tool(LAY-app-content-list2)', function (obj) {
 				var data = obj.data;
 				var id = data.Id;
-				switch(obj.event)
-				{
-					case "createOrd" :
+				switch (obj.event) {
+					case "createOrd":
 						// 浠g爜鍖哄煙
-						layer.confirm('纭畾鐢熸垚鍏ュ簱鍗曟嵁鍚楋紵', function(index) { 	
+						layer.confirm('纭畾鐢熸垚鍏ュ簱鍗曟嵁鍚楋紵', function (index) {
 							// 浠g爜鍖哄煙
 							var param = {
-								Id:data.Id,
+								Id: data.Id,
 							};
 							sendData(IP + "/BllAsn/CreateAsnByProcurePlan", param, 'post', function (res) {
 								if (res.code == 0) { //鎴愬姛
@@ -521,28 +523,28 @@
 						});
 
 						break;
-					default:break;
+					default: break;
 				}
 			});
 
 			//#region 鑷畾涔夎〃澶�
 			//鑷畾涔夎〃澶�			
 			active = {
-				customCols: function(){
+				customCols: function () {
 					layer.open({
 						type: 2,
 						title: '鑷畾涔夊垪',
-						content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetProcurePlanNoticeList&ColsSysArr='+TotalColsSysArr,
+						content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetProcurePlanNoticeList&ColsSysArr=' + TotalColsSysArr,
 						maxmin: false,
 						resize: false,
 						area: ['970px', '650px']
 					});
 				},
-				customCols2: function(){
+				customCols2: function () {
 					layer.open({
 						type: 2,
 						title: '鑷畾涔夊垪',
-						content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetProcurePlanNoticeDetailList&ColsSysArr='+DetailColsSysArr,
+						content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetProcurePlanNoticeDetailList&ColsSysArr=' + DetailColsSysArr,
 						maxmin: false,
 						resize: false,
 						area: ['970px', '650px']
@@ -550,7 +552,7 @@
 				}
 
 			};
-			$('.layui-btn').on('click', function() {
+			$('.layui-btn').on('click', function () {
 				var type = $(this).data('type');
 				active[type] ? active[type].call(this) : '';
 			});

--
Gitblit v1.8.0