Commit c4b201a1 authored by 鲁鑫's avatar 鲁鑫

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

parent 7499eb0b
......@@ -33,8 +33,8 @@
/>
<x:inputC name="zepFtypename" required="false" readonly="true" label="EP付款申请类别名称" labelCol="2" maxLength="64"
fieldCol="2"/>
<x:inputC name="bukrs" required="false" label="公司代码" labelCol="2" fieldCol="2"/>
<x:inputC name="butxt" 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" readonly="true" label="公司代码名称" 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="zepAppli" required="false" readonly="true" label="EP流程申请人代码" labelCol="2" fieldCol="2"/>
......
......@@ -35,7 +35,7 @@ var tableArray = [
display: "BP标识", name: "zepBptype", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
required: true, type: "select",
required: false, type: "select",
data: {
type: 'system',
name: "dictionary",
......@@ -51,15 +51,11 @@ var tableArray = [
},
{
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",
editor: {
required: true, type: "select",
required: false, type: "select",
data: {
type: 'system',
name: "dictionary",
......@@ -91,7 +87,7 @@ var tableArray = [
{
display: "费用类型代码", name: "zepExtype", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
required: true, type: "select",
required: false, type: "select",
data: {
type: 'system',
name: "dictionary",
......@@ -137,7 +133,7 @@ var tableArray = [
{
display: "成本中心", name: "kostl", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
required: true, type: "select",
required: false, type: "select",
data: {
type: 'system',
name: "dictionary",
......@@ -157,7 +153,7 @@ var tableArray = [
{
display: "内部订单", name: "aufnr", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
required: true, type: "select",
required: false, type: "select",
data: {
type: 'system',
name: "dictionary",
......@@ -177,7 +173,7 @@ var tableArray = [
{
display: "币别", name: "waers", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
required: true, type: "select",
required: false, type: "select",
data: {
type: 'system',
name: "dictionary",
......@@ -193,7 +189,7 @@ var tableArray = [
{
display: "汇率", name: "kursf", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
required: true, type: "select",
required: false, type: "select",
data: {
type: 'system',
name: "dictionary",
......@@ -230,7 +226,7 @@ var tableArray = [
{
display: "税码", name: "mwskz", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
required: true, type: "select",
required: false, type: "select",
data: {
type: 'system',
name: "dictionary",
......@@ -275,7 +271,7 @@ var tableArray = [
{
display: "原因代码", name: "rstgr", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
required: true, type: "select",
required: false, type: "select",
data: {
type: 'system',
name: "dictionary",
......@@ -358,7 +354,7 @@ var tableArray = [
{
display: "是否付款", name: "zepPay", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
required: true, type: "select",
required: false, type: "select",
data: {
type: 'system',
name: "dictionary",
......@@ -374,7 +370,7 @@ var tableArray = [
{
display: "付款方式代码", name: "zlsch", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
required: true, type: "select",
required: false, type: "select",
data: {
type: 'system',
name: "dictionary",
......@@ -394,7 +390,7 @@ var tableArray = [
{
display: "直联付款标识", name: "zepBank", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
required: true, type: "select",
required: false, type: "select",
data: {
type: 'system',
name: "dictionary",
......@@ -434,7 +430,7 @@ var tableArray = [
{
display: "付款银行账号", name: "bankn1", width: 200, minwidth: 120, type: "string", align: "left",
editor: {
required: true, type: "select",
required: false, type: "select",
data: {
type: 'system',
name: "dictionary",
......@@ -483,20 +479,44 @@ var tableArray = [
//创建表格(参数、列、插入的节点、数据源)
function loadGrid(obj) {
var toolbarOptions = null;
// 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();
});
var canEdit = false;//是否可编辑
var canDelay = false;//是否加载。不加载是为了隐藏的表格如果是必填,提交会校验是否填写。
var isApply = isApplyProcUnit();
if (isApply){
if (obj.node==="reimbursementApplierGrid"){
canEdit = true;
}else if (obj.node==="financialAuditGrid" || obj.node==="capitalPostGrid"){
canDelay = true;
}
});
// }
}
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, {
columns: obj.columns,
dataAction: "local",
......@@ -505,7 +525,8 @@ function loadGrid(obj) {
pageSize: 20,
toolbar: toolbarOptions,
usePager: false,
enabledEdit: true,
enabledEdit: canEdit,
delayLoad: canDelay,
// width: "100%",
// height: 300,
heightDiff: -8,
......@@ -555,6 +576,7 @@ function loadGrid(obj) {
$(document).ready(function () {
initialize();
bindQueryEvent();
nodeController();
});
......@@ -667,4 +689,36 @@ function getZepItemNo() {
zepItemNo = ("00" + (wornNo + 1)).slice(-3);
}
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 @@
<x:title title="报销人填写" name="group"/>
<div id="reimbursementApplierGrid" style="margin: 2px;">
</div>
<div class="blank_div clearfix"></div>
<x:title title="财务审核填写" name="group"/>
<div id="financialAuditGrid" style="margin: 2px;">
<div id="financialAudit">
<x:title title="财务审核填写" name="group"/>
<div id="financialAuditGrid" style="margin: 2px;">
</div>
</div>
<div class="blank_div clearfix"></div>
<x:title title="财务已审核、sap回执" name="group"/>
<div id="financialAudit_sapReturnGrid" style="margin: 2px;">
<div id="financialAudit_sapReturn">
<x:title title="财务已审核、sap回执" name="group"/>
<div id="financialAudit_sapReturnGrid" style="margin: 2px;">
</div>
</div>
<div class="blank_div clearfix"></div>
<x:title title="资金岗填写" name="group"/>
<div id="capitalPostGrid" style="margin: 2px;">
<div id="capitalPost">
<x:title title="资金岗填写" name="group"/>
<div id="capitalPostGrid" style="margin: 2px;">
</div>
</div>
<div class="blank_div clearfix"></div>
<x:title title="付款完成、sap回执" name="group"/>
<div id="paymentAccomplish_sapReturnGrid" style="margin: 2px;">
<div id="paymentAccomplish_sapReturn">
<x:title title="付款完成、sap回执" name="group"/>
<div id="paymentAccomplish_sapReturnGrid" style="margin: 2px;">
</div>
</div>
</div>
</form>
</body>
</html>
......@@ -156,7 +156,7 @@ function doView(id,zepFtype) {
UICtrl.addTabItem({
tabid: 'showCostReimbursement'+id,
text: title,
url: web_app.name + '/sapCostReimbursement/showSapCostReimbursement.do?bizId='+id+"&isDetailPage=true"
url: web_app.name + '/sapCostReimbursement/showSapCostReimbursement.job?bizId='+id+"&isDetailPage=true"
});
}
......
......@@ -33,8 +33,8 @@
/>
<x:inputC name="zepFtypename" required="false" readonly="true" label="EP付款申请类别名称" labelCol="2" maxLength="64"
fieldCol="2"/>
<x:inputC name="bukrs" required="false" label="公司代码" labelCol="2" fieldCol="2"/>
<x:inputC name="butxt" 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" readonly="true" label="公司代码名称" 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="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