宴席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">
<u-cell :border="false">
<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" />
</template>
<template #title>
<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"
iconStyle="font-size:28rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none">
</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>
</template>
<template #label>
<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=""
iconStyle="font-size:28rpx;color:#59CB56;margin-right:10rpx;" lines="1" decoration="none">
</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>
</template>
</u-cell>

View File

@ -18,77 +18,38 @@ body {
<template>
<view>
<up-navbar class=" " :autoBack="true" style="font-weight: bold;"
leftIcon="arrow-left" title="订单列表" titleColor="#303133" bgColor="#FFFFFFFF" titleWidth="600rpx"
height="80rpx" leftIconSize="38rpx" leftIconColor="#303133" :safeAreaInsetTop="true" :placeholder="true"
:fixed="true"></up-navbar>
<up-search v-model="search_sp.keyword" class="flex,flex-row p-1" style="" shape="round" bgColor="#f2f2f2"
<up-navbar class=" " :autoBack="true" style="font-weight: bold;" leftIcon="arrow-left" title="订单列表"
titleColor="#303133" bgColor="#FFFFFFFF" titleWidth="600rpx" height="80rpx" leftIconSize="38rpx"
leftIconColor="#303133" :safeAreaInsetTop="true" :placeholder="true" :fixed="true"></up-navbar>
<!-- <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"
searchIconColor="#909399" color="#606266" placeholderColor="#909399" searchIcon="search" margin="10rpx"
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"
v-model="matchedItems_sp" @query="changeSP" class="fv-page flex-col ">
<view v-for="(item, index) in matchedItems_sp" :key="index">
<view class="address_box">
<view class=" pt-2 pb-2 ps-2 pe-2" style="">
<u-cell class="" style="line-height: 60rpx;" :border="false" @click="orderDetail(item.id)">
<template #title>
<view class="h-50 flex">
<up-text class="" size="26rpx" color="#59CB56"
:text="` 宴席时间:${item.delivery_date} ${item.delivery_time} `" :flex1="true"
align="left" prefixIcon="clock" wordWrap="normal" :show="true"
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" color="#59CB56"
:text="`联系方式:${item.customer_name} ( ${item.phone})`" :flex1="true" align="left"
wordWrap="normal" :show="true" prefixIcon="map"
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.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 v-for="(item, index) in matchedItems_sp" :key="index" @click="orderDetail(item.id)">
<wd-card>
<!-- <template #title>
<view> {{ item.order_sn }}</view>
</template> -->
<view class="pt-2">订单编号{{ item.order_sn }} </view>
<view class="pt-2">联系人{{ item.customer_name }}</view>
<view class="pt-2">联系电话{{ item.phone }}</view>
<view class="pt-2">宴席类型{{ item.banquet_type }}</view>
<view class="pt-2">宴席地址{{ item.address }}</view>
<view class="pt-2">备注{{ item.remark }}</view>
<view class="pt-2">支付金额<text class="color-red">{{ item.final_price }}</text></view>
<view class="pt-2">预付金额<text class="color-red">{{ item.prepay_price }}</text></view>
<template #footer>
<view>
<!-- <wd-button size="small" style="margin-right: 8px;">评价</wd-button> -->
<wd-button size="small" plain>查看详情</wd-button>
</view>
</template>
</u-cell>
</view>
</view>
</wd-card>
</view>
</z-paging>
@ -134,10 +95,10 @@ export default defineComponent({
//
changeSP (pageNo: number) {
console.log('列表分页',pageNo);
console.log('列表分页', pageNo);
this.search_sp.page = pageNo;
console.log('列表分页',this.search_sp);
CommonApi.commonGet('/api/order/list', this.search_sp).catch((res) => {
console.log('列表分页', this.search_sp);
CommonApi.commonGet('/api/banquet/order/list', this.search_sp).catch((res) => {
if (res.code === 1) {
this.$refs.pagingRefSP?.complete(res.data);
// console.log('');
@ -156,7 +117,7 @@ export default defineComponent({
//
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) {

View File

@ -9,6 +9,8 @@ export {}
declare module 'vue' {
export interface GlobalComponents {
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']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']