From a608e16b64a775b95a37a51e6af43feb53a43f06 Mon Sep 17 00:00:00 2001 From: lSun <15893999301@qq.com> Date: Mon, 2 Feb 2026 13:11:54 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=93=E7=AE=97=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/workspace.xml | 199 ++++++++++++++++++- js/car_demand_plan/child/choose_type_list.js | 19 +- js/car_settlement/branch_settlement_list.js | 12 +- js/car_settlement/sup_settlement_list.js | 13 +- 4 files changed, 229 insertions(+), 14 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 9276800..2450713 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,14 +1,211 @@ + + + + + + + + + + + + + + + + + + + + { "keyToString": { - "settings.editor.selected.configurable": "project.propVCSSupport.Confirmation" + "DefaultHtmlFileTemplate": "HTML File", + "RunOnceActivity.OpenProjectViewOnStart": "true", + "RunOnceActivity.ShowReadmeOnStart": "true", + "WebServerToolWindowFactoryState": "false", + "last_opened_file_path": "H:/bns/project/2026/gz_car_ui/js/car_application_audit", + "settings.editor.selected.configurable": "project.propVCSSupport.Confirmation", + "vue.rearranger.settings.migration": "true" } } + + + + + + + + + + + 1769581296268 + + + 1769581455051 + + + 1769581565904 + + + 1769581846914 + + + 1769582533816 + + + 1769582821378 + + + 1769584182012 + + + 1769584474368 + + + 1769587070828 + + + 1769666357659 + + + 1769666395075 + + + 1769683682659 + + + 1769692652460 + + + 1769753323851 + + + 1769758547610 + + + 1769762030822 + + + 1769764685634 + + + 1769769931634 + + + + + + + \ No newline at end of file diff --git a/js/car_demand_plan/child/choose_type_list.js b/js/car_demand_plan/child/choose_type_list.js index 840ba33..1802541 100644 --- a/js/car_demand_plan/child/choose_type_list.js +++ b/js/car_demand_plan/child/choose_type_list.js @@ -160,15 +160,16 @@ function initTable() { { field: "times", width: '15%', - title: " * 预计使用时间", + title: " * 预计使用天数", unresize: true, align: "center", - templet: (d) => + edit: 'text', + /*templet: (d) => '
', + '" readonly>',*/ style: "outline: 1px solid #e6e6e6;outline-offset: -5px;", }, { @@ -212,7 +213,7 @@ function initTable() { $('.layui-table th[data-field="0"] input[type="checkbox"]').next().addClass('layui-form-checked');//data-field值默认为0,如果在分页部分自定义了属性名,则需要改成对应的属性名 } // 初始化日期选择器 - res.data.forEach((item) => { + /*res.data.forEach((item) => { laydate.render({ elem: "#date_" + item.id, done: (value) => { @@ -224,7 +225,7 @@ function initTable() { updateOrAddObject(item.id, item) }, }) - }) + })*/ }, }); table.on('edit(currentTableId2)', function (obj) { @@ -238,6 +239,14 @@ function initTable() { return layer.msg('需用量格式不正确,最大数量只能输入10,且为正整数!', { icon: 7 }) } } + } else if (field === 'times') { // + if (value) { + const regex = /^[1-9]\d{0,5}$/; // 只能正整数,最多6位 + if (!regex.test(value)) { + obj.reedit(); + return layer.msg('预计使用天数只能输入正整数!', { icon: 7 }) + } + } } else if (field === 'remarks') { // 备注 if (value) { if (value.length > 255) { diff --git a/js/car_settlement/branch_settlement_list.js b/js/car_settlement/branch_settlement_list.js index 9882708..67dd47d 100644 --- a/js/car_settlement/branch_settlement_list.js +++ b/js/car_settlement/branch_settlement_list.js @@ -81,11 +81,15 @@ function getStatisticByCompany() { $('#num').html(parseInt(obj.comNum)); $('#num2').html(obj.proNum); $('#num3').html(parseInt(obj.needNum)); - $('#num4').html("¥" + parseInt(obj.moneys)); - $('#num5').html("¥" + parseInt(obj.payMoney)); - $('#num6').html("¥" + parseInt(obj.noPayMoney)); + $('#num4').html("¥" + formatMoney(obj.moneys)); + $('#num5').html("¥" + formatMoney(obj.payMoney)); + $('#num6').html("¥" + formatMoney(obj.noPayMoney)); } } +function formatMoney(val) { + if (val === null || val === undefined || val === '') return '0.00'; + return Number(val).toFixed(2); +} // 查询/重置 function queryTable() { @@ -293,4 +297,4 @@ function exportExcel() { } let url = dataUrl + "backstage/supApply/export3"; exportExcelUtil(url, '供应商结算统计', JSON.stringify(params)); -} \ No newline at end of file +} diff --git a/js/car_settlement/sup_settlement_list.js b/js/car_settlement/sup_settlement_list.js index 53da110..d81edd9 100644 --- a/js/car_settlement/sup_settlement_list.js +++ b/js/car_settlement/sup_settlement_list.js @@ -26,12 +26,17 @@ function getSltSupInformation() { $('#num').html(parseInt(obj.proNum)); $('#num2').html(obj.needPlan); $('#num3').html(parseInt(obj.supNum)); - $('#num4').html('¥' + parseInt(obj.money)); - $('#num5').html('¥' + parseInt(obj.payMoney)); - $('#num6').html('¥' + parseInt(obj.noPayMoney)); + $('#num4').html('¥' + formatMoney(obj.money)); + $('#num5').html('¥' + formatMoney(obj.payMoney)); + $('#num6').html('¥' + formatMoney(obj.noPayMoney)); } } +function formatMoney(val) { + if (val === null || val === undefined || val === '') return '0.00'; + return Number(val).toFixed(2); +} + // 查询/重置 function queryTable(type) { if (type === 1) { @@ -276,4 +281,4 @@ function exportExcel() { } let url = dataUrl + "backstage/carStatistics/export"; exportExcelUtil(url, '供应商结算统计', JSON.stringify(params)); -} \ No newline at end of file +}