From d1a5471eb833f5caa8dbf72f3ac35dfe65d5afc8 Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Fri, 17 Jan 2025 18:28:32 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/public.css | 2 +- js/car_basic/car_list.js | 8 +- js/car_basic/framework_contract_list.js | 2 +- .../child/dispatch_car_detail.js | 2 +- .../child/dispatch_car_pro_detail.js | 2 +- .../child/dispatch_input_detail.js | 4 +- js/car_demand_plan/dispatch_car_list.js | 14 +- .../child/branch_settlement_detail.js | 22 +-- .../child/branch_settlement_pro_detail.js | 48 ++++++- js/car_settlement/payment_list.js | 8 +- js/welcome/data_detail_list.js | 8 +- js/welcome/plan_dispatch_detail.js | 125 ++++-------------- js/welcome/welcome-1.js | 7 +- .../child/arrival_confirm_detail.html | 1 + .../child/emerg_internal_car_detail.html | 2 +- .../child/settlement_detail.html | 6 +- page/welcome/plan_dispatch_detail.html | 4 +- page/welcome/welcome-1.html | 10 +- 18 files changed, 127 insertions(+), 148 deletions(-) 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 += '