Commit 8e54e4e8 by 江和松

bug清单处理

parent a81576ce
......@@ -11,9 +11,11 @@ import com.baosight.hggp.hg.cg.utils.HGCGUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.sb.tools.HGSBTools;
import com.baosight.hggp.hg.sc.domain.HGSC009;
import com.baosight.hggp.hg.sj.domain.HGSJ002;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.*;
......@@ -50,6 +52,13 @@ public class ServiceHGCG003 extends ServiceBase {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID));
Map qarma = new HashMap();
Map userCompany = HGSBTools.getUserCompany();
qarma.put(HGSC009.FIELD_COMPANY_CODE,userCompany.get(HGSC009.FIELD_COMPANY_CODE));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BY_ROLE_BLOCK_ID),qarma);
qarma.clear();
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
EiInfoUtils.addBlock(inInfo,"userByCompany", HGXSTools.XsUser.listAll(UserSessionUtils.getAccountCode()), User.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCG003().eiMetadata);
......
......@@ -271,6 +271,8 @@
RECEIVE_WEIGHT = #receiveWeight#, <!-- 收货重量 -->
AMOUNT = #amount#, <!-- 金额 -->
RECEIVE_DATE = REPLACE(#receiveDate#, '-', ''), <!-- 收货日期 -->
PROJ_CODE = #projCode#, <!-- 项目编号 -->
PROJ_NAME = #projName#, <!-- 项目名称 -->
<include refid="updateRevise"/>
WHERE
ID = #id#
......
......@@ -127,8 +127,9 @@ public class ServiceHGSC009A extends ServiceBase {
for (int i = 0; i < resultRows.size(); i++) {
HGSC009A hgsc009A = new HGSC009A();
hgsc009A.fromMap(resultRows.get(i));
AssertUtils.isTrue(hgsc009A.getGrossAmount().compareTo(BigDecimal.ZERO) <= 0, "重量不能小于等于0");
AssertUtils.isTrue(hgsc009A.getQuantity().compareTo(BigDecimal.ZERO) <= 0, "数量不能小于等于0");
AssertUtils.isTrue(hgsc009A.getGrossAmount().compareTo(BigDecimal.ZERO) <= 0
&& hgsc009A.getQuantity().compareTo(BigDecimal.ZERO) <= 0, "数量、重量必须有一项大于0");
// AssertUtils.isTrue(hgsc009A.getQuantity().compareTo(BigDecimal.ZERO) <= 0, "数量不能小于等于0");
}
}
......
......@@ -147,7 +147,10 @@ let submit = function () {
}
});
}
function windowCallback() {
query();
JSColorbox.close();
}
/**
* 显示详情
......@@ -158,6 +161,7 @@ function showDetail(id,status) {
title: "<div style='text-align: center;'>详情</div>",
width: "80%",
height: "80%",
callbackName: windowCallback
});
}
......
......@@ -105,7 +105,14 @@ let save = function () {
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCG001A", "save", true);
JSUtils.submitGridsData("result", "HGCG001A", "save",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
parent.JSColorbox.setValueCallback();
}
}
);
}
});
}
......@@ -126,7 +133,14 @@ let remove = function () {
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCG001A", "remove", true);
JSUtils.submitGridsData("result", "HGCG001A", "remove",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
parent.JSColorbox.setValueCallback();
}
}
);
}
});
}
......
......@@ -298,5 +298,11 @@ function showDetail(id,status) {
title: "<div style='text-align: center;'>详情</div>",
width: "80%",
height: "80%",
callbackName: windowCallback
});
}
function windowCallback() {
query();
JSColorbox.close();
}
......@@ -191,7 +191,14 @@ let save = function () {
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCG002B", "save", true);
JSUtils.submitGridsData("result", save, "remove",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
parent.JSColorbox.setValueCallback();
}
}
);
}
});
}
......@@ -207,8 +214,17 @@ let remove = function () {
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCG002B", "remove", true);
JSUtils.submitGridsData("result", "HGCG002B", "remove",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
parent.JSColorbox.setValueCallback();
}
}
);
}
});
}
$(function () {
var companyCodeBox = __eiInfo.getBlock("roleCompany").getMappedRows();
var userByCompany = __eiInfo.getBlock("userByCompany").getMappedRows();
var projCodeBox = __eiInfo.getBlock("projRecordByRole_block_id").getMappedRows();
IPLATUI.EFGrid = {
"result": {
exportGrid: false, // 隐藏右侧自定义导出按钮
......@@ -76,13 +77,53 @@ $(function () {
filter: "contains"
});
}
}, {
field: "projCode",
title: "项目编码",
template: function (dataItem) {
for (let i = 0; i < projCodeBox.length; i++) {
if (projCodeBox[i]['valueField'] === dataItem['projCode']) {
dataItem['projName'] = projCodeBox[i]['textField']
return projCodeBox[i]['valueField'];
}
}
return dataItem["projCode"];
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-companyCode", options.model["companyCode"]);
inInfo.set("inqu_status-0-approvalStatus", 2);
inInfo.set("field", options.field);
let dataSource;
EiCommunicator.send("HGSC003", "projComboBox", inInfo, {
onSuccess: function (ei) {
dataSource = ei.getBlock("projRecordByRole_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
var input = $('<input />');
input.attr("name", options.field);
input.attr("id", options.field);
input.appendTo(container);
input.kendoDropDownList({
dataSource: dataSource,
minLength: 0,
dataTextField: "textField",
dataValueField: "valueField",
optionLabelTemplate: "[#:valueField#]#:textField#",
valueTemplate: "[#:valueField#]#:textField#",
template: "[#:valueField#]#:textField#",
filter: "contains"
});
}
}
],
beforeEdit: function (e) {
let item = e.model;
//只有合同生成的不能编辑
if(item.source === '0'){
//选择收货的指定列可以修改
//选择收货的指定列不让修改
for (let i = 0; i < e.sender.columns.length; i++) {
//指定的列不让修改
if (e.sender.columns[i]["name"] === "companyCode") {
......@@ -97,6 +138,31 @@ $(function () {
e.sender.columns[i]["enable"] = false;
e.sender.columns[i]["readonly"] = true;
}
if (e.sender.columns[i]["name"] === "projCode") {
e.sender.columns[i]["enable"] = false;
e.sender.columns[i]["readonly"] = true;
}
}
}else{
//手动添加的需要修改
for (let i = 0; i < e.sender.columns.length; i++) {
//指定的列不让修改
if (e.sender.columns[i]["name"] === "companyCode") {
e.sender.columns[i]["enable"] = true;
e.sender.columns[i]["readonly"] = false;
}
if (e.sender.columns[i]["name"] === "supCode") {
e.sender.columns[i]["enable"] = true;
e.sender.columns[i]["readonly"] = false;
}
if (e.sender.columns[i]["name"] === "purUserName") {
e.sender.columns[i]["enable"] = true;
e.sender.columns[i]["readonly"] = false;
}
if (e.sender.columns[i]["name"] === "projCode") {
e.sender.columns[i]["enable"] = true;
e.sender.columns[i]["readonly"] = false;
}
}
}
},
......@@ -113,6 +179,13 @@ $(function () {
}
}
}
if (e.field == "projCode") {
for (let i = 0; i < projCodeBox.length; i++) {
if (projCodeBox[i]['valueField'] === e.items[0]['projCode']) {
resultGrid.setCellValue(e.items[0],"projName",projCodeBox[i]['textField']);
}
}
}
});
},
onSave: function (e) {
......@@ -294,8 +367,13 @@ function showDetail(id,status,source) {
title: "<div style='text-align: center;'>详情</div>",
width: "80%",
height: "80%",
callbackName: windowCallback
});
}
function windowCallback() {
query();
JSColorbox.close();
}
function updateStatus(id,status) {
let inEiInfo = new EiInfo();
......
......@@ -55,8 +55,8 @@
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn>
<EF:EFColumn ename="companyName" cname="公司名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="130" align="center"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="true" width="120" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" align="center" enable="false"/>
<EF:EFColumn ename="receiveDate" cname="收货日期" width="100" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="receiveNo" cname="收货单号" enable="false" width="120" align="center"/>
......
......@@ -45,7 +45,7 @@ $(function () {
dataValueField: "valueField",
optionLabelTemplate: "[#:valueField#]#:textField#",
valueTemplate: "[#:valueField#]#:textField#",
template: "[#:valueField#]#:textField#",
template: "[#:valueField#]#:textField#|#:param4Field#",
filter: "contains"
});
}
......@@ -104,6 +104,7 @@ $(function () {
if (inventRecordBoxBlockId[i]['valueField'] === e.items[0].inventCode) {
resultGrid.setCellValue(e.items[0], 'inventName', inventRecordBoxBlockId[i]['textField'])
resultGrid.setCellValue(e.items[0], 'inventTypeDetail', inventRecordBoxBlockId[i]['param1Field'])
resultGrid.setCellValue(e.items[0], 'inventType', inventRecordBoxBlockId[i]['param3Field'])
resultGrid.setCellValue(e.items[0], 'spec', inventRecordBoxBlockId[i]['param4Field'])
resultGrid.setCellValue(e.items[0], 'material', inventRecordBoxBlockId[i]['param5Field'])
resultGrid.setCellValue(e.items[0], 'unit', inventRecordBoxBlockId[i]['param6Field'])
......@@ -212,7 +213,14 @@ let save = function () {
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCG003B", "save", true);
JSUtils.submitGridsData("result", "HGCG003B", "save",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
parent.JSColorbox.setValueCallback();
}
}
);
}
});
}
......@@ -228,7 +236,14 @@ let remove = function () {
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGCG003B", "remove", true);
JSUtils.submitGridsData("result", "HGCG003B", "remove",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
parent.JSColorbox.setValueCallback();
}
}
);
}
});
}
......
......@@ -188,9 +188,12 @@ let save = function () {
return;
}
let flag = true;
let quantityMsg = "";
$.each(rows, function(index, item) {
let inventCode= item.get("inventCode");
let spec= item.get("spec");
let quantity= item.get("quantity");
let grossAmount= item.get("grossAmount");
if(isBlank(inventCode)){
message("选中的第"+(index+1)+"行\"存货编号\",不能为空!");
flag = false;
......@@ -201,13 +204,32 @@ let save = function () {
flag = false;
return false;
}
if((isBlank(quantity) || parseInt(quantity) <= 0) && (isBlank(grossAmount) || parseInt(grossAmount) <= 0)){
message("选中的第" + (index + 1) + "行\"数量、重量\",必须有一项大于0!");
flag = false;
return false;
}
if(isBlank(quantity) || parseInt(quantity) <= 0){
quantityMsg = "选中的第" + (index + 1) + "行\"数量\",小于等于0!\n";
}
if(isBlank(grossAmount) || parseInt(grossAmount) <= 0){
quantityMsg = "选中的第" + (index + 1) + "行\"重量\",小于等于0!\n";
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
if(!isBlank(quantityMsg)){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? 其中:"+quantityMsg, {
ok: function () {
JSUtils.submitGridsData("result", "HGSC009A", "save", true);
}
});
}else{
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作?", {
ok: function () {
JSUtils.submitGridsData("result", "HGSC009A", "save", true);
}
});
}
}
}
......
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