From b11e4aa68178a6dab6d41b6eec4d23ca7deea825 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Tue, 13 Aug 2024 18:03:39 +0800 Subject: [PATCH 01/26] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=96=B0?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=88=97=E8=A1=A8=E5=92=8C=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=BC=98=E5=8C=96=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/order.js | 4 + config/app.js | 6 +- pages.json | 2 +- pages/my/my.vue | 2 +- pages/product/product.vue | 2 +- pagesOrder/delivery/component/goods.vue | 220 ++++++++++++++++++++++++ pagesOrder/delivery/index.vue | 121 ++----------- 7 files changed, 244 insertions(+), 113 deletions(-) create mode 100644 pagesOrder/delivery/component/goods.vue diff --git a/api/order.js b/api/order.js index 7e04004..b8dcf97 100644 --- a/api/order.js +++ b/api/order.js @@ -9,6 +9,10 @@ export const createOrderApi = (data) => { export const orderListApi = (data) => { return request.get('/order/order/order_list', data); } +//门店订单列表 +export const storeOrderListApi = (data) => { + return request.get('/order/order/store_order_list', data); +} //订单详情 export const orderDetailApi = (data) => { diff --git a/config/app.js b/config/app.js index 971d6b2..f1f7802 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': @@ -17,7 +17,7 @@ switch (env) { WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull' break; case 'local': - BASE_URL = 'http://192.168.1.231:8545'; + BASE_URL = 'http://192.168.1.22:8545'; WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull' break; default: diff --git a/pages.json b/pages.json index e30cb07..5c4b519 100644 --- a/pages.json +++ b/pages.json @@ -202,7 +202,7 @@ "path" : "delivery/index", "style" : { - "navigationBarTitleText" : "配送员订单" + "navigationBarTitleText" : "门店订单" } } ] diff --git a/pages/my/my.vue b/pages/my/my.vue index 6fbab3d..16cc26c 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -123,7 +123,7 @@ - + diff --git a/pages/product/product.vue b/pages/product/product.vue index 2163cc4..e44bdbf 100644 --- a/pages/product/product.vue +++ b/pages/product/product.vue @@ -55,7 +55,7 @@ const frequentlyList = ref([]); let text = '没有商品' let status = ref('loadmore') - let list1 = ['零售', '商户', '会员'] + let list1 = ['零售', '商户', '供货价'] let keyword = ref(''); let enable_flex=ref(true) const where = ref({ diff --git a/pagesOrder/delivery/component/goods.vue b/pagesOrder/delivery/component/goods.vue new file mode 100644 index 0000000..29d7c4c --- /dev/null +++ b/pagesOrder/delivery/component/goods.vue @@ -0,0 +1,220 @@ + + + + + \ No newline at end of file diff --git a/pagesOrder/delivery/index.vue b/pagesOrder/delivery/index.vue index 39dbecb..fcfad0e 100644 --- a/pagesOrder/delivery/index.vue +++ b/pagesOrder/delivery/index.vue @@ -1,10 +1,6 @@ @@ -86,8 +81,8 @@ const calendarShow = ref(false) const calendarConfirm = (e) => { - where.value.start_time = e[0]; - where.value.end_time = e[0]; + where.value.start_time = e; + where.value.end_time = e; goodsList1.value = [] getGoodsList() calendarShow.value = false diff --git a/pagesOrder/statistics/index.vue b/pagesOrder/statistics/index.vue index eb5dcfc..3a6478e 100644 --- a/pagesOrder/statistics/index.vue +++ b/pagesOrder/statistics/index.vue @@ -2,18 +2,36 @@ - + 累计铺货金额 - + 累计销售金额 + + + + + 总支出 + + + + + + 利润 + + + + + 支出明细 + + @@ -62,9 +80,17 @@ data: [18] }, { - name: "佣金", - data: [18] - } + name: "村长", + data: [8] + }, + { + name: "队长", + data: [16] + }, + { + name: "厨师", + data: [18] + } ] }) diff --git a/uni_modules/uni-datetime-picker/changelog.md b/uni_modules/uni-datetime-picker/changelog.md index 8798e93..ce50ff8 100644 --- a/uni_modules/uni-datetime-picker/changelog.md +++ b/uni_modules/uni-datetime-picker/changelog.md @@ -1,3 +1,5 @@ +## 2.2.35(2024-09-21) +- 修复 没有选中日期时点击确定直接报错的Bug [详情](https://ask.dcloud.net.cn/question/198168) ## 2.2.34(2024-04-24) - 新增 日期点击事件,在点击日期时会触发该事件。 ## 2.2.33(2024-04-15) diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue index 11fc45a..9f6102f 100644 --- a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue +++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue @@ -698,11 +698,11 @@ startString = getDateTime(this.start, this.hideSecond) } [startDate, startTime] = startString.split(' ') - if (this.start && !dateCompare(this.start, this.tempRange.startDate)) { + if (this.start && !dateCompare(this.start, `${this.tempRange.startDate} ${this.tempRange.startTime}`)) { startDateLaterRangeStartDate = true this.tempRange.startDate = startDate } - if (this.start && !dateCompare(this.start, this.tempRange.endDate)) { + if (this.start && !dateCompare(this.start, `${this.tempRange.endDate} ${this.tempRange.endTime}`)) { startDateLaterRangeEndDate = true this.tempRange.endDate = startDate } @@ -717,11 +717,11 @@ } [endDate, endTime] = endString.split(' ') - if (this.end && !dateCompare(this.tempRange.startDate, this.end)) { + if (this.end && !dateCompare(`${this.tempRange.startDate} ${this.tempRange.startTime}`, this.end)) { endDateEarlierRangeStartDate = true this.tempRange.startDate = endDate } - if (this.end && !dateCompare(this.tempRange.endDate, this.end)) { + if (this.end && !dateCompare(`${this.tempRange.endDate} ${this.tempRange.endTime}`, this.end)) { endDateEarlierRangeEndDate = true this.tempRange.endDate = endDate } diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/util.js b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/util.js index 01802fa..6e9f47d 100644 --- a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/util.js +++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/util.js @@ -182,8 +182,8 @@ class Calendar { if (!date) { date = new Date() } - - return this.calendar.find(item => item.fullDate === this.getDateObj(date).fullDate) + const res = this.calendar.find(item => item.fullDate === this.getDateObj(date).fullDate) + return res ? res : this.getDateObj(date) } /** diff --git a/uni_modules/uni-datetime-picker/package.json b/uni_modules/uni-datetime-picker/package.json index 4d1b05c..12b313a 100644 --- a/uni_modules/uni-datetime-picker/package.json +++ b/uni_modules/uni-datetime-picker/package.json @@ -1,7 +1,7 @@ { "id": "uni-datetime-picker", "displayName": "uni-datetime-picker 日期选择器", - "version": "2.2.34", + "version": "2.2.35", "description": "uni-datetime-picker 日期时间选择器,支持日历,支持范围选择", "keywords": [ "uni-datetime-picker", From 4681988864f4e640924d4e26449d094d84b8c754 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Mon, 30 Sep 2024 16:59:11 +0800 Subject: [PATCH 17/26] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E5=92=8C=E9=A1=B5=E9=9D=A2=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E4=BC=98=E5=8C=96=E5=95=86=E5=93=81=E9=87=87?= =?UTF-8?q?=E8=B4=AD=E3=80=81=E8=AE=A2=E5=8D=95=E8=8E=B7=E5=8F=96=E5=92=8C?= =?UTF-8?q?=E9=97=A8=E5=BA=97=E7=AE=A1=E7=90=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/store.js | 4 ++ api/system_store_storage.js | 6 +- config/app.js | 4 +- pages.json | 2 +- pages/my/my.vue | 2 +- pagesOrder/deliveryOrder/index.vue | 85 ++--------------------------- pagesOrder/detail/detail.vue | 8 ++- pagesOrder/statistics/index.vue | 88 ++++++++++++++++++------------ 8 files changed, 79 insertions(+), 120 deletions(-) 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] + } + ] + })