180 lines
7.6 KiB
Plaintext
180 lines
7.6 KiB
Plaintext
<%@ page language="java" pageEncoding="UTF-8"%>
|
||
<style type="text/css">
|
||
.select2-container .select2-selection--single{
|
||
height:34px;
|
||
line-height: 34px;
|
||
}
|
||
.select2-selection__arrow{
|
||
margin-top:3px;
|
||
}
|
||
</style>
|
||
<script type="text/javascript">
|
||
//流程审核文件上传所需参数
|
||
var masterId_process = '${supplierQualification.id}';//业务Id
|
||
var tbName_process = 'TB_Process_UploadFile'; //数据表
|
||
var nameSpace_process ='ProcessUploadFile';//保存文件夹
|
||
var status = 'delete';//有删除权限
|
||
function doupdate() {
|
||
$("#subForm12").bootstrapValidator('validate');//提交验证
|
||
if ($("#subForm12").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||
$.post(ext.contextPath + "/sparepart/supplierQualification/update.do", $("#subForm12").serialize(), function(data) {
|
||
if (data.res == 1){
|
||
closeModal('subModal1');
|
||
$("#table1").bootstrapTable('refresh');
|
||
}else if(data.res == 0){
|
||
showAlert('d','保存失败');
|
||
}else{
|
||
showAlert('d',data.res);
|
||
}
|
||
},'json');
|
||
}
|
||
}
|
||
$(function(){
|
||
|
||
//初始化文件显示
|
||
getFileList_process();
|
||
var typeStatusArr = [
|
||
{"id":"启用","text":"启用"},
|
||
{"id":"禁用","text":"禁用"},
|
||
|
||
];
|
||
var selelct =$("#qualificationState").select2({
|
||
data: typeStatusArr,
|
||
placeholder:'请选择',//默认文字提示
|
||
allowClear: false,//允许清空
|
||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||
language: "zh-CN",
|
||
minimumInputLength: 0,
|
||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||
});
|
||
selelct.val('${supplierQualification.qualificationState}').trigger("change");
|
||
|
||
//选择资质类型
|
||
$.post(ext.contextPath + "/sparepart/supplierQualification/getQualificationType.do", {}, function(data) {
|
||
var selelct =$("#qualificationTypeName").select2({
|
||
data: data,
|
||
placeholder:'请选择',//默认文字提示
|
||
allowClear: false,//允许清空
|
||
escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||
language: "zh-CN",
|
||
minimumInputLength: 0,
|
||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||
formatResult: function formatRepo(repo){return repo.text;}, // 函数用来渲染结果
|
||
formatSelection: function formatRepoSelection(repo){return repo.text;} // 函数用于呈现当前的选择
|
||
});
|
||
selelct.val('${supplierQualification.qualificationType}').trigger("change");
|
||
},'json');
|
||
//选择有效日期
|
||
$('#qualificationValidityTime').datepicker({
|
||
format: 'yyyy-mm-dd ',
|
||
startView: 0,
|
||
maxViewMode: 0,
|
||
minViewMode:0,
|
||
autoclose: true,
|
||
todayHighlight: true,
|
||
language: 'zh-CN'
|
||
});
|
||
|
||
|
||
//输入框验证
|
||
$("#subForm12").bootstrapValidator({
|
||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||
fields: {
|
||
name: {
|
||
validators: {
|
||
notEmpty: {
|
||
message: '资质名字不能为空'
|
||
},
|
||
},
|
||
},
|
||
qualificationType: {
|
||
validators: {
|
||
notEmpty: {
|
||
message: '资质类型不能为空'
|
||
},
|
||
},
|
||
},
|
||
qualificationValidityTime: {
|
||
validators: {
|
||
notEmpty: {
|
||
message: '有效时间不能为空'
|
||
}
|
||
}
|
||
},
|
||
|
||
}
|
||
});
|
||
})
|
||
|
||
</script>
|
||
<div class="modal fade" id="subModal1">
|
||
<div class="modal-dialog">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||
<span aria-hidden="true">×</span></button>
|
||
<h4 class="modal-title">编辑供应商评估</h4>
|
||
</div>
|
||
<div class="modal-body">
|
||
<!-- 新增界面formid强制为subForm12 -->
|
||
<form class="form-horizontal" id="subForm12">
|
||
<!-- 界面提醒div强制id为alertDiv -->
|
||
<div id="alertDiv"></div>
|
||
<input type="hidden" class="form-control" id="id" name ="id" value="${supplierQualification.id}">
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">*资质名字</label>
|
||
<div class="col-sm-6">
|
||
<input type="text" class="form-control " id="name" name ="name" style="width: 270px;" value="${supplierQualification.name}">
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">*资质类型</label>
|
||
<div class="col-sm-6">
|
||
<select class="form-control select2" id="qualificationTypeName" name ="qualificationTypeName" style="width: 270px;"value="${supplierQualification.qualificationTypeName}" readonly ></select>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">*有效时间</label>
|
||
<div class="col-sm-6">
|
||
<div class="input-group date">
|
||
<div class="input-group-addon">
|
||
<i class="fa fa-calendar"></i>
|
||
</div>
|
||
<input type="text" class="form-control" id="qualificationValidityTime" name="qualificationValidityTime" style="width: 230px;" readonly value="${supplierQualification.qualificationValidityTime}"/>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">*资质证明附件</label>
|
||
<!-- 文件上传,显示 -->
|
||
<div class="form-group" style="margin:8px">
|
||
<label class="col-sm-2 control-label"></label>
|
||
<button type="button" class="btn btn-default btn-file" onclick="fileinput_process()" id="btn_save"><i class="fa fa-paperclip"></i>上传文件</button>
|
||
</div>
|
||
<div id="fileArea">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="col-sm-2 control-label">登记或潜在</label>
|
||
<div class="col-sm-10">
|
||
<select class="form-control select2 " id="qualificationState" name="qualificationState"
|
||
style="width: 200px;"></select>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||
<button type="button" class="btn btn-primary" onclick="doupdate()" id="btn_update">保存</button>
|
||
</div>
|
||
</div>
|
||
<!-- /.modal-content -->
|
||
</div>
|
||
<!-- /.modal-dialog -->
|
||
</div>
|