解决供应商、客户页面展示失败的bug
This commit is contained in:
@@ -4,7 +4,6 @@
|
|||||||
var listType = ""; //类型
|
var listType = ""; //类型
|
||||||
var listTypeEn = ""; //英文类型
|
var listTypeEn = ""; //英文类型
|
||||||
getType();
|
getType();
|
||||||
getPersonList(); //获取业务员
|
|
||||||
initTableData();
|
initTableData();
|
||||||
ininPager();
|
ininPager();
|
||||||
bindEvent();
|
bindEvent();
|
||||||
@@ -27,43 +26,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取业务员
|
|
||||||
function getPersonList(){
|
|
||||||
$.ajax({
|
|
||||||
type:"post",
|
|
||||||
url: "/person/getBasicData.action",
|
|
||||||
dataType: "json",
|
|
||||||
success: function (systemInfo)
|
|
||||||
{
|
|
||||||
var msgTip = systemInfo.showModel.msgTip;
|
|
||||||
if(msgTip !== "exceptoin"){
|
|
||||||
var personList = systemInfo.showModel.map.personList;
|
|
||||||
var personID,options;
|
|
||||||
if(personList !=null)
|
|
||||||
{
|
|
||||||
for(var i = 0 ;i < personList.length;i++)
|
|
||||||
{
|
|
||||||
var person = personList[i];
|
|
||||||
if(0 == i)
|
|
||||||
{
|
|
||||||
personID = person.id;
|
|
||||||
}
|
|
||||||
if(person.type=="仓管员")
|
|
||||||
{
|
|
||||||
options += '<option value="' + person.id + '">' + person.name + '</option>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$("#personId").empty().append('<option>不关联业务员</option>').append(options);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$.messager.alert('提示','查找系统基础信息异常,请与管理员联系!','error');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
//初始化表格数据
|
//初始化表格数据
|
||||||
function initTableData() {
|
function initTableData() {
|
||||||
//改变宽度和高度
|
//改变宽度和高度
|
||||||
@@ -503,11 +465,10 @@
|
|||||||
var pager = $("#tableData").datagrid('getPager');
|
var pager = $("#tableData").datagrid('getPager');
|
||||||
opts.pageNumber = 1;
|
opts.pageNumber = 1;
|
||||||
opts.pageSize = initPageSize;
|
opts.pageSize = initPageSize;
|
||||||
pager.pagination('refresh',
|
pager.pagination('refresh', {
|
||||||
{
|
pageNumber:1,
|
||||||
pageNumber:1,
|
pageSize:initPageSize
|
||||||
pageSize:initPageSize
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -571,31 +532,31 @@
|
|||||||
supType = "vendor"
|
supType = "vendor"
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"post",
|
type:"get",
|
||||||
url: "/depotHead/findTotalPay.action",
|
url: "/depotHead/findTotalPay",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
async: false,
|
async: false,
|
||||||
data: ({
|
data: ({
|
||||||
supplierId: supplierInfo[0],
|
supplierId: supplierInfo[0],
|
||||||
EndTime:thisDateTime,
|
endTime:thisDateTime,
|
||||||
supType: supType
|
supType: supType
|
||||||
}),
|
}),
|
||||||
success: function(res){
|
success: function(res){
|
||||||
if(res) {
|
if (res && res.code === 200 && res.data && res.data.rows && res.data.rows.getAllMoney) {
|
||||||
var moneyA = res.getAllMoney.toFixed(2)-0;
|
var moneyA = res.data.rows.getAllMoney.toFixed(2)-0;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"post",
|
type:"get",
|
||||||
url: path +"/accountHead/findTotalPay.action",
|
url: "/accountHead/findTotalPay",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
async: false,
|
async: false,
|
||||||
data: ({
|
data: ({
|
||||||
supplierId: supplierInfo[0],
|
supplierId: supplierInfo[0],
|
||||||
EndTime:thisDateTime,
|
endTime:thisDateTime,
|
||||||
supType: supType
|
supType: supType
|
||||||
}),
|
}),
|
||||||
success: function(res){
|
success: function(res){
|
||||||
if(res) {
|
if (res && res.code === 200 && res.data && res.data.rows && res.data.rows.getAllMoney) {
|
||||||
var moneyB = res.getAllMoney.toFixed(2)-0;
|
var moneyB = res.data.rows.getAllMoney.toFixed(2)-0;
|
||||||
var money = moneyA+moneyB;
|
var money = moneyA+moneyB;
|
||||||
var moneyBeginNeedGet = $("#BeginNeedGet").val()-0; //期初应收
|
var moneyBeginNeedGet = $("#BeginNeedGet").val()-0; //期初应收
|
||||||
var moneyBeginNeedPay = $("#BeginNeedPay").val()-0; //期初应付
|
var moneyBeginNeedPay = $("#BeginNeedPay").val()-0; //期初应付
|
||||||
|
|||||||
Reference in New Issue
Block a user