From 13a39e1b13c706c27ac334682b1976182a961d50 Mon Sep 17 00:00:00 2001 From: GaoHao <1210693421@qq.com> Date: Wed, 2 Apr 2025 11:49:08 +0800 Subject: [PATCH 01/51] =?UTF-8?q?=E5=AF=BC=E8=88=AA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sidebar/components/SidebarLogo.vue | 20 +++- src/router/index.ts | 33 ------- src/views/shop/list/index.vue | 95 ++++++++----------- 3 files changed, 58 insertions(+), 90 deletions(-) diff --git a/src/layout/components/Sidebar/components/SidebarLogo.vue b/src/layout/components/Sidebar/components/SidebarLogo.vue index 4aa6d74..1a2fc92 100644 --- a/src/layout/components/Sidebar/components/SidebarLogo.vue +++ b/src/layout/components/Sidebar/components/SidebarLogo.vue @@ -3,7 +3,22 @@ - {{ userStore.userInfo.shopName }} + + + + {{ userStore.userInfo.shopName }} + + + + + + @@ -30,7 +45,8 @@ defineProps({ background-color: $sidebar-logo-background; .title { - flex-shrink: 0; /* 防止容器在空间不足时缩小 */ + flex-shrink: 0; + /* 防止容器在空间不足时缩小 */ margin-left: 10px; font-size: 16px; color: #5a5e66; diff --git a/src/router/index.ts b/src/router/index.ts index e85ecdb..8d57ace 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -63,38 +63,6 @@ export const constantRoutes: RouteRecordRaw[] = [ keepAlive: true, }, }, - { - path: "credit", - name: "", - component: () => import("@/views/data/credit/index.vue"), - meta: { - title: "挂账管理", - affix: false, - keepAlive: true, - - }, - }, - { - path: "credit-detail", - name: "", - component: () => import("@/views/data/credit/detail.vue"), - meta: { - title: "挂账明细", - affix: false, - keepAlive: true, - hidden: true - }, - }, - { - path: "work", - name: "", - component: () => import("@/views/data/work.vue"), - meta: { - title: "交班记录", - affix: false, - keepAlive: true, - }, - }, { path: "401", component: () => import("@/views/error/401.vue"), @@ -473,7 +441,6 @@ export const constantRoutes: RouteRecordRaw[] = [ // /**列表end */ - // ], // }, // { diff --git a/src/views/shop/list/index.vue b/src/views/shop/list/index.vue index a084d3d..efaff9a 100644 --- a/src/views/shop/list/index.vue +++ b/src/views/shop/list/index.vue @@ -3,33 +3,16 @@
- + - + - + @@ -42,33 +25,31 @@ 添加店铺
- + - + - - - - + + + + @@ -106,17 +88,23 @@ @@ -185,6 +182,8 @@ export default { downloadLoading: false, payCount: "", payCountTotal: 0, + storeList: [{ label: "门店1", value: 1 }], + storeId: null, }; }, filters: { diff --git a/src/views/product/index.vue b/src/views/product/index.vue index 041d104..1136ea5 100644 --- a/src/views/product/index.vue +++ b/src/views/product/index.vue @@ -301,10 +301,13 @@ async function handleEditClick(row: IObject) { // 其他工具栏 function handleToolbarClick(name: string) { console.log(name); - if (name === "custom1") { + if ( name === "custom1" ) { // ElMessage.success("点击了自定义1按钮"); myDialogRef.value.open(); } + if ( name === "custom2" ) { //商品同步 + + } } async function confirm() { let res = await UserAPI.stockWarning(form.warnLine) diff --git a/src/views/product/indexconfig/content.ts b/src/views/product/indexconfig/content.ts index efd789d..1ff4f71 100644 --- a/src/views/product/indexconfig/content.ts +++ b/src/views/product/indexconfig/content.ts @@ -66,6 +66,13 @@ const contentConfig: IContentConfig = { name: "custom1", auth: "import", }, + { + icon: "refresh", + text: "同步", + type: "danger", + name: "custom2", + auth: "import", + }, ], cols: [ // { type: "selection", width: 50, align: "center" }, diff --git a/src/views/shop/branchStore/components/activateCode.vue b/src/views/shop/branchStore/components/activateCode.vue new file mode 100644 index 0000000..7b77d78 --- /dev/null +++ b/src/views/shop/branchStore/components/activateCode.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/src/views/shop/branchStore/components/addShop.vue b/src/views/shop/branchStore/components/addShop.vue new file mode 100644 index 0000000..433a32b --- /dev/null +++ b/src/views/shop/branchStore/components/addShop.vue @@ -0,0 +1,531 @@ + + + + + \ No newline at end of file diff --git a/src/views/shop/branchStore/components/detailModal.vue b/src/views/shop/branchStore/components/detailModal.vue new file mode 100644 index 0000000..da4a678 --- /dev/null +++ b/src/views/shop/branchStore/components/detailModal.vue @@ -0,0 +1,156 @@ + + + + + \ No newline at end of file diff --git a/src/views/shop/branchStore/index.vue b/src/views/shop/branchStore/index.vue new file mode 100644 index 0000000..8ba25d3 --- /dev/null +++ b/src/views/shop/branchStore/index.vue @@ -0,0 +1,142 @@ + + + + + diff --git a/src/views/shop/list/components/addShop.vue b/src/views/shop/list/components/addShop.vue index 44f3395..433a32b 100644 --- a/src/views/shop/list/components/addShop.vue +++ b/src/views/shop/list/components/addShop.vue @@ -1,17 +1,7 @@ + + + diff --git a/src/views/finance/supplierBill/index.vue b/src/views/finance/supplierBill/index.vue new file mode 100644 index 0000000..74b06c0 --- /dev/null +++ b/src/views/finance/supplierBill/index.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/src/views/finance/supplierBill/paymentRecord.vue b/src/views/finance/supplierBill/paymentRecord.vue new file mode 100644 index 0000000..d8f1b87 --- /dev/null +++ b/src/views/finance/supplierBill/paymentRecord.vue @@ -0,0 +1,131 @@ + + + + + diff --git a/src/views/inventory/consumables/components/add-haocai copy.vue b/src/views/inventory/consumables/components/add-haocai copy.vue deleted file mode 100644 index f4a6d8c..0000000 --- a/src/views/inventory/consumables/components/add-haocai copy.vue +++ /dev/null @@ -1,197 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/views/product/indexconfig/content.ts b/src/views/product/indexconfig/content.ts index 1ff4f71..9598603 100644 --- a/src/views/product/indexconfig/content.ts +++ b/src/views/product/indexconfig/content.ts @@ -59,13 +59,6 @@ const contentConfig: IContentConfig = { pk: "id", toolbar: [ "add", - { - icon: "edit", - text: "库存预警", - type: "info", - name: "custom1", - auth: "import", - }, { icon: "refresh", text: "同步", @@ -73,6 +66,14 @@ const contentConfig: IContentConfig = { name: "custom2", auth: "import", }, + { + icon: "edit", + text: "库存预警", + type: "info", + name: "custom1", + auth: "import", + }, + ], cols: [ // { type: "selection", width: 50, align: "center" }, diff --git a/src/views/shop/branchStore/components/activateCode.vue b/src/views/shop/branchStore/components/activateCode.vue deleted file mode 100644 index 7b77d78..0000000 --- a/src/views/shop/branchStore/components/activateCode.vue +++ /dev/null @@ -1,60 +0,0 @@ - - - \ No newline at end of file diff --git a/src/views/shop/branchStore/components/addShop.vue b/src/views/shop/branchStore/components/addShop.vue deleted file mode 100644 index 433a32b..0000000 --- a/src/views/shop/branchStore/components/addShop.vue +++ /dev/null @@ -1,531 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/views/shop/branchStore/components/detailModal.vue b/src/views/shop/branchStore/components/detailModal.vue deleted file mode 100644 index da4a678..0000000 --- a/src/views/shop/branchStore/components/detailModal.vue +++ /dev/null @@ -1,156 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/views/shop/branchStore/index.vue b/src/views/shop/branchStore/index.vue index 8ba25d3..668ecf7 100644 --- a/src/views/shop/branchStore/index.vue +++ b/src/views/shop/branchStore/index.vue @@ -19,33 +19,42 @@ - + - + - + - + - + + + + + @@ -108,6 +117,21 @@ async function getTableData() { console.log(error); } } +function handleSync(e) { + console.log(e) + ElMessageBox.confirm(`同步功能开启后不能关闭,请确认是否给${e.shopName}开启同步?`, "提示", { + confirmButtonText: "确认", + cancelButtonText: "取消", + type: "warning", + }).then(async () => { + const res = await ShopApi.delete({ id: row.id }); + ElMessage({ + type: "success", + message: "同步成功", + }); + getTableData(); + }).catch(() => { }); +} // 重置查询 function resetHandle() { state.query.name = ""; From 95f22ede1dd81b51786d0919f0b73a3fd71cc4e9 Mon Sep 17 00:00:00 2001 From: wwz <1144797966@qq.com> Date: Mon, 7 Apr 2025 18:13:52 +0800 Subject: [PATCH 05/51] =?UTF-8?q?feat:=20=E8=80=97=E6=9D=90=E8=A1=A5?= =?UTF-8?q?=E5=85=85=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/product/libraryrecords.ts | 51 +++ src/components/CURD/PageContent.vue | 300 +++++++++++++----- .../consumables/components/DataStatistics.vue | 5 +- .../inventory/consumables/config/content.ts | 50 ++- src/views/inventory/consumables/index.vue | 50 ++- .../inventory/libraryrecords/config/add.ts | 77 +++++ .../inventory/libraryrecords/config/config.ts | 46 +++ .../libraryrecords/config/content.ts | 90 ++++++ .../inventory/libraryrecords/config/edit.ts | 75 +++++ .../inventory/libraryrecords/config/search.ts | 58 ++++ src/views/inventory/libraryrecords/index.vue | 117 +++++++ src/views/inventory/operation_in/index.vue | 92 ++---- 12 files changed, 847 insertions(+), 164 deletions(-) create mode 100644 src/api/product/libraryrecords.ts create mode 100644 src/views/inventory/libraryrecords/config/add.ts create mode 100644 src/views/inventory/libraryrecords/config/config.ts create mode 100644 src/views/inventory/libraryrecords/config/content.ts create mode 100644 src/views/inventory/libraryrecords/config/edit.ts create mode 100644 src/views/inventory/libraryrecords/config/search.ts create mode 100644 src/views/inventory/libraryrecords/index.vue diff --git a/src/api/product/libraryrecords.ts b/src/api/product/libraryrecords.ts new file mode 100644 index 0000000..fda0371 --- /dev/null +++ b/src/api/product/libraryrecords.ts @@ -0,0 +1,51 @@ +import request from "@/utils/request"; +import { Product_BaseUrl } from "@/api/config"; +const baseURL = Product_BaseUrl + "/admin/product"; +// 供应商 +const Api = { + /** 耗材库存变动记录*/ + getList(params: any) { + return request({ + url: `${baseURL}/stock/flow`, + method: "get", + params, + }); + }, + /** 全部*/ + getAllList(params: any) { + return request({ + url: `${baseURL}/list`, + method: "get", + params, + }); + }, + get(id: string | number) { + return request({ + url: `${baseURL}/` + id, + method: "get", + }); + }, + add(data: any) { + return request({ + url: `${baseURL}`, + method: "post", + data, + }); + }, + edit(data: any) { + return request({ + url: `${baseURL}`, + method: "put", + data, + }); + }, + + delete(id: string | number) { + return request({ + url: `${baseURL}/` + id, + method: "delete", + }); + }, +}; + +export default Api; diff --git a/src/components/CURD/PageContent.vue b/src/components/CURD/PageContent.vue index 741f9a3..2572232 100644 --- a/src/components/CURD/PageContent.vue +++ b/src/components/CURD/PageContent.vue @@ -8,37 +8,58 @@ @@ -67,36 +88,68 @@
- + @@ -191,56 +263,82 @@