/* * 版 本 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 () { // 打印 $('#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 += '报销金额'; 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 cwcz = ''; var cwczyj = ''; processInfo.forEach((item, index) => { if (item && item.F_NodeId) { //部门领导 if (item.F_NodeId == '14c32eaf-9394-4d78-370f-e82e4fc9c73b') { bmld = item.F_TaskUserName; if (item.F_Des) { bmldyj = item.F_Des; } else { bmldyj = item.F_OperationName; } } //财务处长审核 if (item.F_NodeId == '0edd8daa-59ce-60f7-9a99-2f9ed7e62db3') { cwcz = item.F_TaskUserName; if (item.F_Des) { cwczyj = item.F_Des; } else { cwczyj = item.F_OperationName; } } } }); processhtml += ''; processhtml += '审核意见:' + bmldyj + ''; processhtml += '部门领导:' + bmld + ''; processhtml += ''; processhtml += ''; processhtml += '支付意见:' + cwczyj + ''; processhtml += '财务处长:' + cwcz + ''; processhtml += ''; processhtml += ''; processhtml += '所附单据:'; processhtml += '1.申请   份2.发票   张3.真伪查验    张4.入库单   张5.资产验收单   张'; processhtml += ''; processhtml += ''; processhtml += ''; processhtml += '6.差旅费保修单    张7.其他    张'; 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(); function smalltoBIG(n) { var fraction = ['角', '分']; var digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']; var unit = [ ['元', '万', '亿'], ['', '拾', '佰', '仟'] ]; var head = n < 0 ? '欠' : ''; n = Math.abs(n); var s = ''; for (var i = 0; i < fraction.length; i++) { s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, ''); } s = s || '整'; n = Math.floor(n); for (var i = 0; i < unit[0].length && n > 0; i++) { var p = ''; for (var j = 0; j < unit[1].length && n > 0; j++) { p = digit[n % 10] + unit[1][j] + p; n = Math.floor(n / 10); } s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s; } return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整'); } }