This commit is contained in:
parent
a07924f2e3
commit
13a347a461
|
|
@ -139,7 +139,7 @@ function submitApply(data) {
|
||||||
supId: item.supId,
|
supId: item.supId,
|
||||||
proId: item.proId,
|
proId: item.proId,
|
||||||
money: item.cost,
|
money: item.cost,
|
||||||
outId: item.carOutId
|
outId: item.outId
|
||||||
};
|
};
|
||||||
detailsList.push(obj);
|
detailsList.push(obj);
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -11,36 +11,56 @@ function queryTable(type) {
|
||||||
reloadTable(1);
|
reloadTable(1);
|
||||||
} else if (type === 2) {
|
} else if (type === 2) {
|
||||||
$('#proName').val('');
|
$('#proName').val('');
|
||||||
$('#planStatus').val('');
|
|
||||||
layui.form.render();
|
layui.form.render();
|
||||||
reloadTable(1);
|
reloadTable(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 刷新页面数据
|
// 获取筛选条件
|
||||||
function reloadData() {
|
function getFilterParams() {
|
||||||
|
let filterParams = {};
|
||||||
|
$('#delDemo .tag-item').each(function () {
|
||||||
|
let layId = $(this).attr('lay-id');
|
||||||
|
let strArr = layId.split('-');
|
||||||
|
if (strArr[0] === 'company') {
|
||||||
|
let name = replaceChinese($(this).html());
|
||||||
|
filterParams.companyName = name;
|
||||||
|
} else if (strArr[0] === 'dispatch') {
|
||||||
|
filterParams.dispatchStatus = strArr[1];
|
||||||
|
} else if (strArr[0] === 'year') {
|
||||||
|
filterParams.year = strArr[1];
|
||||||
|
} else if (strArr[0] === 'month') {
|
||||||
|
filterParams.month = strArr[1];
|
||||||
|
}
|
||||||
|
})
|
||||||
|
filterParams.proName = $('#proName').val();
|
||||||
|
return filterParams;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 刷新页面数据
|
||||||
|
function reloadData() {
|
||||||
reloadTable(1);
|
reloadTable(1);
|
||||||
getProStatisticsDetails();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 重载表格
|
// 重载表格
|
||||||
function reloadTable(pageNum) {
|
function reloadTable(pageNum) {
|
||||||
|
let params = getFilterParams();
|
||||||
table.reload("currentTableId", {
|
table.reload("currentTableId", {
|
||||||
page: {
|
page: {
|
||||||
curr: pageNum ? pageNum : 1,
|
curr: pageNum ? pageNum : 1,
|
||||||
},
|
},
|
||||||
where: {
|
where: {
|
||||||
encryptedData: JSON.stringify({
|
encryptedData: JSON.stringify(params),
|
||||||
'proName': $('#proName').val(),
|
|
||||||
'planStatus': $('#planStatus').val()
|
|
||||||
}),
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 初始化表格
|
||||||
|
function initTable() {
|
||||||
|
let params = getFilterParams();
|
||||||
|
console.error(params);
|
||||||
|
|
||||||
// 初始化表格
|
|
||||||
function initTable() {
|
|
||||||
tableIns = table.render({
|
tableIns = table.render({
|
||||||
elem: "#currentTableId",
|
elem: "#currentTableId",
|
||||||
id: 'currentTableId',
|
id: 'currentTableId',
|
||||||
|
|
@ -48,12 +68,9 @@ function queryTable(type) {
|
||||||
authorization: sessionStorage.getItem("gz-token"),
|
authorization: sessionStorage.getItem("gz-token"),
|
||||||
},
|
},
|
||||||
height: "full-400",
|
height: "full-400",
|
||||||
url: dataUrl + "backstage/dispatchCar/getProStatisticsList",
|
url: dataUrl + "backstage/homeIndex/getProDetails",
|
||||||
where: {
|
where: {
|
||||||
encryptedData: JSON.stringify({
|
encryptedData: JSON.stringify(params),
|
||||||
'proName': $('#proName').val(),
|
|
||||||
'planStatus': $('#planStatus').val()
|
|
||||||
}),
|
|
||||||
},
|
},
|
||||||
request: {
|
request: {
|
||||||
pageName: 'pageNum',
|
pageName: 'pageNum',
|
||||||
|
|
@ -93,70 +110,61 @@ function queryTable(type) {
|
||||||
title: "计划数",
|
title: "计划数",
|
||||||
unresize: true,
|
unresize: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
templet: function (d) {
|
|
||||||
return '<span style="color:#409Eff;font-weight:bold;">' + d.planNum + '</span>';
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "ypcNum",
|
field: "dispatchPlanNum",
|
||||||
width: '9%',
|
width: '9%',
|
||||||
title: "已派车计划",
|
title: "已派车计划",
|
||||||
unresize: true,
|
unresize: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
templet: function (d) {
|
|
||||||
return '<span style="color:#19be6b;font-weight:bold;">' + d.ypcNum + '</span>';
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "dpcNum",
|
field: "noDispatchPlanNum",
|
||||||
width: '9%',
|
width: '9%',
|
||||||
title: "待派车计划",
|
title: "待派车计划",
|
||||||
unresize: true,
|
unresize: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
templet: function (d) {
|
|
||||||
return '<span style="color:#ff9900;font-weight:bold;">' + d.dpcNum + '</span>';
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "planStatus",
|
field: "dispatchStatus",
|
||||||
title: "派车状态",
|
title: "派车状态",
|
||||||
width: '8%',
|
width: '8%',
|
||||||
unresize: true,
|
unresize: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
return setStatusColor(d.planStatus);
|
return setStatusColor(d.dispatchStatus);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "lastDay",
|
field: "shouldDispatchNum",
|
||||||
width: '10%',
|
width: '10%',
|
||||||
title: "应派车数量",
|
title: "应派车数量",
|
||||||
unresize: true,
|
unresize: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "progress",
|
field: "dispatchNum",
|
||||||
width: '11.9%',
|
width: '11.9%',
|
||||||
title: "已派车数量",
|
title: "已派车数量",
|
||||||
unresize: true,
|
unresize: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "needNum",
|
field: "noDispatchNum",
|
||||||
title: "待派车数量",
|
title: "待派车数量",
|
||||||
width: '10%',
|
width: '10%',
|
||||||
unresize: true,
|
unresize: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "dispatchNum",
|
field: "money",
|
||||||
title: "已派车金额",
|
title: "已派车金额",
|
||||||
width: '10%',
|
width: '10%',
|
||||||
unresize: true,
|
unresize: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "noDispatchNum",
|
field: "companyName",
|
||||||
title: "所属分公司",
|
title: "所属分公司",
|
||||||
width: '10%',
|
width: '10%',
|
||||||
unresize: true,
|
unresize: true,
|
||||||
|
|
@ -173,32 +181,32 @@ function queryTable(type) {
|
||||||
table.resize("currentTableId");
|
table.resize("currentTableId");
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 数量颜色
|
// 数量颜色
|
||||||
function setNumColor(value) {
|
function setNumColor(value) {
|
||||||
return '<span style="color:#409Eff;font-weight:bold;">' + value + "</span>";
|
return '<span style="color:#409Eff;font-weight:bold;">' + value + "</span>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// 发货状态颜色
|
// 发货状态颜色
|
||||||
function setStatusColor(value) {
|
function setStatusColor(value) {
|
||||||
let color = "#409Eff";
|
let color = "#409Eff";
|
||||||
let name = ''
|
let name = ''
|
||||||
if (value === '未派车') {
|
if (value === '2') {
|
||||||
color = "#f56c6c";
|
color = "#f56c6c";
|
||||||
name = '未派车';
|
name = '未派车';
|
||||||
} else if (value === '部分派车') {
|
} else if (value === '1') {
|
||||||
color = "#ff9900";
|
color = "#ff9900";
|
||||||
name = '部分派车'
|
name = '部分派车'
|
||||||
} else if (value === '全部派车') {
|
} else if (value === '3') {
|
||||||
color = "#19be6b";
|
color = "#19be6b";
|
||||||
name = '全部派车'
|
name = '全部派车'
|
||||||
}
|
}
|
||||||
return '<span style="color:' + color + '">' + name + "</span>";
|
return '<span style="color:' + color + '"> ● ' + name + "</span>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置进度值
|
// 设置进度值
|
||||||
function schedule(d) {
|
function schedule(d) {
|
||||||
d.progress = d.process;
|
d.progress = d.process;
|
||||||
d.progress = parseFloat(d.progress ? d.progress : 0);
|
d.progress = parseFloat(d.progress ? d.progress : 0);
|
||||||
d.filter == undefined ? (d.filter = d.LAY_NUM) : d.filter;
|
d.filter == undefined ? (d.filter = d.LAY_NUM) : d.filter;
|
||||||
|
|
@ -217,19 +225,16 @@ function queryTable(type) {
|
||||||
'<div class="layui-progress-bar ' + color + '" lay-percent="' + d.progress + '%">' +
|
'<div class="layui-progress-bar ' + color + '" lay-percent="' + d.progress + '%">' +
|
||||||
"</div></div>"
|
"</div></div>"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出
|
// 导出
|
||||||
function exportExcel() {
|
function exportExcel() {
|
||||||
let params = {
|
let params = getFilterParams();
|
||||||
'proName': $('#proName').val(),
|
let url = dataUrl + "backstage/homeIndex/exportProDetails";
|
||||||
'planStatus': $('#planStatus').val()
|
exportExcelUtil(url, '工程详情', JSON.stringify(params));
|
||||||
}
|
}
|
||||||
let url = dataUrl + "backstage/dispatchCar/export";
|
|
||||||
exportExcelUtil(url, '派车管理', JSON.stringify(params));
|
|
||||||
}
|
|
||||||
|
|
||||||
// 工程详情
|
// 工程详情
|
||||||
function dispatchCarProDetail(obj) {
|
function dispatchCarProDetail(obj) {
|
||||||
openIframeByParamObj("dispatchCarProDetail", "工程详情", "./child/dispatch_car_pro_detail.html", "92%", "95%", obj, 1);
|
openIframeByParamObj("dispatchCarProDetail", "工程详情", "./child/dispatch_car_pro_detail.html", "92%", "95%", obj, 1);
|
||||||
}
|
}
|
||||||
|
|
@ -23,7 +23,7 @@ function loadCompanyData() {
|
||||||
|
|
||||||
// 派车状态
|
// 派车状态
|
||||||
function loadDispatchStatusData() {
|
function loadDispatchStatusData() {
|
||||||
const list = [{ id: 'dispatch-1', labelName: '全部' }, { id: 'dispatch-2', labelName: '部分派车' }, { id: 'dispatch-3', labelName: '未派车' }, { id: 'dispatch-4', labelName: '已派车' }];
|
const list = [{ id: 'dispatch-0', labelName: '全部' }, { id: 'dispatch-1', labelName: '部分派车' }, { id: 'dispatch-2', labelName: '未派车' }, { id: 'dispatch-3', labelName: '全部派车' }];
|
||||||
setTagData(list, 'demo2');
|
setTagData(list, 'demo2');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue