记得上下班打卡 | git大法好,push需谨慎

Commit 91ec63e5 authored by dongchun's avatar dongchun

正在热卖问题

parent 5eb85268
...@@ -145,7 +145,7 @@ public class GoblinSelfZhengzaiController extends BaseController { ...@@ -145,7 +145,7 @@ public class GoblinSelfZhengzaiController extends BaseController {
return goblinZhengzaiMarketService.zhengzaiSpuList(marketId, storeId, page); return goblinZhengzaiMarketService.zhengzaiSpuList(marketId, storeId, page);
} }
@PostMapping("zhengzai/sku") @GetMapping("zhengzai/sku")
@ApiOperation("活动详情-正在下单-店铺sku列表") @ApiOperation("活动详情-正在下单-店铺sku列表")
@ApiResponse(code = 200, message = "接口返回对象参数") @ApiResponse(code = 200, message = "接口返回对象参数")
@ApiImplicitParams({ @ApiImplicitParams({
......
...@@ -78,118 +78,101 @@ ...@@ -78,118 +78,101 @@
var r2 = window.location.search.substr(1).match(reg2); var r2 = window.location.search.substr(1).match(reg2);
var r3 = window.location.search.substr(1).match(reg3); var r3 = window.location.search.substr(1).match(reg3);
let params = { let params = {
marketId: unescape(r[2]), marketId: unescape(r[2]),// spuId storeId
storeId: unescape(r2[2]), storeId: unescape(r2[2]),
marketSpuId: unescape(r3[2]) spuId: unescape(r3[2])
}; };
let datas = []; let datas = [];
$.ajax({ $.ajax({
url: '/goblin/marketing/zhengzai/sku', url: '/goblin/marketing/zhengzai/sku?marketId=' + unescape(r[2])+ '&storeId=' + unescape(r2[2]) + '&spuId=' + unescape(r3[2]),
type: 'post', type: 'get',
data: params, // contentType: 'application/json',
success: function(res) { success: function(res) {
console.log(params) console.log(params)
var options = { let column = [
id: 'setTable', // {
// url: '/goblin/marketing/zhengzai/sku', // field: 'valFace',
createUrl: prefix2 + "/addNewActivity", // title: '颜色',
detailUrl: prefix2 + "/addNewActivity?id={id}", // width: '100',
removeUrl: prefix + "/cancel/{id}", // align: 'center',
openTab: prefix2 + "/activityStoreList/id={id}", // formatter: function(value) {
// exportUrl: prefix + "/export", // return '七彩湛蓝色'
sortName: "createdAt", // }
sortOrder: "desc", // },
modalName: "活动", // {
showSearch: false, // field: 'bindType',
showRefresh: false, // title: '尺寸',
showColumns: false, // align: 'center',
showToggle: false, // formatter: function(value, row, index) {
pagination: false, // // $('.pull-right').hide()
data: datas, // return 'XXXL'
columns: [ // },
// { // width: '80'
// field: 'valFace', // },
// title: '颜色', {
// width: '100', field: 'bindType',
// align: 'center', title: '原价',
// formatter: function(value) { width: '100',
// return '七彩湛蓝色' align: 'center',
// } formatter: function(value, row, index) {
// }, return '299999999'
// { }
// field: 'bindType', },
// title: '尺寸', {
// align: 'center', field: 'bindType',
// formatter: function(value, row, index) { title: '其他活动占用库存',
// // $('.pull-right').hide() width: '120',
// return 'XXXL' align: 'center',
// }, formatter: function(value, row, index) {
// width: '80' return '2021'
// }, }
{ },
field: 'bindType', {
title: '原价', field: 'bindType',
width: '100', // title: `线下售价<a onclick="setPrice(1)">批量</a>`,
align: 'center', title: `线下售价`,
formatter: function(value, row, index) { width: '150',
return '299999999' align: 'center',
} formatter: function(value, row, index) {
}, return `<input id="price${index}" class='form-control' type='text' name='' value=''>`
{ }
field: 'bindType', },
title: '其他活动占用库存', {
width: '120', field: 'bindType',
align: 'center', // title: '库存限量<a onclick="setPrice(2)">批量</a>',
formatter: function(value, row, index) { title: '库存限量',
return '2021' width: '150',
} align: 'center',
}, formatter: function(value, row, index) {
{ return `<input id="goodsNum${index}" class='form-control' type='text' name='' value=''>`
field: 'bindType', }
// title: `线下售价<a onclick="setPrice(1)">批量</a>`, },
title: `线下售价`, {
width: '150', field: 'bindType',
align: 'center', // title: '用户限购<a onclick="setPrice(3)">批量</a>',
formatter: function(value, row, index) { title: '用户限购',
return `<input id="price${index}" class='form-control' type='text' name='' value=''>` width: '150',
} align: 'center',
}, formatter: function(value, row, index) {
{ return `<input id="purchasing${index}" class='form-control' type='text' name='' value=''>`
field: 'bindType', }
// title: '库存限量<a onclick="setPrice(2)">批量</a>', },
title: '库存限量', {
width: '150', title: '购买条件',
align: 'center', align: 'center',
formatter: function(value, row, index) { align: 'center',
return `<input id="goodsNum${index}" class='form-control' type='text' name='' value=''>` formatter: function (value, row, index) {
} return `<div style="display:flex;">
}, <label style="margin-right:12px;">
{ <input type="radio" checked value="1" id="optionsRadios1" name="optionsRadios${index}"><span>全部用户</span></label>
field: 'bindType', <label style="margin-right:12px;">
// title: '用户限购<a onclick="setPrice(3)">批量</a>', <input type="radio" value="2" id="optionsRadios1" name="optionsRadios${index}"><span>仅支持会员购买</span></label>
title: '用户限购', <label style="margin-right:12px;">
width: '150', <input type="radio" value="3" id="optionsRadios1" name="optionsRadios${index}"><span>指定用户购买</span></label>
align: 'center', </div>`
formatter: function(value, row, index) { }
return `<input id="purchasing${index}" class='form-control' type='text' name='' value=''>` }
} ]
},
{
title: '购买条件',
align: 'center',
align: 'center',
formatter: function (value, row, index) {
return `<div style="display:flex;">
<label style="margin-right:12px;">
<input type="radio" checked value="1" id="optionsRadios1" name="optionsRadios${index}"><span>全部用户</span></label>
<label style="margin-right:12px;">
<input type="radio" value="2" id="optionsRadios1" name="optionsRadios${index}"><span>仅支持会员购买</span></label>
<label style="margin-right:12px;">
<input type="radio" value="3" id="optionsRadios1" name="optionsRadios${index}"><span>指定用户购买</span></label>
</div>`
}
}]
};
if (res.code == 0) { if (res.code == 0) {
let { data } = res; let { data } = res;
let columnsData = data[0].skuSpecList let columnsData = data[0].skuSpecList
...@@ -205,17 +188,37 @@ ...@@ -205,17 +188,37 @@
columnsData.forEach((item,index) => { columnsData.forEach((item,index) => {
obj.field = 'specVname'+index+''; obj.field = 'specVname'+index+'';
obj.title = item.specName; obj.title = item.specName;
options.columns.unshift(obj) column.unshift({...obj})
}) })
} }
datas = data.map(item => { datas = data.map(item => {
item.skuSpecList.forEach((d,i) => [ item.skuSpecList.forEach((d,i) => [
item['specVname'+index+''] = d.specName item['specVname'+i+''] = d.specName
]) ])
return item return item
}) })
var options = {
id: 'setTable',
// url: '/goblin/marketing/zhengzai/sku',
createUrl: prefix2 + "/addNewActivity",
detailUrl: prefix2 + "/addNewActivity?id={id}",
removeUrl: prefix + "/cancel/{id}",
openTab: prefix2 + "/activityStoreList/id={id}",
// exportUrl: prefix + "/export",
sortName: "createdAt",
sortOrder: "desc",
modalName: "活动",
showSearch: false,
showRefresh: false,
showColumns: false,
showToggle: false,
pagination: false,
data: datas,
columns: column
};
$.table.init(options);
} }
$.table.init(options);
} }
}) })
return return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment