优化dou店铺商品
This commit is contained in:
parent
b5a94c8af1
commit
9df969bb0c
|
|
@ -103,6 +103,8 @@ public class DouGoodsApiController {
|
||||||
for (var s : goods.getSkuList()) {
|
for (var s : goods.getSkuList()) {
|
||||||
DouGoodsSku sku = new DouGoodsSku();
|
DouGoodsSku sku = new DouGoodsSku();
|
||||||
BeanUtils.copyProperties(s, sku);
|
BeanUtils.copyProperties(s, sku);
|
||||||
|
sku.setPrice(s.getPrice());
|
||||||
|
sku.setStockNum(s.getStockNum());
|
||||||
sku.setProductId(goods.getProductId().toString());
|
sku.setProductId(goods.getProductId().toString());
|
||||||
sku.setShopId(params.getShopId());
|
sku.setShopId(params.getShopId());
|
||||||
sku.setName(douGoods.getName());
|
sku.setName(douGoods.getName());
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ public class DouGoodsSkuBo implements Serializable {
|
||||||
* 商品数字id
|
* 商品数字id
|
||||||
*/
|
*/
|
||||||
private Long productId;
|
private Long productId;
|
||||||
private Long skuId;
|
private Long id;
|
||||||
private String title;
|
private String title;
|
||||||
private String code;
|
private String code;
|
||||||
private Integer shopId;
|
private Integer shopId;
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ public class DouGoodsSku implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 商品价格,单位:分
|
* 商品价格,单位:分
|
||||||
*/
|
*/
|
||||||
private Long price;
|
private Integer price;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建时间,时间戳:单位秒;
|
* 创建时间,时间戳:单位秒;
|
||||||
|
|
@ -96,7 +96,7 @@ public class DouGoodsSku implements Serializable {
|
||||||
/**
|
/**
|
||||||
* ku_type=0时,表示普通库存数量 ;sku_type=1时,使用stock_map,表示区域库存数量
|
* ku_type=0时,表示普通库存数量 ;sku_type=1时,使用stock_map,表示区域库存数量
|
||||||
*/
|
*/
|
||||||
private Long stockNum;
|
private Integer stockNum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sku_type=0时,表示预占库存数量; sku_type=1时,表示区域库存数量,使用prehold_stock_map
|
* sku_type=0时,表示预占库存数量; sku_type=1时,表示区域库存数量,使用prehold_stock_map
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ public class DouGoodsSkuServiceImpl extends ServiceImpl<DouGoodsSkuMapper, DouGo
|
||||||
// IPage<DouGoodsSkuListVo> result = mapper.selectSkuPageList(pageQuery.build(), bo.getShopId(),bo.getProductId(),bo.getSkuId(),bo.getCode(),bo.getHasLink());
|
// IPage<DouGoodsSkuListVo> result = mapper.selectSkuPageList(pageQuery.build(), bo.getShopId(),bo.getProductId(),bo.getSkuId(),bo.getCode(),bo.getHasLink());
|
||||||
// return PageResult.build(result);
|
// return PageResult.build(result);
|
||||||
LambdaQueryWrapper<DouGoodsSku> queryWrapper = new LambdaQueryWrapper<DouGoodsSku>()
|
LambdaQueryWrapper<DouGoodsSku> queryWrapper = new LambdaQueryWrapper<DouGoodsSku>()
|
||||||
|
.eq(bo.getId()!=null, DouGoodsSku::getId, bo.getId())
|
||||||
.eq(bo.getShopId()!=null,DouGoodsSku::getShopId,bo.getShopId())
|
.eq(bo.getShopId()!=null,DouGoodsSku::getShopId,bo.getShopId())
|
||||||
.eq(bo.getProductId()!=null,DouGoodsSku::getProductId,bo.getProductId())
|
.eq(bo.getProductId()!=null,DouGoodsSku::getProductId,bo.getProductId())
|
||||||
.eq(StringUtils.hasText(bo.getCode()),DouGoodsSku::getOutSkuId,bo.getCode())
|
.eq(StringUtils.hasText(bo.getCode()),DouGoodsSku::getOutSkuId,bo.getCode())
|
||||||
|
|
|
||||||
|
|
@ -116,19 +116,18 @@
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<el-dialog title="Sku List" :visible.sync="skuOpen" width="1200px" append-to-body>
|
<el-dialog title="商品Sku列表" :visible.sync="skuOpen" width="1400px" append-to-body>
|
||||||
<el-table v-loading="loading" :data="skuList" :row-class-name="rowIndex">
|
<el-table v-loading="loading" :data="skuList" :row-class-name="rowIndex">
|
||||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||||
<el-table-column label="序号" align="center" prop="index" width="50"/>
|
<el-table-column label="序号" align="center" prop="index" width="50"/>
|
||||||
|
|
||||||
<el-table-column label="SkuId" align="center" prop="id" width="200"/>
|
<el-table-column label="SkuId" align="center" prop="id" width="200"/>
|
||||||
<el-table-column label="SKU编码" align="left" prop="code" />
|
<el-table-column label="SKU编码" align="left" prop="code" />
|
||||||
<el-table-column label="商品名称" align="center" prop="name" />
|
<el-table-column label="商品名称" align="center" prop="name" />
|
||||||
<el-table-column label="图片" align="center" prop="logo" width="100">
|
<!-- <el-table-column label="图片" align="center" prop="logo" width="100">-->
|
||||||
<template slot-scope="scope">
|
<!-- <template slot-scope="scope">-->
|
||||||
<image-preview :src="scope.row.img" :width="50" :height="50"/>
|
<!-- <image-preview :src="scope.row.img" :width="50" :height="50"/>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
|
|
||||||
<el-table-column label="规格" align="center" prop="specDetailName1" >
|
<el-table-column label="规格" align="center" prop="specDetailName1" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
@ -225,7 +224,10 @@ export default {
|
||||||
outerProductId: null,
|
outerProductId: null,
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {
|
||||||
|
id: null,
|
||||||
|
erpGoodsSkuId: null,
|
||||||
|
},
|
||||||
supplierList: [],
|
supplierList: [],
|
||||||
categoryList: [],
|
categoryList: [],
|
||||||
categoryTree: [],
|
categoryTree: [],
|
||||||
|
|
@ -312,9 +314,14 @@ export default {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
linkErpGoodsSkuId(this.form).then(response => {
|
linkErpGoodsSkuId(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("关联成功");
|
if(response.code === 200) {
|
||||||
this.open = false;
|
this.$modal.msgSuccess("关联成功");
|
||||||
this.getList();
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
}else{
|
||||||
|
this.$modal.msgError(response.msg)
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -44,18 +44,18 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<!-- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>-->
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
<!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>-->
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">-->
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<!-- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">-->
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
<!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>-->
|
||||||
</el-col>
|
<!-- </el-col>-->d
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
:loading="pullLoading"
|
:loading="pullLoading"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue