tryInfo.js
1.66 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
/**
* Created by JiangMin on 2016/3/22.
* 试穿信息管理
*/
var $ = require('jquery');
var common = require('../common/common');
/**
* 列表显示数据
* @type {common.grid}
*/
var g = new common.grid({
el: '#content-list',
hash: false,
//查询参数
parms: function () {
return {
productSku: common.util.__input('content-filter1'),
productSkn: common.util.__input('content-filter2'),
productName: common.util.__input('content-filter3')
};
},
//列表显示
columns: [
{
display: "图片", name: "defaultImg", render: function (item) {
return '<img src="' + item.defaultImg + '" width="100" height="60"/>'
}
},//图片显示
{display: "skn", name: "productSkn"},
{display: "产品名称", name: "productName"},
{display: "品牌", name: "brandName"},
{
display: "操作", name: "", render: function (item) {
console.log("item");
console.log(item);
var arr = [];
arr.push('<a data-index="' + item.__index + '" href="/meterManage/tryInfo/info/' + item.productSkn + '" class="btn btn-info ">试穿信息</a>');
return arr.join('');
}
}
]
});
g.init("/meterManage/tryInfo/index2");
//查询按钮--点击事件
$(document).on('click', '#filter-btn', function () {
g.reload(1);
});
//new common.dialog({
// title:"",
// content:"",
// width:"80%",
// botton:[
// {
// value: "xxx",
// callback: function(){
//
// },
// css: "btn-primary"
// }
// ]
//});