|
|
@@ -19,9 +19,9 @@
|
|
|
<!--<a href="javascript:void(0)" id="btnColumn" class="easyui-menubutton" data-options="menu:'#btnColumnMenu',iconCls:'icon-undo'">列显示</a>-->
|
|
|
<!--<div id="btnColumnMenu" style="width:150px;" ></div>-->
|
|
|
<a href="javascript:void(0)" id="btnReload" title="刷新" class="easyui-linkbutton" iconcls="icon-reload" plain="true" onclick="tbReload()">刷新</a>
|
|
|
-
|
|
|
+
|
|
|
<a href="javascript:void(0)" id="btnHelp" title="帮助" class="easyui-linkbutton" iconcls="icon-help" plain="true" onclick="tbHelp()">帮助</a>
|
|
|
-
|
|
|
+
|
|
|
<div id="tbSearchDiv" style="display:block;padding:10px;">
|
|
|
<form id="ffMaster">
|
|
|
<div>
|
|
|
@@ -42,15 +42,15 @@
|
|
|
成型线号:
|
|
|
<input class="easyui-combobox" id="groutinglineMaster" name="groutinglineMaster" data-options="required:false,prompt:'',tipPosition:'top',url:'../../rpt/rpt.ashx?m=getLine&select=1',method:'get',valueField:'GROUTINGLINEID',textField:'GROUTINGLINECODE',panelHeight:'300px',editable:true,multiple:true" style="width: 322px; height: 32px;">
|
|
|
试验:
|
|
|
- <input class="easyui-combobox" id="testMaster" name="testMaster" data-options="required:false,valueField:'value',textField:'text',editable:false,value:'0',
|
|
|
- data:[{'text': '正常', 'value': '0'}, {'text': '试验', 'value': '1'}, {'text': '全部', 'value': '2'}]" style=" width: 120px; height: 32px;">
|
|
|
+ <input class="easyui-combobox" id="testMaster" name="testMaster" data-options="required:false,valueField:'value',textField:'text',editable:false,value:'-1',
|
|
|
+ data:[{'text': '正常', 'value': '0'}, {'text': '试验', 'value': '1'}, {'text': '全部', 'value': '-1'}]" style=" width: 120px; height: 32px;">
|
|
|
试验线:
|
|
|
- <input class="easyui-combobox" id="testFlagMaster" name="testFlagMaster" data-options="required:false,valueField:'value',textField:'text',editable:false,value:'0',
|
|
|
- data:[{'text': '普通线', 'value': '0'}, {'text': '试验线', 'value': '1'}, {'text': '全部', 'value': '2'}]" style=" width: 120px; height: 32px;">
|
|
|
+ <input class="easyui-combobox" id="testFlagMaster" name="testFlagMaster" data-options="required:false,valueField:'value',textField:'text',editable:false,value:'-1',
|
|
|
+ data:[{'text': '普通线', 'value': '0'}, {'text': '试验线', 'value': '1'}, {'text': '全部', 'value': '-1'}]" style=" width: 120px; height: 32px;">
|
|
|
<a href="javascript:void(0)" id="btnSearchSubmit" title="清空" class="easyui-linkbutton" plain="false" onclick="tbSearchReset()">清空</a>
|
|
|
<a href="javascript:void(0)" id="btnSearchSubmit" title="搜索" class="easyui-linkbutton" plain="false" onclick="tbSearchSubmit()">搜索</a>
|
|
|
差异标识
|
|
|
- <input class="easyui-checkbox" id="chkAll" name="chkAll" onclick="difference()">
|
|
|
+ <input class="easyui-checkbox" id="chkStar" name="chkStar" data-options="onChange:createChange" checked>
|
|
|
</div>
|
|
|
</form>
|
|
|
</div>
|
|
|
@@ -58,43 +58,49 @@
|
|
|
</div>
|
|
|
|
|
|
<!--中部-->
|
|
|
- <div id="tableLayout" data-options="border:false,region:'center',split:true,title:'',iconCls:'icon-grid'" title="East" style="width:700px;">
|
|
|
- <div id="tableTabs" class="easyui-tabs" data-options="border:false" style="width: 100%; height: 100%">
|
|
|
- <!--表格-->
|
|
|
- <div title="年度生产数据统计表">
|
|
|
+ <div data-options="region:'west',title:'',split:true" style="width:30%; height: 100%">
|
|
|
+
|
|
|
+ <div id="tableTabs" class="easyui-tabs" data-options="border:false,region:'east',split:true" style="width:100%; height: 100%">
|
|
|
+ <div title="生产数据统计">
|
|
|
<table class="easyui-datagrid"
|
|
|
id="DataGrid0"
|
|
|
- data-options="method:'get',border:false,singleSelect:true,fit:true,fitColumns:true,onDblClickRow: dgDblclickrow">
|
|
|
+ data-options="method:'get',border:false,singleSelect:true,fit:true,fitColumns:true">
|
|
|
<thead>
|
|
|
</thead>
|
|
|
</table>
|
|
|
</div>
|
|
|
- <div title="报工差异明细">
|
|
|
+ <div title="差异明细表">
|
|
|
<table class="easyui-datagrid"
|
|
|
- id="DataGrid1"
|
|
|
+ id="DataGrid01"
|
|
|
data-options="method:'get',border:false,singleSelect:true,fit:true,fitColumns:true">
|
|
|
<thead>
|
|
|
</thead>
|
|
|
</table>
|
|
|
</div>
|
|
|
- <!--<div title="表名明细表2">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!--表格右面-->
|
|
|
+ <div data-options="region:'center',title:''" style="width:20%; height: 100%" id="cydiv">
|
|
|
+ <div id="tableTabs1" class="easyui-tabs" data-options="border:false,region:'center'" style="width:100%; height: 100%">
|
|
|
+ <div title="差异">
|
|
|
<table class="easyui-datagrid"
|
|
|
- id="DataGrid2"
|
|
|
- data-options="method:'get',border:false,singleSelect:true,fit:true,fitColumns:true">
|
|
|
+ id="difference1"
|
|
|
+ data-options="method:'get',border:false,singleSelect:true,fit:true,fitColumns:true,onDblClickRow: dgDblclickrow">
|
|
|
<thead>
|
|
|
</thead>
|
|
|
</table>
|
|
|
- </div>-->
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
-
|
|
|
+ var checke = false;
|
|
|
function formatterUA(value, row, index) {
|
|
|
- return Math.round(value*10000) / 100 + '%';
|
|
|
+ return Math.round(value * 10000) / 100 + '%';
|
|
|
}
|
|
|
|
|
|
$(document).ready(function () {
|
|
|
+ createChange();
|
|
|
var ctime = new Date();
|
|
|
var beginDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 1) + "-" + ctime.getDate();
|
|
|
var endDate = ctime.getFullYear() + "-" + (ctime.getMonth() + 1) + "-" + ctime.getDate();
|
|
|
@@ -102,7 +108,6 @@
|
|
|
$("#dateendMaster").datebox("setValue", endDate);
|
|
|
|
|
|
//tbSearchSubmit();
|
|
|
-
|
|
|
});
|
|
|
|
|
|
//帮助事件
|
|
|
@@ -115,52 +120,79 @@
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- //差异更改时间
|
|
|
- function difference()
|
|
|
- {
|
|
|
- console.log(1);
|
|
|
- }
|
|
|
-
|
|
|
//主表双击事件
|
|
|
function dgDblclickrow(index, row) {
|
|
|
- //$("#tableTabs").tabs("select", 1);
|
|
|
- //LoadDataGridDetail(index, row);
|
|
|
+ $("#tableTabs").tabs("select", 1);
|
|
|
+ LoadDataGridDetail(index, row);
|
|
|
}
|
|
|
|
|
|
//加载子表数据
|
|
|
function LoadDataGridDetail(index, row) {
|
|
|
//加载子表1
|
|
|
- //var id = $('#DataGridMaster').datagrid('getSelections')[0]['SID'];
|
|
|
- var id = row['测试列1'];
|
|
|
- $('#DataGrid1').datagridLoadRpt({
|
|
|
- idField: '测试列1',
|
|
|
- url: 'rpt.ashx?m=1&id=' + id,
|
|
|
- pageSize: 10,
|
|
|
- fixWidth: 120,
|
|
|
- mergeWidth: 100,
|
|
|
- splitChar: '_',
|
|
|
- columnMoving: true
|
|
|
- });
|
|
|
- //加载子表2
|
|
|
- $('#DataGrid2').datagridLoadRpt({
|
|
|
- idField: '测试列1',
|
|
|
- url: 'rpt.ashx?m=2&id=' + id,
|
|
|
- pageSize: 10,
|
|
|
- fixWidth: 120,
|
|
|
- mergeWidth: 100,
|
|
|
- splitChar: '_',
|
|
|
- columnMoving: true
|
|
|
- });
|
|
|
+ var a = row["差异量"];
|
|
|
+ var shorname = a.replace(/[^\u4e00-\u9fa5]/gi, "");
|
|
|
+
|
|
|
+ var WORKSHOP = 0
|
|
|
+ if (index < 14)
|
|
|
+ {
|
|
|
+ WORKSHOP = 1
|
|
|
+ }
|
|
|
+ else if (index < 27)
|
|
|
+ {
|
|
|
+ WORKSHOP = 2
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ WORKSHOP = 3
|
|
|
+ }
|
|
|
+
|
|
|
+ if ($('#ffMaster').form("validate")) {
|
|
|
+ $('#DataGrid01').datagridLoad({
|
|
|
+ idField: '差异明细条码',
|
|
|
+ queryParams: $('#ffMaster').serializeJson(),
|
|
|
+ url: 'rpt.ashx?m=1&shorname=' + shorname + '&WORKSHOP=' + WORKSHOP,
|
|
|
+ pageSize: 10,
|
|
|
+ fixWidth: 100,
|
|
|
+ mergeWidth: 80,
|
|
|
+ splitChar: '_'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ function stylerEditor(value, row, index) {
|
|
|
+ return 'background-color:yellow;color:black';
|
|
|
}
|
|
|
|
|
|
//清空条件
|
|
|
function tbSearchReset() {
|
|
|
$('#highFlagMaster').combobox('clear');
|
|
|
- $('#goodsMaster').combobox( 'clear');
|
|
|
+ $('#goodsMaster').combobox('clear');
|
|
|
$('#groutinglineMaster').combobox('clear');
|
|
|
$('#testMaster').combobox('clear');
|
|
|
$('#testFlagMaster').combobox('clear');
|
|
|
-
|
|
|
+ }
|
|
|
+
|
|
|
+ function createChange(checked) {
|
|
|
+
|
|
|
+ if (checked == true)
|
|
|
+ {
|
|
|
+ checked = false
|
|
|
+ }
|
|
|
+ else if (checked == undefined)
|
|
|
+ {
|
|
|
+ checked = false
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ checked = true
|
|
|
+ }
|
|
|
+ $('#goodsMaster').setDateboxDisable(checked);
|
|
|
+ $('#groutinglineMaster').setDateboxDisable(checked);
|
|
|
+ $('#testMaster').setDateboxDisable(checked);
|
|
|
+ $('#testFlagMaster').setDateboxDisable(checked);
|
|
|
+ $('#totalMaster').setDateboxDisable(checked);
|
|
|
+ $('#highFlagMaster').setDateboxDisable(checked);
|
|
|
+ checke = checked;
|
|
|
}
|
|
|
|
|
|
//搜索提交
|
|
|
@@ -173,29 +205,43 @@
|
|
|
title: '',
|
|
|
idField: 'SID',
|
|
|
queryParams: $('#ffMaster').serializeJson(),
|
|
|
- url: 'rpt.ashx?m=' + index + '&id=' + request('id'),
|
|
|
+ url: 'rpt.ashx?m=' + index + '&id=' + request('id') + '&checke=' + checke,
|
|
|
pageSize: 10,
|
|
|
fixWidth: 120,
|
|
|
mergeWidth: 120,
|
|
|
splitChar: '_',
|
|
|
onLoadSuccess: function (data) {
|
|
|
- $('#DataGrid' + index).datagrid("autoMergeCells",["部门"]);
|
|
|
+ $('#DataGrid' + index).datagrid("autoMergeCells", ["部门"]);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+ $('#difference1').datagridLoadRpt({
|
|
|
+ idField: '差异',
|
|
|
+ queryParams: $('#ffMaster').serializeJson(),
|
|
|
+ url: 'rpt.ashx?m=cy',
|
|
|
+ pageSize: 10,
|
|
|
+ fixWidth: 120,
|
|
|
+ mergeWidth: 100,
|
|
|
+ splitChar: '_',
|
|
|
+ onLoadSuccess: function (data) {
|
|
|
+ $('#difference1').datagrid("autoMergeCells", ["差异量"]);
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
if (index == 1) {
|
|
|
- if ($('#ffMaster').form("validate")) {
|
|
|
- $('#DataGrid' + index).datagridLoad({
|
|
|
- idField: '测试列1',
|
|
|
- url: 'rpt.ashx?m=' + index ,
|
|
|
- pageSize: 10,
|
|
|
- fixWidth: 100,
|
|
|
- mergeWidth: 80,
|
|
|
- splitChar: '_'
|
|
|
- });
|
|
|
- }
|
|
|
+ $('#difference1').datagridLoadRpt({
|
|
|
+ idField: '差异',
|
|
|
+ queryParams: $('#ffMaster').serializeJson(),
|
|
|
+ url: 'rpt.ashx?m=cy',
|
|
|
+ pageSize: 10,
|
|
|
+ fixWidth: 120,
|
|
|
+ mergeWidth: 100,
|
|
|
+ splitChar: '_',
|
|
|
+ onLoadSuccess: function (data) {
|
|
|
+ $('#difference1').datagrid("autoMergeCells", ["差异量"]);
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
if (index == 2) {
|