Commit 73346294 authored by 鲁鑫's avatar 鲁鑫

费用报销相关把资金岗填写的付款银行账号放到抬头

parent 779b4618
...@@ -5,6 +5,8 @@ var tableArray = [ ...@@ -5,6 +5,8 @@ var tableArray = [
gridManager: null, gridManager: null,
data: null, data: null,
columns: [ columns: [
{display: "", name: "reimbursementDetailId", width: 80, minwidth: 80, type: "string", align: "left", hide: true},
{display: "", name: "reimbursementBaseInfoId", width: 80, minwidth: 80, type: "string", align: "left", hide: true},
{display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"}, {display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"},
{ {
display: "计划内外付款标识", name: "zepPlan", width: 120, minwidth: 120, type: "string", align: "left", display: "计划内外付款标识", name: "zepPlan", width: 120, minwidth: 120, type: "string", align: "left",
...@@ -202,12 +204,14 @@ var tableArray = [ ...@@ -202,12 +204,14 @@ var tableArray = [
} }
}, },
] ]
}, { },
{
parms: {}, parms: {},
node: "financialAuditGrid", node: "financialAuditGrid",
gridManager: null, gridManager: null,
data: null, data: null,
columns: [ columns: [
{display: "", name: "rstgr", width: 80, minwidth: 80, type: "string", align: "left", hide: true},
{display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"}, {display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"},
{ {
display: "原因代码", name: "rstgrName", width: 120, minwidth: 120, type: "string", align: "left", display: "原因代码", name: "rstgrName", width: 120, minwidth: 120, type: "string", align: "left",
...@@ -328,54 +332,54 @@ var tableArray = [ ...@@ -328,54 +332,54 @@ var tableArray = [
{display: "返回消息", name: "msgtx", width: 300, minwidth: 120, type: "string", align: "left"}, {display: "返回消息", name: "msgtx", width: 300, minwidth: 120, type: "string", align: "left"},
] ]
}, },
// {
// parms: {},
// node: "capitalPostGrid",
// gridManager: null,
// data: null,
// columns: [
// {display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"},
// {
// display: "付款银行账号", name: "bankn1", width: 120, minwidth: 120, type: "string", align: "left",
// editor: {
// required: false, type: "select",
// data: {
// type: 'system',
// name: "getCompanyAndBankInfos",
// getParam: function (item) {
// return {
// BUKRS: $("#bukrs").val()
// }
// },
// back: {
// BANKN1: "bankn1",
// TEXT1: "zt012kText1",
// }
// },
// }
// },
// {
// display: "付款银行账号名称",
// name: "zt012kText1",
// width: 120,
// minwidth: 120,
// type: "string",
// align: "left",
// editor: {
//
// type: 'text'
// }
// },
// {
// display: "付款附言", name: "zepTxt1", width: 120, minwidth: 120, type: "string", align: "left",
// editor: {
//
// type: 'text'
// }
// },
// ]
// }
{ {
parms: {},
node: "capitalPostGrid",
gridManager: null,
data: null,
columns: [
{display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"},
{
display: "付款银行账号", name: "bankn1", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
required: false, type: "select",
data: {
type: 'system',
name: "getCompanyAndBankInfos",
getParam: function (item) {
return {
BUKRS: $("#bukrs").val()
}
},
back: {
BANKN1: "bankn1",
TEXT1: "zt012kText1",
}
},
}
},
{
display: "付款银行账号名称",
name: "zt012kText1",
width: 120,
minwidth: 120,
type: "string",
align: "left",
editor: {
type: 'text'
}
},
{
display: "付款附言", name: "zepTxt1", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
}
},
]
}
, {
parms: {}, parms: {},
node: "paymentAccomplish_sapReturnGrid", node: "paymentAccomplish_sapReturnGrid",
gridManager: null, gridManager: null,
...@@ -387,8 +391,7 @@ var tableArray = [ ...@@ -387,8 +391,7 @@ var tableArray = [
{display: "付款状态", name: "zpayStaus", width: 120, minwidth: 120, type: "string", align: "left"} {display: "付款状态", name: "zpayStaus", width: 120, minwidth: 120, type: "string", align: "left"}
] ]
} }
] ];
//创建表格(参数、列、插入的节点、数据源) //创建表格(参数、列、插入的节点、数据源)
function loadGrid(obj) { function loadGrid(obj) {
...@@ -399,7 +402,9 @@ function loadGrid(obj) { ...@@ -399,7 +402,9 @@ function loadGrid(obj) {
if (isApply){ if (isApply){
if (obj.node==="reimbursementApplierGrid"){ if (obj.node==="reimbursementApplierGrid"){
canEdit = true; canEdit = true;
}else if (obj.node==="financialAuditGrid" || obj.node==="capitalPostGrid"){ }else if (obj.node==="financialAuditGrid"
//|| obj.node==="capitalPostGrid"
){
canDelay = true; canDelay = true;
} }
} }
...@@ -408,16 +413,17 @@ function loadGrid(obj) { ...@@ -408,16 +413,17 @@ function loadGrid(obj) {
if ("financeNode" === subProcUnitId){ if ("financeNode" === subProcUnitId){
if (obj.node==="financialAuditGrid"){ if (obj.node==="financialAuditGrid"){
canEdit = true; canEdit = true;
}else if (obj.node==="capitalPostGrid"){
canDelay = true;
} }
// else if (obj.node==="capitalPostGrid"){
// canDelay = true;
// }
} }
//资金岗 //资金岗
if ("fundNode" === subProcUnitId && obj.node==="capitalPostGrid"){ // if ("fundNode" === subProcUnitId && obj.node==="capitalPostGrid"){
canEdit = true; // canEdit = true;
} // }
if(obj.node==="reimbursementApplierGrid") {//只有第一个表格含工具栏 if(obj.node==="reimbursementApplierGrid" && isApply) {//只有第一个表格含工具栏
toolbarOptions = UICtrl.getDefaultToolbarOptions({ toolbarOptions = UICtrl.getDefaultToolbarOptions({
addHandler: function () { addHandler: function () {
tableArray.forEach((item) => { tableArray.forEach((item) => {
...@@ -425,8 +431,18 @@ function loadGrid(obj) { ...@@ -425,8 +431,18 @@ function loadGrid(obj) {
}); });
}, },
deleteHandler: function () { deleteHandler: function () {
tableArray.forEach((item) => { // tableArray.forEach((item) => {
item.gridManager.deleteSelectedRow(); //
// });
var _grid = UICtrl.getGridManager('#reimbursementApplierGrid');
DataUtil.delSelectedRows({
action: 'sapCostReimbursement/deleteSapCostReimbursementDetails.ajax',
param: {},
gridManager: _grid,
idFieldName: 'reimbursementDetailId',
onSuccess: function () {
reloadGrid();
}
}); });
} }
}); });
...@@ -518,11 +534,11 @@ $(document).ready(function () { ...@@ -518,11 +534,11 @@ $(document).ready(function () {
function initialize() { function initialize() {
//获取数据源初始化表格 //获取数据源初始化表格
Public.ajax(web_app.name + '/sapCostReimbursement/slicedSapCostReimbursementDetailList.ajax', {id: getId()}, function (data) { Public.ajax(web_app.name + '/sapCostReimbursement/slicedSapCostReimbursementDetailList.ajax', {reimbursementBaseInfoId: getId()}, function (data) {
//根据定义列拆除实体对象,封装成每个table对应的数据集 //根据定义列拆除实体对象,封装成每个table对应的数据集
tableArray.forEach(obj => { tableArray.forEach(obj => {
obj.data = { obj.data = {
Rows: data.map(item => { Rows: data.Rows.map(item => {
let row = {}; let row = {};
obj.columns.forEach(col => { obj.columns.forEach(col => {
if (item.hasOwnProperty(col.name)) { if (item.hasOwnProperty(col.name)) {
...@@ -548,6 +564,17 @@ function bindQueryEvent() { ...@@ -548,6 +564,17 @@ function bindQueryEvent() {
$('#butxt').val(data.BUTXT); $('#butxt').val(data.BUTXT);
} }
}); });
$('#bankn1').searchbox({
type: "system", name: "getCompanyAndBankInfos",
getParam: function (item) {
return {BUKRS: $("#bukrs").val()}
},
onChange: function (value, data) {
$('#bankn1').val(data.BANKN1);
$('#zt012kText1').val(data.TEXT1);
}
});
} }
...@@ -568,9 +595,6 @@ function getId() { ...@@ -568,9 +595,6 @@ function getId() {
} }
function getExtendedData(processAction) { function getExtendedData(processAction) {
tableArray.forEach((item) => {
console.log(item)
});
//回退、打回、转交时,不需要验证必填项是否已经填写; //回退、打回、转交时,不需要验证必填项是否已经填写;
if (processAction == ProcessAction.BACK if (processAction == ProcessAction.BACK
...@@ -641,6 +665,11 @@ function businessJudgmentUnit() { ...@@ -641,6 +665,11 @@ function businessJudgmentUnit() {
}else { }else {
UICtrl.setDisable($("#submitForm")); UICtrl.setDisable($("#submitForm"));
} }
//资金岗
if ("fundNode" === getSubProcUnitId()){
UICtrl.enable("#bankn1");
UICtrl.enable("#zepTxt1");
}
return true; return true;
} }
...@@ -714,3 +743,26 @@ function totalFinancialAuditGrid(data){ ...@@ -714,3 +743,26 @@ function totalFinancialAuditGrid(data){
$('#zepPtamount1').val(zepPtamount1); $('#zepPtamount1').val(zepPtamount1);
}); });
} }
function reloadGrid(){
//获取数据源初始化表格
Public.ajax(web_app.name + '/sapCostReimbursement/slicedSapCostReimbursementDetailList.ajax', {reimbursementBaseInfoId: getId()}, function (data) {
//根据定义列拆除实体对象,封装成每个table对应的数据集
tableArray.forEach(obj => {
obj.data = {
Rows: data.Rows.map(item => {
let row = {};
obj.columns.forEach(col => {
if (item.hasOwnProperty(col.name)) {
row[col.name] = item[col.name];
}
});
return row;
})
};
var gridManager = UICtrl.getGridManager("#"+obj.node);
gridManager.setData(obj.data);
Public.successTip("数据操作成功")
});
})
}
\ No newline at end of file
...@@ -43,6 +43,13 @@ ...@@ -43,6 +43,13 @@
<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"/>
</div> </div>
<div id="capitalPost">
<div class="hg-form-row">
<x:inputC name="bankn1" required="false" label="付款银行账号" labelCol="2" fieldCol="2" wrapper="select"/>
<x:inputC name="zt012kText1" required="false" readonly="true" label="付款银行账号名称" labelCol="2" fieldCol="2"/>
<x:inputC name="zepTxt1" required="false" label="付款附言" labelCol="2" fieldCol="2"/>
</div>
</div>
<div class="hg-form-row"> <div class="hg-form-row">
<x:inputC name="zepAppliname" required="false" readonly="true" label="EP流程申请人" labelCol="2" fieldCol="2"/> <x:inputC name="zepAppliname" required="false" readonly="true" label="EP流程申请人" labelCol="2" fieldCol="2"/>
<x:inputC name="zepTxt" required="false" label="付款申请内容" labelCol="2" fieldCol="2"/> <x:inputC name="zepTxt" required="false" label="付款申请内容" labelCol="2" fieldCol="2"/>
...@@ -75,11 +82,11 @@ ...@@ -75,11 +82,11 @@
</div> </div>
</div> </div>
<div class="blank_div clearfix"></div> <div class="blank_div clearfix"></div>
<div id="capitalPost"> <%-- <div id="capitalPost">--%>
<x:title title="资金岗填写" name="group"/> <%-- <x:title title="资金岗填写" name="group"/>--%>
<div id="capitalPostGrid" style="margin: 2px;"> <%-- <div id="capitalPostGrid" style="margin: 2px;">--%>
</div> <%-- </div>--%>
</div> <%-- </div>--%>
<div class="blank_div clearfix"></div> <div class="blank_div clearfix"></div>
<div id="paymentAccomplish_sapReturn"> <div id="paymentAccomplish_sapReturn">
<x:title title="付款完成、sap回执" name="group"/> <x:title title="付款完成、sap回执" name="group"/>
......
...@@ -42,6 +42,14 @@ ...@@ -42,6 +42,14 @@
<div class="hg-form-row"> <div class="hg-form-row">
<x:inputC name="zepAppliname" required="false" readonly="true" label="EP流程申请人" labelCol="2" fieldCol="2"/> <x:inputC name="zepAppliname" required="false" readonly="true" label="EP流程申请人" labelCol="2" fieldCol="2"/>
<x:inputC name="zepTxt" required="false" label="付款申请内容" labelCol="2" fieldCol="2"/> <x:inputC name="zepTxt" required="false" label="付款申请内容" labelCol="2" fieldCol="2"/>
<x:inputC name="employeeLoanBillCode" required="false" label="员工借款编号" labelCol="2" fieldCol="2" wrapper="select"/>
</div>
<div id="capitalPost">
<div class="hg-form-row">
<x:inputC name="bankn1" required="false" label="付款银行账号" labelCol="2" fieldCol="2" wrapper="select"/>
<x:inputC name="zt012kText1" required="false" readonly="true" label="付款银行账号名称" labelCol="2" fieldCol="2"/>
<x:inputC name="zepTxt1" required="false" label="付款附言" labelCol="2" fieldCol="2"/>
</div>
</div> </div>
<div class="hg-form-row"> <div class="hg-form-row">
<x:inputC name="zepFtamount" required="false" readonly="true" label="申请总金额(本位币)" labelCol="2" fieldCol="2" mask="positiveMoney"/> <x:inputC name="zepFtamount" required="false" readonly="true" label="申请总金额(本位币)" labelCol="2" fieldCol="2" mask="positiveMoney"/>
...@@ -83,11 +91,11 @@ ...@@ -83,11 +91,11 @@
</div> </div>
</div> </div>
<div class="blank_div clearfix"></div> <div class="blank_div clearfix"></div>
<div id="capitalPost"> <%-- <div id="capitalPost">--%>
<x:title title="资金岗填写" name="group"/> <%-- <x:title title="资金岗填写" name="group"/>--%>
<div id="capitalPostGrid" style="margin: 2px;"> <%-- <div id="capitalPostGrid" style="margin: 2px;">--%>
</div> <%-- </div>--%>
</div> <%-- </div>--%>
<div class="blank_div clearfix"></div> <div class="blank_div clearfix"></div>
<div id="paymentAccomplish_sapReturn"> <div id="paymentAccomplish_sapReturn">
<x:title title="付款完成、sap回执" name="group"/> <x:title title="付款完成、sap回执" name="group"/>
......
...@@ -38,6 +38,8 @@ function loadGrid() { ...@@ -38,6 +38,8 @@ function loadGrid() {
pageSize: 20, pageSize: 20,
usePager: true, usePager: true,
toolbar: toolbarOptions, toolbar: toolbarOptions,
sortName:'fillinDate',
sortOrder: 'desc',
width: "100%", width: "100%",
height: "100%", height: "100%",
heightDiff: -8, heightDiff: -8,
......
...@@ -5,6 +5,8 @@ var tableArray = [ ...@@ -5,6 +5,8 @@ var tableArray = [
gridManager: null, gridManager: null,
data: null, data: null,
columns: [ columns: [
{display: "", name: "reimbursementDetailId", width: 80, minwidth: 80, type: "string", align: "left", hide: true},
{display: "", name: "reimbursementBaseInfoId", width: 80, minwidth: 80, type: "string", align: "left", hide: true},
{display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"}, {display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"},
{ {
display: "计划内外付款标识", name: "zepPlan", width: 120, minwidth: 120, type: "string", align: "left", display: "计划内外付款标识", name: "zepPlan", width: 120, minwidth: 120, type: "string", align: "left",
...@@ -189,12 +191,14 @@ var tableArray = [ ...@@ -189,12 +191,14 @@ var tableArray = [
} }
}, },
] ]
}, { },
{
parms: {}, parms: {},
node: "financialAuditGrid", node: "financialAuditGrid",
gridManager: null, gridManager: null,
data: null, data: null,
columns: [ columns: [
{display: "", name: "rstgr", width: 80, minwidth: 80, type: "string", align: "left", hide: true},
{display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"}, {display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"},
{ {
display: "原因代码", name: "rstgrName", width: 120, minwidth: 120, type: "string", align: "left", display: "原因代码", name: "rstgrName", width: 120, minwidth: 120, type: "string", align: "left",
...@@ -303,50 +307,51 @@ var tableArray = [ ...@@ -303,50 +307,51 @@ var tableArray = [
} }
}, },
] ]
}, {
parms: {},
node: "capitalPostGrid",
gridManager: null,
data: null,
columns: [
{display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"},
{
display: "付款银行账号", name: "bankn1", width: 200, minwidth: 120, type: "string", align: "left",
editor: {
required: false, type: "select",
data: {
type: 'system',
name: "getCompanyAndBankInfos",
getParam: function (item) {
return {
BUKRS: $("#bukrs").val()
}
},
back: {
BANKN1: "bankn1",
TEXT1: "zt012kText1",
}
},
}
},
{
display: "付款银行账号名称",
name: "zt012kText1",
width: 200,
minwidth: 120,
type: "string",
align: "left",
}, },
// {
// parms: {},
// node: "capitalPostGrid",
// gridManager: null,
// data: null,
// columns: [
// {display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"},
// {
// display: "付款银行账号", name: "bankn1", width: 200, minwidth: 120, type: "string", align: "left",
// editor: {
// required: false, type: "select",
// data: {
// type: 'system',
// name: "getCompanyAndBankInfos",
// getParam: function (item) {
// return {
// BUKRS: $("#bukrs").val()
// }
// },
// back: {
// BANKN1: "bankn1",
// TEXT1: "zt012kText1",
// }
// },
// }
// },
// {
// display: "付款银行账号名称",
// name: "zt012kText1",
// width: 200,
// minwidth: 120,
// type: "string",
// align: "left",
// },
// {
// display: "付款附言", name: "zepTxt1", width: 120, minwidth: 120, type: "string", align: "left",
// editor: {
//
// type: 'text'
// }
// },
// ]
// }
{ {
display: "付款附言", name: "zepTxt1", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
}
},
]
}
, {
parms: {}, parms: {},
node: "financialAudit_sapReturnGrid", node: "financialAudit_sapReturnGrid",
gridManager: null, gridManager: null,
...@@ -385,25 +390,27 @@ function loadGrid(obj) { ...@@ -385,25 +390,27 @@ function loadGrid(obj) {
if (isApply){ if (isApply){
if (obj.node==="reimbursementApplierGrid" || obj.node === "financialAuditGrid"){ if (obj.node==="reimbursementApplierGrid" || obj.node === "financialAuditGrid"){
canEdit = true; canEdit = true;
}else if (obj.node==="capitalPostGrid"){
canDelay = true;
} }
// else if (obj.node==="capitalPostGrid"){
// canDelay = true;
// }
} }
var subProcUnitId = getSubProcUnitId(); var subProcUnitId = getSubProcUnitId();
//财务审核 //财务审核
if ("financeNode" === subProcUnitId){ if ("financeNode" === subProcUnitId){
if (obj.node==="financialAuditGrid"){ if (obj.node==="financialAuditGrid"){
canEdit = false; canEdit = false;
}else if (obj.node==="capitalPostGrid"){
canDelay = true;
} }
// else if (obj.node==="capitalPostGrid"){
// canDelay = true;
// }
} }
//资金岗 //资金岗
if ("fundNode" === subProcUnitId && obj.node==="capitalPostGrid"){ // if ("fundNode" === subProcUnitId && obj.node==="capitalPostGrid"){
canEdit = true; // canEdit = true;
} // }
if(obj.node==="reimbursementApplierGrid" || obj.no === "financialAuditGrid") {//只有第一个表格含工具栏 if((obj.node==="reimbursementApplierGrid" || obj.no === "financialAuditGrid") && isApply) {//只有第一个表格含工具栏
toolbarOptions = UICtrl.getDefaultToolbarOptions({ toolbarOptions = UICtrl.getDefaultToolbarOptions({
addHandler: function () { addHandler: function () {
tableArray.forEach((item) => { tableArray.forEach((item) => {
...@@ -411,8 +418,18 @@ function loadGrid(obj) { ...@@ -411,8 +418,18 @@ function loadGrid(obj) {
}); });
}, },
deleteHandler: function () { deleteHandler: function () {
tableArray.forEach((item) => { // tableArray.forEach((item) => {
item.gridManager.deleteSelectedRow(); // item.gridManager.deleteSelectedRow();
// });
var _grid = UICtrl.getGridManager('#reimbursementApplierGrid');
DataUtil.delSelectedRows({
action: 'sapCostReimbursement/deleteSapCostReimbursementDetails.ajax',
param: {},
gridManager: _grid,
idFieldName: 'reimbursementDetailId',
onSuccess: function () {
reloadGrid();
}
}); });
} }
}); });
...@@ -491,11 +508,11 @@ $(document).ready(function () { ...@@ -491,11 +508,11 @@ $(document).ready(function () {
function initialize() { function initialize() {
//获取数据源初始化表格 //获取数据源初始化表格
Public.ajax(web_app.name + '/sapCostReimbursement/slicedSapCostReimbursementDetailList.ajax', {id: getId()}, function (data) { Public.ajax(web_app.name + '/sapCostReimbursement/slicedSapCostReimbursementDetailList.ajax', {reimbursementBaseInfoId: getId()}, function (data) {
//根据定义列拆除实体对象,封装成每个table对应的数据集 //根据定义列拆除实体对象,封装成每个table对应的数据集
tableArray.forEach(obj => { tableArray.forEach(obj => {
obj.data = { obj.data = {
Rows: data.map(item => { Rows: data.Rows.map(item => {
let row = {}; let row = {};
obj.columns.forEach(col => { obj.columns.forEach(col => {
if (item.hasOwnProperty(col.name)) { if (item.hasOwnProperty(col.name)) {
...@@ -521,6 +538,17 @@ function bindQueryEvent() { ...@@ -521,6 +538,17 @@ function bindQueryEvent() {
$('#butxt').val(data.BUTXT); $('#butxt').val(data.BUTXT);
} }
}); });
$('#bankn1').searchbox({
type: "system", name: "getCompanyAndBankInfos",
getParam: function (item) {
return {BUKRS: $("#bukrs").val()}
},
onChange: function (value, data) {
$('#bankn1').val(data.BANKN1);
$('#zt012kText1').val(data.TEXT1);
}
});
} }
...@@ -541,9 +569,6 @@ function getId() { ...@@ -541,9 +569,6 @@ function getId() {
} }
function getExtendedData(processAction) { function getExtendedData(processAction) {
tableArray.forEach((item) => {
console.log(item)
});
//回退、打回、转交时,不需要验证必填项是否已经填写; //回退、打回、转交时,不需要验证必填项是否已经填写;
if (processAction == ProcessAction.BACK if (processAction == ProcessAction.BACK
...@@ -613,6 +638,11 @@ function businessJudgmentUnit() { ...@@ -613,6 +638,11 @@ function businessJudgmentUnit() {
}else { }else {
UICtrl.setDisable($("#submitForm")); UICtrl.setDisable($("#submitForm"));
} }
//资金岗
if ("fundNode" === getSubProcUnitId()){
UICtrl.enable("#bankn1");
UICtrl.enable("#zepTxt1");
}
return true; return true;
} }
...@@ -666,3 +696,26 @@ function totalGrid(money) { ...@@ -666,3 +696,26 @@ function totalGrid(money) {
} }
} }
function reloadGrid(){
//获取数据源初始化表格
Public.ajax(web_app.name + '/sapCostReimbursement/slicedSapCostReimbursementDetailList.ajax', {reimbursementBaseInfoId: getId()}, function (data) {
//根据定义列拆除实体对象,封装成每个table对应的数据集
tableArray.forEach(obj => {
obj.data = {
Rows: data.Rows.map(item => {
let row = {};
obj.columns.forEach(col => {
if (item.hasOwnProperty(col.name)) {
row[col.name] = item[col.name];
}
});
return row;
})
};
var gridManager = UICtrl.getGridManager("#"+obj.node);
gridManager.setData(obj.data);
Public.successTip("数据操作成功")
});
})
}
...@@ -40,6 +40,13 @@ ...@@ -40,6 +40,13 @@
<x:inputC name="zepAppliname" required="false" readonly="true" label="EP流程申请人" labelCol="2" fieldCol="2"/> <x:inputC name="zepAppliname" required="false" readonly="true" label="EP流程申请人" labelCol="2" fieldCol="2"/>
<x:inputC name="zepTxt" required="false" label="付款申请内容" labelCol="2" fieldCol="6"/> <x:inputC name="zepTxt" required="false" label="付款申请内容" labelCol="2" fieldCol="6"/>
</div> </div>
<div id="capitalPost">
<div class="hg-form-row">
<x:inputC name="bankn1" required="false" label="付款银行账号" labelCol="2" fieldCol="2" wrapper="select"/>
<x:inputC name="zt012kText1" required="false" readonly="true" label="付款银行账号名称" labelCol="2" fieldCol="2"/>
<x:inputC name="zepTxt1" required="false" label="付款附言" labelCol="2" fieldCol="2"/>
</div>
</div>
<div class="hg-form-row"> <div class="hg-form-row">
<x:inputC name="zepFtamount" required="false" readonly="true" label="申请总金额(本位币)" labelCol="2" fieldCol="2" mask="positiveMoney"/> <x:inputC name="zepFtamount" required="false" readonly="true" label="申请总金额(本位币)" labelCol="2" fieldCol="2" mask="positiveMoney"/>
<x:inputC name="zepFtamount1" required="false" readonly="true" label="申请总金额" labelCol="2" fieldCol="2" mask="positiveMoney"/> <x:inputC name="zepFtamount1" required="false" readonly="true" label="申请总金额" labelCol="2" fieldCol="2" mask="positiveMoney"/>
...@@ -65,11 +72,11 @@ ...@@ -65,11 +72,11 @@
</div> </div>
</div> </div>
<div class="blank_div clearfix"></div> <div class="blank_div clearfix"></div>
<div id="capitalPost"> <%-- <div id="capitalPost">--%>
<x:title title="资金岗填写" name="group"/> <%-- <x:title title="资金岗填写" name="group"/>--%>
<div id="capitalPostGrid" style="margin: 2px;"> <%-- <div id="capitalPostGrid" style="margin: 2px;">--%>
</div> <%-- </div>--%>
</div> <%-- </div>--%>
<div class="blank_div clearfix"></div> <div class="blank_div clearfix"></div>
<div id="paymentAccomplish_sapReturn"> <div id="paymentAccomplish_sapReturn">
<x:title title="付款完成、sap回执" name="group"/> <x:title title="付款完成、sap回执" name="group"/>
......
...@@ -5,6 +5,9 @@ var tableArray = [ ...@@ -5,6 +5,9 @@ var tableArray = [
gridManager: null, gridManager: null,
data: null, data: null,
columns: [ columns: [
{display: "", name: "reimbursementDetailId", width: 80, minwidth: 80, type: "string", align: "left", hide: true},
{display: "", name: "reimbursementBaseInfoId", width: 80, minwidth: 80, type: "string", align: "left", hide: true},
{display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"}, {display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"},
{ {
display: "计划内外付款标识", name: "zepPlan", width: 120, minwidth: 120, type: "string", align: "left", display: "计划内外付款标识", name: "zepPlan", width: 120, minwidth: 120, type: "string", align: "left",
...@@ -189,12 +192,14 @@ var tableArray = [ ...@@ -189,12 +192,14 @@ var tableArray = [
} }
} }
] ]
}, { },
{
parms: {}, parms: {},
node: "financialAuditGrid", node: "financialAuditGrid",
gridManager: null, gridManager: null,
data: null, data: null,
columns: [ columns: [
{display: "", name: "rstgr", width: 80, minwidth: 80, type: "string", align: "left", hide: true},
{display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"}, {display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"},
{ {
display: "原因代码", name: "rstgrName", width: 120, minwidth: 120, type: "string", align: "left", display: "原因代码", name: "rstgrName", width: 120, minwidth: 120, type: "string", align: "left",
...@@ -285,54 +290,55 @@ var tableArray = [ ...@@ -285,54 +290,55 @@ var tableArray = [
} }
} }
] ]
}, {
parms: {},
node: "capitalPostGrid",
gridManager: null,
data: null,
columns: [
{display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"},
{
display: "付款银行账号", name: "bankn1", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
required: false, type: "select",
data: {
type: 'system',
name: "getCompanyAndBankInfos",
getParam: function (item) {
return {
BUKRS: $("#bukrs").val()
}
},
back: {
BANKN1: "bankn1",
TEXT1: "zt012kText1",
}
},
}
},
{
display: "付款银行账号名称",
name: "zt012kText1",
width: 120,
minwidth: 120,
type: "string",
align: "left",
editor: {
type: 'text'
}
}, },
// {
// parms: {},
// node: "capitalPostGrid",
// gridManager: null,
// data: null,
// columns: [
// {display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"},
// {
// display: "付款银行账号", name: "bankn1", width: 120, minwidth: 120, type: "string", align: "left",
// editor: {
// required: false, type: "select",
// data: {
// type: 'system',
// name: "getCompanyAndBankInfos",
// getParam: function (item) {
// return {
// BUKRS: $("#bukrs").val()
// }
// },
// back: {
// BANKN1: "bankn1",
// TEXT1: "zt012kText1",
// }
// },
// }
// },
// {
// display: "付款银行账号名称",
// name: "zt012kText1",
// width: 120,
// minwidth: 120,
// type: "string",
// align: "left",
// editor: {
//
// type: 'text'
// }
// },
// {
// display: "付款附言", name: "zepTxt1", width: 120, minwidth: 120, type: "string", align: "left",
// editor: {
//
// type: 'text'
// }
// },
// ]
// }
{ {
display: "付款附言", name: "zepTxt1", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
}
},
]
}
, {
parms: {}, parms: {},
node: "financialAudit_sapReturnGrid", node: "financialAudit_sapReturnGrid",
gridManager: null, gridManager: null,
...@@ -370,7 +376,9 @@ function loadGrid(obj) { ...@@ -370,7 +376,9 @@ function loadGrid(obj) {
if (isApply){ if (isApply){
if (obj.node==="reimbursementApplierGrid"){ if (obj.node==="reimbursementApplierGrid"){
canEdit = true; canEdit = true;
}else if (obj.node==="financialAuditGrid" || obj.node==="capitalPostGrid"){ }else if (obj.node==="financialAuditGrid"
//|| obj.node==="capitalPostGrid"
){
canDelay = true; canDelay = true;
} }
} }
...@@ -379,16 +387,17 @@ function loadGrid(obj) { ...@@ -379,16 +387,17 @@ function loadGrid(obj) {
if ("financeNode" === subProcUnitId){ if ("financeNode" === subProcUnitId){
if (obj.node==="financialAuditGrid"){ if (obj.node==="financialAuditGrid"){
canEdit = true; canEdit = true;
}else if (obj.node==="capitalPostGrid"){
canDelay = true;
} }
// else if (obj.node==="capitalPostGrid"){
// canDelay = true;
// }
} }
//资金岗 //资金岗
if ("fundNode" === subProcUnitId && obj.node==="capitalPostGrid"){ // if ("fundNode" === subProcUnitId && obj.node==="capitalPostGrid"){
canEdit = true; // canEdit = true;
} // }
if(obj.node==="reimbursementApplierGrid") {//只有第一个表格含工具栏 if(obj.node==="reimbursementApplierGrid" && isApply) {//只有第一个表格含工具栏
toolbarOptions = UICtrl.getDefaultToolbarOptions({ toolbarOptions = UICtrl.getDefaultToolbarOptions({
addHandler: function () { addHandler: function () {
tableArray.forEach((item) => { tableArray.forEach((item) => {
...@@ -396,8 +405,18 @@ function loadGrid(obj) { ...@@ -396,8 +405,18 @@ function loadGrid(obj) {
}); });
}, },
deleteHandler: function () { deleteHandler: function () {
tableArray.forEach((item) => { // tableArray.forEach((item) => {
item.gridManager.deleteSelectedRow(); // item.gridManager.deleteSelectedRow();
// });
var _grid = UICtrl.getGridManager('#reimbursementApplierGrid');
DataUtil.delSelectedRows({
action: 'sapCostReimbursement/deleteSapCostReimbursementDetails.ajax',
param: {},
gridManager: _grid,
idFieldName: 'reimbursementDetailId',
onSuccess: function () {
reloadGrid();
}
}); });
} }
}); });
...@@ -507,11 +526,11 @@ $(document).ready(function () { ...@@ -507,11 +526,11 @@ $(document).ready(function () {
function initialize() { function initialize() {
//获取数据源初始化表格 //获取数据源初始化表格
Public.ajax(web_app.name + '/sapCostReimbursement/slicedSapCostReimbursementDetailList.ajax', {id: getId()}, function (data) { Public.ajax(web_app.name + '/sapCostReimbursement/slicedSapCostReimbursementDetailList.ajax', {reimbursementBaseInfoId: getId()}, function (data) {
//根据定义列拆除实体对象,封装成每个table对应的数据集 //根据定义列拆除实体对象,封装成每个table对应的数据集
tableArray.forEach(obj => { tableArray.forEach(obj => {
obj.data = { obj.data = {
Rows: data.map(item => { Rows: data.Rows.map(item => {
let row = {}; let row = {};
obj.columns.forEach(col => { obj.columns.forEach(col => {
if (item.hasOwnProperty(col.name)) { if (item.hasOwnProperty(col.name)) {
...@@ -542,6 +561,17 @@ function bindQueryEvent() { ...@@ -542,6 +561,17 @@ function bindQueryEvent() {
$('#butxt').val(data.BUTXT); $('#butxt').val(data.BUTXT);
} }
}); });
$('#bankn1').searchbox({
type: "system", name: "getCompanyAndBankInfos",
getParam: function (item) {
return {BUKRS: $("#bukrs").val()}
},
onChange: function (value, data) {
$('#bankn1').val(data.BANKN1);
$('#zt012kText1').val(data.TEXT1);
}
});
} }
/** /**
...@@ -561,9 +591,6 @@ function getId() { ...@@ -561,9 +591,6 @@ function getId() {
} }
function getExtendedData(processAction) { function getExtendedData(processAction) {
tableArray.forEach((item) => {
console.log(item)
});
//回退、打回、转交时,不需要验证必填项是否已经填写; //回退、打回、转交时,不需要验证必填项是否已经填写;
if (processAction == ProcessAction.BACK if (processAction == ProcessAction.BACK
|| processAction == ProcessAction.REPLENISH || processAction == ProcessAction.REPLENISH
...@@ -632,6 +659,11 @@ function businessJudgmentUnit() { ...@@ -632,6 +659,11 @@ function businessJudgmentUnit() {
}else { }else {
UICtrl.setDisable($("#submitForm")); UICtrl.setDisable($("#submitForm"));
} }
//资金岗
if ("fundNode" === getSubProcUnitId()){
UICtrl.enable("#bankn1");
UICtrl.enable("#zepTxt1");
}
return true; return true;
} }
...@@ -705,3 +737,26 @@ function totalFinancialAuditGrid(data){ ...@@ -705,3 +737,26 @@ function totalFinancialAuditGrid(data){
$('#zepPtamount1').val(zepPtamount1); $('#zepPtamount1').val(zepPtamount1);
}); });
} }
function reloadGrid(){
//获取数据源初始化表格
Public.ajax(web_app.name + '/sapCostReimbursement/slicedSapCostReimbursementDetailList.ajax', {reimbursementBaseInfoId: getId()}, function (data) {
//根据定义列拆除实体对象,封装成每个table对应的数据集
tableArray.forEach(obj => {
obj.data = {
Rows: data.Rows.map(item => {
let row = {};
obj.columns.forEach(col => {
if (item.hasOwnProperty(col.name)) {
row[col.name] = item[col.name];
}
});
return row;
})
};
var gridManager = UICtrl.getGridManager("#"+obj.node);
gridManager.setData(obj.data);
Public.successTip("数据操作成功")
});
})
}
\ No newline at end of file
...@@ -45,6 +45,13 @@ ...@@ -45,6 +45,13 @@
<x:inputC name="zepFcrdate" wrapper="date" readonly="true" required="false" label="付款申请创建日期" labelCol="2" fieldCol="2"/> <x:inputC name="zepFcrdate" wrapper="date" readonly="true" required="false" label="付款申请创建日期" labelCol="2" fieldCol="2"/>
<x:inputC name="zepTxt" required="false" label="付款申请内容" labelCol="2" fieldCol="2"/> <x:inputC name="zepTxt" required="false" label="付款申请内容" labelCol="2" fieldCol="2"/>
</div> </div>
<div id="capitalPost">
<div class="hg-form-row">
<x:inputC name="bankn1" required="false" label="付款银行账号" labelCol="2" fieldCol="2" wrapper="select"/>
<x:inputC name="zt012kText1" required="false" readonly="true" label="付款银行账号名称" labelCol="2" fieldCol="2"/>
<x:inputC name="zepTxt1" required="false" label="付款附言" labelCol="2" fieldCol="2"/>
</div>
</div>
<div class="hg-form-row"> <div class="hg-form-row">
<x:inputC name="zepFtamount" required="false" readonly="true" label="申请总金额(本位币)" labelCol="2" fieldCol="2" mask="positiveMoney"/> <x:inputC name="zepFtamount" required="false" readonly="true" label="申请总金额(本位币)" labelCol="2" fieldCol="2" mask="positiveMoney"/>
<x:inputC name="zepFtamount1" required="false" readonly="true" label="申请总金额" labelCol="2" fieldCol="2" mask="positiveMoney"/> <x:inputC name="zepFtamount1" required="false" readonly="true" label="申请总金额" labelCol="2" fieldCol="2" mask="positiveMoney"/>
...@@ -72,11 +79,11 @@ ...@@ -72,11 +79,11 @@
</div> </div>
</div> </div>
<div class="blank_div clearfix"></div> <div class="blank_div clearfix"></div>
<div id="capitalPost"> <%-- <div id="capitalPost">--%>
<x:title title="资金岗填写" name="group"/> <%-- <x:title title="资金岗填写" name="group"/>--%>
<div id="capitalPostGrid" style="margin: 2px;"> <%-- <div id="capitalPostGrid" style="margin: 2px;">--%>
</div> <%-- </div>--%>
</div> <%-- </div>--%>
<div class="blank_div clearfix"></div> <div class="blank_div clearfix"></div>
<div id="paymentAccomplish_sapReturn"> <div id="paymentAccomplish_sapReturn">
<x:title title="付款完成、sap回执" name="group"/> <x:title title="付款完成、sap回执" name="group"/>
......
...@@ -5,6 +5,9 @@ var tableArray = [ ...@@ -5,6 +5,9 @@ var tableArray = [
gridManager: null, gridManager: null,
data: null, data: null,
columns: [ columns: [
{display: "", name: "reimbursementDetailId", width: 80, minwidth: 80, type: "string", align: "left", hide: true},
{display: "", name: "reimbursementBaseInfoId", width: 80, minwidth: 80, type: "string", align: "left", hide: true},
{display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"}, {display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"},
{ {
display: "计划内外付款标识", name: "zepPlan", width: 120, minwidth: 120, type: "string", align: "left", display: "计划内外付款标识", name: "zepPlan", width: 120, minwidth: 120, type: "string", align: "left",
...@@ -136,12 +139,14 @@ var tableArray = [ ...@@ -136,12 +139,14 @@ var tableArray = [
} }
}, },
] ]
}, { },
{
parms: {}, parms: {},
node: "financialAuditGrid", node: "financialAuditGrid",
gridManager: null, gridManager: null,
data: null, data: null,
columns: [ columns: [
{display: "", name: "rstgr", width: 80, minwidth: 80, type: "string", align: "left", hide: true},
{display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"}, {display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"},
{ {
display: "原因代码", name: "rstgrName", width: 120, minwidth: 120, type: "string", align: "left", display: "原因代码", name: "rstgrName", width: 120, minwidth: 120, type: "string", align: "left",
...@@ -232,54 +237,55 @@ var tableArray = [ ...@@ -232,54 +237,55 @@ var tableArray = [
} }
}, },
] ]
}, {
parms: {},
node: "capitalPostGrid",
gridManager: null,
data: null,
columns: [
{display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"},
{
display: "付款银行账号", name: "bankn1", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
required: false, type: "select",
data: {
type: 'system',
name: "getCompanyAndBankInfos",
getParam: function (item) {
return {
BUKRS: $("#bukrs").val()
}
},
back: {
BANKN1: "bankn1",
TEXT1: "zt012kText1",
}
},
}
},
{
display: "付款银行账号名称",
name: "zt012kText1",
width: 120,
minwidth: 120,
type: "string",
align: "left",
editor: {
type: 'text'
}
}, },
// {
// parms: {},
// node: "capitalPostGrid",
// gridManager: null,
// data: null,
// columns: [
// {display: "EP流程子序号", name: "zepItemno", width: 80, minwidth: 80, type: "string", align: "left"},
// {
// display: "付款银行账号", name: "bankn1", width: 120, minwidth: 120, type: "string", align: "left",
// editor: {
// required: false, type: "select",
// data: {
// type: 'system',
// name: "getCompanyAndBankInfos",
// getParam: function (item) {
// return {
// BUKRS: $("#bukrs").val()
// }
// },
// back: {
// BANKN1: "bankn1",
// TEXT1: "zt012kText1",
// }
// },
// }
// },
// {
// display: "付款银行账号名称",
// name: "zt012kText1",
// width: 120,
// minwidth: 120,
// type: "string",
// align: "left",
// editor: {
//
// type: 'text'
// }
// },
// {
// display: "付款附言", name: "zepTxt1", width: 120, minwidth: 120, type: "string", align: "left",
// editor: {
//
// type: 'text'
// }
// },
// ]
// }
{ {
display: "付款附言", name: "zepTxt1", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
}
},
]
}
, {
parms: {}, parms: {},
node: "financialAudit_sapReturnGrid", node: "financialAudit_sapReturnGrid",
gridManager: null, gridManager: null,
...@@ -317,7 +323,9 @@ function loadGrid(obj) { ...@@ -317,7 +323,9 @@ function loadGrid(obj) {
if (isApply){ if (isApply){
if (obj.node==="reimbursementApplierGrid"){ if (obj.node==="reimbursementApplierGrid"){
canEdit = true; canEdit = true;
}else if (obj.node==="financialAuditGrid" || obj.node==="capitalPostGrid"){ }else if (obj.node==="financialAuditGrid"
//|| obj.node==="capitalPostGrid"
){
canDelay = true; canDelay = true;
} }
} }
...@@ -326,16 +334,17 @@ function loadGrid(obj) { ...@@ -326,16 +334,17 @@ function loadGrid(obj) {
if ("financeNode" === subProcUnitId){ if ("financeNode" === subProcUnitId){
if (obj.node==="financialAuditGrid"){ if (obj.node==="financialAuditGrid"){
canEdit = true; canEdit = true;
}else if (obj.node==="capitalPostGrid"){
canDelay = true;
} }
// else if (obj.node==="capitalPostGrid"){
// canDelay = true;
// }
} }
//资金岗 //资金岗
if ("fundNode" === subProcUnitId && obj.node==="capitalPostGrid"){ // if ("fundNode" === subProcUnitId && obj.node==="capitalPostGrid"){
canEdit = true; // canEdit = true;
} // }
if(obj.node==="reimbursementApplierGrid") {//只有第一个表格含工具栏 if(obj.node==="reimbursementApplierGrid" && isApply) {//只有第一个表格含工具栏
toolbarOptions = UICtrl.getDefaultToolbarOptions({ toolbarOptions = UICtrl.getDefaultToolbarOptions({
addHandler: function () { addHandler: function () {
tableArray.forEach((item) => { tableArray.forEach((item) => {
...@@ -343,8 +352,18 @@ function loadGrid(obj) { ...@@ -343,8 +352,18 @@ function loadGrid(obj) {
}); });
}, },
deleteHandler: function () { deleteHandler: function () {
tableArray.forEach((item) => { // tableArray.forEach((item) => {
item.gridManager.deleteSelectedRow(); // item.gridManager.deleteSelectedRow();
// });
var _grid = UICtrl.getGridManager('#reimbursementApplierGrid');
DataUtil.delSelectedRows({
action: 'sapCostReimbursement/deleteSapCostReimbursementDetails.ajax',
param: {},
gridManager: _grid,
idFieldName: 'reimbursementDetailId',
onSuccess: function () {
reloadGrid();
}
}); });
} }
}); });
...@@ -452,11 +471,11 @@ $(document).ready(function () { ...@@ -452,11 +471,11 @@ $(document).ready(function () {
function initialize() { function initialize() {
//获取数据源初始化表格 //获取数据源初始化表格
Public.ajax(web_app.name + '/sapCostReimbursement/slicedSapCostReimbursementDetailList.ajax', {id: getId()}, function (data) { Public.ajax(web_app.name + '/sapCostReimbursement/slicedSapCostReimbursementDetailList.ajax', {reimbursementBaseInfoId: getId()}, function (data) {
//根据定义列拆除实体对象,封装成每个table对应的数据集 //根据定义列拆除实体对象,封装成每个table对应的数据集
tableArray.forEach(obj => { tableArray.forEach(obj => {
obj.data = { obj.data = {
Rows: data.map(item => { Rows: data.Rows.map(item => {
let row = {}; let row = {};
obj.columns.forEach(col => { obj.columns.forEach(col => {
if (item.hasOwnProperty(col.name)) { if (item.hasOwnProperty(col.name)) {
...@@ -486,6 +505,17 @@ function bindQueryEvent() { ...@@ -486,6 +505,17 @@ function bindQueryEvent() {
$('#butxt').val(data.BUTXT); $('#butxt').val(data.BUTXT);
} }
}); });
$('#bankn1').searchbox({
type: "system", name: "getCompanyAndBankInfos",
getParam: function (item) {
return {BUKRS: $("#bukrs").val()}
},
onChange: function (value, data) {
$('#bankn1').val(data.BANKN1);
$('#zt012kText1').val(data.TEXT1);
}
});
} }
...@@ -506,9 +536,7 @@ function getId() { ...@@ -506,9 +536,7 @@ function getId() {
} }
function getExtendedData(processAction) { function getExtendedData(processAction) {
tableArray.forEach((item) => {
console.log(item)
});
//回退、打回、转交时,不需要验证必填项是否已经填写; //回退、打回、转交时,不需要验证必填项是否已经填写;
if (processAction == ProcessAction.BACK if (processAction == ProcessAction.BACK
|| processAction == ProcessAction.REPLENISH || processAction == ProcessAction.REPLENISH
...@@ -578,6 +606,11 @@ function businessJudgmentUnit() { ...@@ -578,6 +606,11 @@ function businessJudgmentUnit() {
}else { }else {
UICtrl.setDisable($("#submitForm")); UICtrl.setDisable($("#submitForm"));
} }
//资金岗
if ("fundNode" === getSubProcUnitId()){
UICtrl.enable("#bankn1");
UICtrl.enable("#zepTxt1");
}
return true; return true;
} }
...@@ -651,3 +684,26 @@ function totalFinancialAuditGrid(data){ ...@@ -651,3 +684,26 @@ function totalFinancialAuditGrid(data){
$('#zepPtamount1').val(zepPtamount1); $('#zepPtamount1').val(zepPtamount1);
}); });
} }
function reloadGrid(){
//获取数据源初始化表格
Public.ajax(web_app.name + '/sapCostReimbursement/slicedSapCostReimbursementDetailList.ajax', {reimbursementBaseInfoId: getId()}, function (data) {
//根据定义列拆除实体对象,封装成每个table对应的数据集
tableArray.forEach(obj => {
obj.data = {
Rows: data.Rows.map(item => {
let row = {};
obj.columns.forEach(col => {
if (item.hasOwnProperty(col.name)) {
row[col.name] = item[col.name];
}
});
return row;
})
};
var gridManager = UICtrl.getGridManager("#"+obj.node);
gridManager.setData(obj.data);
Public.successTip("数据操作成功")
});
})
}
\ No newline at end of file
...@@ -44,6 +44,13 @@ ...@@ -44,6 +44,13 @@
<x:inputC name="zepFcrdate" wrapper="date" readonly="true" required="false" label="付款申请创建日期" labelCol="2" fieldCol="2"/> <x:inputC name="zepFcrdate" wrapper="date" readonly="true" required="false" label="付款申请创建日期" labelCol="2" fieldCol="2"/>
<x:inputC name="zepTxt" required="false" label="付款申请内容" labelCol="2" fieldCol="2"/> <x:inputC name="zepTxt" required="false" label="付款申请内容" labelCol="2" fieldCol="2"/>
</div> </div>
<div id="capitalPost">
<div class="hg-form-row">
<x:inputC name="bankn1" required="false" label="付款银行账号" labelCol="2" fieldCol="2" wrapper="select"/>
<x:inputC name="zt012kText1" required="false" readonly="true" label="付款银行账号名称" labelCol="2" fieldCol="2"/>
<x:inputC name="zepTxt1" required="false" label="付款附言" labelCol="2" fieldCol="2"/>
</div>
</div>
<div class="hg-form-row"> <div class="hg-form-row">
<x:inputC name="zepFtamount" required="false" readonly="true" label="申请总金额(本位币)" labelCol="2" fieldCol="2" mask="positiveMoney"/> <x:inputC name="zepFtamount" required="false" readonly="true" label="申请总金额(本位币)" labelCol="2" fieldCol="2" mask="positiveMoney"/>
<x:inputC name="zepFtamount1" required="false" readonly="true" label="申请总金额" labelCol="2" fieldCol="2" mask="positiveMoney"/> <x:inputC name="zepFtamount1" required="false" readonly="true" label="申请总金额" labelCol="2" fieldCol="2" mask="positiveMoney"/>
...@@ -71,11 +78,11 @@ ...@@ -71,11 +78,11 @@
</div> </div>
</div> </div>
<div class="blank_div clearfix"></div> <div class="blank_div clearfix"></div>
<div id="capitalPost"> <%-- <div id="capitalPost">--%>
<x:title title="资金岗填写" name="group"/> <%-- <x:title title="资金岗填写" name="group"/>--%>
<div id="capitalPostGrid" style="margin: 2px;"> <%-- <div id="capitalPostGrid" style="margin: 2px;">--%>
</div> <%-- </div>--%>
</div> <%-- </div>--%>
<div class="blank_div clearfix"></div> <div class="blank_div clearfix"></div>
<div id="paymentAccomplish_sapReturn"> <div id="paymentAccomplish_sapReturn">
<x:title title="付款完成、sap回执" name="group"/> <x:title title="付款完成、sap回执" name="group"/>
......
package com.huigou.topsun.sap.costReimbursement.application; package com.huigou.topsun.sap.costReimbursement.application;
import com.huigou.topsun.sap.costReimbursement.domain.SapCostReimbursementDetail; import com.huigou.topsun.sap.costReimbursement.domain.SapCostReimbursementDetail;
import com.huigou.topsun.sap.costReimbursement.domain.query.SapCostReimbursementQueryRequest;
import java.util.List; import java.util.List;
import java.util.Map;
public interface SapCostReimbursementDetailApplication { public interface SapCostReimbursementDetailApplication {
// String QUERY_XML_FILE_PATH="config/topsun/sap/statsIndicators/statsIndicators.xml"; String QUERY_XML_FILE_PATH="config/topsun/sap/costReimbursement/costReimbursement.xml";
// Map<String, Object> slicedStatsIndicatorsDetailQuery(SapStatsIndicatorsDetailQueryRequest query); Map<String, Object> slicedSapCostReimbursementDetail(SapCostReimbursementQueryRequest query);
List<SapCostReimbursementDetail> getAllByCRId(String CRId); List<SapCostReimbursementDetail> getAllByCRId(String CRId);
void deleteSapCostReimbursementDetails(List<String> ids);
} }
...@@ -3,7 +3,6 @@ package com.huigou.topsun.sap.costReimbursement.application.impl; ...@@ -3,7 +3,6 @@ package com.huigou.topsun.sap.costReimbursement.application.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.huigou.data.domain.model.CommonDomainConstants; import com.huigou.data.domain.model.CommonDomainConstants;
import com.huigou.data.query.model.QueryDescriptor; import com.huigou.data.query.model.QueryDescriptor;
...@@ -67,18 +66,19 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S ...@@ -67,18 +66,19 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
sapCostReimbursement = costReimbursementRepository.save(sapCostReimbursement); sapCostReimbursement = costReimbursementRepository.save(sapCostReimbursement);
String CRDetailJSON = sdo.getString("CRDetail"); // String CRDetailJSON = sdo.getString("CRDetail");
ObjectMapper objectMapper = new ObjectMapper(); // ObjectMapper objectMapper = new ObjectMapper();
List<SapCostReimbursementDetail> CRDetailAll = costReimbursementDetailRepository.findAllByReimbursementBaseInfoId(sapCostReimbursement.getId()); // List<SapCostReimbursementDetail> CRDetailAll = costReimbursementDetailRepository.findAllByReimbursementBaseInfoId(sapCostReimbursement.getId());
if (!CRDetailAll.isEmpty()) { // if (!CRDetailAll.isEmpty()) {
costReimbursementDetailRepository.delete(CRDetailAll); // costReimbursementDetailRepository.delete(CRDetailAll);
} // }
List<SapCostReimbursementDetail> CRDetailList = objectMapper.readValue(CRDetailJSON, new TypeReference<List<SapCostReimbursementDetail>>() { // List<SapCostReimbursementDetail> CRDetailList = objectMapper.readValue(CRDetailJSON, new TypeReference<List<SapCostReimbursementDetail>>() {
}); // });
for (SapCostReimbursementDetail item : CRDetailList) { List<SapCostReimbursementDetail> CRDetailAll = getBizEntities(SapCostReimbursementDetail.class, "CRDetail");
for (SapCostReimbursementDetail item : CRDetailAll) {
item.setReimbursementBaseInfoId(sapCostReimbursement.getId()); item.setReimbursementBaseInfoId(sapCostReimbursement.getId());
costReimbursementDetailRepository.save(item);
} }
costReimbursementDetailRepository.save(CRDetailList);
return sapCostReimbursement.getId(); return sapCostReimbursement.getId();
} }
...@@ -255,6 +255,9 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S ...@@ -255,6 +255,9 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
itemList.add(detailMap); itemList.add(detailMap);
costReimbursementDetail.setBudat(new Date()); costReimbursementDetail.setBudat(new Date());
costReimbursementDetail.setBldat(new Date()); costReimbursementDetail.setBldat(new Date());
costReimbursementDetail.setBankn1(sapCostReimbursement.getBankn1());
costReimbursementDetail.setZepTxt1(sapCostReimbursement.getZepTxt1());
costReimbursementDetail.setZt012kText1(sapCostReimbursement.getZt012kText1());
costReimbursementDetailRepository.save(costReimbursementDetail); costReimbursementDetailRepository.save(costReimbursementDetail);
} }
paramMap.put("ITEM", itemList); paramMap.put("ITEM", itemList);
......
package com.huigou.topsun.sap.costReimbursement.application.impl; package com.huigou.topsun.sap.costReimbursement.application.impl;
import com.huigou.cache.DictUtil;
import com.huigou.data.query.model.QueryDescriptor; import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.data.query.model.QueryModel;
import com.huigou.topsun.sap.costReimbursement.application.SapCostReimbursementDetailApplication; import com.huigou.topsun.sap.costReimbursement.application.SapCostReimbursementDetailApplication;
import com.huigou.topsun.sap.costReimbursement.domain.SapCostReimbursementDetail; import com.huigou.topsun.sap.costReimbursement.domain.SapCostReimbursementDetail;
import com.huigou.topsun.sap.costReimbursement.domain.query.SapCostReimbursementQueryRequest;
import com.huigou.topsun.sap.costReimbursement.repostiory.SapCostReimbursementDetailRepository; import com.huigou.topsun.sap.costReimbursement.repostiory.SapCostReimbursementDetailRepository;
import com.huigou.topsun.sap.statsIndicators.application.SapStatsIndicatorsDetailApplication; import com.huigou.topsun.sap.statsIndicators.application.SapStatsIndicatorsDetailApplication;
import com.huigou.topsun.sap.statsIndicators.domain.query.SapStatsIndicatorsDetailQueryRequest; import com.huigou.topsun.sap.statsIndicators.domain.query.SapStatsIndicatorsDetailQueryRequest;
...@@ -16,11 +19,13 @@ import java.util.Map; ...@@ -16,11 +19,13 @@ import java.util.Map;
@Service @Service
public class SapCostReimbursementDetailApplicationImpl extends BaseApplication implements SapCostReimbursementDetailApplication { public class SapCostReimbursementDetailApplicationImpl extends BaseApplication implements SapCostReimbursementDetailApplication {
// @Override @Override
// public Map<String, Object> slicedStatsIndicatorsDetailQuery(SapStatsIndicatorsDetailQueryRequest query) { public Map<String, Object> slicedSapCostReimbursementDetail(SapCostReimbursementQueryRequest query) {
// QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "slicedStatsIndicatorsDetailQuery"); QueryDescriptor queryDescriptor = this.sqlExecutorDao.getQuery(QUERY_XML_FILE_PATH, "slicedSapCostReimbursementDetail");
// return this.sqlExecutorDao.executeSlicedQuery(queryDescriptor,query); QueryModel queryModel = this.sqlExecutorDao.getQueryModel(queryDescriptor, query);
// } queryModel.putDictionary("mwskz", DictUtil.getDictionary("mwskz"));
return this.sqlExecutorDao.executeQuery(queryModel);
}
@Autowired @Autowired
SapCostReimbursementDetailRepository costReimbursementDetailRepository; SapCostReimbursementDetailRepository costReimbursementDetailRepository;
...@@ -28,4 +33,11 @@ public class SapCostReimbursementDetailApplicationImpl extends BaseApplication i ...@@ -28,4 +33,11 @@ public class SapCostReimbursementDetailApplicationImpl extends BaseApplication i
public List<SapCostReimbursementDetail> getAllByCRId(String CRId) { public List<SapCostReimbursementDetail> getAllByCRId(String CRId) {
return costReimbursementDetailRepository.findAllByReimbursementBaseInfoId(CRId); return costReimbursementDetailRepository.findAllByReimbursementBaseInfoId(CRId);
} }
@Override
public void deleteSapCostReimbursementDetails(List<String> ids) {
for (String id : ids) {
costReimbursementDetailRepository.delete(id);
}
}
} }
...@@ -21,9 +21,7 @@ import com.huigou.util.StringUtil; ...@@ -21,9 +21,7 @@ import com.huigou.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import java.util.Date; import java.util.*;
import java.util.List;
import java.util.Map;
@Controller @Controller
...@@ -112,8 +110,14 @@ public class SapCostReimbursementController extends CommonController { ...@@ -112,8 +110,14 @@ public class SapCostReimbursementController extends CommonController {
public String slicedSapCostReimbursementDetailList(){ public String slicedSapCostReimbursementDetailList(){
SDO sdo = this.getSDO(); SDO sdo = this.getSDO();
List<SapCostReimbursementDetail> CRDetailAll = costReimbursementDetailApplication.getAllByCRId(sdo.getId()); SapCostReimbursementQueryRequest queryRequest = sdo.toQueryRequest(SapCostReimbursementQueryRequest.class);
return toResult(CRDetailAll); Map<String, Object> map = new HashMap<>();
if (StringUtil.isNotBlank(queryRequest.getReimbursementBaseInfoId())){
map = costReimbursementDetailApplication.slicedSapCostReimbursementDetail(queryRequest);
}else {
map.put("Rows",new ArrayList<>());
}
return toResult(map);
} }
/** /**
...@@ -142,10 +146,10 @@ public class SapCostReimbursementController extends CommonController { ...@@ -142,10 +146,10 @@ public class SapCostReimbursementController extends CommonController {
return null; return null;
} }
public String deleteStatsIndicators(){ public String deleteSapCostReimbursementDetails(){
SDO sdo = this.getSDO(); SDO sdo = this.getSDO();
List<String> ids = sdo.getIds(); List<String> ids = sdo.getIds();
costReimbursementApplication.deleteSapCostReimbursementByIds(ids); costReimbursementDetailApplication.deleteSapCostReimbursementDetails(ids);
return success(); return success();
} }
// //
......
...@@ -195,6 +195,30 @@ public class SapCostReimbursement extends FlowBillAbstractEntity { ...@@ -195,6 +195,30 @@ public class SapCostReimbursement extends FlowBillAbstractEntity {
@Column(name = "MESSAGE_V4") @Column(name = "MESSAGE_V4")
private String messageV4; private String messageV4;
/**
* 员工借款单据编号
*/
@Column(name = "employee_loan_bill_code")
private String employeeLoanBillCode;
/**
* 付款附言
*/
@Column(name = "ZEP_TXT1")
private String zepTxt1;
/**
* 付款银行账号
*/
@Column(name = "BANKN1")
private String bankn1;
/**
* 付款银行账号名称
*/
@Column(name = "ZT012K_TEXT1")
private String zt012kText1;
@Override @Override
protected String getCodeRuleId() { protected String getCodeRuleId() {
......
...@@ -116,4 +116,6 @@ public class SapCostReimbursementQueryRequest extends QueryAbstractRequest { ...@@ -116,4 +116,6 @@ public class SapCostReimbursementQueryRequest extends QueryAbstractRequest {
*/ */
private Date fillinDate; private Date fillinDate;
private String reimbursementBaseInfoId;
} }
\ No newline at end of file
...@@ -11,4 +11,13 @@ ...@@ -11,4 +11,13 @@
<condition column="bill_code" name="billCode" type="java.lang.String" symbol="like" alias="t"/> <condition column="bill_code" name="billCode" type="java.lang.String" symbol="like" alias="t"/>
<condition column="zep_ftype" name="zepFtype" type="java.lang.String" symbol="=" alias="t"/> <condition column="zep_ftype" name="zepFtype" type="java.lang.String" symbol="=" alias="t"/>
</query> </query>
<query name="slicedSapCostReimbursementDetail" table="sap_cost_reimbursement_detail">
<sql-query>
select t.*
from sap_cost_reimbursement_detail t
where 1=1
</sql-query>
<condition column="reimbursement_base_info_id" name="reimbursementBaseInfoId" type="java.lang.String" symbol="=" alias="t"/>
</query>
</query-mappings> </query-mappings>
\ No newline at end of file
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