宴席2.0
Some checks are pending
deploy / deploy (push) Waiting to run

This commit is contained in:
sjeam 2025-08-15 11:09:39 +08:00
parent 01886bf729
commit 5ba9a3eb76
3 changed files with 39 additions and 76 deletions

View File

@ -109,25 +109,25 @@
:key="index"> :key="index">
<u-cell :border="false"> <u-cell :border="false">
<template #icon> <template #icon>
<wd-img :width="60" :height="60" :src="item.dishes.images[0]" :enable-preview="true" :radius="8" <wd-img :width="60" :height="60" :src="item.dishes_info.images[0]" :enable-preview="true" :radius="8"
:round=false custom-class="margin-right-24" /> :round=false custom-class="margin-right-24" />
</template> </template>
<template #title> <template #title>
<view class="h-60 flex"> <view class="h-60 flex">
<up-text size="28rpx" :text="`${item.dishes.name}`" :flex1="true" align="left" wordWrap="normal" <up-text size="28rpx" :text="`${item.dishes_info.name}`" :flex1="true" align="left" wordWrap="normal"
:show="true" prefixIcon="" customStyle="font-weight:bold" :show="true" prefixIcon="" customStyle="font-weight:bold"
iconStyle="font-size:28rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none"> iconStyle="font-size:28rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none">
</up-text> </up-text>
<u-icon slot="right" label-color="red" readonly:label="`¥${item.dishes.price}元`"></u-icon> <u-icon slot="right" label-color="red" readonly :label="`¥${item.dishes_info.price}元`"></u-icon>
</view> </view>
</template> </template>
<template #label> <template #label>
<view class="h-60 flex color-gray"> <view class="h-60 flex color-gray">
<up-text size="26rpx" :text="`${item.dishes.intro}`" :flex1="true" align="left" wordWrap="normal" <up-text size="26rpx" :text="`${item.dishes_info.intro}`" :flex1="true" align="left" wordWrap="normal"
:show="true" prefixIcon="" customStyle="" :show="true" prefixIcon="" customStyle=""
iconStyle="font-size:28rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none"> iconStyle="font-size:28rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none">
</up-text> </up-text>
<u-icon slot="right" label-color="red" readonly:label="`X${item.number}`"></u-icon> <u-icon slot="right" label-color="red" readonly :label="`X${item.number}`"></u-icon>
</view> </view>
</template> </template>
</u-cell> </u-cell>

View File

@ -12,83 +12,44 @@
html, html,
body { body {
height: 0rpx; height: 0rpx;
} }
</style> </style>
<template> <template>
<view> <view>
<up-navbar class=" " :autoBack="true" style="font-weight: bold;" <up-navbar class=" " :autoBack="true" style="font-weight: bold;" leftIcon="arrow-left" title="订单列表"
leftIcon="arrow-left" title="订单列表" titleColor="#303133" bgColor="#FFFFFFFF" titleWidth="600rpx" titleColor="#303133" bgColor="#FFFFFFFF" titleWidth="600rpx" height="80rpx" leftIconSize="38rpx"
height="80rpx" leftIconSize="38rpx" leftIconColor="#303133" :safeAreaInsetTop="true" :placeholder="true" leftIconColor="#303133" :safeAreaInsetTop="true" :placeholder="true" :fixed="true"></up-navbar>
:fixed="true"></up-navbar> <!-- <up-search v-model="search_sp.keyword" class="flex,flex-row p-1" style="" shape="round" bgColor="#f2f2f2"
<up-search v-model="search_sp.keyword" class="flex,flex-row p-1" style="" shape="round" bgColor="#f2f2f2"
placeholder="输入订单编号" :clearabled="true" :showAction="false" inputAlign="left" borderColor="transparent" placeholder="输入订单编号" :clearabled="true" :showAction="false" inputAlign="left" borderColor="transparent"
searchIconColor="#909399" color="#606266" placeholderColor="#909399" searchIcon="search" margin="10rpx" searchIconColor="#909399" color="#606266" placeholderColor="#909399" searchIcon="search" margin="10rpx"
maxlength="-1" height="60rpx" @change="searchSP()"> maxlength="-1" height="60rpx" @change="searchSP()">
</up-search> </up-search> -->
<z-paging :fixed="false" height="calc(100vh - 380rpx)" width="calc(100vw - 50rpx)" <z-paging :fixed="false" height="calc(100vh - 200rpx)" width="calc(100vw - 50rpx)"
:paging-style="{ 'background-color': '#FFFFFFFF', 'padding': '20rpx' }" ref="pagingRefSP" :paging-style="{ 'background-color': '#FFFFFFFF', 'padding': '20rpx' }" ref="pagingRefSP"
v-model="matchedItems_sp" @query="changeSP" class="fv-page flex-col "> v-model="matchedItems_sp" @query="changeSP" class="fv-page flex-col ">
<view v-for="(item, index) in matchedItems_sp" :key="index"> <view v-for="(item, index) in matchedItems_sp" :key="index" @click="orderDetail(item.id)">
<view class="address_box"> <wd-card>
<view class=" pt-2 pb-2 ps-2 pe-2" style=""> <!-- <template #title>
<u-cell class="" style="line-height: 60rpx;" :border="false" @click="orderDetail(item.id)"> <view> {{ item.order_sn }}</view>
<template #title> </template> -->
<view class="h-50 flex"> <view class="pt-2">订单编号{{ item.order_sn }} </view>
<up-text class="" size="26rpx" color="#59CB56" <view class="pt-2">联系人{{ item.customer_name }}</view>
:text="` 宴席时间:${item.delivery_date} ${item.delivery_time} `" :flex1="true" <view class="pt-2">联系电话{{ item.phone }}</view>
align="left" prefixIcon="clock" wordWrap="normal" :show="true" <view class="pt-2">宴席类型{{ item.banquet_type }}</view>
iconStyle="font-size:32rpx;color:#59CB56;margin-right:10rpx;" lines="1" <view class="pt-2">宴席地址{{ item.address }}</view>
decoration="none"> <view class="pt-2">备注{{ item.remark }}</view>
</up-text> <view class="pt-2">支付金额<text class="color-red">{{ item.final_price }}</text></view>
</view> <view class="pt-2">预付金额<text class="color-red">{{ item.prepay_price }}</text></view>
<view class="h-50 flex"> <template #footer>
<up-text class="" size="26rpx" color="#59CB56" <view>
:text="`联系方式:${item.customer_name} ( ${item.phone})`" :flex1="true" align="left" <!-- <wd-button size="small" style="margin-right: 8px;">评价</wd-button> -->
wordWrap="normal" :show="true" prefixIcon="map" <wd-button size="small" plain>查看详情</wd-button>
iconStyle="font-size:32rpx;color:#59CB56;margin-right:10rpx;" lines="1" </view>
decoration="none"> </template>
</up-text> </wd-card>
</view>
<view class="h-50 flex">
<up-text class="" size="26rpx" :text="item.address" margin="40rpx" :flex1="true"
align="left" wordWrap="normal" :show="true" prefixIcon=""
iconStyle="font-size:32rpx;color:#59CB56;margin-right:10rpx;" lines="1"
decoration="none">
</up-text>
<!-- <view @click.stop="getopenLocation(item)">
<u-icon slot="right" label="查看地图" name="map"></u-icon>
</view> -->
</view>
<view class="h-50 flex">
<up-text class="" size="26rpx" :text="`订单编号:${item.order_sn}`" margin="40rpx"
:flex1="true" align="left" wordWrap="normal" :show="true" prefixIcon=""
iconStyle="font-size:32rpx;color:#59CB56;margin-right:10rpx;" lines="1"
decoration="none">
</up-text>
</view>
<view class="h-50 flex">
<up-text class="" size="26rpx" :text="`创建时间:${item.create_time}`" margin="40rpx"
:flex1="true" align="left" wordWrap="normal" :show="true" prefixIcon=""
iconStyle="font-size:32rpx;color:#59CB56;margin-right:10rpx;" lines="1"
decoration="none">
</up-text>
</view>
<view class="h-50 flex">
<up-text class="" size="26rpx" :text="`付款金额:¥${item.pay_amount}`" margin="40rpx"
:flex1="true" align="left" wordWrap="normal" :show="true" prefixIcon=""
iconStyle="font-size:32rpx;color:#59CB56;margin-right:10rpx;" lines="1"
decoration="none">
</up-text>
</view>
</template>
</u-cell>
</view>
</view>
</view> </view>
</z-paging> </z-paging>
@ -134,10 +95,10 @@ export default defineComponent({
// //
changeSP (pageNo: number) { changeSP (pageNo: number) {
console.log('列表分页',pageNo); console.log('列表分页', pageNo);
this.search_sp.page = pageNo; this.search_sp.page = pageNo;
console.log('列表分页',this.search_sp); console.log('列表分页', this.search_sp);
CommonApi.commonGet('/api/order/list', this.search_sp).catch((res) => { CommonApi.commonGet('/api/banquet/order/list', this.search_sp).catch((res) => {
if (res.code === 1) { if (res.code === 1) {
this.$refs.pagingRefSP?.complete(res.data); this.$refs.pagingRefSP?.complete(res.data);
// console.log(''); // console.log('');
@ -156,7 +117,7 @@ export default defineComponent({
// //
getopenLocation (res) { getopenLocation (res) {
useLocation().openLocation(res.latitude, res.longitude,res.address,res.address) useLocation().openLocation(res.latitude, res.longitude, res.address, res.address)
}, },
// //
orderDetail (id: number) { orderDetail (id: number) {

View File

@ -9,6 +9,8 @@ export {}
declare module 'vue' { declare module 'vue' {
export interface GlobalComponents { export interface GlobalComponents {
AgreePrivacy: typeof import('./../src/components/agree-privacy/index.vue')['default'] AgreePrivacy: typeof import('./../src/components/agree-privacy/index.vue')['default']
DishCategory: typeof import('./../src/components/DishCategory.vue')['default']
DishItem: typeof import('./../src/components/DishItem.vue')['default']
LangSelect: typeof import('./../src/components/lang-select/index.vue')['default'] LangSelect: typeof import('./../src/components/lang-select/index.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink'] RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView'] RouterView: typeof import('vue-router')['RouterView']