优化财务页面
This commit is contained in:
@@ -231,14 +231,12 @@
|
|||||||
pageList: initPageNum,
|
pageList: initPageNum,
|
||||||
columns:[[
|
columns:[[
|
||||||
{ field: 'id',width:35,align:"center",checkbox:true},
|
{ field: 'id',width:35,align:"center",checkbox:true},
|
||||||
{ title: '操作',field: 'op',align:"center",width:90,formatter:function(value,rec) {
|
{ title: '操作',field: 'op',align:"center",width:90,
|
||||||
|
formatter:function(value,rec,index) {
|
||||||
var str = '';
|
var str = '';
|
||||||
var rowInfo = rec.id + 'AaBb' + rec.billno+ 'AaBb' + rec.billtime+ 'AaBb' + rec.remark
|
|
||||||
+ 'AaBb' + rec.accountid+ 'AaBb' + rec.accountname + 'AaBb' + rec.organid + 'AaBb' + rec.organname
|
|
||||||
+ 'AaBb' + rec.handspersonid + 'AaBb' + rec.handspersonname + 'AaBb' + rec.changeamount + 'AaBb' + rec.totalprice;
|
|
||||||
var orgId = rec.organid ? rec.organid : 0;
|
var orgId = rec.organid ? rec.organid : 0;
|
||||||
str += '<img title="查看" src="/js/easyui/themes/icons/list.png" style="cursor: pointer;" onclick="showAccountHead(\'' + rowInfo + '\');"/> ';
|
str += '<img title="查看" src="/js/easyui/themes/icons/list.png" style="cursor: pointer;" onclick="showAccountHead(\'' + index + '\');"/> ';
|
||||||
str += '<img title="编辑" src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editAccountHead(\'' + rowInfo + '\');"/> ';
|
str += '<img title="编辑" src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editAccountHead(\'' + index + '\');"/> ';
|
||||||
str += '<img title="删除" src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteAccountHead('+ rec.id +',' + orgId +',' + rec.totalprice + ');"/>';
|
str += '<img title="删除" src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteAccountHead('+ rec.id +',' + orgId +',' + rec.totalprice + ');"/>';
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
@@ -699,43 +697,42 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//编辑信息
|
//编辑信息
|
||||||
function editAccountHead(accountHeadTotalInfo){
|
function editAccountHead(index){
|
||||||
var accountHeadInfo = accountHeadTotalInfo.split("AaBb");
|
var res = $("#tableData").datagrid("getRows")[index];
|
||||||
$("#BillNo").val(accountHeadInfo[1]);
|
$("#BillNo").val(res.billno);
|
||||||
$("#BillTime").val(accountHeadInfo[2]);
|
$("#BillTime").val(res.billtime);
|
||||||
$("#Remark").val(accountHeadInfo[3]);
|
$("#Remark").val(res.remark);
|
||||||
$("#AccountId").val(accountHeadInfo[4]);
|
$("#AccountId").val(res.accountid);
|
||||||
$('#OrganId').combobox('setValue', accountHeadInfo[6]);
|
$('#OrganId').combobox('setValue', res.organid);
|
||||||
$("#HandsPersonId").val(accountHeadInfo[8]);
|
$("#HandsPersonId").val(res.handspersonid);
|
||||||
$("#ChangeAmount").val(accountHeadInfo[10]);
|
$("#ChangeAmount").val(res.changeamount);
|
||||||
var TotalPrice = accountHeadInfo[11];
|
var TotalPrice = res.totalprice;
|
||||||
preTotalPrice = accountHeadInfo[11]; //记录前一次合计金额,用于收预付款
|
preTotalPrice = res.totalprice; //记录前一次合计金额,用于收预付款
|
||||||
var editTitle = listTitle.replace("列表","信息");
|
var editTitle = listTitle.replace("列表","信息");
|
||||||
$('#accountHeadDlg').dialog('open').dialog('setTitle','<img src="' + '/js/easyui/themes/icons/pencil.png"/> 编辑' + editTitle);
|
$('#accountHeadDlg').dialog('open').dialog('setTitle','<img src="' + '/js/easyui/themes/icons/pencil.png"/> 编辑' + editTitle);
|
||||||
$(".window-mask").css({ width: webW ,height: webH});
|
$(".window-mask").css({ width: webW ,height: webH});
|
||||||
accountHeadID = accountHeadInfo[0];
|
accountHeadID = res.id;
|
||||||
|
|
||||||
initTableData_account("edit",TotalPrice); //明细列表
|
initTableData_account("edit",TotalPrice); //明细列表
|
||||||
reject(); //撤销下、刷新列表
|
reject(); //撤销下、刷新列表
|
||||||
url = '/accountHead/update?id=' + accountHeadInfo[0];
|
url = '/accountHead/update?id=' + res.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
//查看信息
|
//查看信息
|
||||||
function showAccountHead(accountHeadTotalInfo){
|
function showAccountHead(index){
|
||||||
var accountHeadInfo = accountHeadTotalInfo.split("AaBb");
|
var res = $("#tableData").datagrid("getRows")[index];
|
||||||
$("#BillNoShow").text(accountHeadInfo[1]);
|
$("#BillNoShow").text(res.billno);
|
||||||
$("#BillTimeShow").text(accountHeadInfo[2]);
|
$("#BillTimeShow").text(res.billtime);
|
||||||
$("#RemarkShow").text(accountHeadInfo[3]);
|
$("#RemarkShow").text(res.remark);
|
||||||
$("#AccountIdShow").text(accountHeadInfo[5]);
|
$("#AccountIdShow").text(res.accountname);
|
||||||
$('#OrganIdShow').text(accountHeadInfo[7]);
|
$('#OrganIdShow').text(res.organname);
|
||||||
$("#HandsPersonIdShow").text(accountHeadInfo[9]);
|
$("#HandsPersonIdShow").text(res.handspersonname);
|
||||||
$("#ChangeAmountShow").text(accountHeadInfo[10].replace("undefined","0"));
|
$("#ChangeAmountShow").text(res.changeamount);
|
||||||
var TotalPrice = accountHeadInfo[11];
|
var TotalPrice = res.totalprice;
|
||||||
var showTitle = listTitle.replace("列表","信息");
|
var showTitle = listTitle.replace("列表","信息");
|
||||||
$('#accountHeadDlgShow').dialog('open').dialog('setTitle','<img src="/js/easyui/themes/icons/list.png"/> 查看' + showTitle);
|
$('#accountHeadDlgShow').dialog('open').dialog('setTitle','<img src="/js/easyui/themes/icons/list.png"/> 查看' + showTitle);
|
||||||
$(".window-mask").css({ width: webW ,height: webH});
|
$(".window-mask").css({ width: webW ,height: webH});
|
||||||
|
accountHeadID = res.id;
|
||||||
accountHeadID = accountHeadInfo[0];
|
|
||||||
initTableData_account_show(TotalPrice); //明细列表-查看状态
|
initTableData_account_show(TotalPrice); //明细列表-查看状态
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user