From 310b632183361dd50bebc3621681e51aa6dc1a6d Mon Sep 17 00:00:00 2001 From: augushong Date: Mon, 8 Aug 2022 10:52:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=90=88=E8=AE=A1=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/admin/js/mall/goods.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/static/admin/js/mall/goods.js b/public/static/admin/js/mall/goods.js index 3cd17df..7a31d7f 100644 --- a/public/static/admin/js/mall/goods.js +++ b/public/static/admin/js/mall/goods.js @@ -17,6 +17,7 @@ define(["jquery", "easy-admin"], function ($, ea) { index: function () { ea.table.render({ init: init, + totalRow: true, toolbar: ['refresh', [{ text: '添加', @@ -30,7 +31,7 @@ define(["jquery", "easy-admin"], function ($, ea) { 'delete', 'export'], cols: [[ { type: "checkbox" }, - { field: 'id', width: 80, title: 'ID' }, + { field: 'id', width: 80, title: 'ID', totalRowText: '合计:' }, { field: 'sort', width: 80, title: '排序', edit: 'text' }, { field: 'cate.title', minWidth: 80, title: '商品分类', }, { field: 'cate.id', minWidth: 80, title: '商品分类', hide: true, defaultSearchValue: ea.getQueryVariable('cate_id', '') }, @@ -38,8 +39,8 @@ define(["jquery", "easy-admin"], function ($, ea) { { field: 'title', minWidth: 80, title: '商品名称', }, { field: 'logo', minWidth: 80, title: '商品图片', search: false, templet: ea.table.image }, { field: 'market_price', width: 100, title: '市场价', templet: ea.table.price }, - { field: 'discount_price', width: 100, title: '折扣价', templet: ea.table.price }, - { field: 'total_stock', width: 100, title: '库存统计' }, + { field: 'discount_price', width: 100, title: '折扣价', templet: ea.table.price, totalRow: true }, + { field: 'total_stock', width: 100, title: '库存统计', totalRow: '{{= parseInt(d.TOTAL_NUMS) }} 个' }, { field: 'stock', width: 100, title: '剩余库存' }, { field: 'virtual_sales', width: 100, title: '虚拟销量' }, { field: 'sales', width: 80, title: '销量' },