|
@@ -97,40 +97,79 @@
|
|
});
|
|
});
|
|
|
|
|
|
function insertTitle(tValue){
|
|
function insertTitle(tValue){
|
|
- $("#flagFile").val(false);
|
|
|
|
- var files = $("#attachment_file")[0].files;
|
|
|
|
- for(var i = 0;i<files.length;i++) {
|
|
|
|
- var file = files[i];
|
|
|
|
- var attachTypes = "doc,docx,pdf";
|
|
|
|
- var suffixResult = 0;
|
|
|
|
- var fileName = file.name.lastIndexOf(".");//获取到文件名开始到最后一个“.”的长度。
|
|
|
|
- var fileNameLength = file.name.length;//获取到文件名长度
|
|
|
|
- var suffix = file.name.substring(fileName + 1, fileNameLength);//截取后缀名
|
|
|
|
- suffix = suffix.toLowerCase();//后缀名转换小写
|
|
|
|
- attachTypes = attachTypes.toLowerCase();
|
|
|
|
- var attachTypeList = attachTypes.split(",");
|
|
|
|
- for (var x in attachTypeList) {
|
|
|
|
- if(attachTypeList[x] == suffix){
|
|
|
|
- suffixResult = 1;
|
|
|
|
- break;
|
|
|
|
|
|
+ var type=$("#signatureType").val()
|
|
|
|
+ if (type == '1'){
|
|
|
|
+ $("#flagFile").val(false);
|
|
|
|
+ var files = $("#attachment_file")[0].files;
|
|
|
|
+ for(var i = 0;i<files.length;i++) {
|
|
|
|
+ var file = files[i];
|
|
|
|
+ var attachTypes = "doc,docx,pdf";
|
|
|
|
+ var suffixResult = 0;
|
|
|
|
+ var fileName = file.name.lastIndexOf(".");//获取到文件名开始到最后一个“.”的长度。
|
|
|
|
+ var fileNameLength = file.name.length;//获取到文件名长度
|
|
|
|
+ var suffix = file.name.substring(fileName + 1, fileNameLength);//截取后缀名
|
|
|
|
+ suffix = suffix.toLowerCase();//后缀名转换小写
|
|
|
|
+ attachTypes = attachTypes.toLowerCase();
|
|
|
|
+ var attachTypeList = attachTypes.split(",");
|
|
|
|
+ for (var x in attachTypeList) {
|
|
|
|
+ if(attachTypeList[x] == suffix){
|
|
|
|
+ suffixResult = 1;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+ if(suffixResult == 0 ){
|
|
|
|
+ top.layer.msg("上传附件只能为:"+attachTypes+" 类型文件", {icon: 0});
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ var attachmentId = $("#id").val();
|
|
|
|
+ var attachmentFlag = "173";
|
|
|
|
+ /*console.log(file);*/
|
|
|
|
+ var timestamp=new Date().getTime();
|
|
|
|
+
|
|
|
|
+ var storeAs = "signatureProjectReportWork";
|
|
|
|
+ var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
|
|
|
|
+ var divId = "_attachment";
|
|
|
|
+ $("#addFile"+divId).show();
|
|
|
|
+ multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);
|
|
}
|
|
}
|
|
- if(suffixResult == 0 ){
|
|
|
|
- top.layer.msg("上传附件只能为:"+attachTypes+" 类型文件", {icon: 0});
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
|
|
+ }else {
|
|
|
|
+ $("#flagFile").val(false);
|
|
|
|
+ var files = $("#attachment_file")[0].files;
|
|
|
|
+ for(var i = 0;i<files.length;i++) {
|
|
|
|
+ var file = files[i];
|
|
|
|
+ var attachTypes = "doc,docx,pdf";
|
|
|
|
+ var suffixResult = 0;
|
|
|
|
+ var fileName = file.name.lastIndexOf(".");//获取到文件名开始到最后一个“.”的长度。
|
|
|
|
+ var fileNameLength = file.name.length;//获取到文件名长度
|
|
|
|
+ var suffix = file.name.substring(fileName + 1, fileNameLength);//截取后缀名
|
|
|
|
+ suffix = suffix.toLowerCase();//后缀名转换小写
|
|
|
|
+ attachTypes = attachTypes.toLowerCase();
|
|
|
|
+ var attachTypeList = attachTypes.split(",");
|
|
|
|
+ for (var x in attachTypeList) {
|
|
|
|
+ if(attachTypeList[x] == suffix){
|
|
|
|
+ suffixResult = 1;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(suffixResult == 0 ){
|
|
|
|
+ top.layer.msg("上传附件只能为:"+attachTypes+" 类型文件", {icon: 0});
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
|
|
- var attachmentId = $("#id").val();
|
|
|
|
- var attachmentFlag = "173";
|
|
|
|
- /*console.log(file);*/
|
|
|
|
- var timestamp=new Date().getTime();
|
|
|
|
|
|
+ var attachmentId = $("#id").val();
|
|
|
|
+ var attachmentFlag = "174";
|
|
|
|
+ /*console.log(file);*/
|
|
|
|
+ var timestamp=new Date().getTime();
|
|
|
|
|
|
- var storeAs = "signatureProjectReportWork";
|
|
|
|
- var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
|
|
|
|
- var divId = "_attachment";
|
|
|
|
- $("#addFile"+divId).show();
|
|
|
|
- multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);
|
|
|
|
|
|
+ var storeAs = "signatureProjectReportWork";
|
|
|
|
+ var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
|
|
|
|
+ var divId = "_attachment";
|
|
|
|
+ $("#addFile"+divId).show();
|
|
|
|
+ multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -534,12 +573,25 @@
|
|
|
|
|
|
<div class="form-group layui-row">
|
|
<div class="form-group layui-row">
|
|
<div class="form-group-label"><h2>签章基础信息</h2></div>
|
|
<div class="form-group-label"><h2>签章基础信息</h2></div>
|
|
|
|
+
|
|
<div class="layui-item layui-col-sm6 lw7">
|
|
<div class="layui-item layui-col-sm6 lw7">
|
|
- <label class="layui-form-label">签章描述:</label>
|
|
|
|
- <div class="layui-input-block">
|
|
|
|
- <form:input path="signatureName" id="signatureName" maxlength="255" htmlEscape="false" placeholder="请输入签章描述" class="form-control layui-input"/>
|
|
|
|
|
|
+ <label class="layui-form-label"><span class="require-item">*</span>签章类型:</label>
|
|
|
|
+ <div class="layui-input-block readOnlyFFF">
|
|
|
|
+ <c:if test="${projectReportSignature.signatureType == null}">
|
|
|
|
+ <form:select placeholder="请选择" path="signatureType" class="form-control required judgment editable-select layui-input" id="signatureType" value="${projectReportSignature.signatureType}">
|
|
|
|
+ <form:option value=""/>
|
|
|
|
+ <form:options items="${fns:getMainDictList('signature_type_project_report_work')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
|
|
|
|
+ </form:select>
|
|
|
|
+ </c:if>
|
|
|
|
+ <c:if test="${projectReportSignature.signatureType != null}">
|
|
|
|
+ <form:select placeholder="请选择" path="signatureType" class="form-control judgment editable-select layui-input" disabled="true" id="signatureType" value="${projectReportSignature.signatureType}">
|
|
|
|
+ <form:option value=""/>
|
|
|
|
+ <form:options items="${fns:getMainDictList('signature_type_project_report_work')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
|
|
|
|
+ </form:select>
|
|
|
|
+ </c:if>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
<%-- <div class="layui-item layui-col-sm6 lw7">--%>
|
|
<%-- <div class="layui-item layui-col-sm6 lw7">--%>
|
|
<%-- <label class="layui-form-label">签章编号:</label>--%>
|
|
<%-- <label class="layui-form-label">签章编号:</label>--%>
|
|
<%-- <div class="layui-input-block">--%>
|
|
<%-- <div class="layui-input-block">--%>
|
|
@@ -553,23 +605,6 @@
|
|
<%-- </div>--%>
|
|
<%-- </div>--%>
|
|
|
|
|
|
<div class="layui-item layui-col-sm6 lw7">
|
|
<div class="layui-item layui-col-sm6 lw7">
|
|
- <label class="layui-form-label"><span class="require-item">*</span>签章类型:</label>
|
|
|
|
- <div class="layui-input-block readOnlyFFF">
|
|
|
|
-<%-- <c:if test="${projectReportSignature.signatureType == null}">--%>
|
|
|
|
- <form:select placeholder="请选择" path="signatureType" onchange="checkType()" class="form-control required judgment editable-select layui-input" id="signatureType" value="${projectReportSignature.signatureType}">
|
|
|
|
- <form:option value=""/>
|
|
|
|
- <form:options items="${fns:getMainDictList('signature_type_project_report_work')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
|
|
|
|
- </form:select>
|
|
|
|
-<%-- </c:if>--%>
|
|
|
|
-<%-- <c:if test="${projectReportSignature.signatureType != null}">--%>
|
|
|
|
-<%-- <form:select placeholder="请选择" path="signatureType" class="form-control judgment editable-select layui-input" disabled="true" id="signatureType" value="${projectReportSignature.signatureType}">--%>
|
|
|
|
-<%-- <form:option value=""/>--%>
|
|
|
|
-<%-- <form:options items="${fns:getMainDictList('signature_type_project_report_work')}" itemLabel="label" itemValue="value" htmlEscape="false"/>--%>
|
|
|
|
-<%-- </form:select>--%>
|
|
|
|
-<%-- </c:if>--%>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="layui-item layui-col-sm6 lw7">
|
|
|
|
<label class="layui-form-label"><span class="require-item">*</span>签章责任人:</label>
|
|
<label class="layui-form-label"><span class="require-item">*</span>签章责任人:</label>
|
|
<div class="layui-input-block readOnlyFFF">
|
|
<div class="layui-input-block readOnlyFFF">
|
|
<select class="form-control judgment required layui-input" id="dutyPerson" name="dutyPerson">
|
|
<select class="form-control judgment required layui-input" id="dutyPerson" name="dutyPerson">
|
|
@@ -580,7 +615,12 @@
|
|
</select>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
|
|
+ <div class="layui-item layui-col-sm6 lw7">
|
|
|
|
+ <label class="layui-form-label">签章描述:</label>
|
|
|
|
+ <div class="layui-input-block">
|
|
|
|
+ <form:input path="signatureName" id="signatureName" maxlength="255" htmlEscape="false" placeholder="请输入签章描述" class="form-control layui-input"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
|
|
<div class="layui-item layui-col-sm6 lw7">
|
|
<div class="layui-item layui-col-sm6 lw7">
|