20250523
This commit is contained in:
parent
6f322f80eb
commit
1ca61dc479
|
|
@ -134,6 +134,13 @@ private String cateName;
|
|||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||
private Date deletedAt;
|
||||
|
||||
|
||||
|
||||
private BigDecimal minPrice;
|
||||
private BigDecimal maxPrice;
|
||||
private String createdStart;
|
||||
private String createdEnd;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
|
|
@ -422,6 +429,38 @@ private String cateName;
|
|||
this.cateName = cateName;
|
||||
}
|
||||
|
||||
public String getCreatedEnd() {
|
||||
return createdEnd;
|
||||
}
|
||||
|
||||
public void setCreatedEnd(String createdEnd) {
|
||||
this.createdEnd = createdEnd;
|
||||
}
|
||||
|
||||
public String getCreatedStart() {
|
||||
return createdStart;
|
||||
}
|
||||
|
||||
public void setCreatedStart(String createdStart) {
|
||||
this.createdStart = createdStart;
|
||||
}
|
||||
|
||||
public BigDecimal getMaxPrice() {
|
||||
return maxPrice;
|
||||
}
|
||||
|
||||
public void setMaxPrice(BigDecimal maxPrice) {
|
||||
this.maxPrice = maxPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getMinPrice() {
|
||||
return minPrice;
|
||||
}
|
||||
|
||||
public void setMinPrice(BigDecimal minPrice) {
|
||||
this.minPrice = minPrice;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
|
|
|||
|
|
@ -42,33 +42,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="selectServiceGoodsList" parameterType="ServiceGoods" resultMap="ServiceGoodsResult">
|
||||
<include refid="selectServiceGoodsVo"/>
|
||||
<where>
|
||||
<if test="title != null and title != ''"> and title = #{title}</if>
|
||||
<if test="icon != null and icon != ''"> and icon = #{icon}</if>
|
||||
<if test="imgs != null and imgs != ''"> and imgs = #{imgs}</if>
|
||||
<if test="subTitle != null and subTitle != ''"> and sub_title = #{subTitle}</if>
|
||||
<if test="info != null and info != ''"> and info = #{info}</if>
|
||||
<if test="price != null "> and price = #{price}</if>
|
||||
<if test="priceZn != null and priceZn != ''"> and price_zn = #{priceZn}</if>
|
||||
<if test="sales != null "> and sales = #{sales}</if>
|
||||
<if test="stock != null "> and stock = #{stock}</if>
|
||||
<if test="title != null and title != ''"> and title like '%${title}%'</if>
|
||||
<if test="subTitle != null and subTitle != ''"> and sub_title like '%${subTitle}%'</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="description != null and description != ''"> and description = #{description}</if>
|
||||
<if test="skuType != null "> and sku_type = #{skuType}</if>
|
||||
<if test="sku != null and sku != ''"> and sku = #{sku}</if>
|
||||
<if test="latitude != null and latitude != ''"> and latitude = #{latitude}</if>
|
||||
<if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if>
|
||||
<if test="type != null "> and type = #{type}</if>
|
||||
<if test="minPrice != null and maxPrice != null">
|
||||
and price BETWEEN #{maxPrice} AND #{maxPrice}
|
||||
</if>
|
||||
<if test="createdStart != null and createdEnd != null">
|
||||
and createdAt BETWEEN #{createdStart} AND #{createdEnd}
|
||||
</if>
|
||||
<if test="cateId != null "> and cate_id = #{cateId}</if>
|
||||
<if test="project != null and project != ''"> and project = #{project}</if>
|
||||
<if test="sort != null "> and sort = #{sort}</if>
|
||||
<if test="material != null and material != ''"> and material = #{material}</if>
|
||||
<if test="postage != null "> and postage = #{postage}</if>
|
||||
<if test="basic != null and basic != ''"> and basic = #{basic}</if>
|
||||
<if test="margin != null "> and margin = #{margin}</if>
|
||||
<if test="skillIds != null and skillIds != ''"> and skill_ids = #{skillIds}</if>
|
||||
<if test="createdAt != null "> and created_at = #{createdAt}</if>
|
||||
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
|
||||
<if test="deletedAt != null "> and deleted_at = #{deletedAt}</if>
|
||||
<if test="type != null "> and type = #{type}</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
@ -88,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<insert id="insertServiceGoods" parameterType="ServiceGoods" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into service_goods
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
||||
<if test="title != null and title != ''">title,</if>
|
||||
<if test="icon != null">icon,</if>
|
||||
<if test="imgs != null">imgs,</if>
|
||||
|
|
|
|||
|
|
@ -27,6 +27,35 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="价格">
|
||||
<el-input v-model="queryParams.minPrice" class="number-input" type="number" placeholder="最小值" clearable style="width: 120px;" />
|
||||
-
|
||||
<el-input v-model="queryParams.maxPrice" class="number-input" type="number" placeholder="最大值" clearable style="width: 120px;" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="分类" prop="cateId">
|
||||
<el-select v-model="queryParams.cateId" placeholder="请选择分类" clearable>
|
||||
<el-option
|
||||
v-for="cate in serviceCateList"
|
||||
:key="cate.id"
|
||||
:label="cate.title"
|
||||
:value="cate.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeCreatedAt"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<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>
|
||||
|
|
@ -300,7 +329,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { listServiceGoods, getServiceGoods, delServiceGoods, addServiceGoods, updateServiceGoods ,changefenleiStatus} from "@/api/system/ServiceGoods"
|
||||
import { listServiceGoods, getServiceGoods, delServiceGoods, addServiceGoods, updateServiceGoods ,changefenleiStatus,selectServiceCateList} from "@/api/system/ServiceGoods"
|
||||
|
||||
export default {
|
||||
name: "ServiceGoods",
|
||||
|
|
@ -318,6 +347,9 @@ export default {
|
|||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
|
||||
serviceCateList: [],
|
||||
|
||||
total: 0,
|
||||
// 服务内容表格数据
|
||||
ServiceGoodsList: [],
|
||||
|
|
@ -328,12 +360,19 @@ export default {
|
|||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
type: '2',
|
||||
minPrice: null,
|
||||
maxPrice: null,
|
||||
createdStart: null,
|
||||
createdEnd: null,
|
||||
cateId: null,
|
||||
pageSize: 10,
|
||||
title: null,
|
||||
subTitle: null,
|
||||
status: null,
|
||||
type: '2',
|
||||
project: null,
|
||||
createdStart: null,
|
||||
createdEnd: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
@ -362,10 +401,12 @@ export default {
|
|||
editField: '',
|
||||
editFieldLabel: '',
|
||||
editRow: null,
|
||||
daterangeCreatedAt: [],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getserviceCateList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询服务内容列表 */
|
||||
|
|
@ -418,14 +459,25 @@ export default {
|
|||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
// 处理创建时间
|
||||
if (this.daterangeCreatedAt && this.daterangeCreatedAt.length === 2) {
|
||||
this.queryParams.createdStart = this.daterangeCreatedAt[0];
|
||||
this.queryParams.createdEnd = this.daterangeCreatedAt[1];
|
||||
} else {
|
||||
this.queryParams.createdStart = null;
|
||||
this.queryParams.createdEnd = null;
|
||||
}
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.daterangeCreatedAt = [];
|
||||
this.resetForm("queryForm")
|
||||
this.handleQuery()
|
||||
},
|
||||
|
||||
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
|
|
@ -490,6 +542,11 @@ export default {
|
|||
this.$modal.msgSuccess("删除成功")
|
||||
}).catch(() => {})
|
||||
},
|
||||
getserviceCateList(){
|
||||
selectServiceCateList().then(response => {
|
||||
this.serviceCateList = response.data
|
||||
})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/ServiceGoods/export', {
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@
|
|||
<el-input v-model="queryParams.maxPrice" class="number-input" type="number" placeholder="最大值" clearable style="width: 120px;" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="分类" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择分类" clearable>
|
||||
<el-form-item label="分类" prop="cateId">
|
||||
<el-select v-model="queryParams.cateId" placeholder="请选择分类" clearable>
|
||||
<el-option
|
||||
v-for="cate in serviceCateList"
|
||||
:key="cate.id"
|
||||
|
|
@ -365,7 +365,7 @@ export default {
|
|||
maxPrice: null,
|
||||
createdStart: null,
|
||||
createdEnd: null,
|
||||
|
||||
cateId: null,
|
||||
pageSize: 10,
|
||||
title: null,
|
||||
subTitle: null,
|
||||
|
|
|
|||
Loading…
Reference in New Issue