...
|
...
|
@@ -27,9 +27,13 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin |
|
|
{checkbox: true},
|
|
|
{field: 'id', title: __('Id')},
|
|
|
{field: 'image', title: __('Image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
|
|
|
// {field: 'web', title: __('Web'), operate: 'LIKE'},
|
|
|
{field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2'),"3":__('Type 3')}, formatter: Table.api.formatter.normal},
|
|
|
// {field: 'Goods_id', title: __('Goods_id')},
|
|
|
// {field: 'weigh', title: __('Weigh'), operate: false},
|
|
|
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
|
|
{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
|
|
// {field: 'goods.title', title: __('Goods.title'), operate: 'LIKE'},
|
|
|
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
|
|
]
|
|
|
]
|
...
|
...
|
@@ -39,9 +43,68 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin |
|
|
Table.api.bindevent(table);
|
|
|
},
|
|
|
add: function () {
|
|
|
var Type = document.getElementById("c-type");
|
|
|
var JumpWeb = document.getElementById("jump_web");
|
|
|
var JumpPage = document.getElementById("jump_page");
|
|
|
var Goods = document.getElementById("Goods");
|
|
|
Type.onchange = function () {
|
|
|
if (Type.value == 1) {
|
|
|
JumpPage.style.display = 'none';
|
|
|
Goods.style.display = 'block';
|
|
|
JumpWeb.style.display = 'none';
|
|
|
}
|
|
|
if(Type.value == 2){
|
|
|
Goods.style.display = 'none';
|
|
|
JumpWeb.style.display = 'block';
|
|
|
JumpPage.style.display = 'none';
|
|
|
}
|
|
|
if(Type.value == 3){
|
|
|
Goods.style.display = 'none';
|
|
|
JumpWeb.style.display = 'none';
|
|
|
JumpPage.style.display = 'block';
|
|
|
}
|
|
|
};
|
|
|
Controller.api.bindevent();
|
|
|
},
|
|
|
edit: function () {
|
|
|
var Type = Config.type;
|
|
|
var JumpWeb = document.getElementById("jump_web");
|
|
|
var JumpPage = document.getElementById("jump_page");
|
|
|
var Goods = document.getElementById("Goods");
|
|
|
if (Type == 1) {
|
|
|
JumpPage.style.display = 'none';
|
|
|
Goods.style.display = 'block';
|
|
|
JumpWeb.style.display = 'none';
|
|
|
}
|
|
|
if(Type == 2){
|
|
|
Goods.style.display = 'none';
|
|
|
JumpWeb.style.display = 'block';
|
|
|
JumpPage.style.display = 'none';
|
|
|
}
|
|
|
if(Type == 3){
|
|
|
Goods.style.display = 'none';
|
|
|
JumpWeb.style.display = 'none';
|
|
|
JumpPage.style.display = 'block';
|
|
|
}
|
|
|
|
|
|
var Type2 = document.getElementById("c-type");
|
|
|
Type2.onchange = function () {
|
|
|
if (Type2.value == 1) {
|
|
|
JumpPage.style.display = 'none';
|
|
|
Goods.style.display = 'block';
|
|
|
JumpWeb.style.display = 'none';
|
|
|
}
|
|
|
if(Type2.value == 2){
|
|
|
Goods.style.display = 'none';
|
|
|
JumpWeb.style.display = 'block';
|
|
|
JumpPage.style.display = 'none';
|
|
|
}
|
|
|
if(Type2.value == 3){
|
|
|
Goods.style.display = 'none';
|
|
|
JumpWeb.style.display = 'none';
|
|
|
JumpPage.style.display = 'block';
|
|
|
}
|
|
|
};
|
|
|
Controller.api.bindevent();
|
|
|
},
|
|
|
api: {
|
...
|
...
|
|