Commit 654e8a2e by 江和松

部分功能的查询条件修改为根据物料编码查询

parent 87ff5439
...@@ -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>
......
...@@ -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);
EiCommunicator.send('HGKC006', 'check', inEiInfo, { JSUtils.confirm("确定提交此其他入库单吗? ", {
onSuccess(response) { ok: function () {
if (response.status == "-1") { EiCommunicator.send('HGKC006', 'check', inEiInfo, {
NotificationUtil({msg: response.msg, detailMsg: response.detailMsg}, "error"); onSuccess: function (ei) {
} else { if (ei.getStatus() >= 0) {
NotificationUtil(response.msg); try {
query(); query();
} catch (e) {
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
} }
}, );
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
},
{
async: false
} }
); });
} }
//详情 //详情
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);
EiCommunicator.send('HGKC008', 'updateStatus', inEiInfo, { JSUtils.confirm("确定提交此生产领料单吗? ", {
onSuccess(response) { ok: function () {
NotificationUtil(response.msg); EiCommunicator.send('HGKC008', 'updateStatus', inEiInfo, {
query(); onSuccess: function (ei) {
}, if (ei.getStatus() >= 0) {
onFail(errorMessage, status, e) { try {
NotificationUtil("执行失败!", "error"); query();
} } catch (e) {
}, { }
async: false if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
}
);
} }
); });
} }
......
...@@ -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>
</div>
<div class="row">
<EF:EFSelect cname="规格" blockId="inqu_status" ename="spec" row="0" colWidth="3"
optionLabel="全部" defultValue="" filter="contains">
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
</div> </div>
<%-- <div class="row">--%>
<%-- <EF:EFSelect cname="规格" blockId="inqu_status" ename="spec" row="0" colWidth="3"--%>
<%-- optionLabel="全部" defultValue="" filter="contains">--%>
<%-- <EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>--%>
<%-- </EF:EFSelect>--%>
<%-- </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"/>
......
...@@ -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