2021-05-27 16:58:40 +08:00
|
|
|
@page
|
|
|
|
|
@model Waste.Web.Entry.Pages.Result.IndexModel
|
|
|
|
|
@{
|
|
|
|
|
ViewData["Title"] = "投放记录";
|
|
|
|
|
}
|
|
|
|
|
<div class="layui-card">
|
|
|
|
|
<div class="layui-form layui-card-header layuiadmin-card-header-auto">
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<div class="layui-inline">
|
|
|
|
|
<div class="layui-input-inline">
|
|
|
|
|
<input type="text" class="layui-input" value="@Model.defaulttime" data-time="ysdatetime" autocomplete="off" name="time" id="time" placeholder="请选择时间" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-inline">
|
|
|
|
|
<div class="layui-input-inline">
|
|
|
|
|
<input type="text" class="layui-input" name="FacEcode" id="FacEcode" placeholder="请输入设备编号" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-inline">
|
|
|
|
|
<div class="layui-input-inline">
|
|
|
|
|
<input type="text" class="layui-input" name="Name" id="Name" placeholder="请输入设备名称" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2022-07-12 17:53:04 +08:00
|
|
|
<div class="layui-inline">
|
|
|
|
|
<div class="layui-input-inline">
|
|
|
|
|
<select id="poststatus">
|
|
|
|
|
<option value="">请选择状态</option>
|
|
|
|
|
<option value="-1">未上报</option>
|
|
|
|
|
<option value="0">上报失败</option>
|
|
|
|
|
<option value="1">上报成功</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-05-27 16:58:40 +08:00
|
|
|
<div class="layui-inline">
|
|
|
|
|
<button class="btn btn-primary btn-lg js-search" type="button">查询</button>
|
|
|
|
|
<button class="btn btn-primary btn-lg js-add" type="button">添加</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-card-body">
|
|
|
|
|
<table class="layui-table" id="list" lay-filter="list">
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<script type="text/html" id="optpl">
|
|
|
|
|
<a href="#" class="js-edit" title="编辑" data-id="{{d.id}}">编辑</a>
|
|
|
|
|
@*<a href="#" class="js-delete" title="删除" data-id="{{d.id}}">删除</a> *@
|
|
|
|
|
</script>
|
2021-08-13 17:30:59 +08:00
|
|
|
<script type="text/html" id="netstatustpl">
|
|
|
|
|
{{#if (d.poststatus == 0){ }}
|
|
|
|
|
<span style="color:red;">上报失败</span>
|
|
|
|
|
{{# } else if(d.poststatus == 1){ }}
|
|
|
|
|
<span style="color: #19be6b;">上报成功</span>
|
|
|
|
|
{{# }else{ }}
|
|
|
|
|
<span style="color: #b3b3b3;">未上报</span>
|
|
|
|
|
{{#} }}
|
|
|
|
|
</script>
|
2021-05-27 16:58:40 +08:00
|
|
|
@section Scripts
|
|
|
|
|
{
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
layui.use(['common'], function () {
|
|
|
|
|
var common = layui.common;
|
|
|
|
|
var queryparam = [];
|
|
|
|
|
var starttime = $("#time").val();
|
|
|
|
|
if (starttime != "") {
|
|
|
|
|
var times = starttime.split('~');
|
|
|
|
|
queryparam.push({
|
|
|
|
|
"Name": 'createtime',
|
|
|
|
|
"Type": QueryCond.GreaterThanOrEqual,
|
|
|
|
|
"Value": times[0].trim()
|
|
|
|
|
});
|
|
|
|
|
queryparam.push({
|
|
|
|
|
"Name": 'createtime',
|
|
|
|
|
"Type": QueryCond.LessThanOrEqual,
|
|
|
|
|
"Value": times[1].trim()
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
common.initTable({
|
|
|
|
|
url: '/api/result/getlist'
|
|
|
|
|
, method: 'post',
|
|
|
|
|
where: {
|
|
|
|
|
queryParam: queryparam
|
|
|
|
|
}
|
|
|
|
|
, cols: [[
|
|
|
|
|
{
|
2021-09-04 08:36:42 +08:00
|
|
|
field: 'devicefacecode', title: '设备编号'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'deviceecode', title: '机器码', hide: true
|
2021-05-27 16:58:40 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'devicename', title: '设备名称'
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
{
|
|
|
|
|
field: 'businessname', title: '所属商户'
|
|
|
|
|
}
|
|
|
|
|
//,
|
|
|
|
|
//{
|
|
|
|
|
// field: 'nettype', title: '联网方式', templet: function (d) {
|
|
|
|
|
// return DeviceNetType[d.nettype];
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
,
|
|
|
|
|
{
|
|
|
|
|
field: 'wastetype', title: '物品编码'
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
{
|
|
|
|
|
field: 'grossweight', title: '毛重(KG)'
|
|
|
|
|
}
|
|
|
|
|
,
|
2021-09-04 08:36:42 +08:00
|
|
|
{
|
|
|
|
|
field: 'registration', title: '垃圾桶'
|
|
|
|
|
}
|
|
|
|
|
,
|
2021-05-27 16:58:40 +08:00
|
|
|
{
|
|
|
|
|
field: 'tare', title: '皮重(KG)', hide: true
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
{
|
|
|
|
|
field: 'netweight', title: '净重(KG)', hide: true
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
{
|
|
|
|
|
field: 'deviceaddress', title: '地址'
|
|
|
|
|
}
|
|
|
|
|
,
|
2021-08-13 17:30:59 +08:00
|
|
|
{
|
|
|
|
|
field: 'poststatus', title: '状态', templet:'#netstatustpl'
|
|
|
|
|
}
|
|
|
|
|
,
|
2021-05-27 16:58:40 +08:00
|
|
|
{
|
|
|
|
|
field: 'createtime', title: '回收时间'
|
|
|
|
|
}
|
|
|
|
|
//,
|
|
|
|
|
//{
|
|
|
|
|
// title: '操作', templet: "#optpl"
|
|
|
|
|
//}
|
|
|
|
|
]]
|
|
|
|
|
});
|
|
|
|
|
$(".js-search").on("click", function () {
|
|
|
|
|
var queryparam = [{
|
|
|
|
|
"Name": 'FacEcode',
|
|
|
|
|
"Type": QueryCond.Like,
|
|
|
|
|
"Value": $("#FacEcode").val()
|
|
|
|
|
}, {
|
|
|
|
|
"Name": 'Name',
|
|
|
|
|
"Type": QueryCond.Like,
|
|
|
|
|
"Value": $("#Name").val()
|
2022-07-12 17:53:04 +08:00
|
|
|
},{
|
|
|
|
|
"Name": 'poststatus',
|
|
|
|
|
"Type": QueryCond.Equal,
|
|
|
|
|
"Value": $("#poststatus").val()
|
2021-05-27 16:58:40 +08:00
|
|
|
}];
|
|
|
|
|
var starttime = $("#time").val();
|
|
|
|
|
if (starttime != "") {
|
|
|
|
|
var times = starttime.split('~');
|
|
|
|
|
queryparam.push({
|
|
|
|
|
"Name": 'createtime',
|
|
|
|
|
"Type": QueryCond.GreaterThanOrEqual,
|
|
|
|
|
"Value": times[0].trim()
|
|
|
|
|
});
|
|
|
|
|
queryparam.push({
|
|
|
|
|
"Name": 'createtime',
|
|
|
|
|
"Type": QueryCond.LessThanOrEqual,
|
|
|
|
|
"Value": times[1].trim()
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
common.reloadtable("list", {
|
|
|
|
|
where: {
|
|
|
|
|
queryParam: queryparam
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
}
|