You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

161 lines
5.9 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>修改地点</title>
<meta http-equiv="Content-Type" content="text/html; 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="../../static/css/font.css">
<link rel="stylesheet" href="../../static/css/weadmin.css">
<link rel="stylesheet" href="../../lib/layui/css/layui.css">
<script src="../../lib/jquery-1.12.4.min.js"></script>
<script src="../../lib/ztree/jquery.ztree.core-3.5.min.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]-->
<style>
select {
width: 180px;
height: 38px;
line-height: 38px;
border: 1px solid #ccc;
border-radius: 3px;
font-size: 15px;
padding-left: 6px;
color: #666;
}
.inline {
display: inline-block;
vertical-align: top;
}
.disabled {
pointer-events: none;
border: 1px solid #e6e6e6;
background: #FBFBFB;
color: #C9C9C9;
cursor: not-allowed;
opacity: 1;
}
.searchTxt {
width: 164px;
border: 1px solid #dedede;
border-radius: 3px;
height: 37px;
padding-left: 13px;
vertical-align: top;
}
.search {
border: none;
margin-left: 12px;
}
.iconDel {
position: absolute;
right: 92px;
top: 10px;
display: none;
}
.aaa {
background-color: #FBFBFB;
border: 1px solid #e6e6e6;
color: #C9C9C9;
cursor: not-allowed;
opacity: 1;
}
</style>
</head>
<body>
<form>
<div class="weadmin-body">
<div class="layui-form-item inline">
<label for="" class="layui-form-label" style="padding:9px 0;text-align: left;width:120px">
地点名称
</label>
<input type="text" id="place_name" value="" class="searchTxt" placeholder="请输入地点名称">
</div>
<div class="layui-form-item inline">
<label for="" class="layui-form-label" style="padding:9px 0;text-align: left;width:120px">
排序编码
</label>
<input type="text" id="place_sort" value="" class="searchTxt" placeholder="请输入排序编码">
</div>
<div class="layui-form-item">
<label class="layui-form-label" style="padding:9px 0;text-align: left;width:120px">测温标识</label>
<div class="layui-form">
<input type="radio" name="place_temperature_flag" value="1" title="是">
<input type="radio" name="place_temperature_flag" value="0" title="否" checked>
</div>
</div>
<div class="layui-form-item" align="center">
<buttin class="layui-btn" id="save">保存</buttin>
</div>
</div>
<script src="../../lib/layui/layui.js"></script>
<script>
layui.extend({
admin: '{/}../../static/js/admin'
});
layui.use(['form', 'jquery', 'admin', 'table','element'], function () {
var form = layui.form,
$ = layui.jquery,
admin = layui.admin,
table = layui.table,
element = layui.element;
//获取url传参的办法
window.GetQueryString = function (name, istop) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (typeof (istop) != "undefined") r = top.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
};
$(document).on('click', '#save', function (data) {
var place_name = $("#place_name").val();
var place_sort = $("#place_sort").val();
var place_temperature_flag = $("input[name='place_temperature_flag']:checked").val();
if (place_name === "") {
layer.msg('输入的地点名称为空,请检查后重新输入!', {icon: 2, time: 2000, shade: 0.1});
return;
}
if (place_sort === "") {
layer.msg('输入的排序编码为空,请检查后重新输入!', {icon: 2, time: 2000, shade: 0.1});
return;
}
var data = {
"place_name": place_name,
"place_sort":place_sort,
"place_temperature_flag": place_temperature_flag
};
$.ajax({
type: "POST",
dataType: "json",
async: false,
data: data,
url: "/baseService/mobile/savePlace",
success: function (data) {
layer.msg("保存成功", {icon: 1, time: 1000, shade: [0.5, '#000', true]}, function () {
var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index);
parent.layui.table.reload('idTest', {
where: {}
});
});
}
});
})
})
</script>
</form>
</body>
</html>