diff --git a/api/store.js b/api/store.js index 552fdde..4d46342 100644 --- a/api/store.js +++ b/api/store.js @@ -2,4 +2,8 @@ import request from '@/utils/request'; export const menuList = (data) => { return request.get('/store/store/menu_list', data); +} + +export const store_statistics = (data) => { + return request.get('/store/store/store_statistics', data); } \ No newline at end of file diff --git a/api/system_store_storage.js b/api/system_store_storage.js index fdaf20b..e73ba49 100644 --- a/api/system_store_storage.js +++ b/api/system_store_storage.js @@ -6,4 +6,8 @@ export const SystemStoreStorageLists = (data) => { export const SystemStoreStorageGroupLists = (data) => { return request.get('/system_store_storage/SystemStoreStorage/group_lists', data); -} \ No newline at end of file +} +// 确认入库 +export const SystemStoreStorageWarehousingAdd = (data) => { + return request.post('/system_store_storage/SystemStoreStorage/warehousing_add', data); +} diff --git a/config/app.js b/config/app.js index dea5d28..d8d8126 100644 --- a/config/app.js +++ b/config/app.js @@ -3,9 +3,9 @@ let WSS_URL import store from "@/store/user.js" // 环境 // let env = "dev" -// let env = "prod" +let env = "prod" // let env = "release"; -let env = "local"; +// let env = "local"; switch (env) { case 'dev': diff --git a/pages.json b/pages.json index ad3254a..093efb1 100644 --- a/pages.json +++ b/pages.json @@ -258,7 +258,7 @@ "path" : "statistics/index", "style" : { - "navigationBarTitleText" : "门店统计" + "navigationBarTitleText" : "门店收支" } } ] diff --git a/pages/my/my.vue b/pages/my/my.vue index e25a643..1207b1a 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -123,7 +123,7 @@ - + diff --git a/pagesOrder/deliveryOrder/index.vue b/pagesOrder/deliveryOrder/index.vue index 6fbc9ad..0e90f88 100644 --- a/pagesOrder/deliveryOrder/index.vue +++ b/pagesOrder/deliveryOrder/index.vue @@ -51,21 +51,8 @@ - - - - - - - - - - - - - - - + + @@ -84,6 +71,7 @@ } from "vue" import { SystemStoreStorageLists, + SystemStoreStorageWarehousingAdd } from "@/api/system_store_storage.js" const show = ref(false) @@ -97,11 +85,7 @@ const calendarShow = ref(false) const formData = ref({ "id": '', - "store_name": '', 'product_id': '', - 'nums': '', - 'price': '', - 'total_price': '' }) const calendarConfirm = (e) => { where.value.start_time = e; @@ -111,14 +95,8 @@ calendarShow.value = false } - const priceBlur = (index, goodsList) => { - goodsList[index].price = Number(goodsList[index].price).toFixed(2) - } - // 列表 - const showGoods = ref(false) const showGoods1 = ref(false) - const goodsList = ref([]) const goodsList1 = ref([]) const getGoodsList = async () => { @@ -127,23 +105,18 @@ } const cancleOrder = (item) => { show.value = true - formData.value.store_name = item['store_name'] formData.value.id = item['id'] - formData.value.nums = item['need_num'] formData.value.product_id = item['product_id'] } const offerUpdate = () => { - purchaseProductOfferUpdate(formData.value).then(res => { + SystemStoreStorageWarehousingAdd(formData.value).then(res => { uni.$u.toast(res.msg); show.value = false + goodsList1.value = [] getGoodsList() }) } - const changeInputPrice = (e) => { - if (formData.value.nums > 0 && formData.value.price > 0) { - formData.value.total_price = formData.value.nums * formData.value.price - } - } + const keyword = ref(''); const searchKeyword = () => { @@ -194,26 +167,6 @@ } } - - .head { - padding: 20rpx; - background-color: white; - position: relative; - - .act { - color: #20B128; - } - - .line { - width: 26px; - height: 5rpx; - background-color: #20B128; - border-radius: 50rpx; - position: absolute; - transition: 300ms; - } - } - .content { padding: 20rpx; padding-bottom: 150rpx; @@ -270,11 +223,6 @@ } } - .status-png { - position: absolute; - right: 20rpx; - } - } .card-footer { @@ -284,28 +232,7 @@ color: #060606; } } - - .submit-btn { - position: fixed; - bottom: 50rpx; - width: 710rpx; - margin: 0 auto; - } } - - .detail { - width: 88rpx; - height: 88rpx; - border-radius: 88rpx; - text-align: center; - line-height: 88rpx; - background-color: #50C758; - color: white; - position: absolute; - bottom: 300rpx; - right: 20rpx; - } - .ellipsis { white-space: nowrap; overflow: hidden; diff --git a/pagesOrder/detail/detail.vue b/pagesOrder/detail/detail.vue index e87fd3e..d0061d5 100644 --- a/pagesOrder/detail/detail.vue +++ b/pagesOrder/detail/detail.vue @@ -167,6 +167,10 @@ 下单时间 {{datas.create_time}} + + 备注 + {{datas.mark}} + 支付状态 已支付 @@ -386,9 +390,9 @@ const rePay = () => { rePaymentApi({ order_id: datas.value.id, - mer_id: shopInfo.value.mer_id, + // mer_id: shopInfo.value.mer_id, address_id: addressInfo.value.address_id, - pay_type: 1 + pay_type: datas.value.pay_type }).then(res => { if (!res.data?.nonceStr) return uni.$u.toast('支付失败!'); uni.requestPayment({ diff --git a/pagesOrder/statistics/index.vue b/pagesOrder/statistics/index.vue index 3a6478e..3842efc 100644 --- a/pagesOrder/statistics/index.vue +++ b/pagesOrder/statistics/index.vue @@ -3,13 +3,13 @@ - + 累计铺货金额 - + 累计销售金额 @@ -17,13 +17,13 @@ - + 总支出 - + 利润 @@ -40,8 +40,28 @@ import { ref } from 'vue'; + import { + store_statistics, + } from "@/api/store.js" + const data = ref({ + total_price: 0, + pay_price: 0, + store_money:0, + commission: 0, + bond: 0, + village: 0, + vip: 0, + brigade: 0, + attrition: 0 + }) + const getLists = () => { + store_statistics().then(res => { + data.value = res.data + chartData.value.series=res.data.list - + }) + } + getLists() const opts = ref({ color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", "#ea7ccc"], padding: [15, 15, 0, 5], @@ -58,41 +78,41 @@ extra: { column: { type: "group", + seriesGap:30, width: 30, activeBgColor: "#000000", activeBgOpacity: 0.08 } } }) - const chartData=ref({ - categories: ["2024"], - series: [ - { - name: "手续费", - data: [35] - }, - { - name: "保证金", - data: [30] - }, - { - name: "损耗金", - data: [18] - }, - { - name: "村长", - data: [8] - }, - { - name: "队长", - data: [16] - }, - { - name: "厨师", - data: [18] - } - ] - }) + const chartData = ref({ + categories: [""], + series: [{ + name: "手续费", + data: [0] + }, + { + name: "保证金", + data: [0] + }, + { + name: "损耗金", + data: [0] + }, + { + name: "村长", + data: [0] + }, + { + name: "队长", + data: [0] + }, + { + name: "厨师", + data: [0] + } + ] + })