Authored by yyq

上传提示

... ... @@ -215,7 +215,7 @@ $refundTable.on('change', '.refund-reason', function() {
num = $this.data('num') || 0;
if (num > 3) {
new Alert('<h1>最多上传4张凭证</h1>').show();
$this.addClass('hide');
return;
}
... ... @@ -224,8 +224,12 @@ $refundTable.on('change', '.refund-reason', function() {
if (result && result.code === 200) {
// 避免异步上传导致数量不统一
num = $this.data('num') || 0;
if (num > 3) {
$this.addClass('hide');
return;
} else if (num === 3) {
$this.addClass('hide');
}
$this.siblings('.img-up-tip').text(++num + '/4');
$this.data('num', num);
... ... @@ -241,7 +245,7 @@ $refundTable.on('change', '.refund-reason', function() {
$wrap.siblings('.img-up-tip').text(--num + '/4');
$wrap.remove();
$upBtn.data('num', num);
$upBtn.removeClass('hide').data('num', num);
});
$refundType.on('click', '.type-item', function() {
... ...