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,49 +119,61 @@ $(function() { ...@@ -119,49 +119,61 @@ $(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 i = 0; i < inventNameGlobalData.length; i++) { for (let k = 0; k < resultGrid.getCheckedRowsIndex()+1; k++) {
if (inventNameGlobalData[i]['textField'] === item.inventName) { for (let i = 0; i < inventNameGlobalData.length; i++) {
//dataItem['spec'] = inventNameGlobalData[i]['param2Field']; if (inventNameGlobalData[i]['textField'] === item.inventName) {
/* dataItem['material'] = inventNameGlobalData[i]['param3Field']; //dataItem['spec'] = inventNameGlobalData[i]['param2Field'];
dataItem['unit'] = inventNameGlobalData[i]['param4Field']; /* dataItem['material'] = inventNameGlobalData[i]['param3Field'];
dataItem['length'] = inventNameGlobalData[i]['param5Field']; dataItem['unit'] = inventNameGlobalData[i]['param4Field'];
dataItem['width'] = inventNameGlobalData[i]['param6Field']; dataItem['length'] = inventNameGlobalData[i]['param5Field'];
dataItem['thick'] = inventNameGlobalData[i]['param7Field']; dataItem['width'] = inventNameGlobalData[i]['param6Field'];
dataItem['coefficient'] = inventNameGlobalData[i]['param8Field']; dataItem['thick'] = inventNameGlobalData[i]['param7Field'];
dataItem['inventRecordId'] = inventNameGlobalData[i]['param9Field'];*/ dataItem['coefficient'] = inventNameGlobalData[i]['param8Field'];
resultGrid.setCellValue(item, 'inventName', inventNameGlobalData[i]['param1Field']); dataItem['inventRecordId'] = inventNameGlobalData[i]['param9Field'];*/
resultGrid.setCellValue(item, 'spec', inventNameGlobalData[i]['param2Field']); resultGrid.setCellValue(item, 'inventName', inventNameGlobalData[i]['param1Field']);
resultGrid.setCellValue(item, 'material', inventNameGlobalData[i]['param3Field']); resultGrid.setCellValue(item, 'spec', inventNameGlobalData[i]['param2Field']);
resultGrid.setCellValue(item, 'unit', inventNameGlobalData[i]['param4Field']); resultGrid.setCellValue(item, 'material', inventNameGlobalData[i]['param3Field']);
resultGrid.setCellValue(item, 'length', inventNameGlobalData[i]['param5Field']); resultGrid.setCellValue(item, 'unit', inventNameGlobalData[i]['param4Field']);
resultGrid.setCellValue(item, 'width', inventNameGlobalData[i]['param6Field']); resultGrid.setCellValue(item, 'length', inventNameGlobalData[i]['param5Field']);
resultGrid.setCellValue(item, 'thick', inventNameGlobalData[i]['param7Field']); resultGrid.setCellValue(item, 'width', inventNameGlobalData[i]['param6Field']);
resultGrid.setCellValue(item, 'coefficient', inventNameGlobalData[i]['param8Field']); resultGrid.setCellValue(item, 'thick', inventNameGlobalData[i]['param7Field']);
resultGrid.refresh(); resultGrid.setCellValue(item, 'coefficient', inventNameGlobalData[i]['param8Field']);
//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 i = 0; i < inventAllGlobalData.length; i++) { for (let k = 0; k < resultGrid.getCheckedRowsIndex()+1; k++) {
if (inventAllGlobalData[i]['textField'] === item.spec) { for (let i = 0; i < inventAllGlobalData.length; i++) {
resultGrid.setCellValue(item, 'material', inventAllGlobalData[i]['param1Field']); if (inventAllGlobalData[i]['textField'] === item.spec) {
resultGrid.setCellValue(item, 'unit', inventAllGlobalData[i]['param2Field']); resultGrid.setCellValue(item, 'material', inventAllGlobalData[i]['param1Field']);
resultGrid.setCellValue(item, 'length', inventAllGlobalData[i]['param3Field']); resultGrid.setCellValue(item, 'unit', inventAllGlobalData[i]['param2Field']);
resultGrid.setCellValue(item, 'width', inventAllGlobalData[i]['param4Field']); resultGrid.setCellValue(item, 'length', inventAllGlobalData[i]['param3Field']);
resultGrid.setCellValue(item, 'thick', inventAllGlobalData[i]['param5Field']); resultGrid.setCellValue(item, 'width', inventAllGlobalData[i]['param4Field']);
resultGrid.setCellValue(item, 'coefficient', inventAllGlobalData[i]['param6Field']); resultGrid.setCellValue(item, 'thick', inventAllGlobalData[i]['param5Field']);
resultGrid.refresh(); resultGrid.setCellValue(item, 'coefficient', inventAllGlobalData[i]['param6Field']);
} $("#locked_datacell_0_"+k+" input").attr("checked",true);
} //resultGrid.refresh();
break;
}
}
}
} }
}); });
}, },
......
...@@ -127,17 +127,21 @@ $(function() { ...@@ -127,17 +127,21 @@ $(function() {
var tr,index; var tr,index;
// 获取此model元素信息 // 获取此model元素信息
var item = e.items[0]; var item = e.items[0];
for (let i = 0; i < inventNameGlobalData.length; i++) { for (let k = 0; k < resultGrid.getCheckedRowsIndex()+1; k++) {
if (inventNameGlobalData[i]['textField'] === item.inventName) { for (let i = 0; i < inventNameGlobalData.length; i++) {
resultGrid.setCellValue(item, 'inventName', inventNameGlobalData[i]['param1Field']); if (inventNameGlobalData[i]['textField'] === item.inventName) {
resultGrid.setCellValue(item, 'spec', inventNameGlobalData[i]['param2Field']); resultGrid.setCellValue(item, 'inventName', inventNameGlobalData[i]['param1Field']);
resultGrid.setCellValue(item, 'material', inventNameGlobalData[i]['param3Field']); resultGrid.setCellValue(item, 'spec', inventNameGlobalData[i]['param2Field']);
resultGrid.setCellValue(item, 'unit', inventNameGlobalData[i]['param4Field']); resultGrid.setCellValue(item, 'material', inventNameGlobalData[i]['param3Field']);
resultGrid.setCellValue(item, 'length', inventNameGlobalData[i]['param5Field']); resultGrid.setCellValue(item, 'unit', inventNameGlobalData[i]['param4Field']);
resultGrid.setCellValue(item, 'width', inventNameGlobalData[i]['param6Field']); resultGrid.setCellValue(item, 'length', inventNameGlobalData[i]['param5Field']);
resultGrid.setCellValue(item, 'thick', inventNameGlobalData[i]['param7Field']); resultGrid.setCellValue(item, 'width', inventNameGlobalData[i]['param6Field']);
resultGrid.setCellValue(item, 'coefficient', inventNameGlobalData[i]['param8Field']); resultGrid.setCellValue(item, 'thick', inventNameGlobalData[i]['param7Field']);
resultGrid.refresh(); resultGrid.setCellValue(item, 'coefficient', inventNameGlobalData[i]['param8Field']);
$("#locked_datacell_0_"+k+" input").attr("checked",true);
//resultGrid.refresh();
break;
}
} }
} }
} }
...@@ -145,15 +149,19 @@ $(function() { ...@@ -145,15 +149,19 @@ $(function() {
var tr,index; var tr,index;
// 获取此model元素信息 // 获取此model元素信息
var item = e.items[0]; var item = e.items[0];
for (let i = 0; i < inventAllGlobalData.length; i++) { for (let k = 0; k < resultGrid.getCheckedRowsIndex()+1; k++) {
if (inventAllGlobalData[i]['textField'] === item.spec) { for (let i = 0; i < inventAllGlobalData.length; i++) {
resultGrid.setCellValue(item, 'material', inventAllGlobalData[i]['param1Field']); if (inventAllGlobalData[i]['textField'] === item.spec) {
resultGrid.setCellValue(item, 'unit', inventAllGlobalData[i]['param2Field']); resultGrid.setCellValue(item, 'material', inventAllGlobalData[i]['param1Field']);
resultGrid.setCellValue(item, 'length', inventAllGlobalData[i]['param3Field']); resultGrid.setCellValue(item, 'unit', inventAllGlobalData[i]['param2Field']);
resultGrid.setCellValue(item, 'width', inventAllGlobalData[i]['param4Field']); resultGrid.setCellValue(item, 'length', inventAllGlobalData[i]['param3Field']);
resultGrid.setCellValue(item, 'thick', inventAllGlobalData[i]['param5Field']); resultGrid.setCellValue(item, 'width', inventAllGlobalData[i]['param4Field']);
resultGrid.setCellValue(item, 'coefficient', inventAllGlobalData[i]['param6Field']); resultGrid.setCellValue(item, 'thick', inventAllGlobalData[i]['param5Field']);
resultGrid.refresh(); resultGrid.setCellValue(item, 'coefficient', inventAllGlobalData[i]['param6Field']);
$("#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