diff --git a/resources/frontend/src/api/dataCenter.js b/resources/frontend/src/api/dataCenter.js index 0451fc3..fb0163b 100644 --- a/resources/frontend/src/api/dataCenter.js +++ b/resources/frontend/src/api/dataCenter.js @@ -31,3 +31,11 @@ export function getGmvCount(params) { params }) } + +export function getLossStatistics(params) { + return http({ + url: "/api/data_center/loss_record_statistics", + method: "get", + params + }) +} diff --git a/resources/frontend/src/api/goods.js b/resources/frontend/src/api/goods.js index 91d9dba..c4bf441 100644 --- a/resources/frontend/src/api/goods.js +++ b/resources/frontend/src/api/goods.js @@ -186,4 +186,12 @@ export function delGoodsCombination(id) { url: "/api/goods_combination/" + id, method: "delete", }); -} \ No newline at end of file +} + +export function updateSaleStock(data) { + return http({ + url: `/api/batch/goods_skus`, + method: "patch", + data + }) +} diff --git a/resources/frontend/src/api/role.js b/resources/frontend/src/api/role.js index b302181..cc430a8 100644 --- a/resources/frontend/src/api/role.js +++ b/resources/frontend/src/api/role.js @@ -33,3 +33,10 @@ export function jurisdictionEdit(id, data) { data, }); } + +export function getRoleInfo() { + return http({ + url: "/api/user/user_roles", + method: "get" + }) +} diff --git a/resources/frontend/src/api/supplyChain.js b/resources/frontend/src/api/supplyChain.js index 91b3b91..d744357 100644 --- a/resources/frontend/src/api/supplyChain.js +++ b/resources/frontend/src/api/supplyChain.js @@ -47,6 +47,14 @@ export function addPurchaseLog(data) { }) } +export function batchAddPurchaseLog(data) { + return http({ + url: "/api/purchase_record/purchase_batch_store", + method: "post", + data + }) +} + export function updatePurchaseLog(id, data) { return http({ url: `/api/supplier/purchase_record/${id}`, @@ -71,6 +79,14 @@ export function addLossLog(data) { }) } +export function batchAddLossLog(data) { + return http({ + url: "/api/loss_record/loss_batch_store", + method: "post", + data + }) +} + export function updateLossLog(id, data) { return http({ url: `/api/supplier/loss_record/${id}`, @@ -95,3 +111,11 @@ export function addDailyStock(data) { }) } +export function batchAddDailyStock(data) { + return http({ + url: "/api/daily_stock_record/inventory_batch_store", + method: "post", + data + }) +} + diff --git a/resources/frontend/src/router/list.js b/resources/frontend/src/router/list.js index 7bd5439..31931fa 100644 --- a/resources/frontend/src/router/list.js +++ b/resources/frontend/src/router/list.js @@ -122,14 +122,19 @@ const list = [ }, { path: "spu_sale_statistics", - name: "spu销售统计", + name: "品种销售统计", component: () => import("../views/dataCenter/spuStatistics.vue"), }, { path: "gmv_statistics", - name: "spu销售统计", + name: "交易趋势", component: () => import("../views/dataCenter/gmvStatistics.vue"), }, + { + path: "loss_record_statistics", + name: "报损统计", + component: () => import("../views/dataCenter/lossStatistics.vue"), + }, { path: "SUPPLIER_MANAGE", name: "供应商管理", diff --git a/resources/frontend/src/views/Login.vue b/resources/frontend/src/views/Login.vue index 2038332..057b767 100644 --- a/resources/frontend/src/views/Login.vue +++ b/resources/frontend/src/views/Login.vue @@ -6,22 +6,27 @@ ERP管理系统

登录

- -
- -
+
+ +
+
+ +
记住密码
- 登录 + 登 录 + + + \ No newline at end of file diff --git a/resources/frontend/src/views/dataCenter/skuStatistics.vue b/resources/frontend/src/views/dataCenter/skuStatistics.vue index fe44f99..b5e37d1 100644 --- a/resources/frontend/src/views/dataCenter/skuStatistics.vue +++ b/resources/frontend/src/views/dataCenter/skuStatistics.vue @@ -9,7 +9,7 @@ + + +
当前统计时间: @@ -99,7 +114,7 @@ export default { loading: false, time_type: 'day', timeTypeList: [ - { label: '自然日', value: 'day' }, + { label: '今日', value: 'day' }, { label: '自然周', value: 'week' }, { label: '自然月', value: 'month' }, { label: '近7天', value: 'seven' }, @@ -107,7 +122,7 @@ export default { { label: '自定义', value: 'custom' } ], TIMETYPE: { - 'day': '自然日', + 'day': '今日', 'week': '自然周', 'month': '自然月', 'seven': '近7天', @@ -125,7 +140,9 @@ export default { saleList: [], downloadLoading: false, autoWidth: true, - bookType: 'xlsx' + bookType: 'xlsx', + dayTimeList: [], + sku_id: '' } }, mounted() { @@ -134,13 +151,17 @@ export default { methods: { getInitList() { let time = this.getDayTime() - this.dayValue = this.startTime = this.endTime = time + this.startTime = time + ' 00:00:00' + this.endTime = time + ' 23:59:59' + this.dayTimeList = ['00:00:00', '23:59:59'] this.fetchData() }, changeTimeType() { if(this.time_type == 'day') { let time = this.getDayTime() - this.dayValue = this.startTime = this.endTime = time + this.startTime = time + ' 00:00:00' + this.endTime = time + ' 23:59:59' + this.dayTimeList = ['00:00:00', '23:59:59'] } else if(this.time_type == 'week') { this.dayValue = this.endTime = dayjs().format('YYYY-MM-DD') this.startTime = dayjs(this.getFirstDay(this.dayValue)).format('YYYY-MM-DD') @@ -165,10 +186,16 @@ export default { this.loading = true let params = { type: this.time_type == 'day' ? 1 : 2, - start_day: this.startTime, - end_day: this.endTime, page: this.page, - per_page: this.pageSize + per_page: this.pageSize, + sku_id: this.sku_id + } + if(params.type == 1) { + params.start_time = this.startTime + params.end_time = this.endTime + } else { + params.start_day = this.startTime + params.end_day = this.endTime } getSkuSalesCount(params).then((res) => { this.saleList = res.data.data.data @@ -223,6 +250,13 @@ export default { this.page = 1 this.fetchData() }, + changeTimePicker() { + let time = this.getDayTime() + this.startTime = time + ' ' + this.dayTimeList[0] + this.endTime = time + ' ' + this.dayTimeList[1] + this.page = 1 + this.fetchData() + }, handleSizeChange(val) { this.page = 1 this.pageSize = val diff --git a/resources/frontend/src/views/dataCenter/spuStatistics.vue b/resources/frontend/src/views/dataCenter/spuStatistics.vue index e81ea63..3241cdd 100644 --- a/resources/frontend/src/views/dataCenter/spuStatistics.vue +++ b/resources/frontend/src/views/dataCenter/spuStatistics.vue @@ -9,7 +9,7 @@ + + +
当前统计时间: @@ -82,7 +97,7 @@ export default { loading: false, time_type: 'day', timeTypeList: [ - { label: '自然日', value: 'day' }, + { label: '今日', value: 'day' }, { label: '自然周', value: 'week' }, { label: '自然月', value: 'month' }, { label: '近7天', value: 'seven' }, @@ -90,7 +105,7 @@ export default { { label: '自定义', value: 'custom' } ], TIMETYPE: { - 'day': '自然日', + 'day': '今日', 'week': '自然周', 'month': '自然月', 'seven': '近7天', @@ -105,7 +120,9 @@ export default { saleList: [], downloadLoading: false, autoWidth: true, - bookType: 'xlsx' + bookType: 'xlsx', + dayTimeList: [], + sku_id: '' } }, mounted() { @@ -114,13 +131,17 @@ export default { methods: { getInitList() { let time = this.getDayTime() - this.dayValue = this.startTime = this.endTime = time + this.startTime = time + ' 00:00:00' + this.endTime = time + ' 23:59:59' + this.dayTimeList = ['00:00:00', '23:59:59'] this.fetchData() }, changeTimeType() { if(this.time_type == 'day') { let time = this.getDayTime() - this.dayValue = this.startTime = this.endTime = time + this.startTime = time + ' 00:00:00' + this.endTime = time + ' 23:59:59' + this.dayTimeList = ['00:00:00', '23:59:59'] } else if(this.time_type == 'week') { this.dayValue = this.endTime = dayjs().format('YYYY-MM-DD') this.startTime = dayjs(this.getFirstDay(this.dayValue)).format('YYYY-MM-DD') @@ -144,8 +165,14 @@ export default { this.loading = true let params = { type: this.time_type == 'day' ? 1 : 2, - start_day: this.startTime, - end_day: this.endTime + sku_id: this.sku_id + } + if(params.type == 1) { + params.start_time = this.startTime + params.end_time = this.endTime + } else { + params.start_day = this.startTime + params.end_day = this.endTime } getSpuSalesCount(params).then((res) => { this.saleList = res.data.data @@ -173,7 +200,10 @@ export default { }, changeDayTime() { if(this.time_type == 'day') { - this.startTime = this.endTime = this.dayValue + let time = this.getDayTime() + this.startTime = time + ' 00:00:00' + this.endTime = time + ' 23:59:59' + this.dayTimeList = ['00:00:00', '23:59:59'] } else if(this.time_type == 'week') { this.endTime = this.dayValue this.startTime = dayjs(this.getFirstDay(this.dayValue)).format('YYYY-MM-DD') @@ -196,6 +226,12 @@ export default { this.endTime = this.customValue[1] this.fetchData() }, + changeTimePicker() { + let time = this.getDayTime() + this.startTime = time + ' ' + this.dayTimeList[0] + this.endTime = time + ' ' + this.dayTimeList[1] + this.fetchData() + }, handleExport() { if(!this.saleList.length) { this.$message({ diff --git a/resources/frontend/src/views/goods/addgoods/addgoods.vue b/resources/frontend/src/views/goods/addgoods/addgoods.vue index 7c90dc2..21e6f83 100644 --- a/resources/frontend/src/views/goods/addgoods/addgoods.vue +++ b/resources/frontend/src/views/goods/addgoods/addgoods.vue @@ -30,14 +30,11 @@ - - + - + 删除 diff --git a/resources/frontend/src/views/goods/editgoods.vue b/resources/frontend/src/views/goods/editgoods.vue index 8c76a62..fff022b 100644 --- a/resources/frontend/src/views/goods/editgoods.vue +++ b/resources/frontend/src/views/goods/editgoods.vue @@ -29,8 +29,9 @@ diff --git a/resources/frontend/src/views/goods/goods.vue b/resources/frontend/src/views/goods/goods.vue index 175a391..48237e2 100644 --- a/resources/frontend/src/views/goods/goods.vue +++ b/resources/frontend/src/views/goods/goods.vue @@ -11,8 +11,11 @@ 商品种类:
- 新增商品 - 导入商品 + 批量更新在售库存 + 新增商品 + 导入商品 表格导出
@@ -95,12 +99,12 @@ - + - + - +