Commit f86d195a authored by 鲁鑫's avatar 鲁鑫

固定资产、成本中心调整

parent 46755e1e
......@@ -8,6 +8,10 @@ function initializateUI() {
var isEnable = $("#isEnable").val();
if (isEnable == "0"){
UICtrl.setDisable($("#submitForm"));
if (isApplyProcUnit()){
UICtrl.enable($("#telePhone"))
UICtrl.enable($("#reason"))
}
$(".subject").html("冻结成本中心")
}
}
......
......@@ -40,7 +40,7 @@
<x:selectC name="kosar" required="true" label="成本中心类型" labelCol="2" dictionary="KOSAR" fieldCol="4"/>
<x:inputC name="datbi" required="true" label="有限期自" labelCol="2" wrapper="date" fieldCol="4"/>
<x:inputC name="datab" required="true" label="有限截止日" labelCol="2" wrapper="date" fieldCol="4"/>
<x:inputC name="verak" required="false" label="负责人" labelCol="2" maxLength="64" fieldCol="4"/>
<x:inputC name="verak" required="true" label="负责人" labelCol="2" maxLength="64" fieldCol="4"/>
<x:selectC name="prctr" required="true" label="利润中心" labelCol="2" dictionary="PRCTR" fieldCol="4"/>
<x:inputC name="telePhone" required="false" label="联系方式" labelCol="2" maxLength="64" fieldCol="4"/>
<x:inputC name="reason" required="false" label="原因" labelCol="2" maxLength="255" fieldCol="4"/>
......
......@@ -85,7 +85,10 @@ function loadGrid() {
},
{
display: "资产起息日", name: "bzdat", width: 120, minWidth: 60, type: "date", align: "left",
editor: {required: false, type: "date"}
editor: {required: false, type: "date"},
render : function (record) {
return record.bzdat = record.budat;
}
},
{
display: "文本", name: "sgtxt", width: 260, minWidth: 60, type: "string", align: "left",
......
......@@ -7,6 +7,12 @@ $(document).ready(function () {
function initializateUI() {
UICtrl.layout("#layout", {leftWidth: 3});
var anlkl = $('#anlkl').val();
if (anlkl.indexOf("Z7")>=0){
disable();
}else {
enable();
}
}
function bindQueryEvent() {
......@@ -14,6 +20,7 @@ function bindQueryEvent() {
type: "system", name: "queryCostCenter",
onChange: function (value, data) {
$('#kostl').val(data.kostl);
$('#kostlv').val(data.kostl);
}
});
$('#kostlv').searchbox({
......@@ -29,6 +36,12 @@ function bindQueryEvent() {
},
onChange: function (value, data) {
$('#anlkl').val(data.ANLKL);
//当资产类别为Z701-Z703时,成本中心字段设置为灰色不允许填写,当资产类别为其他时成本中心字段设置为必输项。
if (data.ANLKL.indexOf("Z7")>=0){
disable();
}else {
enable();
}
}
});
$('#bukrs').searchbox({
......@@ -51,6 +64,24 @@ function bindQueryEvent() {
});
}
function disable(){
UICtrl.setElRequiredFlag("#kostl",false);
UICtrl.setElRequiredFlag("#kostlv",false);
UICtrl.disable("#kostl")
UICtrl.disable("#kostlv")
$("#kostl").val("")
$("#kostlv").val("")
}
function enable(){
UICtrl.setElRequiredFlag("#kostl",true);
UICtrl.setElRequiredFlag("#kostlv",true);
UICtrl.enable("#kostl")
UICtrl.enable("#kostlv")
$("#kostl").val("")
$("#kostlv").val("")
}
function getFixedAssetsDetail(fixedAssetsAction) {
//采购订单保存时数据不进行必填验证,提交时数据才进行必填验证
var op = {};
......
......@@ -76,7 +76,7 @@ function loadGrid() {
{
display: "申请日期", name: "adatu", width: 140, minWidth: 60, type: "date", align: "left",
editor: {
type: "date"
type: "date",required: true
}
},
{
......
......@@ -114,7 +114,7 @@ function loadGrid() {
{
display: "购置业务年度", name: "xa", width: 160, minWidth: 60, type: "string", align: "left",
// editor: {required: false, type: "text"}
editor: {type:'dictionary',data:{name:'sapFixedRetirementYear'} ,textField:'xaTextView',valueField:'xa'}
editor: {required: true, type:'dictionary',data:{name:'sapFixedRetirementYear'} ,textField:'xaTextView',valueField:'xa'}
}
],
dataAction: "server",
......
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