代客下单修改部分页面跳转逻辑
This commit is contained in:
parent
ec509d1186
commit
c9e195c859
|
|
@ -146,7 +146,8 @@
|
|||
} = await $table.get(query)
|
||||
tables.hasAjax = true
|
||||
content = content.filter(v =>{
|
||||
return v.status == 'idle'||(v.status=='using')
|
||||
// return v.status == 'idle'||(v.status=='using')
|
||||
return v.status == 'idle'
|
||||
})
|
||||
console.log(content );
|
||||
tables.list = content
|
||||
|
|
|
|||
|
|
@ -528,14 +528,16 @@
|
|||
if ($shop.value.registerType == 'munchies') {
|
||||
//先付
|
||||
return go.to('PAGES_ORDER_PAY', {
|
||||
orderId: res.id
|
||||
})
|
||||
orderId: res.id,
|
||||
isNowPay:true
|
||||
},'redirect'
|
||||
)
|
||||
} else {
|
||||
//后付
|
||||
if (option.isCreateOrderToDetail) {
|
||||
go.to('PAGES_ORDER_DETAIL', {
|
||||
id: res.id
|
||||
})
|
||||
},'redirect')
|
||||
} else {
|
||||
uni.navigateBack({
|
||||
delta: 2
|
||||
|
|
|
|||
|
|
@ -391,8 +391,7 @@
|
|||
// data.table=res.content[0]
|
||||
}
|
||||
}
|
||||
|
||||
let $originGoods = ref([])
|
||||
let $originGoods = []
|
||||
async function init() {
|
||||
const shopInfo = await tbShopInfo()
|
||||
$shop.value = shopInfo
|
||||
|
|
@ -417,10 +416,10 @@
|
|||
}
|
||||
return isShow;
|
||||
});
|
||||
$originGoods.value = goods
|
||||
$originGoods=goods
|
||||
if (!data.table.tableId) {
|
||||
//无桌台
|
||||
setTabBar(category, $originGoods.value, [])
|
||||
setTabBar(category, goods, [])
|
||||
return
|
||||
}
|
||||
const {
|
||||
|
|
@ -464,9 +463,9 @@
|
|||
const newval = searchValue.value
|
||||
let arr = []
|
||||
if (newval == "") {
|
||||
arr = $originGoods.value;
|
||||
arr = $originGoods;
|
||||
} else {
|
||||
arr = $originGoods.value.filter((v) =>
|
||||
arr = $originGoods.filter((v) =>
|
||||
v.name.includes(newval.trim())
|
||||
);
|
||||
}
|
||||
|
|
@ -659,7 +658,9 @@
|
|||
|
||||
function chooseGuige(foodsindex, index) {
|
||||
if (!canAddGoods()) {
|
||||
return infoBox.showToast('清先选择桌台')
|
||||
return infoBox.showToast('清先选择桌台',0.5).then(res=>{
|
||||
chooseTable()
|
||||
})
|
||||
}
|
||||
const $goods = data.tabbar[index].foods[foodsindex]
|
||||
guigeModelData.title = $goods.name
|
||||
|
|
@ -763,7 +764,9 @@
|
|||
}
|
||||
async function goodsUpdate(foodsindex, index, isAdd) {
|
||||
if (!canAddGoods()) {
|
||||
return infoBox.showToast('清先选择桌台')
|
||||
return infoBox.showToast('请先选择桌台',0.5).then(res=>{
|
||||
chooseTable()
|
||||
})
|
||||
}
|
||||
const $goods = data.tabbar[index].foods[foodsindex]
|
||||
if ($goods.isDan) {
|
||||
|
|
@ -981,6 +984,7 @@
|
|||
// watchChooseuser()
|
||||
watchChooseTable()
|
||||
watchUpdate()
|
||||
init()
|
||||
})
|
||||
let isCreateOrderToDetail = ref(false)
|
||||
onLoad((opt) => {
|
||||
|
|
@ -998,7 +1002,7 @@
|
|||
// go.back()
|
||||
// }, 1500)
|
||||
// }
|
||||
init()
|
||||
// init()
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -80,12 +80,15 @@
|
|||
ref
|
||||
} from 'vue';
|
||||
import {
|
||||
onLoad
|
||||
onLoad,
|
||||
onBackPress
|
||||
} from '@dcloudio/uni-app'
|
||||
import * as Api from '@/http/yskApi/Instead.js'
|
||||
import infoBox from '@/commons/utils/infoBox.js'
|
||||
import editDiscount from '/pagesCreateOrder/components/edit-discount.vue'
|
||||
import {queryAllShopUser} from '@/http/yskApi/shop-user.js'
|
||||
import {
|
||||
queryAllShopUser
|
||||
} from '@/http/yskApi/shop-user.js'
|
||||
const pays = reactive({
|
||||
list: ['扫码收款', '二维码收款'],
|
||||
selIndex: 0,
|
||||
|
|
@ -94,7 +97,11 @@
|
|||
selIndex: 0
|
||||
}
|
||||
})
|
||||
|
||||
let option = opt
|
||||
onBackPress(()=>{
|
||||
console.log('-------------------');
|
||||
console.log('onBackPress');
|
||||
})
|
||||
const models = new Map();
|
||||
|
||||
function setModel(el) {
|
||||
|
|
@ -107,8 +114,8 @@
|
|||
const model = models.get(key)
|
||||
model && model.open()
|
||||
}
|
||||
|
||||
let user=ref({})
|
||||
|
||||
let user = ref({})
|
||||
async function getPayType() {
|
||||
const payTypeList = await Api.$getPayType()
|
||||
pays.payTypes.list = payTypeList
|
||||
|
|
@ -125,7 +132,7 @@
|
|||
uni.$emit('update:createOrderIndex')
|
||||
console.log('update:createOrderIndex');
|
||||
uni.navigateBack({
|
||||
delta: 2
|
||||
delta: 1
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
|
|
@ -184,11 +191,14 @@
|
|||
}
|
||||
})
|
||||
onLoad((opt) => {
|
||||
option = opt
|
||||
console.log(opt);
|
||||
Object.assign(order, opt)
|
||||
if(order.userId){
|
||||
queryAllShopUser({id:opt.userId}).then(res=>{
|
||||
user.value=res.content[0]||opt
|
||||
if (order.userId) {
|
||||
queryAllShopUser({
|
||||
id: opt.userId
|
||||
}).then(res => {
|
||||
user.value = res.content[0] || opt
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue