Authored by yyq

error tip

... ... @@ -5,7 +5,10 @@
*/
var $ = require('yoho-jquery');
var Dialog = require('../common/dialog').Dialog;
var dialog = require('../common/dialog');
var Dialog = dialog.Dialog,
Alert = dialog.Alert;
var $hideDg = $('#invoice-hide-dg');
... ... @@ -180,6 +183,7 @@ $('#me-invoice-orders').on('click', '.supply-invoice', function() {
btnClass: ['sure-apply'],
cb: function() {
var info = packInvoiceInfo(dg.$el);
var errAlert;
if (!validateInvoice(dg.$el, info)) {
return;
... ... @@ -188,6 +192,13 @@ $('#me-invoice-orders').on('click', '.supply-invoice', function() {
info.orderCode = $(this).data('id');
supplyInvoice(info, function(data) {
if (data.code !== 200) {
dg.$el.hide();
errAlert = new Alert(data.message).show();
errAlert.$el.on('click', '.close', function() {
dg.$el.show();
}).on('click', '.alert-sure', function() {
dg.$el.show();
});
return;
}
... ...