From b1303569f086da8cc56de2aa9e460b05c4774980 Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Wed, 13 Nov 2024 11:59:22 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E4=BB=B6=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/accessory/child/accessory_store_edit_form.js | 4 ++++ js/accessory/child/accessory_store_form.js | 4 ++++ js/demandPlan/child/send_goods_form.js | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/js/accessory/child/accessory_store_edit_form.js b/js/accessory/child/accessory_store_edit_form.js index d007ecb..5e322b0 100644 --- a/js/accessory/child/accessory_store_edit_form.js +++ b/js/accessory/child/accessory_store_edit_form.js @@ -32,6 +32,10 @@ function setParams(obj) { auto: false, //是否自动上传 ,默认为true bindAction: '#hideUpload', //绑定的按钮 choose: function (obj) { + let length = $('.file-iteme').length; + if(length >= 5){ + return layer.msg('最多上传5个附件证明', { icon: 7 }); + } uploadObj.config.elem.next()[0].value = ''; obj.preview(function (index, file, result) { console.log(file); diff --git a/js/accessory/child/accessory_store_form.js b/js/accessory/child/accessory_store_form.js index 4254804..8291d7d 100644 --- a/js/accessory/child/accessory_store_form.js +++ b/js/accessory/child/accessory_store_form.js @@ -32,6 +32,10 @@ function setParams(obj) { auto: false, //是否自动上传 ,默认为true bindAction: '#hideUpload', //绑定的按钮 choose: function (obj) { + let length = $('.file-iteme').length; + if(length >= 5){ + return layer.msg('最多上传5个附件证明', { icon: 7 }); + } uploadObj.config.elem.next()[0].value = ''; obj.preview(function (index, file, result) { console.log(file); diff --git a/js/demandPlan/child/send_goods_form.js b/js/demandPlan/child/send_goods_form.js index 6efa32a..49974b3 100644 --- a/js/demandPlan/child/send_goods_form.js +++ b/js/demandPlan/child/send_goods_form.js @@ -34,6 +34,10 @@ function setParams(obj) { auto: false, //是否自动上传 ,默认为true bindAction: '#hideUpload', //绑定的按钮 choose: function (obj) { + let length = $('.file-iteme').length; + if (length >= 5) { + return layer.msg('最多上传5个发货附件', { icon: 7 }); + } uploadObj.config.elem.next()[0].value = ''; obj.preview(function (index, file, result) { console.log(file);