Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/command/materialDeployEdit.jsp
2026-01-16 14:13:44 +08:00

151 lines
6.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<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">
function dolaunch() {
$('#status').val('${Status_Start}')
dosave();
}
var showUser4SelectsFun = function() {
var userIds= $("#approveCentrer").val();
$.post(ext.contextPath + '/user/userForSelect.do', {formId:"subForm",hiddenId:"approveCentrer",textId:"approveCentrerName",userIds:userIds} , function(data) {
$("#user4SelectDiv").html(data);
openModal("user4SelectModal");
});
};
//提交验收判断
$("#subForm").bootstrapValidator({
live: 'disabled',//验证时机enabled是内容有变化就验证默认disabled和submitted是提交再验证
fields: {
applyuserid: {
validators: {
notEmpty: {
message: '申请人'
}
}
},
applyreason: {
validators: {
notEmpty: {
message: '申请原因'
}
}
},
bizid: {
validators: {
notEmpty: {
message: '申请水厂'
}
}
},
}
});
/*
提交方法
*/
function dosubmit() {
$("#subForm").bootstrapValidator('validate');//提交验证
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath + "/command/materialDeploy/submit.do", $("#subForm").serialize(), function(data) {
if (data.res == 1){
closeModal('subModal');
$("#table").bootstrapTable('refresh');
}else if(data.res == 0){
showAlert('d','保存失败');
}else{
showAlert('d',data.res);
}
},'json');
}
}
function doupdate() {
$("#subForm").bootstrapValidator('validate');//提交验证
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath + "/command/materialDeploy/update.do", $("#subForm").serialize(), function(data) {
if (data.res == 1){
closeModal('subModal');
$("#table").bootstrapTable('refresh');
}else if(data.res == 0){
showAlert('d','保存失败');
}else{
showAlert('d',data.res);
}
},'json');
}
}
</script>
<div class="modal fade" id="subModal">
<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">&times;</span></button>
<h4 class="modal-title">物资调拨申请修改</h4>
</div>
<div class="modal-body">
<!-- 新增界面formid强制为subForm -->
<form class="form-horizontal" id="subForm">
<!-- 界面提醒div强制id为alertDiv -->
<div id="alertDiv"></div>
<input type="hidden" id="id" name ="id" value="${materialDeploy.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="worknumber" name ="worknumber" placeholder="工单号" value="${materialDeploy.worknumber}" readonly="true">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">*申请人</label>
<div class="col-sm-6">
<input type="text" class="form-control" id="applyusername" name ="applyusername" placeholder="申请人" value="${user.caption}" readonly="true">
<input type="hidden" class="form-control" id="applyuserid" name ="applyuserid" placeholder="申请人" value="${user.id}"
readonly="true">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">*申请水厂</label>
<div class="col-sm-6">
<input type="text" class="form-control" name ="bizidname" placeholder="申请水厂" value="${company.name}" readonly="true">
<input type="hidden" class="form-control" id="bizid" name ="bizid" placeholder="申请水厂" value="${company.id}" >
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">*申请理由</label>
<div class="col-sm-10">
<textarea class="form-control" rows="3" id="applyreason" name ="applyreason" placeholder="申请理由...">${materialDeploy.applyreason}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">*审核人员</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="approveCentrerName" name ="approveCentrerName" onfocus="this.blur();" placeholder="审核人员" onclick="showUser4SelectsFun();" value="${userapprove.caption}">
<input id="approveCentrer" name="approveCentrer" type="hidden" value="${userapprove.id}" />
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" onclick="doupdate()" id="btn_save">保存</button>
<button type="button" class="btn btn-primary" onclick="dosubmit()" id="btn_save">提交</button>
</div>
</div>
</div>
</div>