|
@@ -20,13 +20,13 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template', 'litestor |
|
@@ -20,13 +20,13 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template', 'litestor |
20
|
var table = $("#table");
|
20
|
var table = $("#table");
|
21
|
table.on('post-common-search.bs.table', function (event, table) {
|
21
|
table.on('post-common-search.bs.table', function (event, table) {
|
22
|
var form = $("form", table.$commonsearch);
|
22
|
var form = $("form", table.$commonsearch);
|
23
|
- $("input[name='category_id']", form).addClass("selectpage").data("source", "litestore/litestorecategory/index").data("primaryKey", "id").data("field", "name").data("orderBy", "id asc").data("pageSize",20);
|
23
|
+ $("input[name='category_id']", form).addClass("selectpage").data("source", "litestore/litestorecategory/index").data("primaryKey", "id").data("field", "name").data("orderBy", "id asc").data("pageSize", 20);
|
24
|
Form.events.cxselect(form);
|
24
|
Form.events.cxselect(form);
|
25
|
Form.events.selectpage(form);
|
25
|
Form.events.selectpage(form);
|
26
|
});
|
26
|
});
|
27
|
table.on('post-common-search.bs.table', function (event, table) {
|
27
|
table.on('post-common-search.bs.table', function (event, table) {
|
28
|
var form = $("form", table.$commonsearch);
|
28
|
var form = $("form", table.$commonsearch);
|
29
|
- $("input[name='activity_id']", form).addClass("selectpage").data("source", "activity/index").data("primaryKey", "id").data("field", "name").data("orderBy", "id asc").data("pageSize",20);
|
29
|
+ $("input[name='activity_id']", form).addClass("selectpage").data("source", "activity/index").data("primaryKey", "id").data("field", "name").data("orderBy", "id asc").data("pageSize", 20);
|
30
|
Form.events.cxselect(form);
|
30
|
Form.events.cxselect(form);
|
31
|
Form.events.selectpage(form);
|
31
|
Form.events.selectpage(form);
|
32
|
});
|
32
|
});
|
|
@@ -37,6 +37,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template', 'litestor |
|
@@ -37,6 +37,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template', 'litestor |
37
|
sortName: 'goods_sort',
|
37
|
sortName: 'goods_sort',
|
38
|
search: false,
|
38
|
search: false,
|
39
|
showExport: false,
|
39
|
showExport: false,
|
|
|
40
|
+ fixedColumns: true,
|
|
|
41
|
+ fixedRightNumber: 1,
|
40
|
pageList: [100, 300, 500],
|
42
|
pageList: [100, 300, 500],
|
41
|
columns: [
|
43
|
columns: [
|
42
|
[
|
44
|
[
|
|
@@ -46,8 +48,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template', 'litestor |
|
@@ -46,8 +48,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template', 'litestor |
46
|
{field: 'keywords', title: __('Keywords'), operate: 'LIKE'},
|
48
|
{field: 'keywords', title: __('Keywords'), operate: 'LIKE'},
|
47
|
{field: 'category.name', title: __('Category.name'), operate: false},
|
49
|
{field: 'category.name', title: __('Category.name'), operate: false},
|
48
|
{field: 'activity.name', title: __('Activity.name'), operate: false},
|
50
|
{field: 'activity.name', title: __('Activity.name'), operate: false},
|
49
|
- {field: 'category_id', visible: false, title: __('Category_id'),operate: 'LIKE %...%'},
|
|
|
50
|
- {field: 'activity_id', visible: false, title: __('Activity_id'),operate: 'LIKE %...%'},
|
51
|
+ {field: 'category_id', visible: false, title: __('Category_id'), operate: 'LIKE %...%'},
|
|
|
52
|
+ {field: 'activity_id', visible: false, title: __('Activity_id'), operate: 'LIKE %...%'},
|
51
|
{field: 'image', title: __('Image'), formatter: Table.api.formatter.image},
|
53
|
{field: 'image', title: __('Image'), formatter: Table.api.formatter.image},
|
52
|
{field: 'images', title: __('Images'), formatter: Table.api.formatter.images},
|
54
|
{field: 'images', title: __('Images'), formatter: Table.api.formatter.images},
|
53
|
{
|
55
|
{
|
|
@@ -110,19 +112,19 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template', 'litestor |
|
@@ -110,19 +112,19 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template', 'litestor |
110
|
$(document).on("click", ".btn-discount", function () {
|
112
|
$(document).on("click", ".btn-discount", function () {
|
111
|
var ids = Table.api.selectedids(table);
|
113
|
var ids = Table.api.selectedids(table);
|
112
|
layer.prompt({
|
114
|
layer.prompt({
|
113
|
- formType: 0,
|
|
|
114
|
- value: '8.5',
|
|
|
115
|
- title: '请输入折扣(请勿输入汉字)',
|
|
|
116
|
- area: ['800px', '350px'] //自定义文本域宽高
|
|
|
117
|
- },function(value, index, elem){
|
115
|
+ formType: 0,
|
|
|
116
|
+ value: '8.5',
|
|
|
117
|
+ title: '请输入折扣(请勿输入汉字)',
|
|
|
118
|
+ area: ['800px', '350px'] //自定义文本域宽高
|
|
|
119
|
+ }, function (value, index, elem) {
|
118
|
Fast.api.ajax({
|
120
|
Fast.api.ajax({
|
119
|
- url:'litestore/litestoregoods/discount?id='+ids+'&discount='+value,
|
|
|
120
|
- },function (data,ret){
|
121
|
+ url: 'litestore/litestoregoods/discount?id=' + ids + '&discount=' + value,
|
|
|
122
|
+ }, function (data, ret) {
|
121
|
Fast.api.success('data');
|
123
|
Fast.api.success('data');
|
122
|
layer.close(index);
|
124
|
layer.close(index);
|
123
|
window.location.reload(true);
|
125
|
window.location.reload(true);
|
124
|
return false;
|
126
|
return false;
|
125
|
- },function (data,ret){
|
127
|
+ }, function (data, ret) {
|
126
|
Fast.api.success('失败')
|
128
|
Fast.api.success('失败')
|
127
|
return true;
|
129
|
return true;
|
128
|
});
|
130
|
});
|