Commit 60f240e6 by yukang

处理相关BUG

parent 54ac9b08
package com.baosight.hpjx.hp.sc.domain;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import java.util.HashMap;
import java.util.Map;
public class HPSC098 extends DaoEPBase {
private String factoryCode = " "; /* 厂区编码*/
private String factoryName = " "; /* 厂区名称*/
private String groupCode = " "; /* 组织编码*/
private String groupName = " "; /* 组织名称 */
/**
* initialize the metadata
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn("factoryCode");
eiColumn.setDescName("厂区编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("factoryName");
eiColumn.setDescName("厂区名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("groupCode");
eiColumn.setDescName("组织编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("groupName");
eiColumn.setDescName("组织名称");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor
*/
public HPSC098() {
initMetaData();
}
public String getFactoryCode() {
return factoryCode;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryName() {
return factoryName;
}
public void setFactoryName(String factoryName) {
this.factoryName = factoryName;
}
public String getGroupCode() {
return groupCode;
}
public void setGroupCode(String groupCode) {
this.groupCode = groupCode;
}
public String getGroupName() {
return groupName;
}
public void setGroupName(String groupName) {
this.groupName = groupName;
}
/**
* get the value from Map
*/
public void fromMap(Map map) {
setFactoryCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("factoryCode")), factoryCode));
setFactoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("factoryName")), factoryName));
setGroupCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("groupCode")), groupCode));
setGroupName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("groupName")), groupName));
}
/**
* set the value to Map
*/
public Map toMap() {
Map map = new HashMap();
map.put("factoryCode",StringUtils.toString(factoryCode, eiMetadata.getMeta("factoryCode")));
map.put("factoryName",StringUtils.toString(factoryName, eiMetadata.getMeta("factoryName")));
map.put("groupCode",StringUtils.toString(groupCode, eiMetadata.getMeta("groupCode")));
map.put("groupName",StringUtils.toString(groupName, eiMetadata.getMeta("groupName")));
return map;
}
}
...@@ -100,6 +100,7 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -100,6 +100,7 @@ public class ServiceHPSC005A extends ServiceBase {
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HPSC005A fSc005a = new HPSC005A(); HPSC005A fSc005a = new HPSC005A();
fSc005a.fromMap(resultRow); fSc005a.fromMap(resultRow);
if (fSc005a.getId() == null || fSc005a.getId() == 0) { if (fSc005a.getId() == null || fSc005a.getId() == 0) {
this.add(dbSc005, fSc005a); this.add(dbSc005, fSc005a);
} else { } else {
...@@ -217,10 +218,11 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -217,10 +218,11 @@ public class ServiceHPSC005A extends ServiceBase {
@OperationLogAnnotation(operModul = "拆单派工",operType = "新增",operDesc = "生产订单-拆单派工A-分派") @OperationLogAnnotation(operModul = "拆单派工",operType = "新增",operDesc = "生产订单-拆单派工A-分派")
public EiInfo assign(EiInfo inInfo) { public EiInfo assign(EiInfo inInfo) {
try { try {
List<String> orderIds = (List<String>) inInfo.get("ids"); String[] orderIds = inInfo.getString("ids").split(",");
Long orgId = Long.parseLong(inInfo.getString("id")); String factoryCode = inInfo.getString("factoryCode");
// 先找到分派的组织 String factoryName = inInfo.getString("factoryName");
HPPZ011 dbPz011 = HPPZTools.HpPz011.get(orgId); String groupCode = inInfo.getString("groupCode");
String groupName = inInfo.getString("groupName");
for (String orderId : orderIds) { for (String orderId : orderIds) {
// 校验主订单是否已分派 // 校验主订单是否已分派
HPSC005 dbSc005 = HPSCTools.HpSc005.getById(Long.parseLong(orderId)); HPSC005 dbSc005 = HPSCTools.HpSc005.getById(Long.parseLong(orderId));
...@@ -244,14 +246,14 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -244,14 +246,14 @@ public class ServiceHPSC005A extends ServiceBase {
newSc005a.setNum(dbSc005.getUnassignedNum()); newSc005a.setNum(dbSc005.getUnassignedNum());
} }
newSc005a.setTotalWt(newSc005a.getNum().multiply(dbSc005.getUnitWt())); newSc005a.setTotalWt(newSc005a.getNum().multiply(dbSc005.getUnitWt()));
newSc005a.setOrgNo(dbPz011.getGroupCode()); newSc005a.setOrgNo(groupCode);
newSc005a.setOrgName(dbPz011.getGroupName()); newSc005a.setOrgName(groupName);
newSc005a.setFactoryCode(dbPz011.getFactoryCode()); newSc005a.setFactoryCode(factoryCode);
newSc005a.setFactoryName(dbPz011.getFactoryName()); newSc005a.setFactoryName(factoryName);
DaoUtils.insert(HPSC005A.INSERT, newSc005a); DaoUtils.insert(HPSC005A.INSERT, newSc005a);
} }
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + orderIds.size() + "]条数据分派成功!"); inInfo.setMsg("操作成功!本次对[" + orderIds.length + "]条数据分派成功!");
} catch (Exception e) { } catch (Exception e) {
LogUtils.setMsg(inInfo, e, "分派失败"); LogUtils.setMsg(inInfo, e, "分派失败");
} }
...@@ -265,7 +267,7 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -265,7 +267,7 @@ public class ServiceHPSC005A extends ServiceBase {
*/ */
private void setBaseInfo(HPSC005A fSc005a) { private void setBaseInfo(HPSC005A fSc005a) {
// 厂区名称 // 厂区名称
fSc005a.setFactoryName(HPPZTools.HpPz011.getFactoryName(fSc005a.getFactoryCode())); fSc005a.setFactoryName(HPXSTools.XsOrg.get(fSc005a.getFactoryCode()).getOrgCname());
// 生产组名称 // 生产组名称
fSc005a.setOrgName(HPXSTools.XsOrg.get(fSc005a.getOrgNo()).getOrgCname()); fSc005a.setOrgName(HPXSTools.XsOrg.get(fSc005a.getOrgNo()).getOrgCname());
} }
......
...@@ -12,6 +12,7 @@ import com.baosight.hpjx.hp.pz.domain.HPPZ011; ...@@ -12,6 +12,7 @@ import com.baosight.hpjx.hp.pz.domain.HPPZ011;
import com.baosight.hpjx.hp.pz.tools.HPPZTools; import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.hp.sc.domain.*; import com.baosight.hpjx.hp.sc.domain.*;
import com.baosight.hpjx.hp.xs.domain.Org; import com.baosight.hpjx.hp.xs.domain.Org;
import com.baosight.hpjx.hp.xs.tools.HPXSTools;
import com.baosight.hpjx.util.AssertUtils; import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
...@@ -135,10 +136,8 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -135,10 +136,8 @@ public class ServiceHPSC006 extends ServiceBase {
if(HPSC006.getFactoryCode()!=null && !(HPSC006.getFactoryCode().equals(" "))) { if(HPSC006.getFactoryCode()!=null && !(HPSC006.getFactoryCode().equals(" "))) {
AssertUtils.isEmpty(HPSC006.getOrgNo(), "已选择厂区,下料组不能为空"); AssertUtils.isEmpty(HPSC006.getOrgNo(), "已选择厂区,下料组不能为空");
HPSC006.setStatus(1); HPSC006.setStatus(1);
Org Org =(Org) dao.get("HPXSOrg.query","orgId",HPSC006.getOrgNo()); HPSC006.setOrgName(HPXSTools.XsOrg.get(HPSC006.getFactoryCode()).getOrgCname());
Org Fac =(Org) dao.get("HPXSOrg.query","orgId",Org.getParentOrgId()); HPSC006.setFactoryName(HPXSTools.XsOrg.get(HPSC006.getOrgNo()).getOrgCname());
HPSC006.setOrgName(Org.getOrgCname());
HPSC006.setFactoryName(Fac.getOrgCname());
} }
DaoUtils.insert("HPSC006.insert",HPSC006); DaoUtils.insert("HPSC006.insert",HPSC006);
} }
...@@ -182,10 +181,8 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -182,10 +181,8 @@ public class ServiceHPSC006 extends ServiceBase {
HPSC006.setTotalWt(totalWt); HPSC006.setTotalWt(totalWt);
HPSC006.setPlanCompletionDate(StringUtil.removeHorizontalLine(HPSC006.getPlanCompletionDate())); HPSC006.setPlanCompletionDate(StringUtil.removeHorizontalLine(HPSC006.getPlanCompletionDate()));
HPSC006.setInventCode(HPPZTools.checkAndSavePZ04(HPSC006.getInventType(),HPSC006.getInventName())); HPSC006.setInventCode(HPPZTools.checkAndSavePZ04(HPSC006.getInventType(),HPSC006.getInventName()));
Org Org =(Org) dao.get("HPXSOrg.query","orgId",HPSC006.getOrgNo()); HPSC006.setOrgName(HPXSTools.XsOrg.get(HPSC006.getFactoryCode()).getOrgCname());
Org Fac =(Org) dao.get("HPXSOrg.query","orgId",Org.getParentOrgId()); HPSC006.setFactoryName(HPXSTools.XsOrg.get(HPSC006.getOrgNo()).getOrgCname());
HPSC006.setOrgName(Org.getOrgCname());
HPSC006.setFactoryName(Fac.getOrgCname());
DaoUtils.update("HPSC006.update",HPSC006); DaoUtils.update("HPSC006.update",HPSC006);
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
......
...@@ -3,6 +3,8 @@ package com.baosight.hpjx.hp.sc.service; ...@@ -3,6 +3,8 @@ package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation; import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.hp.pz.domain.HPPZ011; import com.baosight.hpjx.hp.pz.domain.HPPZ011;
import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.hpjx.hp.sc.domain.HPSC098;
import com.baosight.hpjx.hp.xs.domain.Org; import com.baosight.hpjx.hp.xs.domain.Org;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
...@@ -29,11 +31,13 @@ public class ServiceHPSC098 extends ServiceBase { ...@@ -29,11 +31,13 @@ public class ServiceHPSC098 extends ServiceBase {
@OperationLogAnnotation(operModul = "组织机构",operType = "查询",operDesc = "初始化") @OperationLogAnnotation(operModul = "组织机构",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
String orgType = inInfo.getString("inqu_status-0-orgType");
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("orgType", "cutGroup"); queryMap.put("orgType", orgType);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.ORG_RECORD_BLOCK_ID), queryMap); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID), null); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID), null);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ011().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC098().eiMetadata);
inInfo.set("inqu_status-0-orgType", orgType);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
...@@ -50,7 +54,7 @@ public class ServiceHPSC098 extends ServiceBase { ...@@ -50,7 +54,7 @@ public class ServiceHPSC098 extends ServiceBase {
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
inInfo = super.query(inInfo, "HPXSOrg.queryList", new HPPZ011()); inInfo = super.query(inInfo, "HPSC098.query", new HPSC001());
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
} }
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPSC098">
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC098">
SELECT
ORG_ENAME AS "groupCode",
ORG_CNAME AS "groupName",
FACTORY_CODE AS "factoryCode",
FACTORY_NAME AS "factoryName"
FROM iplat.TXSOG01
WHERE 1 = 1
AND FACTORY_CODE IN (
SELECT ORG_ENAME FROM iplat.TXSOG01
WHERE COMPANY_CODE = #companyCode# AND ORG_TYPE = 'factory'
)
<isNotEmpty prepend=" AND " property="orgType">
ORG_TYPE = #orgType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupCode">
ORG_ENAME = #groupCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
</select>
<select id="count" resultClass="int">
SELECT
COUNT(*)
FROM iplat.TXSOG01
WHERE 1 = 1
AND FACTORY_CODE IN (
SELECT ORG_ENAME FROM iplat.TXSOG01
WHERE COMPANY_CODE = #companyCode# AND ORG_TYPE = 'factory'
)
<isNotEmpty prepend=" AND " property="orgType">
ORG_TYPE = #orgType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupCode">
ORG_ENAME = #groupCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
</select>
</sqlMap>
let projNameGlobalData = [];
$(function () {
IPLATUI.EFGrid = {
"result": {
columns: [],
dataBound: function () {
}
}
};
$("#ef_form_head").hide();
// 查询
$("#QUERY").on("click", query);
// 选择
$("#BTN_SELECT").on("click", select);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 初始化查询
query();
});
/**
* 查询
*/
var query = function (e) {
resultGrid.dataSource.page(1);
};
/**
* 选择库存
*/
let select = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据")
return;
}
for (let i = 0; i < rows.length; i++) {
let applyAmount = rows[i]['applyAmount'];
let amount = rows[i]['amount'];
if (!isPositiveInteger(applyAmount)) {
message("勾选的第" + (i + 1) + "行数量必须是大于0的整数");
return;
}
if (parseFloat(applyAmount) > parseFloat(amount)) {
message("第" + (i + 1) + "行申请数量不能大于库存数量");
return;
}
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据生成出库单吗? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPKC002A", "select",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
parent.JSColorbox.setValueCallback();
}
}
);
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="库存查询">
<EF:EFRegion id="inqu" title="查询区域" type="query">
<div class="row">
<EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('1', '2')"/>
</EF:EFSelect>
<EF:EFSelect cname="仓库名称" ename="inqu_status-0-whCode" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="存货名称" ename="inqu_status-0-inventCode" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-spec" cname="规格" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFInput ename="inqu_result-0-hpsc006Id" type="hidden"/>
<EF:EFGrid blockId="result" autoDraw="override" autoFit="true" checkMode="row">
<EF:EFColumn ename="id" cname="库存ID" enable="false" width="60" align="center"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="10" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn>
<EF:EFComboColumn ename="whCode" cname="仓库名称" enable="false" width="100" align="center"
blockName="wh_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="false" width="100" align="center"
blockName="invent_name_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventRecordId" cname="规格" enable="false" width="100" align="center"
blockName="invent_spec_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<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="amount" cname="库存数量" enable="false" width="120" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="unitWeight" cname="单量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="库存重量" enable="false" width="120" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
...@@ -491,14 +491,6 @@ $(window).load(function () { ...@@ -491,14 +491,6 @@ $(window).load(function () {
*/ */
let query = function () { let query = function () {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
//更新树
var tree = $("#materialTree").data("kendoTreeView");
var inInfo = new EiInfo();
EiCommunicator.send("HPSC002", "queryTreeNode", inInfo, {//传入参数
onSuccess: function (inInfo) {
tree.reload("root");//更新树
}
});
} }
function openUploadFile(id) { function openUploadFile(id) {
uploadFileWindow.open().center(); uploadFileWindow.open().center();
......
...@@ -105,25 +105,30 @@ function tearAssignCallback() { ...@@ -105,25 +105,30 @@ function tearAssignCallback() {
* 批量分派 * 批量分派
*/ */
function assign() { function assign() {
//重置全局变量
ids = [];
let rows = resultGrid.getCheckedRows() let rows = resultGrid.getCheckedRows()
if (rows.length < 1) { if (rows.length < 1) {
message("请至少选择一条需要分派的数据"); message("请至少选择一条需要分派的数据");
return; return;
} }
rows.forEach(function (element) {
ids.push(element.id)
});
// groupType=1:仅查询生产组 // groupType=1:仅查询生产组
JSColorbox.open({ JSColorbox.open({
href: "HPSC098?methodName=initLoad&inqu_status-0-groupType=1", href: "HPSC098?methodName=initLoad&inqu_status-0-orgType=prodGroup",
title: "<div style='text-align: center;'>选择组织</div>", title: "<div style='text-align: center;'>选择组织</div>",
width: "70%", width: "70%",
height: "70%", height: "70%",
callbackName: function (id) { callbackName: function (row) {
let saleIds = [];
for (let i = 0; i < rows.length; i++) {
saleIds.push(rows[i]['id']);
}
var info = new EiInfo() var info = new EiInfo()
info.set("ids", saleIds); info.set("ids",ids.join(','));
info.set("id", id); info.set("factoryCode",row.factoryCode);
info.set("factoryName",row.factoryName);
info.set("groupCode",row.groupCode);
info.set("groupName",row.groupName);
EiCommunicator.send("HPSC005A", "assign", info, { EiCommunicator.send("HPSC005A", "assign", info, {
onSuccess: function (ei) { onSuccess: function (ei) {
if (ei["status"] == -1) { if (ei["status"] == -1) {
......
...@@ -43,7 +43,7 @@ $(function () { ...@@ -43,7 +43,7 @@ $(function () {
JSColorbox.open({ JSColorbox.open({
href: "HPSC098?methodName=initLoad&inqu_status-0-orgType=cutGroup", href: "HPSC098?methodName=initLoad&inqu_status-0-orgType=cutGroup",
title: "<div style='text-align: center;'>选择组织</div>", title: "<div style='text-align: center;'>选择组织</div>",
width: "40%", width: "70%",
height: "70%", height: "70%",
callbackName: assignCallback callbackName: assignCallback
}); });
...@@ -364,7 +364,7 @@ checkInCallback = function () { ...@@ -364,7 +364,7 @@ checkInCallback = function () {
} }
let selectStock = function (id) { let selectStock = function (id) {
JSColorbox.open({ JSColorbox.open({
href: "HPKC002A?methodName=initLoad&inqu_status-0-hpsc006Id=" + id, href: "HPKC002B?methodName=initLoad&inqu_status-0-hpsc006Id=" + id,
title: "<div style='text-align: center;'>库存查询</div>", title: "<div style='text-align: center;'>库存查询</div>",
width: "90%", width: "90%",
height: "80%", height: "80%",
......
...@@ -32,6 +32,30 @@ $(function () { ...@@ -32,6 +32,30 @@ $(function () {
} }
}); });
}); });
$('input[name="inqu_status-0-factoryCode"]').change(function () {
var inInfo=new EiInfo();
var factoryCode=$("#inqu_status-0-factoryCode").val();
var orgType = $('#inqu_status-0-orgType').val();
inInfo.set("inqu_status-0-parentOrgId",factoryCode);
inInfo.set("inqu_status-0-orgType",orgType);
EiCommunicator.send("HPXSOrg", "queryGroupComboBox", inInfo, {
onSuccess: function (ei) {
var input=$("#inqu_status-0-groupCode");
dataEdition=ei.getBlock("group_record_block_id").getMappedRows();
input.kendoDropDownList({
valuePrimitive: true,
dataTextField: "textField",
dataValueField: "valueField",
optionLabel:"请选择",
dataSource: dataEdition,
template: "#=textField#"
});
}, onFail: function (ei) {
}
}, {async: false});
});
}); });
$(window).load(function () { $(window).load(function () {
// 查询 // 查询
......
...@@ -9,8 +9,19 @@ ...@@ -9,8 +9,19 @@
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<EF:EFInput cname="组类型" ename="orgType" blockId="inqu_status" row="0" type="hidden"/> <EF:EFInput cname="组类型" ename="orgType" blockId="inqu_status" row="0" type="hidden"/>
<div class="row"> <div class="row">
<EF:EFInput cname="厂区名称" ename="factoryName" blockId="inqu_status" row="0" colWidth="3"/> <%-- <EF:EFInput cname="厂区名称" ename="factoryName" blockId="inqu_status" row="0" colWidth="3"/>--%>
<EF:EFInput cname="下料组名称" ename="groupName" blockId="inqu_status" row="0" colWidth="3"/> <%-- <EF:EFInput cname="组织名称" ename="groupName" blockId="inqu_status" row="0" colWidth="3"/>--%>
<EF:EFSelect ename="inqu_status-0-factoryCode" cname="厂区名称" colWidth="3" filter="contains"
template="#=textField#" valueTemplate="#=textField#">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="factory_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-groupCode" cname="组织名称" filter="contains" required="false" colWidth="3"
template="#=textField#" valueTemplate="#=valueField#" defaultValue="请选择">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="group_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
...@@ -18,8 +29,8 @@ ...@@ -18,8 +29,8 @@
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="single,row"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="single,row">
<EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" width="120" align="center"/> <EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="factoryName" cname="厂区名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="factoryName" cname="厂区名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="groupCode" cname="下料组生编码" enable="false" width="120" align="center"/> <EF:EFColumn ename="groupCode" cname="组织编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="groupName" cname="下料组名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="groupName" cname="组织名称" enable="false" width="120" align="center"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
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