Commit 7f82a15d by 江和松

1.调拨类型为组织间,组织选择智和时,对应的调入仓库名称或调出仓库名称选择不到仓库

2.调拨类型为组织间,调出公司选择后,调入公司不应该带出
parent 1cd2b399
......@@ -43,6 +43,7 @@ public class ServiceHGKC013 extends ServiceEPBase {
inInfo.getBlock(EiConstant.resultBlock).setBlockMeta(new HGKC013().eiMetadata);
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BOX_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID));
//inInfo.set(HGKC013.FIELD_COMPANY_CODE, userVO.getUsercode());
}catch (Exception e){
LogUtils.setDetailMsg(inInfo,e,"初始化失败");
......
......@@ -4,6 +4,7 @@ $(function () {
var companyCode = '';//__eiInfo.get("companyCode");
var companyCodeBox = __eiInfo.getBlock("roleCompany").getMappedRows();
var whCodeBox = __eiInfo.getBlock("wh_record_box_block_id").getMappedRows();
var whInCodeBox = __eiInfo.getBlock("wh_record_block_id").getMappedRows();
IPLATUI.EFGrid = {
"result": {
......@@ -46,7 +47,7 @@ $(function () {
for (let i = 0; i < companyCodeBox.length; i++) {
if (calloutCompanyCode === companyCodeBox[i]['companyCode']) {
item['calloutCompanyName'] = companyCodeBox[i]['companyName'];
if (!isBlank(item['allotType'])){
if (!isBlank(item['allotType']) && item["allotType"] == 1){
item['callinCompanyCode'] = companyCodeBox[i]['companyCode'];
}
return companyCodeBox[i]['companyName'];
......@@ -103,26 +104,26 @@ $(function () {
field: "callinWhCode",
title: "调入仓库名称",
filter: function (options) {
let calloutCompanyCode = options.model['calloutCompanyCode'];
let callinCompanyCode = options.model['callinCompanyCode'];
let calloutWhCode = options.model['calloutWhCode'];
if (callinCompanyCode == calloutCompanyCode){
return _.filter(whCodeBox, function (item) {
return item["param1Field"]===callinCompanyCode && item["valueField"]!=calloutWhCode;
})
}else if (callinCompanyCode != calloutCompanyCode){
return _.filter(whCodeBox, function (item) {
return item["param1Field"]===callinCompanyCode;
})
}
// let calloutCompanyCode = options.model['calloutCompanyCode'];
// let callinCompanyCode = options.model['callinCompanyCode'];
// let calloutWhCode = options.model['calloutWhCode'];
// if (callinCompanyCode == calloutCompanyCode){
// return _.filter(whCodeBox, function (item) {
// return item["param1Field"]===callinCompanyCode && item["valueField"]!=calloutWhCode;
// })
// }else if (callinCompanyCode != calloutCompanyCode){
// return _.filter(whCodeBox, function (item) {
// return item["param1Field"]===callinCompanyCode;
// })
// }
return options.values;
},
template: function (item) {
let callinWhCode = item.callinWhCode;
for (let i = 0; i < whCodeBox.length; i++) {
if (callinWhCode === whCodeBox[i]['valueField']) {
item['callinWhName'] = whCodeBox[i]['textField'];
return whCodeBox[i]['textField'];
for (let i = 0; i < whInCodeBox.length; i++) {
if (callinWhCode === whInCodeBox[i]['valueField']) {
item['callinWhName'] = whInCodeBox[i]['textField'];
return whInCodeBox[i]['textField'];
}
}
return callinWhCode;
......@@ -133,9 +134,7 @@ $(function () {
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
grid.dataSource.bind("change", function(e) {
// 判断父级节点是否发生变化
if (e.field === "companyCode"){
loadChange(grid,e,"allotType");
}else if (e.field === "calloutCompanyCode") {
if (e.field === "calloutCompanyCode") {
if (e.items[0]["allotType"] == 1){
e.items[0]["callinCompanyCode"] = e.items[0]["calloutCompanyCode"];
}
......@@ -145,7 +144,8 @@ $(function () {
e.items[0]["callinWhName"] = '';
loadChange(grid,e,"callinCompanyCode");
loadChange(grid,e,"calloutWhCode");
}else if (e.field == "calloutWhCode") {
}
if (e.field == "calloutWhCode") {
if (e.items[0]["allotType"] == 2 && isBlank(e.items[0]["callinCompanyCode"])){
e.items[0]["callinCompanyCode"]= '';
loadChange(grid,e,"callinCompanyCode");
......@@ -156,7 +156,8 @@ $(function () {
e.items[0]["callinWhCode"] = '';
loadChange(grid,e,"callinWhCode");
}
}else if (e.field == "callinCompanyCode") {
}
if (e.field == "callinCompanyCode") {
e.items[0]["callinWhCode"] = '';
loadChange(grid,e,"callinWhCode");
}
......
......@@ -49,7 +49,7 @@
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="callinWhCode" cname="调入仓库名称" enable="true" width="120" align="center" required="true"
blockName="wh_record_box_block_id" textField="textField" valueField="valueField"
blockName="wh_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFComboColumn ename="status" cname="状态" width="80" align="center" enable="false" defaultValue="0" required="true">
......
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