diff --git a/js/accessory/child/accessory_out_bound_detail.js b/js/accessory/child/accessory_out_bound_detail.js
index 103fcc1..9bea36c 100644
--- a/js/accessory/child/accessory_out_bound_detail.js
+++ b/js/accessory/child/accessory_out_bound_detail.js
@@ -34,17 +34,21 @@ function setParams(params) {
return layer.msg('最多上传5个附件证明', { icon: 7 });
}
uploadObj.config.elem.next()[0].value = '';
+ let num = 0;
obj.preview(function (index, file, result) {
- $('#uploader-list').append(
- '
' +
- '
' +
- handleFileType(index, file, result) +
- '
'
- );
- let map = new Map();//将选择的图片索引和图片写成对象存入集合
- map.index = index;
- map.file = file;
- fileList.push(map);
+ num ++;
+ if(num <= (5-length)){
+ $('#uploader-list').append(
+ '' +
+ '
' +
+ handleFileType(index, file, result) +
+ '
'
+ );
+ let map = new Map();//将选择的图片索引和图片写成对象存入集合
+ map.index = index;
+ map.file = file;
+ fileList.push(map);
+ }
});
}
});
diff --git a/js/accessory/child/accessory_return_form.js b/js/accessory/child/accessory_return_form.js
index 47fbd01..0117e26 100644
--- a/js/accessory/child/accessory_return_form.js
+++ b/js/accessory/child/accessory_return_form.js
@@ -47,17 +47,21 @@ function setParams(obj) {
return layer.msg('最多上传5个附件证明', { icon: 7 });
}
uploadObj.config.elem.next()[0].value = '';
+ let num = 0;
obj.preview(function (index, file, result) {
- $('#uploader-list').append(
- '' +
- '
' +
- handleFileType(index, file, result) +
- '
'
- );
- let map = new Map();//将选择的图片索引和图片写成对象存入集合
- map.index = index;
- map.file = file;
- fileList.push(map);
+ num ++;
+ if(num <= (5-length)){
+ $('#uploader-list').append(
+ '' +
+ '
' +
+ handleFileType(index, file, result) +
+ '
'
+ );
+ let map = new Map();//将选择的图片索引和图片写成对象存入集合
+ map.index = index;
+ map.file = file;
+ fileList.push(map);
+ }
});
}
});
diff --git a/js/accessory/child/accessory_scrap_form.js b/js/accessory/child/accessory_scrap_form.js
index 722b59f..e3689aa 100644
--- a/js/accessory/child/accessory_scrap_form.js
+++ b/js/accessory/child/accessory_scrap_form.js
@@ -36,17 +36,21 @@ function setParams(obj) {
return layer.msg('最多上传5个附件证明', { icon: 7 });
}
uploadObj.config.elem.next()[0].value = '';
+ let num = 0;
obj.preview(function (index, file, result) {
- $('#uploader-list').append(
- '' +
- '
' +
- handleFileType(index, file, result) +
- '
'
- );
- let map = new Map();//将选择的图片索引和图片写成对象存入集合
- map.index = index;
- map.file = file;
- fileList.push(map);
+ num ++;
+ if(num <= (5-length)){
+ $('#uploader-list').append(
+ '' +
+ '
' +
+ handleFileType(index, file, result) +
+ '
'
+ );
+ let map = new Map();//将选择的图片索引和图片写成对象存入集合
+ map.index = index;
+ map.file = file;
+ fileList.push(map);
+ }
});
}
});
diff --git a/js/accessory/child/accessory_store_edit_form.js b/js/accessory/child/accessory_store_edit_form.js
index 840031b..70a1ac8 100644
--- a/js/accessory/child/accessory_store_edit_form.js
+++ b/js/accessory/child/accessory_store_edit_form.js
@@ -37,17 +37,21 @@ function setParams(obj) {
return layer.msg('最多上传5个附件证明', { icon: 7 });
}
uploadObj.config.elem.next()[0].value = '';
+ let num = 0;
obj.preview(function (index, file, result) {
- $('#uploader-list').append(
- '' +
- '
' +
- handleFileType(index, file, result) +
- '
'
- );
- let map = new Map();//将选择的图片索引和图片写成对象存入集合
- map.index = index;
- map.file = file;
- fileList.push(map);
+ num ++;
+ if(num <= (5-length)){
+ $('#uploader-list').append(
+ '' +
+ '
' +
+ handleFileType(index, file, result) +
+ '
'
+ );
+ let map = new Map();//将选择的图片索引和图片写成对象存入集合
+ map.index = index;
+ map.file = file;
+ fileList.push(map);
+ }
});
}
});
diff --git a/js/accessory/child/accessory_store_form.js b/js/accessory/child/accessory_store_form.js
index f1fbbab..bfbc52e 100644
--- a/js/accessory/child/accessory_store_form.js
+++ b/js/accessory/child/accessory_store_form.js
@@ -37,17 +37,21 @@ function setParams(obj) {
return layer.msg('最多上传5个附件证明', { icon: 7 });
}
uploadObj.config.elem.next()[0].value = '';
+ let num = 0;
obj.preview(function (index, file, result) {
- $('#uploader-list').append(
- '' +
- '
' +
- handleFileType(index, file, result) +
- '
'
- );
- let map = new Map();//将选择的图片索引和图片写成对象存入集合
- map.index = index;
- map.file = file;
- fileList.push(map);
+ num ++;
+ if(num <= (5-length)){
+ $('#uploader-list').append(
+ '' +
+ '
' +
+ handleFileType(index, file, result) +
+ '
'
+ );
+ let map = new Map();//将选择的图片索引和图片写成对象存入集合
+ map.index = index;
+ map.file = file;
+ fileList.push(map);
+ }
});
}
});
diff --git a/js/accessory/child/inventory_count_form.js b/js/accessory/child/inventory_count_form.js
index 84500a8..3472060 100644
--- a/js/accessory/child/inventory_count_form.js
+++ b/js/accessory/child/inventory_count_form.js
@@ -38,17 +38,21 @@ function setParams(obj) {
return layer.msg('最多上传5个附件证明', { icon: 7 });
}
uploadObj.config.elem.next()[0].value = '';
+ let num = 0;
obj.preview(function (index, file, result) {
- $('#uploader-list').append(
- '' +
- '
' +
- handleFileType(index, file, result) +
- '
'
- );
- let map = new Map();//将选择的图片索引和图片写成对象存入集合
- map.index = index;
- map.file = file;
- fileList.push(map);
+ num ++;
+ if(num <= (5-length)){
+ $('#uploader-list').append(
+ '' +
+ '
' +
+ handleFileType(index, file, result) +
+ '
'
+ );
+ let map = new Map();//将选择的图片索引和图片写成对象存入集合
+ map.index = index;
+ map.file = file;
+ fileList.push(map);
+ }
});
}
});
diff --git a/js/demandPlan/child/send_goods_form.js b/js/demandPlan/child/send_goods_form.js
index 89450f1..ec80a4b 100644
--- a/js/demandPlan/child/send_goods_form.js
+++ b/js/demandPlan/child/send_goods_form.js
@@ -39,17 +39,21 @@ function setParams(obj) {
return layer.msg('最多上传5个发货附件', { icon: 7 });
}
uploadObj.config.elem.next()[0].value = '';
+ let num = 0;
obj.preview(function (index, file, result) {
- $('#uploader-list').append(
- '' +
- '
' +
- handleFileType(index, file, result) +
- '
'
- );
- let map = new Map();//将选择的图片索引和图片写成对象存入集合
- map.index = index;
- map.file = file;
- fileList.push(map);
+ num++;
+ if (num <= (5 - length)) {
+ $('#uploader-list').append(
+ '' +
+ '
' +
+ handleFileType(index, file, result) +
+ '
'
+ );
+ let map = new Map();//将选择的图片索引和图片写成对象存入集合
+ map.index = index;
+ map.file = file;
+ fileList.push(map);
+ }
});
}
});
@@ -146,9 +150,9 @@ function initTable() {
limitName: 'pageSize'
},
parseData: function (res) { // res 即为原始返回的数据
- if(res.code === 401){
+ if (res.code === 401) {
closeWindowOpen();
- }
+ }
if (jjDetailArr && res.list) {
$.each(res.list, function (index, item) {
$.each(jjDetailArr, function (index2, item2) {