Commit 565e19e6 by wuwenlong

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

parents c03ade8a 654e8a2e
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
BILL_TYBE = #billTybe# BILL_TYBE = #billTybe#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="billNumber"> <isNotEmpty prepend=" AND " property="billNumber">
BILL_NUMBER = #billNumber# BILL_NUMBER like CONCAT('%',#billNumber#,'%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="billState"> <isNotEmpty prepend=" AND " property="billState">
BILL_STATE = #billState# BILL_STATE = #billState#
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
SIGNING_DATE = #signingDate# SIGNING_DATE = #signingDate#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA"> <isNotEmpty prepend=" AND " property="partyA">
PARTY_A = #partyA# PARTY_A LIKE CONCAT('%',#partyA#,'%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="reviewStatus"> <isNotEmpty prepend=" AND " property="reviewStatus">
REVIEW_STATUS = #reviewStatus# REVIEW_STATUS = #reviewStatus#
...@@ -110,6 +110,12 @@ ...@@ -110,6 +110,12 @@
<isNotEmpty prepend=" AND " property="companyCodes"> <isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate> COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDateFrom">
SIGNING_DATE &gt;= REPLACE(#signingDateFrom#, '-', '')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="signingDateTo">
SIGNING_DATE &lt;= REPLACE(#signingDateTo#, '-', '')
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
...@@ -147,7 +153,7 @@ ...@@ -147,7 +153,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc ID desc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
......
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc ID desc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
......
...@@ -61,7 +61,7 @@ public class ServiceHGKC008 extends ServiceBase { ...@@ -61,7 +61,7 @@ public class ServiceHGKC008 extends ServiceBase {
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 蓝图ids // 生产领料ids
List<Long> ids = ObjectUtils.listKey(resultRows, HGKC008.FIELD_ID); List<Long> ids = ObjectUtils.listKey(resultRows, HGKC008.FIELD_ID);
DaoUtils.update(HGKC008.BATCH_DELETE, new HashMap<String,Object>(){{put("ids",ids);}}); DaoUtils.update(HGKC008.BATCH_DELETE, new HashMap<String,Object>(){{put("ids",ids);}});
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
...@@ -82,8 +82,8 @@ public class ServiceHGKC008 extends ServiceBase { ...@@ -82,8 +82,8 @@ public class ServiceHGKC008 extends ServiceBase {
if(Objects.nonNull(hgkc008.getId())&&hgkc008.getId()!=0){ if(Objects.nonNull(hgkc008.getId())&&hgkc008.getId()!=0){
DaoUtils.update(HGKC008.UPDATE, hgkc008); DaoUtils.update(HGKC008.UPDATE, hgkc008);
}else { }else {
//生成蓝图编号 //生成生产领料编号
hgkc008.setApplyCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.BLUEPRINT_CODE)); hgkc008.setApplyCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.RECEIVE_CODE));
hgkc008.setStatus(HGConstant.ProductStatus.WTJ); hgkc008.setStatus(HGConstant.ProductStatus.WTJ);
DaoUtils.insert(HGKC008.INSERT, hgkc008); DaoUtils.insert(HGKC008.INSERT, hgkc008);
} }
......
...@@ -35,7 +35,7 @@ public class ServiceHGKC008A extends ServiceBase { ...@@ -35,7 +35,7 @@ public class ServiceHGKC008A extends ServiceBase {
map.put(HGKC008A.FIELD_WH_CODE, whCode); map.put(HGKC008A.FIELD_WH_CODE, whCode);
map.put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getInentTypeThree()); map.put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getInentTypeThree());
CommonMethod.initBlock(inInfo, CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID,DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID,DdynamicEnum.SPEC_BOX_BLOCK_ID),map,false Arrays.asList(DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID,DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID),map,false
); );
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
...@@ -46,13 +46,6 @@ public class ServiceHGKC008A extends ServiceBase { ...@@ -46,13 +46,6 @@ public class ServiceHGKC008A extends ServiceBase {
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
inInfo = super.query(inInfo, HGKC008A.QUERY, new HGKC008A()); inInfo = super.query(inInfo, HGKC008A.QUERY, new HGKC008A());
String whCode = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC008A.FIELD_WH_CODE);
Map map = new HashMap();
map.put(HGKC008A.FIELD_ACCOUNT_CODE, UserSessionUtils.getAccountCode());
map.put(HGKC008A.FIELD_WH_CODE, whCode);
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID,DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID,DdynamicEnum.SPEC_BOX_BLOCK_ID),map,false
);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
...@@ -144,6 +137,7 @@ public class ServiceHGKC008A extends ServiceBase { ...@@ -144,6 +137,7 @@ public class ServiceHGKC008A extends ServiceBase {
if(hgkc008.getReceiveType().compareTo(HGConstant.ReceiveType.TK) == 0){ if(hgkc008.getReceiveType().compareTo(HGConstant.ReceiveType.TK) == 0){
AssertUtils.isTrue(hgkc008a.getInvQty().compareTo(BigDecimal.ZERO) > 0, "此生产领料单为退库类型,数量不能大于0"); AssertUtils.isTrue(hgkc008a.getInvQty().compareTo(BigDecimal.ZERO) > 0, "此生产领料单为退库类型,数量不能大于0");
} }
AssertUtils.isTrue(hgkc008a.getInvWeight().compareTo(BigDecimal.ZERO) == 0, "重量不能为0");
} }
} }
......
...@@ -36,7 +36,9 @@ ...@@ -36,7 +36,9 @@
</sql> </sql>
<sql id="condition"> <sql id="condition">
<!-- 目前不需要权限查询
<include refid="HGXSDataAuth.authCondition"/> <include refid="HGXSDataAuth.authCondition"/>
-->
<include refid="idCondition"/> <include refid="idCondition"/>
<include refid="customCondition"/> <include refid="customCondition"/>
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
......
...@@ -76,6 +76,9 @@ ...@@ -76,6 +76,9 @@
<isNotEmpty prepend=" AND " property="inventName"> <isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME LIKE CONCAT('%', #inventName#, '%') INVENT_NAME LIKE CONCAT('%', #inventName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCodeLike">
INVENT_CODE LIKE CONCAT('%', #inventCodeLike#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec"> <isNotEmpty prepend=" AND " property="spec">
SPEC = #spec# SPEC = #spec#
</isNotEmpty> </isNotEmpty>
......
...@@ -151,7 +151,7 @@ function windowCallback() { ...@@ -151,7 +151,7 @@ function windowCallback() {
} }
function contractDetailFunc(id) { function contractDetailFunc(id) {
let rows = resultGrid.getCheckedRows(); /*let rows = resultGrid.getCheckedRows();
if (rows.length != 1) { if (rows.length != 1) {
message("请选择一条数据"); message("请选择一条数据");
return; return;
...@@ -159,9 +159,9 @@ function contractDetailFunc(id) { ...@@ -159,9 +159,9 @@ function contractDetailFunc(id) {
if (rows[0].reviewStatus == "3") { if (rows[0].reviewStatus == "3") {
message("已经审核的单据不能修改"); message("已经审核的单据不能修改");
return; return;
} }*/
JSColorbox.open({ JSColorbox.open({
href: "HGCW010B?methodName=initLoad&inqu_status-0-mainId=" + rows[0].id + "&efParentFormEname=HGCW010", href: "HGCW010B?methodName=initLoad&inqu_status-0-mainId=" + id + "&efParentFormEname=HGCW010",
title: "<div style='text-align: center;'>开票清单</div>", title: "<div style='text-align: center;'>开票清单</div>",
width: "90%", width: "90%",
height: "90%", height: "90%",
......
...@@ -15,7 +15,10 @@ ...@@ -15,7 +15,10 @@
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true"> format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan> </EF:EFDateSpan>
<EF:EFInput cname="客户名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" /> <EF:EFInput cname="客户名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFInput cname="票据类型" ename="billTybe" blockId="inqu_status" row="0" colWidth="3" /> <EF:EFSelect cname="票据类型" ename="inqu_status-0-billTybe" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.billTybe"/>
</EF:EFSelect>
<EF:EFInput cname="发票号" ename="billNumber" blockId="inqu_status" row="0" colWidth="3" /> <EF:EFInput cname="发票号" ename="billNumber" blockId="inqu_status" row="0" colWidth="3" />
<EF:EFSelect cname="开票状态" ename="inqu_status-0-billState" colWidth="3" filter="contains"> <EF:EFSelect cname="开票状态" ename="inqu_status-0-billState" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
...@@ -28,9 +31,9 @@ ...@@ -28,9 +31,9 @@
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false"> <EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center"/>
<EF:EFColumn ename="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="partyA" cname="客户名称" width="200" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="projName" cname="项目名称" width="200" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="settlementNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="settlementNumber" cname="来源单号" width="140" enable="false" readonly="true" align="center"/>
<EF:EFComboColumn ename="billTybe" cname="票据类型" width="120" align="center" required="true" <EF:EFComboColumn ename="billTybe" cname="票据类型" width="120" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true" > columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true" >
<EF:EFCodeOption codeName="hggp.cw.billTybe"/> <EF:EFCodeOption codeName="hggp.cw.billTybe"/>
......
...@@ -81,7 +81,8 @@ function choiceFunc() { ...@@ -81,7 +81,8 @@ function choiceFunc() {
} }
JSColorbox.open({ JSColorbox.open({
href: "HGCW014A?methodName=initLoad&inqu_status-0-hiddenConditions=1" + href: "HGCW014A?methodName=initLoad&inqu_status-0-hiddenConditions=1" +
"&inqu_status-0-billState=2" + "&inqu_status-0-billState=2" + /*已开票*/
"&inqu_status-0-reviewStatus=1" + /*已审核*/
"&inqu_status-0-mainId=" + mainId + "&inqu_status-0-mainId=" + mainId +
"&efParentFormEname=HGCW014", "&efParentFormEname=HGCW014",
title: "<div style='text-align: center;'>销售开票</div>", title: "<div style='text-align: center;'>销售开票</div>",
......
...@@ -10,19 +10,19 @@ ...@@ -10,19 +10,19 @@
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFInput cname="隐藏条件" ename="partyA" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="隐藏条件" ename="mainId" blockId="inqu_status" row="0" type="hidden"/> <EF:EFInput cname="隐藏条件" ename="mainId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="隐藏条件" ename="reviewStatus" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="隐藏条件" ename="billState" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFDateSpan startCname="开票日期(从)" endCname="至" blockId="inqu_status" <EF:EFDateSpan startCname="开票日期(从)" endCname="至" blockId="inqu_status"
startName="signingDateFrom" endName="signingDateTo" row="0" role="date" startName="signingDateFrom" endName="signingDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true"> format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan> </EF:EFDateSpan>
<EF:EFInput cname="客户名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" /> <EF:EFInput cname="客户名称" ename="partyA" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊查询客户" />
<EF:EFSelect cname="票据类型" ename="inqu_status-0-billTybe" colWidth="3" filter="contains"> <EF:EFSelect cname="票据类型" ename="inqu_status-0-billTybe" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.billTybe"/> <EF:EFCodeOption codeName="hggp.cw.billTybe"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFInput cname="发票号" ename="billNumber" blockId="inqu_status" row="0" colWidth="3" /> <EF:EFInput cname="发票号" ename="billNumber" blockId="inqu_status" row="0" colWidth="3" placeholder="模糊查询发票号" />
</div> </div>
</EF:EFRegion> </EF:EFRegion>
...@@ -31,11 +31,11 @@ ...@@ -31,11 +31,11 @@
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="thisAmount" cname="本次收款金额" width="120" align="center"/> <EF:EFColumn ename="thisAmount" cname="本次收款金额" width="120" align="center"/>
<EF:EFColumn ename="remainingAmount" cname="剩余开票金额" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="remainingAmount" cname="剩余开票金额" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="partyA" cname="客户名称" width="200" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="projCode" cname="项目编码" hidden="true"/> <EF:EFColumn ename="projCode" cname="项目编码" hidden="true"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="projName" cname="项目名称" width="200" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="settlementNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="settlementNumber" cname="来源单号" width="200" enable="false" readonly="true" align="center"/>
<EF:EFComboColumn ename="billTybe" cname="票据类型" width="100" align="center" <EF:EFComboColumn ename="billTybe" cname="票据类型" width="120" align="center"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" > columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" >
<EF:EFCodeOption codeName="hggp.cw.billTybe"/> <EF:EFCodeOption codeName="hggp.cw.billTybe"/>
</EF:EFComboColumn> </EF:EFComboColumn>
......
...@@ -132,23 +132,32 @@ function check(id, auditStatus) { ...@@ -132,23 +132,32 @@ function check(id, auditStatus) {
const inEiInfo = new EiInfo(); const inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id); inEiInfo.set("result-0-id", id);
inEiInfo.set("result-0-submitStatus", auditStatus); inEiInfo.set("result-0-submitStatus", auditStatus);
JSUtils.confirm("确定提交此其他入库单吗? ", {
ok: function () {
EiCommunicator.send('HGKC006', 'check', inEiInfo, { EiCommunicator.send('HGKC006', 'check', inEiInfo, {
onSuccess(response) { onSuccess: function (ei) {
if (response.status == "-1") { if (ei.getStatus() >= 0) {
NotificationUtil({msg: response.msg, detailMsg: response.detailMsg}, "error"); try {
} else {
NotificationUtil(response.msg);
query(); query();
} catch (e) {
} }
}, if (ei.getStatus() == 0) {
onFail(errorMessage, status, e) { NotificationUtil(ei, 'warning');
NotificationUtil("执行失败!", "error"); } else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
} }
}, },
{ onFail: function (ei) {
async: false // 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
} }
); );
}
});
} }
//详情 //详情
function jump(id,submitStatus,whCode,companyCode,source) { function jump(id,submitStatus,whCode,companyCode,source) {
......
...@@ -227,18 +227,32 @@ function updateStatus(id,status) { ...@@ -227,18 +227,32 @@ function updateStatus(id,status) {
let inEiInfo = new EiInfo(); let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id); inEiInfo.set("result-0-id", id);
inEiInfo.set("result-0-status", status); inEiInfo.set("result-0-status", status);
JSUtils.confirm("确定提交此生产领料单吗? ", {
ok: function () {
EiCommunicator.send('HGKC008', 'updateStatus', inEiInfo, { EiCommunicator.send('HGKC008', 'updateStatus', inEiInfo, {
onSuccess(response) { onSuccess: function (ei) {
NotificationUtil(response.msg); if (ei.getStatus() >= 0) {
try {
query(); query();
} catch (e) {
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
}, },
onFail(errorMessage, status, e) { onFail: function (ei) {
NotificationUtil("执行失败!", "error"); // 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
} }
}, {
async: false
} }
); );
}
});
} }
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<EF:EFComboColumn ename="companyCode" cname="公司名称" <EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
maxLength="16" width="120" required="true" maxLength="16" width="140" required="true"
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn> </EF:EFComboColumn>
......
$(function (){ $(function (){
var inventRecordBoxBlocks = __eiInfo.getBlock("invent_code_box_block_id").getMappedRows(); var inventRecordBoxBlocks = __eiInfo.getBlock("invent_code_box_block_id").getMappedRows();
var specBoxBlocks = __eiInfo.getBlock("spec_box_block_id").getMappedRows();
$(".row").children().attr("class", "col-md-3"); $(".row").children().attr("class", "col-md-3");
...@@ -52,7 +51,7 @@ $(function (){ ...@@ -52,7 +51,7 @@ $(function (){
dataValueField: "valueField", dataValueField: "valueField",
optionLabelTemplate: "[#:valueField#]#:textField#", optionLabelTemplate: "[#:valueField#]#:textField#",
valueTemplate: "[#:valueField#]#:textField#", valueTemplate: "[#:valueField#]#:textField#",
template: "[#:valueField#]#:textField#", template: "[#:valueField#]#:textField#[#:param3Field#]",
filter: "contains" filter: "contains"
}); });
} }
...@@ -87,7 +86,7 @@ $(function (){ ...@@ -87,7 +86,7 @@ $(function (){
var item = e.items[0]; var item = e.items[0];
//数量计算 //数量计算
if (e.field == "invQty") { if (e.field == "invQty") {
if(item.invQty && item.invUnitWeight){ if(!isNaN(parseFloat(item.invQty)) && !isNaN(parseFloat(item.invUnitWeight))){
let totalWeight = item.invQty * item.invUnitWeight; let totalWeight = item.invQty * item.invUnitWeight;
resultGrid.setCellValue(item, 'invWeight', totalWeight) resultGrid.setCellValue(item, 'invWeight', totalWeight)
} }
...@@ -103,7 +102,7 @@ $(function (){ ...@@ -103,7 +102,7 @@ $(function (){
resultGrid.setCellValue(item, 'invWidth', inventRecordBoxBlocks[i]['param5Field']) resultGrid.setCellValue(item, 'invWidth', inventRecordBoxBlocks[i]['param5Field'])
resultGrid.setCellValue(item, 'invThick', inventRecordBoxBlocks[i]['param6Field']) resultGrid.setCellValue(item, 'invThick', inventRecordBoxBlocks[i]['param6Field'])
resultGrid.setCellValue(item, 'invQty', inventRecordBoxBlocks[i]['param7Field']) resultGrid.setCellValue(item, 'invQty', inventRecordBoxBlocks[i]['param7Field'])
resultGrid.setCellValue(item, 'invUnitWeight', inventRecordBoxBlocks[i]['param8Field']) resultGrid.setCellValue(item, 'invUnitWeight', !isNaN(parseFloat(inventRecordBoxBlocks[i]['param8Field'])) ? inventRecordBoxBlocks[i]['param8Field'] : 0.00)
resultGrid.setCellValue(item, 'invWeight', inventRecordBoxBlocks[i]['param9Field']) resultGrid.setCellValue(item, 'invWeight', inventRecordBoxBlocks[i]['param9Field'])
resultGrid.setCellValue(item, 'inventTypeDetail', inventRecordBoxBlocks[i]['param10Field']) resultGrid.setCellValue(item, 'inventTypeDetail', inventRecordBoxBlocks[i]['param10Field'])
break break
......
...@@ -18,6 +18,8 @@ $(function () { ...@@ -18,6 +18,8 @@ $(function () {
$(window).load(function () { $(window).load(function () {
// 查询 // 查询
query(); query();
//存货编号查询条件
initInventCode();
}); });
/** /**
...@@ -27,3 +29,27 @@ let query = function () { ...@@ -27,3 +29,27 @@ let query = function () {
resultGrid.dataSource.page(1); // 点击查询按钮,从第1页开始查询 resultGrid.dataSource.page(1); // 点击查询按钮,从第1页开始查询
} }
/**
* 存货编号
*/
let initInventCode = function () {
//物料信息下拉
var inInfo=new EiInfo();
EiCommunicator.send("HGPZ005", "queryComboBox", inInfo, {
onSuccess: function (ei) {
let dataSource;
var input=$("#inqu_status-0-inventCode");
dataSource=ei.getBlock("invent_record_block_id").getMappedRows();
input.kendoDropDownList({
valuePrimitive: true,
dataTextField: "valueField",
dataValueField: "valueField",
optionLabel:"请选择",
dataSource: dataSource,
template: "[#:valueField#]#:textField#|#:param2Field#",
filter: "contains"
});
}, onFail: function (ei) {
}
}, {async: false});
}
...@@ -20,17 +20,17 @@ ...@@ -20,17 +20,17 @@
optionLabel="全部" defultValue="" filter="contains"> optionLabel="全部" defultValue="" filter="contains">
<EF:EFOptions blockId="invent_type_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="invent_type_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="存货名称" blockId="inqu_status" ename="inventCode" row="0" colWidth="3" <EF:EFSelect cname="存货编号" blockId="inqu_status" ename="inventCode" row="0" colWidth="3"
optionLabel="全部" defultValue="" filter="contains"> filter="contains" optionLabel="全部" defultValue="" template="[#=valueField#]#=textField#">
<EF:EFOptions blockId="invent_record_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="invent_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
</div> </div>
<div class="row"> <%-- <div class="row">--%>
<EF:EFSelect cname="规格" blockId="inqu_status" ename="spec" row="0" colWidth="3" <%-- <EF:EFSelect cname="规格" blockId="inqu_status" ename="spec" row="0" colWidth="3"--%>
optionLabel="全部" defultValue="" filter="contains"> <%-- optionLabel="全部" defultValue="" filter="contains">--%>
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/> <%-- <EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>--%>
</EF:EFSelect> <%-- </EF:EFSelect>--%>
</div> <%-- </div>--%>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="明细信息"> <EF:EFRegion id="result" title="明细信息">
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="100" align="center" <EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="100" align="center"
blockName="invent_type_block_id" textField="textField" valueField="valueField"> blockName="invent_type_block_id" textField="textField" valueField="valueField">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center" hidden="true"/> <EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="100" align="center"/> <EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="specId" cname="规格ID" enable="false" width="100" align="center" hidden="true"/> <EF:EFColumn ename="specId" cname="规格ID" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="spec" cname="规格" enable="false" width="120" align="center"/> <EF:EFColumn ename="spec" cname="规格" enable="false" width="120" align="center"/>
......
$(function() { $(function() {
$(".row").children().attr("class", "col-md-3"); $(".row").children().attr("class", "col-md-3");
var inventTypeBox = __eiInfo.getBlock("invent_type_box_block_id").getMappedRows(); var inventTypeBox = __eiInfo.getBlock("invent_type_box_block_id").getMappedRows();
...@@ -45,6 +44,22 @@ $(function() { ...@@ -45,6 +44,22 @@ $(function() {
} }
} }
return dataItem["inventCode"]; return dataItem["inventCode"];
},
editor: function (container, options) {
var input = $('<input />');
input.attr("name", options.field);
input.attr("id", options.field);
input.appendTo(container);
input.kendoDropDownList({
dataSource: inventCodedBox,
minLength: 0,
dataTextField: "textField",
dataValueField: "valueField",
optionLabelTemplate: "#:valueField#-#:textField#-#:param3Field#",
valueTemplate: "#:valueField#-#:textField#-#:param3Field#",
template: "#:valueField#-#:textField#-#:param3Field#",
filter: "contains"
});
} }
}, { }, {
field: "spec", field: "spec",
......
...@@ -30,11 +30,10 @@ ...@@ -30,11 +30,10 @@
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="true" width="120" align="center" required="true" <%--<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="true" width="120" align="center"
blockName="invent_code_box_block_id" textField="textField" valueField="valueField" blockName="invent_code_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false" columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false" filter="contains" />--%>
filter="contains"> <EF:EFColumn ename="inventCode" cname="存货名称" enable="true" required="true" readonly="false" width="200" align="center"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="true" width="120" align="center" required="true" <EF:EFComboColumn ename="inventType" cname="存货类型" enable="true" width="120" align="center" required="true"
blockName="invent_type_box_block_id" textField="textField" valueField="valueField" blockName="invent_type_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false" columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_type_box_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="invent_type_box_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFInput cname="存货编码" ename="inventCodeLike" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="存货名称" ename="inventName" blockId="inqu_status" row="0" colWidth="3"/> <EF:EFInput cname="存货名称" ename="inventName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="状态" colWidth="3" filter="contains"> <EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="状态" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
......
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