You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PrintSpecial.js 14 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2021-05-28 14:18
  5. * 描 述:支出预算管理
  6. */
  7. var acceptClick;
  8. var keyValue = request('keyValue');
  9. var processId = request('processId');
  10. // 设置权限
  11. var setAuthorize;
  12. // 设置表单数据
  13. var setFormData;
  14. // 验证数据是否填写完整
  15. var validForm;
  16. // 保存数据
  17. var save;
  18. var tableData;
  19. var processInfo;
  20. var html = '';
  21. var processhtml = '';
  22. var bootstrap = function ($, learun) {
  23. "use strict";
  24. var page = {
  25. init: function () {
  26. $('.lr-form-wrap').lrscroll();
  27. page.bind();
  28. page.initData();
  29. },
  30. bind: function () {
  31. $('#PType').lrDataItemSelect({ code: 'payReimburseType' });
  32. $('#PPayType').lrDataItemSelect({ code: 'fdPayType' });
  33. $('#PTopSource').lrDataItemSelect({
  34. code: 'fdPaySource', select: function (item) {
  35. var budgetType = '';
  36. var financeBudgetType = '';
  37. if (item) {
  38. if (item.text == '学校经费' || item.text == '部门专项经费') {
  39. budgetType = '0';
  40. financeBudgetType = '1';
  41. } else if (item.text == '财政专项经费') {
  42. budgetType = '0';
  43. financeBudgetType = '2';
  44. } else {
  45. budgetType = '2';
  46. }
  47. }
  48. //财政专项名称
  49. $('#PIncomeId').lrselectRefresh({
  50. placeholder: "请选择财政专项名称",
  51. allowSearch: true,
  52. url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetIncomeList?budgetType=' + budgetType + '&financeBudgetType=' + financeBudgetType,
  53. value: 'value',
  54. text: 'text'
  55. });
  56. }
  57. });
  58. //财政专项名称
  59. $('#PIncomeId').lrselect({
  60. placeholder: "请选择财政专项名称",
  61. allowSearch: true,
  62. url: top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetIncomeList?budgetType=&financeBudgetType=',
  63. value: 'value',
  64. text: 'text'
  65. });
  66. // 打印
  67. $('#lr_print').on('click', function () {
  68. $('#content').jqprint();
  69. });
  70. },
  71. initData: function () {
  72. $('#t1').html('');
  73. page.getTableData(keyValue, function (data) {
  74. if (data && data.FD_PayManage) {
  75. tableData = data.FD_PayManage;
  76. //部门
  77. var deptName = '';
  78. learun.clientdata.getAsync('custmerData', {
  79. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
  80. key: tableData.PDept,
  81. keyId: 'id',
  82. callback: function (_data) {
  83. deptName = _data['name'];
  84. }
  85. });
  86. //付款方式
  87. var PPayType = '';
  88. learun.clientdata.getAsync('dataItem',
  89. {
  90. key: tableData.PPayType,
  91. code: 'fdPayType',
  92. callback: function (_data) {
  93. PPayType = _data.text;
  94. }
  95. });
  96. //资金支出来源
  97. var topSource = '';
  98. learun.clientdata.getAsync('dataItem',
  99. {
  100. key: tableData.PTopSource,
  101. code: 'fdPaySource',
  102. callback: function (_data) {
  103. topSource = _data.text;
  104. }
  105. });
  106. //财政专项名称
  107. var pIncome = '';
  108. learun.clientdata.getAsync('custmerData', {
  109. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'incomeList',
  110. key: tableData.PIncomeId,
  111. keyId: 'iid',
  112. callback: function (_data) {
  113. pIncome = _data['iname'];
  114. }
  115. });
  116. html += '<tr align="center">';
  117. html += '<td>报销部门</td>';
  118. html += '<td colspan=3 style="width: 35%;">' + deptName + '</td>';
  119. html += '<td style="width: 300px;">报销日期</td>';
  120. html += '<td colspan=2 >' + tableData.PTime + '</td >';
  121. html += '</tr >';
  122. html += '<tr align="center">';
  123. html += '<td>付款方式</td>';
  124. html += '<td colspan=6>' + PPayType + '</td>';
  125. html += '</tr>';
  126. html += '<tr align="center"><td>汇款信息</td><td colspan=3> 汇 入 收 款 单 位 </td>';
  127. html += '<td>汇款信息</td><td colspan=2>汇 入 个 人 账 户</td>';
  128. html += '</tr>';
  129. html += '<tr align="center">';
  130. html += '<td>单位名称</td><td colspan=3>' + tableData.PPayee + '</td>';
  131. html += '<td>收 款 人</td><td colspan=2>' + tableData.PCollectionUser + '</td>';
  132. html += '</tr>';
  133. html += '<tr align="center">';
  134. html += '<td>开户银行</td><td colspan=3>' + tableData.PPayeeBank + '</td>';
  135. html += '<td>开卡银行</td>';
  136. html += '<td style="width: 300px;">' + tableData.PCollectionBank1 + '</td><td style="width: 450px;padding:0;margin: 0;">' + tableData.PCollectionBank2 + '</td>';
  137. html += '</tr>';
  138. html += '<tr align="center">';
  139. html += '<td>账&nbsp;&nbsp;&nbsp;&nbsp;号</td><td colspan=3>' + tableData.PPayeeBankAccount + '</td>';
  140. html += '<td>卡&nbsp;&nbsp;&nbsp;&nbsp;号</td><td>' + tableData.PCollectionBankAccount1 + '</td><td>' + tableData.PCollectionBankAccount2 + '</td>';
  141. html += '</tr>';
  142. html += '<tr>';
  143. html += '<td align="center" style="width: 250px;">资金支出用途</td><td colspan=6 class="textEm">' + tableData.PPurpose + '</td>';
  144. html += '</tr>';
  145. html += '<tr>';
  146. html += '<td align="center">资金支出来源</td><td colspan=6 class="textEm">' + topSource + '</td>';
  147. html += '</tr>';
  148. html += '<tr>';
  149. html += '<td align="center">财政专项名称</td><td colspan=6 class="textEm">' + pIncome + '</td>';
  150. html += '</tr>';
  151. html += '<tr>';
  152. html += '<td align="center">支付金额</td>';
  153. html += '<td colspan=4 class="textEm">大写:' + smalltoBIG(tableData.PAmount) + '</td>';
  154. html += '<td colspan=2 class="textEm">小写¥:' + tableData.PAmount + '</td>';
  155. html += '</tr>';
  156. html += '<tr>';
  157. html += '<td align="center" rowspan="5">报销审批</td>';
  158. if (tableData.PRemarks == null || tableData.PRemarks == 'null') {
  159. tableData.PRemarks = '';
  160. }
  161. html += '<td colspan=4 class="textEm">补充说明:' + tableData.PRemarks + '</td>';
  162. html += '<td colspan=2 class="textEm">经 办 人:' + tableData.PUserName + '</td>';
  163. html += '</tr>';
  164. $('#t1').append(html);
  165. }
  166. if (data && data.TaskLogList) {
  167. processInfo = data.TaskLogList;
  168. //部门领导
  169. var bmld = '';
  170. var bmldyj = '';
  171. var zgxz = '';
  172. var zgxzyj = '';
  173. var cwcz = '';
  174. var cwczyj = '';
  175. var xz = '';
  176. var xzyj = '';
  177. processInfo.forEach((item, index) => {
  178. if (item && item.F_NodeId) {
  179. //部门领导
  180. if (item.F_NodeId == '4dff56c9-2a91-af36-a384-9da4c6ae85df') {
  181. bmld = item.F_TaskUserName;
  182. if (item.F_Des) {
  183. bmldyj = item.F_Des;
  184. } else {
  185. bmldyj = item.F_OperationName;
  186. }
  187. }
  188. //主管校长审核
  189. if (item.F_NodeId == '1eb9fdfc-279b-f95f-0696-cd6cfabfb21a') {
  190. zgxz = item.F_TaskUserName;
  191. if (item.F_Des) {
  192. zgxzyj = item.F_Des;
  193. } else {
  194. zgxzyj = item.F_OperationName;
  195. }
  196. }
  197. //财务处长审核
  198. if (item.F_NodeId == '1d0a2118-e461-9600-e3f4-2a6a6dce7a04') {
  199. cwcz = item.F_TaskUserName;
  200. if (item.F_Des) {
  201. cwczyj = item.F_Des;
  202. } else {
  203. cwczyj = item.F_OperationName;
  204. }
  205. }
  206. //校长审核
  207. if (item.F_NodeId == 'd96de9d6-8a9c-6142-0cbf-1089e39a5189') {
  208. xz = item.F_TaskUserName;
  209. if (item.F_Des) {
  210. xzyj = item.F_Des;
  211. } else {
  212. xzyj = item.F_OperationName;
  213. }
  214. }
  215. }
  216. });
  217. processhtml += '<tr>';
  218. processhtml += '<td colspan=4 class="textEm">审核意见:' + bmldyj + '</td>';
  219. processhtml += '<td colspan=2 class="textEm">部门领导:' + bmld + '</td>';
  220. processhtml += '</tr>';
  221. processhtml += '<tr>';
  222. processhtml += '<td colspan=4 class="textEm">审核意见:' + zgxzyj + '</td>';
  223. processhtml += '<td colspan=2 class="textEm">主管校长:' + zgxz + '</td>';
  224. processhtml += '</tr>';
  225. processhtml += '<tr>';
  226. processhtml += '<td colspan=4 class="textEm"> 支付意见:' + cwczyj + '</td>';
  227. processhtml += '<td colspan=2 class="textEm"> 财务处长:' + cwcz + '</td>';
  228. processhtml += '</tr>';
  229. processhtml += '<tr>';
  230. processhtml += '<td colspan=4 class="textEm">校长批示:' + xzyj + '</td>';
  231. processhtml += '<td colspan=2 class="textEm">校&nbsp;&nbsp;&nbsp;&nbsp;长:' + xz + '</td>';
  232. processhtml += '</tr>';
  233. processhtml += '<tr>';
  234. processhtml += '<td rowspan="2" align="center">所附单据:</td>';
  235. processhtml += '<td colspan=6 class="list"><span>1.申请 &nbsp;&nbsp;份</span><span>2.合同 &nbsp;&nbsp;张</span><span>3.发票 &nbsp;&nbsp;张</span><span>4.证伪查验 &nbsp; 张</span><span>5.入库单 &nbsp;&nbsp;&nbsp;&nbsp;张</span>';
  236. processhtml += '</td></tr>';
  237. processhtml += '<tr>';
  238. processhtml += '<td colspan=6 class="list" class="textEm">';
  239. processhtml += '<span>6.资产验收单&nbsp;&nbsp; 张</span><span>7.差旅费保修单 &nbsp; 张</span><span>8.其他 &nbsp;&nbsp;张</span>';
  240. processhtml += '</td></tr>';
  241. processhtml += '<tr>';
  242. processhtml += '<td align="center">资金支付</td>';
  243. processhtml += '<td colspan=4 style="border-right:0;width: 30%;" class="textEm"><span>出纳:</span></td>';
  244. processhtml += '<td colspan=2 style="border-left:0 ;"><span>复核:</span></td>';
  245. processhtml += '</tr>';
  246. $('#t1').append(processhtml);
  247. }
  248. });
  249. },
  250. getTableData: function (keyValue, callback) {
  251. learun.httpAsync('GET', top.$.rootUrl + '/ReceiveSendFeeManagement/FD_PayManage/GetPrintData', { keyValue: keyValue, processId: processId }, function (data) {
  252. callback && callback(data);
  253. });
  254. }
  255. };
  256. // 设置表单数据
  257. setFormData = function (processId, param, callback) {
  258. callback && callback();
  259. }
  260. // 验证数据是否填写完整
  261. validForm = function () {
  262. if (!$('body').lrValidform()) {
  263. return false;
  264. }
  265. return true;
  266. };
  267. // 保存数据
  268. save = function (processId, callBack, i) {
  269. };
  270. page.init();
  271. }