...
|
...
|
@@ -105,30 +105,37 @@ if ($('.contentpanel').data('type') == 'info') { |
|
|
var e = new common.edit('#netsaleAllInfo');
|
|
|
$(document).on("click", "#saveAllInfo", function() {
|
|
|
var data = {};
|
|
|
var error = '';
|
|
|
var allData = GOLABDATA.fire();
|
|
|
|
|
|
$.each(allData, function(key, value) {
|
|
|
if (typeof value == 'string') {
|
|
|
data = value;
|
|
|
console.log(value);
|
|
|
error += value;
|
|
|
return;
|
|
|
}
|
|
|
$.extend(data, value, true);
|
|
|
});
|
|
|
|
|
|
e.submit('/goods/product/saveNetSaleAllInfo', function(option) {
|
|
|
option.data = data;
|
|
|
option.success = function(res) {
|
|
|
res = res.data;
|
|
|
if (res.code == '200') {
|
|
|
e.$tip(res.message, function() {
|
|
|
history.go(-1);
|
|
|
}, 'growl-success');
|
|
|
} else {
|
|
|
e.$tip(res.message);
|
|
|
if (error !== '') {
|
|
|
common.util.__tip(error, 'warning');
|
|
|
} else {
|
|
|
e.submit('/goods/product/saveNetSaleAllInfo', function(option) {
|
|
|
option.data = data;
|
|
|
option.success = function(res) {
|
|
|
res = res.data;
|
|
|
if (res.code == '200') {
|
|
|
e.$tip(res.message, function() {
|
|
|
history.go(-1);
|
|
|
}, 'growl-success');
|
|
|
} else {
|
|
|
e.$tip(res.message);
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
|
...
|
...
|
|