订单管理更新
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
<view>桌位号</view>
|
<view>桌位号</view>
|
||||||
<view>{{table.name||data.tableName}}</view>
|
<view>{{table.name||data.tableName}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-row-between u-m-t-20">
|
<view class="u-flex u-row-between u-m-t-20" v-if="seatFee.number">
|
||||||
<view>就餐人数</view>
|
<view>就餐人数</view>
|
||||||
<view>{{seatFee.number||''}}</view>
|
<view>{{seatFee.number||''}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -16,17 +16,24 @@
|
|||||||
<view style="height: 200rpx;"></view>
|
<view style="height: 200rpx;"></view>
|
||||||
<view class="u-fixed bottom bg-fff ">
|
<view class="u-fixed bottom bg-fff ">
|
||||||
<view class="u-flex u-abso">
|
<view class="u-flex u-abso">
|
||||||
<template v-if="orderDetail.info.status=='unpaid'">
|
<template v-if="orderDetail.info.useType=='takeout'">
|
||||||
<view class="u-flex-1">
|
<view class="u-flex-1">
|
||||||
<my-button @tap="diancan" color="#fff" bgColor="rgb(57,53,52)" borderRadius="100rpx 0 0 100rpx"
|
<my-button @tap="toPay" borderRadius="100rpx" shape="circle"
|
||||||
shape="circle" plain type="primary">加菜</my-button>
|
|
||||||
</view>
|
|
||||||
<view class="u-flex-1">
|
|
||||||
<my-button @tap="toPay" borderRadius="0 100rpx 100rpx 0" shape="circle"
|
|
||||||
type="primary">结账</my-button>
|
type="primary">结账</my-button>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<template v-if="orderDetail.info.status=='unpaid'">
|
||||||
|
<view class="u-flex-1">
|
||||||
|
<my-button @tap="diancan" color="#fff" bgColor="rgb(57,53,52)" borderRadius="100rpx 0 0 100rpx"
|
||||||
|
shape="circle" plain type="primary">加菜</my-button>
|
||||||
|
</view>
|
||||||
|
<view class="u-flex-1">
|
||||||
|
<my-button @tap="toPay" borderRadius="0 100rpx 100rpx 0" shape="circle"
|
||||||
|
type="primary">结账</my-button>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="u-m-t-2 bg-fff u-col-center u-flex u-p-l-28 u-p-r-28 u-p-t-30 u-row-between">
|
<view class="u-m-t-2 bg-fff u-col-center u-flex u-p-l-28 u-p-r-28 u-p-t-30 u-row-between">
|
||||||
<view class="status-item " @click="changeStatusSel(index)" :class="{active:statusData.sel==index}"
|
<view class="status-item " @click="changeStatusSel(item.value)" :class="{active:statusData.sel==item.value}"
|
||||||
v-for="(item,index) in statusData.list" :key="index">
|
v-for="(item,index) in statusData.list" :key="index">
|
||||||
{{item.label}}
|
{{item.label}}
|
||||||
</view>
|
</view>
|
||||||
@@ -138,6 +138,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
watch(() => timeData.sel, (newval) => {
|
watch(() => timeData.sel, (newval) => {
|
||||||
|
|
||||||
const data = timeData.list[newval]
|
const data = timeData.list[newval]
|
||||||
if (newval != -1) {
|
if (newval != -1) {
|
||||||
emits('update:time', [data.start, data.end])
|
emits('update:time', [data.start, data.end])
|
||||||
@@ -153,23 +154,27 @@
|
|||||||
value: ''
|
value: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '待完成',
|
label: '待支付',
|
||||||
value: ''
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '待退款',
|
|
||||||
value: ''
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '未支付',
|
|
||||||
value: 'unpaid'
|
value: 'unpaid'
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// label: '待完成',
|
||||||
|
// value: ''
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
label: '已完成',
|
||||||
|
value: 'closed'
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// label: '未支付',
|
||||||
|
// value: 'unpaid'
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
label: '已退款',
|
label: '已退款',
|
||||||
value: ''
|
value: 'refund'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
sel: 0
|
sel: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
function moreShowHide() {
|
function moreShowHide() {
|
||||||
@@ -182,6 +187,7 @@
|
|||||||
|
|
||||||
function changeStatusSel(i) {
|
function changeStatusSel(i) {
|
||||||
statusData.sel = i
|
statusData.sel = i
|
||||||
|
emits('update:status', i)
|
||||||
}
|
}
|
||||||
|
|
||||||
function datePickerConfirm(e) {
|
function datePickerConfirm(e) {
|
||||||
|
|||||||
@@ -4,10 +4,12 @@
|
|||||||
<view class="search bg-fff u-p-t-32 u-p-l-28 u-p-r-28 u-p-b-32">
|
<view class="search bg-fff u-p-t-32 u-p-l-28 u-p-r-28 u-p-b-32">
|
||||||
<up-search v-bind="search" v-model="search.val"></up-search>
|
<up-search v-bind="search" v-model="search.val"></up-search>
|
||||||
</view>
|
</view>
|
||||||
<filter-vue @clearUser="clearQueryUser" v-model:time="order.data.query.createdAt" :user="user" :type="option.type"></filter-vue>
|
<filter-vue @clearUser="clearQueryUser" v-model:status="order.data.query.status" v-model:time="order.data.query.createdAt" :user="user" :type="option.type"></filter-vue>
|
||||||
</view>
|
</view>
|
||||||
<order-list @printOrder="onPrintOrder" :hasAjax="order.data.hasAjax" :list="order.data.list"></order-list>
|
<order-list @printOrder="onPrintOrder" :hasAjax="order.data.hasAjax" :list="order.data.list"></order-list>
|
||||||
<my-pagination @change="pageChange" :totalElements="order.data.total"></my-pagination>
|
<template v-if="order.data.list.length>0">
|
||||||
|
<my-pagination @change="pageChange" :totalElements="order.data.total"></my-pagination>
|
||||||
|
</template>
|
||||||
<view style="height: 100rpx;"></view>
|
<view style="height: 100rpx;"></view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -26,7 +28,7 @@
|
|||||||
import {
|
import {
|
||||||
reactive, ref, watch
|
reactive, ref, watch
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
import {getTodayTimestamps} from '@/commons/utils/dayjs-time.js';
|
||||||
const search = reactive({
|
const search = reactive({
|
||||||
val: '',
|
val: '',
|
||||||
placeholder: '搜索单号/昵称/姓名/手机号码/商品名称',
|
placeholder: '搜索单号/昵称/姓名/手机号码/商品名称',
|
||||||
@@ -39,14 +41,15 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const today = getTodayTimestamps();
|
||||||
const order=new LIST({
|
const order=new LIST({
|
||||||
list: [],
|
list: [],
|
||||||
query: {
|
query: {
|
||||||
createdAt: [],
|
createdAt: [today.start,today.end],
|
||||||
id: "",
|
id: "",
|
||||||
orderNo: "",
|
orderNo: "",
|
||||||
orderType: "0",
|
orderType: "0",
|
||||||
page: 0,
|
page: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
payType: "",
|
payType: "",
|
||||||
productName: "",
|
productName: "",
|
||||||
@@ -68,12 +71,15 @@
|
|||||||
watch(()=>order.data.query.createdAt,(newval)=>{
|
watch(()=>order.data.query.createdAt,(newval)=>{
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
|
watch(()=>order.data.query.status,(newval)=>{
|
||||||
|
init()
|
||||||
|
})
|
||||||
watch(()=>order.data.query.userId,(newval)=>{
|
watch(()=>order.data.query.userId,(newval)=>{
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
async function init() {
|
async function init() {
|
||||||
console.log(order.data.query);
|
console.log(order.data.query);
|
||||||
const {content,totalElements}=await Api.tbOrderInfoData(order.data.query)
|
const {content,totalElements}=await Api.tbOrderInfoData({...order.data.query,page:order.data.query.page-1})
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
order.setVal('list',content)
|
order.setVal('list',content)
|
||||||
console.log(order.data.list);
|
console.log(order.data.list);
|
||||||
|
|||||||
Reference in New Issue
Block a user