tryInfo.js 1.66 KB
/**
 * 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"
//        }
//    ]
//});