fix(custom): 修复商家订单详情数据不显示的bug
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
19
components.d.ts
vendored
19
components.d.ts
vendored
@@ -12,18 +12,37 @@ declare module '@vue/runtime-core' {
|
|||||||
Cart: typeof import('./src/components/Cart.vue')['default']
|
Cart: typeof import('./src/components/Cart.vue')['default']
|
||||||
MerList: typeof import('./src/components/MerList.vue')['default']
|
MerList: typeof import('./src/components/MerList.vue')['default']
|
||||||
NutAvatar: typeof import('@nutui/nutui-taro')['Avatar']
|
NutAvatar: typeof import('@nutui/nutui-taro')['Avatar']
|
||||||
|
NutBacktop: typeof import('@nutui/nutui-taro')['Backtop']
|
||||||
NutButton: typeof import('@nutui/nutui-taro')['Button']
|
NutButton: typeof import('@nutui/nutui-taro')['Button']
|
||||||
|
NutCalendar: typeof import('@nutui/nutui-taro')['Calendar']
|
||||||
NutCell: typeof import('@nutui/nutui-taro')['Cell']
|
NutCell: typeof import('@nutui/nutui-taro')['Cell']
|
||||||
NutCellGroup: typeof import('@nutui/nutui-taro')['CellGroup']
|
NutCellGroup: typeof import('@nutui/nutui-taro')['CellGroup']
|
||||||
|
NutCheckbox: typeof import('@nutui/nutui-taro')['Checkbox']
|
||||||
|
NutCheckboxGroup: typeof import('@nutui/nutui-taro')['CheckboxGroup']
|
||||||
NutDialog: typeof import('@nutui/nutui-taro')['Dialog']
|
NutDialog: typeof import('@nutui/nutui-taro')['Dialog']
|
||||||
NutEllipsis: typeof import('@nutui/nutui-taro')['Ellipsis']
|
NutEllipsis: typeof import('@nutui/nutui-taro')['Ellipsis']
|
||||||
NutEmpty: typeof import('@nutui/nutui-taro')['Empty']
|
NutEmpty: typeof import('@nutui/nutui-taro')['Empty']
|
||||||
|
NutForm: typeof import('@nutui/nutui-taro')['Form']
|
||||||
|
NutFormItem: typeof import('@nutui/nutui-taro')['FormItem']
|
||||||
NutGrid: typeof import('@nutui/nutui-taro')['Grid']
|
NutGrid: typeof import('@nutui/nutui-taro')['Grid']
|
||||||
NutGridItem: typeof import('@nutui/nutui-taro')['GridItem']
|
NutGridItem: typeof import('@nutui/nutui-taro')['GridItem']
|
||||||
|
NutImagePreview: typeof import('@nutui/nutui-taro')['ImagePreview']
|
||||||
|
NutInput: typeof import('@nutui/nutui-taro')['Input']
|
||||||
NutInputNumber: typeof import('@nutui/nutui-taro')['InputNumber']
|
NutInputNumber: typeof import('@nutui/nutui-taro')['InputNumber']
|
||||||
|
NutOverlay: typeof import('@nutui/nutui-taro')['Overlay']
|
||||||
|
NutPagination: typeof import('@nutui/nutui-taro')['Pagination']
|
||||||
|
NutPicker: typeof import('@nutui/nutui-taro')['Picker']
|
||||||
NutPopup: typeof import('@nutui/nutui-taro')['Popup']
|
NutPopup: typeof import('@nutui/nutui-taro')['Popup']
|
||||||
NutPrice: typeof import('@nutui/nutui-taro')['Price']
|
NutPrice: typeof import('@nutui/nutui-taro')['Price']
|
||||||
|
NutSearchbar: typeof import('@nutui/nutui-taro')['Searchbar']
|
||||||
|
NutSwiper: typeof import('@nutui/nutui-taro')['Swiper']
|
||||||
|
NutSwiperItem: typeof import('@nutui/nutui-taro')['SwiperItem']
|
||||||
|
NutSwitch: typeof import('@nutui/nutui-taro')['Switch']
|
||||||
NutTable: typeof import('@nutui/nutui-taro')['Table']
|
NutTable: typeof import('@nutui/nutui-taro')['Table']
|
||||||
|
NutTabPane: typeof import('@nutui/nutui-taro')['TabPane']
|
||||||
|
NutTabs: typeof import('@nutui/nutui-taro')['Tabs']
|
||||||
|
NutTextarea: typeof import('@nutui/nutui-taro')['Textarea']
|
||||||
|
NutUploader: typeof import('@nutui/nutui-taro')['Uploader']
|
||||||
Pay: typeof import('./src/components/Pay.vue')['default']
|
Pay: typeof import('./src/components/Pay.vue')['default']
|
||||||
Popup: typeof import('./src/components/Popup.vue')['default']
|
Popup: typeof import('./src/components/Popup.vue')['default']
|
||||||
RichEditor: typeof import('./src/components/RichEditor.vue')['default']
|
RichEditor: typeof import('./src/components/RichEditor.vue')['default']
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ const props = defineProps({
|
|||||||
type: Object,
|
type: Object,
|
||||||
},
|
},
|
||||||
IsPendingOrder: {
|
IsPendingOrder: {
|
||||||
required: true,
|
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,30 +4,43 @@
|
|||||||
<view>订单号:{{ info.oid }}</view>
|
<view>订单号:{{ info.oid }}</view>
|
||||||
<view>{{ info.add_time }}</view>
|
<view>{{ info.add_time }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="good-info">
|
<view class="card">
|
||||||
<view class="top">
|
<view class="center" v-for="(itm, idx) in info.OrderGoods" :key="idx">
|
||||||
<image :src="info.BindGoods?.cover" />
|
<view class="top">
|
||||||
<view class="title">{{ info.BindGoods?.name }}</view>
|
<image :src="itm.Goods.cover" />
|
||||||
|
<view class="title">{{ itm.Goods.name }} </view>
|
||||||
|
<view class="right">
|
||||||
|
<view v-if="info.pay_type === 1">{{ itm.pay_price }}元</view>
|
||||||
|
<view v-else>{{ itm.pay_integral }}积分</view>
|
||||||
|
<view>x{{ itm.number }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="line"></view>
|
||||||
<view class="public-total">
|
<view class="bom" style="text-align: right">
|
||||||
共{{ info.count }}件商品,已支付
|
共{{ info.count }}件商品,支付方式:{{
|
||||||
<text class="money">{{ info.number }}</text>
|
info.pay_type === 1 ? "微信" : "积分"
|
||||||
|
}},实付:
|
||||||
|
<text style="color: red">{{
|
||||||
|
info.pay_type === 1 ? `${info.price}元` : `${info.exchange}积分`
|
||||||
|
}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<nut-cell-group>
|
<nut-cell-group>
|
||||||
<nut-cell title="订单状态:" :desc="orderStatus"></nut-cell>
|
<nut-cell title="订单状态:" :desc="orderStatus"></nut-cell>
|
||||||
<nut-cell title="下单用户:" :desc="info.BindUser?.nickName"></nut-cell>
|
<nut-cell title="下单用户:" :desc="info.User?.nickName"></nut-cell>
|
||||||
<nut-cell title="用户手机号:" :desc="info.BindUser?.phone"></nut-cell>
|
<nut-cell title="用户手机号:" :desc="info.User?.phone"></nut-cell>
|
||||||
|
<nut-cell title="核销时间:" :desc="info.User?.phone"></nut-cell>
|
||||||
<nut-cell
|
<nut-cell
|
||||||
v-if="info.status === 2"
|
v-if="info.status === 2"
|
||||||
title="核销人员:"
|
title="核销人员:"
|
||||||
:desc="info.BindCancelUser?.nickName"
|
:desc="info.CancelUser?.nickName"
|
||||||
></nut-cell>
|
></nut-cell>
|
||||||
<nut-cell
|
<nut-cell
|
||||||
v-if="info.status === 2"
|
v-if="info.status === 2"
|
||||||
title="核销人手机号:"
|
title="核销人手机号:"
|
||||||
:desc="info.BindCancelUser?.phone"
|
:desc="info.CancelUser?.phone"
|
||||||
></nut-cell>
|
></nut-cell>
|
||||||
</nut-cell-group>
|
</nut-cell-group>
|
||||||
</view>
|
</view>
|
||||||
@@ -35,15 +48,16 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Taro from "@tarojs/taro";
|
import Taro from "@tarojs/taro";
|
||||||
import { ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
|
|
||||||
const info = ref<any>({});
|
const info = ref<any>({});
|
||||||
|
|
||||||
Taro.useLoad(() => {
|
Taro.useLoad(() => {
|
||||||
info.value = Taro.getStorageSync("ver_order_info");
|
info.value = Taro.getStorageSync("ver_order_info");
|
||||||
|
console.log(info.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
const orderStatus = () => {
|
const orderStatus = computed(() => {
|
||||||
switch (info.value.status) {
|
switch (info.value.status) {
|
||||||
case 1:
|
case 1:
|
||||||
return "待核销";
|
return "待核销";
|
||||||
@@ -52,7 +66,7 @@ const orderStatus = () => {
|
|||||||
case 3:
|
case 3:
|
||||||
return "已失效";
|
return "已失效";
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@@ -60,6 +74,13 @@ page {
|
|||||||
--nut-cell-desc-color: #000;
|
--nut-cell-desc-color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.line {
|
||||||
|
width: 100%;
|
||||||
|
height: 1px;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
background: linear-gradient(90deg, #2291f8 0, #1cd1dc);
|
background: linear-gradient(90deg, #2291f8 0, #1cd1dc);
|
||||||
padding: 30px;
|
padding: 30px;
|
||||||
@@ -86,6 +107,7 @@ page {
|
|||||||
image {
|
image {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
height: 200px;
|
height: 200px;
|
||||||
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
@@ -113,4 +135,41 @@ page {
|
|||||||
color: #ff4c3c;
|
color: #ff4c3c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 15px auto;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.center {
|
||||||
|
.top {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
// align-items: flex-start;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 150px;
|
||||||
|
height: 150px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
margin-left: 10px;
|
||||||
|
display: -webkit-box;
|
||||||
|
overflow: hidden;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
width: 350px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
margin-left: 10px;
|
||||||
|
font-size: 28px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -63,6 +63,7 @@
|
|||||||
image {
|
image {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
height: 150px;
|
height: 150px;
|
||||||
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="name">订单号:{{ item.oid }}</view>
|
<view class="name">订单号:{{ item.oid }}</view>
|
||||||
<!-- <view class="sub">下单时间:{{ item.add_time }}</view> -->
|
<!-- <view class="sub">下单时间:{{ item.add_time }}</view> -->
|
||||||
<view class="sub">核销时间:{{ item.cancel_time || "待核销" }}</view>
|
<view class="sub" v-if="item.status !== 3">核销时间:{{ item.cancel_time || "待核销" }}</view>
|
||||||
<!-- <view style="color: red">{{
|
<!-- <view style="color: red">{{
|
||||||
item.status === 0
|
item.status === 0
|
||||||
? "待付款"
|
? "待付款"
|
||||||
@@ -43,8 +43,8 @@
|
|||||||
<image :src="itm.Goods.cover" />
|
<image :src="itm.Goods.cover" />
|
||||||
<view class="title">{{ itm.Goods.name }} </view>
|
<view class="title">{{ itm.Goods.name }} </view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<view>{{ itm.pay_price }}元</view>
|
<view v-if="item.pay_type === 1">{{ itm.pay_price }}元</view>
|
||||||
<view>{{ itm.pay_integral }}积分</view>
|
<view v-else>{{ itm.pay_integral }}积分</view>
|
||||||
<view>x{{ itm.number }}</view>
|
<view>x{{ itm.number }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
item.pay_type === 1 ? "微信" : "积分"
|
item.pay_type === 1 ? "微信" : "积分"
|
||||||
}},实付:
|
}},实付:
|
||||||
<text style="color: red">{{
|
<text style="color: red">{{
|
||||||
item.pay_type === 1 ? item.price : item.exchange
|
item.pay_type === 1 ? `${item.price}元` : `${item.exchange}积分`
|
||||||
}}</text>
|
}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
Reference in New Issue
Block a user