...
|
...
|
@@ -4,7 +4,9 @@ |
|
|
* @date: 2016/7/15
|
|
|
*/
|
|
|
var $ = require('yoho-jquery'),
|
|
|
lazyload = require('yoho-jquery-lazyload');
|
|
|
lazyload = require('yoho-jquery-lazyload'),
|
|
|
handlebars = require('yoho-handlebars'),
|
|
|
upload = require('../plugins/upload');
|
|
|
|
|
|
var $refundTable = $('.refund-goods'),
|
|
|
$check = $('.check'),
|
...
|
...
|
@@ -20,6 +22,15 @@ var orderCode = $('#order-code').val() || 0, |
|
|
dom: $typeInfo.eq(0)
|
|
|
};
|
|
|
|
|
|
var tpl = '<div class="img-wrap">' +
|
|
|
'<div class="img-opt">' +
|
|
|
'<span>查看</span>' +
|
|
|
'<span>删除</span>' +
|
|
|
'</div>' +
|
|
|
'<div class="img-view"><img src="{{data}}"></div>' +
|
|
|
'</div>',
|
|
|
imgFn = handlebars.compile(tpl);
|
|
|
|
|
|
var checked;
|
|
|
|
|
|
require('../plugins/check');
|
...
|
...
|
@@ -128,8 +139,20 @@ $refundTable.on('change', '.refund-reason', function() { |
|
|
$specialDom.slideUp();
|
|
|
}
|
|
|
$specialDom.siblings('.check').data({reason: val});
|
|
|
}).on('click', '.img-upload', function() {
|
|
|
var $this = $(this);
|
|
|
|
|
|
upload.up({
|
|
|
callback: function(result) {
|
|
|
if (result && result.code === 200) {
|
|
|
$this.before(imgFn(result));
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$refundType.on('click', '.type-item', function() {
|
|
|
var $this = $(this),
|
|
|
index;
|
...
|
...
|
|