Commit fd0ebcc7 by 江和松

根据状态判断字段是否能修改保存

parent df0352f2
......@@ -13,6 +13,12 @@ $(function () {
return options.length == 0 ? "-" : options.length;
}
}],
beforeEdit: function (e) {
let item = e.model;
if(item.status != '0'){
e.preventDefault();
}
},
loadComplete: function (grid) {
// 提交
$(document.body).on("click", "#SUBMIT", submit);
......@@ -42,6 +48,8 @@ $(function () {
$(window).load(function () {
// 查询
query();
//存货编号查询条件
initInventCode();
});
/**
......@@ -52,6 +60,31 @@ let query = function () {
}
/**
* 存货编号
*/
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});
}
/**
* 保存
*/
let save = function () {
......
......@@ -21,13 +21,9 @@
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect cname="存货名称" blockId="inqu_status" ename="inventName" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue="">
<EF:EFOptions blockId="invent_record_block_id" textField="textField" valueField="textField"/>
</EF:EFSelect>
<EF:EFSelect cname="规格" blockId="inqu_status" ename="spec" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue="">
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="textField"/>
<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>
<EF:EFDateSpan startCname="创建时间(从)" endCname="至" blockId="inqu_status"
startName="createdTimeFrom" endName="createdTimeTo" row="0" role="datetime"
......@@ -47,7 +43,7 @@
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="hggp.hgcg.planStatus"/>
</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="120" align="center" hidden="true"/>
<EF:EFColumn ename="spec" cname="规格" enable="false" width="120" align="center"/>
......
......@@ -8,6 +8,12 @@ $(function () {
pageSizes: [20, 50, 70, 100],
},
columns: [],
beforeEdit: function (e) {
let item = e.model;
if(item.status != '0'){
e.preventDefault();
}
},
loadComplete: function (grid) {
// 提交
$("#SUBMIT").on("click", submit);
......
......@@ -7,7 +7,14 @@ $(function () {
pageSize: 20,
pageSizes: [20, 50, 70, 100],
},
columns: [],
columns: [
],
beforeEdit: function (e) {
let item = e.model;
if(item.status != '0'){
e.preventDefault();
}
},
loadComplete: function (grid) {
// 确认
$("#CONFIRM").on("click", confirm);
......
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