1288 lines
69 KiB
HTML
1288 lines
69 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<base href="/inspection/">
|
|
<meta charset="utf-8">
|
|
<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.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
|
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
|
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
|
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
|
<link rel="stylesheet" href="assets/js/vendor/viewer/viewer.min.css">
|
|
</head>
|
|
<body>
|
|
<div class="layui-fluid layui-anim layui-anim-fadein">
|
|
<div class="layui-card">
|
|
<div class="layui-card-header">
|
|
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
|
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
|
|
<a href="javascript:void(0);"><cite>新增内容</cite></a>
|
|
</span>
|
|
</div>
|
|
<div class="layui-card-body" style="padding: 15px;">
|
|
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
|
<blockquote class="layui-elem-quote">基础信息</blockquote>
|
|
<div class="layui-row">
|
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">名称</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="name" name="name" class="layui-input" value="" placeholder="请输入名称" lay-verify="required">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">类型</label>
|
|
<div class="layui-input-block layui-form" id="typeSelectTemplateBox" lay-filter="typeSelectTemplateBox"></div>
|
|
<script id="typeSelectTemplate" type="text/html">
|
|
<select id="type" name="type">
|
|
<option value="">请选择类型</option>
|
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
|
{{# } }}
|
|
</select>
|
|
</script>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">所属分类</label>
|
|
<div class="layui-input-block layui-form" id="classifySelectTemplateBox" lay-filter="classifySelectTemplateBox"></div>
|
|
<script id="classifySelectTemplate" type="text/html">
|
|
<select id="classify" name="classify">
|
|
<option value="">请选择所属分类</option>
|
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
|
{{# } }}
|
|
</select>
|
|
</script>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-row">
|
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">1级区域</label>
|
|
<div class="layui-input-block layui-form" id="area1SelectTemplateBox" lay-filter="area1SelectTemplateBox"></div>
|
|
<script id="area1SelectTemplate" type="text/html">
|
|
<select id="area1" name="area1" lay-filter="area1">
|
|
<option value="">请选择1级区域</option>
|
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
|
{{# } }}
|
|
</select>
|
|
</script>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">2级区域</label>
|
|
<div class="layui-input-block layui-form" id="area2SelectTemplateBox" lay-filter="area2SelectTemplateBox"></div>
|
|
<script id="area2SelectTemplate" type="text/html">
|
|
<select id="area2" name="area2" lay-filter="area2">
|
|
<option value="">请选择2级区域</option>
|
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
|
{{# } }}
|
|
</select>
|
|
</script>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">3级区域</label>
|
|
<div class="layui-input-block layui-form" id="area3SelectTemplateBox" lay-filter="area3SelectTemplateBox"></div>
|
|
<script id="area3SelectTemplate" type="text/html">
|
|
<select id="area3" name="area3" lay-filter="area3">
|
|
<option value="">请选择3级区域</option>
|
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
|
{{# } }}
|
|
</select>
|
|
</script>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-row">
|
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">4级区域</label>
|
|
<div class="layui-input-block layui-form" id="area4SelectTemplateBox" lay-filter="area4SelectTemplateBox"></div>
|
|
<script id="area4SelectTemplate" type="text/html">
|
|
<select id="area4" name="area4" lay-filter="area4">
|
|
<option value="">请选择4级区域</option>
|
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
|
{{# } }}
|
|
</select>
|
|
</script>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">5级区域</label>
|
|
<div class="layui-input-block layui-form" id="area5SelectTemplateBox" lay-filter="area5SelectTemplateBox"></div>
|
|
<script id="area5SelectTemplate" type="text/html">
|
|
<select id="area5" name="area5">
|
|
<option value="">请选择5级区域</option>
|
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
|
{{# } }}
|
|
</select>
|
|
</script>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
|
<div class="layui-form-item" pane>
|
|
<label class="layui-form-label">是否注销</label>
|
|
<div class="layui-input-block">
|
|
<input type="radio" name="isLogOff" value="0" title="否" checked>
|
|
<input type="radio" name="isLogOff" value="1" title="是">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">详细地址</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="address" name="address" class="layui-input" value="" placeholder="请输入详细地址" >
|
|
</div>
|
|
</div>
|
|
<div class="layui-row">
|
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">行业类型</label>
|
|
<div class="layui-input-block layui-form" id="industryTypeSelectTemplateBox" lay-filter="industryTypeSelectTemplateBox"></div>
|
|
<script id="industryTypeSelectTemplate" type="text/html">
|
|
<select id="industryType" name="industryType" lay-filter="industryType">
|
|
<option value="">请选择行业类型</option>
|
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
|
{{# } }}
|
|
</select>
|
|
</script>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">管理行业</label>
|
|
<div class="layui-input-block layui-form" id="industrySelectTemplateBox" lay-filter="industrySelectTemplateBox"></div>
|
|
<script id="industrySelectTemplate" type="text/html">
|
|
<select id="industry" name="industry">
|
|
<option value="">请选择管理行业</option>
|
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
|
{{# } }}
|
|
</select>
|
|
</script>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">场所性质</label>
|
|
<div class="layui-input-block layui-form" id="natureSelectTemplateBox" lay-filter="natureSelectTemplateBox"></div>
|
|
<script id="natureSelectTemplate" type="text/html">
|
|
<select id="nature" name="nature">
|
|
<option value="">请选择场所性质</option>
|
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
|
{{# } }}
|
|
</select>
|
|
</script>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-row">
|
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">从业人数</label>
|
|
<div class="layui-input-block">
|
|
<input type="number" id="engagedCount" name="engagedCount" class="layui-input" value="1" placeholder="请输入从业人数" lay-verify="required">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">风险作业</label>
|
|
<div class="layui-input-block layui-form" id="riskOperationSelectTemplateBox" lay-filter="riskOperationSelectTemplateBox"></div>
|
|
<script id="riskOperationSelectTemplate" type="text/html">
|
|
<select id="riskOperation" name="riskOperation">
|
|
<option value="">请选择风险作业</option>
|
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
|
{{# } }}
|
|
</select>
|
|
</script>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
|
<div class="layui-form-item" pane>
|
|
<label class="layui-form-label">商住楼下</label>
|
|
<div class="layui-input-block">
|
|
<input type="radio" name="isCommercialDownstairs" value="0" title="否" checked>
|
|
<input type="radio" name="isCommercialDownstairs" value="1" title="是">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item layui-form-text">
|
|
<label class="layui-form-label">厂区大门</label>
|
|
<div class="layui-input-block">
|
|
<input type="hidden" id="factoryGate" name="factoryGate">
|
|
<div class="layui-btn-container" id="factoryGateFileBox" style="border: 1px solid #e6e6e6;"></div>
|
|
<script id="factoryGateFileDownload" type="text/html">
|
|
{{# var fileName = 'factoryGate'; }}
|
|
{{# if(d[fileName].length > 0) { }}
|
|
{{# var files = d[fileName];}}
|
|
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
|
<div class="upload-image-box">
|
|
<span class="upload-image-span">
|
|
<img src="route/file/downloadfile/false/{{item.fileId}}" align="加载失败">
|
|
</span>
|
|
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-image" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="factoryGateRemoveFile">
|
|
<i class="fa fa-trash-o"></i>
|
|
</a>
|
|
</div>
|
|
{{# } }}
|
|
{{# } }}
|
|
{{# if(d[fileName].length < 9) { }}
|
|
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
|
<a href="javascript:void(0);" lay-form-button data-explain="厂区大门" data-name="factoryGate" lay-filter="factoryGateUploadFile">
|
|
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
|
</a>
|
|
</div>
|
|
{{# } }}
|
|
</script>
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item layui-form-text">
|
|
<label class="layui-form-label">作业场所</label>
|
|
<div class="layui-input-block">
|
|
<input type="hidden" id="workplace" name="workplace">
|
|
<div class="layui-btn-container" id="workplaceFileBox" style="border: 1px solid #e6e6e6;"></div>
|
|
<script id="workplaceFileDownload" type="text/html">
|
|
{{# var fileName = 'workplace'; }}
|
|
{{# if(d[fileName].length > 0) { }}
|
|
{{# var files = d[fileName];}}
|
|
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
|
<div class="upload-image-box">
|
|
<span class="upload-image-span">
|
|
<img src="route/file/downloadfile/false/{{item.fileId}}" align="加载失败">
|
|
</span>
|
|
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-image" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="workplaceRemoveFile">
|
|
<i class="fa fa-trash-o"></i>
|
|
</a>
|
|
</div>
|
|
{{# } }}
|
|
{{# } }}
|
|
{{# if(d[fileName].length < 9) { }}
|
|
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
|
<a href="javascript:void(0);" lay-form-button data-explain="作业场所" data-name="workplace" lay-filter="workplaceUploadFile">
|
|
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
|
</a>
|
|
</div>
|
|
{{# } }}
|
|
</script>
|
|
</div>
|
|
</div>
|
|
<blockquote class="layui-elem-quote">组织机构信息</blockquote>
|
|
<div class="layui-row">
|
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">组织机构码</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="bussinessRegNum" name="bussinessRegNum" class="layui-input" value="" placeholder="请输入组织机构代码证">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">开始日期</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="bussinessLicenseStartDate" name="bussinessLicenseStartDate" class="layui-input" value="" placeholder="请输入营业开始日期">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">结束日期</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="bussinessLicenseEndDate" name="bussinessLicenseEndDate" class="layui-input" value="" placeholder="请输入营业结束日期">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item layui-form-text">
|
|
<label class="layui-form-label">营业范围</label>
|
|
<div class="layui-input-block">
|
|
<textarea id="summary" name="summary" class="layui-textarea" placeholder="请输入营业范围"></textarea>
|
|
</div>
|
|
</div>
|
|
<div class=" layui-form-item layui-form-text">
|
|
<label class="layui-form-label">营业执照</label>
|
|
<div class="layui-input-block">
|
|
<input type="hidden" id="bussinessLicense" name="bussinessLicense">
|
|
<div class="layui-btn-container" id="bussinessLicenseFileBox" style="border: 1px solid #e6e6e6;"></div>
|
|
<script id="bussinessLicenseFileDownload" type="text/html">
|
|
{{# var fileName = 'bussinessLicense'; }}
|
|
{{# if(d[fileName].length > 0) { }}
|
|
{{# var files = d[fileName];}}
|
|
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
|
<div class="upload-image-box">
|
|
<span class="upload-image-span">
|
|
<img src="route/file/downloadfile/false/{{item.fileId}}" align="加载失败">
|
|
</span>
|
|
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-image" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="bussinessLicenseRemoveFile">
|
|
<i class="fa fa-trash-o"></i>
|
|
</a>
|
|
</div>
|
|
{{# } }}
|
|
{{# } }}
|
|
{{# if(d[fileName].length < 1) { }}
|
|
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
|
<a href="javascript:void(0);" lay-form-button data-explain="营业执照" data-name="bussinessLicense" lay-filter="bussinessLicenseUploadFile">
|
|
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
|
</a>
|
|
</div>
|
|
{{# } }}
|
|
</script>
|
|
</div>
|
|
</div>
|
|
<blockquote class="layui-elem-quote">法人信息</blockquote>
|
|
<div class="layui-row">
|
|
<div class="layui-col-md6 layui-col-sm6 layui-col-xs12">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">法人</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="legalPerson" name="legalPerson" class="layui-input" value="" placeholder="请输入法人">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md6 layui-col-sm6 layui-col-xs12">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">法人电话</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="legalPhone" name="legalPhone" class="layui-input" value="" placeholder="请输入法人电话">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-row">
|
|
<div class="layui-col-md6 layui-col-sm6 layui-col-xs12">
|
|
<div class=" layui-form-item layui-form-text">
|
|
<label class="layui-form-label">法人身份证正面照片</label>
|
|
<div class="layui-input-block">
|
|
<input type="hidden" id="legalIdCardFront" name="legalIdCardFront">
|
|
<div class="layui-btn-container" id="legalIdCardFrontFileBox" style="border: 1px solid #e6e6e6;"></div>
|
|
<script id="legalIdCardFrontFileDownload" type="text/html">
|
|
{{# var fileName = 'legalIdCardFront'; }}
|
|
{{# if(d[fileName].length > 0) { }}
|
|
{{# var files = d[fileName];}}
|
|
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
|
<div class="upload-image-box">
|
|
<span class="upload-image-span">
|
|
<img src="route/file/downloadfile/false/{{item.fileId}}" align="加载失败">
|
|
</span>
|
|
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-image" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="legalIdCardFrontRemoveFile">
|
|
<i class="fa fa-trash-o"></i>
|
|
</a>
|
|
</div>
|
|
{{# } }}
|
|
{{# } }}
|
|
{{# if(d[fileName].length < 1) { }}
|
|
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
|
<a href="javascript:void(0);" lay-form-button data-explain="法人身份证正面照片" data-name="legalIdCardFront" lay-filter="legalIdCardFrontUploadFile">
|
|
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
|
</a>
|
|
</div>
|
|
{{# } }}
|
|
</script>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md6 layui-col-sm6 layui-col-xs12">
|
|
<div class=" layui-form-item layui-form-text">
|
|
<label class="layui-form-label">法人身份证反面照片</label>
|
|
<div class="layui-input-block">
|
|
<input type="hidden" id="legalIdCardBack" name="legalIdCardBack">
|
|
<div class="layui-btn-container" id="legalIdCardBackFileBox" style="border: 1px solid #e6e6e6;"></div>
|
|
<script id="legalIdCardBackFileDownload" type="text/html">
|
|
{{# var fileName = 'legalIdCardBack'; }}
|
|
{{# if(d[fileName].length > 0) { }}
|
|
{{# var files = d[fileName];}}
|
|
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
|
<div class="upload-image-box">
|
|
<span class="upload-image-span">
|
|
<img src="route/file/downloadfile/false/{{item.fileId}}" align="加载失败">
|
|
</span>
|
|
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-image" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="legalIdCardBackRemoveFile">
|
|
<i class="fa fa-trash-o"></i>
|
|
</a>
|
|
</div>
|
|
{{# } }}
|
|
{{# } }}
|
|
{{# if(d[fileName].length < 1) { }}
|
|
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
|
<a href="javascript:void(0);" lay-form-button data-explain="法人身份证反面照片" data-name="legalIdCardBack" lay-filter="legalIdCardBackUploadFile">
|
|
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
|
</a>
|
|
</div>
|
|
{{# } }}
|
|
</script>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<blockquote class="layui-elem-quote">负责人信息</blockquote>
|
|
<div class="layui-row">
|
|
<div class="layui-col-md6 layui-col-sm6 layui-col-xs12">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">负责人</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="master" name="master" class="layui-input" value="" placeholder="请输入负责人">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md6 layui-col-sm6 layui-col-xs12">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label">联系电话</label>
|
|
<div class="layui-input-block">
|
|
<input type="text" id="phone" name="phone" class="layui-input" value="" placeholder="请输入联系电话">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-row">
|
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
|
<div class=" layui-form-item layui-form-text">
|
|
<label class="layui-form-label">负责人身份证正面照片</label>
|
|
<div class="layui-input-block">
|
|
<input type="hidden" id="masterIdCardFront" name="masterIdCardFront">
|
|
<div class="layui-btn-container" id="masterIdCardFrontFileBox" style="border: 1px solid #e6e6e6;"></div>
|
|
<script id="masterIdCardFrontFileDownload" type="text/html">
|
|
{{# var fileName = 'masterIdCardFront'; }}
|
|
{{# if(d[fileName].length > 0) { }}
|
|
{{# var files = d[fileName];}}
|
|
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
|
<div class="upload-image-box">
|
|
<span class="upload-image-span">
|
|
<img src="route/file/downloadfile/false/{{item.fileId}}" align="加载失败">
|
|
</span>
|
|
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-image" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="masterIdCardFrontRemoveFile">
|
|
<i class="fa fa-trash-o"></i>
|
|
</a>
|
|
</div>
|
|
{{# } }}
|
|
{{# } }}
|
|
{{# if(d[fileName].length < 1) { }}
|
|
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
|
<a href="javascript:void(0);" lay-form-button data-explain="负责人身份证正面照片" data-name="masterIdCardFront" lay-filter="masterIdCardFrontUploadFile">
|
|
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
|
</a>
|
|
</div>
|
|
{{# } }}
|
|
</script>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
|
<div class=" layui-form-item layui-form-text">
|
|
<label class="layui-form-label">负责人身份证反面照片</label>
|
|
<div class="layui-input-block">
|
|
<input type="hidden" id="masterIdCardBack" name="masterIdCardBack">
|
|
<div class="layui-btn-container" id="masterIdCardBackFileBox" style="border: 1px solid #e6e6e6;"></div>
|
|
<script id="masterIdCardBackFileDownload" type="text/html">
|
|
{{# var fileName = 'masterIdCardBack'; }}
|
|
{{# if(d[fileName].length > 0) { }}
|
|
{{# var files = d[fileName];}}
|
|
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
|
<div class="upload-image-box">
|
|
<span class="upload-image-span">
|
|
<img src="route/file/downloadfile/false/{{item.fileId}}" align="加载失败">
|
|
</span>
|
|
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-image" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="masterIdCardBackRemoveFile">
|
|
<i class="fa fa-trash-o"></i>
|
|
</a>
|
|
</div>
|
|
{{# } }}
|
|
{{# } }}
|
|
{{# if(d[fileName].length < 1) { }}
|
|
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
|
<a href="javascript:void(0);" lay-form-button data-explain="负责人身份证反面照片" data-name="masterIdCardBack" lay-filter="masterIdCardBackUploadFile">
|
|
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
|
</a>
|
|
</div>
|
|
{{# } }}
|
|
</script>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-col-md4 layui-col-sm4 layui-col-xs12">
|
|
<div class=" layui-form-item layui-form-text">
|
|
<label class="layui-form-label">法人授权书照片</label>
|
|
<div class="layui-input-block">
|
|
<input type="hidden" id="masterLegalCertificate" name="masterLegalCertificate">
|
|
<div class="layui-btn-container" id="masterLegalCertificateFileBox" style="border: 1px solid #e6e6e6;"></div>
|
|
<script id="masterLegalCertificateFileDownload" type="text/html">
|
|
{{# var fileName = 'masterLegalCertificate'; }}
|
|
{{# if(d[fileName].length > 0) { }}
|
|
{{# var files = d[fileName];}}
|
|
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
|
<div class="upload-image-box">
|
|
<span class="upload-image-span">
|
|
<img src="route/file/downloadfile/false/{{item.fileId}}" align="加载失败">
|
|
</span>
|
|
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-image" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="masterLegalCertificateRemoveFile">
|
|
<i class="fa fa-trash-o"></i>
|
|
</a>
|
|
</div>
|
|
{{# } }}
|
|
{{# } }}
|
|
{{# if(d[fileName].length < 1) { }}
|
|
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
|
<a href="javascript:void(0);" lay-form-button data-explain="法人授权书照片" data-name="masterLegalCertificate" lay-filter="masterLegalCertificateUploadFile">
|
|
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
|
</a>
|
|
</div>
|
|
{{# } }}
|
|
</script>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item layui-layout-admin">
|
|
<div class="layui-input-block">
|
|
<div class="layui-footer" style="left: 0;">
|
|
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交新增</button>
|
|
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
|
<script src="assets/layuiadmin/layui/layui.js"></script>
|
|
<script>
|
|
layui.config({
|
|
base: 'assets/layuiadmin/' //静态资源所在路径
|
|
}).extend({
|
|
index: 'lib/index' //主入口模块
|
|
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
|
|
var $ = layui.$;
|
|
var form = layui.form;
|
|
var laytpl = layui.laytpl;
|
|
var laydate = layui.laydate;
|
|
var viewerObj = {};
|
|
|
|
function closeBox() {
|
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
|
}
|
|
|
|
// 初始化日期
|
|
function initDate() {
|
|
// 日期选择
|
|
laydate.render({
|
|
elem: '#bussinessLicenseStartDate',
|
|
format: 'yyyy-MM-dd',
|
|
trigger: 'click'
|
|
});
|
|
laydate.render({
|
|
elem: '#bussinessLicenseEndDate',
|
|
format: 'yyyy-MM-dd',
|
|
trigger: 'click'
|
|
});
|
|
}
|
|
initDate();
|
|
|
|
function refreshDownloadTemplet(fileName, file) {
|
|
var dataRander = {};
|
|
dataRander[fileName] = file;
|
|
|
|
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
|
document.getElementById(fileName +'FileBox').innerHTML = html;
|
|
});
|
|
}
|
|
|
|
// 初始化文件列表
|
|
function initFileList(fileName, ids, callback) {
|
|
var dataForm = {};
|
|
dataForm[fileName] = ids;
|
|
form.val('dataForm', dataForm);
|
|
|
|
if(!ids) {
|
|
refreshDownloadTemplet(fileName, []);
|
|
if(callback) {
|
|
callback(fileName, []);
|
|
}
|
|
return;
|
|
}
|
|
|
|
top.restAjax.get(top.restAjax.path('api/file/listfilebyfileid', []), {
|
|
ids: ids
|
|
}, null, function(code, data) {
|
|
refreshDownloadTemplet(fileName, data);
|
|
if(callback) {
|
|
callback(fileName, data);
|
|
}
|
|
}, function(code, data) {
|
|
top.dialog.msg(data.msg);
|
|
});
|
|
}
|
|
|
|
// 初始化选择框、单选、复选模板
|
|
function initSelectRadioCheckboxTemplate(templateId, templateBoxId, data, callback) {
|
|
laytpl(document.getElementById(templateId).innerHTML).render(data, function(html) {
|
|
document.getElementById(templateBoxId).innerHTML = html;
|
|
});
|
|
form.render('select', templateBoxId);
|
|
if(callback) {
|
|
callback();
|
|
}
|
|
}
|
|
|
|
// 初始化企业分类下拉选择
|
|
function initClassifySelect() {
|
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/27694872-7295-4b41-aaa0-297fc6dbac3e', []), {}, null, function(code, data, args) {
|
|
laytpl(document.getElementById('classifySelectTemplate').innerHTML).render(data, function(html) {
|
|
document.getElementById('classifySelectTemplateBox').innerHTML = html;
|
|
});
|
|
form.render('select', 'classifySelectTemplateBox');
|
|
}, function(code, data) {
|
|
top.dialog.msg(data.msg);
|
|
});
|
|
}
|
|
|
|
// 初始化场所性质下拉选择
|
|
function initNatureSelect() {
|
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/54c583df-6a6f-4a55-bcb3-2d6ace99b8ef', []), {}, null, function(code, data, args) {
|
|
laytpl(document.getElementById('natureSelectTemplate').innerHTML).render(data, function(html) {
|
|
document.getElementById('natureSelectTemplateBox').innerHTML = html;
|
|
});
|
|
form.render('select', 'natureSelectTemplateBox');
|
|
}, function(code, data) {
|
|
top.dialog.msg(data.msg);
|
|
});
|
|
}
|
|
|
|
// 初始化类型下拉选择
|
|
function initTypeSelect() {
|
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/612415f3-0ebb-4bc2-b713-e9fb1acc7f76', []), {}, null, function(code, data, args) {
|
|
laytpl(document.getElementById('typeSelectTemplate').innerHTML).render(data, function(html) {
|
|
document.getElementById('typeSelectTemplateBox').innerHTML = html;
|
|
});
|
|
form.render('select', 'typeSelectTemplateBox');
|
|
}, function(code, data) {
|
|
top.dialog.msg(data.msg);
|
|
});
|
|
}
|
|
|
|
// 初始化管理行业下拉选择
|
|
function initIndustryTypeSelect() {
|
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/b97630ab-45b7-45bc-a624-507d4df952ff', []), {}, null, function(code, data, args) {
|
|
laytpl(document.getElementById('industryTypeSelectTemplate').innerHTML).render(data, function(html) {
|
|
document.getElementById('industryTypeSelectTemplateBox').innerHTML = html;
|
|
});
|
|
form.render('select', 'industryTypeSelectTemplateBox');
|
|
}, function(code, data) {
|
|
top.dialog.msg(data.msg);
|
|
});
|
|
}
|
|
|
|
// 初始化管理行业下拉选择
|
|
function initIndustrySelect(industryTypeId) {
|
|
if(!industryTypeId) {
|
|
initSelectRadioCheckboxTemplate('industrySelectTemplate', 'industrySelectTemplateBox', [], function() {});
|
|
return;
|
|
}
|
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/{industryTypeId}', [industryTypeId]), {}, null, function(code, data, args) {
|
|
initSelectRadioCheckboxTemplate('industrySelectTemplate', 'industrySelectTemplateBox', data, function() {});
|
|
}, function(code, data) {
|
|
top.dialog.msg(data.msg);
|
|
});
|
|
}
|
|
|
|
// 初始化风险作业下拉选择
|
|
function initRiskOperationSelect() {
|
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/77128e8e-3e09-45b5-a48e-7a50d1b7cc32', []), {}, null, function(code, data, args) {
|
|
laytpl(document.getElementById('riskOperationSelectTemplate').innerHTML).render(data, function(html) {
|
|
document.getElementById('riskOperationSelectTemplateBox').innerHTML = html;
|
|
});
|
|
form.render('select', 'riskOperationSelectTemplateBox');
|
|
}, function(code, data) {
|
|
top.dialog.msg(data.msg);
|
|
});
|
|
}
|
|
|
|
// 初始化厂区大门图片上传
|
|
function initFactoryGateUploadFile() {
|
|
var files = $('#factoryGate').val();
|
|
initFileList('factoryGate', files, function(fileName) {
|
|
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
|
|
viewerObj[fileName] = viewer;
|
|
});
|
|
|
|
form.on('button(factoryGateUploadFile)', function(obj) {
|
|
var name = this.dataset.name;
|
|
var explain = this.dataset.explain;
|
|
top.dialog.file({
|
|
type: 'image',
|
|
title: '上传'+ explain,
|
|
width: '400px',
|
|
height: '420px',
|
|
maxFileCount: '1',
|
|
onClose: function() {
|
|
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
|
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
|
var files = $('#'+ name).val();
|
|
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
|
if(files.length > 0) {
|
|
files += ',';
|
|
}
|
|
files += file.data;
|
|
}
|
|
initFileList(name, files, function(fileName) {
|
|
viewerObj[fileName].update();
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
form.on('button(factoryGateRemoveFile)', function(obj) {
|
|
var name = this.dataset.name;
|
|
var id = this.dataset.id;
|
|
var files = $('#'+ name).val().replace(id, '');
|
|
files = files.replace(/\,+/g, ',');
|
|
if(files.charAt(0) == ',') {
|
|
files = files.substring(1);
|
|
}
|
|
if(files.charAt(files.length - 1) == ',') {
|
|
files = files.substring(0, files.length - 1);
|
|
}
|
|
initFileList(name, files, function(fileName) {
|
|
viewerObj[fileName].update();
|
|
});
|
|
});
|
|
}
|
|
|
|
// 初始化作业场所图片上传
|
|
function initWorkplaceUploadFile() {
|
|
var files = $('#workplace').val();
|
|
initFileList('workplace', files, function(fileName) {
|
|
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
|
|
viewerObj[fileName] = viewer;
|
|
});
|
|
|
|
form.on('button(workplaceUploadFile)', function(obj) {
|
|
var name = this.dataset.name;
|
|
var explain = this.dataset.explain;
|
|
top.dialog.file({
|
|
type: 'image',
|
|
title: '上传'+ explain,
|
|
width: '400px',
|
|
height: '420px',
|
|
maxFileCount: '1',
|
|
onClose: function() {
|
|
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
|
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
|
var files = $('#'+ name).val();
|
|
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
|
if(files.length > 0) {
|
|
files += ',';
|
|
}
|
|
files += file.data;
|
|
}
|
|
initFileList(name, files, function(fileName) {
|
|
viewerObj[fileName].update();
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
form.on('button(workplaceRemoveFile)', function(obj) {
|
|
var name = this.dataset.name;
|
|
var id = this.dataset.id;
|
|
var files = $('#'+ name).val().replace(id, '');
|
|
files = files.replace(/\,+/g, ',');
|
|
if(files.charAt(0) == ',') {
|
|
files = files.substring(1);
|
|
}
|
|
if(files.charAt(files.length - 1) == ',') {
|
|
files = files.substring(0, files.length - 1);
|
|
}
|
|
initFileList(name, files, function(fileName) {
|
|
viewerObj[fileName].update();
|
|
});
|
|
});
|
|
}
|
|
|
|
// 初始化营业执照图片上传
|
|
function initBussinessLicenseUploadFile() {
|
|
var files = $('#bussinessLicense').val();
|
|
initFileList('bussinessLicense', files, function(fileName) {
|
|
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
|
|
viewerObj[fileName] = viewer;
|
|
});
|
|
|
|
form.on('button(bussinessLicenseUploadFile)', function(obj) {
|
|
var name = this.dataset.name;
|
|
var explain = this.dataset.explain;
|
|
top.dialog.file({
|
|
type: 'image',
|
|
title: '上传'+ explain,
|
|
width: '400px',
|
|
height: '420px',
|
|
maxFileCount: '1',
|
|
onClose: function() {
|
|
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
|
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
|
var files = $('#'+ name).val();
|
|
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
|
if(files.length > 0) {
|
|
files += ',';
|
|
}
|
|
files += file.data;
|
|
}
|
|
initFileList(name, files, function(fileName) {
|
|
viewerObj[fileName].update();
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
form.on('button(bussinessLicenseRemoveFile)', function(obj) {
|
|
var name = this.dataset.name;
|
|
var id = this.dataset.id;
|
|
var files = $('#'+ name).val().replace(id, '');
|
|
files = files.replace(/\,+/g, ',');
|
|
if(files.charAt(0) == ',') {
|
|
files = files.substring(1);
|
|
}
|
|
if(files.charAt(files.length - 1) == ',') {
|
|
files = files.substring(0, files.length - 1);
|
|
}
|
|
initFileList(name, files, function(fileName) {
|
|
viewerObj[fileName].update();
|
|
});
|
|
});
|
|
}
|
|
|
|
// 初始化法人身份正面证照图片上传
|
|
function initlegalIdCardFrontUploadFile() {
|
|
var files = $('#legalIdCardFront').val();
|
|
initFileList('legalIdCardFront', files, function(fileName) {
|
|
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
|
|
viewerObj[fileName] = viewer;
|
|
});
|
|
|
|
form.on('button(legalIdCardFrontUploadFile)', function(obj) {
|
|
var name = this.dataset.name;
|
|
var explain = this.dataset.explain;
|
|
top.dialog.file({
|
|
type: 'image',
|
|
title: '上传'+ explain,
|
|
width: '400px',
|
|
height: '420px',
|
|
maxFileCount: '1',
|
|
onClose: function() {
|
|
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
|
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
|
var files = $('#'+ name).val();
|
|
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
|
if(files.length > 0) {
|
|
files += ',';
|
|
}
|
|
files += file.data;
|
|
}
|
|
initFileList(name, files, function(fileName) {
|
|
viewerObj[fileName].update();
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
form.on('button(legalIdCardFrontRemoveFile)', function(obj) {
|
|
var name = this.dataset.name;
|
|
var id = this.dataset.id;
|
|
var files = $('#'+ name).val().replace(id, '');
|
|
files = files.replace(/\,+/g, ',');
|
|
if(files.charAt(0) == ',') {
|
|
files = files.substring(1);
|
|
}
|
|
if(files.charAt(files.length - 1) == ',') {
|
|
files = files.substring(0, files.length - 1);
|
|
}
|
|
initFileList(name, files, function(fileName) {
|
|
viewerObj[fileName].update();
|
|
});
|
|
});
|
|
}
|
|
|
|
// 初始化法人身份证背面照图片上传
|
|
function initlegalIdCardBackUploadFile() {
|
|
var files = $('#legalIdCardBack').val();
|
|
initFileList('legalIdCardBack', files, function(fileName) {
|
|
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
|
|
viewerObj[fileName] = viewer;
|
|
});
|
|
|
|
form.on('button(legalIdCardBackUploadFile)', function(obj) {
|
|
var name = this.dataset.name;
|
|
var explain = this.dataset.explain;
|
|
top.dialog.file({
|
|
type: 'image',
|
|
title: '上传'+ explain,
|
|
width: '400px',
|
|
height: '420px',
|
|
maxFileCount: '1',
|
|
onClose: function() {
|
|
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
|
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
|
var files = $('#'+ name).val();
|
|
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
|
if(files.length > 0) {
|
|
files += ',';
|
|
}
|
|
files += file.data;
|
|
}
|
|
initFileList(name, files, function(fileName) {
|
|
viewerObj[fileName].update();
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
form.on('button(legalIdCardBackRemoveFile)', function(obj) {
|
|
var name = this.dataset.name;
|
|
var id = this.dataset.id;
|
|
var files = $('#'+ name).val().replace(id, '');
|
|
files = files.replace(/\,+/g, ',');
|
|
if(files.charAt(0) == ',') {
|
|
files = files.substring(1);
|
|
}
|
|
if(files.charAt(files.length - 1) == ',') {
|
|
files = files.substring(0, files.length - 1);
|
|
}
|
|
initFileList(name, files, function(fileName) {
|
|
viewerObj[fileName].update();
|
|
});
|
|
});
|
|
}
|
|
|
|
// 初始化负责人身份证正面照图片上传
|
|
function initMasterIdCardFrontUploadFile() {
|
|
var files = $('#masterIdCardFront').val();
|
|
initFileList('masterIdCardFront', files, function(fileName) {
|
|
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
|
|
viewerObj[fileName] = viewer;
|
|
});
|
|
|
|
form.on('button(masterIdCardFrontUploadFile)', function(obj) {
|
|
var name = this.dataset.name;
|
|
var explain = this.dataset.explain;
|
|
top.dialog.file({
|
|
type: 'image',
|
|
title: '上传'+ explain,
|
|
width: '400px',
|
|
height: '420px',
|
|
maxFileCount: '1',
|
|
onClose: function() {
|
|
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
|
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
|
var files = $('#'+ name).val();
|
|
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
|
if(files.length > 0) {
|
|
files += ',';
|
|
}
|
|
files += file.data;
|
|
}
|
|
initFileList(name, files, function(fileName) {
|
|
viewerObj[fileName].update();
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
form.on('button(masterIdCardFrontRemoveFile)', function(obj) {
|
|
var name = this.dataset.name;
|
|
var id = this.dataset.id;
|
|
var files = $('#'+ name).val().replace(id, '');
|
|
files = files.replace(/\,+/g, ',');
|
|
if(files.charAt(0) == ',') {
|
|
files = files.substring(1);
|
|
}
|
|
if(files.charAt(files.length - 1) == ',') {
|
|
files = files.substring(0, files.length - 1);
|
|
}
|
|
initFileList(name, files, function(fileName) {
|
|
viewerObj[fileName].update();
|
|
});
|
|
});
|
|
}
|
|
|
|
// 初始化负责人身份证背面照图片上传
|
|
function initMasterIdCardBackUploadFile() {
|
|
var files = $('#masterIdCardBack').val();
|
|
initFileList('masterIdCardBack', files, function(fileName) {
|
|
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
|
|
viewerObj[fileName] = viewer;
|
|
});
|
|
|
|
form.on('button(masterIdCardBackUploadFile)', function(obj) {
|
|
var name = this.dataset.name;
|
|
var explain = this.dataset.explain;
|
|
top.dialog.file({
|
|
type: 'image',
|
|
title: '上传'+ explain,
|
|
width: '400px',
|
|
height: '420px',
|
|
maxFileCount: '1',
|
|
onClose: function() {
|
|
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
|
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
|
var files = $('#'+ name).val();
|
|
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
|
if(files.length > 0) {
|
|
files += ',';
|
|
}
|
|
files += file.data;
|
|
}
|
|
initFileList(name, files, function(fileName) {
|
|
viewerObj[fileName].update();
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
form.on('button(masterIdCardBackRemoveFile)', function(obj) {
|
|
var name = this.dataset.name;
|
|
var id = this.dataset.id;
|
|
var files = $('#'+ name).val().replace(id, '');
|
|
files = files.replace(/\,+/g, ',');
|
|
if(files.charAt(0) == ',') {
|
|
files = files.substring(1);
|
|
}
|
|
if(files.charAt(files.length - 1) == ',') {
|
|
files = files.substring(0, files.length - 1);
|
|
}
|
|
initFileList(name, files, function(fileName) {
|
|
viewerObj[fileName].update();
|
|
});
|
|
});
|
|
}
|
|
|
|
// 初始化负责人法人授权书照图片上传
|
|
function initMasterLegalCertificateUploadFile() {
|
|
var files = $('#masterLegalCertificate').val();
|
|
initFileList('masterLegalCertificate', files, function(fileName) {
|
|
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
|
|
viewerObj[fileName] = viewer;
|
|
});
|
|
|
|
form.on('button(masterLegalCertificateUploadFile)', function(obj) {
|
|
var name = this.dataset.name;
|
|
var explain = this.dataset.explain;
|
|
top.dialog.file({
|
|
type: 'image',
|
|
title: '上传'+ explain,
|
|
width: '400px',
|
|
height: '420px',
|
|
maxFileCount: '1',
|
|
onClose: function() {
|
|
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
|
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
|
var files = $('#'+ name).val();
|
|
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
|
if(files.length > 0) {
|
|
files += ',';
|
|
}
|
|
files += file.data;
|
|
}
|
|
initFileList(name, files, function(fileName) {
|
|
viewerObj[fileName].update();
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
form.on('button(masterLegalCertificateRemoveFile)', function(obj) {
|
|
var name = this.dataset.name;
|
|
var id = this.dataset.id;
|
|
var files = $('#'+ name).val().replace(id, '');
|
|
files = files.replace(/\,+/g, ',');
|
|
if(files.charAt(0) == ',') {
|
|
files = files.substring(1);
|
|
}
|
|
if(files.charAt(files.length - 1) == ',') {
|
|
files = files.substring(0, files.length - 1);
|
|
}
|
|
initFileList(name, files, function(fileName) {
|
|
viewerObj[fileName].update();
|
|
});
|
|
});
|
|
}
|
|
|
|
// 初始化1级区域下拉选择
|
|
function initArea1Select() {
|
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/81583ade-5466-49aa-b7b6-c643c131ea34', []), {}, null, function(code, data, args) {
|
|
initSelectRadioCheckboxTemplate('area1SelectTemplate', 'area1SelectTemplateBox', data);
|
|
}, function(code, data) {
|
|
top.dialog.msg(data.msg);
|
|
});
|
|
}
|
|
|
|
// 初始化2级区域下拉选择
|
|
function initArea2Select(area1) {
|
|
if(!area1) {
|
|
initSelectRadioCheckboxTemplate('area2SelectTemplate', 'area2SelectTemplateBox', []);
|
|
return;
|
|
}
|
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/{area1}', [area1]), {}, null, function(code, data, args) {
|
|
initSelectRadioCheckboxTemplate('area2SelectTemplate', 'area2SelectTemplateBox', data);
|
|
}, function(code, data) {
|
|
top.dialog.msg(data.msg);
|
|
});
|
|
}
|
|
|
|
// 初始化3级区域下拉选择
|
|
function initArea3Select(area2) {
|
|
if(!area2) {
|
|
initSelectRadioCheckboxTemplate('area3SelectTemplate', 'area3SelectTemplateBox', []);
|
|
return;
|
|
}
|
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/{area2}', [area2]), {}, null, function(code, data, args) {
|
|
initSelectRadioCheckboxTemplate('area3SelectTemplate', 'area3SelectTemplateBox', data);
|
|
}, function(code, data) {
|
|
top.dialog.msg(data.msg);
|
|
});
|
|
}
|
|
|
|
// 初始化4级区域下拉选择
|
|
function initArea4Select(area3) {
|
|
if(!area3) {
|
|
initSelectRadioCheckboxTemplate('area4SelectTemplate', 'area4SelectTemplateBox', []);
|
|
return;
|
|
}
|
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/{area3}', [area3]), {}, null, function(code, data, args) {
|
|
initSelectRadioCheckboxTemplate('area4SelectTemplate', 'area4SelectTemplateBox', data);
|
|
}, function(code, data) {
|
|
top.dialog.msg(data.msg);
|
|
});
|
|
}
|
|
|
|
// 初始化5级区域下拉选择
|
|
function initArea5Select(area4) {
|
|
if(!area4) {
|
|
initSelectRadioCheckboxTemplate('area5SelectTemplate', 'area5SelectTemplateBox', []);
|
|
return;
|
|
}
|
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/{area4}', [area4]), {}, null, function(code, data, args) {
|
|
initSelectRadioCheckboxTemplate('area5SelectTemplate', 'area5SelectTemplateBox', data);
|
|
}, function(code, data) {
|
|
top.dialog.msg(data.msg);
|
|
});
|
|
}
|
|
|
|
// 初始化内容
|
|
function initData() {
|
|
initClassifySelect();
|
|
initTypeSelect();
|
|
initIndustryTypeSelect();
|
|
initIndustrySelect();
|
|
initRiskOperationSelect();
|
|
initNatureSelect();
|
|
initFactoryGateUploadFile();
|
|
initWorkplaceUploadFile();
|
|
initArea1Select();
|
|
initArea2Select();
|
|
initArea3Select();
|
|
initArea4Select();
|
|
initArea5Select();
|
|
initBussinessLicenseUploadFile();
|
|
initlegalIdCardFrontUploadFile();
|
|
initlegalIdCardBackUploadFile();
|
|
initMasterIdCardFrontUploadFile();
|
|
initMasterIdCardBackUploadFile();
|
|
initMasterLegalCertificateUploadFile();
|
|
}
|
|
initData();
|
|
|
|
// 提交表单
|
|
form.on('submit(submitForm)', function(formData) {
|
|
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
|
top.dialog.close(index);
|
|
var loadLayerIndex;
|
|
top.restAjax.post(top.restAjax.path('api/enterprise/saveenterprise', []), formData.field, null, function(code, data) {
|
|
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
|
time: 0,
|
|
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
|
shade: 0.3,
|
|
yes: function(index) {
|
|
top.dialog.close(index);
|
|
window.location.reload();
|
|
},
|
|
btn2: function() {
|
|
closeBox();
|
|
}
|
|
});
|
|
}, function(code, data) {
|
|
top.dialog.msg(data.msg);
|
|
}, function() {
|
|
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
|
}, function() {
|
|
top.dialog.close(loadLayerIndex);
|
|
});
|
|
});
|
|
return false;
|
|
});
|
|
|
|
$('.close').on('click', function() {
|
|
closeBox();
|
|
});
|
|
|
|
// area1 选择事件
|
|
form.on('select(area1)', function(data) {
|
|
initArea2Select(data.value);
|
|
initArea3Select(data.value);
|
|
initArea4Select(data.value);
|
|
initArea5Select(data.value);
|
|
});
|
|
// area2 选择事件
|
|
form.on('select(area2)', function(data) {
|
|
initArea3Select(data.value);
|
|
initArea4Select(data.value);
|
|
initArea5Select(data.value);
|
|
});
|
|
// area3 选择事件
|
|
form.on('select(area3)', function(data) {
|
|
initArea4Select(data.value);
|
|
initArea5Select(data.value);
|
|
});
|
|
// area4 选择事件
|
|
form.on('select(area4)', function(data) {
|
|
initArea5Select(data.value);
|
|
});
|
|
|
|
// 行业类型
|
|
form.on('select(industryType)', function(data) {
|
|
initIndustrySelect(data.value);
|
|
});
|
|
|
|
// 校验
|
|
form.verify({
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |