From d03a8ea542dd9b0862940c5d410ffe6249bc4993 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Fri, 11 Oct 2024 18:26:10 +0800
Subject: [PATCH 01/39] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=AC=E5=85=B1?=
=?UTF-8?q?=E7=BB=84=E4=BB=B6button=E9=98=B4=E5=BD=B1=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/my-components/my-button.vue | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/components/my-components/my-button.vue b/components/my-components/my-button.vue
index ac7601b..6004a5b 100644
--- a/components/my-components/my-button.vue
+++ b/components/my-components/my-button.vue
@@ -105,7 +105,8 @@ import { computed } from 'vue';
margin: auto;
}
.shadow{
- box-shadow: 0 0 10px #aaa;
+ // box-shadow: 0 0 10px #aaa;
+ box-shadow: 0 20rpx 60rpx -20rpx rgba(0,84,210,0.5);
}
.btn {
font-size: 28rpx;
From dd2776fe1313a24df76d426c123e8a04644eb0c2 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Sat, 12 Oct 2024 10:23:44 +0800
Subject: [PATCH 02/39] =?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
---
.../confirm-order/confirm-order.vue | 9 ++++--
pagesCreateOrder/index/components/car.vue | 2 +-
pagesCreateOrder/index/index.vue | 32 ++++++++++++-------
3 files changed, 27 insertions(+), 16 deletions(-)
diff --git a/pagesCreateOrder/confirm-order/confirm-order.vue b/pagesCreateOrder/confirm-order/confirm-order.vue
index 0c9b654..074fbd9 100644
--- a/pagesCreateOrder/confirm-order/confirm-order.vue
+++ b/pagesCreateOrder/confirm-order/confirm-order.vue
@@ -523,6 +523,7 @@
}
// updateChoseCount()
const res = await Api.$createOrder(par)
+ uni.$emit('update:createOrderIndex')
console.log($shop.value);
console.log(res);
if ($shop.value.registerType == 'munchies') {
@@ -534,11 +535,14 @@
)
} else {
//后付
- if (option.isCreateOrderToDetail) {
+ console.log(option.isCreateOrderToDetail);
+ if (option.isCreateOrderToDetail!='0') {
+ console.log('PAGES_ORDER_DETAIL');
go.to('PAGES_ORDER_DETAIL', {
id: res.id
},'redirect')
} else {
+ console.log('back');
uni.navigateBack({
delta: 2
})
@@ -584,9 +588,8 @@
}
onLoad((opt) => {
- console.log('opt');
- console.log(opt);
Object.assign(option, opt)
+ console.log(option,);
if (opt) {
table.value = {
tableId: opt.tableId,
diff --git a/pagesCreateOrder/index/components/car.vue b/pagesCreateOrder/index/components/car.vue
index 1d5366e..8055baa 100644
--- a/pagesCreateOrder/index/components/car.vue
+++ b/pagesCreateOrder/index/components/car.vue
@@ -126,7 +126,7 @@
const {tableId,name,maxCapacity,status,type}=props.table
go.to('PAGES_CONFIRM_ORDER',{
masterId:props.masterId,type,
- tableId,name,maxCapacity,status,isCreateOrderToDetail:props.isCreateOrderToDetail
+ tableId,name,maxCapacity,status,isCreateOrderToDetail:props.isCreateOrderToDetail?1:0
})
}
diff --git a/pagesCreateOrder/index/index.vue b/pagesCreateOrder/index/index.vue
index 692ad34..b618e81 100644
--- a/pagesCreateOrder/index/index.vue
+++ b/pagesCreateOrder/index/index.vue
@@ -1,18 +1,21 @@
-
+
-
-
- 选择桌台
-
- {{data.table.name}}
+
+
+
+ 选择桌台
+
+ {{data.table.name}}
+
+
+
+
-
-
-
-
+
+
下单时间
-
+
订单编号
diff --git a/pagesOrder/detail/components/tuicai.vue b/pagesOrder/detail/components/tuicai.vue
index a03d2df..180ee70 100644
--- a/pagesOrder/detail/components/tuicai.vue
+++ b/pagesOrder/detail/components/tuicai.vue
@@ -3,11 +3,11 @@
- {{data.name}}
+ {{data.productName}}
-
+
退菜理由
diff --git a/pagesOrder/pay-order/pay-order.vue b/pagesOrder/pay-order/pay-order.vue
index 1753d68..a4cdff8 100644
--- a/pagesOrder/pay-order/pay-order.vue
+++ b/pagesOrder/pay-order/pay-order.vue
@@ -126,7 +126,7 @@
let payFinish=ref(false)
onBackPress(() => {
console.log('onBackPress');
- uni.$emit('update:createOrderIndex')
+ // uni.$emit('update:createOrderIndex')
// if (option.isNowPay&&!payFinish.value) {
// infoBox.showToast('先付费模式,请先结算订单')
// return true
@@ -242,7 +242,7 @@
setTimeout(() => {
// uni.$emit('orderDetail:update')
payFinish.value=true
- uni.$emit('update:createOrderIndex')
+ // uni.$emit('update:createOrderIndex')
uni.navigateBack({
delta: 1
})
From a7342a728915fa66fbdfa18f8576e4b01634d8b0 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Sat, 12 Oct 2024 14:46:15 +0800
Subject: [PATCH 04/39] =?UTF-8?q?=E5=95=86=E5=93=81=E7=AE=A1=E7=90=86=20?=
=?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=94=AE=E7=BD=84=E6=8C=89=E9=92=AE=E5=BC=80?=
=?UTF-8?q?=E5=85=B3=E6=9A=82=E6=97=B6=E9=9A=90=E8=97=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pageProduct/add-Product/components/edit-haocai.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pageProduct/add-Product/components/edit-haocai.vue b/pageProduct/add-Product/components/edit-haocai.vue
index 5b66a5b..ac4ae06 100644
--- a/pageProduct/add-Product/components/edit-haocai.vue
+++ b/pageProduct/add-Product/components/edit-haocai.vue
@@ -135,9 +135,9 @@
当某个耗材的使用库存不足时,商品自动
售罄。
-
+
保存
From a5b8362e0f7df5b5949db4d576950d43217661e0 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Sat, 12 Oct 2024 14:46:54 +0800
Subject: [PATCH 05/39] =?UTF-8?q?=E4=BB=A3=E5=AE=A2=E4=B8=8B=E5=8D=95?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E9=80=89=E6=8B=A9=E7=94=A8=E6=88=B7?=
=?UTF-8?q?=E5=8F=AA=E8=83=BD=E9=80=89=E6=8B=A9=E4=BC=9A=E5=91=98=E7=94=A8?=
=?UTF-8?q?=E6=88=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagesCreateOrder/choose-user/choose-user.vue | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pagesCreateOrder/choose-user/choose-user.vue b/pagesCreateOrder/choose-user/choose-user.vue
index f2767b7..fafd2ca 100644
--- a/pagesCreateOrder/choose-user/choose-user.vue
+++ b/pagesCreateOrder/choose-user/choose-user.vue
@@ -85,7 +85,8 @@
const query = reactive({
page: 0,
name: '',
- size: 300
+ size: 300,
+ isVip:1
})
const list = reactive([])
async function getUser() {
From 0dab2ee22d7273f13170bdfba53cb68b9158ee67 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Sat, 12 Oct 2024 14:47:18 +0800
Subject: [PATCH 06/39] =?UTF-8?q?=E4=BB=A3=E5=AE=A2=E4=B8=8B=E5=8D=95?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0=E8=8E=B7=E5=8F=96=E5=8F=B0?=
=?UTF-8?q?=E6=A1=8C=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../confirm-order/confirm-order.vue | 17 +-
pagesCreateOrder/index/index.vue | 78 +++--
.../order-detail/components/extra.vue | 36 ---
.../order-detail/components/list.vue | 144 ---------
.../order-detail/components/order.vue | 66 ----
.../order-detail/components/step.vue | 26 --
.../order-detail/components/tuicai.vue | 100 ------
.../order-detail/components/user.vue | 40 ---
.../order-detail/order-detail.vue | 156 ----------
pagesCreateOrder/order-detail/page.js | 23 --
pagesCreateOrder/pay-order/pay-order.vue | 288 ------------------
11 files changed, 69 insertions(+), 905 deletions(-)
delete mode 100644 pagesCreateOrder/order-detail/components/extra.vue
delete mode 100644 pagesCreateOrder/order-detail/components/list.vue
delete mode 100644 pagesCreateOrder/order-detail/components/order.vue
delete mode 100644 pagesCreateOrder/order-detail/components/step.vue
delete mode 100644 pagesCreateOrder/order-detail/components/tuicai.vue
delete mode 100644 pagesCreateOrder/order-detail/components/user.vue
delete mode 100644 pagesCreateOrder/order-detail/order-detail.vue
delete mode 100644 pagesCreateOrder/order-detail/page.js
delete mode 100644 pagesCreateOrder/pay-order/pay-order.vue
diff --git a/pagesCreateOrder/confirm-order/confirm-order.vue b/pagesCreateOrder/confirm-order/confirm-order.vue
index 074fbd9..e8953f0 100644
--- a/pagesCreateOrder/confirm-order/confirm-order.vue
+++ b/pagesCreateOrder/confirm-order/confirm-order.vue
@@ -346,9 +346,12 @@
productId,
skuId,
id,
- number
+ number,
+ isPack,isGift
} = item
const par = {
+ isPack,
+ isGift,
masterId: option.masterId,
tableId: table.value.tableId,
productId,
@@ -453,11 +456,19 @@
totalNumber: 0,
totalAmount: 0,
})
- const allPrice = computed(() => {
+ const goodsPrice = computed(() => {
const goodsTotalPrice = goods.list.reduce((prve, cur) => {
return prve + cur.salePrice * cur.number * (cur.isGift ? 0 : 1)
}, 0)
- return (goodsTotalPrice + $seatFee.totalAmount || 0).toFixed(2)
+ return (goodsTotalPrice|| 0).toFixed(2)
+ })
+ const allPrice = computed(() => {
+ const n=goodsPrice.value*1 + ($seatFee.totalAmount || 0)
+ return n.toFixed(2)
+ // const goodsTotalPrice = goods.list.reduce((prve, cur) => {
+ // return prve + cur.salePrice * cur.number * (cur.isGift ? 0 : 1)
+ // }, 0)
+ // return (goodsTotalPrice + ($seatFee.totalAmount || 0)).toFixed(2)
})
function setGoodsItem(key, val) {
diff --git a/pagesCreateOrder/index/index.vue b/pagesCreateOrder/index/index.vue
index b618e81..81a9ff4 100644
--- a/pagesCreateOrder/index/index.vue
+++ b/pagesCreateOrder/index/index.vue
@@ -1,6 +1,6 @@
-
+
@@ -15,7 +15,7 @@
-
+
- 退菜
-
-
-
-
- 备注
- 无
-
-
-
-
-
-
- 未支付
-
-
- 小计¥
- {{allPrice}}
-
-
-
-
-
-
- 总计¥
- {{seatFee*1+allPrice*1}}
-
-
-
- 重新打印
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pagesCreateOrder/order-detail/components/order.vue b/pagesCreateOrder/order-detail/components/order.vue
deleted file mode 100644
index fb6fc52..0000000
--- a/pagesCreateOrder/order-detail/components/order.vue
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
- 订单状态
- {{returnStatus(data.status)}}
-
-
- 订单类型
- 堂食
-
-
- 桌位号
- {{table.name}}
-
-
- 就餐人数
- {{seatFee.totalNumber}}
-
-
- 支付方式
-
-
-
- 预约时间
-
-
-
- 下单时间
-
-
-
- 订单编号
- {{data.orderNo}}
-
-
- 商家备注
- 编辑
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pagesCreateOrder/order-detail/components/step.vue b/pagesCreateOrder/order-detail/components/step.vue
deleted file mode 100644
index 8de801f..0000000
--- a/pagesCreateOrder/order-detail/components/step.vue
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pagesCreateOrder/order-detail/components/tuicai.vue b/pagesCreateOrder/order-detail/components/tuicai.vue
deleted file mode 100644
index a03d2df..0000000
--- a/pagesCreateOrder/order-detail/components/tuicai.vue
+++ /dev/null
@@ -1,100 +0,0 @@
-
-
-
-
-
- {{data.name}}
-
-
-
-
-
-
- 退菜理由
- *
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 确认退菜
-
- 取消
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pagesCreateOrder/order-detail/components/user.vue b/pagesCreateOrder/order-detail/components/user.vue
deleted file mode 100644
index 2ad40f5..0000000
--- a/pagesCreateOrder/order-detail/components/user.vue
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
- 切换
-
-
-
- 未绑定手机号
-
-
- 他的订单
-
-
-
-
- 0.00
- 余额
-
-
- 0.00
- 积分
-
-
- 0.00
- 已消费
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pagesCreateOrder/order-detail/order-detail.vue b/pagesCreateOrder/order-detail/order-detail.vue
deleted file mode 100644
index b70780a..0000000
--- a/pagesCreateOrder/order-detail/order-detail.vue
+++ /dev/null
@@ -1,156 +0,0 @@
-
-
-
-
- 桌位号:
- {{options.name}}
-
-
-
-
-
-
-
-
-
- 加菜
-
-
- 结账
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pagesCreateOrder/order-detail/page.js b/pagesCreateOrder/order-detail/page.js
deleted file mode 100644
index 10c3daa..0000000
--- a/pagesCreateOrder/order-detail/page.js
+++ /dev/null
@@ -1,23 +0,0 @@
-import {
- reactive, ref
-} from 'vue';
-function isSameType(a, b) {
- return a instanceof b === true || b instanceof a === true;
-}
-class OrderDetail {
- constructor(data) {
- const user ={}
- const table = {}
- const goodsList =[]
- const orderInfo = {}
- this.data=reactive({
- user,table,goodsList,orderInfo
- })
- Object.assign(this, data)
- }
- setVal(key,val){
- this.data[key]=val
- }
-}
-
-export default OrderDetail
\ No newline at end of file
diff --git a/pagesCreateOrder/pay-order/pay-order.vue b/pagesCreateOrder/pay-order/pay-order.vue
deleted file mode 100644
index 8630537..0000000
--- a/pagesCreateOrder/pay-order/pay-order.vue
+++ /dev/null
@@ -1,288 +0,0 @@
-
-
-
-
- ¥
- {{order.amount}}
-
-
- ¥
- {{order.amount}}
-
-
- 修改
-
-
-
-
- 优惠券
-
- 选择优惠券
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.payName}}
-
-
-
-
-
-
-
-
-
-
- 确认付款
-
-
-
-
- 请让顾客使用微信扫码
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
From 2054b0b1439fa8966fae54b22f6f691e3ccf0fd9 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Sat, 12 Oct 2024 14:47:50 +0800
Subject: [PATCH 07/39] =?UTF-8?q?=E6=94=AF=E4=BB=98=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=94=AF=E4=BB=98=E5=AE=8C=E6=88=90=E5=9B=9E?=
=?UTF-8?q?=E8=B0=83=E9=80=9A=E7=9F=A5=E4=BB=A3=E5=AE=A2=E4=B8=8B=E5=8D=95?=
=?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=A1=8C=E5=8F=B0=E4=BF=A1=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagesOrder/pay-order/pay-order.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pagesOrder/pay-order/pay-order.vue b/pagesOrder/pay-order/pay-order.vue
index a4cdff8..a4e1183 100644
--- a/pagesOrder/pay-order/pay-order.vue
+++ b/pagesOrder/pay-order/pay-order.vue
@@ -242,7 +242,7 @@
setTimeout(() => {
// uni.$emit('orderDetail:update')
payFinish.value=true
- // uni.$emit('update:createOrderIndex')
+ uni.$emit('get:table')
uni.navigateBack({
delta: 1
})
From 1bf3334127d954cb927891ac30400266eb8c93f7 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Sat, 12 Oct 2024 14:48:31 +0800
Subject: [PATCH 08/39] =?UTF-8?q?=E5=89=94=E9=99=A4=E5=BA=9F=E5=BC=83?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages.json | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/pages.json b/pages.json
index 850f3a9..3e450f3 100644
--- a/pages.json
+++ b/pages.json
@@ -1025,22 +1025,7 @@
"style": {
"navigationBarTitleText": "添加临时菜"
}
- },
- {
- "pageId": "PAGES_CRESATE_ORDER_DETAIL",
- "path": "order-detail/order-detail",
- "style": {
- "navigationBarTitleText": "订单详情"
- }
- },
- {
- "pageId": "PAGES_CRESATE_ORDER_PAY",
- "path": "pay-order/pay-order",
- "style": {
- "navigationBarTitleText": "结账"
- }
}
-
]
},
{
From 68c23e6e4891f16bf321b6cf71d0e29c7eeed77b Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Sat, 12 Oct 2024 15:18:27 +0800
Subject: [PATCH 09/39] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=A3=E5=AE=A2?=
=?UTF-8?q?=E4=B8=8B=E5=8D=95=E8=B5=B7=E5=94=AE=E6=95=B0=E9=87=8F=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagesCreateOrder/index/components/guige.vue | 12 +++++++++++-
pagesCreateOrder/index/index.vue | 14 +++++++++-----
2 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/pagesCreateOrder/index/components/guige.vue b/pagesCreateOrder/index/components/guige.vue
index b4d723c..a3c4b6a 100644
--- a/pagesCreateOrder/index/components/guige.vue
+++ b/pagesCreateOrder/index/components/guige.vue
@@ -52,8 +52,10 @@
import {
computed,
reactive,
- ref
+ ref,
+ watch
} from 'vue';
+ import infobox from '@/commons/utils/infoBox.js'
import myModel from '@/components/my-components/my-model.vue'
import myButton from '@/components/my-components/my-button.vue'
const props = defineProps({
@@ -98,6 +100,10 @@
const goods=computed(()=>{
return props.skuMap[selSku.value]
})
+ watch(()=>goods.value,(newval)=>{
+ console.log(newval);
+ number.value=newval.suit||1
+ })
//全部规格是否都无法使用
const isAllDisabled=computed(()=>{
@@ -142,7 +148,11 @@
if(isDisabled()){
return
}
+ const suit=goods.value.suit||1
const newval = number.value - 1
+ if(newval v.id == categoryId)
const $goods = data.tabbar[tabbarIndex].foods.find(v => v.id == productId)
- if (num === 0) {
+ const $sku = $goods.specList.find(v => v.id == skuId)
+
+ if (num === 0||num<$sku.suit) {
//移除
await removeCartGoods({
cartId
@@ -793,13 +796,14 @@
});
const productId = $goods.id
const skuId = $goods.specList[0].id
+ const suit=$goods.specList[0].suit||1
if (goodsInCarIndex !== -1) {
//更新
const carGoods = cars[goodsInCarIndex]
const cartId = carGoods.id
const step = isAdd ? 1 : -1
const num = carGoods.number * 1 + step
- if (num === 0) {
+ if (num === 0||num
Date: Sat, 12 Oct 2024 15:18:48 +0800
Subject: [PATCH 10/39] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=80=80=E6=AC=BE?=
=?UTF-8?q?=E8=AE=A2=E5=8D=95=E9=80=80=E6=AC=BE=E9=87=91=E9=A2=9D=E4=B8=8D?=
=?UTF-8?q?=E5=AF=B9=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagesOrder/detail/components/list.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pagesOrder/detail/components/list.vue b/pagesOrder/detail/components/list.vue
index 2f6edad..411662b 100644
--- a/pagesOrder/detail/components/list.vue
+++ b/pagesOrder/detail/components/list.vue
@@ -86,7 +86,7 @@
退款金额
- {{orderInfo.originAmount}}
+ {{orderInfo.refundAmount}}
From 54f824f2dec1b993dd2595b0daf56c1a11ec029f Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Sat, 12 Oct 2024 16:51:28 +0800
Subject: [PATCH 11/39] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BB=A3=E5=AE=A2?=
=?UTF-8?q?=E4=B8=8B=E5=8D=95=E6=90=9C=E7=B4=A2=E8=81=94=E5=8A=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../index/components/goods-item.vue | 2 +-
pagesCreateOrder/index/components/guige.vue | 119 +++++++++++-------
pagesCreateOrder/index/index.vue | 40 ++++--
3 files changed, 105 insertions(+), 56 deletions(-)
diff --git a/pagesCreateOrder/index/components/goods-item.vue b/pagesCreateOrder/index/components/goods-item.vue
index 5e97132..186907a 100644
--- a/pagesCreateOrder/index/components/goods-item.vue
+++ b/pagesCreateOrder/index/components/goods-item.vue
@@ -58,7 +58,7 @@
}
},
index: {
- type: Number,
+ type: [Number,String],
},
isSeatFee:{
//是否为餐位费
diff --git a/pagesCreateOrder/index/components/guige.vue b/pagesCreateOrder/index/components/guige.vue
index a3c4b6a..27df7d0 100644
--- a/pagesCreateOrder/index/components/guige.vue
+++ b/pagesCreateOrder/index/components/guige.vue
@@ -8,8 +8,8 @@
+ :class="{active:item.sel===skd.name,disabled:skd.disabled}"
+ v-for="(skd,skdIndex) in item.values" :key="skdIndex">
{{skd.name}}
@@ -19,7 +19,7 @@
-
+
¥
{{to2(goods.salePrice*number) }}
@@ -40,7 +40,9 @@
- 已下架/售罄
+
+ 已下架/售罄
+
添加
@@ -55,10 +57,15 @@
ref,
watch
} from 'vue';
+ import util from '../util.js';
import infobox from '@/commons/utils/infoBox.js'
import myModel from '@/components/my-components/my-model.vue'
import myButton from '@/components/my-components/my-button.vue'
const props = defineProps({
+ goodsData: {
+ type: Object,
+ default: () => {}
+ },
title: {
type: String,
default: ''
@@ -82,53 +89,72 @@
}
}
})
-
- function to2(number){
+
+ function to2(number) {
return Number(number).toFixed(2)
}
-
-
-
- const selSku=computed(()=>{
- return props.skus.reduce((prve,cur)=>{
+
+
+
+ const selSku = computed(() => {
+ return props.skus.reduce((prve, cur) => {
prve.push(cur.sel)
return prve
- },[]).join()
+ }, []).join()
})
-
-
- const goods=computed(()=>{
+
+
+ const goods = computed(() => {
return props.skuMap[selSku.value]
})
- watch(()=>goods.value,(newval)=>{
- console.log(newval);
- number.value=newval.suit||1
+ watch(() => goods.value, (newval) => {
+ console.log(props.goodsData.isStock);
+ number.value = newval.suit || 1
})
+
+ const isCanBuy=computed(()=>{
+ if(!goods.value) {
+ return false
+ }
+ console.log(util.isCanBuy({
+ ...goods.value,
+ isStock: props.goodsData.isStock
+ }));
+ return util.isCanBuy({
+ ...goods.value,
+ isStock: props.goodsData.isStock
+ })
+
+ })
+
//全部规格是否都无法使用
- const isAllDisabled=computed(()=>{
+ const isAllDisabled = computed(() => {
console.log(props.skus);
- return props.skus.reduce((prve,cur)=>{
- return prve&&cur.values.filter(v=>v.disabled).length===cur.values.length
- },true)
+ return props.skus.reduce((prve, cur) => {
+ return prve && cur.values.filter(v => v.disabled).length === cur.values.length
+ }, true)
})
-
- const emits = defineEmits(['confirm','updateSku'])
+
+ const emits = defineEmits(['confirm', 'updateSku'])
let number = ref(1)
-
-
+
+
function chooseSkd(skusIndex, skd) {
- const {name,disabled}=skd
- if(disabled){
+ const {
+ name,
+ disabled
+ } = skd
+ if (disabled) {
return
}
- if(props.skus[skusIndex].sel!=name){
- emits('updateSku',skusIndex,name)
+ if (props.skus[skusIndex].sel != name) {
+ emits('updateSku', skusIndex, name)
}
}
- const defaultIndex=reactive(new Array(props.skus.length).fill(''))
- for(let i in props.defaultIndex){
- defaultIndex[i]=props.defaultIndex[i]
+ const defaultIndex = reactive(new Array(props.skus.length).fill(''))
+ for (let i in props.defaultIndex) {
+ defaultIndex[i] = props.defaultIndex[i]
}
const activeArr = defaultIndex
@@ -143,37 +169,39 @@
function close() {
model.value.close()
}
-
+
+ const isDisabled=computed(()=>{
+ return isAllDisabled.value || !isCanBuy.value
+ })
+
function reduce() {
- if(isDisabled()){
+ if (isDisabled.value) {
return
}
- const suit=goods.value.suit||1
+ const suit = goods.value.suit || 1
const newval = number.value - 1
- if(newval
+
@@ -122,6 +123,7 @@
@@ -304,7 +306,7 @@
masterId: data.masterId,
tableId: data.table.tableId
}) {
- const res= await Api.getCart(par)
+ const res = await Api.getCart(par)
return res
}
//获取取餐码
@@ -491,6 +493,10 @@
}
function search() {
+ if(searchValue.value===''){
+ isSearch.value = false
+ return
+ }
isSearch.value = true
searchResult.value = returnSearchGoods()
console.log(searchResult.value);
@@ -673,7 +679,9 @@
}
}
}
-
+
+
+ let selGoods=ref({})
function chooseGuige(foodsindex, index) {
if (!canAddGoods()) {
return infoBox.showToast('清先选择桌台', 0.5).then(res => {
@@ -681,6 +689,7 @@
})
}
const $goods = data.tabbar[index].foods[foodsindex]
+ selGoods.value=$goods
guigeModelData.title = $goods.name
const specList = $goods.specList;
const tagSnap = JSON.parse($goods.skuResult.tagSnap)
@@ -744,8 +753,8 @@
const tabbarIndex = data.tabbar.findIndex(v => v.id == categoryId)
const $goods = data.tabbar[tabbarIndex].foods.find(v => v.id == productId)
const $sku = $goods.specList.find(v => v.id == skuId)
-
- if (num === 0||num<$sku.suit) {
+
+ if (num === 0 || num < $sku.suit) {
//移除
await removeCartGoods({
cartId
@@ -782,7 +791,16 @@
function canAddGoods() {
return data.table.tableId
}
- async function goodsUpdate(foodsindex, index, isAdd) {
+
+ function searchGoodsUpdate(goodsItem,goodsIndex, isAdd) {
+ goodsUpdate(goodsItem.goodsIndex, goodsItem.index, isAdd,goodsIndex)
+ }
+ function setSearchGoods(index,chooseNumber){
+ if(index!==undefined){
+ searchResult.value[index].chooseNumber=chooseNumber
+ }
+ }
+ async function goodsUpdate(foodsindex, index, isAdd,searchGoodsIndex) {
if (!canAddGoods()) {
return infoBox.showToast('请先选择桌台', 0.5).then(res => {
chooseTable()
@@ -796,17 +814,18 @@
});
const productId = $goods.id
const skuId = $goods.specList[0].id
- const suit=$goods.specList[0].suit||1
+ const suit = $goods.specList[0].suit || 1
if (goodsInCarIndex !== -1) {
//更新
const carGoods = cars[goodsInCarIndex]
const cartId = carGoods.id
const step = isAdd ? 1 : -1
const num = carGoods.number * 1 + step
- if (num === 0||num
Date: Sat, 12 Oct 2024 17:04:13 +0800
Subject: [PATCH 12/39] =?UTF-8?q?=E4=BB=A3=E5=AE=A2=E4=B8=8B=E5=8D=95?=
=?UTF-8?q?=E6=9A=82=E6=97=B6=E5=BD=B1=E8=97=8F=E6=89=93=E5=8C=85=E8=B4=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../confirm-order/confirm-order.vue | 22 ++++++++++---------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/pagesCreateOrder/confirm-order/confirm-order.vue b/pagesCreateOrder/confirm-order/confirm-order.vue
index e8953f0..454b466 100644
--- a/pagesCreateOrder/confirm-order/confirm-order.vue
+++ b/pagesCreateOrder/confirm-order/confirm-order.vue
@@ -200,19 +200,21 @@
-
-
-
- 包装费
- 桌位费
+
+
+
+
+
+ 桌位费
+
+ ¥{{$seatFee.totalAmount||'0.00'}}
- ¥{{$seatFee.totalAmount||'0.00'}}
-
+
-
+
实收金额
¥{{formatPrice(allPrice) }}
@@ -463,7 +465,7 @@
return (goodsTotalPrice|| 0).toFixed(2)
})
const allPrice = computed(() => {
- const n=goodsPrice.value*1 + ($seatFee.totalAmount || 0)
+ const n=goodsPrice.value*1 + (eatTypes.active=='takeout'?0:($seatFee.totalAmount || 0))
return n.toFixed(2)
// const goodsTotalPrice = goods.list.reduce((prve, cur) => {
// return prve + cur.salePrice * cur.number * (cur.isGift ? 0 : 1)
From 0fbc897d2c11070c25cc8152861f79ca7bc736e6 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Sat, 12 Oct 2024 17:27:36 +0800
Subject: [PATCH 13/39] =?UTF-8?q?=E4=BB=A3=E5=AE=A2=E4=B8=8B=E5=8D=95?=
=?UTF-8?q?=E7=A1=AE=E8=AE=A4=E8=AE=A2=E5=8D=95=E5=A2=9E=E5=8A=A0=20?=
=?UTF-8?q?=E5=BD=93=E5=B0=B1=E9=A4=90=E7=B1=BB=E5=9E=8B=E5=88=87=E6=8D=A2?=
=?UTF-8?q?=E5=90=8E=E9=87=8D=E6=96=B0=E8=8E=B7=E5=8F=96=E8=B4=AD=E7=89=A9?=
=?UTF-8?q?=E8=BD=A6=E6=95=B0=E6=8D=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagesCreateOrder/confirm-order/confirm-order.vue | 1 +
1 file changed, 1 insertion(+)
diff --git a/pagesCreateOrder/confirm-order/confirm-order.vue b/pagesCreateOrder/confirm-order/confirm-order.vue
index 454b466..52c373a 100644
--- a/pagesCreateOrder/confirm-order/confirm-order.vue
+++ b/pagesCreateOrder/confirm-order/confirm-order.vue
@@ -637,6 +637,7 @@
tableId,
cartIds: goods.list.map((v) => v.id),
})
+ getCart()
return res
}
watch(() => eatTypes.active, (newval) => {
From b32a3a398b00ffeb835fdc0be984090d46a2d2a1 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Sat, 12 Oct 2024 17:51:02 +0800
Subject: [PATCH 14/39] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=93=E5=8C=85?=
=?UTF-8?q?=E8=B4=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../confirm-order/confirm-order.vue | 47 ++++++++++++++-----
1 file changed, 34 insertions(+), 13 deletions(-)
diff --git a/pagesCreateOrder/confirm-order/confirm-order.vue b/pagesCreateOrder/confirm-order/confirm-order.vue
index 52c373a..cf36655 100644
--- a/pagesCreateOrder/confirm-order/confirm-order.vue
+++ b/pagesCreateOrder/confirm-order/confirm-order.vue
@@ -183,7 +183,7 @@
-
+
@@ -200,16 +200,26 @@
-
-
-
-
-
- 桌位费
+
+
+
+
+ 桌位费
+
+ ¥{{$seatFee.totalAmount||'0.00'}}
- ¥{{$seatFee.totalAmount||'0.00'}}
-
-
+
+
+
+
+ 打包费
+
+ ¥{{$packFee||'0.00'}}
+
+
+
+
+
+
-
+
打印机状态
@@ -215,11 +215,9 @@
} from '@/pagePrinter/devices.js'
import {
onLoad,
- onShow
} from '@dcloudio/uni-app'
import {
ref,
- onBeforeUnmount,
reactive,
computed,
watch,
@@ -294,14 +292,11 @@
})
}
})
-
partList.value = arr
}
-
function sizeChange(e, name) {
form[name] = e.detail.value
}
-
//打印份数
const printerNums = reactive({
list: new Array(4).fill(1).map((v, index) => {
@@ -316,7 +311,6 @@
const feets = ref([0, 1, 2, 3, 4, 5, 8].map(v => {
return v + '行'
}))
-
let form = reactive({
sort: "0",
status: 0,
@@ -348,13 +342,11 @@
...form
})
}
-
go.to('/pagePrinter/index/index')
}
// watch(() => form.config.model, (newval) => {
// console.log(newval);
// })
-
// const option = reactive({})
async function getdetails() {
const res = await Api.printerd(userId.value)
@@ -365,6 +357,7 @@
})
res.selectcheckbox = arrs
form = Object.assign(form, res)
+ form.printType = JSON.parse(form.printType)
}
onLoad((options) => {
if (options.id) {
@@ -376,10 +369,6 @@
}
// Object.assign(option, opt)
})
- onBeforeUnmount(() => {
-
- })
- onShow(() => {})
\ No newline at end of file
diff --git a/pageGoodsGroup/index/index.vue b/pageGoodsGroup/index/index.vue
index 80ff21e..9761a09 100644
--- a/pageGoodsGroup/index/index.vue
+++ b/pageGoodsGroup/index/index.vue
@@ -25,6 +25,7 @@
+
@@ -44,6 +45,7 @@
import infoBox from "@/commons/utils/infoBox.js"
import editSort from './components/edit-sort.vue';
import editName from './components/edit-name.vue';
+ import editTime from './components/edit-time.vue';
import {
tbProductGroupGet,
tbProductGroupDelete,
@@ -66,7 +68,13 @@
name: '管理商品',
color: '#333',
fontSize: '16'
- }],
+ },
+ {
+ name: '售卖时间',
+ color: '#333',
+ fontSize: '16'
+ }
+ ],
show: false,
})
@@ -82,6 +90,9 @@
})
}
+ if (e.name == '售卖时间') {
+ return popupShow(actions.selIndex, 'time', true)
+ }
}
function actionsHide() {
@@ -106,6 +117,9 @@
},
name:{
show: false
+ },
+ time:{
+ show: false
}
})
@@ -119,6 +133,7 @@
const res = await $productCategory.update(e)
popup.sort.show = false;
popup.name.show = false;
+ popup.time.show = false;
pageData.list[popup.selIndex] = e
infoBox.showToast('更新成功')
}
From a5091f8f2d79f5892647b8eff4a567045d4ea93c Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Tue, 15 Oct 2024 15:22:37 +0800
Subject: [PATCH 21/39] =?UTF-8?q?=E5=95=86=E5=93=81=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E7=BC=96=E8=BE=91=E6=9B=B4=E6=96=B0=EF=BC=8C=E4=BF=AE=E5=A4=8D?=
=?UTF-8?q?=E5=8D=95=E8=A7=84=E6=A0=BC=E5=A4=9A=E8=A7=84=E6=A0=BC=E5=88=87?=
=?UTF-8?q?=E6=8D=A2=E4=BF=9D=E5=AD=98=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?=
=?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E9=83=A8=E5=88=86=E5=BF=85=E5=A1=AB?=
=?UTF-8?q?=E9=A1=B9=E9=AA=8C=E8=AF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pageProduct/add-Product/add-Product.vue | 149 ++++++----
.../add-Product/components/choose-danwei.vue | 5 +-
.../choose-specifications.vue | 276 +++++++++++-------
pageProduct/goodsData.js | 15 +-
pageProduct/index/components/goods.vue | 49 +++-
5 files changed, 323 insertions(+), 171 deletions(-)
diff --git a/pageProduct/add-Product/add-Product.vue b/pageProduct/add-Product/add-Product.vue
index e6b3a11..c2bd2a6 100644
--- a/pageProduct/add-Product/add-Product.vue
+++ b/pageProduct/add-Product/add-Product.vue
@@ -47,17 +47,18 @@
-
-
+
-
-
+
+
-
+
@@ -129,7 +130,7 @@
:key="index">
{{item.specSnap}}
¥{{item.salePrice}}
- {{item.stockNumber}}
+ {{item.stockNumber||0}}
@@ -216,7 +217,7 @@
-
+
-->
-
+
@@ -418,8 +419,7 @@
-
@@ -1092,10 +1092,10 @@
}
}
}
+ res.skuList = (res.skuList.length ? res.skuList : [])
$goodsData = res
- console.log(res);
+ skuList.list = res.skuList
Object.assign(FormData, res)
- skuList.list = res.skuList || []
//多规格
if (res.typeEnum === 'sku') {
const selectSpec = JSON.parse(res.selectSpec)
@@ -1139,8 +1139,12 @@
}),
specList: [],
}
+ } else {
+ // 单规格
+
}
+
})
}
@@ -1321,14 +1325,23 @@
return infoBox.showToast('请上传商品图片')
}
const skuSnap = []
- let submitSkuList = FormData.specificationsGroup ? skuList.list : [{
- ...$defaultSku,
- barCode: `${uni.getStorageSync("shopId")}${dayjs().valueOf()}`
- }];
- if (typeEnum == 'normal') {
- submitSkuList = skuList.list;
+ let submitSkuList = skuList.list || []
+ if(option.type=='edit'){
+ submitSkuList=submitSkuList.map(v=>{
+ return{
+ ...v,productId:FormData.id,shopId:uni.getStorageSync('shopId')
+ }
+ })
}
- console.log(submitSkuList);
+ // if(typeEnum!=$goodsData.typeEnum){
+ // if(typeEnum=='normal'){
+ // submitSkuList = skuList.list;
+ // }else{
+ // submitSkuList = skuList.list;
+ // }
+ // }else{
+ // submitSkuList = skuList.list;
+ // }
if (FormData.specificationsGroup) {
for (let i of FormData.specificationsGroup.selectSpec) {
if (i.selectSpecResult.length) {
@@ -1340,22 +1353,37 @@
}
}
console.log(FormData.specificationsGroup);
- const selectSpec = FormData.typeEnum != 'sku' ? '' : JSON.stringify(FormData.specificationsGroup
- .selectSpec.map(spe => {
- return {
- ...spe,
- value: spe.value.map(v => {
- return typeof v === 'string' ? v : v.text || v.value
- })
- }
- }))
+ const selectSpec = FormData.typeEnum != 'sku' ? '[]' : JSON.stringify((FormData.specificationsGroup
+ .selectSpec || []).map(spe => {
+ return {
+ ...spe,
+ value: spe.value.map(v => {
+ return typeof v === 'string' ? v : v.text || v.value
+ })
+ }
+ }))
+ const lowPrice = submitSkuList[0] ? submitSkuList[0].salePrice : FormData.salePrice
+ // const lowPrice = submitSkuList[0] ? submitSkuList[0].salePrice : FormData.salePrice
+ const suit = submitSkuList[0] ? submitSkuList[0].suit : 0
+ if(typeEnum=='normal'){
+ if(lowPrice===''){
+ return infoBox.showToast('请输入售价')
+ }
+ if(lowPrice===''){
+ return infoBox.showToast('请输入售价')
+ }
+ if(suit<=0){
+ return infoBox.showToast('起售数量不能小于0!')
+ }
+ }
+
const submitData = {
...FormData,
images: images,
coverImg: images[0] || '',
skuList: submitSkuList,
specInfo: JSON.stringify(submitSkuList),
- lowPrice: submitSkuList[0].salePrice,
+ lowPrice,
specificationsGroup: undefined,
selectSpec,
skuSnap: JSON.stringify(skuSnap)
@@ -1402,6 +1430,7 @@
uni.$off('emitspecificationsSave')
uni.$on('emitspecificationsSave', function(data) {
FormData.specificationsGroup = data
+ FormData.specId = data.specId
skuList.list = data.result.map(v => {
return {
...v.skus,
@@ -1499,35 +1528,50 @@
watch(() => FormData.typeEnum, (newval) => {
- if (option.type === 'add') {
- if (newval === 'sku') {
- skuList.list = []
+ if (option.type == 'edit') {
+ FormData.specId = newval == 'normal' ? '' : ($goodsData.specId || '')
+ if (newval == $goodsData.typeEnum) {
+ skuList.list = $goodsData.skuList
} else {
- skuList.list[0] = {
- ...$defaultSku,
- barCode: `${uni.getStorageSync("shopId")}${dayjs().valueOf()}`
+ if (newval == 'normal') {
+ skuList.list = [{
+ ...$defaultSku,
+ productId: FormData.id,
+ shopId: uni.getStorageSync('shopId'),
+ barCode: `${uni.getStorageSync("shopId")}${dayjs().valueOf()}`
+ }]
+ } else {
+ skuList.list = []
}
}
- }else{
- //编辑
- if (newval === 'sku') {
- skuList.list = []
+ } else {
+ FormData.specId = ''
+ if (newval == 'normal') {
+ skuList.list = [{
+ ...$defaultSku,
+ shopId: uni.getStorageSync('shopId'),
+ barCode: `${uni.getStorageSync("shopId")}${dayjs().valueOf()}`
+ }]
} else {
- skuList.list=$goodsData.skuList
+ skuList.list = []
}
}
+
})
-
+
/**
* 权限start
*/
-
+
// 允许修改商品库存
- let disabledStock=ref(false)
+ let disabledStock = ref(false)
async function canEditGoodsStock() {
if (option.type === 'edit') {
- const res=await hasPermission({text:'允许修改商品库存',tips:false})
- disabledStock.value=!res
+ const res = await hasPermission({
+ text: '允许修改商品库存',
+ tips: false
+ })
+ disabledStock.value = !res
}
}
watch(() => FormData.isStock, (newval) => {
@@ -1536,18 +1580,21 @@
}
})
// 允许修改商品分类
- let disabledChangeCategory=ref(false)
- async function canEditGoodsCategory(tips=false) {
+ let disabledChangeCategory = ref(false)
+ async function canEditGoodsCategory(tips = false) {
if (option.type === 'edit') {
- const res=await hasPermission({text:'允许修改分类',tips})
- disabledChangeCategory.value=!res
+ const res = await hasPermission({
+ text: '允许修改分类',
+ tips
+ })
+ disabledChangeCategory.value = !res
}
}
/**
* 权限end
*/
-
-
+
+
watch(() => pageData.types, (newval) => {
Forms.value.setRules(rules)
})
diff --git a/pageProduct/add-Product/components/choose-danwei.vue b/pageProduct/add-Product/components/choose-danwei.vue
index 7fdf82a..baa07d0 100644
--- a/pageProduct/add-Product/components/choose-danwei.vue
+++ b/pageProduct/add-Product/components/choose-danwei.vue
@@ -1,8 +1,11 @@
-
+
+
+
diff --git a/pageProduct/add-specifications/choose-specifications.vue b/pageProduct/add-specifications/choose-specifications.vue
index 3472799..d2d4298 100644
--- a/pageProduct/add-specifications/choose-specifications.vue
+++ b/pageProduct/add-specifications/choose-specifications.vue
@@ -15,11 +15,11 @@
-
+
{{item.name}}
-
+
@@ -29,22 +29,15 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -54,21 +47,19 @@
-
+
图片
-
+
-
-
-
+
+
-
+
-
+
-
+
-
+
-
+
@@ -116,10 +107,11 @@
:placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
v-model="item.skus.barCode" placeholder="请输入商品条码" />
+
-
+
-
+
@@ -132,20 +124,20 @@
-
+
-
-
+
+
@@ -591,12 +646,14 @@
border-radius: 12rpx;
font-size: 28rpx;
}
- .edit-btn{
+
+ .edit-btn {
background-color: #fff;
color: #333;
border-radius: 12rpx;
font-size: 28rpx;
}
+
.btn-hover-class {
opacity: .6;
}
@@ -607,18 +664,21 @@
padding-left: 42rpx;
border-radius: 14rpx 14rpx 14rpx 14rpx;
}
- .fast-edit{
- .item{
+
+ .fast-edit {
+ .item {
color: #333;
border: 1px solid #bbb;
padding: 4rpx 10rpx 8rpx 10rpx;
border-radius: 10rpx;
min-width: 186rpx;
- &.active{
+
+ &.active {
color: $my-main-color;
}
}
}
+
::v-deep .uni-input-placeholder {
font-size: 28rpx;
}
diff --git a/pageProduct/goodsData.js b/pageProduct/goodsData.js
index 16c1dcc..e74b5b7 100644
--- a/pageProduct/goodsData.js
+++ b/pageProduct/goodsData.js
@@ -28,16 +28,17 @@ export const $types = [{
// 商品默认sku
export const $defaultSku = {
- salePrice: 0,
- memberPrice: 0,
- costPrice: 0,
- originPrice: 0,
- stockNumber: 0,
- firstShared: 0,
- suit: 0,
+ salePrice: '',
+ memberPrice: '',
+ costPrice: '',
+ originPrice: '',
+ stockNumber: '',
+ firstShared: '',
+ suit: 1,
barCode: `${uni.getStorageSync("shopId")}${dayjs().valueOf()}`,
}
+
// 库存记录筛选类型
export const $invoicingType = [{
text: '全部',
diff --git a/pageProduct/index/components/goods.vue b/pageProduct/index/components/goods.vue
index 4ad555f..0598bfd 100644
--- a/pageProduct/index/components/goods.vue
+++ b/pageProduct/index/components/goods.vue
@@ -46,7 +46,7 @@
-
+
规格:
@@ -63,6 +63,18 @@
+
+
+
+ {{isShowSkuAll?'收起':'展开'}}
+
+
+
+
+
+
+
+
@@ -90,7 +102,7 @@
- {{data.isGrounding?'下架产品':'上架产品' }}
+ 上架产品
@@ -109,6 +121,7 @@
diff --git a/pagesOrder/index/index.vue b/pagesOrder/index/index.vue
index 240164e..100d799 100644
--- a/pagesOrder/index/index.vue
+++ b/pagesOrder/index/index.vue
@@ -4,7 +4,7 @@
-
+
@@ -68,6 +68,9 @@
console.log(order.data.page);
init()
}
+ function updateQuery(key,e){
+ order.setQuery(key,e)
+ }
watch(()=>order.data.query.createdAt,(newval)=>{
init()
})
diff --git a/uni_modules/uni-forms/components/uni-forms/validate.js b/uni_modules/uni-forms/components/uni-forms/validate.js
index 1834c6c..0b8214b 100644
--- a/uni_modules/uni-forms/components/uni-forms/validate.js
+++ b/uni_modules/uni-forms/components/uni-forms/validate.js
@@ -387,6 +387,7 @@ class SchemaValidator extends RuleValidator {
}
async validateUpdate(data, allData) {
+ console.log(allData);
let result = this._checkFieldInSchema(data)
if (!result) {
result = await this.invokeValidateUpdate(data, false, allData)
From 61c455cdb7c4245774435913f55f096314964bff Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Tue, 15 Oct 2024 16:53:09 +0800
Subject: [PATCH 24/39] =?UTF-8?q?=E5=95=86=E5=93=81=E5=88=86=E7=B1=BB?=
=?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=201.=E8=AF=A6=E6=83=85=E6=9B=B4?=
=?UTF-8?q?=E6=96=B0=EF=BC=8C=E5=88=97=E8=A1=A8=E6=9C=AA=E6=9B=B4=E6=96=B0?=
=?UTF-8?q?=202.=E5=BC=80=E5=90=AF=E5=BA=93=E5=AD=98=E5=90=8E=E4=B8=8D?=
=?UTF-8?q?=E5=A1=AB=E5=86=99=E5=BA=93=E5=AD=98=EF=BC=8C=E4=BF=9D=E5=AD=98?=
=?UTF-8?q?=E6=8A=A5=E9=94=99=203.=E5=A4=9A=E8=A7=84=E6=A0=BC=E5=BA=93?=
=?UTF-8?q?=E5=AD=98=E6=95=B0=E9=87=8F=E7=BC=96=E8=BE=91=E6=9D=83=E9=99=90?=
=?UTF-8?q?=E9=AA=8C=E8=AF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pageCategory/edit-category/edit-category.vue | 5 +++--
pageCategory/index/components/category.vue | 15 +++++++++------
pageCategory/index/index.vue | 17 +++++++++++------
3 files changed, 23 insertions(+), 14 deletions(-)
diff --git a/pageCategory/edit-category/edit-category.vue b/pageCategory/edit-category/edit-category.vue
index 6efa5ee..c841e09 100644
--- a/pageCategory/edit-category/edit-category.vue
+++ b/pageCategory/edit-category/edit-category.vue
@@ -1,5 +1,5 @@
-
+
{
clearTimeout(timer)
+ uni.$emit('update:pageCategoryIndex')
go.back()
- }, 1500);
+ }, 500);
// const res = await form.value.validate().then(res => {
// go.back()
// })
diff --git a/pageCategory/index/components/category.vue b/pageCategory/index/components/category.vue
index 2eec596..6c17731 100644
--- a/pageCategory/index/components/category.vue
+++ b/pageCategory/index/components/category.vue
@@ -25,20 +25,18 @@
-
+
开关
-
@@ -54,6 +52,7 @@
import {
computed,
ref,
+ watch,
watchEffect
} from 'vue';
import mySwitch from '@/components/my-components/my-switch.vue'
@@ -71,7 +70,9 @@
data: {
type: Object,
default: () => {
- return {}
+ return {
+ isShow:true
+ }
}
},
showChecked: {
@@ -79,8 +80,10 @@
default: false
}
})
-
let isShow=ref(props.data.isShow)
+ watch(()=>props.data.isShow,(newval)=>{
+ isShow.value=newval
+ })
function isShowChange(){
console.log(isShow.value);
emits('isShowChange',{...props.data,isShow:isShow.value})
diff --git a/pageCategory/index/index.vue b/pageCategory/index/index.vue
index a04b091..c86676a 100644
--- a/pageCategory/index/index.vue
+++ b/pageCategory/index/index.vue
@@ -96,14 +96,10 @@
import {
reactive, ref, watch
} from 'vue';
- import {onShow} from '@dcloudio/uni-app'
+ import {onShow,onLoad} from '@dcloudio/uni-app'
import go from '@/commons/utils/go.js';
import myCategory from './components/category.vue'
import infoBox from "@/commons/utils/infoBox.js"
- import myPagination from '@/components/my-components/my-pagination.vue'
- import myModel from "@/components/my-components/my-model.vue"
- import myButton from "@/components/my-components/my-button.vue"
- import mySwitch from "@/components/my-components/my-switch.vue"
import {$productCategory} from '@/http/yskApi/goods.js'
@@ -162,9 +158,18 @@
})
pageData.totalElements=res.totalElements
}
- onShow(()=>{
+ onLoad(()=>{
init()
})
+ function watchEvent(){
+ uni.$off('update:pageCategoryIndex')
+ uni.$on('update:pageCategoryIndex',(data)=>{
+ init()
+ })
+ }
+ onShow(()=>{
+ watchEvent()
+ })
function toAddCategory(){
go.to('PAGES_CATEGORY_EDIT',{type:'add'})
}
From de6320ef6e78e7eb6355593410e5cf513062b15d Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Tue, 15 Oct 2024 16:54:47 +0800
Subject: [PATCH 25/39] =?UTF-8?q?=E5=95=86=E5=93=81=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pageProduct/add-Product/add-Product.vue | 68 +++++++++------
.../choose-specifications.vue | 84 ++++++++++++-------
2 files changed, 96 insertions(+), 56 deletions(-)
diff --git a/pageProduct/add-Product/add-Product.vue b/pageProduct/add-Product/add-Product.vue
index dcac0f8..faeecc9 100644
--- a/pageProduct/add-Product/add-Product.vue
+++ b/pageProduct/add-Product/add-Product.vue
@@ -217,7 +217,7 @@
-
+
-->
-
+
@@ -418,11 +418,17 @@
注:关闭则不计算出入库数据
-
-
-
+
+
+
+
+
+
+
@@ -588,10 +594,10 @@
if (!res) {
return
}
- await upDateGoods({
- key: 'pauseSale',
- value: FormData.isPauseSale ? 0 : 1
- })
+ // await upDateGoods({
+ // key: 'pauseSale',
+ // value: FormData.isPauseSale ? 0 : 1
+ // })
FormData.isPauseSale = FormData.isPauseSale ? 0 : 1
}
@@ -604,10 +610,10 @@
if (!res) {
return
}
- await upDateGoods({
- key: 'grounding',
- value: FormData.isGrounding ? 0 : 1
- })
+ // await upDateGoods({
+ // key: 'grounding',
+ // value: FormData.isGrounding ? 0 : 1
+ // })
FormData.isGrounding = FormData.isGrounding ? 0 : 1
}
@@ -857,7 +863,7 @@
title: '删除成功'
})
setTimeout(() => {
- uni.$emit('del:productIndex',option.productId)
+ uni.$emit('del:productIndex', option.productId)
go.back()
}, 500)
})
@@ -1327,10 +1333,12 @@
}
const skuSnap = []
let submitSkuList = skuList.list || []
- if(option.type=='edit'){
- submitSkuList=submitSkuList.map(v=>{
- return{
- ...v,productId:FormData.id,shopId:uni.getStorageSync('shopId')
+ if (option.type == 'edit') {
+ submitSkuList = submitSkuList.map(v => {
+ return {
+ ...v,
+ productId: FormData.id,
+ shopId: uni.getStorageSync('shopId')
}
})
}
@@ -1366,18 +1374,22 @@
const lowPrice = submitSkuList[0] ? submitSkuList[0].salePrice : FormData.salePrice
// const lowPrice = submitSkuList[0] ? submitSkuList[0].salePrice : FormData.salePrice
const suit = submitSkuList[0] ? submitSkuList[0].suit : 0
- if(typeEnum=='normal'){
- if(lowPrice===''){
+ const stockNumber = FormData.stockNumber
+ if (typeEnum == 'normal') {
+ if (lowPrice === '') {
return infoBox.showToast('请输入售价')
}
- if(lowPrice===''){
+ if (lowPrice === '') {
return infoBox.showToast('请输入售价')
}
- if(suit<=0){
+ if (suit <= 0) {
return infoBox.showToast('起售数量不能小于0!')
}
+ if(stockNumber===''){
+ return infoBox.showToast('请输入库存数量!')
+ }
}
-
+
const submitData = {
...FormData,
images: images,
@@ -1462,6 +1474,7 @@
uni.setStorageSync('guige', FormData.specificationsGroup)
go.to('PAGES_PRODUCT_GUIGE_CHOOSE', {
emitName: 'emitspecificationsSave',
+ type:option.type,
productId: option.productId
})
// go.to('PAGES_PRODUCT_GUIGE_ADD', {
@@ -1566,11 +1579,12 @@
// 允许修改商品库存
let disabledStock = ref(false)
- async function canEditGoodsStock() {
+ async function canEditGoodsStock(tips = false) {
+ console.log(tips);
if (option.type === 'edit') {
const res = await hasPermission({
text: '允许修改商品库存',
- tips: false
+ tips: tips
})
disabledStock.value = !res
}
diff --git a/pageProduct/add-specifications/choose-specifications.vue b/pageProduct/add-specifications/choose-specifications.vue
index d2d4298..1577f25 100644
--- a/pageProduct/add-specifications/choose-specifications.vue
+++ b/pageProduct/add-specifications/choose-specifications.vue
@@ -90,12 +90,17 @@
:placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
v-model="item.skus.suit" type="digit" placeholder="请输入起售数量" />
-
-
-
+
+
+
+
+
+
+
+
{
+ canEditGoodsStock()
+ })
+
onLoad(opt => {
+ Object.assign(option,opt)
getTbProductSpec()
const obj = uni.getStorageSync('guige')
if (obj && JSON.stringify(obj) !== '{}') {
From da9bf913af880330f6b9b11145c253ecf7f0cab4 Mon Sep 17 00:00:00 2001
From: duan <1004387497@qq.com>
Date: Wed, 16 Oct 2024 09:55:03 +0800
Subject: [PATCH 26/39] =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=9C=BA=E7=AC=AC5?=
=?UTF-8?q?=E6=AC=A1=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagePrinter/add-printer/add-printer.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pagePrinter/add-printer/add-printer.vue b/pagePrinter/add-printer/add-printer.vue
index 84b69d9..778220e 100644
--- a/pagePrinter/add-printer/add-printer.vue
+++ b/pagePrinter/add-printer/add-printer.vue
@@ -118,7 +118,7 @@
-
+
是否启用用
@@ -121,12 +121,12 @@
.liststyle {
>li {
- width: 694rpx;
+ // width: 694rpx;
height: 192rpx;
background: #FFFFFF;
border-radius: 10rpx 10rpx 10rpx 10rpx;
padding: 0 16rpx;
- margin: 32rpx auto;
+ margin: 32rpx 16rpx;
>view {
display: flex;
From e0f0d90baef887a312d679839ac9dfe9ffab23a5 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Wed, 16 Oct 2024 14:13:18 +0800
Subject: [PATCH 28/39] =?UTF-8?q?=E5=AF=B9=E5=85=B3=E9=97=AD=E4=B8=AD?=
=?UTF-8?q?=E7=9A=84=E6=A1=8C=E5=8F=B0=E5=A2=9E=E5=8A=A0=E9=83=A8=E5=88=86?=
=?UTF-8?q?=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pageTable/index/components/table-item.vue | 6 ++++++
pageTable/index/index.vue | 5 +++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/pageTable/index/components/table-item.vue b/pageTable/index/components/table-item.vue
index 19a180e..dfdb9e9 100644
--- a/pageTable/index/components/table-item.vue
+++ b/pageTable/index/components/table-item.vue
@@ -137,6 +137,12 @@
onMounted(() => {})
function more() {
+ if(props.data.status=='closed'){
+ return uni.showToast({
+ icon:'none',
+ title:'桌台关闭中!'
+ })
+ }
emits('more')
}
diff --git a/pageTable/index/index.vue b/pageTable/index/index.vue
index df9c5db..4571bf8 100644
--- a/pageTable/index/index.vue
+++ b/pageTable/index/index.vue
@@ -151,16 +151,17 @@
})
}
if (index == 2) {
- return
+ return infoBox.showToast('待开放,请敬请期待!')
}
if (index == 3) {
- return
+ return infoBox.showToast('待开放,请敬请期待!')
}
if (index == 4) {
//打印订单
const res = await $fun.printOrder(actionSheet.selTable.tableId)
return
}
+ infoBox.showToast('待开放,请敬请期待!')
}
From a5c0ab54cc6e35955b7e662a29023aaa6e2b59e0 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Wed, 16 Oct 2024 14:14:30 +0800
Subject: [PATCH 29/39] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=83=A8=E5=88=86?=
=?UTF-8?q?=E6=A0=B7=E5=BC=8F=EF=BC=8C=E5=85=AC=E5=85=B1=E6=96=B9=E6=B3=95?=
=?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E4=BF=9D=E5=AD=98=E5=91=98=E5=B7=A5?=
=?UTF-8?q?=E7=99=BB=E5=BD=95=E4=BF=9D=E5=AD=98=E5=95=86=E6=88=B7=E5=8F=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
commons/style/common.scss | 4 ++++
commons/utils/format.js | 5 +++--
commons/utils/safe-bottom.js | 26 ++++++++++++++++++++++++++
commons/utils/storageManage.js | 12 +++++++-----
4 files changed, 40 insertions(+), 7 deletions(-)
create mode 100644 commons/utils/safe-bottom.js
diff --git a/commons/style/common.scss b/commons/style/common.scss
index 1c5f255..5afbff7 100644
--- a/commons/style/common.scss
+++ b/commons/style/common.scss
@@ -392,4 +392,8 @@ text {
// }
.line-th{
text-decoration: line-through;
+}
+//覆盖u-view-plus 颜色
+.u-primary-light {
+ color: $my-main-color;
}
\ No newline at end of file
diff --git a/commons/utils/format.js b/commons/utils/format.js
index f8f915f..f3d5d0a 100644
--- a/commons/utils/format.js
+++ b/commons/utils/format.js
@@ -7,9 +7,10 @@
* @param {Boolean} returnIsArea - 是否返回值符合范围区间,默认为false。
* @returns {number} - 返回格式化后的价格,如果超出范围则返回最小值或最大值。
*/
-export const formatPrice = (price,min=-Infinity, max = 100000000,returnIsArea=false ) => {
+export const formatPrice = (price,min=-Infinity, max = 100000000,returnIsArea=false,isRerturnNullString=false) => {
+
if(price === undefined || price === null||price===''){
- return 0
+ return isRerturnNullString?'':0
}
// 将价格转换为浮点数并保留两位小数
const newval = parseFloat((Math.floor(price * 100) / 100).toFixed(2))
diff --git a/commons/utils/safe-bottom.js b/commons/utils/safe-bottom.js
new file mode 100644
index 0000000..c8ed07d
--- /dev/null
+++ b/commons/utils/safe-bottom.js
@@ -0,0 +1,26 @@
+import {
+ getCurrentInstance,
+} from 'vue';
+export function getElRect(elClass, dataVal) {
+ const instance = getCurrentInstance();
+ return new Promise((resolve, reject) => {
+ const query = uni.createSelectorQuery().in(instance.proxy);
+ query.select('.' + elClass).fields({
+ size: true
+ }, res => {
+ // 如果节点尚未生成,res值为null,循环调用执行
+ if (!res) {
+ setTimeout(() => {
+ getElRect(elClass);
+ }, 10);
+ return;
+ }
+ resolve(res);
+ }).exec();
+ })
+}
+
+export async function getSafeBottomHeight(className, height = 16) {
+ const bottomEle = await getElRect(className)
+ return bottomEle.height + height
+}
\ No newline at end of file
diff --git a/commons/utils/storageManage.js b/commons/utils/storageManage.js
index bade3e4..690d214 100644
--- a/commons/utils/storageManage.js
+++ b/commons/utils/storageManage.js
@@ -18,24 +18,26 @@ const appCache = {
const model = {
setLogin(res){
+ const user=res.user.user
uni.setStorageSync('logoutHandle',false)
uni.setStorageSync('shopId', res.shopId)
uni.setStorageSync('shopName',res.shopName)
uni.setStorageSync('logo',res.logo)
uni.setStorageSync('loginType',res.loginType)
- uni.setStorageSync('shopUserId',res.user.user.id)
+ uni.setStorageSync('shopUserId',user.id)
+ if(res.loginType=='staff'){
+ uni.setStorageSync('merchantName',user.createBy||user.updateBy)
+ }
},
// 退出清空所有的缓存数据。 (不包含 环境相关)
cleanByLogout: () => {
-
// 1. 清空app级别缓存。
Object.keys(appCache).forEach(k => appCache[k] = null)
-
+ const merchantName=uni.getStorageSync('merchantName')
let envName = model.env() // 获取到当前的环境变量
uni.clearStorageSync() // 清除所有的缓存信息
+ uni.setStorageSync('merchantName',merchantName)
model.env(envName) // 重置env
-
-
},
// 获取和放置token
From ce6f0ef230c5b00a90e2663f167385fba4e9d32f Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Wed, 16 Oct 2024 14:15:08 +0800
Subject: [PATCH 30/39] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86?=
=?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/my-components/edit-discount.vue | 13 +++++++++----
components/my-components/my-button.vue | 5 +++++
components/my-components/my-tabs.vue | 5 +++--
3 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/components/my-components/edit-discount.vue b/components/my-components/edit-discount.vue
index 5ca910e..4497bf5 100644
--- a/components/my-components/edit-discount.vue
+++ b/components/my-components/edit-discount.vue
@@ -10,7 +10,7 @@
实收金额
-
+
@@ -18,7 +18,7 @@
优惠折扣
-
+
- 修改
+ 修改
取消
@@ -146,7 +146,12 @@
})
-
\ No newline at end of file
From d0bb6bff4611bc443d91ffbf76e5f43469b83717 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Wed, 16 Oct 2024 14:15:27 +0800
Subject: [PATCH 31/39] =?UTF-8?q?=E5=95=86=E5=93=81=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E5=B7=B2?=
=?UTF-8?q?=E7=9F=A5=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../add-Product/add-Product-9-19-back.vue | 2 +-
pageProduct/add-Product/add-Product.vue | 2 +-
.../add-specifications/add-specifications.vue | 22 ++-
.../choose-specifications.vue | 56 +++---
pageProduct/goodsData.js | 2 +-
pageProduct/index/components/edit-price.vue | 168 ++++++++++++------
pageProduct/index/components/edit-stock.vue | 41 ++++-
pageProduct/index/index.vue | 4 +
8 files changed, 203 insertions(+), 94 deletions(-)
diff --git a/pageProduct/add-Product/add-Product-9-19-back.vue b/pageProduct/add-Product/add-Product-9-19-back.vue
index 5dc1ade..b638e16 100644
--- a/pageProduct/add-Product/add-Product-9-19-back.vue
+++ b/pageProduct/add-Product/add-Product-9-19-back.vue
@@ -1228,7 +1228,7 @@
}
if (type === 'stockTips') {
modelProps = {
- desc: '清先保存商品基础信息',
+ desc: '请先保存商品基础信息',
showIcon: false
}
model.value.open()
diff --git a/pageProduct/add-Product/add-Product.vue b/pageProduct/add-Product/add-Product.vue
index faeecc9..7237039 100644
--- a/pageProduct/add-Product/add-Product.vue
+++ b/pageProduct/add-Product/add-Product.vue
@@ -884,7 +884,7 @@
}
if (type === 'stockTips') {
modelProps = {
- desc: '清先保存商品基础信息',
+ desc: '请先保存商品基础信息',
showIcon: false
}
model.value.open()
diff --git a/pageProduct/add-specifications/add-specifications.vue b/pageProduct/add-specifications/add-specifications.vue
index 1b8fcac..ca76f22 100644
--- a/pageProduct/add-specifications/add-specifications.vue
+++ b/pageProduct/add-specifications/add-specifications.vue
@@ -39,7 +39,7 @@
-
+
@@ -70,13 +70,15 @@
-
-
-
-
+
+
+
+
+
+ 删除规格组
- 删除规格组
-
+
+
@@ -192,6 +194,9 @@
}
//删除规格组
function delSpecificationsGroup(index) {
+ if(specifications.list.length<=1){
+ return
+ }
specifications.list.splice(index, 1)
}
// 向指定索引的规格组添加规格项
@@ -200,6 +205,9 @@
}
// 删除指定索引的规格组添加规格项
function delOption(index, optionIndex) {
+ if(specifications.list[index].options.length<=1){
+ return
+ }
specifications.list[index].options.splice(optionIndex, 1)
}
//页面滚动到最底部
diff --git a/pageProduct/add-specifications/choose-specifications.vue b/pageProduct/add-specifications/choose-specifications.vue
index 1577f25..5e50350 100644
--- a/pageProduct/add-specifications/choose-specifications.vue
+++ b/pageProduct/add-specifications/choose-specifications.vue
@@ -90,17 +90,18 @@
:placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
v-model="item.skus.suit" type="digit" placeholder="请输入起售数量" />
-
+
+
{
- const min = 0;
- const max = 100000000;
+ let min = 0;
+ let max = 100000000;
console.log(item[key]);
+ if (key == 'suit') {
+ min = 1
+ }
const newval = formatPrice(item[key], min, max, true)
if (typeof newval !== 'number') {
item[key] = newval.value
@@ -242,7 +246,7 @@
})
}
-
+
function updateSkuKey(arr) {
for (let i in FormData.result) {
@@ -417,9 +421,18 @@
},
suit: {
rules: [{
- required: true,
- errorMessage: '必填'
- }]
+ required: true,
+ errorMessage: '必填'
+ },
+ {
+ validateFunction: function(rule, value, data, callback) {
+ if (value < 1) {
+ callback('起售数量至少为1个')
+ }
+ return true
+ }
+ }
+ ]
}
}
@@ -468,13 +481,13 @@
disabledStock.value = !res
}
}
-
- onShow(()=>{
+
+ onShow(() => {
canEditGoodsStock()
})
-
+
onLoad(opt => {
- Object.assign(option,opt)
+ Object.assign(option, opt)
getTbProductSpec()
const obj = uni.getStorageSync('guige')
if (obj && JSON.stringify(obj) !== '{}') {
@@ -513,6 +526,9 @@
})
}).catch(err => {
console.log(err);
+ if(err.length>=1){
+ infoBox.showToast(err[0].errorMessage)
+ }
resolve({
sucees: false
})
@@ -521,7 +537,7 @@
}
async function save() {
if (!FormData.result.length) {
- return infoBox.showToast('清先选择规格!')
+ return infoBox.showToast('请先选择规格!')
}
let isAllPassForm = 0
for (let i in FormData.result) {
@@ -529,7 +545,7 @@
isAllPassForm += res.sucees ? 1 : 0
}
if (isAllPassForm < FormData.result.length) {
- return infoBox.showToast('清完善规格属性的参数!')
+ return
}
//判断验证是否通过
console.log('pass');
diff --git a/pageProduct/goodsData.js b/pageProduct/goodsData.js
index e74b5b7..3fa480a 100644
--- a/pageProduct/goodsData.js
+++ b/pageProduct/goodsData.js
@@ -32,7 +32,7 @@ export const $defaultSku = {
memberPrice: '',
costPrice: '',
originPrice: '',
- stockNumber: '',
+ // stockNumber: '',
firstShared: '',
suit: 1,
barCode: `${uni.getStorageSync("shopId")}${dayjs().valueOf()}`,
diff --git a/pageProduct/index/components/edit-price.vue b/pageProduct/index/components/edit-price.vue
index 0cfd190..5896d8c 100644
--- a/pageProduct/index/components/edit-price.vue
+++ b/pageProduct/index/components/edit-price.vue
@@ -8,47 +8,22 @@
- 商品名称
- {{data.name}}
-
-
-
-
- {{data.name}}
-
- 变动金额:
- {{data.lowPrice-data._lowPrice}}
-
-
-
-
-
- 元
-
-
-
-
-
-
- 备注
-
-
-
-
-
-
-
-
-
+
+ 商品名称
+ {{data.name}}
+
+
+
- {{item.name}}
+ {{data.name}}
变动金额:
- {{item.lowPrice-item._lowPrice}}
+ {{data.lowPrice*1-data._lowPrice*1}}
-
+
元
@@ -63,17 +38,46 @@
-
-
+
+
+
+
+
+ {{item.name}}
+
+ 变动金额:
+ {{item.lowPrice-item._lowPrice}}
+
+
+
+
+
+ 元
+
+
+
+
+
+
+ 备注
+
+
+
+
+
+
+
-
-
-
- 保存
-
-
+
+
+
+ 保存
+
+
+
-
+
@@ -84,13 +88,39 @@
computed,
reactive,
ref,
- watch
+ watch,
+ nextTick
} from 'vue';
import {
returnSkuSnap,
returnTypeEnum,
returnCategory
} from '@/pageProduct/util.js'
+ import {
+ formatPrice
+ } from "@/commons/utils/format.js";
+ import {
+ TRUE
+ } from 'sass';
+
+ function priceFormat(item, key, val) {
+ let min = 0;
+ let max = 100000000;
+ const returnNewVal = formatPrice(val, min, max, true)
+ const newval = typeof returnNewVal !== 'number' ? returnNewVal.value : returnNewVal
+ if (typeof returnNewVal !== 'number') {
+ uni.showToast({
+ title: `请输入${min}到${max}范围内的数字`,
+ icon: 'none'
+ })
+ }
+ setTimeout(() => {
+ item[key] = newval
+ }, 100)
+ }
+ const refForm = ref(null)
+
+
const props = defineProps({
show: {
type: Boolean,
@@ -104,14 +134,30 @@
type: Object,
default: () => {
return {
- lowPrice:0,
+ lowPrice: 0,
skuList: []
}
-
+
}
}
})
- const data = ref(props.goods)
+ let data = ref(props.goods)
+ const rules = {
+ 'lowPrice': [{
+ type: 'Number',
+ min: 0,
+ required: true,
+ message: '价格不能小于0',
+ trigger: ['blur', 'change']
+ },
+ {
+ validator: (rule, value, callback) => {
+ return true
+ },
+ message: ''
+ }
+ ]
+ }
const emits = defineEmits(['update:show', 'save'])
const form = reactive({
note: ''
@@ -120,11 +166,13 @@
watch(() => props.show, (newval) => {
popShow.value = newval
if (newval) {
- data.value = props.goods
+ data.value = {
+ ...props.goods
+ }
}
})
- const isSku=computed(()=>{
- return data.value.typeEnum=='多规格'
+ const isSku = computed(() => {
+ return data.value.typeEnum == '多规格'
})
watch(() => popShow.value, (newval) => {
emits('update:show', newval)
@@ -137,11 +185,21 @@
function open() {
}
-
+
function save() {
- emits('save', {
- ...data.value,
- })
+ refForm.value.validate().then(valid => {
+ if (valid) {
+ emits('save', {
+ ...data.value,
+ })
+ } else {
+ console.log(err);
+ }
+ }).catch(() => {
+ // 处理验证错误
+ });
+
+
}
// function save() {
diff --git a/pageProduct/index/components/edit-stock.vue b/pageProduct/index/components/edit-stock.vue
index 7bcfd10..4ab183a 100644
--- a/pageProduct/index/components/edit-stock.vue
+++ b/pageProduct/index/components/edit-stock.vue
@@ -8,6 +8,7 @@
+
商品名称
{{data.name}}
@@ -21,11 +22,14 @@
-
-
- {{data.unitName||''}}
-
-
+
+
+
+ {{data.unitName||''}}
+
+
+
+
@@ -99,6 +103,7 @@
+
@@ -120,6 +125,7 @@
import {
$tbShopUnit,$getProductStockDetail
} from '@/http/yskApi/goods.js'
+ const refForm = ref(null)
const props = defineProps({
show: {
type: Boolean,
@@ -136,7 +142,15 @@
}
}
})
-
+ const rules =reactive({
+ 'stockNumber': [{
+ type: 'number',
+ required: true,
+ message: '请填写库存',
+ trigger: ['blur', 'change']
+ }
+ ]
+ })
function toRecodes(){
}
function changeShowRecoders(show) {
@@ -189,15 +203,24 @@
function close() {
popShow.value = false
+ form.note=''
}
function open() {
}
function save() {
- emits('save', {
- ...data.value,
- })
+ refForm.value.validate().then(valid => {
+ if (valid) {
+ emits('save', {
+ ...data.value,
+ })
+ } else {
+ console.log(err);
+ }
+ }).catch(() => {
+ // 处理验证错误
+ });
}
// function save() {
// const skuSnap = returnSkuSnap(data.value)
diff --git a/pageProduct/index/index.vue b/pageProduct/index/index.vue
index a86e70d..dca9a33 100644
--- a/pageProduct/index/index.vue
+++ b/pageProduct/index/index.vue
@@ -13,7 +13,9 @@
@@ -286,6 +288,7 @@
})
}
const res = await $updateProductData(goodsArr)
+ infoBox.showToast('修改成功')
popup.price.show = false
getGoodsList()
}
@@ -342,6 +345,7 @@
value: goods.stockNumber
}]
const res = await $updateProductData(goodsArr)
+ infoBox.showToast('修改成功')
popup.stock.show = false
getGoodsList()
}
From 7030d60847690573955f8fe31a0cedabe2980702 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Wed, 16 Oct 2024 14:15:48 +0800
Subject: [PATCH 32/39] =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=A2=9E=E5=8A=A0?=
=?UTF-8?q?=E5=88=87=E6=8D=A2=E8=BA=AB=E4=BB=BD=E7=BD=AE=E7=A9=BA=E5=95=86?=
=?UTF-8?q?=E6=88=B7=E5=8F=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/index/index.vue | 10 +++++-----
pages/login/index.vue | 11 +++++++++--
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 33460f5..8ce8621 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -120,11 +120,11 @@
icon: '/static/indexImg/icon-line-up.svg',
pageUrl: 'PAGES_LINE_UP'
},
- {
- title: '成员管理',
- icon: '/static/indexImg/icon-staff.svg',
- pageUrl: 'PAGES_USER'
- },
+ // {
+ // title: '成员管理',
+ // icon: '/static/indexImg/icon-staff.svg',
+ // pageUrl: 'PAGES_USER'
+ // },
{
title: '设置中心',
icon: '/static/indexImg/icon-cashier.svg',
diff --git a/pages/login/index.vue b/pages/login/index.vue
index 361a097..1db82fe 100644
--- a/pages/login/index.vue
+++ b/pages/login/index.vue
@@ -145,7 +145,8 @@
import {
ref,
reactive,
- onMounted
+ onMounted,
+ watch
} from 'vue';
import {
$loginByPwd,
@@ -339,9 +340,15 @@
})
// #endif
}
+ watch(()=>accountType.sel,(newval)=>{
+ if(newval==1){
+ vdata.formData.merchantName=uni.getStorageSync('merchantName')||''
+ }else{
+ vdata.formData.username=''
+ }
+ })
// 封装登录成功后的操作
async function loginFinishFunc(loginBizData) {
-
// 保存 token
storageManage.setLogin(loginBizData)
storageManage.token(loginBizData.token)
From 72d48629258e03f432dda863e1ebbc5254f8aa17 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Wed, 16 Oct 2024 14:16:14 +0800
Subject: [PATCH 33/39] =?UTF-8?q?=E4=BB=A3=E5=AE=A2=E4=B8=8B=E5=8D=95?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../confirm-order/confirm-order.vue | 40 ++++++++++++-------
pagesCreateOrder/index/components/car.vue | 4 +-
pagesCreateOrder/index/index.vue | 17 +++++---
3 files changed, 39 insertions(+), 22 deletions(-)
diff --git a/pagesCreateOrder/confirm-order/confirm-order.vue b/pagesCreateOrder/confirm-order/confirm-order.vue
index 377cbfc..5687bc2 100644
--- a/pagesCreateOrder/confirm-order/confirm-order.vue
+++ b/pagesCreateOrder/confirm-order/confirm-order.vue
@@ -1,9 +1,9 @@
-
+
桌位号
-
+
{{table.name||''}}
@@ -122,7 +122,7 @@
-
+
共
{{goodsNumber}}
@@ -130,9 +130,9 @@
-
-
+
@@ -173,17 +173,17 @@
{{item.note}}
-
-
+
+
-
+
-
+
@@ -191,13 +191,13 @@
-->
-
+
-
+
@@ -234,7 +234,7 @@
-
+
+
退菜理由
@@ -15,8 +15,8 @@
-
-
+
+
@@ -96,5 +96,8 @@
}
-
\ No newline at end of file
diff --git a/pagesOrder/detail/components/user.vue b/pagesOrder/detail/components/user.vue
index 327038f..0c05831 100644
--- a/pagesOrder/detail/components/user.vue
+++ b/pagesOrder/detail/components/user.vue
@@ -25,18 +25,18 @@
-
+
- {{user.amount}}
- 余额
+ {{user.amount}}
+ 余额
{{user.totalScore}}
- 积分
+ 积分
0.00
- 已消费
+ 已消费
diff --git a/pagesOrder/detail/detail.vue b/pagesOrder/detail/detail.vue
index 40e3a51..d86dbd0 100644
--- a/pagesOrder/detail/detail.vue
+++ b/pagesOrder/detail/detail.vue
@@ -1,7 +1,7 @@
-
+
桌位号:
{{orderDetail.info.tableName}}
@@ -25,11 +25,11 @@
- 加菜
- 结账
diff --git a/pagesOrder/pay-order/pay-order.vue b/pagesOrder/pay-order/pay-order.vue
index a4e1183..7746b34 100644
--- a/pagesOrder/pay-order/pay-order.vue
+++ b/pagesOrder/pay-order/pay-order.vue
@@ -13,7 +13,7 @@
修改
-
+
优惠券
From edc23a623deb276c2d4886480ae257fb61ab0221 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Wed, 16 Oct 2024 14:16:54 +0800
Subject: [PATCH 35/39] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E5=8E=BB=E9=99=A4=E6=B2=A1=E6=9C=89=E7=9A=84=E5=AD=97=E6=AE=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pageUser/index/index.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pageUser/index/index.vue b/pageUser/index/index.vue
index 2c767fb..398e85a 100644
--- a/pageUser/index/index.vue
+++ b/pageUser/index/index.vue
@@ -1,11 +1,11 @@
-
+
From c07bd8c72909d678c5ef02ff712209d8fea110a8 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Wed, 16 Oct 2024 14:17:14 +0800
Subject: [PATCH 36/39] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BE=9D=E8=B5=96?=
=?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=E8=BF=90=E8=A1=8C=E5=88=B0app?=
=?UTF-8?q?=E6=8A=A5=E9=94=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/package.json b/package.json
index ba19cc4..e93d886 100644
--- a/package.json
+++ b/package.json
@@ -3,6 +3,7 @@
"clipboard": "^2.0.11",
"dayjs": "^1.11.13",
"gm-crypto": "^0.1.8",
+ "immutable": "^4.3.7",
"js-base64": "^3.7.2",
"jsencrypt": "^3.3.2",
"lodash": "^4.17.21",
From 6bef28f9587f68367af8a1591c2e464a068203cd Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Wed, 16 Oct 2024 14:23:09 +0800
Subject: [PATCH 37/39] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9B=B4=E5=A4=9A?=
=?UTF-8?q?=E8=8F=9C=E5=8D=95=E9=87=8C=E7=9A=84=E7=BB=93=E8=B4=A6=E8=B7=B3?=
=?UTF-8?q?=E8=BD=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pageTable/index/index.vue | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/pageTable/index/index.vue b/pageTable/index/index.vue
index 4571bf8..fc88f35 100644
--- a/pageTable/index/index.vue
+++ b/pageTable/index/index.vue
@@ -94,6 +94,7 @@
onPullDownRefresh
} from '@dcloudio/uni-app';
import color from '@/commons/color';
+ import go from '@/commons/utils/go.js';
import myMask from '@/components/my-components/my-mask'
import addTable from './components/add-table'
import myActionSheet from '@/components/my-components/my-action-sheet';
@@ -119,7 +120,16 @@
actionSheet.selTable = table
refMoreSheet.value.open()
}
-
+ function toPay(item) {
+ go.to('PAGES_ORDER_PAY', {
+ tableId: item.tableId,
+ tableName: item.name,
+ masterId: item.masterId,
+ orderId: item.orderId,
+ discount: 1,
+ userId:item.userId
+ })
+ }
async function actionSheetClick(index) {
console.log(index);
const item = actionSheet.selTable
@@ -129,7 +139,7 @@
if (!item.orderId) {
return infoBox.showToast('该桌台暂无要结账的订单!')
}
- return
+ return toPay(item)
}
if (index == 1) {
//清台
From 02bef5d1cafc2b25d7d7738627e521063a697041 Mon Sep 17 00:00:00 2001
From: duan <1004387497@qq.com>
Date: Wed, 16 Oct 2024 17:42:49 +0800
Subject: [PATCH 38/39] =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=9C=BA=E7=AC=AC7?=
=?UTF-8?q?=E6=AC=A1=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.hbuilderx/launch.json | 2 +-
pagePrinter/add-printer/add-printer.vue | 1 +
.../add-printer/components/picker-item.vue | 17 ++++++++++++++---
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json
index 179fe2d..07d9281 100644
--- a/.hbuilderx/launch.json
+++ b/.hbuilderx/launch.json
@@ -16,7 +16,7 @@
"type" : "uniCloud"
},
{
- "playground" : "custom",
+ "playground" : "standard",
"type" : "uni-app:app-android"
}
]
diff --git a/pagePrinter/add-printer/add-printer.vue b/pagePrinter/add-printer/add-printer.vue
index 778220e..d08d5bc 100644
--- a/pagePrinter/add-printer/add-printer.vue
+++ b/pagePrinter/add-printer/add-printer.vue
@@ -1,6 +1,7 @@
+
*{{title}}
+
{{selText}}
@@ -29,15 +36,19 @@
modelValue: {
type: String,
},
- required:{
- type:Boolean
+ required: {
+ type: Boolean
}
})
const index = ref(props.modelValue)
const emits = defineEmits(['update:modelValue'], )
const selText = computed(() => {
const item = props.list.filter(ele => ele.value == props.modelValue)[0]
- return item.name
+ if (item) {
+ return item.name
+ } else {
+ return ''
+ }
})
watch(() => index.value, (newval) => {
From f0a88d3ad07f2b19d64585806724a6ad6286f73a Mon Sep 17 00:00:00 2001
From: duan <1004387497@qq.com>
Date: Thu, 17 Oct 2024 09:05:45 +0800
Subject: [PATCH 39/39] =?UTF-8?q?=E8=80=97=E6=9D=90=E6=8E=A5=E5=8F=A3?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
http/yskApi/consumable.js | 20 ++++++++++----------
http/yskApi/requestAll.js | 2 +-
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/http/yskApi/consumable.js b/http/yskApi/consumable.js
index 09c9c05..ac31a33 100644
--- a/http/yskApi/consumable.js
+++ b/http/yskApi/consumable.js
@@ -179,16 +179,16 @@ export function gettbConsInfoFlow(params) {
/**
* 分组查询获取耗材流水信息
*/
-export function viewConInfoFlow(data) {
- return request({
- url: "/api/viewConInfoFlow",
- method: "get",
- params: {
- shopId: uni.getStorageSync("shopId"),
- ...data
- }
- });
-}
+// export function viewConInfoFlow(data) {
+// return request({
+// url: "/api/viewConInfoFlow",
+// method: "get",
+// params: {
+// shopId: uni.getStorageSync("shopId"),
+// ...data
+// }
+// });
+// }
/**
* 查询耗材单位列表
diff --git a/http/yskApi/requestAll.js b/http/yskApi/requestAll.js
index f20b970..38d23ab 100644
--- a/http/yskApi/requestAll.js
+++ b/http/yskApi/requestAll.js
@@ -259,7 +259,7 @@ export function tbPlussShopStaff(data) {
// 耗材列表
export function viewConInfoFlowget(data) {
return request({
- url: `/api/viewConInfoFlow/get`,
+ url: `/api/tbConsInfo/allAndPro`,
method: 'post',
data
});