From 9821d970a3dafbd2197ced939aadfeb6ceb0b776 Mon Sep 17 00:00:00 2001 From: duan <1004387497@qq.com> Date: Fri, 13 Sep 2024 14:56:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=80=E5=94=AE=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http/businessHttp.js | 12 +- http/yskApi/requestAll.js | 20 + pageConsumables/index.vue | 269 +++++++++++ pageConsumables/inventoryCheck.vue | 149 ++++++ pageConsumables/outbound.vue | 168 +++++++ pageConsumables/warehouseEntry.vue | 168 +++++++ .../components/my-date-pickerview.vue | 448 ++++++++++++++++++ pageSalesSummary/index.vue | 346 ++++++++++++-- pageSalesSummary/productSalesRanking.vue | 87 ++++ pageSalesSummary/svg/bgimg.svg | 80 ++++ pages.json | 42 +- pages/index/index.vue | 5 + 12 files changed, 1760 insertions(+), 34 deletions(-) create mode 100644 http/yskApi/requestAll.js create mode 100644 pageConsumables/index.vue create mode 100644 pageConsumables/inventoryCheck.vue create mode 100644 pageConsumables/outbound.vue create mode 100644 pageConsumables/warehouseEntry.vue create mode 100644 pageSalesSummary/components/my-date-pickerview.vue create mode 100644 pageSalesSummary/productSalesRanking.vue create mode 100644 pageSalesSummary/svg/bgimg.svg diff --git a/http/businessHttp.js b/http/businessHttp.js index bef368b..2938964 100644 --- a/http/businessHttp.js +++ b/http/businessHttp.js @@ -2,12 +2,12 @@ * 因为两个小程序接口不一致,餐饮商超商家端的接口使用该http */ import useStorage from '@/commons/utils/useStroage.js' - +import go from '@/commons/utils/go.js'; // const baseURL = 'http://192.168.2.128:9000/cashierService' // const baseURL = 'http://192.168.2.41:9888/cashierService' let baseURL = 'https://wxcashiertest.sxczgkj.cn/cashierService' // #ifdef H5 -baseURL = '/shopApi' +baseURL = '/ysk' // #endif // const baseURL = 'https://cashier.sxczgkj.cn/cashierService' export default function(api = '', data = {}, method = 'GET') { @@ -20,7 +20,8 @@ export default function(api = '', data = {}, method = 'GET') { 'environment': 'wx', 'type': 'ios', 'version': '1.0.0', - 'token': useStorage.get('token'), + 'token': useStorage.get('iToken'), + 'Authorization': useStorage.get('iToken'), 'Content-Type': 'application/json' }, success: res => { @@ -31,6 +32,11 @@ export default function(api = '', data = {}, method = 'GET') { icon: 'none', "title": res.data.msg }) + if(res.data.code==-4){ + setTimeout(()=>{ + go.to('PAGES_LOGIN', {}, 'redirect') + },2000) + } reject(res.data.msg) } }, diff --git a/http/yskApi/requestAll.js b/http/yskApi/requestAll.js new file mode 100644 index 0000000..daa329c --- /dev/null +++ b/http/yskApi/requestAll.js @@ -0,0 +1,20 @@ +import http from './http.js' +const request = http.request +// 销售总会list +export function summaryTrade(data) { + return request({ + url: '/api/summary/trade', + method: 'post', + data: { + ...data + } + }) +} +// 销售排行榜 +export function dateProduct(params) { + return request({ + url: '/api/summary/dateProduct', + method: 'get', + params + }) +} \ No newline at end of file diff --git a/pageConsumables/index.vue b/pageConsumables/index.vue new file mode 100644 index 0000000..a8ad785 --- /dev/null +++ b/pageConsumables/index.vue @@ -0,0 +1,269 @@ + + + + + \ No newline at end of file diff --git a/pageConsumables/inventoryCheck.vue b/pageConsumables/inventoryCheck.vue new file mode 100644 index 0000000..ea1be64 --- /dev/null +++ b/pageConsumables/inventoryCheck.vue @@ -0,0 +1,149 @@ + + + + + + \ No newline at end of file diff --git a/pageConsumables/outbound.vue b/pageConsumables/outbound.vue new file mode 100644 index 0000000..32e9134 --- /dev/null +++ b/pageConsumables/outbound.vue @@ -0,0 +1,168 @@ + + + + + + \ No newline at end of file diff --git a/pageConsumables/warehouseEntry.vue b/pageConsumables/warehouseEntry.vue new file mode 100644 index 0000000..4f62122 --- /dev/null +++ b/pageConsumables/warehouseEntry.vue @@ -0,0 +1,168 @@ + + + + + + \ No newline at end of file diff --git a/pageSalesSummary/components/my-date-pickerview.vue b/pageSalesSummary/components/my-date-pickerview.vue new file mode 100644 index 0000000..df67817 --- /dev/null +++ b/pageSalesSummary/components/my-date-pickerview.vue @@ -0,0 +1,448 @@ + + + + + \ No newline at end of file diff --git a/pageSalesSummary/index.vue b/pageSalesSummary/index.vue index 9004904..3b062f7 100644 --- a/pageSalesSummary/index.vue +++ b/pageSalesSummary/index.vue @@ -1,42 +1,332 @@ - - \ No newline at end of file diff --git a/pageSalesSummary/productSalesRanking.vue b/pageSalesSummary/productSalesRanking.vue new file mode 100644 index 0000000..8168838 --- /dev/null +++ b/pageSalesSummary/productSalesRanking.vue @@ -0,0 +1,87 @@ + + + + + \ No newline at end of file diff --git a/pageSalesSummary/svg/bgimg.svg b/pageSalesSummary/svg/bgimg.svg new file mode 100644 index 0000000..86852d5 --- /dev/null +++ b/pageSalesSummary/svg/bgimg.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pages.json b/pages.json index 1fb827e..5c0de9d 100644 --- a/pages.json +++ b/pages.json @@ -1225,8 +1225,45 @@ "style": { "navigationBarTitleText": "销售汇总" } + },{ + "pageId": "PAGES_PRODUCT_SALES_RANKING", + "path": "productSalesRanking", + "style": { + "navigationBarTitleText": "商品销售排行" + } + } + + ] + }, + { + "root": "pageConsumables", + "pages": [{ + "pageId": "PAGES_SALES_CONSUMABLES", + "path": "index", + "style": { + "navigationBarTitleText": "耗材管理" + } + }, { + "pageId": "PAGES_SALES_WAREHOUSEENTRY", + "path": "warehouseEntry", + "style": { + "navigationBarTitleText": "入库" + } + }, { + "pageId": "PAGES_SALES_OUTBOUND", + "path": "outbound", + "style": { + "navigationBarTitleText": "出库" + } + }, { + "pageId": "PAGES_SALES_INVENTORYCHECK", + "path": "inventoryCheck", + "style": { + "navigationBarTitleText": "盘点" + } }] }, + { "root": "pagePrinter", "pages": [{ @@ -1248,7 +1285,7 @@ "pageId": "PAGES_PRINTER_EDIT", "path": "index/editPrinter", "style": { - "navigationBarTitleText" : "打印机编辑" + "navigationBarTitleText": "打印机编辑" } } @@ -1276,8 +1313,7 @@ "spacing": "5px", "height": "58px", "backgroundColor": "#FCFCFC", - "list": [ - { + "list": [{ "pagePath": "pages/index/index", "iconPath": "static/tabImg/index.png", "selectedIconPath": "static/tabImg/index-select.png", diff --git a/pages/index/index.vue b/pages/index/index.vue index 563c10e..b517ee0 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -186,6 +186,11 @@ title: '销售汇总', icon: '/static/indexImg/PAGE_SALES_SUMMARY.svg', pageUrl: 'PAGES_SALES_SUMMARY' + }, + { + title: '耗材管理', + icon: '/static/indexImg/PAGE_SALES_SUMMARY.svg', + pageUrl: 'PAGES_SALES_CONSUMABLES' } ];