<develop>:(Web 端)<无> ShopERP 项目前端代码提交。

parent 544cbe45
......@@ -112,23 +112,19 @@ namespace CoreCms.Net.Web.Admin.Controllers
claims.AddRange(userRoles.Split(',').Select(s => new Claim(ClaimTypes.Role, s)));
// ids4和jwt切换
// jwt
if (!Permissions.IsUseIds4)
{
var data = await _sysRoleMenuServices.RoleModuleMaps();
var list = (from item in data
orderby item.id
select new PermissionItem
{
Url = item.menu?.component,
RouteUrl = item.menu?.path,
Authority = item.menu?.authority,
Role = item.role?.roleCode,
}).ToList();
_permissionRequirement.Permissions = list;
}
//使用 JWT 来授权
var data = await _sysRoleMenuServices.RoleModuleMaps();
var list = (from item in data
orderby item.id
select new PermissionItem
{
Url = item.menu?.component,
RouteUrl = item.menu?.path,
Authority = item.menu?.authority,
Role = item.role?.roleCode,
}).ToList();
_permissionRequirement.Permissions = list;
//用户标识
var identity = new ClaimsIdentity(JwtBearerDefaults.AuthenticationScheme);
......
......@@ -84,11 +84,8 @@
<button class="layui-btn layui-btn-sm" id="addGoods" lay-filter="goods-add"><i class="layui-icon">&#xe608;</i>添加商品</button>
<div class="layui-btn-group">
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="modify_price">修改价格</button>
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="modify_stock">调整库存</button>
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="marketable_up">批量上架</button>
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="marketable_down">批量下架</button>
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="label">批量打标签</button>
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="dellabel">批量去标签</button>
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="del">批量删除</button>
</div>
</div>
......@@ -189,10 +186,6 @@
[
{ type: "checkbox", fixed: "left" },
{ field: 'id', title: '序列', width: 50, sort: false },
{ width: 142, align: 'center', title: '操作', toolbar: '#LAY-app-CoreCmsGoods-tableBox-bar' },
{ field: 'isMarketable', title: '上架', width: 80, templet: '#switch_isMarketable', sort: false, unresize: true },
{ field: 'isRecommend', title: '推荐', width: 80, templet: '#switch_isRecommend', sort: false, unresize: true },
{ field: 'isHot', title: '热门', width: 80, templet: '#switch_isHot', sort: false, unresize: true },
{
field: 'images', title: '封面图', width: 60, sort: false,
templet: function (d) {
......@@ -204,24 +197,6 @@
}
},
{ field: 'name', title: '商品名称', sort: false },
//{ field: 'stock', title: '库存', sort: false, width: 60 },
{ field: 'sort', title: '排序', sort: false, width: 40 },
{
field: 'productsDistributionType', title: '佣金方式', sort: false, width: 80, templet: function (data) {
if (data.productsDistributionType === 1) {
return '<button class="layui-btn layui-btn-warm layui-btn-xs">全局设置</button>'
} else if (data.productsDistributionType === 2) {
return '<button class="layui-btn layui-btn-normal layui-btn-xs">单独设置</button>'
} else {
return '';
}
}
},
//{
// field: 'labelIds', title: '标签', sort: false, width: 105, templet: function (data) {
// return coreHelper.getLabel(data.labels);
// }
//},
{ field: 'price', title: '销售价', sort: false, width: 70, templet: function (data) { return '¥' + data.price } },
{ field: 'costprice', title: '成本价', sort: false, width: 70, templet: function (data) { return '¥' + data.costprice } },
{ field: 'mktprice', title: '市场价', sort: false, width: 70, templet: function (data) { return '¥' + data.mktprice } },
......@@ -246,6 +221,8 @@
}
},
{ field: 'updateTime', title: '更新时间', sort: false, width: 130 },
{ field: 'isMarketable', title: '上架', width: 80, templet: '#switch_isMarketable', sort: false, unresize: true },
{ width: 142, align: 'center', title: '操作', toolbar: '#LAY-app-CoreCmsGoods-tableBox-bar' }
]
]
......
......@@ -103,10 +103,12 @@
text: { none: '暂无相关数据' },
cols: [
[
//{ type: "checkbox", fixed: "left" },
{ field: 'id', title: '序列', width: 60, sort: false },
{ field: 'barcode', title: '商品条码', sort: false, width: 135 },
{ field: 'sn', title: '货品编码', sort: false, width: 135 },
{ field: 'name', title: '商品名称', sort: false },
{
field: 'images', title: '图片', width: 50, sort: false,
field: 'images', title: '图片', width: 60, sort: false,
templet: function (d) {
if (d.images) {
return '<a href="javascript:void(0);" onclick=layui.coreHelper.viewImage("' + d.images + '")><image style="max-width:28px;max-height:28px;" src="' + d.images + '"/></a>';
......@@ -115,14 +117,10 @@
}
}
},
{ field: 'name', title: '商品名称', sort: false },
{ field: 'spesDesc', title: '规格值', sort: false },
{ field: 'barcode', title: '商品条码', sort: false, width: 125 },
{ field: 'sn', title: '货品编码', sort: false, width: 130 },
{ field: 'price', title: '销售价', sort: false, width: 60 },
{ field: 'costprice', title: '成本价', sort: false, width: 60 },
{ field: 'mktprice', title: '市场价', sort: false, width: 60 },
//{ field: 'marketable', title: '是否上架', width: 95, templet: '#switch_marketable', sort: false, unresize: true },
{ field: 'weight', title: '重量(千克)', sort: false, width: 80 },
{ field: 'unit', title: '单位', sort: false, width: 60 },
{ field: 'stock', title: '库存(单机编辑)', sort: false, width: 120, edit: 'text' },
......@@ -219,10 +217,10 @@
admin.popup({
shadeClose: false,
title: '查看记录',
area: ['1230px', '90%'],
area: ['1230px', '60%'],
id: 'LAY-popup-CoreCmsProducts-details',
success: function (layero, index) {
view(this.id).render('content/stock/products/details', { data: e.data }).done(function () {
view(this.id).render('stock/products/details', { data: e.data }).done(function () {
form.render();
});
// 禁止弹窗出现滚动条
......
......@@ -174,10 +174,10 @@
admin.popup({
shadeClose: false,
title: '创建单据',
area: ['95%', '90%'],
area: ['60%', '60%'],
id: 'LAY-popup-CoreCmsStock-create',
success: function (layero, index) {
view(this.id).render('content/stock/stocks/create', { data: e.data }).done(function () {
view(this.id).render('stock/stocks/create', { data: e.data }).done(function () {
//监听提交
form.on('submit(LAY-app-CoreCmsStock-createForm-submit)',
function (data) {
......@@ -247,7 +247,7 @@
area: ['1000px', '500px'],
id: 'LAY-popup-CoreCmsStock-details',
success: function (layero, index) {
view(this.id).render('content/stock/stocks/details', { data: e.data }).done(function () {
view(this.id).render('stock/stocks/details', { data: e.data }).done(function () {
form.render();
});
// 禁止弹窗出现滚动条
......
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:3671",
"sslPort": 44368
}
},
{
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:5111",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"dotnetRunMessages": true,
"applicationUrl": "http://localhost:5111"
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:7130;http://localhost:5111",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"dotnetRunMessages": true,
"applicationUrl": "https://localhost:7130;http://localhost:5111"
},
"IIS Express": {
"commandName": "IISExpress",
......@@ -34,5 +25,14 @@
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
},
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:64330/",
"sslPort": 44343
}
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment