Commit 736581bd by 宋祥

1.厂区管理页面调整为下拉联动

2.生产派单页面调整为下拉联动
parent e75b2039
......@@ -6,8 +6,10 @@ import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.pz.domain.HPPZ011;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.hp.xs.tools.HPXSTools;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
......@@ -79,6 +81,16 @@ public class ServiceHPPZ011 extends ServiceBase {
for (Map resultRow : resultRows) {
HPPZ011 fPz011 = new HPPZ011();
fPz011.fromMap(resultRow);
// 校验厂区名是否存在
HPPZ011 dbPz011 = HPPZTools.HpPz011.getByName(fPz011.getFactoryName());
if (dbPz011 != null) {
fPz011.setFactoryCode(dbPz011.getFactoryCode());
} else {
// 生成厂区编码
fPz011.setFactoryCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.FACTORY_CODE));
}
// 设置生产组名称
fPz011.setGroupName(HPXSTools.XsOrg.get(fPz011.getGroupCode()).getOrgCname());
if (fPz011.getId() == null || fPz011.getId() == 0) {
this.add(fPz011);
} else {
......@@ -115,14 +127,6 @@ public class ServiceHPPZ011 extends ServiceBase {
* @param fPz011
*/
private void add(HPPZ011 fPz011) {
// 校验厂区名是否存在
HPPZ011 dbPz011 = HPPZTools.HpPz011.getByName(fPz011.getFactoryName());
if (dbPz011 != null) {
fPz011.setFactoryCode(dbPz011.getFactoryCode());
} else {
// 生成厂区编码
fPz011.setFactoryCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.FACTORY_CODE));
}
fPz011.setDeleteFlag(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPPZ011.INSERT, fPz011);
}
......@@ -167,7 +171,7 @@ public class ServiceHPPZ011 extends ServiceBase {
try {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.FACTORY_RECORD_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, new HashMap<>(), false);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo), false);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询厂区失败");
}
......@@ -178,7 +182,7 @@ public class ServiceHPPZ011 extends ServiceBase {
try {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.FACTORY_GROUP_ECORD_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, new HashMap<>(), false);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo), false);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询厂区失败");
}
......@@ -193,7 +197,7 @@ public class ServiceHPPZ011 extends ServiceBase {
try {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.GROUP_RECORD_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, new HashMap<>(), false);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo), false);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询组失败");
}
......
......@@ -125,6 +125,7 @@
<update id="update">
UPDATE ${hpjxSchema}.T_HPPZ011
SET
FACTORY_CODE = #factoryCode#, <!-- 厂区编码 -->
FACTORY_NAME = #factoryName#, <!-- 厂区名称 -->
GROUP_CODE = #groupCode#, <!-- 组编码 -->
GROUP_NAME = #groupName#, <!-- 组名称 -->
......@@ -156,6 +157,12 @@
FROM ${hpjxSchema}.T_HPPZ011 A, ${platSchema}.TXSOG01 B
WHERE A.DELETE_FLAG = 0
AND A.GROUP_CODE = B.ORG_ID
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupType">
A.GROUP_TYPE = #groupType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
A.FACTORY_CODE = #factoryCode#
</isNotEmpty>
......@@ -174,6 +181,9 @@
<isNotEmpty prepend=" AND " property="companyCode">
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="groupType">
A.GROUP_TYPE = #groupType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
A.FACTORY_CODE = #factoryCode#
</isNotEmpty>
......
......@@ -67,6 +67,20 @@ public class HPPZTools {
List<HPPZ011> dbPz011s = DaoBase.getInstance().query(HPSqlConstant.HPPZ011.GET, queryMap);
return CollectionUtils.isEmpty(dbPz011s) ? null : dbPz011s.get(0);
}
/**
* 查询厂区名称
*
* @param factoryCode
* @return
*/
public static String getFactoryName(String factoryCode) {
AssertUtils.isEmpty(factoryCode, "厂区编码不能为空");
Map queryMap = new HashMap();
queryMap.put("factoryCode", factoryCode);
List<HPPZ011> dbPz011s = DaoBase.getInstance().query(HPSqlConstant.HPPZ011.GET, queryMap);
return CollectionUtils.isEmpty(dbPz011s) ? null : dbPz011s.get(0).getFactoryName();
}
}
/**
......
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.common.HPConstants;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.ProdOrderStatusEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC005;
import com.baosight.hpjx.hp.kc.tools.HPKCTools;
import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.kc.domain.HPKC006;
import com.baosight.hpjx.hp.pz.domain.HPPZ011;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.hp.sc.domain.HPSC002A;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.domain.HPSC005A;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.hp.xs.tools.HPXSTools;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
......@@ -54,6 +48,7 @@ public class ServiceHPSC005A extends ServiceBase {
String prodOrderNo = MapUtils.getString(queryMap, "prodOrderNo");
HPSC005 dbSc005 = HPSCTools.HpSc005.get(prodOrderNo);
inInfo.addBlock("detail").addRow(dbSc005);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005A().eiMetadata);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "初始化失败");
......@@ -127,11 +122,16 @@ public class ServiceHPSC005A extends ServiceBase {
*/
private void add(HPSC005 dbSc005, HPSC005A fSc005a) {
String prodOrderNo = dbSc005.getProductionOrderNo();
// 数据校验
AssertUtils.isEmpty(fSc005a.getFactoryCode(), "请选择厂区");
AssertUtils.isEmpty(fSc005a.getOrgNo(), "请选择生产组");
// 更新订单主表数量
HPSCTools.checkAssignedNum(prodOrderNo, fSc005a.getNum());
// 写入子表数据
fSc005a.setProdTaskNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.PROD_TASK_NO,
new String[]{prodOrderNo}));
// 设置基础信息
this.setBaseInfo(fSc005a);
fSc005a.setProdOrderNo(prodOrderNo);
fSc005a.setTotalWt(fSc005a.getNum().multiply(dbSc005.getUnitWt()));
DaoUtils.insert(HPSC005A.INSERT, fSc005a);
......@@ -244,4 +244,16 @@ public class ServiceHPSC005A extends ServiceBase {
return inInfo;
}
/**
* 设置基础信息
*
* @param fSc005a
*/
private void setBaseInfo(HPSC005A fSc005a) {
// 厂区名称
fSc005a.setFactoryName(HPPZTools.HpPz011.getFactoryName(fSc005a.getFactoryCode()));
// 生产组名称
fSc005a.setOrgName(HPXSTools.XsOrg.get(fSc005a.getOrgNo()).getOrgCname());
}
}
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.pz.domain.HPPZ011;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.xservices.xs.og.domain.XSOG01;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
*/
public class ServiceHPSC098 extends ServiceBase {
/**
* 画面初始化.
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
Map queryMap = new HashMap();
queryMap.put("orgType", "dept");
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.ORG_RECORD_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID), null);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ011().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 画面初始化
*
* @param inInfo
* @return
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
Map queryMap = new HashMap();
queryMap.put("orgType", "dept");
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.ORG_RECORD_BLOCK_ID), queryMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID), null);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPPZ011().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询
......
let factoryGlobalData = [];
$(function () {
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [{
field: "factoryName",
template: function (dataItem) {
for (let i = 0; i < factoryGlobalData.length; i++) {
if (factoryGlobalData[i]['textField'] === dataItem['factoryName']) {
resultGrid.setCellValue(0, "factoryCode", factoryGlobalData[i]['valueField']);
return factoryGlobalData[i]['textField'];
}
}
return dataItem["factoryName"] == null ? "" : dataItem["factoryName"];
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("serviceName", "HPPZ011");
inInfo.set("methodName", "queryComboBox");
inInfo.set("blockId", "factory_record_block_id");
inInfo.set("field", options.field);
factoryGlobalData = refreshInputSelect(container, inInfo);
}
}],
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
......@@ -25,6 +46,15 @@ $(function () {
* 页面加载时执行
*/
$(window).load(function () {
// 厂区名称
let inInfo = new EiInfo();
EiCommunicator.send("HPPZ011", "queryComboBox", inInfo, {
onSuccess: function (ei) {
factoryGlobalData = ei.getBlock("factory_record_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
// 查询
query();
});
......
......@@ -19,13 +19,14 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" width="120" align="center"/>
<EF:EFPopupColumn ename="factoryName" cname="厂区名称" width="120" popupType="ServiceGrid"
popupTitle="厂区列表" serviceName="HPPZ011" methodName="queryComboBox"
resultId="factory_record_block_id"
columnEnames="valueField,textField" columnCnames="厂区代码,厂区名称"
backFillColumnIds="valueField,textField" backFillFieldIds="factoryCode,factoryName"
valueField="textField" textField="textField" required="true"/>
<EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="factoryName" cname="厂区名称" width="120" align="center" required="true"/>
<%-- <EF:EFPopupColumn ename="factoryName" cname="厂区名称" width="120" popupType="ServiceGrid"--%>
<%-- popupTitle="厂区列表" serviceName="HPPZ011" methodName="queryComboBox"--%>
<%-- resultId="factory_record_block_id"--%>
<%-- columnEnames="valueField,textField" columnCnames="厂区代码,厂区名称"--%>
<%-- backFillColumnIds="valueField,textField" backFillFieldIds="factoryCode,factoryName"--%>
<%-- valueField="textField" textField="textField" required="true"/>--%>
<EF:EFComboColumn ename="groupCode" cname="生产组名称" width="120" align="center"
blockName="org_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#"
......
......@@ -77,14 +77,15 @@
<%-- <EF:EFOption label="已删除" value="0"/>--%>
<%-- <EF:EFOption label="启用" value="1"/>--%>
<%-- </EF:EFComboColumn>--%>
<EF:EFColumn enable="false" ename="num" readonly="true" cname="计划数量"/>
<EF:EFColumn enable="false" ename="unitWt" readonly="true" cname="计划重量"/>
<EF:EFColumn enable="false" ename="num" readonly="true" cname="数量"/>
<EF:EFColumn enable="false" ename="unitWt" readonly="true" cname="单重"/>
<EF:EFColumn ename="totalWt" cname="总重" enable="false"/>
<EF:EFColumn ename="planCommentDate" required='true' cname="计划开始时间" editType="date" dateFormat="yyyy/MM/dd" width="150"/>
<EF:EFColumn ename="planCompletionDate" required='true' cname="计划结束时间" editType="date" dateFormat="yyyy/MM/dd" width="150"/>
<EF:EFColumn ename="actualCompletionDate" cname="实际完成时间" editType="date" dateFormat="yyyy/MM/dd" width="150"
<EF:EFColumn ename="actualCompletionDate" cname="完成时间" editType="date" dateFormat="yyyy/MM/dd" width="150"
enable="false"/>
<EF:EFColumn enable="false" ename="actualCompletionNum" cname="实际完工数量" readonly="true"/>
<EF:EFColumn enable="false" ename="actualCompletionUnitWt" cname="实际完工重量" readonly="true"/>
<EF:EFColumn enable="false" ename="actualCompletionNum" cname="完成数量" readonly="true"/>
<EF:EFColumn enable="false" ename="actualCompletionUnitWt" cname="完成总重" readonly="true"/>
<EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/>
</EF:EFGrid>
</EF:EFRegion>
......
......@@ -80,8 +80,9 @@ function assign() {
message("请至少选择一条需要分派的数据");
return;
}
// groupType=1:仅查询生产组
JSColorbox.open({
href: "HPSC098?methodName=initLoad",
href: "HPSC098?methodName=initLoad&inqu_status-0-groupType=1",
title: "<div style='text-align: center;'>选择组织</div>",
width: "70%",
height: "70%",
......
......@@ -29,24 +29,24 @@
<EF:EFGrid blockId="result" autoDraw="override">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="150" align="center"/>
<EF:EFColumn ename="productionOrderNo" cname="生产订单号" enable="false" width="140" align="center"/>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="90" align="center">
<EF:EFOption label="未派工" value="0"/>
<EF:EFOption label="部分派工" value="1"/>
<EF:EFOption label="全部派工" value="2"/>
</EF:EFComboColumn>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtName" cname="部件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="prdtSpec" cname="部件规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="remark" cname="部件备注" enable="false"/>
<EF:EFColumn ename="partName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partSpec" cname="零件规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="remark1" cname="零件备注"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" enable="false" width="120" align="center"/>
<EF:EFColumn ename="assignedNum" cname="已派工数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="num" cname="计划数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="totalWt" cname="计划重量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="remark" cname="部件备注" enable="false"/>
<EF:EFColumn ename="remark1" cname="零件备注" enable="false"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="productionOrderNo" cname="生产订单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center" hidden="true"/>
</EF:EFGrid>
......
let factoryGroupGlobalData = [];
$(function () {
IPLATUI.EFGrid = {
......@@ -11,6 +12,27 @@ $(function () {
attributes: {
class: "i-input-readonly"
}
}, {
field: "orgNo",
template: function (dataItem) {
for (let i = 0; i < factoryGroupGlobalData.length; i++) {
if (factoryGroupGlobalData[i]['valueField'] === dataItem['orgNo']) {
return factoryGroupGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-factoryCode", options.model["factoryCode"]);
// 1:生产组
inInfo.set("inqu_status-0-groupType", 1);
inInfo.set("serviceName", "HPPZ011");
inInfo.set("methodName", "queryGroupComboBox");
inInfo.set("blockId", "group_record_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
}],
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
......@@ -33,6 +55,16 @@ $(function () {
* 页面加载时执行
*/
$(window).load(function () {
// 生产组名称
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-groupType", 1);
EiCommunicator.send("HPPZ011", "queryGroupComboBox", inInfo, {
onSuccess: function (ei) {
factoryGroupGlobalData = ei.getBlock("group_record_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
// 查询
query();
});
......
......@@ -37,20 +37,29 @@
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="任务ID" enable="false" width="80" align="center"/>
<EF:EFColumn ename="prodTaskNo" cname="任务单号" enable="false" hidden="true"/>
<EF:EFColumn ename="orgNo" cname="生产组代码" enable="false" hidden="true"/>
<EF:EFPopupColumn ename="orgName" cname="生产组" width="200" align="center" popupType="ServiceGrid"
<EF:EFComboColumn ename="factoryCode" cname="厂区" width="110" align="center" required="true"
filter="contains" readonly="true">
<EF:EFOptions blockId="factory_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="factoryName" cname="厂区名称" enable="false" align="center" hidden="true"/>
<EF:EFColumn ename="orgNo" cname="生产组" width="110" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" align="center" hidden="true"/>
<%--<EF:EFColumn ename="orgNo" cname="生产组代码" enable="false" hidden="true"/>--%>
<%--<EF:EFPopupColumn ename="orgName" cname="生产组" width="200" align="center" popupType="ServiceGrid"
popupTitle="生产组信息" serviceName="HPPZ011" methodName="queryComboBoxAll"
resultId="factory_group_ecord_block_id"
columnEnames="textField,param2Field"
columnCnames="厂区,生产组"
backFillColumnIds="param2Field,param1Field,valueField,textField"
backFillFieldIds="orgName,orgNo,factoryCode,factoryName"
valueField="textField" textField="textField" readonly="true" required="true"/>
<EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" hidden="true"/>
<EF:EFColumn ename="factoryName" cname="厂区" enable="false" align="center"/>
valueField="textField" textField="textField" readonly="true" required="true"/>--%>
<%--<EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" hidden="true"/>
<EF:EFColumn ename="factoryName" cname="厂区" enable="false" align="center"/>--%>
<EF:EFColumn ename="num" cname="分派数量" format="{0:N3}" required="true"/>
<EF:EFColumn ename="totalWt" cname="分派重量" enable="false" format="{0:N3}"/>
<EF:EFColumn ename="completeNum" cname="已完工数量" enable="false" format="{0:N3}"/>
</EF:EFGrid>
<br/>
<span style='color: red;font-size: 13px;'>说明:厂区和生产组仅新增的时候可以编辑</span>
</EF:EFRegion>
</EF:EFPage>
......@@ -7,6 +7,7 @@
<EF:EFPage title="组织机构">
<EF:EFRegion id="inqu" title="查询条件">
<EF:EFInput cname="组类型" ename="groupType" blockId="inqu_status" row="0" type="hidden"/>
<div class="row">
<EF:EFInput cname="厂区名称" ename="factoryName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="生产组名称" ename="groupName" blockId="inqu_status" row="0" colWidth="3"/>
......
......@@ -126,8 +126,49 @@ function refreshSelect(container, inInfo) {
dataTextField: "textField",
dataValueField: "valueField",
dataSource: dataSource,
template: "#=textField#"
template: "#=textField#",
filter: "contains"
});
return dataSource;
}
/**
* 刷新下拉框,可手动输入
*
* @param container
* @param inInfo
*/
function refreshInputSelect(container, inInfo) {
let grid = container.closest(".k-grid").data("kendoGrid");
let cellIndex = grid.cellIndex(container);
let input = $('<input />');
let field = inInfo.get("field");
input.attr("name", field);
input.attr("id", field);
input.appendTo(container);
let dataSource;
let serviceName = inInfo.get("serviceName");
let methodName = inInfo.get("methodName");
let blockId = inInfo.get("blockId");
EiCommunicator.send(serviceName, methodName, inInfo, {
onSuccess: function (ei) {
dataSource = ei.getBlock(blockId).getMappedRows();
},
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"
});
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