账户和系统配置页面优化

This commit is contained in:
季圣华
2020-04-19 14:30:08 +08:00
parent f26c9b20fe
commit 60234752f2
2 changed files with 19 additions and 24 deletions

View File

@@ -142,7 +142,6 @@
{ {
title: '操作', field: 'op', align: "center", width: 210, formatter: function (value, rec, index) { title: '操作', field: 'op', align: "center", width: 210, formatter: function (value, rec, index) {
var str = ''; var str = '';
var rowInfo = rec.id + 'AaBb' + rec.name + 'AaBb' + rec.serialno + 'AaBb' + rec.initialamount + 'AaBb' + rec.currentamount + 'AaBb' + rec.remark;
str += '<img src="/js/easyui/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/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/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/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/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/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;';

View File

@@ -134,12 +134,10 @@
columns: [[ columns: [[
{field: 'id', width: 35, align: "center", checkbox:true}, {field: 'id', width: 35, align: "center", checkbox:true},
{ {
title: '操作', field: 'op', align: "center", width: 80, formatter: function (value, rec) { title: '操作', field: 'op', align: "center", width: 80,
formatter: function (value, rec, index) {
var str = ''; var str = '';
var rowInfo = rec.id + 'AaBb' + rec.companyName + 'AaBb' + rec.companyContacts + 'AaBb' + rec.companyAddress str += '<img src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editSystemConfig(\'' + index + '\');"/>&nbsp;&nbsp;&nbsp;';
+ 'AaBb' + rec.companyTel + 'AaBb' + rec.companyFax + 'AaBb' + rec.companyPostCode
+ 'AaBb' + rec.depotFlag + 'AaBb' + rec.customerFlag;
str += '<img src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editSystemConfig(\'' + rowInfo + '\');"/>&nbsp;&nbsp;&nbsp;';
str += '<img src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteSystemConfig(' + rec.id + ');"/>'; str += '<img src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteSystemConfig(' + rec.id + ');"/>';
return str; return str;
} }
@@ -340,7 +338,7 @@
if (checkCompanyName()) { if (checkCompanyName()) {
return; return;
} }
var companyName = $.trim($("#companyName").val()); var companyName = $.trim($("#companyName").textbox("getValue"));
if (!companyName) { if (!companyName) {
$.messager.alert('提示', '公司名称不能为空', 'warning'); $.messager.alert('提示', '公司名称不能为空', 'warning');
$("#companyName").val("").focus(); $("#companyName").val("").focus();
@@ -373,31 +371,29 @@
}); });
//编辑系统配置信息 //编辑系统配置信息
function editSystemConfig(systemConfigTotalInfo) { function editSystemConfig(index) {
var systemConfigInfo = systemConfigTotalInfo.split("AaBb"); var res = $("#tableData").datagrid("getRows")[index];
var row = { var row = {
companyName: systemConfigInfo[1], companyName: res.companyName,
companyContacts: systemConfigInfo[2], companyContacts: res.companyContacts,
companyAddress: systemConfigInfo[3], companyAddress: res.companyAddress,
companyTel: systemConfigInfo[4], companyTel: res.companyTel,
companyFax: systemConfigInfo[5], companyFax: res.companyFax,
companyPostCode: systemConfigInfo[6] companyPostCode: res.companyPostCode
}; };
oldCompanyName = systemConfigInfo[1]; oldCompanyName = res.companyName;
$('#systemConfigDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/>&nbsp;编辑系统配置信息'); $('#systemConfigDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/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 = systemConfigInfo[0]; systemConfigId = res.id;
//焦点在名称输入框==定焦在输入文字后面 $("#depotFlag").attr("checked", res.depotFlag == '1' ? true : false);
$("#companyName").val("").focus().val(systemConfigInfo[1]); $("#customerFlag").attr("checked", res.customerFlag == '1' ? true : false);
$("#depotFlag").attr("checked", systemConfigInfo[7] == '1' ? true : false); url = '/systemConfig/update?id=' + res.id;
$("#customerFlag").attr("checked", systemConfigInfo[8] == '1' ? true : false);
url = '/systemConfig/update?id=' + systemConfigInfo[0];
} }
//检查系统配置 名称是否存在 ++ 重名无法提示问题需要跟进 //检查系统配置 名称是否存在 ++ 重名无法提示问题需要跟进
function checkCompanyName() { function checkCompanyName() {
var companyName = $.trim($("#companyName").val()); var companyName = $.trim($("#companyName").textbox("getValue"));
//表示是否存在 true == 存在 false = 不存在 //表示是否存在 true == 存在 false = 不存在
var flag = false; var flag = false;
//开始ajax名称检验不能重名 //开始ajax名称检验不能重名
@@ -448,7 +444,7 @@
}); });
function showSystemConfigDetails(pageNo, pageSize) { function showSystemConfigDetails(pageNo, pageSize) {
var companyName = $.trim($("#searchCompanyName").val()); var companyName = $.trim($("#searchCompanyName").textbox("getValue"));
$.ajax({ $.ajax({
type: "get", type: "get",
url: "/systemConfig/list", url: "/systemConfig/list",