supplier.InvoicesEdit.js
1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
webpackJsonp([184],[
/* 0 */
/***/ function(module, exports, __webpack_require__) {
var $ = __webpack_require__(1),
edit = __webpack_require__(6);
var e = new edit("#basicForm", {bucket: "yhb-img02"});
e.init();
var submit = function (callback, config) {
e.submit($("#basicForm").attr("action"), function (option) {
option.success = function (res) {
if (res.code == "200") {
e.$tip(config.msg || "提交成功", function () {
location.href = "/supplier/supplier/invoiceslist";
}, 'growl-success');
} else {
e.$tip(res.message);
}
return false;
},
option.error = function (res) {
e.$tip("提交失败");
}
callback && callback(option.data);
});
};
$(document).on('click', '#saveInvoices',function () {
submit(function (data) {
data.operations ? data.operations : data.operations = 1;
if (+data.status == 300) {
data.operations = 2;
}
data.status = 200;
}, {msg: "提交成功"});
return false;
});
/***/ }
]);