diff --git a/css/public.css b/css/public.css index 82db84e..0ace754 100644 --- a/css/public.css +++ b/css/public.css @@ -87,7 +87,7 @@ body { } .layui-table-view .layui-table th { - font-size: 18px; + font-size: 16px; color: #262626; letter-spacing: 1px; } diff --git a/js/car_basic/car_list.js b/js/car_basic/car_list.js index ea920e3..35da275 100644 --- a/js/car_basic/car_list.js +++ b/js/car_basic/car_list.js @@ -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) { diff --git a/js/car_basic/framework_contract_list.js b/js/car_basic/framework_contract_list.js index b3562bb..57b0f1e 100644 --- a/js/car_basic/framework_contract_list.js +++ b/js/car_basic/framework_contract_list.js @@ -140,7 +140,7 @@ function initTable() { }, { field: "money", - width: '8%', + width: '11%', title: "合同金额(元)", unresize: true, align: "center", diff --git a/js/car_demand_plan/child/dispatch_car_detail.js b/js/car_demand_plan/child/dispatch_car_detail.js index de28313..d23a74e 100644 --- a/js/car_demand_plan/child/dispatch_car_detail.js +++ b/js/car_demand_plan/child/dispatch_car_detail.js @@ -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(); } diff --git a/js/car_demand_plan/child/dispatch_car_pro_detail.js b/js/car_demand_plan/child/dispatch_car_pro_detail.js index a88a010..ae8fcdf 100644 --- a/js/car_demand_plan/child/dispatch_car_pro_detail.js +++ b/js/car_demand_plan/child/dispatch_car_pro_detail.js @@ -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; diff --git a/js/car_demand_plan/child/dispatch_input_detail.js b/js/car_demand_plan/child/dispatch_input_detail.js index 2e86a54..438bbeb 100644 --- a/js/car_demand_plan/child/dispatch_input_detail.js +++ b/js/car_demand_plan/child/dispatch_input_detail.js @@ -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')) diff --git a/js/car_demand_plan/dispatch_car_list.js b/js/car_demand_plan/dispatch_car_list.js index 2b9e11c..0d4f608 100644 --- a/js/car_demand_plan/dispatch_car_list.js +++ b/js/car_demand_plan/dispatch_car_list.js @@ -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, diff --git a/js/car_settlement/child/branch_settlement_detail.js b/js/car_settlement/child/branch_settlement_detail.js index d892fdf..862ea33 100644 --- a/js/car_settlement/child/branch_settlement_detail.js +++ b/js/car_settlement/child/branch_settlement_detail.js @@ -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 ' ¥ ' + (d.money ? d.money : 0) + ''; }, }, { @@ -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 ' ¥ ' + (d.payMoney ? d.payMoney : 0) + ''; }, }, { @@ -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 ' ¥ ' + (d.noPayMoney ? d.noPayMoney : 0) + ''; }, }, { diff --git a/js/car_settlement/child/branch_settlement_pro_detail.js b/js/car_settlement/child/branch_settlement_pro_detail.js index e4851fa..7989da0 100644 --- a/js/car_settlement/child/branch_settlement_pro_detail.js +++ b/js/car_settlement/child/branch_settlement_pro_detail.js @@ -158,7 +158,7 @@ function initTable() { align: "center", sort:true, templet: function (d) { - return " ¥ " + d.money ? d.money : 0; + return ' ¥ ' + (d.money ? d.money : 0) + ''; }, }, { @@ -169,7 +169,7 @@ function initTable() { sort:true, unresize: true, templet: function (d) { - return " ¥ " + d.payMoney ? d.payMoney : 0; + return ' ¥ ' + (d.payMoney ? d.payMoney : 0) + ''; }, }, { @@ -180,7 +180,7 @@ function initTable() { sort:true, unresize: true, templet: function (d) { - return " ¥ " + d.noPayMoney ? d.noPayMoney : 0; + return ' ¥ ' + (d.noPayMoney ? d.noPayMoney : 0) + ''; }, }, { @@ -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; } \ No newline at end of file diff --git a/js/car_settlement/payment_list.js b/js/car_settlement/payment_list.js index 6581fb7..2bce01a 100644 --- a/js/car_settlement/payment_list.js +++ b/js/car_settlement/payment_list.js @@ -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) { diff --git a/js/welcome/data_detail_list.js b/js/welcome/data_detail_list.js index 49feafa..9135eab 100644 --- a/js/welcome/data_detail_list.js +++ b/js/welcome/data_detail_list.js @@ -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('-'); diff --git a/js/welcome/plan_dispatch_detail.js b/js/welcome/plan_dispatch_detail.js index 5f22581..5d4c251 100644 --- a/js/welcome/plan_dispatch_detail.js +++ b/js/welcome/plan_dispatch_detail.js @@ -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 += '
  • ' + batchName + '
  • '; - }) - $('#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 = '
  • 需求计划
  • '; + if (flag) { + html += '
  • 派车详情
  • '; } -} - -// 查询每个批次的修改记录 -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 += '
  • ' + this.name + '
  • '; - }) - $('#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); } // 关闭页面 diff --git a/js/welcome/welcome-1.js b/js/welcome/welcome-1.js index f233d22..8e855cf 100644 --- a/js/welcome/welcome-1.js +++ b/js/welcome/welcome-1.js @@ -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); } diff --git a/page/car_demand_plan/child/arrival_confirm_detail.html b/page/car_demand_plan/child/arrival_confirm_detail.html index 0dd4305..0b6f57c 100644 --- a/page/car_demand_plan/child/arrival_confirm_detail.html +++ b/page/car_demand_plan/child/arrival_confirm_detail.html @@ -163,6 +163,7 @@ +
    diff --git a/page/car_demand_plan/child/emerg_internal_car_detail.html b/page/car_demand_plan/child/emerg_internal_car_detail.html index 82fba95..35b2d1a 100644 --- a/page/car_demand_plan/child/emerg_internal_car_detail.html +++ b/page/car_demand_plan/child/emerg_internal_car_detail.html @@ -56,7 +56,7 @@ 计划说明 - + diff --git a/page/car_settlement/child/settlement_detail.html b/page/car_settlement/child/settlement_detail.html index 0b34344..e29db59 100644 --- a/page/car_settlement/child/settlement_detail.html +++ b/page/car_settlement/child/settlement_detail.html @@ -29,7 +29,8 @@ width: 50px; height: 50px; } - #dispatch-car-table2{ + + #dispatch-car-table2 { margin-top: 10px; } @@ -99,7 +100,7 @@ -
    +

    用车明细

    @@ -138,6 +139,7 @@
    +
    diff --git a/page/welcome/plan_dispatch_detail.html b/page/welcome/plan_dispatch_detail.html index ba46799..bc6e772 100644 --- a/page/welcome/plan_dispatch_detail.html +++ b/page/welcome/plan_dispatch_detail.html @@ -55,8 +55,8 @@
    diff --git a/page/welcome/welcome-1.html b/page/welcome/welcome-1.html index 81bf843..9b1839d 100644 --- a/page/welcome/welcome-1.html +++ b/page/welcome/welcome-1.html @@ -100,7 +100,7 @@ 用车数量

    用车数量

    - 查看更多> + 查看更多>
    @@ -110,7 +110,7 @@ 供应商统计

    供应商统计

    - 查看更多> + 查看更多>
    @@ -131,7 +131,7 @@ 工程排名

    工程排名

    - 查看更多> + 查看更多>
    @@ -152,7 +152,7 @@

    合同金额0

    -
    +
    @@ -163,7 +163,7 @@

    合同金额0

    -
    +