From f502305267ac60e26961db01b5c238a081e11772 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Thu, 17 Oct 2024 11:36:33 +0800
Subject: [PATCH 1/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9D=83=E9=99=90?=
=?UTF-8?q?=E9=AA=8C=E8=AF=81=E6=95=B0=E6=8D=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
commons/utils/hasPermission.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/commons/utils/hasPermission.js b/commons/utils/hasPermission.js
index 375ee71..39e9476 100644
--- a/commons/utils/hasPermission.js
+++ b/commons/utils/hasPermission.js
@@ -55,12 +55,12 @@ const $PermissionObj = {
],
vip:[
{
- key: '允许管理会员信息',
- text: 'yun_xu_guan_li_hui_yuan_xin_xi'
+ text: '允许管理会员信息',
+ key: 'yun_xu_guan_li_hui_yuan_xin_xi'
},
{
- key: 'yun_xu_xiu_gai_hui_yuan_yu_e',
- text: '允许修改会员余额'
+ text: 'yun_xu_xiu_gai_hui_yuan_yu_e',
+ key: '允许修改会员余额'
}
],
stock:[
From 6ee962930efe94df9411a637e3b82ff8207395a1 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Thu, 17 Oct 2024 11:36:57 +0800
Subject: [PATCH 2/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BA=93=E5=AD=98?=
=?UTF-8?q?=E8=AE=B0=E5=BD=95app=E4=B8=8D=E5=B1=95=E7=A4=BA=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pageProduct/index/components/edit-stock.vue | 6 +++-
.../invoicing-list/components/list-item.vue | 3 +-
pageProduct/invoicing-list/invoicing-list.vue | 31 +++++--------------
3 files changed, 14 insertions(+), 26 deletions(-)
diff --git a/pageProduct/index/components/edit-stock.vue b/pageProduct/index/components/edit-stock.vue
index b3cd86a..d8608e9 100644
--- a/pageProduct/index/components/edit-stock.vue
+++ b/pageProduct/index/components/edit-stock.vue
@@ -139,7 +139,10 @@
goods: {
type: Object,
default: () => {
- skuList: []
+ return{
+ id:'',
+ skuList: []
+ }
}
}
})
@@ -153,6 +156,7 @@
]
})
function toRecodes(){
+ console.log(props.goods.id);
go.to('PAGES_PRODUCT_INVOICING_LIST',{
productId:props.goods.id
})
diff --git a/pageProduct/invoicing-list/components/list-item.vue b/pageProduct/invoicing-list/components/list-item.vue
index cc2eae7..50c0b9a 100644
--- a/pageProduct/invoicing-list/components/list-item.vue
+++ b/pageProduct/invoicing-list/components/list-item.vue
@@ -83,7 +83,6 @@
-
\ No newline at end of file
diff --git a/pageProduct/add-specifications/choose-specifications.vue b/pageProduct/add-specifications/choose-specifications.vue
index 5df47e6..5366d42 100644
--- a/pageProduct/add-specifications/choose-specifications.vue
+++ b/pageProduct/add-specifications/choose-specifications.vue
@@ -4,25 +4,44 @@
-
-
+
+
+
+ 选择规格
+
+
+
+
+
+
+
+
{{item.name}}
-
-
+
+
+
+
+
+
+
@@ -34,16 +53,17 @@
-
+
-
-
+
+
{{key}}
-
- {{val}}
+
+ {{val}}
@@ -51,13 +71,14 @@
图片
-
+
+ :imageStyles="imageStyles" :ref="setRefFile(index)"
+ :images="item.coverImg">
-
+
-
+
+
+
+
@@ -120,8 +144,17 @@
-
-
+
+
+
+
+
+
+
+ 保存
+
+
+
-
+
-
\ No newline at end of file
diff --git a/pagesOrder/detail/components/user.vue b/pagesOrder/detail/components/user.vue
index 0c05831..92f312d 100644
--- a/pagesOrder/detail/components/user.vue
+++ b/pagesOrder/detail/components/user.vue
@@ -15,28 +15,30 @@
-
+
{{'服务员下单'}}
- 他的订单
+
+ 他的订单
+
-
+
{{user.amount}}
- 余额
+ 余额
{{user.totalScore}}
- 积分
+ 积分
0.00
- 已消费
+ 已消费
diff --git a/pagesOrder/detail/detail.vue b/pagesOrder/detail/detail.vue
index d86dbd0..7d03d3c 100644
--- a/pagesOrder/detail/detail.vue
+++ b/pagesOrder/detail/detail.vue
@@ -1,10 +1,10 @@
-
+
@@ -17,7 +17,7 @@
-
+
结账
@@ -25,11 +25,11 @@
- 加菜
- 结账
@@ -120,9 +120,10 @@
tuicai.show = true
tuicai.selGoods = goods
}
- async function tuicaiConfirm() {
+ async function tuicaiConfirm(e) {
console.log(tuicai.selGoods);
const res = await Api.$returnCart({
+ ...e,
cartId: tuicai.selGoods.hasOwnProperty('cartId') ? tuicai.selGoods.cartId : tuicai.selGoods.id,
tableId: orderDetail.info.tableId,
})
@@ -199,6 +200,7 @@
}, 1500)
function diancan() {
+ clearEmit()
go.to('PAGES_CREATE_ORDER', {
tableId: options.tableId || orderDetail.info.tableId,
name: options.name || orderDetail.info.tableName,
@@ -208,6 +210,7 @@
function toPay() {
const userId=orderDetail.info.userId||''
+ clearEmit()
go.to('PAGES_ORDER_PAY', {
tableId: options.tableId|| orderDetail.info.tableId,
tableName: options.name,
@@ -310,7 +313,13 @@
Object.assign(submitPar, par)
return Api.$setUser(submitPar)
}
-
+
+
+ function clearEmit(){
+ uni.$off('choose-user')
+ uni.$off('orderDetail:update')
+ }
+
function watchChooseuser() {
uni.$off('choose-user')
uni.$on('choose-user', (data) => {
diff --git a/pagesOrder/index/compoents/order-item.vue b/pagesOrder/index/compoents/order-item.vue
index d290f2d..870870c 100644
--- a/pagesOrder/index/compoents/order-item.vue
+++ b/pagesOrder/index/compoents/order-item.vue
@@ -30,15 +30,15 @@
{{goosZhonglei}}种商品,共{{goodsNumber}}件
-
- {{item.productName}}
+ {{item.productName}}
{{item.productSkuName}}
-
+
×{{item.num}}
¥{{item.price}}
@@ -46,8 +46,8 @@
-
- 订单备注
+
+ 订单备注
{{data.remark||'无'}}
@@ -99,7 +99,7 @@
return ''
}
return {
- width: `${item.price}`.length * priceSize + 'px'
+ 'min-width': `${item.price}`.length * priceSize + 'px'
}
}
// const computedPriceStyle = computed(() => {
diff --git a/pagesOrder/index/index.vue b/pagesOrder/index/index.vue
index 100d799..72888c9 100644
--- a/pagesOrder/index/index.vue
+++ b/pagesOrder/index/index.vue
@@ -1,11 +1,14 @@
-
-
-
+
+
+
+
+
+
-
-
+
+
@@ -31,7 +34,7 @@
import {getTodayTimestamps} from '@/commons/utils/dayjs-time.js';
const search = reactive({
val: '',
- placeholder: '搜索单号/昵称/姓名/手机号码/商品名称',
+ placeholder: '搜索单号/商品名称',
shape: 'square',
inputStyle: {
borderRadius: '12rpx'
@@ -49,7 +52,7 @@
id: "",
orderNo: "",
orderType: "0",
- page: 1,
+ page: 0,
pageSize: 10,
payType: "",
productName: "",
@@ -62,10 +65,9 @@
order.setQuery('userId','')
}
function pageChange(e){
- order.setVal('page',e)
- order.setQuery('page',e)
- console.log(e);
- console.log(order.data.page);
+ const newPage=e-1
+ order.setVal('page',newPage)
+ order.setQuery('page',newPage)
init()
}
function updateQuery(key,e){
@@ -80,9 +82,13 @@
watch(()=>order.data.query.userId,(newval)=>{
init()
})
+ function searchConfirm(){
+ order.setQuery('page',0)
+ init()
+ }
async function init() {
console.log(order.data.query);
- const {content,totalElements}=await Api.tbOrderInfoData({...order.data.query,page:order.data.query.page-1})
+ const {content,totalElements}=await Api.tbOrderInfoData({...order.data.query,page:order.data.query.page,searchText:search.val})
uni.stopPullDownRefresh()
order.setVal('list',content)
console.log(order.data.list);
diff --git a/pagesOrder/pay-order/pay-order.vue b/pagesOrder/pay-order/pay-order.vue
index 779c032..6acb4e9 100644
--- a/pagesOrder/pay-order/pay-order.vue
+++ b/pagesOrder/pay-order/pay-order.vue
@@ -113,8 +113,9 @@
} from 'vue';
import {
onLoad,
- onBackPress
+ onBackPress,onShow
} from '@dcloudio/uni-app'
+ import go from '@/commons/utils/go.js'
import * as Api from '@/http/yskApi/Instead.js'
import {
queryAllShopUser
@@ -132,6 +133,7 @@
let option = {isNowPay:false}
let payFinish=ref(false)
onBackPress(() => {
+ uni.$emit('orderDetail:update')
console.log('onBackPress');
// uni.$emit('update:createOrderIndex')
// if (option.isNowPay&&!payFinish.value) {
@@ -172,11 +174,11 @@
go.to('PAGES_CHOOSE_USER')
}
//更新选择用户
- function setUser(par) {
+ function setUser(par) {
console.log(option);
const submitPar = {
masterId: option.masterId,
- tableId: table.value.tableId,
+ tableId: option.tableId,
vipUserId: user.value.id ? user.value.id : '',
type: user.value.id ? 0 : 1 //0 设置 1 取消
}
@@ -187,11 +189,17 @@
uni.$off('choose-user')
uni.$on('choose-user', (data) => {
console.log(data);
- user.value = data
- setUser()
+ setUser({
+ vipUserId: data.id ? data.id : '',
+ type: data.id ? 0 : 1 //0 设置 1 取消
+ }).then(res=>{
+ user.value = data
+ })
})
}
-
+ onShow(()=>{
+ watchChooseuser()
+ })
watch(() => pays.selIndex, (newval) => {
clearInterval(timer)
@@ -238,10 +246,10 @@
}
function changePayType(i, item) {
- if (item.payType == 'vipPay' && user.value.amount * 1 < order.amount * 1) {
- return infoBox.showToast('余额不足')
- }
pays.payTypes.selIndex = i
+ if (item.payType == 'vipPay' ) {
+ chooseUser()
+ }
}
//支付成功回调
function paySuccess() {
@@ -250,6 +258,7 @@
// uni.$emit('orderDetail:update')
payFinish.value=true
uni.$emit('get:table')
+ uni.$emit('update:orderDetail')
uni.navigateBack({
delta: 1
})
@@ -266,6 +275,10 @@
}
async function payOrder() {
const payType = pays.payTypes.list[pays.payTypes.selIndex].payType
+ if (payType == 'vipPay' && user.value.amount * 1 < order.amount * 1) {
+ infoBox.showToast('余额不足')
+ return
+ }
await Api.$payOrder({
tableId: order.tableId,
masterId: order.masterId,
@@ -328,7 +341,9 @@
queryAllShopUser({
id: order.userId
}).then(res => {
- user.value = res.content[0] || opt
+ if(res.content[0]){
+ user.value =res.content[0]
+ }
})
}
getPayUrl()
@@ -348,7 +363,6 @@
Object.assign(order, opt)
const payTypeList = await Api.$getPayType()
pays.payTypes.list = payTypeList
-
init()
})
From 86240ee89d2aa084905e0fc6ee28c1623362dabc Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Fri, 18 Oct 2024 16:45:01 +0800
Subject: [PATCH 7/7] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=AE=A2=E5=8D=95?=
=?UTF-8?q?=E7=9B=B8=E5=85=B3=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagesCreateOrder/confirm-order/confirm-order.vue | 2 +-
pagesOrder/detail/components/list.vue | 8 ++++----
pagesOrder/detail/components/order.vue | 11 +++++++----
3 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/pagesCreateOrder/confirm-order/confirm-order.vue b/pagesCreateOrder/confirm-order/confirm-order.vue
index 5ae943d..af73441 100644
--- a/pagesCreateOrder/confirm-order/confirm-order.vue
+++ b/pagesCreateOrder/confirm-order/confirm-order.vue
@@ -169,7 +169,7 @@
-
+
{{item.note}}
diff --git a/pagesOrder/detail/components/list.vue b/pagesOrder/detail/components/list.vue
index e0c98d5..3d43056 100644
--- a/pagesOrder/detail/components/list.vue
+++ b/pagesOrder/detail/components/list.vue
@@ -1,16 +1,16 @@
-
+
桌号:
{{orderInfo.tableName||""}}
-
+
共
{{goodsNumber}}
份菜品
-
- 第{{ order.placeNum }}次下单
+
+ 第{{ order.placeNum }}次下单
diff --git a/pagesOrder/detail/components/order.vue b/pagesOrder/detail/components/order.vue
index 5785bca..be6967a 100644
--- a/pagesOrder/detail/components/order.vue
+++ b/pagesOrder/detail/components/order.vue
@@ -32,10 +32,13 @@
订单编号
{{data.orderNo}}
-
+
+ 商家备注
+
+ {{data.remark}}
+
+
+