fix: 修复订单结算逻辑和商家档案重复问题
- 修复后台编辑订单状态为已完成时缺少结算分账逻辑 - 修复商家档案存在重复建档问题,添加唯一性校验 - 修复师傅核销码位数显示错误(6位改为4位) - 重构后台支付订单详情页交互逻辑,优化复制和弹窗关闭功能
这个提交包含在:
@@ -12,7 +12,7 @@
|
||||
<!-- 头部个人名片与资产核心区 -->
|
||||
<view class="profile-hero" :style="{ backgroundPosition: '0 -' + navHeight + 'px' }">
|
||||
<view class="hero-body">
|
||||
<!-- 用户基本信息(点击进入「账号信息」页,支持家庭/个人与商家资料切换维护) -->
|
||||
<!-- 用户基本信息(点击进入「账号信息」页) -->
|
||||
<view class="user-card clickable-hover" @tap="go('/pages/mine/account')">
|
||||
<view class="avatar-wrap">
|
||||
<image v-if="user && user.avatar" class="avatar-img" :src="user.avatar" mode="aspectFill" />
|
||||
@@ -21,7 +21,7 @@
|
||||
<view class="user-info">
|
||||
<view class="name-line">
|
||||
<text class="user-name">{{ user ? user.nickname : '未登录' }}</text>
|
||||
<view class="role-badge" :class="{ 'is-pro': isMasterOrMerchant }">
|
||||
<view class="role-badge" :class="{ 'is-pro': isMasterVerified }">
|
||||
<text class="role-badge-txt">{{ roleText }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -148,16 +148,6 @@
|
||||
<image class="arrow-ico" src="/static/icons/arrow-right.svg" mode="aspectFit" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="menu-item clickable-hover" v-if="isMerchantAccount" @tap="go('/pages/mine/account?focus=members')">
|
||||
<view class="menu-item-l">
|
||||
<image class="menu-ico" src="/static/icons/menu-subaccount.svg" mode="aspectFit" />
|
||||
<text class="menu-txt">子账号管理</text>
|
||||
</view>
|
||||
<view class="menu-item-r">
|
||||
<text class="menu-extra" v-if="subMemberCount > 0">{{ subMemberCount }} 人</text>
|
||||
<image class="arrow-ico" src="/static/icons/arrow-right.svg" mode="aspectFit" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<button class="menu-item menu-btn clickable-hover" open-type="contact">
|
||||
<view class="menu-item-l">
|
||||
@@ -231,7 +221,6 @@
|
||||
const navHeight = ref(getNavBarMetrics().totalNavHeight);
|
||||
const user = ref(null);
|
||||
const master = ref(null);
|
||||
const merchant = ref(null);
|
||||
const coupon = ref(0);
|
||||
const orderCounts = ref({
|
||||
pending_pay: 0,
|
||||
@@ -252,10 +241,6 @@
|
||||
];
|
||||
});
|
||||
|
||||
const subMemberCount = computed(() => {
|
||||
return (merchant.value && Number(merchant.value.member_count) > 0) ? Number(merchant.value.member_count) : 0;
|
||||
});
|
||||
|
||||
const mobileText = computed(() => {
|
||||
if (!user.value || !user.value.mobile) return '';
|
||||
const m = String(user.value.mobile);
|
||||
@@ -272,12 +257,8 @@
|
||||
return nick !== raw && nick !== mobileText.value;
|
||||
});
|
||||
|
||||
const isMerchantAccount = computed(() => {
|
||||
return !!(user.value && user.value.user_type === 'merchant');
|
||||
});
|
||||
|
||||
const isMasterOrMerchant = computed(() => {
|
||||
return (master.value && master.value.verify_status === 'pass') || isMerchantAccount.value;
|
||||
const isMasterVerified = computed(() => {
|
||||
return !!(master.value && master.value.verify_status === 'pass');
|
||||
});
|
||||
|
||||
const roleText = computed(() => {
|
||||
@@ -287,9 +268,6 @@
|
||||
}
|
||||
if (master.value && master.value.verify_status === 'pass') return '认证师傅';
|
||||
if (master.value && master.value.verify_status === 'pending') return '师傅审核中';
|
||||
if (isMerchantAccount.value) {
|
||||
return merchant.value && merchant.value.is_owner === false ? '关联商家' : '商家用户';
|
||||
}
|
||||
return '个人用户';
|
||||
});
|
||||
|
||||
@@ -334,9 +312,6 @@
|
||||
{ label: '用户服务协议', type: 'user_service' },
|
||||
{ label: '隐私保护指引', type: 'privacy' }
|
||||
];
|
||||
if (isMerchantAccount.value) {
|
||||
items.push({ label: '企业商家协同服务协议', type: 'merchant' });
|
||||
}
|
||||
if (master.value) {
|
||||
items.push({ label: '师傅入驻与履约服务协议', type: 'master' });
|
||||
}
|
||||
@@ -362,7 +337,6 @@
|
||||
const res = await api.profile();
|
||||
user.value = res;
|
||||
master.value = res.master;
|
||||
merchant.value = res.merchant;
|
||||
coupon.value = Number(res.coupon_count) || 0;
|
||||
if (res.order_counts) {
|
||||
orderCounts.value = {
|
||||
|
||||
@@ -75,7 +75,6 @@
|
||||
<view class="card-hd">
|
||||
<text class="status-name" :class="'s-' + o.status">{{ o.status_text }}</text>
|
||||
<view class="hd-tags">
|
||||
<text class="tag acc-tag" :class="{ owner: o.account_role === 'owner' }" v-if="o.has_merchant_team && o.account_role_text">{{ o.account_role_text }} · {{ o.account_name }}</text>
|
||||
<text class="tag quote-tag" v-if="o.price_type === 'quote' || o.price_type_tag === '报价'">报价</text>
|
||||
<text class="tag urgent-tag" v-if="Number(o.urgent)">加急</text>
|
||||
<view class="flag-wrap clickable-hover" @tap.stop="openOrderTag(o)">
|
||||
|
||||
在新工单中引用
屏蔽一个用户