优化出入库单据和财务的资源权限的控制
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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, //付款/收款
|
||||
|
||||
@@ -110,6 +110,10 @@
|
||||
<td style="padding:5px;width:130px;">
|
||||
<span id="OrganIdShow"></span>
|
||||
</td>
|
||||
<td style="width:70px;">经手人:</td>
|
||||
<td style="padding:5px;width:130px;">
|
||||
<span id="HandsPersonIdShow"></span>
|
||||
</td>
|
||||
<td style="width:70px;">单据日期:</td>
|
||||
<td style="padding:5px;width:130px;">
|
||||
<span id="BillTimeShow"></span>
|
||||
@@ -118,8 +122,6 @@
|
||||
<td style="padding:5px;width:140px;">
|
||||
<span id="BillNoShow"></span>
|
||||
</td>
|
||||
<td style="width:70px;"></td>
|
||||
<td style="width:140px;"></td>
|
||||
<td style="width:100px;"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -92,17 +92,20 @@
|
||||
if(res.status == 1) {
|
||||
return '<b onclick="showMsg(' + res.id + ');">' + value + "</b>";
|
||||
} else if(res.status == 2) {
|
||||
return '<span onclick="showMsg(' + res.id + ');">' + value + "</span>";;
|
||||
return '<span onclick="showMsg(' + res.id + ');">' + value + "</span>";
|
||||
}
|
||||
}},
|
||||
{title: '时间', field: 'createTime', width: 150},
|
||||
{title: '时间', field: 'createTime', width: 150,formatter: function (value) {
|
||||
return formatTime(value, 'Y-M-D h:m:s');
|
||||
}
|
||||
},
|
||||
{title: '状态', field: 'status', width: 100,formatter: function (value) {
|
||||
if(value == 1) {
|
||||
return "<b style='color:red'>未读</b>";
|
||||
} else if(value == 2) {
|
||||
return "<b style='color:green'>已读</b>";
|
||||
}
|
||||
}}
|
||||
if(value == 1) {
|
||||
return "<b style='color:red'>未读</b>";
|
||||
} else if(value == 2) {
|
||||
return "<b style='color:green'>已读</b>";
|
||||
}
|
||||
}}
|
||||
]],
|
||||
toolbar: [
|
||||
{
|
||||
|
||||
@@ -91,8 +91,8 @@
|
||||
async: false,
|
||||
success: function (res) {
|
||||
if(res && res.code === 200) {
|
||||
self.parent.window.$("#searchBtn").click();
|
||||
self.parent.$.colorbox.close();
|
||||
$.messager.alert('提示',"操作成功!","info");
|
||||
}
|
||||
else {
|
||||
$.messager.alert('提示',"操作失败!","error");
|
||||
|
||||
Reference in New Issue
Block a user