diff --git a/README.md b/README.md index c02d3167e75af3205b18f12dd82809529b56c331..a4fe06956267128024397c991070fed0b05ac81a 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ 智能办公OA系统[SpringBoot2-快速开发平台],适用于医院,学校,中小型企业等机构的管理。包含文件在线操作、工作日志、多班次考勤、CRM、ERP进销存、项目管理、EHR、拖拽式生成问卷、日程、笔记、工作计划、行政办公、薪资模块、动态表单、知识库、公告模块、企业论坛、云售后模块、生产模块、系统模块化同步模块等多种复杂业务功能。 +[近期更新内容](https://mp.weixin.qq.com/s/vdh7-hTAST0IefZdxBEozA) + # 开源版请下载`master`分支 # 开源版请下载`master`分支 # 开源版请下载`master`分支 diff --git a/ifs/src/main/resources/template/js/expenditure/expenditureAdd.js b/ifs/src/main/resources/template/js/expenditure/expenditureAdd.js deleted file mode 100644 index 675610896642b4a4e234fa26a357ce0e9ddfc3a2..0000000000000000000000000000000000000000 --- a/ifs/src/main/resources/template/js/expenditure/expenditureAdd.js +++ /dev/null @@ -1,259 +0,0 @@ - -var userReturnList = new Array();//选择用户返回的集合或者进行回显的集合 -var chooseOrNotMy = "1";//人员列表中是否包含自己--1.包含;其他参数不包含 -var chooseOrNotEmail = "2";//人员列表中是否必须绑定邮箱--1.必须;其他参数没必要 -var checkType = "2";//人员选择类型,1.多选;其他。单选 - -// 供应商信息--往来单位 -var supplierMation = {}; - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'jquery', 'winui', 'laydate'], function(exports) { - winui.renderColor(); - layui.use(['form', 'tagEditor'], function(form) { - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$, - laydate = layui.laydate; - var rowNum = 1; //表格的序号 - var initemHtml = "";//收支项目 - - var usetableTemplate = $("#usetableTemplate").html(); - var selOption = getFileContent('tpl/template/select-option.tpl'); - var handsPersonList = new Array();//经手人员 - - //单据时间 - laydate.render({ - elem: '#operTime', - type: 'datetime', - value: getFormatDate(), - trigger: 'click' - }); - - // 初始化账户 - systemCommonUtil.getSysAccountListByType(function(json){ - // 加载账户数据 - $("#accountId").html(getDataUseHandlebars(selOption, json)); - }); - - // 初始化支出项目 - systemCommonUtil.getSysInoutitemListByType(2, function(json){ - // 加载支出项目数据 - initemHtml = getDataUseHandlebars(selOption, json); - matchingLanguage(); - form.render(); - // 初始化一行数据 - addRow(); - }); - - //数量变化 - $("body").on("input", ".rkMoney", function() { - //计算价格 - calculatedTotalPrice(); - }); - $("body").on("change", ".rkMoney", function() { - calculatedTotalPrice(); - }); - - //计算总价 - function calculatedTotalPrice(){ - var rowTr = $("#useTable tr"); - var allPrice = 0; - $.each(rowTr, function(i, item) { - //获取行坐标 - var rowNum = $(item).attr("trcusid").replace("tr", ""); - //获取金额 - var initemMoney = parseFloat(isNull($("#initemMoney" + rowNum).val()) ? "0" : $("#initemMoney" + rowNum).val()); - //输出金额 - $("#initemMoney" + rowNum).html((initemMoney).toFixed(2)); - allPrice += initemMoney; - }); - $("#allPrice").html(allPrice.toFixed(2)); - } - - form.on('submit(formAddBean)', function(data) { - if(winui.verifyForm(data.elem)) { - if(isNull(supplierMation.id)){ - winui.window.msg('请选择往来单位.', {icon: 2, time: 2000}); - return false; - } - // 获取数据 - var rowTr = $("#useTable tr"); - if(rowTr.length == 0) { - winui.window.msg('请选择收入项目.', {icon: 2, time: 2000}); - return false; - } - var tableData = new Array(); - var noError = false; //循环遍历表格数据时,是否有其他错误信息 - $.each(rowTr, function(i, item) { - //获取行编号 - var rowNum = $(item).attr("trcusid").replace("tr", ""); - if(inTableDataArrayByAssetarId($("#initemId" + rowNum).val(), tableData)) { - $("#initemId" + rowNum).addClass("layui-form-danger"); - $("#initemId" + rowNum).focus(); - winui.window.msg('一张单中不允许出现相同收支项目信息.', {icon: 2, time: 2000}); - noError = true; - return false; - } - var row = { - initemId: $("#initemId" + rowNum).val(), - initemMoney: $("#initemMoney" +rowNum).val(), - remark: $("#remark" + rowNum).val() - }; - tableData.push(row); - }); - if(noError) { - return false; - } - - var handsPersonId = ""; - $.each(handsPersonList, function (i, item) { - handsPersonId = item.id; - }); - if(isNull(handsPersonId)){ - winui.window.msg('请选择经手人.', {icon: 2, time: 2000}); - return false; - } - - var params = { - organId: supplierMation.id, - handsPersonId: handsPersonId, - operTime: $("#operTime").val(), - accountId: $("#accountId").val(), - remark: $("#remark").val(), - changeAmount: $("#changeAmount").val(), - initemStr: JSON.stringify(tableData) - }; - AjaxPostUtil.request({url: reqBasePath + "expenditure002", params: params, type: 'json', method: "POST", callback: function(json) { - if(json.returnCode == 0) { - parent.layer.close(index); - parent.refreshCode = '0'; - } else { - winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); - } - }}); - } - return false; - }); - - //判断选中的收支项目是否也在数组中 - function inTableDataArrayByAssetarId(initemId, array) { - var isIn = false; - $.each(array, function(i, item) { - if(item.initemId === initemId) { - isIn = true; - return false; - } - }); - return isIn; - } - - $('#handsPersonId').tagEditor({ - initialTags: [], - placeholder: '请选择经手人员', - editorTag: false, - beforeTagDelete: function(field, editor, tags, val) { - var inArray = -1; - $.each(handsPersonList, function(i, item) { - if(val === item.name) { - inArray = i; - return false; - } - }); - if(inArray != -1) { //如果该元素在集合中存在 - handsPersonList.splice(inArray, 1); - } - } - }); - - //人员选择 - $("body").on("click", "#toHandsPersonSelPeople", function(e){ - userReturnList = [].concat(handsPersonList); - _openNewWindows({ - url: "../../tpl/common/sysusersel.html", - title: "人员选择", - pageId: "sysuserselpage", - area: ['80vw', '80vh'], - callBack: function(refreshCode){ - if (refreshCode == '0') { - //移除所有tag - var tags = $('#handsPersonId').tagEditor('getTags')[0].tags; - for (i = 0; i < tags.length; i++) { - $('#handsPersonId').tagEditor('removeTag', tags[i]); - } - handsPersonList = [].concat(userReturnList); - //添加新的tag - $.each(handsPersonList, function(i, item){ - $('#handsPersonId').tagEditor('addTag', item.name); - }); - } else if (refreshCode == '-9999') { - winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); - } - }}); - }); - - // 新增行 - $("body").on("click", "#addRow", function() { - addRow(); - }); - - // 删除行 - $("body").on("click", "#deleteRow", function() { - deleteRow(); - // 计算价格 - calculatedTotalPrice(); - }); - - // 新增行 - function addRow() { - var par = { - id: "row" + rowNum.toString(), //checkbox的id - trId: "tr" + rowNum.toString(), //行的id - initemId: "initemId" + rowNum.toString(), //收入项目id - initemMoney: "initemMoney" + rowNum.toString(), //金额id - remark: "remark" + rowNum.toString() //备注id - }; - $("#useTable").append(getDataUseHandlebars(usetableTemplate, par)); - //赋值给收支项目 - $("#" + "initemId" + rowNum.toString()).html(initemHtml); - form.render('select'); - form.render('checkbox'); - rowNum++; - } - - // 删除行 - function deleteRow() { - var checkRow = $("#useTable input[type='checkbox'][name='tableCheckRow']:checked"); - if(checkRow.length > 0) { - $.each(checkRow, function(i, item) { - $(item).parent().parent().remove(); - }); - } else { - winui.window.msg('请选择要删除的行', {icon: 2, time: 2000}); - } - } - - // 供应商选择 - $("body").on("click", "#supplierNameSel", function(e){ - _openNewWindows({ - url: "../../tpl/supplier/supplierChoose.html", - title: "选择往来单位", - pageId: "supplierChoose", - area: ['90vw', '90vh'], - callBack: function(refreshCode){ - if (refreshCode == '0') { - $("#supplierName").val(supplierMation.supplierName); - } else if (refreshCode == '-9999') { - winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); - } - }}); - }); - - $("body").on("click", "#cancle", function() { - parent.layer.close(index); - }); - }); -}); \ No newline at end of file diff --git a/ifs/src/main/resources/template/js/expenditure/expenditureEdit.js b/ifs/src/main/resources/template/js/expenditure/expenditureEdit.js deleted file mode 100644 index 3b24b4442c928292b15dbba2390767c3fec89119..0000000000000000000000000000000000000000 --- a/ifs/src/main/resources/template/js/expenditure/expenditureEdit.js +++ /dev/null @@ -1,303 +0,0 @@ - -var userReturnList = new Array();//选择用户返回的集合或者进行回显的集合 -var chooseOrNotMy = "1";//人员列表中是否包含自己--1.包含;其他参数不包含 -var chooseOrNotEmail = "2";//人员列表中是否必须绑定邮箱--1.必须;其他参数没必要 -var checkType = "2";//人员选择类型,1.多选;其他。单选 - -// 供应商信息--往来单位 -var supplierMation = {}; - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'jquery', 'winui', 'laydate'], function(exports) { - winui.renderColor(); - layui.use(['form', 'tagEditor'], function(form) { - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$, - laydate = layui.laydate; - var rowNum = 1; //表格的序号 - var initemHtml = "";//收支项目 - - var beanTemplate = $("#beanTemplate").html(); - var usetableTemplate = $("#usetableTemplate").html(); - var selOption = getFileContent('tpl/template/select-option.tpl'); - var handsPersonList = new Array();//经手人员 - - //加载单据数据 - var orderObject = []; - showGrid({ - id: "showForm", - url: reqBasePath + "expenditure003", - params: {rowId: parent.rowId}, - pagination: false, - template: beanTemplate, - method: "GET", - ajaxSendAfter:function(json){ - //单据时间 - laydate.render({ - elem: '#operTime', - type: 'datetime', - trigger: 'click' - }); - orderObject = json; - initOtherMation(); - - var userNames = ""; - handsPersonList = json.bean.userInfo; - $.each(handsPersonList, function (i, item) { - userNames += item.name + ','; - }); - // 人员选择 - $('#handsPersonId').tagEditor({ - initialTags: userNames.split(','), - placeholder: '请选择经手人员', - editorTag: false, - beforeTagDelete: function(field, editor, tags, val) { - var inArray = -1; - $.each(handsPersonList, function(i, item) { - if(val === item.name) { - inArray = i; - return false; - } - }); - if(inArray != -1) { //如果该元素在集合中存在 - handsPersonList.splice(inArray, 1); - } - } - }); - } - }); - - function initOtherMation() { - // 初始化账户 - systemCommonUtil.getSysAccountListByType(function(json){ - // 加载账户数据 - $("#accountId").html(getDataUseHandlebars(selOption, json)); - }); - - // 初始化支出项目 - systemCommonUtil.getSysInoutitemListByType(2, function(json){ - // 加载支出项目数据 - initemHtml = getDataUseHandlebars(selOption, json); - // 渲染数据到页面 - initDataToShow(); - }); - } - - //渲染数据到页面 - function initDataToShow(){ - // 供应商信息赋值 - supplierMation = { - id: orderObject.bean.organId, - supplierName: orderObject.bean.supplierName - } - $("#supplierName").val(orderObject.bean.supplierName);//来往单位 - $("#accountId").val(orderObject.bean.accountId);//账户 - - //渲染列表项 - $.each(orderObject.bean.items, function(i, item){ - addRow(); - $("#initemId" + (rowNum - 1)).val(item.initemId);//支出项目回显 - $("#initemMoney" + (rowNum - 1)).val(item.initemMoney.toFixed(2));//金额回显 - $("#remark" + (rowNum - 1)).val(item.remark);//备注回显 - //设置标识 - $("tr[trcusid='tr" + (rowNum - 1) + "']").attr("thisid", item.id); - }); - matchingLanguage(); - form.render(); - } - - form.on('submit(formEditBean)', function(data) { - // 表单验证 - if(winui.verifyForm(data.elem)) { - if(isNull(supplierMation.id)){ - winui.window.msg('请选择往来单位.', {icon: 2, time: 2000}); - return false; - } - // 获取数据 - var rowTr = $("#useTable tr"); - if(rowTr.length == 0) { - winui.window.msg('请选择收入项目.', {icon: 2, time: 2000}); - return false; - } - var tableData = new Array(); - var noError = false; //循环遍历表格数据时,是否有其他错误信息 - $.each(rowTr, function(i, item) { - //获取行编号 - var rowNum = $(item).attr("trcusid").replace("tr", ""); - if(inTableDataArrayByAssetarId($("#initemId" + rowNum).val(), tableData)) { - $("#initemId" + rowNum).addClass("layui-form-danger"); - $("#initemId" + rowNum).focus(); - winui.window.msg('一张单中不允许出现相同收支项目信息.', {icon: 2, time: 2000}); - noError = true; - return false; - } - var row = { - initemId: $("#initemId" + rowNum).val(), - initemMoney: $("#initemMoney" +rowNum).val(), - remark: $("#remark" + rowNum).val() - }; - tableData.push(row); - }); - if(noError) { - return false; - } - - var handsPersonId = ""; - $.each(handsPersonList, function (i, item) { - handsPersonId = item.id; - }); - if(isNull(handsPersonId)){ - winui.window.msg('请选择经手人.', {icon: 2, time: 2000}); - return false; - } - - var params = { - rowId: parent.rowId, - organId: supplierMation.id, - handsPersonId: handsPersonId, - operTime: $("#operTime").val(), - accountId: $("#accountId").val(), - remark: $("#remark").val(), - changeAmount: $("#changeAmount").val(), - initemStr: JSON.stringify(tableData) - }; - AjaxPostUtil.request({url: reqBasePath + "expenditure004", params: params, type: 'json', method: "PUT", callback: function(json) { - if(json.returnCode == 0) { - parent.layer.close(index); - parent.refreshCode = '0'; - } else { - winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); - } - }}); - } - return false; - }); - - $("body").on("input", ".rkMoney", function() { - //计算价格 - calculatedTotalPrice(); - }); - $("body").on("change", ".rkMoney", function() { - calculatedTotalPrice(); - }); - - //计算总价 - function calculatedTotalPrice(){ - var rowTr = $("#useTable tr"); - var allPrice = 0; - $.each(rowTr, function(i, item) { - //获取行坐标 - var rowNum = $(item).attr("trcusid").replace("tr", ""); - //获取金额 - var initemMoney = parseFloat(isNull($("#initemMoney" + rowNum).val()) ? "0" : $("#initemMoney" + rowNum).val()); - //输出金额 - $("#initemMoney" + rowNum).html((initemMoney).toFixed(2)); - allPrice += initemMoney; - }); - $("#allPrice").html(allPrice.toFixed(2)); - } - - //判断选中的收支项目是否也在数组中 - function inTableDataArrayByAssetarId(initemId, array) { - var isIn = false; - $.each(array, function(i, item) { - if(item.initemId === initemId) { - isIn = true; - return false; - } - }); - return isIn; - } - - //人员选择 - $("body").on("click", "#toHandsPersonSelPeople", function(e){ - userReturnList = [].concat(handsPersonList); - _openNewWindows({ - url: "../../tpl/common/sysusersel.html", - title: "人员选择", - pageId: "sysuserselpage", - area: ['80vw', '80vh'], - callBack: function(refreshCode){ - if (refreshCode == '0') { - //移除所有tag - var tags = $('#handsPersonId').tagEditor('getTags')[0].tags; - for (i = 0; i < tags.length; i++) { - $('#handsPersonId').tagEditor('removeTag', tags[i]); - } - handsPersonList = [].concat(userReturnList); - //添加新的tag - $.each(handsPersonList, function(i, item){ - $('#handsPersonId').tagEditor('addTag', item.name); - }); - } else if (refreshCode == '-9999') { - winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); - } - }}); - }); - - // 新增行 - $("body").on("click", "#addRow", function() { - addRow(); - }); - - // 删除行 - $("body").on("click", "#deleteRow", function() { - deleteRow(); - // 计算价格 - calculatedTotalPrice(); - }); - - // 新增行 - function addRow() { - var par = { - id: "row" + rowNum.toString(), //checkbox的id - trId: "tr" + rowNum.toString(), //行的id - initemId: "initemId" + rowNum.toString(), //收入项目id - initemMoney: "initemMoney" + rowNum.toString(), //金额id - remark: "remark" + rowNum.toString() //备注id - }; - $("#useTable").append(getDataUseHandlebars(usetableTemplate, par)); - // 赋值给收支项目 - $("#" + "initemId" + rowNum.toString()).html(initemHtml); - form.render('select'); - form.render('checkbox'); - rowNum++; - } - - // 删除行 - function deleteRow() { - var checkRow = $("#useTable input[type='checkbox'][name='tableCheckRow']:checked"); - if(checkRow.length > 0) { - $.each(checkRow, function(i, item) { - $(item).parent().parent().remove(); - }); - } else { - winui.window.msg('请选择要删除的行', {icon: 2, time: 2000}); - } - } - - // 供应商选择 - $("body").on("click", "#supplierNameSel", function(e){ - _openNewWindows({ - url: "../../tpl/supplier/supplierChoose.html", - title: "选择往来单位", - pageId: "supplierChoose", - area: ['90vw', '90vh'], - callBack: function(refreshCode){ - if (refreshCode == '0') { - $("#supplierName").val(supplierMation.supplierName); - } else if (refreshCode == '-9999') { - winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); - } - }}); - }); - - $("body").on("click", "#cancle", function() { - parent.layer.close(index); - }); - }); -}); \ No newline at end of file diff --git a/ifs/src/main/resources/template/js/expenditure/expenditureInfo.js b/ifs/src/main/resources/template/js/expenditure/expenditureInfo.js deleted file mode 100644 index d808d6be7437bde2e9a93474ae0fd4c6afa2a060..0000000000000000000000000000000000000000 --- a/ifs/src/main/resources/template/js/expenditure/expenditureInfo.js +++ /dev/null @@ -1,39 +0,0 @@ - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui', 'jqprint'], function (exports) { - winui.renderColor(); - layui.use(['form'], function (form) { - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$; - - var beanTemplate = $("#beanTemplate").html(); - - showGrid({ - id: "showForm", - url: reqBasePath + "expenditure006", - params: {rowId: parent.rowId}, - pagination: false, - template: beanTemplate, - ajaxSendAfter:function(json){ - matchingLanguage(); - form.render(); - } - }); - - //打印 - $("body").on("click", "#jprint", function(e){ - $("#showForm").jqprint({ - title: sysMainMation.mationTitle, - debug: false, //如果是true则可以显示iframe查看效果(iframe默认高和宽都很小,可以再源码中调大),默认是false - importCSS: true, //true表示引进原来的页面的css,默认是true。(如果是true,先会找$("link[media=print]"),若没有会去找$("link")中的css文件) - printContainer: true, //表示如果原来选择的对象必须被纳入打印(注意:设置为false可能会打破你的CSS规则)。 - operaSupport: true//表示如果插件也必须支持歌opera浏览器,在这种情况下,它提供了建立一个临时的打印选项卡。默认是true - }); - }); - - }); -}); \ No newline at end of file diff --git a/ifs/src/main/resources/template/js/expenditure/expenditureList.js b/ifs/src/main/resources/template/js/expenditure/expenditureList.js deleted file mode 100644 index 9b7cb1902670e9e4800d2bb9c141bfb3b0410cad..0000000000000000000000000000000000000000 --- a/ifs/src/main/resources/template/js/expenditure/expenditureList.js +++ /dev/null @@ -1,168 +0,0 @@ - -var rowId = ""; - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) { - winui.renderColor(); - var $ = layui.$, - form = layui.form, - laydate = layui.laydate, - table = layui.table; - authBtn('1571810606540');//新增 - authBtn('1572314337984');//导出 - - laydate.render({ - elem: '#billTime', - range: '~' - }); - - table.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - url: reqBasePath + 'expenditure001', - where: getTableParams(), - even: true, - page: true, - limits: getLimits(), - limit: getLimit(), - cols: [[ - { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers'}, - { field: 'billNo', title: '单据编号', align: 'left', width: 200, templet: function(d){ - return '' + d.billNo + ''; - }}, - { field: 'supplierName', title: '往来单位', align: 'left', width: 150}, - { field: 'totalPrice', title: '合计金额', align: 'left', width: 120}, - { field: 'hansPersonName', title: '经手人', align: 'left', width: 100}, - { field: 'billTime', title: '单据日期', align: 'center', width: 140 }, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'} - ]], - done: function(){ - matchingLanguage(); - } - }); - - table.on('tool(messageTable)', function (obj) { - var data = obj.data; - var layEvent = obj.event; - if (layEvent === 'delete') { //删除 - deleteexpenditure(data); - }else if (layEvent === 'details') { //详情 - details(data); - }else if (layEvent === 'edit') { //编辑 - edit(data); - } - }); - - // 编辑 - function edit(data){ - rowId = data.id; - _openNewWindows({ - url: "../../tpl/expenditure/expenditureEdit.html", - title: systemLanguage["com.skyeye.editPageTitle"][languageType], - pageId: "expenditureEdit", - area: ['90vw', '90vh'], - callBack: function(refreshCode){ - if (refreshCode == '0') { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1,time: 2000}); - loadTable(); - } else if (refreshCode == '-9999') { - winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); - } - }}); - } - - // 删除 - function deleteexpenditure(data){ - layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ - AjaxPostUtil.request({url:reqBasePath + "expenditure005", params: {rowId: data.id}, type:'json', method: "DELETE", callback:function(json){ - if(json.returnCode == 0){ - winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1,time: 2000}); - loadTable(); - }else{ - winui.window.msg(json.returnMessage, {icon: 2,time: 2000}); - } - }}); - }); - } - - // 详情 - function details(data){ - rowId = data.id; - _openNewWindows({ - url: "../../tpl/expenditure/expenditureInfo.html", - title: systemLanguage["com.skyeye.detailsPageTitle"][languageType], - pageId: "expenditureInfo", - area: ['90vw', '90vh'], - callBack: function(refreshCode){ - }}); - } - - // 添加 - $("body").on("click", "#addBean", function(){ - _openNewWindows({ - url: "../../tpl/expenditure/expenditureAdd.html", - title: systemLanguage["com.skyeye.addPageTitle"][languageType], - pageId: "expenditureAdd", - area: ['90vw', '90vh'], - callBack: function(refreshCode){ - if (refreshCode == '0') { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1,time: 2000}); - loadTable(); - } else if (refreshCode == '-9999') { - winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000}); - } - }}); - }); - - form.render(); - form.on('submit(formSearch)', function (data) { - if (winui.verifyForm(data.elem)) { - refreshTable(); - } - return false; - }); - - $("body").on("click", "#reloadTable", function() { - loadTable(); - }); - - // 刷新 - function loadTable(){ - table.reload("messageTable", {where: getTableParams()}); - } - - // 搜索 - function refreshTable(){ - table.reload("messageTable", {page: {curr: 1}, where: getTableParams()}) - } - - // 导出excel - $("body").on("click", "#downloadExcel", function () { - postDownLoadFile({ - url : reqBasePath + 'expenditure007?userToken=' + getCookie('userToken') + '&loginPCIp=' + returnCitySN["cip"], - params: getTableParams(), - method : 'post' - }); - }); - - function getTableParams(){ - var startTime = ""; - var endTime = ""; - if(!isNull($("#billTime").val())){ - startTime = $("#billTime").val().split('~')[0].trim() + ' 00:00:00'; - endTime = $("#billTime").val().split('~')[1].trim() + ' 23:59:59'; - } - return { - billNo: $("#billNo").val(), - startTime: startTime, - endTime: endTime - }; - } - - exports('expenditureList', {}); -}); diff --git a/ifs/src/main/resources/template/js/income/incomeList.js b/ifs/src/main/resources/template/js/income/incomeList.js index 6cd2929e5a9d2a3849e346b7284ec42cb71dfa80..c56faef88b3202a2e20e1dfe4101849300e44dae 100644 --- a/ifs/src/main/resources/template/js/income/incomeList.js +++ b/ifs/src/main/resources/template/js/income/incomeList.js @@ -6,11 +6,13 @@ layui.config({ version: skyeyeVersion }).extend({ window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) { +}).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate', 'fsCommon', 'fsTree'], function (exports) { winui.renderColor(); var $ = layui.$, form = layui.form, laydate = layui.laydate, + fsTree = layui.fsTree, + fsCommon = layui.fsCommon, table = layui.table; authBtn('1571638020191');//新增 authBtn('1572313776196');//导出 @@ -20,31 +22,33 @@ layui.config({ range: '~' }); - table.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - url: reqBasePath + 'income001', - where: getTableParams(), - even: true, - page: true, - limits: getLimits(), - limit: getLimit(), - cols: [[ - { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers'}, - { field: 'billNo', title: '单据编号', align: 'left', width: 200, templet: function(d){ - return '' + d.billNo + ''; - }}, - { field: 'customerName', title: '往来单位', align: 'left', width: 150}, - { field: 'totalPrice', title: '合计金额', align: 'left', width: 120}, - { field: 'hansPersonName', title: '经手人', align: 'left', width: 100}, - { field: 'billTime', title: '单据日期', align: 'center', width: 140 }, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'} - ]], - done: function(){ - matchingLanguage(); - } - }); + function initLoadTable(){ + table.render({ + id: 'messageTable', + elem: '#messageTable', + method: 'post', + url: reqBasePath + 'income001', + where: getTableParams(), + even: true, + page: true, + limits: getLimits(), + limit: getLimit(), + cols: [[ + { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers'}, + { field: 'billNo', title: '单据编号', align: 'left', width: 200, templet: function(d){ + return '' + d.billNo + ''; + }}, + { field: 'customerName', title: '往来单位', align: 'left', width: 150}, + { field: 'totalPrice', title: '合计金额', align: 'left', width: 120}, + { field: 'hansPersonName', title: '经手人', align: 'left', width: 100}, + { field: 'billTime', title: '单据日期', align: 'center', width: 140 }, + { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'} + ]], + done: function(){ + matchingLanguage(); + } + }); + } table.on('tool(messageTable)', function (obj) { var data = obj.data; @@ -58,6 +62,34 @@ layui.config({ } }); + /********* tree 处理 start *************/ + var orderType = ""; + var ztree = null; + fsTree.render({ + id: "treeDemo", + url: "dsFormObjectRelation007?userToken=" + getCookie('userToken') + "&loginPCIp=" + returnCitySN["cip"] + "&firstTypeCode=IFS" + "&language=" + languageType, + clickCallback: onClickTree, + onDblClick: onClickTree + }, function(id){ + ztree = $.fn.zTree.getZTreeObj(id); + initLoadTable(); + }); + + // 异步加载的方法 + function onClickTree(event, treeId, treeNode) { + if(treeNode == undefined) { + orderType = ""; + } else { + if(treeNode.isParent != 0){ + return; + } + // 订单类型 + orderType = treeNode.id; + } + loadTable(); + } + /********* tree 处理 end *************/ + // 编辑 function edit(data){ rowId = data.id; @@ -159,6 +191,7 @@ layui.config({ } return { billNo: $("#billNo").val(), + orderType: orderType, startTime: startTime, endTime: endTime }; diff --git a/ifs/src/main/resources/template/tpl/expenditure/expenditureAdd.html b/ifs/src/main/resources/template/tpl/expenditure/expenditureAdd.html deleted file mode 100644 index 454564314dbb84b7cc1b3189c74ba073db5a438e..0000000000000000000000000000000000000000 --- a/ifs/src/main/resources/template/tpl/expenditure/expenditureAdd.html +++ /dev/null @@ -1,104 +0,0 @@ - - -
- -