1 Star 0 Fork 1

邹大大sir/AssetsSysHtml

forked from 天辰/AssetsSysHtml 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
assets-modify.html 7.66 KB
一键复制 编辑 原始数据 按行查看 历史
天辰 提交于 2020-04-25 00:03 . 修改部分内容
<!DOCTYPE html>
<html class="x-admin-sm">
<head>
<meta charset="UTF-8">
<title>学校固定资产管理系统</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" href="./css/font.css">
<link rel="stylesheet" href="./css/xadmin.css">
<link rel="stylesheet" href="./lib/layui/css/modules/layer/default/layer.css">
<script type="text/javascript" src="./lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="./js/xadmin.js"></script>
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="layui-fluid">
<div class="layui-row">
<form class="layui-form">
<div class="layui-form-item">
<label for="L_newstatus" class="layui-form-label">资产状况</label>
<div class="layui-input-block" style="width: 190px;">
<select id="L_newstatus" name="NewStateId" lay-filter="status" lay-verify="required">
<option value="">请选择</option>
</select>
</div>
</div>
<div class="layui-form-item">
<label for="L_modifyDescribe" class="layui-form-label">资产描述</label>
<div class="layui-input-inline">
<input type="text" id="L_modifyDescribe" name="ModifyDescribe" lay-verify="required" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label for="" class="layui-form-label">接收人</label>
<div class="layui-input-inline" style="width: 90px;">
<select id="L_department" name="department" lay-filter="department" lay-verify="required">
<option value="">请选择</option>
</select>
</div>
<div class="layui-input-inline" style="width: 90px;">
<select id="L_acceptid" name="AcceptId" lay-filter="principalUser" lay-verify="required">
<option value="">请选择</option>
</select>
</div>
</div>
<div class="layui-form-item">
<label for="L_repass" class="layui-form-label"></label>
<button class="layui-btn layui-btn-lg" style="width:190px" lay-submit="" lay-filter="add">变动</button>
</div>
</form>
</div>
</div>
<script>layui.use(['form', 'layer', 'jquery'],
function () {
var assetsId = parent.pid;
$ = layui.jquery;
var form = layui.form,
layer = layui.layer;
//监听提交
form.on('submit(add)',
function (data) {
data.field
$.ajax({
type: "POST",
headers: { "token": sessionStorage.getItem("token") },
url: sessionStorage.getItem("api") + "modifylog/" + assetsId + "/infos",
data: data.field,
contentType: "application/x-www-form-urlencoded",
dataType: "Json",
success: function (res) {
if (res.Code == 200) {
layer.closeAll('loading');
layer.msg(res.Data, {
time: 1500
}, function () {
//关闭当前frame
xadmin.close();
// 对父窗口进行刷新
xadmin.father_reload();
})
} else {
layer.closeAll('loading');
layer.msg(res.ErrorMessage);
}
}
});
return false;
});
//获取状况
$.ajax({
type: "GET",
headers: { "token": sessionStorage.getItem("token") },
url: sessionStorage.getItem("api") + "status/infos",
dataType: "Json",
success: function (res) {
if (res.Code == 200) {
var html = '';
for (var i = 0; i < res.Data.length; i++) {
var item = res.Data[i];
html += '<option value="' + item.Id + '">' + item.StatusName + '</option>'
}
$("#L_newstatus").append(html);
form.render();
} else {
layer.msg(res.ErrorMessage);
}
}
})
//获取部门
$.ajax({
type: "GET",
headers: { "token": sessionStorage.getItem("token") },
url: sessionStorage.getItem("api") + "department/infos",
dataType: "Json",
success: function (res) {
if (res.Code == 200) {
var html = '';
for (var i = 0; i < res.Data.Count; i++) {
var item = res.Data.Data[i];
html += '<option value="' + item.Id + '">' + item.DepartmentName + '</option>'
}
$("#L_department").append(html);
form.render();
} else {
layer.msg(res.ErrorMessage);
}
}
})
//加载部门的用户
form.on('select(department)', function (data) {
$.ajax({
type: "GET",
headers: { "token": sessionStorage.getItem("token") },
url: sessionStorage.getItem("api") + 'department/' + data.value + '/list',
dataType: "Json",
success: function (res) {
if (res.Code == 200) {
var html = '<option value="">请选择</option>';
for (var i = 0; i < res.Data.length; i++) {
var item = res.Data[i];
html += '<option value="' + item.Id + '">' + item.UserName + '</option>'
}
$("#L_acceptid").html(html);
form.render();
} else {
layer.msg(res.ErrorMessage);
}
}
})
});
});
</script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
HTML
1
https://gitee.com/zou-dada-sir/AssetsSysHtml.git
git@gitee.com:zou-dada-sir/AssetsSysHtml.git
zou-dada-sir
AssetsSysHtml
AssetsSysHtml
master

搜索帮助