feat: 添加催一催按钮、应用宝跳转配置
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
<template>
|
||||
<view class="flex-center ju-flex-end w100">
|
||||
<view
|
||||
class="ai-button3 w_144 m-r-10 remind-ai-btn"
|
||||
v-if="showRemind"
|
||||
@tap.stop="emit('remind')"
|
||||
>
|
||||
催一催
|
||||
</view>
|
||||
<view
|
||||
class="ai-button3 w_144 m-r-10"
|
||||
v-if="showDelay && !props.disableDelayShipment"
|
||||
@@ -90,6 +97,38 @@
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
deliveryType: {
|
||||
type: [Number, String],
|
||||
default: 0,
|
||||
},
|
||||
payStatus: {
|
||||
type: [Boolean, Number, String],
|
||||
default: false,
|
||||
},
|
||||
preparationStatus: {
|
||||
type: [Number, String],
|
||||
default: null,
|
||||
},
|
||||
pickUpVerifyTime: {
|
||||
type: [Number, String],
|
||||
default: '',
|
||||
},
|
||||
verifyTime: {
|
||||
type: [Number, String],
|
||||
default: '',
|
||||
},
|
||||
completedTime: {
|
||||
type: [Number, String],
|
||||
default: '',
|
||||
},
|
||||
arriveStoreTime: {
|
||||
type: [Number, String],
|
||||
default: '',
|
||||
},
|
||||
deliveredTime: {
|
||||
type: [Number, String],
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
|
||||
// 延迟发货按钮:仅允许【待发货(10/伪50)、部分发货(15)】状态展示
|
||||
@@ -120,5 +159,51 @@
|
||||
return false;
|
||||
});
|
||||
|
||||
const emit = defineEmits(['delay', 'now', 'view', 'confirm', 'pay', 'cancel', 'express']);
|
||||
const isVerifyCompleted = computed(() => {
|
||||
const status = Number(props.status);
|
||||
return Boolean(
|
||||
props.pickUpVerifyTime ||
|
||||
props.verifyTime ||
|
||||
props.completedTime ||
|
||||
status === 30 ||
|
||||
status === 3,
|
||||
);
|
||||
});
|
||||
|
||||
const resolveStage = () => {
|
||||
const external = Number(props.preparationStatus);
|
||||
const rawStatus = Number.isFinite(external) ? external : Number(props.preparationStatus ?? props.status ?? 0);
|
||||
if (isVerifyCompleted.value) return 'done';
|
||||
if (rawStatus === 1 || rawStatus === 2) return 'wait';
|
||||
if (
|
||||
props.deliveryTime ||
|
||||
props.arriveStoreTime ||
|
||||
props.deliveredTime ||
|
||||
rawStatus === 20
|
||||
) {
|
||||
return 'delivered';
|
||||
}
|
||||
return 'sorting';
|
||||
};
|
||||
|
||||
const isSorting = computed(() => resolveStage() === 'sorting');
|
||||
|
||||
const showRemind = computed(() => {
|
||||
return (
|
||||
Number(props.deliveryType) === 2 &&
|
||||
Boolean(props.payStatus) &&
|
||||
!isVerifyCompleted.value &&
|
||||
isSorting.value
|
||||
);
|
||||
});
|
||||
|
||||
const emit = defineEmits(['delay', 'now', 'view', 'confirm', 'pay', 'cancel', 'express', 'remind']);
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.remind-ai-btn {
|
||||
color: #2556ec !important;
|
||||
background: rgba(37, 86, 236, 0.08);
|
||||
border: 2rpx solid rgba(37, 86, 236, 0.28) !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -5,9 +5,11 @@
|
||||
<view class="flex-center ju-between createTime">
|
||||
<view class="flex-center shrink">
|
||||
<view class="size28">订单编号: {{ props.data.no }}</view>
|
||||
|
||||
<view class="copy flex-center" @tap.stop="onCopy(props.data.no)" style="margin-left: 10px">
|
||||
<image :src="`${$url}goods/copy2.svg`" mode="scaleToFill" />
|
||||
</view>
|
||||
<view class="pickup-tag" v-if="Number(props.data?.deliveryType) === 2">自提</view>
|
||||
</view>
|
||||
<view class="stateText size28" style="margin-left: 10px" :class="formatOrderColor(props.data)"
|
||||
v-if="!props.isAfterSale">
|
||||
@@ -778,6 +780,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
.pickup-tag {
|
||||
margin-left: 16rpx;
|
||||
padding: 4rpx 16rpx;
|
||||
line-height: 1.6;
|
||||
font-size: 22rpx;
|
||||
color: #2556ec;
|
||||
background: rgba(37, 86, 236, 0.08);
|
||||
border: 2rpx solid rgba(37, 86, 236, 0.18);
|
||||
border-radius: 8rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.con_item {
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user