<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title>无纸化集中业务管理系统</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<link charset="utf-8" rel="stylesheet" href="/static/css/layui.css?v=1.0.0">
	<link rel="stylesheet" href="/static/css/temp.css" media="all">
	<script src="/static/js/jquery-1.8.2.min.js?v=1.0.0"></script>
	<script src="/static/js/crypto-js.js"></script>
	<script src="/static/js/layui.js?v=1.0.0"></script>
	<script src="/static/js/api.config.js"></script>
	<script src="/static/js/util.js?v=1.0.0"></script>
	<script src="/static/js/customform.js?v=1.0.0"></script>
	<script src="/static/js/url.js?v=1.0.0"></script>
	<script src="/static/js/lay/lay-config.js?v=1.0.0"></script>
	<script src="/static/css/inconfont/iconfont.js"></script>
</head>

<body class="bg-info">

	<div class="layui-card layui-card-form">

		<div class="layui-card-body">


			<div class="layui-tab">
				<ul class="layui-tab-title">
					<li class="layui-this">工单信息</li>
					<li>处理轨迹</li>
				</ul>
				<div class="layui-tab-content">
					<div class="layui-tab-item layui-show">

						<form class="ag-form layui-form" ag-data-index="1" ag-data-ctx="bpm" ag-data-url="/api/taskInit"
							ag-form-callBack="initTaskList">
							<input type="hidden" name="woNo" ag-verify="required" autocomplete="off" placeholder=""
								class="layui-input">
							<input type="hidden" name="taskId" ag-verify="required" autocomplete="off" placeholder=""
								class="layui-input">
							<input type="hidden" name="stepId" ag-verify="required" autocomplete="off"
								placeholder="环节编码" class="layui-input">
							<input type="hidden" name="procId" ag-verify="required" autocomplete="off"
								placeholder="流程编码" class="layui-input">
							<input type="hidden" name="procVersion" ag-verify="required" autocomplete="off"
								placeholder="流程版本" class="layui-input">
							<div class="layui-inline ">
								<label class="layui-form-label">标题：</label>
								<div class="layui-input-block">
									<input type="text" name="taskName" readonly="readonly" ag-verify="required"
										autocomplete="off" placeholder="标题" class="layui-input">
								</div>
							</div>

							<div class="layui-form-item">
								<label class="layui-form-label">附件：</label>
								<div class="ag-file" ag-file-module="wo" ag-file-iframe-add-url="/api/upload"
									ag-file-iframe-del-url="/api/delFile" ag-file-iframe-down-url="/api/download"
									ag-data-ctx="bpm" ag-file-submit-key="params.attchFileId" ag-file-key="attachList"
									ag-file-multiple="false">
								</div>
							</div>

						</form>


					</div>
					<div class="layui-tab-item">

						<div class=" layui-card  layui-card-list">

							<div class="layui-border-box ">

							</div>

							<div style="display:none" class="ag-table-header" ag-data-index="0">

								[
								[ {
								"field": "taskName",
								"title": "任务名称"
								}, {
								"field": "opNo",
								"title": "处理工号"
								}, {
								"field": "opName",
								"title": "处理人"
								}, {
								"field": "opTime",
								"title": "处理时间"
								}, {
								"field": "dealTypeDesc",
								"title": "处理状态"
								}, {
								"field": "remark",
								"title": "处理备注"
								}
								]
								]
							</div>
							<table class="ag-table layui-hide" id="demo" lay-filter="test" ag-data-index="0">

							</table>

							<div class="pagging ag-area-page">

							</div>

						</div>
					</div>

				</div>
			</div>







		</div>

		<div class="layui-card-footer">

			<button class="ag-btn-save layui-btn layui-btn-sm layui-btn-normal " ag-data-ctx="bpm"
				ag-data-url="/api/submitTask" ag-data-index="1"
				ag-save-append='{"param":{"procExeCondiVal":"同意"},"dealType":"0","dealTypeDesc":"提交"}'>
				<i class="layui-icon layui-icon-ok-circle "></i>
				<span class="btn-span-middle">提交</span>
			</button>
			<button class="ag-btn-cancel layui-btn layui-btn-sm layui-btn-normal">
				<i class="layui-icon layui-icon-close "></i>
				<span class="btn-span-middle">取消</span>
			</button>
		</div>

	</div>

	<script>

		function initTaskList(data) {


			var colsStr = $(".ag-table-header[ag-data-index=0]").html();

			var cols = decorateData(colsStr);

			//执行一个 table 实例
			layui.table.render({

				elem: $(".ag-table[ag-data-index=0]"),
				height: $(".ag-table[ag-data-index=0]").height() - 100,
				data: data, //数据接口
				title: '用户表',
				page: false, //开启分页
				totalRow: false, //开启合计行
				limit: 100,
				cols: cols
			});


		}


	</script>
</body>

</html>
