html Miva - 分页报告

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html Miva - 分页报告相关的知识,希望对你有一定的参考价值。

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>&mvt:page:name; | &mvt:store:name;</title>
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<!-- <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/css/bootstrap.min.css"> -->
	</head>
	<body>
		<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
		<script>
			var page = 0;
			var per_page = 100;
			var getOrders = function(Order_IDs){
				$.ajax({
					url: '/mm5/json.mvc',
					type: 'POST',
					data: {
						Store_Code: '&mvte:global:Store_Code;',
						Function: 'BatchReport_Run',
						Module_Code: 'templatebatchreports',
						Report_Code: 'INVOICE_2',
						Order_IDs: Order_IDs,
						Key_IDs: 4,
						// Passphrases: '',
						Session_Type: 'admin',
						Session_ID: '&mvt:global:Session_ID;'
					}
				})
				.done(function(response) {
					$('body').append(response);
				});
			};

			var Process_Order_IDs = function(Order_IDs){
				var Segment_of_Order_IDs = Order_IDs.slice(0, per_page);
				var Next_Order_IDs = Order_IDs.slice(per_page);

				getOrders(Segment_of_Order_IDs.join('|'));
				page++;

				if( Segment_of_Order_IDs.length === per_page ){
					Process_Order_IDs(Next_Order_IDs);
				}
			};

			Process_Order_IDs( "&mvte:global:Order_IDs;".split('|').sort() );
		</script>

	</body>
</html>

以上是关于html Miva - 分页报告的主要内容,如果未能解决你的问题,请参考以下文章

html Miva - 批量报告 - 饲料生成器

html Miva - 批量报告 - 获取客户登录

html Miva - 详细订单摘要批处理报告

xml Miva - 货件领料报告|总产品收入报告|汇总产品信息

sql Miva Merchant - 客户订单历史报告

html miva_array_search.html