Merge branch 'develop' of http://git.dev.yoho.cn/platform/yohobuy-portal-fe into develop
Showing
10 changed files
with
30 additions
and
13 deletions
@@ -3,6 +3,7 @@ var util={ | @@ -3,6 +3,7 @@ var util={ | ||
3 | __ajax:function(options,callback,notip){ | 3 | __ajax:function(options,callback,notip){ |
4 | if(typeof options.data=="string"){ | 4 | if(typeof options.data=="string"){ |
5 | util.__tip(options.data,"warning"); | 5 | util.__tip(options.data,"warning"); |
6 | + return false; | ||
6 | }else{ | 7 | }else{ |
7 | $.ajax({ | 8 | $.ajax({ |
8 | type: 'POST', | 9 | type: 'POST', |
@@ -13,11 +14,11 @@ var util={ | @@ -13,11 +14,11 @@ var util={ | ||
13 | success: function(res) { | 14 | success: function(res) { |
14 | res=res.data; | 15 | res=res.data; |
15 | if (("" + res.code) === "200") { | 16 | if (("" + res.code) === "200") { |
16 | - | ||
17 | notip?callback.bind(this,res)():util.__tip(res.message,"success",callback.bind(this,res)); | 17 | notip?callback.bind(this,res)():util.__tip(res.message,"success",callback.bind(this,res)); |
18 | + return true; | ||
18 | } else { | 19 | } else { |
19 | - | ||
20 | (!notip)&&util.__tip(res.message,"danger"); | 20 | (!notip)&&util.__tip(res.message,"danger"); |
21 | + return false; | ||
21 | } | 22 | } |
22 | } | 23 | } |
23 | }); | 24 | }); |
@@ -88,7 +88,7 @@ $('#import-btn').on('click', function() { | @@ -88,7 +88,7 @@ $('#import-btn').on('click', function() { | ||
88 | $('#basicTable, .bulk-import').toggle(); | 88 | $('#basicTable, .bulk-import').toggle(); |
89 | }); | 89 | }); |
90 | 90 | ||
91 | -$('.excel-model, #sure-change, .priceTable-wrap').hide(); | 91 | +$(' #sure-change, .priceTable-wrap').hide(); |
92 | common.edit.ajaxfileupload("#upload-input",{ | 92 | common.edit.ajaxfileupload("#upload-input",{ |
93 | params:{type:"brandCooperation",__type:"batch-import"}, | 93 | params:{type:"brandCooperation",__type:"batch-import"}, |
94 | onStart: function() { | 94 | onStart: function() { |
@@ -103,6 +103,7 @@ $('#basicTable').on('click', '.modify-btn', function() { | @@ -103,6 +103,7 @@ $('#basicTable').on('click', '.modify-btn', function() { | ||
103 | }).then(function(res) { | 103 | }).then(function(res) { |
104 | var data = res.data.data; | 104 | var data = res.data.data; |
105 | 105 | ||
106 | + | ||
106 | $(that).data('detail', true).parents('tr') | 107 | $(that).data('detail', true).parents('tr') |
107 | .after($(common.util.__template($("#template").html(), data))) | 108 | .after($(common.util.__template($("#template").html(), data))) |
108 | .next('.product-detail').find('.skn-value').text(skn); | 109 | .next('.product-detail').find('.skn-value').text(skn); |
@@ -116,6 +117,8 @@ $('#basicTable').on('click', '.modify-btn', function() { | @@ -116,6 +117,8 @@ $('#basicTable').on('click', '.modify-btn', function() { | ||
116 | $vip1Price = $wrap.find('.vip1-price'), | 117 | $vip1Price = $wrap.find('.vip1-price'), |
117 | $submitBtn = $wrap.find('.sure-modify'); | 118 | $submitBtn = $wrap.find('.sure-modify'); |
118 | 119 | ||
120 | + $select.val(data.vip_discount_type); | ||
121 | + | ||
119 | function vipPrice() { | 122 | function vipPrice() { |
120 | var price = $price.val(), | 123 | var price = $price.val(), |
121 | vipPrice = { | 124 | vipPrice = { |
@@ -2,8 +2,13 @@ var $ = require('jquery'); | @@ -2,8 +2,13 @@ var $ = require('jquery'); | ||
2 | var edit=require('../common/edit'); | 2 | var edit=require('../common/edit'); |
3 | 3 | ||
4 | 4 | ||
5 | - var e=new edit("#basicForm"); | ||
6 | - var type=$("#basicForm").attr("role"); | 5 | +var e=new edit("#basicForm"); |
6 | +var type=$("#basicForm").attr("role"); | ||
7 | + | ||
8 | +if (type == 'edit') { | ||
9 | + $('#name, #limitTimes, #userUseLimit, #department1, #department2, #limitDateFrom, #limitDateTo, #describe, #UID').prop('disabled', true); | ||
10 | + $('input[name="userTypeLimit"]').prop('disabled', true); | ||
11 | +} | ||
7 | 12 | ||
8 | 13 | ||
9 | e.on("render",function(){ | 14 | e.on("render",function(){ |
@@ -69,6 +69,7 @@ $('body').on('click', '#videoDialog', function() { | @@ -69,6 +69,7 @@ $('body').on('click', '#videoDialog', function() { | ||
69 | var limitAddForm = new common.edit("#limit-add-form"); | 69 | var limitAddForm = new common.edit("#limit-add-form"); |
70 | limitAddForm.init(); | 70 | limitAddForm.init(); |
71 | 71 | ||
72 | + | ||
72 | limitAddForm.on("validate", function(){ | 73 | limitAddForm.on("validate", function(){ |
73 | var param = { | 74 | var param = { |
74 | batchNo: $('#batchNo').val() | 75 | batchNo: $('#batchNo').val() |
@@ -77,8 +77,9 @@ var $ = require('jquery'), | @@ -77,8 +77,9 @@ var $ = require('jquery'), | ||
77 | } | 77 | } |
78 | return obj; | 78 | return obj; |
79 | } | 79 | } |
80 | - common.util.__ajax({ | 80 | + return common.util.__ajax({ |
81 | url:url, | 81 | url:url, |
82 | + async:true, | ||
82 | data:data() | 83 | data:data() |
83 | },function(){ | 84 | },function(){ |
84 | g.reload(); | 85 | g.reload(); |
@@ -62,7 +62,8 @@ exports.res = [ | @@ -62,7 +62,8 @@ exports.res = [ | ||
62 | bulkImport: true, //批量导入 | 62 | bulkImport: true, //批量导入 |
63 | bottons:'{"edit":true,"columnsHidisFr":true}', | 63 | bottons:'{"edit":true,"columnsHidisFr":true}', |
64 | gridurl:'/goods/price/list', | 64 | gridurl:'/goods/price/list', |
65 | - domain: exports.domain | 65 | + domain: exports.domain, |
66 | + download: '/common/batchUpdatePrice.xlsx' | ||
66 | } | 67 | } |
67 | }, { | 68 | }, { |
68 | //代销变价 -> 列表数据 | 69 | //代销变价 -> 列表数据 |
@@ -167,7 +168,9 @@ exports.res = [ | @@ -167,7 +168,9 @@ exports.res = [ | ||
167 | }, | 168 | }, |
168 | bulkImport: true, | 169 | bulkImport: true, |
169 | bottons:'{"edit":true,"columnsHidisFr":true}', | 170 | bottons:'{"edit":true,"columnsHidisFr":true}', |
170 | - gridurl:'/goods/brandCooperation/list' | 171 | + gridurl:'/goods/brandCooperation/list', |
172 | + domain: exports.domain, | ||
173 | + download: '/common/brandCooperation.xlsx' | ||
171 | } | 174 | } |
172 | }, { | 175 | }, { |
173 | //品牌合作模式 -> 列表数据 | 176 | //品牌合作模式 -> 列表数据 |
1 | exports.domain = require('../config/common.js').domain; | 1 | exports.domain = require('../config/common.js').domain; |
2 | +//exports.domain = 'http://172.16.6.240:8088/platform'; | ||
2 | //exports.domain = 'http://172.16.6.162:8088/platform'; | 3 | //exports.domain = 'http://172.16.6.162:8088/platform'; |
3 | 4 | ||
4 | //营销管理路由配置 | 5 | //营销管理路由配置 |
@@ -266,7 +267,7 @@ exports.res = [ | @@ -266,7 +267,7 @@ exports.res = [ | ||
266 | {name:"limitDateTo",type:"String"}, | 267 | {name:"limitDateTo",type:"String"}, |
267 | {name:"describe",type:"String"}, | 268 | {name:"describe",type:"String"}, |
268 | {name:"userUseLimit",type:"Number"}, | 269 | {name:"userUseLimit",type:"Number"}, |
269 | - {name:"userTypeLimit",type:"Number"}, | 270 | + {name:"userTypeLimit",type:"String"}, |
270 | {name:"limitSkn",type:"String"}, | 271 | {name:"limitSkn",type:"String"}, |
271 | {name:"creatorName",type:"String"}, | 272 | {name:"creatorName",type:"String"}, |
272 | {name:"creatorId",type:"Number"}, | 273 | {name:"creatorId",type:"Number"}, |
@@ -330,12 +331,13 @@ exports.res = [ | @@ -330,12 +331,13 @@ exports.res = [ | ||
330 | {name:"limitDateTo",type:"String"}, | 331 | {name:"limitDateTo",type:"String"}, |
331 | {name:"describe",type:"String"}, | 332 | {name:"describe",type:"String"}, |
332 | {name:"userUseLimit",type:"Number"}, | 333 | {name:"userUseLimit",type:"Number"}, |
333 | - {name:"userTypeLimit",type:"Number"}, | 334 | + {name:"userTypeLimit",type:"String"}, |
334 | {name:"limitSkn",type:"String"}, | 335 | {name:"limitSkn",type:"String"}, |
335 | {name:"creatorName",type:"String"}, | 336 | {name:"creatorName",type:"String"}, |
336 | {name:"creatorId",type:"Number"}, | 337 | {name:"creatorId",type:"Number"}, |
337 | {name:"status",type:"Number"}, | 338 | {name:"status",type:"Number"}, |
338 | - {name:"id",type:"Number"} | 339 | + {name:"id",type:"Number"}, |
340 | + {name:"batchNo",type:"Number"} | ||
339 | ] | 341 | ] |
340 | }, | 342 | }, |
341 | { | 343 | { |
@@ -168,7 +168,7 @@ | @@ -168,7 +168,7 @@ | ||
168 | <div class="import-hd"> | 168 | <div class="import-hd"> |
169 | <label>选择文件</label> | 169 | <label>选择文件</label> |
170 | <input id="upload-input" name="file" class="btn btn-default" type="file"> | 170 | <input id="upload-input" name="file" class="btn btn-default" type="file"> |
171 | - <a class="excel-model" href="{{domain}}/common/batchUpdatePrice.xlsx">表头下载</a> | 171 | + <a class="excel-model" href="{{domain}}{{download}}">表头下载</a> |
172 | <input id="sure-change" class="btn btn-primary" type="button" value="确定变价"> | 172 | <input id="sure-change" class="btn btn-primary" type="button" value="确定变价"> |
173 | 173 | ||
174 | </div> | 174 | </div> |
@@ -141,7 +141,7 @@ | @@ -141,7 +141,7 @@ | ||
141 | </label> | 141 | </label> |
142 | </div> | 142 | </div> |
143 | <div class="col-sm-2"> | 143 | <div class="col-sm-2"> |
144 | - <input type="text" class="form-control" placeholder="UID"> | 144 | + <input type="text" class="form-control" id="UID" placeholder="UID"> |
145 | </div> | 145 | </div> |
146 | 146 | ||
147 | <input type="hidden" value="{{userTypeLimit}}" id="userTypeLimit" for="checkbox" required placeholder="会员身份"> | 147 | <input type="hidden" value="{{userTypeLimit}}" id="userTypeLimit" for="checkbox" required placeholder="会员身份"> |
@@ -226,6 +226,7 @@ | @@ -226,6 +226,7 @@ | ||
226 | 226 | ||
227 | <input type="hidden" value="{{status}}" id="status" > | 227 | <input type="hidden" value="{{status}}" id="status" > |
228 | <input type="hidden" value="{{id}}" id="id" > | 228 | <input type="hidden" value="{{id}}" id="id" > |
229 | + <input type="hidden" value="{{batchNo}}" id="batchNo" > | ||
229 | {{/ data}} | 230 | {{/ data}} |
230 | 231 | ||
231 | <div class="form-group"> | 232 | <div class="form-group"> |
-
Please register or login to post a comment