Authored by weiqingting

4.5

... ... @@ -83,7 +83,7 @@ function __ajaxExeclById(unquid){
var params={param:unquid};
common.util.__ajax({
url:'/ajax/queryBatchImportResult',
url:'/product/queryBatchImportResult',
data:params
},function(res){
if(res.data.length){
... ...
... ... @@ -83,7 +83,9 @@ var g = new common.grid({
productStatusStr: t.value,
tab: $('#basicTab').find('.active').index(),
isInfoMiss: t.isInfoMiss,
sortFlag: t.sortFlag
sortFlag: t.sortFlag,
skcOnsaleStatus:common.util.__input("skcOnsaleStatus"),
isAdvance:common.util.__input("isAdvance")
};
},
columns: [{
... ... @@ -365,11 +367,11 @@ function shelveModal(title, html) {
content: html
});
if (len === 1 && g.selected[0].isAdvance === 'N') {
$('#advanceBeginTime, #advanceEndTime').prop('disabled', true);
$('#advanceBeginTime').parents('.form-group').find('.btn').addClass('disabled');
}
var e = new common.edit('.shelve-form');
e.init();
... ... @@ -377,13 +379,26 @@ function shelveModal(title, html) {
var type = $(this).data('type');
$(this).closest('.form-group').find('input').attr('required', true)
.end().siblings('.form-group').find('input').attr('required', false);
e.submit('/product/updateProductSknTimingInfo', function(option) {
option.data.productSknList = JSON.stringify(productSknList);
option.data.type = type;
option.success = function(res) {
if (res.data.code == 200) {
e.$tip(res.data.message, function() {
var data={};
data.productSknList = JSON.stringify(productSknList);
if($("#shelveTime").val()){
if(type=="1"){
data.shelveTime=$("#shelveTime").val();
data.type=3;
}else{
data.onNewTime=$("#shelveTime").val();
data.type=4;
}
}else{
data.type=type;
}
common.util.__ajax({
url:'/product/updateProductSknTimingInfo',
data:data
},function(res){
if (res.code == 200) {
e.$tip(res.message, function() {
shelveLayer.close();
loadtab();
g.reload();
... ... @@ -391,13 +406,12 @@ function shelveModal(title, html) {
} else {
//e.$tip(res.data.message);
var html = '';
$.each(res.data.data, function(key, value) {
$.each(res.data, function(key, value) {
html += key + ':' + value + '<br>';
});
e.$tip(html);
}
}
});
});
});
}
//批量skn上架
... ... @@ -548,7 +562,9 @@ $(document).on("click", ".btnsku", function() {
$(document).on("change", ".wqt_checkbox,.wqt_all", function() {
var _count1 = 0,
_count2 = 0;
_count2 = 0,
_isAdvance0=0,
_isAdvance1=0;
$.each(g.selected, function(index, item) {
/*添加兼容逻辑*/
if (item.status == 8 || item.status == 3 || item.status == 2 || item.status == 0) {
... ... @@ -556,7 +572,17 @@ $(document).on("change", ".wqt_checkbox,.wqt_all", function() {
} else {
_count2++; //下
}
if(item.isAdvance=="N"){
_isAdvance0++;
}
if(item.isAdvance=="Y"){
_isAdvance1++;
}
});
if(_isAdvance0&&_isAdvance1){
return;
}
if (_count1 == g.selected.length) {
$('#onshelve').removeClass('disabled');
... ...
... ... @@ -37,7 +37,7 @@ GOLABDATA.on("LYproductDesc", function () {
$(document).on("click", "#btn-descriptioner", function () {
$('#productDesc').val(UMdescriptioner.getContent());
descriptionEdit.submit('/netSale/saveProductDesc', function (option) {
descriptionEdit.submit('/product/saveProductDesc', function (option) {
option.data = GOLABDATA.fire('LYproductDesc');
option.success = function (res) {
res = res.data;
... ... @@ -100,7 +100,7 @@ GOLABDATA.on("LYrecommend", function () {
$(document).on("click", "#btn-recommand", function () {
recommendEdit.submit('/netSale/saveNetSaleRecommend', function (option) {
recommendEdit.submit('/product/saveNetSaleRecommend', function (option) {
option.data = GOLABDATA.fire('LYrecommend');
option.success = function (res) {
res = res.data;
... ... @@ -169,7 +169,7 @@ var g = new common.grid({
}]
});
g.init('/netSale/selectCollocationListBySkn');
g.init('/collocation/selectCollocationListBySkn');
var Bll = {
posData: [],
... ... @@ -255,7 +255,7 @@ $(document).on("change", ".poseditimg .pos-text", function () {
//添加
$(document).on("click", "#dapeiadd", function () {
Bll.toast("添加搭配", {}, "/netSale/insertCollocation");
Bll.toast("添加搭配", {}, "/collocation/insertCollocation");
return false;
});
//保存
... ... @@ -266,7 +266,7 @@ $(document).on("click", "#dapeisave", function () {
$(document).on("click", "#dapeiTable .delete", function () {
var item = g.rows[$(this).data("index")];
common.util.__ajax({
url: '/netSale/delCollocationById',
url: '/collocation/delCollocationById',
data: {
param: item.id
}
... ... @@ -278,12 +278,12 @@ $(document).on("click", "#dapeiTable .delete", function () {
$(document).on("click", "#dapeiTable .edit", function () {
var item = g.rows[$(this).data("index")];
common.util.__ajax({
url: '/netSale/selectCollocationById',
url: '/collocation/selectCollocationById',
data: {
param: item.id
}
}, function (data) {
Bll.toast("添加搭配", data.data, "/netSale/updateCollocation");
Bll.toast("添加搭配", data.data, "/collocation/updateCollocation");
});
// item.infoStr=[{"top":223,"left":380,"id":"ffffff"},{"top":454,"left":309,"id":"ggggg"}];
// Bll.toast("添加搭配",item,"/netSale/updateCollocation");
... ... @@ -457,7 +457,7 @@ $(document).on("click", "#fenMainSave", function () {
return false;
}
common.util.__ajax({
url: '/netSale/manageProductImg',
url: '/product/manageProductImg',
data: data
});
return false;
... ...
exports.domain = require('../config/common.js').domain;
// exports.domain = "http://172.16.6.227:8088/platform";
exports.res = [{ //基础商品列表
route: '/supplier/baseproduct/index',
route: '/product/base/index',
method: 'GET',
view: 'pages/basegoods/index',
src: '/basegoods/index',
... ... @@ -12,7 +12,7 @@ exports.res = [{ //基础商品列表
{
// 列表头部各个审核状态的数量
route: '/base/goods/ajax/auditCount',
route: '/product/getbaseProductCountByStatus',
method: 'POST',
url: '/product/getbaseProductCountByStatus',
params: [{
... ... @@ -85,7 +85,7 @@ exports.res = [{ //基础商品列表
},
{ //ajax列表数据
route: '/base/goods/ajax/index',
route: '/product/getBaseProductList',
method: 'POST',
url: '/product/getBaseProductList',
params: [
... ... @@ -447,7 +447,7 @@ exports.res = [{ //基础商品列表
},
{
// 获取商品详情数据
route: '/base/goods/getData',
route: '/product/getBaseProduct',
method: 'POST',
url: '/product/getBaseProduct',
params: [{
... ... @@ -555,7 +555,7 @@ exports.res = [{ //基础商品列表
domain: exports.domain
}
}, {
route: '/goods/base/checkSkuBarCodeExist',
route: '/product/checkSkuBarCodeExist',
method: 'POST',
url: '/product/checkSkuBarCodeExist',
params: [{
... ... @@ -563,7 +563,7 @@ exports.res = [{ //基础商品列表
type: "String"
}]
}, {
route:'/ajax/queryBatchImportResult',
route:'/product/queryBatchImportResult',
method:'POST',
url:'/product/queryBatchImportResult',
params:[
... ...
... ... @@ -88,6 +88,12 @@ exports.res = [{
}, {
name: 'descFlag',
type: 'string'
},{
name:'isAdvance',
type:'string'
},{
name:'skcOnsaleStatus',
type:'string'
}]
}, {
//网销信息 -> tab页
... ... @@ -142,6 +148,12 @@ exports.res = [{
}, {
name: 'productStatus',
type: 'number'
},{
name:'isAdvance',
type:'string'
},{
name:'skcOnsaleStatus',
type:'string'
}]
}, {
... ... @@ -346,12 +358,6 @@ exports.res = [{
}, {
name: 'productMaterial',
type: 'string'
},{
name:'isAdvance',
type:'string'
},{
name:'skcOnsaleStatus',
type:'string'
}]
}, {
//网销信息 -> 保存基本信息接口
... ...
... ... @@ -69,21 +69,21 @@
<option value="3">通用</option>
</select>
</div>
<!-- <div class="panel-col">
<select name="maxSortId" id="maxSortId" tabindex="-1" title="" class="form-control height40">
<option value="-1">请选择一级类目</option>
<div class="panel-col">
<select name="gender" id="skcOnsaleStatus" class="form-control height40">
<option value="-1">SKC是否上架</option>
<option value="1"></option>
<option value="0"></option>
</select>
</div>
<div class="panel-col">
<select name="middleSortId" id="middleSortId" tabindex="-1" title="" class="form-control height40">
<option value="-1">请选择二级类目</option>
<select name="gender" id="isAdvance" class="form-control height40">
<option value="-1">是否预售</option>
<option value="Y"></option>
<option value="N"></option>
</select>
</div>
<div class="panel-col">
<select name="smallSortId" id="smallSortId" tabindex="-1" title="" class="form-control height40">
<option value="-1">请选择三级类目</option>
</select>
</div> -->
<div class="panel-col2">
<div id="sortTree"></div>
</div>
... ... @@ -154,22 +154,19 @@
<input type="hidden" id="gridurl" value="{{gridurl}}">
<input type="hidden" id="shopId" value="{{auth.shopId}}">
<script type="text/template" id="onshelve-template">
<form class="shelve-form form-horizontal form-bordered">
<form class="shelve-form form-horizontal ">
<div class="panel panel-default">
<div class="panel-body nopadding">
<div class="form-group">
<a class="btn btn-info" data-type="2" href="javascript:;">上架上新</a>
<a class="btn btn-info" data-type="1" href="javascript:;">上架不上新</a>
</div>
<div class="form-group">
<div class="col-sm-3 height40">预上架时间:</div>
<div class="col-sm-6"><input id="shelveTime" class="form-control" jsaction="time" type="text" placeholder="预上架时间" readonly></div>
<div class="col-sm-1"><a class="btn btn-info" data-type="3" href="javascript:;">确定</a></div>
<div class="col-sm-6"><input id="shelveTime" class="form-control" jsaction="time" type="text" placeholder="预上架时间" readonly>
<span class="red">预商家请填写时间</span>
</div>
</div>
<div class="form-group">
<div class="col-sm-3 height40">预上架上新时间:</div>
<div class="col-sm-6"><input id="onNewTime" class="form-control" jsaction="time" type="text" placeholder="预上架上新时间" readonly></div>
<div class="col-sm-1"><a class="btn btn-info" data-type="4" href="javascript:;">确定</a></div>
<a class="btn btn-info" data-type="2" href="javascript:;">上架上新</a>
<a class="btn btn-info" data-type="1" href="javascript:;">上架不上新</a>
</div>
<div class="form-group">
<div class="col-sm-2 height40">预售时间:</div>
... ... @@ -183,7 +180,7 @@
</script>
<script type="text/template" id="offshelve-template">
<form class="shelve-form form-horizontal form-bordered">
<form class="shelve-form form-horizontal">
<div class="panel panel-default">
<div class="panel-body nopadding">
<div class="form-group">
... ...