Showing
2 changed files
with
455 additions
and
0 deletions
1 | +<!DOCTYPE html> | ||
2 | +<html> | ||
3 | +<head> | ||
4 | + <meta charset="UTF-8"/> | ||
5 | + <title>Yoho!Buy运营平台</title> | ||
6 | + <script src="/ufoPlatform/js/include.js"></script> | ||
7 | + <script src="/ufoPlatform/js/ajaxfileupload.js"></script> | ||
8 | +</head> | ||
9 | +<body class="easyui-layout" fit="true"> | ||
10 | +<div region="north" style="height: 230px"> | ||
11 | + <script> | ||
12 | + document.write(addHead('库存详情', '')); | ||
13 | + </script> | ||
14 | + <style> | ||
15 | + .div_search input {margin-top: 20px;} | ||
16 | + .div_search .textbox {margin-top: 20px;} | ||
17 | + .div_search .easyui-linkbutton {margin-top: 20px;} | ||
18 | + </style> | ||
19 | + | ||
20 | + <div style="margin-left: 30px;" class="div_search"> | ||
21 | + <input id="status" type="text"/> | ||
22 | + <input id="SKUP" type="text"> | ||
23 | + <input id="sellerUid" type="text"> | ||
24 | + <input id="storageId" type="text"> | ||
25 | + | ||
26 | + <a id="searchLinkButton" class="easyui-linkbutton btn-info" data-options="iconCls:'icon-search'">筛选</a> | ||
27 | + <a id="searchAllLinkButton" class="easyui-linkbutton btn-info" data-options="iconCls:'icon-search'">全部</a> | ||
28 | + </div> | ||
29 | +</div> | ||
30 | +<div region="center"> | ||
31 | + <div style="margin-left: 30px;margin-top: 20px;height: 660px"> | ||
32 | + <table id="skupTable"></table> | ||
33 | + </div> | ||
34 | +</div> | ||
35 | + | ||
36 | +<script type="text/javascript"> | ||
37 | + | ||
38 | + var brandId; | ||
39 | + $(function () { | ||
40 | + $("#status").myCombobox({ | ||
41 | + prompt: "请选择", | ||
42 | + width: 200, | ||
43 | + data: [{id: '1',text: '待付保证金'}, {id: '2',text: '卖家取消支付'}, {id: '2',text: '卖家支付超时'}, {id: '2',text: '出售中'} | ||
44 | + , {id: '2',text: '卖家取消出售'}, {id: '2',text: '平台取消出售'}, {id: '2',text: '已出售'}], | ||
45 | + valueField: "id", | ||
46 | + textField: "text" | ||
47 | + }); | ||
48 | + | ||
49 | + $("#SKUP").textbox({ | ||
50 | + prompt: "SKU_P" | ||
51 | + }); | ||
52 | + $("#sellerUid").textbox({ | ||
53 | + prompt: "卖家UID" | ||
54 | + }); | ||
55 | + | ||
56 | + $("#storageId").textbox({ | ||
57 | + prompt: "SKU" | ||
58 | + }); | ||
59 | + | ||
60 | + | ||
61 | + $("#skupTable").myDatagrid({ | ||
62 | + fit: true, | ||
63 | + fitColumns: true, | ||
64 | + nowrap: false, | ||
65 | + url: contextPath + "/brand/getBrandPageList", | ||
66 | + method: 'POST', | ||
67 | + /*queryParams: { | ||
68 | + 'brandName':'', | ||
69 | + 'status':'' | ||
70 | + },*/ | ||
71 | + loadFilter: function (data) { | ||
72 | + var temp = defaultLoadFilter(data); | ||
73 | + temp.rows = temp.list; | ||
74 | + return temp; | ||
75 | + }, | ||
76 | + columns: [[{ | ||
77 | + title: "SKU_P", | ||
78 | + field: "skup", | ||
79 | + width: 40, | ||
80 | + align: "center" | ||
81 | + }, { | ||
82 | + title: "SKU", | ||
83 | + field: "storageId", | ||
84 | + width: 80, | ||
85 | + align: "center", | ||
86 | + }, { | ||
87 | + title: "颜色", | ||
88 | + field: "colorName", | ||
89 | + width: 100, | ||
90 | + align: "center" | ||
91 | + }, { | ||
92 | + title: "尺码", | ||
93 | + field: "sizeName", | ||
94 | + width: 80, | ||
95 | + align: "center" | ||
96 | + }, { | ||
97 | + title: "卖家UID", | ||
98 | + field: "sellerUid", | ||
99 | + width: 200, | ||
100 | + align: "center" | ||
101 | + }, { | ||
102 | + title: "销售价", | ||
103 | + field: "price", | ||
104 | + width: 50, | ||
105 | + align: "center", | ||
106 | + }, { | ||
107 | + title: "状态", | ||
108 | + field: "status", | ||
109 | + width: 50, | ||
110 | + align: "center", | ||
111 | + formatter: function (value, rowData) { | ||
112 | + if (value == 1) { | ||
113 | + return '开启'; | ||
114 | + } | ||
115 | + return '关闭'; | ||
116 | + }, | ||
117 | + }, { | ||
118 | + title: "创建时间", | ||
119 | + field: "createTime", | ||
120 | + width: 130, | ||
121 | + align: "center" | ||
122 | + }, { | ||
123 | + title: "操作", | ||
124 | + field: "operations", | ||
125 | + width: 120, | ||
126 | + align: "center", | ||
127 | + formatter: function (value, rowData) { | ||
128 | + var str = "<a role='edit' dataId='" + rowData.skup + "' style='margin-left:10px'>取消售卖</a>"; | ||
129 | + return str; | ||
130 | + } | ||
131 | + }]], | ||
132 | + cache: false, | ||
133 | + pagination: true, | ||
134 | + pageSize: 10, | ||
135 | + pageList: [10], | ||
136 | + idField: "id", | ||
137 | + singleSelect: false, | ||
138 | + checkOnSelect: false, | ||
139 | + onLoadSuccess: function () { | ||
140 | + // 编辑 | ||
141 | + $(this).myDatagrid("getPanel").find("a[role='edit']").linkbutton({ | ||
142 | + iconCls: "icon-edit", | ||
143 | + onClick: function () { | ||
144 | + var id = $(this).attr("dataId"); | ||
145 | + editRow(id); | ||
146 | + } | ||
147 | + }); | ||
148 | + } | ||
149 | + }); | ||
150 | + | ||
151 | + | ||
152 | + // 搜索 | ||
153 | + $("#searchLinkButton").linkbutton({ | ||
154 | + onClick: function () { | ||
155 | + var param = getParams(); | ||
156 | + $("#skupTable").myDatagrid("load", param); | ||
157 | + } | ||
158 | + }); | ||
159 | + | ||
160 | + // 搜索全部 | ||
161 | + $("#searchAllLinkButton").linkbutton({ | ||
162 | + onClick: function () { | ||
163 | + $('#status').combobox('clear'); | ||
164 | + $('#SKUP').combobox('clear'); | ||
165 | + $('#sellerUid').textbox('clear'); | ||
166 | + $('#storageId').textbox('clear'); | ||
167 | + var param = {}; | ||
168 | + $("#skupTable").myDatagrid("load", param); | ||
169 | + } | ||
170 | + }); | ||
171 | + | ||
172 | + /** | ||
173 | + * 提取出搜索参数 | ||
174 | + * <input id="status" type="text"/> | ||
175 | + <input id="SKUP" type="text"> | ||
176 | + <input id="sellerUid" type="text"> | ||
177 | + <input id="storageId" type="text"> | ||
178 | + */ | ||
179 | + function getParams() { | ||
180 | + var status = $('#status').combobox('getValue'); | ||
181 | + var skup = $('#SKUP').textbox('getValue'); | ||
182 | + var sellerUid = $('#sellerUid').textbox('getValue'); | ||
183 | + var storageId = $('#storageId').textbox('getValue'); | ||
184 | + var param = {}; | ||
185 | + if (undefined !== status && null !== status && "" !== status) { | ||
186 | + param.status = status; | ||
187 | + } | ||
188 | + if (undefined !== skup && null !== skup && "" !== skup) { | ||
189 | + param.skup = skup; | ||
190 | + } | ||
191 | + if (undefined !== sellerUid && null !== sellerUid && "" !== sellerUid) { | ||
192 | + param.sellerUid = sellerUid; | ||
193 | + }if (undefined !== storageId && null !== storageId && "" !== storageId) { | ||
194 | + param.storageId = storageId; | ||
195 | + } | ||
196 | + return param; | ||
197 | + } | ||
198 | + | ||
199 | + | ||
200 | + function editRow(id) { | ||
201 | + var skup = id; | ||
202 | + var div = $("<div>").appendTo($(document.body)); | ||
203 | + var message = "确认取消售卖吗?"; | ||
204 | + window.top.$.messager.confirm("确认", message, function (flag) { | ||
205 | + if (flag) { | ||
206 | + window.top.$.messager.progress({ | ||
207 | + title: "正在执行", | ||
208 | + msg: "正在执行,请稍后...", | ||
209 | + interval: 500, | ||
210 | + text: "" | ||
211 | + }); | ||
212 | + $.post(contextPath + "/brand/updateBrandStatus",{"skup":skup}, function (data) { | ||
213 | + window.top.$.messager.progress("close"); | ||
214 | + if (data.code == 200) { | ||
215 | + $("#skupTable").myDatagrid("reload"); | ||
216 | + window.top.$.messager.show({title: "提示",msg: msg, height: 120}); | ||
217 | + } else { | ||
218 | + window.top.$.messager.alert("失败", data.message, "error"); | ||
219 | + } | ||
220 | + }, "json"); | ||
221 | + } | ||
222 | + }); | ||
223 | + } | ||
224 | + }); | ||
225 | + | ||
226 | + | ||
227 | +</script> | ||
228 | + | ||
229 | +</body> | ||
230 | +</html> |
1 | +<!DOCTYPE html> | ||
2 | +<html> | ||
3 | +<head> | ||
4 | + <meta charset="UTF-8"/> | ||
5 | + <title>Yoho!Buy运营平台</title> | ||
6 | + <script src="/ufoPlatform/js/include.js"></script> | ||
7 | + <script src="/ufoPlatform/js/ajaxfileupload.js"></script> | ||
8 | +</head> | ||
9 | +<body class="easyui-layout" fit="true"> | ||
10 | +<div region="north" style="height: 230px"> | ||
11 | + <script> | ||
12 | + document.write(addHead('商品库存信息', '')); | ||
13 | + </script> | ||
14 | + <style> | ||
15 | + .div_search input {margin-top: 20px; } | ||
16 | + .div_search .textbox {margin-top: 20px;} | ||
17 | + .div_search .easyui-linkbutton {margin-top: 20px;} | ||
18 | + </style> | ||
19 | + <div style="margin-left: 30px;" class="div_search"> | ||
20 | + <input id="id" type="text"> | ||
21 | + <input id="productName" type="text"> | ||
22 | + <input id="productSort" type="text"> | ||
23 | + <input id="brandName" type="text"> | ||
24 | + | ||
25 | + <input id="sellerUid" type="text"> | ||
26 | + <input id="storageNum" type="text"> | ||
27 | + <input id="storageId" type="text"> | ||
28 | + <input id="skup" type="text"> | ||
29 | + <a id="searchLinkButton" class="easyui-linkbutton btn-info" data-options="iconCls:'icon-search'">筛选</a> | ||
30 | + <a id="searchAllLinkButton" class="easyui-linkbutton btn-info" data-options="iconCls:'icon-search'">全部</a> | ||
31 | + </div> | ||
32 | +</div> | ||
33 | +<div region="center"> | ||
34 | + <div style="margin-left: 30px;margin-top: 20px;height: 660px"> | ||
35 | + <table id="productTable"></table> | ||
36 | + </div> | ||
37 | +</div> | ||
38 | + | ||
39 | +<script type="text/javascript"> | ||
40 | + var brandId; | ||
41 | + $(function () { | ||
42 | + $.ajax({ | ||
43 | + contentType: "application/json", | ||
44 | + dataType: "json", | ||
45 | + type: "GET", | ||
46 | + url: contextPath + '/brand/getBrandName', | ||
47 | + success: function (data) { | ||
48 | + if (data.code != 200 || !data.data || data.data.length == 0) { | ||
49 | + return; | ||
50 | + } | ||
51 | + $("#brandName").myCombobox({ | ||
52 | + prompt: "选择名称", | ||
53 | + width: 200, | ||
54 | + data: data.data, | ||
55 | + valueField: "id", | ||
56 | + textField: "text" | ||
57 | + }); | ||
58 | + } | ||
59 | + }); | ||
60 | + | ||
61 | + $("#storage_num").myCombobox({ | ||
62 | + prompt: "请选择", | ||
63 | + width: 200, | ||
64 | + data: [{id: '1',text: '有库存'}, {id: '2',text: '无库存'}], | ||
65 | + valueField: "id", | ||
66 | + textField: "text" | ||
67 | + }); | ||
68 | + | ||
69 | + | ||
70 | + $("#productTable").myDatagrid({ | ||
71 | + fit: true, | ||
72 | + fitColumns: true, | ||
73 | + nowrap: false, | ||
74 | + url: contextPath + "/brand/getBrandPageList", | ||
75 | + method: 'POST', | ||
76 | + /*queryParams: { | ||
77 | + 'brandName':'', | ||
78 | + 'status':'' | ||
79 | + },*/ | ||
80 | + loadFilter: function (data) { | ||
81 | + var temp = defaultLoadFilter(data); | ||
82 | + temp.rows = temp.list; | ||
83 | + return temp; | ||
84 | + }, | ||
85 | + columns: [[{ | ||
86 | + title: "商品编码", | ||
87 | + field: "id", | ||
88 | + width: 40, | ||
89 | + align: "center" | ||
90 | + }, { | ||
91 | + title: "商品名称", | ||
92 | + field: "productName", | ||
93 | + width: 80, | ||
94 | + align: "center", | ||
95 | + }, { | ||
96 | + title: "品牌", | ||
97 | + field: "brandName", | ||
98 | + width: 100, | ||
99 | + align: "center" | ||
100 | + }, { | ||
101 | + title: "最低价", | ||
102 | + field: "price", | ||
103 | + width: 80, | ||
104 | + align: "center" | ||
105 | + }, { | ||
106 | + title: "可售库存", | ||
107 | + field: "storageNum", | ||
108 | + width: 200, | ||
109 | + align: "center" | ||
110 | + }, { | ||
111 | + title: "操作", | ||
112 | + field: "operations", | ||
113 | + width: 120, | ||
114 | + align: "center", | ||
115 | + formatter: function (value, rowData) { | ||
116 | + var str = "<a role='edit' dataId='" + rowData.id + "' style='margin-left:10px'>库存详情</a>"; | ||
117 | + return str; | ||
118 | + } | ||
119 | + }]], | ||
120 | + cache: false, | ||
121 | + pagination: true, | ||
122 | + pageSize: 10, | ||
123 | + pageList: [10], | ||
124 | + idField: "id", | ||
125 | + singleSelect: false, | ||
126 | + checkOnSelect: false, | ||
127 | + onLoadSuccess: function () { | ||
128 | + $(this).myDatagrid("getPanel").find("a[role='edit']").linkbutton({ | ||
129 | + iconCls: "icon-edit", | ||
130 | + onClick: function () { | ||
131 | + var id = $(this).attr("dataId"); | ||
132 | + detailStorage(id); | ||
133 | + } | ||
134 | + }); | ||
135 | + } | ||
136 | + }); | ||
137 | + | ||
138 | + | ||
139 | + // 搜索 | ||
140 | + $("#searchLinkButton").linkbutton({ | ||
141 | + onClick: function () { | ||
142 | + var param = getParams(); | ||
143 | + $("#productTable").myDatagrid("load", param); | ||
144 | + } | ||
145 | + }); | ||
146 | + | ||
147 | + | ||
148 | + $("#id").textbox({ | ||
149 | + prompt: "商品编码" | ||
150 | + }); | ||
151 | + $("#productName").textbox({ | ||
152 | + prompt: "商品名称" | ||
153 | + }); | ||
154 | + $("#sellerUid").textbox({ | ||
155 | + prompt: "卖家UID" | ||
156 | + }); | ||
157 | + $("#storageId").textbox({ | ||
158 | + prompt: "SKU" | ||
159 | + }); | ||
160 | + $("#skup").textbox({ | ||
161 | + prompt: "SKU-p" | ||
162 | + }); | ||
163 | + | ||
164 | + // 搜索全部 | ||
165 | + $("#searchAllLinkButton").linkbutton({ | ||
166 | + onClick: function () { | ||
167 | + $('#brandName').combobox('clear'); | ||
168 | + $('#storageNum').combobox('clear'); | ||
169 | + $('#id').textbox('clear'); | ||
170 | + $('#productName').textbox('clear'); | ||
171 | + $('#sellerUid').textbox('clear'); | ||
172 | + $('#storageId').textbox('clear'); | ||
173 | + $('#skup').textbox('clear'); | ||
174 | + var param = {}; | ||
175 | + $("#productTable").myDatagrid("load", param); | ||
176 | + } | ||
177 | + }); | ||
178 | + | ||
179 | + /** | ||
180 | + * 提取出搜索参数 | ||
181 | + */ | ||
182 | + function getParams() { | ||
183 | + var brandName = $('#brandName').combobox('getValue'); | ||
184 | + var storageNum = $('#storageNum').combobox('getValue'); | ||
185 | + var id = $('#id').textbox('getValue'); | ||
186 | + var productName = $('#productName').textbox('getValue'); | ||
187 | + var sellerUid = $('#sellerUid').textbox('getValue'); | ||
188 | + var storageId = $('#storageId').textbox('getValue'); | ||
189 | + var skup = $('#skup').textbox('getValue'); | ||
190 | + var param = {}; | ||
191 | + if (undefined !== brandName && null !== brandName && "" !== brandName) { | ||
192 | + param.brandName = brandName; | ||
193 | + } | ||
194 | + if (undefined !== storageNum && null !== storageNum && "" !== storageNum) { | ||
195 | + param.storageNum = storageNum; | ||
196 | + } | ||
197 | + if (undefined !== id && null !== id && "" !== id) { | ||
198 | + param.id = id; | ||
199 | + } | ||
200 | + if (undefined !== productName && null !== productName && "" !== productName) { | ||
201 | + param.productName = productName; | ||
202 | + } | ||
203 | + if (undefined !== sellerUid && null !== sellerUid && "" !== sellerUid) { | ||
204 | + param.sellerUid = sellerUid; | ||
205 | + } | ||
206 | + if (undefined !== storageId && null !== storageId && "" !== storageId) { | ||
207 | + param.storageId = storageId; | ||
208 | + } | ||
209 | + if (undefined !== skup && null !== skup && "" !== skup) { | ||
210 | + param.skup = skup; | ||
211 | + } | ||
212 | + return param; | ||
213 | + } | ||
214 | + | ||
215 | + | ||
216 | + function detailStorage(id) { | ||
217 | + this.location.href = contextPath + "/html/goods/storage/storageDetail.html?productId=" + id; | ||
218 | + } | ||
219 | + }); | ||
220 | + | ||
221 | + | ||
222 | +</script> | ||
223 | + | ||
224 | +</body> | ||
225 | +</html> |
-
Please register or login to post a comment