Commit c4b201a1 authored by 鲁鑫's avatar 鲁鑫

费用报销数据字典;审批节点控制

parent 7499eb0b
...@@ -9,8 +9,18 @@ var tableArray = [ ...@@ -9,8 +9,18 @@ var tableArray = [
{ {
display: "计划内外付款标识", name: "zepPlan", width: 120, minwidth: 120, type: "string", align: "left", display: "计划内外付款标识", name: "zepPlan", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "ZEP_PLAN"}
},
back: {
ZEP_PLAN: "zepPlan",
ZEP_PLANNAME: "zepPlanname"
}
},
} }
}, },
{ {
...@@ -20,30 +30,45 @@ var tableArray = [ ...@@ -20,30 +30,45 @@ var tableArray = [
minwidth: 120, minwidth: 120,
type: "string", type: "string",
align: "left", align: "left",
editor: {
type: 'text'
}
}, },
{ {
display: "BP标识", name: "zepBptype", width: 120, minwidth: 120, type: "string", align: "left", display: "BP标识", name: "zepBptype", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "ZEP_BPTYPE"}
},
back: {
ZEP_BPTYPE: "zepBptype",
ZEP_BPTYPENAME: "zepBptypename"
}
},
} }
}, },
{ {
display: "BP标识描述", name: "zepBptypename", width: 120, minwidth: 120, type: "string", align: "left", display: "BP标识描述", name: "zepBptypename", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
}
}, },
{ {
display: "BP(合作伙伴)", name: "partner", width: 120, minwidth: 120, type: "string", align: "left", display: "BP(合作伙伴)", name: "partner", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "PARTNER"}
},
back: {
PARTNER: "partner",
KOINH: "koinh",
BANKL: "bankl",
BANKN: "bankn",
SWIFT: "swift",
}
},
} }
}, },
{ {
...@@ -77,36 +102,57 @@ var tableArray = [ ...@@ -77,36 +102,57 @@ var tableArray = [
{ {
display: "采购订单号", name: "ebeln", width: 120, minwidth: 120, type: "string", align: "left", display: "采购订单号", name: "ebeln", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "EBELN"}
},
back: {
EBELN: "ebeln",
EBELP: "ebelp",
ZEKPO_ITEM: "zekpoItem"
}
},
} }
}, },
{ {
display: "采购订单行", name: "ebelp", width: 120, minwidth: 120, type: "string", align: "left", display: "采购订单行", name: "ebelp", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
}
}, },
{ {
display: "采购订单行信息", name: "zekpoItem", width: 120, minwidth: 120, type: "string", align: "left", display: "采购订单行信息", name: "zekpoItem", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
}
}, },
{ {
display: "币别", name: "waers", width: 120, minwidth: 120, type: "string", align: "left", display: "币别", name: "waers", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "WAERS"}
},
back: {
WAERS: "waers",
}
},
} }
}, },
{ {
display: "汇率", name: "kursf", width: 120, minwidth: 120, type: "string", align: "left", display: "汇率", name: "kursf", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "KURSF"}
},
back: {
KURSF: "kursf",
}
},
} }
}, },
{ {
...@@ -141,8 +187,17 @@ var tableArray = [ ...@@ -141,8 +187,17 @@ var tableArray = [
{ {
display: "原因代码", name: "rstgr", width: 120, minwidth: 120, type: "string", align: "left", display: "原因代码", name: "rstgr", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "RSTGR"}
},
back: {
RSTGR: "rstgr",
}
},
} }
}, },
{ {
...@@ -172,15 +227,34 @@ var tableArray = [ ...@@ -172,15 +227,34 @@ var tableArray = [
{ {
display: "是否付款", name: "zepPay", width: 120, minwidth: 120, type: "string", align: "left", display: "是否付款", name: "zepPay", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "ZEP_PAY"}
},
back: {
ZEP_PAY: "zepPay",
}
},
} }
}, },
{ {
display: "付款方式代码", name: "zlsch", width: 120, minwidth: 120, type: "string", align: "left", display: "付款方式代码", name: "zlsch", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "ZLSCH"}
},
back: {
ZLSCH: "zlsch",
ZLSCH_TEXT1: "zlschText1",
}
},
} }
}, },
{ {
...@@ -193,8 +267,17 @@ var tableArray = [ ...@@ -193,8 +267,17 @@ var tableArray = [
{ {
display: "直联付款标识", name: "zepBank", width: 120, minwidth: 120, type: "string", align: "left", display: "直联付款标识", name: "zepBank", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "ZEP_BANK"}
},
back: {
ZEP_BANK: "zepBank",
}
},
} }
}, },
] ]
...@@ -224,8 +307,18 @@ var tableArray = [ ...@@ -224,8 +307,18 @@ var tableArray = [
{ {
display: "付款银行账号", name: "bankn1", width: 120, minwidth: 120, type: "string", align: "left", display: "付款银行账号", name: "bankn1", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "BANKN1"}
},
back: {
BANKN1: "bankn1",
ZT012K_TEXT1: "zt012kText1",
}
},
} }
}, },
{ {
...@@ -235,10 +328,6 @@ var tableArray = [ ...@@ -235,10 +328,6 @@ var tableArray = [
minwidth: 120, minwidth: 120,
type: "string", type: "string",
align: "left", align: "left",
editor: {
type: 'text'
}
}, },
{ {
display: "付款附言", name: "zepTxt1", width: 120, minwidth: 120, type: "string", align: "left", display: "付款附言", name: "zepTxt1", width: 120, minwidth: 120, type: "string", align: "left",
...@@ -267,20 +356,44 @@ var tableArray = [ ...@@ -267,20 +356,44 @@ var tableArray = [
//创建表格(参数、列、插入的节点、数据源) //创建表格(参数、列、插入的节点、数据源)
function loadGrid(obj) { function loadGrid(obj) {
var toolbarOptions = null; var toolbarOptions = null;
// if(obj.node=="reimbursementApplierGrid") {//只有第一个表格含工具栏 var canEdit = false;//是否可编辑
toolbarOptions = UICtrl.getDefaultToolbarOptions({ var canDelay = false;//是否加载。不加载是为了隐藏的表格如果是必填,提交会校验是否填写。
addHandler: function () { var isApply = isApplyProcUnit();
tableArray.forEach((item) => { if (isApply){
UICtrl.addGridRow(item.gridManager, {zepItemno: getZepItemNo()}); if (obj.node==="reimbursementApplierGrid"){
}); canEdit = true;
}, }else if (obj.node==="financialAuditGrid" || obj.node==="capitalPostGrid"){
deleteHandler: function () { canDelay = true;
tableArray.forEach((item) => {
item.gridManager.deleteSelectedRow();
});
} }
}); }
// } var subProcUnitId = getSubProcUnitId();
//财务审核
if ("financeNode" === subProcUnitId){
if (obj.node==="financialAuditGrid"){
canEdit = true;
}else if (obj.node==="capitalPostGrid"){
canDelay = true;
}
}
//资金岗
if ("fundNode" === subProcUnitId && obj.node==="capitalPostGrid"){
canEdit = true;
}
if(obj.node==="reimbursementApplierGrid") {//只有第一个表格含工具栏
toolbarOptions = UICtrl.getDefaultToolbarOptions({
addHandler: function () {
tableArray.forEach((item) => {
UICtrl.addGridRow(item.gridManager, {zepItemno: getZepItemNo()});
});
},
deleteHandler: function () {
tableArray.forEach((item) => {
item.gridManager.deleteSelectedRow();
});
}
});
}
obj.gridManager = UICtrl.grid("#" + obj.node, { obj.gridManager = UICtrl.grid("#" + obj.node, {
columns: obj.columns, columns: obj.columns,
dataAction: "local", dataAction: "local",
...@@ -289,7 +402,8 @@ function loadGrid(obj) { ...@@ -289,7 +402,8 @@ function loadGrid(obj) {
pageSize: 20, pageSize: 20,
toolbar: toolbarOptions, toolbar: toolbarOptions,
usePager: false, usePager: false,
enabledEdit: true, enabledEdit: canEdit,
delayLoad: canDelay,
// width: "100%", // width: "100%",
// height: 300, // height: 300,
heightDiff: -8, heightDiff: -8,
...@@ -297,7 +411,6 @@ function loadGrid(obj) { ...@@ -297,7 +411,6 @@ function loadGrid(obj) {
fixedCellHeight: true, fixedCellHeight: true,
selectRowButtonOnly: true, selectRowButtonOnly: true,
onBeforeCheckRow: function (checked, data) { onBeforeCheckRow: function (checked, data) {
debugger
//同时选定或取消所有表格中的对应行 //同时选定或取消所有表格中的对应行
tableArray.forEach((item) => { tableArray.forEach((item) => {
let rows = item.gridManager.rows; let rows = item.gridManager.rows;
...@@ -339,6 +452,8 @@ function loadGrid(obj) { ...@@ -339,6 +452,8 @@ function loadGrid(obj) {
$(document).ready(function () { $(document).ready(function () {
initialize(); initialize();
bindQueryEvent();
nodeController();
}); });
...@@ -363,6 +478,19 @@ function initialize() { ...@@ -363,6 +478,19 @@ function initialize() {
}) })
} }
function bindQueryEvent() {
$('#bukrs').searchbox({
type: "system", name: "dictionary",
getParam: function (item) {
return {paramValue: "BUKRS"}
},
onChange: function (value, data) {
$('#kostl').val(data.BUKRS);
$('#butxt').val(data.BUTXT);
}
});
}
/** /**
* 流程引擎回调设置打样的id * 流程引擎回调设置打样的id
...@@ -384,7 +512,6 @@ function getExtendedData(processAction) { ...@@ -384,7 +512,6 @@ function getExtendedData(processAction) {
tableArray.forEach((item) => { tableArray.forEach((item) => {
console.log(item) console.log(item)
}); });
debugger
//回退、打回、转交时,不需要验证必填项是否已经填写; //回退、打回、转交时,不需要验证必填项是否已经填写;
if (processAction == ProcessAction.BACK if (processAction == ProcessAction.BACK
...@@ -424,7 +551,6 @@ function getTableDataAll(obj) { ...@@ -424,7 +551,6 @@ function getTableDataAll(obj) {
//调用数组 //调用数组
function useArrayTable(func, ...data) { function useArrayTable(func, ...data) {
debugger
const results = tableArray.map((item) => { const results = tableArray.map((item) => {
return func(item, ...data); return func(item, ...data);
}); });
...@@ -441,4 +567,36 @@ function getZepItemNo() { ...@@ -441,4 +567,36 @@ function getZepItemNo() {
zepItemNo = ("00" + (wornNo + 1)).slice(-3); zepItemNo = ("00" + (wornNo + 1)).slice(-3);
} }
return zepItemNo; return zepItemNo;
}
//UICtrl中校验是否允许编辑
function businessJudgmentUnit() {
var isApply = isApplyProcUnit();
if (isApply) {
$("#financialAudit").hide();
$("#financialAudit_sapReturn").hide();
$("#capitalPost").hide();
$("#paymentAccomplish_sapReturn").hide();
return true;
}else {
UICtrl.setDisable($("#submitForm"));
}
return true;
}
function nodeController(){
var subProcUnitId = getSubProcUnitId();
//财务审核
if ("financeNode" === subProcUnitId){
$("#financialAudit_sapReturn").hide();
$("#capitalPost").hide();
$("#paymentAccomplish_sapReturn").hide();
}
//资金岗
if ("fundNode" === subProcUnitId){
$("#financialAudit_sapReturn").hide();
$("#paymentAccomplish_sapReturn").hide();
}
} }
\ No newline at end of file
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
/> />
<x:inputC name="zepFtypename" required="false" readonly="true" label="EP付款申请类别名称" labelCol="2" maxLength="64" <x:inputC name="zepFtypename" required="false" readonly="true" label="EP付款申请类别名称" labelCol="2" maxLength="64"
fieldCol="2"/> fieldCol="2"/>
<x:inputC name="bukrs" required="false" label="公司代码" labelCol="2" fieldCol="2"/> <x:inputC name="bukrs" required="true" label="公司代码" labelCol="2" fieldCol="2" wrapper="select"/>
<x:inputC name="butxt" required="false" label="公司代码名称" labelCol="2" fieldCol="2"/> <x:inputC name="butxt" required="false" readonly="true" label="公司代码名称" labelCol="2" fieldCol="2"/>
<x:inputC name="zepDepart" required="false" readonly="true" label="EP部门代码" labelCol="2" fieldCol="2"/> <x:inputC name="zepDepart" required="false" readonly="true" label="EP部门代码" labelCol="2" fieldCol="2"/>
<x:inputC name="zepDepartname" required="false" readonly="true" label="EP部门名称" labelCol="2" fieldCol="2"/> <x:inputC name="zepDepartname" required="false" readonly="true" label="EP部门名称" labelCol="2" fieldCol="2"/>
<x:inputC name="zepAppli" required="false" readonly="true" label="EP流程申请人代码" labelCol="2" fieldCol="2"/> <x:inputC name="zepAppli" required="false" readonly="true" label="EP流程申请人代码" labelCol="2" fieldCol="2"/>
......
...@@ -35,7 +35,7 @@ var tableArray = [ ...@@ -35,7 +35,7 @@ var tableArray = [
display: "BP标识", name: "zepBptype", width: 120, minwidth: 120, type: "string", align: "left", display: "BP标识", name: "zepBptype", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select", required: false, type: "select",
data: { data: {
type: 'system', type: 'system',
name: "dictionary", name: "dictionary",
...@@ -51,15 +51,11 @@ var tableArray = [ ...@@ -51,15 +51,11 @@ var tableArray = [
}, },
{ {
display: "BP标识描述", name: "zepBptypename", width: 120, minwidth: 120, type: "string", align: "left", display: "BP标识描述", name: "zepBptypename", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
}
}, },
{ {
display: "BP(合作伙伴)", name: "partner", width: 120, minwidth: 120, type: "string", align: "left", display: "BP(合作伙伴)", name: "partner", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select", required: false, type: "select",
data: { data: {
type: 'system', type: 'system',
name: "dictionary", name: "dictionary",
...@@ -91,7 +87,7 @@ var tableArray = [ ...@@ -91,7 +87,7 @@ var tableArray = [
{ {
display: "费用类型代码", name: "zepExtype", width: 120, minwidth: 120, type: "string", align: "left", display: "费用类型代码", name: "zepExtype", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select", required: false, type: "select",
data: { data: {
type: 'system', type: 'system',
name: "dictionary", name: "dictionary",
...@@ -137,7 +133,7 @@ var tableArray = [ ...@@ -137,7 +133,7 @@ var tableArray = [
{ {
display: "成本中心", name: "kostl", width: 120, minwidth: 120, type: "string", align: "left", display: "成本中心", name: "kostl", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select", required: false, type: "select",
data: { data: {
type: 'system', type: 'system',
name: "dictionary", name: "dictionary",
...@@ -157,7 +153,7 @@ var tableArray = [ ...@@ -157,7 +153,7 @@ var tableArray = [
{ {
display: "内部订单", name: "aufnr", width: 120, minwidth: 120, type: "string", align: "left", display: "内部订单", name: "aufnr", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select", required: false, type: "select",
data: { data: {
type: 'system', type: 'system',
name: "dictionary", name: "dictionary",
...@@ -177,7 +173,7 @@ var tableArray = [ ...@@ -177,7 +173,7 @@ var tableArray = [
{ {
display: "币别", name: "waers", width: 120, minwidth: 120, type: "string", align: "left", display: "币别", name: "waers", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select", required: false, type: "select",
data: { data: {
type: 'system', type: 'system',
name: "dictionary", name: "dictionary",
...@@ -193,7 +189,7 @@ var tableArray = [ ...@@ -193,7 +189,7 @@ var tableArray = [
{ {
display: "汇率", name: "kursf", width: 120, minwidth: 120, type: "string", align: "left", display: "汇率", name: "kursf", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select", required: false, type: "select",
data: { data: {
type: 'system', type: 'system',
name: "dictionary", name: "dictionary",
...@@ -230,7 +226,7 @@ var tableArray = [ ...@@ -230,7 +226,7 @@ var tableArray = [
{ {
display: "税码", name: "mwskz", width: 120, minwidth: 120, type: "string", align: "left", display: "税码", name: "mwskz", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select", required: false, type: "select",
data: { data: {
type: 'system', type: 'system',
name: "dictionary", name: "dictionary",
...@@ -275,7 +271,7 @@ var tableArray = [ ...@@ -275,7 +271,7 @@ var tableArray = [
{ {
display: "原因代码", name: "rstgr", width: 120, minwidth: 120, type: "string", align: "left", display: "原因代码", name: "rstgr", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select", required: false, type: "select",
data: { data: {
type: 'system', type: 'system',
name: "dictionary", name: "dictionary",
...@@ -358,7 +354,7 @@ var tableArray = [ ...@@ -358,7 +354,7 @@ var tableArray = [
{ {
display: "是否付款", name: "zepPay", width: 120, minwidth: 120, type: "string", align: "left", display: "是否付款", name: "zepPay", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select", required: false, type: "select",
data: { data: {
type: 'system', type: 'system',
name: "dictionary", name: "dictionary",
...@@ -374,7 +370,7 @@ var tableArray = [ ...@@ -374,7 +370,7 @@ var tableArray = [
{ {
display: "付款方式代码", name: "zlsch", width: 120, minwidth: 120, type: "string", align: "left", display: "付款方式代码", name: "zlsch", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select", required: false, type: "select",
data: { data: {
type: 'system', type: 'system',
name: "dictionary", name: "dictionary",
...@@ -394,7 +390,7 @@ var tableArray = [ ...@@ -394,7 +390,7 @@ var tableArray = [
{ {
display: "直联付款标识", name: "zepBank", width: 120, minwidth: 120, type: "string", align: "left", display: "直联付款标识", name: "zepBank", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select", required: false, type: "select",
data: { data: {
type: 'system', type: 'system',
name: "dictionary", name: "dictionary",
...@@ -434,7 +430,7 @@ var tableArray = [ ...@@ -434,7 +430,7 @@ var tableArray = [
{ {
display: "付款银行账号", name: "bankn1", width: 200, minwidth: 120, type: "string", align: "left", display: "付款银行账号", name: "bankn1", width: 200, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select", required: false, type: "select",
data: { data: {
type: 'system', type: 'system',
name: "dictionary", name: "dictionary",
...@@ -483,20 +479,44 @@ var tableArray = [ ...@@ -483,20 +479,44 @@ var tableArray = [
//创建表格(参数、列、插入的节点、数据源) //创建表格(参数、列、插入的节点、数据源)
function loadGrid(obj) { function loadGrid(obj) {
var toolbarOptions = null; var toolbarOptions = null;
// if(obj.node=="reimbursementApplierGrid") {//只有第一个表格含工具栏 var canEdit = false;//是否可编辑
toolbarOptions = UICtrl.getDefaultToolbarOptions({ var canDelay = false;//是否加载。不加载是为了隐藏的表格如果是必填,提交会校验是否填写。
addHandler: function () { var isApply = isApplyProcUnit();
tableArray.forEach((item) => { if (isApply){
UICtrl.addGridRow(item.gridManager, {zepItemno: getZepItemNo()}); if (obj.node==="reimbursementApplierGrid"){
}); canEdit = true;
}, }else if (obj.node==="financialAuditGrid" || obj.node==="capitalPostGrid"){
deleteHandler: function () { canDelay = true;
tableArray.forEach((item) => {
item.gridManager.deleteSelectedRow();
});
} }
}); }
// } var subProcUnitId = getSubProcUnitId();
//财务审核
if ("financeNode" === subProcUnitId){
if (obj.node==="financialAuditGrid"){
canEdit = true;
}else if (obj.node==="capitalPostGrid"){
canDelay = true;
}
}
//资金岗
if ("fundNode" === subProcUnitId && obj.node==="capitalPostGrid"){
canEdit = true;
}
if(obj.node==="reimbursementApplierGrid") {//只有第一个表格含工具栏
toolbarOptions = UICtrl.getDefaultToolbarOptions({
addHandler: function () {
tableArray.forEach((item) => {
UICtrl.addGridRow(item.gridManager, {zepItemno: getZepItemNo()});
});
},
deleteHandler: function () {
tableArray.forEach((item) => {
item.gridManager.deleteSelectedRow();
});
}
});
}
obj.gridManager = UICtrl.grid("#" + obj.node, { obj.gridManager = UICtrl.grid("#" + obj.node, {
columns: obj.columns, columns: obj.columns,
dataAction: "local", dataAction: "local",
...@@ -505,7 +525,8 @@ function loadGrid(obj) { ...@@ -505,7 +525,8 @@ function loadGrid(obj) {
pageSize: 20, pageSize: 20,
toolbar: toolbarOptions, toolbar: toolbarOptions,
usePager: false, usePager: false,
enabledEdit: true, enabledEdit: canEdit,
delayLoad: canDelay,
// width: "100%", // width: "100%",
// height: 300, // height: 300,
heightDiff: -8, heightDiff: -8,
...@@ -555,6 +576,7 @@ function loadGrid(obj) { ...@@ -555,6 +576,7 @@ function loadGrid(obj) {
$(document).ready(function () { $(document).ready(function () {
initialize(); initialize();
bindQueryEvent(); bindQueryEvent();
nodeController();
}); });
...@@ -667,4 +689,36 @@ function getZepItemNo() { ...@@ -667,4 +689,36 @@ function getZepItemNo() {
zepItemNo = ("00" + (wornNo + 1)).slice(-3); zepItemNo = ("00" + (wornNo + 1)).slice(-3);
} }
return zepItemNo; return zepItemNo;
}
//UICtrl中校验是否允许编辑
function businessJudgmentUnit() {
var isApply = isApplyProcUnit();
if (isApply) {
$("#financialAudit").hide();
$("#financialAudit_sapReturn").hide();
$("#capitalPost").hide();
$("#paymentAccomplish_sapReturn").hide();
return true;
}else {
UICtrl.setDisable($("#submitForm"));
}
return true;
}
function nodeController(){
var subProcUnitId = getSubProcUnitId();
//财务审核
if ("financeNode" === subProcUnitId){
$("#financialAudit_sapReturn").hide();
$("#capitalPost").hide();
$("#paymentAccomplish_sapReturn").hide();
}
//资金岗
if ("fundNode" === subProcUnitId){
$("#financialAudit_sapReturn").hide();
$("#paymentAccomplish_sapReturn").hide();
}
} }
\ No newline at end of file
...@@ -55,29 +55,31 @@ ...@@ -55,29 +55,31 @@
<x:title title="报销人填写" name="group"/> <x:title title="报销人填写" name="group"/>
<div id="reimbursementApplierGrid" style="margin: 2px;"> <div id="reimbursementApplierGrid" style="margin: 2px;">
</div> </div>
<div class="blank_div clearfix"></div> <div class="blank_div clearfix"></div>
<x:title title="财务审核填写" name="group"/> <div id="financialAudit">
<div id="financialAuditGrid" style="margin: 2px;"> <x:title title="财务审核填写" name="group"/>
<div id="financialAuditGrid" style="margin: 2px;">
</div>
</div> </div>
<div class="blank_div clearfix"></div> <div class="blank_div clearfix"></div>
<x:title title="财务已审核、sap回执" name="group"/> <div id="financialAudit_sapReturn">
<div id="financialAudit_sapReturnGrid" style="margin: 2px;"> <x:title title="财务已审核、sap回执" name="group"/>
<div id="financialAudit_sapReturnGrid" style="margin: 2px;">
</div>
</div> </div>
<div class="blank_div clearfix"></div> <div class="blank_div clearfix"></div>
<x:title title="资金岗填写" name="group"/> <div id="capitalPost">
<div id="capitalPostGrid" style="margin: 2px;"> <x:title title="资金岗填写" name="group"/>
<div id="capitalPostGrid" style="margin: 2px;">
</div>
</div> </div>
<div class="blank_div clearfix"></div> <div class="blank_div clearfix"></div>
<x:title title="付款完成、sap回执" name="group"/> <div id="paymentAccomplish_sapReturn">
<div id="paymentAccomplish_sapReturnGrid" style="margin: 2px;"> <x:title title="付款完成、sap回执" name="group"/>
<div id="paymentAccomplish_sapReturnGrid" style="margin: 2px;">
</div>
</div> </div>
</div> </div>
</form> </form>
</body> </body>
</html> </html>
...@@ -156,7 +156,7 @@ function doView(id,zepFtype) { ...@@ -156,7 +156,7 @@ function doView(id,zepFtype) {
UICtrl.addTabItem({ UICtrl.addTabItem({
tabid: 'showCostReimbursement'+id, tabid: 'showCostReimbursement'+id,
text: title, text: title,
url: web_app.name + '/sapCostReimbursement/showSapCostReimbursement.do?bizId='+id+"&isDetailPage=true" url: web_app.name + '/sapCostReimbursement/showSapCostReimbursement.job?bizId='+id+"&isDetailPage=true"
}); });
} }
......
...@@ -9,8 +9,18 @@ var tableArray = [ ...@@ -9,8 +9,18 @@ var tableArray = [
{ {
display: "计划内外付款标识", name: "zepPlan", width: 120, minwidth: 120, type: "string", align: "left", display: "计划内外付款标识", name: "zepPlan", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "ZEP_PLAN"}
},
back: {
ZEP_PLAN: "zepPlan",
ZEP_PLANNAME: "zepPlanname"
}
},
} }
}, },
{ {
...@@ -20,65 +30,74 @@ var tableArray = [ ...@@ -20,65 +30,74 @@ var tableArray = [
minwidth: 120, minwidth: 120,
type: "string", type: "string",
align: "left", align: "left",
editor: {
type: 'text'
}
}, },
{ {
display: "BP标识", name: "zepBptype", width: 120, minwidth: 120, type: "string", align: "left", display: "BP标识", name: "zepBptype", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "ZEP_BPTYPE"}
},
back: {
ZEP_BPTYPE: "zepBptype",
ZEP_BPTYPENAME: "zepBptypename"
}
},
} }
}, },
{ {
display: "BP标识描述", name: "zepBptypename", width: 120, minwidth: 120, type: "string", align: "left", display: "BP标识描述", name: "zepBptypename", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
}
}, },
{ {
display: "BP(合作伙伴)", name: "partner", width: 120, minwidth: 120, type: "string", align: "left", display: "BP(合作伙伴)", name: "partner", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "PARTNER"}
},
back: {
PARTNER: "partner",
KOINH: "koinh",
BANKL: "bankl",
BANKN: "bankn",
SWIFT: "swift",
}
},
} }
}, },
{ {
display: "BP账号名称", name: "koinh", width: 120, minwidth: 120, type: "string", align: "left", display: "BP账号名称", name: "koinh", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
}
}, },
{ {
display: "BP联行号", name: "bankl", width: 120, minwidth: 120, type: "string", align: "left", display: "BP联行号", name: "bankl", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
}
}, },
{ {
display: "BP银行账号", name: "bankn", width: 120, minwidth: 120, type: "string", align: "left", display: "BP银行账号", name: "bankn", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
}
}, },
{ {
display: "SWIFT/BIC", name: "swift", width: 120, minwidth: 120, type: "string", align: "left", display: "SWIFT/BIC", name: "swift", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
}
}, },
{ {
display: "费用类型代码", name: "zepExtype", width: 120, minwidth: 120, type: "string", align: "left", display: "费用类型代码", name: "zepExtype", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "ZEP_EXTYPE"}
},
back: {
ZEP_EXTYPE: "zepExtype",
ZEP_EXTYPENAME: "zepExtypename"
}
},
} }
}, },
{ {
...@@ -91,15 +110,33 @@ var tableArray = [ ...@@ -91,15 +110,33 @@ var tableArray = [
{ {
display: "币别", name: "waers", width: 120, minwidth: 120, type: "string", align: "left", display: "币别", name: "waers", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "WAERS"}
},
back: {
WAERS: "waers",
}
},
} }
}, },
{ {
display: "汇率", name: "kursf", width: 120, minwidth: 120, type: "string", align: "left", display: "汇率", name: "kursf", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "KURSF"}
},
back: {
KURSF: "kursf",
}
},
} }
}, },
{ {
...@@ -127,8 +164,17 @@ var tableArray = [ ...@@ -127,8 +164,17 @@ var tableArray = [
{ {
display: "原因代码", name: "rstgr", width: 120, minwidth: 120, type: "string", align: "left", display: "原因代码", name: "rstgr", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "RSTGR"}
},
back: {
RSTGR: "rstgr",
}
},
} }
}, },
{ {
...@@ -158,15 +204,34 @@ var tableArray = [ ...@@ -158,15 +204,34 @@ var tableArray = [
{ {
display: "是否付款", name: "zepPay", width: 120, minwidth: 120, type: "string", align: "left", display: "是否付款", name: "zepPay", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "ZEP_PAY"}
},
back: {
ZEP_PAY: "zepPay",
}
},
} }
}, },
{ {
display: "付款方式代码", name: "zlsch", width: 120, minwidth: 120, type: "string", align: "left", display: "付款方式代码", name: "zlsch", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "ZLSCH"}
},
back: {
ZLSCH: "zlsch",
ZLSCH_TEXT1: "zlschText1",
}
},
} }
}, },
{ {
...@@ -179,8 +244,17 @@ var tableArray = [ ...@@ -179,8 +244,17 @@ var tableArray = [
{ {
display: "直联付款标识", name: "zepBank", width: 120, minwidth: 120, type: "string", align: "left", display: "直联付款标识", name: "zepBank", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "ZEP_BANK"}
},
back: {
ZEP_BANK: "zepBank",
}
},
} }
}, },
] ]
...@@ -194,8 +268,18 @@ var tableArray = [ ...@@ -194,8 +268,18 @@ var tableArray = [
{ {
display: "付款银行账号", name: "bankn1", width: 120, minwidth: 120, type: "string", align: "left", display: "付款银行账号", name: "bankn1", width: 120, minwidth: 120, type: "string", align: "left",
editor: { editor: {
required: true, type: "select",
type: 'text' data: {
type: 'system',
name: "dictionary",
getParam: function (item) {
return {paramValue: "BANKN1"}
},
back: {
BANKN1: "bankn1",
ZT012K_TEXT1: "zt012kText1",
}
},
} }
}, },
{ {
...@@ -252,20 +336,44 @@ var tableArray = [ ...@@ -252,20 +336,44 @@ var tableArray = [
//创建表格(参数、列、插入的节点、数据源) //创建表格(参数、列、插入的节点、数据源)
function loadGrid(obj) { function loadGrid(obj) {
var toolbarOptions = null; var toolbarOptions = null;
// if(obj.node=="reimbursementApplierGrid") {//只有第一个表格含工具栏 var canEdit = false;//是否可编辑
toolbarOptions = UICtrl.getDefaultToolbarOptions({ var canDelay = false;//是否加载。不加载是为了隐藏的表格如果是必填,提交会校验是否填写。
addHandler: function () { var isApply = isApplyProcUnit();
tableArray.forEach((item) => { if (isApply){
UICtrl.addGridRow(item.gridManager, {zepItemno: getZepItemNo()}); if (obj.node==="reimbursementApplierGrid"){
}); canEdit = true;
}, }else if (obj.node==="financialAuditGrid" || obj.node==="capitalPostGrid"){
deleteHandler: function () { canDelay = true;
tableArray.forEach((item) => {
item.gridManager.deleteSelectedRow();
});
} }
}); }
// } var subProcUnitId = getSubProcUnitId();
//财务审核
if ("financeNode" === subProcUnitId){
if (obj.node==="financialAuditGrid"){
canEdit = true;
}else if (obj.node==="capitalPostGrid"){
canDelay = true;
}
}
//资金岗
if ("fundNode" === subProcUnitId && obj.node==="capitalPostGrid"){
canEdit = true;
}
if(obj.node==="reimbursementApplierGrid") {//只有第一个表格含工具栏
toolbarOptions = UICtrl.getDefaultToolbarOptions({
addHandler: function () {
tableArray.forEach((item) => {
UICtrl.addGridRow(item.gridManager, {zepItemno: getZepItemNo()});
});
},
deleteHandler: function () {
tableArray.forEach((item) => {
item.gridManager.deleteSelectedRow();
});
}
});
}
obj.gridManager = UICtrl.grid("#" + obj.node, { obj.gridManager = UICtrl.grid("#" + obj.node, {
columns: obj.columns, columns: obj.columns,
dataAction: "local", dataAction: "local",
...@@ -274,7 +382,8 @@ function loadGrid(obj) { ...@@ -274,7 +382,8 @@ function loadGrid(obj) {
pageSize: 20, pageSize: 20,
toolbar: toolbarOptions, toolbar: toolbarOptions,
usePager: false, usePager: false,
enabledEdit: true, enabledEdit: canEdit,
delayLoad: canDelay,
// width: "100%", // width: "100%",
// height: 300, // height: 300,
heightDiff: -8, heightDiff: -8,
...@@ -282,7 +391,6 @@ function loadGrid(obj) { ...@@ -282,7 +391,6 @@ function loadGrid(obj) {
fixedCellHeight: true, fixedCellHeight: true,
selectRowButtonOnly: true, selectRowButtonOnly: true,
onBeforeCheckRow: function (checked, data) { onBeforeCheckRow: function (checked, data) {
debugger
//同时选定或取消所有表格中的对应行 //同时选定或取消所有表格中的对应行
tableArray.forEach((item) => { tableArray.forEach((item) => {
let rows = item.gridManager.rows; let rows = item.gridManager.rows;
...@@ -324,6 +432,8 @@ function loadGrid(obj) { ...@@ -324,6 +432,8 @@ function loadGrid(obj) {
$(document).ready(function () { $(document).ready(function () {
initialize(); initialize();
bindQueryEvent();
nodeController();
}); });
...@@ -348,6 +458,19 @@ function initialize() { ...@@ -348,6 +458,19 @@ function initialize() {
}) })
} }
function bindQueryEvent() {
$('#bukrs').searchbox({
type: "system", name: "dictionary",
getParam: function (item) {
return {paramValue: "BUKRS"}
},
onChange: function (value, data) {
$('#kostl').val(data.BUKRS);
$('#butxt').val(data.BUTXT);
}
});
}
/** /**
* 流程引擎回调设置打样的id * 流程引擎回调设置打样的id
...@@ -369,7 +492,6 @@ function getExtendedData(processAction) { ...@@ -369,7 +492,6 @@ function getExtendedData(processAction) {
tableArray.forEach((item) => { tableArray.forEach((item) => {
console.log(item) console.log(item)
}); });
debugger
//回退、打回、转交时,不需要验证必填项是否已经填写; //回退、打回、转交时,不需要验证必填项是否已经填写;
if (processAction == ProcessAction.BACK if (processAction == ProcessAction.BACK
...@@ -409,7 +531,6 @@ function getTableDataAll(obj) { ...@@ -409,7 +531,6 @@ function getTableDataAll(obj) {
//调用数组 //调用数组
function useArrayTable(func, ...data) { function useArrayTable(func, ...data) {
debugger
const results = tableArray.map((item) => { const results = tableArray.map((item) => {
return func(item, ...data); return func(item, ...data);
}); });
...@@ -426,4 +547,36 @@ function getZepItemNo() { ...@@ -426,4 +547,36 @@ function getZepItemNo() {
zepItemNo = ("00" + (wornNo + 1)).slice(-3); zepItemNo = ("00" + (wornNo + 1)).slice(-3);
} }
return zepItemNo; return zepItemNo;
}
//UICtrl中校验是否允许编辑
function businessJudgmentUnit() {
var isApply = isApplyProcUnit();
if (isApply) {
$("#financialAudit").hide();
$("#financialAudit_sapReturn").hide();
$("#capitalPost").hide();
$("#paymentAccomplish_sapReturn").hide();
return true;
}else {
UICtrl.setDisable($("#submitForm"));
}
return true;
}
function nodeController(){
var subProcUnitId = getSubProcUnitId();
//财务审核
if ("financeNode" === subProcUnitId){
$("#financialAudit_sapReturn").hide();
$("#capitalPost").hide();
$("#paymentAccomplish_sapReturn").hide();
}
//资金岗
if ("fundNode" === subProcUnitId){
$("#financialAudit_sapReturn").hide();
$("#paymentAccomplish_sapReturn").hide();
}
} }
\ No newline at end of file
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
/> />
<x:inputC name="zepFtypename" required="false" readonly="true" label="EP付款申请类别名称" labelCol="2" maxLength="64" <x:inputC name="zepFtypename" required="false" readonly="true" label="EP付款申请类别名称" labelCol="2" maxLength="64"
fieldCol="2"/> fieldCol="2"/>
<x:inputC name="bukrs" required="false" label="公司代码" labelCol="2" fieldCol="2"/> <x:inputC name="bukrs" required="false" label="公司代码" labelCol="2" fieldCol="2" wrapper="select"/>
<x:inputC name="butxt" required="false" label="公司代码名称" labelCol="2" fieldCol="2"/> <x:inputC name="butxt" required="false" readonly="true" label="公司代码名称" labelCol="2" fieldCol="2"/>
<x:inputC name="zepDepart" required="false" readonly="true" label="EP部门代码" labelCol="2" fieldCol="2"/> <x:inputC name="zepDepart" required="false" readonly="true" label="EP部门代码" labelCol="2" fieldCol="2"/>
<x:inputC name="zepDepartname" required="false" readonly="true" label="EP部门名称" labelCol="2" fieldCol="2"/> <x:inputC name="zepDepartname" required="false" readonly="true" label="EP部门名称" labelCol="2" fieldCol="2"/>
<x:inputC name="zepAppli" required="false" readonly="true" label="EP流程申请人代码" labelCol="2" fieldCol="2"/> <x:inputC name="zepAppli" required="false" readonly="true" label="EP流程申请人代码" labelCol="2" fieldCol="2"/>
......
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