From 6d20a5648c7e882e105edb23b5d565d64e03a68e Mon Sep 17 00:00:00 2001 From: yezhenman <691226925@qq.com> Date: Fri, 12 Aug 2022 18:26:27 +0800 Subject: [PATCH] =?UTF-8?q?2022-8-12-=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/frontend/src/App.vue | 12 +- resources/frontend/src/UploadExcel/index.vue | 9 + resources/frontend/src/api/goods.js | 63 +- resources/frontend/src/api/record.js | 11 + resources/frontend/src/api/role.js | 35 + resources/frontend/src/api/shop.js | 35 +- resources/frontend/src/api/user.js | 45 + .../frontend/src/components/upload/index.vue | 119 +- resources/frontend/src/css/img/编辑.png | Bin 0 -> 348 bytes resources/frontend/src/css/img/编辑@2x.png | Bin 0 -> 560 bytes resources/frontend/src/main.js | 28 +- resources/frontend/src/router/index.js | 16 +- resources/frontend/src/router/index1.js | 87 +- resources/frontend/src/util/auth.js | 14 +- resources/frontend/src/util/http.js | 64 +- .../src/views/{logo.vue => Login.vue} | 56 +- resources/frontend/src/views/brand/brand.vue | 48 +- resources/frontend/src/views/home/home.vue | 40 +- .../frontend/src/views/home/home/cesi.vue | 33 +- .../frontend/src/views/home/home/index.vue | 231 ++-- resources/frontend/src/views/index.vue | 155 ++- resources/frontend/src/views/shuju/record.vue | 273 +++-- resources/frontend/src/views/shuju/shuju.vue | 12 +- resources/frontend/src/views/store/store.vue | 56 +- .../frontend/src/views/system/authority.vue | 13 +- resources/frontend/src/views/system/role.vue | 102 +- resources/frontend/src/views/users/users.vue | 151 +-- .../views/yingyeting/addgoods/addgoods.vue | 254 ++++- .../src/views/yingyeting/yingyeting.vue | 1002 ++++++++++++++--- 29 files changed, 1922 insertions(+), 1042 deletions(-) create mode 100644 resources/frontend/src/UploadExcel/index.vue create mode 100644 resources/frontend/src/api/record.js create mode 100644 resources/frontend/src/api/role.js create mode 100644 resources/frontend/src/api/user.js create mode 100644 resources/frontend/src/css/img/编辑.png create mode 100644 resources/frontend/src/css/img/编辑@2x.png rename resources/frontend/src/views/{logo.vue => Login.vue} (77%) diff --git a/resources/frontend/src/App.vue b/resources/frontend/src/App.vue index cea2c13..32c7597 100644 --- a/resources/frontend/src/App.vue +++ b/resources/frontend/src/App.vue @@ -4,13 +4,13 @@ diff --git a/resources/frontend/src/UploadExcel/index.vue b/resources/frontend/src/UploadExcel/index.vue new file mode 100644 index 0000000..6871671 --- /dev/null +++ b/resources/frontend/src/UploadExcel/index.vue @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/resources/frontend/src/api/goods.js b/resources/frontend/src/api/goods.js index fe04f9f..5418ce0 100644 --- a/resources/frontend/src/api/goods.js +++ b/resources/frontend/src/api/goods.js @@ -1,40 +1,59 @@ -import http from '@/util/http.js' +import http from "@/util/http.js"; // 商品管理列表 -export function goods (data) { +export function goods(params) { return http({ - url: '/api/goods_skus', - method: 'get', - data - }) + url: "/api/goods_skus", + method: "get", + params, + }); } // 新建商品 -export function addGoods (data) { +export function addGoods(data) { return http({ - url: '/api/goods', - method: 'post', - data - }) + url: "/api/goods", + method: "post", + data, + }); } // 查看商品 -export function checkGoods (id) { +export function checkGoods(id) { return http({ url: `/api/goods_skus/${id}`, - method: 'get' - }) + method: "get", + }); } // 商品列表 -export function goodsList () { +export function goodsList(params) { return http({ - url: '/api/goods', - method: 'get' - }) + url: "/api/goods", + method: "get", + params, + }); } // 更新商品 -export function updateGoods (id, data) { +export function updateGoods(id, params) { return http({ url: `/api/goods_skus/${id}`, - method: 'patch', - data - }) + method: "patch", + params, + }); +} + +// 上新/库存盘点/库存 +export function update(data) { + return http({ + url: "/api/batch/goods_skus", + method: "patch", + data, + }); +} + +// 单个字段更新 +export function singleUpdate(id, data) { + return http({ + url: `/api/single/goods_skus/${id}`, + method: "patch", + data, + }); } diff --git a/resources/frontend/src/api/record.js b/resources/frontend/src/api/record.js new file mode 100644 index 0000000..56a9069 --- /dev/null +++ b/resources/frontend/src/api/record.js @@ -0,0 +1,11 @@ +import http from "@/util/http.js"; + +// 单品日志记录请求 + +export function recordList(params) { + return http({ + url: "/api/logs", + method: "get", + params, + }); +} diff --git a/resources/frontend/src/api/role.js b/resources/frontend/src/api/role.js new file mode 100644 index 0000000..b302181 --- /dev/null +++ b/resources/frontend/src/api/role.js @@ -0,0 +1,35 @@ +import http from "@/util/http.js"; + +// 角色管理页面请求 +export function roleList() { + return http({ + url: "/api/roles", + method: "get", + }); +} + +// 角色新增请求 +export function roleAdd(data) { + return http({ + url: "/api/roles", + method: "post", + data, + }); +} + +// 角色权限列表请求 +export function jurisdiction() { + return http({ + url: "/api/permissions", + method: "get", + }); +} + +// 角色权限编辑 +export function jurisdictionEdit(id, data) { + return http({ + url: `/api/roles/${id}/permissions`, + method: "post", + data, + }); +} diff --git a/resources/frontend/src/api/shop.js b/resources/frontend/src/api/shop.js index 4faadf3..9056e8c 100644 --- a/resources/frontend/src/api/shop.js +++ b/resources/frontend/src/api/shop.js @@ -1,24 +1,27 @@ -import http from '@/util/http.js' -// 店铺平台列表 -export function shopListId () { +import http from "@/util/http.js"; + +// 店铺管理页面请求 + +// 店铺平台 +export function shopListId() { return http({ - url: '/api/shop_platforms', - method: 'get' - }) + url: "/api/shop_platforms", + method: "get", + }); } // 店铺新增 -export function shopAdd (data) { +export function shopAdd(data) { return http({ - url: '/api/shops', - method: 'post', - data - }) + url: "/api/shops", + method: "post", + data, + }); } // 店铺列表 -export function storeList (data) { +export function storeList(data) { return http({ - url: '/api/shops', - method: 'get', - data - }) + url: "/api/shops", + method: "get", + data, + }); } diff --git a/resources/frontend/src/api/user.js b/resources/frontend/src/api/user.js new file mode 100644 index 0000000..1190d1a --- /dev/null +++ b/resources/frontend/src/api/user.js @@ -0,0 +1,45 @@ +import http from "@/util/http.js"; + +//用户管理列表请求 + +// 角色列表请求 +export function roleList() { + return http({ + url: "/api/roles", + method: "get", + }); +} + +//用户列表请求 +export function userList() { + return http({ + url: "/api/users", + method: "get", + }); +} + +//用户新增请求 +export function userAdd(data) { + return http({ + url: "/api/users", + method: "post", + data, + }); +} + +// 用户管理点击编辑请求 +export function userEdit(id) { + return http({ + url: `/api/users/${id}`, + method: "get", + }); +} + +//编辑完确认请求 +export function userConfirm(id, data) { + return http({ + url: `/api/users/${id}`, + method: "patch", + data, + }); +} diff --git a/resources/frontend/src/components/upload/index.vue b/resources/frontend/src/components/upload/index.vue index 4db0117..642e85a 100644 --- a/resources/frontend/src/components/upload/index.vue +++ b/resources/frontend/src/components/upload/index.vue @@ -8,40 +8,41 @@ --> - + - - + + - - diff --git a/resources/frontend/src/views/shuju/shuju.vue b/resources/frontend/src/views/shuju/shuju.vue index bfd1b1d..6d15743 100644 --- a/resources/frontend/src/views/shuju/shuju.vue +++ b/resources/frontend/src/views/shuju/shuju.vue @@ -118,15 +118,15 @@ export default { methods: { //请求列表数据 getList() { + let token = localStorage.getItem("token"); + let data = { + page: this.current_page, + per_page: this.per_page, + }; axios .get("/api/logs", { headers: { - Authorization: - "Bearer w1rr6IsxZIud46dIrGIivNAroFpqN52sSpXhk3azpPq2ZTbUXhgKTOLheoRm", - }, - params: { - page: this.current_page, - per_page: this.per_page, + Authorization: `Bearer ${token}`, }, }) .then((res) => { diff --git a/resources/frontend/src/views/store/store.vue b/resources/frontend/src/views/store/store.vue index 973195e..9fff42c 100644 --- a/resources/frontend/src/views/store/store.vue +++ b/resources/frontend/src/views/store/store.vue @@ -10,15 +10,13 @@ - - + + - 编辑 - 授权 + {{ scope.row.status }} @@ -65,8 +63,7 @@ diff --git a/resources/frontend/src/views/system/authority.vue b/resources/frontend/src/views/system/authority.vue index 632cc7b..d8e60e1 100644 --- a/resources/frontend/src/views/system/authority.vue +++ b/resources/frontend/src/views/system/authority.vue @@ -1,22 +1,19 @@ - - 权限管理(废弃) - + 权限管理(已废弃) - + diff --git a/resources/frontend/src/views/system/role.vue b/resources/frontend/src/views/system/role.vue index d9191ef..b60db10 100644 --- a/resources/frontend/src/views/system/role.vue +++ b/resources/frontend/src/views/system/role.vue @@ -29,7 +29,11 @@ - + + + {{ scope.row.permissions.join(",") }} + + 编辑 @@ -60,7 +64,12 @@ @@ -372,13 +516,15 @@ export default { } .addto { display: inline-block; - width: 28px; - height: 28px; + width: 30px; + height: 30px; background-color: blue; color: #fff; font-size: 25px; text-align: center; - line-height: 28px; + line-height: 30px; + border-radius: 5px; + margin-top: 4px; } /* .btn { text-align: center; diff --git a/resources/frontend/src/views/yingyeting/yingyeting.vue b/resources/frontend/src/views/yingyeting/yingyeting.vue index 44d7867..8bf65eb 100644 --- a/resources/frontend/src/views/yingyeting/yingyeting.vue +++ b/resources/frontend/src/views/yingyeting/yingyeting.vue @@ -3,9 +3,9 @@ - + - + @@ -35,10 +35,6 @@ - - - - - - + + + + - 筛选 - 重置筛选 + 筛选 + 重置筛选 @@ -74,22 +72,135 @@ - 全部商品(共{{ total }}条) + 全部商品(共{{ total }}条) 新建商品 - 上新 - 库存盘点 - 上新 + 库存盘点 + 导入商品 - 表格导出 + + + 您确定要上新吗? + + 取 消 + 确 定 + + + + + + 您确定要开始库存盘点吗? + + 取 消 + 确 定 + + + + + + 您确定要修改吗? + + 取 消 + 确 定 + + + + + + 您确定要修改吗? + + 取 消 + 确 定 + + + + + + + 选择: + + + + + + + + + 取 消 + 确 定 + + + + + + + + + + + + + + + + + + + 下载模板 + + + + - - + + + - {{ scope.row.goods.img_url }} - {{ scope.row.goods.title }} + + + + + {{ scope.row.goods.title }} + + {{ scope.row.goods.goods_code + "_" + scope.row.sku_code }} + + + {{ scope.row.goods.updated_at }} + + @@ -121,109 +245,261 @@ - + - + - - - - - - - - {{ - scope.row.daily != null - ? scope.row.daily.arrived_today_num - : 0 - }} - - - - - - - - - - - - - - - - - - - - - - - 损耗: - - - - 48h以上 - 到货错误 - 灰霉 - 长度 - 花朵 - 其他 - + + + + + + + {{ + scope.row.daily != null + ? scope.row.daily.arrived_today_num + : 0 + }} + + + + + + + + + + + {{ scope.row.cost != null ? scope.row.cost : 0 }} + + + + + + + + + + + {{ scope.row.reference_price }} + + + + + + + + + + + + + {{ scope.row.reserve }} + + + + + + + + + + + + {{ scope.row.daily.loss_num }} + + + 损耗: + + + 原因: + 48h以上 + 到货错误 + 灰霉 + 长度 + 花朵 + 其他 + - 保存 - 取消 - - - {{ scope.row.daily ? scope.row.daily.arrived_loss_num : 0 }} + 保存 + - + - + - {{ scope.row.daily ? scope.row.daily.inventory : 0 }} + + + + {{ scope.row.daily.inventory }} - + - 库存 + 库存 - 编辑 - 记录 + 记录 + + + + + + + + {{ scope.row.two_days_ago_num }} + + + + + + + + {{ scope.row.yesterday_num }} + + + + + + + + {{ scope.row.daily.arrived_today_num }} + + + + + + + + 取 消 + 确 定 + + - 确定 + + + 确定 + + + + + + @@ -346,24 +1003,53 @@ export default { position: relative; } -/deep/ .detail .el-button, -/deep/ .detail .el-button--primary { - width: 20px; - height: 20px; - line-height: 5px; -} -/deep/ .detail .el-input, -/deep/ .detail .el-input__inner { - width: 20px; - height: 20px; -} - -.goods { -} .table { margin-top: 40px; } .btn { float: right; } + +::v-deep .cell { + display: flex; + align-items: center; +} + +.commodityimg { + width: 59px; + height: 59px; + background: rgba(227, 227, 227, 0.39); + opacity: 1; + display: block; + margin-right: 12px; +} + +.confirmbtn { + width: 114px; + height: 44px; + border-radius: 3px; + margin-top: 21px; + margin-bottom: 8px; +} + +.import-right { + margin-top: 30px; +} + +.import-right a { + text-decoration: none; + color: black; +} + +::v-deep .btn11 { + padding: 0; + width: 14px; + height: 14px; +} + +
{{ scope.row.goods.title }}
+ {{ scope.row.goods.goods_code + "_" + scope.row.sku_code }} +
+ {{ scope.row.goods.updated_at }} +
损耗: