From 4496a21c7223879089a08f0fe08fa075459cf041 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Sun, 26 Sep 2021 17:39:17 +0800
Subject: [PATCH] 20210926
---
src/main/resources/mapper/modules/MallGoodsMapper.xml | 7 +++
src/main/java/cc/mrbird/febs/mall/vo/AdminMallGoodsVo.java | 6 +++
src/main/resources/templates/febs/views/modules/mallMember/moneyFlowList.html | 8 ++++
src/main/resources/templates/febs/views/modules/goods/goodsAddNew.html | 16 +++++---
src/main/resources/mapper/modules/MallMoneyFlowMapper.xml | 2 +
src/main/resources/templates/febs/views/modules/order/orderList.html | 2
src/main/resources/templates/febs/views/modules/goods/goodsList.html | 63 +++++++++++++++++++++++++------
src/main/java/cc/mrbird/febs/mall/vo/AdminMoneyFlowListVo.java | 2 +
8 files changed, 85 insertions(+), 21 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/mall/vo/AdminMallGoodsVo.java b/src/main/java/cc/mrbird/febs/mall/vo/AdminMallGoodsVo.java
index efdefca..eb02b2d 100644
--- a/src/main/java/cc/mrbird/febs/mall/vo/AdminMallGoodsVo.java
+++ b/src/main/java/cc/mrbird/febs/mall/vo/AdminMallGoodsVo.java
@@ -32,4 +32,10 @@
private Integer isHot;
private Integer saleVolume;
+
+ private String categaryName;
+
+ private Integer skuVolume;
+
+ private Integer stock;
}
diff --git a/src/main/java/cc/mrbird/febs/mall/vo/AdminMoneyFlowListVo.java b/src/main/java/cc/mrbird/febs/mall/vo/AdminMoneyFlowListVo.java
index 49f5801..bdb8173 100644
--- a/src/main/java/cc/mrbird/febs/mall/vo/AdminMoneyFlowListVo.java
+++ b/src/main/java/cc/mrbird/febs/mall/vo/AdminMoneyFlowListVo.java
@@ -32,4 +32,6 @@
private Integer status;
+ private String payMethod;
+
}
diff --git a/src/main/resources/mapper/modules/MallGoodsMapper.xml b/src/main/resources/mapper/modules/MallGoodsMapper.xml
index e8ec726..1ecb522 100644
--- a/src/main/resources/mapper/modules/MallGoodsMapper.xml
+++ b/src/main/resources/mapper/modules/MallGoodsMapper.xml
@@ -116,8 +116,13 @@
a.is_sale,
a.original_price,
a.present_price,
- a.is_hot
+ a.is_hot,
+ b.name categaryName,
+ sum(c.sku_volume) skuVolume,
+ sum(c.stock) stock
from mall_goods a
+ left join mall_goods_category b on b.id = a.category_id
+ left join mall_goods_sku c on c.goods_id = a.id
<where>
<if test="record != null">
<if test="record.goodsName != null and record.goodsName != ''">
diff --git a/src/main/resources/mapper/modules/MallMoneyFlowMapper.xml b/src/main/resources/mapper/modules/MallMoneyFlowMapper.xml
index 58c1e6b..b9be8d9 100644
--- a/src/main/resources/mapper/modules/MallMoneyFlowMapper.xml
+++ b/src/main/resources/mapper/modules/MallMoneyFlowMapper.xml
@@ -31,9 +31,11 @@
select
a.*,
b.name,
+ c.pay_method payMethod,
b.phone
from mall_money_flow a
inner join mall_member b on a.member_id=b.id
+ left join mall_order_info c on a.order_no = c.order_no
<where>
a.type != 6
<if test="record != null" >
diff --git a/src/main/resources/templates/febs/views/modules/goods/goodsAddNew.html b/src/main/resources/templates/febs/views/modules/goods/goodsAddNew.html
index 5a414a2..8435667 100644
--- a/src/main/resources/templates/febs/views/modules/goods/goodsAddNew.html
+++ b/src/main/resources/templates/febs/views/modules/goods/goodsAddNew.html
@@ -68,7 +68,7 @@
</div>
<div id="attrWrap"></div>
<div class="layui-form-item">
- <label class="layui-form-label">缩略图:</label>
+ <label class="layui-form-label febs-form-item-require">缩略图:</label>
<div class="layui-input-block">
<div class="layui-upload">
<button type="button" class="layui-btn layui-btn-normal layui-btn-xs" id="test2">上传</button>
@@ -81,12 +81,12 @@
<div class="layui-form-item febs-hide">
<label class="layui-form-label">缩略图链接:</label>
<div class="layui-input-block">
- <input type="text" id="thumb" name="thumb" autocomplete="off" class="layui-input" readonly>
+ <input type="text" id="thumb" lay-verify="required" name="thumb" autocomplete="off" class="layui-input" readonly>
</div>
</div>
<div class="layui-form-item">
- <label class="layui-form-label">轮播图:</label>
+ <label class="layui-form-label febs-form-item-require">轮播图:</label>
<div class="layui-input-block">
<div class="layui-upload">
<button type="button" class="layui-btn layui-btn-normal layui-btn-xs" id="thumbsBanner">上传</button>
@@ -99,14 +99,14 @@
<div class="layui-form-item febs-hide">
<label class="layui-form-label">缩略图链接:</label>
<div class="layui-input-block">
- <input type="text" id="thumbs" name="thumbs" autocomplete="off" class="layui-input" readonly>
+ <input type="text" id="thumbs" lay-verify="required" name="thumbs" autocomplete="off" class="layui-input" readonly>
</div>
</div>
<div class="layui-form-item">
- <label class="layui-form-label">商品详情:</label>
+ <label class="layui-form-label febs-form-item-require">商品详情:</label>
<div class="layui-input-block">
- <textarea id="lay_edit" lay-verify="goodsDetails" name = "goodsDetails" class="layui-textarea"></textarea>
+ <textarea id="lay_edit" lay-verify="required" name = "goodsDetails" class="layui-textarea"></textarea>
</div>
</div>
<div class="layui-row layui-col-space10 layui-form-item">
@@ -318,6 +318,10 @@
presentPrice: $("input[name='presentPrice" + i + "']").val()
})
}
+ // if(skuArr.length < 0){
+ // febs.alert.warn("请填写商品规格");
+ // return false;
+ // }
// console.log(skuArrs)
data.field.addMallGoodsSkuDtos = skuArrs;
// console.log(data.field)
diff --git a/src/main/resources/templates/febs/views/modules/goods/goodsList.html b/src/main/resources/templates/febs/views/modules/goods/goodsList.html
index 8798741..260c7ac 100644
--- a/src/main/resources/templates/febs/views/modules/goods/goodsList.html
+++ b/src/main/resources/templates/febs/views/modules/goods/goodsList.html
@@ -28,6 +28,18 @@
</div>
</form>
<table lay-filter="userTable" lay-data="{id: 'userTable'}"></table>
+ <style type="text/css">
+ .layui-table-cell{
+ text-align:center;
+ height: auto;
+ white-space: nowrap; /*文本不会换行,在同一行显示*/
+ overflow: hidden; /*超出隐藏*/
+ text-overflow: ellipsis; /*省略号显示*/
+ }
+ .layui-table img{
+ max-width:100px
+ }
+ </style>
</div>
</div>
</div>
@@ -86,6 +98,21 @@
maxmin: true,
});
}
+ if (layEvent === 'seeImgThumb') {
+ var t = $view.find('#seeImgThumb'+data.id+'');
+ //页面层
+ layer.open({
+ type: 1,
+ title: "图片",
+ skin: 'layui-layer-rim', //加上边框
+ area: ['80%', '80%'], //宽高
+ shadeClose: true, //开启遮罩关闭
+ end: function (index, layero) {
+ return false;
+ },
+ content: '<div style="text-align:center"><img src="' + $(t).attr('src') + '" /></div>'
+ });
+ }
});
function downGoods(id) {
febs.get(ctx + 'admin/goods/downMallGoods/' + id, null, function () {
@@ -129,17 +156,27 @@
id: 'userTable',
url: ctx + 'admin/goods/goodsList',
cols: [[
+ {field: 'goodsNo', title: '商品编号', minWidth: 150,align:'left'},
{field: 'goodsName', title: '商品名称', minWidth: 150,align:'left'},
- // {field: 'accountType', title: '账号类型',
- // templet: function (d) {
- // if (d.accountType === 2) {
- // return '<span style="color:red;">测试账号</span>'
- // } else if (d.accountType === 1) {
- // return '<span style="color:green;">正常账号</span>'
- // }else{
- // return ''
- // }
- // }, minWidth: 80,align:'center'},
+ {field: 'thumb', title: '缩略图',
+ templet: function (d) {
+ return '<a lay-event="seeImgThumb"><img id="seeImgThumb'+d.id+'" src="'+d.thumb+'" alt=""></a>';
+ }, minWidth: 100,align:'center'},
+ {field: 'categaryName', title: '分类', minWidth: 150,align:'left'},
+ {field: 'isSale', title: '是否上架',
+ templet: function (d) {
+ if (d.isSale === 1) {
+ return '<span>上架</span>'
+ } else if (d.isSale === 2) {
+ return '<span>下架</span>'
+ }else{
+ return ''
+ }
+ }, minWidth: 80,align:'center'},
+ {field: 'presentPrice', title: '现价', minWidth: 150,align:'left'},
+ {field: 'originalPrice', title: '原价', minWidth: 150,align:'left'},
+ {field: 'stock', title: '商品库存', minWidth: 150,align:'left'},
+ {field: 'skuVolume', title: '商品销量', minWidth: 150,align:'left'},
// {field: 'accountStatus', title: '账号状态',
// templet: function (d) {
// if (d.accountStatus === 1) {
@@ -154,11 +191,11 @@
{title: '操作',
templet: function (d) {
if (d.isSale === 1) {
- return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="downGoods" shiro:hasPermission="user:update">下架</button>'
+ return '<button class="layui-btn layui-btn-normal layui-btn-xs febs-bg-orange" lay-event="downGoods" shiro:hasPermission="user:update">下架</button>'
+ '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="detailGoods" shiro:hasPermission="user:update">详情</button>'
}else{
- return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="upGoods" shiro:hasPermission="user:update">上架</button>'
- + '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="delGoods" shiro:hasPermission="user:update">删除</button>'
+ return '<button class="layui-btn layui-btn-normal layui-btn-xs febs-bg-green" lay-event="upGoods" shiro:hasPermission="user:update">上架</button>'
+ + '<button class="layui-btn layui-btn-normal layui-btn-xs febs-bg-red" lay-event="delGoods" shiro:hasPermission="user:update">删除</button>'
+ '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="updateGoods" shiro:hasPermission="user:update">编辑</button>'
}
diff --git a/src/main/resources/templates/febs/views/modules/mallMember/moneyFlowList.html b/src/main/resources/templates/febs/views/modules/mallMember/moneyFlowList.html
index c998a7d..07791c0 100644
--- a/src/main/resources/templates/febs/views/modules/mallMember/moneyFlowList.html
+++ b/src/main/resources/templates/febs/views/modules/mallMember/moneyFlowList.html
@@ -112,6 +112,14 @@
return ''
}
}, minWidth: 80,align:'center'},
+ {field: 'type', title: '支付方式',
+ templet: function (d) {
+ if (d.type === 3) {
+ return '<span>'+d.payMethod+'</span>'
+ } else{
+ return ''
+ }
+ }, minWidth: 80,align:'center'},
{field: 'createdTime', title: '创建时间', minWidth: 180,align:'center'}
]]
});
diff --git a/src/main/resources/templates/febs/views/modules/order/orderList.html b/src/main/resources/templates/febs/views/modules/order/orderList.html
index c7d2e94..dd902cb 100644
--- a/src/main/resources/templates/febs/views/modules/order/orderList.html
+++ b/src/main/resources/templates/febs/views/modules/order/orderList.html
@@ -1,4 +1,4 @@
-<div class="layui-fluid layui-anim febs-anim" id="febs-order" lay-title="商品列表">
+<div class="layui-fluid layui-anim febs-anim" id="febs-order" lay-title="订单列表">
<div class="layui-row febs-container">
<div class="layui-col-md12">
<div class="layui-card">
--
Gitblit v1.9.1