Commit 7cabc39a authored by qiankunpingtai's avatar qiankunpingtai
Browse files

切换到jsh的版本

parent 9182e734
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<script src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="/js/My97DatePicker/WdatePicker.js"></script> <script src="/js/My97DatePicker/WdatePicker.js"></script>
<script src="/js/common/common.js"></script> <script src="/js/common/common.js"></script>
<script src="/js/pages/financial/advance_in.js"></script> <script src="/js/pages/financial/financial_base.js"></script>
</head> </head>
<body> <body>
<!-- 数据显示table --> <!-- 数据显示table -->
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<script src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="/js/My97DatePicker/WdatePicker.js"></script> <script src="/js/My97DatePicker/WdatePicker.js"></script>
<script src="/js/common/common.js"></script> <script src="/js/common/common.js"></script>
<script src="/js/pages/financial/giro.js"></script> <script src="/js/pages/financial/financial_base.js"></script>
</head> </head>
<body> <body>
<!-- 数据显示table --> <!-- 数据显示table -->
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<script src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="/js/My97DatePicker/WdatePicker.js"></script> <script src="/js/My97DatePicker/WdatePicker.js"></script>
<script src="/js/common/common.js"></script> <script src="/js/common/common.js"></script>
<script src="/js/pages/financial/item_in.js"></script> <script src="/js/pages/financial/financial_base.js"></script>
</head> </head>
<body> <body>
<!-- 数据显示table --> <!-- 数据显示table -->
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<script src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="/js/My97DatePicker/WdatePicker.js"></script> <script src="/js/My97DatePicker/WdatePicker.js"></script>
<script src="/js/common/common.js"></script> <script src="/js/common/common.js"></script>
<script src="/js/pages/financial/item_out.js"></script> <script src="/js/pages/financial/financial_base.js"></script>
</head> </head>
<body> <body>
<!-- 数据显示table --> <!-- 数据显示table -->
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<script src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="/js/My97DatePicker/WdatePicker.js"></script> <script src="/js/My97DatePicker/WdatePicker.js"></script>
<script src="/js/common/common.js"></script> <script src="/js/common/common.js"></script>
<script src="/js/pages/financial/money_in.js"></script> <script src="/js/pages/financial/financial_base.js"></script>
</head> </head>
<body> <body>
<!-- 数据显示table --> <!-- 数据显示table -->
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<script src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script src="/js/My97DatePicker/WdatePicker.js"></script> <script src="/js/My97DatePicker/WdatePicker.js"></script>
<script src="/js/common/common.js"></script> <script src="/js/common/common.js"></script>
<script src="/js/pages/financial/money_out.js"></script> <script src="/js/pages/financial/financial_base.js"></script>
</head> </head>
<body> <body>
<!-- 数据显示table --> <!-- 数据显示table -->
......
...@@ -129,18 +129,12 @@ ...@@ -129,18 +129,12 @@
}, },
{title: '备注', field: 'remark', width: 100}, {title: '备注', field: 'remark', width: 100},
{ {
title: '操作', field: 'op', align: "center", width: 210, formatter: function (value, rec,index) { title: '操作', field: 'op', align: "center", width: 210, formatter: function (value, rec) {
/**
* create by: qiankunpingtai
* create time: 2019/5/5 10:30
* website:https://qiankunpingtai.cn
* description:
* 修改效率低下的js实现
*/
var str = ''; 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;'; 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/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/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/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;'; 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; return str;
} }
} }
...@@ -221,16 +215,16 @@ ...@@ -221,16 +215,16 @@
} }
//删除结算账户 //删除结算账户
function deleteAccount(id) { function deleteAccount(accountInfo) {
$.messager.confirm('删除确认', '确定要删除此结算账户吗?', function (r) { $.messager.confirm('删除确认', '确定要删除此结算账户吗?', function (r) {
if (r) { if (r) {
// var accountTotalInfo = accountInfo.split("AaBb"); var accountTotalInfo = accountInfo.split("AaBb");
$.ajax({ $.ajax({
type: "post", type: "post",
url: "/account/batchDeleteAccountByIds", url: "/account/batchDeleteAccountByIds",
dataType: "json", dataType: "json",
data: ({ data: ({
ids: id ids: accountTotalInfo[0]
}), }),
success: function (res) { success: function (res) {
if(res && res.code == 200) { if(res && res.code == 200) {
...@@ -238,7 +232,7 @@ ...@@ -238,7 +232,7 @@
} else { } else {
if(res && res.code == 601){ if(res && res.code == 601){
var jsondata={}; var jsondata={};
jsondata.ids=id; jsondata.ids=accountTotalInfo[0];
jsondata.deleteType='2'; jsondata.deleteType='2';
var type='single'; var type='single';
batDeleteAccountForceConfirm(res,"/account/batchDeleteAccountByIds",jsondata,type); batDeleteAccountForceConfirm(res,"/account/batchDeleteAccountByIds",jsondata,type);
...@@ -443,22 +437,23 @@ ...@@ -443,22 +437,23 @@
}); });
//编辑结算账户 //编辑结算账户
function editAccount(index) { function editAccount(accountTotalInfo) {
var rowsdata = $("#tableData").datagrid("getRows")[index]; var accountInfo = accountTotalInfo.split("AaBb");
var row = { var row = {
name: rowsdata.name, name: accountInfo[1],
serialNo: rowsdata.serialNo, serialNo: accountInfo[2],
initialAmount: rowsdata.initialamount, initialAmount: accountInfo[3],
currentAmount: rowsdata.currentamount, currentAmount: accountInfo[4],
remark: rowsdata.remark 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;编辑结算账户'); $('#accountDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑结算账户');
$(".window-mask").css({width: webW, height: webH}); $(".window-mask").css({width: webW, height: webH});
$('#accountFM').form('load', row); $('#accountFM').form('load', row);
accountID = accountInfo[0];
//焦点在名称输入框==定焦在输入文字后面 //焦点在名称输入框==定焦在输入文字后面
$("#account").val("").focus().val(rowsdata.name); $("#account").val("").focus().val(accountInfo[1]);
url = '/account/update?id=' + rowsdata.id; url = '/account/update?id=' + accountInfo[0];
} }
//检查结算账户 名称是否存在 ++ 重名无法提示问题需要跟进 //检查结算账户 名称是否存在 ++ 重名无法提示问题需要跟进
...@@ -545,11 +540,10 @@ ...@@ -545,11 +540,10 @@
}); });
} }
function showAccountInOutList(index) { function showAccountInOutList(accountInfo) {
//获取当前行 var info = accountInfo.split("AaBb");
var rowsdata = $("#tableData").datagrid("getRows")[index]; var accountId = info[0];
var accountId = rowsdata.id; var initialAmount = info[3];
var initialAmount = rowsdata.serialno;
$('#accountDetailListDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;查看账户流水'); $('#accountDetailListDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;查看账户流水');
$(".window-mask").css({width: webW, height: webH}); $(".window-mask").css({width: webW, height: webH});
initAccountDetailData(accountId); initAccountDetailData(accountId);
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<script type="text/javascript" src="/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="/js/common/common.js"></script> <script type="text/javascript" src="/js/common/common.js"></script>
<script src="/js/pages/manage/customer.js"></script> <script src="/js/pages/manage/supplier.js"></script>
</head> </head>
<body> <body>
<!-- 数据显示table --> <!-- 数据显示table -->
......
...@@ -483,26 +483,25 @@ ...@@ -483,26 +483,25 @@
}); });
//编辑信息 //编辑信息
function editDepot(index) { function editDepot(depotTotalInfo) {
// var depotInfo = depotTotalInfo.split("AaBb"); var depotInfo = depotTotalInfo.split("AaBb");
var rowsdata = $("#tableData").datagrid("getRows")[index];
$("#name").focus().val(rowsdata.name); $("#name").focus().val(depotInfo[1]);
$("#sort").val(rowsdata.sort); $("#sort").val(depotInfo[2]);
$("#remark").val(rowsdata.remark); $("#remark").val(depotInfo[3]);
$("#address").val(rowsdata.address); $("#address").val(depotInfo[4]);
$("#warehousing").val(rowsdata.warehousing); $("#warehousing").val(depotInfo[5].replace("undefined",""));
$("#truckage").val(rowsdata.truckage); $("#truckage").val(depotInfo[6].replace("undefined",""));
$("#principalName").val(transferUndefined(rowsdata.principalName)); $("#principalName").val(depotInfo[7]);
$("#principal").val(transferUndefined(rowsdata.principal)); $("#principal").val(depotInfo[8]);
$("#selectType").val("principal"); $("#selectType").val("principal");
oldDepot = rowsdata.name; oldDepot = depotInfo[1];
$('#depotDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑仓库信息'); $('#depotDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑仓库信息');
$(".window-mask").css({width: webW, height: webH}); $(".window-mask").css({width: webW, height: webH});
depotID = rowsdata.id; depotID = depotInfo[0];
//焦点在名称输入框==定焦在输入文字后面 //焦点在名称输入框==定焦在输入文字后面
$("#name").val("").focus().val(rowsdata.name); $("#name").val("").focus().val(depotInfo[1]);
url = '/depot/update?id=' + rowsdata.id; url = '/depot/update?id=' + depotInfo[0];
} }
//检查名称是否存在 ++ 重名无法提示问题需要跟进 //检查名称是否存在 ++ 重名无法提示问题需要跟进
......
...@@ -167,11 +167,11 @@ ...@@ -167,11 +167,11 @@
}, },
{title: '类型', field: 'type', width: 50}, {title: '类型', field: 'type', width: 50},
{ {
title: '操作', field: 'op', align: "center", width: 130, formatter: function (value, rec,index) { title: '操作', field: 'op', align: "center", width: 130, formatter: function (value, rec) {
var str = ''; var str = '';
// var rowInfo = rec.id + 'AaBb' + rec.number + 'AaBb' + rec.name + 'AaBb' + rec.pnumber + 'AaBb' + rec.url var rowInfo = rec.id + 'AaBb' + rec.number + 'AaBb' + rec.name + 'AaBb' + rec.pnumber + 'AaBb' + rec.url
// + 'AaBb' + rec.state + 'AaBb' + rec.sort + 'AaBb' + rec.enabled + 'AaBb' + rec.type + 'AaBb' + rec.pushbtn; + 'AaBb' + rec.state + 'AaBb' + rec.sort + 'AaBb' + rec.enabled + 'AaBb' + rec.type + 'AaBb' + rec.pushbtn;
str += '<img src="/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editFunctions(\'' + index + '\');"/>&nbsp;<a onclick="editFunctions(\'' + 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="editFunctions(\'' + rowInfo + '\');"/>&nbsp;<a onclick="editFunctions(\'' + 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="deleteFunctions(' + rec.id + ');"/>&nbsp;<a onclick="deleteFunctions(' + rec.id + ');" 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="deleteFunctions(' + rec.id + ');"/>&nbsp;<a onclick="deleteFunctions(' + rec.id + ');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>&nbsp;&nbsp;';
return str; return str;
} }
...@@ -381,20 +381,19 @@ ...@@ -381,20 +381,19 @@
}); });
//编辑信息 //编辑信息
function editFunctions(index) { function editFunctions(functionsTotalInfo) {
// var functionsInfo = functionsTotalInfo.split("AaBb"); var functionsInfo = functionsTotalInfo.split("AaBb");
var rowsdata = $("#tableData").datagrid("getRows")[index];
$("#Number").focus().val(rowsdata.number); $("#Number").focus().val(functionsInfo[1]);
$("#Name").focus().val(rowsdata.name); $("#Name").focus().val(functionsInfo[2]);
$("#PNumber").focus().val(rowsdata.pnumber); $("#PNumber").focus().val(functionsInfo[3]);
$("#URL").focus().val(rowsdata.url); $("#URL").focus().val(functionsInfo[4]);
$("#State").attr("checked", rowsdata.state === true ? true : false); $("#State").attr("checked", functionsInfo[5] == 'true' ? true : false);
$("#Sort").focus().val(rowsdata.sort); $("#Sort").focus().val(functionsInfo[6]);
$("#Enabled").attr("checked", rowsdata.enabled === true ? true : false); $("#Enabled").attr("checked", functionsInfo[7] == 'true' ? true : false);
$("#Type").focus().val(rowsdata.type); $("#Type").focus().val(functionsInfo[8]);
var pushbtn=rowsdata.pushbtn; if (functionsInfo[9] !== "undefined" && functionsInfo[9] !== "") {
if (pushbtn) { var arr = functionsInfo[9].split(",");
var arr = pushbtn.split(",");
var pushBtnArray = []; var pushBtnArray = [];
for (var i = 0; i < arr.length; i++) { for (var i = 0; i < arr.length; i++) {
if (arr[i]) { if (arr[i]) {
...@@ -409,13 +408,13 @@ ...@@ -409,13 +408,13 @@
$("#PushBtn").combobox('setValues', ''); $("#PushBtn").combobox('setValues', '');
} }
oldFunctions = rowsdata.name; oldFunctions = functionsInfo[2];
$('#functionsDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑功能信息'); $('#functionsDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑功能信息');
$(".window-mask").css({width: webW, height: webH}); $(".window-mask").css({width: webW, height: webH});
functionsID = rowsdata.id; functionsID = functionsInfo[0];
//焦点在名称输入框==定焦在输入文字后面 //焦点在名称输入框==定焦在输入文字后面
$("#Name").val("").focus().val(rowsdata.name); $("#Name").val("").focus().val(functionsInfo[2]);
url = '/functions/update?id=' + rowsdata.id; url = '/functions/update?id=' + functionsInfo[0];
} }
//检查名称是否存在 ++ 重名无法提示问题需要跟进 //检查名称是否存在 ++ 重名无法提示问题需要跟进
......
...@@ -136,18 +136,11 @@ ...@@ -136,18 +136,11 @@
{title: '类型', field: 'type', width: 100, align: "center"}, {title: '类型', field: 'type', width: 100, align: "center"},
{title: '描述', field: 'remark', width: 200}, {title: '描述', field: 'remark', width: 200},
{ {
title: '操作', field: 'op', align: "center", width: 130, formatter: function (value, rec,index) { title: '操作', field: 'op', align: "center", width: 130, formatter: function (value, rec) {
/**
* create by: qiankunpingtai
* create time: 2019/5/5 10:30
* website:https://qiankunpingtai.cn
* description:
* 修改效率低下的js实现
*/
var str = ''; var str = '';
// var rowInfo = rec.id + 'AaBb' + rec.name + 'AaBb' + rec.type + 'AaBb' + rec.remark; var rowInfo = rec.id + 'AaBb' + rec.name + 'AaBb' + rec.type + 'AaBb' + rec.remark;
str += '<img src="/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editInOutItem(\'' + index + '\');"/>&nbsp;<a onclick="editInOutItem(\'' + 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="editInOutItem(\'' + rowInfo + '\');"/>&nbsp;<a onclick="editInOutItem(\'' + 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="deleteInOutItem(\'' + rec.id + '\');"/>&nbsp;<a onclick="deleteInOutItem(\'' + rec.id + '\');" 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="deleteInOutItem(\'' + rowInfo + '\');"/>&nbsp;<a onclick="deleteInOutItem(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>&nbsp;&nbsp;';
return str; return str;
} }
} }
...@@ -221,16 +214,16 @@ ...@@ -221,16 +214,16 @@
} }
//删除收支项目 //删除收支项目
function deleteInOutItem(id) { function deleteInOutItem(inOutItemInfo) {
$.messager.confirm('删除确认', '确定要删除此收支项目吗?', function (r) { $.messager.confirm('删除确认', '确定要删除此收支项目吗?', function (r) {
if (r) { if (r) {
// var inOutItemTotalInfo = inOutItemInfo.split("AaBb"); var inOutItemTotalInfo = inOutItemInfo.split("AaBb");
$.ajax({ $.ajax({
type: "post", type: "post",
url: "/inOutItem/batchDeleteInOutItemByIds", url: "/inOutItem/batchDeleteInOutItemByIds",
dataType: "json", dataType: "json",
data: ({ data: ({
ids: id ids: inOutItemTotalInfo[0]
}), }),
success: function (res) { success: function (res) {
if(res && res.code == 200) { if(res && res.code == 200) {
...@@ -238,7 +231,7 @@ ...@@ -238,7 +231,7 @@
} else { } else {
if(res && res.code == 601){ if(res && res.code == 601){
var jsondata={}; var jsondata={};
jsondata.ids=id; jsondata.ids=inOutItemTotalInfo[0];
jsondata.deleteType='2'; jsondata.deleteType='2';
var type='single'; var type='single';
batDeleteInOutItemForceConfirm(res,"/inOutItem/batchDeleteInOutItemByIds",jsondata,type); batDeleteInOutItemForceConfirm(res,"/inOutItem/batchDeleteInOutItemByIds",jsondata,type);
...@@ -400,23 +393,21 @@ ...@@ -400,23 +393,21 @@
}); });
//编辑收支项目 //编辑收支项目
function editInOutItem(index) { function editInOutItem(inOutItemTotalInfo) {
// var inOutItemInfo = inOutItemTotalInfo.split("AaBb"); var inOutItemInfo = inOutItemTotalInfo.split("AaBb");
//获取当前行
var rowsdata = $("#tableData").datagrid("getRows")[index];
var row = { var row = {
name: rowsdata.name, name: inOutItemInfo[1],
type: rowsdata.type, type: inOutItemInfo[2],
remark: rowsdata.remark remark: inOutItemInfo[3]
}; };
oldInOutItem = rowsdata.name; oldInOutItem = inOutItemInfo[1];
$('#inOutItemDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑收支项目'); $('#inOutItemDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑收支项目');
$(".window-mask").css({width: webW, height: webH}); $(".window-mask").css({width: webW, height: webH});
$('#inOutItemFM').form('load', row); $('#inOutItemFM').form('load', row);
inOutItemID = rowsdata.id; inOutItemID = inOutItemInfo[0];
//焦点在名称输入框==定焦在输入文字后面 //焦点在名称输入框==定焦在输入文字后面
$("#inOutItem").val("").focus().val(rowsdata.name); $("#inOutItem").val("").focus().val(inOutItemInfo[1]);
url = '/inOutItem/update?id=' + rowsdata.id; url = '/inOutItem/update?id=' + inOutItemInfo[0];
} }
//检查收支项目 名称是否存在 ++ 重名无法提示问题需要跟进 //检查收支项目 名称是否存在 ++ 重名无法提示问题需要跟进
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<script type="text/javascript" src="/js/easyui-1.3.5/jquery.easyui.min.js"></script> <script type="text/javascript" src="/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script> <script type="text/javascript" src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="/js/common/common.js"></script> <script type="text/javascript" src="/js/common/common.js"></script>
<script src="/js/pages/manage/member.js"></script> <script src="/js/pages/manage/supplier.js"></script>
</head> </head>
<body> <body>
<!-- 数据显示table --> <!-- 数据显示table -->
......
...@@ -117,17 +117,10 @@ ...@@ -117,17 +117,10 @@
{field: 'id', width: 35, align: "center", checkbox: true}, {field: 'id', width: 35, align: "center", checkbox: true},
{title: '角色名称', field: 'name', width: 200}, {title: '角色名称', field: 'name', width: 200},
{ {
title: '操作', field: 'op', align: "center", width: 130, formatter: function (value, rec,index) { title: '操作', field: 'op', align: "center", width: 130, formatter: function (value, rec) {
/**
* create by: qiankunpingtai
* create time: 2019/5/5 10:30
* website:https://qiankunpingtai.cn
* description:
* 修改效率低下的js实现
*/
var str = ''; var str = '';
// var rowInfo = rec.id + 'AaBb' + rec.name; var rowInfo = rec.id + 'AaBb' + rec.name;
str += '<img src="/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editRole(\'' + index + '\');"/>&nbsp;<a onclick="editRole(\'' + 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="editRole(\'' + rowInfo + '\');"/>&nbsp;<a onclick="editRole(\'' + 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="deleteRole(' + rec.id + ');"/>&nbsp;<a onclick="deleteRole(' + rec.id + ');" 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="deleteRole(' + rec.id + ');"/>&nbsp;<a onclick="deleteRole(' + rec.id + ');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>&nbsp;&nbsp;';
return str; return str;
} }
...@@ -320,18 +313,18 @@ ...@@ -320,18 +313,18 @@
}); });
//编辑信息 //编辑信息
function editRole(index) { function editRole(roleTotalInfo) {
// var roleInfo = roleTotalInfo.split("AaBb"); var roleInfo = roleTotalInfo.split("AaBb");
var rowsdata = $("#tableData").datagrid("getRows")[index];
$("#name").focus().val(rowsdata.name);
oldName = rowsdata.name; $("#name").focus().val(roleInfo[1]);
oldName = roleInfo[1];
$('#roleDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑角色信息'); $('#roleDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑角色信息');
$(".window-mask").css({width: webW, height: webH}); $(".window-mask").css({width: webW, height: webH});
roleID = rowsdata.id; roleID = roleInfo[0];
//焦点在名称输入框==定焦在输入文字后面 //焦点在名称输入框==定焦在输入文字后面
$("#name").val("").focus().val(rowsdata.name); $("#name").val("").focus().val(roleInfo[1]);
url = '/role/update?id=' + rowsdata.id; url = '/role/update?id=' + roleInfo[0];
} }
//检查名称是否存在 ++ 重名无法提示问题需要跟进 //检查名称是否存在 ++ 重名无法提示问题需要跟进
...@@ -393,7 +386,9 @@ ...@@ -393,7 +386,9 @@
url: "/role/list", url: "/role/list",
dataType: "json", dataType: "json",
data: ({ data: ({
name: searchName, search: JSON.stringify({
name: searchName
}),
currentPage: pageNo, currentPage: pageNo,
pageSize: pageSize pageSize: pageSize
}), }),
......
...@@ -48,17 +48,16 @@ ...@@ -48,17 +48,16 @@
} }
} }
//cnodes = cnodes.substring(0, cnodes.length - 1); //cnodes = cnodes.substring(0, cnodes.length - 1);
// pnodes = pnodes.substring(0, pnodes.length - 1); pnodes = pnodes.substring(0, pnodes.length - 1);
if (ctype == 'child') { if (ctype == 'child') {
return cnodes; return cnodes;
} }
else if("all"){ else {
return cnodes+pnodes; return pnodes
}else{
return pnodes;
} }
} ;
};
$(function () { $(function () {
...@@ -85,7 +84,7 @@ ...@@ -85,7 +84,7 @@
info: JSON.stringify({ info: JSON.stringify({
type: type, type: type,
keyid: url_id, keyid: url_id,
value: GetNode('all') value: GetNode('child')
}) })
}, },
dataType: "json", dataType: "json",
......
...@@ -133,18 +133,12 @@ ...@@ -133,18 +133,12 @@
} }
}, },
{ {
title: '操作', field: 'op', width: 160, formatter: function (value, rec,index) { title: '操作', field: 'op', width: 160, formatter: function (value, rec) {
/**
* create by: qiankunpingtai
* create time: 2019/5/6 9:33
* website:https://qiankunpingtai.cn
* description:
* 修改效率低下的js实现
*/
var str = ''; var str = '';
// var rowInfo = rec.id + 'AaBb' + rec.companyName + 'AaBb' + rec.companyContacts + 'AaBb' + rec.companyAddress var rowInfo = rec.id + 'AaBb' + rec.companyName + 'AaBb' + rec.companyContacts + 'AaBb' + rec.companyAddress
// + 'AaBb' + rec.companyTel + 'AaBb' + rec.companyFax + 'AaBb' + rec.companyPostCode; + 'AaBb' + rec.companyTel + 'AaBb' + rec.companyFax + 'AaBb' + rec.companyPostCode
str += '<img src="/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editSystemConfig(\'' + index + '\');"/>&nbsp;<a onclick="editSystemConfig(\'' + index + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a>&nbsp;&nbsp;'; + 'AaBb' + rec.depotFlag + 'AaBb' + rec.customerFlag;
str += '<img src="/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editSystemConfig(\'' + rowInfo + '\');"/>&nbsp;<a onclick="editSystemConfig(\'' + 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="deleteSystemConfig(' + rec.id + ');"/>&nbsp;<a onclick="deleteSystemConfig(' + rec.id + ');" 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="deleteSystemConfig(' + rec.id + ');"/>&nbsp;<a onclick="deleteSystemConfig(' + rec.id + ');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>&nbsp;&nbsp;';
return str; return str;
} }
...@@ -357,26 +351,26 @@ ...@@ -357,26 +351,26 @@
}); });
//编辑系统配置信息 //编辑系统配置信息
function editSystemConfig(index) { function editSystemConfig(systemConfigTotalInfo) {
// var systemConfigInfo = systemConfigTotalInfo.split("AaBb"); var systemConfigInfo = systemConfigTotalInfo.split("AaBb");
//获取当前行
var rowsdata = $("#tableData").datagrid("getRows")[index];
var row = { var row = {
companyName: rowsdata.companyName, companyName: systemConfigInfo[1],
companyContacts: rowsdata.companyContacts, companyContacts: systemConfigInfo[2],
companyAddress: rowsdata.companyAddress, companyAddress: systemConfigInfo[3],
companyTel: rowsdata.companyTel, companyTel: systemConfigInfo[4],
companyFax: rowsdata.companyFax, companyFax: systemConfigInfo[5],
companyPostCode: rowsdata.companyPostCode companyPostCode: systemConfigInfo[6]
}; };
oldCompanyName = rowsdata.companyName; oldCompanyName = systemConfigInfo[1];
$('#systemConfigDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑系统配置信息'); $('#systemConfigDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑系统配置信息');
$(".window-mask").css({width: webW, height: webH}); $(".window-mask").css({width: webW, height: webH});
$('#systemConfigFM').form('load', row); $('#systemConfigFM').form('load', row);
systemConfigId = rowsdata.id; systemConfigId = systemConfigInfo[0];
//焦点在名称输入框==定焦在输入文字后面 //焦点在名称输入框==定焦在输入文字后面
$("#companyName").val("").focus().val(rowsdata.companyName); $("#companyName").val("").focus().val(systemConfigInfo[1]);
url = '/systemConfig/update?id=' + rowsdata.id; $("#depotFlag").attr("checked", systemConfigInfo[7] == '1' ? true : false);
$("#customerFlag").attr("checked", systemConfigInfo[8] == '1' ? true : false);
url = '/systemConfig/update?id=' + systemConfigInfo[0];
} }
//检查系统配置 名称是否存在 ++ 重名无法提示问题需要跟进 //检查系统配置 名称是否存在 ++ 重名无法提示问题需要跟进
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment