完善功能
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
<route lang="jsonc" type="page">{
|
||||
"layout": "default",
|
||||
"style": {
|
||||
"layout": "default",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
}</route>
|
||||
|
||||
<template>
|
||||
<view>
|
||||
<view>
|
||||
<view>
|
||||
<navbar title="订单详情" custom-class="!bg-[transparent]"></navbar>
|
||||
</view>
|
||||
@ -15,39 +15,46 @@
|
||||
<view class="mt-38rpx">
|
||||
<view class="">
|
||||
<view class="mx-48rpx flex items-center">
|
||||
<view class="rounded-4rpx w-60rpx text-center text-[#40AE36] border-2rpx border-solid border-[#40AE36] text-22rpx pb-4rpx" v-if="isGroupBuy">团购</view>
|
||||
<view class="rounded-4rpx w-60rpx text-center text-[#FF5951] border-2rpx border-solid border-[#FF5951] text-22rpx pb-4rpx" v-if="isDirectSale">直营</view>
|
||||
<template v-if="isRecharge">
|
||||
<view class="w-600rpx line-2 ml-20rpx font-bold text-30rpx text-[#303133] leading-42rpx text-center">
|
||||
门店余额充值
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="w-600rpx line-2 ml-20rpx font-bold text-30rpx text-[#303133] leading-42rpx text-left">
|
||||
【{{ bill?.room?.title }}】{{ bill?.order?.group?.title || '' }}
|
||||
</view>
|
||||
</template>
|
||||
<view
|
||||
class="rounded-4rpx w-60rpx text-center text-[#40AE36] border-2rpx border-solid border-[#40AE36] text-22rpx pb-4rpx"
|
||||
v-if="isGroupBuy">团购</view>
|
||||
<view
|
||||
class="rounded-4rpx w-60rpx text-center text-[#FF5951] border-2rpx border-solid border-[#FF5951] text-22rpx pb-4rpx"
|
||||
v-if="isDirectSale">直营</view>
|
||||
<template v-if="isRecharge">
|
||||
<view
|
||||
class="w-600rpx line-2 ml-20rpx font-bold text-30rpx text-[#303133] leading-42rpx text-center">
|
||||
门店余额充值
|
||||
</view>
|
||||
</template>
|
||||
<template v-else-if="isFenRun">
|
||||
<view
|
||||
class="w-600rpx line-2 ml-20rpx font-bold text-30rpx text-[#303133] leading-42rpx text-center">
|
||||
茶艺师订单分润
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view
|
||||
class="w-600rpx line-2 ml-20rpx font-bold text-30rpx text-[#303133] leading-42rpx text-left">
|
||||
【{{ bill?.room?.title }}】{{ bill?.order?.group?.title || '' }}
|
||||
</view>
|
||||
</template>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mt-30rpx text-40rpx text-[#303133] leading-56rpx text-center">
|
||||
<text class="font-bold" v-if="bill.change_type == 1 || bill.change_type == 2 || bill.change_type == 4 || bill.change_type == 9">+</text>
|
||||
<text class="font-bold"
|
||||
v-if="bill.change_type == 1 || bill.change_type == 2 || bill.change_type == 4 || bill.change_type == 9 || bill.change_type == 15">+</text>
|
||||
<text class="font-bold" v-if="bill.change_type == 3 || bill.change_type == 5">-</text>
|
||||
¥{{ bill.amount }}
|
||||
</view>
|
||||
|
||||
<!-- <view class="flex items-center flex items-center justify-center mt-16rpx">
|
||||
<wd-img width="28rpx" height="28rpx" :src="`${OSS}images/store/finance/image2.png`" mode="aspectFit" />
|
||||
<view class="text-26rpx text-[#606266] leading-36rpx ml-12rpx" v-if="bill.change_type == 1">预定成功</view>
|
||||
<view class="text-26rpx text-[#606266] leading-36rpx ml-12rpx" v-if="bill.change_type == 2">续订成功</view>
|
||||
<view class="text-26rpx text-[#606266] leading-36rpx ml-12rpx" v-if="bill.change_type == 3">提现成功</view>
|
||||
<view class="text-26rpx text-[#606266] leading-36rpx ml-12rpx" v-if="bill.change_type == 4">核销成功</view>
|
||||
<view class="text-26rpx text-[#606266] leading-36rpx ml-12rpx" v-if="bill.change_type == 5">退款成功</view>
|
||||
</view> -->
|
||||
<view class="flex items-center flex items-center justify-center mt-16rpx">
|
||||
<wd-img width="28rpx" height="28rpx" :src="`${OSS}images/store/finance/image2.png`" mode="aspectFit" />
|
||||
<view class="text-26rpx text-[#606266] leading-36rpx ml-12rpx" v-if="isGroupBuy">核销成功</view>
|
||||
<view class="text-26rpx text-[#606266] leading-36rpx ml-12rpx" v-if="isDirectSale">结算成功</view>
|
||||
<view class="text-26rpx text-[#606266] leading-36rpx ml-12rpx" v-if="isFenRun">分润成功</view>
|
||||
</view>
|
||||
|
||||
<view class="mx-28rpx mt-72rpx">
|
||||
@ -61,8 +68,8 @@
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
<view>预约时间</view>
|
||||
<view>{{ bill?.order?.update_dtime }}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
<view>预约时长</view>
|
||||
<view>{{ bill?.order?.hours }}小时</view>
|
||||
@ -88,30 +95,40 @@
|
||||
<wd-gap height="2rpx" bg-color="#E5E5E5"></wd-gap>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<!-- 直营和团购都显示 -->
|
||||
<view>
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
<view>总收入</view>
|
||||
<view>¥{{ bill?.order?.order_amount }}</view>
|
||||
<view>¥{{ isFenRun ? bill.amount : bill?.order?.order_amount }}</view>
|
||||
</view>
|
||||
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx" v-if="bill.change_type != 9">
|
||||
<template v-if="bill.change_type == 15">
|
||||
<view
|
||||
class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
<view>创建时间</view>
|
||||
<view>{{ bill?.create_time }}</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx"
|
||||
v-if="bill.change_type != 9 && bill.change_type != 15">
|
||||
<view>优惠券</view>
|
||||
<view>-¥{{ bill?.order?.coupon_price }}</view>
|
||||
</view>
|
||||
|
||||
<view class="mt-20rpx">
|
||||
<view class="mt-20rpx" v-if="!isFenRun">
|
||||
<wd-gap height="2rpx" bg-color="#E5E5E5"></wd-gap>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view>
|
||||
<view v-if="!isFenRun">
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
<view>用户手机号</view>
|
||||
<view>{{ bill?.order.mobile }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
<view>订单编号</view>
|
||||
@ -123,91 +140,103 @@
|
||||
</view>
|
||||
|
||||
<!-- 直营显示 -->
|
||||
<view v-if="isDirectSale" class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
<view v-if="isDirectSale"
|
||||
class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
<view>交易方式</view>
|
||||
<view>{{ bill?.order?.pay_way_title }}</view>
|
||||
</view>
|
||||
|
||||
<!-- 充值的支付方式 -->
|
||||
<view v-if="isRecharge" class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
<view v-if="isRecharge"
|
||||
class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
<view>支付方式</view>
|
||||
<view>{{ bill?.order?.pay_way_title }}</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
<view>创建时间</view>
|
||||
<view>{{ bill?.order?.dtime }}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 团购显示 -->
|
||||
<view v-if="isGroupBuy">
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
<view
|
||||
class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
<view>验券时间</view>
|
||||
<view>{{ bill?.order?.group?.yanquan_dtime }}</view>
|
||||
</view>
|
||||
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
<view>验券门店</view>
|
||||
<view>{{ bill?.store?.name }}</view>
|
||||
</view>
|
||||
|
||||
<view class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
<view>券号</view>
|
||||
<view>{{ bill?.order?.group?.qr_sn }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 直营显示 -->
|
||||
<view v-if="isDirectSale" class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
<view v-if="isDirectSale"
|
||||
class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
<view>付款时间</view>
|
||||
<view>{{ bill?.order?.dtime }}</view>
|
||||
</view>
|
||||
|
||||
<!-- 充值 -->
|
||||
<view v-if="isRecharge" class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
<view v-if="isRecharge"
|
||||
class="text-28rpx leading-40rpx text-[#606266] flex items-center justify-between mt-22rpx">
|
||||
<view>付款时间</view>
|
||||
<view>{{ bill?.order?.pay_time }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { toTimes, copy } from '@/utils/tools'
|
||||
import { getUserTransactionDetailsInfo } from '@/api/user'
|
||||
import { toTimes, copy } from '@/utils/tools'
|
||||
import { getUserTransactionDetailsInfo } from '@/api/user'
|
||||
|
||||
const OSS = inject('OSS')
|
||||
const bill = ref<any>({})
|
||||
const OSS = inject('OSS')
|
||||
const bill = ref<any>({})
|
||||
|
||||
onLoad(async (args) => {
|
||||
const id = Number(args.id) || 0
|
||||
if (id) {
|
||||
const res = await getUserTransactionDetailsInfo(id)
|
||||
bill.value = res.details
|
||||
}
|
||||
})
|
||||
|
||||
// 团购
|
||||
const isGroupBuy = computed(() => {
|
||||
return bill.value.change_type === 4
|
||||
})
|
||||
|
||||
// 直营
|
||||
const isDirectSale = computed(() => {
|
||||
return bill.value.change_type === 1 || bill.value.change_type === 2
|
||||
})
|
||||
|
||||
// 充值
|
||||
const isRecharge = computed(() => {
|
||||
return bill.value.change_type === 9
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #fff;
|
||||
onLoad(async (args) => {
|
||||
const id = Number(args.id) || 0
|
||||
if (id) {
|
||||
const res = await getUserTransactionDetailsInfo(id)
|
||||
bill.value = res.details
|
||||
}
|
||||
})
|
||||
|
||||
// 团购
|
||||
const isGroupBuy = computed(() => {
|
||||
return bill.value.change_type === 4
|
||||
})
|
||||
|
||||
// 直营
|
||||
const isDirectSale = computed(() => {
|
||||
return bill.value.change_type === 1 || bill.value.change_type === 2
|
||||
})
|
||||
|
||||
// 充值
|
||||
const isRecharge = computed(() => {
|
||||
return bill.value.change_type === 9
|
||||
})
|
||||
|
||||
// 分润
|
||||
const isFenRun = computed(() => {
|
||||
return bill.value.change_type === 15
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -52,13 +52,14 @@
|
||||
<view class="flex items-center justify-between">
|
||||
<view class="line-1 w-480rpx font-bold text-30rpx text-[#303133] leading-42rpx">
|
||||
<template v-if="item.change_type == 9">门店余额充值</template>
|
||||
<template v-else-if="item.change_type == 15">茶艺师订单分润</template>
|
||||
<template v-else>
|
||||
【{{ item?.room?.title }}】{{ item?.group?.title || '' }}
|
||||
</template>
|
||||
</view>
|
||||
<view class="flex items-center">
|
||||
<view class="text-[#FF5951] font-bold text-30rpx leading-42rpx">
|
||||
<text v-if="item.change_type == 1 || item.change_type == 2 || item.change_type == 4 || item.change_type == 9"> + </text>
|
||||
<text v-if="item.change_type == 1 || item.change_type == 2 || item.change_type == 4 || item.change_type == 9 || item.change_type == 15"> + </text>
|
||||
<text v-if="item.change_type == 3 || item.change_type == 5"> - </text>
|
||||
{{ item.amount }}
|
||||
</view>
|
||||
@ -68,11 +69,13 @@
|
||||
|
||||
<view class="mt-12rpx">
|
||||
<view class="flex items-center">
|
||||
<view class="rounded-4rpx min-w-60rpx text-center text-[#40AE36] border-2rpx border-solid border-[#40AE36] text-22rpx pb-4rpx" v-if="item.change_type == 1 || item.change_type == 2 ||item.change_type == 4 || item.change_type == 9">
|
||||
<view class="rounded-4rpx min-w-60rpx text-center text-[#40AE36] border-2rpx border-solid border-[#40AE36] text-22rpx pb-4rpx"
|
||||
v-if="item.change_type == 1 || item.change_type == 2 ||item.change_type == 4 || item.change_type == 9 || item.change_type == 15">
|
||||
<text v-if="item.change_type == 1">预定</text>
|
||||
<text v-if="item.change_type == 2">续单</text>
|
||||
<text v-if="item.change_type == 4">核销</text>
|
||||
<text v-if="item.change_type == 9">充值</text>
|
||||
<text v-if="item.change_type == 15">分润</text>
|
||||
</view>
|
||||
<view class="rounded-4rpx min-w-60rpx text-center text-[#FF5951] border-2rpx border-solid border-[#FF5951] text-22rpx pb-4rpx" v-if="item.change_type == 3 || item.change_type == 5">
|
||||
<text v-if="item.change_type == 3">提现</text>
|
||||
@ -89,6 +92,7 @@
|
||||
<text v-if="item.change_type == 4">核销时间:{{ item.create_time }}</text>
|
||||
<text v-if="item.change_type == 5">取消订单时间:{{ item.create_time }}</text>
|
||||
<text v-if="item.change_type == 9">充值时间:{{ item.create_time }}</text>
|
||||
<text v-if="item.change_type == 15">分润时间:{{ item.create_time }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</mescroll-body>
|
||||
|
||||
@ -14,16 +14,15 @@
|
||||
<view class="order-list sticky top-0 left-0 z-50 bg-[#F6F7F8] pb-10rpx">
|
||||
<wd-navbar safeAreaInsetTop custom-class='!bg-[#F6F7F8]' :bordered="false" placeholder>
|
||||
<template #left>
|
||||
<!-- <view class="search-box">
|
||||
<wd-search v-model="keywords" hide-cancel placeholder-left light placeholder="搜索订单信息"></wd-search>
|
||||
</view> -->
|
||||
<view @click="router.navigateBack()">
|
||||
<wd-icon name="thin-arrow-left" size="30rpx" color="#121212" ></wd-icon>
|
||||
</view>
|
||||
<view class="search-box flex items-center ml-26rpx" @click="Order.handleToSearch">
|
||||
<wd-search placeholder="搜索订单信息" hide-cancel disabled :placeholder-left="true"
|
||||
placeholderStyle="text-align:left;padding-left: 24rpx;line-heigt: 44rpx;color: #C9C9C9; font-size: 32rpx;font-weight: normal;">
|
||||
</wd-search>
|
||||
<view class="flex items-center">
|
||||
<view @click="router.navigateBack()">
|
||||
<wd-icon name="thin-arrow-left" size="30rpx" color="#121212" ></wd-icon>
|
||||
</view>
|
||||
<view class="search-box flex items-center ml-26rpx" @click="Order.handleToSearch">
|
||||
<wd-search placeholder="搜索订单信息" hide-cancel disabled :placeholder-left="true"
|
||||
placeholderStyle="text-align:left;padding-left: 24rpx;line-heigt: 44rpx;color: #C9C9C9; font-size: 32rpx;font-weight: normal;">
|
||||
</wd-search>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</wd-navbar>
|
||||
|
||||
@ -295,7 +295,7 @@
|
||||
</view> -->
|
||||
|
||||
<!-- 适用包间 -->
|
||||
<view class="mt-28rpx">
|
||||
<view class="mt-28rpx" v-if="useStore.defaultStore.operationType == 1">
|
||||
<view class="flex items-center mb-20rpx">
|
||||
<!-- TODO 有包间的显示包间(还需要添加一个全适合用),没有包间的显示通用 -->
|
||||
<view class="text-30rpx leading-44rpx text-#303133 mr-10rpx font-bold">适用包间</view>
|
||||
@ -418,7 +418,7 @@
|
||||
const startTime = ref<number>(Date.now())
|
||||
const endTime = ref<number>(Date.now())
|
||||
|
||||
onLoad(async (args) => {
|
||||
onLoad(async (args: any) => {
|
||||
token.value = uni.getStorageSync('token')
|
||||
await Add.handleGetRoomList()
|
||||
|
||||
@ -593,8 +593,8 @@
|
||||
// return
|
||||
// }
|
||||
|
||||
// 适用包间
|
||||
if (roomId.value.length == 0) {
|
||||
// 直营点才填写适用包间
|
||||
if (roomId.value.length == 0 && useStore.defaultStore.operationType == 1) {
|
||||
toast.info('请选择适用包间')
|
||||
return
|
||||
}
|
||||
|
||||
@ -37,6 +37,13 @@
|
||||
<view class="mt-20rpx border-b border-b-solid border-b-[#F6F7F8] pb-20rpx">
|
||||
<wd-input no-border placeholder="请输入法定代表" v-model="form.legal_person"></wd-input>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mt-22rpx">
|
||||
<view class="text-26rpx leading-32rpx text-#606266">身份证号码</view>
|
||||
<view class="mt-20rpx border-b border-b-solid border-b-[#F6F7F8] pb-20rpx">
|
||||
<wd-input no-border placeholder="请输入身份证号码" v-model="form.person_card"></wd-input>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mt-22rpx">
|
||||
@ -117,6 +124,7 @@
|
||||
card: '', // 证件号码
|
||||
name: '', // 企业名称
|
||||
legal_person: '', // 法定代表
|
||||
person_card: '', // 法定代表身份证号码
|
||||
operation_type: 1, // 有效期 1-长期 2-非长期
|
||||
start_time: '',
|
||||
end_time: ''
|
||||
@ -152,6 +160,7 @@
|
||||
form.name = details.name
|
||||
form.legal_person = details.legal_person
|
||||
form.operation_type = details.effective
|
||||
form.person_card = details.person_card
|
||||
form.start_time = details.start_time
|
||||
form.end_time = details.end_time
|
||||
fileList.value = [{url: details.license_img, name: 'license.jpg'}]
|
||||
@ -181,6 +190,7 @@
|
||||
if (!form.start_time) return toast.error('请选择起始日期')
|
||||
if (!form.end_time) return toast.error('请选择截止日期')
|
||||
}
|
||||
if (!form.person_card) return toast.error('请输入身份证号码')
|
||||
|
||||
if (fileList.value.length === 0) return toast.error('请上传营业执照')
|
||||
|
||||
@ -191,6 +201,7 @@
|
||||
legal_person: form.legal_person,
|
||||
license_img: removeImageUrlPrefix(fileList.value)[0],
|
||||
effective: form.operation_type,
|
||||
person_card: form.person_card,
|
||||
start_time: form.operation_type === 1 ? '' : form.start_time,
|
||||
end_time: form.operation_type === 1 ? '' : form.end_time
|
||||
}
|
||||
|
||||
@ -31,6 +31,11 @@
|
||||
<view class="flex items-center mt-28rpx text-28rpx leading-40rpx">
|
||||
<view class="mr-20rpx text-[#606266]">法定代表:</view>
|
||||
<view class="text-[#303133]">{{ licenses.legal_person }}</view>
|
||||
</view>
|
||||
|
||||
<view class="flex items-center mt-28rpx text-28rpx leading-40rpx">
|
||||
<view class="mr-20rpx text-[#606266]">身份证号:</view>
|
||||
<view class="text-[#303133]">{{ licenses.person_card }}</view>
|
||||
</view>
|
||||
|
||||
<view class="flex items-center mt-28rpx text-28rpx leading-40rpx">
|
||||
@ -61,6 +66,7 @@
|
||||
card: '', // 证件号码
|
||||
name: '', // 企业名称
|
||||
legal_person: '', // 法定代表
|
||||
person_card: '', // 法定代表身份证号码
|
||||
effective: 0, // 有效期 1-长期 2-非长期
|
||||
end_time: '', // 结束时间
|
||||
license_img: '' // 营业执照图片地址
|
||||
|
||||
@ -88,6 +88,7 @@
|
||||
onShow(() => {
|
||||
// 直营店才能操作菜单
|
||||
auth.value = useStore.defaultStore.operationType == 1 ? true : false
|
||||
console.log("🚀 ~ auth.value:", auth.value)
|
||||
})
|
||||
|
||||
const Store = {
|
||||
|
||||
Reference in New Issue
Block a user