问题修改

This commit is contained in:
cwchen 2025-01-17 18:28:32 +08:00
parent 9501d7d915
commit d1a5471eb8
18 changed files with 127 additions and 148 deletions

View File

@ -87,7 +87,7 @@ body {
}
.layui-table-view .layui-table th {
font-size: 18px;
font-size: 16px;
color: #262626;
letter-spacing: 1px;
}

View File

@ -95,7 +95,7 @@ function initTable() {
},
{
field: "carNum",
width: '10%',
width: '9%',
title: "车牌号",
unresize: true,
align: "center",
@ -119,7 +119,7 @@ function initTable() {
},
{
field: "ton",
width: '10%',
width: '11%',
title: "车辆吨位T",
unresize: true,
align: "center",
@ -163,7 +163,7 @@ function initTable() {
},
{
field: "bxDay",
width: '11%',
width: '12%',
title: "车辆保险到期日期",
unresize: true,
align: "center",
@ -179,7 +179,7 @@ function initTable() {
},
{
title: "操作",
width: '11%',
width: '10%',
align: "center",
unresize: true,
templet: function (d) {

View File

@ -140,7 +140,7 @@ function initTable() {
},
{
field: "money",
width: '8%',
width: '11%',
title: "合同金额(元)",
unresize: true,
align: "center",

View File

@ -51,7 +51,6 @@ function getAllOutList() {
parent.layer.msg('暂无派车批次数据', { icon: 7 });
closePage();
} else if (result.data.length === 0 && objParam.type === 2) {
parent.layer.msg('暂无待审核批次数据', { icon: 7 });
closePage(1);
} else if (result.data.length > 0) {
setBatchData(result.data);
@ -454,6 +453,7 @@ function reloadDispatchData() {
// 审核回调-刷新待审核批次
function reloadAuditData() {
$('#auditData').remove();
getAllOutList();
}

View File

@ -6,7 +6,7 @@ function setParams(params) {
objParam = JSON.parse(params);
console.error(objParam);
$('#proName').html(objParam.proName);
$('#bmname').html('送一分公司');
$('#bmname').html(objParam.bmname);
layui.use(["form", "table", 'layer', 'element'], function () {
form = layui.form;
table = layui.table;

View File

@ -4,8 +4,8 @@ let pageNum = 1;
let checkNowValue = ''; // 当前选中的批次
let isPage = getUrlParam('isPage');
if (isPage) { // 首页跳转
$('#plan-detail-box>div').eq(0).remove();
$('#plan-detail-box').css({ 'justify-content': 'end', 'height': '50px' });
$('#detail-box>div').eq(0).remove();
$('#detail-box').css({ 'justify-content': 'end', 'height': '50px' });
$('body').css('margin', '0');
$('.cancel').remove();
let obj = decodeURIComponent(getUrlParam('obj'))

View File

@ -152,7 +152,7 @@ function initTable() {
},
{
field: "proName",
width: '13%',
width: '10%',
title: "工程名称",
unresize: true,
align: "center",
@ -160,7 +160,7 @@ function initTable() {
},
{
field: "planNum",
width: '6%',
width: '7%',
title: "计划数",
unresize: true,
align: "center",
@ -171,7 +171,7 @@ function initTable() {
},
{
field: "ypcNum",
width: '6%',
width: '7%',
title: "已派车",
unresize: true,
align: "center",
@ -182,7 +182,7 @@ function initTable() {
},
{
field: "dpcNum",
width: '6%',
width: '7%',
title: "待派车",
unresize: true,
align: "center",
@ -212,7 +212,7 @@ function initTable() {
},
{
field: "progress",
width: '13.9%',
width: '11.9%',
title: "进度",
unresize: true,
align: "center",
@ -230,7 +230,7 @@ function initTable() {
{
field: "dispatchNum",
title: "已派车数量",
width: '8%',
width: '9%',
unresize: true,
align: "center",
sort:true,
@ -238,7 +238,7 @@ function initTable() {
{
field: "noDispatchNum",
title: "待派车数量",
width: '8%',
width: '9%',
unresize: true,
align: "center",
sort:true,

View File

@ -116,7 +116,7 @@ function initTable() {
title: "工程名称",
unresize: true,
align: "center",
sort:true,
sort: true,
},
{
field: "planNum",
@ -124,7 +124,7 @@ function initTable() {
title: "需求计划数量",
unresize: true,
align: "center",
sort:true,
sort: true,
},
{
field: "needNum",
@ -132,7 +132,7 @@ function initTable() {
width: '10%',
unresize: true,
align: "center",
sort:true,
sort: true,
},
{
field: "carNum",
@ -140,7 +140,7 @@ function initTable() {
width: '10%',
unresize: true,
align: "center",
sort:true,
sort: true,
},
{
field: "dpcNum",
@ -148,17 +148,17 @@ function initTable() {
width: '9%',
unresize: true,
align: "center",
sort:true,
sort: true,
},
{
field: "money",
width: '9%',
title: "应付金额",
unresize: true,
sort:true,
sort: true,
align: "center",
templet: function (d) {
return " ¥ " + d.money ? d.money : 0;
return '<span> ¥ ' + (d.money ? d.money : 0) + '</span>';
},
},
{
@ -167,9 +167,9 @@ function initTable() {
width: '9.5%',
align: "center",
unresize: true,
sort:true,
sort: true,
templet: function (d) {
return " ¥ " + d.payMoney ? d.payMoney : 0;
return '<span> ¥ ' + (d.payMoney ? d.payMoney : 0) + '</span>';
},
},
{
@ -178,9 +178,9 @@ function initTable() {
width: '9.5%',
align: "center",
unresize: true,
sort:true,
sort: true,
templet: function (d) {
return " ¥ " + d.noPayMoney ? d.noPayMoney : 0;
return '<span> ¥ ' + (d.noPayMoney ? d.noPayMoney : 0) + '</span>';
},
},
{

View File

@ -158,7 +158,7 @@ function initTable() {
align: "center",
sort:true,
templet: function (d) {
return " ¥ " + d.money ? d.money : 0;
return '<span> ¥ ' + (d.money ? d.money : 0) + '</span>';
},
},
{
@ -169,7 +169,7 @@ function initTable() {
sort:true,
unresize: true,
templet: function (d) {
return " ¥ " + d.payMoney ? d.payMoney : 0;
return '<span> ¥ ' + (d.payMoney ? d.payMoney : 0) + '</span>';
},
},
{
@ -180,7 +180,7 @@ function initTable() {
sort:true,
unresize: true,
templet: function (d) {
return " ¥ " + d.noPayMoney ? d.noPayMoney : 0;
return '<span> ¥ ' + (d.noPayMoney ? d.noPayMoney : 0) + '</span>';
},
},
{
@ -228,13 +228,49 @@ function exportExcel() {
// 需求计划详情
function viewPlanDetail(obj) {
obj.id = obj.planId;
openIframeByParamObj2("viewPlanDetail3", "需求计划详情", "../car_demand_plan/child/apply_plan_detail.html", "92%", "95%", obj);
let content = '../car_demand_plan/child/apply_plan_detail.html';
if (obj.code.indexOf('spec-') > -1) {
content = '../car_demand_plan/child/emerg_internal_car_detail.html';
}
openIframeByParamObj2("viewPlanDetail3", "需求计划详情", content, "92%", "95%", obj);
}
// 详情
function dispatchCarDetail(obj, type) {
console.error(obj);
obj.type = type;
let flag = isExistData(obj, 1);
if (!flag) {
return layer.msg('暂无派车批次数据', { icon: 7 });
}
obj.typeName = obj.type === '1' ? '车辆':'吊车';
obj.type = type;
openIframeByParamObj2("dispatchCarDetail", "详情", "../car_settlement/child/branch_dispatch_car_detail.html", "92%", "95%", obj);
}
// 校验是否存在派车批次数据
function isExistData(obj, type) {
let flag = true;
let params = {
encryptedData: JSON.stringify({
'planId': obj.planId,
})
};
let url = ''
if (type === 1) {
url = dataUrl + 'backstage/supDispatchCar/getAllOutList'; // 详情-派车批次
}
ajaxRequest(url, "POST", params, false, function () {
}, function (result) {
console.error(result);
if (result.code === 200) {
if (result.data.length === 0 && type === 1) {
flag = false;
} else if (result.data.length === 0 && type === 2) {
flag = false;
}
} else {
}
}, function (xhr, status, error) {
errorFn(xhr, status, error)
}, null);
return flag;
}

View File

@ -123,7 +123,7 @@ function initTable() {
},
{
field: "proNum",
width: '10%',
width: '8%',
title: "工程数量",
unresize: true,
align: "center",
@ -131,7 +131,7 @@ function initTable() {
},
{
field: "carNum",
width: '10%',
width: '12%',
title: "租用车辆、吊车数量",
unresize: true,
align: "center",
@ -139,7 +139,7 @@ function initTable() {
},
{
field: "money",
width: '10%',
width: '11%',
title: "租赁金额(元) ",
unresize: true,
sort:true,
@ -172,7 +172,7 @@ function initTable() {
},
{
title: "操作",
width: '10%',
width: '9%',
align: "center",
unresize: true,
templet: function (d) {

View File

@ -287,9 +287,13 @@ function setInitCheckData() {
} else if (objParam.type === 4) { // 吊车量-派车详情
checkTabId.push('type-2'), checkTabName.push('吊车');
} else if (objParam.type === 5) { // 已付款金额-派车详情
checkTabId.push('pay-1'), checkTabName.push('已付款');
if(!objParam.notUse){
checkTabId.push('pay-1'), checkTabName.push('已付款');
}
} else if (objParam.type === 6) { // 待付款金额-派车详情
checkTabId.push('pay-2'), checkTabName.push('未付款');
if(!objParam.notUse){
checkTabId.push('pay-2'), checkTabName.push('未付款');
}
}
for (let i = 0; i < checkTabId.length; i++) {
let strArr = checkTabId[i].split('-');

View File

@ -31,122 +31,53 @@ function setParams(params) {
}
});
});
if (objParam.pageType === 1) { // 需求计划详情跳转
$('#layui-tab-title li').eq(0).addClass('layui-this');
let src = '../car_demand_plan/child/apply_plan_detail.html';
if (objParam.code.indexOf('spec-') > -1) {
src = '../car_demand_plan/child/emerg_internal_car_detail.html';
}
$('#indexIframe').attr('src', src + '?isPage=1' + '&obj=' + encodeURIComponent(JSON.stringify(objParam)));
} else if (objParam.pageType === 2) { // 派车详情跳转
$('#layui-tab-title li').eq(1).addClass('layui-this');
let src = '../car_demand_plan/child/dispatch_input_detail.html';
$('#indexIframe').attr('src', src + '?isPage=1' + '&obj=' + encodeURIComponent(JSON.stringify(objParam)));
}
isExistData(objParam,1);
});
}
// 查询派车批次
function getAllOutList() {
// 校验是否存在派车批次数据
function isExistData(obj, type) {
let flag = true;
let params = {
encryptedData: JSON.stringify({
'planId': objParam.id,
'planId': obj.planId,
})
};
let url = dataUrl + 'backstage/supDispatchCar/getAllOutList';
ajaxRequest(url, "POST", params, true, function () {
let url = ''
if (type === 1) {
url = dataUrl + 'backstage/supDispatchCar/getAllOutList'; // 详情-派车批次
}
ajaxRequest(url, "POST", params, false, function () {
}, function (result) {
console.error(result);
if (result.code === 200) {
if (result.data.length === 0) {
parent.layer.msg('暂无派车批次数据', { icon: 7 });
closePage();
} else {
setBatchData(result.data);
if (result.data.length === 0 && type === 1) {
flag = false;
} else if (result.data.length === 0 && type === 2) {
flag = false;
}
} else {
}
}, function (xhr, status, error) {
errorFn(xhr, status, error)
}, null);
// 派车批次
function setBatchData(dataList) {
let html = '', id = '', status = '', type = '';
$.each(dataList, function (index, item) {
if (index === dataList.length - 1) {
id = item.id;
status = item.status;
type = item.type;
}
let batchName = '第' + numToChinese(index + 1) + '批次';
html += '<li value="' + item.id + '" status="' + item.status + '" type="' + item.type + '">' + batchName + '</li>';
})
$('#layui-tab-title').empty().append(html);
$('#layui-tab-title li').eq(dataList.length - 1).addClass('layui-this');
var scrollableElement = document.getElementById('layui-tab-brief');
// 添加事件监听器来处理滚轮事件
scrollableElement.addEventListener('wheel', function (event) {
// 阻止默认的滚动行为
event.preventDefault();
// 检查滚动的方向
var delta = event.deltaY > 0 ? -20 : 20; // 根据需要调整滚动的步长
// 设置新的滚动位置
scrollableElement.scrollLeft += delta;
});
checkNowValue = id;
checkType = type;
getUpdateList(id);
let html = '<li value="1">需求计划</li>';
if (flag) {
html += '<li value="2">派车详情</li>';
}
}
// 查询每个批次的修改记录
function getUpdateList(outId) {
let params = {
encryptedData: JSON.stringify({
planId: objParam.id,
outId: outId
})
};
let url = dataUrl + 'backstage/dispatchCar/getUpdateList';
ajaxRequest(url, "POST", params, true, function () {
}, function (result) {
console.error(result);
if (result.code === 200) {
getShipmentBatch(result.data);
$('#layui-tab-title').empty().append(html);
if (objParam.pageType === 1) { // 需求计划详情跳转
$('#layui-tab-title li').eq(0).addClass('layui-this');
let src = '../car_demand_plan/child/apply_plan_detail.html';
if (objParam.code.indexOf('spec-') > -1) {
src = '../car_demand_plan/child/emerg_internal_car_detail.html';
}
}, function (xhr, status, error) {
errorFn(xhr, status, error)
}, null);
}
// 修改记录次数
function getShipmentBatch(list) {
let dataList = [], html = '';
if (list && list.length > 0) {
$.each(list, function (index, item) {
if (index === 0) {
dataList.push({ name: '初始派车数据', id: item.id, color: '', isInit: true })
} else {
dataList.push({ name: '第' + numToChinese(index) + '次修改', id: item.id, color: '#f56c6c', isInit: false })
}
});
$('#indexIframe').attr('src', src + '?isPage=1' + '&obj=' + encodeURIComponent(JSON.stringify(objParam)));
} else if (objParam.pageType === 2) { // 派车详情跳转
$('#layui-tab-title li').eq(1).addClass('layui-this');
let src = '../car_demand_plan/child/dispatch_input_detail.html';
$('#indexIframe').attr('src', src + '?isPage=1' + '&obj=' + encodeURIComponent(JSON.stringify(objParam)));
}
$.each(dataList, function (index, item) {
html += '<li value="' + item.id + '" type="' + checkType + '" style="color:' + item.color + '" isInit=' + item.isInit + '>' + this.name + '</li>';
})
$('#layui-tab-title2').empty().append(html);
$('#layui-tab-title2 li').eq(0).addClass('layui-this');
var scrollableElement = document.getElementById('layui-tab-brief');
// 添加事件监听器来处理滚轮事件
scrollableElement.addEventListener('wheel', function (event) {
// 阻止默认的滚动行为
event.preventDefault();
// 检查滚动的方向
var delta = event.deltaY > 0 ? -20 : 20; // 根据需要调整滚动的步长
// 设置新的滚动位置
scrollableElement.scrollLeft += delta;
});
$('#indexIframe').attr('src', './dispatch_car_edit_record_detail.html?id=' + dataList[0].id + '&type=' + checkType + '&code=' + objParam.code + '&isInit=' + dataList[0].isInit);
}
// 关闭页面

View File

@ -45,9 +45,14 @@ function branchSettlementDetail(obj) {
}
// 数据概览详情
function openDetail(type) {
function openDetail(type,notUse) {
let obj = { type: type };
obj.currentTabId = currentTabId;
obj.notUse = notUse;
if(notUse){
// 用车数量、供应商统计、工程统计、租赁金额(运输车辆)、租赁金额(吊车)忽略年度查询
obj.currentTabId = ''
}
let titleArr = ['工程详情', '需求计划详情', '派车详情', '派车详情', '派车详情', '派车详情'];
openIframeByParamObj("dataDetail", titleArr[type - 1], "../welcome/data_detail_list.html", "92%", "95%", obj);
}

View File

@ -163,6 +163,7 @@
</table>
</div>
</div>
<div style="width: 100%;height: 10px;"></div>
</div>
</body>
<script src="../../../lib/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script>

View File

@ -56,7 +56,7 @@
<tr>
<th colspan="7">计划说明</th>
</tr>
<tr style="height: 100px;">
<tr>
<td colspan="7" id="remark"></td>
</tr>
</table>

View File

@ -29,7 +29,8 @@
width: 50px;
height: 50px;
}
#dispatch-car-table2{
#dispatch-car-table2 {
margin-top: 10px;
}
</style>
@ -99,7 +100,7 @@
</table>
</div>
</div>
<div id="dispatch-car-box">
<div id="dispatch-car-box" style="margin-bottom: 10px;">
<div class="title layout">
<span style="font-weight:700;text-decoration:none;color:#409EFF;"></span>
<p>用车明细</p>
@ -138,6 +139,7 @@
</table>
</div>
</div>
<div style="width: 100%;height: 5px;"></div>
</div>
</body>
<script src="../../../lib/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script>

View File

@ -55,8 +55,8 @@
</div>
<div class="layui-tab layui-tab-brief no-print" id="layui-tab-brief" lay-filter="demo-filter-tab">
<ul class="layui-tab-title" id="layui-tab-title">
<li value="1">需求计划</li>
<li value="2">派车详情</li>
<!-- <li value="1">需求计划</li>
<li value="2">派车详情</li> -->
</ul>
</div>
<div id="iframe-box">

View File

@ -100,7 +100,7 @@
<img src="../../images/data_overview.png" alt="用车数量">
<p>用车数量</p>
</div>
<a href="#">查看更多></a>
<a href="#" onclick="openDetail(5,1)">查看更多></a>
</div>
<div id="echarts-one"></div>
</div>
@ -110,7 +110,7 @@
<img src="../../images/data_overview.png" alt="供应商统计">
<p>供应商统计</p>
</div>
<a href="#">查看更多></a>
<a href="#" onclick="openDetail(5,1)">查看更多></a>
</div>
<div id="sup-count-box">
<div id="sup-title" class="layout">
@ -131,7 +131,7 @@
<img src="../../images/data_overview.png" alt="工程排名">
<p>工程排名</p>
</div>
<a href="#" onclick="openDetail(1)">查看更多></a>
<a href="#" onclick="openDetail(1,1)">查看更多></a>
</div>
<div id="pro-ranking-box">
<div id="pro-ranking-title" class="layout">
@ -152,7 +152,7 @@
<p style="color: #999;font-size: 14px;font-weight: normal;">合同金额<span
style="color: #279df5;font-size: 20px;" id="contractCarMoney">0</span></p>
</div>
<div id="echarts-two"></div>
<div id="echarts-two" onclick="openDetail(3,1)"></div>
</div>
<div id="right-container3">
<div class="title layout">
@ -163,7 +163,7 @@
<p style="color: #999;font-size: 14px;font-weight: normal;">合同金额<span
style="color: #279df5;font-size: 20px;" id="contractCraneMoney">0</span></p>
</div>
<div id="echarts-three"></div>
<div id="echarts-three" onclick="openDetail(4,1)"></div>
</div>
</div>
</div>