切换到jsh的版本

This commit is contained in:
qiankunpingtai
2019-11-08 20:34:36 +08:00
parent 9182e734fc
commit 7cabc39ab8
125 changed files with 1692 additions and 46688 deletions

View File

@@ -129,18 +129,12 @@
},
{title: '备注', field: 'remark', width: 100},
{
title: '操作', field: 'op', align: "center", width: 210, formatter: function (value, rec,index) {
/**
* create by: qiankunpingtai
* create time: 2019/5/5 10:30
* websitehttps://qiankunpingtai.cn
* description:
* 修改效率低下的js实现
*/
title: '操作', field: 'op', align: "center", width: 210, formatter: function (value, rec) {
var str = '';
str += '<img src="/js/easyui-1.3.5/themes/icons/list.png" style="cursor: pointer;" onclick="showAccountInOutList(\'' + index + '\');"/>&nbsp;<a onclick="showAccountInOutList(\'' + index + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">流水</a>&nbsp;&nbsp;';
str += '<img src="/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editAccount(\'' + index + '\');"/>&nbsp;<a onclick="editAccount(\'' + index + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a>&nbsp;&nbsp;';
str += '<img src="/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteAccount(\'' + rec.id + '\');"/>&nbsp;<a onclick="deleteAccount(\'' + rec.id + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>&nbsp;&nbsp;';
var rowInfo = rec.id + 'AaBb' + rec.name + 'AaBb' + rec.serialno + 'AaBb' + rec.initialamount + 'AaBb' + rec.currentamount + 'AaBb' + rec.remark;
str += '<img src="/js/easyui-1.3.5/themes/icons/list.png" style="cursor: pointer;" onclick="showAccountInOutList(\'' + rowInfo + '\');"/>&nbsp;<a onclick="showAccountInOutList(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">流水</a>&nbsp;&nbsp;';
str += '<img src="/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editAccount(\'' + rowInfo + '\');"/>&nbsp;<a onclick="editAccount(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a>&nbsp;&nbsp;';
str += '<img src="/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteAccount(\'' + rowInfo + '\');"/>&nbsp;<a onclick="deleteAccount(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>&nbsp;&nbsp;';
return str;
}
}
@@ -221,16 +215,16 @@
}
//删除结算账户
function deleteAccount(id) {
function deleteAccount(accountInfo) {
$.messager.confirm('删除确认', '确定要删除此结算账户吗?', function (r) {
if (r) {
// var accountTotalInfo = accountInfo.split("AaBb");
var accountTotalInfo = accountInfo.split("AaBb");
$.ajax({
type: "post",
url: "/account/batchDeleteAccountByIds",
dataType: "json",
data: ({
ids: id
ids: accountTotalInfo[0]
}),
success: function (res) {
if(res && res.code == 200) {
@@ -238,7 +232,7 @@
} else {
if(res && res.code == 601){
var jsondata={};
jsondata.ids=id;
jsondata.ids=accountTotalInfo[0];
jsondata.deleteType='2';
var type='single';
batDeleteAccountForceConfirm(res,"/account/batchDeleteAccountByIds",jsondata,type);
@@ -443,22 +437,23 @@
});
//编辑结算账户
function editAccount(index) {
var rowsdata = $("#tableData").datagrid("getRows")[index];
function editAccount(accountTotalInfo) {
var accountInfo = accountTotalInfo.split("AaBb");
var row = {
name: rowsdata.name,
serialNo: rowsdata.serialNo,
initialAmount: rowsdata.initialamount,
currentAmount: rowsdata.currentamount,
remark: rowsdata.remark
name: accountInfo[1],
serialNo: accountInfo[2],
initialAmount: accountInfo[3],
currentAmount: accountInfo[4],
remark: accountInfo[5]
};
oldAccount = rowsdata.name;
oldAccount = accountInfo[1];
$('#accountDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑结算账户');
$(".window-mask").css({width: webW, height: webH});
$('#accountFM').form('load', row);
accountID = accountInfo[0];
//焦点在名称输入框==定焦在输入文字后面
$("#account").val("").focus().val(rowsdata.name);
url = '/account/update?id=' + rowsdata.id;
$("#account").val("").focus().val(accountInfo[1]);
url = '/account/update?id=' + accountInfo[0];
}
//检查结算账户 名称是否存在 ++ 重名无法提示问题需要跟进
@@ -545,11 +540,10 @@
});
}
function showAccountInOutList(index) {
//获取当前行
var rowsdata = $("#tableData").datagrid("getRows")[index];
var accountId = rowsdata.id;
var initialAmount = rowsdata.serialno;
function showAccountInOutList(accountInfo) {
var info = accountInfo.split("AaBb");
var accountId = info[0];
var initialAmount = info[3];
$('#accountDetailListDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;查看账户流水');
$(".window-mask").css({width: webW, height: webH});
initAccountDetailData(accountId);