提交 84154587 编写于 作者: doc_wei's avatar doc_wei

删除记账支出功能,新增明细账功能

上级 c05cebdf
......@@ -5,6 +5,8 @@
智能办公OA系统[SpringBoot2-快速开发平台],适用于医院,学校,中小型企业等机构的管理。包含文件在线操作、工作日志、多班次考勤、CRM、ERP进销存、项目管理、EHR、拖拽式生成问卷、日程、笔记、工作计划、行政办公、薪资模块、动态表单、知识库、公告模块、企业论坛、云售后模块、生产模块、系统模块化同步模块等多种复杂业务功能。
[近期更新内容](https://mp.weixin.qq.com/s/vdh7-hTAST0IefZdxBEozA)
# 开源版请下载`master`分支
# 开源版请下载`master`分支
# 开源版请下载`master`分支
......
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
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
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
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 '<a lay-event="details" class="notice-title-click">' + d.billNo + '</a>';
}},
{ 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', {});
});
......@@ -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 '<a lay-event="details" class="notice-title-click">' + d.billNo + '</a>';
}},
{ 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 '<a lay-event="details" class="notice-title-click">' + d.billNo + '</a>';
}},
{ 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
};
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="margin: 0 auto; padding: 20px;">
<form class="layui-form" action="" id="showForm">
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">往来单位<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="supplierName" name="supplierName" placeholder="请选择往来单位" class="layui-input" readonly="readonly"/>
<i class="fa fa-plus-circle input-icon" id="supplierNameSel"></i>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">单据日期<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="operTime" name="operTime" win-verify="required" placeholder="请选择单据日期" class="layui-input"/>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">列表项<i class="red">*</i></label>
<div class="layui-input-block">
<div class="winui-toolbar">
<div class="winui-tool" style="text-align: left;">
<button id="addRow" class="winui-toolbtn" type="button"><i class="fa fa-plus" aria-hidden="true"></i>新增行</button>
<button id="deleteRow" class="winui-toolbtn" type="button"><i class="fa fa-trash-o" aria-hidden="true"></i>删除行</button>
</div>
</div>
<table class="layui-table">
<thead>
<tr>
<th style="width: 30px;"></th>
<th style="width: 120px;">支出项目</th>
<th style="width: 80px;">金额</th>
<th style="min-width: 100px;">备注</th>
</tr>
</thead>
<tbody id="useTable" class="insurance-table">
</tbody>
</table>
</div>
</div>
<div class="layui-form-item layui-col-xs3">
<label class="layui-form-label">付款账户<i class="red">*</i></label>
<div class="layui-input-block">
<select id="accountId" lay-search win-verify="required"></select>
</div>
</div>
<div class="layui-form-item layui-col-xs3">
<label class="layui-form-label">共计金额</label>
<div class="layui-input-block ver-center" id="allPrice">
0.00
</div>
</div>
<div class="layui-form-item layui-col-xs3">
<label class="layui-form-label">付款金额<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="changeAmount" name="changeAmount" win-verify="required|money" placeholder="请输入付款金额" class="layui-input" value="0.00"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">经手人<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="handsPersonId" name="handsPersonId" placeholder="请选择经手人员" class="layui-input" style="padding-right: 30px;"/>
<i class="fa fa-user-plus input-icon" id="toHandsPersonSelPeople"></i>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">备注</label>
<div class="layui-input-block">
<textarea id="remark" name="remark" placeholder="请输入备注" class="layui-textarea" style="height: 100px;" maxlength="200"></textarea>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn" lay-submit lay-filter="formAddBean"><language showName="com.skyeye.save"></language></button>
</div>
</div>
</form>
</div>
<!-- usetableTemplate -->
<script type="text/x-handlebars-template" id="usetableTemplate">
<tr trcusid="{{trId}}">
<td><input type="checkbox" rowId="{{id}}" lay-filter="checkboxProperty" name="tableCheckRow"/></td>
<td><select id="{{initemId}}" lay-search win-verify="required"></select></td>
<td><input type="text" class="layui-input rkMoney" id="{{initemMoney}}" win-verify="required|money"/></td>
<td><input type="text" class="layui-input" id="{{remark}}"/></td>
</tr>
</script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/expenditure/'}).use('expenditureAdd');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="margin: 0 auto; padding: 20px;">
<form class="layui-form" action="" id="showForm">
</form>
</div>
<!-- beanTemplate -->
<script type="text/x-handlebars-template" id="beanTemplate">
{{#bean}}
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">往来单位<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="supplierName" name="supplierName" placeholder="请选择往来单位" class="layui-input" readonly="readonly"/>
<i class="fa fa-plus-circle input-icon" id="supplierNameSel"></i>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">单据日期<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="operTime" name="operTime" win-verify="required" placeholder="请选择单据日期" class="layui-input" value="{{billTime}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">列表项<i class="red">*</i></label>
<div class="layui-input-block">
<div class="winui-toolbar">
<div class="winui-tool" style="text-align: left;">
<button id="addRow" class="winui-toolbtn" type="button"><i class="fa fa-plus" aria-hidden="true"></i>新增行</button>
<button id="deleteRow" class="winui-toolbtn" type="button"><i class="fa fa-trash-o" aria-hidden="true"></i>删除行</button>
</div>
</div>
<table class="layui-table">
<thead>
<tr>
<th style="width: 30px;"></th>
<th style="width: 120px;">支出项目</th>
<th style="width: 80px;">金额</th>
<th style="min-width: 100px;">备注</th>
</tr>
</thead>
<tbody id="useTable" class="insurance-table">
</tbody>
</table>
</div>
</div>
<div class="layui-form-item layui-col-xs3">
<label class="layui-form-label">付款账户</label>
<div class="layui-input-block">
<select id="accountId" lay-search></select>
</div>
</div>
<div class="layui-form-item layui-col-xs3">
<label class="layui-form-label">共计金额</label>
<div class="layui-input-block ver-center" id="allPrice">
{{totalPrice}}
</div>
</div>
<div class="layui-form-item layui-col-xs3">
<label class="layui-form-label">付款金额</label>
<div class="layui-input-block">
<input type="text" id="changeAmount" name="changeAmount" win-verify="required|money" placeholder="请输入付款金额" class="layui-input" value="{{changeAmount}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">经手人<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="handsPersonId" name="handsPersonId" placeholder="请选择经手人员" class="layui-input" style="padding-right: 30px;"/>
<i class="fa fa-user-plus input-icon" id="toHandsPersonSelPeople"></i>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">备注</label>
<div class="layui-input-block">
<textarea id="remark" name="remark" placeholder="请输入备注" class="layui-textarea" style="height: 100px;" maxlength="200">{{remark}}</textarea>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn" lay-submit lay-filter="formEditBean"><language showName="com.skyeye.save"></language></button>
</div>
</div>
{{/bean}}
</script>
<!-- usetableTemplate -->
<script type="text/x-handlebars-template" id="usetableTemplate">
<tr trcusid="{{trId}}">
<td><input type="checkbox" rowId="{{id}}" lay-filter="checkboxProperty" name="tableCheckRow"/></td>
<td><select id="{{initemId}}" lay-search win-verify="required"></select></td>
<td><input type="text" class="layui-input rkMoney" id="{{initemMoney}}" win-verify="required|money"/></td>
<td><input type="text" class="layui-input" id="{{remark}}"/></td>
</tr>
</script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/expenditure/'}).use('expenditureEdit');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="padding:20px; margin:0 auto;">
<form class="layui-form" action="" id="showForm">
</form>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block ver-center">
<button class="winui-btn" type="button" id="jprint">打印</button>
</div>
</div>
</div>
<script type="text/x-handlebars-template" id="beanTemplate">
{{#bean}}
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">来往单位</label>
<div class="layui-input-block ver-center">
{{supplierName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">单据日期</label>
<div class="layui-input-block ver-center">
{{operTime}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">单据编号</label>
<div class="layui-input-block ver-center">
{{billNo}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">列表项</label>
<div class="layui-input-block ver-center">
<table class="layui-table">
<thead>
<tr>
<th style="width: 120px;">支出项目</th>
<th style="width: 80px;">金额</th>
<th style="min-width: 100px;">备注</th>
</tr>
</thead>
<tbody id="useTable" class="insurance-table">
{{#each items}}
<tr>
<td>{{inoutitemName}}</td>
<td>{{eachAmount}}</td>
<td>{{remark}}</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
</div>
<div class="layui-form-item layui-col-xs3">
<label class="layui-form-label">付款账户</label>
<div class="layui-input-block ver-center">
{{accountName}}
</div>
</div>
<div class="layui-form-item layui-col-xs3">
<label class="layui-form-label">共计金额</label>
<div class="layui-input-block ver-center">
{{totalPrice}}
</div>
</div>
<div class="layui-form-item layui-col-xs3">
<label class="layui-form-label">付款金额</label>
<div class="layui-input-block ver-center">
{{changeAmount}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">经手人</label>
<div class="layui-input-block ver-center">
{{hansPersonName}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">备注</label>
<div class="layui-input-block ver-center">
{{remark}}
</div>
</div>
{{/bean}}
</script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/expenditure/'}).use('expenditureInfo');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="txtcenter" style="margin:0 auto;padding-top:10px;">
<form class="layui-form layui-form-pane" action="" autocomplete="off">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">单据编号</label>
<div class="layui-input-inline">
<input type="text" id="billNo" name="billNo" placeholder="请输入单据编号" class="layui-input" />
</div>
<label class="layui-form-label">单据日期</label>
<div class="layui-input-inline">
<input type="text" id="billTime" name="billTime" placeholder="请选择单据日期" class="layui-input" />
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" lay-submit lay-filter="formSearch"><language showName="com.skyeye.search2"></language></button>
</div>
</div>
</form>
</div>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="addBean" class="winui-toolbtn" auth="1571810606540"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></language></button>
<button id="downloadExcel" class="winui-toolbtn" auth="1572314337984"><i class="fa fa-download" aria-hidden="true"></i><language showName="com.skyeye.exportExcel"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
{{# if(auth('1571810620779')){ }}
<a class="layui-btn layui-btn-xs" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# if(auth('1571810631964')){ }}
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete"><language showName="com.skyeye.deleteBtn"></language></a>
{{# } }}
</script>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/expenditure/'}).use('expenditureList');
</script>
</body>
</html>
\ No newline at end of file
......@@ -5,6 +5,8 @@
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
<link href="../../assets/lib/layui/lay/modules/ztree/css/zTreeStyle/zTreeStyle.css" rel="stylesheet" />
<link href="../../assets/lib/layui/lay/modules/contextMenu/jquery.contextMenu.min.css" rel="stylesheet" />
</head>
<body>
<div class="txtcenter" style="margin: 0 auto; padding-top: 10px;">
......@@ -32,20 +34,31 @@
<button id="downloadExcel" class="winui-toolbtn" auth="1572313776196"><i class="fa fa-download" aria-hidden="true"></i><language showName="com.skyeye.exportExcel"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
{{# if(auth('1571638030608')){ }}
<a class="layui-btn layui-btn-xs" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# if(auth('1571638039187')){ }}
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete"><language showName="com.skyeye.deleteBtn"></language></a>
{{# } }}
</script>
<div class="layui-row">
<div style="width: 150px; float: left;">
<ul id="treeDemo" class="ztree fsTree" method="get" isRoot="1" treeIdKey="id" inputs="parentId" treePIdKey="pId" clickCallbackInputs="parentId:$id" treeName="name"></ul>
</div>
<div style="width: calc(100% - 150px); float: left;">
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
</div>
</div>
</div>
<script type="text/html" id="tableBar">
{{# if(auth('1571638030608')){ }}
<a class="layui-btn layui-btn-xs" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# if(auth('1571638039187')){ }}
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete"><language showName="com.skyeye.deleteBtn"></language></a>
{{# } }}
</script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript" src="../../assets/lib/layui/lay/modules/jquery-min.js"></script>
<script type="text/javascript" src="../../assets/lib/layui/lay/modules/contextMenu/jquery.contextMenu.min.js"></script>
<script type="text/javascript" src="../../assets/lib/layui/lay/modules/ztree/js/jquery.ztree.all.min.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/income/'}).use('incomeList');
</script>
......
......@@ -10,7 +10,6 @@ layui.config({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form', 'fsCommon', 'fsTree'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
fsTree = layui.fsTree,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册