product.productMaterial.Edit.js
937 Bytes
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
webpackJsonp([145],[
/* 0 */
/***/ function(module, exports, __webpack_require__) {
var $ = __webpack_require__(1),
common=__webpack_require__(2);
// 设置 物理类目 下拉框
$('#maxSortId').html(common.util.__template($('#max-sort-template').html()));
var e = new common.edit("#materialForm", {bucket: "material"});
e.init();
// 提交
$(document).on('click', '.submit-btn', function() {
e.submit($("#materialForm").attr("action"),function(option) {
console.log(option.data);
option.success=function(res) {
if(res.code == 200) {
e.$tip('提交成功',function(){
history.go(-1);
},'growl-success');
} else {
e.$tip(res.message);
}
return false;
},
option.error=function(res){
e.$tip("提交失败");
}
});
});
/***/ }
]);