diff --git a/src/router/index.js b/src/router/index.js index dbd2c01..d918924 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -97,6 +97,9 @@ const mainRoutes = { { path: '/statisticsBusiness-courseStatistics', component: _import('modules/statisticsBusiness/courseStatistics/index'), name: 'statisticsBusiness-courseStatistics', meta: { title: '课程统计', isTab: true } }, { path: '/statisticsBusiness-vipStatistics', component: _import('modules/statisticsBusiness/vipStatistics/index'), name: 'statisticsBusiness-vipStatistics', meta: { title: 'VIP统计', isTab: true } }, { path: '/statisticsBusiness-userStatistics', component: _import('modules/statisticsBusiness/userStatistics/index'), name: 'statisticsBusiness-userStatistics', meta: { title: '用户统计', isTab: true } }, + { path: '/inventoryManagement-stockInRecord', component: _import('modules/inventoryManagement/stockInRecord'), name: 'inventoryManagement-stockInRecord', meta: { title: '入库记录', isTab: true } }, + { path: '/inventoryManagement-stockOutRecord', component: _import('modules/inventoryManagement/stockOutRecord'), name: 'inventoryManagement-stockOutRecord', meta: { title: '出库记录', isTab: true } }, + { path: '/inventoryManagement-inventoryManage', component: _import('modules/inventoryManagement/inventoryManage'), name: 'inventoryManagement-inventoryManage', meta: { title: '库存管理', isTab: true } }, ], beforeEnter (to, from, next) { let token = Vue.cookie.get('token') diff --git a/src/views/common/home.vue b/src/views/common/home.vue index f587215..353782e 100644 --- a/src/views/common/home.vue +++ b/src/views/common/home.vue @@ -21,6 +21,17 @@ + + + + 库存预警 + {{ stockAlertNum }} + + 去处理 + + + + @@ -50,6 +61,7 @@ export default { medicalNum2: 0, orderNum: 0, workOrderNum: 0, + stockAlertNum: 0, // loadAll:true, loaded: 0 }; @@ -58,6 +70,7 @@ export default { this.getMedicalList(); this.getDataList(); this.getWorkDataList(); + this.getStockAlertCount(); }, methods: { // 待发出列表 @@ -140,12 +153,38 @@ export default { }).then(({ data }) => { this.medicalNum2 = data.page.total; }); + }, + getStockAlertCount() { + Promise.all([1, 2].map(merchantId => + this.$http.request({ + url: this.$http.adornUrl('/master/inventoryManagement/stockStatistics'), + method: 'POST', + data: { + merchantId, + current: 1, + limit: 1, + isAlert: 1 + }, + header: { 'Content-Type': 'application/json' } + }) + )).then(results => { + this.stockAlertNum = results.reduce((sum, { data }) => { + if (data && data.code === 0) { + return sum + (data.result.total || 0) + } + return sum + }, 0) + this.loaded += 1 + }).catch(() => { + this.$message.error('获取库存预警数量失败') + this.loaded += 1 + }) } }, computed: { loadAll() { console.log("this.loaded", this.loaded); - if (this.loaded == 2) { + if (this.loaded == 3) { return false; } else { return true; diff --git a/src/views/modules/inventoryManagement/components/batchOutboundDialog.vue b/src/views/modules/inventoryManagement/components/batchOutboundDialog.vue new file mode 100644 index 0000000..0ec7191 --- /dev/null +++ b/src/views/modules/inventoryManagement/components/batchOutboundDialog.vue @@ -0,0 +1,183 @@ + + + diff --git a/src/views/modules/inventoryManagement/components/productRemoteSelect.vue b/src/views/modules/inventoryManagement/components/productRemoteSelect.vue new file mode 100644 index 0000000..402f068 --- /dev/null +++ b/src/views/modules/inventoryManagement/components/productRemoteSelect.vue @@ -0,0 +1,133 @@ + + + diff --git a/src/views/modules/inventoryManagement/components/purchaseDialog.vue b/src/views/modules/inventoryManagement/components/purchaseDialog.vue new file mode 100644 index 0000000..cea058d --- /dev/null +++ b/src/views/modules/inventoryManagement/components/purchaseDialog.vue @@ -0,0 +1,289 @@ + + + + + diff --git a/src/views/modules/inventoryManagement/components/stockRecordList.vue b/src/views/modules/inventoryManagement/components/stockRecordList.vue new file mode 100644 index 0000000..055fc21 --- /dev/null +++ b/src/views/modules/inventoryManagement/components/stockRecordList.vue @@ -0,0 +1,225 @@ + + + + + diff --git a/src/views/modules/inventoryManagement/inventoryManage.vue b/src/views/modules/inventoryManagement/inventoryManage.vue new file mode 100644 index 0000000..34d7d84 --- /dev/null +++ b/src/views/modules/inventoryManagement/inventoryManage.vue @@ -0,0 +1,237 @@ + + + + + diff --git a/src/views/modules/inventoryManagement/stockInRecord.vue b/src/views/modules/inventoryManagement/stockInRecord.vue new file mode 100644 index 0000000..6eb0863 --- /dev/null +++ b/src/views/modules/inventoryManagement/stockInRecord.vue @@ -0,0 +1,11 @@ + + + diff --git a/src/views/modules/inventoryManagement/stockOutRecord.vue b/src/views/modules/inventoryManagement/stockOutRecord.vue new file mode 100644 index 0000000..41bc5d9 --- /dev/null +++ b/src/views/modules/inventoryManagement/stockOutRecord.vue @@ -0,0 +1,11 @@ + + + diff --git a/src/views/modules/shop/curriculum.vue b/src/views/modules/shop/curriculum.vue index d5a0e40..4879173 100644 --- a/src/views/modules/shop/curriculum.vue +++ b/src/views/modules/shop/curriculum.vue @@ -122,6 +122,7 @@ diff --git a/src/views/modules/shop/shopproduct-add-or-update.vue b/src/views/modules/shop/shopproduct-add-or-update.vue index 48cf741..edecb29 100644 --- a/src/views/modules/shop/shopproduct-add-or-update.vue +++ b/src/views/modules/shop/shopproduct-add-or-update.vue @@ -172,6 +172,7 @@ @@ -323,7 +324,7 @@ export default { showBtnDealImg: true, noneBtnImg: false, productName: "", - productStock: null, // 商品库存 + productStock: 0, // 商品库存 price: "", author: "", publisher: "", diff --git a/src/views/modules/shop/shopproduct.vue b/src/views/modules/shop/shopproduct.vue index 075da36..5575709 100644 --- a/src/views/modules/shop/shopproduct.vue +++ b/src/views/modules/shop/shopproduct.vue @@ -210,13 +210,6 @@ @showchooseBookf="showchooseBookf" > - - diff --git a/src/views/modules/sys/menu-add-or-update.vue b/src/views/modules/sys/menu-add-or-update.vue index 61e3594..4a82c44 100644 --- a/src/views/modules/sys/menu-add-or-update.vue +++ b/src/views/modules/sys/menu-add-or-update.vue @@ -16,17 +16,20 @@ - - + trigger="click" + popper-class="mod-menu__tree-popover"> +
+ + +
@@ -228,6 +231,14 @@ width: 458px; overflow: hidden; } + &__tree-popover { + overflow: hidden; + } + &__tree-inner { + max-height: 300px; + overflow-x: hidden; + overflow-y: auto; + } &__icon-inner { width: 478px; max-height: 258px;