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.
 
 
 
 
 
 

270 lines
14 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2022-11-07 11:54
  5. * 描 述:工资条
  6. */
  7. var refreshGirdData;
  8. var bootstrap = function ($, learun) {
  9. "use strict";
  10. var page = {
  11. init: function () {
  12. page.initGird();
  13. page.bind();
  14. },
  15. bind: function () {
  16. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  17. page.search(queryJson);
  18. }, 220, 400);
  19. //年份
  20. $('#IssueYear').lrselect({
  21. allowSearch: true,
  22. url: top.$.rootUrl + '/PersonnelManagement/MP_ManagementPlan/GetAcademicYear',
  23. value: 'value',
  24. text: 'text'
  25. });
  26. $('#IssueMonth').lrDataItemSelect({ code: 'MPMonth' });
  27. $('#PeopleType').lrselect({
  28. placeholder: "请选择人员类别",
  29. allowSearch: true,
  30. url: top.$.rootUrl + '/EducationalAdministration/WageSchedule/PeopleType',
  31. value: 'PeopleType',
  32. text: 'PeopleType'
  33. });
  34. $('#PostType').lrselect({
  35. placeholder: "请选择岗位等级",
  36. allowSearch: true,
  37. url: top.$.rootUrl + '/EducationalAdministration/WageSchedule/PostType',
  38. value: 'PostType',
  39. text: 'PostType'
  40. });
  41. $('#PayGrade').lrselect({
  42. placeholder: "请选择薪级",
  43. allowSearch: true,
  44. url: top.$.rootUrl + '/EducationalAdministration/WageSchedule/PayGrade',
  45. value: 'PayGrade',
  46. text: 'PayGrade'
  47. });
  48. // 刷新
  49. $('#lr_refresh').on('click', function () {
  50. location.reload();
  51. });
  52. // 新增
  53. $('#lr_add').on('click', function () {
  54. learun.layerForm({
  55. id: 'form',
  56. title: '新增',
  57. url: top.$.rootUrl + '/EducationalAdministration/WageSchedule/Form',
  58. width: 800,
  59. height: 800,
  60. callBack: function (id) {
  61. return top[id].acceptClick(refreshGirdData);
  62. }
  63. });
  64. });
  65. // 编辑
  66. $('#lr_edit').on('click', function () {
  67. var keyValue = $('#gridtable').jfGridValue('Id');
  68. if (learun.checkrow(keyValue)) {
  69. var CheckMark = $('#gridtable').jfGridValue('F_EnabledMark');
  70. if (CheckMark.indexOf('1') != -1) {
  71. learun.alert.warning("选中记录中包含已审核项目!");
  72. return;
  73. }
  74. learun.layerForm({
  75. id: 'form',
  76. title: '编辑',
  77. url: top.$.rootUrl + '/EducationalAdministration/WageSchedule/Form?keyValue=' + keyValue,
  78. width: 800,
  79. height: 800,
  80. callBack: function (id) {
  81. return top[id].acceptClick(refreshGirdData);
  82. }
  83. });
  84. }
  85. });
  86. // 删除
  87. $('#lr_delete').on('click', function () {
  88. var keyValue = $('#gridtable').jfGridValue('Id');
  89. var CheckMark = $('#gridtable').jfGridValue('F_EnabledMark');
  90. if (learun.checkrow(keyValue)) {
  91. if (CheckMark.indexOf('1') != -1) {
  92. learun.alert.warning("选中记录中包含已审核项目!");
  93. return;
  94. }
  95. learun.layerConfirm('是否确认删除该项!', function (res) {
  96. if (res) {
  97. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/WageSchedule/DeleteForm', { keyValue: keyValue }, function () {
  98. refreshGirdData();
  99. });
  100. }
  101. });
  102. }
  103. });
  104. //审核
  105. $('#lr_check').on('click', function () {
  106. var keyValue = $('#gridtable').jfGridValue('Id');
  107. if (learun.checkrow(keyValue)) {
  108. var CheckMark = $('#gridtable').jfGridValue('F_EnabledMark');
  109. if (CheckMark.indexOf('1') != -1) {
  110. learun.alert.warning("选中记录中包含已审核项目!");
  111. return;
  112. }
  113. learun.layerConfirm('是否确认审核该项?', function (res) {
  114. if (res) {
  115. learun.postForm(top.$.rootUrl + '/EducationalAdministration/WageSchedule/CheckForm', { keyValue: keyValue, Status: '1' }, function () {
  116. refreshGirdData();
  117. });
  118. }
  119. });
  120. }
  121. });
  122. //去审
  123. $('#lr_uncheck').on('click', function () {
  124. var keyValue = $('#gridtable').jfGridValue('Id');
  125. if (learun.checkrow(keyValue)) {
  126. var CheckMark = $('#gridtable').jfGridValue('F_EnabledMark');
  127. var CheckMarkArr = CheckMark.split(',');
  128. if ($.inArray('0', CheckMarkArr) != -1 || $.inArray('', CheckMarkArr) != -1) {
  129. learun.alert.warning("选中记录中包含未审核项目!");
  130. return;
  131. }
  132. learun.layerConfirm('是否确认取消审核该项?', function (res) {
  133. if (res) {
  134. learun.postForm(top.$.rootUrl + '/EducationalAdministration/WageSchedule/CheckForm', { keyValue: keyValue, Status: '2' }, function () {
  135. refreshGirdData();
  136. });
  137. }
  138. });
  139. }
  140. });
  141. //审核全部
  142. $('#lr_checkall').on('click', function () {
  143. learun.layerConfirm('是否确认全部审核?', function (res) {
  144. if (res) {
  145. learun.postForm(top.$.rootUrl + '/EducationalAdministration/WageSchedule/CheckForm', { keyValue: null, Status: '0' }, function () {
  146. refreshGirdData();
  147. });
  148. }
  149. });
  150. });
  151. ///上传
  152. $('#lr_import').on('click',
  153. function () {
  154. learun.layerForm({
  155. id: 'form',
  156. title: '导入',
  157. url: top.$.rootUrl + '/EducationalAdministration/WageSchedule/ImportForm',
  158. width: 600,
  159. height: 400,
  160. btn: null,
  161. callBack: function (id) {
  162. return top[id].acceptClick(refreshGirdData);
  163. }
  164. });
  165. });
  166. },
  167. initGird: function () {
  168. $('#gridtable').jfGrid({
  169. url: top.$.rootUrl + '/EducationalAdministration/WageSchedule/GetPageList',
  170. headData: [
  171. { label: '发放年份', name: 'IssueYear', width: 70, align: "left" },
  172. { label: '发放月份', name: 'IssueMonth', width: 70, align: "left" },
  173. { label: '序号', name: 'No', width: 70, align: "left" },
  174. { label: '姓名', name: 'EmpName', width: 70, align: "left" },
  175. { label: '工资卡号', name: 'WageCardNo', width: 130, align: "left" },
  176. { label: '人员类别', name: 'PeopleType', width: 70, align: "left" },
  177. { label: '岗位等级', name: 'PostType', width: 70, align: "left" },
  178. { label: '薪级', name: 'PayGrade', width: 50, align: "left" },
  179. { label: '应发合计', name: 'TotalGrossPay', width: 70, align: "left", statistics: true },
  180. //{
  181. // label: '基本工资', name: '基本工资', width: 130, align: "center", statistics: true,
  182. // children: [
  183. { label: '岗位工资', name: 'PostWage', width: 70, align: "left", statistics: true },
  184. { label: '薪级工资', name: 'PayGradeWage', width: 70, align: "left", statistics: true },
  185. { label: '百分之十', name: 'TenPercent', width: 70, align: "left", statistics: true },
  186. //{ label: '小计', name: 'BasePay', width: 70, align: "left", statistics: true }
  187. // ]
  188. //},
  189. //{
  190. // label: '绩效工资', name: '绩效工资', width: 70, align: "center", statistics: true,
  191. // children: [
  192. { label: '基础绩效', name: 'BasicsPerformance', width: 70, align: "left", statistics: true },
  193. { label: '奖励绩效', name: 'AwardPerformance', width: 70, align: "left", statistics: true },
  194. // ]
  195. //},
  196. //{
  197. // label: '单列绩效', name: '单列绩效', width: 70, align: "center", statistics: true,
  198. // children: [
  199. { label: '基础绩效', name: 'SeparateBasicsPerformance', width: 70, align: "left", statistics: true },
  200. { label: '奖励绩效', name: 'SeparateAwardPerformance', width: 70, align: "left", statistics: true },
  201. // ]
  202. //},
  203. //{
  204. // label: '津贴补贴', name: '津贴补贴', width: 130, align: "center", statistics: true,
  205. // children: [
  206. { label: '艰边津贴', name: 'RoughEdgeAllowance', width: 70, align: "left", statistics: true },
  207. { label: '民族津贴', name: 'NationAllowance', width: 70, align: "left", statistics: true },
  208. { label: '教龄补贴', name: 'TeachAllowance', width: 70, align: "left", statistics: true },
  209. { label: '特级教师津贴', name: 'SuperfineTeacherResearch', width: 80, align: "left", statistics: true },
  210. // ]
  211. //},
  212. //{
  213. //label: '改革性补贴', name: '改革性补贴', width: 70, align: "center", statistics: true,
  214. //children: [
  215. { label: '交通补贴', name: 'Transportation', width: 70, align: "left", statistics: true },
  216. { label: '物业补贴', name: 'RealeState', width: 70, align: "left", statistics: true },
  217. { label: '工改保留补贴', name: 'WorkKeep', width: 90, align: "left", statistics: true },
  218. // ]
  219. //},
  220. { label: '女职工卫生费', name: 'GirlStaffSanitation', width: 90, align: "left", statistics: true },
  221. { label: '乡镇补贴', name: 'TeacherAndTown', width: 130, align: "center", statistics: true },
  222. { label: '住房补贴', name: 'HousingAllowance', width: 80, align: "left", statistics: true },
  223. { label: '住房公积金', name: 'HousingFundAllowance', width: 80, align: "left", statistics: true },
  224. { label: '其他', name: 'OtherOne', width: 70, align: "left", statistics: true },
  225. { label: '代扣合计', name: 'DeductionsSubtotal', width: 70, align: "left", statistics: true },
  226. //{
  227. // label: '代扣代缴', name: '代扣代缴', width: 130, align: "center", statistics: true,
  228. // children: [
  229. { label: '公积金', name: 'AccumulationFund', width: 70, align: "left", statistics: true },
  230. { label: '养老保险', name: 'EndowmentInsurance', width: 70, align: "left", statistics: true },
  231. { label: '职业年金', name: 'OccupationalAnnuities', width: 70, align: "left", statistics: true },
  232. { label: '医疗保险', name: 'MedicalInsurance', width: 70, align: "left", statistics: true },
  233. { label: '失业保险', name: 'UnemploymentInsurance', width: 70, align: "left", statistics: true },
  234. { label: '工会工费', name: 'LaborUnionWage', width: 70, align: "left", statistics: true },
  235. { label: '个人所得税', name: 'PersonalIncomeTax', width: 70, align: "left", statistics: true },
  236. { label: '其他', name: 'Other', width: 70, align: "left", statistics: true },
  237. // ]
  238. //},
  239. //{ label: '财政直达', name: 'FiscalDirect', width: 70, align: "left", statistics: true },
  240. //{ label: '银行代扣', name: 'BankWithholding', width: 70, align: "left", statistics: true },
  241. { label: '实发合计', name: 'NetCombined', width: 70, align: "left", statistics: true },
  242. //{ label: '创建用户', name: 'CreateUser', width: 70, align: "left" },
  243. //{ label: '创建时间', name: 'CreateTime', width: 130, align: "left" },
  244. {
  245. label: "审核状态", name: "F_EnabledMark", width: 70, align: "center",
  246. formatter: function (cellvalue) {
  247. return cellvalue == "1" ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>";
  248. }
  249. },
  250. ],
  251. mainId: 'Id',
  252. isPage: true,
  253. rows: 300,
  254. sidx: 'IssueYear desc, IssueMonth desc, CreateTime desc ',
  255. isMultiselect: true
  256. });
  257. page.search();
  258. },
  259. search: function (param) {
  260. param = param || {};
  261. param.Sqlparam = "";
  262. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  263. }
  264. };
  265. refreshGirdData = function () {
  266. $('#gridtable').jfGridSet('reload');
  267. };
  268. page.init();
  269. }