Showing
3 changed files
with
480 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 | + <style> | ||
8 | + .sub-info th{ | ||
9 | + font-size: 16px; | ||
10 | + text-align: right; | ||
11 | + width: 30%; | ||
12 | + } | ||
13 | + .sub-info td{ | ||
14 | + font-size: 16px; | ||
15 | + width: 70%; | ||
16 | + } | ||
17 | + </style> | ||
18 | +</head> | ||
19 | +<body class="easyui-layout"> | ||
20 | +<div region="north" style="height:90px;"> | ||
21 | + <script> | ||
22 | + document.write(addHead('商品管理', '卖家自主货号申请')); | ||
23 | + </script> | ||
24 | +</div> | ||
25 | + | ||
26 | +<div id="businessDiv" region="center"> | ||
27 | + <table id="businessTable" class="sub-info" frame="void" width="80%" cellpadding="16" align="center"> | ||
28 | + <tr> | ||
29 | + <th>品牌<font color="red">*</font></th> | ||
30 | + <td id="brandValue"></td> | ||
31 | + </tr> | ||
32 | + <tr> | ||
33 | + <th>商品名称<font color="red">*</font></th> | ||
34 | + <td id="productNameValue"></td> | ||
35 | + </tr> | ||
36 | + <tr> | ||
37 | + <th>发售价</th> | ||
38 | + <td id="priceValue"></td> | ||
39 | + </tr> | ||
40 | + <tr> | ||
41 | + <th>发售时间</th> | ||
42 | + <td id="saleTimeValue"></td> | ||
43 | + </tr> | ||
44 | + <tr> | ||
45 | + <th>货号<font color="red">*</font></th> | ||
46 | + <td id="productCodeValue"></td> | ||
47 | + </tr> | ||
48 | + <tr> | ||
49 | + <th>单品封面图<font color="red">*</font></th> | ||
50 | + <td id="imageListTd"></td> | ||
51 | + </tr> | ||
52 | + </table> | ||
53 | + <div id="btnList" style="text-align:center;"> | ||
54 | + <a id="rejectBtn" class="btn-long" style="background-color: rgba(217, 0, 27, 1);">不通过</a> | ||
55 | + <a id="passBtn" class="btn-long" style="background-color: rgba(2, 125, 180, 1);">通过</a> | ||
56 | + </div> | ||
57 | + <br> | ||
58 | + <br> | ||
59 | +</div> | ||
60 | +<div style="display: none"> | ||
61 | + <div id="dlg" class="datagrid-toolbar" style="padding:5px;"> | ||
62 | + <img id="simg" src="" alt="" width="800"> | ||
63 | + </div> | ||
64 | +</div> | ||
65 | +<script> | ||
66 | +$(function() { | ||
67 | + var param=window.location.search; | ||
68 | + var id = getQueryString(param, "id"); | ||
69 | + | ||
70 | + getDetailInfo(id); | ||
71 | + | ||
72 | + //放大图片预览 | ||
73 | + $(".pimg").click(function(){ | ||
74 | + var _this = $(this);//将当前的pimg元素作为_this传入函数 | ||
75 | + var src = _this.attr("src"); | ||
76 | + //var index = src.indexOf("?"); | ||
77 | + //src = src.substring(0, index); | ||
78 | + //window.open(src); | ||
79 | + download(src); | ||
80 | + }); | ||
81 | + $("#rejectBtn").linkbutton({ | ||
82 | + text: "不通过", | ||
83 | + iconCls: "icon-ok", | ||
84 | + onClick: function () { | ||
85 | + updateAudit(id, 2); | ||
86 | + } | ||
87 | + }); | ||
88 | + $("#passBtn").linkbutton({ | ||
89 | + text: "通过", | ||
90 | + iconCls: "icon-ok", | ||
91 | + onClick: function () { | ||
92 | + updateAudit(id, 1,); | ||
93 | + } | ||
94 | + }); | ||
95 | + | ||
96 | +}); | ||
97 | + | ||
98 | +function updateAudit(id, status){ | ||
99 | + $.post(contextPath + "/selfShelves/updateAuditInfoById", { | ||
100 | + id : id, | ||
101 | + status : status | ||
102 | + }, function(data) { | ||
103 | + if (data.code == 200) { | ||
104 | + window.self.$.messager.show({ | ||
105 | + title : "提示", | ||
106 | + msg : "审核成功!" | ||
107 | + }); | ||
108 | + }else { | ||
109 | + window.self.$.messager.alert("失败", "失败!", "error"); | ||
110 | + } | ||
111 | + }); | ||
112 | +} | ||
113 | + | ||
114 | +function download(url) { | ||
115 | + $('#dlg').dialog({ | ||
116 | + title: '预览', | ||
117 | + width: 800, | ||
118 | + height: 600, | ||
119 | + resizable: false, | ||
120 | + closed: false, | ||
121 | + cache: false, | ||
122 | + modal: true | ||
123 | + }); | ||
124 | + $("#simg").attr("src", url); | ||
125 | +} | ||
126 | + | ||
127 | +function getDetailInfo(id){ | ||
128 | + var form = new FormData(); | ||
129 | + form.append("id", id); | ||
130 | + | ||
131 | + //发送请求 | ||
132 | + $.ajax({ | ||
133 | + type: "POST", | ||
134 | + url: contextPath + '/selfShelves/getDetailById', | ||
135 | + data: form, | ||
136 | + async: false, | ||
137 | + cache: false, | ||
138 | + contentType: false, | ||
139 | + processData: false, | ||
140 | + dataType: 'json', | ||
141 | + success: function (result) { | ||
142 | + if(result.code == 200) { | ||
143 | + $("#brandValue").html(result.data.brand); | ||
144 | + $("#productNameValue").html(result.data.productName); | ||
145 | + $("#priceValue").html(result.data.price); | ||
146 | + $("#saleTimeValue").html(result.data.saleTime); | ||
147 | + $("#productCodeValue").html(result.data.productCode); | ||
148 | + var imageStr = ""; | ||
149 | + for (var i=0;i<result.data.imageList.length;i++){ | ||
150 | + imageStr += "<img height='132px;' width='211px;' class='pimg' src='"+result.data.imageList[i]+"'/>"; | ||
151 | + if(i%3==0 && i!=0) { | ||
152 | + imageStr += "<br/>" | ||
153 | + } | ||
154 | + } | ||
155 | + $("#imageListTd").html(imageStr); | ||
156 | + $.parser.parse($("#imageListTd").parent()); | ||
157 | + } | ||
158 | + else { | ||
159 | + $.messager.alert("失败", result.message, "error"); | ||
160 | + } | ||
161 | + } | ||
162 | + }); | ||
163 | +} | ||
164 | + | ||
165 | +function getQueryString(paraPart,name) { | ||
166 | + var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); | ||
167 | + var r = paraPart.substr(1).match(reg); | ||
168 | + if (r != null) return unescape(r[2]); | ||
169 | + return null; | ||
170 | +} | ||
171 | + | ||
172 | +</script> | ||
173 | +</body> | ||
174 | +</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 | +</head> | ||
8 | +<body class="easyui-layout"> | ||
9 | +<div region="north" style="height:230px;"> | ||
10 | + <script> | ||
11 | + document.write(addHead('商品管理', '卖家自主货号申请')); | ||
12 | + </script> | ||
13 | + <div style="margin-left: 10px;margin-top: 30px"> | ||
14 | + <div style="border:1px solid #ddd;border-radius:5px 5px 5px 5px;"> | ||
15 | + <div style="margin-left: 10px;margin-top: 20px;margin-bottom: 20px"> | ||
16 | + <input id="productName" name="productName" /> | ||
17 | + <input id="productCode" name="productCode" /> | ||
18 | + <input id="status" name="status" /> | ||
19 | + <a id="searchBtn" class="btn-info">筛选</a> | ||
20 | + <a id="allBtn" class="btn-success">全部</a> | ||
21 | + </div> | ||
22 | + </div> | ||
23 | + </div> | ||
24 | +</div> | ||
25 | + | ||
26 | +<div id="businessList" region="center"> | ||
27 | + <table id="mainListTable"></table> | ||
28 | +</div> | ||
29 | +<script> | ||
30 | +var listUrl = contextPath + "/selfShelves/queryList"; | ||
31 | +var viewUrl = contextPath + "/html/sellerProductCode/view.html"; | ||
32 | +var auditUrl = contextPath + "/html/sellerProductCode/audit.html"; | ||
33 | +$(function() { | ||
34 | + $("#productName").textbox({ | ||
35 | + prompt: "名称", | ||
36 | + width: 200 | ||
37 | + }); | ||
38 | + | ||
39 | + $("#productCode").textbox({ | ||
40 | + prompt: "货号", | ||
41 | + width: 200 | ||
42 | + }); | ||
43 | + | ||
44 | + $("#status").combobox({ | ||
45 | + prompt: "审核状态", | ||
46 | + width: 150, | ||
47 | + editable : false, | ||
48 | + data: [ | ||
49 | + {"text" : "全部", "value" : -1} | ||
50 | + ,{"text" : "待审核", "value" : 0} | ||
51 | + ,{"text" : "已通过", "value" : 1} | ||
52 | + ,{"text" : "不通过", "value" : 2} | ||
53 | + ] | ||
54 | + }); | ||
55 | + | ||
56 | + $("#searchBtn").linkbutton({ | ||
57 | + iconCls : "icon-search", | ||
58 | + onClick : function() { | ||
59 | + $("#mainListTable").datagrid("load", { | ||
60 | + productName : $("#productName").val(), | ||
61 | + productCode : $("#productCode").val(), | ||
62 | + status : $("#status").myCombobox("getValue") ==-1?null:$("#status").myCombobox("getValue") | ||
63 | + }); | ||
64 | + } | ||
65 | + }); | ||
66 | + | ||
67 | + //全部按钮 | ||
68 | + $("#allBtn").linkbutton({ | ||
69 | + iconCls: "icon-import", | ||
70 | + onClick: function () { | ||
71 | + $("#mainListTable").datagrid("load", {}); | ||
72 | + } | ||
73 | + }); | ||
74 | + | ||
75 | + loadMainList(); | ||
76 | +}); | ||
77 | + | ||
78 | +function loadMainList(){ | ||
79 | + $("#mainListTable").myDatagrid({ | ||
80 | + fit: true, | ||
81 | + fitColumns: true, | ||
82 | + striped: true, | ||
83 | + url: listUrl, | ||
84 | + method: 'POST', | ||
85 | + loadFilter: function (data) { | ||
86 | + var temp = defaultLoadFilter(data); | ||
87 | + temp=null==temp?[]:temp; | ||
88 | + temp.rows = temp.list; | ||
89 | + return temp; | ||
90 | + }, | ||
91 | + columns: [[{ | ||
92 | + title: "发布人UID", | ||
93 | + field: "uid", | ||
94 | + width: 20, | ||
95 | + align: "center" | ||
96 | + }, { | ||
97 | + title: "品牌*", | ||
98 | + field: "brand", | ||
99 | + width: 20, | ||
100 | + align: "center" | ||
101 | + }, { | ||
102 | + title: "商品名称*", | ||
103 | + field: "productName", | ||
104 | + width: 20, | ||
105 | + align: "center" | ||
106 | + }, { | ||
107 | + title: "发售价", | ||
108 | + field: "price", | ||
109 | + width: 30, | ||
110 | + align: "center" | ||
111 | + }, { | ||
112 | + title: "发售时间", | ||
113 | + field: "saleTime", | ||
114 | + width: 30, | ||
115 | + align: "center" | ||
116 | + }, { | ||
117 | + title: "货号*", | ||
118 | + field: "productCode", | ||
119 | + width: 20, | ||
120 | + align: "center" | ||
121 | + }, { | ||
122 | + title: "状态", | ||
123 | + field: "statusStr", | ||
124 | + width: 30, | ||
125 | + align: "center" | ||
126 | + }, { | ||
127 | + title: "操作", | ||
128 | + field: "asdf", | ||
129 | + width: 30, | ||
130 | + align: "center", | ||
131 | + formatter: function (value, rowData, rowIndex) { | ||
132 | + var str = ""; | ||
133 | + if(rowData.status==0){ | ||
134 | + str = "<a role='audit' dataId='"+ rowData.id +"' style='margin-left:10px;background-color: #5cb85c !important;'>审核</a>" + str; | ||
135 | + }else{ | ||
136 | + str = "<a role='detail' dataId='"+ rowData.id +"' style='margin-left:10px;background-color: #428bca !important;'>查看</a>"; | ||
137 | + } | ||
138 | + return str; | ||
139 | + } | ||
140 | + }]], | ||
141 | + cache: false, | ||
142 | + pagination: true, | ||
143 | + pageSize: 10, | ||
144 | + idField: "id", | ||
145 | + singleSelect: true, | ||
146 | + onLoadSuccess: function (data) { | ||
147 | + $(this).datagrid("getPanel").find("a[role='detail']").linkbutton({ | ||
148 | + onClick: function () { | ||
149 | + var id = $(this).attr("dataId"); | ||
150 | + window.open(viewUrl + "?id=" + id + "&ver=" + new Date().getTime()) | ||
151 | + } | ||
152 | + }); | ||
153 | + | ||
154 | + $(this).datagrid("getPanel").find("a[role='audit']").linkbutton({ | ||
155 | + onClick: function () { | ||
156 | + var id = $(this).attr("dataId"); | ||
157 | + window.open(auditUrl + "?id=" + id + "&ver=" + new Date().getTime()); } | ||
158 | + }); | ||
159 | + | ||
160 | + } | ||
161 | + }); | ||
162 | +} | ||
163 | + | ||
164 | +</script> | ||
165 | +</body> | ||
166 | +</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 | + <style> | ||
8 | + .sub-info th{ | ||
9 | + font-size: 16px; | ||
10 | + text-align: right; | ||
11 | + width: 30%; | ||
12 | + } | ||
13 | + .sub-info td{ | ||
14 | + font-size: 16px; | ||
15 | + width: 70%; | ||
16 | + } | ||
17 | + </style> | ||
18 | +</head> | ||
19 | +<body class="easyui-layout"> | ||
20 | +<div region="north" style="height:90px;"> | ||
21 | + <script> | ||
22 | + document.write(addHead('商品管理', '卖家自主货号申请')); | ||
23 | + </script> | ||
24 | +</div> | ||
25 | + | ||
26 | +<div id="businessDiv" region="center"> | ||
27 | + <table id="businessTable" class="sub-info" frame="void" width="80%" cellpadding="16" align="center"> | ||
28 | + <tr> | ||
29 | + <th>品牌<font color="red">*</font></th> | ||
30 | + <td id="brandValue"></td> | ||
31 | + </tr> | ||
32 | + <tr> | ||
33 | + <th>商品名称<font color="red">*</font></th> | ||
34 | + <td id="productNameValue"></td> | ||
35 | + </tr> | ||
36 | + <tr> | ||
37 | + <th>发售价</th> | ||
38 | + <td id="priceValue"></td> | ||
39 | + </tr> | ||
40 | + <tr> | ||
41 | + <th>发售时间</th> | ||
42 | + <td id="saleTimeValue"></td> | ||
43 | + </tr> | ||
44 | + <tr> | ||
45 | + <th>货号<font color="red">*</font></th> | ||
46 | + <td id="productCodeValue"></td> | ||
47 | + </tr> | ||
48 | + <tr> | ||
49 | + <th>单品封面图<font color="red">*</font></th> | ||
50 | + <td id="imageListTd"></td> | ||
51 | + </tr> | ||
52 | + </table> | ||
53 | + <br> | ||
54 | + <br> | ||
55 | +</div> | ||
56 | +<div style="display: none"> | ||
57 | + <div id="dlg" class="datagrid-toolbar" style="padding:5px;"> | ||
58 | + <img id="simg" src="" alt="" width="800"> | ||
59 | + </div> | ||
60 | +</div> | ||
61 | +<script> | ||
62 | +$(function() { | ||
63 | + var param=window.location.search; | ||
64 | + var id = getQueryString(param, "id"); | ||
65 | + | ||
66 | + getDetailInfo(id); | ||
67 | + | ||
68 | + //放大图片预览 | ||
69 | + $(".pimg").click(function(){ | ||
70 | + var _this = $(this);//将当前的pimg元素作为_this传入函数 | ||
71 | + var src = _this.attr("src"); | ||
72 | + //var index = src.indexOf("?"); | ||
73 | + //src = src.substring(0, index); | ||
74 | + //window.open(src); | ||
75 | + download(src); | ||
76 | + }); | ||
77 | + | ||
78 | +}); | ||
79 | + | ||
80 | +function download(url) { | ||
81 | + $('#dlg').dialog({ | ||
82 | + title: '预览', | ||
83 | + width: 800, | ||
84 | + height: 600, | ||
85 | + resizable: false, | ||
86 | + closed: false, | ||
87 | + cache: false, | ||
88 | + modal: true | ||
89 | + }); | ||
90 | + $("#simg").attr("src", url); | ||
91 | +} | ||
92 | + | ||
93 | +function getDetailInfo(id){ | ||
94 | + var form = new FormData(); | ||
95 | + form.append("id", id); | ||
96 | + | ||
97 | + //发送请求 | ||
98 | + $.ajax({ | ||
99 | + type: "POST", | ||
100 | + url: contextPath + '/selfShelves/getDetailById', | ||
101 | + data: form, | ||
102 | + async: false, | ||
103 | + cache: false, | ||
104 | + contentType: false, | ||
105 | + processData: false, | ||
106 | + dataType: 'json', | ||
107 | + success: function (result) { | ||
108 | + if(result.code == 200) { | ||
109 | + $("#brandValue").html(result.data.brand); | ||
110 | + $("#productNameValue").html(result.data.productName); | ||
111 | + $("#priceValue").html(result.data.price); | ||
112 | + $("#saleTimeValue").html(result.data.saleTime); | ||
113 | + $("#productCodeValue").html(result.data.productCode); | ||
114 | + var imageStr = ""; | ||
115 | + for (var i=0;i<result.data.imageList.length;i++){ | ||
116 | + imageStr += "<img height='132px;' width='211px;' class='pimg' src='"+result.data.imageList[i]+"'/>"; | ||
117 | + if(i%3==0 && i!=0) { | ||
118 | + imageStr += "<br/>" | ||
119 | + } | ||
120 | + } | ||
121 | + $("#imageListTd").html(imageStr); | ||
122 | + $.parser.parse($("#imageListTd").parent()); | ||
123 | + } | ||
124 | + else { | ||
125 | + $.messager.alert("失败", result.message, "error"); | ||
126 | + } | ||
127 | + } | ||
128 | + }); | ||
129 | +} | ||
130 | + | ||
131 | +function getQueryString(paraPart,name) { | ||
132 | + var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); | ||
133 | + var r = paraPart.substr(1).match(reg); | ||
134 | + if (r != null) return unescape(r[2]); | ||
135 | + return null; | ||
136 | +} | ||
137 | + | ||
138 | +</script> | ||
139 | +</body> | ||
140 | +</html> |
-
Please register or login to post a comment