From 195bf810e4b2c68f423e946089c947de4b6972e6 Mon Sep 17 00:00:00 2001
From: GaoHao <1210693421@qq.com>
Date: Fri, 25 Oct 2024 16:49:38 +0800
Subject: [PATCH 01/23] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B6=88=E6=81=AF?=
=?UTF-8?q?=E8=AE=A2=E9=98=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages.json | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/pages.json b/pages.json
index bb286e0..dc3b101 100644
--- a/pages.json
+++ b/pages.json
@@ -1092,6 +1092,17 @@
}
}
]
+ },
+ {
+ "root": "pageNotification",
+ "pages": [{
+ "pageId": "PAGES_NOTIFICATION_INDEX",
+ "path": "index",
+ "style": {
+ "navigationBarTitleText": "订阅通知"
+ }
+ }
+ ]
}
],
"globalStyle": {
From b8c603e6839e185c7079c7987179ee5ad75a0e36 Mon Sep 17 00:00:00 2001
From: GaoHao <1210693421@qq.com>
Date: Fri, 25 Oct 2024 16:49:50 +0800
Subject: [PATCH 02/23] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B6=88=E6=81=AF?=
=?UTF-8?q?=E8=AE=A2=E9=98=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
http/yskApi/pageNotification.js | 17 +++
pageNotification/index.vue | 197 ++++++++++++++++++++++++++
pages/index/index.vue | 5 +
static/indexImg/icon-notification.svg | 1 +
4 files changed, 220 insertions(+)
create mode 100644 http/yskApi/pageNotification.js
create mode 100644 pageNotification/index.vue
create mode 100644 static/indexImg/icon-notification.svg
diff --git a/http/yskApi/pageNotification.js b/http/yskApi/pageNotification.js
new file mode 100644
index 0000000..9597344
--- /dev/null
+++ b/http/yskApi/pageNotification.js
@@ -0,0 +1,17 @@
+import http from './http.js'
+const request=http.request
+
+
+/**
+ * 获取订阅二维码
+ * @returns
+ */
+export function getSubQrCode(params) {
+ return request({
+ url: `/api/msg/subQrCode`,
+ method: 'get',
+ params: {
+ shopId: uni.getStorageSync('shopId'),
+ }
+ })
+}
diff --git a/pageNotification/index.vue b/pageNotification/index.vue
new file mode 100644
index 0000000..f4214fe
--- /dev/null
+++ b/pageNotification/index.vue
@@ -0,0 +1,197 @@
+
+
+
+ 消息订阅码
+
+
+
+
+ 保存订阅码
+
+
+
+
+
+
+
+
+
diff --git a/pages/index/index.vue b/pages/index/index.vue
index bda58f3..75c681b 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -145,6 +145,11 @@
// icon: '/static/indexImg/icon-staff.svg',
// pageUrl: 'PAGES_USER'
// },
+ {
+ title: '订阅通知',
+ icon: '/static/indexImg/icon-notification.svg',
+ pageUrl: 'PAGES_NOTIFICATION_INDEX',
+ },
{
title: '设置中心',
icon: '/static/indexImg/icon-cashier.svg',
diff --git a/static/indexImg/icon-notification.svg b/static/indexImg/icon-notification.svg
new file mode 100644
index 0000000..87c1ae5
--- /dev/null
+++ b/static/indexImg/icon-notification.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
From 94c0fdfe05c26134e606b289d4570e8d8fd06bd1 Mon Sep 17 00:00:00 2001
From: GaoHao <1210693421@qq.com>
Date: Tue, 29 Oct 2024 10:31:52 +0800
Subject: [PATCH 03/23] =?UTF-8?q?=E8=AE=A2=E9=98=85=20=E9=80=9A=E7=9F=A5?=
=?UTF-8?q?=E4=BF=9D=E5=AD=98=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pageNotification/index.vue | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/pageNotification/index.vue b/pageNotification/index.vue
index f4214fe..d463051 100644
--- a/pageNotification/index.vue
+++ b/pageNotification/index.vue
@@ -42,7 +42,6 @@ onShow(() => {
const saveImage = () => {
// #ifdef APP-PLUS
- saveQrcodeImg()
uni.downloadFile({
url: vdata.QrcodeUrl,
success: (res) => {
@@ -92,16 +91,7 @@ function downloadQR() {
}
//#endif
-const saveQrcodeImg = () => {
- saveHeadImgFile(vdata.QrcodeUrl, 80)
- .then((success) => {
- infoBox.showSuccessToast('保存成功')
- })
- .catch((err) => {
- console.log(err)
- infoBox.showErrorToast('保存失败')
- })
-}
+
const saveWxQrcodeImg = (data) => {
const fileManager = wx.getFileSystemManager()
From 1791d5f3d811032b7ce0153e7ac7ef7d3fbaefdc Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Tue, 29 Oct 2024 15:57:49 +0800
Subject: [PATCH 04/23] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BA=E6=AD=A3?=
=?UTF-8?q?=E5=BC=8F=E6=9C=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
http/yskApi/http.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/http/yskApi/http.js b/http/yskApi/http.js
index abded03..b3305c5 100644
--- a/http/yskApi/http.js
+++ b/http/yskApi/http.js
@@ -17,13 +17,13 @@ import infoBox from "@/commons/utils/infoBox.js"
import go from '@/commons/utils/go.js';
import { reject } from 'lodash';
// 测试服
-let baseUrl = 'https://admintestpapi.sxczgkj.cn'
+// let baseUrl = 'https://admintestpapi.sxczgkj.cn'
//预发布
// let baseUrl = 'https://pre-cashieradmin.sxczgkj.cn'
//正式
-// let baseUrl = 'https://cashieradmin.sxczgkj.cn'
+let baseUrl = 'https://cashieradmin.sxczgkj.cn'
// 王伟本地测
// let baseUrl = '/ww'
From 1f099e2174a6c39a6215735b05707c388720ec02 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Wed, 30 Oct 2024 13:55:32 +0800
Subject: [PATCH 05/23] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BE=AE=E4=BF=A1?=
=?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E4=B8=8A=E7=A9=BA=E5=80=BC=E6=98=AF?=
=?UTF-8?q?undefined=E5=AF=BC=E8=87=B4=E7=9A=84=E5=8F=B0=E6=A1=8C=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3=E6=8A=A5=E9=94=99=E5=92=8C=E7=A1=AE=E8=AE=A4=E8=AE=A2?=
=?UTF-8?q?=E5=8D=95=E5=95=86=E5=93=81=E4=B8=8D=E5=B1=95=E7=A4=BA=E7=9A=84?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagesCreateOrder/choose-table/choose-table.vue | 2 +-
.../confirm-order/confirm-order.vue | 18 +++++++++---------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/pagesCreateOrder/choose-table/choose-table.vue b/pagesCreateOrder/choose-table/choose-table.vue
index 2aeaba7..fbee499 100644
--- a/pagesCreateOrder/choose-table/choose-table.vue
+++ b/pagesCreateOrder/choose-table/choose-table.vue
@@ -166,7 +166,7 @@
async function getTable() {
// let state=status.list[status.active].key
// state=state?(state=='all'?'':state):''
- const areaId=area.list[area.defaultCateIndex].id
+ const areaId=area.list[area.defaultCateIndex].id||''
let {
content,total
} = await $table.get({...query,areaId,name:searchValue.value,state:'idle'})
diff --git a/pagesCreateOrder/confirm-order/confirm-order.vue b/pagesCreateOrder/confirm-order/confirm-order.vue
index 9da9aa8..3dd0852 100644
--- a/pagesCreateOrder/confirm-order/confirm-order.vue
+++ b/pagesCreateOrder/confirm-order/confirm-order.vue
@@ -340,7 +340,7 @@
//不免餐位费
const res = await Api.$choseCount({
masterId: option.masterId,
- tableId: table.value.tableId,
+ tableId: table.value.tableId||'',
num: userNumbers.defaultCateIndex+1,
})
Object.assign($seatFee, res)
@@ -369,7 +369,7 @@
isPack,
isGift,
masterId: option.masterId,
- tableId: table.value.tableId,
+ tableId: table.value.tableId||'',
productId,
num: number,
skuId
@@ -427,7 +427,7 @@
console.log(option);
const submitPar = {
masterId: option.masterId,
- tableId: table.value.tableId,
+ tableId: table.value.tableId||"",
vipUserId: user.value.id ? user.value.id : '',
type: user.value.id ? 0 : 1 //0 设置 1 取消
}
@@ -510,7 +510,7 @@
page: 0,
size: 300,
masterId: option.masterId,
- tableId: table.value.tableId
+ tableId: table.value.tableId||''
}) {
const {
records,
@@ -550,13 +550,13 @@
note: note.value,
postPay: true,
orderId: '',
- tableId: table.value.tableId
+ tableId: table.value.tableId||''
}) {
if (!$shop.value.isTableFee) {
//不免餐位费
await Api.$choseCount({
masterId: option.masterId,
- tableId: table.value.tableId,
+ tableId: table.value.tableId||"",
num: userNumbers.defaultCateIndex+1,
})
}
@@ -616,7 +616,7 @@
cartId: cart.id,
productId: cart.productId,
skuId: cart.skuId,
- tableId: option.tableId,
+ tableId: option.tableId||"",
note: e.remark,
num: cart.number // 0会删除此商品
})
@@ -637,7 +637,7 @@
console.log(option,);
if (opt) {
table.value = {
- tableId: opt.tableId,
+ tableId: opt.tableId||'',
name: opt.name
}
}
@@ -673,7 +673,7 @@
}
const res = await Api.$changeUseType({
useType,
- tableId,
+ tableId:tableId||'',
cartIds: goods.list.map((v) => v.id),
})
getCart()
From b6d79c93199057c6cbae9df0959c8b6a35476159 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Wed, 30 Oct 2024 14:54:23 +0800
Subject: [PATCH 06/23] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B0=B1=E9=A4=90?=
=?UTF-8?q?=E4=BA=BA=E6=95=B0=E9=99=90=E5=88=B6=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../confirm-order/confirm-order.vue | 135 ++++++++++--------
1 file changed, 77 insertions(+), 58 deletions(-)
diff --git a/pagesCreateOrder/confirm-order/confirm-order.vue b/pagesCreateOrder/confirm-order/confirm-order.vue
index 3dd0852..a4be9e4 100644
--- a/pagesCreateOrder/confirm-order/confirm-order.vue
+++ b/pagesCreateOrder/confirm-order/confirm-order.vue
@@ -40,7 +40,7 @@
-
+
退菜
-
-
-
+
+
退款
-
@@ -149,6 +147,7 @@
import {
hasPermission
} from '@/commons/utils/hasPermission.js'
+ import {isTui,canTuiKuan,canTuicai} from '@/commons/utils/goodsUtil.js'
const emits = defineEmits(['tuicai', 'tuikuan', 'printOrder'])
function returnTotalMoney(item) {
diff --git a/pagesOrder/index/compoents/order-item.vue b/pagesOrder/index/compoents/order-item.vue
index 8b51174..c6ba5c6 100644
--- a/pagesOrder/index/compoents/order-item.vue
+++ b/pagesOrder/index/compoents/order-item.vue
@@ -59,7 +59,8 @@
打包费
¥{{data.packFee||0}}
-
+
+
{{data.seatInfo.productName}}
¥{{data.seatInfo.priceAmount}}
@@ -72,7 +73,7 @@
- 小计¥
+ 总计¥
{{data.orderAmount}}
@@ -87,6 +88,7 @@
import dayjs from 'dayjs';
import orderEnum from '@/commons/orderEnum.js'
import go from '@/commons/utils/go.js'
+ import {isTui,canTuiKuan,canTuicai} from '@/commons/utils/goodsUtil.js'
import {
computed,
reactive,
From 8a1718a5473f5930161a13d618e4ec4f890c3953 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Wed, 30 Oct 2024 17:05:14 +0800
Subject: [PATCH 11/23] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A0=E5=8F=B0?=
=?UTF-8?q?=E6=A1=8C=E6=97=B6=E4=B9=9F=E8=8E=B7=E5=8F=96=E4=B8=80=E6=AC=A1?=
=?UTF-8?q?=E8=B4=AD=E7=89=A9=E8=BD=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagesCreateOrder/index/index.vue | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/pagesCreateOrder/index/index.vue b/pagesCreateOrder/index/index.vue
index 9775fd0..83af750 100644
--- a/pagesCreateOrder/index/index.vue
+++ b/pagesCreateOrder/index/index.vue
@@ -482,16 +482,20 @@
return isShow;
});
$originGoods = goods
- if (!data.table.tableId) {
- //无桌台
+ // if (!data.table.tableId) {
+ // //无桌台
- setTabBar(category, goods, [])
- return
+ // setTabBar(category, goods, [])
+ // return
+ // }
+ // const {
+ // masterId
+ // } = await getMasterId()
+ // data.masterId = masterId
+ if(data.table.tableId){
+ const masterRes = await getMasterId()
+ data.masterId = masterRes.masterId
}
- const {
- masterId
- } = await getMasterId()
- data.masterId = masterId
const cartRes = await getCart()
cars.length = 0
const cartArr = getNowCart(cartRes.records)
From 1d73d501d12151eede97e4390f9030efb19e8640 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Wed, 30 Oct 2024 17:42:16 +0800
Subject: [PATCH 12/23] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=A4=8D=E5=88=B6?=
=?UTF-8?q?=E5=9B=BE=E6=A0=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
static/copy.svg | 1 +
1 file changed, 1 insertion(+)
create mode 100644 static/copy.svg
diff --git a/static/copy.svg b/static/copy.svg
new file mode 100644
index 0000000..ddb1ae2
--- /dev/null
+++ b/static/copy.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
From b92aaf356419af2b445c6f29263c9d35a7f38209 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Wed, 30 Oct 2024 17:42:32 +0800
Subject: [PATCH 13/23] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=A4=8D=E5=88=B6?=
=?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=8F=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagesOrder/detail/components/order.vue | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/pagesOrder/detail/components/order.vue b/pagesOrder/detail/components/order.vue
index be6967a..026830f 100644
--- a/pagesOrder/detail/components/order.vue
+++ b/pagesOrder/detail/components/order.vue
@@ -26,11 +26,21 @@
-->
下单时间
-
+
订单编号
- {{data.orderNo}}
+
+ {{data.orderNo}}
+
+
+
+
+
+
+
+
商家备注
From be0b3af8ddcd7005c7b6c61d0c68fd7502ff273b Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Thu, 31 Oct 2024 09:54:29 +0800
Subject: [PATCH 14/23] =?UTF-8?q?=E4=BB=A3=E5=AE=A2=E4=B8=8B=E5=8D=95?=
=?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagesCreateOrder/index/index.vue | 45 ++++++++++++++++++++------------
1 file changed, 29 insertions(+), 16 deletions(-)
diff --git a/pagesCreateOrder/index/index.vue b/pagesCreateOrder/index/index.vue
index 83af750..f377ea4 100644
--- a/pagesCreateOrder/index/index.vue
+++ b/pagesCreateOrder/index/index.vue
@@ -448,21 +448,20 @@
})
console.log(res);
if (res && res.content[0]) {
- // data.table=res.content[0]
+ data.table={...res.content[0],...data.table}
}
}
}
let $originGoods = []
let $category = []
async function init() {
- const masterRes = await getMasterId()
- data.masterId = masterRes.masterId
+
const shopInfo = await tbShopInfo()
$shop.value = shopInfo
const useType = data.table.status == 'using' ? data.table.useType : $returnUseType(shopInfo)
uni.setStorageSync('useType', useType)
console.log(shopInfo);
- getTableInfo()
+ await getTableInfo()
const categoryRes = await getCategory()
const category = categoryRes.content.reduce((prve, cur) => {
prve.push({
@@ -482,20 +481,32 @@
return isShow;
});
$originGoods = goods
- // if (!data.table.tableId) {
- // //无桌台
-
- // setTabBar(category, goods, [])
- // return
- // }
- // const {
- // masterId
- // } = await getMasterId()
- // data.masterId = masterId
- if(data.table.tableId){
+ console.log(option);
+ if(option.type=='add'){
+ // await getTableInfo()
const masterRes = await getMasterId()
data.masterId = masterRes.masterId
+ cars.length = 0
+ setTabBar(category, goods, [])
+ return
}
+ if (!data.table.tableId) {
+ const masterRes = await getMasterId()
+ data.masterId = masterRes.masterId
+ //无桌台
+ const cartRes = await getCart()
+ cars.length = 0
+ const cartArr = getNowCart(cartRes.records)
+ for (let i in cartArr) {
+ cars.push(cartArr[i])
+ }
+ setTabBar(category, goods, cars)
+ return
+ }
+ const {
+ masterId
+ } = await getMasterId()
+ data.masterId = masterId
const cartRes = await getCart()
cars.length = 0
const cartArr = getNowCart(cartRes.records)
@@ -1093,7 +1104,9 @@
})
}
watch(() => data.table.tableId, (newval, oldval) => {
- onSelTable()
+ if(option.type!='add'){
+ onSelTable()
+ }
})
async function onSelTable() {
const {
From ad00b46a249a08c06a1395f714b5bc1fcb277297 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Thu, 31 Oct 2024 09:54:42 +0800
Subject: [PATCH 15/23] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagesOrder/detail/components/extra.vue | 24 +++++++++++------------
pagesOrder/detail/components/list.vue | 3 ++-
pagesOrder/detail/detail.vue | 24 +++++++++++------------
pagesOrder/index/compoents/order-item.vue | 2 +-
4 files changed, 27 insertions(+), 26 deletions(-)
diff --git a/pagesOrder/detail/components/extra.vue b/pagesOrder/detail/components/extra.vue
index 28da433..e467f22 100644
--- a/pagesOrder/detail/components/extra.vue
+++ b/pagesOrder/detail/components/extra.vue
@@ -1,5 +1,5 @@
-
+
附加费
@@ -10,21 +10,21 @@
-
-
- {{data.name||'餐位费'}}
- x{{data.number||0}}
- ¥{{data.totalAmount}}
+
+
+ {{data.productName||'餐位费'}}
+ x{{data.num||0}}
+ ¥{{data.priceAmount}}
- {{data.name||'餐位费'}}
- 已退
+ {{data.productName||'餐位费'}}
+ {{data.status=='refunding'?'退款中': '已退'}}
- x{{data.number||0}}
- ¥{{data.totalAmount}}
+ x{{data.num||0}}
+ ¥{{data.priceAmount}}
{{to2(allPrice*1+seatFeePrice*1+packFee*1) }}
@@ -147,7 +148,7 @@
import {
hasPermission
} from '@/commons/utils/hasPermission.js'
- import {isTui,canTuiKuan,canTuicai} from '@/commons/utils/goodsUtil.js'
+ import {isTui,canTuiKuan,canTuicai,numSum} from '@/commons/utils/goodsUtil.js'
const emits = defineEmits(['tuicai', 'tuikuan', 'printOrder'])
function returnTotalMoney(item) {
diff --git a/pagesOrder/detail/detail.vue b/pagesOrder/detail/detail.vue
index 1ffd61f..1f8d590 100644
--- a/pagesOrder/detail/detail.vue
+++ b/pagesOrder/detail/detail.vue
@@ -75,7 +75,7 @@
})
function onSeatFeeTuicai(seatFee) {
- seatFee={...seatFee,num:seatFee.number,productName:seatFee.name}
+ seatFee={...seatFee,num:seatFee.num,productName:seatFee.productName}
console.log(seatFee);
tuicai.show = true
tuicai.isSeatFee = seatFee
@@ -94,26 +94,25 @@
return
}
const {
- id,
+ id,cartId,
productId,
productSkuId,
- name,
- cartId,
- number,
- totalAmount,
- salePrice
+ productName,
+ num,
+ priceAmount,
+ price
} = seatFee
go.to('PAGES_ORDER_TUIKUAN', {
orderId:orderDetail.info.id,
- id:seatFee.id,
+ id:cartId,
productId,
productSkuId,
- productName:name,
- num:number,
+ productName,
+ num,
number: 0,
productSkuName: '',
- priceAmount:totalAmount,
- price:salePrice
+ priceAmount,
+ price
})
}
@@ -282,6 +281,7 @@
}
}
+ console.log(res.seatInfo);
orderDetail.seatFee = res.seatInfo|| {
name: '客座费',
number: res.seatCount,
diff --git a/pagesOrder/index/compoents/order-item.vue b/pagesOrder/index/compoents/order-item.vue
index c6ba5c6..83334d3 100644
--- a/pagesOrder/index/compoents/order-item.vue
+++ b/pagesOrder/index/compoents/order-item.vue
@@ -121,7 +121,7 @@
const priceSize = 9
function goodsPriceAmount(item){
- return item.price*item.num
+ return (item.price*item.num).toFixed(2)
}
// const packeFee=computed(()=>{
// return props.data.detailList.reduce((prve,cur)=>{
From d48e16d739345b68f8b6b5bd54378b7398e519af Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Thu, 31 Oct 2024 10:05:37 +0800
Subject: [PATCH 16/23] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=85=AC=E5=85=B1?=
=?UTF-8?q?=E6=96=B9=E6=B3=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
commons/utils/goodsUtil.js | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/commons/utils/goodsUtil.js b/commons/utils/goodsUtil.js
index 57fbe26..b0e821d 100644
--- a/commons/utils/goodsUtil.js
+++ b/commons/utils/goodsUtil.js
@@ -11,12 +11,17 @@ export function returnPackFee(arr) {
}
export function canTuicai(orderInfo,item){
- return orderInfo.status=='unpaid'&&orderInfo.useType!='dine-in-before'
+ return orderInfo.status=='unpaid'&&orderInfo.useType!='dine-in-before'&& item.status!='return'
}
export function canTuiKuan(orderInfo,item){
-
return orderInfo.status!='unpaid'&& item.status!='return'&&item.status!='refund'&&item.status!='refunding'
}
export function isTui(item){
return item.status=='return'||item.status=='refund'||item.status=='refunding'
+}
+export function numSum(arr){
+ const sum=arr.reduce((a,b)=>{
+ return a+b*100
+ },0)
+ return (sum/100).toFixed(2)
}
\ No newline at end of file
From 9833e137f95799a15e1d535881bb097f9f1b00ad Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Thu, 31 Oct 2024 10:22:48 +0800
Subject: [PATCH 17/23] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E5=AE=A2?=
=?UTF-8?q?=E4=B8=8B=E5=8D=95=E9=83=A8=E5=88=86=E9=80=BB=E8=BE=91=201?=
=?UTF-8?q?=EF=BC=9A=E5=8A=A0=E8=8F=9C=E6=97=B6=E7=94=A8=E8=AE=A2=E5=8D=95?=
=?UTF-8?q?=E4=BC=A0=E6=9D=A5=E7=9A=84masterID=E4=B8=8D=E5=86=8D=E9=87=8D?=
=?UTF-8?q?=E6=96=B0=E8=B4=A7=E5=8C=BA=EF=BC=8C=E5=B9=B6=E7=BD=AE=E7=A9=BA?=
=?UTF-8?q?=E9=80=89=E6=8B=A9=E5=95=86=E5=93=81=E6=95=B0=E9=87=8F=202?=
=?UTF-8?q?=EF=BC=9A=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=EF=BC=8C=E5=8E=BB?=
=?UTF-8?q?=E9=99=A4=E9=87=8D=E5=A4=8D=E8=AF=B7=E6=B1=82=20=E8=AE=A2?=
=?UTF-8?q?=E5=8D=95=E7=AE=A1=E7=90=86=E5=8A=A0=E8=8F=9C=201=EF=BC=9A?=
=?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=8A=A0=E8=8F=9C=E9=A1=B5=E9=9D=A2=E5=8F=82?=
=?UTF-8?q?=E6=95=B0=E5=A2=9E=E5=8A=A0mastrID?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagesCreateOrder/index/index.vue | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/pagesCreateOrder/index/index.vue b/pagesCreateOrder/index/index.vue
index f377ea4..5fb08e5 100644
--- a/pagesCreateOrder/index/index.vue
+++ b/pagesCreateOrder/index/index.vue
@@ -455,7 +455,13 @@
let $originGoods = []
let $category = []
async function init() {
-
+ if(option.type=='add'){
+ data.masterId = option.masterId
+ setTabBar($category, $originGoods, [])
+ }else{
+ const masterRes = await getMasterId()
+ data.masterId = masterRes.masterId
+ }
const shopInfo = await tbShopInfo()
$shop.value = shopInfo
const useType = data.table.status == 'using' ? data.table.useType : $returnUseType(shopInfo)
@@ -483,16 +489,11 @@
$originGoods = goods
console.log(option);
if(option.type=='add'){
- // await getTableInfo()
- const masterRes = await getMasterId()
- data.masterId = masterRes.masterId
cars.length = 0
setTabBar(category, goods, [])
return
}
if (!data.table.tableId) {
- const masterRes = await getMasterId()
- data.masterId = masterRes.masterId
//无桌台
const cartRes = await getCart()
cars.length = 0
@@ -503,10 +504,7 @@
setTabBar(category, goods, cars)
return
}
- const {
- masterId
- } = await getMasterId()
- data.masterId = masterId
+
const cartRes = await getCart()
cars.length = 0
const cartArr = getNowCart(cartRes.records)
From 1621a1feed8f5889d6f405f176d1f14486692d06 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Thu, 31 Oct 2024 10:26:10 +0800
Subject: [PATCH 18/23] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagesOrder/detail/components/list.vue | 4 ++--
pagesOrder/detail/detail.vue | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/pagesOrder/detail/components/list.vue b/pagesOrder/detail/components/list.vue
index 6331700..2c6e17f 100644
--- a/pagesOrder/detail/components/list.vue
+++ b/pagesOrder/detail/components/list.vue
@@ -193,10 +193,10 @@
})
const seatFeePrice = computed(() => {
- if (!props.seatFee.totalAmount) {
+ if (!props.seatFee.priceAmount) {
return 0
}
- const n = props.seatFee.totalAmount * (props.seatFee.status == 'return' ? 0 : 1)
+ const n = props.seatFee.priceAmount * (props.seatFee.status == 'return' ? 0 : 1)
return n.toFixed(2)
})
diff --git a/pagesOrder/detail/detail.vue b/pagesOrder/detail/detail.vue
index 1f8d590..463d73e 100644
--- a/pagesOrder/detail/detail.vue
+++ b/pagesOrder/detail/detail.vue
@@ -210,6 +210,7 @@
go.to('PAGES_CREATE_ORDER', {
tableId: options.tableId || orderDetail.info.tableId,
name: options.name || orderDetail.info.tableName,
+ masterId:orderDetail.info.masterId,
type: 'add'
})
}
@@ -286,7 +287,7 @@
name: '客座费',
number: res.seatCount,
totalNumber: res.seatCount,
- totalAmount: res.seatAmount,
+ priceAmount: res.seatAmount,
status:''
}
orderDetail.goodsList = Object.entries(goodsMap).map(([key, value]) => ({
From e8b5f1d2e7ed86e728f6526f52b8537e8e78ba8e Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Thu, 31 Oct 2024 11:08:58 +0800
Subject: [PATCH 19/23] =?UTF-8?q?=E9=80=80=E6=AC=BE=E5=AE=A2=E5=BA=A7?=
=?UTF-8?q?=E8=B4=B9=E9=99=90=E5=88=B6=E5=8F=AA=E8=83=BD=E5=85=A8=E9=80=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagesOrder/detail/components/tuicai.vue | 27 ++++++++++++----
pagesOrder/detail/detail.vue | 12 ++++---
pagesOrder/tuikuan/tuikuan.vue | 42 +++++++++++++++++++------
3 files changed, 60 insertions(+), 21 deletions(-)
diff --git a/pagesOrder/detail/components/tuicai.vue b/pagesOrder/detail/components/tuicai.vue
index 930ccc6..2e2e687 100644
--- a/pagesOrder/detail/components/tuicai.vue
+++ b/pagesOrder/detail/components/tuicai.vue
@@ -5,21 +5,24 @@
{{data.productName}}
-
-
+
+
-
-
+
+
@@ -66,7 +69,11 @@
const props = defineProps({
data: {
type: Object,
- default: () => {}
+ default: () => {
+ return {
+ productId:'-999'
+ }
+ }
},
show: {
type: Boolean,
@@ -143,6 +150,9 @@
function open() {
model.value.open()
+ if(props.data.productId=='-999'){
+ number.value=props.data.num
+ }
}
function close() {
@@ -191,7 +201,12 @@
::v-deep .uni-input-input {
text-align: center;
}
-
+ .gray{
+ .minus::after{
+ border-color: #ccc;
+ }
+
+ }
.minus {
&::after {
content: '';
diff --git a/pagesOrder/detail/detail.vue b/pagesOrder/detail/detail.vue
index 463d73e..0bebcf2 100644
--- a/pagesOrder/detail/detail.vue
+++ b/pagesOrder/detail/detail.vue
@@ -284,11 +284,13 @@
}
console.log(res.seatInfo);
orderDetail.seatFee = res.seatInfo|| {
- name: '客座费',
- number: res.seatCount,
- totalNumber: res.seatCount,
- priceAmount: res.seatAmount,
- status:''
+ // name: '客座费',
+ // number: res.seatCount,
+ // num: res.seatCount,
+ // totalNumber: res.seatCount,
+ // priceAmount: res.seatAmount,
+ // status:'',
+ totalNumber:0,
}
orderDetail.goodsList = Object.entries(goodsMap).map(([key, value]) => ({
info: value,
diff --git a/pagesOrder/tuikuan/tuikuan.vue b/pagesOrder/tuikuan/tuikuan.vue
index dc2feee..04df108 100644
--- a/pagesOrder/tuikuan/tuikuan.vue
+++ b/pagesOrder/tuikuan/tuikuan.vue
@@ -3,9 +3,13 @@
全退
-
+
+
+ *
+ 客座费只能全退
+
@@ -14,15 +18,25 @@
{{item.productSkuName||""}}
最多可退×{{item.num}}
-
- ¥{{item.priceAmount}}
-
-
- {{item.number}}
-
+
+
+ ¥{{item.priceAmount}}
+
+ x{{item.number}}
+
-
+
+
+
+ ¥{{item.priceAmount}}
+
+
+ {{item.number}}
+
+
+
+
@@ -139,6 +153,9 @@
}
function changeItem(item, step) {
+ if(item.productId=='-999'){
+ return
+ }
console.log(item);
let newval = item.number * 1 + step * 1;
if (newval <= 0) {
@@ -179,9 +196,14 @@
uni.navigateBack({delta:1})
},500)
}
- const option=reactive({})
+ const option=reactive({
+ productId:'-999'
+ })
onLoad((opt) => {
Object.assign(option,opt)
+ if(opt.productId=='-999'){
+ allTui.value=true
+ }
if (Array.isArray(opt)) {
orderDetail.goodsList = opt
} else {
From 83b3202d0eb7fb55e0fbc9bc2b45ad1cec9a6623 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Thu, 31 Oct 2024 11:17:00 +0800
Subject: [PATCH 20/23] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=A2=E5=BA=A7?=
=?UTF-8?q?=E8=B4=B9=E9=80=80=E6=AC=BE=E5=A4=B1=E8=B4=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagesOrder/detail/detail.vue | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pagesOrder/detail/detail.vue b/pagesOrder/detail/detail.vue
index 0bebcf2..a3405f3 100644
--- a/pagesOrder/detail/detail.vue
+++ b/pagesOrder/detail/detail.vue
@@ -104,7 +104,8 @@
} = seatFee
go.to('PAGES_ORDER_TUIKUAN', {
orderId:orderDetail.info.id,
- id:cartId,
+ id,
+ cartId,
productId,
productSkuId,
productName,
From 3d2f43761e49ac6248b33324e3bce3d516e206a2 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Thu, 31 Oct 2024 14:20:59 +0800
Subject: [PATCH 21/23] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=A1=AE=E8=AE=A4?=
=?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=B2=A1=E9=80=89=E6=8B=A9=E7=94=A8=E6=88=B7?=
=?UTF-8?q?=E6=97=B6=E4=B8=8D=E5=B1=95=E7=A4=BA=E7=94=A8=E6=88=B7=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagesCreateOrder/confirm-order/confirm-order.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pagesCreateOrder/confirm-order/confirm-order.vue b/pagesCreateOrder/confirm-order/confirm-order.vue
index a4be9e4..584bd39 100644
--- a/pagesCreateOrder/confirm-order/confirm-order.vue
+++ b/pagesCreateOrder/confirm-order/confirm-order.vue
@@ -67,7 +67,7 @@
-
+
From 6bf5c693610ce3f05888856c31114d8864ef4469 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Thu, 31 Oct 2024 15:05:31 +0800
Subject: [PATCH 22/23] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=95=86=E5=93=81?=
=?UTF-8?q?=E7=BC=96=E8=BE=91=E7=BB=91=E5=AE=9A=E8=87=B3=E8=80=97=E6=9D=90?=
=?UTF-8?q?=E8=BF=98=E6=98=AF=E8=A7=84=E6=A0=BC=E9=BB=98=E8=AE=A4=E5=B1=95?=
=?UTF-8?q?=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pageProduct/add-Product/components/edit-haocai.vue | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/pageProduct/add-Product/components/edit-haocai.vue b/pageProduct/add-Product/components/edit-haocai.vue
index 2e6b42f..5232f6f 100644
--- a/pageProduct/add-Product/components/edit-haocai.vue
+++ b/pageProduct/add-Product/components/edit-haocai.vue
@@ -298,9 +298,11 @@
const isSku = computed(() => {
return props.goods.typeEnum == 'sku'
})
- let isBindGuige = ref(isSku.value)
+ let isBindGuige = ref(false)
watch(() => props.goods.typeEnum, (newval) => {
- isBindGuige.value = isSku.value
+ if(!newval){
+ isBindGuige.value = false
+ }
})
@@ -385,7 +387,6 @@
$haocaiMap[item.id] = item
}
haoCaiList.value = res.content
-
})
tbShopCurrencyGet({
page: 0,
@@ -400,6 +401,8 @@
}
onMounted(() => {
init()
+ const firstItem= props.goods.conInfos[0]
+ isBindGuige.value=firstItem?(firstItem.productSkuId==0?false:true):false
})
From 1e8de97835d24990bab410b07567dce77aefb2f0 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Thu, 31 Oct 2024 15:07:32 +0800
Subject: [PATCH 23/23] =?UTF-8?q?=E9=80=80=E8=8F=9C=E5=A2=9E=E5=8A=A0?=
=?UTF-8?q?=E5=BC=B9=E6=A1=86=E5=85=B3=E9=97=AD=E6=97=B6=E9=87=8D=E7=BD=AE?=
=?UTF-8?q?=E9=80=89=E6=8B=A9=E5=8E=9F=E5=9B=A0=E4=BB=A5=E5=8F=8A=E8=BE=93?=
=?UTF-8?q?=E5=85=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagesOrder/detail/components/tuicai.vue | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pagesOrder/detail/components/tuicai.vue b/pagesOrder/detail/components/tuicai.vue
index 2e2e687..80ded7f 100644
--- a/pagesOrder/detail/components/tuicai.vue
+++ b/pagesOrder/detail/components/tuicai.vue
@@ -157,6 +157,10 @@
function close() {
model.value.close()
+ tags.value.map(v=>{
+ v.checked=false
+ })
+ form.note=''
}
function confirm() {