Merge branch 'release/1.6' of http://git.dev.yoho.cn/platform/yohobuy-portal-fe into release/1.6
Showing
9 changed files
with
145 additions
and
104 deletions
@@ -6,6 +6,7 @@ var $ = require('jquery'), | @@ -6,6 +6,7 @@ var $ = require('jquery'), | ||
6 | var pricePercent = 0.2; //yoho币审核比例线 | 6 | var pricePercent = 0.2; //yoho币审核比例线 |
7 | var loadModal = null; | 7 | var loadModal = null; |
8 | var importYohoCoinData = null; | 8 | var importYohoCoinData = null; |
9 | +var isNeedAudit = false; | ||
9 | var ENUM = { | 10 | var ENUM = { |
10 | gender: { | 11 | gender: { |
11 | 1: '男', | 12 | 1: '男', |
@@ -15,7 +16,7 @@ var ENUM = { | @@ -15,7 +16,7 @@ var ENUM = { | ||
15 | status: { | 16 | status: { |
16 | 0: '未设置', | 17 | 0: '未设置', |
17 | 1: '<font color="#428bca">待审核</font>', | 18 | 1: '<font color="#428bca">待审核</font>', |
18 | - 2: '<font color="#5cb85c">通过</font>', | 19 | + 2: '<font color="#67D267">通过</font>', |
19 | 3: '<font color="#d9534f">驳回</font>' | 20 | 3: '<font color="#d9534f">驳回</font>' |
20 | } | 21 | } |
21 | } | 22 | } |
@@ -89,9 +90,7 @@ function ajaxSave(productSkn, yohoCoin, auditorId, salesPrice){ | @@ -89,9 +90,7 @@ function ajaxSave(productSkn, yohoCoin, auditorId, salesPrice){ | ||
89 | } | 90 | } |
90 | },function(rs){ | 91 | },function(rs){ |
91 | console.log("yoho币保存返回" + rs); | 92 | console.log("yoho币保存返回" + rs); |
92 | - if(yohoCoin < (salesPrice * pricePercent)){ | ||
93 | - | ||
94 | - } | 93 | + freshYohoCoinRowData(rs.data.productSkn, rs.data.returnCoin, rs.data.coinStatus); |
95 | }); | 94 | }); |
96 | } | 95 | } |
97 | 96 | ||
@@ -108,8 +107,12 @@ function ajaxUpload(){ | @@ -108,8 +107,12 @@ function ajaxUpload(){ | ||
108 | }, | 107 | }, |
109 | onComplete: function(response) { | 108 | onComplete: function(response) { |
110 | console.log("批量接口返回数据",response); | 109 | console.log("批量接口返回数据",response); |
111 | - if (response.code == 200 && response.data.taskId) { | ||
112 | - ajaxExeclByTaskId(response.data.taskId); | 110 | + if (response.code == 200 && response.data.successList.length) { |
111 | + loadingClose(); | ||
112 | + showImportMessage("批量导入成功!", "success"); | ||
113 | + common.util.__tip("批量导入成功!", 'success'); | ||
114 | + //显示导入列表数据 | ||
115 | + showImportTable(response.data); | ||
113 | return true; | 116 | return true; |
114 | } | 117 | } |
115 | else if(response.data && response.data.failFileReason.length){ | 118 | else if(response.data && response.data.failFileReason.length){ |
@@ -127,37 +130,17 @@ function ajaxUpload(){ | @@ -127,37 +130,17 @@ function ajaxUpload(){ | ||
127 | }); | 130 | }); |
128 | } | 131 | } |
129 | 132 | ||
130 | -//异步批量上传接口 | ||
131 | -function ajaxExeclByTaskId(taskId){ | ||
132 | - //异步调用的接口importResult/queryBatchImportResult 参数名param | 133 | +//批量上传确认 |
134 | +function ajaxUploadSubmit(importAuditorId){ | ||
133 | common.util.__ajax({ | 135 | common.util.__ajax({ |
134 | - url: '/yohoCoin/importResult/queryBatchImportResult', | 136 | + url:'/good/yohoCoin/insertBatch', |
135 | data: { | 137 | data: { |
136 | - param:taskId | 138 | + auditorId: importAuditorId, |
139 | + productPrices: JSON.stringify(importYohoCoinData) | ||
137 | } | 140 | } |
138 | - },function(res){ | ||
139 | - console.log("异步返回接口",res); | ||
140 | - if(res.data.length){ | ||
141 | - loadingClose(); | ||
142 | - importYohoCoinData = res.data; | ||
143 | - showImportTable(res); | ||
144 | - showImportMessage("批量导入成功!", "success"); | ||
145 | - common.util.__tip("批量导入成功!", 'success'); | ||
146 | - }else{ | ||
147 | - setTimeout(function(){ | ||
148 | - ajaxExeclByTaskId.call(null,taskId); | ||
149 | - },5000); | ||
150 | - } | ||
151 | - },true); | ||
152 | -} | ||
153 | - | ||
154 | -//批量上传确认 | ||
155 | -function ajaxUploadSubmit(data){ | ||
156 | - common.util.__ajax({ | ||
157 | - url:'', | ||
158 | - data: data | ||
159 | },function(rs){ | 141 | },function(rs){ |
160 | - location.href = ''; | 142 | + //common.util.__tip("保存成功!"); |
143 | + //location.href = ''; | ||
161 | }); | 144 | }); |
162 | } | 145 | } |
163 | 146 | ||
@@ -166,11 +149,14 @@ function ajaxUploadSubmit(data){ | @@ -166,11 +149,14 @@ function ajaxUploadSubmit(data){ | ||
166 | //显示批量导入结果 | 149 | //显示批量导入结果 |
167 | function showImportMessage(message, statue){ | 150 | function showImportMessage(message, statue){ |
168 | $("#yohoCoinImportMessage").removeAttr("class").addClass(statue).show(); | 151 | $("#yohoCoinImportMessage").removeAttr("class").addClass(statue).show(); |
169 | - $("#detailMassage").text(message); | 152 | + $("#detailMassage").html(message); |
170 | } | 153 | } |
171 | 154 | ||
172 | //显示批量导入数据表 | 155 | //显示批量导入数据表 |
173 | function showImportTable(data){ | 156 | function showImportTable(data){ |
157 | + importYohoCoinData = data.successList; | ||
158 | + isNeedAudit = data.isNeedAudit; | ||
159 | + | ||
174 | $("#importResultTable").html(common.util.__template2($("#yohoCoinImportResultTable").html(),data)); | 160 | $("#importResultTable").html(common.util.__template2($("#yohoCoinImportResultTable").html(),data)); |
175 | $("#yohoCoinImportResultSet").show(); | 161 | $("#yohoCoinImportResultSet").show(); |
176 | $("#yohoCoinImportResult").show(); | 162 | $("#yohoCoinImportResult").show(); |
@@ -237,7 +223,12 @@ function checkAuditor(auditor){ | @@ -237,7 +223,12 @@ function checkAuditor(auditor){ | ||
237 | function freshYohoCoinRowData(productSkn, yohoCoin, status){ | 223 | function freshYohoCoinRowData(productSkn, yohoCoin, status){ |
238 | var SknDom = $('._' + productSkn); | 224 | var SknDom = $('._' + productSkn); |
239 | SknDom.find(".returnYohoCoin").text(yohoCoin); | 225 | SknDom.find(".returnYohoCoin").text(yohoCoin); |
240 | - SknDom.find(".coinStatus").text(ENUM.status[status]); | 226 | + SknDom.find(".coinStatus").html(ENUM.status[status]); |
227 | + if(status == 1){ | ||
228 | + SknDom.find(".operation").empty(); | ||
229 | + }else{ | ||
230 | + SknDom.find(".operation").html("<button type='button' name='修改' class='btn btn-info btn-sm btn-modify openEditor'>收起</button>"); | ||
231 | + } | ||
241 | } | 232 | } |
242 | 233 | ||
243 | //关闭loading | 234 | //关闭loading |
@@ -254,13 +245,20 @@ $(document).on('click', '.btn-delete-yohoCoin', function() { | @@ -254,13 +245,20 @@ $(document).on('click', '.btn-delete-yohoCoin', function() { | ||
254 | var index = $(this).data("index"); | 245 | var index = $(this).data("index"); |
255 | if(importYohoCoinData){ | 246 | if(importYohoCoinData){ |
256 | [].splice.call(importYohoCoinData,index,1); | 247 | [].splice.call(importYohoCoinData,index,1); |
257 | - $("#importResultTable").html(common.util.__template2($("#yohoCoinImportResultTable").html(),data)); | 248 | + $("#importResultTable").html(common.util.__template2($("#yohoCoinImportResultTable").html(),{"successList":importYohoCoinData})); |
258 | } | 249 | } |
250 | + console.log(importYohoCoinData); | ||
259 | }); | 251 | }); |
260 | 252 | ||
261 | //批量导入结果列表确定 | 253 | //批量导入结果列表确定 |
262 | $(document).on('click', '.btn-submit-yohoCoin', function() { | 254 | $(document).on('click', '.btn-submit-yohoCoin', function() { |
263 | - ajaxUploadSubmit(); | 255 | + var importAuditorIdInput = $("#importAuditor"); |
256 | + if(isNeedAudit){ | ||
257 | + if(!checkAuditor(importAuditorIdInput)){ | ||
258 | + return false; | ||
259 | + } | ||
260 | + } | ||
261 | + ajaxUploadSubmit(importAuditorIdInput.val()); | ||
264 | }); | 262 | }); |
265 | 263 | ||
266 | //保存操作 | 264 | //保存操作 |
@@ -284,7 +282,7 @@ $(document).on('click', '.btn-save', function() { | @@ -284,7 +282,7 @@ $(document).on('click', '.btn-save', function() { | ||
284 | //显示修改 | 282 | //显示修改 |
285 | $(document).on('click', '.btn-modify', function() { | 283 | $(document).on('click', '.btn-modify', function() { |
286 | if($(this).hasClass("openEditor")){ | 284 | if($(this).hasClass("openEditor")){ |
287 | - $(this).text("修改").removeClass("openEditor"); | 285 | + $(this).text($(this).attr("name")).removeClass("openEditor"); |
288 | var dataForShow = $(this).parents(".dataForShow"); | 286 | var dataForShow = $(this).parents(".dataForShow"); |
289 | dataForShow.find(".dataForEditor td").hide(); | 287 | dataForShow.find(".dataForEditor td").hide(); |
290 | dataForShow.find(".editor-yohoCoin").val(dataForShow.find(".returnYohoCoin").text()); | 288 | dataForShow.find(".editor-yohoCoin").val(dataForShow.find(".returnYohoCoin").text()); |
@@ -295,6 +293,12 @@ $(document).on('click', '.btn-modify', function() { | @@ -295,6 +293,12 @@ $(document).on('click', '.btn-modify', function() { | ||
295 | } | 293 | } |
296 | }); | 294 | }); |
297 | 295 | ||
296 | +//查看驳回理由 | ||
297 | +$(document).on('click', '.noCheckReason', function() { | ||
298 | + var reason = $(this).data("text"); | ||
299 | + common.dialog.confirm("查看驳回理由", reason, function(){}, function(){}); | ||
300 | +}); | ||
301 | + | ||
298 | //显示批量导入 | 302 | //显示批量导入 |
299 | $(document).on('click', '#import-btn', function() { | 303 | $(document).on('click', '#import-btn', function() { |
300 | $('#yohoCoin_table').hide(); | 304 | $('#yohoCoin_table').hide(); |
@@ -320,6 +324,6 @@ $(document).on('click', '#all-btn', function() { | @@ -320,6 +324,6 @@ $(document).on('click', '#all-btn', function() { | ||
320 | }); | 324 | }); |
321 | 325 | ||
322 | //校验失败编辑 | 326 | //校验失败编辑 |
323 | -$(document).on('change', '#yohoCoin_table .error', function() { | 327 | +$(document).on('change', '.error', function() { |
324 | $(this).removeClass('error'); | 328 | $(this).removeClass('error'); |
325 | }); | 329 | }); |
@@ -51,13 +51,10 @@ var g = new common.grid({ | @@ -51,13 +51,10 @@ var g = new common.grid({ | ||
51 | sortId: select[3] ? select[3].id : "" | 51 | sortId: select[3] ? select[3].id : "" |
52 | }; | 52 | }; |
53 | }, | 53 | }, |
54 | - columns: [{ | ||
55 | - display: 'SKN', | ||
56 | - name: 'productSkn' | ||
57 | - }, { | ||
58 | - display: '商品信息', | ||
59 | - name: 'info', | ||
60 | - render: function(item) { | 54 | + columns: [ |
55 | + {display: '', type: 'checkbox'}, | ||
56 | + {display: 'SKN', name: 'productSkn'}, | ||
57 | + {display: '商品信息', name: 'info', render: function(item) { | ||
61 | var html = "" | 58 | var html = "" |
62 | html += "<p>名称:" + item.productName + "</p>" + "<p>品牌:" + item.brandName + "</p>" + "<div>类目:"; | 59 | html += "<p>名称:" + item.productName + "</p>" + "<p>品牌:" + item.brandName + "</p>" + "<div>类目:"; |
63 | if(item.maxSortName) {html += item.maxSortName;} | 60 | if(item.maxSortName) {html += item.maxSortName;} |
@@ -65,56 +62,39 @@ var g = new common.grid({ | @@ -65,56 +62,39 @@ var g = new common.grid({ | ||
65 | if(item.smallSortName) {html += " > " + item.smallSortName;} | 62 | if(item.smallSortName) {html += " > " + item.smallSortName;} |
66 | html += "</div>"; | 63 | html += "</div>"; |
67 | return html; | 64 | return html; |
68 | - } | ||
69 | - }, { | ||
70 | - display: '供应商 / 店铺', | ||
71 | - name: 'supplier_name', | ||
72 | - render: function(item) { | 65 | + }}, |
66 | + {display: '供应商 / 店铺', name: 'supplier_name', render: function(item) { | ||
73 | var html = ''; | 67 | var html = ''; |
74 | if (item.supplierName) {html += item.supplierName;} | 68 | if (item.supplierName) {html += item.supplierName;} |
75 | if (item.shopName) {html += ' / ' + item.shopName;} | 69 | if (item.shopName) {html += ' / ' + item.shopName;} |
76 | return html; | 70 | return html; |
77 | - } | ||
78 | - }, { | ||
79 | - display: '性别', | ||
80 | - name: 'gender', | ||
81 | - render: function(item) { | 71 | + }}, |
72 | + {display: '性别', name: 'gender', render: function(item) { | ||
82 | return ENUM.gender[item.gender]; | 73 | return ENUM.gender[item.gender]; |
83 | - } | ||
84 | - }, { | ||
85 | - display: '吊牌价', | ||
86 | - name: 'retailPrice' | ||
87 | - }, { | ||
88 | - display: '销售价', | ||
89 | - name: 'salesPrice' | ||
90 | - }, { | ||
91 | - display: '返币数', | ||
92 | - name: 'returnCoin', | ||
93 | - render: function(item) { | 74 | + }}, |
75 | + {display: '吊牌价', name: 'retailPrice'}, | ||
76 | + {display: '销售价', name: 'salesPrice'}, | ||
77 | + {display: '返币数', name: 'returnCoin', render: function(item) { | ||
94 | return item.productPrice.returnCoin; | 78 | return item.productPrice.returnCoin; |
95 | - } | ||
96 | - }, { | ||
97 | - display: '状态', | ||
98 | - name: 'status', | ||
99 | - render: function(item) { | 79 | + }}, |
80 | + {display: '状态', name: 'status', render: function(item) { | ||
100 | return ENUM.status[item.productPrice.coinStatus]; | 81 | return ENUM.status[item.productPrice.coinStatus]; |
101 | - } | ||
102 | - },{ | ||
103 | - display: '操作信息', | ||
104 | - name: 'operateInfo', | ||
105 | - render: function(item) { | 82 | + }}, |
83 | + {display: '操作信息', name: 'operateInfo', render: function(item) { | ||
106 | var html = ''; | 84 | var html = ''; |
107 | if (item.productPrice.founder) {html += '<p>' + item.productPrice.founder + '</p>';} | 85 | if (item.productPrice.founder) {html += '<p>' + item.productPrice.founder + '</p>';} |
108 | if (item.productPrice.updateTime) {html += '<p>' + item.productPrice.updateTime + '</p>';} | 86 | if (item.productPrice.updateTime) {html += '<p>' + item.productPrice.updateTime + '</p>';} |
109 | return html; | 87 | return html; |
110 | - } | ||
111 | - }, { | ||
112 | - display: '操作', | ||
113 | - render: function(item) { | 88 | + }}, |
89 | + {display: '操作', render: function(item) { | ||
90 | + if(item.productPrice.coinStatus == 1){ | ||
114 | return '<a href="javascript:;" class="btn btn-success btn-xs btn-checkOk" data-skn="' + item.productSkn + '">审核通过</a>' + | 91 | return '<a href="javascript:;" class="btn btn-success btn-xs btn-checkOk" data-skn="' + item.productSkn + '">审核通过</a>' + |
115 | '<a href="javascript:;" class="btn btn-danger btn-xs btn-checkNo" data-skn="' + item.productSkn + '">驳回</a>'; | 92 | '<a href="javascript:;" class="btn btn-danger btn-xs btn-checkNo" data-skn="' + item.productSkn + '">驳回</a>'; |
93 | + }else{ | ||
94 | + return '无操作'; | ||
116 | } | 95 | } |
117 | - }] | 96 | + }} |
97 | + ] | ||
118 | }); | 98 | }); |
119 | g.init($("#gridurl").val()); | 99 | g.init($("#gridurl").val()); |
120 | 100 | ||
@@ -122,6 +102,11 @@ g.init($("#gridurl").val()); | @@ -122,6 +102,11 @@ g.init($("#gridurl").val()); | ||
122 | $(document).on('click', '#yohoCoinNav li', function() { | 102 | $(document).on('click', '#yohoCoinNav li', function() { |
123 | $(this).addClass("active").siblings().removeClass("active"); | 103 | $(this).addClass("active").siblings().removeClass("active"); |
124 | g.reload(); | 104 | g.reload(); |
105 | + if($(this).data("status") == "1"){ | ||
106 | + $("#checkOperation").show(); | ||
107 | + }else{ | ||
108 | + $("#checkOperation").hide(); | ||
109 | + } | ||
125 | }); | 110 | }); |
126 | 111 | ||
127 | //审核通过 | 112 | //审核通过 |
@@ -174,5 +159,13 @@ $(document).on('click', '.btn-checkNo', function() { | @@ -174,5 +159,13 @@ $(document).on('click', '.btn-checkNo', function() { | ||
174 | ); | 159 | ); |
175 | }); | 160 | }); |
176 | 161 | ||
162 | +//筛选 | ||
163 | +$(document).on('click', '#filter-btn', function() { | ||
164 | + g.reload(1); | ||
165 | +}); | ||
177 | 166 | ||
167 | +//全部 | ||
168 | +$(document).on('click', '#all-btn', function() { | ||
169 | + location.href = ''; | ||
170 | +}); | ||
178 | 171 |
@@ -420,20 +420,17 @@ $(document).on("click", ".edit", function () { | @@ -420,20 +420,17 @@ $(document).on("click", ".edit", function () { | ||
420 | var goodsgird = new common.grid({ | 420 | var goodsgird = new common.grid({ |
421 | el: '#goodsgird', | 421 | el: '#goodsgird', |
422 | parms: function () { | 422 | parms: function () { |
423 | - var beginPrice = 0, endPrice = 1000000; | ||
424 | - if (common.util.__input('beginPrice')) { | ||
425 | - beginPrice = common.util.__input('beginPrice'); | 423 | + var price = ""; |
424 | + if (common.util.__input('beginPrice')&&common.util.__input('endPrice')) { | ||
425 | + price = common.util.__input('beginPrice')+","+common.util.__input('endPrice'); | ||
426 | } | 426 | } |
427 | - if (common.util.__input('endPrice')) { | ||
428 | - endPrice = common.util.__input('endPrice') | ||
429 | - } | ||
430 | - return {//status=1&sales=Y&stocknumber=1&attribute_not=2 | 427 | + return { |
431 | status:1, | 428 | status:1, |
432 | sales:"Y", | 429 | sales:"Y", |
433 | stocknumber:"1", | 430 | stocknumber:"1", |
434 | attribute_not:"2", | 431 | attribute_not:"2", |
435 | query: common.util.__input('skns'), | 432 | query: common.util.__input('skns'), |
436 | - price: beginPrice + "," + endPrice | 433 | + price: price |
437 | }; | 434 | }; |
438 | }, | 435 | }, |
439 | columns: [ | 436 | columns: [ |
client/js/resource/content.js
deleted
100644 → 0
@@ -57,6 +57,10 @@ | @@ -57,6 +57,10 @@ | ||
57 | background: #ccc; | 57 | background: #ccc; |
58 | color: #ffffff; | 58 | color: #ffffff; |
59 | } | 59 | } |
60 | +#yohoCoinImportMessage b, #yohoCoinImportMessage span{ | ||
61 | + display: block; | ||
62 | + float: left; | ||
63 | +} | ||
60 | 64 | ||
61 | #yohoCoin_import .success{ | 65 | #yohoCoin_import .success{ |
62 | background:#449d44; | 66 | background:#449d44; |
@@ -66,6 +70,11 @@ | @@ -66,6 +70,11 @@ | ||
66 | background:#ff0000; | 70 | background:#ff0000; |
67 | } | 71 | } |
68 | 72 | ||
73 | +#yohoCoin_import select.error{ | ||
74 | + border: 2px solid #ff0000; | ||
75 | + background: none; | ||
76 | +} | ||
77 | + | ||
69 | #yohoCoin_import .title{ | 78 | #yohoCoin_import .title{ |
70 | padding: 5px 10px; | 79 | padding: 5px 10px; |
71 | background: #5bc0de; | 80 | background: #5bc0de; |
@@ -44,7 +44,8 @@ exports.res = [ | @@ -44,7 +44,8 @@ exports.res = [ | ||
44 | {name: 'maxSortId', type: 'Number'}, | 44 | {name: 'maxSortId', type: 'Number'}, |
45 | {name: 'middleSortId', type: 'Number'}, | 45 | {name: 'middleSortId', type: 'Number'}, |
46 | {name: 'smallSortId', type: 'Number'}, | 46 | {name: 'smallSortId', type: 'Number'}, |
47 | - {name: 'sortId', type: 'Number'} | 47 | + {name: 'sortId', type: 'Number'}, |
48 | + {name: 'page', type: 'Number'} | ||
48 | ] | 49 | ] |
49 | }, | 50 | }, |
50 | 51 | ||
@@ -60,7 +61,7 @@ exports.res = [ | @@ -60,7 +61,7 @@ exports.res = [ | ||
60 | ] | 61 | ] |
61 | }, | 62 | }, |
62 | 63 | ||
63 | - {//批量上传 | 64 | + {//批量上传TaskId查询 |
64 | route: "/yohoCoin/importResult/queryBatchImportResult", | 65 | route: "/yohoCoin/importResult/queryBatchImportResult", |
65 | method: "POST", | 66 | method: "POST", |
66 | url: "/importResult/queryBatchImportResult", | 67 | url: "/importResult/queryBatchImportResult", |
@@ -68,6 +69,16 @@ exports.res = [ | @@ -68,6 +69,16 @@ exports.res = [ | ||
68 | {name: 'param', type: 'String'}, | 69 | {name: 'param', type: 'String'}, |
69 | ] | 70 | ] |
70 | }, | 71 | }, |
72 | + | ||
73 | + {//批量确认提交 | ||
74 | + route: "/good/yohoCoin/insertBatch", | ||
75 | + method: "POST", | ||
76 | + url: "/yohoCoin/insertBatch", | ||
77 | + params:[ | ||
78 | + {name: 'auditorId', type: 'Number'}, | ||
79 | + {name: 'productPrices', type: 'String'} | ||
80 | + ] | ||
81 | + }, | ||
71 | /*************************yoho币审核页面接口*******************************/ | 82 | /*************************yoho币审核页面接口*******************************/ |
72 | 83 | ||
73 | {//yoho币审核页面渲染 | 84 | {//yoho币审核页面渲染 |
@@ -14,7 +14,6 @@ exports.search = function (req, res) { | @@ -14,7 +14,6 @@ exports.search = function (req, res) { | ||
14 | params.push(key + "=" + encodeURI(req.body[key])); | 14 | params.push(key + "=" + encodeURI(req.body[key])); |
15 | } | 15 | } |
16 | var url = searchDomain + "/search.json?viewNum=" + size + "&" + params.join('&'); | 16 | var url = searchDomain + "/search.json?viewNum=" + size + "&" + params.join('&'); |
17 | - //console.log("请求url",url); | ||
18 | request({url: url}, function (error, response, body) { | 17 | request({url: url}, function (error, response, body) { |
19 | var data = {}; | 18 | var data = {}; |
20 | data.list = []; | 19 | data.list = []; |
@@ -121,14 +121,14 @@ | @@ -121,14 +121,14 @@ | ||
121 | <div class="dataTables_wrapper no-footer" id="yohoCoin_table"></div> | 121 | <div class="dataTables_wrapper no-footer" id="yohoCoin_table"></div> |
122 | 122 | ||
123 | <div class="panel bulk-import" id="yohoCoin_import"> | 123 | <div class="panel bulk-import" id="yohoCoin_import"> |
124 | - <a id="return-btn" href="javascript:;" class="btn btn-info">返回列表</a> | 124 | + <a id="return-btn" href="javascript:;" class="btn btn-primary">返回列表</a> |
125 | 125 | ||
126 | <table class="table table-bordered" style="border:1px solid #ddd; margin-top: 10px"> | 126 | <table class="table table-bordered" style="border:1px solid #ddd; margin-top: 10px"> |
127 | <tr> | 127 | <tr> |
128 | <td width="120px" style="line-height: 37px"><b>上传EXCEL:</b></td> | 128 | <td width="120px" style="line-height: 37px"><b>上传EXCEL:</b></td> |
129 | <td style="position: relative;"> | 129 | <td style="position: relative;"> |
130 | <input id="yohoCoinUpload" name="file" type="file" style="cursor: pointer; height: 37px; top: 8px;"> | 130 | <input id="yohoCoinUpload" name="file" type="file" style="cursor: pointer; height: 37px; top: 8px;"> |
131 | - <div class="file-name btn btn-primary">请选择文件</div> | 131 | + <div class="file-name btn btn-info">请选择文件</div> |
132 | </td> | 132 | </td> |
133 | </tr> | 133 | </tr> |
134 | <tr> | 134 | <tr> |
@@ -144,7 +144,9 @@ | @@ -144,7 +144,9 @@ | ||
144 | </table> | 144 | </table> |
145 | 145 | ||
146 | <div id="yohoCoinImportMessage"> | 146 | <div id="yohoCoinImportMessage"> |
147 | - <b>批量上传结果:</b><span id="detailMassage"></span> | 147 | + <b>批量上传结果:</b> |
148 | + <span id="detailMassage"></span> | ||
149 | + <div class="clearfix"></div> | ||
148 | </div> | 150 | </div> |
149 | 151 | ||
150 | <div id="yohoCoinImportResultSet"> | 152 | <div id="yohoCoinImportResultSet"> |
@@ -227,13 +229,21 @@ | @@ -227,13 +229,21 @@ | ||
227 | <td class="center retailPrice" style="width: 5%">[[retailPrice]]</td> | 229 | <td class="center retailPrice" style="width: 5%">[[retailPrice]]</td> |
228 | <td class="center salesPrice" style="width: 5%">[[salesPrice]]</td> | 230 | <td class="center salesPrice" style="width: 5%">[[salesPrice]]</td> |
229 | <td class="center returnYohoCoin" style="width: 5%">[[productPrice.returnCoin]]</td> | 231 | <td class="center returnYohoCoin" style="width: 5%">[[productPrice.returnCoin]]</td> |
230 | - <td class="center coinStatus" style="width: 8%">[[statusName]]</td> | 232 | + <td class="center coinStatus" style="width: 8%"> |
233 | + [[statusName]]<br> | ||
234 | + [[if productPrice.coinStatus == 3]] | ||
235 | + <a class="noCheckReason" href="javascript:" data-text="[[productPrice.reason]]" style="color: #ff0000">驳回理由</a> | ||
236 | + [[/if]] | ||
237 | + </td> | ||
231 | <td style="width: 12%"> | 238 | <td style="width: 12%"> |
232 | [[if productPrice.founder]]<p>[[productPrice.founder]]</p>[[/if]] | 239 | [[if productPrice.founder]]<p>[[productPrice.founder]]</p>[[/if]] |
233 | [[if productPrice.updateTime]]<p>[[productPrice.updateTime]]</p>[[/if]] | 240 | [[if productPrice.updateTime]]<p>[[productPrice.updateTime]]</p>[[/if]] |
234 | </td> | 241 | </td> |
235 | - [[if productPrice.coinStatus != 1]] | ||
236 | - <td class="center" style="width: 5%"><button type="button" class="btn btn-info btn-sm btn-modify">修改</button></td> | 242 | + [[if productPrice.coinStatus == 0]] |
243 | + <td class="center operation" style="width: 5%"><button type="button" name="设置" class="btn btn-primary btn-sm btn-modify">设置</button></td> | ||
244 | + [[/if]] | ||
245 | + [[if productPrice.coinStatus == 2 || productPrice.coinStatus == 3]] | ||
246 | + <td class="center operation" style="width: 5%"><button type="button" name="修改" class="btn btn-info btn-sm btn-modify">修改</button></td> | ||
237 | [[/if]] | 247 | [[/if]] |
238 | </tr> | 248 | </tr> |
239 | 249 | ||
@@ -247,7 +257,7 @@ | @@ -247,7 +257,7 @@ | ||
247 | <td width="20%"><b>操作</b></td> | 257 | <td width="20%"><b>操作</b></td> |
248 | </tr> | 258 | </tr> |
249 | <tr> | 259 | <tr> |
250 | - <td style="display: none"> | 260 | + <!--td> |
251 | <div class="radio" style="margin-top: 0"> | 261 | <div class="radio" style="margin-top: 0"> |
252 | <label><input type="radio" name="returnCoinTime" value="option1" checked>永久</label> | 262 | <label><input type="radio" name="returnCoinTime" value="option1" checked>永久</label> |
253 | </div> | 263 | </div> |
@@ -260,7 +270,7 @@ | @@ -260,7 +270,7 @@ | ||
260 | </form> | 270 | </form> |
261 | </label> | 271 | </label> |
262 | </div> | 272 | </div> |
263 | - </td> | 273 | + </td--> |
264 | <td class="center"> | 274 | <td class="center"> |
265 | <input type="text" class="form-control center editor-yohoCoin" placeholder="YOHO币数量" value="[[productPrice.returnCoin]]" style="width: 100px"> | 275 | <input type="text" class="form-control center editor-yohoCoin" placeholder="YOHO币数量" value="[[productPrice.returnCoin]]" style="width: 100px"> |
266 | </td> | 276 | </td> |
@@ -272,7 +282,7 @@ | @@ -272,7 +282,7 @@ | ||
272 | </select> | 282 | </select> |
273 | </td> | 283 | </td> |
274 | <td class="center"> | 284 | <td class="center"> |
275 | - <button type="submit" class="btn btn-primary btn-sm btn-save" data-productskn="[[productSkn]]">保存</button> | 285 | + <button type="submit" class="btn btn-success btn-sm btn-save" data-productskn="[[productSkn]]">保存</button> |
276 | </td> | 286 | </td> |
277 | </tr> | 287 | </tr> |
278 | <tr> | 288 | <tr> |
@@ -297,15 +307,28 @@ | @@ -297,15 +307,28 @@ | ||
297 | </tr> | 307 | </tr> |
298 | </thead> | 308 | </thead> |
299 | <tbody> | 309 | <tbody> |
300 | - [[each data as item _index]] | 310 | + [[if successList.length > 0]] |
311 | + [[each successList as item _index]] | ||
301 | <tr> | 312 | <tr> |
302 | <td>[[item.productSkn]]</td> | 313 | <td>[[item.productSkn]]</td> |
303 | <td>[[item.brandName]]</td> | 314 | <td>[[item.brandName]]</td> |
304 | <td>[[item.retailPrice]]</td> | 315 | <td>[[item.retailPrice]]</td> |
305 | - <td>[[item.returnCoin]]</td> | 316 | + <td> |
317 | + [[if item.returnCoin >= item.retailPrice * 0.2]] | ||
318 | + <font color="#ff0000">[[item.returnCoin]]</font><br> | ||
319 | + [[else]] | ||
320 | + [[item.returnCoin]]<br> | ||
321 | + [[/if]] | ||
322 | + <font color="#999999">([[item.preReturnCoin]])</font> | ||
323 | + </td> | ||
306 | <td><a href="javascript:;" class="btn btn-sm btn-danger btn-delete-yohoCoin" data-index="[[_index]]">删除</a></td> | 324 | <td><a href="javascript:;" class="btn btn-sm btn-danger btn-delete-yohoCoin" data-index="[[_index]]">删除</a></td> |
307 | </tr> | 325 | </tr> |
308 | [[/each]] | 326 | [[/each]] |
327 | + [[else]] | ||
328 | + <tr> | ||
329 | + <td colspan="5">无数据!</td> | ||
330 | + </tr> | ||
331 | + [[/if]] | ||
309 | </tbody> | 332 | </tbody> |
310 | </table> | 333 | </table> |
311 | </script> | 334 | </script> |
@@ -97,6 +97,11 @@ | @@ -97,6 +97,11 @@ | ||
97 | <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a> | 97 | <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a> |
98 | <a id="all-btn" href="javascript:;" class="btn btn-info">全部</a> | 98 | <a id="all-btn" href="javascript:;" class="btn btn-info">全部</a> |
99 | </div> | 99 | </div> |
100 | + | ||
101 | + <div id="checkOperation" class="panel-col" style="width: auto;"> | ||
102 | + <a id="all-checkOk" href="javascript:;" class="btn btn-success">审核通过</a> | ||
103 | + <a id="all-checkNo" href="javascript:;" class="btn btn-danger">驳回</a> | ||
104 | + </div> | ||
100 | </div> | 105 | </div> |
101 | </div> | 106 | </div> |
102 | {{/ filter}} | 107 | {{/ filter}} |
-
Please register or login to post a comment