feat: 隐藏网店管理进度条
This commit is contained in:
@@ -13,7 +13,8 @@
|
|||||||
v-if="
|
v-if="
|
||||||
item.value.split(',').indexOf(String(props?.data?.status)) !== -1 &&
|
item.value.split(',').indexOf(String(props?.data?.status)) !== -1 &&
|
||||||
!(item.id === 3 && Number(props?.data?.type) === 5) &&
|
!(item.id === 3 && Number(props?.data?.type) === 5) &&
|
||||||
!(item.id === 3 && props?.data?.payChannelCode === 'cash_payment')
|
!(item.id === 3 && props?.data?.payChannelCode === 'cash_payment') &&
|
||||||
|
!(item.id === 3 && isAllRefunded)
|
||||||
"
|
"
|
||||||
class="btn size28 f500"
|
class="btn size28 f500"
|
||||||
@click.stop="btnClick(item.id)"
|
@click.stop="btnClick(item.id)"
|
||||||
@@ -28,6 +29,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { computed } from 'vue';
|
||||||
import { ref, getCurrentInstance, defineProps, defineEmits } from 'vue';
|
import { ref, getCurrentInstance, defineProps, defineEmits } from 'vue';
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import OrderApi from '@/sheep/api/trade/order';
|
import OrderApi from '@/sheep/api/trade/order';
|
||||||
@@ -46,6 +48,14 @@
|
|||||||
default: '0', //0列表2订单详情
|
default: '0', //0列表2订单详情
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 订单级 refundStatus:0 未退款 / 10 部分退款 / 20 全部退款
|
||||||
|
// 用户需求:如果是 20(全部退款),就不要展示"申请售后"按钮了。
|
||||||
|
const refundStatus = computed(() => {
|
||||||
|
const v = props.data?.refundStatus === undefined ? props.data?.refund_status : props.data?.refundStatus;
|
||||||
|
return Number(v) || 0;
|
||||||
|
});
|
||||||
|
const isAllRefunded = computed(() => refundStatus.value === 20);
|
||||||
let btns = ref([
|
let btns = ref([
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
@@ -99,6 +109,11 @@
|
|||||||
if (index === 3 && Number(props?.data?.type) === 5) {
|
if (index === 3 && Number(props?.data?.type) === 5) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// 全单已退款(refundStatus===20):保险层面禁止再次发起申请售后
|
||||||
|
if (index === 3 && isAllRefunded.value) {
|
||||||
|
uni.showToast({ title: '该订单已全部退款,无需再次申请售后', icon: 'none' });
|
||||||
|
return;
|
||||||
|
}
|
||||||
let id = props.data?.id;
|
let id = props.data?.id;
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case 1:
|
case 1:
|
||||||
|
|||||||
@@ -119,7 +119,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
class="btn flex-row ju-flex-end"
|
class="btn flex-row ju-flex-end"
|
||||||
v-if="props.type == 2 && !props.hideItemAfterSale"
|
v-if="props.type == 2 && !props.hideItemAfterSale && !isAllRefunded"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="ss-reset-button btnItem btnItem1"
|
class="ss-reset-button btnItem btnItem1"
|
||||||
@@ -224,6 +224,14 @@
|
|||||||
});
|
});
|
||||||
const isCompletedOrder = computed(() => orderStatusText.value === '已完成');
|
const isCompletedOrder = computed(() => orderStatusText.value === '已完成');
|
||||||
|
|
||||||
|
// 订单级 refundStatus:0 未退款 / 10 部分退款 / 20 全部退款
|
||||||
|
// 用户需求:refundStatus === 20(全部退款) 时,不要展示任何"申请售后"按钮(单品/整单都不展示)。
|
||||||
|
const refundStatus = computed(() => {
|
||||||
|
const v = props.data?.refundStatus === undefined ? props.data?.refund_status : props.data?.refundStatus;
|
||||||
|
return Number(v) || 0;
|
||||||
|
});
|
||||||
|
const isAllRefunded = computed(() => refundStatus.value === 20);
|
||||||
|
|
||||||
// 待收货状态(status=50):不再展示任何"已延迟 N 件"tab / 状态 + 数量的 SKU 延迟明细,
|
// 待收货状态(status=50):不再展示任何"已延迟 N 件"tab / 状态 + 数量的 SKU 延迟明细,
|
||||||
// 因为货已经发出,延迟发货的相关状态对用户无意义。
|
// 因为货已经发出,延迟发货的相关状态对用户无意义。
|
||||||
const isReceivingOrder = computed(() => {
|
const isReceivingOrder = computed(() => {
|
||||||
|
|||||||
@@ -74,6 +74,8 @@
|
|||||||
<view class="store-code c_999">编号:{{ row.code || '--' }}</view>
|
<view class="store-code c_999">编号:{{ row.code || '--' }}</view>
|
||||||
<view class="store-contact c_999 lineOne">联系电话:{{ row.phone || '--' }}</view>
|
<view class="store-contact c_999 lineOne">联系电话:{{ row.phone || '--' }}</view>
|
||||||
<view class="store-address c_999">{{ row.address || '--' }}</view>
|
<view class="store-address c_999">{{ row.address || '--' }}</view>
|
||||||
|
<!-- 销量库存进度条模块:先隐藏,等接口 ready 再打开 -->
|
||||||
|
<!--
|
||||||
<view class="store-progress">
|
<view class="store-progress">
|
||||||
<view class="store-progress__head flex-center ju-between">
|
<view class="store-progress__head flex-center ju-between">
|
||||||
<view class="store-progress__label">销量 / 库存</view>
|
<view class="store-progress__label">销量 / 库存</view>
|
||||||
@@ -86,6 +88,7 @@
|
|||||||
></view>
|
></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
-->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="store-actions flex-center ju-flex-end">
|
<view class="store-actions flex-center ju-flex-end">
|
||||||
|
|||||||
@@ -372,6 +372,15 @@
|
|||||||
}
|
}
|
||||||
state.order = data;
|
state.order = data;
|
||||||
|
|
||||||
|
// 订单级 refundStatus:0 未退款 / 10 部分退款 / 20 全部退款
|
||||||
|
// 用户需求:如果是 20(全部退款),不允许再进入申请售后页面 → 直接提示并返回。
|
||||||
|
const __rStatus = data?.refundStatus === undefined ? data?.refund_status : data?.refundStatus;
|
||||||
|
if (Number(__rStatus) === 20) {
|
||||||
|
uni.showToast({ title: '该订单已全部退款,无需再次申请售后', icon: 'none' });
|
||||||
|
setTimeout(() => uni.navigateBack({ delta: 1 }), 600);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// 按itemId精确查找订单项(单品入口),否则默认取第1项(整单入口仅用于商品卡片展示)
|
// 按itemId精确查找订单项(单品入口),否则默认取第1项(整单入口仅用于商品卡片展示)
|
||||||
// 注意:无论单品还是整单,都只展示 + 计算 + 提交 afterSaleStatus===0 的商品。
|
// 注意:无论单品还是整单,都只展示 + 计算 + 提交 afterSaleStatus===0 的商品。
|
||||||
const allItems = Array.isArray(data.items) ? data.items : [];
|
const allItems = Array.isArray(data.items) ? data.items : [];
|
||||||
|
|||||||
Reference in New Issue
Block a user