优化出入库单据和财务的资源权限的控制

This commit is contained in:
季圣华
2020-09-13 19:00:03 +08:00
parent 4fe0fc3970
commit 0f8e54d680
25 changed files with 415 additions and 296 deletions

View File

@@ -1,5 +1,6 @@
//初始化界面
var defaultAccountId = 0; //默认账户id
var roleType = ""; //角色类型
$(function(){
var accountList = null;
var accountID = null;
@@ -23,6 +24,7 @@
var moneyType = true; //隐藏当前列
var inOrOut = ""; //链接类型为收入或者支出
getType();
getRoleType();
initSystemData_person(); //经手人数据
initSelectInfo_person(); //经手人信息
initSystemData_account(); //账户数据
@@ -94,6 +96,21 @@
amountNum = "SYF";
}
}
function getRoleType(){
$.ajax({
type:"get",
url: "/user/getRoleTypeByUserId",
async: false,
success: function (res) {
if (res && res.code === 200) {
roleType = res.data.roleType;
}
else {
roleType = null;
}
}
});
}
//获取账户信息
function initSystemData_account(){
$.ajax({
@@ -243,7 +260,7 @@
{ field: 'organId',width:5, hidden:true},
{ title: organNameTitle,field: 'organName',width:140,hidden:organNameHidden},
{ title: '单据编号',field: 'billNo',width:160},
{ title: '经手人',field: 'handsPersonName',width:80},
{ title: '操作员',field: 'userName',width:80},
{ title: '单据时间 ',field: 'billTimeStr',width:160},
{ title: '合计',field: 'totalPrice',width:80},
{ title: '备注',field: 'remark',width:100}
@@ -977,6 +994,7 @@
data: ({
search: JSON.stringify({
type: listType,
roleType: roleType,
billNo: $.trim($("#searchBillNo").val()),
beginTime: beginTime,
endTime: endTime

View File

@@ -345,7 +345,7 @@
if(res && res.code === 200){
var data = res.data;
$("#bill .BillNoShow").text(data.billNo);
$("#bill .BillTimeShow").text(data.billTime);
$("#bill .BillTimeShow").text(data.billTimeStr);
$("#bill .RemarkShow").text(data.remark);
$("#bill .AccountIdShow").text(data.accountName);
$('#bill .OrganIdShow').text(data.organName);

View File

@@ -479,7 +479,7 @@
}
},
{ title: '单据日期',field: 'operTimeStr',width:145},
{ title: '操作员',field: 'operPersonName',width:60},
{ title: '操作员',field: 'userName',width:60},
{ title: '金额合计',field: 'totalPrice',width:70},
{ title: '含税合计',field: 'totalTaxLastMoney',hidden:isShowLastMoneyColumn,width:70,formatter:function(value,rec){
return (rec.discountMoney + rec.discountLastMoney).toFixed(2);
@@ -1362,7 +1362,6 @@
$("#DiscountLastMoney").val(res.discountLastMoney); //优惠后金额
$("#ChangeAmount").val(res.changeAmount).attr("data-changeamount", res.changeAmount);
$('#OrganId').combobox('setValue', res.organId);
$("#HandsPersonId").val(res.handsPersonId);
$("#Remark").val(res.remark);
$("#Discount").val(res.discount?res.discount:0);
$("#DiscountMoney").val(res.discountMoney?res.discountMoney:0);
@@ -1451,7 +1450,6 @@
$("#NumberShow").text(res.number);
$("#OperTimeShow").text(res.operTimeStr);
$('#OrganIdShow').text(res.organName);
$("#HandsPersonIdShow").text(res.handsPersonName);
if(res.accountName){
$("#AccountIdShow").text(res.accountName); //结算账户
} else {
@@ -1817,7 +1815,6 @@
LinkNumber: $.trim($("#LinkNumber").val()),
OperTime: $("#OperTime").val(),
OrganId: OrganId,
HandsPersonId: $.trim($("#HandsPersonId").val()),
Salesman: SalesmanStr, //销售人员
AccountId: getAccountID,
ChangeAmount: ChangeAmount, //付款/收款