Commit 927336c3 by yukang

Merge remote-tracking branch 'origin/dev' into dev

parents 119fb4ec 0f04578c
...@@ -151,7 +151,7 @@ public class ServiceHPKC002A extends ServiceEPBase { ...@@ -151,7 +151,7 @@ public class ServiceHPKC002A extends ServiceEPBase {
for (Map row : resultRows) { for (Map row : resultRows) {
BigDecimal applyAmount = MapUtils.getBigDecimal(row, "applyAmount"); BigDecimal applyAmount = MapUtils.getBigDecimal(row, "applyAmount");
String applyRemark = MapUtils.getString(row, "applyRemark"); String applyRemark = MapUtils.getString(row, "applyRemark");
String projName = MapUtils.getString(row, "projCode"); String projCode = MapUtils.getString(row, "projCode");
Long kcId = MapUtils.getLong(row, "id"); Long kcId = MapUtils.getLong(row, "id");
HPKC010 dbKc010 = dbKc010Map.get(kcId); HPKC010 dbKc010 = dbKc010Map.get(kcId);
HPKC002 newKc002 = BeanUtils.copy(dbKc010, HPKC002.class); HPKC002 newKc002 = BeanUtils.copy(dbKc010, HPKC002.class);
...@@ -166,6 +166,8 @@ public class ServiceHPKC002A extends ServiceEPBase { ...@@ -166,6 +166,8 @@ public class ServiceHPKC002A extends ServiceEPBase {
HPSC006 HPSC006 = HPSCTools.Hpsc006.getById(NumberUtils.toLong(hpsc006Id)); HPSC006 HPSC006 = HPSCTools.Hpsc006.getById(NumberUtils.toLong(hpsc006Id));
newKc002.setHpsc006Id(HPSC006.getId()); newKc002.setHpsc006Id(HPSC006.getId());
newKc002.setProjCode(HPSC006.getProjCode()); newKc002.setProjCode(HPSC006.getProjCode());
}else{
newKc002.setProjCode(projCode);
} }
DaoUtils.insert(HPKC002.INSERT, newKc002); DaoUtils.insert(HPKC002.INSERT, newKc002);
// 修改库存数量 // 修改库存数量
......
...@@ -134,7 +134,7 @@ public class ServiceHPKC004B extends ServiceEPBase { ...@@ -134,7 +134,7 @@ public class ServiceHPKC004B extends ServiceEPBase {
for (Map row : resultRows) { for (Map row : resultRows) {
BigDecimal applyAmount = MapUtils.getBigDecimal(row, "applyAmount"); BigDecimal applyAmount = MapUtils.getBigDecimal(row, "applyAmount");
String applyRemark = MapUtils.getString(row, "applyRemark"); String applyRemark = MapUtils.getString(row, "applyRemark");
String projName = MapUtils.getString(row, "projCode"); String projCode = MapUtils.getString(row, "projCode");
Long kcId = MapUtils.getLong(row, "id"); Long kcId = MapUtils.getLong(row, "id");
HPKC010 dbKc010 = dbKc010Map.get(kcId); HPKC010 dbKc010 = dbKc010Map.get(kcId);
HPKC004 newKc004 = BeanUtils.copy(dbKc010, HPKC004.class); HPKC004 newKc004 = BeanUtils.copy(dbKc010, HPKC004.class);
...@@ -147,9 +147,9 @@ public class ServiceHPKC004B extends ServiceEPBase { ...@@ -147,9 +147,9 @@ public class ServiceHPKC004B extends ServiceEPBase {
newKc004.setIsPrint(CommonConstant.YesNo.NO_0); newKc004.setIsPrint(CommonConstant.YesNo.NO_0);
newKc004.setDeleteFlag(CommonConstant.YesNo.NO_0); newKc004.setDeleteFlag(CommonConstant.YesNo.NO_0);
//绑定项目 //绑定项目
HPSC001 HPSC001 = HPSCTools.HpSc001.getId(projName); HPSC001 HPSC001 = HPSCTools.HpSc001.get(projCode);
newKc004.setProjCode(HPSC001.getProjCode()); newKc004.setProjCode(HPSC001.getProjCode());
newKc004.setProjName(projName); newKc004.setProjName(HPSC001.getProjName());
DaoUtils.insert(HPKC004.INSERT, newKc004); DaoUtils.insert(HPKC004.INSERT, newKc004);
......
...@@ -2,50 +2,7 @@ let projNameGlobalData = []; ...@@ -2,50 +2,7 @@ let projNameGlobalData = [];
$(function () { $(function () {
IPLATUI.EFGrid = { IPLATUI.EFGrid = {
"result": { "result": {
columns: [{ columns: [],
field: "projCode",
title: "项目名称",
template: function (dataItem) {
for (let i = 0; i < projNameGlobalData.length; i++) {
if (projNameGlobalData[i]['textField'] === dataItem['projName']) {
//dataItem["prdtCode"] = projNameGlobalData[i]['valueField']
resultGrid.setCellValue(0, "projCode", projNameGlobalData[i]['valueField']);
return projNameGlobalData[i]['textField'];
}
}
return dataItem["projCode"];
},
editor: function (container, options) {
var grid = container.closest(".k-grid").data("kendoGrid");
var cellIndex = grid.cellIndex(container);
var input = $('<input />');
input.attr("name", options.field);
input.attr("id", options.field);
input.appendTo(container);
let eiInfo = new EiInfo();
eiInfo.set("isSplicingSymbol",false);
var dataSource;
EiCommunicator.send("HPSC001", "queryComboBox", eiInfo, {
onSuccess: function (ei) {
dataSource = ei.getBlock("proj_record_block_id").getMappedRows();
projNameGlobalData = dataSource;
},
onFail: function (ei) {
}
}, {async: false});
input.kendoAutoComplete({
valuePrimitive: true,
dataSource: dataSource,
dataTextField: "textField",
dataValueField: "valueField",
required: "true",
optionLabelTemplate: "#:textField#",
valueTemplate: "#:valueField#",
template: "#:textField#",
filter: "contains"
});
}
}],
dataBound: function () { dataBound: function () {
} }
} }
......
...@@ -31,22 +31,25 @@ ...@@ -31,22 +31,25 @@
<EF:EFInput ename="inqu_result-0-hpsc006Id" type="hidden"/> <EF:EFInput ename="inqu_result-0-hpsc006Id" type="hidden"/>
<EF:EFGrid blockId="result" autoDraw="override" autoFit="true" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="override" autoFit="true" checkMode="row">
<EF:EFColumn ename="id" cname="库存ID" enable="false" width="60" align="center"/> <EF:EFColumn ename="id" cname="库存ID" enable="false" width="60" align="center"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="100" align="center"> <EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="10" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" /> <EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="whCode" cname="仓库名称" enable="false" width="120" align="center" <EF:EFComboColumn ename="whCode" cname="仓库名称" enable="false" width="100" align="center"
blockName="wh_record_block_id" textField="textField" valueField="valueField" blockName="wh_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#"> columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="false" width="120" align="center" <EF:EFComboColumn ename="inventCode" cname="存货名称" enable="false" width="100" align="center"
blockName="invent_name_block_id" textField="textField" valueField="valueField" blockName="invent_name_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#"> columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="inventRecordId" cname="规格" enable="false" width="120" align="center" <EF:EFComboColumn ename="inventRecordId" cname="规格" enable="false" width="100" align="center"
blockName="invent_spec_block_id" textField="textField" valueField="valueField" blockName="invent_spec_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#"> columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="projCode" cname="项目名称" width="200" align="center" required="true" maxLength="50"/> <EF:EFComboColumn ename="projCode" cname="项目名称" width="300" align="center" defaultValue="" required="true"
filter="contains" >
<EF:EFOptions blockId="proj_record_block_id" valueField="valueField" textField="textField" />
</EF:EFComboColumn>
<EF:EFColumn ename="applyAmount" cname="申请数量" width="120" align="right" format="{0:N0}" required="true"/> <EF:EFColumn ename="applyAmount" cname="申请数量" width="120" align="right" format="{0:N0}" required="true"/>
<EF:EFColumn ename="applyRemark" cname="申请说明" width="150" editType="textarea" copy="true"/> <EF:EFColumn ename="applyRemark" cname="申请说明" width="150" editType="textarea" copy="true"/>
<EF:EFColumn ename="amount" cname="库存数量" enable="false" width="120" align="right" format="{0:N0}" <EF:EFColumn ename="amount" cname="库存数量" enable="false" width="120" align="right" format="{0:N0}"
......
...@@ -2,50 +2,7 @@ let projNameGlobalData = []; ...@@ -2,50 +2,7 @@ let projNameGlobalData = [];
$(function () { $(function () {
IPLATUI.EFGrid = { IPLATUI.EFGrid = {
"result": { "result": {
columns: [{ columns: [],
field: "projCode",
title: "项目名称",
template: function (dataItem) {
for (let i = 0; i < projNameGlobalData.length; i++) {
if (projNameGlobalData[i]['textField'] === dataItem['projName']) {
//dataItem["prdtCode"] = projNameGlobalData[i]['valueField']
resultGrid.setCellValue(0, "projCode", projNameGlobalData[i]['valueField']);
return projNameGlobalData[i]['textField'];
}
}
return dataItem["projCode"];
},
editor: function (container, options) {
var grid = container.closest(".k-grid").data("kendoGrid");
var cellIndex = grid.cellIndex(container);
var input = $('<input />');
input.attr("name", options.field);
input.attr("id", options.field);
input.appendTo(container);
let eiInfo = new EiInfo();
eiInfo.set("isSplicingSymbol",false);
var dataSource;
EiCommunicator.send("HPSC001", "queryComboBox", eiInfo, {
onSuccess: function (ei) {
dataSource = ei.getBlock("proj_record_block_id").getMappedRows();
projNameGlobalData = dataSource;
},
onFail: function (ei) {
}
}, {async: false});
input.kendoAutoComplete({
valuePrimitive: true,
dataSource: dataSource,
dataTextField: "textField",
dataValueField: "valueField",
required: "true",
optionLabelTemplate: "#:textField#",
valueTemplate: "#:valueField#",
template: "#:textField#",
filter: "contains"
});
}
}],
dataBound: function () { dataBound: function () {
} }
} }
......
...@@ -45,7 +45,10 @@ ...@@ -45,7 +45,10 @@
blockName="invent_spec_block_id" textField="textField" valueField="valueField" blockName="invent_spec_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#"> columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="projCode" cname="项目名称" width="200" align="center" required="true" maxLength="50"/> <EF:EFComboColumn ename="projCode" cname="项目名称" width="300" align="center" defaultValue="" required="true"
filter="contains" >
<EF:EFOptions blockId="proj_record_block_id" valueField="valueField" textField="textField" />
</EF:EFComboColumn>
<EF:EFColumn ename="applyAmount" cname="申请数量" width="120" align="right" format="{0:N0}" required="true"/> <EF:EFColumn ename="applyAmount" cname="申请数量" width="120" align="right" format="{0:N0}" required="true"/>
<EF:EFColumn ename="applyRemark" cname="申请说明" width="150" editType="textarea" copy="true"/> <EF:EFColumn ename="applyRemark" cname="申请说明" width="150" editType="textarea" copy="true"/>
<EF:EFColumn ename="amount" cname="库存数量" enable="false" width="120" align="right" format="{0:N0}" <EF:EFColumn ename="amount" cname="库存数量" enable="false" width="120" align="right" format="{0:N0}"
......
...@@ -412,7 +412,6 @@ assignCallback = function (row) { ...@@ -412,7 +412,6 @@ assignCallback = function (row) {
*/ */
function saveFunc() { function saveFunc() {
let rows = detailGrid.getCheckedRows(); let rows = detailGrid.getCheckedRows();
rows.status
if (rows.length < 1) { if (rows.length < 1) {
message("请选择数据"); message("请选择数据");
return; return;
......
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