Commit 0bdac9e0 authored by 鲁鑫's avatar 鲁鑫

采购申请

parent db2b27d3
......@@ -41,7 +41,7 @@ function initItemGrid() {
dataAction: 'server',
url: web_app.name + '/sapPurchaseItem/querySapPurchaseItems.ajax',
parms:{sapPurchaseId:getId()},
height: '99.6%',
height: '95%',
heightDiff: -4,
sortName: 'id',
sortOrder: 'asc',
......@@ -51,8 +51,24 @@ function initItemGrid() {
enabledEdit: true,
fixedCellHeight: true,
selectRowButtonOnly: true,
//autoApplyNextEditor:false,
autoApplyNextEditor:false,
toolbar: toolbarOptions,
onBeforeEdit: function (editParm) {
var c = editParm.column, data = editParm.record;
//仅适用于KNTTP=K时
if (data.knttp !== "K" && c.name === 'kostl') {
return false;
}
//仅适用于KNTTP=F时
if (data.knttp !== "F" && c.name === 'aufnr') {
return false;
}
//仅适用于KNTTP=A时
// 仅适用于KNTTP=A时
if (data.knttp !== 'A' && (c.name === 'anln1' || c.name === 'anln2')){
return false;
}
},
}
);
UICtrl.setSearchAreaToggle(itemGridManager);
......@@ -78,6 +94,7 @@ function getGridColumns() {
knttp: "knttp"
}
},
onChange() {}
}
},
{display: "工厂", name: "werks", width: "100", align: "left", type: "string",
......@@ -112,7 +129,7 @@ function getGridColumns() {
},
back: {
MATNR: "matnr",
MAKTX: "maktx",
MAKTX: "txz01",
MATKL: "matkl",
WGBEZ: "matklName",
EKGRP: "ekgrp",
......@@ -120,7 +137,7 @@ function getGridColumns() {
PEINH: "peinh",
MEINS: "meins",
MSEHL: "meinsName",
LGORT: "lgort",
LGFSB: "lgort",
LGOBE: "lgobe"
}
},
......@@ -277,63 +294,91 @@ function getGridColumns() {
editor: {type: 'text'},
render:function (item){
//申购项次为消耗性采购时,从1开始步长为1自动编号,最大99
if (item.knttp != ''){
ZEBKN_NUM = ZEBKN_NUM + 1;
}
return item.zebkn = ZEBKN_NUM;
// if (item.knttp != ''){
// ZEBKN_NUM = ZEBKN_NUM + 1;
// }
return item.zebkn = item.menge;
}
},
{display: "多重科目分配", name: "vrtkz", width: "100", align: "left", type: "string",
//editor: {type: 'text'},
render : function (item) {
var bsart =$("#bsart").val();
//资产消耗性申购,若申请数量大于1,此处不能为空,必须选择1
if (bsart == "A" && item.menge > 1){
if (item.knttp == "A" && item.menge > 1){
return item.vrtkz = 1;
}
}
},
{display: "部分发票", name: "twrkz", width: "100", align: "left", type: "string",
editor: {type: 'text'},
/*render : function (item) {
var bsart =$("#bsart").val();
render : function (item) {
//资产消耗性申购,若申请数量大于1,此处不能为空,必须选择1
if (bsart == "ZNE1" && item.menge > 1){
if (item.knttp == "A" && item.menge > 1){
return item.twrkz = 1;
}
}*/
}
},
{display: "PR分解数量", name: "ekbnMenge", width: "100", align: "left", type: "string",
editor: {type: 'text'}
},
{
display: "总账科目", name: "sakto", width: "100", align: "left", type: "string",
editor: {type: 'text'}
editor: {type: 'text',required: true}
},
{
display: "成本中心", name: "kostl", width: "100", align: "left", type: "string",
/*editor: {
display: "成本中心", name: "kostl", width: "200", align: "left", type: "string",
editor: {
required: false, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "KOSTL"}
return {fieldName: "KOSTL"}
},
back: {
KOSTL: "kostl"
}
},
}*/
editor: {required: false, type: "text"}
}
},
{
display: "订单号", name: "aufnr", width: "100", align: "left", type: "string",
editor: {type: 'text'}
display: "订单号", name: "aufnr", width: "200", align: "left", type: "string",
//editor: {type: 'text'}
editor: {
required: false, type: "select",
data: {
type: 'system',
name: "getCompanyOrders",
getParam: function (item) {
return {
BUKRS: '1000'
}
},
back: {
AUFNR: "aufnr",
KTEXT: "ktext"
}
},
}
},
{
display: "主资产号", name: "anln1", width: "100", align: "left", type: "string",
editor: {type: 'text'}
display: "主资产号", name: "anln1", width: "200", align: "left", type: "string",
editor: {
required: false, type: "select",
data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {
fieldName: "ANLN1",
filterValue: '1000'
}
},
back: {
ANLN1: "anln1"
}
},
}
},
{
display: "子资产号", name: "anln2", width: "100", align: "left", type: "string",
......
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