1. move import student price 2 list page
2. add student price list page
Showing
5 changed files
with
228 additions
and
8 deletions
@@ -109,14 +109,7 @@ module.exports=function(app) { | @@ -109,14 +109,7 @@ module.exports=function(app) { | ||
109 | } | 109 | } |
110 | }); | 110 | }); |
111 | 111 | ||
112 | - /*批量修改学生价格*/ | ||
113 | - app.get("/supplier/baseproduct/batchUpdateStudentPrice","goods.batchUpdateStudentPrice.Batch",function(){ | ||
114 | - this.$extend={ | ||
115 | - moduleName:"基础商品", | ||
116 | - pageName:"批量修改学生价", | ||
117 | - isPL:true | ||
118 | - } | ||
119 | - }); | 112 | + |
120 | 113 | ||
121 | /*通过任务ID查看任务是否被执行完 学生价变价*/ | 114 | /*通过任务ID查看任务是否被执行完 学生价变价*/ |
122 | app.post("/product/queryBatchImportStudentPriceResult","basegoods_queryBatchUpdateStudentPriceResult"); | 115 | app.post("/product/queryBatchImportStudentPriceResult","basegoods_queryBatchUpdateStudentPriceResult"); |
@@ -20,5 +20,28 @@ module.exports=function(app) { | @@ -20,5 +20,28 @@ module.exports=function(app) { | ||
20 | 20 | ||
21 | /*驳回*/ | 21 | /*驳回*/ |
22 | app.post("/goods/price/reject","price_auditRejectProductPrice"); | 22 | app.post("/goods/price/reject","price_auditRejectProductPrice"); |
23 | + | ||
24 | + | ||
25 | + /*批量修改学生价格*/ | ||
26 | + app.get("/supplier/baseproduct/batchUpdateStudentPrice","goods.batchUpdateStudentPrice.Batch",function(){ | ||
27 | + this.$extend={ | ||
28 | + moduleName:"基础商品", | ||
29 | + pageName:"批量修改学生价", | ||
30 | + isPL:true | ||
31 | + } | ||
32 | + }); | ||
33 | + | ||
34 | + /*学生价格列表页*/ | ||
35 | + app.get("/goods/studentPrice/index","goods.studentPrice.Index",function(){ | ||
36 | + this.$extend={ | ||
37 | + moduleName:"基础商品", | ||
38 | + pageName:"学生价管理", | ||
39 | + isPL:true | ||
40 | + } | ||
41 | + }); | ||
42 | + | ||
43 | + /*学生价列表数据*/ | ||
44 | + app.post("/goods/studentPrice/list","price_queryStudentPriceList"); | ||
45 | + | ||
23 | 46 | ||
24 | } | 47 | } |
@@ -93,6 +93,18 @@ module.exports={ | @@ -93,6 +93,18 @@ module.exports={ | ||
93 | {name: 'cooperateTypeId', type: 'String'}, | 93 | {name: 'cooperateTypeId', type: 'String'}, |
94 | {name: 'brandId', type: 'Number'} | 94 | {name: 'brandId', type: 'Number'} |
95 | ] | 95 | ] |
96 | + }, | ||
97 | + queryStudentPriceList:{ | ||
98 | + title:'学生价管理', | ||
99 | + url:'/product/queryStudentPriceList', | ||
100 | + params: [ | ||
101 | + {name: 'product_skn',type: 'Number'}, | ||
102 | + {name: 'shop_id',type: 'Number'}, | ||
103 | + {name: 'brand_id',type: 'Number'}, | ||
104 | + {name: 'studentPriceValScope',type: 'Number'}, | ||
105 | + {name: 'page', type: 'Number'}, | ||
106 | + {name: 'size', type: 'Number'} | ||
107 | + ] | ||
96 | } | 108 | } |
97 | } | 109 | } |
98 | } | 110 | } |
1 | +<%include '../../../common/views/__ui/header'%> | ||
2 | +<%include '../../../common/views/__partail/ListHeader'%> | ||
3 | + | ||
4 | +<div class="contentpanel"> | ||
5 | + <div class="panel panel-default" id="priceChangeSearch" style="margin-bottom:10px;"> | ||
6 | + <div class="panel-body"> | ||
7 | + <div class="row"> | ||
8 | + <div class="panel-col"> | ||
9 | + <input id="skn" class="form-control panel-input height40" type="text" placeholder="请输入SKN" onkeyup="this.value=this.value.replace(/\D/gi,'')"> | ||
10 | + </div> | ||
11 | + <input type="hidden" id='authority' value="<%auditAuthority.authority%>" /> | ||
12 | + <div class="panel-col"> | ||
13 | + <select name="shop" id="shop" tabindex="-1" title="" class="form-control"> | ||
14 | + <option value="-1">请选择店铺</option> | ||
15 | + </select> | ||
16 | + </div> | ||
17 | + | ||
18 | + <div class="panel-col"> | ||
19 | + <select name="brand" id="brand" tabindex="-1" title="" class="form-control"> | ||
20 | + <option value="-1">请选择品牌</option> | ||
21 | + </select> | ||
22 | + </div> | ||
23 | + | ||
24 | + <div class="panel-col"> | ||
25 | + <select name="supplier" id="supplier" tabindex="-1" title="" class="form-control"> | ||
26 | + <option value="-1">请选择供应商</option> | ||
27 | + </select> | ||
28 | + </div> | ||
29 | + | ||
30 | + <div class="panel-col"> | ||
31 | + <select name="cooperationType" id="cooperationType" tabindex="-1" title="" class="form-control"> | ||
32 | + <option value="3">全部</option> | ||
33 | + <option value="2">有学生价</option> | ||
34 | + <option value="1">无学生价</option> | ||
35 | + </select> | ||
36 | + </div> | ||
37 | + | ||
38 | + <div class="panel-col"> | ||
39 | + <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a> | ||
40 | + </div> | ||
41 | + | ||
42 | + <div class="panel-col" style="margin: 0 0 0 -5px;"> | ||
43 | + | ||
44 | + <a id="import-btn" href="javascript:;" class="btn btn-primary">批量导入</a> | ||
45 | + </div> | ||
46 | + | ||
47 | + | ||
48 | + </div> | ||
49 | + </div> | ||
50 | + </div> | ||
51 | + <div class="panel panel-primary-head"> | ||
52 | + <div class="dataTab_wrapper" id="basicTable"></div> | ||
53 | + </div> | ||
54 | +</div> | ||
55 | +<%include '../../../common/views/__ui/footer'%> |
1 | +'use strict'; | ||
2 | +var $ = require('jquery'), | ||
3 | + common = require('../../../common/common'); | ||
4 | + | ||
5 | +/***********************变价列表***********************/ | ||
6 | + | ||
7 | +new common.dropDown({ | ||
8 | + el: '#shop', | ||
9 | + ajax: 'shopsRest' | ||
10 | +}); | ||
11 | +new common.dropDown({ | ||
12 | + el: '#supplier', | ||
13 | + ajax: 'querySupplier' | ||
14 | +}); | ||
15 | +new common.dropDown({ | ||
16 | + el: '#brand', | ||
17 | + ajax: 'brand', | ||
18 | + params:function(){ | ||
19 | + return {userLimitFlag:true}; | ||
20 | + } | ||
21 | +}); | ||
22 | + | ||
23 | + | ||
24 | +var ENUM = { | ||
25 | + vipType: { | ||
26 | + 1: '正常折扣', | ||
27 | + 2: '统一折扣', | ||
28 | + 3: '无折扣', | ||
29 | + 4: '固定折扣', | ||
30 | + 5: '自定义折扣' | ||
31 | + } | ||
32 | +}; | ||
33 | + | ||
34 | + | ||
35 | + | ||
36 | + | ||
37 | + | ||
38 | + | ||
39 | + | ||
40 | +loadTab(); | ||
41 | + | ||
42 | +// 对float数字进行精度控制,保留小数点后4位 | ||
43 | +// 暂只支持字符串 | ||
44 | +var formatFloat = function(num) { | ||
45 | + var number = parseFloat(num); | ||
46 | + if (isNaN(number)) | ||
47 | + return ""; | ||
48 | + return Math.round(number * 10000) / 10000; | ||
49 | +} | ||
50 | + | ||
51 | + | ||
52 | + | ||
53 | +var g = new common.grid({ | ||
54 | + el: "#basicTable", | ||
55 | + usepagesize:true, | ||
56 | + parms: function() { | ||
57 | + return { | ||
58 | + product_skn: common.util.__input("skn"), | ||
59 | + shop_id: common.util.__input("shop"), | ||
60 | + brand_id: common.util.__input("brand"), | ||
61 | + studentPriceValScope: common.util.__input("studentPriceValScope") | ||
62 | + } | ||
63 | + }, | ||
64 | + columns: [ | ||
65 | + {display: '商品信息', render: function(item) { | ||
66 | + var html = '<p>SKN:'+item.product_skn +'</p><p>名称:' + item.product_name + '</p><p>品牌:' + item.brand_name + '</p>' + | ||
67 | + '<div>类目:'+'<br>'+ item.max_sort_name; | ||
68 | + if(item.middle_sort_name) {html += ' > ' + item.middle_sort_name;} | ||
69 | + if(item.small_sort_name) {html += ' > ' + item.small_sort_name;} | ||
70 | + html += "</div><p>"; | ||
71 | + html += '<p>性别:'+ENUM.gender[item.gender]+'</p>'; | ||
72 | + html += '<p>货品年:'+item.goodsYears+'</p>'; | ||
73 | + html += '<p>货品季:'+ENUM.goodsSeason[item.goodsSeason]+'</p>'; | ||
74 | + return html; | ||
75 | + }}, | ||
76 | + {display: '供应商/店铺', render: function(item) { | ||
77 | + var html = ''; | ||
78 | + if (item.supplier_name) { | ||
79 | + html += item.supplier_name; | ||
80 | + if (item.shop_name) {html += '/';} | ||
81 | + } | ||
82 | + if (item.shop_name) {html += item.shop_name;} | ||
83 | + return html; | ||
84 | + }}, | ||
85 | + {display: '当前售价', render: function(item) { | ||
86 | + var html = '<p>吊牌价:'+item.retail_price +'</p>'; | ||
87 | + html += '<p>销售价:'+item.sales_price +'</p>'; | ||
88 | + if (item.student_price) {html += '<p>学生价:'+item.student_price +'</p>';} | ||
89 | + return html; | ||
90 | + }}, | ||
91 | + {display: 'VIP折扣类型', render: function(item) { | ||
92 | + return ENUM.vipType[item.vip_discount_type]; | ||
93 | + }}, | ||
94 | + {display: '会员价', render: function(item) { | ||
95 | + var html = '<p>VIP价:'; | ||
96 | + if(item.vip_price) html += item.vip_price +'</p>'; | ||
97 | + else html += '</p>'; | ||
98 | + html += '<p>白金:'+'<br>'; | ||
99 | + if(item.vip3_price) html += item.vip3_price +'</p>'; | ||
100 | + else html += '</p>'; | ||
101 | + html += '<p>金卡:'+'<br>'; | ||
102 | + if(item.vip2_price) html += item.vip2_price +'</p>'; | ||
103 | + else html += '</p>'; | ||
104 | + html += '<p>银卡:'+'<br>'; | ||
105 | + if(item.vip1_price) html += item.vip1_price +'</p>'; | ||
106 | + else html += '</p>'; | ||
107 | + return html; | ||
108 | + }} | ||
109 | + ] | ||
110 | +}); | ||
111 | + | ||
112 | +g.init('/goods/studentPrice/list'); | ||
113 | + | ||
114 | + | ||
115 | + | ||
116 | +//筛选 | ||
117 | +$(document).on('click', '#filter-btn', function () { | ||
118 | + g.reload(1); | ||
119 | + loadTab(); | ||
120 | +}); | ||
121 | +//回车筛选 | ||
122 | +$(document).on('keyup', 'body', function (event) { | ||
123 | + if (event.keyCode == 13) { | ||
124 | + $("#filter-btn").trigger('click'); | ||
125 | + } | ||
126 | +}); | ||
127 | +//全部 | ||
128 | +$(document).on('click', '#all-btn', function () { | ||
129 | + location.href = ''; | ||
130 | +}); | ||
131 | + | ||
132 | + | ||
133 | +/***********************批量功能***********************/ | ||
134 | +//批量导入按钮点击事件 | ||
135 | +$(document).on('click', '#import-btn', function () { | ||
136 | + location.href="/supplier/baseproduct/batchUpdateStudentPrice"; | ||
137 | +}); |
-
Please register or login to post a comment