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);