Authored by 王钱钧

完善货到付款功能。

@@ -7,16 +7,16 @@ var $ = require('jquery'), @@ -7,16 +7,16 @@ var $ = require('jquery'),
7 common = require('../common/common'); 7 common = require('../common/common');
8 8
9 var ENUM = { 9 var ENUM = {
10 - enum: {  
11 - 1: '待审核',  
12 - 2: '驳回',  
13 - 3: '通过',  
14 - all: "全部商品"  
15 - }, 10 +
16 tips: { 11 tips: {
17 "100": 0, 12 "100": 0,
18 "300": 0, 13 "300": 0,
19 - "400": 0 14 + "all": 0
  15 + },
  16 + status: {
  17 + '1': "开启",
  18 + '0': "关闭",
  19 +
20 } 20 }
21 } 21 }
22 22
@@ -24,14 +24,16 @@ var ENUM = { @@ -24,14 +24,16 @@ var ENUM = {
24 /*下拉选择*/ 24 /*下拉选择*/
25 common.dropDown({ 25 common.dropDown({
26 el: "#brandId", 26 el: "#brandId",
27 - ajax: "queryBrand" 27 + ajax: "codGetBrandList"
28 }); 28 });
29 29
30 new common.dropDown({ 30 new common.dropDown({
31 - el: "#status", 31 + el: "#isPayDelivery",
32 ajax: "" 32 ajax: ""
33 }); 33 });
34 34
  35 +var currentBtnType;
  36 +var currentSelItem;
35 37
36 var t = new common.tab({ 38 var t = new common.tab({
37 el: "#basicTab", 39 el: "#basicTab",
@@ -39,27 +41,30 @@ var t = new common.tab({ @@ -39,27 +41,30 @@ var t = new common.tab({
39 41
40 var columnname = $(this).find('a').attr('columnname'); 42 var columnname = $(this).find('a').attr('columnname');
41 43
42 - if (columnname == '400') { 44 + if (columnname == 'all') {
43 g.options.columns[1].hidden = false; 45 g.options.columns[1].hidden = false;
44 g.options.columns[2].hidden = true; 46 g.options.columns[2].hidden = true;
45 g.options.columns[3].hidden = true; 47 g.options.columns[3].hidden = true;
46 g.options.columns[4].hidden = true; 48 g.options.columns[4].hidden = true;
47 g.options.columns[5].hidden = false; 49 g.options.columns[5].hidden = false;
  50 + g.options.columns[6].hidden = true;
48 51
49 } else if(columnname == 100) { 52 } else if(columnname == 100) {
50 g.options.columns[1].hidden = true; 53 g.options.columns[1].hidden = true;
51 g.options.columns[2].hidden = false; 54 g.options.columns[2].hidden = false;
52 g.options.columns[3].hidden = false; 55 g.options.columns[3].hidden = false;
53 g.options.columns[4].hidden = true; 56 g.options.columns[4].hidden = true;
54 - g.options.columns[5].hidden = false; 57 + g.options.columns[5].hidden = true;
  58 + g.options.columns[6].hidden = false;
55 } else { 59 } else {
56 g.options.columns[1].hidden = true; 60 g.options.columns[1].hidden = true;
57 g.options.columns[2].hidden = false; 61 g.options.columns[2].hidden = false;
58 g.options.columns[3].hidden = false; 62 g.options.columns[3].hidden = false;
59 g.options.columns[4].hidden = false; 63 g.options.columns[4].hidden = false;
60 g.options.columns[5].hidden = true; 64 g.options.columns[5].hidden = true;
  65 + g.options.columns[6].hidden = true;
61 } 66 }
62 - g.init('/supplier/baseproduct/ajax/index'); 67 + g.init('/payDelivery/queryTotalBrandPayDelivery');
63 }, 68 },
64 columns: [{ 69 columns: [{
65 name: "100", 70 name: "100",
@@ -70,7 +75,7 @@ var t = new common.tab({ @@ -70,7 +75,7 @@ var t = new common.tab({
70 display: "驳回({2})", 75 display: "驳回({2})",
71 value: '' 76 value: ''
72 }, { 77 }, {
73 - name: "400", 78 + name: "all",
74 display: "全部", 79 display: "全部",
75 value: '' 80 value: ''
76 }] 81 }]
@@ -81,33 +86,22 @@ var g = new common.grid({ @@ -81,33 +86,22 @@ var g = new common.grid({
81 el: '#basicTable', 86 el: '#basicTable',
82 parms: function() { 87 parms: function() {
83 return { 88 return {
84 -  
85 - //productSkn: common.util.__input("productSkn"),  
86 - //productSkc: common.util.__input("productSkc"),  
87 - //productSku: common.util.__input("productSku"),  
88 - //productName: common.util.__input("productName"),  
89 - //shopId: common.util.__input("shopId"),  
90 brandId: common.util.__input("brandId"), 89 brandId: common.util.__input("brandId"),
91 isPayDelivery: common.util.__input("isPayDelivery"), 90 isPayDelivery: common.util.__input("isPayDelivery"),
92 - //gender: common.util.__input("gender"),  
93 - //maxSortId: tabTree.selected.length > 0 ? tabTree.selected[0].id : "", // 一级类目  
94 - //middleSortId: tabTree.selected.length > 1 ? tabTree.selected[1].id : "", // 二级类目  
95 - //smallSortId: tabTree.selected.length > 2 ? tabTree.selected[2].id : "", // 三级类目  
96 - //size: common.util.__input("size"),  
97 - checkStatus: 100 91 + checkStatus: (t.active && t.active!='all') ? t.active : 400
98 92
99 }; 93 };
100 }, 94 },
101 columns: [{ 95 columns: [{
102 display: '品牌', 96 display: '品牌',
103 - type: 'brandName' 97 + name: 'brandName'
104 }, 98 },
105 // 审核状态(全部商品是显示) 1 99 // 审核状态(全部商品是显示) 1
106 { 100 {
107 display: "状态", 101 display: "状态",
108 render: function(item) { 102 render: function(item) {
109 var html = []; 103 var html = [];
110 - html.push("<p>" + ENUM.status[item.status] + "</p>"); 104 + html.push("<p>" + ENUM.status[item.isPayDelivery] + "</p>");
111 105
112 //if (item.status == 3 || item.status == 6) { 106 //if (item.status == 3 || item.status == 6) {
113 // html.push("<p style='color:red;'>" + filterNull(item, 'rejectReason') + "</p>"); 107 // html.push("<p style='color:red;'>" + filterNull(item, 'rejectReason') + "</p>");
@@ -122,7 +116,7 @@ var g = new common.grid({ @@ -122,7 +116,7 @@ var g = new common.grid({
122 116
123 render: function(item) { 117 render: function(item) {
124 var html = []; 118 var html = [];
125 - html.push("<p>" + common.util.__filterNull(item, 'founderName') + "</p>"); 119 + html.push("<p>" + common.util.__filterNull(item, 'applicant') + "</p>");
126 120
127 return html.join(''); 121 return html.join('');
128 } 122 }
@@ -132,7 +126,7 @@ var g = new common.grid({ @@ -132,7 +126,7 @@ var g = new common.grid({
132 126
133 render: function(item) { 127 render: function(item) {
134 var html = []; 128 var html = [];
135 - html.push("<p>" + common.util.__filterNull(item, 'editTime') + "</p>"); 129 + html.push("<p>" + common.util.__filterNull(item, 'createTime') + "</p>");
136 130
137 return html.join(''); 131 return html.join('');
138 } 132 }
@@ -142,30 +136,31 @@ var g = new common.grid({ @@ -142,30 +136,31 @@ var g = new common.grid({
142 hidden: true, 136 hidden: true,
143 name: 'status', // 8待上架,2待审核,3驳回,4通过,1已上架,0已下架,5再上架待审核,6再上架驳回,7再上架通过 137 name: 'status', // 8待上架,2待审核,3驳回,4通过,1已上架,0已下架,5再上架待审核,6再上架驳回,7再上架通过
144 render: function(item) { 138 render: function(item) {
145 - var html = '';  
146 - html += ENUM.status[item.status];  
147 - if (item.status == 3 || item.status == 6) {  
148 - html += '<p style="color:red;">' + common.util.__filterNull(item, 'rejectReason') + '</p>'  
149 - }  
150 - return html; 139 + return '<p style="color:red;">' + common.util.__filterNull(item, 'rejectReason') + '</p>' ;
  140 +
151 } 141 }
152 }, { // 5 142 }, { // 5
153 display: "操作", 143 display: "操作",
154 render: function(item) { 144 render: function(item) {
155 var html = []; 145 var html = [];
  146 + if (item.isPayDelivery == 1) { // 待审核
  147 + html.push('<a data-index="' + item.__index + '" href="JavaScript:;" class="btn operation btn-danger btn-xs edit-class-btn" id="btn-item-close" data-type="close">关闭</a>');
  148 + } else {
  149 + html.push('<a data-index="' + item.__index + '" href="JavaScript:;" class="btn operation btn-success btn-xs edit-class-btn" id="btn-item-open" data-type="open">开启</a>');
156 150
  151 + }
157 152
158 - //html.push('<a data-index="'+ item.__index+ '" href="JavaScript:;" class="btn btn-info btn-xs edit-class-btn" id="btn-item-info">查看</a>');  
159 - html.push('<a href="/goods/audit/info/' + item.productSkn + '" class="btn btn-info btn-xs info-btn">查看</a>'); 153 + return html.join('');
  154 + }
  155 + },{ // 6
  156 + display: "操作",
  157 + hidden: true,
  158 + render: function(item) {
  159 + var html = [];
160 160
161 - //if (item.status == 3 || item.status == 6) { // 驳回  
162 - // html.push('<a data-index="'+ item.__index+ '" href="JavaScript:;" class="btn operation btn-success btn-xs edit-class-btn" id="btn-item-pass">通过</a>');  
163 - //} 161 + html.push('<a data-index="' + item.__index + '" href="JavaScript:;" class="btn operation btn-danger btn-xs edit-class-btn" id="btn-item-reject" data-type="reject">驳回</a>');
  162 + html.push('<a data-index="' + item.__index + '" href="JavaScript:;" class="btn operation btn-success btn-xs edit-class-btn" id="btn-item-pass" data-type="pass">通过</a>');
164 163
165 - if (item.status == 2 || item.status == 5) { // 待审核  
166 - html.push('<a data-index="' + item.__index + '" href="JavaScript:;" class="btn operation btn-success btn-xs edit-class-btn" id="btn-item-pass">通过</a>');  
167 - html.push('<a data-index="' + item.__index + '" href="JavaScript:;" class="btn operation btn-danger btn-xs edit-class-btn" id="btn-item-reject">驳回</a>');  
168 - }  
169 164
170 165
171 return html.join(''); 166 return html.join('');
@@ -173,14 +168,14 @@ var g = new common.grid({ @@ -173,14 +168,14 @@ var g = new common.grid({
173 }, 168 },
174 ] 169 ]
175 }); 170 });
176 -g.init('/payDelivery/queryAllBrandPayDelivery'); 171 +g.init('/payDelivery/queryTotalBrandPayDelivery');
177 172
178 // tab初始化 173 // tab初始化
179 var loadTab = function() { 174 var loadTab = function() {
180 t.active = undefined; 175 t.active = undefined;
181 setTimeout(function() { 176 setTimeout(function() {
182 common.util.__ajax({ 177 common.util.__ajax({
183 - url: "/supplier/baseproduct/auditCount", 178 + url: "/payDelivery/queryCountBrandPayDelivery",
184 data: g.options.parms() 179 data: g.options.parms()
185 }, function(res) { 180 }, function(res) {
186 var __dt = $.extend({}, ENUM.tips, res.data); 181 var __dt = $.extend({}, ENUM.tips, res.data);
@@ -196,118 +191,83 @@ $(document).on('click', "#filter-btn", function() { @@ -196,118 +191,83 @@ $(document).on('click', "#filter-btn", function() {
196 g.reload(); 191 g.reload();
197 }); 192 });
198 193
199 -var Bll = {  
200 - toast: function(content, fn) {  
201 - common.dialog.confirm("温馨提示", content, function() {  
202 - common.util.__ajax({  
203 - url: '/supplier/baseproduct/auditReject',  
204 - data: fn()  
205 - }, function() {  
206 - g.reload();  
207 - loadTab();  
208 - });  
209 - });  
210 - }  
211 -}  
212 194
  195 +$(document).on('click', ".edit-class-btn", function() {
  196 + console.log($(this).data('type'));
  197 + currentBtnType = $(this).data('type');
213 198
214 -//批量驳回  
215 -$(document).on("click", "#reject-btn", function() { 199 + var url = '';
  200 + var alertContent;
  201 + currentSelItem = g.rows[$(this).data("index")];
  202 + var data = function() {
216 203
217 - var selectedArr = g.selected,  
218 - len = selectedArr.length,  
219 - sknList = [];  
220 - if (len <= 0) {  
221 - common.util.__tip('请选择要驳回的商品', 'warning');  
222 - return;  
223 - }  
224 204
225 - var data = function() {  
226 var reason = $('#reason').val(); 205 var reason = $('#reason').val();
227 if (reason === '' || $.trim(reason) === '') { 206 if (reason === '' || $.trim(reason) === '') {
228 - return "请填写驳回原因"; 207 + if(currentBtnType == 'reject') {
  208 + return "请填写驳回原因";
  209 + }
229 } 210 }
230 -  
231 - $.each(selectedArr, function(i, value) {  
232 - sknList.push(value['productSkn']);  
233 -  
234 - });  
235 -  
236 - console.log(sknList);  
237 -  
238 return { 211 return {
239 - productSknList: JSON.stringify(sknList),  
240 - targetStatus: 3, // 驳回  
241 - rejectReason: reason  
242 - };  
243 - }  
244 - Bll.toast($("#template").html(), data);  
245 -}); 212 + brandName: currentSelItem.brandName,
  213 + brandId: currentSelItem.brandId,
  214 + rejectReason: reason,
  215 + isPayDelivery: currentBtnType=='open'?1:0,
  216 + checkStatus: currentBtnType=='pass'?200:300,
  217 + id: currentSelItem.id,
246 218
247 -//批量通过  
248 -$(document).on("click", "#pass-btn", function() {  
249 -  
250 - var selectedArr = g.selected,  
251 - len = selectedArr.length,  
252 - sknList = [];  
253 - if (len <= 0) {  
254 - common.util.__tip('请选择审核通过的商品', 'warning');  
255 - return;  
256 - }  
257 -  
258 - var data = function() {  
259 -  
260 - $.each(selectedArr, function(i, value) {  
261 - sknList.push(value['productSkn']);  
262 -  
263 - });  
264 -  
265 - console.log(sknList);  
266 -  
267 - return {  
268 - productSknList: JSON.stringify(sknList),  
269 - targetStatus: 4, // 通过  
270 - rejectReason: ""  
271 }; 219 };
272 } 220 }
273 - Bll.toast("确定要通过该申请吗?", data);  
274 -});  
275 221
276 -// 单个驳回  
277 -$(document).on("click", "#btn-item-reject", function() {  
278 - //auditOperation([],3,)  
279 - var item = g.rows[$(this).data("index")];  
280 -  
281 - var data = function() {  
282 -  
283 - var reason = $('#reason').val();  
284 - if (reason === '' || $.trim(reason) === '') {  
285 - return "请填写驳回原因"; 222 + switch (currentBtnType) {
  223 + case 'open':
  224 + {
  225 + url = '/payDelivery/addPayDeliveryCheck';
  226 + alertContent = '开启货到付款需组长审核,您确定提交此申请吗?';
286 } 227 }
  228 + break;
287 229
288 - return {  
289 - productSknList: JSON.stringify([item.productSkn]),  
290 - targetStatus: 3, // 驳回  
291 - rejectReason: reason  
292 - };  
293 - }  
294 - Bll.toast($("#template").html(), data);  
295 -}); 230 + case 'close':
  231 + {
  232 + url = '/payDelivery/addPayDeliveryCheck';
  233 + alertContent = '关闭货到付款需组长审核,您确定提交此申请吗?';
296 234
  235 + }
  236 + break;
297 237
298 -// 单个通过  
299 -$(document).on("click", "#btn-item-pass", function() {  
300 - //auditOperation([],3,)  
301 - var item = g.rows[$(this).data("index")]; 238 + case 'pass':
  239 + {
  240 + url = '/payDelivery/reviewPayDeliveryCheck';
  241 + alertContent = '您确定要通过申请吗?';
  242 + }
  243 + break;
302 244
303 - var data = function() { 245 + case 'reject':
  246 + {
  247 + url = '/payDelivery/reviewPayDeliveryCheck';
  248 + alertContent = $("#template").html();
  249 + }
  250 + break;
304 251
305 - return {  
306 - productSknList: JSON.stringify([item.productSkn]),  
307 - targetStatus: 4, //通过  
308 - rejectReason: ""  
309 - }; 252 + default :
  253 + {
  254 + url = '';
  255 + alertContent = '未知弹框~';
  256 + }
  257 + break;
310 } 258 }
311 - Bll.toast("确定要通过该申请吗?", data); 259 +
  260 + common.dialog.confirm("温馨提示", alertContent, function() {
  261 + common.util.__ajax({
  262 + url: url,
  263 + data: data()
  264 + }, function() {
  265 + g.reload();
  266 + loadTab();
  267 + });
  268 + });
312 }); 269 });
313 270
  271 +$('#export-btn').on('click', function() {
  272 + window.open("/ajax/down?queryConf=" + JSON.stringify(g.options.parms()) + "&type=brandPayDeliveryExport");
  273 +});
@@ -6,12 +6,7 @@ var $ = require('jquery'), @@ -6,12 +6,7 @@ var $ = require('jquery'),
6 common = require('../common/common'); 6 common = require('../common/common');
7 7
8 var ENUM = { 8 var ENUM = {
9 - enum: {  
10 - 1: '待审核',  
11 - 2: '驳回',  
12 - 3: '通过',  
13 - all: "全部商品"  
14 - }, 9 +
15 tips: { 10 tips: {
16 "100": 0, 11 "100": 0,
17 "300": 0, 12 "300": 0,
@@ -24,6 +19,8 @@ var ENUM = { @@ -24,6 +19,8 @@ var ENUM = {
24 } 19 }
25 } 20 }
26 21
  22 +var currentSelItem;
  23 +
27 24
28 /*下拉选择*/ 25 /*下拉选择*/
29 common.dropDown({ 26 common.dropDown({
@@ -182,7 +179,7 @@ var loadTab = function() { @@ -182,7 +179,7 @@ var loadTab = function() {
182 t.active = undefined; 179 t.active = undefined;
183 setTimeout(function() { 180 setTimeout(function() {
184 common.util.__ajax({ 181 common.util.__ajax({
185 - url: "/supplier/baseproduct/auditCount", 182 + url: "/payDelivery/queryCountProductPayDelivery",
186 data: g.options.parms() 183 data: g.options.parms()
187 }, function(res) { 184 }, function(res) {
188 var __dt = $.extend({}, ENUM.tips, res.data); 185 var __dt = $.extend({}, ENUM.tips, res.data);
@@ -205,7 +202,7 @@ $(document).on('click', ".edit-class-btn", function() { @@ -205,7 +202,7 @@ $(document).on('click', ".edit-class-btn", function() {
205 202
206 var url = ''; 203 var url = '';
207 var alertContent; 204 var alertContent;
208 - var item = g.rows[$(this).data("index")]; 205 + currentSelItem = g.rows[$(this).data("index")];
209 var data = function() { 206 var data = function() {
210 207
211 var reason = $('#reason').val(); 208 var reason = $('#reason').val();
@@ -215,10 +212,11 @@ $(document).on('click', ".edit-class-btn", function() { @@ -215,10 +212,11 @@ $(document).on('click', ".edit-class-btn", function() {
215 } 212 }
216 } 213 }
217 return { 214 return {
218 - productSkn: item.productSkn,  
219 - brandName: item.brandName,  
220 - brandId: item.brandId,  
221 - rejectReason: reason 215 + productSkn: currentSelItem.productSkn,
  216 + brandName: currentSelItem.brandName,
  217 + brandId: currentSelItem.brandId,
  218 + rejectReason: reason,
  219 + id:currentSelItem.id
222 }; 220 };
223 } 221 }
224 222
@@ -271,29 +269,6 @@ $(document).on('click', ".edit-class-btn", function() { @@ -271,29 +269,6 @@ $(document).on('click', ".edit-class-btn", function() {
271 }); 269 });
272 }); 270 });
273 271
274 -  
275 -// 单个驳回  
276 -$(document).on("click", "#btn-item-reject", function() {  
277 - //auditOperation([],3,)  
278 -  
279 - BllClose.toast($("#template").html(), data);  
280 -});  
281 -  
282 -  
283 -// 单个通过  
284 -$(document).on("click", "#btn-item-pass", function() {  
285 - //auditOperation([],3,)  
286 - var item = g.rows[$(this).data("index")];  
287 -  
288 - var data = function() {  
289 -  
290 - return {  
291 - //productSknList: JSON.stringify([item.productSkn]),  
292 - productSkn: item.productSkn, //通过  
293 - brandName: item.brandName,  
294 - brandId: item.brandId,  
295 - rejectReason: ""  
296 - };  
297 - }  
298 - BllOpen.toast("确定要通过该申请吗?", data);  
299 -}); 272 +$('#export-btn').on('click', function() {
  273 + window.open("/ajax/down?queryConf=" + JSON.stringify(g.options.parms()) + "&type=productPayDeliveryExport");
  274 +});
  1 +/**
  2 + * Created by wangqianjun on 16/4/13.
  3 + */
  4 +'use strict';
  5 +var $ = require('jquery'),
  6 + common = require('../common/common');
  7 +
  8 +$('input[type="file"]').after('<div class="file-name btn btn-default">请选择文件</div>');
  9 +
  10 +function batchExport(el, type) {
  11 + var loadModal = null;
  12 +
  13 + return {
  14 + params: {
  15 + type: type,
  16 + __type: "batch-import"
  17 + },
  18 + onStart: function() {
  19 + loadModal = common.dialog.load();
  20 +
  21 + $(el).parents('td').find('.file-name').text($(el).val().replace("C:\\fakepath\\", ""));
  22 + },
  23 + onComplete: function(response) {
  24 + console.log(response);
  25 + if (loadModal) {
  26 + loadModal.close();
  27 + }
  28 + if (response.code == 200) {
  29 + common.util.__tip(response.message, 'success');
  30 + } else {
  31 + common.util.__tip(response.message, 'warning');
  32 + }
  33 + }
  34 + }
  35 +}
  36 +
  37 +common.edit.ajaxfileupload('#sort-file', batchExport('#sort-file', 'payDeliveryModify'));
@@ -10,19 +10,54 @@ exports.res = [{ @@ -10,19 +10,54 @@ exports.res = [{
10 route: '/goods/cod/brand/index', 10 route: '/goods/cod/brand/index',
11 method: 'GET', 11 method: 'GET',
12 view: 'pages/goods/cod-brand', 12 view: 'pages/goods/cod-brand',
13 - src: '/goods/cod', 13 + src: '/goods/cod-brand',
14 }, { 14 }, {
15 - route: '/payDelivery/queryAllBrandPayDelivery', 15 + route: '/payDelivery/queryTotalBrandPayDelivery',
16 method: 'POST', 16 method: 'POST',
17 - url: '/payDelivery/queryAllBrandPayDelivery', 17 + url: '/payDelivery/queryTotalBrandPayDelivery',
18 params: [ 18 params: [
19 {name: 'brandId', type: 'Number'}, 19 {name: 'brandId', type: 'Number'},
20 {name: 'brandName', type: 'String'}, 20 {name: 'brandName', type: 'String'},
21 {name: 'isPayDelivery', type: 'Number'}, 21 {name: 'isPayDelivery', type: 'Number'},
  22 + {name: 'checkStatus', type: 'Number'},
22 {name: 'page', type: 'Number'}, 23 {name: 'page', type: 'Number'},
23 {name: 'size', type: 'Number'}, 24 {name: 'size', type: 'Number'},
24 ], 25 ],
  26 +}, {
  27 + // 开启 & 关闭 货到付款
  28 + route: '/payDelivery/addPayDeliveryCheck',
  29 + method: 'POST',
  30 + url: '/payDelivery/addPayDeliveryCheck',
  31 + params: [
  32 + {name: 'isPayDelivery', type: 'Number'},
  33 + {name: 'brandName', type: 'String'},
  34 + {name: 'brandId', type: 'Number'},
  35 + ],
  36 +},{
  37 + // 通过 & 驳回申请
  38 + route: '/payDelivery/reviewPayDeliveryCheck',
  39 + method: 'POST',
  40 + url: '/payDelivery/reviewPayDeliveryCheck',
  41 + params: [
  42 + {name: 'brandName', type: 'String'},
  43 + {name: 'brandId', type: 'Number'},
  44 + {name: 'rejectReason', type: 'String'},
  45 + {name: 'isPayDelivery', type: 'Number'},
  46 + {name: 'checktatus', type: 'Number'},
  47 + {name: 'id', type: 'Number'},
  48 +
  49 + ],
25 }, 50 },
  51 + // 获取tab上的数量
  52 + {
  53 + route: '/payDelivery/queryCountBrandPayDelivery',
  54 + method: 'POST',
  55 + url: '/payDelivery/queryCountBrandPayDelivery',
  56 + params: [
  57 + {name: 'brandId', type: 'Number'},
  58 + {name: 'isPayDelivery', type: 'Number'},
  59 + ],
  60 + },
26 // ====================== 单品货到付款限制页面路由 =================== 61 // ====================== 单品货到付款限制页面路由 ===================
27 { 62 {
28 route: '/goods/cod/goods/index', 63 route: '/goods/cod/goods/index',
@@ -34,10 +69,11 @@ exports.res = [{ @@ -34,10 +69,11 @@ exports.res = [{
34 method: 'POST', 69 method: 'POST',
35 url: '/payDelivery/queryPayDeliveryList', 70 url: '/payDelivery/queryPayDeliveryList',
36 params: [ 71 params: [
37 - {name: 'id', type: 'Number'}, 72 + {name: 'brandId', type: 'Number'},
38 {name: 'brandName', type: 'String'}, 73 {name: 'brandName', type: 'String'},
39 {name: 'isPayDelivery', type: 'Number'}, 74 {name: 'isPayDelivery', type: 'Number'},
40 {name: 'status', type:'Number'}, 75 {name: 'status', type:'Number'},
  76 + {name: 'productSkn', type:'Number'},
41 {name: 'page', type: 'Number'}, 77 {name: 'page', type: 'Number'},
42 {name: 'size', type: 'Number'}, 78 {name: 'size', type: 'Number'},
43 ], 79 ],
@@ -71,6 +107,7 @@ exports.res = [{ @@ -71,6 +107,7 @@ exports.res = [{
71 {name: 'productSkn', type: 'String'}, 107 {name: 'productSkn', type: 'String'},
72 {name: 'brandName', type: 'String'}, 108 {name: 'brandName', type: 'String'},
73 {name: 'brandId', type: 'Number'}, 109 {name: 'brandId', type: 'Number'},
  110 + {name: 'id', type: 'Number'},
74 ], 111 ],
75 },{ 112 },{
76 // 驳回申请 113 // 驳回申请
@@ -82,6 +119,7 @@ exports.res = [{ @@ -82,6 +119,7 @@ exports.res = [{
82 {name: 'brandName', type: 'String'}, 119 {name: 'brandName', type: 'String'},
83 {name: 'rejectReason', type: 'String'}, 120 {name: 'rejectReason', type: 'String'},
84 {name: 'brandId', type: 'Number'}, 121 {name: 'brandId', type: 'Number'},
  122 + {name: 'id', type: 'Number'},
85 ], 123 ],
86 }, 124 },
87 // 获取skn列表 125 // 获取skn列表
@@ -92,6 +130,16 @@ exports.res = [{ @@ -92,6 +130,16 @@ exports.res = [{
92 params: [ 130 params: [
93 {name: 'idName', type: 'String'} 131 {name: 'idName', type: 'String'}
94 ], 132 ],
  133 + }, // 获取tab上的数量
  134 + {
  135 + route: '/payDelivery/queryCountProductPayDelivery',
  136 + method: 'POST',
  137 + url: '/payDelivery/queryCountProductPayDelivery',
  138 + params: [
  139 + {name: 'productSkn', type: 'String'},
  140 + {name: 'brandId', type: 'Number'},
  141 + {name: 'isPayDelivery', type: 'Number'},
  142 + ],
95 }, { // 获取品牌列表 143 }, { // 获取品牌列表
96 route: '/payDelivery/queryPayDeliveryBrandName', 144 route: '/payDelivery/queryPayDeliveryBrandName',
97 method: 'POST', 145 method: 'POST',
@@ -99,7 +147,12 @@ exports.res = [{ @@ -99,7 +147,12 @@ exports.res = [{
99 params: [ 147 params: [
100 {name: 'idName', type: 'String'} 148 {name: 'idName', type: 'String'}
101 ], 149 ],
102 - }, 150 + }, { // 批量导入
  151 + route: '/goods/cod/upload',
  152 + method: 'GET',
  153 + view: 'pages/goods/cod-upload',
  154 + src: '/goods/cod-upload',
  155 + }
103 156
104 157
105 ]; 158 ];
@@ -34,14 +34,14 @@ @@ -34,14 +34,14 @@
34 <div class="panel-col"> 34 <div class="panel-col">
35 <select id="isPayDelivery" class="form-control"> 35 <select id="isPayDelivery" class="form-control">
36 <option value="-1">状态</option> 36 <option value="-1">状态</option>
37 - <option value="Y">开启</option>  
38 - <option value="N">关闭</option> 37 + <option value="1">开启</option>
  38 + <option value="0">关闭</option>
39 </select> 39 </select>
40 </div> 40 </div>
41 41
42 <div class="panel-col"> 42 <div class="panel-col">
43 <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a> 43 <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
44 - <a id="all-btn" href="" class="btn btn-info">导出</a> 44 + <a id="export-btn" href="" class="btn btn-info">导出</a>
45 </div> 45 </div>
46 46
47 </div> 47 </div>
@@ -57,7 +57,8 @@ @@ -57,7 +57,8 @@
57 <script type="text/template" id="template"> 57 <script type="text/template" id="template">
58 <div class="rows" style="height: 100px;"> 58 <div class="rows" style="height: 100px;">
59 <div class="form-group"> 59 <div class="form-group">
60 - <span class="col-sm-2 control-label">驳回原因:</span> 60 + <p>您确定要驳回申请吗?</p>
  61 + <span class="col-sm-2 control-label" style="color:red;">* 驳回原因:</span>
61 <div class="col-sm-8"> 62 <div class="col-sm-8">
62 <textarea id="reason" class="form-control" rows="3" ></textarea> 63 <textarea id="reason" class="form-control" rows="3" ></textarea>
63 </div> 64 </div>
@@ -48,9 +48,11 @@ @@ -48,9 +48,11 @@
48 </div> 48 </div>
49 49
50 50
51 - <div class="panel-col"> 51 + <div class="panel-col-3">
52 <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a> 52 <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
53 - <a id="all-btn" href="" class="btn btn-info">导出</a> 53 + <a id="export-btn" href="" class="btn btn-info">导出</a>
  54 + <a id="btn-input" href="/goods/cod/upload" class="btn btn-info">批量导入</a>
  55 +
54 </div> 56 </div>
55 57
56 58
  1 +<div class="pageheader">
  2 + <div class="media">
  3 + <div class="pageicon pull-left">
  4 + <i class="fa fa-th-list"></i>
  5 + </div>
  6 + <div class="media-body">
  7 + <ul class="breadcrumb">
  8 + <li><a href=""><i class="glyphicon glyphicon-home"></i></a></li>
  9 + <li><a href="">商品管理</a></li>
  10 + <li>货到付款限制</li>
  11 + </ul>
  12 +
  13 + <div>
  14 + <div style="width: 30%;float: left;">
  15 + <h4>批量导入</h4>
  16 + </div>
  17 + </div>
  18 + </div>
  19 + </div>
  20 +</div>
  21 +
  22 +<div class="contentpanel">
  23 + <div class="panel panel-default" style="margin-bottom:10px;">
  24 + <div class="panel-body">
  25 + <table class="table table-bordered">
  26 + <tr>
  27 + <td rowspan="2">单品设置</td>
  28 + <td>上传EXCEL:</td>
  29 + <td style="position: relative;"><input id="sort-file" name="file" data-type="searchSort" type="file" style="cursor: pointer; height: 37px; top: 8px;">
  30 +
  31 + <!--<p style="background: darkgray; text-align: center;">选择文件</p>-->
  32 +
  33 + </td>
  34 + </tr>
  35 + <tr>
  36 + <td>说明:</td>
  37 + <td colspan="2">
  38 + 1、上传文件必须是<span style="color:red;">.xlsx</span>文件<br>
  39 + 2、Excel表头为:<span style="color: #67D267;">SKN、操作(关闭:0;开启:1)</span><br>
  40 + 3、第一行为表头内容,第二行开始为正式内容<br>
  41 + 4、每个文件控制在2500行以内<br>
  42 + 5、<a href="{{domain}}/common/payDelivery.xlsx">下载样例</a>
  43 + </td>
  44 + </tr>
  45 + </table>
  46 + </div>
  47 + </div>
  48 +</div>