Commit 654e8a2e by 江和松

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

parent 87ff5439
......@@ -61,7 +61,7 @@ public class ServiceHGKC008 extends ServiceBase {
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 蓝图ids
// 生产领料ids
List<Long> ids = ObjectUtils.listKey(resultRows, HGKC008.FIELD_ID);
DaoUtils.update(HGKC008.BATCH_DELETE, new HashMap<String,Object>(){{put("ids",ids);}});
inInfo = this.query(inInfo);
......@@ -82,8 +82,8 @@ public class ServiceHGKC008 extends ServiceBase {
if(Objects.nonNull(hgkc008.getId())&&hgkc008.getId()!=0){
DaoUtils.update(HGKC008.UPDATE, hgkc008);
}else {
//生成蓝图编号
hgkc008.setApplyCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.BLUEPRINT_CODE));
//生成生产领料编号
hgkc008.setApplyCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.RECEIVE_CODE));
hgkc008.setStatus(HGConstant.ProductStatus.WTJ);
DaoUtils.insert(HGKC008.INSERT, hgkc008);
}
......
......@@ -35,7 +35,7 @@ public class ServiceHGKC008A extends ServiceBase {
map.put(HGKC008A.FIELD_WH_CODE, whCode);
map.put(HGPZ004.FIELD_INVENT_TYPE_DETAILS, InventTypeDetailEnum.getInentTypeThree());
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) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......@@ -46,13 +46,6 @@ public class ServiceHGKC008A extends ServiceBase {
public EiInfo query(EiInfo inInfo) {
try {
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);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
......@@ -144,6 +137,7 @@ public class ServiceHGKC008A extends ServiceBase {
if(hgkc008.getReceiveType().compareTo(HGConstant.ReceiveType.TK) == 0){
AssertUtils.isTrue(hgkc008a.getInvQty().compareTo(BigDecimal.ZERO) > 0, "此生产领料单为退库类型,数量不能大于0");
}
AssertUtils.isTrue(hgkc008a.getInvWeight().compareTo(BigDecimal.ZERO) == 0, "重量不能为0");
}
}
......
......@@ -36,7 +36,9 @@
</sql>
<sql id="condition">
<!-- 目前不需要权限查询
<include refid="HGXSDataAuth.authCondition"/>
-->
<include refid="idCondition"/>
<include refid="customCondition"/>
<isNotEmpty prepend=" AND " property="accountCode">
......
......@@ -76,6 +76,9 @@
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME LIKE CONCAT('%', #inventName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCodeLike">
INVENT_CODE LIKE CONCAT('%', #inventCodeLike#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC = #spec#
</isNotEmpty>
......
......@@ -132,23 +132,32 @@ function check(id, auditStatus) {
const inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id);
inEiInfo.set("result-0-submitStatus", auditStatus);
JSUtils.confirm("确定提交此其他入库单吗? ", {
ok: function () {
EiCommunicator.send('HGKC006', 'check', inEiInfo, {
onSuccess(response) {
if (response.status == "-1") {
NotificationUtil({msg: response.msg, detailMsg: response.detailMsg}, "error");
} else {
NotificationUtil(response.msg);
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
}
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
{
async: false
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
}
);
}
});
}
//详情
function jump(id,submitStatus,whCode,companyCode,source) {
......
......@@ -227,18 +227,32 @@ function updateStatus(id,status) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id);
inEiInfo.set("result-0-status", status);
JSUtils.confirm("确定提交此生产领料单吗? ", {
ok: function () {
EiCommunicator.send('HGKC008', 'updateStatus', inEiInfo, {
onSuccess(response) {
NotificationUtil(response.msg);
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
}, {
async: false
}
);
}
});
}
......
......@@ -30,7 +30,7 @@
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="120" required="true"
maxLength="16" width="140" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
......
$(function (){
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");
......@@ -52,7 +51,7 @@ $(function (){
dataValueField: "valueField",
optionLabelTemplate: "[#:valueField#]#:textField#",
valueTemplate: "[#:valueField#]#:textField#",
template: "[#:valueField#]#:textField#",
template: "[#:valueField#]#:textField#[#:param3Field#]",
filter: "contains"
});
}
......@@ -87,7 +86,7 @@ $(function (){
var item = e.items[0];
//数量计算
if (e.field == "invQty") {
if(item.invQty && item.invUnitWeight){
if(!isNaN(parseFloat(item.invQty)) && !isNaN(parseFloat(item.invUnitWeight))){
let totalWeight = item.invQty * item.invUnitWeight;
resultGrid.setCellValue(item, 'invWeight', totalWeight)
}
......@@ -103,7 +102,7 @@ $(function (){
resultGrid.setCellValue(item, 'invWidth', inventRecordBoxBlocks[i]['param5Field'])
resultGrid.setCellValue(item, 'invThick', inventRecordBoxBlocks[i]['param6Field'])
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, 'inventTypeDetail', inventRecordBoxBlocks[i]['param10Field'])
break
......
......@@ -18,6 +18,8 @@ $(function () {
$(window).load(function () {
// 查询
query();
//存货编号查询条件
initInventCode();
});
/**
......@@ -27,3 +29,27 @@ let query = function () {
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 @@
optionLabel="全部" defultValue="" filter="contains">
<EF:EFOptions blockId="invent_type_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="存货名称" blockId="inqu_status" ename="inventCode" row="0" colWidth="3"
optionLabel="全部" defultValue="" filter="contains">
<EF:EFSelect cname="存货编号" blockId="inqu_status" ename="inventCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue="" template="[#=valueField#]#=textField#">
<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>
</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 id="result" title="明细信息">
......@@ -44,7 +44,7 @@
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="100" align="center"
blockName="invent_type_block_id" textField="textField" valueField="valueField">
</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="specId" cname="规格ID" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="spec" cname="规格" enable="false" width="120" align="center"/>
......
......@@ -14,6 +14,7 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_type_box_block_id" textField="textField" valueField="valueField"/>
</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:EFSelect blockId="inqu_status" row="0" ename="status" cname="状态" colWidth="3" filter="contains">
<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