supplier.InvoicesIndex.js
2.03 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
webpackJsonp([185],[
/* 0 */
/***/ function(module, exports, __webpack_require__) {
'use strict';
var $ = __webpack_require__(1),
common = __webpack_require__(2);
var ENUM = {
isSupport: {'Y': '支持', 'N': '不支持'},
defaultInvoice: {'0': '-', '1': '纸质发票', '2': '电子发票'}
};
new common.dropDown({el: '#supplier-name', ajax: 'supplier'});
new common.dropDown({el: "#isElecInvoice"});
new common.dropDown({el: "#isPaperInvoice"});
new common.dropDown({el: "#defaultInvoice"});
var g = new common.grid({
el: "#basicTable",
parms: function () {
return {
id: common.util.__input("supplier-name"),
isElecInvoice: common.util.__input("isElecInvoice"),
isPaperInvoice: common.util.__input("isPaperInvoice"),
defaultInvoice: common.util.__input("defaultInvoice")
};
},
columns: [
{display: "供应商ID", name: "supplierId"},
{display: "供应商", name: "supplierName"},
{
display: "电子发票", name: "isElecInvoice", render: function (item) {
return ENUM.isSupport[item.isElecInvoice];
}
},
{
display: "纸质发票", name: "isPaperInvoice", render: function (item) {
return ENUM.isSupport[item.isPaperInvoice];
}
},
{
display: "默认发票", name: "defaultInvoice", render: function (item) {
return ENUM.defaultInvoice[item.defaultInvoice];
}
},
{display: "更新时间", name: "updateTime"},
{
display: "操作", name: "id", render: function (item) {
var HtmArr = [];
HtmArr.push('<a href="/supplier/invoices/update/' + item.supplierId + '" class="btn btn-success btn-xs btn-edit">编辑</a>');
return HtmArr.join('');
}
}
]
})
g.init($("#gridurl").val());
$("#filter-btn").click(function () {
g.reload(1);
});
/***/ }
]);