Commit 867588d0 by 江和松

采购员、税率修改为下拉框修改

parent a8956c16
......@@ -11,6 +11,7 @@ import com.baosight.hggp.hg.cg.tools.HGCGTools;
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.xs.domain.User;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils;
......@@ -46,8 +47,9 @@ public class ServiceHGCG002 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));
EiInfoUtils.addBlock(inInfo,"userByCompany", UserSessionUtils.getUserByCompany(UserSessionUtils.getAccountCode()), User.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCG002().eiMetadata);
} catch (PlatException e) {
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
......
......@@ -4,11 +4,14 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.cg.domain.HGCG001;
import com.baosight.hggp.hg.cg.domain.HGCG002;
import com.baosight.hggp.hg.cg.tools.HGCGTools;
import com.baosight.hggp.hg.cg.utils.HGCGUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.BeanUtils;
import com.baosight.hggp.util.CommonMethod;
......@@ -32,7 +35,7 @@ import java.util.Map;
* @date:2024/5/9,11:04
*/
public class ServiceHGCG002A extends ServiceBase {
/**
* 画面初始化
*
......@@ -47,13 +50,14 @@ public class ServiceHGCG002A 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));
EiInfoUtils.addBlock(inInfo,"userByCompany", UserSessionUtils.getUserByCompany(UserSessionUtils.getAccountCode()), User.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCG001().eiMetadata);
} catch (PlatException e) {
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
......@@ -74,7 +78,7 @@ public class ServiceHGCG002A extends ServiceBase {
}
return inInfo;
}
/**
* 确认操作.
*
......@@ -100,7 +104,7 @@ public class ServiceHGCG002A extends ServiceBase {
}
return inInfo;
}
/**
* 数据校验
*
......@@ -116,7 +120,7 @@ public class ServiceHGCG002A extends ServiceBase {
String.format("计划[%s]状态不是\"审核通过\",不允许操作", planNo));
}
}
/**
* 数据保存
*
......@@ -139,8 +143,8 @@ public class ServiceHGCG002A extends ServiceBase {
HGCGTools.HgCg001.updateStatus(planNo, HGConstant.CgPlanStatus.S_4);
}
}
/**
* 锁并且获取数据
*
......
$(function () {
var userByCompany = __eiInfo.getBlock("userByCompany").getMappedRows();
IPLATUI.EFGrid = {
"result": {
......@@ -7,7 +8,48 @@ $(function () {
pageSize: 20,
pageSizes: [20, 50, 70, 100],
},
columns: [],
columns: [
{
field: "purUserName",
template: function (dataItem) {
for (let i = 0; i < userByCompany.length; i++) {
let purUserName = dataItem['purUserName'];
if(purUserName){
if (userByCompany[i]['userName'] === purUserName.userName) {
return userByCompany[i]['userName'];
}
}
}
return dataItem["purUserName"];
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-companyCode", options.model["companyCode"]);
inInfo.set("field", options.field);
EiCommunicator.send("HGSC001", "userByCompanyComboBox", inInfo, {
onSuccess: function (ei) {
userByCompany = ei.getBlock("userByCompany").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: userByCompany,
minLength: 0,
dataTextField: "userName",
dataValueField: "userName",
optionLabelTemplate: "[#:loginName#]#:userName#-#:depName#",
valueTemplate: "[#:loginName#]#:userName#-#:depName#",
template: "[#:loginName#]#:userName#-#:depName#",
filter: "contains"
});
}
}
],
beforeEdit: function (e) {
let item = e.model;
if(item.status != '0'){
......
......@@ -69,7 +69,9 @@
<EF:EFColumn ename="purWeight" cname="采购重量" width="120" align="right" format="{0:N3}" enable="false"/>
<EF:EFColumn ename="receiveQty" cname="已收货数量" enable="false" width="120" align="right" format="{0:N0}"/>
<EF:EFColumn ename="price" cname="单价" width="80" align="right" format="{0:N3}" required="true"/>
<EF:EFColumn ename="taxRate" cname="税率(%)" width="80" align="right" format="{0:N3}" required="true"/>
<EF:EFComboColumn ename="taxRate" cname="税率(%)" enable="true" width="80" align="center" required="true">
<EF:EFCodeOption codeName="hggp.cw.taxPoints" />
</EF:EFComboColumn>
<EF:EFColumn ename="amount" cname="不含税金额" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="taxAmount" cname="税额" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="taxIncludeAmount" cname="含税金额" enable="false" width="80" align="right" format="{0:N3}"/>
......
$(function () {
var userByCompany = __eiInfo.getBlock("userByCompany").getMappedRows();
IPLATUI.EFGrid = {
"result": {
columns: [],
pageable:false,
columns: [
{
field: "purUserName",
template: function (dataItem) {
for (let i = 0; i < userByCompany.length; i++) {
let purUserName = dataItem['purUserName'];
if(purUserName){
if (userByCompany[i]['userName'] === purUserName.userName) {
return userByCompany[i]['userName'];
}
}
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-companyCode", options.model["companyCode"]);
inInfo.set("field", options.field);
EiCommunicator.send("HGSC001", "userByCompanyComboBox", inInfo, {
onSuccess: function (ei) {
userByCompany = ei.getBlock("userByCompany").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: userByCompany,
minLength: 0,
dataTextField: "userName",
dataValueField: "userName",
optionLabelTemplate: "[#:loginName#]#:userName#-#:depName#",
valueTemplate: "[#:loginName#]#:userName#-#:depName#",
template: "[#:loginName#]#:userName#-#:depName#",
filter: "contains"
});
}
}
],
loadComplete: function (grid) {
grid.dataSource.bind("change", function (e) {
supCodeChange(e);
......@@ -19,8 +62,11 @@ $(function () {
$("#CONFIRM").on("click", confirm);
downKeyUp();
});
/**
* 页面加载时执行
*/
......@@ -54,6 +100,8 @@ let confirm = function () {
message("勾选的第" + (i + 1) + "行采购员不能为空");
return;
}
let purUserName = rows[i]['purUserName'];
rows[i]['purUserName'] = purUserName.userName;
}
JSUtils.confirm("确定对勾选的[" + rows.length + "]条数据生成\"采购合同\"吗? ", {
ok: function () {
......
......@@ -45,7 +45,7 @@
<EF:EFOptions blockId="sup_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="supName" cname="供应商名称" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="purUserName" cname="采购员" width="100" align="center" maxLength="100" required="true"/>
<EF:EFColumn ename="purUserName" cname="采购员" width="120" align="center" maxLength="100" required="true"/>
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="sepcId" cname="规格ID" enable="false" width="120" align="center" hidden="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