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.
947 lines
38 KiB
947 lines
38 KiB
2 months ago
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FiveScreen.aspx.cs" Inherits="MESWebSite.Manage.FiveScreen" %>
|
||
|
|
||
|
|
||
|
<!DOCTYPE html>
|
||
|
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head runat="server">
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<link href="/CSS/Basics.css" rel="stylesheet" />
|
||
|
<link href="/Scripts/jquery-easyui-1.4.3/themes/metro/easyui.css" rel="stylesheet" type="text/css" />
|
||
|
<link href="/Scripts/jquery-easyui-1.4.3/themes/icon.css" rel="stylesheet" type="text/css" />
|
||
|
<link href="/Scripts/jquery-easyui-1.4.3/themes/color.css" rel="stylesheet" type="text/css" />
|
||
|
<script src="/Scripts/jquery-easyui-1.4.3/jquery.min.js" type="text/javascript"></script>
|
||
|
<script src="/Scripts/jquery-easyui-1.4.3/jquery.easyui.min.js" type="text/javascript"></script>
|
||
|
<script src="/Scripts/jquery-easyui-1.4.3/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
|
||
|
<script src="/Scripts/MyJs.js" type="text/javascript"></script>
|
||
|
<style>
|
||
|
#w td {
|
||
|
padding: 5px 5px;
|
||
|
text-align: left;
|
||
|
vertical-align: middle;
|
||
|
}
|
||
|
|
||
|
#w .title {
|
||
|
vertical-align: middle;
|
||
|
text-align: right;
|
||
|
width: 80px;
|
||
|
height: 40px;
|
||
|
}
|
||
|
|
||
|
p {
|
||
|
padding: 5px;
|
||
|
font-size: small;
|
||
|
font-family: 微软雅黑;
|
||
|
}
|
||
|
|
||
|
.datagrid {
|
||
|
text-align: center;
|
||
|
}
|
||
|
</style>
|
||
|
<title>报表设置日统计</title>
|
||
|
</head>
|
||
|
<body>
|
||
|
<form id="form1" runat="server">
|
||
|
<div class="top">
|
||
|
<table cellpadding="0" cellspacing="0" style="width: 100%">
|
||
|
<tr>
|
||
|
|
||
|
<td><span class="title">报表设置日统计</span>
|
||
|
</td>
|
||
|
<td></td>
|
||
|
<td style="width: 260px;"></td>
|
||
|
<td style="width: 80px;"><a class="topsearchBtn">查询</a></td>
|
||
|
|
||
|
<td style="width: 80px">
|
||
|
<a class="topaddBtn">新增</a>
|
||
|
</td>
|
||
|
<td style="width: 80px">
|
||
|
<a class="toppenBtn">编辑</a>
|
||
|
</td>
|
||
|
<td style="width: 80px">
|
||
|
<a class="topdelBtn">删除</a>
|
||
|
</td>
|
||
|
<td style="width: 85px"></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<table id="tb" title="报表设置日统计" style="width: 99%;">
|
||
|
</table>
|
||
|
<!-- 编辑窗口 -->
|
||
|
<div id="w" style="padding: 10px; visibility: hidden" title="编辑">
|
||
|
<table cellpadding="0" cellspacing="0">
|
||
|
<tr>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
报表名称:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<select id="Name" class="easyui-combobox" style="width: 100px; height: 30px;">
|
||
|
<option value='注塑合格率'>注塑合格率</option>
|
||
|
<option value='注塑设备利用率'>注塑设备利用率</option>
|
||
|
<option value='喷涂一次合格率'>喷涂一次合格率</option>
|
||
|
<option value='喷涂总合格率'>喷涂总合格率</option>
|
||
|
<option value='喷涂设备利用率'>喷涂设备利用率</option>
|
||
|
<option value='运行滑撬数'>运行滑撬数</option>
|
||
|
<option value='喷涂入库套数'>喷涂入库套数</option>
|
||
|
<option value='发货数'>发货数</option>
|
||
|
</select>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
上一年:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="LastYear" type="number" class="text" style="width: 100px; height: 30px;" />
|
||
|
</td>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
一月:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="Jan" type="number" class="text" style="width: 100px; height: 30px;" value="0" />
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
二月:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="Feb" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
三月:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="Mar" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
四月:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="Apr" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
五月:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="May" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
六月:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="Jun" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
七月:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="Jul" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
八月:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="Aug" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
九月:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="Sept" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
十月:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="Oct" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
十一月:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="Nov" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
十二月:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="Dec" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
1号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day1" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
2号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day2" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
3号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day3" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
4号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day4" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
5号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day5" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
6号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day6" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
7号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day7" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
8号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day8" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
9号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day9" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
10号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day10" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
11号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day11" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
12号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day12" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
13号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day13" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
14号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day14" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
15号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day15" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
16号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day16" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
17号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day17" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
18号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day18" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
19号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day19" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
20号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day20" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
21号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day21" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
22号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day22" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
23号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day23" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
24号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day24" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
25号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day25" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
26号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day26" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
27号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day27" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
28号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day28" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
29号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day29" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
30号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day30" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td class="title">
|
||
|
<p>
|
||
|
31号:
|
||
|
</p>
|
||
|
</td>
|
||
|
<td>
|
||
|
<input id="day31" type="number" class="text" style="width: 100px; height: 30px;" value="0"/>
|
||
|
</td>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<!-- 编辑窗口 - footer -->
|
||
|
<div id="ft" style="padding: 10px; text-align: center; background-color: #f9f9f9; visibility: hidden">
|
||
|
<a class="saveBtn" id="saveBtn">保存</a>
|
||
|
</div>
|
||
|
|
||
|
<div hidden="hidden">
|
||
|
<asp:Label ID="lblMessage" runat="server" Text=""></asp:Label>
|
||
|
</div>
|
||
|
<input id="UserID" type="text" hidden="hidden" runat="server" />
|
||
|
<script>
|
||
|
|
||
|
/**************** 全局变量 ***************/
|
||
|
var PrimaryID; //要编辑的id
|
||
|
var dg = $('#tb'); //表格
|
||
|
var isEdit = false; //是否为编辑状态
|
||
|
|
||
|
/**************** DOM加载 ***************/
|
||
|
$(function () {
|
||
|
$.ajaxSetup({
|
||
|
cache: false //关闭AJAX缓存
|
||
|
});
|
||
|
//新增按钮点击
|
||
|
$('.topaddBtn').first().click(function () {
|
||
|
isEdit = false;
|
||
|
$('#w').window('open');
|
||
|
});
|
||
|
|
||
|
//编辑按钮点击
|
||
|
$('.toppenBtn').first().click(function () {
|
||
|
isEdit = true;
|
||
|
initEidtWidget();
|
||
|
});
|
||
|
|
||
|
//删除按钮
|
||
|
$('.topdelBtn').first().click(function () {
|
||
|
$.messager.confirm('提示框', '你确定要删除吗?', function (r) {
|
||
|
if (r) {
|
||
|
deleteInfos();
|
||
|
}
|
||
|
});
|
||
|
|
||
|
});
|
||
|
|
||
|
//搜索按钮
|
||
|
$('.topsearchBtn').first().click(function () {
|
||
|
SearchInfo();
|
||
|
});
|
||
|
|
||
|
//保存按钮
|
||
|
$('#saveBtn').bind('click', function () {
|
||
|
SaveInfo(isEdit);
|
||
|
});
|
||
|
|
||
|
//编辑窗口加载
|
||
|
$('#w').window({
|
||
|
modal: true,
|
||
|
closed: true,
|
||
|
minimizable: false,
|
||
|
maximizable: false,
|
||
|
collapsible: false,
|
||
|
width: 1000,
|
||
|
height: 700,
|
||
|
footer: '#ft',
|
||
|
top: 20,
|
||
|
onBeforeClose: function () { clearw(); },
|
||
|
onBeforeOpen: function () {
|
||
|
$('#w').css('visibility', 'visible'); $('#ft').css('visibility', 'visible');
|
||
|
}
|
||
|
|
||
|
});
|
||
|
|
||
|
dg = $('#tb').datagrid({
|
||
|
fitColumns: true,
|
||
|
nowrap: false,
|
||
|
striped: true,
|
||
|
collapsible: false,
|
||
|
url: "/HttpHandlers/FiveScreenHandler.ashx?method=QueryList",
|
||
|
//sortName: 'sortNumber',
|
||
|
//sortOrder: 'asc',
|
||
|
remoteSort: false,
|
||
|
columns: [[
|
||
|
{ field: 'ID', title: 'ID', hidden: true },
|
||
|
{ field: 'Name', title: '报表名称', sortable: 'true', width: 20 },
|
||
|
{ field: 'LastYear', title: '上一年', sortable: 'true', width: 20 },
|
||
|
{
|
||
|
field: 'CreateTime', title: '添加时间', sortable: 'true', width: 10,
|
||
|
formatter: function (date) {
|
||
|
var pa = /.*\((.*)\)/;
|
||
|
var unixtime = date.match(pa)[1].substring(0, 10);
|
||
|
return getTime(unixtime).substring(0, 19);
|
||
|
}
|
||
|
}
|
||
|
]],
|
||
|
|
||
|
pagination: true,//表示在datagrid设置分页
|
||
|
rownumbers: true,
|
||
|
singleSelect: true
|
||
|
});
|
||
|
|
||
|
dg.datagrid('getPager').pagination({
|
||
|
pageSize: 10,
|
||
|
pageNumber: 1,
|
||
|
pageList: [10, 20, 30, 40, 50],
|
||
|
beforePageText: '第',//页数文本框前显示的汉字
|
||
|
afterPageText: '页 共 {pages} 页',
|
||
|
displayMsg: '当前显示 {from} - {to} 条记录 共 {total} 条记录',
|
||
|
});
|
||
|
|
||
|
//下拉框加载
|
||
|
$('#Name').combobox({
|
||
|
onSelect: function (row) {
|
||
|
$.ajax({
|
||
|
url: "FiveScreen.aspx/GetDate",
|
||
|
datatype: 'json',
|
||
|
type: "Post",
|
||
|
data: "{'TableName':'" + row.value + "'}",
|
||
|
contentType: "application/json; charset=utf-8",
|
||
|
success: function (data) {
|
||
|
if (data != null) {
|
||
|
try {
|
||
|
var row = data.d;
|
||
|
$('#Name').combobox('select', row.Name);
|
||
|
$('#LastYear').val(row.LastYear);
|
||
|
$('#Jan').val(row.Jan);
|
||
|
$('#Feb').val(row.Feb);
|
||
|
$('#Mar').val(row.Mar);
|
||
|
$('#Apr').val(row.Apr);
|
||
|
$('#May').val(row.May);
|
||
|
$('#Jun').val(row.Jun);
|
||
|
$('#Jul').val(row.Jul);
|
||
|
$('#Aug').val(row.Aug);
|
||
|
$('#Sept').val(row.Sept);
|
||
|
$('#Oct').val(row.Oct);
|
||
|
$('#Nov').val(row.Nov);
|
||
|
$('#Dec').val(row.Dec);
|
||
|
$('#day1').val(row.day1);
|
||
|
$('#day2').val(row.day2);
|
||
|
$('#day3').val(row.day3);
|
||
|
$('#day4').val(row.day4);
|
||
|
$('#day5').val(row.day5);
|
||
|
$('#day6').val(row.day6);
|
||
|
$('#day7').val(row.day7);
|
||
|
$('#day8').val(row.day8);
|
||
|
$('#day9').val(row.day9);
|
||
|
$('#day10').val(row.day10);
|
||
|
$('#day11').val(row.day11);
|
||
|
$('#day12').val(row.day12);
|
||
|
$('#day13').val(row.day13);
|
||
|
$('#day14').val(row.day14);
|
||
|
$('#day15').val(row.day15);
|
||
|
$('#day16').val(row.day16);
|
||
|
$('#day17').val(row.day17);
|
||
|
$('#day18').val(row.day18);
|
||
|
$('#day19').val(row.day19);
|
||
|
$('#day20').val(row.day20);
|
||
|
$('#day21').val(row.day21);
|
||
|
$('#day22').val(row.day22);
|
||
|
$('#day23').val(row.day23);
|
||
|
$('#day24').val(row.day24);
|
||
|
$('#day25').val(row.day25);
|
||
|
$('#day26').val(row.day26);
|
||
|
$('#day27').val(row.day27);
|
||
|
$('#day28').val(row.day28);
|
||
|
$('#day29').val(row.day29);
|
||
|
$('#day30').val(row.day30);
|
||
|
$('#day31').val(row.day31);
|
||
|
|
||
|
} catch (e) {
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
});
|
||
|
|
||
|
/**************** 主要业务程序 ***************/
|
||
|
//新增 / 编辑
|
||
|
function SaveInfo(isEdit) {
|
||
|
|
||
|
var ID = isEdit == true ? PrimaryID : 0;
|
||
|
var Name = $('#Name').combo('getValue');
|
||
|
var LastYear = $('#LastYear').val();
|
||
|
var Jan = $('#Jan').val();
|
||
|
var Feb = $('#Feb').val();
|
||
|
var Mar = $('#Mar').val();
|
||
|
var Apr = $('#Apr').val();
|
||
|
var May = $('#May').val();
|
||
|
var Jun = $('#Jun').val();
|
||
|
var Jul = $('#Jul').val();
|
||
|
var Aug = $('#Aug').val();
|
||
|
var Sept = $('#Sept').val();
|
||
|
var Oct = $('#Oct').val();
|
||
|
var Nov = $('#Nov').val();
|
||
|
var Dec = $('#Dec').val();
|
||
|
var day1 = $('#day1').val();
|
||
|
var day2 = $('#day2').val();
|
||
|
var day3 = $('#day3').val();
|
||
|
var day4 = $('#day4').val();
|
||
|
var day5 = $('#day5').val();
|
||
|
var day6 = $('#day6').val();
|
||
|
var day7 = $('#day7').val();
|
||
|
var day8 = $('#day8').val();
|
||
|
var day9 = $('#day9').val();
|
||
|
var day10 = $('#day10').val();
|
||
|
var day11 = $('#day11').val();
|
||
|
var day12 = $('#day12').val();
|
||
|
var day13 = $('#day13').val();
|
||
|
var day14 = $('#day14').val();
|
||
|
var day15 = $('#day15').val();
|
||
|
var day16 = $('#day16').val();
|
||
|
var day17 = $('#day17').val();
|
||
|
var day18 = $('#day18').val();
|
||
|
var day19 = $('#day19').val();
|
||
|
var day20 = $('#day20').val();
|
||
|
var day21 = $('#day21').val();
|
||
|
var day22 = $('#day22').val();
|
||
|
var day23 = $('#day23').val();
|
||
|
var day24 = $('#day24').val();
|
||
|
var day25 = $('#day25').val();
|
||
|
var day26 = $('#day26').val();
|
||
|
var day27 = $('#day27').val();
|
||
|
var day28 = $('#day28').val();
|
||
|
var day29 = $('#day29').val();
|
||
|
var day30 = $('#day30').val();
|
||
|
var day31 = $('#day31').val();
|
||
|
|
||
|
if (Name == "") {
|
||
|
$.messager.alert('提示', '颜色代码不能为空,请重新输入', 'warning');
|
||
|
return;
|
||
|
}
|
||
|
if (LastYear == "") {
|
||
|
$.messager.alert('提示', '颜色编号不能为空,请重新输入', 'warning');
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
var model = {
|
||
|
ID: ID,
|
||
|
Name: Name,
|
||
|
LastYear: LastYear,
|
||
|
Jan: Jan,
|
||
|
Feb: Feb,
|
||
|
Mar: Mar,
|
||
|
Apr: Apr,
|
||
|
May: May,
|
||
|
Jun: Jun,
|
||
|
Jul: Jul,
|
||
|
Aug: Aug,
|
||
|
Sept: Sept,
|
||
|
Oct: Oct,
|
||
|
Nov: Nov,
|
||
|
Dec: Dec,
|
||
|
day1: day1,
|
||
|
day2: day2,
|
||
|
day3: day3,
|
||
|
day4: day4,
|
||
|
day5: day5,
|
||
|
day6: day6,
|
||
|
day7: day7,
|
||
|
day8: day8,
|
||
|
day9: day9,
|
||
|
day10: day10,
|
||
|
day11: day11,
|
||
|
day12: day12,
|
||
|
day13: day13,
|
||
|
day14: day14,
|
||
|
day15: day15,
|
||
|
day16: day16,
|
||
|
day17: day17,
|
||
|
day18: day18,
|
||
|
day19: day19,
|
||
|
day20: day20,
|
||
|
day21: day21,
|
||
|
day22: day22,
|
||
|
day23: day23,
|
||
|
day24: day24,
|
||
|
day25: day25,
|
||
|
day26: day26,
|
||
|
day27: day27,
|
||
|
day28: day28,
|
||
|
day29: day29,
|
||
|
day30: day30,
|
||
|
day31: day31,
|
||
|
method: 'SaveInfo'
|
||
|
};
|
||
|
SaveModel(model);
|
||
|
}
|
||
|
function SaveModel(model) {
|
||
|
$.ajax({
|
||
|
type: "POST",
|
||
|
async: false,
|
||
|
url: "/HttpHandlers/FiveScreenHandler.ashx",
|
||
|
data: model,
|
||
|
success: function (data) {
|
||
|
if (data == 'true') {
|
||
|
$.messager.alert('提示', '已保存', 'info');
|
||
|
dg.datagrid('reload');
|
||
|
$('#w').window('close');
|
||
|
}
|
||
|
else {
|
||
|
$.messager.alert('提示', '保存失败,请查看是否编号重复', 'warning');
|
||
|
}
|
||
|
|
||
|
},
|
||
|
error: function () {
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
//查询方法
|
||
|
function SearchInfo() {
|
||
|
|
||
|
dg.datagrid('reload');
|
||
|
}
|
||
|
//编辑时加载窗体数据
|
||
|
function initEidtWidget() {
|
||
|
var selRows = dg.datagrid('getSelections');
|
||
|
if (selRows.length > 1) {
|
||
|
$.messager.alert('提示', '每次只能编辑一条记录,请重新选取', 'warning');
|
||
|
return;
|
||
|
} else if (selRows.length == 0) {
|
||
|
$.messager.alert('提示', '请选择一条记录进行编辑', 'warning');
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
//窗体数据初始化
|
||
|
var row = selRows[0];
|
||
|
PrimaryID = row.ID;
|
||
|
$('#Name').combobox('select', row.Name);
|
||
|
$('#LastYear').val(row.LastYear);
|
||
|
$('#Jan').val(row.Jan);
|
||
|
$('#Feb').val(row.Feb);
|
||
|
$('#Mar').val(row.Mar);
|
||
|
$('#Apr').val(row.Apr);
|
||
|
$('#May').val(row.May);
|
||
|
$('#Jun').val(row.Jun);
|
||
|
$('#Jul').val(row.Jul);
|
||
|
$('#Aug').val(row.Aug);
|
||
|
$('#Sept').val(row.Sept);
|
||
|
$('#Oct').val(row.Oct);
|
||
|
$('#Nov').val(row.Nov);
|
||
|
$('#Dec').val(row.Dec);
|
||
|
$('#day1').val(row.day1);
|
||
|
$('#day2').val(row.day2);
|
||
|
$('#day3').val(row.day3);
|
||
|
$('#day4').val(row.day4);
|
||
|
$('#day5').val(row.day5);
|
||
|
$('#day6').val(row.day6);
|
||
|
$('#day7').val(row.day7);
|
||
|
$('#day8').val(row.day8);
|
||
|
$('#day9').val(row.day9);
|
||
|
$('#day10').val(row.day10);
|
||
|
$('#day11').val(row.day11);
|
||
|
$('#day12').val(row.day12);
|
||
|
$('#day13').val(row.day13);
|
||
|
$('#day14').val(row.day14);
|
||
|
$('#day15').val(row.day15);
|
||
|
$('#day16').val(row.day16);
|
||
|
$('#day17').val(row.day17);
|
||
|
$('#day18').val(row.day18);
|
||
|
$('#day19').val(row.day19);
|
||
|
$('#day20').val(row.day20);
|
||
|
$('#day21').val(row.day21);
|
||
|
$('#day22').val(row.day22);
|
||
|
$('#day23').val(row.day23);
|
||
|
$('#day24').val(row.day24);
|
||
|
$('#day25').val(row.day25);
|
||
|
$('#day26').val(row.day26);
|
||
|
$('#day27').val(row.day27);
|
||
|
$('#day28').val(row.day28);
|
||
|
$('#day29').val(row.day29);
|
||
|
$('#day30').val(row.day30);
|
||
|
$('#day31').val(row.day31);
|
||
|
|
||
|
$('#w').window('open');
|
||
|
}
|
||
|
//删除方法
|
||
|
function deleteInfos() {
|
||
|
var selRows = dg.datagrid('getSelections');
|
||
|
if (selRows.length > 1) {
|
||
|
$.messager.alert('提示', '每次只能删除一条记录,请重新选取', 'warning');
|
||
|
return;
|
||
|
} else if (selRows.length == 0) {
|
||
|
$.messager.alert('提示', '请选择一条记录进行删除', 'warning');
|
||
|
return;
|
||
|
}
|
||
|
var row = selRows[0];
|
||
|
|
||
|
var model = {
|
||
|
ID: row.ID,
|
||
|
method: 'DelInfo'
|
||
|
};
|
||
|
|
||
|
$.ajax({
|
||
|
url: "/HttpHandlers/FiveScreenHandler.ashx",
|
||
|
data: model,
|
||
|
async: false,
|
||
|
success: function (data) {
|
||
|
if (data == 'true') {
|
||
|
$.messager.alert('提示', '已删除', 'info');
|
||
|
dg.datagrid('reload');
|
||
|
}
|
||
|
else {
|
||
|
$.messager.alert('提示', '由于有关联数据,删除失败', 'warning');
|
||
|
}
|
||
|
},
|
||
|
error: function () {
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
/**************** 辅助业务程序 ***************/
|
||
|
/**********************************************/
|
||
|
/***************** 窗体程序 *******************/
|
||
|
/**********************************************/
|
||
|
//编辑窗口关闭清空数据
|
||
|
function clearw() {
|
||
|
|
||
|
$('#Name').val('');
|
||
|
$('#LastYear').val('');
|
||
|
$('#Jan').val('');
|
||
|
$('#Feb').val('');
|
||
|
$('#Mar').val('');
|
||
|
$('#Apr').val('');
|
||
|
$('#May').val('');
|
||
|
$('#Jun').val('');
|
||
|
$('#Jul').val('');
|
||
|
$('#Aug').val('');
|
||
|
$('#Sept').val('');
|
||
|
$('#Oct').val('');
|
||
|
$('#Nov').val('');
|
||
|
$('#Dec').val('');
|
||
|
$('#day1').val('');
|
||
|
$('#day2').val('');
|
||
|
$('#day3').val('');
|
||
|
$('#day4').val('');
|
||
|
$('#day5').val('');
|
||
|
$('#day6').val('');
|
||
|
$('#day7').val('');
|
||
|
$('#day8').val('');
|
||
|
$('#day9').val('');
|
||
|
$('#day10').val('');
|
||
|
$('#day11').val('');
|
||
|
$('#day12').val('');
|
||
|
$('#day13').val('');
|
||
|
$('#day14').val('');
|
||
|
$('#day15').val('');
|
||
|
$('#day16').val('');
|
||
|
$('#day17').val('');
|
||
|
$('#day18').val('');
|
||
|
$('#day19').val('');
|
||
|
$('#day20').val('');
|
||
|
$('#day21').val('');
|
||
|
$('#day22').val('');
|
||
|
$('#day23').val('');
|
||
|
$('#day24').val('');
|
||
|
$('#day25').val('');
|
||
|
$('#day26').val('');
|
||
|
$('#day27').val('');
|
||
|
$('#day28').val('');
|
||
|
$('#day29').val('');
|
||
|
$('#day30').val('');
|
||
|
$('#day31').val('');
|
||
|
}
|
||
|
|
||
|
|
||
|
</script>
|
||
|
</form>
|
||
|
</body>
|
||
|
</html>
|