From 6062eeb33bf5b4264323396d8b8806d12a73dc10 Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Wed, 22 Jan 2025 17:04:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../child/choose_car_or_user_list.js | 4 +-- .../child/dispatch_car_edit_form.js | 27 +++++++++++-------- .../child/dispatch_input_edit_form.js | 27 +++++++++++-------- .../child/dispatch_input_form.js | 27 +++++++++++-------- 4 files changed, 50 insertions(+), 35 deletions(-) diff --git a/js/car_demand_plan/child/choose_car_or_user_list.js b/js/car_demand_plan/child/choose_car_or_user_list.js index 14694d7..8b72802 100644 --- a/js/car_demand_plan/child/choose_car_or_user_list.js +++ b/js/car_demand_plan/child/choose_car_or_user_list.js @@ -102,7 +102,7 @@ function initTable() { }, cols: [ [ - { type: 'radio', title: '😊', width: '10%', }, + { type: 'radio', title: '', width: '10%', }, { width: '9.9%', title: "序号", @@ -189,7 +189,7 @@ function initTable2() { }, cols: [ [ - { type: 'radio', title: '😊', width: '10%', }, + { type: 'radio', title: '', width: '10%', }, { width: '9.9%', title: "序号", diff --git a/js/car_demand_plan/child/dispatch_car_edit_form.js b/js/car_demand_plan/child/dispatch_car_edit_form.js index 6cebf25..f017a63 100644 --- a/js/car_demand_plan/child/dispatch_car_edit_form.js +++ b/js/car_demand_plan/child/dispatch_car_edit_form.js @@ -985,17 +985,22 @@ function getDriverPhotoInfo(obj) { }); if (obj.type === 4) { let cent = ''; - $.each(operList, function (index, item) { - let filePath = fileUrl + item.fileUrl + '?token=' + sessionStorage.getItem("gz-token"); - if (index === 0) { - $('#form' + obj.formName).find('.driverImg55').attr('src', filePath); - } else { - cent += '
' + - '操作证' + - '

操作证' + (index + 1) + '

'; - } - }) - $('#form' + obj.formName).find('.driverImg55').parents('.zjphoto').after(cent); + if(operList.length === 0){ + $('#form' + obj.formName).find('.driverImg55').attr('src', "../../../images/no_photo_icon.png"); + }else{ + $.each(operList, function (index, item) { + let filePath = fileUrl + item.fileUrl + '?token=' + sessionStorage.getItem("gz-token"); + if (index === 0) { + $('#form' + obj.formName).find('.driverImg55').attr('src', filePath); + } else { + cent += '
' + + '操作证' + + '

操作证' + (index + 1) + '

'; + } + }) + } + $('#form' + obj.formName).find('.otherPhoto').remove(); + $('#form' + obj.formName).find('.driverImg55').parent('.zjphoto').after(cent); } } // 设置文件类型 diff --git a/js/car_demand_plan/child/dispatch_input_edit_form.js b/js/car_demand_plan/child/dispatch_input_edit_form.js index 97d7395..3178ba3 100644 --- a/js/car_demand_plan/child/dispatch_input_edit_form.js +++ b/js/car_demand_plan/child/dispatch_input_edit_form.js @@ -915,17 +915,22 @@ function getDriverPhotoInfo(obj) { }); if (obj.type === 4) { let cent = ''; - $.each(operList, function (index, item) { - let filePath = fileUrl + item.fileUrl + '?token=' + sessionStorage.getItem("gz-token"); - if (index === 0) { - $('#form' + obj.formName).find('.driverImg55').attr('src', filePath); - } else { - cent += '
' + - '操作证' + - '

操作证' + (index + 1) + '

'; - } - }) - $('#form' + obj.formName).find('.driverImg55').parents('.zjphoto').after(cent); + if(operList.length === 0){ + $('#form' + obj.formName).find('.driverImg55').attr('src', "../../../images/no_photo_icon.png"); + }else{ + $.each(operList, function (index, item) { + let filePath = fileUrl + item.fileUrl + '?token=' + sessionStorage.getItem("gz-token"); + if (index === 0) { + $('#form' + obj.formName).find('.driverImg55').attr('src', filePath); + } else { + cent += '
' + + '操作证' + + '

操作证' + (index + 1) + '

'; + } + }) + } + $('#form' + obj.formName).find('.otherPhoto').remove(); + $('#form' + obj.formName).find('.driverImg55').parent('.zjphoto').after(cent); } } // 设置文件类型 diff --git a/js/car_demand_plan/child/dispatch_input_form.js b/js/car_demand_plan/child/dispatch_input_form.js index abd484c..678e2d1 100644 --- a/js/car_demand_plan/child/dispatch_input_form.js +++ b/js/car_demand_plan/child/dispatch_input_form.js @@ -943,17 +943,22 @@ function getDriverPhotoInfo(obj) { }); if (obj.type === 4) { let cent = ''; - $.each(operList, function (index, item) { - let filePath = fileUrl + item.fileUrl + '?token=' + sessionStorage.getItem("gz-token"); - if (index === 0) { - $('#form' + obj.formName).find('.driverImg55').attr('src', filePath); - } else { - cent += '
' + - '操作证' + - '

操作证' + (index + 1) + '

'; - } - }) - $('#form' + obj.formName).find('.driverImg55').parents('.zjphoto').after(cent); + if(operList.length === 0){ + $('#form' + obj.formName).find('.driverImg55').attr('src', "../../../images/no_photo_icon.png"); + }else{ + $.each(operList, function (index, item) { + let filePath = fileUrl + item.fileUrl + '?token=' + sessionStorage.getItem("gz-token"); + if (index === 0) { + $('#form' + obj.formName).find('.driverImg55').attr('src', filePath); + } else { + cent += '
' + + '操作证' + + '

操作证' + (index + 1) + '

'; + } + }) + } + $('#form' + obj.formName).find('.otherPhoto').remove(); + $('#form' + obj.formName).find('.driverImg55').parent('.zjphoto').after(cent); } } // 设置文件类型