Commit 7315d06e by liuyang

2024-04-10 物料清单左侧树进行数据过滤优化,输入搜索框,下拉框点击在不输入内容的时候直接展开优化

parent 2e31a171
...@@ -351,6 +351,12 @@ public enum DdynamicEnum { ...@@ -351,6 +351,12 @@ public enum DdynamicEnum {
*/ */
GROUP_RECORD1_BLOCK_ID("group_record_block_id","orgId","orgCname","HPSC010.queryGroupComboBox"), GROUP_RECORD1_BLOCK_ID("group_record_block_id","orgId","orgCname","HPSC010.queryGroupComboBox"),
FACTORY_CODE_BOX_BLOCK_ID("factoryCodeBox_block_id","factoryCode","factoryName","HPSB001.queryFactoryCodeBox"),
GROUP_CODE_BOX_BLOCK_ID("groupCodeBox_block_id","groupCode","groupName","factoryCode","factoryName","HPSB001.queryGroupCodeBox"),
USER_ID_BOX_BLOCK_ID("userIdBox_block_id","userId","userName","HPSB001.queryUserIdBox"),
/** /**
* 模块:工人管理 * 模块:工人管理
* 用途:工人管理下拉框 * 用途:工人管理下拉框
......
...@@ -329,6 +329,7 @@ ...@@ -329,6 +329,7 @@
hpjx.t_hpsc002 hpjx.t_hpsc002
WHERE WHERE
1=1 1=1
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="pEname"> <isNotEmpty prepend=" AND " property="pEname">
PARENT_ID = #pEname# PARENT_ID = #pEname#
</isNotEmpty> </isNotEmpty>
...@@ -363,6 +364,7 @@ ...@@ -363,6 +364,7 @@
hpjx.t_hpsc002 hpjx.t_hpsc002
WHERE WHERE
1=1 AND PARENT_ID NOT IN ('root') AND LV != 3 1=1 AND PARENT_ID NOT IN ('root') AND LV != 3
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="pEname"> <isNotEmpty prepend=" AND " property="pEname">
PARENT_ID = #pEname# PARENT_ID = #pEname#
</isNotEmpty> </isNotEmpty>
...@@ -398,6 +400,7 @@ ...@@ -398,6 +400,7 @@
hpjx.t_hpsc002 hpjx.t_hpsc002
WHERE WHERE
1=1 1=1
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="pEname"> <isNotEmpty prepend=" AND " property="pEname">
PARENT_ID = #pEname# PARENT_ID = #pEname#
</isNotEmpty> </isNotEmpty>
......
...@@ -119,16 +119,19 @@ $(function() { ...@@ -119,16 +119,19 @@ $(function() {
} }
}], }],
loadComplete: function (grid) { loadComplete: function (grid) {
// 此grid对象 // 此grid对象
grid.dataSource.bind("change", function(e) { grid.dataSource.bind("change", function(e) {
if (e.field == "inventName") { if (e.field == "inventName") {
console.log();
var tr,index; var tr,index;
// 获取此model元素信息 // 获取此model元素信息
var item = e.items[0]; var item = e.items[0];
for (let k = 0; k < resultGrid.getCheckedRowsIndex()+1; k++) {
for (let i = 0; i < inventNameGlobalData.length; i++) { for (let i = 0; i < inventNameGlobalData.length; i++) {
if (inventNameGlobalData[i]['textField'] === item.inventName) { if (inventNameGlobalData[i]['textField'] === item.inventName) {
//dataItem['spec'] = inventNameGlobalData[i]['param2Field']; //dataItem['spec'] = inventNameGlobalData[i]['param2Field'];
/* dataItem['material'] = inventNameGlobalData[i]['param3Field']; /* dataItem['material'] = inventNameGlobalData[i]['param3Field'];
dataItem['unit'] = inventNameGlobalData[i]['param4Field']; dataItem['unit'] = inventNameGlobalData[i]['param4Field'];
dataItem['length'] = inventNameGlobalData[i]['param5Field']; dataItem['length'] = inventNameGlobalData[i]['param5Field'];
dataItem['width'] = inventNameGlobalData[i]['param6Field']; dataItem['width'] = inventNameGlobalData[i]['param6Field'];
...@@ -143,14 +146,19 @@ $(function() { ...@@ -143,14 +146,19 @@ $(function() {
resultGrid.setCellValue(item, 'width', inventNameGlobalData[i]['param6Field']); resultGrid.setCellValue(item, 'width', inventNameGlobalData[i]['param6Field']);
resultGrid.setCellValue(item, 'thick', inventNameGlobalData[i]['param7Field']); resultGrid.setCellValue(item, 'thick', inventNameGlobalData[i]['param7Field']);
resultGrid.setCellValue(item, 'coefficient', inventNameGlobalData[i]['param8Field']); resultGrid.setCellValue(item, 'coefficient', inventNameGlobalData[i]['param8Field']);
resultGrid.refresh(); //resultGrid.refresh();
$("#locked_datacell_0_"+k+" input").attr("checked",true);
break;
}
} }
} }
} }
if (e.field == "spec") { if (e.field == "spec") {
var tr,index; var tr,index;
// 获取此model元素信息 // 获取此model元素信息
var item = e.items[0]; var item = e.items[0];
for (let k = 0; k < resultGrid.getCheckedRowsIndex()+1; k++) {
for (let i = 0; i < inventAllGlobalData.length; i++) { for (let i = 0; i < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['textField'] === item.spec) { if (inventAllGlobalData[i]['textField'] === item.spec) {
resultGrid.setCellValue(item, 'material', inventAllGlobalData[i]['param1Field']); resultGrid.setCellValue(item, 'material', inventAllGlobalData[i]['param1Field']);
...@@ -159,9 +167,13 @@ $(function() { ...@@ -159,9 +167,13 @@ $(function() {
resultGrid.setCellValue(item, 'width', inventAllGlobalData[i]['param4Field']); resultGrid.setCellValue(item, 'width', inventAllGlobalData[i]['param4Field']);
resultGrid.setCellValue(item, 'thick', inventAllGlobalData[i]['param5Field']); resultGrid.setCellValue(item, 'thick', inventAllGlobalData[i]['param5Field']);
resultGrid.setCellValue(item, 'coefficient', inventAllGlobalData[i]['param6Field']); resultGrid.setCellValue(item, 'coefficient', inventAllGlobalData[i]['param6Field']);
resultGrid.refresh(); $("#locked_datacell_0_"+k+" input").attr("checked",true);
//resultGrid.refresh();
break;
} }
} }
}
} }
}); });
}, },
......
...@@ -127,6 +127,7 @@ $(function() { ...@@ -127,6 +127,7 @@ $(function() {
var tr,index; var tr,index;
// 获取此model元素信息 // 获取此model元素信息
var item = e.items[0]; var item = e.items[0];
for (let k = 0; k < resultGrid.getCheckedRowsIndex()+1; k++) {
for (let i = 0; i < inventNameGlobalData.length; i++) { for (let i = 0; i < inventNameGlobalData.length; i++) {
if (inventNameGlobalData[i]['textField'] === item.inventName) { if (inventNameGlobalData[i]['textField'] === item.inventName) {
resultGrid.setCellValue(item, 'inventName', inventNameGlobalData[i]['param1Field']); resultGrid.setCellValue(item, 'inventName', inventNameGlobalData[i]['param1Field']);
...@@ -137,7 +138,10 @@ $(function() { ...@@ -137,7 +138,10 @@ $(function() {
resultGrid.setCellValue(item, 'width', inventNameGlobalData[i]['param6Field']); resultGrid.setCellValue(item, 'width', inventNameGlobalData[i]['param6Field']);
resultGrid.setCellValue(item, 'thick', inventNameGlobalData[i]['param7Field']); resultGrid.setCellValue(item, 'thick', inventNameGlobalData[i]['param7Field']);
resultGrid.setCellValue(item, 'coefficient', inventNameGlobalData[i]['param8Field']); resultGrid.setCellValue(item, 'coefficient', inventNameGlobalData[i]['param8Field']);
resultGrid.refresh(); $("#locked_datacell_0_"+k+" input").attr("checked",true);
//resultGrid.refresh();
break;
}
} }
} }
} }
...@@ -145,6 +149,7 @@ $(function() { ...@@ -145,6 +149,7 @@ $(function() {
var tr,index; var tr,index;
// 获取此model元素信息 // 获取此model元素信息
var item = e.items[0]; var item = e.items[0];
for (let k = 0; k < resultGrid.getCheckedRowsIndex()+1; k++) {
for (let i = 0; i < inventAllGlobalData.length; i++) { for (let i = 0; i < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['textField'] === item.spec) { if (inventAllGlobalData[i]['textField'] === item.spec) {
resultGrid.setCellValue(item, 'material', inventAllGlobalData[i]['param1Field']); resultGrid.setCellValue(item, 'material', inventAllGlobalData[i]['param1Field']);
...@@ -153,7 +158,10 @@ $(function() { ...@@ -153,7 +158,10 @@ $(function() {
resultGrid.setCellValue(item, 'width', inventAllGlobalData[i]['param4Field']); resultGrid.setCellValue(item, 'width', inventAllGlobalData[i]['param4Field']);
resultGrid.setCellValue(item, 'thick', inventAllGlobalData[i]['param5Field']); resultGrid.setCellValue(item, 'thick', inventAllGlobalData[i]['param5Field']);
resultGrid.setCellValue(item, 'coefficient', inventAllGlobalData[i]['param6Field']); resultGrid.setCellValue(item, 'coefficient', inventAllGlobalData[i]['param6Field']);
resultGrid.refresh(); $("#locked_datacell_0_"+k+" input").attr("checked",true);
//resultGrid.refresh();
break;
}
} }
} }
} }
......
...@@ -283,6 +283,7 @@ $(function () { ...@@ -283,6 +283,7 @@ $(function () {
template: "#:textField#", template: "#:textField#",
filter: "contains" filter: "contains"
}); });
input.data("kendoAutoComplete").search();
} }
}, { }, {
field: "parentPrdtName", field: "parentPrdtName",
......
...@@ -80,6 +80,7 @@ $(function () { ...@@ -80,6 +80,7 @@ $(function () {
template: "#:textField#", template: "#:textField#",
filter: "contains" filter: "contains"
}); });
input.data("kendoAutoComplete").search();
}, },
/*afterEdit: function (e) { /*afterEdit: function (e) {
for (let i = 0; i < princ2Data.length; i++) { for (let i = 0; i < princ2Data.length; i++) {
...@@ -255,6 +256,7 @@ $(function () { ...@@ -255,6 +256,7 @@ $(function () {
template: "#:textField#", template: "#:textField#",
filter: "contains" filter: "contains"
}); });
input.data("kendoAutoComplete").search();
} }
} }
] ]
......
...@@ -288,16 +288,20 @@ $(function () { ...@@ -288,16 +288,20 @@ $(function () {
} }
}, {async: false}); }, {async: false});
input.kendoAutoComplete({ input.kendoAutoComplete({
valuePrimitive: true,
dataSource: dataSource, dataSource: dataSource,
minLength: 0,
dataTextField: "textField", dataTextField: "textField",
dataValueField: "valueField", dataValueField: "valueField",
required: "true",
optionLabelTemplate: "#:textField#", optionLabelTemplate: "#:textField#",
valueTemplate: "#:valueField#", valueTemplate: "#:valueField#",
template: "#:textField#", template: "#:textField#",
filter: "contains" filter: "contains"
}); });
input.data("kendoAutoComplete").search();
//input.trigger("change", {sender: input, open: true});
//enforceMinLength: true,
//suggest: false,
//open: true,
} }
}, { }, {
field: "parentPrdtName", field: "parentPrdtName",
......
...@@ -198,6 +198,7 @@ $(function () { ...@@ -198,6 +198,7 @@ $(function () {
template: "#:textField#", template: "#:textField#",
filter: "contains" filter: "contains"
}); });
input.data("kendoAutoComplete").search();
} }
}, },
{ {
......
...@@ -110,11 +110,7 @@ $(function (){ ...@@ -110,11 +110,7 @@ $(function (){
*/ */
$('#confirm').on('click', function () { $('#confirm').on('click', function () {
let resultRows = resultGrid.getDataItems(); let resultRows = resultGrid.getDataItems();
let detailRows = resultGrid.getDataItems(); let detailRows = detailGrid.getDataItems();
if (rows.length < 1) {
message("请选择数据");
return;
}
let methodType = $("#inqu_status-0-methodType").val(); let methodType = $("#inqu_status-0-methodType").val();
let registerDate = $("#inqu_status-0-registerDate").val(); let registerDate = $("#inqu_status-0-registerDate").val();
if (registerDate.length<=0){ if (registerDate.length<=0){
...@@ -150,7 +146,7 @@ $(function (){ ...@@ -150,7 +146,7 @@ $(function (){
} }
}); });
if(flag) { if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", { JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () { ok: function () {
var info = new EiInfo(); var info = new EiInfo();
info.set("inqu_status-0-userCount",$("#inqu_status-0-userCount").val()); info.set("inqu_status-0-userCount",$("#inqu_status-0-userCount").val());
......
...@@ -208,6 +208,7 @@ function refreshInputSelect(container, inInfo) { ...@@ -208,6 +208,7 @@ function refreshInputSelect(container, inInfo) {
template: "#:textField#", template: "#:textField#",
filter: "contains" filter: "contains"
}); });
input.data("kendoAutoComplete").search();
return dataSource; return dataSource;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment