/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-05-28 14:18
* 描 述:支出预算管理
*/
var acceptClick;
var keyValue = request('keyValue');
var processId = request('processId');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
var tableData;
var processInfo;
var html = '';
var processhtml = '';
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#PType').lrDataItemSelect({ code: 'payReimburseType' });
$('#PPayType').lrDataItemSelect({ code: 'fdPayType' });
$('#PTopSource').lrDataItemSelect({
code: 'fdPaySource', select: function (item) {
var budgetType = '';
var financeBudgetType = '';
if (item) {
if (item.text == '学校经费' || item.text == '部门专项经费') {
budgetType = '0';
financeBudgetType = '1';
} else if (item.text == '财政专项经费') {
budgetType = '0';
financeBudgetType = '2';
} else {
budgetType = '2';
}
}
//财政专项名称
$('#PIncomeId').lrselectRefresh({
placeholder: "请选择财政专项名称",
allowSearch: true,
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetIncomeList?budgetType=' + budgetType + '&financeBudgetType=' + financeBudgetType,
value: 'value',
text: 'text'
});
}
});
//财政专项名称
$('#PIncomeId').lrselect({
placeholder: "请选择财政专项名称",
allowSearch: true,
url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetIncomeList?budgetType=&financeBudgetType=',
value: 'value',
text: 'text'
});
// 打印
$('#lr_print').on('click', function () {
$('#content').jqprint();
});
},
initData: function () {
$('#t1').html('');
page.getTableData(keyValue, function (data) {
if (data && data.FD_PayManage) {
tableData = data.FD_PayManage;
//部门
var deptName = '';
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
key: tableData.PDept,
keyId: 'id',
callback: function (_data) {
deptName = _data['name'];
}
});
//付款方式
var PPayType = '';
learun.clientdata.getAsync('dataItem',
{
key: tableData.PPayType,
code: 'fdPayType',
callback: function (_data) {
PPayType = _data.text;
}
});
//资金支出来源
var topSource = '';
learun.clientdata.getAsync('dataItem',
{
key: tableData.PTopSource,
code: 'fdPaySource',
callback: function (_data) {
topSource = _data.text;
}
});
//财政专项名称
var pIncome = '';
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'incomeList',
key: tableData.PIncomeId,
keyId: 'iid',
callback: function (_data) {
pIncome = _data['iname'];
}
});
html += '
';
html += '报销部门 | ';
html += '' + deptName + ' | ';
html += '报销日期 | ';
html += '' + tableData.PTime + ' | ';
html += '
';
html += '';
html += '付款方式 | ';
html += '' + PPayType + ' | ';
html += '
';
html += '汇款信息 | 汇 入 收 款 单 位 | ';
html += '汇款信息 | 汇 入 个 人 账 户 | ';
html += '
';
html += '';
html += '单位名称 | ' + tableData.PPayee + ' | ';
html += '收 款 人 | ' + tableData.PCollectionUser + ' | ';
html += '
';
html += '';
html += '开户银行 | ' + tableData.PPayeeBank + ' | ';
html += '开卡银行 | ';
html += '' + tableData.PCollectionBank1 + ' | ' + tableData.PCollectionBank2 + ' | ';
html += '
';
html += '';
html += '账 号 | ' + tableData.PPayeeBankAccount + ' | ';
html += '卡 号 | ' + tableData.PCollectionBankAccount1 + ' | ' + tableData.PCollectionBankAccount2 + ' | ';
html += '
';
html += '';
html += '资金支出用途 | ' + tableData.PPurpose + ' | ';
html += '
';
html += '';
html += '资金支出来源 | ' + topSource + ' | ';
html += '
';
html += '';
html += '财政专项名称 | ' + pIncome + ' | ';
html += '
';
html += '';
html += '支付金额 | ';
html += '大写:' + smalltoBIG(tableData.PAmount) + ' | ';
html += '小写¥:' + tableData.PAmount + ' | ';
html += '
';
html += '';
html += '报销审批 | ';
if (tableData.PRemarks == null || tableData.PRemarks == 'null') {
tableData.PRemarks = '';
}
html += '补充说明:' + tableData.PRemarks + ' | ';
html += '经 办 人:' + tableData.PUserName + ' | ';
html += '
';
$('#t1').append(html);
}
if (data && data.TaskLogList) {
processInfo = data.TaskLogList;
//部门领导
var bmld = '';
var bmldyj = '';
var zgxz = '';
var zgxzyj = '';
var cwcz = '';
var cwczyj = '';
var xz = '';
var xzyj = '';
processInfo.forEach((item, index) => {
if (item && item.F_NodeId) {
//部门领导
if (item.F_NodeId == '4dff56c9-2a91-af36-a384-9da4c6ae85df') {
bmld = item.F_TaskUserName;
if (item.F_Des) {
bmldyj = item.F_Des;
} else {
bmldyj = item.F_OperationName;
}
}
//主管校长审核
if (item.F_NodeId == '1eb9fdfc-279b-f95f-0696-cd6cfabfb21a') {
zgxz = item.F_TaskUserName;
if (item.F_Des) {
zgxzyj = item.F_Des;
} else {
zgxzyj = item.F_OperationName;
}
}
//财务处长审核
if (item.F_NodeId == '1d0a2118-e461-9600-e3f4-2a6a6dce7a04') {
cwcz = item.F_TaskUserName;
if (item.F_Des) {
cwczyj = item.F_Des;
} else {
cwczyj = item.F_OperationName;
}
}
//校长审核
if (item.F_NodeId == 'd96de9d6-8a9c-6142-0cbf-1089e39a5189') {
xz = item.F_TaskUserName;
if (item.F_Des) {
xzyj = item.F_Des;
} else {
xzyj = item.F_OperationName;
}
}
}
});
processhtml += '';
processhtml += '审核意见:' + bmldyj + ' | ';
processhtml += '部门领导:' + bmld + ' | ';
processhtml += '
';
processhtml += '';
processhtml += '审核意见:' + zgxzyj + ' | ';
processhtml += '主管校长:' + zgxz + ' | ';
processhtml += '
';
processhtml += '';
processhtml += ' 支付意见:' + cwczyj + ' | ';
processhtml += ' 财务处长:' + cwcz + ' | ';
processhtml += '
';
processhtml += '';
processhtml += '校长批示:' + xzyj + ' | ';
processhtml += '校 长:' + xz + ' | ';
processhtml += '
';
processhtml += '';
processhtml += '所附单据: | ';
processhtml += '1.申请 份2.合同 张3.发票 张4.证伪查验 张5.入库单 张';
processhtml += ' |
';
processhtml += '';
processhtml += '';
processhtml += '6.资产验收单 张7.差旅费保修单 张8.其他 张';
processhtml += ' |
';
processhtml += '';
processhtml += '资金支付 | ';
processhtml += '出纳: | ';
processhtml += '复核: | ';
processhtml += '
';
$('#t1').append(processhtml);
}
});
},
getTableData: function (keyValue, callback) {
learun.httpAsync('GET', top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetPrintData', { keyValue: keyValue, processId: processId }, function (data) {
callback && callback(data);
});
}
};
// 设置表单数据
setFormData = function (processId, param, callback) {
callback && callback();
}
// 验证数据是否填写完整
validForm = function () {
if (!$('body').lrValidform()) {
return false;
}
return true;
};
// 保存数据
save = function (processId, callBack, i) {
};
page.init();
}