Authored by 周奇琪

Merge branch 'develop' of git.dev.yoho.cn:platform/yohobuy-portal-fe into develop

... ... @@ -3,6 +3,7 @@ var util={
__ajax:function(options,callback,notip){
if(typeof options.data=="string"){
util.__tip(options.data,"warning");
return false;
}else{
$.ajax({
type: 'POST',
... ... @@ -13,11 +14,11 @@ var util={
success: function(res) {
res=res.data;
if (("" + res.code) === "200") {
notip?callback.bind(this,res)():util.__tip(res.message,"success",callback.bind(this,res));
return true;
} else {
(!notip)&&util.__tip(res.message,"danger");
return false;
}
}
});
... ...
... ... @@ -88,7 +88,7 @@ $('#import-btn').on('click', function() {
$('#basicTable, .bulk-import').toggle();
});
$('.excel-model, #sure-change, .priceTable-wrap').hide();
$(' #sure-change, .priceTable-wrap').hide();
common.edit.ajaxfileupload("#upload-input",{
params:{type:"brandCooperation",__type:"batch-import"},
onStart: function() {
... ...
... ... @@ -103,6 +103,7 @@ $('#basicTable').on('click', '.modify-btn', function() {
}).then(function(res) {
var data = res.data.data;
$(that).data('detail', true).parents('tr')
.after($(common.util.__template($("#template").html(), data)))
.next('.product-detail').find('.skn-value').text(skn);
... ... @@ -116,6 +117,8 @@ $('#basicTable').on('click', '.modify-btn', function() {
$vip1Price = $wrap.find('.vip1-price'),
$submitBtn = $wrap.find('.sure-modify');
$select.val(data.vip_discount_type);
function vipPrice() {
var price = $price.val(),
vipPrice = {
... ...
... ... @@ -2,8 +2,13 @@ var $ = require('jquery');
var edit=require('../common/edit');
var e=new edit("#basicForm");
var type=$("#basicForm").attr("role");
var e=new edit("#basicForm");
var type=$("#basicForm").attr("role");
if (type == 'edit') {
$('#name, #limitTimes, #userUseLimit, #department1, #department2, #limitDateFrom, #limitDateTo, #describe, #UID').prop('disabled', true);
$('input[name="userTypeLimit"]').prop('disabled', true);
}
e.on("render",function(){
... ...
... ... @@ -69,6 +69,7 @@ $('body').on('click', '#videoDialog', function() {
var limitAddForm = new common.edit("#limit-add-form");
limitAddForm.init();
limitAddForm.on("validate", function(){
var param = {
batchNo: $('#batchNo').val()
... ...
... ... @@ -77,8 +77,9 @@ var $ = require('jquery'),
}
return obj;
}
common.util.__ajax({
return common.util.__ajax({
url:url,
async:true,
data:data()
},function(){
g.reload();
... ...
... ... @@ -62,7 +62,8 @@ exports.res = [
bulkImport: true, //批量导入
bottons:'{"edit":true,"columnsHidisFr":true}',
gridurl:'/goods/price/list',
domain: exports.domain
domain: exports.domain,
download: '/common/batchUpdatePrice.xlsx'
}
}, {
//代销变价 -> 列表数据
... ... @@ -167,7 +168,9 @@ exports.res = [
},
bulkImport: true,
bottons:'{"edit":true,"columnsHidisFr":true}',
gridurl:'/goods/brandCooperation/list'
gridurl:'/goods/brandCooperation/list',
domain: exports.domain,
download: '/common/brandCooperation.xlsx'
}
}, {
//品牌合作模式 -> 列表数据
... ...
exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://172.16.6.240:8088/platform';
//exports.domain = 'http://172.16.6.162:8088/platform';
//营销管理路由配置
... ... @@ -266,7 +267,7 @@ exports.res = [
{name:"limitDateTo",type:"String"},
{name:"describe",type:"String"},
{name:"userUseLimit",type:"Number"},
{name:"userTypeLimit",type:"Number"},
{name:"userTypeLimit",type:"String"},
{name:"limitSkn",type:"String"},
{name:"creatorName",type:"String"},
{name:"creatorId",type:"Number"},
... ... @@ -330,12 +331,13 @@ exports.res = [
{name:"limitDateTo",type:"String"},
{name:"describe",type:"String"},
{name:"userUseLimit",type:"Number"},
{name:"userTypeLimit",type:"Number"},
{name:"userTypeLimit",type:"String"},
{name:"limitSkn",type:"String"},
{name:"creatorName",type:"String"},
{name:"creatorId",type:"Number"},
{name:"status",type:"Number"},
{name:"id",type:"Number"}
{name:"id",type:"Number"},
{name:"batchNo",type:"Number"}
]
},
{
... ...
... ... @@ -168,7 +168,7 @@
<div class="import-hd">
<label>选择文件</label>
<input id="upload-input" name="file" class="btn btn-default" type="file">
<a class="excel-model" href="{{domain}}/common/batchUpdatePrice.xlsx">表头下载</a>
<a class="excel-model" href="{{domain}}{{download}}">表头下载</a>
<input id="sure-change" class="btn btn-primary" type="button" value="确定变价">
</div>
... ...
... ... @@ -141,7 +141,7 @@
</label>
</div>
<div class="col-sm-2">
<input type="text" class="form-control" placeholder="UID">
<input type="text" class="form-control" id="UID" placeholder="UID">
</div>
<input type="hidden" value="{{userTypeLimit}}" id="userTypeLimit" for="checkbox" required placeholder="会员身份">
... ... @@ -226,6 +226,7 @@
<input type="hidden" value="{{status}}" id="status" >
<input type="hidden" value="{{id}}" id="id" >
<input type="hidden" value="{{batchNo}}" id="batchNo" >
{{/ data}}
<div class="form-group">
... ...
... ... @@ -118,7 +118,7 @@
<script type="text/template" id="template-endtime">
<div class="form-group">
<label for="endtime" class="col-sm-2 control-label"><i class="red">*</i> 结束时间</label>
<label for="endTime" class="col-sm-2 control-label"><i class="red">*</i> 结束时间</label>
<div class="col-sm-10">
<input type="text" id="endTime" class="form-control panel-input hasDatepicker" jsaction="time:start:startTime" name="start_time" placeholder="结束时间" value="{endTime}">
</div>
... ...