品牌库优化显示

jg-waiwang-pro
mhsnet 8 months ago
parent 0968d95143
commit 94e0701e0f

@ -5,11 +5,11 @@ import jnpf.entity.ProductBrandEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* productBrand
* ProductBrand
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-01-29
* 2024-02-29
*/
public interface ProductBrandMapper extends BaseMapper<ProductBrandEntity> {

@ -7,11 +7,11 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
/**
* productBrand
* ProductBrand
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-01-29
* 2024-02-29
*/
public interface ProductBrandService extends IService<ProductBrandEntity> {
List<ProductBrandEntity> getList(ProductBrandPagination productBrandPagination);

@ -32,11 +32,11 @@ import jnpf.base.UserInfo;
import jnpf.permission.entity.UserEntity;
/**
*
* productBrand
* ProductBrand
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-01-29
* 2024-02-29
*/
@Service
public class ProductBrandServiceImpl extends ServiceImpl<ProductBrandMapper, ProductBrandEntity> implements ProductBrandService{
@ -299,17 +299,9 @@ public class ProductBrandServiceImpl extends ServiceImpl<ProductBrandMapper, Pro
if(isSave){
String mainId = RandomUtil.uuId() ;
entity.setCreatorTime(DateUtil.getNowDate());
entity.setCreatorUserId(userInfo.getUserId());
entity.setLastModifyTime(null);
entity.setLastModifyUserId(null);
entity.setId(mainId);
entity.setVersion(0);
}else{
entity.setCreatorTime(DateUtil.getNowDate());
entity.setCreatorUserId(userInfo.getUserId());
entity.setLastModifyTime(null);
entity.setLastModifyUserId(null);
}
this.saveOrUpdate(entity);

@ -30,15 +30,15 @@ import jnpf.exception.WorkFlowException;
import org.springframework.transaction.annotation.Transactional;
/**
* productBrand
* ProductBrand
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-01-29
* @ 2024-02-29
*/
@Slf4j
@RestController
@Tag(name = "productBrand" , description = "scm")
@Tag(name = "ProductBrand" , description = "scm")
@RequestMapping("/api/scm/ProductBrand")
public class ProductBrandController {

@ -6,11 +6,11 @@ import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* productBrand
* ProductBrand
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-01-29
* @ 2024-02-29
*/
@Data
public class ProductBrandForm {
@ -38,16 +38,16 @@ public class ProductBrandForm {
/** 来源 **/
@JsonProperty("source")
private String source;
/** 创建时间 **/
@JsonProperty("creatorTime")
private String creatorTime;
/** 创建用户 **/
@JsonProperty("creatorUserId")
private String creatorUserId;
/** 修改时间 **/
@JsonProperty("lastModifyTime")
private String lastModifyTime;
/** 创建时间 **/
@JsonProperty("creatorTime")
private String creatorTime;
/** 修改用户 **/
@JsonProperty("lastModifyUserId")
private String lastModifyUserId;
/** 修改时间 **/
@JsonProperty("lastModifyTime")
private String lastModifyTime;
}

@ -7,11 +7,11 @@ import java.util.List;
/**
*
* productBrand
* ProductBrand
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-01-29
* @ 2024-02-29
*/
@Data
public class ProductBrandPagination extends Pagination {

@ -3,8 +3,7 @@
<div class="JNPF-preview-main">
<Detail v-if="detailVisible" ref="Detail" @close="detailVisible = false" />
<div class="JNPF-common-page-header">
<el-page-header @back="goBack"
content="详情"/>
<el-page-header @back="goBack" content="详情" />
<div class="options">
<el-button @click="goBack"> </el-button>
</div>
@ -13,53 +12,44 @@
<el-form ref="formRef" :model="dataForm" size="small" label-width="100px" label-position="right">
<template v-if="!loading">
<el-col :span="24">
<jnpf-form-tip-item label="品牌名称"
prop="brandName" >
<jnpf-form-tip-item label="品牌名称" prop="brandName">
<p>{{ dataForm.brandName }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label="品牌类型"
prop="brandType" >
<jnpf-form-tip-item label="品牌类型" prop="brandType">
<p>{{ dataForm.brandType }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label="LOGO"
prop="brandPic" >
<JnpfUploadImg v-model="dataForm.brandPic"
disabled
detailed :fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0" >
<jnpf-form-tip-item label="LOGO" prop="brandPic">
<JnpfUploadImg v-model="dataForm.brandPic" disabled detailed :fileSize="10" sizeUnit="MB"
:limit="9" pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label="描述"
prop="brandDescription" >
<jnpf-form-tip-item label="描述" prop="brandDescription">
<p>{{ dataForm.brandDescription }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label="状态"
prop="brandStatus" >
<jnpf-form-tip-item label="状态" prop="brandStatus">
<p>{{ dataForm.brandStatus }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label="来源"
prop="source" >
<jnpf-form-tip-item label="来源" prop="source">
<p>{{ dataForm.source }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label="修改时间"
prop="lastModifyTime" >
<jnpf-form-tip-item label="修改时间" prop="lastModifyTime">
<p>{{ dataForm.lastModifyTime }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label="修改用户"
prop="lastModifyUserId" >
<jnpf-form-tip-item label="修改用户" prop="lastModifyUserId">
<p>{{ dataForm.lastModifyUserId }}</p>
</jnpf-form-tip-item>
</el-col>

@ -17,8 +17,7 @@
</el-col>
<el-col :span="6">
<el-form-item label="品牌类型">
<JnpfSelect v-model="query.brandType" placeholder="请选择" clearable
:options="brandTypeOptions"
<JnpfSelect v-model="query.brandType" placeholder="请选择" clearable :options="brandTypeOptions"
:props="brandTypeProps" multiple>
</JnpfSelect>
</el-form-item>
@ -26,8 +25,7 @@
<el-col :span="6">
<el-form-item label="状态">
<JnpfSelect v-model="query.brandStatus" placeholder="请选择" clearable
:options="brandStatusOptions"
:props="brandStatusProps" >
:options="brandStatusOptions" :props="brandStatusProps">
</JnpfSelect>
</el-form-item>
</el-col>
@ -56,55 +54,49 @@
</el-tooltip>
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange'
:span-method="arraySpanMethod"
>
<el-table-column
prop="brandName"
label="品牌名称" align="left"
>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' :span-method="arraySpanMethod">
<el-table-column prop="brandName" label="品牌名称" align="left">
</el-table-column>
<el-table-column
prop="brandType"
label="品牌类型" align="left"
>
<el-table-column prop="brandPic" label="LOGO" align="left">
<template slot-scope="scope">
<el-image style="width: 100px; height: 100px" :src="define.comUrl + scope.row.brandPic[0].url"
:preview-src-list="getImgList(scope.row.brandPic)"></el-image>
</template>
</el-table-column>
<el-table-column
prop="creatorTime"
label="创建时间" align="left"
>
<el-table-column prop="brandType" label="品牌类型" align="left">
</el-table-column>
<el-table-column
prop="lastModifyTime"
label="修改时间" align="left"
>
<el-table-column prop="creatorTime" label="创建时间" align="left">
</el-table-column>
<el-table-column
prop="source"
label="来源" align="left"
>
<el-table-column prop="lastModifyTime" label="修改时间" align="left">
</el-table-column>
<el-table-column
prop="brandStatus"
label="状态" align="left"
>
<el-table-column prop="source" label="来源" align="left">
<template slot-scope="scope">
<span style="color: blue;">{{ scope.row.source }}</span>
</template>
</el-table-column>
<el-table-column label="操作"
fixed="right" width="150" >
<el-table-column prop="brandStatus" label="状态" align="left">
<template slot-scope="scope">
<el-button type="text"
@click="addOrUpdateHandle(scope.row)" >编辑
<template v-if="scope.row.brandStatus == '启用'">
<span style="color: green;">{{ scope.row.brandStatus }}</span>
</template>
<template v-else>
<span style="color: red;">{{ scope.row.brandStatus }}</span>
</template>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button type="text" @click="addOrUpdateHandle(scope.row)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text"
@click="goDetail(scope.row.id)">详情
<el-button type="text" @click="goDetail(scope.row.id)">
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
@ -116,8 +108,7 @@
<ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible = false" />
<ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail" @close="toFormDetailVisible = false" />
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson"
@superQuery="superQuery" />
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson" @superQuery="superQuery" />
</div>
</template>
@ -494,6 +485,10 @@
this.flowVisible = false
if (isrRefresh) this.reset()
},
getImgList(list) {
const newList = list.map(o => this.define.comUrl + o.url)
return newList
}
}
}
</script>

Loading…
Cancel
Save