Commit d0586e59 by liuyang

2024-05-21

1、更改存货档案存货类型停用而导致的显示问题
2、更改库存预警配置仓库类型停用何存货类型导致的显示显示问题
parent 5ec86f2a
......@@ -60,6 +60,13 @@ public enum DdynamicEnum {
/**
* 模块:存货类型
* 用途:存货类型下拉框 (不默认状态)
* 编写:
*/
INVENT_TYPE_BOX_BLOCK_ID("invent_type_box_block_id","inventType","inventTypeName","status","HGPZ004.queryInventTypeBox"),
/**
* 模块:存货类型
* 用途:父级存货类型下拉框
* 编写:
*/
......@@ -74,6 +81,13 @@ public enum DdynamicEnum {
/**
* 模块:存货档案
* 用途:存货档案下拉框 (不默认状态)
* 编写:
*/
INVENT_RECORD_BOX_BLOCK_ID("invent_record_box_block_id","inventCode","inventName","status","HGPZ005.queryInventCodeBox"),
/**
* 模块:存货档案
* 用途:存货档案下拉框,带id名称等信息
* 编写:
*/
......@@ -85,6 +99,15 @@ public enum DdynamicEnum {
*/
INVENT_ALL_BLOCK_ID("invent_all_block_id", "id", "spec", "material", "unit", "length", "width", "thick",
"coefficient", "HGPZ005.queryComboBoxAll"),
/**
* 模块:存货档案(ALL 不默认状态)
* 用途:存货档案下拉框
* 编写:
*/
INVENT_ALL_BOX_BLOCK_ID("invent_all_box_block_id", "id", "spec", "material", "unit", "length", "width", "thick",
"coefficient","status", "HGPZ005.queryInventBoxAll"),
/**
* 模块:规格
* 用途:存货档案下拉框
......@@ -114,6 +137,13 @@ public enum DdynamicEnum {
*/
WH_RECORD_BLOCK_ID("wh_record_block_id", "whCode", "whName", "HGPZ007.queryComboBox"),
/**
* 模块:仓库档案
* 用途:仓库档案下拉框 不默认状态
* 编写:
*/
WH_CODE_BLOCK_ID("wh_code_block_id", "whCode", "whName","status", "HGPZ007.queryWhCodeBox"),
/**
* 模块:厂区管理
* 用途:厂区管理下拉框
......@@ -374,6 +404,21 @@ public enum DdynamicEnum {
}
DdynamicEnum(String blockId, String value, String text, String param1, String param2, String param3, String param4,
String param5, String param6, String param7,String dbSource) {
this.blockId = blockId;
this.value = value;
this.text = text;
this.param1 = param1;
this.param2 = param2;
this.param3 = param3;
this.param4 = param4;
this.param5 = param5;
this.param6 = param6;
this.param7 =param7;
this.dbSource = dbSource;
}
DdynamicEnum(String blockId, String value, String text, String param1, String param2, String param3, String param4,
String param5, String param6,String param7,String param8,String param9,String dbSource) {
this.blockId = blockId;
this.value = value;
......
......@@ -48,7 +48,7 @@ public class ServiceHGPZ005 extends ServiceBase {
@OperationLogAnnotation(operModul = "存货档案", operType = "查询", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_TYPE_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGPZ005().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......@@ -248,6 +248,24 @@ public class ServiceHGPZ005 extends ServiceBase {
}
/**
* 下拉框 (不默认状态)
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "存货档案",operType = "查询",operDesc = "下拉框(不默认状态)")
public EiInfo queryInventCodeBox(EiInfo inInfo) {
try {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.INVENT_RECORD_BOX_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo), false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询规格失败");
}
return inInfo;
}
/**
* 下拉框
*
* @param inInfo
......@@ -265,6 +283,24 @@ public class ServiceHGPZ005 extends ServiceBase {
return inInfo;
}
/**
* 下拉框
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "存货档案",operType = "查询",operDesc = "下拉框(不默认状态)")
public EiInfo queryInventBoxAll(EiInfo inInfo) {
try {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.INVENT_ALL_BOX_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo), false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询规格失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "存货档案",operType = "导入",operDesc = "导入操作")
public EiInfo importDate(EiInfo inInfo) {
try {
......
......@@ -229,5 +229,23 @@ public class ServiceHGPZ007 extends ServiceBase {
}
return inInfo;
}
/**
* 下拉框
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "仓库档案",operType = "查询",operDesc = "下拉框不默认状态")
public EiInfo queryWhCodeBox(EiInfo inInfo) {
try {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.WH_CODE_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo), false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询规格失败");
}
return inInfo;
}
}
......@@ -45,8 +45,8 @@ public class ServiceHGPZ010 extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_TYPE_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_TYPE_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_CODE_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGPZ010().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
......@@ -221,6 +221,26 @@
ID = #id#
</update>
<select id="queryInventTypeBox" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
SELECT DISTINCT
INVENT_TYPE as "inventType",
INVENT_TYPE_NAME as "inventTypeName",
STATUS AS "status"
FROM ${hggpSchema}.HGPZ004
WHERE DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
ORDER BY INVENT_TYPE
</select>
<select id="queryComboBox" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
SELECT DISTINCT
......
......@@ -318,6 +318,26 @@
ORDER BY INVENT_CODE
</select>
<select id="queryInventCodeBox" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
SELECT DISTINCT
INVENT_CODE as "inventCode",
INVENT_NAME as "inventName",
STATUS as "status"
FROM ${hggpSchema}.HGPZ005
WHERE DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
ORDER BY INVENT_CODE
</select>
<select id="queryProductComboBox" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
SELECT DISTINCT
......@@ -359,6 +379,23 @@
<include refid="condition"/>
ORDER BY ID
</select>
<!---->
<select id="queryInventBoxAll" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT
ID AS "id",
(CASE WHEN SPEC = '' THEN '无规格' ELSE SPEC END) AS "spec",
LENGTH AS "length" , <!-- 长 -->
WIDTH AS "width" , <!-- 宽 -->
THICK AS "thick" , <!-- 厚 -->
COEFFICIENT AS "coefficient" , <!-- 系数 -->
MATERIAL AS "material" , <!-- 材质 -->
UNIT AS "unit", <!-- 单位 -->
STATUS AS "status"
FROM ${hggpSchema}.HGPZ005
WHERE DELETE_FLAG = 0
<include refid="condition"/>
ORDER BY ID
</select>
<!-- 规格下拉框(无ID) -->
<select id="queryComboBoxSpecName" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
......
......@@ -238,4 +238,24 @@
ORDER BY WH_CODE
</select>
<select id="queryWhCodeBox" parameterClass="java.util.HashMap"
resultClass="java.util.HashMap">
SELECT DISTINCT
WH_CODE as "whCode",
WH_NAME as "whName",
STATUS as "status"
FROM ${hggpSchema}.HGPZ007
WHERE DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whType">
WH_TYPE = #whType#
</isNotEmpty>
ORDER BY WH_CODE
</select>
</sqlMap>
$(function() {
var inventTypeBox = __eiInfo.getBlock("invent_type_box_block_id").getMappedRows();
// 查询
$("#QUERY").on("click", query);
......@@ -25,6 +27,16 @@ $(function() {
return template;
}
}, {
field: "inventType",
filter: function (options) {
return _.filter(inventTypeBox, function (item) {
return item["param1Field"]=="true";
})
},
editor: function (container, options) {
this.filter(options);
}
}, {
field: "spec",
template: function (options) {
return $.trim(options.spec) == "" ? "无规格" : options.spec;
......
......@@ -12,7 +12,7 @@
<div class="row">
<EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_type_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="invent_type_box_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<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">
......@@ -28,7 +28,7 @@
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="160" align="center"/>
<EF:EFColumn cname="存货编码" ename="inventCode" width="140" align="center" enable="false"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="120" align="center" required="true"
blockName="invent_type_block_id" textField="textField" valueField="valueField"
blockName="invent_type_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
......
......@@ -3,6 +3,9 @@ let WhNameGlobalData = [];
let inventAllGlobalData = [];
$(function() {
var whTypeBox = __eiInfo.getBlock("wh_type_block_id").getMappedRows();
var inventTypeBox = __eiInfo.getBlock("invent_type_box_block_id").getMappedRows();
// 查询
$("#QUERY").on("click", query);
......@@ -11,100 +14,140 @@ $(function() {
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [{
field: "whCode",
template: function (dataItem) {
for (let i = 0; i < WhNameGlobalData.length; i++) {
if (WhNameGlobalData[i]['valueField'] === dataItem['whCode']) {
return WhNameGlobalData[i]['textField'];
columns: [
{
field: "whType",
filter: function (options) {
return _.filter(whTypeBox, function (item) {
return item["param1Field"]=="true";
})
},
editor: function (container, options) {
this.filter(options);
}
}, {
field: "whCode",
filter: function (options) {
return _.filter(WhNameGlobalData, function (item) {
return item["param1Field"]=="true";
})
},
template: function (dataItem) {
for (let i = 0; i < WhNameGlobalData.length; i++) {
if (WhNameGlobalData[i]['valueField'] === dataItem['whCode']) {
return WhNameGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-whType", options.model["whType"]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
inInfo.set("serviceName", "HGPZ007");
inInfo.set("methodName", "queryWhCodeBox");
inInfo.set("blockId", "wh_code_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-whType", options.model["whType"]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
inInfo.set("serviceName", "HGPZ007");
inInfo.set("methodName", "queryComboBox");
inInfo.set("blockId", "wh_record_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
},{
field: "inventCode",
template: function (dataItem) {
for (let i = 0; i < InventNameGlobalData.length; i++) {
if (InventNameGlobalData[i]['valueField'] === dataItem['inventCode']) {
return InventNameGlobalData[i]['textField'];
},{
field: "inventType",
filter: function (options) {
return _.filter(inventTypeBox, function (item) {
return item["param1Field"]=="true";
})
},
editor: function (container, options) {
this.filter(options);
}
},{
field: "inventCode",
filter: function (options) {
return _.filter(InventNameGlobalData, function (item) {
return item["param1Field"]=="true";
})
},
template: function (dataItem) {
for (let i = 0; i < InventNameGlobalData.length; i++) {
if (InventNameGlobalData[i]['valueField'] === dataItem['inventCode']) {
return InventNameGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventType", options.model["inventType"]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
inInfo.set("serviceName", "HGPZ005");
inInfo.set("methodName", "queryComboBox");
inInfo.set("blockId", "invent_record_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventType", options.model["inventType"]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
inInfo.set("serviceName", "HGPZ005");
inInfo.set("methodName", "queryComboBox");
inInfo.set("blockId", "invent_record_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
},{
field: "inventRecordId",
template: function (dataItem) {
for (let i = 0; i < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
return inventAllGlobalData[i]['textField'];
},{
field: "inventRecordId",
filter: function (options) {
return _.filter(inventAllGlobalData, function (item) {
return item["param7Field"]=="true";
})
},
template: function (dataItem) {
for (let i = 0; i < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
return inventAllGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventCode", options.model["inventCode"]);
inInfo.set("serviceName", "HGPZ005");
inInfo.set("methodName", "queryInventBoxAll");
inInfo.set("blockId", "invent_all_box_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventCode", options.model["inventCode"]);
inInfo.set("serviceName", "HGPZ005");
inInfo.set("methodName", "queryComboBoxAll");
inInfo.set("blockId", "invent_all_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
}, {
field: "material",
template: function (dataItem) {
for (let i = 0; i < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
return inventAllGlobalData[i]['param1Field'];
}, {
field: "material",
template: function (dataItem) {
for (let i = 0; i < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
return inventAllGlobalData[i]['param1Field'];
}
}
return "";
}
return "";
}
}, {
field: "unit",
template: function (dataItem) {
for (let i = 0; i < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
return inventAllGlobalData[i]['param2Field'];
}, {
field: "unit",
template: function (dataItem) {
for (let i = 0; i < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
return inventAllGlobalData[i]['param2Field'];
}
}
return "";
}
},{
field: "createdName",
template: function (options) {
return showUserName(options.createdBy, options.createdName);
}
}, {
field: "updatedName",
template: function (options) {
return showUserName(options.updatedBy, options.updatedName);
}
return "";
}
},{
field: "createdName",
template: function (options) {
return showUserName(options.createdBy, options.createdName);
}
}, {
field: "updatedName",
template: function (options) {
return showUserName(options.updatedBy, options.updatedName);
}
}],
],
loadComplete: function (grid) {
// 此grid对象
grid.dataSource.bind("change", function(e) {
if (e.field == "inventRecordId") {
if (e.field === "inventCode"){
loadChange(grid,e,"inventRecordId");
}
else if (e.field == "inventRecordId") {
var tr,index;
// 获取此model元素信息
var item = e.items[0];
......@@ -160,9 +203,9 @@ let query = function () {
*/
let initWh = function () {
let inInfo = new EiInfo();
EiCommunicator.send("HGPZ007", "queryComboBox", inInfo, {
EiCommunicator.send("HGPZ007", "queryWhCodeBox", inInfo, {
onSuccess: function (ei) {
WhNameGlobalData = ei.getBlock("wh_record_block_id").getMappedRows();
WhNameGlobalData = ei.getBlock("wh_code_block_id").getMappedRows();
},
onFail: function (ei) {
}
......@@ -174,9 +217,9 @@ let initWh = function () {
*/
let initInvent = function () {
let inInfo = new EiInfo();
EiCommunicator.send("HGPZ005", "queryComboBox", inInfo, {
EiCommunicator.send("HGPZ005", "queryInventCodeBox", inInfo, {
onSuccess: function (ei) {
InventNameGlobalData = ei.getBlock("invent_record_block_id").getMappedRows();
InventNameGlobalData = ei.getBlock("invent_record_box_block_id").getMappedRows();
},
onFail: function (ei) {
}
......@@ -190,9 +233,9 @@ let initSpec = function () {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventTypes", [1, 2]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
EiCommunicator.send("HGPZ005", "queryComboBoxAll", inInfo, {
EiCommunicator.send("HGPZ005", "queryInventBoxAll", inInfo, {
onSuccess: function (ei) {
inventAllGlobalData = ei.getBlock("invent_all_block_id").getMappedRows();
inventAllGlobalData = ei.getBlock("invent_all_box_block_id").getMappedRows();
},
onFail: function (ei) {
}
......
......@@ -10,7 +10,7 @@
<EF:EFSelect cname="仓库名称" blockId="inqu_status" ename="whCode" row="0" colWidth="3" filter="contains"
defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="wh_code_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="仓库类型" blockId="inqu_status" ename="whType" row="0" colWidth="3" filter="contains"
defultValue="">
......@@ -30,7 +30,7 @@
</EF:EFComboColumn>
<EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true" readonly="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="120" align="center" required="true"
blockName="invent_type_block_id" textField="textField" valueField="valueField"
blockName="invent_type_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
......
......@@ -46,8 +46,8 @@ $(function () {
if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',1)" >审批完成</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',-1)" >审批未通过</a>';
/*template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',-1)" >审批未通过</a>';*/
} else if (auditStatus == -1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="updateStatus(' + item.id + ',1)" >审批完成</a>';
......
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