Commit cf25a59e by yukang

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

parents 8d6e8996 b4b4530d
...@@ -56,8 +56,8 @@ public class ServiceHGKC003 extends ServiceBase { ...@@ -56,8 +56,8 @@ public class ServiceHGKC003 extends ServiceBase {
@OperationLogAnnotation(operModul = "生产入库单", operType = "查询", operDesc = "查询") @OperationLogAnnotation(operModul = "生产入库单", operType = "查询", operDesc = "查询")
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo); // Map queryRow = EiInfoUtils.getFirstRow(inInfo);
HGKCUtils.HgKc003.setCondition(queryRow); // HGKCUtils.HgKc003.setCondition(queryRow);
inInfo = super.query(inInfo, HGKC003.QUERY, new HGKC003()); inInfo = super.query(inInfo, HGKC003.QUERY, new HGKC003());
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
......
...@@ -84,7 +84,6 @@ public class ServiceHGKC006A extends ServiceBase { ...@@ -84,7 +84,6 @@ public class ServiceHGKC006A extends ServiceBase {
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
HGKC006A hgkc006A = new HGKC006A(); HGKC006A hgkc006A = new HGKC006A();
hgkc006A.fromMap(resultRows.get(i)); hgkc006A.fromMap(resultRows.get(i));
hgkc006A.setInvWeight(hgkc006A.getInvUnitWeight().multiply(hgkc006A.getInvQty()));
if (hgkc006A.getId() == null || hgkc006A.getId() == 0) { if (hgkc006A.getId() == null || hgkc006A.getId() == 0) {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("id",inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC006A.FIELD_PRIMARY_ID)); queryMap.put("id",inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC006A.FIELD_PRIMARY_ID));
......
...@@ -86,7 +86,6 @@ public class ServiceHGKC007A extends ServiceBase { ...@@ -86,7 +86,6 @@ public class ServiceHGKC007A extends ServiceBase {
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
HGKC007A hgkc007A = new HGKC007A(); HGKC007A hgkc007A = new HGKC007A();
hgkc007A.fromMap(resultRows.get(i)); hgkc007A.fromMap(resultRows.get(i));
hgkc007A.setInvWeight(hgkc007A.getInvUnitWeight().multiply(hgkc007A.getInvQty()));
if (hgkc007A.getId() == null || hgkc007A.getId() == 0) { if (hgkc007A.getId() == null || hgkc007A.getId() == 0) {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("id",inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC006A.FIELD_PRIMARY_ID)); queryMap.put("id",inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC006A.FIELD_PRIMARY_ID));
......
...@@ -62,19 +62,19 @@ ...@@ -62,19 +62,19 @@
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName"> <isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME like '%' || #companyName#|| '%' COMPANY_NAME like ('%$companyName$%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="depositDate"> <isNotEmpty prepend=" AND " property="depositDate">
DEPOSIT_DATE = #depositDate# date_format(DEPOSIT_DATE,'%Y-%m-%d') = #depositDate#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="depositNo"> <isNotEmpty prepend=" AND " property="depositNo">
DEPOSIT_NO like '%' || #depositNo# || '%' DEPOSIT_NO like ('%$depositNo$%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode"> <isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode# WH_CODE = #whCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="whName"> <isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName# WH_NAME like ('%$whName$%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="depositNoOld"> <isNotEmpty prepend=" AND " property="depositNoOld">
DEPOSIT_NO_OLD = #depositNoOld# DEPOSIT_NO_OLD = #depositNoOld#
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
PROJ_CODE = #projCode# PROJ_CODE = #projCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projName"> <isNotEmpty prepend=" AND " property="projName">
PROJ_NAME like '%' || #projName# || '%' PROJ_NAME like ('%$projName$%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType"> <isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType# PRDT_TYPE = #prdtType#
...@@ -151,9 +151,6 @@ ...@@ -151,9 +151,6 @@
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="depositNo">
DEPOSIT_NO = #depositNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depositNos"> <isNotEmpty prepend=" AND " property="depositNos">
DEPOSIT_NO IN <iterate open="(" close=")" conjunction="," property="depositNos">#depositNos[]#</iterate> DEPOSIT_NO IN <iterate open="(" close=")" conjunction="," property="depositNos">#depositNos[]#</iterate>
</isNotEmpty> </isNotEmpty>
......
...@@ -37,13 +37,13 @@ ...@@ -37,13 +37,13 @@
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName"> <isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName# COMPANY_NAME like ('%$companyName$%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="depositDate"> <isNotEmpty prepend=" AND " property="depositDate">
DEPOSIT_DATE = #depositDate# date_format(DEPOSIT_DATE,'%Y-%m-%d') = #depositDate#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="depositNo"> <isNotEmpty prepend=" AND " property="depositNo">
DEPOSIT_NO = #depositNo# DEPOSIT_NO like ('%$depositNo$%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode"> <isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode# WH_CODE = #whCode#
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
PROJ_CODE = #projCode# PROJ_CODE = #projCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projName"> <isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName# PROJ_NAME like ('%$projName$%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType"> <isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType# PRDT_TYPE = #prdtType#
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
resultClass="com.baosight.hggp.hg.kc.domain.HGKC003A"> resultClass="com.baosight.hggp.hg.kc.domain.HGKC003A">
SELECT SELECT
ID as "id", ID as "id",
QUALITY_DETAIL_ID as "qualityDetailId",<!-- 企业编码 --> QUALITY_DETAIL_ID as "qualityDetailId",<!-- 质检单明细ID -->
ACCOUNT_CODE as "accountCode", <!-- 企业编码 --> ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 --> DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 --> CREATED_BY as "createdBy", <!-- 记录创建者 -->
......
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
WH_CODE = #whCode# WH_CODE = #whCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="whName"> <isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName# WH_NAME LIKE CONCAT('%', #whName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="otherEnterNoOld"> <isNotEmpty prepend=" AND " property="otherEnterNoOld">
OTHER_ENTER_NO_OLD = #otherEnterNoOld# OTHER_ENTER_NO_OLD = #otherEnterNoOld#
......
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
INVENT_CODE = #inventCode# INVENT_CODE = #inventCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName"> <isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName# INVENT_NAME LIKE CONCAT('%', #inventName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="invQty"> <isNotEmpty prepend=" AND " property="invQty">
INV_QTY = #invQty# INV_QTY = #invQty#
......
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
WH_CODE = #whCode# WH_CODE = #whCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="whName"> <isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName# WH_NAME LIKE CONCAT('%', #whName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="otherOutNoOld"> <isNotEmpty prepend=" AND " property="otherOutNoOld">
OTHER_OUT_NO_OLD = #otherOutNoOld# OTHER_OUT_NO_OLD = #otherOutNoOld#
......
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
INVENT_CODE = #inventCode# INVENT_CODE = #inventCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName"> <isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName# INVENT_NAME LIKE CONCAT('%', #inventName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="invQty"> <isNotEmpty prepend=" AND " property="invQty">
INV_QTY = #invQty# INV_QTY = #invQty#
......
...@@ -140,13 +140,13 @@ public class ServiceHGSC004 extends ServiceBase { ...@@ -140,13 +140,13 @@ public class ServiceHGSC004 extends ServiceBase {
AssertUtils.isTrue(hgsc003.getBlueprintStatus().compareTo(HGConstant.EnablingStatus.TY) == 0,"蓝图已停用不可修改!"); AssertUtils.isTrue(hgsc003.getBlueprintStatus().compareTo(HGConstant.EnablingStatus.TY) == 0,"蓝图已停用不可修改!");
} }
Map<String,Object> map = new HashMap<>(); Map<String,Object> map = new HashMap<>();
map.put("blueprintId",hgsc004.getBlueprintId()); map.put("projCode",hgsc004.getProjCode());
List<HGSC004> hgsc004List = this.dao.query(HGSC004.QUERY,map); List<HGSC004> hgsc004List = this.dao.query(HGSC004.QUERY,map);
for(HGSC004 o : hgsc004List){ for(HGSC004 o : hgsc004List){
if(Objects.nonNull(hgsc004.getId())&&hgsc004.getId()>0){ if(Objects.nonNull(hgsc004.getId())&&hgsc004.getId()>0){
AssertUtils.isTrue(!(o.getId().intValue() == hgsc004.getId().intValue()),"当前蓝图已存在!"); AssertUtils.isTrue(!(o.getId().intValue() == hgsc004.getId().intValue()),"当前项目已存在!");
}else{ }else{
AssertUtils.isTrue(Objects.nonNull(o),"当前蓝图已存在!"); AssertUtils.isTrue(Objects.nonNull(o),"当前项目已存在!");
} }
} }
......
...@@ -8,19 +8,14 @@ ...@@ -8,19 +8,14 @@
<EF:EFPage title="生产入库单"> <EF:EFPage title="生产入库单">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFInput cname="公司名称" ename="companyName" blockId="inqu_status" row="0" colWidth="3"/> <EF:EFInput ename="inqu_status-0-companyName" cname="公司名称" colWidth="3"/>
<EF:EFDatePicker cname="单据日期" ename="depositDate" blockId="inqu_status" row="0" colWidth="3" <EF:EFDatePicker cname="单据日期" blockId="inqu_status" ename="depositDate" row="0" colWidth="3"
format="yyyy-MM-dd" readonly="true"/> role="date" format="yyyy-MM-dd" readonly="true"/>
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3"/> <EF:EFInput ename="inqu_status-0-projName" cname="项目名称" colWidth="3"/>
<EF:EFInput cname="生产入库单号" ename="projName" blockId="inqu_status" row="0" colWidth="3"/> <EF:EFInput ename="inqu_status-0-depositNo" cname="生产入库单号" colWidth="3"/>
</div> </div>
<div class="row"> <div class="row">
<EF:EFSelect cname="仓库名称" ename="whCode" blockId="inqu_status" row="0" colWidth="3" <EF:EFInput ename="inqu_status-0-whName" cname="仓库名称" colWidth="3"/>
filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
...@@ -34,7 +29,6 @@ ...@@ -34,7 +29,6 @@
<EF:EFColumn ename="depositDate" cname="单据日期" enable="false" width="100" align="center" editType="date" <EF:EFColumn ename="depositDate" cname="单据日期" enable="false" width="100" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="depositNo" cname="生产入库单号" enable="false" width="120" align="center"/> <EF:EFColumn ename="depositNo" cname="生产入库单号" enable="false" width="120" align="center"/>
<EF:EFColumn ename="prodOrderNo" cname="生产任务单号" enable="false" width="120" align="center"/>
<EF:EFColumn ename="whName" cname="仓库名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="whName" cname="仓库名称" enable="false" width="120" align="center"/>
<EF:EFComboColumn cname="提交状态" ename="submitStatus" width="90" align="center" required="false"> <EF:EFComboColumn cname="提交状态" ename="submitStatus" width="90" align="center" required="false">
<EF:EFCodeOption codeName="hggp.sc.productStatus" /> <EF:EFCodeOption codeName="hggp.sc.productStatus" />
......
...@@ -9,12 +9,7 @@ ...@@ -9,12 +9,7 @@
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFInput ename="inqu_status-0-primaryId" cname="主表id" colWidth="3" type="hidden"/> <EF:EFInput ename="inqu_status-0-primaryId" cname="主表id" colWidth="3" type="hidden"/>
<EF:EFSelect cname="仓库名称" ename="whCode" blockId="inqu_status" row="0" colWidth="3" <EF:EFInput ename="inqu_status-0-whName" cname="仓库名称" colWidth="3"/>
filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput cname="存货编码" ename="prdtCode" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="存货名称" ename="prdtName" blockId="inqu_status" row="0" colWidth="3"/> <EF:EFInput cname="存货名称" ename="prdtName" blockId="inqu_status" row="0" colWidth="3"/>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
......
...@@ -42,6 +42,7 @@ $(function () { ...@@ -42,6 +42,7 @@ $(function () {
template: function (dataItem) { template: function (dataItem) {
for (let i = 0; i < WhNameGlobalData.length; i++) { for (let i = 0; i < WhNameGlobalData.length; i++) {
if (WhNameGlobalData[i]['valueField'] === dataItem['whCode']) { if (WhNameGlobalData[i]['valueField'] === dataItem['whCode']) {
dataItem['whName'] = WhNameGlobalData[i]['textField'];
return WhNameGlobalData[i]['textField']; return WhNameGlobalData[i]['textField'];
} }
} }
......
...@@ -13,11 +13,12 @@ ...@@ -13,11 +13,12 @@
<EF:EFDatePicker cname="单据日期" ename="otherEnterDate" blockId="inqu_status" row="0" colWidth="3" <EF:EFDatePicker cname="单据日期" ename="otherEnterDate" blockId="inqu_status" row="0" colWidth="3"
format="yyyy-MM-dd" readonly="true"/> format="yyyy-MM-dd" readonly="true"/>
<EF:EFInput cname="其他入库单号" ename="otherEnterNo" blockId="inqu_status" row="0" colWidth="3"/> <EF:EFInput cname="其他入库单号" ename="otherEnterNo" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFSelect cname="仓库名称" ename="whCode" blockId="inqu_status" row="0" colWidth="3" <%-- <EF:EFSelect cname="仓库名称" ename="whCode" blockId="inqu_status" row="0" colWidth="3"
filter="contains" defultValue=""> filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>--%>
<EF:EFInput cname="仓库名称" ename="whName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFSelect cname="单据状态" ename="submitStatus" blockId="inqu_status" row="0" colWidth="3"> <EF:EFSelect cname="单据状态" ename="submitStatus" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hpkc.submitStatus"/> <EF:EFCodeOption codeName="hggp.hpkc.submitStatus"/>
...@@ -42,6 +43,7 @@ ...@@ -42,6 +43,7 @@
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="otherEnterNo" cname="其他入库单号" enable="false" width="140" align="center"/> <EF:EFColumn ename="otherEnterNo" cname="其他入库单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true"/> <EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true"/>
<EF:EFColumn ename="whName" cname="仓库名称" hidden="true"/>
<EF:EFComboColumn cname="状态" ename="submitStatus" width="90" align="center" required="true" defaultValue="0"> <EF:EFComboColumn cname="状态" ename="submitStatus" width="90" align="center" required="true" defaultValue="0">
<EF:EFCodeOption codeName="hggp.hpkc.submitStatus"/> <EF:EFCodeOption codeName="hggp.hpkc.submitStatus"/>
</EF:EFComboColumn> </EF:EFComboColumn>
......
...@@ -17,6 +17,7 @@ $(function () { ...@@ -17,6 +17,7 @@ $(function () {
template: function (dataItem) { template: function (dataItem) {
for (let i = 0; i < InventNameGlobalData.length; i++) { for (let i = 0; i < InventNameGlobalData.length; i++) {
if (InventNameGlobalData[i]['valueField'] === dataItem['inventCode']) { if (InventNameGlobalData[i]['valueField'] === dataItem['inventCode']) {
dataItem['inventName'] = InventNameGlobalData[i]['textField'];
return InventNameGlobalData[i]['textField']; return InventNameGlobalData[i]['textField'];
} }
} }
...@@ -56,6 +57,43 @@ $(function () { ...@@ -56,6 +57,43 @@ $(function () {
inInfo.set("field", options.field); inInfo.set("field", options.field);
refreshSelect(container, inInfo); refreshSelect(container, inInfo);
} }
},{
field: "invQty",
template: function (item) {
if(item.invQty && item.invUnitWeight){
debugger;
let invWeight = item.invQty * item.invUnitWeight;
//item['invWeight'] = invWeight.toString();
resultGrid.setCellValue(item, 'invWeight', invWeight);
}
if(item.invQty && item.price){
let amount = item.invQty * item.price;
//item['amount'] = amount.toString();
resultGrid.setCellValue(item, 'amount', amount);
}
return item.invQty;
}
}, {
field: "invUnitWeight",
template: function (item) {
debugger;
if(item.invQty && item.invUnitWeight){
let invWeight = item.invQty * item.invUnitWeight;
//item['invWeight'] = invWeight.toString();
resultGrid.setCellValue(item, 'invWeight', invWeight);
}
return item.invUnitWeight;
}
},{
field: "price",
template: function (item) {
if(item.invQty && item.price){
let amount = item.invQty * item.price;
//item['amount'] = amount.toString();
resultGrid.setCellValue(item, 'amount', amount);
}
return item.price;
}
}, ], }, ],
loadComplete: function (grid) { loadComplete: function (grid) {
// 此grid对象 // 此grid对象
...@@ -75,6 +113,16 @@ $(function () { ...@@ -75,6 +113,16 @@ $(function () {
} }
} }
} }
/* if (e.field == "invQty") {
loadChange(grid,e,"invWeight");
loadChange(grid,e,"amount");
}
if (e.field == "invUnitWeight") {
loadChange(grid,e,"invWeight");
}
if (e.field == "price") {
loadChange(grid,e,"amount");
}*/
}); });
}, },
onSave: function (e) { onSave: function (e) {
......
...@@ -8,11 +8,12 @@ ...@@ -8,11 +8,12 @@
<EF:EFPage title="其他入库单明细"> <EF:EFPage title="其他入库单明细">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFSelect cname="存货名称" blockId="inqu_status" ename="inventCode" row="0" colWidth="3" filter="contains" <%-- <EF:EFSelect cname="存货名称" blockId="inqu_status" ename="inventCode" row="0" colWidth="3" filter="contains"
defultValue=""> defultValue="">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_record_box_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="invent_record_box_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>--%>
<EF:EFInput cname="存货名称" ename="inventName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="主表id" ename="primaryId" blockId="inqu_status" row="0" colWidth="3" type="hidden"/> <EF:EFInput cname="主表id" ename="primaryId" blockId="inqu_status" row="0" colWidth="3" type="hidden"/>
</div> </div>
<%-- <div class="row"> <%-- <div class="row">
...@@ -34,16 +35,26 @@ ...@@ -34,16 +35,26 @@
filter="contains"> filter="contains">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" required="true" readonly="true"/> <EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" hidden="true"/>
<EF:EFColumn ename="inventRecordId" cname="规格" width="120" align="center" required="true" readonly="true"/> <EF:EFColumn ename="inventRecordId" cname="规格" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="partLength" cname="长(MM)" enable="false" width="80" align="right" format="{0:N3}"/> <EF:EFColumn ename="partLength" cname="长(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="partWidth" cname="宽(MM)" enable="false" width="80" align="right" format="{0:N3}"/> <EF:EFColumn ename="partWidth" cname="宽(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="partThick" cname="厚(MM)" enable="false" width="80" align="right" format="{0:N3}"/> <EF:EFColumn ename="partThick" cname="厚(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="invQty" cname="数量" width="120" align="right" format="{0:N0}"/> <EF:EFColumn ename="invQty" cname="数量" width="120" align="right" format="{0:N0}"
<EF:EFColumn ename="invUnitWeight" cname="单重" width="120" align="right" format="{0:N3}"/> defaultValue="0"
<EF:EFColumn ename="invWeight" cname="总重" enable="false" width="120" align="right" format="{0:N3}"/> data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="invUnitWeight" cname="单重" width="120" align="right" format="{0:N3}"
defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="invWeight" cname="总重" width="120" align="right" enable="false" format="{0:N3}"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/> <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:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="price" cname="单价" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="price" cname="单价" width="120" align="right" format="{0:N3}"
defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="amount" cname="金额" width="120" align="right" enable="false" format="{0:N3}"/> <EF:EFColumn ename="amount" cname="金额" width="120" align="right" enable="false" format="{0:N3}"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
......
...@@ -42,6 +42,7 @@ $(function () { ...@@ -42,6 +42,7 @@ $(function () {
template: function (dataItem) { template: function (dataItem) {
for (let i = 0; i < WhNameGlobalData.length; i++) { for (let i = 0; i < WhNameGlobalData.length; i++) {
if (WhNameGlobalData[i]['valueField'] === dataItem['whCode']) { if (WhNameGlobalData[i]['valueField'] === dataItem['whCode']) {
dataItem['whName'] = WhNameGlobalData[i]['textField'];
return WhNameGlobalData[i]['textField']; return WhNameGlobalData[i]['textField'];
} }
} }
......
...@@ -13,11 +13,13 @@ ...@@ -13,11 +13,13 @@
<EF:EFDatePicker cname="单据日期" ename="otherOutDate" blockId="inqu_status" row="0" colWidth="3" <EF:EFDatePicker cname="单据日期" ename="otherOutDate" blockId="inqu_status" row="0" colWidth="3"
format="yyyy-MM-dd" readonly="true"/> format="yyyy-MM-dd" readonly="true"/>
<EF:EFInput cname="其他出库单号" ename="otherOutNo" blockId="inqu_status" row="0" colWidth="3"/> <EF:EFInput cname="其他出库单号" ename="otherOutNo" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFSelect cname="仓库名称" ename="whCode" blockId="inqu_status" row="0" colWidth="3" <%-- <EF:EFSelect cname="仓库名称" ename="whCode" blockId="inqu_status" row="0" colWidth="3"
filter="contains" defultValue=""> filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>--%>
<EF:EFInput cname="仓库名称" ename="whName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFSelect cname="单据状态" ename="submitStatus" blockId="inqu_status" row="0" colWidth="3"> <EF:EFSelect cname="单据状态" ename="submitStatus" blockId="inqu_status" row="0" colWidth="3">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hpkc.submitStatus"/> <EF:EFCodeOption codeName="hggp.hpkc.submitStatus"/>
...@@ -42,9 +44,11 @@ ...@@ -42,9 +44,11 @@
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="otherOutNo" cname="其他入库单号" enable="false" width="140" align="center"/> <EF:EFColumn ename="otherOutNo" cname="其他入库单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true" /> <EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true" />
<EF:EFColumn ename="whName" cname="仓库名称" hidden="true"/>
<EF:EFComboColumn cname="状态" ename="submitStatus" width="90" align="center" required="true" defaultValue="0"> <EF:EFComboColumn cname="状态" ename="submitStatus" width="90" align="center" required="true" defaultValue="0">
<EF:EFCodeOption codeName="hggp.hpkc.submitStatus"/> <EF:EFCodeOption codeName="hggp.hpkc.submitStatus"/>
</EF:EFComboColumn> </EF:EFComboColumn>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
......
...@@ -17,6 +17,7 @@ $(function () { ...@@ -17,6 +17,7 @@ $(function () {
template: function (dataItem) { template: function (dataItem) {
for (let i = 0; i < InventNameGlobalData.length; i++) { for (let i = 0; i < InventNameGlobalData.length; i++) {
if (InventNameGlobalData[i]['valueField'] === dataItem['inventCode']) { if (InventNameGlobalData[i]['valueField'] === dataItem['inventCode']) {
dataItem['inventName'] = InventNameGlobalData[i]['textField'];
return InventNameGlobalData[i]['textField']; return InventNameGlobalData[i]['textField'];
} }
} }
...@@ -56,7 +57,44 @@ $(function () { ...@@ -56,7 +57,44 @@ $(function () {
inInfo.set("field", options.field); inInfo.set("field", options.field);
refreshSelect(container, inInfo); refreshSelect(container, inInfo);
} }
}, ], },{
field: "invQty",
template: function (item) {
if(item.invQty && item.invUnitWeight){
debugger;
let invWeight = item.invQty * item.invUnitWeight;
//item['invWeight'] = invWeight.toString();
resultGrid.setCellValue(item, 'invWeight', invWeight);
}
if(item.invQty && item.price){
let amount = item.invQty * item.price;
//item['amount'] = amount.toString();
resultGrid.setCellValue(item, 'amount', amount);
}
return item.invQty;
}
}, {
field: "invUnitWeight",
template: function (item) {
debugger;
if(item.invQty && item.invUnitWeight){
let invWeight = item.invQty * item.invUnitWeight;
//item['invWeight'] = invWeight.toString();
resultGrid.setCellValue(item, 'invWeight', invWeight);
}
return item.invUnitWeight;
}
},{
field: "price",
template: function (item) {
if(item.invQty && item.price){
let amount = item.invQty * item.price;
//item['amount'] = amount.toString();
resultGrid.setCellValue(item, 'amount', amount);
}
return item.price;
}
},],
loadComplete: function (grid) { loadComplete: function (grid) {
// 此grid对象 // 此grid对象
grid.dataSource.bind("change", function(e) { grid.dataSource.bind("change", function(e) {
...@@ -75,6 +113,16 @@ $(function () { ...@@ -75,6 +113,16 @@ $(function () {
} }
} }
} }
/* if (e.field == "invQty") {
loadChange(grid,e,"invWeight");
loadChange(grid,e,"amount");
}
if (e.field == "invUnitWeight") {
loadChange(grid,e,"invWeight");
}
if (e.field == "price") {
loadChange(grid,e,"amount");
}*/
}); });
}, },
onSave: function (e) { onSave: function (e) {
......
...@@ -8,11 +8,12 @@ ...@@ -8,11 +8,12 @@
<EF:EFPage title="其他出库单明细"> <EF:EFPage title="其他出库单明细">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFSelect cname="存货名称" blockId="inqu_status" ename="inventCode" row="0" colWidth="3" filter="contains" <%-- <EF:EFSelect cname="存货名称" blockId="inqu_status" ename="inventCode" row="0" colWidth="3" filter="contains"
defultValue=""> defultValue="">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_record_box_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="invent_record_box_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>--%>
<EF:EFInput cname="存货名称" ename="inventName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="主表id" ename="primaryId" blockId="inqu_status" row="0" colWidth="3" type="hidden"/> <EF:EFInput cname="主表id" ename="primaryId" blockId="inqu_status" row="0" colWidth="3" type="hidden"/>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
...@@ -26,16 +27,26 @@ ...@@ -26,16 +27,26 @@
filter="contains"> filter="contains">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" required="true" readonly="true"/> <EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" hidden="true"/>
<EF:EFColumn ename="inventRecordId" cname="规格" width="120" align="center" required="true" readonly="true"/> <EF:EFColumn ename="inventRecordId" cname="规格" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="partLength" cname="长(MM)" enable="false" width="80" align="right" format="{0:N3}"/> <EF:EFColumn ename="partLength" cname="长(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="partWidth" cname="宽(MM)" enable="false" width="80" align="right" format="{0:N3}"/> <EF:EFColumn ename="partWidth" cname="宽(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="partThick" cname="厚(MM)" enable="false" width="80" align="right" format="{0:N3}"/> <EF:EFColumn ename="partThick" cname="厚(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="invQty" cname="数量" width="120" align="right" format="{0:N0}"/> <EF:EFColumn ename="invQty" cname="数量" width="120" align="right" format="{0:N0}"
<EF:EFColumn ename="invUnitWeight" cname="单重" width="120" align="right" format="{0:N3}"/> defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="invUnitWeight" cname="单重" width="120" align="right" format="{0:N3}"
defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="invWeight" cname="总重" enable="false" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="invWeight" cname="总重" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/> <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:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="price" cname="单价" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="price" cname="单价" width="120" align="right" format="{0:N3}"
defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="amount" cname="金额" width="120" align="right" enable="false" format="{0:N3}"/> <EF:EFColumn ename="amount" cname="金额" width="120" align="right" enable="false" format="{0:N3}"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
......
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